@ai-table/state 0.4.1 → 0.4.3
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.
- package/fesm2022/ai-table-state.mjs +48 -6
- package/fesm2022/ai-table-state.mjs.map +1 -1
- package/index.d.ts +319 -2
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/action/field.d.ts +0 -16
- package/action/field.d.ts.map +0 -1
- package/action/general.d.ts +0 -6
- package/action/general.d.ts.map +0 -1
- package/action/group.d.ts +0 -7
- package/action/group.d.ts.map +0 -1
- package/action/index.d.ts +0 -25
- package/action/index.d.ts.map +0 -1
- package/action/position.d.ts +0 -14
- package/action/position.d.ts.map +0 -1
- package/action/record.d.ts +0 -15
- package/action/record.d.ts.map +0 -1
- package/action/view.d.ts +0 -15
- package/action/view.d.ts.map +0 -1
- package/ai-table-state.d.ts.map +0 -1
- package/constants/context-menu-item.d.ts +0 -7
- package/constants/context-menu-item.d.ts.map +0 -1
- package/constants/field-menu-item.d.ts +0 -25
- package/constants/field-menu-item.d.ts.map +0 -1
- package/constants/index.d.ts +0 -4
- package/constants/index.d.ts.map +0 -1
- package/constants/view.d.ts +0 -3
- package/constants/view.d.ts.map +0 -1
- package/plugins/state.plugin.d.ts +0 -3
- package/plugins/state.plugin.d.ts.map +0 -1
- package/public-api.d.ts +0 -7
- package/public-api.d.ts.map +0 -1
- package/shared/index.d.ts +0 -6
- package/shared/index.d.ts.map +0 -1
- package/shared/to-table/index.d.ts +0 -8
- package/shared/to-table/index.d.ts.map +0 -1
- package/shared/to-table/map-event.d.ts +0 -5
- package/shared/to-table/map-event.d.ts.map +0 -1
- package/shared/to-yjs/add-node.d.ts +0 -4
- package/shared/to-yjs/add-node.d.ts.map +0 -1
- package/shared/to-yjs/index.d.ts +0 -11
- package/shared/to-yjs/index.d.ts.map +0 -1
- package/shared/to-yjs/remove-node.d.ts +0 -4
- package/shared/to-yjs/remove-node.d.ts.map +0 -1
- package/shared/to-yjs/set-node.d.ts +0 -4
- package/shared/to-yjs/set-node.d.ts.map +0 -1
- package/shared/to-yjs/update-field-value.d.ts +0 -4
- package/shared/to-yjs/update-field-value.d.ts.map +0 -1
- package/shared/undo-manager.service.d.ts +0 -21
- package/shared/undo-manager.service.d.ts.map +0 -1
- package/shared/utils/index.d.ts +0 -2
- package/shared/utils/index.d.ts.map +0 -1
- package/shared/utils/initialize.d.ts +0 -20
- package/shared/utils/initialize.d.ts.map +0 -1
- package/shared/yjs-table.d.ts +0 -14
- package/shared/yjs-table.d.ts.map +0 -1
- package/types/ai-table.d.ts +0 -14
- package/types/ai-table.d.ts.map +0 -1
- package/types/index.d.ts +0 -2
- package/types/index.d.ts.map +0 -1
- package/utils/build.d.ts +0 -8
- package/utils/build.d.ts.map +0 -1
- package/utils/common.d.ts +0 -5
- package/utils/common.d.ts.map +0 -1
- package/utils/field/add-fields.d.ts +0 -4
- package/utils/field/add-fields.d.ts.map +0 -1
- package/utils/field/build-fields.d.ts +0 -3
- package/utils/field/build-fields.d.ts.map +0 -1
- package/utils/field/frozen-field.d.ts +0 -21
- package/utils/field/frozen-field.d.ts.map +0 -1
- package/utils/field/index.d.ts +0 -8
- package/utils/field/index.d.ts.map +0 -1
- package/utils/field/move-fields.d.ts +0 -4
- package/utils/field/move-fields.d.ts.map +0 -1
- package/utils/field/position-field.d.ts +0 -3
- package/utils/field/position-field.d.ts.map +0 -1
- package/utils/field/remove-field.d.ts +0 -10
- package/utils/field/remove-field.d.ts.map +0 -1
- package/utils/field/sort-fields.d.ts +0 -4
- package/utils/field/sort-fields.d.ts.map +0 -1
- package/utils/group/group-calculator.d.ts +0 -21
- package/utils/group/group-calculator.d.ts.map +0 -1
- package/utils/group/index.d.ts +0 -3
- package/utils/group/index.d.ts.map +0 -1
- package/utils/group/utils.d.ts +0 -6
- package/utils/group/utils.d.ts.map +0 -1
- package/utils/i18n.d.ts +0 -42
- package/utils/i18n.d.ts.map +0 -1
- package/utils/index.d.ts +0 -13
- package/utils/index.d.ts.map +0 -1
- package/utils/position-in-view.d.ts +0 -30
- package/utils/position-in-view.d.ts.map +0 -1
- package/utils/position-precision.d.ts +0 -20
- package/utils/position-precision.d.ts.map +0 -1
- package/utils/record/add-records.d.ts +0 -5
- package/utils/record/add-records.d.ts.map +0 -1
- package/utils/record/common.d.ts +0 -6
- package/utils/record/common.d.ts.map +0 -1
- package/utils/record/filter.d.ts +0 -11
- package/utils/record/filter.d.ts.map +0 -1
- package/utils/record/index.d.ts +0 -7
- package/utils/record/index.d.ts.map +0 -1
- package/utils/record/move-records.d.ts +0 -4
- package/utils/record/move-records.d.ts.map +0 -1
- package/utils/record/sort.d.ts +0 -4
- package/utils/record/sort.d.ts.map +0 -1
- package/utils/record/update-field-value.d.ts +0 -4
- package/utils/record/update-field-value.d.ts.map +0 -1
- package/utils/view.d.ts +0 -11
- package/utils/view.d.ts.map +0 -1
- package/utils/weak-map.d.ts +0 -3
- package/utils/weak-map.d.ts.map +0 -1
package/shared/to-yjs/index.d.ts
DELETED
|
@@ -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"}
|
package/shared/utils/index.d.ts
DELETED
|
@@ -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"}
|
package/shared/yjs-table.d.ts
DELETED
|
@@ -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"}
|
package/types/ai-table.d.ts
DELETED
|
@@ -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
|
package/types/ai-table.d.ts.map
DELETED
|
@@ -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
package/types/index.d.ts.map
DELETED
|
@@ -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
|
package/utils/build.d.ts.map
DELETED
|
@@ -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
|
package/utils/common.d.ts.map
DELETED
|
@@ -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 +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 +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"}
|
package/utils/field/index.d.ts
DELETED
|
@@ -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 +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 +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"}
|
package/utils/group/index.d.ts
DELETED
|
@@ -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"}
|
package/utils/group/utils.d.ts
DELETED
|
@@ -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,42 +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
|
-
upward = "upward",
|
|
17
|
-
downward = "downward",
|
|
18
|
-
freezeToThisColumn = "freezeToThisColumn",
|
|
19
|
-
restoreDefaultFrozenColumn = "restoreDefaultFrozenColumn"
|
|
20
|
-
}
|
|
21
|
-
export declare const AITableStateI18nText: {
|
|
22
|
-
copyField: string;
|
|
23
|
-
removeRecords: string;
|
|
24
|
-
copy: string;
|
|
25
|
-
copySuffix: string;
|
|
26
|
-
paste: string;
|
|
27
|
-
invalidPasteContent: string;
|
|
28
|
-
tableView: string;
|
|
29
|
-
editField: string;
|
|
30
|
-
removeField: string;
|
|
31
|
-
pasteOverMaxRecords: string;
|
|
32
|
-
pasteOverMaxFields: string;
|
|
33
|
-
insertUpward: string;
|
|
34
|
-
insertDownward: string;
|
|
35
|
-
upward: string;
|
|
36
|
-
downward: string;
|
|
37
|
-
freezeToThisColumn: string;
|
|
38
|
-
restoreDefaultFrozenColumn: string;
|
|
39
|
-
};
|
|
40
|
-
export declare const getDefaultI18nTextByKey: (key: AITableStateI18nKey) => string;
|
|
41
|
-
export declare const getStateI18nTextByKey: (aiTable: AITable, key: AITableStateI18nKey | string) => string;
|
|
42
|
-
//# sourceMappingURL=i18n.d.ts.map
|
package/utils/i18n.d.ts.map
DELETED
|
@@ -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,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,kBAAkB,uBAAuB;IACzC,0BAA0B,+BAA+B;CAC5D;AAED,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;CAkBhC,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
|
package/utils/index.d.ts.map
DELETED
|
@@ -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,5 +0,0 @@
|
|
|
1
|
-
import { AIViewTable } from '../../types';
|
|
2
|
-
import { AddRecordOptions, AITableRecordCreatedInfo } from '@ai-table/utils';
|
|
3
|
-
export declare function addRecords(aiTable: AIViewTable, options: AddRecordOptions, recordCreatedInfo: AITableRecordCreatedInfo): void;
|
|
4
|
-
export declare function getDefaultRecordValues(aiTable: AIViewTable, isDuplicate?: boolean, recordId?: string): Record<string, any>;
|
|
5
|
-
//# 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,EAAE,gBAAgB,EAAgD,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAG3H,wBAAgB,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,wBAAwB,QA8DtH;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,WAAW,EAAE,WAAW,UAAQ,EAAE,QAAQ,CAAC,EAAE,MAAM,uBAyBlG"}
|
package/utils/record/common.d.ts
DELETED
|
@@ -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"}
|
package/utils/record/filter.d.ts
DELETED
|
@@ -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"}
|
package/utils/record/index.d.ts
DELETED
|
@@ -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 +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"}
|
package/utils/record/sort.d.ts
DELETED
|
@@ -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
|
package/utils/view.d.ts.map
DELETED
|
@@ -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"}
|
package/utils/weak-map.d.ts
DELETED
package/utils/weak-map.d.ts.map
DELETED
|
@@ -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"}
|