@ai-table/state 0.4.2 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/fesm2022/ai-table-state.mjs +5 -5
  2. package/fesm2022/ai-table-state.mjs.map +1 -1
  3. package/index.d.ts +319 -2
  4. package/index.d.ts.map +1 -1
  5. package/package.json +1 -1
  6. package/action/field.d.ts +0 -16
  7. package/action/field.d.ts.map +0 -1
  8. package/action/general.d.ts +0 -6
  9. package/action/general.d.ts.map +0 -1
  10. package/action/group.d.ts +0 -7
  11. package/action/group.d.ts.map +0 -1
  12. package/action/index.d.ts +0 -25
  13. package/action/index.d.ts.map +0 -1
  14. package/action/position.d.ts +0 -14
  15. package/action/position.d.ts.map +0 -1
  16. package/action/record.d.ts +0 -15
  17. package/action/record.d.ts.map +0 -1
  18. package/action/view.d.ts +0 -15
  19. package/action/view.d.ts.map +0 -1
  20. package/ai-table-state.d.ts.map +0 -1
  21. package/constants/context-menu-item.d.ts +0 -8
  22. package/constants/context-menu-item.d.ts.map +0 -1
  23. package/constants/field-menu-item.d.ts +0 -25
  24. package/constants/field-menu-item.d.ts.map +0 -1
  25. package/constants/index.d.ts +0 -4
  26. package/constants/index.d.ts.map +0 -1
  27. package/constants/view.d.ts +0 -3
  28. package/constants/view.d.ts.map +0 -1
  29. package/plugins/state.plugin.d.ts +0 -3
  30. package/plugins/state.plugin.d.ts.map +0 -1
  31. package/public-api.d.ts +0 -7
  32. package/public-api.d.ts.map +0 -1
  33. package/shared/index.d.ts +0 -6
  34. package/shared/index.d.ts.map +0 -1
  35. package/shared/to-table/index.d.ts +0 -8
  36. package/shared/to-table/index.d.ts.map +0 -1
  37. package/shared/to-table/map-event.d.ts +0 -5
  38. package/shared/to-table/map-event.d.ts.map +0 -1
  39. package/shared/to-yjs/add-node.d.ts +0 -4
  40. package/shared/to-yjs/add-node.d.ts.map +0 -1
  41. package/shared/to-yjs/index.d.ts +0 -11
  42. package/shared/to-yjs/index.d.ts.map +0 -1
  43. package/shared/to-yjs/remove-node.d.ts +0 -4
  44. package/shared/to-yjs/remove-node.d.ts.map +0 -1
  45. package/shared/to-yjs/set-node.d.ts +0 -4
  46. package/shared/to-yjs/set-node.d.ts.map +0 -1
  47. package/shared/to-yjs/update-field-value.d.ts +0 -4
  48. package/shared/to-yjs/update-field-value.d.ts.map +0 -1
  49. package/shared/undo-manager.service.d.ts +0 -21
  50. package/shared/undo-manager.service.d.ts.map +0 -1
  51. package/shared/utils/index.d.ts +0 -2
  52. package/shared/utils/index.d.ts.map +0 -1
  53. package/shared/utils/initialize.d.ts +0 -20
  54. package/shared/utils/initialize.d.ts.map +0 -1
  55. package/shared/yjs-table.d.ts +0 -14
  56. package/shared/yjs-table.d.ts.map +0 -1
  57. package/types/ai-table.d.ts +0 -14
  58. package/types/ai-table.d.ts.map +0 -1
  59. package/types/index.d.ts +0 -2
  60. package/types/index.d.ts.map +0 -1
  61. package/utils/build.d.ts +0 -8
  62. package/utils/build.d.ts.map +0 -1
  63. package/utils/common.d.ts +0 -5
  64. package/utils/common.d.ts.map +0 -1
  65. package/utils/field/add-fields.d.ts +0 -4
  66. package/utils/field/add-fields.d.ts.map +0 -1
  67. package/utils/field/build-fields.d.ts +0 -3
  68. package/utils/field/build-fields.d.ts.map +0 -1
  69. package/utils/field/frozen-field.d.ts +0 -21
  70. package/utils/field/frozen-field.d.ts.map +0 -1
  71. package/utils/field/index.d.ts +0 -8
  72. package/utils/field/index.d.ts.map +0 -1
  73. package/utils/field/move-fields.d.ts +0 -4
  74. package/utils/field/move-fields.d.ts.map +0 -1
  75. package/utils/field/position-field.d.ts +0 -3
  76. package/utils/field/position-field.d.ts.map +0 -1
  77. package/utils/field/remove-field.d.ts +0 -10
  78. package/utils/field/remove-field.d.ts.map +0 -1
  79. package/utils/field/sort-fields.d.ts +0 -4
  80. package/utils/field/sort-fields.d.ts.map +0 -1
  81. package/utils/group/group-calculator.d.ts +0 -21
  82. package/utils/group/group-calculator.d.ts.map +0 -1
  83. package/utils/group/index.d.ts +0 -3
  84. package/utils/group/index.d.ts.map +0 -1
  85. package/utils/group/utils.d.ts +0 -6
  86. package/utils/group/utils.d.ts.map +0 -1
  87. package/utils/i18n.d.ts +0 -44
  88. package/utils/i18n.d.ts.map +0 -1
  89. package/utils/index.d.ts +0 -13
  90. package/utils/index.d.ts.map +0 -1
  91. package/utils/position-in-view.d.ts +0 -30
  92. package/utils/position-in-view.d.ts.map +0 -1
  93. package/utils/position-precision.d.ts +0 -20
  94. package/utils/position-precision.d.ts.map +0 -1
  95. package/utils/record/add-records.d.ts +0 -6
  96. package/utils/record/add-records.d.ts.map +0 -1
  97. package/utils/record/common.d.ts +0 -6
  98. package/utils/record/common.d.ts.map +0 -1
  99. package/utils/record/filter.d.ts +0 -11
  100. package/utils/record/filter.d.ts.map +0 -1
  101. package/utils/record/index.d.ts +0 -7
  102. package/utils/record/index.d.ts.map +0 -1
  103. package/utils/record/move-records.d.ts +0 -4
  104. package/utils/record/move-records.d.ts.map +0 -1
  105. package/utils/record/sort.d.ts +0 -4
  106. package/utils/record/sort.d.ts.map +0 -1
  107. package/utils/record/update-field-value.d.ts +0 -4
  108. package/utils/record/update-field-value.d.ts.map +0 -1
  109. package/utils/view.d.ts +0 -11
  110. package/utils/view.d.ts.map +0 -1
  111. package/utils/weak-map.d.ts +0 -3
  112. package/utils/weak-map.d.ts.map +0 -1
