@dxos/react-ui-table 0.8.3 → 0.8.4-main.1068cf700f
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-GTGYBRJA.mjs +1748 -0
- package/dist/lib/browser/chunk-GTGYBRJA.mjs.map +7 -0
- package/dist/lib/browser/chunk-OZBLY7XM.mjs +76 -0
- package/dist/lib/browser/chunk-OZBLY7XM.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1156 -2508
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +114 -0
- package/dist/lib/browser/testing/index.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +3 -5
- package/dist/lib/node-esm/chunk-DPNSZHU5.mjs +1750 -0
- package/dist/lib/node-esm/chunk-DPNSZHU5.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-WNZSKIRF.mjs +77 -0
- package/dist/lib/node-esm/chunk-WNZSKIRF.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +1156 -2508
- 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 +115 -0
- package/dist/lib/node-esm/testing/index.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +3 -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 +37 -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 +13 -9
- package/dist/types/src/components/Table/Table.d.ts.map +1 -1
- package/dist/types/src/components/Table/Table.stories.d.ts +108 -4
- package/dist/types/src/components/Table/Table.stories.d.ts.map +1 -1
- 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 +39 -4
- 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/TableToolbar/TableToolbar.d.ts +4 -4
- package/dist/types/src/components/TableToolbar/TableToolbar.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 +1 -2
- 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 +17 -7
- package/dist/types/src/model/selection-model.d.ts.map +1 -1
- package/dist/types/src/model/table-model.d.ts +149 -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 +5 -6
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Table.d.ts +31 -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/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 +15 -1
- package/dist/types/src/util/table-buttons.d.ts.map +1 -1
- package/dist/types/src/util/table-controls.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +69 -56
- package/src/components/Table/ColumnActionsMenu.tsx +11 -7
- package/src/components/Table/ColumnSettings.tsx +16 -12
- package/src/components/Table/DynamicTable.stories.tsx +29 -25
- package/src/components/Table/DynamicTable.tsx +34 -22
- package/src/components/Table/Relations.stories.tsx +237 -0
- package/src/components/Table/RowActionsMenu.tsx +26 -17
- package/src/components/Table/Table.stories.tsx +171 -194
- package/src/components/Table/Table.tsx +364 -286
- package/src/components/TableCellEditor/CellValidationMessage.tsx +8 -3
- package/src/components/TableCellEditor/FormCellEditor.tsx +146 -49
- package/src/components/TableCellEditor/TableCellEditor.stories.tsx +36 -76
- package/src/components/TableCellEditor/TableCellEditor.tsx +106 -198
- package/src/components/TableCellEditor/index.ts +1 -0
- package/src/components/TableToolbar/TableToolbar.tsx +49 -33
- package/src/components/testing.ts +41 -32
- 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 +1 -2
- package/src/model/modal-controller.ts +24 -41
- package/src/model/selection-model.ts +75 -41
- package/src/model/table-model.test.ts +92 -56
- package/src/model/table-model.ts +628 -162
- package/src/model/table-presentation.test.ts +70 -59
- package/src/model/table-presentation.ts +278 -149
- package/src/playwright/TableManager.ts +13 -6
- package/src/playwright/playwright.config.ts +17 -0
- package/src/playwright/smoke.spec.ts +180 -41
- package/src/testing/index.ts +5 -0
- package/src/testing/useTestTableModel.ts +133 -0
- package/src/translations.ts +7 -5
- package/src/types/Table.ts +90 -0
- package/src/types/index.ts +2 -2
- package/src/util/dynamic-table.test.ts +70 -0
- package/src/util/dynamic-table.ts +50 -36
- package/src/util/index.ts +2 -1
- package/src/util/query-ast.ts +19 -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 +4 -1
- 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/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/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,5 +1,5 @@
|
|
|
1
|
+
import { Atom, type Registry } from '@effect-atom/atom-react';
|
|
1
2
|
import { type RefObject } from 'react';
|
|
2
|
-
import { type Live } from '@dxos/live-object';
|
|
3
3
|
export type ColumnSettingsMode = {
|
|
4
4
|
type: 'create';
|
|
5
5
|
} | {
|
|
@@ -16,11 +16,6 @@ export type ModalState = {
|
|
|
16
16
|
type: 'refPanel';
|
|
17
17
|
targetId: string;
|
|
18
18
|
typename: string;
|
|
19
|
-
} | {
|
|
20
|
-
type: 'createRefPanel';
|
|
21
|
-
typename: string;
|
|
22
|
-
initialValues?: Record<string, string>;
|
|
23
|
-
onCreate?: (obj: Live<any>) => void;
|
|
24
19
|
} | {
|
|
25
20
|
type: 'columnSettings';
|
|
26
21
|
mode: ColumnSettingsMode;
|
|
@@ -28,9 +23,12 @@ export type ModalState = {
|
|
|
28
23
|
type: 'closed';
|
|
29
24
|
};
|
|
30
25
|
export declare class ModalController {
|
|
26
|
+
private readonly _registry;
|
|
31
27
|
private readonly _state;
|
|
32
28
|
private readonly _triggerRef;
|
|
33
|
-
|
|
29
|
+
constructor(registry: Registry.Registry);
|
|
30
|
+
get state(): Atom.Atom<ModalState>;
|
|
31
|
+
get stateValue(): ModalState;
|
|
34
32
|
get trigger(): RefObject<HTMLButtonElement>;
|
|
35
33
|
setTrigger: (trigger: HTMLElement) => void;
|
|
36
34
|
showRowMenu: (rowIndex: number) => void;
|
|
@@ -38,7 +36,6 @@ export declare class ModalController {
|
|
|
38
36
|
showColumnCreator: () => void;
|
|
39
37
|
showReferencePanel: (targetId: string, schemaId: string) => void;
|
|
40
38
|
openColumnSettings: () => void;
|
|
41
|
-
openCreateRef: (typename: string, anchorCell: Element | null, initialValues?: Record<string, string>, onCreate?: (obj: Live<any>) => void) => void;
|
|
42
39
|
close: () => void;
|
|
43
40
|
}
|
|
44
41
|
//# sourceMappingURL=modal-controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal-controller.d.ts","sourceRoot":"","sources":["../../../../src/model/modal-controller.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"modal-controller.d.ts","sourceRoot":"","sources":["../../../../src/model/modal-controller.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,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
|
|
1
|
-
import { type
|
|
1
|
+
import { Atom, type Registry } from '@effect-atom/atom-react';
|
|
2
2
|
import { Resource } from '@dxos/context';
|
|
3
3
|
import { type TableRow } from './table-model';
|
|
4
4
|
export type SelectionMode = 'single' | 'multiple';
|
|
5
5
|
export declare class SelectionModel<T extends TableRow> extends Resource {
|
|
6
|
+
private readonly _registry;
|
|
6
7
|
private readonly _rows;
|
|
7
|
-
private readonly _selectionMode;
|
|
8
|
-
private readonly _onSelectionChanged?;
|
|
9
8
|
private readonly _selection;
|
|
10
9
|
private readonly _validSelectedIds;
|
|
11
10
|
private readonly _hasSelection;
|
|
12
11
|
private readonly _allSelected;
|
|
13
|
-
|
|
12
|
+
private readonly _selectionMode;
|
|
13
|
+
private readonly _onSelectionChanged?;
|
|
14
|
+
constructor(registry: Registry.Registry, rows: Atom.Atom<T[]>, selectionMode: SelectionMode, initialSelection: string[], onSelectionChanged?: () => void);
|
|
14
15
|
protected _open(): Promise<void>;
|
|
15
|
-
|
|
16
|
-
get
|
|
17
|
-
|
|
16
|
+
/** Get the selection atom for reactive access. */
|
|
17
|
+
get selectionAtom(): Atom.Atom<Set<string>>;
|
|
18
|
+
/** Get the current selection value. */
|
|
19
|
+
get selection(): Set<string>;
|
|
20
|
+
/** Get the hasSelection atom for reactive access. */
|
|
21
|
+
get hasSelectionAtom(): Atom.Atom<boolean>;
|
|
22
|
+
/** Check if there is any selection. */
|
|
23
|
+
get hasSelection(): boolean;
|
|
24
|
+
/** Get the allRowsSelected atom for reactive access. */
|
|
25
|
+
get allRowsSelectedAtom(): Atom.Atom<boolean>;
|
|
26
|
+
/** Check if all rows are selected. */
|
|
27
|
+
get allRowsSelected(): boolean;
|
|
18
28
|
get selectionMode(): SelectionMode;
|
|
19
29
|
getSelectedRows: () => T[];
|
|
20
30
|
isRowIndexSelected: (rowIndex: number) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selection-model.d.ts","sourceRoot":"","sources":["../../../../src/model/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AAgB,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAEhD;IAED,uCAAuC;IACvC,IAAW,YAAY,IAAI,OAAO,CAEjC;IAED,wDAAwD;IACxD,IAAW,mBAAmB,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAEnD;IAED,sCAAsC;IACtC,IAAW,eAAe,IAAI,OAAO,CAEpC;IAED,IAAW,aAAa,IAAI,aAAa,CAExC;IAEM,eAAe,QAAO,CAAC,EAAE,CAG9B;IAEK,kBAAkB,GAAI,UAAU,MAAM,KAAG,OAAO,CAGrD;IAEK,gBAAgB,GAAI,QAAQ,CAAC,KAAG,OAAO,CAE5C;IAMK,0BAA0B,GAAI,UAAU,MAAM,KAAG,IAAI,CAe1D;IAEK,YAAY,GAAI,MAAM,KAAK,GAAG,MAAM,KAAG,IAAI,CAWhD;CACH"}
|
|
@@ -1,23 +1,57 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type Space } from '@dxos/client/echo';
|
|
1
|
+
import { Atom, type Registry } from '@effect-atom/atom-react';
|
|
3
2
|
import { Resource } from '@dxos/context';
|
|
4
|
-
import { type
|
|
3
|
+
import { type Database, type QueryAST } from '@dxos/echo';
|
|
4
|
+
import { type JsonProp, type JsonSchemaType } from '@dxos/echo/internal';
|
|
5
|
+
import { type Label } from '@dxos/react-ui';
|
|
5
6
|
import { type DxGridAxisMeta, type DxGridPlanePosition, type DxGridPosition } from '@dxos/react-ui-grid';
|
|
6
|
-
import { type
|
|
7
|
+
import { type ProjectionModel, type ValidationError, type View } from '@dxos/schema';
|
|
8
|
+
import { type Table } from '../types';
|
|
9
|
+
/**
|
|
10
|
+
* Field sort configuration.
|
|
11
|
+
*/
|
|
12
|
+
export type FieldSortType = {
|
|
13
|
+
fieldId: string;
|
|
14
|
+
direction: QueryAST.OrderDirection;
|
|
15
|
+
};
|
|
7
16
|
import { type SelectionMode, SelectionModel } from './selection-model';
|
|
8
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Callback type for wrapping mutations in Obj.change().
|
|
19
|
+
* Contains separate callbacks for table object and row mutations.
|
|
20
|
+
*/
|
|
21
|
+
export type TableChangeCallback<T extends TableRow> = {
|
|
22
|
+
/** Callback to wrap table object mutations. */
|
|
23
|
+
table: (mutate: (mutableTable: Table.Table) => void) => void;
|
|
24
|
+
/** Callback to wrap row mutations. */
|
|
25
|
+
row: (row: T, mutate: (mutableRow: T) => void) => void;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Creates a change callback for ECHO-backed table and rows.
|
|
29
|
+
* Use this when the table and rows are stored in the ECHO database.
|
|
30
|
+
*/
|
|
31
|
+
export declare const createEchoChangeCallback: <T extends TableRow>(table: Table.Table) => TableChangeCallback<T>;
|
|
32
|
+
/**
|
|
33
|
+
* Creates a change callback that directly mutates objects without wrapping.
|
|
34
|
+
* Use this for plain JavaScript objects (tests, non-ECHO scenarios).
|
|
35
|
+
*/
|
|
36
|
+
export declare const createDirectChangeCallback: <T extends TableRow>(table: Table.Table) => TableChangeCallback<T>;
|
|
37
|
+
export type TableCellType = 'standard' | 'draft' | 'header';
|
|
9
38
|
export type ValidationResult = {
|
|
10
39
|
valid: true;
|
|
11
40
|
} | {
|
|
12
41
|
valid: false;
|
|
13
42
|
error: string;
|
|
14
43
|
};
|
|
44
|
+
export type DraftRow<T extends TableRow = TableRow> = {
|
|
45
|
+
data: T;
|
|
46
|
+
valid: boolean;
|
|
47
|
+
validationErrors: ValidationError[];
|
|
48
|
+
};
|
|
15
49
|
export type TableRow = Record<JsonProp, any> & {
|
|
16
50
|
id: string;
|
|
17
51
|
};
|
|
18
52
|
export type TableRowAction = {
|
|
19
53
|
id: string;
|
|
20
|
-
|
|
54
|
+
label: Label;
|
|
21
55
|
};
|
|
22
56
|
export type TableFeatures = {
|
|
23
57
|
selection: {
|
|
@@ -27,87 +61,170 @@ export type TableFeatures = {
|
|
|
27
61
|
dataEditable: boolean;
|
|
28
62
|
schemaEditable: boolean;
|
|
29
63
|
};
|
|
64
|
+
export type InsertRowResult = 'draft' | 'final';
|
|
30
65
|
export type TableModelProps<T extends TableRow = TableRow> = {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
66
|
+
registry: Registry.Registry;
|
|
67
|
+
object: Table.Table;
|
|
68
|
+
projection: ProjectionModel;
|
|
69
|
+
db?: Database.Database;
|
|
70
|
+
/**
|
|
71
|
+
* Callbacks to wrap mutations in Obj.change().
|
|
72
|
+
* Use createEchoChangeCallback() for ECHO-backed objects or createDirectChangeCallback() for plain objects.
|
|
73
|
+
*/
|
|
74
|
+
change?: TableChangeCallback<T>;
|
|
35
75
|
features?: Partial<TableFeatures>;
|
|
36
|
-
|
|
76
|
+
initialSelection?: string[];
|
|
37
77
|
pinnedRows?: {
|
|
38
78
|
top: number[];
|
|
39
79
|
bottom: number[];
|
|
40
80
|
};
|
|
41
81
|
rowActions?: TableRowAction[];
|
|
42
|
-
|
|
82
|
+
onResolveSchema?: (typename: string) => Promise<JsonSchemaType>;
|
|
83
|
+
onInsertRow?: (data?: any) => InsertRowResult;
|
|
43
84
|
onDeleteRows?: (index: number, obj: T[]) => void;
|
|
44
|
-
|
|
85
|
+
onColumnDelete?: (fieldId: string) => void;
|
|
45
86
|
onCellUpdate?: (cell: DxGridPosition) => void;
|
|
46
87
|
onRowOrderChange?: () => void;
|
|
47
88
|
onRowAction?: (actionId: string, data: T) => void;
|
|
48
89
|
};
|
|
49
90
|
export declare class TableModel<T extends TableRow = TableRow> extends Resource {
|
|
50
|
-
private readonly
|
|
51
|
-
private readonly
|
|
52
|
-
private readonly _view;
|
|
91
|
+
private readonly _registry;
|
|
92
|
+
private readonly _object;
|
|
53
93
|
private readonly _projection;
|
|
94
|
+
private readonly _db?;
|
|
95
|
+
private readonly _change;
|
|
54
96
|
private readonly _visibleRange;
|
|
55
97
|
private readonly _onInsertRow?;
|
|
56
98
|
private readonly _onDeleteRows?;
|
|
57
|
-
private readonly
|
|
99
|
+
private readonly _onColumnDelete?;
|
|
58
100
|
private readonly _onCellUpdate?;
|
|
59
101
|
private readonly _onRowOrderChange?;
|
|
60
102
|
private readonly _onRowAction?;
|
|
61
103
|
private readonly _rowActions;
|
|
62
104
|
private readonly _features;
|
|
63
105
|
private readonly _rows;
|
|
106
|
+
private readonly _draftRows;
|
|
107
|
+
private readonly _inMemorySort;
|
|
108
|
+
private readonly _persistedSort;
|
|
64
109
|
private readonly _sorting;
|
|
110
|
+
private readonly _sortedRows;
|
|
111
|
+
private readonly _viewDirty;
|
|
65
112
|
private _pinnedRows;
|
|
66
113
|
private _selection;
|
|
67
114
|
private _columnMeta?;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
get
|
|
71
|
-
get view():
|
|
72
|
-
get
|
|
73
|
-
get
|
|
115
|
+
private readonly _cellUpdateCounter;
|
|
116
|
+
constructor({ registry, object, projection, db, change, features, initialSelection, pinnedRows, rowActions, onCellUpdate, onColumnDelete, onDeleteRows, onInsertRow, onRowOrderChange, onRowAction, }: TableModelProps<T>);
|
|
117
|
+
get id(): string;
|
|
118
|
+
get view(): View.View;
|
|
119
|
+
get table(): Table.Table;
|
|
120
|
+
get projection(): ProjectionModel;
|
|
121
|
+
get db(): Database.Database | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* Atom for reactive access to rows with in-memory sorting applied.
|
|
124
|
+
*/
|
|
125
|
+
get rows(): Atom.Atom<T[]>;
|
|
126
|
+
/**
|
|
127
|
+
* Gets rows with in-memory sorting applied.
|
|
128
|
+
* In-memory sort is local to this instance until saved.
|
|
129
|
+
*/
|
|
130
|
+
getRows(): T[];
|
|
131
|
+
/** Atom for reactive access to cell changes. */
|
|
132
|
+
get cellUpdate(): Atom.Atom<number>;
|
|
133
|
+
/**
|
|
134
|
+
* Change a row using the configured change callback.
|
|
135
|
+
* Use this instead of directly mutating to ensure consistent mutation handling.
|
|
136
|
+
*/
|
|
137
|
+
changeRow(row: T, mutate: (mutableRow: T) => void): void;
|
|
74
138
|
get features(): TableFeatures;
|
|
75
139
|
/**
|
|
76
|
-
*
|
|
140
|
+
* Gets the current sort state.
|
|
141
|
+
* Priority: in-memory sort (local changes) > persisted sort (from query AST).
|
|
77
142
|
*/
|
|
78
|
-
|
|
143
|
+
getSorting(): FieldSortType | undefined;
|
|
79
144
|
/**
|
|
80
145
|
* Gets the row data at the specified display index.
|
|
81
146
|
*/
|
|
82
147
|
getRowAt(displayIndex: number): T | undefined;
|
|
83
148
|
get pinnedRows(): NonNullable<TableModelProps<T>['pinnedRows']>;
|
|
84
|
-
get columnMeta():
|
|
149
|
+
get columnMeta(): Atom.Atom<DxGridAxisMeta>;
|
|
85
150
|
get selection(): SelectionModel<T>;
|
|
86
|
-
/** @reactive */
|
|
87
|
-
get isViewDirty(): boolean;
|
|
88
151
|
get rowActions(): TableRowAction[];
|
|
89
152
|
protected _open(): Promise<void>;
|
|
90
153
|
private initializeColumnMeta;
|
|
91
154
|
private initializeEffects;
|
|
92
155
|
setRows: (obj: T[]) => void;
|
|
93
156
|
getRowCount: () => number;
|
|
157
|
+
getDraftRowCount(): number;
|
|
158
|
+
/** Atom for reactive access to draft rows. */
|
|
159
|
+
get draftRows(): Atom.Atom<DraftRow<T>[]>;
|
|
160
|
+
/** Gets the current draft rows. */
|
|
161
|
+
getDraftRows(): DraftRow<T>[];
|
|
162
|
+
/**
|
|
163
|
+
* Checks if a specific field path has validation errors for a given draft row.
|
|
164
|
+
* @param draftRowIndex - The index of the draft row to check
|
|
165
|
+
* @param fieldPath - The path of the field to check for validation errors
|
|
166
|
+
* @returns true if the field has validation errors, false otherwise
|
|
167
|
+
*/
|
|
168
|
+
hasDraftRowValidationError(draftRowIndex: number, fieldPath: string): boolean;
|
|
94
169
|
getColumnCount: () => number;
|
|
95
|
-
insertRow: (
|
|
170
|
+
insertRow: () => InsertRowResult;
|
|
171
|
+
private createDraftRow;
|
|
172
|
+
private validateDraftRow;
|
|
173
|
+
private validateDraftRowData;
|
|
174
|
+
commitDraftRow: (draftRowIndex: number) => boolean;
|
|
96
175
|
deleteRow: (rowIndex: number) => void;
|
|
97
176
|
handleRowAction: (actionId: string, rowIndex: number) => void;
|
|
98
|
-
getCellData: (
|
|
99
|
-
validateCellData: ({ col, row }:
|
|
100
|
-
setCellData: (
|
|
177
|
+
getCellData: (cell: DxGridPosition) => any;
|
|
178
|
+
validateCellData: ({ col, row, plane }: DxGridPosition, value: any) => Promise<ValidationResult>;
|
|
179
|
+
setCellData: (cell: DxGridPosition, value: any) => void;
|
|
101
180
|
/**
|
|
102
181
|
* Updates a cell's value using a transform function.
|
|
103
182
|
* @param {DxGridPlanePosition} position - The position of the cell to update.
|
|
104
183
|
* @param {(value: any) => any} update - A function that takes the current value and returns the updated value.
|
|
105
184
|
*/
|
|
106
185
|
updateCellData({ col, row }: DxGridPlanePosition, update: (value: any) => any): void;
|
|
186
|
+
/**
|
|
187
|
+
* Gets the domain-appropriate cell type for a given cell position.
|
|
188
|
+
* This abstracts away the low-level grid plane concepts and provides domain-specific types.
|
|
189
|
+
* @param cell - The cell position to classify
|
|
190
|
+
* @returns The domain-appropriate cell type
|
|
191
|
+
*/
|
|
192
|
+
getCellType(cell: DxGridPosition): TableCellType;
|
|
193
|
+
/**
|
|
194
|
+
* Convenience method to check if a cell is a draft cell.
|
|
195
|
+
* @param cell - The cell position to check
|
|
196
|
+
* @returns true if the cell is a draft cell, false otherwise
|
|
197
|
+
*/
|
|
198
|
+
isDraftCell(cell: DxGridPosition): boolean;
|
|
107
199
|
deleteColumn(fieldId: string): void;
|
|
108
200
|
setColumnWidth(columnIndex: number, width: number): void;
|
|
109
201
|
pinRow(rowIndex: number, side: 'top' | 'bottom'): void;
|
|
110
202
|
unpinRow(rowIndex: number): void;
|
|
203
|
+
/**
|
|
204
|
+
* Sets the sort order for a field in-memory (local to this instance).
|
|
205
|
+
* Use saveView() to persist the sort to the view query.
|
|
206
|
+
*/
|
|
207
|
+
setSort(fieldId: string, direction: QueryAST.OrderDirection): void;
|
|
208
|
+
/**
|
|
209
|
+
* Toggles the sort direction for a field in-memory.
|
|
210
|
+
*/
|
|
211
|
+
toggleSort(fieldId: string): void;
|
|
212
|
+
/**
|
|
213
|
+
* Clears the in-memory sort order.
|
|
214
|
+
*/
|
|
215
|
+
clearSort(): void;
|
|
216
|
+
/**
|
|
217
|
+
* Saves the current in-memory sort to the view query AST.
|
|
218
|
+
* This persists the sort so it becomes the default for all viewers.
|
|
219
|
+
*/
|
|
111
220
|
saveView(): void;
|
|
221
|
+
/**
|
|
222
|
+
* Extracts the base query without order clauses.
|
|
223
|
+
*/
|
|
224
|
+
private _getBaseQuery;
|
|
225
|
+
/**
|
|
226
|
+
* Checks if the view has unsaved changes (in-memory sort differs from persisted sort).
|
|
227
|
+
*/
|
|
228
|
+
getViewDirty(): boolean;
|
|
112
229
|
}
|
|
113
230
|
//# sourceMappingURL=table-model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-model.d.ts","sourceRoot":"","sources":["../../../../src/model/table-model.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"table-model.d.ts","sourceRoot":"","sources":["../../../../src/model/table-model.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,KAAK,QAAQ,EAA6B,KAAK,QAAQ,EAAO,MAAM,YAAY,CAAC;AAC1F,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAgC,MAAM,qBAAqB,CAAC;AAKvG,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EAExB,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,eAAe,EAAqB,KAAK,eAAe,EAAE,KAAK,IAAI,EAAk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CAkD1G;IAEK,WAAW,GAAI,MAAM,cAAc,EAAE,OAAO,GAAG,KAAG,IAAI,CA+B3D;IAEF;;;;OAIG;IACI,cAAc,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,mBAAmB,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,GAAG,IAAI;IAa3F;;;;;OAKG;IACI,WAAW,CAAC,IAAI,EAAE,cAAc,GAAG,aAAa;IAYvD;;;;OAIG;IACI,WAAW,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO;IAQ1C,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAenC,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAkBxD,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,GAAG,QAAQ,GAAG,IAAI;IAItD,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IASvC;;;OAGG;IACI,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC,cAAc,GAAG,IAAI;IAazE;;OAEG;IACI,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAWxC;;OAEG;IACI,SAAS,IAAI,IAAI;IAIxB;;;OAGG;IACI,QAAQ,IAAI,IAAI;IA8BvB;;OAEG;IACH,OAAO,CAAC,aAAa;IASrB;;OAEG;IACI,YAAY,IAAI,OAAO;CAG/B"}
|
|
@@ -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;AAM9D,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EAEtB,MAAM,qBAAqB,CAAC;AAM7B,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;gBAG5G,QAAQ,EAAE,QAAQ,CAAC,QAAQ,EACV,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;IAShC,QAAQ,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,WAAW,GAAG,gBAAgB;IAgD9E;;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,GAAI,UAAU,OAAO,EAAE,eAAe,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;gBAET,IAAI,EAAE,IAAI;IAIvC,IAAW,IAAI,IAAI,aAAa,CAE/B;IAEY,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAK1C,SAAS,CAAC,KAAK,SAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAKnC,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IAItC,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAI3B,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,GAAG,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAK/E,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAIvB,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;CAU7F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playwright.config.d.ts","sourceRoot":"","sources":["../../../../src/playwright/playwright.config.ts"],"names":[],"mappings":";AAQA,wBAQG"}
|
|
@@ -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.Obj.Any = Type.Obj.Any> = {
|
|
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.Obj.Any = Type.Obj.Any>() => 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,EAA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Key = "@dxos/react-ui-table";
|
|
2
|
+
export declare const translations: [{
|
|
3
3
|
readonly 'en-US': {
|
|
4
|
-
readonly table: {
|
|
4
|
+
readonly "@dxos/react-ui-table": {
|
|
5
5
|
readonly 'object placeholder': "New table";
|
|
6
6
|
readonly 'create object label': "Create table";
|
|
7
7
|
readonly 'table name placeholder': "Table name";
|
|
8
8
|
readonly 'settings title': "Table settings";
|
|
9
|
-
readonly 'table schema label': "
|
|
10
|
-
readonly 'new schema': "New
|
|
9
|
+
readonly 'table schema label': "Type";
|
|
10
|
+
readonly 'new schema': "New type";
|
|
11
11
|
readonly 'continue label': "Continue";
|
|
12
12
|
readonly 'create stack section label': "Create table";
|
|
13
13
|
readonly 'add row label': "Add row";
|
|
@@ -26,5 +26,4 @@ declare const _default: readonly [{
|
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
28
|
}];
|
|
29
|
-
export default _default;
|
|
30
29
|
//# 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;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BM,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
import { Type } from '@dxos/echo';
|
|
3
|
+
import { type JsonSchemaType } from '@dxos/echo/internal';
|
|
4
|
+
import { View } from '@dxos/schema';
|
|
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 declare const TableV1: Type.Obj<{
|
|
26
|
+
readonly sizes: {
|
|
27
|
+
[x: string]: number;
|
|
28
|
+
};
|
|
29
|
+
}, Schema.Struct.Fields>;
|
|
30
|
+
export {};
|
|
31
|
+
//# 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,EAAY,IAAI,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAsC,KAAK,cAAc,EAAmB,MAAM,qBAAqB,CAAC;AAC/G,OAAO,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,KAAK;;;;;;wBAiBjB,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,GAAI,mCAAwC,SAAS,KAAG,KA6BxE,CAAC;AAMF,eAAO,MAAM,OAAO;;;;wBAUnB,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 { type 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.Entity.Any;
|
|
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
|