@dxos/react-ui-table 0.8.4-main.c85a9c8dae → 0.8.4-main.d05539e30a

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 (119) hide show
  1. package/LICENSE +102 -5
  2. package/dist/lib/browser/{chunk-DSR2MRZB.mjs → chunk-4URYOFDL.mjs} +10 -21
  3. package/dist/lib/browser/chunk-4URYOFDL.mjs.map +7 -0
  4. package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
  5. package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
  6. package/dist/lib/browser/{chunk-PTHMYAAM.mjs → chunk-YDXPC7HA.mjs} +16 -72
  7. package/dist/lib/browser/chunk-YDXPC7HA.mjs.map +7 -0
  8. package/dist/lib/browser/index.mjs +207 -251
  9. package/dist/lib/browser/index.mjs.map +4 -4
  10. package/dist/lib/browser/meta.json +1 -1
  11. package/dist/lib/browser/testing/index.mjs +8 -6
  12. package/dist/lib/browser/testing/index.mjs.map +3 -3
  13. package/dist/lib/browser/translations.mjs +36 -0
  14. package/dist/lib/browser/translations.mjs.map +7 -0
  15. package/dist/lib/browser/types/index.mjs +2 -1
  16. package/dist/lib/node-esm/{chunk-GI72MQSG.mjs → chunk-2AN3QQ3D.mjs} +16 -72
  17. package/dist/lib/node-esm/chunk-2AN3QQ3D.mjs.map +7 -0
  18. package/dist/lib/node-esm/{chunk-HTZJSULI.mjs → chunk-B2SZYAEC.mjs} +10 -21
  19. package/dist/lib/node-esm/chunk-B2SZYAEC.mjs.map +7 -0
  20. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
  21. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
  22. package/dist/lib/node-esm/index.mjs +207 -251
  23. package/dist/lib/node-esm/index.mjs.map +4 -4
  24. package/dist/lib/node-esm/meta.json +1 -1
  25. package/dist/lib/node-esm/testing/index.mjs +8 -6
  26. package/dist/lib/node-esm/testing/index.mjs.map +3 -3
  27. package/dist/lib/node-esm/translations.mjs +37 -0
  28. package/dist/lib/node-esm/translations.mjs.map +7 -0
  29. package/dist/lib/node-esm/types/index.mjs +2 -1
  30. package/dist/types/src/components/Table/ColumnActionsMenu.d.ts.map +1 -1
  31. package/dist/types/src/components/Table/ColumnSettings.d.ts.map +1 -1
  32. package/dist/types/src/components/Table/DynamicTable.d.ts +1 -2
  33. package/dist/types/src/components/Table/DynamicTable.d.ts.map +1 -1
  34. package/dist/types/src/components/Table/DynamicTable.stories.d.ts +19 -21
  35. package/dist/types/src/components/Table/DynamicTable.stories.d.ts.map +1 -1
  36. package/dist/types/src/components/Table/Relations.stories.d.ts +82 -82
  37. package/dist/types/src/components/Table/Relations.stories.d.ts.map +1 -1
  38. package/dist/types/src/components/Table/RowActionsMenu.d.ts.map +1 -1
  39. package/dist/types/src/components/Table/Table.d.ts +20 -21
  40. package/dist/types/src/components/Table/Table.d.ts.map +1 -1
  41. package/dist/types/src/components/Table/Table.stories.d.ts +84 -84
  42. package/dist/types/src/components/Table/Table.stories.d.ts.map +1 -1
  43. package/dist/types/src/components/Table/TableContent.d.ts +18 -0
  44. package/dist/types/src/components/Table/TableContent.d.ts.map +1 -0
  45. package/dist/types/src/components/Table/TableToolbar.d.ts +21 -0
  46. package/dist/types/src/components/Table/TableToolbar.d.ts.map +1 -0
  47. package/dist/types/src/components/TableCellEditor/CellValidationMessage.d.ts.map +1 -1
  48. package/dist/types/src/components/TableCellEditor/FormCellEditor.d.ts.map +1 -1
  49. package/dist/types/src/components/TableCellEditor/TableCellEditor.d.ts.map +1 -1
  50. package/dist/types/src/components/TableCellEditor/TableCellEditor.stories.d.ts +22 -24
  51. package/dist/types/src/components/TableCellEditor/TableCellEditor.stories.d.ts.map +1 -1
  52. package/dist/types/src/components/index.d.ts +0 -1
  53. package/dist/types/src/components/index.d.ts.map +1 -1
  54. package/dist/types/src/components/testing.d.ts.map +1 -1
  55. package/dist/types/src/hooks/useAddRow.d.ts.map +1 -1
  56. package/dist/types/src/hooks/useProjectionModel.d.ts.map +1 -1
  57. package/dist/types/src/hooks/useTableModel.d.ts.map +1 -1
  58. package/dist/types/src/index.d.ts +0 -2
  59. package/dist/types/src/index.d.ts.map +1 -1
  60. package/dist/types/src/model/modal-controller.d.ts.map +1 -1
  61. package/dist/types/src/model/selection-model.d.ts +1 -1
  62. package/dist/types/src/model/selection-model.d.ts.map +1 -1
  63. package/dist/types/src/model/table-model.d.ts +4 -5
  64. package/dist/types/src/model/table-model.d.ts.map +1 -1
  65. package/dist/types/src/model/table-presentation.d.ts.map +1 -1
  66. package/dist/types/src/playwright/TableManager.d.ts.map +1 -1
  67. package/dist/types/src/playwright/playwright.config.d.ts.map +1 -1
  68. package/dist/types/src/testing/useTestTableModel.d.ts.map +1 -1
  69. package/dist/types/src/translations.d.ts +19 -21
  70. package/dist/types/src/translations.d.ts.map +1 -1
  71. package/dist/types/src/types/Table.d.ts +1 -7
  72. package/dist/types/src/types/Table.d.ts.map +1 -1
  73. package/dist/types/src/util/dynamic-table.d.ts.map +1 -1
  74. package/dist/types/src/util/query-ast.d.ts.map +1 -1
  75. package/dist/types/src/util/schema.d.ts.map +1 -1
  76. package/dist/types/src/util/signals.d.ts.map +1 -1
  77. package/dist/types/src/util/sort.d.ts.map +1 -1
  78. package/dist/types/src/util/table-buttons.d.ts +20 -20
  79. package/dist/types/src/util/table-buttons.d.ts.map +1 -1
  80. package/dist/types/src/util/table-controls.d.ts +4 -4
  81. package/dist/types/src/util/table-controls.d.ts.map +1 -1
  82. package/dist/types/src/util/tag.d.ts.map +1 -1
  83. package/dist/types/tsconfig.tsbuildinfo +1 -1
  84. package/package.json +51 -60
  85. package/src/components/Table/ColumnActionsMenu.tsx +7 -6
  86. package/src/components/Table/DynamicTable.stories.tsx +15 -15
  87. package/src/components/Table/DynamicTable.tsx +6 -15
  88. package/src/components/Table/Relations.stories.tsx +72 -32
  89. package/src/components/Table/RowActionsMenu.tsx +3 -2
  90. package/src/components/Table/Table.stories.tsx +28 -31
  91. package/src/components/Table/Table.tsx +37 -427
  92. package/src/components/Table/TableContent.tsx +425 -0
  93. package/src/components/{TableToolbar → Table}/TableToolbar.tsx +34 -41
  94. package/src/components/TableCellEditor/CellValidationMessage.tsx +1 -2
  95. package/src/components/TableCellEditor/FormCellEditor.tsx +3 -2
  96. package/src/components/TableCellEditor/TableCellEditor.stories.tsx +10 -11
  97. package/src/components/TableCellEditor/TableCellEditor.tsx +10 -8
  98. package/src/components/index.ts +0 -1
  99. package/src/components/testing.ts +10 -10
  100. package/src/index.ts +0 -4
  101. package/src/model/table-model.test.ts +1 -2
  102. package/src/model/table-model.ts +10 -11
  103. package/src/model/table-presentation.test.ts +1 -2
  104. package/src/model/table-presentation.ts +3 -5
  105. package/src/playwright/smoke.spec.ts +3 -3
  106. package/src/testing/useTestTableModel.ts +5 -5
  107. package/src/translations.ts +19 -21
  108. package/src/types/Table.ts +4 -21
  109. package/src/util/dynamic-table.test.ts +3 -3
  110. package/src/util/dynamic-table.ts +5 -6
  111. package/dist/lib/browser/chunk-DSR2MRZB.mjs.map +0 -7
  112. package/dist/lib/browser/chunk-PTHMYAAM.mjs.map +0 -7
  113. package/dist/lib/node-esm/chunk-GI72MQSG.mjs.map +0 -7
  114. package/dist/lib/node-esm/chunk-HTZJSULI.mjs.map +0 -7
  115. package/dist/types/src/components/TableToolbar/TableToolbar.d.ts +0 -21
  116. package/dist/types/src/components/TableToolbar/TableToolbar.d.ts.map +0 -1
  117. package/dist/types/src/components/TableToolbar/index.d.ts +0 -2
  118. package/dist/types/src/components/TableToolbar/index.d.ts.map +0 -1
  119. package/src/components/TableToolbar/index.ts +0 -5
