@dxos/react-ui-table 0.7.5-main.499c70c → 0.7.5-main.6a330ac

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 (117) hide show
  1. package/dist/lib/browser/{chunk-AT7O4RAD.mjs → chunk-3FR6NHPD.mjs} +6 -4
  2. package/dist/lib/browser/chunk-3FR6NHPD.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +482 -284
  4. package/dist/lib/browser/index.mjs.map +4 -4
  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-YSBXNBDJ.cjs → chunk-NB3SFHGA.cjs} +8 -6
  8. package/dist/lib/node/chunk-NB3SFHGA.cjs.map +7 -0
  9. package/dist/lib/node/index.cjs +474 -270
  10. package/dist/lib/node/index.cjs.map +4 -4
  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-6OH2NHUX.mjs → chunk-RLVVOZW5.mjs} +6 -4
  15. package/dist/lib/node-esm/chunk-RLVVOZW5.mjs.map +7 -0
  16. package/dist/lib/node-esm/index.mjs +482 -284
  17. package/dist/lib/node-esm/index.mjs.map +4 -4
  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/_deprecated/components/Cell/Cell.d.ts +2 -2
  21. package/dist/types/src/_deprecated/components/Cell/Cell.d.ts.map +1 -1
  22. package/dist/types/src/_deprecated/components/Cell/CellCombobox.d.ts +1 -2
  23. package/dist/types/src/_deprecated/components/Cell/CellCombobox.d.ts.map +1 -1
  24. package/dist/types/src/_deprecated/components/ColumnMenu/ColumnMenu.d.ts +2 -3
  25. package/dist/types/src/_deprecated/components/ColumnMenu/ColumnMenu.d.ts.map +1 -1
  26. package/dist/types/src/_deprecated/components/ColumnMenu/ColumnMenu.stories.d.ts +6 -7
  27. package/dist/types/src/_deprecated/components/ColumnMenu/ColumnMenu.stories.d.ts.map +1 -1
  28. package/dist/types/src/_deprecated/components/ColumnMenu/ColumnSettings.d.ts +1 -2
  29. package/dist/types/src/_deprecated/components/ColumnMenu/ColumnSettings.d.ts.map +1 -1
  30. package/dist/types/src/_deprecated/components/ColumnMenu/ColumnSettings.stories.d.ts +6 -7
  31. package/dist/types/src/_deprecated/components/ColumnMenu/ColumnSettings.stories.d.ts.map +1 -1
  32. package/dist/types/src/_deprecated/components/Table/Table.d.ts +5 -5
  33. package/dist/types/src/_deprecated/components/Table/Table.d.ts.map +1 -1
  34. package/dist/types/src/_deprecated/components/Table/Table.stories.d.ts +8 -9
  35. package/dist/types/src/_deprecated/components/Table/Table.stories.d.ts.map +1 -1
  36. package/dist/types/src/_deprecated/components/Table/TableBody.d.ts +1 -2
  37. package/dist/types/src/_deprecated/components/Table/TableBody.d.ts.map +1 -1
  38. package/dist/types/src/_deprecated/components/Table/TableContext.d.ts +1 -1
  39. package/dist/types/src/_deprecated/components/Table/TableContext.d.ts.map +1 -1
  40. package/dist/types/src/_deprecated/components/Table/TableHead.d.ts +1 -2
  41. package/dist/types/src/_deprecated/components/Table/TableHead.d.ts.map +1 -1
  42. package/dist/types/src/_deprecated/schema/Schema.stories.d.ts +2 -3
  43. package/dist/types/src/_deprecated/schema/Schema.stories.d.ts.map +1 -1
  44. package/dist/types/src/components/Table/ColumnActionsMenu.d.ts +1 -2
  45. package/dist/types/src/components/Table/ColumnActionsMenu.d.ts.map +1 -1
  46. package/dist/types/src/components/Table/ColumnSettings.d.ts +1 -2
  47. package/dist/types/src/components/Table/ColumnSettings.d.ts.map +1 -1
  48. package/dist/types/src/components/Table/CreateRefPanel.d.ts +1 -2
  49. package/dist/types/src/components/Table/CreateRefPanel.d.ts.map +1 -1
  50. package/dist/types/src/components/Table/RefPanel.d.ts +1 -2
  51. package/dist/types/src/components/Table/RefPanel.d.ts.map +1 -1
  52. package/dist/types/src/components/Table/RowActionsMenu.d.ts +1 -2
  53. package/dist/types/src/components/Table/RowActionsMenu.d.ts.map +1 -1
  54. package/dist/types/src/components/Table/Table.d.ts +1 -1
  55. package/dist/types/src/components/Table/Table.d.ts.map +1 -1
  56. package/dist/types/src/components/Table/Table.stories.d.ts +1 -4
  57. package/dist/types/src/components/Table/Table.stories.d.ts.map +1 -1
  58. package/dist/types/src/components/TableCellEditor/TableCellEditor.d.ts +1 -2
  59. package/dist/types/src/components/TableCellEditor/TableCellEditor.d.ts.map +1 -1
  60. package/dist/types/src/components/TableToolbar/TableToolbar.d.ts +17 -0
  61. package/dist/types/src/components/TableToolbar/TableToolbar.d.ts.map +1 -0
  62. package/dist/types/src/components/TableToolbar/index.d.ts +2 -0
  63. package/dist/types/src/components/TableToolbar/index.d.ts.map +1 -0
  64. package/dist/types/src/components/index.d.ts +1 -1
  65. package/dist/types/src/components/index.d.ts.map +1 -1
  66. package/dist/types/src/components/testing.d.ts +12 -35
  67. package/dist/types/src/components/testing.d.ts.map +1 -1
  68. package/dist/types/src/hooks/useTableModel.d.ts.map +1 -1
  69. package/dist/types/src/model/table-model.d.ts +11 -19
  70. package/dist/types/src/model/table-model.d.ts.map +1 -1
  71. package/dist/types/src/model/table-presentation.d.ts.map +1 -1
  72. package/dist/types/src/model/table-sorting.d.ts +53 -0
  73. package/dist/types/src/model/table-sorting.d.ts.map +1 -0
  74. package/dist/types/src/translations.d.ts +2 -1
  75. package/dist/types/src/translations.d.ts.map +1 -1
  76. package/dist/types/src/types/table.d.ts +21 -90
  77. package/dist/types/src/types/table.d.ts.map +1 -1
  78. package/dist/types/src/util/table-buttons.d.ts +15 -1
  79. package/dist/types/src/util/table-buttons.d.ts.map +1 -1
  80. package/dist/types/src/util/table.d.ts +2 -1
  81. package/dist/types/src/util/table.d.ts.map +1 -1
  82. package/dist/types/tsconfig.tsbuildinfo +1 -1
  83. package/package.json +36 -34
  84. package/src/_deprecated/schema/Schema.stories.tsx +1 -1
  85. package/src/components/Table/ColumnActionsMenu.tsx +4 -4
  86. package/src/components/Table/CreateRefPanel.tsx +3 -4
  87. package/src/components/Table/Table.stories.tsx +55 -44
  88. package/src/components/Table/Table.tsx +4 -0
  89. package/src/components/TableCellEditor/TableCellEditor.stories.tsx +1 -1
  90. package/src/components/TableToolbar/TableToolbar.tsx +72 -0
  91. package/src/components/{Toolbar → TableToolbar}/index.ts +1 -1
  92. package/src/components/index.ts +1 -1
  93. package/src/hooks/useTableModel.ts +21 -0
  94. package/src/model/table-model.test.ts +0 -5
  95. package/src/model/table-model.ts +41 -99
  96. package/src/model/table-presentation.ts +25 -4
  97. package/src/model/table-sorting.ts +215 -0
  98. package/src/playwright/smoke.spec.ts +35 -13
  99. package/src/translations.ts +2 -1
  100. package/src/types/table.ts +3 -3
  101. package/src/util/table-buttons.ts +33 -3
  102. package/src/util/table-controls.ts +2 -2
  103. package/src/util/table.ts +85 -52
  104. package/dist/lib/browser/chunk-AT7O4RAD.mjs.map +0 -7
  105. package/dist/lib/node/chunk-YSBXNBDJ.cjs.map +0 -7
  106. package/dist/lib/node-esm/chunk-6OH2NHUX.mjs.map +0 -7
  107. package/dist/types/src/components/Toolbar/Toolbar.d.ts +0 -21
  108. package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +0 -1
  109. package/dist/types/src/components/Toolbar/common.d.ts +0 -14
  110. package/dist/types/src/components/Toolbar/common.d.ts.map +0 -1
  111. package/dist/types/src/components/Toolbar/index.d.ts +0 -2
  112. package/dist/types/src/components/Toolbar/index.d.ts.map +0 -1
  113. package/dist/types/src/playwright/playwright.config.d.ts +0 -3
  114. package/dist/types/src/playwright/playwright.config.d.ts.map +0 -1
  115. package/src/components/Toolbar/Toolbar.tsx +0 -87
  116. package/src/components/Toolbar/common.tsx +0 -71
  117. /package/src/playwright/{playwright.config.ts → playwright.config.cts} +0 -0
