@dxos/react-ui-table 0.8.4-main.f9ba587 → 0.8.4-main.fd6878d

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 (122) hide show
  1. package/dist/lib/browser/chunk-L2LSB6KV.mjs +18 -0
  2. package/dist/lib/browser/chunk-L2LSB6KV.mjs.map +7 -0
  3. package/dist/lib/browser/chunk-ZAOSIG3L.mjs +1814 -0
  4. package/dist/lib/browser/chunk-ZAOSIG3L.mjs.map +7 -0
  5. package/dist/lib/browser/index.mjs +658 -2359
  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 +123 -0
  9. package/dist/lib/browser/testing/index.mjs.map +7 -0
  10. package/dist/lib/browser/types/index.mjs +3 -5
  11. package/dist/lib/node-esm/chunk-NXZ4CJYX.mjs +20 -0
  12. package/dist/lib/node-esm/chunk-NXZ4CJYX.mjs.map +7 -0
  13. package/dist/lib/node-esm/chunk-ZOFFI3JJ.mjs +1815 -0
  14. package/dist/lib/node-esm/chunk-ZOFFI3JJ.mjs.map +7 -0
  15. package/dist/lib/node-esm/index.mjs +658 -2359
  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 +124 -0
  19. package/dist/lib/node-esm/testing/index.mjs.map +7 -0
  20. package/dist/lib/node-esm/types/index.mjs +3 -5
  21. package/dist/types/src/components/Table/ColumnActionsMenu.d.ts +1 -1
  22. package/dist/types/src/components/Table/ColumnActionsMenu.d.ts.map +1 -1
  23. package/dist/types/src/components/Table/ColumnSettings.d.ts +4 -2
  24. package/dist/types/src/components/Table/ColumnSettings.d.ts.map +1 -1
  25. package/dist/types/src/components/Table/CreateRefPanel.d.ts +1 -1
  26. package/dist/types/src/components/Table/CreateRefPanel.d.ts.map +1 -1
  27. package/dist/types/src/components/Table/DynamicTable.d.ts +1 -1
  28. package/dist/types/src/components/Table/DynamicTable.d.ts.map +1 -1
  29. package/dist/types/src/components/Table/DynamicTable.stories.d.ts +1 -1
  30. package/dist/types/src/components/Table/DynamicTable.stories.d.ts.map +1 -1
  31. package/dist/types/src/components/Table/{relations.stories.d.ts → Relations.stories.d.ts} +2 -2
  32. package/dist/types/src/components/Table/Relations.stories.d.ts.map +1 -0
  33. package/dist/types/src/components/Table/RowActionsMenu.d.ts +1 -1
  34. package/dist/types/src/components/Table/RowActionsMenu.d.ts.map +1 -1
  35. package/dist/types/src/components/Table/Table.d.ts +1 -0
  36. package/dist/types/src/components/Table/Table.d.ts.map +1 -1
  37. package/dist/types/src/components/Table/Table.stories.d.ts +1 -1
  38. package/dist/types/src/components/Table/Table.stories.d.ts.map +1 -1
  39. package/dist/types/src/components/TableCellEditor/CellValidationMessage.d.ts.map +1 -1
  40. package/dist/types/src/components/TableCellEditor/FormCellEditor.d.ts +2 -1
  41. package/dist/types/src/components/TableCellEditor/FormCellEditor.d.ts.map +1 -1
  42. package/dist/types/src/components/TableCellEditor/TableCellEditor.d.ts +8 -7
  43. package/dist/types/src/components/TableCellEditor/TableCellEditor.d.ts.map +1 -1
  44. package/dist/types/src/components/TableCellEditor/TableCellEditor.stories.d.ts.map +1 -1
  45. package/dist/types/src/components/TableCellEditor/extension.d.ts.map +1 -1
  46. package/dist/types/src/components/TableToolbar/TableToolbar.d.ts.map +1 -1
  47. package/dist/types/src/components/testing.d.ts +3 -40
  48. package/dist/types/src/components/testing.d.ts.map +1 -1
  49. package/dist/types/src/hooks/useTableModel.d.ts +8 -7
  50. package/dist/types/src/hooks/useTableModel.d.ts.map +1 -1
  51. package/dist/types/src/index.d.ts +0 -1
  52. package/dist/types/src/index.d.ts.map +1 -1
  53. package/dist/types/src/model/modal-controller.d.ts.map +1 -1
  54. package/dist/types/src/model/selection-model.d.ts +2 -1
  55. package/dist/types/src/model/selection-model.d.ts.map +1 -1
  56. package/dist/types/src/model/table-model.d.ts +17 -16
  57. package/dist/types/src/model/table-model.d.ts.map +1 -1
  58. package/dist/types/src/model/table-presentation.d.ts +2 -1
  59. package/dist/types/src/model/table-presentation.d.ts.map +1 -1
  60. package/dist/types/src/model/table-sorting.d.ts +4 -4
  61. package/dist/types/src/model/table-sorting.d.ts.map +1 -1
  62. package/dist/types/src/testing/index.d.ts +2 -0
  63. package/dist/types/src/testing/index.d.ts.map +1 -0
  64. package/dist/types/src/testing/useTestTableModel.d.ts +41 -0
  65. package/dist/types/src/testing/useTestTableModel.d.ts.map +1 -0
  66. package/dist/types/src/translations.d.ts +2 -2
  67. package/dist/types/src/types/index.d.ts +1 -1
  68. package/dist/types/src/types/index.d.ts.map +1 -1
  69. package/dist/types/src/types/schema.d.ts +8 -0
  70. package/dist/types/src/types/schema.d.ts.map +1 -0
  71. package/dist/types/src/util/dynamic-table.d.ts +3 -4
  72. package/dist/types/src/util/dynamic-table.d.ts.map +1 -1
  73. package/dist/types/src/util/table-buttons.d.ts.map +1 -1
  74. package/dist/types/src/util/table-controls.d.ts.map +1 -1
  75. package/dist/types/src/util/table.d.ts +9 -11
  76. package/dist/types/src/util/table.d.ts.map +1 -1
  77. package/dist/types/tsconfig.tsbuildinfo +1 -1
  78. package/package.json +50 -36
  79. package/src/components/Table/ColumnActionsMenu.tsx +1 -1
  80. package/src/components/Table/ColumnSettings.tsx +15 -11
  81. package/src/components/Table/CreateRefPanel.tsx +6 -4
  82. package/src/components/Table/DynamicTable.stories.tsx +3 -2
  83. package/src/components/Table/DynamicTable.tsx +17 -10
  84. package/src/components/Table/{relations.stories.tsx → Relations.stories.tsx} +36 -35
  85. package/src/components/Table/RowActionsMenu.tsx +3 -3
  86. package/src/components/Table/Table.stories.tsx +99 -144
  87. package/src/components/Table/Table.tsx +87 -71
  88. package/src/components/TableCellEditor/CellValidationMessage.tsx +1 -1
  89. package/src/components/TableCellEditor/FormCellEditor.tsx +30 -21
  90. package/src/components/TableCellEditor/TableCellEditor.stories.tsx +24 -27
  91. package/src/components/TableCellEditor/TableCellEditor.tsx +42 -27
  92. package/src/components/TableCellEditor/extension.ts +2 -2
  93. package/src/components/TableToolbar/TableToolbar.tsx +2 -2
  94. package/src/components/testing.ts +7 -24
  95. package/src/hooks/useTableModel.ts +21 -17
  96. package/src/index.ts +0 -1
  97. package/src/model/modal-controller.ts +1 -1
  98. package/src/model/selection-model.ts +6 -3
  99. package/src/model/table-model.test.ts +8 -8
  100. package/src/model/table-model.ts +68 -62
  101. package/src/model/table-presentation.test.ts +8 -8
  102. package/src/model/table-presentation.ts +35 -13
  103. package/src/model/table-sorting.ts +11 -11
  104. package/src/playwright/smoke.spec.ts +105 -14
  105. package/src/testing/index.ts +5 -0
  106. package/src/testing/useTestTableModel.ts +123 -0
  107. package/src/translations.ts +2 -2
  108. package/src/types/index.ts +2 -2
  109. package/src/types/schema.ts +16 -0
  110. package/src/util/dynamic-table.ts +20 -18
  111. package/src/util/schema.ts +1 -1
  112. package/src/util/table-buttons.ts +2 -1
  113. package/src/util/table-controls.ts +4 -1
  114. package/src/util/table.ts +37 -111
  115. package/dist/lib/browser/chunk-Q5QQXJUO.mjs +0 -27
  116. package/dist/lib/browser/chunk-Q5QQXJUO.mjs.map +0 -7
  117. package/dist/lib/node-esm/chunk-ZNOU6LHG.mjs +0 -29
  118. package/dist/lib/node-esm/chunk-ZNOU6LHG.mjs.map +0 -7
  119. package/dist/types/src/components/Table/relations.stories.d.ts.map +0 -1
  120. package/dist/types/src/types/table.d.ts +0 -56
  121. package/dist/types/src/types/table.d.ts.map +0 -1
  122. package/src/types/table.ts +0 -27
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/types/table.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\n// import { ThreadType } from '@dxos/plugin-space/types';\nimport { Type } from '@dxos/echo';\nimport { ObjectId, Ref, Expando, LabelAnnotation } from '@dxos/echo-schema';\nimport { ViewType } from '@dxos/schema';\n\nexport const TableSchema = Schema.Struct({\n id: ObjectId,\n name: Schema.optional(Schema.String),\n view: Schema.optional(Ref(ViewType)),\n // TODO(burdon): Document why threads is included here?\n threads: Schema.optional(Schema.Array(Ref(Expando /* ThreadType */))),\n}).pipe(LabelAnnotation.set(['name']));\n\n// TODO(burdon): Move out of react-ui-xxx.\nexport const TableType = TableSchema.pipe(\n Type.Obj({\n typename: 'dxos.org/type/Table',\n version: '0.1.0',\n }),\n);\nexport interface TableType extends Schema.Schema.Type<typeof TableType> {}\n"],
5
- "mappings": ";AAIA,SAASA,cAAc;AAGvB,SAASC,YAAY;AACrB,SAASC,UAAUC,KAAKC,SAASC,uBAAuB;AACxD,SAASC,gBAAgB;AAElB,IAAMC,cAAcC,OAAOC,OAAO;EACvCC,IAAIC;EACJC,MAAMJ,OAAOK,SAASL,OAAOM,MAAM;EACnCC,MAAMP,OAAOK,SAASG,IAAIC,QAAAA,CAAAA;;EAE1BC,SAASV,OAAOK,SAASL,OAAOW,MAAMH;IAAII;;EAAsB,CAAA,CAAA;AAClE,CAAA,EAAGC,KAAKC,gBAAgBC,IAAI;EAAC;CAAO,CAAA;AAG7B,IAAMC,YAAYjB,YAAYc,KACnCI,KAAKC,IAAI;EACPC,UAAU;EACVC,SAAS;AACX,CAAA,CAAA;",
6
- "names": ["Schema", "Type", "ObjectId", "Ref", "Expando", "LabelAnnotation", "ViewType", "TableSchema", "Schema", "Struct", "id", "ObjectId", "name", "optional", "String", "view", "Ref", "ViewType", "threads", "Array", "Expando", "pipe", "LabelAnnotation", "set", "TableType", "Type", "Obj", "typename", "version"]
7
- }
@@ -1,29 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
-
3
- // src/types/table.ts
4
- import { Schema } from "effect";
5
- import { Type } from "@dxos/echo";
6
- import { ObjectId, Ref, Expando, LabelAnnotation } from "@dxos/echo-schema";
7
- import { ViewType } from "@dxos/schema";
8
- var TableSchema = Schema.Struct({
9
- id: ObjectId,
10
- name: Schema.optional(Schema.String),
11
- view: Schema.optional(Ref(ViewType)),
12
- // TODO(burdon): Document why threads is included here?
13
- threads: Schema.optional(Schema.Array(Ref(
14
- Expando
15
- /* ThreadType */
16
- )))
17
- }).pipe(LabelAnnotation.set([
18
- "name"
19
- ]));
20
- var TableType = TableSchema.pipe(Type.Obj({
21
- typename: "dxos.org/type/Table",
22
- version: "0.1.0"
23
- }));
24
-
25
- export {
26
- TableSchema,
27
- TableType
28
- };
29
- //# sourceMappingURL=chunk-ZNOU6LHG.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/types/table.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\n// import { ThreadType } from '@dxos/plugin-space/types';\nimport { Type } from '@dxos/echo';\nimport { ObjectId, Ref, Expando, LabelAnnotation } from '@dxos/echo-schema';\nimport { ViewType } from '@dxos/schema';\n\nexport const TableSchema = Schema.Struct({\n id: ObjectId,\n name: Schema.optional(Schema.String),\n view: Schema.optional(Ref(ViewType)),\n // TODO(burdon): Document why threads is included here?\n threads: Schema.optional(Schema.Array(Ref(Expando /* ThreadType */))),\n}).pipe(LabelAnnotation.set(['name']));\n\n// TODO(burdon): Move out of react-ui-xxx.\nexport const TableType = TableSchema.pipe(\n Type.Obj({\n typename: 'dxos.org/type/Table',\n version: '0.1.0',\n }),\n);\nexport interface TableType extends Schema.Schema.Type<typeof TableType> {}\n"],
5
- "mappings": ";;;AAIA,SAASA,cAAc;AAGvB,SAASC,YAAY;AACrB,SAASC,UAAUC,KAAKC,SAASC,uBAAuB;AACxD,SAASC,gBAAgB;AAElB,IAAMC,cAAcC,OAAOC,OAAO;EACvCC,IAAIC;EACJC,MAAMJ,OAAOK,SAASL,OAAOM,MAAM;EACnCC,MAAMP,OAAOK,SAASG,IAAIC,QAAAA,CAAAA;;EAE1BC,SAASV,OAAOK,SAASL,OAAOW,MAAMH;IAAII;;EAAsB,CAAA,CAAA;AAClE,CAAA,EAAGC,KAAKC,gBAAgBC,IAAI;EAAC;CAAO,CAAA;AAG7B,IAAMC,YAAYjB,YAAYc,KACnCI,KAAKC,IAAI;EACPC,UAAU;EACVC,SAAS;AACX,CAAA,CAAA;",
6
- "names": ["Schema", "Type", "ObjectId", "Ref", "Expando", "LabelAnnotation", "ViewType", "TableSchema", "Schema", "Struct", "id", "ObjectId", "name", "optional", "String", "view", "Ref", "ViewType", "threads", "Array", "Expando", "pipe", "LabelAnnotation", "set", "TableType", "Type", "Obj", "typename", "version"]
7
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"relations.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/relations.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAA6B,MAAM,OAAO,CAAC;AA8ElD,QAAA,MAAM,YAAY,yBAejB,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAanC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;AAE3C,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
@@ -1,56 +0,0 @@
1
- import { Schema } from 'effect';
2
- import { Type } from '@dxos/echo';
3
- import { Expando } from '@dxos/echo-schema';
4
- export declare const TableSchema: Schema.Struct<{
5
- id: import("@dxos/keys").ObjectIdClass;
6
- name: Schema.optional<typeof Schema.String>;
7
- view: Schema.optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
8
- name: Schema.SchemaClass<string, string, never>;
9
- query: Schema.Schema<import("@dxos/echo-schema").QueryType, import("@dxos/echo-schema").QueryType, never>;
10
- schema: Schema.optional<Schema.Schema<Type.JsonSchema, Type.JsonSchema, never>>;
11
- fields: Schema.mutable<Schema.Array$<Schema.mutable<Schema.Struct<{
12
- id: typeof Schema.String;
13
- path: Schema.Schema<import("@dxos/effect").JsonPath, import("@dxos/effect").JsonPath, never>;
14
- visible: Schema.optional<typeof Schema.Boolean>;
15
- referencePath: Schema.optional<Schema.Schema<import("@dxos/effect").JsonPath, import("@dxos/effect").JsonPath, never>>;
16
- size: Schema.optional<typeof Schema.Number>;
17
- }>>>>;
18
- hiddenFields: Schema.optional<Schema.mutable<Schema.Array$<Schema.mutable<Schema.Struct<{
19
- id: typeof Schema.String;
20
- path: Schema.Schema<import("@dxos/effect").JsonPath, import("@dxos/effect").JsonPath, never>;
21
- visible: Schema.optional<typeof Schema.Boolean>;
22
- referencePath: Schema.optional<Schema.Schema<import("@dxos/effect").JsonPath, import("@dxos/effect").JsonPath, never>>;
23
- size: Schema.optional<typeof Schema.Number>;
24
- }>>>>>;
25
- metadata: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
26
- }, import("@dxos/echo-schema").TypedObjectOptions>>>;
27
- threads: Schema.optional<Schema.Array$<import("@dxos/echo-schema").Ref$<Expando>>>;
28
- }>;
29
- export declare const TableType: Type.obj<Schema.Struct<{
30
- id: import("@dxos/keys").ObjectIdClass;
31
- name: Schema.optional<typeof Schema.String>;
32
- view: Schema.optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
33
- name: Schema.SchemaClass<string, string, never>;
34
- query: Schema.Schema<import("@dxos/echo-schema").QueryType, import("@dxos/echo-schema").QueryType, never>;
35
- schema: Schema.optional<Schema.Schema<Type.JsonSchema, Type.JsonSchema, never>>;
36
- fields: Schema.mutable<Schema.Array$<Schema.mutable<Schema.Struct<{
37
- id: typeof Schema.String;
38
- path: Schema.Schema<import("@dxos/effect").JsonPath, import("@dxos/effect").JsonPath, never>;
39
- visible: Schema.optional<typeof Schema.Boolean>;
40
- referencePath: Schema.optional<Schema.Schema<import("@dxos/effect").JsonPath, import("@dxos/effect").JsonPath, never>>;
41
- size: Schema.optional<typeof Schema.Number>;
42
- }>>>>;
43
- hiddenFields: Schema.optional<Schema.mutable<Schema.Array$<Schema.mutable<Schema.Struct<{
44
- id: typeof Schema.String;
45
- path: Schema.Schema<import("@dxos/effect").JsonPath, import("@dxos/effect").JsonPath, never>;
46
- visible: Schema.optional<typeof Schema.Boolean>;
47
- referencePath: Schema.optional<Schema.Schema<import("@dxos/effect").JsonPath, import("@dxos/effect").JsonPath, never>>;
48
- size: Schema.optional<typeof Schema.Number>;
49
- }>>>>>;
50
- metadata: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
51
- }, import("@dxos/echo-schema").TypedObjectOptions>>>;
52
- threads: Schema.optional<Schema.Array$<import("@dxos/echo-schema").Ref$<Expando>>>;
53
- }>>;
54
- export interface TableType extends Schema.Schema.Type<typeof TableType> {
55
- }
56
- //# sourceMappingURL=table.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../../src/types/table.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAiB,OAAO,EAAmB,MAAM,mBAAmB,CAAC;AAG5E,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;EAMc,CAAC;AAGvC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;GAKrB,CAAC;AACF,MAAM,WAAW,SAAU,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,SAAS,CAAC;CAAG"}
@@ -1,27 +0,0 @@
1
- //
2
- // Copyright 2024 DXOS.org
3
- //
4
-
5
- import { Schema } from 'effect';
6
-
7
- // import { ThreadType } from '@dxos/plugin-space/types';
8
- import { Type } from '@dxos/echo';
9
- import { ObjectId, Ref, Expando, LabelAnnotation } from '@dxos/echo-schema';
10
- import { ViewType } from '@dxos/schema';
11
-
12
- export const TableSchema = Schema.Struct({
13
- id: ObjectId,
14
- name: Schema.optional(Schema.String),
15
- view: Schema.optional(Ref(ViewType)),
16
- // TODO(burdon): Document why threads is included here?
17
- threads: Schema.optional(Schema.Array(Ref(Expando /* ThreadType */))),
18
- }).pipe(LabelAnnotation.set(['name']));
19
-
20
- // TODO(burdon): Move out of react-ui-xxx.
21
- export const TableType = TableSchema.pipe(
22
- Type.Obj({
23
- typename: 'dxos.org/type/Table',
24
- version: '0.1.0',
25
- }),
26
- );
27
- export interface TableType extends Schema.Schema.Type<typeof TableType> {}