-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(collaboration): move positions to system field values array
merge remove_record_position and set_record_position operation #WIK-16688 refactor(collaboration): move positions to system field values array merge remove_record_position and set_record_position operation #WIK-16688
- Loading branch information
1 parent
0635a42
commit db8a1df
Showing
19 changed files
with
280 additions
and
240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,15 @@ | ||
import { ActionName, AddRecordPositionAction, AIViewTable, Positions, RemoveRecordPositionAction } from "../types"; | ||
import { IdPath } from "@ai-table/grid"; | ||
import { ActionName, SetRecordPositionAction, AIViewTable, Positions, RemovePositions } from '../types'; | ||
import { IdPath } from '@ai-table/grid'; | ||
|
||
export function setRecordPosition(aiTable: AIViewTable, position: Positions, path: IdPath) { | ||
const operation: AddRecordPositionAction = { | ||
type: ActionName.AddRecordPosition, | ||
position, | ||
export function setRecordPositions(aiTable: AIViewTable, positions: Positions | RemovePositions, path: IdPath) { | ||
const operation: SetRecordPositionAction = { | ||
type: ActionName.SetRecordPositions, | ||
positions, | ||
path | ||
}; | ||
aiTable.apply(operation); | ||
} | ||
|
||
export function removeRecordPosition(aiTable: AIViewTable, path: [string, string]) { | ||
const operation: RemoveRecordPositionAction = { | ||
type: ActionName.RemoveRecordPosition, | ||
path | ||
}; | ||
aiTable.apply(operation); | ||
} | ||
|
||
export const PositionActions = { | ||
setRecordPosition, | ||
removeRecordPosition | ||
export const PositionsActions = { | ||
setRecordPositions | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
export * from './init-shared'; | ||
export * from './init-table'; | ||
export * from './initialize'; | ||
export * from './translate'; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.