@dxos/react-ui-table 0.11.1 → 0.12.0-next-73daef452f1464b62efdbca75fb0067c1066f264

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 (72) hide show
  1. package/dist/lib/chunk-types.mjs +13 -22
  2. package/dist/lib/chunk-types.mjs.map +1 -1
  3. package/dist/lib/chunk-useTableModel.mjs +24 -20
  4. package/dist/lib/chunk-useTableModel.mjs.map +1 -1
  5. package/dist/lib/index.mjs +43 -43
  6. package/dist/lib/index.mjs.map +1 -1
  7. package/dist/lib/testing.mjs +3 -2
  8. package/dist/lib/testing.mjs.map +1 -1
  9. package/dist/types/src/components/Table/DynamicTable.stories.d.ts +3 -4
  10. package/dist/types/src/components/Table/DynamicTable.stories.d.ts.map +1 -1
  11. package/dist/types/src/components/Table/Relations.stories.d.ts +7 -6
  12. package/dist/types/src/components/Table/Relations.stories.d.ts.map +1 -1
  13. package/dist/types/src/components/Table/Table.stories.d.ts +7 -6
  14. package/dist/types/src/components/Table/Table.stories.d.ts.map +1 -1
  15. package/dist/types/src/components/Table/TableContent.d.ts.map +1 -1
  16. package/dist/types/src/components/Table/TableToolbar.d.ts +1 -1
  17. package/dist/types/src/components/Table/TableToolbar.d.ts.map +1 -1
  18. package/dist/types/src/components/TableCellEditor/FormCellEditor.d.ts.map +1 -1
  19. package/dist/types/src/components/TableCellEditor/TableCellEditor.d.ts.map +1 -1
  20. package/dist/types/src/components/TableCellEditor/TableCellEditor.stories.d.ts +4 -3
  21. package/dist/types/src/components/TableCellEditor/TableCellEditor.stories.d.ts.map +1 -1
  22. package/dist/types/src/hooks/useProjectionModel.d.ts +2 -2
  23. package/dist/types/src/hooks/useProjectionModel.d.ts.map +1 -1
  24. package/dist/types/src/model/modal-controller.d.ts +3 -2
  25. package/dist/types/src/model/modal-controller.d.ts.map +1 -1
  26. package/dist/types/src/model/selection-model.d.ts +3 -2
  27. package/dist/types/src/model/selection-model.d.ts.map +1 -1
  28. package/dist/types/src/model/table-model.d.ts +6 -4
  29. package/dist/types/src/model/table-model.d.ts.map +1 -1
  30. package/dist/types/src/model/table-presentation.d.ts +2 -2
  31. package/dist/types/src/model/table-presentation.d.ts.map +1 -1
  32. package/dist/types/src/model/table-view-state.d.ts +2 -2
  33. package/dist/types/src/translations.d.ts +1 -1
  34. package/dist/types/src/translations.d.ts.map +1 -1
  35. package/dist/types/src/types/Table.d.ts +2 -2
  36. package/dist/types/src/types/Table.d.ts.map +1 -1
  37. package/dist/types/src/util/dynamic-table.d.ts +2 -2
  38. package/dist/types/src/util/dynamic-table.d.ts.map +1 -1
  39. package/dist/types/src/util/schema.d.ts +1 -1
  40. package/dist/types/src/util/schema.d.ts.map +1 -1
  41. package/dist/types/src/util/table-controls.d.ts +2 -2
  42. package/dist/types/src/util/table-controls.d.ts.map +1 -1
  43. package/dist/types/tsconfig.tsbuildinfo +1 -1
  44. package/package.json +35 -53
  45. package/src/components/Table/ColumnActionsMenu.tsx +1 -1
  46. package/src/components/Table/ColumnSettings.tsx +1 -1
  47. package/src/components/Table/DynamicTable.tsx +1 -1
  48. package/src/components/Table/Relations.stories.tsx +1 -1
  49. package/src/components/Table/RowActionsMenu.tsx +1 -1
  50. package/src/components/Table/Table.stories.tsx +6 -6
  51. package/src/components/Table/Table.tsx +1 -1
  52. package/src/components/Table/TableContent.tsx +3 -1
  53. package/src/components/Table/TableToolbar.tsx +5 -2
  54. package/src/components/TableCellEditor/FormCellEditor.tsx +1 -1
  55. package/src/components/TableCellEditor/TableCellEditor.stories.tsx +1 -1
  56. package/src/hooks/useProjectionModel.ts +2 -2
  57. package/src/hooks/useTableModel.ts +1 -1
  58. package/src/model/modal-controller.ts +4 -3
  59. package/src/model/selection-model.ts +4 -3
  60. package/src/model/table-model.test.ts +4 -4
  61. package/src/model/table-model.ts +5 -4
  62. package/src/model/table-presentation.test.ts +4 -4
  63. package/src/model/table-presentation.ts +4 -4
  64. package/src/playwright/playwright.config.ts +2 -6
  65. package/src/testing/useTestTableModel.ts +1 -1
  66. package/src/types/Table.ts +17 -27
  67. package/src/util/dynamic-table.test.ts +1 -1
  68. package/src/util/dynamic-table.ts +2 -2
  69. package/src/util/schema.ts +6 -5
  70. package/dist/types/src/components/testing.d.ts +0 -35
  71. package/dist/types/src/components/testing.d.ts.map +0 -1
  72. package/src/components/testing.ts +0 -125
