@dxos/react-ui-table 0.8.4-main.72ec0f3 → 0.8.4-main.7996785055

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.
Files changed (145) hide show
  1. package/dist/lib/browser/chunk-BF54SSNL.mjs +70 -0
  2. package/dist/lib/browser/chunk-BF54SSNL.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-GS2UNGJK.mjs → chunk-EK6D2CVM.mjs} +656 -680
  4. package/dist/lib/browser/chunk-EK6D2CVM.mjs.map +7 -0
  5. package/dist/lib/browser/index.mjs +1148 -990
  6. package/dist/lib/browser/index.mjs.map +4 -4
  7. package/dist/lib/browser/meta.json +1 -1
  8. package/dist/lib/browser/testing/index.mjs +30 -42
  9. package/dist/lib/browser/testing/index.mjs.map +3 -3
  10. package/dist/lib/browser/types/index.mjs +3 -3
  11. package/dist/lib/node-esm/{chunk-TRR3C5NX.mjs → chunk-LYYDF6JP.mjs} +656 -679
  12. package/dist/lib/node-esm/chunk-LYYDF6JP.mjs.map +7 -0
  13. package/dist/lib/node-esm/chunk-SIRDIPHZ.mjs +71 -0
  14. package/dist/lib/node-esm/chunk-SIRDIPHZ.mjs.map +7 -0
  15. package/dist/lib/node-esm/index.mjs +1148 -990
  16. package/dist/lib/node-esm/index.mjs.map +4 -4
  17. package/dist/lib/node-esm/meta.json +1 -1
  18. package/dist/lib/node-esm/testing/index.mjs +30 -42
  19. package/dist/lib/node-esm/testing/index.mjs.map +3 -3
  20. package/dist/lib/node-esm/types/index.mjs +3 -3
  21. package/dist/types/src/components/Table/ColumnActionsMenu.d.ts +1 -2
  22. package/dist/types/src/components/Table/ColumnActionsMenu.d.ts.map +1 -1
  23. package/dist/types/src/components/Table/ColumnSettings.d.ts +2 -2
  24. package/dist/types/src/components/Table/ColumnSettings.d.ts.map +1 -1
  25. package/dist/types/src/components/Table/DynamicTable.d.ts +7 -7
  26. package/dist/types/src/components/Table/DynamicTable.d.ts.map +1 -1
  27. package/dist/types/src/components/Table/DynamicTable.stories.d.ts +4 -18
  28. package/dist/types/src/components/Table/DynamicTable.stories.d.ts.map +1 -1
  29. package/dist/types/src/components/Table/Relations.stories.d.ts +13 -8
  30. package/dist/types/src/components/Table/Relations.stories.d.ts.map +1 -1
  31. package/dist/types/src/components/Table/RowActionsMenu.d.ts.map +1 -1
  32. package/dist/types/src/components/Table/Table.d.ts +28 -21
  33. package/dist/types/src/components/Table/Table.d.ts.map +1 -1
  34. package/dist/types/src/components/Table/Table.stories.d.ts +74 -7
  35. package/dist/types/src/components/Table/Table.stories.d.ts.map +1 -1
  36. package/dist/types/src/components/Table/TableContent.d.ts +21 -0
  37. package/dist/types/src/components/Table/TableContent.d.ts.map +1 -0
  38. package/dist/types/src/components/Table/TableToolbar.d.ts +25 -0
  39. package/dist/types/src/components/Table/TableToolbar.d.ts.map +1 -0
  40. package/dist/types/src/components/TableCellEditor/CellValidationMessage.d.ts +1 -1
  41. package/dist/types/src/components/TableCellEditor/FormCellEditor.d.ts +10 -12
  42. package/dist/types/src/components/TableCellEditor/FormCellEditor.d.ts.map +1 -1
  43. package/dist/types/src/components/TableCellEditor/TableCellEditor.d.ts +5 -7
  44. package/dist/types/src/components/TableCellEditor/TableCellEditor.d.ts.map +1 -1
  45. package/dist/types/src/components/TableCellEditor/TableCellEditor.stories.d.ts +7 -7
  46. package/dist/types/src/components/TableCellEditor/TableCellEditor.stories.d.ts.map +1 -1
  47. package/dist/types/src/components/index.d.ts +0 -1
  48. package/dist/types/src/components/index.d.ts.map +1 -1
  49. package/dist/types/src/components/testing.d.ts +22 -15
  50. package/dist/types/src/components/testing.d.ts.map +1 -1
  51. package/dist/types/src/hooks/index.d.ts +2 -1
  52. package/dist/types/src/hooks/index.d.ts.map +1 -1
  53. package/dist/types/src/hooks/useAddRow.d.ts +5 -6
  54. package/dist/types/src/hooks/useAddRow.d.ts.map +1 -1
  55. package/dist/types/src/hooks/useProjectionModel.d.ts +6 -0
  56. package/dist/types/src/hooks/useProjectionModel.d.ts.map +1 -0
  57. package/dist/types/src/hooks/useTableModel.d.ts +9 -9
  58. package/dist/types/src/hooks/useTableModel.d.ts.map +1 -1
  59. package/dist/types/src/model/modal-controller.d.ts +5 -1
  60. package/dist/types/src/model/modal-controller.d.ts.map +1 -1
  61. package/dist/types/src/model/selection-model.d.ts +17 -8
  62. package/dist/types/src/model/selection-model.d.ts.map +1 -1
  63. package/dist/types/src/model/table-model.d.ts +104 -24
  64. package/dist/types/src/model/table-model.d.ts.map +1 -1
  65. package/dist/types/src/model/table-presentation.d.ts +3 -1
  66. package/dist/types/src/model/table-presentation.d.ts.map +1 -1
  67. package/dist/types/src/playwright/TableManager.d.ts +2 -1
  68. package/dist/types/src/playwright/TableManager.d.ts.map +1 -1
  69. package/dist/types/src/testing/useTestTableModel.d.ts +18 -15
  70. package/dist/types/src/testing/useTestTableModel.d.ts.map +1 -1
  71. package/dist/types/src/translations.d.ts +4 -4
  72. package/dist/types/src/translations.d.ts.map +1 -1
  73. package/dist/types/src/types/Table.d.ts +26 -0
  74. package/dist/types/src/types/Table.d.ts.map +1 -0
  75. package/dist/types/src/types/index.d.ts +1 -1
  76. package/dist/types/src/types/index.d.ts.map +1 -1
  77. package/dist/types/src/util/dynamic-table.d.ts +14 -11
  78. package/dist/types/src/util/dynamic-table.d.ts.map +1 -1
  79. package/dist/types/src/util/dynamic-table.test.d.ts +2 -0
  80. package/dist/types/src/util/dynamic-table.test.d.ts.map +1 -0
  81. package/dist/types/src/util/index.d.ts +2 -0
  82. package/dist/types/src/util/index.d.ts.map +1 -1
  83. package/dist/types/src/util/query-ast.d.ts +7 -0
  84. package/dist/types/src/util/query-ast.d.ts.map +1 -0
  85. package/dist/types/src/util/sort.d.ts +12 -0
  86. package/dist/types/src/util/sort.d.ts.map +1 -0
  87. package/dist/types/tsconfig.tsbuildinfo +1 -1
  88. package/package.json +54 -55
  89. package/src/components/Table/ColumnActionsMenu.tsx +10 -6
  90. package/src/components/Table/ColumnSettings.tsx +8 -9
  91. package/src/components/Table/DynamicTable.stories.tsx +16 -16
  92. package/src/components/Table/DynamicTable.tsx +32 -31
  93. package/src/components/Table/Relations.stories.tsx +58 -53
  94. package/src/components/Table/RowActionsMenu.tsx +3 -2
  95. package/src/components/Table/Table.stories.tsx +111 -94
  96. package/src/components/Table/Table.tsx +43 -406
  97. package/src/components/Table/TableContent.tsx +422 -0
  98. package/src/components/{TableToolbar → Table}/TableToolbar.tsx +42 -43
  99. package/src/components/TableCellEditor/CellValidationMessage.tsx +5 -5
  100. package/src/components/TableCellEditor/FormCellEditor.tsx +118 -135
  101. package/src/components/TableCellEditor/TableCellEditor.stories.tsx +16 -12
  102. package/src/components/TableCellEditor/TableCellEditor.tsx +37 -32
  103. package/src/components/index.ts +0 -1
  104. package/src/components/testing.ts +38 -12
  105. package/src/hooks/index.ts +2 -1
  106. package/src/hooks/useAddRow.ts +8 -10
  107. package/src/hooks/useProjectionModel.ts +39 -0
  108. package/src/hooks/useTableModel.ts +36 -34
  109. package/src/model/modal-controller.ts +23 -12
  110. package/src/model/selection-model.ts +75 -44
  111. package/src/model/table-model.test.ts +82 -54
  112. package/src/model/table-model.ts +430 -167
  113. package/src/model/table-presentation.test.ts +59 -49
  114. package/src/model/table-presentation.ts +43 -37
  115. package/src/playwright/TableManager.ts +13 -6
  116. package/src/playwright/playwright.config.ts +1 -1
  117. package/src/playwright/smoke.spec.ts +49 -5
  118. package/src/testing/useTestTableModel.ts +45 -38
  119. package/src/translations.ts +3 -3
  120. package/src/types/Table.ts +79 -0
  121. package/src/types/index.ts +1 -1
  122. package/src/util/dynamic-table.test.ts +70 -0
  123. package/src/util/dynamic-table.ts +40 -26
  124. package/src/util/index.ts +2 -0
  125. package/src/util/query-ast.ts +22 -0
  126. package/src/util/sort.ts +90 -0
  127. package/src/util/table-buttons.ts +1 -1
  128. package/src/util/table-controls.ts +2 -2
  129. package/dist/lib/browser/chunk-2PFAPQL4.mjs +0 -66
  130. package/dist/lib/browser/chunk-2PFAPQL4.mjs.map +0 -7
  131. package/dist/lib/browser/chunk-GS2UNGJK.mjs.map +0 -7
  132. package/dist/lib/node-esm/chunk-6POOFFYF.mjs +0 -67
  133. package/dist/lib/node-esm/chunk-6POOFFYF.mjs.map +0 -7
  134. package/dist/lib/node-esm/chunk-TRR3C5NX.mjs.map +0 -7
  135. package/dist/types/src/components/TableToolbar/TableToolbar.d.ts +0 -21
  136. package/dist/types/src/components/TableToolbar/TableToolbar.d.ts.map +0 -1
  137. package/dist/types/src/components/TableToolbar/index.d.ts +0 -2
  138. package/dist/types/src/components/TableToolbar/index.d.ts.map +0 -1
  139. package/dist/types/src/model/table-sorting.d.ts +0 -52
  140. package/dist/types/src/model/table-sorting.d.ts.map +0 -1
  141. package/dist/types/src/types/schema.d.ts +0 -28
  142. package/dist/types/src/types/schema.d.ts.map +0 -1
  143. package/src/components/TableToolbar/index.ts +0 -5
  144. package/src/model/table-sorting.ts +0 -225
  145. package/src/types/schema.ts +0 -73