package/LICENSE CHANGED
@@ -1,8 +1,105 @@
1
- MIT License
2
- Copyright (c) 2022 DXOS
1
+ # Functional Source License, Version 1.1, ALv2 Future License
3
2
 
4
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3
+ ## Abbreviation
5
4
 
6
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
5
+ FSL-1.1-Apache-2.0
7
6
 
8
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7
+ ## Notice
8
+
9
+ Copyright 2026 DXOS
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the Apache License, Version 2.0 that is effective on the second anniversary of
91
+ the date we make the Software available. On or after that date, you may use the
92
+ Software under the Apache License, Version 2.0, in which case the following
93
+ will apply:
94
+
95
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
96
+ this file except in compliance with the License.
97
+
98
+ You may obtain a copy of the License at
99
+
100
+ http://www.apache.org/licenses/LICENSE-2.0
101
+
102
+ Unless required by applicable law or agreed to in writing, software distributed
103
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
+ specific language governing permissions and limitations under the License.
@@ -1,21 +1,17 @@
1
- var __defProp = Object.defineProperty;
2
- var __export = (target, all) => {
3
- for (var name in all)
4
- __defProp(target, name, { get: all[name], enumerable: true });
5
- };
1
+ import {
2
+ __export
3
+ } from "./chunk-J5LGTIGS.mjs";
6
4
 