@@ -1,10 +1,9 @@
1
1
  import { type Row, type RowData } from '@tanstack/react-table';
2
- import React from 'react';
3
2
  type TableBodyProps = {
4
3
  rows: Row<RowData>[];
5
4
  };
6
5
  declare const TableBody: {
7
- ({ rows }: TableBodyProps): React.JSX.Element;
6
+ ({ rows }: TableBodyProps): import("react/jsx-runtime").JSX.Element;
8
7
  displayName: string;
9
8
  };
10
9
  export { TableBody };
@@ -1 +1 @@
1
- {"version":3,"file":"TableBody.d.ts","sourceRoot":"","sources":["../../../../../../src/_deprecated/components/Table/TableBody.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAc,KAAK,GAAG,EAAE,KAAK,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,KAAqB,MAAM,OAAO,CAAC;AAS1C,KAAK,cAAc,GAAG;IACpB,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;CACtB,CAAC;AAEF,QAAA,MAAM,SAAS;eAAc,cAAc;;CAwD1C,CAAC;AAIF,OAAO,EAAE,SAAS,EAAE,CAAC;AAErB,YAAY,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"TableBody.d.ts","sourceRoot":"","sources":["../../../../../../src/_deprecated/components/Table/TableBody.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAc,KAAK,GAAG,EAAE,KAAK,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAU3E,KAAK,cAAc,GAAG;IACpB,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;CACtB,CAAC;AAEF,QAAA,MAAM,SAAS;eAAc,cAAc;;CAwD1C,CAAC;AAIF,OAAO,EAAE,SAAS,EAAE,CAAC;AAErB,YAAY,EAAE,cAAc,EAAE,CAAC"}
@@ -8,6 +8,6 @@ export type TypedTableProvider<TData extends RowData> = {
8
8
  }): JSX.Element;
9
9
  displayName: string;
10
10
  };
11
- export declare const TableProvider: ({ children, ...value }: PropsWithChildren<TableContextValue<RowData>>) => JSX.Element;
11
+ export declare const TableProvider: ({ children, ...value }: PropsWithChildren<TableContextValue<RowData>>) => import("react/jsx-runtime").JSX.Element;
12
12
  export declare const useTableContext: <TData extends RowData>() => TableContextValue<TData>;