@@ -1,28 +1,35 @@
1
- import type * as Schema from 'effect/Schema';
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, type TableModel, type TablePresentation } from '../../model';
6
- import { type OnCreateHandler } from '../TableCellEditor';
7
- export type TableRootProps = PropsWithChildren<{
8
- role?: string;
9
- }>;
10
- export type TableController = {
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
- export type TableMainProps = {
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: ({ children, role }: TableRootProps) => React.JSX.Element;
26
- Main: React.ForwardRefExoticComponent<TableMainProps & React.RefAttributes<TableController>>;
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
+ } & {
21
+ className?: string;
22
+ children?: React.ReactNode;
23
+ role?: string;
24
+ } & React.RefAttributes<HTMLDivElement>>;
25
+ Content: React.ForwardRefExoticComponent<Omit<import("./TableContent").TableContentProps, "className"> & {
26
+ classNames?: import("@dxos/ui-types").ClassNameValue;
27
+ } & {
28
+ className?: string;
29
+ children?: React.ReactNode;
30
+ role?: string;
31
+ } & React.RefAttributes<HTMLDivElement>>;
27
32
  };
33
+ export type { TableController, TableRootProps };
34
+ export { useTableContext };
28
35
  //# sourceMappingURL=Table.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/Table.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAE7C,OAAO,KAAK,EAAE,EAEZ,KAAK,iBAAiB,EAQvB,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAIL,KAAK,cAAc,EAMpB,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EAAE,KAAK,eAAe,EAAmB,KAAK,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE7G,OAAO,EAAE,KAAK,eAAe,EAA+C,MAAM,oBAAoB,C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I,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;;;;;;;;;;;;;;;;;;CAIjB,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 StoryProps = {
