@dxos/react-ui-table 0.8.2-main.fbd8ed0 → 0.8.2-staging.42af850

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 (47) hide show
  1. package/dist/lib/browser/{chunk-PFFO5LYM.mjs → chunk-U6LL2AVU.mjs} +5 -6
  2. package/dist/lib/browser/chunk-U6LL2AVU.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +972 -911
  4. package/dist/lib/browser/index.mjs.map +3 -3
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/types/index.mjs +1 -1
  7. package/dist/lib/node/{chunk-VREQOYRW.cjs → chunk-CXDGXPM6.cjs} +7 -8
  8. package/dist/lib/node/chunk-CXDGXPM6.cjs.map +7 -0
  9. package/dist/lib/node/index.cjs +973 -912
  10. package/dist/lib/node/index.cjs.map +3 -3
  11. package/dist/lib/node/meta.json +1 -1
  12. package/dist/lib/node/types/index.cjs +3 -3
  13. package/dist/lib/node/types/index.cjs.map +1 -1
  14. package/dist/lib/node-esm/{chunk-34JG3SDI.mjs → chunk-EFSM52KQ.mjs} +5 -6
  15. package/dist/lib/node-esm/chunk-EFSM52KQ.mjs.map +7 -0
  16. package/dist/lib/node-esm/index.mjs +972 -911
  17. package/dist/lib/node-esm/index.mjs.map +3 -3
  18. package/dist/lib/node-esm/meta.json +1 -1
  19. package/dist/lib/node-esm/types/index.mjs +1 -1
  20. package/dist/types/src/components/Table/Table.stories.d.ts.map +1 -1
  21. package/dist/types/src/components/Table/relations.stories.d.ts.map +1 -1
  22. package/dist/types/src/components/TableCellEditor/TableCellEditor.stories.d.ts.map +1 -1
  23. package/dist/types/src/components/TableToolbar/TableToolbar.d.ts +6 -3
  24. package/dist/types/src/components/TableToolbar/TableToolbar.d.ts.map +1 -1
  25. package/dist/types/src/components/testing.d.ts +4 -4
  26. package/dist/types/src/hooks/useTableModel.d.ts.map +1 -1
  27. package/dist/types/src/model/selection-model.d.ts.map +1 -1
  28. package/dist/types/src/model/table-model.d.ts.map +1 -1
  29. package/dist/types/src/types/table.d.ts +2 -2
  30. package/dist/types/src/types/table.d.ts.map +1 -1
  31. package/dist/types/src/util/table.d.ts.map +1 -1
  32. package/package.json +41 -35
  33. package/src/components/Table/Table.stories.tsx +16 -28
  34. package/src/components/Table/relations.stories.tsx +1 -2
  35. package/src/components/TableCellEditor/FormCellEditor.tsx +2 -2
  36. package/src/components/TableCellEditor/TableCellEditor.stories.tsx +2 -1
  37. package/src/components/TableToolbar/TableToolbar.tsx +62 -31
  38. package/src/hooks/useTableModel.ts +4 -2
  39. package/src/model/selection-model.ts +1 -1
  40. package/src/model/table-model.ts +1 -1
  41. package/src/model/table-presentation.ts +1 -1
  42. package/src/types/table.ts +2 -5
  43. package/src/util/table-buttons.ts +1 -1
  44. package/src/util/table.ts +3 -3
  45. package/dist/lib/browser/chunk-PFFO5LYM.mjs.map +0 -7
  46. package/dist/lib/node/chunk-VREQOYRW.cjs.map +0 -7
  47. package/dist/lib/node-esm/chunk-34JG3SDI.mjs.map +0 -7
@@ -1,6 +1,6 @@
1
1
  // packages/ui/react-ui-table/src/types/table.ts
2
2
  import { Schema } from "effect";
3
- import { LabelAnnotationId, ObjectId, Ref, Expando, EchoObject } from "@dxos/echo-schema";
3
+ import { ObjectId, Ref, Expando, EchoObject, LabelAnnotation } from "@dxos/echo-schema";
4
4
  import { ViewType } from "@dxos/schema";
5
5
  var TableSchema = Schema.Struct({
6
6
  id: ObjectId,
@@ -11,10 +11,9 @@ var TableSchema = Schema.Struct({
11
11
  Expando
12
12
  /* ThreadType */
13
13
  )))
14
- }).annotations({
15
- // TODO(burdon): Move annotation to property.
16
- [LabelAnnotationId]: "name"
17
- });
14
+ }).pipe(LabelAnnotation.set([
15
+ "name"
16
+ ]));
18
17
  var TableType = TableSchema.pipe(EchoObject({
19
18
  typename: "dxos.org/type/Table",
20
19
  version: "0.1.0"
@@ -24,4 +23,4 @@ export {
24
23
  TableSchema,
25
24
  TableType
26
25
  };
27
- //# sourceMappingURL=chunk-PFFO5LYM.mjs.map
26
+ //# sourceMappingURL=chunk-U6LL2AVU.mjs.map
@@ -0,0 +1,7 @@
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 { ObjectId, Ref, Expando, EchoObject, 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 EchoObject({\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,UAAUC,KAAKC,SAASC,YAAYC,uBAAuB;AACpE,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,WAAW;EACTC,UAAU;EACVC,SAAS;AACX,CAAA,CAAA;",
6
+ "names": ["Schema", "ObjectId", "Ref", "Expando", "EchoObject", "LabelAnnotation", "ViewType", "TableSchema", "Schema", "Struct", "id", "ObjectId", "name", "optional", "String", "view", "Ref", "ViewType", "threads", "Array", "Expando", "pipe", "LabelAnnotation", "set", "TableType", "EchoObject", "typename", "version"]
7
+ }