7
5
  // src/types/Table.ts
8
6
  var Table_exports = {};
9
7
  __export(Table_exports, {
10
8
  Table: () => Table,
11
- TableV1: () => TableV1,
12
9
  make: () => make
13
10
  });
14
11
  import * as Match from "effect/Match";
15
12
  import * as Schema from "effect/Schema";
16
13
  import * as SchemaAST from "effect/SchemaAST";
17
- import { Annotation, JsonSchema, Obj, Ref, Type } from "@dxos/echo";
18
- import { View } from "@dxos/echo";
14
+ import { Annotation, JsonSchema, Obj, Ref, Type, View } from "@dxos/echo";
19
15
  import { FormInputAnnotation, LabelAnnotation } from "@dxos/echo/internal";
20
16
  import { ViewAnnotation } from "@dxos/schema";
21
17
  var Table = Schema.Struct({
@@ -27,11 +23,13 @@ var Table = Schema.Struct({
27
23
  value: Schema.Number
28
24
  }).pipe(Schema.mutable, FormInputAnnotation.set(false))
29
25
  }).pipe(Type.object({
30
- typename: "dxos.org/type/Table",
31
- version: "0.2.0"
26
+ typename: "org.dxos.type.table",
27
+ version: "0.1.0"
32
28
  }), LabelAnnotation.set([
33
29
  "name"
34
- ]), ViewAnnotation.set(true), Annotation.IconAnnotation.set({
30
+ ]), ViewAnnotation.set([
31
+ "view"
32
+ ]), Annotation.IconAnnotation.set({
35
33
  icon: "ph--table--regular",
36
34
  hue: "green"
37
35
  }));
@@ -64,17 +62,8 @@ var make = ({ name, sizes = {}, view, jsonSchema }) => {
64
62
  }
65
63
  return table;
66
64
  };