package/index.d.ts CHANGED
@@ -1,2 +1,319 @@
1
- export * from './public-api';
2
- //# sourceMappingURL=index.d.ts.map
1
+ import * as Y from 'yjs';
2
+ import { UndoManager } from 'yjs';
3
+ import * as _ai_table_grid from '@ai-table/grid';
4
+ import { AITable, AITableLinearRow, AITableLinearRowGroup, AITableActions, AITableContextMenuItem } from '@ai-table/grid';
5
+ import * as i0 from '@angular/core';
6
+ import { WritableSignal, Signal, ElementRef } from '@angular/core';
7
+ import * as _ai_table_utils from '@ai-table/utils';
8
+ import { AITableView, AITableAction, SharedType, AITableViewRecords, AITableViewFields, AITableViews, SharedRecordJsonType, Positions, Path, MoveFieldOptions, AITableFields, NumberPath, MoveRecordOptions, AddFieldOptions, AITableRecordUpdatedInfo, AITableField, AddRecordOptions, AITableRecordCreatedInfo, CopyRecordOptions, AITableSort, AITableViewRecord, AITableRecord, AITableFilterConditions, AITableFilterCondition, FieldValue, AITableFilterLogical, UpdateFieldValueOptions, AITableGroupField, IdPath, AITableSystemFieldValueOption, AITableViewField, SetFieldAction, AITableFieldStatType, RemovePositions, SetRecordPositionAction, AITableReferences, SetFieldOptions, ActionName } from '@ai-table/utils';
9
+ import * as _ai_table_state from '@ai-table/state';
10
+ import * as ngx_tethys_popover from 'ngx-tethys/popover';
11
+
12
+ interface AIViewTable extends AITable {
13
+ views: WritableSignal<AITableView[]>;
14
+ activeViewId: WritableSignal<string>;
15
+ viewsMap: Signal<{
16
+ [key: string]: AITableView;
17
+ }>;
18
+ actions: AITableAction[];
19
+ onChange: () => void;
20
+ apply: (action: AITableAction | AITableAction[]) => void;
21
+ }
22
+
23
+ declare function translateYjsEvent(aiTable: AIViewTable, sharedType: SharedType, event: Y.YEvent<any>): AITableAction[];
24
+ declare function applyEvents(aiTable: AIViewTable, sharedType: SharedType, events: Y.YEvent<any>[]): AITableAction[];
25
+ declare function applyYjsEvents(aiTable: AIViewTable, sharedType: SharedType, events: Y.YEvent<any>[]): void;
26
+ declare function applyActions(actions: AITableAction[], aiTable: AIViewTable): void;
27
+
28
+ type ActionMapper<O extends AITableAction = AITableAction> = {
29
+ [K in O['type']]: O extends {
30
+ type: K;
31
+ } ? ApplyFunc<O> : never;
32
+ };
33
+ type ApplyFunc<O extends AITableAction = AITableAction> = (aiTable: AITable, sharedType: SharedType, op: O) => SharedType;
34
+ declare const actionMappers: Partial<ActionMapper<any>>;
35
+ declare function applyActionOps(aiTable: AITable, sharedType: SharedType, actions: AITableAction[]): SharedType;
36
+
37
+ interface YjsAITable {
38
+ isLocal: () => boolean;
39
+ asLocal: () => void;
40
+ }
41
+ declare const YjsAITable: {
42
+ isLocal: (aiTable: AITable) => boolean;
43
+ asLocal: (aiTable: AITable, fn: () => void) => void;
44
+ isRemote: (aiTable: AITable) => boolean;
45
+ asRemote: (aiTable: AITable, fn: () => void) => void;
46
+ isUndo: (aiTable: AITable) => boolean;
47
+ asUndo: (aiTable: AITable, fn: () => void) => void;
48
+ };
49
+
50
+ declare const createSharedType: (fieldName?: string) => Y.Map<any>;
51
+ declare const getDataBySharedType: (sharedType: SharedType) => {
52
+ records: AITableViewRecords;
53
+ fields: AITableViewFields;
54
+ views: any;
55
+ };
56
+ declare const getSharedTypeByData: (doc: Y.Doc, initializeValue: {
57
+ fields: AITableViewFields;
58
+ records: AITableViewRecords;
59
+ views: AITableViews;
60
+ }) => Y.Map<any>;
61
+ declare function toSharedType(sharedType: Y.Map<any>, data: {
62
+ fields: AITableViewFields;
63
+ records: AITableViewRecords;
64
+ views: AITableViews;
65
+ }): void;
66
+ declare const getRecordsBySharedJson: (recordJsonArray: SharedRecordJsonType[], fields: AITableViewFields) => AITableViewRecords;
67
+
68
+ declare class UndoManagerService {
69
+ private _undoManager;
70
+ private _canUndoCount;
71
+ private _canRedoCount;
72
+ private _aiTable;
73
+ get undoManager(): UndoManager | null;
74
+ get canUndoCount(): WritableSignal<number>;
75
+ get canRedoCount(): WritableSignal<number>;
76
+ initialize(sharedType: SharedType, aiTable: AIViewTable): void;
77
+ undo(): void;
78
+ redo(): void;
79
+ destroy(): void;
80
+ static ɵfac: i0.ɵɵFactoryDeclaration<UndoManagerService, never>;
81
+ static ɵprov: i0.ɵɵInjectableDeclaration<UndoManagerService>;
82
+ }
83
+
84
+ declare function buildRecordsByView(aiTable: AIViewTable, records: AITableViewRecords, fields: AITableViewFields, activeView: AITableView): _ai_table_utils.AITableViewRecord[];
85
+ declare function buildFieldsByView(aiTable: AIViewTable, fields: AITableViewFields, activeView: AITableView): AITableViewFields;
86
+ declare function buildLinearRows(aiTable: AIViewTable, activeView: AITableView, records: AITableViewRecords): _ai_table_grid.AITableLinearRow[] | null;
87
+ declare function buildSorts(activeView: AITableView): _ai_table_utils.AITableSort[];
88
+ declare function mergeSorts(activeView: AITableView): _ai_table_utils.AITableSort[];
89
+
90
+ declare function createPositions(views: AITableView[], activeId: string, data: AITableViewRecords | AITableViewFields, index?: number): Positions;
91
+ declare function createMultiplePositions(views: AITableView[], activeId: string, data: AITableViewRecords | AITableViewFields, targetIndex?: number, count?: number, isInsertUpward?: boolean): Positions[];
92
+ declare function getPositions(activeId: string, data: AITableViewRecords | AITableViewFields, targetIndex?: number, count?: number, isInsertBefore?: boolean): number[];
93
+ declare function getPosition(data: AITableViewRecords | AITableViewFields, activeViewId: string, index?: number): number;
94
+ declare function getMaxPosition(data: AITableViewRecords | AITableViewFields | AITableView[], activeViewId?: string): number;
95
+ declare function addView(aiTable: AIViewTable, type: 'add' | 'duplicate', viewId?: string): AITableView;
96
+ declare function removeView(aiTable: AIViewTable, records: AITableViewRecords, fields: AITableViewFields, activeViewId: string): void;
97
+ declare function sortViews(data: AITableView[]): AITableView[];
98
+
99
+ declare function isPathEqual(path: Path, another: Path): boolean;
100
+ declare function generateCopyName(aiTable: AITable, existNames: string[], name: string): string;
101
+
102
+ declare const FLUSHING: WeakMap<AIViewTable, boolean>;
103
+
104
+ declare function moveFields(aiTable: AIViewTable, options: MoveFieldOptions): void;
105
+
106
+ declare function getFieldPositionInView(viewId: string, fields: AITableFields, path: NumberPath, newPath: NumberPath): number;
107
+
108
+ declare function moveRecords(aiTable: AIViewTable, options: MoveRecordOptions): void;
109
+
110
+ declare enum AITableStateI18nKey {
111
+ copyField = "copyField",
112
+ removeRecords = "removeRecords",
113
+ copy = "copy",
114
+ copySuffix = "copySuffix",
115
+ paste = "paste",
116
+ invalidPasteContent = "invalidPasteContent",
117
+ tableView = "tableView",
118
+ editField = "editField",
119
+ removeField = "removeField",
120
+ pasteOverMaxRecords = "pasteOverMaxRecords",
121
+ pasteOverMaxFields = "pasteOverMaxFields",
122
+ insertUpward = "insertUpward",
123
+ insertDownward = "insertDownward",
124
+ copyRecords = "copyRecords",
125
+ upward = "upward",
126
+ downward = "downward",
127
+ freezeToThisColumn = "freezeToThisColumn",
128
+ restoreDefaultFrozenColumn = "restoreDefaultFrozenColumn"
129
+ }
130
+ declare const AITableStateI18nText: {
131
+ copyField: string;
132
+ removeRecords: string;
133
+ copy: string;
134
+ copySuffix: string;
135
+ paste: string;
136
+ invalidPasteContent: string;
137
+ tableView: string;
138
+ editField: string;
139
+ removeField: string;
140
+ pasteOverMaxRecords: string;
141
+ pasteOverMaxFields: string;
142
+ insertUpward: string;
143
+ insertDownward: string;
144
+ copyRecords: string;
145
+ upward: string;
146
+ downward: string;
147
+ freezeToThisColumn: string;
148
+ restoreDefaultFrozenColumn: string;
149
+ };
150
+ declare const getDefaultI18nTextByKey: (key: AITableStateI18nKey) => string;
151
+ declare const getStateI18nTextByKey: (aiTable: AITable, key: AITableStateI18nKey | string) => string;
152
+
153
+ declare function addFields(aiTable: AIViewTable, options: AddFieldOptions): void;
154
+
155
+ declare const buildRemoveFieldItem: (aiTable: AITable, getUpdatedInfo: () => AITableRecordUpdatedInfo) => {
156
+ type: string;
157
+ name: string;
158
+ icon: string;
159
+ exec: (aiTable: AITable, field: Signal<AITableField>) => void;
160
+ };
161
+
162
+ declare function getFrozenFieldId(aiTable: AITable): string | undefined;
163
+ declare function calculateAdaptiveFrozenColumnCount(aiTable: AITable, containerWidth: number, minUnfrozenWidth?: number): number;
164
+ declare const freezeToThisColumn: (aiTable: AITable) => {
165
+ type: string;
166
+ name: string;
167
+ icon: string;
168
+ exec: (aiTable: AITable, field: Signal<AITableField>) => void;
169
+ hidden: (aiTable: AITable, field: Signal<AITableField>) => boolean;
170
+ disabled: (aiTable: AITable, field: Signal<AITableField>) => boolean;
171
+ };
172
+ declare const restoreDefaultFrozenColumn: (aiTable: AITable) => {
173
+ type: string;
174
+ name: string;
175
+ icon: string;
176
+ exec: (aiTable: AITable, field: Signal<AITableField>) => void;
177
+ hidden: (aiTable: AITable, field: Signal<AITableField>) => boolean;
178
+ };
179
+
180
+ declare function getSortFields(aiTable: AITable, fields: AITableViewFields, activeView: AITableView): AITableViewFields;
181
+
182
+ declare function addRecords$1(aiTable: AIViewTable, options: AddRecordOptions, recordCreatedInfo: AITableRecordCreatedInfo): void;
183
+ declare function copyRecords(aiTable: AIViewTable, options: CopyRecordOptions, recordCreatedInfo: AITableRecordCreatedInfo): void;
184
+ declare function getDefaultRecordValues(aiTable: AIViewTable, isDuplicate?: boolean, recordId?: string): Record<string, any>;
185
+
186
+ declare function sortRecordsByConditions(aiTable: AITable, records: AITableViewRecords, activeView: AITableView, sorts: AITableSort[]): AITableViewRecord[];
187
+
188
+ declare function getFilteredRecords(aiTable: AIViewTable, records: AITableViewRecords, fields: AITableViewFields, activeView: AITableView): AITableViewRecords;
189
+ declare function checkConditions(aiTable: AIViewTable, fields: AITableViewFields, record: AITableRecord, filterConditions?: AITableFilterConditions): boolean;
190
+ declare function doFilter(condition: AITableFilterCondition, cellValue: FieldValue, options: {
191
+ aiTable: AITable;
192
+ field: AITableField;
193
+ }): boolean;
194
+ declare function getDefaultRecordDataByFilter(recordValues: Record<string, FieldValue>, conditions: AITableFilterCondition[], fields: AITableViewFields, conditionLogical?: AITableFilterLogical): Record<string, any>;
195
+
196
+ declare function updateFieldValues$1(aiTable: AIViewTable, options: UpdateFieldValueOptions[], updatedInfo?: AITableRecordUpdatedInfo): void;
197
+
198
+ declare function getParentGroupValuesByGroupId(aiTable: AIViewTable, groupId: string): Record<string, any> | null;
199
+ declare function getPrevRecordIdByAddGroupId(aiTable: AIViewTable, groupId: string): string | null;
200
+ declare function buildRecordsWithWillMoveRecords(records: AITableRecord[], willMoveRecordsMap: Map<string, AITableRecord>): AITableViewRecord[];
201
+
202
+ declare class GroupCalculator {
203
+ private groups;
204
+ private groupBreakpoints;
205
+ private groupCollapseState;
206
+ private aiTable;
207
+ private fieldsMap;
208
+ constructor(aiTable: AITable, groups: AITableGroupField[], collapseState?: string[]);
209
+ calculateLinearRows(records: AITableViewRecords): AITableLinearRow[];
210
+ private detectGroupBreakpoints;
211
+ private addBreakpoint;
212
+ private generateLinearRows;
213
+ private handleGroupEnd;
214
+ private generateGroupTabRows;
215
+ private calculateGroupRecordRange;
216
+ private generateGroupId;
217
+ private isParentGroupCollapsed;
218
+ }
219
+
220
+ declare function getParentLinearRowGroups(aiTable: AIViewTable, targetId: string, linearRows?: AITableLinearRow[]): AITableLinearRowGroup[];
221
+ declare function isSameParentGroup(aiTable: AIViewTable, recordId: string, originGroupLinearRows: AITableLinearRow[], tmpNewGroupLinearRows: AITableLinearRow[]): boolean;
222
+ declare function getGroupRecordLength(aiTable: AIViewTable, recordId: string, linearRows?: AITableLinearRow[]): number;
223
+
224
+ interface PositionInsertResult {
225
+ success: boolean;
226
+ positions: number[];
227
+ needsReorganization: boolean;
228
+ reason?: string;
229
+ context?: {
230
+ prevPosition: number;
231
+ nextPosition: number;
232
+ availableGap: number;
233
+ subGap: number;
234
+ requestedCount: number;
235
+ };
236
+ }
237
+ declare const DEFAULT_INITIAL_GAP = 65536;
238
+ declare const DEFAULT_PRECISION_THRESHOLD = 1;
239
+ declare function insertAtStart(firstPosition: number, count?: number, initialGap?: number): number[];
240
+ declare function insertAtEnd(lastPosition: number, count?: number, initialGap?: number): number[];
241
+ declare function insertBetween(prevPosition: number, nextPosition: number, count?: number, precisionThreshold?: number): PositionInsertResult;
242
+
243
+ declare const withState: (aiTable: AITable) => AITable;
244
+
245
+ declare function updateFieldValues(aiTable: AIViewTable, options: UpdateFieldValueOptions[]): void;
246
+ declare function updateSystemFieldValues(aiTable: AIViewTable, options: AITableSystemFieldValueOption[]): void;
247
+ declare function addRecord(aiTable: AIViewTable, record: AITableRecord): void;
248
+ declare function addRecords(aiTable: AIViewTable, records: AITableRecord[], options?: AddRecordOptions): void;
249
+ declare function removeRecord(aiTable: AIViewTable, path: IdPath): void;
250
+
251
+ declare function addField(aiTable: AIViewTable, field: AITableField, originId?: string, isDuplicate?: boolean): void;
252
+ declare function setFieldWidth(aiTable: AIViewTable, path: IdPath, width: number): void;
253
+ declare function setFieldStatType(aiTable: AIViewTable, path: IdPath, statType: AITableFieldStatType): void;
254
+ declare function removeField(aiTable: AIViewTable, path: IdPath): void;
255
+ declare function buildSetFieldAction<T extends AITableViewField = AITableViewField>(aiTable: AIViewTable, value: Partial<T>, path: IdPath): SetFieldAction | null;
256
+ declare function setField<T extends AITableViewField = AITableViewField>(aiTable: AIViewTable, value: Partial<T>, path: IdPath): void;
257
+
258
+ declare function buildSetRecordPositionsAction(aiTable: AIViewTable, positions: Positions | RemovePositions, path: NumberPath): SetRecordPositionAction;
259
+ declare function resetAllRecordsPositions(aiTable: AIViewTable): void;
260
+ declare function resetAllFieldsPositions(aiTable: AIViewTable): void;
261
+ declare function resetAllViewsPositions(aiTable: AIViewTable): void;
262
+ declare function setRecordPositions(aiTable: AIViewTable, positions: Positions | RemovePositions, path: NumberPath): void;
263
+
264
+ declare const Actions: {
265
+ toggleGroupCollapse: (aiTable: _ai_table_state.AIViewTable, groupId: string) => void;
266
+ setRecordPositions: typeof setRecordPositions;
267
+ resetAllRecordsPositions: typeof resetAllRecordsPositions;
268
+ resetAllFieldsPositions: typeof resetAllFieldsPositions;
269
+ resetAllViewsPositions: typeof resetAllViewsPositions;
270
+ setView: (aiTable: _ai_table_state.AIViewTable, value: Partial<_ai_table_utils.AITableView>, path: [string]) => void;
271
+ addView: (aiTable: _ai_table_state.AIViewTable, originId: string, newView: _ai_table_utils.AITableView, isDuplicate?: boolean) => void;
272
+ removeView: (aiTable: _ai_table_state.AIViewTable, path: [string]) => void;
273
+ setRecordHeightType: (aiTable: _ai_table_state.AIViewTable, recordHeightType: _ai_table_utils.AITableRecordHeightType) => void;
274
+ addField: typeof addField;
275
+ removeField: typeof removeField;
276
+ setField: typeof setField;
277
+ setFieldWidth: typeof setFieldWidth;
278
+ setFieldStatType: typeof setFieldStatType;
279
+ addRecord: typeof addRecord;
280
+ addRecords: typeof addRecords;
281
+ removeRecord: typeof removeRecord;
282
+ updateFieldValues: typeof updateFieldValues;
283
+ updateSystemFieldValues: typeof updateSystemFieldValues;
284
+ transform(aiTable: _ai_table_state.AIViewTable, actions: _ai_table_utils.AITableAction[]): void;
285
+ };
286
+
287
+ declare const DividerMenuItem: {
288
+ type: string;
289
+ };
290
+ declare const EditFieldPropertyItem: (aiTable: AITable, actions: AITableActions, references: AITableReferences) => {
291
+ type: string;
292
+ name: string;
293
+ icon: string;
294
+ exec: (aiTable: AIViewTable, field: Signal<AITableField>, origin?: HTMLElement | ElementRef<any>, position?: {
295
+ x: number;
296
+ y: number;
297
+ }) => ngx_tethys_popover.ThyPopoverRef<unknown, unknown, unknown> | undefined;
298
+ };
299
+ declare const updateFieldAndValues: (aiTable: AIViewTable, references: AITableReferences, actions: AITableActions, options: SetFieldOptions) => void;
300
+ declare const CopyFieldPropertyItem: (aiTable: AITable, actions: AITableActions) => {
301
+ type: string;
302
+ name: string;
303
+ icon: string;
304
+ exec: (aiTable: AIViewTable, field: Signal<AITableField>) => void;
305
+ disabled: () => boolean;
306
+ };
307
+
308
+ declare const RemoveRecordsItem: (aiTable: AITable, actions: AITableActions) => AITableContextMenuItem;
309
+ declare const InsertUpwardRecords: (aiTable: AITable, actions: AITableActions) => AITableContextMenuItem;
310
+ declare const InsertDownwardRecords: (aiTable: AITable, actions: AITableActions) => AITableContextMenuItem;
311
+ declare const CopyRecords: (aiTable: AITable, actions: AITableActions) => AITableContextMenuItem;
312
+ declare const CopyCellsItem: (aiTable: AITable, actions: AITableActions) => AITableContextMenuItem;
313
+ declare const PasteCellsItem: (aiTable: AITable, actions: AITableActions) => AITableContextMenuItem;
314
+
315
+ declare const VIEW_ACTIONS: ActionName[];
316
+
317
+ export { AITableStateI18nKey, AITableStateI18nText, Actions, CopyCellsItem, CopyFieldPropertyItem, CopyRecords, DEFAULT_INITIAL_GAP, DEFAULT_PRECISION_THRESHOLD, DividerMenuItem, EditFieldPropertyItem, FLUSHING, GroupCalculator, InsertDownwardRecords, InsertUpwardRecords, PasteCellsItem, RemoveRecordsItem, UndoManagerService, VIEW_ACTIONS, YjsAITable, actionMappers, addFields, addRecords$1 as addRecords, addView, applyActionOps, applyActions, applyEvents, applyYjsEvents, buildFieldsByView, buildLinearRows, buildRecordsByView, buildRecordsWithWillMoveRecords, buildRemoveFieldItem, buildSetFieldAction, buildSetRecordPositionsAction, buildSorts, calculateAdaptiveFrozenColumnCount, checkConditions, copyRecords, createMultiplePositions, createPositions, createSharedType, doFilter, freezeToThisColumn, generateCopyName, getDataBySharedType, getDefaultI18nTextByKey, getDefaultRecordDataByFilter, getDefaultRecordValues, getFieldPositionInView, getFilteredRecords, getFrozenFieldId, getGroupRecordLength, getMaxPosition, getParentGroupValuesByGroupId, getParentLinearRowGroups, getPosition, getPositions, getPrevRecordIdByAddGroupId, getRecordsBySharedJson, getSharedTypeByData, getSortFields, getStateI18nTextByKey, insertAtEnd, insertAtStart, insertBetween, isPathEqual, isSameParentGroup, mergeSorts, moveFields, moveRecords, removeView, restoreDefaultFrozenColumn, sortRecordsByConditions, sortViews, toSharedType, translateYjsEvent, updateFieldAndValues, updateFieldValues$1 as updateFieldValues, withState };
318
+ export type { AIViewTable, ActionMapper, ApplyFunc };
319
+ //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/state/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sources":["../../packages/state/src/types/ai-table.ts","../../packages/state/src/shared/to-table/index.ts","../../packages/state/src/shared/to-yjs/index.ts","../../packages/state/src/shared/yjs-table.ts","../../packages/state/src/shared/utils/initialize.ts","../../packages/state/src/shared/undo-manager.service.ts","../../packages/state/src/utils/build.ts","../../packages/state/src/utils/view.ts","../../packages/state/src/utils/common.ts","../../packages/state/src/utils/weak-map.ts","../../packages/state/src/utils/field/move-fields.ts","../../packages/state/src/utils/field/position-field.ts","../../packages/state/src/utils/record/move-records.ts","../../packages/state/src/utils/i18n.ts","../../packages/state/src/utils/field/add-fields.ts","../../packages/state/src/utils/field/remove-field.ts","../../packages/state/src/utils/field/frozen-field.ts","../../packages/state/src/utils/field/sort-fields.ts","../../packages/state/src/utils/record/add-records.ts","../../packages/state/src/utils/record/sort.ts","../../packages/state/src/utils/record/filter.ts","../../packages/state/src/utils/record/update-field-value.ts","../../packages/state/src/utils/record/common.ts","../../packages/state/src/utils/group/group-calculator.ts","../../packages/state/src/utils/group/utils.ts","../../packages/state/src/utils/position-precision.ts","../../packages/state/src/plugins/state.plugin.ts","../../packages/state/src/action/record.ts","../../packages/state/src/action/field.ts","../../packages/state/src/action/position.ts","../../packages/state/src/action/index.ts","../../packages/state/src/constants/field-menu-item.ts","../../packages/state/src/constants/context-menu-item.ts","../../packages/state/src/constants/view.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;;;;AAIM;AACF;AACA;;AACmB;AAA4B;;;;AAIlD;;ACLD;AAUA;AAUA;AAYA;;AC/BM;AACD;;AAAsC;;AAGrC;AAEN;AAcA;;;;;AClBC;AAED;AACuB;AAIA;AAWC;AAIA;AAWF;AAIA;;;AC7BtB;AAMA;;;;;AAYA;;;;AAMK;AAOL;;;;AAMK;AAoBL;;ACpEA;;;;;AAOI;AAIA;AAIA;AAIA;;;;;;AAsCH;;ACpDD;AAOA;AAKA;AAoBA;AAcA;;AC9CA;AAIA;AA4BA;AA0BA;AAIA;AAoBA;AAmDA;AAwBA;;ACpKA;AAIA;;ACNA;;ACMA;;ACNA;;ACaA;;ACbA;AACI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACH;AAED;;;;;;;;;;;;;;;;;;;;AAqBA;AAIA;;ACzCA;;ACAA;;;;AAKwB;;;ACLxB;AAgFA;AAwBA;;;;AAKwB;AAWE;AAUE;;AAsC5B;;;;AAKwB;AAUE;;;AC3L1B;;ACaA;AAgEA;AA2BA;;ACxGA;;ACiBA;AAkBA;AAmDA;;;;AAoBA;;ACuCA;;AC9IA;AAWA;AAoBA;;AChCA;;;;;;AAOgB;AAQZ;AAOA;AA6CA;AAWA;AA+DA;AAwCA;AAiCA;AAiBA;AAMA;AAwBH;;ACtQD;AA4BA;AAWA;;AC3CA;;;;;AAKI;;;;;;;AAOH;AAED;AACA;AAEA;AAQA;AAQA;;AC3BA;;ACYA;AAwBA;AAcA;AAIA;AAsCA;;ACrFA;AAiBA;AAKA;AAKA;AAQA;AA+BA;;AChEA;AASA;AAeA;AAgBA;AAaA;;AC7DA;;;;;;;;;;;;;;;;;;;;;;;ACqBA;;;AAIA;;;;AAKiB;;;AAG0B;;AAuB3C;AAmDA;;;;AAMwB;;;;ACjHxB;AAeA;AAwBA;AAwBA;AAgBA;AAmBA;;ACvGA;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-table/state",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "peerDependencies": {},
5
5
  "dependencies": {
6
6
  "tslib": "^2.3.0"
package/action/field.d.ts DELETED
@@ -1,16 +0,0 @@
1
- import { SetFieldAction, AITableViewField, AITableField, IdPath, AITableFieldStatType } from '@ai-table/utils';
2
- import { AIViewTable } from '../types/ai-table';
3
- export declare function addField(aiTable: AIViewTable, field: AITableField, originId?: string, isDuplicate?: boolean): void;
4
- export declare function setFieldWidth(aiTable: AIViewTable, path: IdPath, width: number): void;
5
- export declare function setFieldStatType(aiTable: AIViewTable, path: IdPath, statType: AITableFieldStatType): void;
6
- export declare function removeField(aiTable: AIViewTable, path: IdPath): void;
7
- export declare function buildSetFieldAction<T extends AITableViewField = AITableViewField>(aiTable: AIViewTable, value: Partial<T>, path: IdPath): SetFieldAction | null;
8
- export declare function setField<T extends AITableViewField = AITableViewField>(aiTable: AIViewTable, value: Partial<T>, path: IdPath): void;
9
- export declare const FieldActions: {
10
- addField: typeof addField;
11
- removeField: typeof removeField;
12
- setField: typeof setField;
13
- setFieldWidth: typeof setFieldWidth;
14
- setFieldStatType: typeof setFieldStatType;
15
- };
16
- //# sourceMappingURL=field.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../packages/state/src/action/field.ts"],"names":[],"mappings":"AACA,OAAO,EAIH,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,MAAM,EACN,oBAAoB,EACvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,wBAAgB,QAAQ,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,OAAO,QAe3G;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAG9E;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,oBAAoB,QAGlG;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,QAM7D;AAED,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB,EAC7E,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,EACjB,IAAI,EAAE,MAAM,GACb,cAAc,GAAG,IAAI,CAyBvB;AAED,wBAAgB,QAAQ,CAAC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,QAK5H;AAED,eAAO,MAAM,YAAY;;;;;;CAMxB,CAAC"}
@@ -1,6 +0,0 @@
1
- import { AIViewTable } from '../types';
2
- import { AITableAction } from '@ai-table/utils';
3
- export declare const GeneralActions: {
4
- transform(aiTable: AIViewTable, actions: AITableAction[]): void;
5
- };
6
- //# sourceMappingURL=general.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../../packages/state/src/action/general.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGvC,OAAO,EAEH,aAAa,EAQhB,MAAM,iBAAiB,CAAC;AA0IzB,eAAO,MAAM,cAAc;uBACJ,WAAW,WAAW,aAAa,EAAE,GAAG,IAAI;CAoBlE,CAAC"}
package/action/group.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import { AIViewTable } from '../types/ai-table';
2
- declare function toggleGroupCollapse(aiTable: AIViewTable, groupId: string): void;
3
- export declare const GroupActions: {
4
- toggleGroupCollapse: typeof toggleGroupCollapse;
5
- };
6
- export {};
7
- //# sourceMappingURL=group.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../../packages/state/src/action/group.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAsBhD,iBAAS,mBAAmB,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,QAOjE;AAED,eAAO,MAAM,YAAY;;CAExB,CAAC"}
package/action/index.d.ts DELETED
@@ -1,25 +0,0 @@
1
- export declare const Actions: {
2
- toggleGroupCollapse: (aiTable: import("@ai-table/state").AIViewTable, groupId: string) => void;
3
- setRecordPositions: typeof import("./position").setRecordPositions;
4
- resetAllRecordsPositions: typeof import("./position").resetAllRecordsPositions;
5
- resetAllFieldsPositions: typeof import("./position").resetAllFieldsPositions;
6
- resetAllViewsPositions: typeof import("./position").resetAllViewsPositions;
7
- setView: (aiTable: import("@ai-table/state").AIViewTable, value: Partial<import("@ai-table/utils").AITableView>, path: [string]) => void;
8
- addView: (aiTable: import("@ai-table/state").AIViewTable, originId: string, newView: import("@ai-table/utils").AITableView, isDuplicate?: boolean) => void;
9
- removeView: (aiTable: import("@ai-table/state").AIViewTable, path: [string]) => void;
10
- setRecordHeightType: (aiTable: import("@ai-table/state").AIViewTable, recordHeightType: import("@ai-table/utils").AITableRecordHeightType) => void;
11
- addField: typeof import("./field").addField;
12
- removeField: typeof import("./field").removeField;
13
- setField: typeof import("./field").setField;
14
- setFieldWidth: typeof import("./field").setFieldWidth;
15
- setFieldStatType: typeof import("./field").setFieldStatType;
16
- addRecord: typeof import("./record").addRecord;
17
- addRecords: typeof import("./record").addRecords;
18
- removeRecord: typeof import("./record").removeRecord;
19
- updateFieldValues: typeof import("./record").updateFieldValues;
20
- updateSystemFieldValues: typeof import("./record").updateSystemFieldValues;
21
- transform(aiTable: import("@ai-table/state").AIViewTable, actions: import("@ai-table/utils").AITableAction[]): void;
22
- };
23
- export { buildSetRecordPositionsAction } from './position';
24
- export { buildSetFieldAction } from './field';
25
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/state/src/action/index.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;CAOnB,CAAC;AAEF,OAAO,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAE3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC"}
@@ -1,14 +0,0 @@
1
- import { AIViewTable } from '../types';
2
- import { NumberPath, Positions, RemovePositions, SetRecordPositionAction } from '@ai-table/utils';
3
- export declare function buildSetRecordPositionsAction(aiTable: AIViewTable, positions: Positions | RemovePositions, path: NumberPath): SetRecordPositionAction;
4
- export declare function resetAllRecordsPositions(aiTable: AIViewTable): void;
5
- export declare function resetAllFieldsPositions(aiTable: AIViewTable): void;
6
- export declare function resetAllViewsPositions(aiTable: AIViewTable): void;
7
- export declare function setRecordPositions(aiTable: AIViewTable, positions: Positions | RemovePositions, path: NumberPath): void;
8
- export declare const PositionsActions: {
9
- setRecordPositions: typeof setRecordPositions;
10
- resetAllRecordsPositions: typeof resetAllRecordsPositions;
11
- resetAllFieldsPositions: typeof resetAllFieldsPositions;
12
- resetAllViewsPositions: typeof resetAllViewsPositions;
13
- };
14
- //# sourceMappingURL=position.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../../../packages/state/src/action/position.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAKH,UAAU,EACV,SAAS,EACT,eAAe,EACf,uBAAuB,EAC1B,MAAM,iBAAiB,CAAC;AAKzB,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,GAAG,eAAe,EAAE,IAAI,EAAE,UAAU,2BAO3H;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,WAAW,QAa5D;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,WAAW,QAc3D;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,WAAW,QAW1D;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,GAAG,eAAe,EAAE,IAAI,EAAE,UAAU,QAGhH;AAED,eAAO,MAAM,gBAAgB;;;;;CAK5B,CAAC"}
@@ -1,15 +0,0 @@
1
- import { AITableRecord, IdPath, AddRecordOptions, UpdateFieldValueOptions, AITableSystemFieldValueOption } from '@ai-table/utils';
2
- import { AIViewTable } from '../types/ai-table';
3
- export declare function updateFieldValues(aiTable: AIViewTable, options: UpdateFieldValueOptions[]): void;
4
- export declare function updateSystemFieldValues(aiTable: AIViewTable, options: AITableSystemFieldValueOption[]): void;
5
- export declare function addRecord(aiTable: AIViewTable, record: AITableRecord): void;
6
- export declare function addRecords(aiTable: AIViewTable, records: AITableRecord[], options?: AddRecordOptions): void;
7
- export declare function removeRecord(aiTable: AIViewTable, path: IdPath): void;
8
- export declare const RecordActions: {
9
- addRecord: typeof addRecord;
10
- addRecords: typeof addRecords;
11
- removeRecord: typeof removeRecord;
12
- updateFieldValues: typeof updateFieldValues;
13
- updateSystemFieldValues: typeof updateSystemFieldValues;
14
- };
15
- //# sourceMappingURL=record.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../../packages/state/src/action/record.ts"],"names":[],"mappings":"AACA,OAAO,EAMH,aAAa,EACb,MAAM,EAEN,gBAAgB,EAChB,uBAAuB,EACvB,6BAA6B,EAChC,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,uBAAuB,EAAE,QAsBzF;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,6BAA6B,EAAE,QAYrG;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,QAEpE;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE,OAAO,CAAC,EAAE,gBAAgB,QAoCpG;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,QAM9D;AAED,eAAO,MAAM,aAAa;;;;;;CAMzB,CAAC"}
package/action/view.d.ts DELETED
@@ -1,15 +0,0 @@
1
- import { AITableRecordHeightType, AITableView, SetViewAction } from '@ai-table/utils';
2
- import { AIViewTable } from '../types/ai-table';
3
- export declare function buildSetViewAction(aiTable: AIViewTable, value: Partial<AITableView>, path: [string]): SetViewAction | null;
4
- declare function setView(aiTable: AIViewTable, value: Partial<AITableView>, path: [string]): void;
5
- declare function addView(aiTable: AIViewTable, originId: string, newView: AITableView, isDuplicate?: boolean): void;
6
- declare function removeView(aiTable: AIViewTable, path: [string]): void;
7
- declare function setRecordHeightType(aiTable: AIViewTable, recordHeightType: AITableRecordHeightType): void;
8
- export declare const ViewActions: {
9
- setView: typeof setView;
10
- addView: typeof addView;
11
- removeView: typeof removeView;
12
- setRecordHeightType: typeof setRecordHeightType;
13
- };
14
- export {};
15
- //# sourceMappingURL=view.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../packages/state/src/action/view.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,uBAAuB,EACvB,WAAW,EAIX,aAAa,EAEhB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,wBA0BnG;AAED,iBAAS,OAAO,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,QAKjF;AAED,iBAAS,OAAO,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,CAAC,EAAE,OAAO,QAwCnG;AAED,iBAAS,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,QAMvD;AAED,iBAAS,mBAAmB,CAAC,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,uBAAuB,QAkB3F;AAED,eAAO,MAAM,WAAW;;;;;CAKvB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-table-state.d.ts","sourceRoot":"","sources":["../../packages/state/src/ai-table-state.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,cAAc,SAAS,CAAC"}
@@ -1,8 +0,0 @@
1
- import { AITable, AITableContextMenuItem, AITableActions } from '@ai-table/grid';
2
- export declare const RemoveRecordsItem: (aiTable: AITable, actions: AITableActions) => AITableContextMenuItem;
3
- export declare const InsertUpwardRecords: (aiTable: AITable, actions: AITableActions) => AITableContextMenuItem;
4
- export declare const InsertDownwardRecords: (aiTable: AITable, actions: AITableActions) => AITableContextMenuItem;
5
- export declare const CopyRecords: (aiTable: AITable, actions: AITableActions) => AITableContextMenuItem;
6
- export declare const CopyCellsItem: (aiTable: AITable, actions: AITableActions) => AITableContextMenuItem;
7
- export declare const PasteCellsItem: (aiTable: AITable, actions: AITableActions) => AITableContextMenuItem;
8
- //# sourceMappingURL=context-menu-item.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context-menu-item.d.ts","sourceRoot":"","sources":["../../../packages/state/src/constants/context-menu-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAyB,MAAM,gBAAgB,CAAC;AAOxG,eAAO,MAAM,iBAAiB,GAAI,SAAS,OAAO,EAAE,SAAS,cAAc,KAAG,sBAa7E,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,SAAS,OAAO,EAAE,SAAS,cAAc,KAAG,sBAsB/E,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,SAAS,OAAO,EAAE,SAAS,cAAc,KAAG,sBAsBjF,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,SAAS,OAAO,EAAE,SAAS,cAAc,KAAG,sBAcvE,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,SAAS,OAAO,EAAE,SAAS,cAAc,KAAG,sBAiBzE,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,KAAK,sBAoB3E,CAAC"}
@@ -1,25 +0,0 @@
1
- import { AITable, AITableActions } from '@ai-table/grid';
2
- import { ElementRef, Signal } from '@angular/core';
3
- import { AIViewTable } from '../types';
4
- import { AITableField, AITableReferences, SetFieldOptions } from '@ai-table/utils';
5
- export declare const DividerMenuItem: {
6
- type: string;
7
- };
8
- export declare const EditFieldPropertyItem: (aiTable: AITable, actions: AITableActions, references: AITableReferences) => {
9
- type: string;
10
- name: string;
11
- icon: string;
12
- exec: (aiTable: AIViewTable, field: Signal<AITableField>, origin?: HTMLElement | ElementRef<any>, position?: {
13
- x: number;
14
- y: number;
15
- }) => import("ngx-tethys/popover").ThyPopoverRef<unknown, unknown, unknown> | undefined;
16
- };
17
- export declare const updateFieldAndValues: (aiTable: AIViewTable, references: AITableReferences, actions: AITableActions, options: SetFieldOptions) => void;
18
- export declare const CopyFieldPropertyItem: (aiTable: AITable, actions: AITableActions) => {
19
- type: string;
20
- name: string;
21
- icon: string;
22
- exec: (aiTable: AIViewTable, field: Signal<AITableField>) => void;
23
- disabled: () => boolean;
24
- };
25
- //# sourceMappingURL=field-menu-item.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"field-menu-item.d.ts","sourceRoot":"","sources":["../../../packages/state/src/constants/field-menu-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,OAAO,EACP,cAAc,EAKjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAGnD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGvC,OAAO,EAEH,YAAY,EACZ,iBAAiB,EAIjB,eAAe,EAIlB,MAAM,iBAAiB,CAAC;AAEzB,eAAO,MAAM,eAAe;;CAE3B,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,SAAS,OAAO,EAAE,SAAS,cAAc,EAAE,YAAY,iBAAiB;;;;oBAK7F,WAAW,SACb,MAAM,CAAC,YAAY,CAAC,WAClB,WAAW,GAAG,UAAU,CAAC,GAAG,CAAC,aAC3B;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE;CAqBzC,CAAC;AAEH,eAAO,MAAM,oBAAoB,GAC7B,SAAS,WAAW,EACpB,YAAY,iBAAiB,EAC7B,SAAS,cAAc,EACvB,SAAS,eAAe,SA6C3B,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,SAAS,OAAO,EAAE,SAAS,cAAc;;;;oBAMvD,WAAW,SAAS,MAAM,CAAC,YAAY,CAAC;;CA2B/D,CAAC"}
@@ -1,4 +0,0 @@
1
- export * from './field-menu-item';
2
- export * from './context-menu-item';
3
- export * from './view';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/state/src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC"}
@@ -1,3 +0,0 @@
1
- import { ActionName } from "@ai-table/utils";
2
- export declare const VIEW_ACTIONS: ActionName[];
3
- //# sourceMappingURL=view.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../packages/state/src/constants/view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,eAAO,MAAM,YAAY,cAAkE,CAAC"}
@@ -1,3 +0,0 @@
1
- import { AITable } from '@ai-table/grid';
2
- export declare const withState: (aiTable: AITable) => AITable;
3
- //# sourceMappingURL=state.plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"state.plugin.d.ts","sourceRoot":"","sources":["../../../packages/state/src/plugins/state.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAMzC,eAAO,MAAM,SAAS,GAAI,SAAS,OAAO,YAmBzC,CAAC"}
package/public-api.d.ts DELETED
@@ -1,7 +0,0 @@
1
- export * from './shared';
2
- export * from './types';
3
- export * from './utils';
4
- export * from './plugins/state.plugin';
5
- export * from './action';
6
- export * from './constants';
7
- //# sourceMappingURL=public-api.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../../packages/state/src/public-api.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC"}
package/shared/index.d.ts DELETED
@@ -1,6 +0,0 @@
1
- export * from './to-table';
2
- export * from './to-yjs';
3
- export * from './yjs-table';
4
- export * from './utils';
5
- export * from './undo-manager.service';
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/state/src/shared/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,wBAAwB,CAAC"}
@@ -1,8 +0,0 @@
1
- import * as Y from 'yjs';
2
- import { AIViewTable } from '../../types';
3
- import { AITableAction, SharedType } from '@ai-table/utils';
4
- export declare function translateYjsEvent(aiTable: AIViewTable, sharedType: SharedType, event: Y.YEvent<any>): AITableAction[];
5
- export declare function applyEvents(aiTable: AIViewTable, sharedType: SharedType, events: Y.YEvent<any>[]): AITableAction[];
6
- export declare function applyYjsEvents(aiTable: AIViewTable, sharedType: SharedType, events: Y.YEvent<any>[]): void;
7
- export declare function applyActions(actions: AITableAction[], aiTable: AIViewTable): void;
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/shared/to-table/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAuB,MAAM,iBAAiB,CAAC;AAEjF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,aAAa,EAAE,CAQrH;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,mBAQhG;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,IAAI,CAU1G;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,aAAa,EAAE,EAAE,OAAO,EAAE,WAAW,QAE1E"}
@@ -1,5 +0,0 @@
1
- import * as Y from 'yjs';
2
- import { AIViewTable } from '../../types';
3
- import { SharedType, AITableAction } from '@ai-table/utils';
4
- export default function translateMapEvent(aiTable: AIViewTable, sharedType: SharedType, event: Y.YMapEvent<unknown>): AITableAction[];
5
- //# sourceMappingURL=map-event.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"map-event.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/shared/to-table/map-event.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAA6B,UAAU,EAA0C,aAAa,EAAc,MAAM,iBAAiB,CAAC;AAC3I,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,aAAa,EAAE,CAkDpI"}
@@ -1,4 +0,0 @@
1
- import { AITable } from '@ai-table/grid';
2
- import { AddFieldAction, AddRecordAction, SetRecordPositionAction, AddViewAction, UpdateSystemFieldValue, SharedType } from '@ai-table/utils';
3
- export default function addNode(aiTable: AITable, sharedType: SharedType, action: AddFieldAction | AddRecordAction | AddViewAction | SetRecordPositionAction | UpdateSystemFieldValue): SharedType;
4
- //# sourceMappingURL=add-node.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"add-node.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/shared/to-yjs/add-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAEH,cAAc,EACd,eAAe,EACf,uBAAuB,EACvB,aAAa,EACb,sBAAsB,EAUtB,UAAU,EAGb,MAAM,iBAAiB,CAAC;AAEzB,MAAM,CAAC,OAAO,UAAU,OAAO,CAC3B,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,cAAc,GAAG,eAAe,GAAG,aAAa,GAAG,uBAAuB,GAAG,sBAAsB,GAC5G,UAAU,CA2DZ"}