@dxos/react-ui-table 0.8.3-staging.0fa589b → 0.8.4-main.03d5cd7b56
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/dist/lib/browser/chunk-FBURZBPH.mjs +70 -0
- package/dist/lib/browser/chunk-FBURZBPH.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/browser/chunk-YGC7LZJN.mjs +1695 -0
- package/dist/lib/browser/chunk-YGC7LZJN.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1162 -2554
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +115 -0
- package/dist/lib/browser/testing/index.mjs.map +7 -0
- package/dist/lib/browser/translations.mjs +36 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +4 -5
- package/dist/lib/node-esm/chunk-DKKMSVKP.mjs +71 -0
- package/dist/lib/node-esm/chunk-DKKMSVKP.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-GKIWDEZ7.mjs +1697 -0
- package/dist/lib/node-esm/chunk-GKIWDEZ7.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +1162 -2554
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +116 -0
- package/dist/lib/node-esm/testing/index.mjs.map +7 -0
- package/dist/lib/node-esm/translations.mjs +37 -0
- package/dist/lib/node-esm/translations.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +4 -5
- package/dist/types/src/components/Table/ColumnActionsMenu.d.ts +2 -3
- package/dist/types/src/components/Table/ColumnActionsMenu.d.ts.map +1 -1
- package/dist/types/src/components/Table/ColumnSettings.d.ts +4 -2
- package/dist/types/src/components/Table/ColumnSettings.d.ts.map +1 -1
- package/dist/types/src/components/Table/DynamicTable.d.ts +7 -7
- package/dist/types/src/components/Table/DynamicTable.d.ts.map +1 -1
- package/dist/types/src/components/Table/DynamicTable.stories.d.ts +35 -3
- package/dist/types/src/components/Table/DynamicTable.stories.d.ts.map +1 -1
- package/dist/types/src/components/Table/Relations.stories.d.ts +111 -0
- package/dist/types/src/components/Table/Relations.stories.d.ts.map +1 -0
- package/dist/types/src/components/Table/RowActionsMenu.d.ts +1 -1
- package/dist/types/src/components/Table/RowActionsMenu.d.ts.map +1 -1
- package/dist/types/src/components/Table/Table.d.ts +21 -18
- package/dist/types/src/components/Table/Table.d.ts.map +1 -1
- package/dist/types/src/components/Table/Table.stories.d.ts +110 -6
- package/dist/types/src/components/Table/Table.stories.d.ts.map +1 -1
- package/dist/types/src/components/Table/TableContent.d.ts +17 -0
- package/dist/types/src/components/Table/TableContent.d.ts.map +1 -0
- package/dist/types/src/components/Table/TableToolbar.d.ts +21 -0
- package/dist/types/src/components/Table/TableToolbar.d.ts.map +1 -0
- package/dist/types/src/components/TableCellEditor/CellValidationMessage.d.ts +2 -1
- package/dist/types/src/components/TableCellEditor/CellValidationMessage.d.ts.map +1 -1
- package/dist/types/src/components/TableCellEditor/FormCellEditor.d.ts +14 -9
- package/dist/types/src/components/TableCellEditor/FormCellEditor.d.ts.map +1 -1
- package/dist/types/src/components/TableCellEditor/TableCellEditor.d.ts +12 -18
- package/dist/types/src/components/TableCellEditor/TableCellEditor.d.ts.map +1 -1
- package/dist/types/src/components/TableCellEditor/TableCellEditor.stories.d.ts +38 -5
- package/dist/types/src/components/TableCellEditor/TableCellEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TableCellEditor/index.d.ts +1 -0
- package/dist/types/src/components/TableCellEditor/index.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/testing.d.ts +26 -56
- package/dist/types/src/components/testing.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +2 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useAddRow.d.ts +13 -0
- package/dist/types/src/hooks/useAddRow.d.ts.map +1 -0
- package/dist/types/src/hooks/useProjectionModel.d.ts +6 -0
- package/dist/types/src/hooks/useProjectionModel.d.ts.map +1 -0
- package/dist/types/src/hooks/useTableModel.d.ts +11 -10
- package/dist/types/src/hooks/useTableModel.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +0 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/model/modal-controller.d.ts +5 -8
- package/dist/types/src/model/modal-controller.d.ts.map +1 -1
- package/dist/types/src/model/selection-model.d.ts +18 -8
- package/dist/types/src/model/selection-model.d.ts.map +1 -1
- package/dist/types/src/model/table-model.d.ts +150 -32
- package/dist/types/src/model/table-model.d.ts.map +1 -1
- package/dist/types/src/model/table-presentation.d.ts +13 -2
- package/dist/types/src/model/table-presentation.d.ts.map +1 -1
- package/dist/types/src/playwright/TableManager.d.ts +2 -1
- package/dist/types/src/playwright/TableManager.d.ts.map +1 -1
- package/dist/types/src/playwright/playwright.config.d.ts +3 -0
- package/dist/types/src/playwright/playwright.config.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/useTestTableModel.d.ts +25 -0
- package/dist/types/src/testing/useTestTableModel.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +22 -25
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Table.d.ts +26 -0
- package/dist/types/src/types/Table.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +1 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/util/dynamic-table.d.ts +15 -14
- package/dist/types/src/util/dynamic-table.d.ts.map +1 -1
- package/dist/types/src/util/dynamic-table.test.d.ts +2 -0
- package/dist/types/src/util/dynamic-table.test.d.ts.map +1 -0
- package/dist/types/src/util/index.d.ts +2 -1
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/query-ast.d.ts +7 -0
- package/dist/types/src/util/query-ast.d.ts.map +1 -0
- package/dist/types/src/util/schema.d.ts +1 -1
- package/dist/types/src/util/schema.d.ts.map +1 -1
- package/dist/types/src/util/signals.d.ts.map +1 -1
- package/dist/types/src/util/sort.d.ts +12 -0
- package/dist/types/src/util/sort.d.ts.map +1 -0
- package/dist/types/src/util/table-buttons.d.ts +31 -17
- package/dist/types/src/util/table-buttons.d.ts.map +1 -1
- package/dist/types/src/util/table-controls.d.ts +4 -4
- package/dist/types/src/util/table-controls.d.ts.map +1 -1
- package/dist/types/src/util/tag.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +76 -72
- package/src/components/Table/ColumnActionsMenu.tsx +18 -13
- package/src/components/Table/ColumnSettings.tsx +18 -15
- package/src/components/Table/DynamicTable.stories.tsx +40 -36
- package/src/components/Table/DynamicTable.tsx +38 -34
- package/src/components/Table/Relations.stories.tsx +281 -0
- package/src/components/Table/RowActionsMenu.tsx +29 -19
- package/src/components/Table/Table.stories.tsx +198 -214
- package/src/components/Table/Table.tsx +47 -363
- package/src/components/Table/TableContent.tsx +421 -0
- package/src/components/Table/TableToolbar.tsx +111 -0
- package/src/components/TableCellEditor/CellValidationMessage.tsx +9 -5
- package/src/components/TableCellEditor/FormCellEditor.tsx +153 -49
- package/src/components/TableCellEditor/TableCellEditor.stories.tsx +40 -79
- package/src/components/TableCellEditor/TableCellEditor.tsx +109 -199
- package/src/components/TableCellEditor/index.ts +1 -0
- package/src/components/index.ts +0 -1
- package/src/components/testing.ts +46 -37
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useAddRow.ts +36 -0
- package/src/hooks/useProjectionModel.ts +39 -0
- package/src/hooks/useTableModel.ts +41 -35
- package/src/index.ts +0 -5
- package/src/model/modal-controller.ts +24 -41
- package/src/model/selection-model.ts +75 -41
- package/src/model/table-model.test.ts +91 -56
- package/src/model/table-model.ts +629 -162
- package/src/model/table-presentation.test.ts +69 -59
- package/src/model/table-presentation.ts +283 -154
- package/src/playwright/TableManager.ts +13 -6
- package/src/playwright/playwright.config.ts +17 -0
- package/src/playwright/smoke.spec.ts +181 -42
- package/src/testing/index.ts +5 -0
- package/src/testing/useTestTableModel.ts +133 -0
- package/src/translations.ts +24 -24
- package/src/types/Table.ts +79 -0
- package/src/types/index.ts +2 -2
- package/src/util/dynamic-table.test.ts +70 -0
- package/src/util/dynamic-table.ts +51 -36
- package/src/util/index.ts +2 -1
- package/src/util/query-ast.ts +22 -0
- package/src/util/schema.ts +4 -4
- package/src/util/sort.ts +90 -0
- package/src/util/table-buttons.ts +28 -4
- package/src/util/table-controls.ts +6 -3
- package/dist/lib/browser/chunk-TL7CKQQV.mjs +0 -27
- package/dist/lib/browser/chunk-TL7CKQQV.mjs.map +0 -7
- package/dist/lib/node/chunk-O2VPBNS5.cjs +0 -50
- package/dist/lib/node/chunk-O2VPBNS5.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -2739
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/types/index.cjs +0 -31
- package/dist/lib/node/types/index.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-GBT6GD4G.mjs +0 -29
- package/dist/lib/node-esm/chunk-GBT6GD4G.mjs.map +0 -7
- package/dist/types/src/components/Table/CreateRefPanel.d.ts +0 -9
- package/dist/types/src/components/Table/CreateRefPanel.d.ts.map +0 -1
- package/dist/types/src/components/Table/relations.stories.d.ts +0 -9
- package/dist/types/src/components/Table/relations.stories.d.ts.map +0 -1
- package/dist/types/src/components/TableCellEditor/extension.d.ts +0 -13
- package/dist/types/src/components/TableCellEditor/extension.d.ts.map +0 -1
- package/dist/types/src/components/TableToolbar/TableToolbar.d.ts +0 -21
- package/dist/types/src/components/TableToolbar/TableToolbar.d.ts.map +0 -1
- package/dist/types/src/components/TableToolbar/index.d.ts +0 -2
- package/dist/types/src/components/TableToolbar/index.d.ts.map +0 -1
- package/dist/types/src/model/table-sorting.d.ts +0 -53
- package/dist/types/src/model/table-sorting.d.ts.map +0 -1
- package/dist/types/src/types/table.d.ts +0 -56
- package/dist/types/src/types/table.d.ts.map +0 -1
- package/dist/types/src/util/table.d.ts +0 -14
- package/dist/types/src/util/table.d.ts.map +0 -1
- package/src/components/Table/CreateRefPanel.tsx +0 -84
- package/src/components/Table/relations.stories.tsx +0 -124
- package/src/components/TableCellEditor/extension.ts +0 -61
- package/src/components/TableToolbar/TableToolbar.tsx +0 -102
- package/src/components/TableToolbar/index.ts +0 -5
- package/src/model/table-sorting.ts +0 -216
- package/src/playwright/playwright.config.cts +0 -18
- package/src/types/table.ts +0 -27
- package/src/util/table.ts +0 -127
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { type Registry } from '@effect-atom/atom-react';
|
|
1
2
|
import { type DxGridPlane, type DxGridPlaneCells, type DxGridPlaneRange } from '@dxos/react-ui-grid';
|
|
2
3
|
import { type SelectionMode } from './selection-model';
|
|
3
|
-
import { type
|
|
4
|
+
import { type TableModel, type TableRow } from './table-model';
|
|
4
5
|
/**
|
|
5
6
|
* Presentation layer for a table component, handling cell rendering and grid display logic.
|
|
6
7
|
* Manages rendering of table cells, headers, selection columns, and action columns across
|
|
@@ -8,15 +9,25 @@ import { type TableRow, type TableModel } from './table-model';
|
|
|
8
9
|
*/
|
|
9
10
|
export declare class TablePresentation<T extends TableRow = TableRow> {
|
|
10
11
|
private readonly model;
|
|
12
|
+
private readonly _registry;
|
|
11
13
|
private readonly _visibleRange;
|
|
12
|
-
|
|
14
|
+
private fieldProjectionCache;
|
|
15
|
+
constructor(registry: Registry.Registry, model: TableModel<T>);
|
|
13
16
|
getCells(range: DxGridPlaneRange, plane: DxGridPlane): DxGridPlaneCells;
|
|
17
|
+
/**
|
|
18
|
+
* Gets a field projection, using cache if available within the current render pass.
|
|
19
|
+
*/
|
|
20
|
+
private getFieldProjection;
|
|
21
|
+
private createDataCell;
|
|
14
22
|
private getMainGridCells;
|
|
23
|
+
private getDraftRowCells;
|
|
15
24
|
private getHeaderCells;
|
|
16
25
|
private getSelectionColumnCells;
|
|
17
26
|
private getActionColumnCells;
|
|
18
27
|
private getSelectAllCell;
|
|
19
28
|
private getNewColumnCell;
|
|
29
|
+
private getDraftActionCells;
|
|
30
|
+
private getDraftIconCells;
|
|
20
31
|
}
|
|
21
32
|
export declare const cellClassesForRowSelection: (selected: boolean, selectionMode: SelectionMode) => string[] | undefined;
|
|
22
33
|
//# sourceMappingURL=table-presentation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-presentation.d.ts","sourceRoot":"","sources":["../../../../src/model/table-presentation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"table-presentation.d.ts","sourceRoot":"","sources":["../../../../src/model/table-presentation.ts"],"names":[],"mappings":"AAIA,OAAO,EAAQ,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAO9D,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EAEtB,MAAM,qBAAqB,CAAC;AAK7B,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE/D;;;;GAIG;AACH,qBAAa,iBAAiB,CAAC,CAAC,SAAS,QAAQ,GAAG,QAAQ;IAOxD,OAAO,CAAC,QAAQ,CAAC,KAAK;IANxB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAoB;IAC9C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAkC;IAChE,OAAO,CAAC,oBAAoB,CAAkF;IAE9G,YACE,QAAQ,EAAE,QAAQ,CAAC,QAAQ,EACV,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,EAOtC;IAEM,QAAQ,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,WAAW,GAAG,gBAAgB,CA8C7E;IAED;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAS1B,OAAO,CAAC,cAAc;IA+JtB,OAAO,CAAC,gBAAgB;IAkBxB,OAAO,CAAC,gBAAgB;IAyCxB,OAAO,CAAC,cAAc;IAwBtB,OAAO,CAAC,uBAAuB;IAgB/B,OAAO,CAAC,oBAAoB;IAgB5B,OAAO,CAAC,gBAAgB;IAyBxB,OAAO,CAAC,gBAAgB;IAexB,OAAO,CAAC,mBAAmB;IA2B3B,OAAO,CAAC,iBAAiB;CAe1B;AAED,eAAO,MAAM,0BAA0B,aAAc,OAAO,iBAAiB,aAAa,yBAezF,CAAC"}
|
|
@@ -10,9 +10,10 @@ export declare class TableManager {
|
|
|
10
10
|
toggleSelectAll(): Promise<void>;
|
|
11
11
|
selection(index: number): Locator;
|
|
12
12
|
sortColumn(index: number, direction: 'ascending' | 'descending'): Promise<void>;
|
|
13
|
+
addRow(): Promise<void>;
|
|
13
14
|
addColumn({ label, format }: {
|
|
14
15
|
label: string;
|
|
15
|
-
format
|
|
16
|
+
format?: string;
|
|
16
17
|
}): Promise<void>;
|
|
17
18
|
}
|
|
18
19
|
//# sourceMappingURL=TableManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableManager.d.ts","sourceRoot":"","sources":["../../../../src/playwright/TableManager.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"TableManager.d.ts","sourceRoot":"","sources":["../../../../src/playwright/TableManager.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAgBvD,qBAAa,YAAY;IAGX,OAAO,CAAC,QAAQ,CAAC,IAAI;IAFjC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IAEtC,YAA6B,IAAI,EAAE,IAAI,EAEtC;IAED,IAAW,IAAI,IAAI,aAAa,CAE/B;IAEY,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGtD;IAEY,SAAS,CAAC,KAAK,SAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAG/C;IAEY,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CAE5C;IAEM,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEvC;IAEY,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,GAAG,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAG3F;IAEY,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAEnC;IAEY,SAAS,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAS3F;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playwright.config.d.ts","sourceRoot":"","sources":["../../../../src/playwright/playwright.config.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":"AAIA,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
import { type Database, type Type } from '@dxos/echo';
|
|
3
|
+
import { type ProjectionModel } from '@dxos/schema';
|
|
4
|
+
import { type TableController } from '../components';
|
|
5
|
+
import { type TableModel, TablePresentation } from '../model';
|
|
6
|
+
import { Table } from '../types';
|
|
7
|
+
export type TestTableModel<T extends Type.AnyObj = Type.AnyObj> = {
|
|
8
|
+
schema: T | undefined;
|
|
9
|
+
table: Table.Table | undefined;
|
|
10
|
+
projection: ProjectionModel | undefined;
|
|
11
|
+
tableRef: RefObject<TableController | null>;
|
|
12
|
+
model: TableModel | undefined;
|
|
13
|
+
presentation: TablePresentation | undefined;
|
|
14
|
+
db: Database.Database | undefined;
|
|
15
|
+
handleInsertRow: () => void;
|
|
16
|
+
handleSaveView: () => void;
|
|
17
|
+
handleDeleteRows: (rowIndex: number, objects: any[]) => void;
|
|
18
|
+
handleDeleteColumn: (fieldId: string) => void;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Custom hook to create and manage a test table model for storybook demonstrations.
|
|
22
|
+
* Provides table data, schema, and handlers for table operations.
|
|
23
|
+
*/
|
|
24
|
+
export declare const useTestTableModel: <T extends Type.AnyObj = Type.AnyObj>() => TestTableModel<T>;
|
|
25
|
+
//# sourceMappingURL=useTestTableModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTestTableModel.d.ts","sourceRoot":"","sources":["../../../../src/testing/useTestTableModel.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,SAAS,EAA4C,MAAM,OAAO,CAAC;AAEjF,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAMtD,OAAO,EAAE,KAAK,eAAe,EAAwB,MAAM,cAAc,CAAC;AAE1E,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,OAAO,EAAE,KAAK,UAAU,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAIjC,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI;IAChE,MAAM,EAAE,CAAC,GAAG,SAAS,CAAC;IACtB,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,SAAS,CAAC;IAC/B,UAAU,EAAE,eAAe,GAAG,SAAS,CAAC;IACxC,QAAQ,EAAE,SAAS,CAAC,eAAe,GAAG,IAAI,CAAC,CAAC;IAC5C,KAAK,EAAE,UAAU,GAAG,SAAS,CAAC;IAC9B,YAAY,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC5C,EAAE,EAAE,QAAQ,CAAC,QAAQ,GAAG,SAAS,CAAC;IAClC,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAC7D,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,OAAK,cAAc,CAAC,CAAC,CA4FzF,CAAC"}
|
|
@@ -1,30 +1,27 @@
|
|
|
1
|
-
export declare const translationKey = "table";
|
|
2
|
-
declare const
|
|
1
|
+
export declare const translationKey = "@dxos/react-ui-table";
|
|
2
|
+
export declare const translations: [{
|
|
3
3
|
readonly 'en-US': {
|
|
4
|
-
readonly table: {
|
|
5
|
-
readonly 'object
|
|
6
|
-
readonly 'create
|
|
7
|
-
readonly 'table
|
|
8
|
-
readonly 'settings
|
|
9
|
-
readonly 'table
|
|
10
|
-
readonly '
|
|
11
|
-
readonly '
|
|
12
|
-
readonly '
|
|
13
|
-
readonly '
|
|
14
|
-
readonly '
|
|
15
|
-
readonly 'column
|
|
16
|
-
readonly 'column
|
|
17
|
-
readonly 'column
|
|
18
|
-
readonly '
|
|
19
|
-
readonly '
|
|
20
|
-
readonly '
|
|
21
|
-
readonly '
|
|
22
|
-
readonly '
|
|
23
|
-
readonly '
|
|
24
|
-
readonly 'create new object label': "Create new object “{{text}}”";
|
|
25
|
-
readonly 'save view label': "Save changes to view";
|
|
4
|
+
readonly "@dxos/react-ui-table": {
|
|
5
|
+
readonly 'object.placeholder': 'New table';
|
|
6
|
+
readonly 'create-object.label': 'Create table';
|
|
7
|
+
readonly 'table-name.placeholder': 'Table name';
|
|
8
|
+
readonly 'settings.title': 'Table settings';
|
|
9
|
+
readonly 'table-schema.label': 'Type';
|
|
10
|
+
readonly 'continue.label': 'Continue';
|
|
11
|
+
readonly 'create-stack-section.label': 'Create table';
|
|
12
|
+
readonly 'add-row.label': 'Add row';
|
|
13
|
+
readonly 'column-action-sort-descending.menu': 'Sort Descending';
|
|
14
|
+
readonly 'column-action-sort-ascending.menu': 'Sort Ascending';
|
|
15
|
+
readonly 'column-action-clear-sorting.menu': 'Clear Sorting';
|
|
16
|
+
readonly 'column-action-settings.menu': 'Column Settings';
|
|
17
|
+
readonly 'column-action-delete.menu': 'Delete Column';
|
|
18
|
+
readonly 'delete-row.label': 'Delete row';
|
|
19
|
+
readonly 'bulk-delete-row.label': 'Delete selected rows';
|
|
20
|
+
readonly 'column-deleted.label': 'Column deleted';
|
|
21
|
+
readonly 'new-column-button.label': 'Create column';
|
|
22
|
+
readonly 'create-new-object.label': 'Create new object \u201C{{text}}\u201D';
|
|
23
|
+
readonly 'save-view.label': 'Save changes to view';
|
|
26
24
|
};
|
|
27
25
|
};
|
|
28
26
|
}];
|
|
29
|
-
export default _default;
|
|
30
27
|
//# sourceMappingURL=translations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,yBAAyB,CAAC;AAErD,eAAO,MAAM,YAAY;;;qBAIjB,oBAAoB,EAAE,WAAW;qBACjC,qBAAqB,EAAE,cAAc;qBACrC,wBAAwB,EAAE,YAAY;qBACtC,gBAAgB,EAAE,gBAAgB;qBAClC,oBAAoB,EAAE,MAAM;qBAC5B,gBAAgB,EAAE,UAAU;qBAC5B,4BAA4B,EAAE,cAAc;qBAC5C,eAAe,EAAE,SAAS;qBAC1B,oCAAoC,EAAE,iBAAiB;qBACvD,mCAAmC,EAAE,gBAAgB;qBACrD,kCAAkC,EAAE,eAAe;qBACnD,6BAA6B,EAAE,iBAAiB;qBAChD,2BAA2B,EAAE,eAAe;qBAC5C,kBAAkB,EAAE,YAAY;qBAChC,uBAAuB,EAAE,sBAAsB;qBAC/C,sBAAsB,EAAE,gBAAgB;qBACxC,yBAAyB,EAAE,eAAe;qBAC1C,yBAAyB,EAAE,wCAA8B;qBACzD,iBAAiB,EAAE,sBAAsB;;;EAIlB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
import { Type } from '@dxos/echo';
|
|
3
|
+
import { View } from '@dxos/echo';
|
|
4
|
+
import { type JsonSchemaType } from '@dxos/echo/internal';
|
|
5
|
+
export declare const Table: Type.Obj<{
|
|
6
|
+
readonly name?: string | undefined;
|
|
7
|
+
readonly view: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & View.View>;
|
|
8
|
+
readonly sizes: {
|
|
9
|
+
[x: string]: number;
|
|
10
|
+
};
|
|
11
|
+
}, Schema.Struct.Fields>;
|
|
12
|
+
export interface Table extends Schema.Schema.Type<typeof Table> {
|
|
13
|
+
}
|
|
14
|
+
type MakeProps = {
|
|
15
|
+
name?: string;
|
|
16
|
+
sizes?: Record<string, number>;
|
|
17
|
+
view: View.View;
|
|
18
|
+
/** Required to auto-size columns. */
|
|
19
|
+
jsonSchema?: JsonSchemaType;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Make a table as a view of a data set.
|
|
23
|
+
*/
|
|
24
|
+
export declare const make: ({ name, sizes, view, jsonSchema }: MakeProps) => Table;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=Table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../src/types/Table.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAoC,IAAI,EAAE,MAAM,YAAY,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAsC,KAAK,cAAc,EAAmB,MAAM,qBAAqB,CAAC;AAG/G,eAAO,MAAM,KAAK;;;;;;wBAqBjB,CAAC;AAEF,MAAM,WAAW,KAAM,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,KAAK,CAAC;CAAG;AAElE,KAAK,SAAS,GAAG;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;IAChB,qCAAqC;IACrC,UAAU,CAAC,EAAE,cAAc,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,IAAI,sCAA4C,SAAS,KAAG,KA6BxE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * as Table from './Table';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC"}
|
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import type
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { type Registry } from '@effect-atom/atom-react';
|
|
2
|
+
import type * as Types from 'effect/Types';
|
|
3
|
+
import { JsonSchema, type QueryAST, Type } from '@dxos/echo';
|
|
4
|
+
import { ProjectionModel, type SchemaPropertyDefinition } from '@dxos/schema';
|
|
5
|
+
import { Table } from '../types';
|
|
5
6
|
type PropertyDisplayProps = {
|
|
6
7
|
size: number;
|
|
7
8
|
title: string;
|
|
8
|
-
sort:
|
|
9
|
+
sort: QueryAST.OrderDirection;
|
|
9
10
|
};
|
|
10
11
|
export type TablePropertyDefinition = SchemaPropertyDefinition & Partial<PropertyDisplayProps>;
|
|
11
12
|
/**
|
|
12
13
|
* @deprecated
|
|
13
14
|
*/
|
|
14
|
-
export declare const getBaseSchema: ({ typename, properties, jsonSchema,
|
|
15
|
+
export declare const getBaseSchema: ({ schema, typename, properties, jsonSchema, }: {
|
|
16
|
+
schema?: Type.AnyEntity;
|
|
15
17
|
typename?: string;
|
|
16
18
|
properties?: TablePropertyDefinition[];
|
|
17
|
-
jsonSchema?:
|
|
18
|
-
schema?: Schema.Schema.AnyNoContext;
|
|
19
|
+
jsonSchema?: Types.DeepMutable<JsonSchema.JsonSchema>;
|
|
19
20
|
}) => {
|
|
20
21
|
typename: string;
|
|
21
|
-
jsonSchema:
|
|
22
|
+
jsonSchema: Types.DeepMutable<JsonSchema.JsonSchema>;
|
|
22
23
|
};
|
|
23
|
-
export declare const makeDynamicTable: ({
|
|
24
|
-
|
|
25
|
-
jsonSchema:
|
|
24
|
+
export declare const makeDynamicTable: ({ registry, jsonSchema, properties, }: {
|
|
25
|
+
registry: Registry.Registry;
|
|
26
|
+
jsonSchema: Types.DeepMutable<JsonSchema.JsonSchema>;
|
|
26
27
|
properties?: TablePropertyDefinition[];
|
|
27
28
|
}) => {
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
projection: ProjectionModel;
|
|
30
|
+
object: Table.Table;
|
|
30
31
|
};
|
|
31
32
|
export {};
|
|
32
33
|
//# sourceMappingURL=dynamic-table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-table.d.ts","sourceRoot":"","sources":["../../../../src/util/dynamic-table.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"dynamic-table.d.ts","sourceRoot":"","sources":["../../../../src/util/dynamic-table.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAU,UAAU,EAAqB,KAAK,QAAQ,EAAO,IAAI,EAAE,MAAM,YAAY,CAAC;AAE7F,OAAO,EACL,eAAe,EACf,KAAK,wBAAwB,EAI9B,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGjC,KAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,CAAC,cAAc,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,wBAAwB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAE/F;;GAEG;AAEH,eAAO,MAAM,aAAa,kDAKvB;IACD,MAAM,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,uBAAuB,EAAE,CAAC;IACvC,UAAU,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;CACvD,KAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,UAAU,CAAC,CAAA;CAW3E,CAAC;AAEF,eAAO,MAAM,gBAAgB,0CAI1B;IACD,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAC5B,UAAU,EAAE,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IACrD,UAAU,CAAC,EAAE,uBAAuB,EAAE,CAAC;CACxC,KAAG;IAAE,UAAU,EAAE,eAAe,CAAC;IAAC,MAAM,EAAE,KAAK,CAAC,KAAK,CAAA;CAoBrD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic-table.test.d.ts","sourceRoot":"","sources":["../../../../src/util/dynamic-table.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/util/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/util/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type QueryAST } from '@dxos/echo';
|
|
2
|
+
/**
|
|
3
|
+
* Extracts order clauses from a query AST.
|
|
4
|
+
* Handles nested structures (options, order, etc.).
|
|
5
|
+
*/
|
|
6
|
+
export declare const extractOrder: (queryAst: QueryAST.Query) => readonly QueryAST.Order[] | undefined;
|
|
7
|
+
//# sourceMappingURL=query-ast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-ast.d.ts","sourceRoot":"","sources":["../../../../src/util/query-ast.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C;;;GAGG;AACH,eAAO,MAAM,YAAY,aAAc,QAAQ,CAAC,KAAK,KAAG,SAAS,QAAQ,CAAC,KAAK,EAAE,GAAG,SAWnF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/util/schema.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/util/schema.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,YAAY,UACvD,CAAC,SACF,MAAM,EAAE,KACd,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,SAgBpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signals.d.ts","sourceRoot":"","sources":["../../../../src/util/signals.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"signals.d.ts","sourceRoot":"","sources":["../../../../src/util/signals.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,CAAC,SAAS,CAAC,MAAU,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Format, type QueryAST } from '@dxos/echo';
|
|
2
|
+
/**
|
|
3
|
+
* Gets a normalized sort value for a given value and format.
|
|
4
|
+
* This ensures consistent sorting behavior across different data types.
|
|
5
|
+
*/
|
|
6
|
+
export declare const getSortValue: (value: any, format: Format.TypeFormat) => any;
|
|
7
|
+
/**
|
|
8
|
+
* Compares two values for sorting based on the field format.
|
|
9
|
+
* Handles dates, numbers, and strings appropriately.
|
|
10
|
+
*/
|
|
11
|
+
export declare const compareValues: (aValue: any, bValue: any, format: Format.TypeFormat, direction: QueryAST.OrderDirection) => number;
|
|
12
|
+
//# sourceMappingURL=sort.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../../../../src/util/sort.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEnD;;;GAGG;AACH,eAAO,MAAM,YAAY,UAAW,GAAG,UAAU,MAAM,CAAC,UAAU,KAAG,GA2CpE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,WAChB,GAAG,UACH,GAAG,UACH,MAAM,CAAC,UAAU,aACd,QAAQ,CAAC,cAAc,KACjC,MAyBF,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type TableButton = 'columnSettings' | 'rowMenu' | 'newColumn' | 'referencedCell' | 'sort';
|
|
1
|
+
export type TableButton = 'columnSettings' | 'rowMenu' | 'newColumn' | 'referencedCell' | 'sort' | 'saveDraftRow';
|
|
2
2
|
export declare const BUTTON_IDENTIFIERS: {
|
|
3
3
|
[K in TableButton]: string;
|
|
4
4
|
};
|
|
@@ -11,6 +11,10 @@ type ButtonData = {
|
|
|
11
11
|
} | {
|
|
12
12
|
type: 'rowMenu';
|
|
13
13
|
rowIndex: number;
|
|
14
|
+
} | {
|
|
15
|
+
type: 'saveDraftRow';
|
|
16
|
+
rowIndex: number;
|
|
17
|
+
disabled?: boolean;
|
|
14
18
|
} | {
|
|
15
19
|
type: 'sort';
|
|
16
20
|
fieldId: string;
|
|
@@ -19,42 +23,52 @@ type ButtonData = {
|
|
|
19
23
|
export declare const tableButtons: {
|
|
20
24
|
readonly addColumn: {
|
|
21
25
|
readonly attr: string;
|
|
22
|
-
readonly icon:
|
|
26
|
+
readonly icon: 'ph--plus--regular';
|
|
23
27
|
readonly render: ({ disabled }: Omit<Extract<ButtonData, {
|
|
24
|
-
type:
|
|
25
|
-
}>,
|
|
28
|
+
type: 'newColumn';
|
|
29
|
+
}>, 'type'>) => string;
|
|
26
30
|
readonly getData: (_el: HTMLElement) => Extract<ButtonData, {
|
|
27
|
-
type:
|
|
31
|
+
type: 'newColumn';
|
|
28
32
|
}>;
|
|
29
33
|
};
|
|
30
34
|
readonly columnSettings: {
|
|
31
35
|
readonly attr: string;
|
|
32
|
-
readonly icon:
|
|
36
|
+
readonly icon: 'ph--caret-down--regular';
|
|
33
37
|
readonly render: ({ fieldId }: Omit<Extract<ButtonData, {
|
|
34
|
-
type:
|
|
35
|
-
}>,
|
|
38
|
+
type: 'columnSettings';
|
|
39
|
+
}>, 'type'>) => string;
|
|
36
40
|
readonly getData: (el: HTMLElement) => Extract<ButtonData, {
|
|
37
|
-
type:
|
|
41
|
+
type: 'columnSettings';
|
|
38
42
|
}>;
|
|
39
43
|
};
|
|
40
44
|
readonly rowMenu: {
|
|
41
45
|
readonly attr: string;
|
|
42
|
-
readonly icon:
|
|
46
|
+
readonly icon: 'ph--dots-three--regular';
|
|
43
47
|
readonly render: ({ rowIndex }: Omit<Extract<ButtonData, {
|
|
44
|
-
type:
|
|
45
|
-
}>,
|
|
48
|
+
type: 'rowMenu';
|
|
49
|
+
}>, 'type'>) => string;
|
|
50
|
+
readonly getData: (el: HTMLElement) => Extract<ButtonData, {
|
|
51
|
+
type: 'rowMenu';
|
|
52
|
+
}>;
|
|
53
|
+
};
|
|
54
|
+
readonly saveDraftRow: {
|
|
55
|
+
readonly attr: string;
|
|
56
|
+
readonly icon: 'ph--floppy-disk--regular';
|
|
57
|
+
readonly render: ({ rowIndex, disabled }: Omit<Extract<ButtonData, {
|
|
58
|
+
type: 'saveDraftRow';
|
|
59
|
+
}>, 'type'>) => string;
|
|
46
60
|
readonly getData: (el: HTMLElement) => Extract<ButtonData, {
|
|
47
|
-
type:
|
|
61
|
+
type: 'saveDraftRow';
|
|
48
62
|
}>;
|
|
49
63
|
};
|
|
50
64
|
readonly sort: {
|
|
51
65
|
readonly attr: string;
|
|
52
|
-
readonly icon:
|
|
66
|
+
readonly icon: 'ph--sort-ascending--regular';
|
|
53
67
|
readonly render: ({ fieldId, direction }: Omit<Extract<ButtonData, {
|
|
54
|
-
type:
|
|
55
|
-
}>,
|
|
68
|
+
type: 'sort';
|
|
69
|
+
}>, 'type'>) => string;
|
|
56
70
|
readonly getData: (el: HTMLElement) => Extract<ButtonData, {
|
|
57
|
-
type:
|
|
71
|
+
type: 'sort';
|
|
58
72
|
}>;
|
|
59
73
|
};
|
|
60
74
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-buttons.d.ts","sourceRoot":"","sources":["../../../../src/util/table-buttons.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,WAAW,GAAG,gBAAgB,GAAG,SAAS,GAAG,WAAW,GAAG,gBAAgB,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"table-buttons.d.ts","sourceRoot":"","sources":["../../../../src/util/table-buttons.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,WAAW,GAAG,gBAAgB,GAAG,SAAS,GAAG,WAAW,GAAG,gBAAgB,GAAG,MAAM,GAAG,cAAc,CAAC;AAElH,eAAO,MAAM,kBAAkB,EAAE;KAAG,CAAC,IAAI,WAAW,GAAG,MAAM;CAOnD,CAAC;AAEX,KAAK,UAAU,GACX;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC3C;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,GACzC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,GAC9D;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;CAAE,CAAC;AA2HlE,eAAO,MAAM,YAAY;aACvB,SAAS;;uBAlGH,mBAAmB;wCACF,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YAAE,IAAI,EAAE,WAAW,CAAA;SAAE,CAAC,EAAE,MAAM,CAAC;gCAShE,WAAW,KAAG,OAAO,CAAC,UAAU,EAAE;YAAE,IAAI,EAAE,WAAW,CAAA;SAAE,CAAC;;aAyFvE,cAAc;;uBApFR,yBAAyB;uCACT,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YAAE,IAAI,EAAE,gBAAgB,CAAA;SAAE,CAAC,EAAE,MAAM,CAAC;+BAWrE,WAAW,KAAG,OAAO,CAAC,UAAU,EAAE;YAAE,IAAI,EAAE,gBAAgB,CAAA;SAAE,CAAC;;aAyE3E,OAAO;;uBAjED,yBAAyB;wCACR,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YAAE,IAAI,EAAE,SAAS,CAAA;SAAE,CAAC,EAAE,MAAM,CAAC;+BAU/D,WAAW,KAAG,OAAO,CAAC,UAAU,EAAE;YAAE,IAAI,EAAE,SAAS,CAAA;SAAE,CAAC;;aAuDpE,YAAY;;uBAvBN,0BAA0B;kDACC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YAAE,IAAI,EAAE,cAAc,CAAA;SAAE,CAAC,EAAE,MAAM,CAAC;+BAY9E,WAAW,KAAG,OAAO,CAAC,UAAU,EAAE;YAAE,IAAI,EAAE,cAAc,CAAA;SAAE,CAAC;;aAWzE,IAAI;;uBAhDE,6BAA6B;kDACF,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YAAE,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,EAAE,MAAM,CAAC;+BActE,WAAW,KAAG,OAAO,CAAC,UAAU,EAAE;YAAE,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC;;CAkCzD,CAAC"}
|
|
@@ -19,8 +19,8 @@ export type RenderSwitchProps = CommonRenderProps & Omit<Extract<ControlData, {
|
|
|
19
19
|
type: 'switch';
|
|
20
20
|
}>, 'type'>;
|
|
21
21
|
export declare const CONTROL_IDENTIFIERS: {
|
|
22
|
-
readonly checkbox:
|
|
23
|
-
readonly switch:
|
|
22
|
+
readonly checkbox: 'data-table-checkbox';
|
|
23
|
+
readonly switch: 'data-table-switch';
|
|
24
24
|
};
|
|
25
25
|
export declare const CheckboxStory: ({ rowIndex, header, checked, disabled, }: RenderCheckboxProps) => string;
|
|
26
26
|
export declare const SwitchStory: ({ colIndex, rowIndex, checked, disabled }: RenderSwitchProps) => string;
|
|
@@ -29,14 +29,14 @@ export declare const tableControls: {
|
|
|
29
29
|
readonly attr: "data-table-checkbox";
|
|
30
30
|
readonly render: ({ rowIndex, header, checked, disabled, }: RenderCheckboxProps) => string;
|
|
31
31
|
readonly getData: (el: HTMLElement) => Extract<ControlData, {
|
|
32
|
-
type:
|
|
32
|
+
type: 'checkbox';
|
|
33
33
|
}>;
|
|
34
34
|
};
|
|
35
35
|
readonly switch: {
|
|
36
36
|
readonly attr: "data-table-switch";
|
|
37
37
|
readonly render: ({ colIndex, rowIndex, checked, disabled }: RenderSwitchProps) => string;
|
|
38
38
|
readonly getData: (el: HTMLElement) => Extract<ControlData, {
|
|
39
|
-
type:
|
|
39
|
+
type: 'switch';
|
|
40
40
|
}>;
|
|
41
41
|
};
|
|
42
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-controls.d.ts","sourceRoot":"","sources":["../../../../src/util/table-controls.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"table-controls.d.ts","sourceRoot":"","sources":["../../../../src/util/table-controls.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,QAAQ,CAAC;AAEjD,MAAM,MAAM,WAAW,GACnB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GACxD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3D,KAAK,iBAAiB,GAAG;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC,EAAE,MAAM,CAAC,CAAC;AAC/G,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC,EAAE,MAAM,CAAC,CAAC;AAE3G,eAAO,MAAM,mBAAmB;aAC9B,QAAQ,EAAE,qBAAqB;aAC/B,MAAM,EAAE,mBAAmB;CACnB,CAAC;AAwBX,eAAO,MAAM,aAAa,6CAKvB,mBAAmB,KAAG,MAQxB,CAAC;AAEF,eAAO,MAAM,WAAW,8CAA+D,iBAAiB,KAAG,MAS1G,CAAC;AAEF,eAAO,MAAM,aAAa;aACxB,QAAQ;iBACN,IAAI;iBACJ,MAAM,6CAxBP,mBAAmB,KAAG,MAAM;iBAyB3B,OAAO,OAAO,WAAW,KAAG,OAAO,CAAC,WAAW,EAAE;YAAE,IAAI,EAAE,UAAU,CAAA;SAAE,CAAC;;aAMxE,MAAM;iBACJ,IAAI;iBACJ,MAAM,8CAvB6E,iBAAiB,KAAG,MAAM;iBAwB7G,OAAO,OAAO,WAAW,KAAG,OAAO,CAAC,WAAW,EAAE;YAAE,IAAI,EAAE,QAAQ,CAAA;SAAE,CAAC;;CAM9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../../../src/util/tag.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAA6B,CAAC;AAE5D;;;;GAIG;AACH,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../../../src/util/tag.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAA6B,CAAC;AAE5D;;;;GAIG;AACH,eAAO,MAAM,aAAa,UAAW,OAAO,KAAG,MAAM,EAAE,GAAG,SAgBzD,CAAC"}
|