@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
@@ -1,11 +0,0 @@
1
- import { AITable } from '@ai-table/grid';
2
- import { AITableAction, SharedType } from '@ai-table/utils';
3
- export type ActionMapper<O extends AITableAction = AITableAction> = {
4
- [K in O['type']]: O extends {
5
- type: K;
6
- } ? ApplyFunc<O> : never;
7
- };
8
- export type ApplyFunc<O extends AITableAction = AITableAction> = (aiTable: AITable, sharedType: SharedType, op: O) => SharedType;
9
- export declare const actionMappers: Partial<ActionMapper<any>>;
10
- export declare function applyActionOps(aiTable: AITable, sharedType: SharedType, actions: AITableAction[]): SharedType;
11
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/shared/to-yjs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAKzC,OAAO,EAAc,aAAa,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAExE,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,IAAI;KAC/D,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS;QAAE,IAAI,EAAE,CAAC,CAAA;KAAE,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK;CACjE,CAAC;AAEF,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,KAAK,UAAU,CAAC;AAEjI,eAAO,MAAM,aAAa,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,CAYpD,CAAC;AAEF,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,UAAU,CAc7G"}
@@ -1,4 +0,0 @@
1
- import { RemoveFieldAction, RemoveRecordAction, RemoveViewAction, SharedType } from '@ai-table/utils';
2
- import { AITable } from '@ai-table/grid';
3
- export default function removeNode(aiTable: AITable, sharedType: SharedType, action: RemoveFieldAction | RemoveRecordAction | RemoveViewAction): SharedType;
4
- //# sourceMappingURL=remove-node.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remove-node.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/shared/to-yjs/remove-node.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAGhB,UAAU,EAGb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,CAAC,OAAO,UAAU,UAAU,CAC9B,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,iBAAiB,GAAG,kBAAkB,GAAG,gBAAgB,GAClE,UAAU,CAoCZ"}
@@ -1,4 +0,0 @@
1
- import { SetFieldAction, SetViewAction, SharedType } from '@ai-table/utils';
2
- import { AITable } from '@ai-table/grid';
3
- export default function setNode(aiTable: AITable, sharedType: SharedType, action: SetFieldAction | SetViewAction): SharedType;
4
- //# sourceMappingURL=set-node.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"set-node.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/shared/to-yjs/set-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,cAAc,EAAE,aAAa,EAA0B,UAAU,EAAkB,MAAM,iBAAiB,CAAC;AAEhI,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,GAAG,aAAa,GAAG,UAAU,CA6B5H"}
@@ -1,4 +0,0 @@
1
- import { AITable } from '@ai-table/grid';
2
- import { UpdateFieldValueAction, SharedType } from '@ai-table/utils';
3
- export default function updateFieldValue(aiTable: AITable, sharedType: SharedType, action: UpdateFieldValueAction): SharedType;
4
- //# sourceMappingURL=update-field-value.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update-field-value.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/shared/to-yjs/update-field-value.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EACH,sBAAsB,EAGtB,UAAU,EAGb,MAAM,iBAAiB,CAAC;AAEzB,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,sBAAsB,GAAG,UAAU,CAoB7H"}
@@ -1,21 +0,0 @@
1
- import { WritableSignal } from '@angular/core';
2
- import { UndoManager } from 'yjs';
3
- import { AIViewTable } from '../types';
4
- import { SharedType } from '@ai-table/utils';
5
- import * as i0 from "@angular/core";
6
- export declare class UndoManagerService {
7
- private _undoManager;
8
- private _canUndoCount;
9
- private _canRedoCount;
10
- private _aiTable;
11
- get undoManager(): UndoManager | null;
12
- get canUndoCount(): WritableSignal<number>;
13
- get canRedoCount(): WritableSignal<number>;
14
- initialize(sharedType: SharedType, aiTable: AIViewTable): void;
15
- undo(): void;
16
- redo(): void;
17
- destroy(): void;
18
- static ɵfac: i0.ɵɵFactoryDeclaration<UndoManagerService, never>;
19
- static ɵprov: i0.ɵɵInjectableDeclaration<UndoManagerService>;
20
- }
21
- //# sourceMappingURL=undo-manager.service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"undo-manager.service.d.ts","sourceRoot":"","sources":["../../../packages/state/src/shared/undo-manager.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,cAAc,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;;AAE7C,qBACa,kBAAkB;IAC3B,OAAO,CAAC,YAAY,CAA4B;IAChD,OAAO,CAAC,aAAa,CAA6C;IAClE,OAAO,CAAC,aAAa,CAA6C;IAClE,OAAO,CAAC,QAAQ,CAA4B;IAE5C,IAAI,WAAW,IAAI,WAAW,GAAG,IAAI,CAEpC;IAED,IAAI,YAAY,IAAI,cAAc,CAAC,MAAM,CAAC,CAEzC;IAED,IAAI,YAAY,IAAI,cAAc,CAAC,MAAM,CAAC,CAEzC;IAED,UAAU,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW;IAqBvD,IAAI;IAMJ,IAAI;IAMJ,OAAO;yCAnDE,kBAAkB;6CAAlB,kBAAkB;CAwD9B"}
@@ -1,2 +0,0 @@
1
- export * from './initialize';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/shared/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -1,20 +0,0 @@
1
- import * as Y from 'yjs';
2
- import { AITableViewFields, AITableViewRecords, AITableViews, SharedRecordJsonType, SharedType } from '@ai-table/utils';
3
- export declare const createSharedType: (fieldName?: string) => Y.Map<any>;
4
- export declare const getDataBySharedType: (sharedType: SharedType) => {
5
- records: AITableViewRecords;
6
- fields: AITableViewFields;
7
- views: any;
8
- };
9
- export declare const getSharedTypeByData: (doc: Y.Doc, initializeValue: {
10
- fields: AITableViewFields;
11
- records: AITableViewRecords;
12
- views: AITableViews;
13
- }) => Y.Map<any>;
14
- export declare function toSharedType(sharedType: Y.Map<any>, data: {
15
- fields: AITableViewFields;
16
- records: AITableViewRecords;
17
- views: AITableViews;
18
- }): void;
19
- export declare const getRecordsBySharedJson: (recordJsonArray: SharedRecordJsonType[], fields: AITableViewFields) => AITableViewRecords;
20
- //# sourceMappingURL=initialize.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"initialize.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/shared/utils/initialize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAEH,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,oBAAoB,EACpB,UAAU,EAQb,MAAM,iBAAiB,CAAC;AAEzB,eAAO,MAAM,gBAAgB,GAAI,YAAW,MAAoC,eAI/E,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,YAAY,UAAU;;;;CAUzD,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC5B,KAAK,CAAC,CAAC,GAAG,EACV,iBAAiB;IACb,MAAM,EAAE,iBAAiB,CAAC;IAC1B,OAAO,EAAE,kBAAkB,CAAC;IAC5B,KAAK,EAAE,YAAY,CAAC;CACvB,eAKJ,CAAC;AAEF,wBAAgB,YAAY,CACxB,UAAU,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EACtB,IAAI,EAAE;IACF,MAAM,EAAE,iBAAiB,CAAC;IAC1B,OAAO,EAAE,kBAAkB,CAAC;IAC5B,KAAK,EAAE,YAAY,CAAC;CACvB,GACF,IAAI,CAiBN;AAED,eAAO,MAAM,sBAAsB,GAAI,iBAAiB,oBAAoB,EAAE,EAAE,QAAQ,iBAAiB,KAAG,kBAW3G,CAAC"}
@@ -1,14 +0,0 @@
1
- import { AITable } from "@ai-table/grid";
2
- export interface YjsAITable {
3
- isLocal: () => boolean;
4
- asLocal: () => void;
5
- }
6
- export declare const YjsAITable: {
7
- isLocal: (aiTable: AITable) => boolean;
8
- asLocal: (aiTable: AITable, fn: () => void) => void;
9
- isRemote: (aiTable: AITable) => boolean;
10
- asRemote: (aiTable: AITable, fn: () => void) => void;
11
- isUndo: (aiTable: AITable) => boolean;
12
- asUndo: (aiTable: AITable, fn: () => void) => void;
13
- };
14
- //# sourceMappingURL=yjs-table.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"yjs-table.d.ts","sourceRoot":"","sources":["../../../packages/state/src/shared/yjs-table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAMzC,MAAM,WAAW,UAAU;IACvB,OAAO,EAAE,MAAM,OAAO,CAAC;IACvB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,UAAU;uBACA,OAAO,KAAG,OAAO;uBAIjB,OAAO,MAAM,MAAM,IAAI,KAAG,IAAI;wBAW7B,OAAO,KAAG,OAAO;wBAIjB,OAAO,MAAM,MAAM,IAAI,KAAG,IAAI;sBAWhC,OAAO,KAAG,OAAO;sBAIjB,OAAO,MAAM,MAAM,IAAI,KAAG,IAAI;CAUnD,CAAC"}
@@ -1,14 +0,0 @@
1
- import { AITable } from '@ai-table/grid';
2
- import { WritableSignal, Signal } from '@angular/core';
3
- import { AITableAction, AITableView } from '@ai-table/utils';
4
- export interface AIViewTable extends AITable {
5
- views: WritableSignal<AITableView[]>;
6
- activeViewId: WritableSignal<string>;
7
- viewsMap: Signal<{
8
- [key: string]: AITableView;
9
- }>;
10
- actions: AITableAction[];
11
- onChange: () => void;
12
- apply: (action: AITableAction | AITableAction[]) => void;
13
- }
14
- //# sourceMappingURL=ai-table.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-table.d.ts","sourceRoot":"","sources":["../../../packages/state/src/types/ai-table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,WAAW,WAAY,SAAQ,OAAO;IACxC,KAAK,EAAE,cAAc,CAAC,WAAW,EAAE,CAAC,CAAC;IACrC,YAAY,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACrC,QAAQ,EAAE,MAAM,CAAC;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAA;KAAE,CAAC,CAAC;IACjD,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,EAAE,CAAC,MAAM,EAAE,aAAa,GAAG,aAAa,EAAE,KAAK,IAAI,CAAC;CAC5D"}
package/types/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './ai-table';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/state/src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
package/utils/build.d.ts DELETED
@@ -1,8 +0,0 @@
1
- import { AITableView, AITableViewFields, AITableViewRecords } from '@ai-table/utils';
2
- import { AIViewTable } from '../types';
3
- export declare function buildRecordsByView(aiTable: AIViewTable, records: AITableViewRecords, fields: AITableViewFields, activeView: AITableView): import("@ai-table/utils").AITableViewRecord[];
4
- export declare function buildFieldsByView(aiTable: AIViewTable, fields: AITableViewFields, activeView: AITableView): AITableViewFields;
5
- export declare function buildLinearRows(aiTable: AIViewTable, activeView: AITableView, records: AITableViewRecords): import("@ai-table/grid").AITableLinearRow[] | null;
6
- export declare function buildSorts(activeView: AITableView): import("@ai-table/utils").AITableSort[];
7
- export declare function mergeSorts(activeView: AITableView): import("@ai-table/utils").AITableSort[];
8
- //# sourceMappingURL=build.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../packages/state/src/utils/build.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAOvC,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,iBAAiB,EAAE,UAAU,EAAE,WAAW,iDAKvI;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,iBAAiB,EAAE,UAAU,EAAE,WAAW,qBAGzG;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,kBAAkB,sDAkBzG;AAED,wBAAgB,UAAU,CAAC,UAAU,EAAE,WAAW,2CAYjD;AAED,wBAAgB,UAAU,CAAC,UAAU,EAAE,WAAW,2CAUjD"}
package/utils/common.d.ts DELETED
@@ -1,5 +0,0 @@
1
- import { Path } from '@ai-table/utils';
2
- import { AITable } from '@ai-table/grid';
3
- export declare function isPathEqual(path: Path, another: Path): boolean;
4
- export declare function generateCopyName(aiTable: AITable, existNames: string[], name: string): string;
5
- //# sourceMappingURL=common.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../packages/state/src/utils/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAGzC,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,GAAG,OAAO,CAE9D;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,UASpF"}
@@ -1,4 +0,0 @@
1
- import { AddFieldOptions } from '@ai-table/utils';
2
- import { AIViewTable } from '../../types';
3
- export declare function addFields(aiTable: AIViewTable, options: AddFieldOptions): void;
4
- //# sourceMappingURL=add-fields.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"add-fields.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/utils/field/add-fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAsE,MAAM,iBAAiB,CAAC;AACtH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1C,wBAAgB,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,eAAe,QAyCvE"}
@@ -1,3 +0,0 @@
1
- import { AITableView, AITableViewFields } from '@ai-table/utils';
2
- export declare function buildViewFields(fields: AITableViewFields, activeView: AITableView): AITableViewFields;
3
- //# sourceMappingURL=build-fields.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"build-fields.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/utils/field/build-fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEjE,wBAAgB,eAAe,CAAC,MAAM,EAAE,iBAAiB,EAAE,UAAU,EAAE,WAAW,GAAG,iBAAiB,CAkBrG"}
@@ -1,21 +0,0 @@
1
- import { AITable } from '@ai-table/grid';
2
- import { Signal } from '@angular/core';
3
- import { AITableField } from '@ai-table/utils';
4
- export declare function getFrozenFieldId(aiTable: AITable): string | undefined;
5
- export declare function calculateAdaptiveFrozenColumnCount(aiTable: AITable, containerWidth: number, minUnfrozenWidth?: number): number;
6
- export declare const freezeToThisColumn: (aiTable: AITable) => {
7
- type: string;
8
- name: string;
9
- icon: string;
10
- exec: (aiTable: AITable, field: Signal<AITableField>) => void;
11
- hidden: (aiTable: AITable, field: Signal<AITableField>) => boolean;
12
- disabled: (aiTable: AITable, field: Signal<AITableField>) => boolean;
13
- };
14
- export declare const restoreDefaultFrozenColumn: (aiTable: AITable) => {
15
- type: string;
16
- name: string;
17
- icon: string;
18
- exec: (aiTable: AITable, field: Signal<AITableField>) => void;
19
- hidden: (aiTable: AITable, field: Signal<AITableField>) => boolean;
20
- };
21
- //# sourceMappingURL=frozen-field.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"frozen-field.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/utils/field/frozen-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAA2B,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAGvC,OAAO,EAAE,YAAY,EAAyF,MAAM,iBAAiB,CAAC;AAGtI,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CASrE;AAuED,wBAAgB,kCAAkC,CAAC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,gBAAgB,GAAE,MAAY,GAAG,MAAM,CAsBnI;AAED,eAAO,MAAM,kBAAkB,GAAI,SAAS,OAAO;;;;oBAK3B,OAAO,SAAS,MAAM,CAAC,YAAY,CAAC;sBAWlC,OAAO,SAAS,MAAM,CAAC,YAAY,CAAC;wBAUlC,OAAO,SAAS,MAAM,CAAC,YAAY,CAAC;CAoC/D,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,SAAS,OAAO;;;;oBAKnC,OAAO,SAAS,MAAM,CAAC,YAAY,CAAC;sBAUlC,OAAO,SAAS,MAAM,CAAC,YAAY,CAAC;CAe7D,CAAC"}
@@ -1,8 +0,0 @@
1
- export * from './add-fields';
2
- export * from './remove-field';
3
- export * from './frozen-field';
4
- export * from './sort-fields';
5
- export * from './move-fields';
6
- export * from './position-field';
7
- export * from './frozen-field';
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/utils/field/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC"}
@@ -1,4 +0,0 @@
1
- import { MoveFieldOptions } from '@ai-table/utils';
2
- import { AIViewTable } from '../../types';
3
- export declare function moveFields(aiTable: AIViewTable, options: MoveFieldOptions): void;
4
- //# sourceMappingURL=move-fields.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"move-fields.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/utils/field/move-fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAuD,MAAM,iBAAiB,CAAC;AACxG,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAO1C,wBAAgB,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,gBAAgB,QAoDzE"}
@@ -1,3 +0,0 @@
1
- import { AITableFields, NumberPath } from '@ai-table/utils';
2
- export declare function getFieldPositionInView(viewId: string, fields: AITableFields, path: NumberPath, newPath: NumberPath): number;
3
- //# sourceMappingURL=position-field.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"position-field.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/utils/field/position-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAoB,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE9E,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,UA0BlH"}
@@ -1,10 +0,0 @@
1
- import { AITable } from '@ai-table/grid';
2
- import { Signal } from '@angular/core';
3
- import { AITableRecordUpdatedInfo, AITableField } from '@ai-table/utils';
4
- export declare const buildRemoveFieldItem: (aiTable: AITable, getUpdatedInfo: () => AITableRecordUpdatedInfo) => {
5
- type: string;
6
- name: string;
7
- icon: string;
8
- exec: (aiTable: AITable, field: Signal<AITableField>) => void;
9
- };
10
- //# sourceMappingURL=remove-field.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remove-field.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/utils/field/remove-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAIvC,OAAO,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEzE,eAAO,MAAM,oBAAoB,GAAI,SAAS,OAAO,EAAE,gBAAgB,MAAM,wBAAwB;;;;oBAK7E,OAAO,SAAS,MAAM,CAAC,YAAY,CAAC;CAI3D,CAAC"}
@@ -1,4 +0,0 @@
1
- import { AITable } from '@ai-table/grid';
2
- import { AITableView, AITableViewFields } from '@ai-table/utils';
3
- export declare function getSortFields(aiTable: AITable, fields: AITableViewFields, activeView: AITableView): AITableViewFields;
4
- //# sourceMappingURL=sort-fields.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sort-fields.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/utils/field/sort-fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAsB,MAAM,iBAAiB,CAAC;AAErF,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,UAAU,EAAE,WAAW,GACxB,iBAAiB,CAC1F"}
@@ -1,21 +0,0 @@
1
- import { AITable } from '@ai-table/grid';
2
- import { AITableViewRecords, AITableGroupField } from '@ai-table/utils';
3
- import { AITableLinearRow } from '@ai-table/grid';
4
- export declare class GroupCalculator {
5
- private groups;
6
- private groupBreakpoints;
7
- private groupCollapseState;
8
- private aiTable;
9
- private fieldsMap;
10
- constructor(aiTable: AITable, groups: AITableGroupField[], collapseState?: string[]);
11
- calculateLinearRows(records: AITableViewRecords): AITableLinearRow[];
12
- private detectGroupBreakpoints;
13
- private addBreakpoint;
14
- private generateLinearRows;
15
- private handleGroupEnd;
16
- private generateGroupTabRows;
17
- private calculateGroupRecordRange;
18
- private generateGroupId;
19
- private isParentGroupCollapsed;
20
- }
21
- //# sourceMappingURL=group-calculator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"group-calculator.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/utils/group/group-calculator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAwD,MAAM,gBAAgB,CAAC;AAC/F,OAAO,EAAE,kBAAkB,EAAmC,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzG,OAAO,EAAE,gBAAgB,EAAkB,MAAM,gBAAgB,CAAC;AAGlE,qBAAa,eAAe;IACxB,OAAO,CAAC,MAAM,CAAsB;IACpC,OAAO,CAAC,gBAAgB,CAAwB;IAChD,OAAO,CAAC,kBAAkB,CAAc;IACxC,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,SAAS,CAA+B;gBAEpC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE;IAQnF,mBAAmB,CAAC,OAAO,EAAE,kBAAkB,GAAG,gBAAgB,EAAE;IAOpE,OAAO,CAAC,sBAAsB;IA6C9B,OAAO,CAAC,aAAa;IAWrB,OAAO,CAAC,kBAAkB;IA+D1B,OAAO,CAAC,cAAc;IAwCtB,OAAO,CAAC,oBAAoB;IAiC5B,OAAO,CAAC,yBAAyB;IAiBjC,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,sBAAsB;CAwBjC"}
@@ -1,3 +0,0 @@
1
- export * from './group-calculator';
2
- export * from './utils';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/utils/group/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC"}
@@ -1,6 +0,0 @@
1
- import { AITableLinearRow, AITableLinearRowGroup } from '@ai-table/grid';
2
- import { AIViewTable } from '../../types';
3
- export declare function getParentLinearRowGroups(aiTable: AIViewTable, targetId: string, linearRows?: AITableLinearRow[]): AITableLinearRowGroup[];
4
- export declare function isSameParentGroup(aiTable: AIViewTable, recordId: string, originGroupLinearRows: AITableLinearRow[], tmpNewGroupLinearRows: AITableLinearRow[]): boolean;
5
- export declare function getGroupRecordLength(aiTable: AIViewTable, recordId: string, linearRows?: AITableLinearRow[]): number;
6
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/utils/group/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAkB,MAAM,gBAAgB,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,gBAAgB,EAAE,2BA0B/G;AAED,wBAAgB,iBAAiB,CAC7B,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,MAAM,EAChB,qBAAqB,EAAE,gBAAgB,EAAE,EACzC,qBAAqB,EAAE,gBAAgB,EAAE,WAK5C;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,gBAAgB,EAAE,UAO3G"}
package/utils/i18n.d.ts DELETED
@@ -1,44 +0,0 @@
1
- import { AITable } from '@ai-table/grid';
2
- export declare enum AITableStateI18nKey {
3
- copyField = "copyField",
4
- removeRecords = "removeRecords",
5
- copy = "copy",
6
- copySuffix = "copySuffix",
7
- paste = "paste",
8
- invalidPasteContent = "invalidPasteContent",
9
- tableView = "tableView",
10
- editField = "editField",
11
- removeField = "removeField",
12
- pasteOverMaxRecords = "pasteOverMaxRecords",
13
- pasteOverMaxFields = "pasteOverMaxFields",
14
- insertUpward = "insertUpward",
15
- insertDownward = "insertDownward",
16
- copyRecords = "copyRecords",
17
- upward = "upward",
18
- downward = "downward",
19
- freezeToThisColumn = "freezeToThisColumn",
20
- restoreDefaultFrozenColumn = "restoreDefaultFrozenColumn"
21
- }
22
- export declare const AITableStateI18nText: {
23
- copyField: string;
24
- removeRecords: string;
25
- copy: string;
26
- copySuffix: string;
27
- paste: string;
28
- invalidPasteContent: string;
29
- tableView: string;
30
- editField: string;
31
- removeField: string;
32
- pasteOverMaxRecords: string;
33
- pasteOverMaxFields: string;
34
- insertUpward: string;
35
- insertDownward: string;
36
- copyRecords: string;
37
- upward: string;
38
- downward: string;
39
- freezeToThisColumn: string;
40
- restoreDefaultFrozenColumn: string;
41
- };
42
- export declare const getDefaultI18nTextByKey: (key: AITableStateI18nKey) => string;
43
- export declare const getStateI18nTextByKey: (aiTable: AITable, key: AITableStateI18nKey | string) => string;
44
- //# sourceMappingURL=i18n.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../packages/state/src/utils/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,oBAAY,mBAAmB;IAC3B,SAAS,cAAc;IACvB,aAAa,kBAAkB;IAC/B,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,KAAK,UAAU;IACf,mBAAmB,wBAAwB;IAC3C,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,mBAAmB,wBAAwB;IAC3C,kBAAkB,uBAAuB;IACzC,YAAY,iBAAiB;IAC7B,cAAc,mBAAmB;IACjC,WAAW,gBAAgB;IAC3B,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,kBAAkB,uBAAuB;IACzC,0BAA0B,+BAA+B;CAC5D;AAED,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;CAmBhC,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,KAAK,mBAAmB,KAAG,MAElE,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,SAAS,OAAO,EAAE,KAAK,mBAAmB,GAAG,MAAM,KAAG,MAS3F,CAAC"}
package/utils/index.d.ts DELETED
@@ -1,13 +0,0 @@
1
- export * from './build';
2
- export * from './view';
3
- export * from './common';
4
- export * from './weak-map';
5
- export * from './field/move-fields';
6
- export * from './field/position-field';
7
- export * from './record/move-records';
8
- export * from './i18n';
9
- export * from './field';
10
- export * from './record';
11
- export * from './group';
12
- export * from './position-precision';
13
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/state/src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC"}
@@ -1,30 +0,0 @@
1
- import { AITableRecord, AITableViewField, AITableViewRecord, Positions } from '@ai-table/utils';
2
- import { AIViewTable } from '../types/ai-table';
3
- export type ViewPositionOptions = {
4
- afterItemId?: string;
5
- beforeItemId?: string;
6
- count?: number;
7
- };
8
- export declare function findNextItemByPosition<T extends AITableViewRecord | AITableViewField>(aiTable: AIViewTable, targetId: string, items: T[], itemsMap: {
9
- [key: string]: T extends AITableViewRecord ? AITableRecord : AITableViewField;
10
- }): T | null;
11
- export declare function findMaxItemByPosition<T extends AITableViewRecord | AITableViewField>(aiTable: AIViewTable, items: T[]): T;
12
- export declare function findPrevItemByPosition<T extends AITableViewRecord | AITableViewField>(aiTable: AIViewTable, targetId: string, items: T[], itemsMap: {
13
- [key: string]: T extends AITableViewRecord ? AITableRecord : AITableViewField;
14
- }): T | null;
15
- export declare function getPreviousAndNextPosition<T extends AITableViewRecord | AITableViewField>(aiTable: AIViewTable, options: {
16
- afterItemId?: string;
17
- beforeItemId?: string;
18
- }, items: T[], itemsMap: {
19
- [key: string]: T extends AITableViewRecord ? AITableRecord : AITableViewField;
20
- }): {
21
- nextPosition: number | null;
22
- previousPosition: number | null;
23
- };
24
- export declare function getCurrentViewPositions<T extends AITableViewRecord | AITableViewField>(aiTable: AIViewTable, options: ViewPositionOptions, items: T[], itemsMap: {
25
- [key: string]: T extends AITableViewRecord ? AITableRecord : AITableViewField;
26
- }): number[];
27
- export declare function getNewItemsPosition<T extends AITableViewRecord | AITableViewField>(aiTable: AIViewTable, options: ViewPositionOptions, items: T[], itemsMap: {
28
- [key: string]: T extends AITableViewRecord ? AITableRecord : AITableViewField;
29
- }): Positions[];
30
- //# sourceMappingURL=position-in-view.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"position-in-view.d.ts","sourceRoot":"","sources":["../../../packages/state/src/utils/position-in-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAqB,iBAAiB,EAAsB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvI,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,MAAM,MAAM,mBAAmB,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAElG,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,iBAAiB,GAAG,gBAAgB,EACjF,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,CAAC,EAAE,EACV,QAAQ,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,SAAS,iBAAiB,GAAG,aAAa,GAAG,gBAAgB,CAAA;CAAE,GAC5F,CAAC,GAAG,IAAI,CAYV;AAED,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,iBAAiB,GAAG,gBAAgB,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,CAUzH;AAED,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,iBAAiB,GAAG,gBAAgB,EACjF,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,CAAC,EAAE,EACV,QAAQ,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,SAAS,iBAAiB,GAAG,aAAa,GAAG,gBAAgB,CAAA;CAAE,GAC5F,CAAC,GAAG,IAAI,CAYV;AAED,wBAAgB,0BAA0B,CAAC,CAAC,SAAS,iBAAiB,GAAG,gBAAgB,EACrF,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,EACxD,KAAK,EAAE,CAAC,EAAE,EACV,QAAQ,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,SAAS,iBAAiB,GAAG,aAAa,GAAG,gBAAgB,CAAA;CAAE,GAC5F;IAAE,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAmClE;AAED,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,iBAAiB,GAAG,gBAAgB,EAClF,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,mBAAmB,EAC5B,KAAK,EAAE,CAAC,EAAE,EACV,QAAQ,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,SAAS,iBAAiB,GAAG,aAAa,GAAG,gBAAgB,CAAA;CAAE,YAuB9F;AAED,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,iBAAiB,GAAG,gBAAgB,EAC9E,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,mBAAmB,EAC5B,KAAK,EAAE,CAAC,EAAE,EACV,QAAQ,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,SAAS,iBAAiB,GAAG,aAAa,GAAG,gBAAgB,CAAA;CAAE,eA2B9F"}
@@ -1,20 +0,0 @@
1
- interface PositionInsertResult {
2
- success: boolean;
3
- positions: number[];
4
- needsReorganization: boolean;
5
- reason?: string;
6
- context?: {
7
- prevPosition: number;
8
- nextPosition: number;
9
- availableGap: number;
10
- subGap: number;
11
- requestedCount: number;
12
- };
13
- }
14
- export declare const DEFAULT_INITIAL_GAP = 65536;
15
- export declare const DEFAULT_PRECISION_THRESHOLD = 1;
16
- export declare function insertAtStart(firstPosition: number, count?: number, initialGap?: number): number[];
17
- export declare function insertAtEnd(lastPosition: number, count?: number, initialGap?: number): number[];
18
- export declare function insertBetween(prevPosition: number, nextPosition: number, count?: number, precisionThreshold?: number): PositionInsertResult;
19
- export {};
20
- //# sourceMappingURL=position-precision.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"position-precision.d.ts","sourceRoot":"","sources":["../../../packages/state/src/utils/position-precision.ts"],"names":[],"mappings":"AAAA,UAAU,oBAAoB;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE;QACN,YAAY,EAAE,MAAM,CAAC;QACrB,YAAY,EAAE,MAAM,CAAC;QACrB,YAAY,EAAE,MAAM,CAAC;QACrB,MAAM,EAAE,MAAM,CAAC;QACf,cAAc,EAAE,MAAM,CAAC;KAC1B,CAAC;CACL;AAED,eAAO,MAAM,mBAAmB,QAAQ,CAAC;AACzC,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAE7C,wBAAgB,aAAa,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,GAAE,MAAU,EAAE,UAAU,GAAE,MAA4B,GAAG,MAAM,EAAE,CAM1H;AAED,wBAAgB,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,GAAE,MAAU,EAAE,UAAU,GAAE,MAA4B,GAAG,MAAM,EAAE,CAMvH;AAED,wBAAgB,aAAa,CACzB,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,EACpB,KAAK,GAAE,MAAU,EACjB,kBAAkB,GAAE,MAAoC,GACzD,oBAAoB,CAwCtB"}
@@ -1,6 +0,0 @@
1
- import { AIViewTable } from '../../types';
2
- import { AddRecordOptions, AITableRecordCreatedInfo, CopyRecordOptions } from '@ai-table/utils';
3
- export declare function addRecords(aiTable: AIViewTable, options: AddRecordOptions, recordCreatedInfo: AITableRecordCreatedInfo): void;
4
- export declare function copyRecords(aiTable: AIViewTable, options: CopyRecordOptions, recordCreatedInfo: AITableRecordCreatedInfo): void;
5
- export declare function getDefaultRecordValues(aiTable: AIViewTable, isDuplicate?: boolean, recordId?: string): Record<string, any>;
6
- //# sourceMappingURL=add-records.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"add-records.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/utils/record/add-records.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI1C,OAAO,EACH,gBAAgB,EAIhB,wBAAwB,EACxB,iBAAiB,EAEpB,MAAM,iBAAiB,CAAC;AAGzB,wBAAgB,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,wBAAwB,QA8DtH;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,wBAAwB,QAyBxH;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,WAAW,EAAE,WAAW,UAAQ,EAAE,QAAQ,CAAC,EAAE,MAAM,uBAyBlG"}
@@ -1,6 +0,0 @@
1
- import { AITableRecord, AITableViewRecord } from '@ai-table/utils';
2
- import { AIViewTable } from '../../types';
3
- export declare function getParentGroupValuesByGroupId(aiTable: AIViewTable, groupId: string): Record<string, any> | null;
4
- export declare function getPrevRecordIdByAddGroupId(aiTable: AIViewTable, groupId: string): string | null;
5
- export declare function buildRecordsWithWillMoveRecords(records: AITableRecord[], willMoveRecordsMap: Map<string, AITableRecord>): AITableViewRecord[];
6
- //# sourceMappingURL=common.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/utils/record/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAK1C,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAS/G;AAED,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,iBAkBhF;AAED,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,aAAa,EAAE,EAAE,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,uBAIvH"}
@@ -1,11 +0,0 @@
1
- import { AITable } from '@ai-table/grid';
2
- import { AIViewTable } from '../../types';
3
- import { AITableRecord, AITableField, FieldValue, AITableViewRecords, AITableViewFields, AITableView, AITableFilterConditions, AITableFilterLogical, AITableFilterCondition } from '@ai-table/utils';
4
- export declare function getFilteredRecords(aiTable: AIViewTable, records: AITableViewRecords, fields: AITableViewFields, activeView: AITableView): AITableViewRecords;
5
- export declare function checkConditions(aiTable: AIViewTable, fields: AITableViewFields, record: AITableRecord, filterConditions?: AITableFilterConditions): boolean;
6
- export declare function doFilter(condition: AITableFilterCondition, cellValue: FieldValue, options: {
7
- aiTable: AITable;
8
- field: AITableField;
9
- }): boolean;
10
- export declare function getDefaultRecordDataByFilter(recordValues: Record<string, FieldValue>, conditions: AITableFilterCondition[], fields: AITableViewFields, conditionLogical?: AITableFilterLogical): Record<string, any>;
11
- //# sourceMappingURL=filter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/utils/record/filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EACH,aAAa,EACb,YAAY,EAEZ,UAAU,EAGV,kBAAkB,EAClB,iBAAiB,EACjB,WAAW,EACX,uBAAuB,EACvB,oBAAoB,EAEpB,sBAAsB,EAGzB,MAAM,iBAAiB,CAAC;AAEzB,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,iBAAiB,EAAE,UAAU,EAAE,WAAW,sBAgBvI;AAED,wBAAgB,eAAe,CAC3B,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,iBAAiB,EACzB,MAAM,EAAE,aAAa,EACrB,gBAAgB,CAAC,EAAE,uBAAuB,WA6B7C;AAkBD,wBAAgB,QAAQ,CACpB,SAAS,EAAE,sBAAsB,EACjC,SAAS,EAAE,UAAU,EACrB,OAAO,EAAE;IACL,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,YAAY,CAAC;CACvB,WAYJ;AAED,wBAAgB,4BAA4B,CACxC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,EACxC,UAAU,EAAE,sBAAsB,EAAE,EACpC,MAAM,EAAE,iBAAiB,EACzB,gBAAgB,CAAC,EAAE,oBAAoB,uBA4C1C"}
@@ -1,7 +0,0 @@
1
- export * from './add-records';
2
- export * from './sort';
3
- export * from './filter';
4
- export * from './update-field-value';
5
- export * from './move-records';
6
- export * from './common';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/utils/record/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC"}
@@ -1,4 +0,0 @@
1
- import { MoveRecordOptions } from '@ai-table/utils';
2
- import { AIViewTable } from '../../types';
3
- export declare function moveRecords(aiTable: AIViewTable, options: MoveRecordOptions): void;
4
- //# sourceMappingURL=move-records.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"move-records.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/utils/record/move-records.ts"],"names":[],"mappings":"AACA,OAAO,EAIH,iBAAiB,EAGpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1C,wBAAgB,WAAW,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,iBAAiB,QAgD3E"}
@@ -1,4 +0,0 @@
1
- import { AITableView, AITableViewRecords, AITableViewRecord, AITableSort } from '@ai-table/utils';
2
- import { AITable } from '@ai-table/grid';
3
- export declare function sortRecordsByConditions(aiTable: AITable, records: AITableViewRecords, activeView: AITableView, sorts: AITableSort[]): AITableViewRecord[];
4
- //# sourceMappingURL=sort.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/utils/record/sort.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,WAAW,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACpH,OAAO,EAAE,OAAO,EAAiC,MAAM,gBAAgB,CAAC;AAExE,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,uBAanI"}
@@ -1,4 +0,0 @@
1
- import { AIViewTable } from '../../types';
2
- import { UpdateFieldValueOptions, AITableRecordUpdatedInfo } from '@ai-table/utils';
3
- export declare function updateFieldValues(aiTable: AIViewTable, options: UpdateFieldValueOptions[], updatedInfo?: AITableRecordUpdatedInfo): void;
4
- //# sourceMappingURL=update-field-value.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update-field-value.d.ts","sourceRoot":"","sources":["../../../../packages/state/src/utils/record/update-field-value.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EACH,uBAAuB,EACvB,wBAAwB,EAK3B,MAAM,iBAAiB,CAAC;AAyIzB,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,uBAAuB,EAAE,EAAE,WAAW,CAAC,EAAE,wBAAwB,QAmBjI"}
package/utils/view.d.ts DELETED
@@ -1,11 +0,0 @@
1
- import { AITableView, AITableViewFields, AITableViewRecords, Positions } from '@ai-table/utils';
2
- import { AIViewTable } from '../types';
3
- export declare function createPositions(views: AITableView[], activeId: string, data: AITableViewRecords | AITableViewFields, index?: number): Positions;
4
- export declare function createMultiplePositions(views: AITableView[], activeId: string, data: AITableViewRecords | AITableViewFields, targetIndex?: number, count?: number, isInsertUpward?: boolean): Positions[];
5
- export declare function getPositions(activeId: string, data: AITableViewRecords | AITableViewFields, targetIndex?: number, count?: number, isInsertBefore?: boolean): number[];
6
- export declare function getPosition(data: AITableViewRecords | AITableViewFields, activeViewId: string, index?: number): number;
7
- export declare function getMaxPosition(data: AITableViewRecords | AITableViewFields | AITableView[], activeViewId?: string): number;
8
- export declare function addView(aiTable: AIViewTable, type: 'add' | 'duplicate', viewId?: string): AITableView;
9
- export declare function removeView(aiTable: AIViewTable, records: AITableViewRecords, fields: AITableViewFields, activeViewId: string): void;
10
- export declare function sortViews(data: AITableView[]): AITableView[];
11
- //# sourceMappingURL=view.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../packages/state/src/utils/view.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,WAAW,EAAa,iBAAiB,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAM1H,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAIvC,wBAAgB,eAAe,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,GAAG,iBAAiB,EAAE,KAAK,CAAC,EAAE,MAAM,aAEnI;AAED,wBAAgB,uBAAuB,CACnC,KAAK,EAAE,WAAW,EAAE,EACpB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,kBAAkB,GAAG,iBAAiB,EAC5C,WAAW,GAAE,MAAwB,EACrC,KAAK,GAAE,MAAU,EACjB,cAAc,GAAE,OAAe,eAoBlC;AAED,wBAAgB,YAAY,CACxB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,kBAAkB,GAAG,iBAAiB,EAC5C,WAAW,GAAE,MAAwB,EACrC,KAAK,GAAE,MAAU,EACjB,cAAc,GAAE,OAAe,YAmBlC;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,kBAAkB,GAAG,iBAAiB,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,UAE7G;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,kBAAkB,GAAG,iBAAiB,GAAG,WAAW,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM,UAkBjH;AAED,wBAAgB,OAAO,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,KAAK,GAAG,WAAW,EAAE,MAAM,CAAC,EAAE,MAAM,eAiDvF;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,QAsB5H;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,WAAW,EAAE,iBAE5C"}
@@ -1,3 +0,0 @@
1
- import { AIViewTable } from '../types';
2
- export declare const FLUSHING: WeakMap<AIViewTable, boolean>;
3
- //# sourceMappingURL=weak-map.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"weak-map.d.ts","sourceRoot":"","sources":["../../../packages/state/src/utils/weak-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,eAAO,MAAM,QAAQ,+BAAsC,CAAC"}