3
+ type DefaultStoryProps = {
4
4
  rows?: number;
5
5
  };
6
6
  declare const meta: {
@@ -12,15 +12,15 @@ 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": {
17
+ readonly "@dxos/react-ui-table": {
18
18
  readonly 'object placeholder': "New table";
19
19
  readonly 'create object label': "Create table";
20
20
  readonly 'table name placeholder': "Table name";
21
21
  readonly 'settings title': "Table settings";
22
- readonly 'table schema label': "Record type";
23
- readonly 'new schema': "New record type";
22
+ readonly 'table schema label': "Type";
23
+ readonly 'new schema': "New type";
24
24
  readonly 'continue label': "Continue";
25
25
  readonly 'create stack section label': "Create table";
26
26
  readonly 'add row label': "Add row";
@@ -38,7 +38,74 @@ declare const meta: {
38
38
  readonly 'save view label': "Save changes to view";
39
39
  };
40
40
  };
41
- }];
41
+ } | {
42
+ readonly 'en-US': {
43
+ readonly "@dxos/react-ui-form": {
44
+ readonly "fields label": "Fields";
45
+ readonly "hidden fields label": "Hidden Fields";
46
+ readonly "empty readonly ref field label": "(none)";
47
+ readonly "add property button label": "Add property";
48
+ readonly "field property label": "Property";
49
+ readonly "field property placeholder": "Property name";
50
+ readonly "field format label": "Type";
51
+ readonly "field path label": "Field path";
52
+ readonly "add field": "Add field";
53
+ readonly "delete field": "Delete field";
54
+ readonly "field limit reached": "Maximum number of fields reached";
55
+ readonly "boolean input true value": "Yes";
56
+ readonly "boolean input false value": "No";
57
+ readonly "show field label": "Show field";
58
+ readonly "hide field label": "Hide field";
59
+ readonly "delete field label": "Delete field";
60
+ readonly "ref field combobox input placeholder": "Search\u2026";
61
+ readonly "ref field placeholder_one": "Select\u2026";
62
+ readonly "ref field placeholder_other": "Select items\u2026";
63
+ readonly "create option label": "Create";
64
+ readonly "example placeholder": "Example";
65
+ readonly "latitude placeholder": "Latitude (e.g., 40.7128)";
66
+ readonly "longitude placeholder": "Longitude (e.g., -74.0060)";
67
+ readonly "cancel button label": "Cancel";
68
+ readonly "save button label": "Save";
69
+ readonly "format boolean": "Boolean";
70
+ readonly "format currency": "Currency";
71
+ readonly "format date": "Date";
72
+ readonly "format date-time": "DateTime";
73
+ readonly "format did": "DID";
74
+ readonly "format duration": "Duration";
75
+ readonly "format dxn": "DXN";
76
+ readonly "format email": "Email";
77
+ readonly "format formula": "Formula";
78
+ readonly "format hostname": "Hostname";
79
+ readonly "format integer": "Integer";
80
+ readonly "format json": "JSON";
81
+ readonly "format lnglat": "Geopoint";
82
+ readonly "format markdown": "Markdown";
83
+ readonly "format percent": "Percent";
84
+ readonly "format ref": "Reference";
85
+ readonly "format regex": "RegExp";
86
+ readonly "format string": "String";
87
+ readonly "format single-select": "Select";
88
+ readonly "format multi-select": "Multi-select";
89
+ readonly "format text": "Long text";
90
+ readonly "format time": "Time";
91
+ readonly "format timestamp": "Timestamp";
92
+ readonly "format user": "User";
93
+ readonly "format number": "Number";
94
+ readonly "format uri": "URI";
95
+ readonly "format url": "URL";
96
+ readonly "format uuid": "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 color": "Color";
102
+ readonly "select option delete": "Delete";
103
+ readonly "select option add": "Add option";
104
+ readonly "system schema title": "System type";
105
+ readonly "system schema description": "System type: cannot add or remove fields.";
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<StoryProps>;
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;AAgJ3C,KAAK,UAAU,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAQpC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsC6B,CAAC;AAExC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,YAAY,EAAE,QAuB1B,CAAC;AAmBF,eAAO,MAAM,cAAc,EAAE,QAwB5B,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,UAAU,CAuDjC,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;AAmJ3C,KAAK,iBAAiB,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAQ3C,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2C6B,CAAC;AAExC,eAAe,IAAI,CAAC;AAEpB,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,21 @@
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
+ } & {
17
+ className?: string;
18
+ children?: React.ReactNode;
19
+ role?: string;
20
+ } & React.RefAttributes<HTMLDivElement>>;
21
+ //# 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;AAmBvG,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;;;;;;wCA0WxB,CAAC"}
@@ -0,0 +1,25 @@
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
+ } & {
20
+ className?: string;
21
+ children?: React.ReactNode;
22
+ role?: string;
23
+ } & React.RefAttributes<HTMLDivElement>>;
24
+ export {};
25
+ //# 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;;;;;;wCAsBxB,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, __gridScope, }: GridScopedProps<CellValidationMessageProps>) => React.JSX.Element | null;
7
+ export declare const CellValidationMessage: ({ __gridScope, validationError, variant, }: GridScopedProps<CellValidationMessageProps>) => React.JSX.Element | null;
8
8
  //# sourceMappingURL=CellValidationMessage.d.ts.map
@@ -1,20 +1,18 @@
1
- import * as Schema from 'effect/Schema';
2
1
  import React from 'react';
2
+ import { type Type } from '@dxos/echo';
3
3
  import { Ref } from '@dxos/echo/internal';
4
- import { type Client } from '@dxos/react-client';
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: Schema.Schema.AnyNoContext, values: any) => Parameters<typeof Ref.make>[0];
9
- export type FormCellEditorProps = {
10
- fieldProjection: FieldProjection;
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
- schema?: Schema.Schema.AnyNoContext;
12
+ fieldProjection: FieldProjection;
13
+ modals?: ModalController;
13
14
  onSave?: () => void;
14
15
  onCreate?: OnCreateHandler;
15
- client?: Client;
16
- modals?: ModalController;
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":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAA4D,MAAM,OAAO,CAAC;AAGjF,OAAO,EAAc,GAAG,EAAiC,MAAM,qBAAqB,CAAC;AAGrF,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAGjD,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,qBAA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B,MAAM,aAAa,CAAC;AAMnF,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,GAAG,IAAI,CAAC,SAAS,EAAE,iFAQvE,mBAAmB,CAAC,CAAC,CAAC,6BA4JxB,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { type Completion } from '@codemirror/autocomplete';
2
- import type * as Schema from 'effect/Schema';
3
2
  import React from 'react';
4
- import type { Client } from '@dxos/client';
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';
@@ -12,15 +11,14 @@ import { type OnCreateHandler } from './FormCellEditor';
12
11
  export type QueryResult = Pick<Completion, 'label'> & {
13
12
  data: any;
14
13
  };
15
- export type TableCellEditorProps = {
14
+ export type TableCellEditorProps<T extends Type.AnyEntity = Type.AnyEntity> = {
15
+ schema?: T;
16
16
  model?: TableModel;
17
17
  modals?: ModalController;
18
- schema?: Schema.Schema.AnyNoContext;
19
18
  onFocus?: (axis?: DxGridAxis, delta?: -1 | 0 | 1, cell?: DxGridPosition) => void;
20
19
  onCreate?: OnCreateHandler;
21
20
  onSave?: () => void;
22
- client?: Client;
23
21
  };
24
- export declare const TableValueEditor: ({ model, modals, schema, onFocus, onSave, onCreate, client, __gridScope, }: GridScopedProps<TableCellEditorProps>) => React.JSX.Element;
25
- export declare const TableCellEditor: ({ model, modals, onFocus, onSave, __gridScope, }: GridScopedProps<TableCellEditorProps>) => React.JSX.Element;
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;
26
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,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAiD,MAAM,OAAO,CAAC;AAGtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C,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;AAGpE,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExE;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,IAAI,CAA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AM,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,GAAG,IAAI,CAAC,SAAS,EAAE,oEAQzE,eAAe,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,sBAoC1C,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,kDAM7B,eAAe,CAAC,oBAAoB,CAAC,sBA2JvC,CAAC"}
@@ -1,24 +1,25 @@
1
1
  import { type StoryObj } from '@storybook/react-vite';
2
2
  import React from 'react';
3
3
  import { type GridEditing } from '@dxos/react-ui-grid';
4
- type StoryProps = {
4
+ type DefaultStoryProps = {
5
5
  editing: GridEditing;
6
6
  };
7
7
  declare const meta: {
8
8
  title: string;
9
- component: ({ editing }: StoryProps) => React.JSX.Element;
10
- render: ({ editing }: StoryProps) => React.JSX.Element;
9
+ component: ({ editing }: DefaultStoryProps) => React.JSX.Element;
10
+ render: ({ editing }: DefaultStoryProps) => React.JSX.Element;
11
11
  decorators: import("@storybook/react").Decorator[];
12
12
  parameters: {
13
+ layout: string;
13
14
  translations: [{
14
15
  readonly 'en-US': {
15
- readonly "react-ui-table": {
16
+ readonly "@dxos/react-ui-table": {
16
17
  readonly 'object placeholder': "New table";
17
18
  readonly 'create object label': "Create table";
18
19
  readonly 'table name placeholder': "Table name";
19
20
  readonly 'settings title': "Table settings";
20
- readonly 'table schema label': "Record type";
21
- readonly 'new schema': "New record type";
21
+ readonly 'table schema label': "Type";
22
+ readonly 'new schema': "New type";
22
23
  readonly 'continue label': "Continue";
23
24
  readonly 'create stack section label': "Create table";
24
25
  readonly 'add row label': "Add row";
@@ -37,7 +38,6 @@ declare const meta: {
37
38
  };
38
39
  };
39
40
  }];
40
- layout: string;
41
41
  };
42
42
  };
43
43
  export default meta;
@@ -1 +1 @@
1
- {"version":3,"file":"TableCellEditor.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/TableCellEditor/TableCellEditor.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAQ,KAAK,WAAW,EAAkB,MAAM,qBAAqB,CAAC;AAU7E,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,WAAW,CAAC;CACtB,CAAC;AAkBF,QAAA,MAAM,IAAI;;6BAhByB,UAAU;0BAAV,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6CR,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAC"}
1
+ {"version":3,"file":"TableCellEditor.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/TableCellEditor/TableCellEditor.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAQ,KAAK,WAAW,EAAkB,MAAM,qBAAqB,CAAC;AAU7E,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,WAAW,CAAC;CACtB,CAAC;AAmBF,QAAA,MAAM,IAAI;;6BAhByB,iBAAiB;0BAAjB,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+Cf,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAC"}
@@ -1,3 +1,2 @@
1
1
  export * from './Table';
2
- export * from './TableToolbar';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC"}
@@ -1,24 +1,31 @@
1
+ import { Atom } from '@effect-atom/atom-react';
1
2
  import * as Schema from 'effect/Schema';
3
+ import { Type } from '@dxos/echo';
2
4
  import { type ProjectionModel } from '@dxos/schema';
3
- export declare const TestSchema: import("@dxos/echo/internal").TypedObjectPrototype<import("@dxos/echo/internal").TypedObjectFields<{
4
- id: import("@dxos/keys").ObjectIdClass;
5
- name: Schema.optional<typeof Schema.String>;
6
- age: Schema.optional<typeof Schema.Number>;
7
- active: Schema.optional<typeof Schema.Boolean>;
8
- netWorth: Schema.optional<typeof Schema.Number>;
9
- }, import("@dxos/echo/internal").TypedObjectOptions>, Schema.Struct.Encoded<{
10
- id: import("@dxos/keys").ObjectIdClass;
11
- name: Schema.optional<typeof Schema.String>;
12
- age: Schema.optional<typeof Schema.Number>;
13
- active: Schema.optional<typeof Schema.Boolean>;
14
- netWorth: Schema.optional<typeof Schema.Number>;
15
- }>>;
16
- export declare const createItems: (n: number) => {
5
+ export declare const TestSchema: Type.Obj<{
6
+ readonly name?: string | undefined;
7
+ readonly age?: number | undefined;
8
+ readonly active?: boolean | undefined;
9
+ readonly netWorth?: number | undefined;
10
+ }, Schema.Struct.Fields>;
11
+ export type TestItem = {
17
12
  name: string;
18
13
  age: number;
19
14
  active: boolean;
20
15
  netWorth: number;
21
- }[];
16
+ };
17
+ /**
18
+ * Creates an Atom containing test items data.
19
+ */
20
+ export declare const createItemsAtom: (n: number) => Atom.Writable<{
21
+ data: TestItem[];
22
+ }, {
23
+ data: TestItem[];
24
+ }>;
25
+ /**
26
+ * Creates plain test items (non-reactive).
27
+ */
28
+ export declare const createItems: (n: number) => TestItem[];
22
29
  export type SimulatorProps = {
23
30
  projection: ProjectionModel;
24
31
  items: any[];
@@ -1 +1 @@
1
- {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../src/components/testing.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAMxC,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,UAAU;;;;;;;;;;;;GAMrB,CAAC;AAEH,eAAO,MAAM,WAAW,GAAI,GAAG,MAAM;;;;;GAWpC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,UAAU,EAAE,eAAe,CAAC;IAC5B,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,uDAAuD,cAAc,SA6DjG,CAAC"}
1
+ {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../src/components/testing.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAU,IAAI,EAAE,MAAM,YAAY,CAAC;AAI1C,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,UAAU;;;;;wBAUtB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,GAAG,MAAM;UACd,QAAQ,EAAE;;UAAV,QAAQ,EAAE;EAQpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,GAAG,MAAM,KAAG,QAAQ,EAO/C,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,UAAU,EAAE,eAAe,CAAC;IAC5B,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,uDAAuD,cAAc,SA6DjG,CAAC"}
@@ -1,3 +1,4 @@
1
- export * from './useTableModel';
2
1
  export * from './useAddRow';
2
+ export * from './useProjectionModel';
3
+ export * from './useTableModel';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC"}
@@ -1,14 +1,13 @@
1
- import type * as Schema from 'effect/Schema';
2
- import { type Space } from '@dxos/client/echo';
1
+ import { type Database, type Type } from '@dxos/echo';
3
2
  import { type InsertRowResult } from '../model';
4
- export type UseAddRowParams = {
5
- space?: Space;
6
- schema?: Schema.Schema.AnyNoContext;
3
+ export type UseAddRowProps = {
4
+ db?: Database.Database;
5
+ schema?: Type.AnyObj;
7
6
  };
8
7
  /**
9
8
  * Hook that provides a safe row creation function that handles schema validation failures.
10
9
  * Returns a callback that attempts to create an object and returns boolean success/failure.
11
10
  * Can accept optional data to create objects with specific content (used for committing draft rows).
12
11
  */
13
- export declare const useAddRow: ({ space, schema }: UseAddRowParams) => (data?: any) => InsertRowResult;
12
+ export declare const useAddRow: ({ db, schema }: UseAddRowProps) => (data?: any) => InsertRowResult;
14
13
  //# sourceMappingURL=useAddRow.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAddRow.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAddRow.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAG7C,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC;CACrC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,mBAAmB,eAAe,aAEhD,GAAG,KAAG,eAajB,CAAC"}
1
+ {"version":3,"file":"useAddRow.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAddRow.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,QAAQ,EAAO,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAE3D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC;IACvB,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC;CACtB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,gBAAgB,cAAc,aAE5C,GAAG,KAAG,eAajB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type Registry } from '@effect-atom/atom-react';
2
+ import { Type } from '@dxos/echo';
3
+ import { ProjectionModel } from '@dxos/schema';
4
+ import { type Table } from '../types';
5
+ export declare const useProjectionModel: <S extends Type.AnyEntity>(schema: S | undefined, table: Table.Table | undefined, registry: Registry.Registry) => ProjectionModel | undefined;
6
+ //# sourceMappingURL=useProjectionModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useProjectionModel.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useProjectionModel.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAGxD,OAAO,EAAc,IAAI,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,EAAE,eAAe,EAA4B,MAAM,cAAc,CAAC;AAEzE,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,eAAO,MAAM,kBAAkB,GAAI,CAAC,SAAS,IAAI,CAAC,SAAS,EACzD,QAAQ,CAAC,GAAG,SAAS,EACrB,OAAO,KAAK,CAAC,KAAK,GAAG,SAAS,EAC9B,UAAU,QAAQ,CAAC,QAAQ,gCAsB5B,CAAC"}
@@ -1,15 +1,15 @@
1
- import { type JsonSchemaType } from '@dxos/echo/internal';
2
- import { type Live } from '@dxos/live-object';
3
- import { type ProjectionModel, type View } from '@dxos/schema';
1
+ import { type Database } from '@dxos/echo';
2
+ import { type ProjectionModel } from '@dxos/schema';
4
3
  import { TableModel, type TableModelProps, type TableRow, type TableRowAction } from '../model';
5
- export type UseTableModelParams<T extends TableRow = TableRow> = {
6
- view?: View.View;
7
- schema?: JsonSchemaType;
4
+ import { type Table } from '../types';
5
+ export type UseTableModelProps<T extends TableRow = TableRow> = {
6
+ object?: Table.Table;
8
7
  projection?: ProjectionModel;
9
- rows?: Live<T>[];
8
+ db?: Database.Database;
9
+ rows?: T[];
10
10
  rowActions?: TableRowAction[];
11
11
  onSelectionChanged?: (selection: string[]) => void;
12
12
  onRowAction?: (actionId: string, data: T) => void;
13
- } & Pick<TableModelProps<T>, 'features' | 'onInsertRow' | 'onDeleteRows' | 'onDeleteColumn' | 'onCellUpdate' | 'onRowOrderChange'>;
14
- export declare const useTableModel: <T extends TableRow = TableRow>({ view, schema, projection, rows, rowActions, features, onSelectionChanged, onRowAction, ...props }: UseTableModelParams<T>) => TableModel<T> | undefined;
13
+ } & Pick<TableModelProps<T>, 'features' | 'onInsertRow' | 'onDeleteRows' | 'onColumnDelete' | 'onCellUpdate' | 'onRowOrderChange'>;
14
+ export declare const useTableModel: <T extends TableRow = TableRow>({ object, projection, db, rows, rowActions, features, onSelectionChanged, onRowAction, ...props }: UseTableModelProps<T>) => TableModel<T> | undefined;
15
15
  //# sourceMappingURL=useTableModel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useTableModel.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useTableModel.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC;AAG/D,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAEhG,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,QAAQ,GAAG,QAAQ,IAAI;IAC/D,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC;IACjB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,IAAI,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EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACnD,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;CACnD,GAAG,IAAI,CACN,eAAe,CAAC,CAAC,CAAC,EAClB,UAAU,GAAG,aAAa,GAAG,cAAc,GAAG,gBAAgB,GAAG,cAAc,GAAG,kBAAkB,CACrG,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,QAAQ,GAAG,QAAQ,EAAE,mGAU1D,kBAAkB,CAAC,CAAC,CAAC,KAAG,UAAU,CAAC,CAAC,CAAC,GAAG,SAgE1C,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { Atom, type Registry } from '@effect-atom/atom-react';
1
2
  import { type RefObject } from 'react';
2
3
  export type ColumnSettingsMode = {
3
4
  type: 'create';
@@ -22,9 +23,12 @@ export type ModalState = {
22
23
  type: 'closed';
23
24
  };
24
25
  export declare class ModalController {
26
+ private readonly _registry;
25
27
  private readonly _state;
26
28
  private readonly _triggerRef;
27
- get state(): import("@preact/signals-core").Signal<ModalState>;
29
+ constructor(registry: Registry.Registry);
30
+ get state(): Atom.Atom<ModalState>;
31
+ get stateValue(): ModalState;
28
32
  get trigger(): RefObject<HTMLButtonElement>;
29
33
  setTrigger: (trigger: HTMLElement) => void;
30
34
  showRowMenu: (rowIndex: number) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"modal-controller.d.ts","sourceRoot":"","sources":["../../../../src/model/modal-controller.ts"],"names":[],"mappings":"AAKA,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,MAAM,MAAM,kBAAkB,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAExF,MAAM,MAAM,UAAU,GAClB;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,QAA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,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACxD;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,IAAI,EAAE,kBAAkB,CAAA;CAAE,GACpD;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;AAEvB,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAoB;IAC9C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA4B;IACnD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA8E;gBAE9F,QAAQ,EAAE,QAAQ,CAAC,QAAQ;IAKvC,IAAW,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAExC;IAED,IAAW,UAAU,IAAI,UAAU,CAElC;IAED,IAAW,OAAO,IACW,SAAS,CAAC,iBAAiB,CAAC,CACxD;IAEM,UAAU,GAAI,SAAS,WAAW,UAEvC;IAEK,WAAW,GAAI,UAAU,MAAM,UAEpC;IAEK,cAAc,GAAI,SAAS,MAAM,UAEtC;IAEK,iBAAiB,aAEtB;IAEK,kBAAkB,GAAI,UAAU,MAAM,EAAE,UAAU,MAAM,UAE7D;IAEK,kBAAkB,aAYvB;IAEK,KAAK,aAEV;CACH"}
@@ -1,21 +1,30 @@
1
- import { type ReadonlySignal } from '@preact/signals-core';
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 _initialSelection;
9
- private readonly _onSelectionChanged?;
10
8
  private readonly _selection;
11
9
  private readonly _validSelectedIds;
12
10
  private readonly _hasSelection;
13
11
  private readonly _allSelected;
14
- constructor(_rows: ReadonlySignal<T[]>, _selectionMode: SelectionMode, _initialSelection: string[], _onSelectionChanged?: (() => void) | undefined);
12
+ private readonly _selectionMode;
13
+ private readonly _onSelectionChanged?;
14
+ constructor(registry: Registry.Registry, rows: Atom.Atom<T[]>, selectionMode: SelectionMode, initialSelection: string[], onSelectionChanged?: () => void);
15
15
  protected _open(): Promise<void>;
16
- get selection(): ReadonlySignal<Set<string>>;
17
- get hasSelection(): ReadonlySignal<boolean>;
18
- get allRowsSeleted(): ReadonlySignal<boolean>;
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;
19
28
  get selectionMode(): SelectionMode;
20
29
  getSelectedRows: () => T[];
21
30
  isRowIndexSelected: (rowIndex: number) => boolean;