@dxos/react-ui-table 0.8.4-main.dedc0f3 → 0.8.4-main.dfabb4ec29
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 +1139 -1193
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +33 -42
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- 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 -3
- 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 +1139 -1193
- 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 +33 -42
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- 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 -3
- package/dist/types/src/components/Table/ColumnActionsMenu.d.ts +1 -2
- package/dist/types/src/components/Table/ColumnActionsMenu.d.ts.map +1 -1
- package/dist/types/src/components/Table/ColumnSettings.d.ts +2 -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 +23 -39
- package/dist/types/src/components/Table/DynamicTable.stories.d.ts.map +1 -1
- package/dist/types/src/components/Table/Relations.stories.d.ts +96 -29
- package/dist/types/src/components/Table/Relations.stories.d.ts.map +1 -1
- package/dist/types/src/components/Table/RowActionsMenu.d.ts.map +1 -1
- package/dist/types/src/components/Table/Table.d.ts +20 -18
- package/dist/types/src/components/Table/Table.d.ts.map +1 -1
- package/dist/types/src/components/Table/Table.stories.d.ts +96 -31
- 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 +1 -1
- package/dist/types/src/components/TableCellEditor/CellValidationMessage.d.ts.map +1 -1
- package/dist/types/src/components/TableCellEditor/FormCellEditor.d.ts +12 -12
- package/dist/types/src/components/TableCellEditor/FormCellEditor.d.ts.map +1 -1
- package/dist/types/src/components/TableCellEditor/TableCellEditor.d.ts +7 -7
- package/dist/types/src/components/TableCellEditor/TableCellEditor.d.ts.map +1 -1
- package/dist/types/src/components/TableCellEditor/TableCellEditor.stories.d.ts +25 -28
- 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 +23 -16
- package/dist/types/src/components/testing.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +2 -1
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useAddRow.d.ts +5 -6
- package/dist/types/src/hooks/useAddRow.d.ts.map +1 -1
- 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 +9 -9
- package/dist/types/src/hooks/useTableModel.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +0 -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 +18 -9
- package/dist/types/src/model/selection-model.d.ts.map +1 -1
- package/dist/types/src/model/table-model.d.ts +106 -26
- package/dist/types/src/model/table-model.d.ts.map +1 -1
- package/dist/types/src/model/table-presentation.d.ts +3 -1
- 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.map +1 -1
- package/dist/types/src/testing/useTestTableModel.d.ts +18 -15
- package/dist/types/src/testing/useTestTableModel.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +21 -23
- 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 +14 -12
- 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 -0
- 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 +20 -20
- 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 +67 -76
- package/src/components/Table/ColumnActionsMenu.tsx +17 -12
- package/src/components/Table/ColumnSettings.tsx +8 -9
- package/src/components/Table/DynamicTable.stories.tsx +34 -33
- package/src/components/Table/DynamicTable.tsx +33 -36
- package/src/components/Table/Relations.stories.tsx +196 -48
- package/src/components/Table/RowActionsMenu.tsx +27 -17
- package/src/components/Table/Table.stories.tsx +144 -127
- package/src/components/Table/Table.tsx +43 -403
- package/src/components/Table/TableContent.tsx +421 -0
- package/src/components/Table/TableToolbar.tsx +111 -0
- package/src/components/TableCellEditor/CellValidationMessage.tsx +5 -6
- package/src/components/TableCellEditor/FormCellEditor.tsx +125 -131
- package/src/components/TableCellEditor/TableCellEditor.stories.tsx +32 -55
- package/src/components/TableCellEditor/TableCellEditor.tsx +39 -124
- package/src/components/TableCellEditor/index.ts +1 -0
- package/src/components/index.ts +0 -1
- package/src/components/testing.ts +44 -18
- package/src/hooks/index.ts +2 -1
- package/src/hooks/useAddRow.ts +8 -10
- package/src/hooks/useProjectionModel.ts +39 -0
- package/src/hooks/useTableModel.ts +36 -34
- package/src/index.ts +0 -4
- package/src/model/modal-controller.ts +23 -40
- package/src/model/selection-model.ts +75 -44
- package/src/model/table-model.test.ts +93 -56
- package/src/model/table-model.ts +437 -170
- package/src/model/table-presentation.test.ts +67 -56
- package/src/model/table-presentation.ts +45 -41
- package/src/playwright/TableManager.ts +13 -6
- package/src/playwright/playwright.config.ts +1 -1
- package/src/playwright/smoke.spec.ts +59 -13
- package/src/testing/useTestTableModel.ts +48 -39
- package/src/translations.ts +20 -22
- package/src/types/Table.ts +79 -0
- package/src/types/index.ts +1 -1
- package/src/util/dynamic-table.test.ts +70 -0
- package/src/util/dynamic-table.ts +43 -31
- package/src/util/index.ts +2 -0
- 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 +1 -1
- package/src/util/table-controls.ts +2 -2
- package/dist/lib/browser/chunk-63UUF4IG.mjs +0 -66
- package/dist/lib/browser/chunk-63UUF4IG.mjs.map +0 -7
- package/dist/lib/browser/chunk-GPZSXPSA.mjs +0 -1822
- package/dist/lib/browser/chunk-GPZSXPSA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-K734DJB7.mjs +0 -67
- package/dist/lib/node-esm/chunk-K734DJB7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XUD6W42C.mjs +0 -1823
- package/dist/lib/node-esm/chunk-XUD6W42C.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/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 -52
- package/dist/types/src/model/table-sorting.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -28
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/components/Table/CreateRefPanel.tsx +0 -103
- package/src/components/TableToolbar/TableToolbar.tsx +0 -102
- package/src/components/TableToolbar/index.ts +0 -5
- package/src/model/table-sorting.ts +0 -225
- package/src/types/schema.ts +0 -73
|
@@ -1,53 +1,37 @@
|
|
|
1
|
-
import '@dxos-theme';
|
|
2
1
|
import { type StoryObj } from '@storybook/react-vite';
|
|
3
2
|
import React from 'react';
|
|
4
|
-
import { type JsonSchemaType } from '@dxos/echo-schema';
|
|
5
|
-
import { type TableFeatures } from '../../model';
|
|
6
3
|
declare const meta: {
|
|
7
4
|
title: string;
|
|
8
|
-
component: ({ classNames, name, rows, properties, jsonSchema:
|
|
9
|
-
|
|
10
|
-
rows: any[];
|
|
11
|
-
properties?: import("../..").TablePropertyDefinition[];
|
|
12
|
-
jsonSchema?: JsonSchemaType;
|
|
13
|
-
schema?: import("effect/Schema").Schema.AnyNoContext;
|
|
14
|
-
features?: Partial<TableFeatures>;
|
|
15
|
-
rowActions?: import("../..").TableRowAction[];
|
|
16
|
-
onRowClick?: (row: any) => void;
|
|
17
|
-
onRowAction?: (actionId: string, datum: any) => void;
|
|
18
|
-
}, "className"> & {
|
|
19
|
-
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
20
|
-
}) => React.JSX.Element;
|
|
5
|
+
component: <T extends import("@dxos/echo/Type").AnyEntity = import("@dxos/echo/Type").AnyEntity>({ classNames, schema, name, rows, properties, jsonSchema: jsonSchemaProp, rowActions, onRowClick, onRowAction, ...props }: import("./DynamicTable").DynamicTableProps<T>) => React.JSX.Element;
|
|
6
|
+
decorators: import("@storybook/react").Decorator[];
|
|
21
7
|
parameters: {
|
|
8
|
+
layout: string;
|
|
22
9
|
translations: [{
|
|
23
10
|
readonly 'en-US': {
|
|
24
|
-
readonly "react-ui-table": {
|
|
25
|
-
readonly 'object
|
|
26
|
-
readonly 'create
|
|
27
|
-
readonly 'table
|
|
28
|
-
readonly 'settings
|
|
29
|
-
readonly 'table
|
|
30
|
-
readonly '
|
|
31
|
-
readonly '
|
|
32
|
-
readonly '
|
|
33
|
-
readonly '
|
|
34
|
-
readonly '
|
|
35
|
-
readonly 'column
|
|
36
|
-
readonly 'column
|
|
37
|
-
readonly 'column
|
|
38
|
-
readonly '
|
|
39
|
-
readonly '
|
|
40
|
-
readonly '
|
|
41
|
-
readonly '
|
|
42
|
-
readonly '
|
|
43
|
-
readonly '
|
|
44
|
-
readonly 'create new object label': "Create new object “{{text}}”";
|
|
45
|
-
readonly 'save view label': "Save changes to view";
|
|
11
|
+
readonly "@dxos/react-ui-table": {
|
|
12
|
+
readonly 'object.placeholder': 'New table';
|
|
13
|
+
readonly 'create-object.label': 'Create table';
|
|
14
|
+
readonly 'table-name.placeholder': 'Table name';
|
|
15
|
+
readonly 'settings.title': 'Table settings';
|
|
16
|
+
readonly 'table-schema.label': 'Type';
|
|
17
|
+
readonly 'continue.label': 'Continue';
|
|
18
|
+
readonly 'create-stack-section.label': 'Create table';
|
|
19
|
+
readonly 'add-row.label': 'Add row';
|
|
20
|
+
readonly 'column-action-sort-descending.menu': 'Sort Descending';
|
|
21
|
+
readonly 'column-action-sort-ascending.menu': 'Sort Ascending';
|
|
22
|
+
readonly 'column-action-clear-sorting.menu': 'Clear Sorting';
|
|
23
|
+
readonly 'column-action-settings.menu': 'Column Settings';
|
|
24
|
+
readonly 'column-action-delete.menu': 'Delete Column';
|
|
25
|
+
readonly 'delete-row.label': 'Delete row';
|
|
26
|
+
readonly 'bulk-delete-row.label': 'Delete selected rows';
|
|
27
|
+
readonly 'column-deleted.label': 'Column deleted';
|
|
28
|
+
readonly 'new-column-button.label': 'Create column';
|
|
29
|
+
readonly 'create-new-object.label': 'Create new object \u201C{{text}}\u201D';
|
|
30
|
+
readonly 'save-view.label': 'Save changes to view';
|
|
46
31
|
};
|
|
47
32
|
};
|
|
48
33
|
}];
|
|
49
34
|
};
|
|
50
|
-
decorators: import("@storybook/react").Decorator[];
|
|
51
35
|
};
|
|
52
36
|
export default meta;
|
|
53
37
|
export declare const Default: StoryObj;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DynamicTable.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/DynamicTable.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"DynamicTable.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/DynamicTable.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAA4B,MAAM,OAAO,CAAC;AAoDjD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQ2B,CAAC;eAEvB,IAAI;AAInB,eAAO,MAAM,OAAO,EAAE,QAErB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,QAW3B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,QAW/B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,QA2B5B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,QA4B5B,CAAC"}
|
|
@@ -1,42 +1,109 @@
|
|
|
1
|
-
import '@dxos-theme';
|
|
2
1
|
import { type StoryObj } from '@storybook/react-vite';
|
|
3
2
|
import React from 'react';
|
|
3
|
+
import '@dxos/lit-ui/dx-tag-picker.pcss';
|
|
4
4
|
declare const meta: {
|
|
5
5
|
title: string;
|
|
6
6
|
render: () => React.JSX.Element;
|
|
7
|
+
decorators: import("@storybook/react").Decorator[];
|
|
7
8
|
parameters: {
|
|
8
|
-
|
|
9
|
-
readonly 'en-US': {
|
|
10
|
-
readonly "react-ui-table": {
|
|
11
|
-
readonly 'object placeholder': "New table";
|
|
12
|
-
readonly 'create object label': "Create table";
|
|
13
|
-
readonly 'table name placeholder': "Table name";
|
|
14
|
-
readonly 'settings title': "Table settings";
|
|
15
|
-
readonly 'table schema label': "Record type";
|
|
16
|
-
readonly 'new schema': "New record type";
|
|
17
|
-
readonly 'continue label': "Continue";
|
|
18
|
-
readonly 'create stack section label': "Create table";
|
|
19
|
-
readonly 'add row label': "Add row";
|
|
20
|
-
readonly 'create comment': "Create thread";
|
|
21
|
-
readonly 'column action sort descending': "Sort Descending";
|
|
22
|
-
readonly 'column action sort ascending': "Sort Ascending";
|
|
23
|
-
readonly 'column action clear sorting': "Clear Sorting";
|
|
24
|
-
readonly 'column action settings': "Column Settings";
|
|
25
|
-
readonly 'column action delete': "Delete Column";
|
|
26
|
-
readonly 'delete row label': "Delete row";
|
|
27
|
-
readonly 'bulk delete row label': "Delete selected rows";
|
|
28
|
-
readonly 'column deleted label': "Column deleted";
|
|
29
|
-
readonly 'new column button label': "Create column";
|
|
30
|
-
readonly 'create new object label': "Create new object “{{text}}”";
|
|
31
|
-
readonly 'save view label': "Save changes to view";
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
}];
|
|
9
|
+
layout: string;
|
|
35
10
|
controls: {
|
|
36
11
|
disable: boolean;
|
|
37
12
|
};
|
|
13
|
+
translations: ({
|
|
14
|
+
readonly 'en-US': {
|
|
15
|
+
readonly "@dxos/react-ui-table": {
|
|
16
|
+
readonly 'object.placeholder': 'New table';
|
|
17
|
+
readonly 'create-object.label': 'Create table';
|
|
18
|
+
readonly 'table-name.placeholder': 'Table name';
|
|
19
|
+
readonly 'settings.title': 'Table settings';
|
|
20
|
+
readonly 'table-schema.label': 'Type';
|
|
21
|
+
readonly 'continue.label': 'Continue';
|
|
22
|
+
readonly 'create-stack-section.label': 'Create table';
|
|
23
|
+
readonly 'add-row.label': 'Add row';
|
|
24
|
+
readonly 'column-action-sort-descending.menu': 'Sort Descending';
|
|
25
|
+
readonly 'column-action-sort-ascending.menu': 'Sort Ascending';
|
|
26
|
+
readonly 'column-action-clear-sorting.menu': 'Clear Sorting';
|
|
27
|
+
readonly 'column-action-settings.menu': 'Column Settings';
|
|
28
|
+
readonly 'column-action-delete.menu': 'Delete Column';
|
|
29
|
+
readonly 'delete-row.label': 'Delete row';
|
|
30
|
+
readonly 'bulk-delete-row.label': 'Delete selected rows';
|
|
31
|
+
readonly 'column-deleted.label': 'Column deleted';
|
|
32
|
+
readonly 'new-column-button.label': 'Create column';
|
|
33
|
+
readonly 'create-new-object.label': 'Create new object \u201C{{text}}\u201D';
|
|
34
|
+
readonly 'save-view.label': 'Save changes to view';
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
} | {
|
|
38
|
+
readonly 'en-US': {
|
|
39
|
+
readonly "@dxos/react-ui-form": {
|
|
40
|
+
readonly 'fields.label': 'Fields';
|
|
41
|
+
readonly 'hidden-fields.label': 'Hidden Fields';
|
|
42
|
+
readonly 'empty-readonly-ref-field.label': '(none)';
|
|
43
|
+
readonly 'field-property.label': 'Property';
|
|
44
|
+
readonly 'field-property.placeholder': 'Property name';
|
|
45
|
+
readonly 'field-format.label': 'Type';
|
|
46
|
+
readonly 'field-path.label': 'Field path';
|
|
47
|
+
readonly 'add-item.button': 'Add item';
|
|
48
|
+
readonly 'add-property-button.label': 'Add property';
|
|
49
|
+
readonly 'boolean-input-true.value': 'Yes';
|
|
50
|
+
readonly 'boolean-input-false.value': 'No';
|
|
51
|
+
readonly 'show-field.label': 'Show field';
|
|
52
|
+
readonly 'hide-field.label': 'Hide field';
|
|
53
|
+
readonly 'delete-field.label': 'Delete field';
|
|
54
|
+
readonly 'create-option.label': 'Create';
|
|
55
|
+
readonly 'add-tag.label': 'Add tag';
|
|
56
|
+
readonly 'ref-field-combobox-input.placeholder': 'Search\u2026';
|
|
57
|
+
readonly 'ref-field.placeholder': 'Select\u2026';
|
|
58
|
+
readonly 'ref-field.placeholder_one': 'Select\u2026';
|
|
59
|
+
readonly 'ref-field.placeholder_other': 'Select items\u2026';
|
|
60
|
+
readonly 'example.placeholder': 'Example';
|
|
61
|
+
readonly 'latitude.placeholder': 'Latitude (e.g., 40.7128)';
|
|
62
|
+
readonly 'longitude.placeholder': 'Longitude (e.g., -74.0060)';
|
|
63
|
+
readonly 'cancel-button.label': 'Cancel';
|
|
64
|
+
readonly 'save-button.label': 'Save';
|
|
65
|
+
readonly 'create-text.label': 'Create text';
|
|
66
|
+
readonly 'format.boolean.label': 'Boolean';
|
|
67
|
+
readonly 'format.currency.label': 'Currency';
|
|
68
|
+
readonly 'format.date.label': 'Date';
|
|
69
|
+
readonly 'format.date-time.label': 'DateTime';
|
|
70
|
+
readonly 'format.did.label': 'DID';
|
|
71
|
+
readonly 'format.duration.label': 'Duration';
|
|
72
|
+
readonly 'format.dxn.label': 'DXN';
|
|
73
|
+
readonly 'format.email.label': 'Email';
|
|
74
|
+
readonly 'format.formula.label': 'Formula';
|
|
75
|
+
readonly 'format.hostname.label': 'Hostname';
|
|
76
|
+
readonly 'format.integer.label': 'Integer';
|
|
77
|
+
readonly 'format.json.label': 'JSON';
|
|
78
|
+
readonly 'format.lnglat.label': 'Geopoint';
|
|
79
|
+
readonly 'format.markdown.label': 'Markdown';
|
|
80
|
+
readonly 'format.percent.label': 'Percent';
|
|
81
|
+
readonly 'format.ref.label': 'Reference';
|
|
82
|
+
readonly 'format.regex.label': 'RegExp';
|
|
83
|
+
readonly 'format.string.label': 'String';
|
|
84
|
+
readonly 'format.single-select.label': 'Select';
|
|
85
|
+
readonly 'format.multi-select.label': 'Multi-select';
|
|
86
|
+
readonly 'format.text.label': 'Long text';
|
|
87
|
+
readonly 'format.time.label': 'Time';
|
|
88
|
+
readonly 'format.timestamp.label': 'Timestamp';
|
|
89
|
+
readonly 'format.user.label': 'User';
|
|
90
|
+
readonly 'format.number.label': 'Number';
|
|
91
|
+
readonly 'format.uri.label': 'URI';
|
|
92
|
+
readonly 'format.url.label': 'URL';
|
|
93
|
+
readonly 'format.uuid.label': 'UUID';
|
|
94
|
+
readonly 'latitude.label': 'Latitude';
|
|
95
|
+
readonly 'longitude.label': 'Longitude';
|
|
96
|
+
readonly 'select-option.label': 'Label';
|
|
97
|
+
readonly 'select-option-label.placeholder': 'Option label';
|
|
98
|
+
readonly 'select-option-delete.button': 'Delete';
|
|
99
|
+
readonly 'select-option-add.button': 'Add option';
|
|
100
|
+
readonly 'system-schema.title': 'System type';
|
|
101
|
+
readonly 'system-schema.description': 'System type: cannot add or remove fields.';
|
|
102
|
+
readonly 'remove.button': 'Remove';
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
})[];
|
|
38
106
|
};
|
|
39
|
-
decorators: import("@storybook/react").Decorator[];
|
|
40
107
|
};
|
|
41
108
|
export default meta;
|
|
42
109
|
type Story = StoryObj<typeof meta>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Relations.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/Relations.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Relations.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/Relations.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAgE,MAAM,OAAO,CAAC;AAgBrF,OAAO,iCAAiC,CAAC;AAsGzC,QAAA,MAAM,IAAI;;;;;QAeN,MAAM;QACN,QAAQ;YAAI,OAAO;;QACnB,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEqB,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAmIrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RowActionsMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/RowActionsMenu.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RowActionsMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/RowActionsMenu.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAEpE,KAAK,mBAAmB,GAAG;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,eAAe,CAAA;CAAE,CAAC;AAE1E,eAAO,MAAM,cAAc,sBAAuB,mBAAmB,6BA2CpE,CAAC"}
|
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import React, { type PropsWithChildren } from 'react';
|
|
3
|
-
import { type Client } from '@dxos/react-client';
|
|
1
|
+
import React, { type PropsWithChildren, type RefObject } from 'react';
|
|
4
2
|
import { type DxGridPosition } from '@dxos/react-ui-grid';
|
|
5
|
-
import { type InsertRowResult
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
import { type InsertRowResult } from '../../model';
|
|
4
|
+
type TableContextValue = {
|
|
5
|
+
/** Mutable ref populated by Content so Root can expose the controller. */
|
|
6
|
+
controllerRef: RefObject<TableController>;
|
|
7
|
+
};
|
|
8
|
+
declare const useTableContext: (consumerName: string) => TableContextValue;
|
|
9
|
+
type TableController = {
|
|
10
10
|
update?: (cell?: DxGridPosition) => void;
|
|
11
11
|
handleInsertRowResult?: (insertRowResult?: InsertRowResult) => void;
|
|
12
12
|
};
|
|
13
|
-
|
|
14
|
-
model?: TableModel;
|
|
15
|
-
presentation?: TablePresentation;
|
|
16
|
-
schema?: Schema.AnyNoContext;
|
|
17
|
-
client?: Client;
|
|
18
|
-
ignoreAttention?: boolean;
|
|
19
|
-
onRowClick?: (row: any) => void;
|
|
20
|
-
};
|
|
13
|
+
type TableRootProps = PropsWithChildren;
|
|
21
14
|
export declare const Table: {
|
|
22
|
-
Root:
|
|
23
|
-
|
|
15
|
+
Root: React.ForwardRefExoticComponent<{
|
|
16
|
+
children?: React.ReactNode | undefined;
|
|
17
|
+
} & React.RefAttributes<TableController>>;
|
|
18
|
+
Toolbar: React.ForwardRefExoticComponent<Omit<import("./TableToolbar").TableToolbarProps, "className"> & {
|
|
19
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
20
|
+
} & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
Content: React.ForwardRefExoticComponent<Omit<import("./TableContent").TableContentProps, "className"> & {
|
|
22
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
23
|
+
} & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
|
|
24
24
|
};
|
|
25
|
+
export type { TableController, TableRootProps };
|
|
26
|
+
export { useTableContext };
|
|
25
27
|
//# sourceMappingURL=Table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/Table.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/Table.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAA2C,MAAM,OAAO,CAAC;AAE/G,OAAO,EAAuB,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE/E,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAYnD,KAAK,iBAAiB,GAAG;IACvB,0EAA0E;IAC1E,aAAa,EAAE,SAAS,CAAC,eAAe,CAAC,CAAC;CAC3C,CAAC;AAEF,QAAA,MAA6B,eAAe,6CAA6C,CAAC;AAM1F,KAAK,eAAe,GAAG;IACrB,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IACzC,qBAAqB,CAAC,EAAE,CAAC,eAAe,CAAC,EAAE,eAAe,KAAK,IAAI,CAAC;CACrE,CAAC;AAQF,KAAK,cAAc,GAAG,iBAAiB,CAAC;AAuBxC,eAAO,MAAM,KAAK;IAChB,IAAI;;;IACJ,OAAO;;;IACP,OAAO;;;CACR,CAAC;AAEF,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1,51 +1,116 @@
|
|
|
1
|
-
import '@dxos-theme';
|
|
2
1
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
3
2
|
import React from 'react';
|
|
4
|
-
type
|
|
3
|
+
type DefaultStoryProps = {
|
|
5
4
|
rows?: number;
|
|
6
5
|
};
|
|
7
6
|
declare const meta: {
|
|
8
7
|
title: string;
|
|
9
8
|
render: () => React.JSX.Element;
|
|
9
|
+
decorators: import("@storybook/react").Decorator[];
|
|
10
10
|
parameters: {
|
|
11
|
-
translations: [{
|
|
12
|
-
readonly 'en-US': {
|
|
13
|
-
readonly "react-ui-table": {
|
|
14
|
-
readonly 'object placeholder': "New table";
|
|
15
|
-
readonly 'create object label': "Create table";
|
|
16
|
-
readonly 'table name placeholder': "Table name";
|
|
17
|
-
readonly 'settings title': "Table settings";
|
|
18
|
-
readonly 'table schema label': "Record type";
|
|
19
|
-
readonly 'new schema': "New record type";
|
|
20
|
-
readonly 'continue label': "Continue";
|
|
21
|
-
readonly 'create stack section label': "Create table";
|
|
22
|
-
readonly 'add row label': "Add row";
|
|
23
|
-
readonly 'create comment': "Create thread";
|
|
24
|
-
readonly 'column action sort descending': "Sort Descending";
|
|
25
|
-
readonly 'column action sort ascending': "Sort Ascending";
|
|
26
|
-
readonly 'column action clear sorting': "Clear Sorting";
|
|
27
|
-
readonly 'column action settings': "Column Settings";
|
|
28
|
-
readonly 'column action delete': "Delete Column";
|
|
29
|
-
readonly 'delete row label': "Delete row";
|
|
30
|
-
readonly 'bulk delete row label': "Delete selected rows";
|
|
31
|
-
readonly 'column deleted label': "Column deleted";
|
|
32
|
-
readonly 'new column button label': "Create column";
|
|
33
|
-
readonly 'create new object label': "Create new object “{{text}}”";
|
|
34
|
-
readonly 'save view label': "Save changes to view";
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
}];
|
|
38
11
|
layout: string;
|
|
39
12
|
controls: {
|
|
40
13
|
disable: boolean;
|
|
41
14
|
};
|
|
15
|
+
translations: ({
|
|
16
|
+
readonly 'en-US': {
|
|
17
|
+
readonly "@dxos/react-ui-table": {
|
|
18
|
+
readonly 'object.placeholder': 'New table';
|
|
19
|
+
readonly 'create-object.label': 'Create table';
|
|
20
|
+
readonly 'table-name.placeholder': 'Table name';
|
|
21
|
+
readonly 'settings.title': 'Table settings';
|
|
22
|
+
readonly 'table-schema.label': 'Type';
|
|
23
|
+
readonly 'continue.label': 'Continue';
|
|
24
|
+
readonly 'create-stack-section.label': 'Create table';
|
|
25
|
+
readonly 'add-row.label': 'Add row';
|
|
26
|
+
readonly 'column-action-sort-descending.menu': 'Sort Descending';
|
|
27
|
+
readonly 'column-action-sort-ascending.menu': 'Sort Ascending';
|
|
28
|
+
readonly 'column-action-clear-sorting.menu': 'Clear Sorting';
|
|
29
|
+
readonly 'column-action-settings.menu': 'Column Settings';
|
|
30
|
+
readonly 'column-action-delete.menu': 'Delete Column';
|
|
31
|
+
readonly 'delete-row.label': 'Delete row';
|
|
32
|
+
readonly 'bulk-delete-row.label': 'Delete selected rows';
|
|
33
|
+
readonly 'column-deleted.label': 'Column deleted';
|
|
34
|
+
readonly 'new-column-button.label': 'Create column';
|
|
35
|
+
readonly 'create-new-object.label': 'Create new object \u201C{{text}}\u201D';
|
|
36
|
+
readonly 'save-view.label': 'Save changes to view';
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
} | {
|
|
40
|
+
readonly 'en-US': {
|
|
41
|
+
readonly "@dxos/react-ui-form": {
|
|
42
|
+
readonly 'fields.label': 'Fields';
|
|
43
|
+
readonly 'hidden-fields.label': 'Hidden Fields';
|
|
44
|
+
readonly 'empty-readonly-ref-field.label': '(none)';
|
|
45
|
+
readonly 'field-property.label': 'Property';
|
|
46
|
+
readonly 'field-property.placeholder': 'Property name';
|
|
47
|
+
readonly 'field-format.label': 'Type';
|
|
48
|
+
readonly 'field-path.label': 'Field path';
|
|
49
|
+
readonly 'add-item.button': 'Add item';
|
|
50
|
+
readonly 'add-property-button.label': 'Add property';
|
|
51
|
+
readonly 'boolean-input-true.value': 'Yes';
|
|
52
|
+
readonly 'boolean-input-false.value': 'No';
|
|
53
|
+
readonly 'show-field.label': 'Show field';
|
|
54
|
+
readonly 'hide-field.label': 'Hide field';
|
|
55
|
+
readonly 'delete-field.label': 'Delete field';
|
|
56
|
+
readonly 'create-option.label': 'Create';
|
|
57
|
+
readonly 'add-tag.label': 'Add tag';
|
|
58
|
+
readonly 'ref-field-combobox-input.placeholder': 'Search\u2026';
|
|
59
|
+
readonly 'ref-field.placeholder': 'Select\u2026';
|
|
60
|
+
readonly 'ref-field.placeholder_one': 'Select\u2026';
|
|
61
|
+
readonly 'ref-field.placeholder_other': 'Select items\u2026';
|
|
62
|
+
readonly 'example.placeholder': 'Example';
|
|
63
|
+
readonly 'latitude.placeholder': 'Latitude (e.g., 40.7128)';
|
|
64
|
+
readonly 'longitude.placeholder': 'Longitude (e.g., -74.0060)';
|
|
65
|
+
readonly 'cancel-button.label': 'Cancel';
|
|
66
|
+
readonly 'save-button.label': 'Save';
|
|
67
|
+
readonly 'create-text.label': 'Create text';
|
|
68
|
+
readonly 'format.boolean.label': 'Boolean';
|
|
69
|
+
readonly 'format.currency.label': 'Currency';
|
|
70
|
+
readonly 'format.date.label': 'Date';
|
|
71
|
+
readonly 'format.date-time.label': 'DateTime';
|
|
72
|
+
readonly 'format.did.label': 'DID';
|
|
73
|
+
readonly 'format.duration.label': 'Duration';
|
|
74
|
+
readonly 'format.dxn.label': 'DXN';
|
|
75
|
+
readonly 'format.email.label': 'Email';
|
|
76
|
+
readonly 'format.formula.label': 'Formula';
|
|
77
|
+
readonly 'format.hostname.label': 'Hostname';
|
|
78
|
+
readonly 'format.integer.label': 'Integer';
|
|
79
|
+
readonly 'format.json.label': 'JSON';
|
|
80
|
+
readonly 'format.lnglat.label': 'Geopoint';
|
|
81
|
+
readonly 'format.markdown.label': 'Markdown';
|
|
82
|
+
readonly 'format.percent.label': 'Percent';
|
|
83
|
+
readonly 'format.ref.label': 'Reference';
|
|
84
|
+
readonly 'format.regex.label': 'RegExp';
|
|
85
|
+
readonly 'format.string.label': 'String';
|
|
86
|
+
readonly 'format.single-select.label': 'Select';
|
|
87
|
+
readonly 'format.multi-select.label': 'Multi-select';
|
|
88
|
+
readonly 'format.text.label': 'Long text';
|
|
89
|
+
readonly 'format.time.label': 'Time';
|
|
90
|
+
readonly 'format.timestamp.label': 'Timestamp';
|
|
91
|
+
readonly 'format.user.label': 'User';
|
|
92
|
+
readonly 'format.number.label': 'Number';
|
|
93
|
+
readonly 'format.uri.label': 'URI';
|
|
94
|
+
readonly 'format.url.label': 'URL';
|
|
95
|
+
readonly 'format.uuid.label': 'UUID';
|
|
96
|
+
readonly 'latitude.label': 'Latitude';
|
|
97
|
+
readonly 'longitude.label': 'Longitude';
|
|
98
|
+
readonly 'select-option.label': 'Label';
|
|
99
|
+
readonly 'select-option-label.placeholder': 'Option label';
|
|
100
|
+
readonly 'select-option-delete.button': 'Delete';
|
|
101
|
+
readonly 'select-option-add.button': 'Add option';
|
|
102
|
+
readonly 'system-schema.title': 'System type';
|
|
103
|
+
readonly 'system-schema.description': 'System type: cannot add or remove fields.';
|
|
104
|
+
readonly 'remove.button': 'Remove';
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
})[];
|
|
42
108
|
};
|
|
43
|
-
decorators: import("@storybook/react").Decorator[];
|
|
44
109
|
};
|
|
45
110
|
export default meta;
|
|
46
111
|
type Story = StoryObj<typeof meta>;
|
|
47
112
|
export declare const Default: Story;
|
|
48
113
|
export declare const StaticSchema: StoryObj;
|
|
49
114
|
export declare const ArrayOfObjects: StoryObj;
|
|
50
|
-
export declare const Tags: Meta<
|
|
115
|
+
export declare const Tags: Meta<DefaultStoryProps>;
|
|
51
116
|
//# sourceMappingURL=Table.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/Table.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"Table.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/Table.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAsB,MAAM,OAAO,CAAC;AAkJ3C,KAAK,iBAAiB,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAQ3C,QAAA,MAAM,IAAI;;;;;QAqCN,MAAM;QACN,QAAQ;YACN,OAAO;;QAET,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEuB,CAAC;eAEzB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,YAAY,EAAE,QA2B1B,CAAC;AAmBF,eAAO,MAAM,cAAc,EAAE,QA4B5B,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,iBAAiB,CAwDxC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type Type } from '@dxos/echo';
|
|
3
|
+
import { type TableModel, type TablePresentation } from '../../model';
|
|
4
|
+
import { type OnCreateHandler } from '../TableCellEditor';
|
|
5
|
+
export type TableContentProps = {
|
|
6
|
+
schema?: Type.AnyEntity;
|
|
7
|
+
model?: TableModel;
|
|
8
|
+
presentation?: TablePresentation;
|
|
9
|
+
ignoreAttention?: boolean;
|
|
10
|
+
onCreate?: OnCreateHandler;
|
|
11
|
+
onRowClick?: (row: any) => void;
|
|
12
|
+
testId?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const TableContent: React.ForwardRefExoticComponent<Omit<TableContentProps, "className"> & {
|
|
15
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
16
|
+
} & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
//# sourceMappingURL=TableContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/TableContent.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAkG,MAAM,OAAO,CAAC;AAEvH,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAiBvC,OAAO,EAAyC,KAAK,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE7G,OAAO,EAAE,KAAK,eAAe,EAA+C,MAAM,oBAAoB,CAAC;AAkBvG,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,YAAY,CAAC,EAAE,iBAAiB,CAAC;IAEjC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,YAAY;;2HA0WxB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Atom } from '@effect-atom/atom-react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { type ActionGraphProps, type MenuAction, MenuRootProps } from '@dxos/react-ui-menu';
|
|
4
|
+
export type TableToolbarActionProperties = {
|
|
5
|
+
type: TableToolbarActionType;
|
|
6
|
+
};
|
|
7
|
+
export type TableToolbarAction = MenuAction<TableToolbarActionProperties>;
|
|
8
|
+
export type TableToolbarActionType = 'add-row' | 'comment' | 'save-view';
|
|
9
|
+
type TableToolbarState = Partial<{
|
|
10
|
+
viewDirty: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
export type TableToolbarProps = Pick<MenuRootProps, 'attendableId'> & TableToolbarState & {
|
|
13
|
+
onAdd?: () => void;
|
|
14
|
+
onSave?: () => void;
|
|
15
|
+
customActions?: Atom.Atom<ActionGraphProps>;
|
|
16
|
+
};
|
|
17
|
+
export declare const TableToolbar: React.ForwardRefExoticComponent<Omit<TableToolbarProps, "className"> & {
|
|
18
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
19
|
+
} & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=TableToolbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableToolbar.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/TableToolbar.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAmB,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAyC,MAAM,OAAO,CAAC;AAE9D,OAAO,EAGL,KAAK,gBAAgB,EAErB,KAAK,UAAU,EACf,aAAa,EAId,MAAM,qBAAqB,CAAC;AAK7B,MAAM,MAAM,4BAA4B,GAAG;IAAE,IAAI,EAAE,sBAAsB,CAAA;CAAE,CAAC;AAE5E,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,4BAA4B,CAAC,CAAC;AAE1E,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,CAAC;AAEzE,KAAK,iBAAiB,GAAG,OAAO,CAAC;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAmDzD,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,aAAa,EAAE,cAAc,CAAC,GACjE,iBAAiB,GAAG;IAClB,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;CAC7C,CAAC;AAEJ,eAAO,MAAM,YAAY;;2HAsBxB,CAAC"}
|
|
@@ -4,5 +4,5 @@ export type CellValidationMessageProps = {
|
|
|
4
4
|
validationError: string | null;
|
|
5
5
|
variant?: 'error' | 'warning';
|
|
6
6
|
};
|
|
7
|
-
export declare const CellValidationMessage: ({ validationError, variant,
|
|
7
|
+
export declare const CellValidationMessage: ({ __gridScope, validationError, variant, }: GridScopedProps<CellValidationMessageProps>) => React.JSX.Element | null;
|
|
8
8
|
//# sourceMappingURL=CellValidationMessage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CellValidationMessage.d.ts","sourceRoot":"","sources":["../../../../../src/components/TableCellEditor/CellValidationMessage.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,eAAe,EAAkB,MAAM,qBAAqB,CAAC;AAE3E,MAAM,MAAM,0BAA0B,GAAG;IACvC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"CellValidationMessage.d.ts","sourceRoot":"","sources":["../../../../../src/components/TableCellEditor/CellValidationMessage.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,eAAe,EAAkB,MAAM,qBAAqB,CAAC;AAE3E,MAAM,MAAM,0BAA0B,GAAG;IACvC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,qBAAqB,+CAI/B,eAAe,CAAC,0BAA0B,CAAC,6BAwB7C,CAAC"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { type Schema } from 'effect';
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import { type
|
|
4
|
-
import {
|
|
2
|
+
import { type Type } from '@dxos/echo';
|
|
3
|
+
import { Ref } from '@dxos/echo/internal';
|
|
4
|
+
import { type FormRootProps } from '@dxos/react-ui-form';
|
|
5
5
|
import { type FieldProjection } from '@dxos/schema';
|
|
6
6
|
import { type ModalController, type TableModel } from '../../model';
|
|
7
|
-
type
|
|
8
|
-
|
|
7
|
+
export type OnCreateHandler = (schema: Type.AnyEntity, values: any) => Parameters<typeof Ref.make>[0];
|
|
8
|
+
export type FormCellEditorProps<T extends Type.AnyEntity = Type.AnyEntity> = {
|
|
9
|
+
__gridScope: any;
|
|
10
|
+
schema?: T;
|
|
9
11
|
model?: TableModel;
|
|
10
|
-
|
|
11
|
-
onSave?: () => void;
|
|
12
|
-
client?: Client;
|
|
12
|
+
fieldProjection: FieldProjection;
|
|
13
13
|
modals?: ModalController;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export {};
|
|
14
|
+
onSave?: () => void;
|
|
15
|
+
onCreate?: OnCreateHandler;
|
|
16
|
+
} & Omit<FormRootProps<any>, 'values' | 'schema' | 'onCreate'>;
|
|
17
|
+
export declare const FormCellEditor: <T extends Type.AnyEntity = Type.AnyEntity>({ __gridScope, schema, model, fieldProjection, onSave, onCreate, ...formProps }: FormCellEditorProps<T>) => React.JSX.Element | null;
|
|
18
18
|
//# sourceMappingURL=FormCellEditor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormCellEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/TableCellEditor/FormCellEditor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormCellEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/TableCellEditor/FormCellEditor.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAEjF,OAAO,EAAU,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,GAAG,EAAY,MAAM,qBAAqB,CAAC;AAGpD,OAAO,EAAQ,KAAK,aAAa,EAAsB,MAAM,qBAAqB,CAAC;AAEnF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAKpD,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,UAAU,EAAiB,MAAM,aAAa,CAAC;AAKnF,MAAM,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,KAAK,UAAU,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAEtG,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI;IAC3E,WAAW,EAAE,GAAG,CAAC;IACjB,MAAM,CAAC,EAAE,CAAC,CAAC;IACX,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,eAAe,EAAE,eAAe,CAAC;IACjC,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC5B,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC,CAAC;AAE/D,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,IAAI,CAAC,SAAS,oGAQpD,mBAAmB,CAAC,CAAC,CAAC,6BA4JxB,CAAC"}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { type Completion } from '@codemirror/autocomplete';
|
|
2
|
-
import { type Schema } from 'effect/Schema';
|
|
3
2
|
import React from 'react';
|
|
4
|
-
import type
|
|
3
|
+
import { type Type } from '@dxos/echo';
|
|
5
4
|
import { type DxGridAxis, type DxGridPosition } from '@dxos/lit-grid';
|
|
6
5
|
import { type GridScopedProps } from '@dxos/react-ui-grid';
|
|
7
6
|
import { type ModalController, type TableModel } from '../../model';
|
|
7
|
+
import { type OnCreateHandler } from './FormCellEditor';
|
|
8
8
|
/**
|
|
9
9
|
* Option to create new object/value.
|
|
10
10
|
*/
|
|
11
11
|
export type QueryResult = Pick<Completion, 'label'> & {
|
|
12
12
|
data: any;
|
|
13
13
|
};
|
|
14
|
-
export type TableCellEditorProps = {
|
|
14
|
+
export type TableCellEditorProps<T extends Type.AnyEntity = Type.AnyEntity> = {
|
|
15
|
+
schema?: T;
|
|
15
16
|
model?: TableModel;
|
|
16
17
|
modals?: ModalController;
|
|
17
|
-
schema?: Schema.AnyNoContext;
|
|
18
18
|
onFocus?: (axis?: DxGridAxis, delta?: -1 | 0 | 1, cell?: DxGridPosition) => void;
|
|
19
|
+
onCreate?: OnCreateHandler;
|
|
19
20
|
onSave?: () => void;
|
|
20
|
-
client?: Client;
|
|
21
21
|
};
|
|
22
|
-
export declare const TableValueEditor: ({ model, modals,
|
|
23
|
-
export declare const TableCellEditor: ({ model, modals, onFocus, onSave,
|
|
22
|
+
export declare const TableValueEditor: <T extends Type.AnyEntity = Type.AnyEntity>({ __gridScope, schema, model, modals, onFocus, onSave, onCreate, }: GridScopedProps<TableCellEditorProps<T>>) => React.JSX.Element;
|
|
23
|
+
export declare const TableCellEditor: ({ __gridScope, model, modals, onFocus, onSave, }: GridScopedProps<TableCellEditorProps>) => React.JSX.Element;
|
|
24
24
|
//# sourceMappingURL=TableCellEditor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableCellEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/TableCellEditor/TableCellEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,
|
|
1
|
+
{"version":3,"file":"TableCellEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/TableCellEditor/TableCellEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,KAAiD,MAAM,OAAO,CAAC;AAGtE,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAGvC,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAML,KAAK,eAAe,EAIrB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAEpE,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExE;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,GAAG;IACpD,IAAI,EAAE,GAAG,CAAC;CACX,CAAC;AAEF,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI;IAC5E,MAAM,CAAC,EAAE,CAAC,CAAC;IACX,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IACjF,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,IAAI,CAAC,SAAS,uFAQtD,eAAe,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,sBAoC1C,CAAC;AAEF,eAAO,MAAM,eAAe,qDAMzB,eAAe,CAAC,oBAAoB,CAAC,sBA+JvC,CAAC"}
|