@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.
- package/dist/lib/browser/{chunk-AT7O4RAD.mjs → chunk-3FR6NHPD.mjs} +6 -4
- package/dist/lib/browser/chunk-3FR6NHPD.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +482 -284
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node/{chunk-YSBXNBDJ.cjs → chunk-NB3SFHGA.cjs} +8 -6
- package/dist/lib/node/chunk-NB3SFHGA.cjs.map +7 -0
- package/dist/lib/node/index.cjs +474 -270
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/types/index.cjs +3 -3
- package/dist/lib/node/types/index.cjs.map +1 -1
- package/dist/lib/node-esm/{chunk-6OH2NHUX.mjs → chunk-RLVVOZW5.mjs} +6 -4
- package/dist/lib/node-esm/chunk-RLVVOZW5.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +482 -284
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/_deprecated/components/Cell/Cell.d.ts +2 -2
- package/dist/types/src/_deprecated/components/Cell/Cell.d.ts.map +1 -1
- package/dist/types/src/_deprecated/components/Cell/CellCombobox.d.ts +1 -2
- package/dist/types/src/_deprecated/components/Cell/CellCombobox.d.ts.map +1 -1
- package/dist/types/src/_deprecated/components/ColumnMenu/ColumnMenu.d.ts +2 -3
- package/dist/types/src/_deprecated/components/ColumnMenu/ColumnMenu.d.ts.map +1 -1
- package/dist/types/src/_deprecated/components/ColumnMenu/ColumnMenu.stories.d.ts +6 -7
- package/dist/types/src/_deprecated/components/ColumnMenu/ColumnMenu.stories.d.ts.map +1 -1
- package/dist/types/src/_deprecated/components/ColumnMenu/ColumnSettings.d.ts +1 -2
- package/dist/types/src/_deprecated/components/ColumnMenu/ColumnSettings.d.ts.map +1 -1
- package/dist/types/src/_deprecated/components/ColumnMenu/ColumnSettings.stories.d.ts +6 -7
- package/dist/types/src/_deprecated/components/ColumnMenu/ColumnSettings.stories.d.ts.map +1 -1
- package/dist/types/src/_deprecated/components/Table/Table.d.ts +5 -5
- package/dist/types/src/_deprecated/components/Table/Table.d.ts.map +1 -1
- package/dist/types/src/_deprecated/components/Table/Table.stories.d.ts +8 -9
- package/dist/types/src/_deprecated/components/Table/Table.stories.d.ts.map +1 -1
- package/dist/types/src/_deprecated/components/Table/TableBody.d.ts +1 -2
- package/dist/types/src/_deprecated/components/Table/TableBody.d.ts.map +1 -1
- package/dist/types/src/_deprecated/components/Table/TableContext.d.ts +1 -1
- package/dist/types/src/_deprecated/components/Table/TableContext.d.ts.map +1 -1
- package/dist/types/src/_deprecated/components/Table/TableHead.d.ts +1 -2
- package/dist/types/src/_deprecated/components/Table/TableHead.d.ts.map +1 -1
- package/dist/types/src/_deprecated/schema/Schema.stories.d.ts +2 -3
- package/dist/types/src/_deprecated/schema/Schema.stories.d.ts.map +1 -1
- package/dist/types/src/components/Table/ColumnActionsMenu.d.ts +1 -2
- package/dist/types/src/components/Table/ColumnActionsMenu.d.ts.map +1 -1
- package/dist/types/src/components/Table/ColumnSettings.d.ts +1 -2
- package/dist/types/src/components/Table/ColumnSettings.d.ts.map +1 -1
- package/dist/types/src/components/Table/CreateRefPanel.d.ts +1 -2
- package/dist/types/src/components/Table/CreateRefPanel.d.ts.map +1 -1
- package/dist/types/src/components/Table/RefPanel.d.ts +1 -2
- package/dist/types/src/components/Table/RefPanel.d.ts.map +1 -1
- package/dist/types/src/components/Table/RowActionsMenu.d.ts +1 -2
- package/dist/types/src/components/Table/RowActionsMenu.d.ts.map +1 -1
- package/dist/types/src/components/Table/Table.d.ts +1 -1
- package/dist/types/src/components/Table/Table.d.ts.map +1 -1
- package/dist/types/src/components/Table/Table.stories.d.ts +1 -4
- package/dist/types/src/components/Table/Table.stories.d.ts.map +1 -1
- package/dist/types/src/components/TableCellEditor/TableCellEditor.d.ts +1 -2
- package/dist/types/src/components/TableCellEditor/TableCellEditor.d.ts.map +1 -1
- package/dist/types/src/components/TableToolbar/TableToolbar.d.ts +17 -0
- package/dist/types/src/components/TableToolbar/TableToolbar.d.ts.map +1 -0
- package/dist/types/src/components/TableToolbar/index.d.ts +2 -0
- package/dist/types/src/components/TableToolbar/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/testing.d.ts +12 -35
- package/dist/types/src/components/testing.d.ts.map +1 -1
- package/dist/types/src/hooks/useTableModel.d.ts.map +1 -1
- package/dist/types/src/model/table-model.d.ts +11 -19
- package/dist/types/src/model/table-model.d.ts.map +1 -1
- package/dist/types/src/model/table-presentation.d.ts.map +1 -1
- package/dist/types/src/model/table-sorting.d.ts +53 -0
- package/dist/types/src/model/table-sorting.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +2 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/table.d.ts +21 -90
- package/dist/types/src/types/table.d.ts.map +1 -1
- package/dist/types/src/util/table-buttons.d.ts +15 -1
- package/dist/types/src/util/table-buttons.d.ts.map +1 -1
- package/dist/types/src/util/table.d.ts +2 -1
- package/dist/types/src/util/table.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +36 -34
- package/src/_deprecated/schema/Schema.stories.tsx +1 -1
- package/src/components/Table/ColumnActionsMenu.tsx +4 -4
- package/src/components/Table/CreateRefPanel.tsx +3 -4
- package/src/components/Table/Table.stories.tsx +55 -44
- package/src/components/Table/Table.tsx +4 -0
- package/src/components/TableCellEditor/TableCellEditor.stories.tsx +1 -1
- package/src/components/TableToolbar/TableToolbar.tsx +72 -0
- package/src/components/{Toolbar → TableToolbar}/index.ts +1 -1
- package/src/components/index.ts +1 -1
- package/src/hooks/useTableModel.ts +21 -0
- package/src/model/table-model.test.ts +0 -5
- package/src/model/table-model.ts +41 -99
- package/src/model/table-presentation.ts +25 -4
- package/src/model/table-sorting.ts +215 -0
- package/src/playwright/smoke.spec.ts +35 -13
- package/src/translations.ts +2 -1
- package/src/types/table.ts +3 -3
- package/src/util/table-buttons.ts +33 -3
- package/src/util/table-controls.ts +2 -2
- package/src/util/table.ts +85 -52
- package/dist/lib/browser/chunk-AT7O4RAD.mjs.map +0 -7
- package/dist/lib/node/chunk-YSBXNBDJ.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-6OH2NHUX.mjs.map +0 -7
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +0 -21
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +0 -1
- package/dist/types/src/components/Toolbar/common.d.ts +0 -14
- package/dist/types/src/components/Toolbar/common.d.ts.map +0 -1
- package/dist/types/src/components/Toolbar/index.d.ts +0 -2
- package/dist/types/src/components/Toolbar/index.d.ts.map +0 -1
- package/dist/types/src/playwright/playwright.config.d.ts +0 -3
- package/dist/types/src/playwright/playwright.config.d.ts.map +0 -1
- package/src/components/Toolbar/Toolbar.tsx +0 -87
- package/src/components/Toolbar/common.tsx +0 -71
- /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):
|
|
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;
|
|
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,
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableHead.d.ts","sourceRoot":"","sources":["../../../../../../src/_deprecated/components/Table/TableHead.tsx"],"names":[],"mappings":"
|
|
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
|
|
4
|
+
decorators: import("@storybook/react").Decorator[];
|
|
6
5
|
};
|
|
7
6
|
export default _default;
|
|
8
7
|
export declare const Default: {
|
|
9
|
-
render: () =>
|
|
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
|
|
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) =>
|
|
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":"
|
|
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) =>
|
|
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":"
|
|
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>) =>
|
|
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":"
|
|
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) =>
|
|
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":"
|
|
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) =>
|
|
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":"
|
|
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) =>
|
|
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;
|
|
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
|
|
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,
|
|
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>) =>
|
|
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,UAAU,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"TableCellEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/TableCellEditor/TableCellEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAK3D,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAKL,KAAK,mBAAmB,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 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/TableToolbar/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC;AACxB,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("
|
|
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("
|
|
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("
|
|
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("
|
|
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/
|
|
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("
|
|
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/
|
|
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/
|
|
40
|
+
referencePath: S.optional<S.Schema<import("@dxos/effect").JsonPath, import("@dxos/effect").JsonPath, never>>;
|
|
41
41
|
}>>>>;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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: string;
|
|
71
48
|
age: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../src/components/testing.ts"],"names":[],"mappings":"AAMA,OAAO,EAA0B,CAAC,EAAqC,MAAM,mBAAmB,CAAC;AAMjG,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,eAAO,MAAM,UAAU;;;;;;;;;;;;GAMrB,CAAC;AAEH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../src/components/testing.ts"],"names":[],"mappings":"AAMA,OAAO,EAA0B,CAAC,EAAqC,MAAM,mBAAmB,CAAC;AAMjG,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,eAAO,MAAM,UAAU;;;;;;;;;;;;GAMrB,CAAC;AAEH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;cACpB,EAAG,WAAW;eAYO,EACrB,MAAE;gBAGA,EAAC,QAAQ,CAAC,EAAE,MAAM;gBAUlB,EAAG,OACT,CAAE,EAAC,MAAM,CAAC,EAAE,OAAO,CAAC,EAAE,MACrB;uBAAqB,EAAG,MAGzB;kBAAe,EAAG,MAAM;qBAA6C,EAAG,QAAQ,QAAO,EAAG,OAAO;kBACpF,EAAG,QACZ,QAAO,EAAG,MAAM;2BAEhB,EAEA,QAAI,CAAE,EAAE,MAAK;;kBAKZ,EAAG,QAAQ,CAAC,EAAE,OAAO,CAAC,EAAE,OAC5B,QAAO,EAAG,MAAM,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":"
|
|
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?:
|
|
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;
|
|
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;AAErF,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,KAAK,aAAa,EAAkC,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAKtG,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,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAG1C,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,aAAa,EAAE,CAAC;IAC1B,UAAU,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,EAAE,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACjD,WAAW,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC;IACjD,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;IAC9C,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAChC,CAAC;AAEF,qBAAa,UAAU,CAAC,CAAC,SAAS,YAAY,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAE,SAAQ,QAAQ;IAC/E,SAAgB,EAAE,SAAkD;IAEpE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAY;IACnC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAiB;IAE7C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAG3B;IAEH,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAoC;IAClE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAqC;IACpE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAuC;IACxE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAqC;IACpE,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAA0C;IAE9E,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAmB;IACzC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAkB;IAE3C,OAAO,CAAC,WAAW,CAAgD;IACnE,OAAO,CAAC,UAAU,CAAqB;IACvC,OAAO,CAAC,WAAW,CAAC,CAAiC;gBAEzC,EACV,KAAK,EACL,UAAU,EACV,OAAY,EACZ,UAAoC,EACpC,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,EAAE,eAAe,CAAC,CAAC,CAAC;IAmBrB,IAAW,KAAK,cAEf;IAED,IAAW,UAAU,mBAEpB;IAED,IAAW,IAAI,IAAI,cAAc,CAAC,CAAC,EAAE,CAAC,CAErC;IAED;;OAEG;IACH,IAAW,OAAO,IAAI,YAAY,CAAC,CAAC,CAAC,GAAG,SAAS,CAEhD;IAED,IAAW,UAAU,IAAI,WAAW,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAErE;IAED,IAAW,UAAU,IAAI,cAAc,CAAC,cAAc,CAAC,CAGtD;IAED,IAAW,SAAS,sBAEnB;IAED,gBAAgB;IAChB,IAAW,WAAW,IAAI,OAAO,CAEhC;cAMwB,KAAK;IAO9B,OAAO,CAAC,oBAAoB;IAe5B,OAAO,CAAC,iBAAiB;IAkClB,OAAO,QAAS,CAAC,EAAE,KAAG,IAAI,CAE/B;IAEK,WAAW,QAAO,MAAM,CAA4B;IAEpD,cAAc,QAAO,MAAM,CAAgD;IAE3E,SAAS,cAAe,MAAM,KAAG,IAAI,CAG1C;IAEK,SAAS,aAAc,MAAM,KAAG,IAAI,CAazC;IAEK,WAAW,iBAAkB,mBAAmB,KAAG,GAAG,CA2B3D;IAEK,WAAW,iBAAkB,mBAAmB,SAAS,GAAG,KAAG,IAAI,CAgCxE;IAEF;;;;OAIG;IACI,cAAc,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,mBAAmB,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,GAAG,IAAI;IAcpF,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAenC,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAgBxD,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,GAAG,QAAQ,GAAG,IAAI;IAItD,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAQhC,QAAQ,IAAI,IAAI;CAGxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-presentation.d.ts","sourceRoot":"","sources":["../../../../src/model/table-presentation.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EAErB,KAAK,gBAAgB,EAEtB,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAGnE;;;;GAIG;AACH,qBAAa,iBAAiB,CAAC,CAAC,SAAS,YAAY,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE;IAElE,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBADb,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,EACpB,aAAa,0DAG5B;IAGG,QAAQ,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,WAAW,GAAG,gBAAgB;IAoB9E,OAAO,CAAC,gBAAgB;
|
|
1
|
+
{"version":3,"file":"table-presentation.d.ts","sourceRoot":"","sources":["../../../../src/model/table-presentation.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EAErB,KAAK,gBAAgB,EAEtB,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAGnE;;;;GAIG;AACH,qBAAa,iBAAiB,CAAC,CAAC,SAAS,YAAY,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE;IAElE,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBADb,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,EACpB,aAAa,0DAG5B;IAGG,QAAQ,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,WAAW,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
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtC,wBA4BW"}
|