@dxos/react-ui-table 0.8.4-main.e8ec1fe → 0.8.4-main.effb148878
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/LICENSE +102 -5
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/browser/{chunk-GS2UNGJK.mjs → chunk-KC62K4WS.mjs} +643 -722
- package/dist/lib/browser/chunk-KC62K4WS.mjs.map +7 -0
- package/dist/lib/browser/chunk-VWQWF3CP.mjs +67 -0
- package/dist/lib/browser/chunk-VWQWF3CP.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1103 -1023
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +35 -46
- 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-TRR3C5NX.mjs → chunk-62FOU4M7.mjs} +643 -721
- package/dist/lib/node-esm/chunk-62FOU4M7.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/chunk-UBXOF64L.mjs +68 -0
- package/dist/lib/node-esm/chunk-UBXOF64L.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +1103 -1023
- 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 +35 -46
- 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 +6 -7
- package/dist/types/src/components/Table/DynamicTable.d.ts.map +1 -1
- package/dist/types/src/components/Table/DynamicTable.stories.d.ts +22 -37
- package/dist/types/src/components/Table/DynamicTable.stories.d.ts.map +1 -1
- package/dist/types/src/components/Table/Relations.stories.d.ts +85 -80
- 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 -21
- package/dist/types/src/components/Table/Table.d.ts.map +1 -1
- package/dist/types/src/components/Table/Table.stories.d.ts +93 -26
- package/dist/types/src/components/Table/Table.stories.d.ts.map +1 -1
- package/dist/types/src/components/Table/TableContent.d.ts +18 -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 +10 -12
- package/dist/types/src/components/TableCellEditor/FormCellEditor.d.ts.map +1 -1
- package/dist/types/src/components/TableCellEditor/TableCellEditor.d.ts +5 -7
- package/dist/types/src/components/TableCellEditor/TableCellEditor.d.ts.map +1 -1
- package/dist/types/src/components/TableCellEditor/TableCellEditor.stories.d.ts +24 -26
- package/dist/types/src/components/TableCellEditor/TableCellEditor.stories.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 +22 -15
- 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 -1
- 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 +103 -24
- 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 +32 -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 -11
- 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.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 +69 -79
- package/src/components/Table/ColumnActionsMenu.tsx +17 -12
- package/src/components/Table/ColumnSettings.tsx +8 -9
- package/src/components/Table/DynamicTable.stories.tsx +32 -32
- package/src/components/Table/DynamicTable.tsx +32 -33
- package/src/components/Table/Relations.stories.tsx +104 -64
- package/src/components/Table/RowActionsMenu.tsx +6 -4
- package/src/components/Table/Table.stories.tsx +125 -112
- package/src/components/Table/Table.tsx +43 -407
- package/src/components/Table/TableContent.tsx +426 -0
- package/src/components/{TableToolbar → Table}/TableToolbar.tsx +44 -45
- package/src/components/TableCellEditor/CellValidationMessage.tsx +5 -6
- package/src/components/TableCellEditor/FormCellEditor.tsx +120 -136
- package/src/components/TableCellEditor/TableCellEditor.stories.tsx +25 -19
- package/src/components/TableCellEditor/TableCellEditor.tsx +35 -33
- package/src/components/index.ts +0 -1
- package/src/components/testing.ts +38 -17
- package/src/hooks/index.ts +2 -1
- package/src/hooks/useAddRow.ts +8 -10
- package/src/hooks/useProjectionModel.ts +38 -0
- package/src/hooks/useTableModel.ts +36 -34
- package/src/index.ts +0 -4
- package/src/model/modal-controller.ts +23 -12
- package/src/model/selection-model.ts +75 -44
- package/src/model/table-model.test.ts +77 -55
- package/src/model/table-model.ts +431 -168
- package/src/model/table-presentation.test.ts +54 -50
- package/src/model/table-presentation.ts +44 -40
- package/src/playwright/TableManager.ts +13 -6
- package/src/playwright/playwright.config.ts +1 -1
- package/src/playwright/smoke.spec.ts +52 -8
- package/src/testing/useTestTableModel.ts +49 -43
- package/src/translations.ts +20 -22
- package/src/types/Table.ts +81 -0
- package/src/types/index.ts +1 -1
- package/src/util/dynamic-table.test.ts +63 -0
- package/src/util/dynamic-table.ts +48 -33
- package/src/util/index.ts +2 -0
- package/src/util/query-ast.ts +22 -0
- 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-2PFAPQL4.mjs +0 -66
- package/dist/lib/browser/chunk-2PFAPQL4.mjs.map +0 -7
- package/dist/lib/browser/chunk-GS2UNGJK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6POOFFYF.mjs +0 -67
- package/dist/lib/node-esm/chunk-6POOFFYF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-TRR3C5NX.mjs.map +0 -7
- 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/TableToolbar/index.ts +0 -5
- package/src/model/table-sorting.ts +0 -225
- package/src/types/schema.ts +0 -73
|
@@ -1,49 +1,34 @@
|
|
|
1
1
|
import { type StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import { type TableFeatures } from '../../model';
|
|
3
|
+
import { Type } from '@dxos/echo';
|
|
5
4
|
declare const meta: {
|
|
6
5
|
title: string;
|
|
7
|
-
component: ({ classNames, name, rows, properties, jsonSchema:
|
|
8
|
-
name?: string;
|
|
9
|
-
rows: any[];
|
|
10
|
-
properties?: import("../..").TablePropertyDefinition[];
|
|
11
|
-
jsonSchema?: JsonSchemaType;
|
|
12
|
-
schema?: import("effect/Schema").Schema.AnyNoContext;
|
|
13
|
-
features?: Partial<TableFeatures>;
|
|
14
|
-
rowActions?: import("../..").TableRowAction[];
|
|
15
|
-
onRowClick?: (row: any) => void;
|
|
16
|
-
onRowAction?: (actionId: string, datum: any) => void;
|
|
17
|
-
}, "className"> & {
|
|
18
|
-
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
19
|
-
}) => React.JSX.Element;
|
|
6
|
+
component: <T extends Type.AnyEntity = Type.AnyEntity>({ classNames, type: typeProp, name, rows, properties, jsonSchema: jsonSchemaProp, rowActions, onRowClick, onRowAction, ...props }: import("./DynamicTable").DynamicTableProps<T>) => React.JSX.Element;
|
|
20
7
|
decorators: import("@storybook/react").Decorator[];
|
|
21
8
|
parameters: {
|
|
22
9
|
layout: string;
|
|
23
10
|
translations: [{
|
|
24
11
|
readonly 'en-US': {
|
|
25
|
-
readonly "react-ui-table": {
|
|
26
|
-
readonly 'object
|
|
27
|
-
readonly 'create
|
|
28
|
-
readonly 'table
|
|
29
|
-
readonly 'settings
|
|
30
|
-
readonly 'table
|
|
31
|
-
readonly '
|
|
32
|
-
readonly '
|
|
33
|
-
readonly '
|
|
34
|
-
readonly '
|
|
35
|
-
readonly '
|
|
36
|
-
readonly 'column
|
|
37
|
-
readonly 'column
|
|
38
|
-
readonly 'column
|
|
39
|
-
readonly '
|
|
40
|
-
readonly '
|
|
41
|
-
readonly '
|
|
42
|
-
readonly '
|
|
43
|
-
readonly '
|
|
44
|
-
readonly '
|
|
45
|
-
readonly 'create new object label': "Create new object “{{text}}”";
|
|
46
|
-
readonly 'save view label': "Save changes to view";
|
|
12
|
+
readonly "@dxos/react-ui-table": {
|
|
13
|
+
readonly 'object.placeholder': 'New table';
|
|
14
|
+
readonly 'create-object.label': 'Create table';
|
|
15
|
+
readonly 'table-name.placeholder': 'Table name';
|
|
16
|
+
readonly 'settings.title': 'Table settings';
|
|
17
|
+
readonly 'table-schema.label': 'Type';
|
|
18
|
+
readonly 'continue.label': 'Continue';
|
|
19
|
+
readonly 'create-stack-section.label': 'Create table';
|
|
20
|
+
readonly 'add-row.label': 'Add row';
|
|
21
|
+
readonly 'column-action-sort-descending.menu': 'Sort Descending';
|
|
22
|
+
readonly 'column-action-sort-ascending.menu': 'Sort Ascending';
|
|
23
|
+
readonly 'column-action-clear-sorting.menu': 'Clear Sorting';
|
|
24
|
+
readonly 'column-action-settings.menu': 'Column Settings';
|
|
25
|
+
readonly 'column-action-delete.menu': '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 \u201C{{text}}\u201D';
|
|
31
|
+
readonly 'save-view.label': 'Save changes to view';
|
|
47
32
|
};
|
|
48
33
|
};
|
|
49
34
|
}];
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AAEjD,OAAO,EAAgC,IAAI,EAAE,MAAM,YAAY,CAAC;AAkDhE,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"}
|
|
@@ -12,90 +12,95 @@ declare const meta: {
|
|
|
12
12
|
};
|
|
13
13
|
translations: ({
|
|
14
14
|
readonly 'en-US': {
|
|
15
|
-
readonly "react-ui-table": {
|
|
16
|
-
readonly 'object
|
|
17
|
-
readonly 'create
|
|
18
|
-
readonly 'table
|
|
19
|
-
readonly 'settings
|
|
20
|
-
readonly 'table
|
|
21
|
-
readonly '
|
|
22
|
-
readonly '
|
|
23
|
-
readonly '
|
|
24
|
-
readonly '
|
|
25
|
-
readonly '
|
|
26
|
-
readonly 'column
|
|
27
|
-
readonly 'column
|
|
28
|
-
readonly 'column
|
|
29
|
-
readonly '
|
|
30
|
-
readonly '
|
|
31
|
-
readonly '
|
|
32
|
-
readonly '
|
|
33
|
-
readonly '
|
|
34
|
-
readonly '
|
|
35
|
-
readonly 'create new object label': "Create new object “{{text}}”";
|
|
36
|
-
readonly 'save view label': "Save changes to view";
|
|
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';
|
|
37
35
|
};
|
|
38
36
|
};
|
|
39
37
|
} | {
|
|
40
38
|
readonly 'en-US': {
|
|
41
|
-
readonly "react-ui-form": {
|
|
42
|
-
readonly
|
|
43
|
-
readonly
|
|
44
|
-
readonly
|
|
45
|
-
readonly
|
|
46
|
-
readonly
|
|
47
|
-
readonly
|
|
48
|
-
readonly
|
|
49
|
-
readonly
|
|
50
|
-
readonly
|
|
51
|
-
readonly
|
|
52
|
-
readonly
|
|
53
|
-
readonly
|
|
54
|
-
readonly
|
|
55
|
-
readonly
|
|
56
|
-
readonly
|
|
57
|
-
readonly
|
|
58
|
-
readonly
|
|
59
|
-
readonly
|
|
60
|
-
readonly
|
|
61
|
-
readonly
|
|
62
|
-
readonly
|
|
63
|
-
readonly
|
|
64
|
-
readonly
|
|
65
|
-
readonly
|
|
66
|
-
readonly
|
|
67
|
-
readonly
|
|
68
|
-
readonly
|
|
69
|
-
readonly
|
|
70
|
-
readonly
|
|
71
|
-
readonly
|
|
72
|
-
readonly
|
|
73
|
-
readonly
|
|
74
|
-
readonly
|
|
75
|
-
readonly
|
|
76
|
-
readonly
|
|
77
|
-
readonly
|
|
78
|
-
readonly
|
|
79
|
-
readonly
|
|
80
|
-
readonly
|
|
81
|
-
readonly
|
|
82
|
-
readonly
|
|
83
|
-
readonly
|
|
84
|
-
readonly
|
|
85
|
-
readonly
|
|
86
|
-
readonly
|
|
87
|
-
readonly
|
|
88
|
-
readonly
|
|
89
|
-
readonly
|
|
90
|
-
readonly
|
|
91
|
-
readonly
|
|
92
|
-
readonly
|
|
93
|
-
readonly
|
|
94
|
-
readonly
|
|
95
|
-
readonly
|
|
96
|
-
readonly
|
|
97
|
-
readonly
|
|
98
|
-
readonly
|
|
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 'remove-item.button': 'Delete item';
|
|
48
|
+
readonly 'add-item.button': 'Add item';
|
|
49
|
+
readonly 'add-property-button.label': 'Add property';
|
|
50
|
+
readonly 'boolean-input-true.value': 'Yes';
|
|
51
|
+
readonly 'boolean-input-false.value': 'No';
|
|
52
|
+
readonly 'show-field.label': 'Show field';
|
|
53
|
+
readonly 'hide-field.label': 'Hide field';
|
|
54
|
+
readonly 'delete-field.label': 'Delete field';
|
|
55
|
+
readonly 'create-option.label': 'Create';
|
|
56
|
+
readonly 'add-tag.label': 'Add tag';
|
|
57
|
+
readonly 'ref-field-combobox-input.placeholder': 'Search\u2026';
|
|
58
|
+
readonly 'ref-field.placeholder': 'Select\u2026';
|
|
59
|
+
readonly 'ref-field.placeholder_one': 'Select\u2026';
|
|
60
|
+
readonly 'ref-field.placeholder_other': 'Select items\u2026';
|
|
61
|
+
readonly 'example.placeholder': 'Example';
|
|
62
|
+
readonly 'latitude.placeholder': 'Latitude (e.g., 40.7128)';
|
|
63
|
+
readonly 'longitude.placeholder': 'Longitude (e.g., -74.0060)';
|
|
64
|
+
readonly 'cancel-button.label': 'Cancel';
|
|
65
|
+
readonly 'save-button.label': 'Save';
|
|
66
|
+
readonly 'create-text.label': 'Create text';
|
|
67
|
+
readonly 'format.boolean.label': 'Boolean';
|
|
68
|
+
readonly 'format.currency.label': 'Currency';
|
|
69
|
+
readonly 'format.date.label': 'Date';
|
|
70
|
+
readonly 'format.date-time.label': 'DateTime';
|
|
71
|
+
readonly 'format.did.label': 'DID';
|
|
72
|
+
readonly 'format.duration.label': 'Duration';
|
|
73
|
+
readonly 'format.dxn.label': 'DXN';
|
|
74
|
+
readonly 'format.email.label': 'Email';
|
|
75
|
+
readonly 'format.formula.label': 'Formula';
|
|
76
|
+
readonly 'format.hostname.label': 'Hostname';
|
|
77
|
+
readonly 'format.integer.label': 'Integer';
|
|
78
|
+
readonly 'format.json.label': 'JSON';
|
|
79
|
+
readonly 'format.lnglat.label': 'Geopoint';
|
|
80
|
+
readonly 'format.markdown.label': 'Markdown';
|
|
81
|
+
readonly 'format.percent.label': 'Percent';
|
|
82
|
+
readonly 'format.ref.label': 'Reference';
|
|
83
|
+
readonly 'format.regex.label': 'RegExp';
|
|
84
|
+
readonly 'format.string.label': 'String';
|
|
85
|
+
readonly 'format.single-select.label': 'Select';
|
|
86
|
+
readonly 'format.multi-select.label': 'Multi-select';
|
|
87
|
+
readonly 'format.text.label': 'Long text';
|
|
88
|
+
readonly 'format.time.label': 'Time';
|
|
89
|
+
readonly 'format.timestamp.label': 'Timestamp';
|
|
90
|
+
readonly 'format.user.label': 'User';
|
|
91
|
+
readonly 'format.number.label': 'Number';
|
|
92
|
+
readonly 'format.uri.label': 'URI';
|
|
93
|
+
readonly 'format.url.label': 'URL';
|
|
94
|
+
readonly 'format.uuid.label': 'UUID';
|
|
95
|
+
readonly 'latitude.label': 'Latitude';
|
|
96
|
+
readonly 'longitude.label': 'Longitude';
|
|
97
|
+
readonly 'select-option.label': 'Label';
|
|
98
|
+
readonly 'select-option-label.placeholder': 'Option label';
|
|
99
|
+
readonly 'select-option-delete.button': 'Delete';
|
|
100
|
+
readonly 'select-option-add.button': 'Add option';
|
|
101
|
+
readonly 'system-schema.title': 'System type';
|
|
102
|
+
readonly 'system-schema.description': 'System type: cannot add or remove fields.';
|
|
103
|
+
readonly 'remove.button': 'Delete';
|
|
99
104
|
};
|
|
100
105
|
};
|
|
101
106
|
})[];
|
|
@@ -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;AAerF,OAAO,iCAAiC,CAAC;AAwGzC,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,28 +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
|
-
}
|
|
10
|
-
|
|
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 = {
|
|
11
10
|
update?: (cell?: DxGridPosition) => void;
|
|
12
11
|
handleInsertRowResult?: (insertRowResult?: InsertRowResult) => void;
|
|
13
12
|
};
|
|
14
|
-
|
|
15
|
-
model?: TableModel;
|
|
16
|
-
presentation?: TablePresentation;
|
|
17
|
-
schema?: Schema.Schema.AnyNoContext;
|
|
18
|
-
client?: Client;
|
|
19
|
-
ignoreAttention?: boolean;
|
|
20
|
-
onCreate?: OnCreateHandler;
|
|
21
|
-
onRowClick?: (row: any) => void;
|
|
22
|
-
testId?: string;
|
|
23
|
-
};
|
|
13
|
+
type TableRootProps = PropsWithChildren;
|
|
24
14
|
export declare const Table: {
|
|
25
|
-
Root:
|
|
26
|
-
|
|
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>>;
|
|
27
24
|
};
|
|
25
|
+
export type { TableController, TableRootProps };
|
|
26
|
+
export { useTableContext };
|
|
28
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,6 +1,6 @@
|
|
|
1
1
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
type
|
|
3
|
+
type DefaultStoryProps = {
|
|
4
4
|
rows?: number;
|
|
5
5
|
};
|
|
6
6
|
declare const meta: {
|
|
@@ -12,33 +12,100 @@ declare const meta: {
|
|
|
12
12
|
controls: {
|
|
13
13
|
disable: boolean;
|
|
14
14
|
};
|
|
15
|
-
translations:
|
|
15
|
+
translations: ({
|
|
16
16
|
readonly 'en-US': {
|
|
17
|
-
readonly "react-ui-table": {
|
|
18
|
-
readonly 'object
|
|
19
|
-
readonly 'create
|
|
20
|
-
readonly 'table
|
|
21
|
-
readonly 'settings
|
|
22
|
-
readonly 'table
|
|
23
|
-
readonly '
|
|
24
|
-
readonly '
|
|
25
|
-
readonly '
|
|
26
|
-
readonly '
|
|
27
|
-
readonly '
|
|
28
|
-
readonly 'column
|
|
29
|
-
readonly 'column
|
|
30
|
-
readonly 'column
|
|
31
|
-
readonly '
|
|
32
|
-
readonly '
|
|
33
|
-
readonly '
|
|
34
|
-
readonly '
|
|
35
|
-
readonly '
|
|
36
|
-
readonly '
|
|
37
|
-
readonly 'create new object label': "Create new object “{{text}}”";
|
|
38
|
-
readonly 'save view label': "Save changes to view";
|
|
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';
|
|
39
37
|
};
|
|
40
38
|
};
|
|
41
|
-
}
|
|
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 'remove-item.button': 'Delete item';
|
|
50
|
+
readonly 'add-item.button': 'Add item';
|
|
51
|
+
readonly 'add-property-button.label': 'Add property';
|
|
52
|
+
readonly 'boolean-input-true.value': 'Yes';
|
|
53
|
+
readonly 'boolean-input-false.value': 'No';
|
|
54
|
+
readonly 'show-field.label': 'Show field';
|
|
55
|
+
readonly 'hide-field.label': 'Hide field';
|
|
56
|
+
readonly 'delete-field.label': 'Delete field';
|
|
57
|
+
readonly 'create-option.label': 'Create';
|
|
58
|
+
readonly 'add-tag.label': 'Add tag';
|
|
59
|
+
readonly 'ref-field-combobox-input.placeholder': 'Search\u2026';
|
|
60
|
+
readonly 'ref-field.placeholder': 'Select\u2026';
|
|
61
|
+
readonly 'ref-field.placeholder_one': 'Select\u2026';
|
|
62
|
+
readonly 'ref-field.placeholder_other': 'Select items\u2026';
|
|
63
|
+
readonly 'example.placeholder': 'Example';
|
|
64
|
+
readonly 'latitude.placeholder': 'Latitude (e.g., 40.7128)';
|
|
65
|
+
readonly 'longitude.placeholder': 'Longitude (e.g., -74.0060)';
|
|
66
|
+
readonly 'cancel-button.label': 'Cancel';
|
|
67
|
+
readonly 'save-button.label': 'Save';
|
|
68
|
+
readonly 'create-text.label': 'Create text';
|
|
69
|
+
readonly 'format.boolean.label': 'Boolean';
|
|
70
|
+
readonly 'format.currency.label': 'Currency';
|
|
71
|
+
readonly 'format.date.label': 'Date';
|
|
72
|
+
readonly 'format.date-time.label': 'DateTime';
|
|
73
|
+
readonly 'format.did.label': 'DID';
|
|
74
|
+
readonly 'format.duration.label': 'Duration';
|
|
75
|
+
readonly 'format.dxn.label': 'DXN';
|
|
76
|
+
readonly 'format.email.label': 'Email';
|
|
77
|
+
readonly 'format.formula.label': 'Formula';
|
|
78
|
+
readonly 'format.hostname.label': 'Hostname';
|
|
79
|
+
readonly 'format.integer.label': 'Integer';
|
|
80
|
+
readonly 'format.json.label': 'JSON';
|
|
81
|
+
readonly 'format.lnglat.label': 'Geopoint';
|
|
82
|
+
readonly 'format.markdown.label': 'Markdown';
|
|
83
|
+
readonly 'format.percent.label': 'Percent';
|
|
84
|
+
readonly 'format.ref.label': 'Reference';
|
|
85
|
+
readonly 'format.regex.label': 'RegExp';
|
|
86
|
+
readonly 'format.string.label': 'String';
|
|
87
|
+
readonly 'format.single-select.label': 'Select';
|
|
88
|
+
readonly 'format.multi-select.label': 'Multi-select';
|
|
89
|
+
readonly 'format.text.label': 'Long text';
|
|
90
|
+
readonly 'format.time.label': 'Time';
|
|
91
|
+
readonly 'format.timestamp.label': 'Timestamp';
|
|
92
|
+
readonly 'format.user.label': 'User';
|
|
93
|
+
readonly 'format.number.label': 'Number';
|
|
94
|
+
readonly 'format.uri.label': 'URI';
|
|
95
|
+
readonly 'format.url.label': 'URL';
|
|
96
|
+
readonly 'format.uuid.label': 'UUID';
|
|
97
|
+
readonly 'latitude.label': 'Latitude';
|
|
98
|
+
readonly 'longitude.label': 'Longitude';
|
|
99
|
+
readonly 'select-option.label': 'Label';
|
|
100
|
+
readonly 'select-option-label.placeholder': 'Option label';
|
|
101
|
+
readonly 'select-option-delete.button': 'Delete';
|
|
102
|
+
readonly 'select-option-add.button': 'Add option';
|
|
103
|
+
readonly 'system-schema.title': 'System type';
|
|
104
|
+
readonly 'system-schema.description': 'System type: cannot add or remove fields.';
|
|
105
|
+
readonly 'remove.button': 'Delete';
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
})[];
|
|
42
109
|
};
|
|
43
110
|
};
|
|
44
111
|
export default meta;
|
|
@@ -46,5 +113,5 @@ type Story = StoryObj<typeof meta>;
|
|
|
46
113
|
export declare const Default: Story;
|
|
47
114
|
export declare const StaticSchema: StoryObj;
|
|
48
115
|
export declare const ArrayOfObjects: StoryObj;
|
|
49
|
-
export declare const Tags: Meta<
|
|
116
|
+
export declare const Tags: Meta<DefaultStoryProps>;
|
|
50
117
|
//# 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,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAsB,MAAM,OAAO,CAAC;
|
|
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;AAiJ3C,KAAK,iBAAiB,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAQ3C,QAAA,MAAM,IAAI;;;;;QAwCN,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;AAcF,eAAO,MAAM,cAAc,EAAE,QA4B5B,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,iBAAiB,CAwDxC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
attendableId?: string;
|
|
11
|
+
onCreate?: OnCreateHandler;
|
|
12
|
+
onRowClick?: (row: any) => void;
|
|
13
|
+
testId?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const TableContent: React.ForwardRefExoticComponent<Omit<TableContentProps, "className"> & {
|
|
16
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
17
|
+
} & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
//# 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;AAkBvC,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,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,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;;2HA6WxB,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;AAG9D,OAAO,EAGL,KAAK,gBAAgB,EAErB,KAAK,UAAU,EACf,aAAa,EAId,MAAM,qBAAqB,CAAC;AAI7B,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,20 +1,18 @@
|
|
|
1
|
-
import * as Schema from 'effect/Schema';
|
|
2
1
|
import React from 'react';
|
|
2
|
+
import { Type } from '@dxos/echo';
|
|
3
3
|
import { Ref } from '@dxos/echo/internal';
|
|
4
|
-
import { type
|
|
5
|
-
import { type FormProps } from '@dxos/react-ui-form';
|
|
4
|
+
import { type FormRootProps } from '@dxos/react-ui-form';
|
|
6
5
|
import { type FieldProjection } from '@dxos/schema';
|
|
7
6
|
import { type ModalController, type TableModel } from '../../model';
|
|
8
|
-
export type OnCreateHandler = (schema:
|
|
9
|
-
export type FormCellEditorProps = {
|
|
10
|
-
|
|
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;
|
|
11
11
|
model?: TableModel;
|
|
12
|
-
|
|
12
|
+
fieldProjection: FieldProjection;
|
|
13
|
+
modals?: ModalController;
|
|
13
14
|
onSave?: () => void;
|
|
14
15
|
onCreate?: OnCreateHandler;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
__gridScope: any;
|
|
18
|
-
} & Omit<FormProps<any>, 'values' | 'schema' | 'onCreate'>;
|
|
19
|
-
export declare const FormCellEditor: ({ fieldProjection, model, schema, onSave, client, modals, onCreate, __gridScope, ...formProps }: FormCellEditorProps) => React.JSX.Element | null;
|
|
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;
|
|
20
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,IAAI,EAAE,MAAM,YAAY,CAAC;AAC1C,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"}
|