67
- var TableV1 = Schema.Struct({
68
- sizes: Schema.Record({
69
- key: Schema.String,
70
- value: Schema.Number
71
- }).pipe(Schema.mutable)
72
- }).pipe(Type.object({
73
- typename: "dxos.org/type/Table",
74
- version: "0.1.0"
75
- }));
76
65
 
77
66
  export {
78
67
  Table_exports
79
68
  };
80
- //# sourceMappingURL=chunk-DSR2MRZB.mjs.map
69
+ //# sourceMappingURL=chunk-4URYOFDL.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/types/Table.ts"],
4
+ "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\nimport { Annotation, JsonSchema, Obj, Ref, Type, View } from '@dxos/echo';\nimport { FormInputAnnotation, type JsonPath, type JsonSchemaType, LabelAnnotation } from '@dxos/echo/internal';\nimport { ViewAnnotation } from '@dxos/schema';\n\nexport const Table = 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 Type.object({\n typename: 'org.dxos.type.table',\n version: '0.1.0',\n }),\n LabelAnnotation.set(['name']),\n ViewAnnotation.set(['view']),\n Annotation.IconAnnotation.set({\n icon: 'ph--table--regular',\n hue: 'green',\n }),\n);\n\nexport interface Table extends Schema.Schema.Type<typeof Table> {}\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 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"],
5
+ "mappings": ";;;;;AAAA;;;;;AAIA,YAAYA,WAAW;AACvB,YAAYC,YAAY;AACxB,YAAYC,eAAe;AAE3B,SAASC,YAAYC,YAAYC,KAAKC,KAAKC,MAAMC,YAAY;AAC7D,SAASC,qBAAyDC,uBAAuB;AACzF,SAASC,sBAAsB;AAExB,IAAMC,QAAeC,cAAO;EACjCC,MAAaC,cAAOC,KAAYC,eAAQ;EAExCC,MAAMZ,IAAIA,IAAIE,KAAKA,IAAI,EAAEQ,KAAKP,oBAAoBU,IAAI,KAAA,CAAA;EAEtDC,OAAcC,cAAO;;IAEnBC,KAAYP;IACZQ,OAAcC;EAChB,CAAA,EAAGR,KAAYS,gBAAShB,oBAAoBU,IAAI,KAAA,CAAA;AAClD,CAAA,EAAGH,KACDT,KAAKmB,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,GACAlB,gBAAgBS,IAAI;EAAC;CAAO,GAC5BR,eAAeQ,IAAI;EAAC;CAAO,GAC3BhB,WAAW0B,eAAeV,IAAI;EAC5BW,MAAM;EACNC,KAAK;AACP,CAAA,CAAA;AAgBK,IAAMC,OAAO,CAAC,EAAElB,MAAMM,QAAQ,CAAC,GAAGF,MAAMe,WAAU,MAAa;AACpE,QAAMC,QAAQ7B,IAAI2B,KAAKpB,OAAO;IAAEE;IAAMI,MAAMZ,IAAI0B,KAAKd,IAAAA;IAAOE;EAAM,CAAA;AAGlE,MAAIa,YAAY;AACd,UAAME,SAAS/B,WAAWgC,eAAeH,UAAAA;AACzC,UAAMI,aAAuBC,gCAAsBH,OAAOI,GAAG;AAC7D,eAAWC,YAAYH,YAAY;AACjC,YAAMvB,QAAO0B,SAAS1B,KAAK2B,SAAQ;AACnC,UAAIrB,QAAQN,KAAAA,GAAO;AACjBoB,cAAMd,MAAMN,KAAAA,IAAQM,MAAMN,KAAAA;AAC1B;MACF;AAEAd,MAAM0C,WAAI,EAAkB1B,KACpB2B,WAAK;QAAEC,MAAM;MAAiB,GAAG,MAAA;AACrCV,cAAMd,MAAMN,KAAAA,IAAQ;MACtB,CAAA,GACM6B,WAAK;QAAEC,MAAM;MAAgB,GAAG,MAAA;AACpCV,cAAMd,MAAMN,KAAAA,IAAQ;MACtB,CAAA,GACM+B,aAAO,MAAA;MAEb,CAAA,CAAA,EACAL,SAASE,IAAI;IACjB;EACF;AAEA,SAAOR;AACT;",
6
+ "names": ["Match", "Schema", "SchemaAST", "Annotation", "JsonSchema", "Obj", "Ref", "Type", "View", "FormInputAnnotation", "LabelAnnotation", "ViewAnnotation", "Table", "Struct", "name", "String", "pipe", "optional", "view", "set", "sizes", "Record", "key", "value", "Number", "mutable", "object", "typename", "version", "IconAnnotation", "icon", "hue", "make", "jsonSchema", "table", "schema", "toEffectSchema", "properties", "getPropertySignatures", "ast", "property", "toString", "type", "when", "_tag", "orElse"]
7
+ }
@@ -0,0 +1,10 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
7
+ export {
8
+ __export
9
+ };
10
+ //# sourceMappingURL=chunk-J5LGTIGS.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -383,10 +383,10 @@ var SelectionModel = class extends Resource {
383
383
  // src/model/table-model.ts