13
13
  //# sourceMappingURL=TableContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TableContext.d.ts","sourceRoot":"","sources":["../../../../../../src/_deprecated/components/Table/TableContext.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAc,EAIZ,KAAK,GAAG,EACR,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,eAAO,MAAM,UAAU,UAAU,CAAC;AAIlC,MAAM,MAAM,kBAAkB,CAAC,KAAK,SAAS,OAAO,IAAI;IACtD,CAAC,KAAK,EAAE,iBAAiB,CAAC,KAAK,CAAC,GAAG;QAAE,QAAQ,EAAE,SAAS,CAAA;KAAE,GAAG,GAAG,CAAC,OAAO,CAAC;IACzE,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,aAAa,2BAA4B,iBAAiB,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,gBAElG,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,KAAK,SAAS,OAAO,OAAK,iBAAiB,CAAC,KAAK,CAEhF,CAAC"}
1
+ {"version":3,"file":"TableContext.d.ts","sourceRoot":"","sources":["../../../../../../src/_deprecated/components/Table/TableContext.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAc,EAIZ,KAAK,GAAG,EACR,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,eAAO,MAAM,UAAU,UAAU,CAAC;AAIlC,MAAM,MAAM,kBAAkB,CAAC,KAAK,SAAS,OAAO,IAAI;IACtD,CAAC,KAAK,EAAE,iBAAiB,CAAC,KAAK,CAAC,GAAG;QAAE,QAAQ,EAAE,SAAS,CAAA;KAAE,GAAG,GAAG,CAAC,OAAO,CAAC;IACzE,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,aAAa,2BAA4B,iBAAiB,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,4CAElG,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,KAAK,SAAS,OAAO,OAAK,iBAAiB,CAAC,KAAK,CAEhF,CAAC"}
@@ -1,7 +1,6 @@
1
- import React from 'react';
2
1
  type TableHeadProps = {};
3
2
  declare const TableHead: {
4
- (_props: TableHeadProps): React.JSX.Element;
3
+ (_props: TableHeadProps): import("react/jsx-runtime").JSX.Element;
5
4
  displayName: string;
6
5
  };
7
6
  export { TableHead };
@@ -1 +1 @@
1
- {"version":3,"file":"TableHead.d.ts","sourceRoot":"","sources":["../../../../../../src/_deprecated/components/Table/TableHead.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,KAAK,cAAc,GAAG,EAAE,CAAC;AAEzB,QAAA,MAAM,SAAS;aAAY,cAAc;;CAuDxC,CAAC;AAIF,OAAO,EAAE,SAAS,EAAE,CAAC;AAErB,YAAY,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"TableHead.d.ts","sourceRoot":"","sources":["../../../../../../src/_deprecated/components/Table/TableHead.tsx"],"names":[],"mappings":"AAcA,KAAK,cAAc,GAAG,EAAE,CAAC;AAEzB,QAAA,MAAM,SAAS;aAAY,cAAc;;CAuDxC,CAAC;AAIF,OAAO,EAAE,SAAS,EAAE,CAAC;AAErB,YAAY,EAAE,cAAc,EAAE,CAAC"}
@@ -1,11 +1,10 @@
1
1
  import '@dxos-theme';
2
- import React from 'react';
3
2
  declare const _default: {
4
3
  title: string;
5
- decorators: import("@storybook/react/*").Decorator[];
4
+ decorators: import("@storybook/react").Decorator[];
6
5
  };
7
6
  export default _default;
8
7
  export declare const Default: {
9
- render: () => React.JSX.Element;
8
+ render: () => import("react/jsx-runtime").JSX.Element;
10
9
  };
11
10
  //# sourceMappingURL=Schema.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.stories.d.ts","sourceRoot":"","sources":["../../../../../src/_deprecated/schema/Schema.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAIrB,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;AAQ1B,wBAGE;AAoBF,eAAO,MAAM,OAAO;;CAmBnB,CAAC"}
1
+ {"version":3,"file":"Schema.stories.d.ts","sourceRoot":"","sources":["../../../../../src/_deprecated/schema/Schema.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;;;;;AAYrB,wBAGE;AAoBF,eAAO,MAAM,OAAO;;CAmBnB,CAAC"}
@@ -1,9 +1,8 @@
1
- import React from 'react';
2
1
  import { type TableModel, type ModalController } from '../../model';
3
2
  type ColumnActionsMenuProps = {
4
3
  model: TableModel;
5
4
  modals: ModalController;
6
5
  };
7
- export declare const ColumnActionsMenu: ({ model, modals }: ColumnActionsMenuProps) => React.JSX.Element | null;
6
+ export declare const ColumnActionsMenu: ({ model, modals }: ColumnActionsMenuProps) => import("react/jsx-runtime").JSX.Element | null;
8
7
  export {};
9
8
  //# sourceMappingURL=ColumnActionsMenu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ColumnActionsMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/ColumnActionsMenu.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAGpE,KAAK,sBAAsB,GAAG;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,eAAe,CAAA;CAAE,CAAC;AAE7E,eAAO,MAAM,iBAAiB,sBAAuB,sBAAsB,6BAmD1E,CAAC"}
1
+ {"version":3,"file":"ColumnActionsMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/ColumnActionsMenu.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAGpE,KAAK,sBAAsB,GAAG;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,eAAe,CAAA;CAAE,CAAC;AAE7E,eAAO,MAAM,iBAAiB,sBAAuB,sBAAsB,mDAmD1E,CAAC"}
@@ -1,10 +1,9 @@
1
- import React from 'react';
2
1
  import { type TableModel, type ModalController } from '../../model';
3
2
  type ColumnSettingsProps = {
4
3
  model?: TableModel;
5
4
  modals: ModalController;
6
5
  onNewColumn: () => void;
7
6
  };
8
- export declare const ColumnSettings: ({ model, modals, onNewColumn }: ColumnSettingsProps) => React.JSX.Element | null;
7
+ export declare const ColumnSettings: ({ model, modals, onNewColumn }: ColumnSettingsProps) => import("react/jsx-runtime").JSX.Element | null;
9
8
  export {};
10
9
  //# sourceMappingURL=ColumnSettings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ColumnSettings.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/ColumnSettings.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAOzE,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAEpE,KAAK,mBAAmB,GAAG;IAAE,KAAK,CAAC,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,eAAe,CAAC;IAAC,WAAW,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC;AAEpG,eAAO,MAAM,cAAc,mCAAoC,mBAAmB,6BA+DjF,CAAC"}
1
+ {"version":3,"file":"ColumnSettings.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/ColumnSettings.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAEpE,KAAK,mBAAmB,GAAG;IAAE,KAAK,CAAC,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,eAAe,CAAC;IAAC,WAAW,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC;AAEpG,eAAO,MAAM,cAAc,mCAAoC,mBAAmB,mDA+DjF,CAAC"}
@@ -1,9 +1,8 @@
1
- import React from 'react';
2
1
  import { type GridScopedProps } from '@dxos/react-ui-grid';
3
2
  import { type TableModel, type ModalController } from '../../model';
4
3
  export type CreateRefPanelProps = {
5
4
  model?: TableModel;
6
5
  modals: ModalController;
7
6
  };
8
- export declare const CreateRefPanel: ({ model, modals, __gridScope }: GridScopedProps<CreateRefPanelProps>) => React.JSX.Element | null;
7
+ export declare const CreateRefPanel: ({ model, modals, __gridScope }: GridScopedProps<CreateRefPanelProps>) => import("react/jsx-runtime").JSX.Element | null;
9
8
  //# sourceMappingURL=CreateRefPanel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CreateRefPanel.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/CreateRefPanel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAMpD,OAAO,EAAE,KAAK,eAAe,EAAkB,MAAM,qBAAqB,CAAC;AAE3E,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAEpE,MAAM,MAAM,mBAAmB,GAAG;IAAE,KAAK,CAAC,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,eAAe,CAAA;CAAE,CAAC;AAGlF,eAAO,MAAM,cAAc,mCAAoC,eAAe,CAAC,mBAAmB,CAAC,6BAiElG,CAAC"}
1
+ {"version":3,"file":"CreateRefPanel.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/CreateRefPanel.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,eAAe,EAAkB,MAAM,qBAAqB,CAAC;AAE3E,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAEpE,MAAM,MAAM,mBAAmB,GAAG;IAAE,KAAK,CAAC,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,eAAe,CAAA;CAAE,CAAC;AAGlF,eAAO,MAAM,cAAc,mCAAoC,eAAe,CAAC,mBAAmB,CAAC,mDAgElG,CAAC"}
@@ -1,9 +1,8 @@
1
- import React from 'react';
2
1
  import { type TableModel, type ModalController } from '../../model';
3
2
  type RefPanelProps = {
4
3
  model: TableModel;
5
4
  modals: ModalController;
6
5
  };
7
- export declare const RefPanel: ({ model, modals }: RefPanelProps) => React.JSX.Element | null;
6
+ export declare const RefPanel: ({ model, modals }: RefPanelProps) => import("react/jsx-runtime").JSX.Element | null;
8
7
  export {};
9
8
  //# sourceMappingURL=RefPanel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RefPanel.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/RefPanel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAEpE,KAAK,aAAa,GAAG;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,eAAe,CAAA;CAAE,CAAC;AAUpE,eAAO,MAAM,QAAQ,sBAAuB,aAAa,6BA6BxD,CAAC"}
1
+ {"version":3,"file":"RefPanel.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/RefPanel.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAEpE,KAAK,aAAa,GAAG;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,eAAe,CAAA;CAAE,CAAC;AAUpE,eAAO,MAAM,QAAQ,sBAAuB,aAAa,mDA6BxD,CAAC"}
@@ -1,9 +1,8 @@
1
- import React from 'react';
2
1
  import { type TableModel, type ModalController } from '../../model';
3
2
  type RowActionsMenuProps = {
4
3
  model: TableModel;
5
4
  modals: ModalController;
6
5
  };
7
- export declare const RowActionsMenu: ({ model, modals }: RowActionsMenuProps) => React.JSX.Element | null;
6
+ export declare const RowActionsMenu: ({ model, modals }: RowActionsMenuProps) => import("react/jsx-runtime").JSX.Element | null;
8
7
  export {};
9
8
  //# sourceMappingURL=RowActionsMenu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RowActionsMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/RowActionsMenu.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAGpE,KAAK,mBAAmB,GAAG;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,eAAe,CAAA;CAAE,CAAC;AAE1E,eAAO,MAAM,cAAc,sBAAuB,mBAAmB,6BAoBpE,CAAC"}
1
+ {"version":3,"file":"RowActionsMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/RowActionsMenu.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAGpE,KAAK,mBAAmB,GAAG;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,eAAe,CAAA;CAAE,CAAC;AAE1E,eAAO,MAAM,cAAc,sBAAuB,mBAAmB,mDAoBpE,CAAC"}
@@ -13,7 +13,7 @@ export type TableMainProps = {
13
13
  ignoreAttention?: boolean;
14
14
  };
15
15
  export declare const Table: {
16
- Root: ({ children, role }: TableRootProps) => React.JSX.Element;
16
+ Root: ({ children, role }: TableRootProps) => import("react/jsx-runtime").JSX.Element;
17
17
  Main: React.ForwardRefExoticComponent<TableMainProps & React.RefAttributes<TableController>>;
18
18
  };
19
19
  //# 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,EAAE,EAEZ,KAAK,iBAAiB,EAOvB,MAAM,OAAO,CAAC;AAOf,OAAO,EAAgE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AASxH,OAAO,EAAmB,KAAK,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAkBvF,MAAM,MAAM,cAAc,GAAG,iBAAiB,CAAC;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAsBlE,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AA+PF,eAAO,MAAM,KAAK;+BA3RqB,cAAc;;CA8RpD,CAAC"}
1
+ {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/Table.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAEZ,KAAK,iBAAiB,EAOvB,MAAM,OAAO,CAAC;AAOf,OAAO,EAAgE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AASxH,OAAO,EAAmB,KAAK,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAkBvF,MAAM,MAAM,cAAc,GAAG,iBAAiB,CAAC;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAsBlE,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAmQF,eAAO,MAAM,KAAK;+BA/RqB,cAAc;;CAkSpD,CAAC"}
@@ -1,13 +1,10 @@
1
1
  import '@dxos-theme';
2
- import { type StoryObj, type Meta } from '@storybook/react';
2
+ import { type Meta } from '@storybook/react';
3
3
  import { type SimulatorProps } from '../testing';
4
4
  type StoryProps = {
5
5
  rows?: number;
6
6
  } & Pick<SimulatorProps, 'insertInterval' | 'updateInterval'>;
7
7
  declare const meta: Meta<StoryProps>;
8
8
  export default meta;
9
- type Story = StoryObj<StoryProps>;
10
9
  export declare const Default: {};
11
- export declare const Mutations: Story;
12
- export declare const RapidInsertions: Story;
13
10
  //# 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,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAsB5D,OAAO,EAA4B,KAAK,cAAc,EAAgB,MAAM,YAAY,CAAC;AAqIzF,KAAK,UAAU,GAAG;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,IAAI,CAAC,cAAc,EAAE,gBAAgB,GAAG,gBAAgB,CAAC,CAAC;AA8C9D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAAU,CAyB1B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;AAElC,eAAO,MAAM,OAAO,IAAK,CAAC;AAE1B,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAM7B,CAAC"}
1
+ {"version":3,"file":"Table.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/Table.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAqB7C,OAAO,EAA4B,KAAK,cAAc,EAAgB,MAAM,YAAY,CAAC;AAiJzF,KAAK,UAAU,GAAG;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,IAAI,CAAC,cAAc,EAAE,gBAAgB,GAAG,gBAAgB,CAAC,CAAC;AA8C9D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAAU,CAyB1B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,IAAK,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import { type Completion } from '@codemirror/autocomplete';
2
- import React from 'react';
3
2
  import { type DxGrid } from '@dxos/lit-grid';
4
3
  import { type DxGridPlanePosition, type GridScopedProps } from '@dxos/react-ui-grid';
5
4
  import { type FieldProjection } from '@dxos/schema';
@@ -22,6 +21,6 @@ export type TableCellEditorProps = {
22
21
  onFocus?: DxGrid['refocus'];
23
22
  onQuery?: (field: FieldProjection, text: string) => Promise<QueryResult[]>;
24
23
  };
25
- export declare const TableCellEditor: ({ model, modals, onEnter, onFocus, onQuery, __gridScope, }: GridScopedProps<TableCellEditorProps>) => React.JSX.Element;
24
+ export declare const TableCellEditor: ({ model, modals, onEnter, onFocus, onQuery, __gridScope, }: GridScopedProps<TableCellEditorProps>) => import("react/jsx-runtime").JSX.Element;
26
25
  export {};
27
26
  //# 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,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AmB,EAMxB,KAAK,eAAe,EACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAGpD,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAEpE,QAAA,MAAM,QAAQ,eAAyB,CAAC;AAExC;;GAEG;AACH,eAAO,MAAM,YAAY,SAAU,MAAM;;;CAAiC,CAAC;AAI3E,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,GAAG;IAAE,IAAI,EAAE,GAAG,CAAA;CAAE,CAAC;AAEpE,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;IAC5B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;CAC5E,CAAC;AAEF,eAAO,MAAM,eAAe,+DAOzB,eAAe,CAAC,oBAAoB,CAAC,4CA0HvC,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { type ThemedClassName } from '@dxos/react-ui';
2
+ import { type MenuAction, type MenuActionHandler } from '@dxos/react-ui-menu';
3
+ export type TableToolbarActionProperties = {
4
+ type: TableToolbarActionType;
5
+ };
6
+ export type TableToolbarAction = MenuAction<TableToolbarActionProperties>;
7
+ export type TableToolbarActionType = 'add-row' | 'comment' | 'save-view';
8
+ type TableToolbarState = Partial<{
9
+ viewDirty: boolean;
10
+ }>;
11
+ export type TableToolbarProps = ThemedClassName<TableToolbarState & {
12
+ onAction?: MenuActionHandler<TableToolbarAction>;
13
+ attendableId?: string;
14
+ }>;
15
+ export declare const TableToolbar: ({ classNames, viewDirty, attendableId, onAction }: TableToolbarProps) => import("react/jsx-runtime").JSX.Element;
16
+ export {};
17
+ //# sourceMappingURL=TableToolbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableToolbar.d.ts","sourceRoot":"","sources":["../../../../../src/components/TableToolbar/TableToolbar.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,iBAAiB,EAIvB,MAAM,qBAAqB,CAAC;AAI7B,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;AAEzD,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAC7C,iBAAiB,GAAG;IAAE,QAAQ,CAAC,EAAE,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAChG,CAAC;AA+BF,eAAO,MAAM,YAAY,sDAAuD,iBAAiB,4CAUhG,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './TableToolbar';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/TableToolbar/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC"}
@@ -1,3 +1,3 @@
1
1
  export * from './Table';
2
- export * from './Toolbar';
2
+ export * from './TableToolbar';
3
3
  //# 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,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC"}
@@ -1,71 +1,48 @@
1
1
  import { S } from '@dxos/echo-schema';
2
2
  import { TableType } from '../types';
3
- export declare const TestSchema: import("@dxos/echo-schema").TypedObjectPrototype<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
3
+ export declare const TestSchema: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<{
4
4
  id: typeof S.String;
5
5
  name: S.optional<typeof S.String>;
6
6
  age: S.optional<typeof S.Number>;
7
7
  active: S.optional<typeof S.Boolean>;
8
8
  netWorth: S.optional<typeof S.Number>;
9
- }, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>, S.Struct.Encoded<{
9
+ }, import("@dxos/echo-schema").TypedObjectOptions>, S.Struct.Encoded<{
10
10
  id: typeof S.String;
11
11
  name: S.optional<typeof S.String>;
12
12
  age: S.optional<typeof S.Number>;
13
13
  active: S.optional<typeof S.Boolean>;
14
14
  netWorth: S.optional<typeof S.Number>;
15
15
  }>>;
16
- export declare const createTable: (schema?: import("@dxos/echo-schema").TypedObjectPrototype<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
16
+ export declare const createTable: (schema?: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<{
17
17
  id: typeof S.String;
18
18
  name: S.optional<typeof S.String>;
19
19
  age: S.optional<typeof S.Number>;
20
20
  active: S.optional<typeof S.Boolean>;
21
21
  netWorth: S.optional<typeof S.Number>;
22
- }, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>, S.Struct.Encoded<{
22
+ }, import("@dxos/echo-schema").TypedObjectOptions>, S.Struct.Encoded<{
23
23
  id: typeof S.String;
24
24
  name: S.optional<typeof S.String>;
25
25
  age: S.optional<typeof S.Number>;
26
26
  active: S.optional<typeof S.Boolean>;
27
27
  netWorth: S.optional<typeof S.Number>;
28
- }>>) => import("@dxos/react-client/echo").ReactiveObject<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
28
+ }>>) => import("@dxos/live-object").ReactiveObject<import("@dxos/echo-schema").TypedObjectFields<{
29
29
  readonly id: import("@dxos/echo-schema").ObjectIdClass;
30
30
  readonly name: S.optional<typeof S.String>;
31
- readonly view: S.optional<import("@dxos/echo-schema").Ref$<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
31
+ readonly view: S.optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
32
32
  name: S.SchemaClass<string, string, never>;
33
33
  query: S.Schema<import("@dxos/echo-schema").QueryType, import("@dxos/echo-schema").QueryType, never>;
34
34
  schema: S.optional<S.Schema<import("@dxos/echo-schema").JsonSchemaType, import("@dxos/echo-schema").JsonSchemaType, never>>;
35
35
  fields: S.mutable<S.Array$<S.mutable<S.Struct<{
36
36
  id: typeof S.String;
37
- path: S.Schema<import("@dxos/echo-schema").JsonPath, import("@dxos/echo-schema").JsonPath, never>;
37
+ path: S.Schema<import("@dxos/effect").JsonPath, import("@dxos/effect").JsonPath, never>;
38
38
  visible: S.optional<typeof S.Boolean>;
39
39
  size: S.optional<typeof S.Number>;
40
- referencePath: S.optional<S.Schema<import("@dxos/echo-schema").JsonPath, import("@dxos/echo-schema").JsonPath, never>>;
40
+ referencePath: S.optional<S.Schema<import("@dxos/effect").JsonPath, import("@dxos/effect").JsonPath, never>>;
41
41
  }>>>>;
42
- }, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>>>;
43
- readonly threads: S.optional<S.Array$<import("@dxos/echo-schema").Ref$<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
44
- name: S.optional<typeof S.String>;
45
- anchor: S.optional<typeof S.String>;
46
- status: S.optional<S.Union<[S.Literal<["staged"]>, S.Literal<["active"]>, S.Literal<["resolved"]>]>>;
47
- messages: S.mutable<S.Array$<import("@dxos/echo-schema").Ref$<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
48
- timestamp: typeof S.String;
49
- state: S.optional<S.Enums<typeof import("packages/plugins/plugin-space/dist/types/src").MessageState>>;
50
- sender: S.mutable<S.Struct<{
51
- contact: S.optional<import("@dxos/echo-schema").Ref$<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
52
- name: S.optional<typeof S.String>;
53
- identifiers: S.mutable<S.Array$<S.Struct<{
54
- type: typeof S.String;
55
- value: typeof S.String;
56
- }>>>;
57
- }, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>>>;
58
- identityKey: S.optional<typeof S.String>;
59
- email: S.optional<typeof S.String>;
60
- name: S.optional<typeof S.String>;
61
- }>>;
62
- text: typeof S.String;
63
- parts: S.optional<S.mutable<S.Array$<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").Expando>>>>;
64
- properties: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
65
- context: S.optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").Expando>>;
66
- }, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>>>>;
67
- }, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>>>>;
68
- }, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>>;
42
+ metadata: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
43
+ }, import("@dxos/echo-schema").TypedObjectOptions>>>;
44
+ readonly threads: S.optional<S.Array$<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").Expando>>>;
45
+ }, import("@dxos/echo-schema").TypedObjectOptions>>;
69
46
  export declare const createItems: (n: number) => {
70
47
  name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M,SAAQ,EAAG,GAC5B;;;mDAnCC,CAAC;AAEF,eAAO,MAAM,WAAW,MAAO,MAAM;;;;;GAWpC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,YAAY,qDAAsD,cAAc,SA8D5F,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useTableModel.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useTableModel.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,EAAE,KAAK,YAAY,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAC/E,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,YAAY,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,IAAI;IACzE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,OAAO,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC;CAC/B,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,aAAa,GAAG,cAAc,GAAG,gBAAgB,GAAG,cAAc,GAAG,mBAAmB,CAAC,CAAC;AAEvH,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,YAAY;QAAS,MAAM;6CAKhE,mBAAmB,CAAC,CAAC,CAAC,KAAG,UAAU,CAAC,CAAC,CAAC,GAAG,SA4B3C,CAAC"}
1
+ {"version":3,"file":"useTableModel.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useTableModel.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAGnD,OAAO,EAAE,KAAK,YAAY,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAC/E,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,YAAY,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,IAAI;IACzE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,OAAO,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC;CAC/B,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,aAAa,GAAG,cAAc,GAAG,gBAAgB,GAAG,cAAc,GAAG,mBAAmB,CAAC,CAAC;AAEvH,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,YAAY;QAAS,MAAM;6CAKhE,mBAAmB,CAAC,CAAC,CAAC,KAAG,UAAU,CAAC,CAAC,CAAC,GAAG,SA8C3C,CAAC"}
@@ -1,15 +1,11 @@
1
1
  import { type ReadonlySignal } from '@preact/signals-core';
2
2
  import { Resource } from '@dxos/context';
3
- import { type JsonProp } from '@dxos/echo-schema';
3
+ import { type FieldSortType, type JsonProp } from '@dxos/echo-schema';
4
4
  import { type DxGridAxisMeta, type DxGridPlanePosition, type DxGridPosition } from '@dxos/react-ui-grid';
5
5
  import { type ViewProjection } from '@dxos/schema';
6
6
  import { SelectionModel } from './selection-model';
7
+ import { TableSorting } from './table-sorting';
7
8
  import { type TableType } from '../types';
8
- export type SortDirection = 'asc' | 'desc';
9
- export type SortConfig = {
10
- fieldId: string;
11
- direction: SortDirection;
12
- };
13
9
  export type BaseTableRow = Record<JsonProp, any> & {
14
10
  id: string;
15
11
  };
@@ -18,7 +14,7 @@ export type TableModelProps<T extends BaseTableRow = {
18
14
  }> = {
19
15
  table: TableType;
20
16
  projection: ViewProjection;
21
- sorting?: SortConfig[];
17
+ sorting?: FieldSortType[];
22
18
  pinnedRows?: {
23
19
  top: number[];
24
20
  bottom: number[];
@@ -36,20 +32,13 @@ export declare class TableModel<T extends BaseTableRow = {
36
32
  private readonly _table;
37
33
  private readonly _projection;
38
34
  private readonly _visibleRange;
39
- /**
40
- * Maps display indices to data indices.
41
- * Used for translating between sorted/displayed order and original data order.
42
- * Keys are display indices, values are corresponding data indices.
43
- */
44
- private readonly _displayToDataIndex;
45
35
  private readonly _onInsertRow?;
46
36
  private readonly _onDeleteRows?;
47
37
  private readonly _onDeleteColumn?;
48
38
  private readonly _onCellUpdate?;
49
39
  private readonly _onRowOrderChanged?;
40
+ private readonly _rows;
50
41
  private readonly _sorting;
51
- private _sortedRows;
52
- private _rows;
53
42
  private _pinnedRows;
54
43
  private _selection;
55
44
  private _columnMeta?;
@@ -57,13 +46,17 @@ export declare class TableModel<T extends BaseTableRow = {
57
46
  get table(): TableType;
58
47
  get projection(): ViewProjection;
59
48
  get rows(): ReadonlySignal<T[]>;
49
+ /**
50
+ * @reactive
51
+ */
52
+ get sorting(): TableSorting<T> | undefined;
60
53
  get pinnedRows(): NonNullable<TableModelProps<T>['pinnedRows']>;
61
54
  get columnMeta(): ReadonlySignal<DxGridAxisMeta>;
62
- get sorting(): SortConfig | undefined;
63
55
  get selection(): SelectionModel<T>;
56
+ /** @reactive */
57
+ get isViewDirty(): boolean;
64
58
  protected _open(): Promise<void>;
65
59
  private initializeColumnMeta;
66
- private initializeSorting;
67
60
  private initializeEffects;
68
61
  setRows: (obj: T[]) => void;
69
62
  getRowCount: () => number;
@@ -80,9 +73,8 @@ export declare class TableModel<T extends BaseTableRow = {
80
73
  updateCellData({ col, row }: DxGridPlanePosition, update: (value: any) => any): void;
81
74
  deleteColumn(fieldId: string): void;
82
75
  setColumnWidth(columnIndex: number, width: number): void;
83
- setSort(fieldId: string, direction: SortDirection): void;
84
- clearSort(): void;
85
76
  pinRow(rowIndex: number, side: 'top' | 'bottom'): void;
86
77
  unpinRow(rowIndex: number): void;
78
+ saveView(): void;
87
79
  }
88
80
  //# sourceMappingURL=table-model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"table-model.d.ts","sourceRoot":"","sources":["../../../../src/model/table-model.ts"],"names":[],"mappings":"AAIA,OAAO,EAA4B,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGrF,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAkC,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAKlF,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAG1C,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,MAAM,CAAC;AAC3C,MAAM,MAAM,UAAU,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,aAAa,CAAA;CAAE,CAAC;AAEvE,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAElE,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,YAAY,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,IAAI;IACrE,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,EAAE,cAAc,CAAC;IAC3B,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE;QAAE,GAAG,EA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W,GAAG,gBAAgB;IAoB9E,OAAO,CAAC,gBAAgB;IAgGxB,OAAO,CAAC,cAAc;IAwBtB,OAAO,CAAC,uBAAuB;IAgB/B,OAAO,CAAC,oBAAoB;IAgB5B,OAAO,CAAC,gBAAgB;IAexB,OAAO,CAAC,gBAAgB;CAYzB"}
@@ -0,0 +1,53 @@
1
+ import { type Signal, type ReadonlySignal } from '@preact/signals-core';
2
+ import { type SortDirectionType, type FieldSortType } from '@dxos/echo-schema';
3
+ import type { ViewProjection, ViewType } from '@dxos/schema';
4
+ import { type BaseTableRow } from './table-model';
5
+ /**
6
+ * Manages table sorting functionality through display and data index mapping.
7
+ *
8
+ * When a table is sorted, rows visually reorder but we need to maintain references
9
+ * to the original data positions. This is handled through two types of indices:
10
+ *
11
+ * - Display indices: The visual positions after sorting
12
+ * - Data indices: The original positions in the source data
13
+ *
14
+ * The _displayToDataIndex map maintains these relationships, enabling lookups
15
+ * between visual and source positions.
16
+ *
17
+ * Example mapping between display and data indices:
18
+ *
19
+ * Original Data: Sorted Display: Mapping: (Display → Data)
20
+ * ┌──────────────┐ ┌──────────────┐ ┌────────┐
21
+ * │ 0: "Banana" │ => │ 0: "Apple" │ => │ 0 => 1 │
22
+ * │ 1: "Apple" │ => │ 1: "Banana" │ => │ 1 => 0 │
23
+ * │ 2: "Cherry" │ => │ 2: "Cherry" │ => │ 2 => 2 │
24
+ * └──────────────┘ └──────────────┘ └────────┘
25
+ */
26
+ export declare class TableSorting<T extends BaseTableRow> {
27
+ private readonly _view;
28
+ private readonly _projection;
29
+ private readonly _displayToDataIndex;
30
+ private readonly _rows;
31
+ private readonly _localSort;
32
+ private readonly _isDirty;
33
+ readonly sortedRows: ReadonlySignal<T[]>;
34
+ constructor(rows: Signal<T[]>, _view: ViewType | undefined, _projection: ViewProjection);
35
+ /**
36
+ * @reactive
37
+ * @returns Local sort if present, falls back to view sort.
38
+ */
39
+ get sorting(): FieldSortType | undefined;
40
+ /**
41
+ * @reactive
42
+ * @returns Whether local sort differs from view sort.
43
+ */
44
+ get isDirty(): boolean;
45
+ getDataIndex(displayIndex: number): number;
46
+ setSort(fieldId: string, direction: SortDirectionType): void;
47
+ toggleSort(fieldId: string): void;
48
+ clearSort(): void;
49
+ save(): void;
50
+ private initialiseSortedRows;
51
+ private getSortValue;
52
+ }
53
+ //# sourceMappingURL=table-sorting.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-sorting.d.ts","sourceRoot":"","sources":["../../../../src/model/table-sorting.ts"],"names":[],"mappings":"AAIA,OAAO,EAAoB,KAAK,MAAM,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG1F,OAAO,EAAkC,KAAK,iBAAiB,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAE/G,OAAO,KAAK,EAA2B,cAAc,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEtF,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAUlD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,YAAY,CAAC,CAAC,SAAS,YAAY;IAS5C,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAT9B,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAA6B;IACjE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAc;IACpC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAgC;IAC3D,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA0B;IACnD,SAAgB,UAAU,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC;gBAG9C,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,EACA,KAAK,EAAE,QAAQ,GAAG,SAAS,EAC3B,WAAW,EAAE,cAAc;IAoB9C;;;OAGG;IACH,IAAW,OAAO,IAAI,aAAa,GAAG,SAAS,CAS9C;IAED;;;OAGG;IACH,IAAW,OAAO,IAAI,OAAO,CAE5B;IAEM,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM;IAI1C,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,GAAG,IAAI;IAO5D,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAiBjC,SAAS,IAAI,IAAI;IAIjB,IAAI,IAAI,IAAI;IAenB,OAAO,CAAC,oBAAoB;IAkC5B,OAAO,CAAC,YAAY;CAsCrB"}
@@ -10,7 +10,7 @@ declare const _default: readonly [{
10
10
  readonly 'new schema': "New schema";
11
11
  readonly 'continue label': "Continue";
12
12
  readonly 'create stack section label': "Create table";
13
- readonly 'add row': "Add row";
13
+ readonly 'add row label': "Add row";
14
14
  readonly 'create comment': "Create thread";
15
15
  readonly 'column action sort descending': "Sort Descending";
16
16
  readonly 'column action sort ascending': "Sort Ascending";
@@ -22,6 +22,7 @@ declare const _default: readonly [{
22
22
  readonly 'column deleted label': "Column deleted";
23
23
  readonly 'new column button label': "Create column";
24
24
  readonly 'create new object label': "Create new object “{{text}}”";
25
+ readonly 'save view label': "Save changes to view";
25
26
  };
26
27
  };
27
28
  }];
@@ -1 +1 @@
1
- {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtC,wBA2BW"}
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtC,wBA4BW"}