@@ -1,8 +1,7 @@
1
1
  import { Annotation, DXN, JsonSchema, Obj, Ref, Type, View } from "@dxos/echo";
2
+ import { SchemaAST } from "@dxos/effect";
2
3
  import { ViewAnnotation } from "@dxos/schema";
3
- import * as Match from "effect/Match";
4
4
  import * as Schema from "effect/Schema";
5
- import * as SchemaAST from "effect/SchemaAST";
6
5
  import { FormInputAnnotation, LabelAnnotation } from "@dxos/echo/Annotation";
7
6
  //#region \0rolldown/runtime.js
8
7
  var __defProp = Object.defineProperty;
@@ -24,10 +23,7 @@ var Table_exports = /* @__PURE__ */ __exportAll({
24
23
  var Table = class extends Type.makeObject(DXN.make("org.dxos.type.table", "0.1.0"))(Schema.Struct({
25
24
  name: Schema.String.pipe(Schema.optional),
26
25
  view: Ref.Ref(View.View).pipe(FormInputAnnotation.set(false)),
27
- sizes: Schema.Record({
28
- key: Schema.String,
29
- value: Schema.Number
30
- }).pipe(Schema.mutable, FormInputAnnotation.set(false))
26
+ sizes: Schema.Record(Schema.String, Schema.Number).pipe(Schema.mutableKey, FormInputAnnotation.set(false))
31
27
  }).pipe(LabelAnnotation.set(["name"]), ViewAnnotation.set(["view"]), Annotation.IconAnnotation.set({
32
28
  icon: "ph--table--regular",
33
29
  hue: "green"
@@ -36,28 +32,23 @@ var Table = class extends Type.makeObject(DXN.make("org.dxos.type.table", "0.1.0
36
32
  * Make a table as a view of a data set.
37
33
  */
38
34
  var make = ({ name, sizes = {}, view, jsonSchema }) => {
39
- const table = Obj.make(Table, {
40
- name,
41
- view: Ref.make(view),
42
- sizes
43
- });
35
+ const initialSizes = { ...sizes };
44
36
  if (jsonSchema) {
45
37
  const schema = JsonSchema.toEffectSchema(jsonSchema);
46
- const properties = SchemaAST.getPropertySignatures(schema.ast);
47
- for (const property of properties) {
38
+ for (const property of SchemaAST.getPropertySignatures(schema.ast)) {
48
39
  const name = property.name.toString();
49
- if (sizes?.[name]) {
50
- table.sizes[name] = sizes[name];
51
- continue;
40
+ if (initialSizes[name] !== void 0) continue;
41
+ switch (property.type._tag) {
42
+ case "Boolean":
43
+ case "Number": initialSizes[name] = 100;
52
44
  }
53
- Match.type().pipe(Match.when({ _tag: "BooleanKeyword" }, () => {
54
- table.sizes[name] = 100;
55
- }), Match.when({ _tag: "NumberKeyword" }, () => {
56
- table.sizes[name] = 100;
57
- }), Match.orElse(() => {}))(property.type);
58
45
  }
59
46
  }
60
- return table;
47
+ return Obj.make(Table, {
48
+ name,
49
+ view: Ref.make(view),
50
+ sizes: initialSizes
51
+ });
61
52
  };
62
53
  //#endregion
63
54
  export { Table_exports as n, Table as t };
@@ -1 +1 @@
1
- {"version":3,"file":"chunk-types.mjs","names":[],"sources":["../../src/types/Table.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Match from 'effect/Match';\nimport * as Schema from 'effect/Schema';\nimport * as SchemaAST from 'effect/SchemaAST';\n\n// QueryAST is referenced indirectly through `Type.InstanceType<typeof TableSchema>`\n// (Ref.Ref(View.View) → View.View → QueryAST.Query) in the emitted .d.ts; the\n// namespace import keeps the inferred types portable.\n// eslint-disable-next-line unused-imports/no-unused-imports\nimport { Annotation, DXN, JsonSchema, Obj, QueryAST, Ref, Type, View } from '@dxos/echo';\nimport { FormInputAnnotation, LabelAnnotation } from '@dxos/echo/Annotation';\nimport { type JsonSchema as JsonSchemaType } from '@dxos/echo/JsonSchema';\nimport { SchemaEx } from '@dxos/effect';\nimport { ViewAnnotation } from '@dxos/schema';\n\n// TODO(wittjosiah): Try to clean up this type inference.\nexport class Table extends Type.makeObject<Table>(DXN.make('org.dxos.type.table', '0.1.0'))(\n Schema.Struct({\n name: Schema.String.pipe(Schema.optional),\n\n view: Ref.Ref(View.View).pipe(FormInputAnnotation.set(false)),\n\n sizes: Schema.Record({\n // TODO(wittjosiah): Should be JsonPath.\n key: Schema.String,\n value: Schema.Number,\n }).pipe(Schema.mutable, FormInputAnnotation.set(false)),\n }).pipe(\n LabelAnnotation.set(['name']),\n ViewAnnotation.set(['view']),\n Annotation.IconAnnotation.set({ icon: 'ph--table--regular', hue: 'green' }),\n ),\n) {}\n\ntype MakeProps = {\n name?: string;\n sizes?: Record<string, number>;\n view: View.View;\n /** Required to auto-size columns. */\n jsonSchema?: JsonSchemaType;\n};\n\n/**\n * Make a table as a view of a data set.\n */\nexport const make = ({ name, sizes = {}, view, jsonSchema }: MakeProps): Table => {\n const table = Obj.make(Table, { name, view: Ref.make(view), sizes } as Obj.MakeProps<typeof Table>);\n\n // Preset sizes.\n if (jsonSchema) {\n const schema = JsonSchema.toEffectSchema(jsonSchema);\n const properties = SchemaAST.getPropertySignatures(schema.ast);\n for (const property of properties) {\n const name = property.name.toString() as SchemaEx.JsonPath;\n if (sizes?.[name]) {\n table.sizes[name] = sizes[name];\n continue;\n }\n\n Match.type<SchemaAST.AST>().pipe(\n Match.when({ _tag: 'BooleanKeyword' }, () => {\n table.sizes[name] = 100;\n }),\n Match.when({ _tag: 'NumberKeyword' }, () => {\n table.sizes[name] = 100;\n }),\n Match.orElse(() => {\n // Noop.\n }),\n )(property.type);\n }\n }\n\n return table;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAmBA,IAAa,QAAb,cAA2B,KAAK,WAAkB,IAAI,KAAK,uBAAuB,OAAO,CAAC,CAAC,CACzF,OAAO,OAAO;CACZ,MAAM,OAAO,OAAO,KAAK,OAAO,QAAQ;CAExC,MAAM,IAAI,IAAI,KAAK,IAAI,CAAC,CAAC,KAAK,oBAAoB,IAAI,KAAK,CAAC;CAE5D,OAAO,OAAO,OAAO;EAEnB,KAAK,OAAO;EACZ,OAAO,OAAO;CAChB,CAAC,CAAC,CAAC,KAAK,OAAO,SAAS,oBAAoB,IAAI,KAAK,CAAC;AACxD,CAAC,CAAC,CAAC,KACD,gBAAgB,IAAI,CAAC,MAAM,CAAC,GAC5B,eAAe,IAAI,CAAC,MAAM,CAAC,GAC3B,WAAW,eAAe,IAAI;CAAE,MAAM;CAAsB,KAAK;AAAQ,CAAC,CAC5E,CACF,CAAC,CAAC,CAAC;;;;AAaH,IAAa,QAAQ,EAAE,MAAM,QAAQ,CAAC,GAAG,MAAM,iBAAmC;CAChF,MAAM,QAAQ,IAAI,KAAK,OAAO;EAAE;EAAM,MAAM,IAAI,KAAK,IAAI;EAAG;CAAM,CAAgC;CAGlG,IAAI,YAAY;EACd,MAAM,SAAS,WAAW,eAAe,UAAU;EACnD,MAAM,aAAa,UAAU,sBAAsB,OAAO,GAAG;EAC7D,KAAK,MAAM,YAAY,YAAY;GACjC,MAAM,OAAO,SAAS,KAAK,SAAS;GACpC,IAAI,QAAQ,OAAO;IACjB,MAAM,MAAM,QAAQ,MAAM;IAC1B;GACF;GAEA,MAAM,KAAoB,CAAC,CAAC,KAC1B,MAAM,KAAK,EAAE,MAAM,iBAAiB,SAAS;IAC3C,MAAM,MAAM,QAAQ;GACtB,CAAC,GACD,MAAM,KAAK,EAAE,MAAM,gBAAgB,SAAS;IAC1C,MAAM,MAAM,QAAQ;GACtB,CAAC,GACD,MAAM,aAAa,CAEnB,CAAC,CACH,CAAC,CAAC,SAAS,IAAI;EACjB;CACF;CAEA,OAAO;AACT"}
1
+ {"version":3,"file":"chunk-types.mjs","names":[],"sources":["../../src/types/Table.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\n// QueryAST is referenced indirectly through `Type.InstanceType<typeof TableSchema>`\n// (Ref.Ref(View.View) → View.View → QueryAST.Query) in the emitted .d.ts; the\n// namespace import keeps the inferred types portable.\n// eslint-disable-next-line unused-imports/no-unused-imports\nimport { Annotation, DXN, JsonSchema, Obj, QueryAST, Ref, Type, View } from '@dxos/echo';\nimport { FormInputAnnotation, LabelAnnotation } from '@dxos/echo/Annotation';\nimport { type JsonSchema as JsonSchemaType } from '@dxos/echo/JsonSchema';\nimport { SchemaAST, SchemaEx } from '@dxos/effect';\nimport { ViewAnnotation } from '@dxos/schema';\n\n// TODO(wittjosiah): Try to clean up this type inference.\nexport class Table extends Type.makeObject<Table>(DXN.make('org.dxos.type.table', '0.1.0'))(\n Schema.Struct({\n name: Schema.String.pipe(Schema.optional),\n\n view: Ref.Ref(View.View).pipe(FormInputAnnotation.set(false)),\n\n // TODO(wittjosiah): Key should be JsonPath.\n sizes: Schema.Record(Schema.String, Schema.Number).pipe(Schema.mutableKey, FormInputAnnotation.set(false)),\n }).pipe(\n LabelAnnotation.set(['name']),\n ViewAnnotation.set(['view']),\n Annotation.IconAnnotation.set({ icon: 'ph--table--regular', hue: 'green' }),\n ),\n) {}\n\ntype MakeProps = {\n name?: string;\n sizes?: Record<string, number>;\n view: View.View;\n /** Required to auto-size columns. */\n jsonSchema?: JsonSchemaType;\n};\n\n/**\n * Make a table as a view of a data set.\n */\nexport const make = ({ name, sizes = {}, view, jsonSchema }: MakeProps): Table => {\n // Preset sizes are computed before construction: Effect 4 records are readonly at the type level,\n // so the defaults go in as initial props rather than being assigned onto the live object.\n const initialSizes: Record<string, number> = { ...sizes };\n if (jsonSchema) {\n const schema = JsonSchema.toEffectSchema(jsonSchema);\n for (const property of SchemaAST.getPropertySignatures(schema.ast)) {\n const name = property.name.toString() as SchemaEx.JsonPath;\n if (initialSizes[name] !== undefined) {\n continue;\n }\n\n // A plain switch rather than `Match.when({ _tag })`: matching an object pattern against\n // Effect 4's mutually recursive AST union expands into a mapped type the checker cannot resolve.\n switch (property.type._tag) {\n case 'Boolean':\n case 'Number':\n initialSizes[name] = 100;\n break;\n }\n }\n }\n\n return Obj.make(Table, { name, view: Ref.make(view), sizes: initialSizes } as Obj.MakeProps<typeof Table>);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAiBA,IAAa,QAAb,cAA2B,KAAK,WAAkB,IAAI,KAAK,uBAAuB,OAAO,CAAC,CAAC,CACzF,OAAO,OAAO;CACZ,MAAM,OAAO,OAAO,KAAK,OAAO,QAAQ;CAExC,MAAM,IAAI,IAAI,KAAK,IAAI,CAAC,CAAC,KAAK,oBAAoB,IAAI,KAAK,CAAC;CAG5D,OAAO,OAAO,OAAO,OAAO,QAAQ,OAAO,MAAM,CAAC,CAAC,KAAK,OAAO,YAAY,oBAAoB,IAAI,KAAK,CAAC;AAC3G,CAAC,CAAC,CAAC,KACD,gBAAgB,IAAI,CAAC,MAAM,CAAC,GAC5B,eAAe,IAAI,CAAC,MAAM,CAAC,GAC3B,WAAW,eAAe,IAAI;CAAE,MAAM;CAAsB,KAAK;AAAQ,CAAC,CAC5E,CACF,CAAC,CAAC,CAAC;;;;AAaH,IAAa,QAAQ,EAAE,MAAM,QAAQ,CAAC,GAAG,MAAM,iBAAmC;CAGhF,MAAM,eAAuC,EAAE,GAAG,MAAM;CACxD,IAAI,YAAY;EACd,MAAM,SAAS,WAAW,eAAe,UAAU;EACnD,KAAK,MAAM,YAAY,UAAU,sBAAsB,OAAO,GAAG,GAAG;GAClE,MAAM,OAAO,SAAS,KAAK,SAAS;GACpC,IAAI,aAAa,UAAU,KAAA,GACzB;GAKF,QAAQ,SAAS,KAAK,MAAtB;IACE,KAAK;IACL,KAAK,UACH,aAAa,QAAQ;GAEzB;EACF;CACF;CAEA,OAAO,IAAI,KAAK,OAAO;EAAE;EAAM,MAAM,IAAI,KAAK,IAAI;EAAG,OAAO;CAAa,CAAgC;AAC3G"}
@@ -1,6 +1,6 @@
1
- import { Atom } from "@effect-atom/atom";
1
+ import * as Atom from "effect/unstable/reactivity/Atom";
2
2
  import { useCallback, useContext, useEffect, useRef, useState } from "react";
3
- import { RegistryContext } from "@effect-atom/atom-react";
3
+ import { RegistryContext } from "@effect/atom-react/RegistryContext";
4
4
  import { useAsyncEffect } from "@dxos/react-ui";
5
5
  import { ViewState, useManagerOptional, useSelection, useSelectionActions } from "@dxos/react-ui-attention";
6
6
  import { toPlaneCellIndex } from "@dxos/react-ui-grid";
@@ -341,9 +341,7 @@ var SelectionModel = class extends Resource {
341
341
  case "all":
342
342
  this._registry.set(this._selection, new Set(this._registry.get(this._rows).map((row) => row.id)));
343
343
  break;
344
- case "none":
345
- this._registry.set(this._selection, /* @__PURE__ */ new Set());
346
- break;
344
+ case "none": this._registry.set(this._selection, /* @__PURE__ */ new Set());
347
345
  }
348
346
  };
349
347
  };
@@ -444,7 +442,7 @@ var TableModel = class extends Resource {
444
442
  invariant(!(this._features.dataEditable && this._features.selection.enabled && this._features.selection.mode === "single"), "Single selection is not compatible with editable tables.", {
445
443
  "~LogMeta": "~LogMeta",
446
444
  F: __dxlog_file,
447
- L: 208,
445
+ L: 209,
448
446
  S: this,
449
447
  A: ["!(this._features.dataEditable && this._features.selection.enabled && this._features.selection.mode === 'single')", "'Single selection is not compatible with editable tables.'"]
450
448
  });
@@ -517,7 +515,7 @@ var TableModel = class extends Resource {
517
515
  invariant(view, "Table model not initialized", {
518
516
  "~LogMeta": "~LogMeta",
519
517
  F: __dxlog_file,
520
- L: 328,
518
+ L: 329,
521
519
  S: this,
522
520
  A: ["view", "'Table model not initialized'"]
523
521
  });
@@ -634,7 +632,7 @@ var TableModel = class extends Resource {
634
632
  invariant(this._columnMeta, void 0, {
635
633
  "~LogMeta": "~LogMeta",
636
634
  F: __dxlog_file,
637
- L: 470,
635
+ L: 471,
638
636
  S: this,
639
637
  A: ["this._columnMeta", ""]
640
638
  });
@@ -656,7 +654,7 @@ var TableModel = class extends Resource {
656
654
  invariant(this._object.view.target, "View must be loaded before initializing column meta", {
657
655
  "~LogMeta": "~LogMeta",
658
656
  F: __dxlog_file,
659
- L: 494,
657
+ L: 495,
660
658
  S: this,
661
659
  A: ["this._object.view.target", "'View must be loaded before initializing column meta'"]
662
660
  });
@@ -784,7 +782,8 @@ var TableModel = class extends Resource {
784
782
  this._registry.set(this._draftRows, newDraftRows);
785
783
  }
786
784
  validateDraftRowData(data) {
787
- return validateSchema(toEffectSchema(this._projection.baseSchema), data) || [];
785
+ const schema = toEffectSchema(this._projection.baseSchema);
786
+ return validateSchema(schema, data) || [];
788
787
  }
789
788
  commitDraftRow = (draftRowIndex) => {
790
789
  if (draftRowIndex < 0 || draftRowIndex >= this._registry.get(this._draftRows).length) return false;
@@ -818,9 +817,10 @@ var TableModel = class extends Resource {
818
817
  if (fieldIndex === void 0 || fieldIndex < 0 || fieldIndex >= fields.length) return;
819
818
  const field = fields[fieldIndex];
820
819
  let value;
821
- if (plane === "frozenRowsEnd") if (row >= 0 && row < this._registry.get(this._draftRows).length) value = SchemaEx.getValue(this._registry.get(this._draftRows)[row].data, field.path);
822
- else return;
823
- else {
820
+ if (plane === "frozenRowsEnd") {
821
+ if (row >= 0 && row < this._registry.get(this._draftRows).length) value = SchemaEx.getValue(this._registry.get(this._draftRows)[row].data, field.path);
822
+ else return;
823
+ } else {
824
824
  const sortedRows = this._registry.get(this._sortedRows);
825
825
  value = SchemaEx.getValue(sortedRows[row], field.path);
826
826
  }
@@ -868,7 +868,7 @@ var TableModel = class extends Resource {
868
868
  invariant(currentRow, "Invalid row index", {
869
869
  "~LogMeta": "~LogMeta",
870
870
  F: __dxlog_file,
871
- L: 813,
871
+ L: 814,
872
872
  S: this,
873
873
  A: ["currentRow", "'Invalid row index'"]
874
874
  });
@@ -878,11 +878,12 @@ var TableModel = class extends Resource {
878
878
  invariant(type, void 0, {
879
879
  "~LogMeta": "~LogMeta",
880
880
  F: __dxlog_file,
881
- L: 820,
881
+ L: 821,
882
882
  S: this,
883
883
  A: ["type", ""]
884
884
  });
885
- const validationResult = validateSchema(Type.getSchema(type), snapshot);
885
+ const schema = Type.getSchema(type);
886
+ const validationResult = validateSchema(schema, snapshot);
886
887
  if (validationResult && validationResult.length > 0) {
887
888
  const error = validationResult.find((err) => err.path === field.path);
888
889
  if (error) return {
@@ -1168,7 +1169,7 @@ var TablePresentation = class {
1168
1169
  if (typeof value === "object" && value.value) return `${value.value}`;
1169
1170
  return "Object";
1170
1171
  };
1171
- cell.accessoryHtml = `<div class="flex flex-row gap-1 overflow-x-auto">${targetArray.map(getLabel).filter(Predicate.isNotNullable).map((title) => {
1172
+ cell.accessoryHtml = `<div class="flex flex-row gap-1 overflow-x-auto">${targetArray.map(getLabel).filter(Predicate.isNotNullish).map((title) => {
1172
1173
  return `<span class="dx-tag" data-hue="neutral">${title}</span>`;
1173
1174
  }).join("")}</div>`;
1174
1175
  }
@@ -1477,8 +1478,10 @@ var safeHttpUrl = (value) => {
1477
1478
  */
1478
1479
  var escapeHtmlAttribute = (value) => value.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
1479
1480
  var cellClassesForRowSelection = (selected, selectionMode) => {
1480
- if (!selected) if (selectionMode === "single") return ["cursor-pointer!"];
1481
- else return;
1481
+ if (!selected) {
1482
+ if (selectionMode === "single") return ["cursor-pointer!"];
1483
+ else return;
1484
+ }
1482
1485
  switch (selectionMode) {
1483
1486
  case "single": return ["dx-grid__cell--no-focus-unfurl bg-current-surface! hover:bg-hover-surface cursor-pointer!"];
1484
1487
  case "multiple": return ["bg-grid-cell-selected!"];
@@ -1510,11 +1513,12 @@ var useProjectionModel = (schema, table, registry) => {
1510
1513
  if (schema && table) {
1511
1514
  const view = await table.view.load();
1512
1515
  const jsonSchema = schema.jsonSchema;
1516
+ const change = createEchoChangeCallback(view, Type.getDatabase(schema) != null ? schema : void 0);
1513
1517
  const projection = new ProjectionModel({
1514
1518
  registry,
1515
1519
  view,
1516
1520
  baseSchema: jsonSchema,
1517
- change: createEchoChangeCallback(view, Type.getDatabase(schema) != null ? schema : void 0)
1521
+ change
1518
1522
  });
1519
1523
  projection.normalizeView();
1520
1524
  setProjection(projection);