384
384
  var __dxlog_file = "/__w/dxos/dxos/packages/ui/react-ui-table/src/model/table-model.ts";
385
385
  var createEchoChangeCallback = (table) => ({
386
- table: (mutate) => Obj.change(table, (mutableTable) => mutate(mutableTable)),
386
+ table: (mutate) => Obj.update(table, (table2) => mutate(table2)),
387
387
  row: (row, mutate) => {
388
388
  if (Obj.isObject(row)) {
389
- Obj.change(row, (mutableRow) => mutate(mutableRow));
389
+ Obj.update(row, (row2) => mutate(row2));
390
390
  } else {
391
391
  mutate(row);
392
392
  }
@@ -451,15 +451,7 @@ var TableModel = class extends Resource2 {
451
451
  ...defaultFeatures,
452
452
  ...features
453
453
  };
454
- invariant(!(this._features.dataEditable && this._features.selection.enabled && this._features.selection.mode === "single"), "Single selection is not compatible with editable tables.", {
455
- F: __dxlog_file,
456
- L: 197,
457
- S: this,
458
- A: [
459
- "!(this._features.dataEditable && this._features.selection.enabled && this._features.selection.mode === 'single')",
460
- "'Single selection is not compatible with editable tables.'"
461
- ]
462
- });
454
+ invariant(!(this._features.dataEditable && this._features.selection.enabled && this._features.selection.mode === "single"), "Single selection is not compatible with editable tables.", { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 94, S: this, A: ["!(this._features.dataEditable && this._features.selection.enabled && this._features.selection.mode === 'single')", "'Single selection is not compatible with editable tables.'"] });
463
455
  this._visibleRange = Atom2.make({
464
456
  start: {
465
457
  row: 0,
@@ -542,15 +534,7 @@ var TableModel = class extends Resource2 {
542
534
  }
543
535
  get view() {
544
536
  const view = this._object.view.target;
545
- invariant(view, "Table model not initialized", {
546
- F: __dxlog_file,
547
- L: 308,
548
- S: this,
549
- A: [
550
- "view",
551
- "'Table model not initialized'"
552
- ]
553
- });
537
+ invariant(view, "Table model not initialized", { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 186, S: this, A: ["view", "'Table model not initialized'"] });
554
538
  return view;
555
539
  }
556
540
  get table() {
@@ -610,15 +594,7 @@ var TableModel = class extends Resource2 {
610
594
  return this._pinnedRows;
611
595
  }
612
596
  get columnMeta() {
613
- invariant(this._columnMeta, void 0, {
614
- F: __dxlog_file,
615
- L: 381,
616
- S: this,
617
- A: [
618
- "this._columnMeta",
619
- ""
620
- ]
621
- });
597
+ invariant(this._columnMeta, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 240, S: this, A: ["this._columnMeta", ""] });
622
598
  return this._columnMeta;
623
599
  }
624
600
  get selection() {
@@ -637,15 +613,7 @@ var TableModel = class extends Resource2 {
637
613
  await this._selection.open(this._ctx);
638
614
  }
639
615
  initializeColumnMeta() {
640
- invariant(this._object.view.target, "View must be loaded before initializing column meta", {
641
- F: __dxlog_file,
642
- L: 405,
643
- S: this,
644
- A: [
645
- "this._object.view.target",
646
- "'View must be loaded before initializing column meta'"
647
- ]
648
- });
616
+ invariant(this._object.view.target, "View must be loaded before initializing column meta", { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 259, S: this, A: ["this._object.view.target", "'View must be loaded before initializing column meta'"] });
649
617
  this._columnMeta = Atom2.make((get) => {
650
618
  const fields = get(this._projection.fields);
651
619
  const meta = Object.fromEntries(fields.map((field, index) => [
@@ -907,41 +875,17 @@ var TableModel = class extends Resource2 {
907
875
  };
908
876
  } else {
909
877
  const currentRow = this._registry.get(this._rows)[row];
910
- invariant(currentRow, "Invalid row index", {
911
- F: __dxlog_file,
912
- L: 693,
913
- S: this,
914
- A: [
915
- "currentRow",
916
- "'Invalid row index'"
917
- ]
918
- });
878
+ invariant(currentRow, "Invalid row index", { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 533, S: this, A: ["currentRow", "'Invalid row index'"] });
919
879
  const snapshot = {
920
880
  ...getSnapshot(currentRow)
921
881
  };
922
882
  setValue(snapshot, field.path, transformedValue);
923
883
  const schema = Obj.getSchema(currentRow);
924
- invariant(schema, void 0, {
925
- F: __dxlog_file,
926
- L: 699,
927
- S: this,
928
- A: [
929
- "schema",
930
- ""
931
- ]
932
- });
884
+ invariant(schema, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 539, S: this, A: ["schema", ""] });
933
885
  const validationResult = validateSchema(schema, snapshot);
934
886
  if (validationResult && validationResult.length > 0) {
935
887
  const error = validationResult[0];
936
- invariant(error.path === field.path, void 0, {
937
- F: __dxlog_file,
938
- L: 704,
939
- S: this,
940
- A: [
941
- "error.path === field.path",
942
- ""
943
- ]
944
- });
888
+ invariant(error.path === field.path, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 543, S: this, A: ["error.path === field.path", ""] });
945
889
  return {
946
890
  valid: false,
947
891
  error: error.message
@@ -1105,13 +1049,13 @@ var TableModel = class extends Resource2 {
1105
1049
  const field = this._projection.getFields().find((f) => f.id === inMemorySort.fieldId);
1106
1050
  if (field) {
1107
1051
  const newQuery = baseQuery.orderBy(Order.property(field.path, inMemorySort.direction));
1108
- Obj.change(view, (v) => {
1109
- v.query.ast = newQuery.ast;
1052
+ Obj.update(view, (view2) => {
1053
+ view2.query.ast = newQuery.ast;
1110
1054
  });
1111
1055
  }
1112
1056
  } else {
1113
- Obj.change(view, (v) => {
1114
- v.query.ast = baseQuery.ast;
1057
+ Obj.update(view, (view2) => {
1058
+ view2.query.ast = baseQuery.ast;
1115
1059
  });
1116
1060
  }
1117
1061
  this._registry.set(this._inMemorySort, void 0);
@@ -1591,11 +1535,11 @@ var cellClassesForRowSelection = (selected, selectionMode) => {
1591
1535
  switch (selectionMode) {
1592
1536
  case "single":
1593
1537
  return [
1594
- "dx-grid__cell--no-focus-unfurl !bg-current-surface hover:bg-hover-surface cursor-pointer!"
1538
+ "dx-grid__cell--no-focus-unfurl bg-current-surface! hover:bg-hover-surface cursor-pointer!"
1595
1539
  ];
1596
1540
  case "multiple":
1597
1541
  return [
1598
- "!bg-grid-cell-selected"
1542
+ "bg-grid-cell-selected!"
1599
1543
  ];
1600
1544
  }
1601
1545
  };
@@ -1748,4 +1692,4 @@ export {
1748
1692
  useProjectionModel,
1749
1693
  useTableModel
1750
1694
  };
1751
- //# sourceMappingURL=chunk-PTHMYAAM.mjs.map
1695
+ //# sourceMappingURL=chunk-YDXPC7HA.mjs.map