@dxos/react-ui-table 0.8.1-staging.5be625a → 0.8.1-staging.9eaf14f

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 (172) hide show
  1. package/dist/lib/browser/{chunk-5MKYB7NF.mjs → chunk-YWNRUF4J.mjs} +7 -3
  2. package/dist/lib/browser/{chunk-5MKYB7NF.mjs.map → chunk-YWNRUF4J.mjs.map} +3 -3
  3. package/dist/lib/browser/index.mjs +295 -97
  4. package/dist/lib/browser/index.mjs.map +3 -3
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/types/index.mjs +1 -1
  7. package/dist/lib/node/{chunk-NRFKBRPV.cjs → chunk-TGG6OZ54.cjs} +10 -6
  8. package/dist/lib/node/{chunk-NRFKBRPV.cjs.map → chunk-TGG6OZ54.cjs.map} +3 -3
  9. package/dist/lib/node/index.cjs +293 -93
  10. package/dist/lib/node/index.cjs.map +3 -3
  11. package/dist/lib/node/meta.json +1 -1
  12. package/dist/lib/node/types/index.cjs +3 -3
  13. package/dist/lib/node/types/index.cjs.map +1 -1
  14. package/dist/lib/node-esm/{chunk-SU4D55KI.mjs → chunk-KKLP54L3.mjs} +7 -3
  15. package/dist/lib/node-esm/{chunk-SU4D55KI.mjs.map → chunk-KKLP54L3.mjs.map} +3 -3
  16. package/dist/lib/node-esm/index.mjs +295 -97
  17. package/dist/lib/node-esm/index.mjs.map +3 -3
  18. package/dist/lib/node-esm/meta.json +1 -1
  19. package/dist/lib/node-esm/types/index.mjs +1 -1
  20. package/dist/types/src/components/Table/DynamicTable.d.ts +15 -10
  21. package/dist/types/src/components/Table/DynamicTable.d.ts.map +1 -1
  22. package/dist/types/src/components/Table/DynamicTable.stories.d.ts +10 -0
  23. package/dist/types/src/components/Table/DynamicTable.stories.d.ts.map +1 -0
  24. package/dist/types/src/components/Table/Table.d.ts +1 -1
  25. package/dist/types/src/components/Table/Table.d.ts.map +1 -1
  26. package/dist/types/src/components/Table/Table.stories.d.ts +2 -3
  27. package/dist/types/src/components/Table/Table.stories.d.ts.map +1 -1
  28. package/dist/types/src/components/Table/relations.stories.d.ts +9 -0
  29. package/dist/types/src/components/Table/relations.stories.d.ts.map +1 -0
  30. package/dist/types/src/components/TableCellEditor/TableCellEditor.d.ts.map +1 -1
  31. package/dist/types/src/components/TableCellEditor/TableCellEditor.stories.d.ts.map +1 -1
  32. package/dist/types/src/components/testing.d.ts.map +1 -1
  33. package/dist/types/src/hooks/useTableModel.d.ts +6 -10
  34. package/dist/types/src/hooks/useTableModel.d.ts.map +1 -1
  35. package/dist/types/src/model/index.d.ts +1 -0
  36. package/dist/types/src/model/index.d.ts.map +1 -1
  37. package/dist/types/src/model/selection-model.d.ts +6 -3
  38. package/dist/types/src/model/selection-model.d.ts.map +1 -1
  39. package/dist/types/src/model/table-model.d.ts +13 -14
  40. package/dist/types/src/model/table-model.d.ts.map +1 -1
  41. package/dist/types/src/model/table-presentation.d.ts +4 -4
  42. package/dist/types/src/model/table-presentation.d.ts.map +1 -1
  43. package/dist/types/src/model/table-sorting.d.ts +2 -2
  44. package/dist/types/src/model/table-sorting.d.ts.map +1 -1
  45. package/dist/types/src/types/table.d.ts +2 -1
  46. package/dist/types/src/types/table.d.ts.map +1 -1
  47. package/dist/types/src/util/dynamic-table.d.ts +21 -30
  48. package/dist/types/src/util/dynamic-table.d.ts.map +1 -1
  49. package/dist/types/src/util/table-controls.d.ts +2 -2
  50. package/dist/types/src/util/table-controls.d.ts.map +1 -1
  51. package/dist/types/src/util/table.d.ts.map +1 -1
  52. package/package.json +33 -32
  53. package/src/components/Table/DynamicTable.stories.tsx +155 -0
  54. package/src/components/Table/DynamicTable.tsx +46 -28
  55. package/src/components/Table/Table.stories.tsx +129 -125
  56. package/src/components/Table/Table.tsx +51 -26
  57. package/src/components/Table/relations.stories.tsx +113 -0
  58. package/src/components/TableCellEditor/TableCellEditor.stories.tsx +8 -3
  59. package/src/components/TableCellEditor/TableCellEditor.tsx +102 -4
  60. package/src/components/testing.ts +0 -1
  61. package/src/hooks/useTableModel.ts +11 -11
  62. package/src/model/index.ts +1 -0
  63. package/src/model/selection-model.ts +12 -2
  64. package/src/model/table-model.test.ts +1 -1
  65. package/src/model/table-model.ts +27 -18
  66. package/src/model/table-presentation.test.ts +1 -1
  67. package/src/model/table-presentation.ts +65 -11
  68. package/src/model/table-sorting.ts +2 -2
  69. package/src/playwright/smoke.spec.ts +2 -3
  70. package/src/types/table.ts +6 -5
  71. package/src/util/dynamic-table.ts +57 -25
  72. package/src/util/table-controls.ts +4 -4
  73. package/src/util/table.ts +2 -1
  74. package/dist/lib/browser/deprecated/index.mjs +0 -1483
  75. package/dist/lib/browser/deprecated/index.mjs.map +0 -7
  76. package/dist/lib/node/deprecated/index.cjs +0 -1511
  77. package/dist/lib/node/deprecated/index.cjs.map +0 -7
  78. package/dist/lib/node-esm/deprecated/index.mjs +0 -1485
  79. package/dist/lib/node-esm/deprecated/index.mjs.map +0 -7
  80. package/dist/types/src/deprecated/components/Cell/Cell.d.ts +0 -12
  81. package/dist/types/src/deprecated/components/Cell/Cell.d.ts.map +0 -1
  82. package/dist/types/src/deprecated/components/Cell/CellCombobox.d.ts +0 -13
  83. package/dist/types/src/deprecated/components/Cell/CellCombobox.d.ts.map +0 -1
  84. package/dist/types/src/deprecated/components/Cell/index.d.ts +0 -2
  85. package/dist/types/src/deprecated/components/Cell/index.d.ts.map +0 -1
  86. package/dist/types/src/deprecated/components/ColumnMenu/ColumnMenu.d.ts +0 -23
  87. package/dist/types/src/deprecated/components/ColumnMenu/ColumnMenu.d.ts.map +0 -1
  88. package/dist/types/src/deprecated/components/ColumnMenu/ColumnMenu.stories.d.ts +0 -36
  89. package/dist/types/src/deprecated/components/ColumnMenu/ColumnMenu.stories.d.ts.map +0 -1
  90. package/dist/types/src/deprecated/components/ColumnMenu/ColumnSettings.d.ts +0 -15
  91. package/dist/types/src/deprecated/components/ColumnMenu/ColumnSettings.d.ts.map +0 -1
  92. package/dist/types/src/deprecated/components/ColumnMenu/ColumnSettings.stories.d.ts +0 -84
  93. package/dist/types/src/deprecated/components/ColumnMenu/ColumnSettings.stories.d.ts.map +0 -1
  94. package/dist/types/src/deprecated/components/ColumnMenu/index.d.ts +0 -3
  95. package/dist/types/src/deprecated/components/ColumnMenu/index.d.ts.map +0 -1
  96. package/dist/types/src/deprecated/components/Table/Table.d.ts +0 -20
  97. package/dist/types/src/deprecated/components/Table/Table.d.ts.map +0 -1
  98. package/dist/types/src/deprecated/components/Table/Table.stories.d.ts +0 -116
  99. package/dist/types/src/deprecated/components/Table/Table.stories.d.ts.map +0 -1
  100. package/dist/types/src/deprecated/components/Table/TableBody.d.ts +0 -12
  101. package/dist/types/src/deprecated/components/Table/TableBody.d.ts.map +0 -1
  102. package/dist/types/src/deprecated/components/Table/TableContext.d.ts +0 -13
  103. package/dist/types/src/deprecated/components/Table/TableContext.d.ts.map +0 -1
  104. package/dist/types/src/deprecated/components/Table/TableHead.d.ts +0 -9
  105. package/dist/types/src/deprecated/components/Table/TableHead.d.ts.map +0 -1
  106. package/dist/types/src/deprecated/components/Table/TableRootContext.d.ts +0 -17
  107. package/dist/types/src/deprecated/components/Table/TableRootContext.d.ts.map +0 -1
  108. package/dist/types/src/deprecated/components/Table/index.d.ts +0 -5
  109. package/dist/types/src/deprecated/components/Table/index.d.ts.map +0 -1
  110. package/dist/types/src/deprecated/components/Table/props.d.ts +0 -42
  111. package/dist/types/src/deprecated/components/Table/props.d.ts.map +0 -1
  112. package/dist/types/src/deprecated/components/index.d.ts +0 -4
  113. package/dist/types/src/deprecated/components/index.d.ts.map +0 -1
  114. package/dist/types/src/deprecated/helpers.d.ts +0 -91
  115. package/dist/types/src/deprecated/helpers.d.ts.map +0 -1
  116. package/dist/types/src/deprecated/hooks/index.d.ts +0 -5
  117. package/dist/types/src/deprecated/hooks/index.d.ts.map +0 -1
  118. package/dist/types/src/deprecated/hooks/useColumnSizing.d.ts +0 -12
  119. package/dist/types/src/deprecated/hooks/useColumnSizing.d.ts.map +0 -1
  120. package/dist/types/src/deprecated/hooks/useColumnSorting.d.ts +0 -15
  121. package/dist/types/src/deprecated/hooks/useColumnSorting.d.ts.map +0 -1
  122. package/dist/types/src/deprecated/hooks/usePinLastRow.d.ts +0 -3
  123. package/dist/types/src/deprecated/hooks/usePinLastRow.d.ts.map +0 -1
  124. package/dist/types/src/deprecated/hooks/useRowSelection.d.ts +0 -7
  125. package/dist/types/src/deprecated/hooks/useRowSelection.d.ts.map +0 -1
  126. package/dist/types/src/deprecated/index.d.ts +0 -8
  127. package/dist/types/src/deprecated/index.d.ts.map +0 -1
  128. package/dist/types/src/deprecated/schema/Schema.stories.d.ts +0 -11
  129. package/dist/types/src/deprecated/schema/Schema.stories.d.ts.map +0 -1
  130. package/dist/types/src/deprecated/schema/column-utils.d.ts +0 -7
  131. package/dist/types/src/deprecated/schema/column-utils.d.ts.map +0 -1
  132. package/dist/types/src/deprecated/schema/index.d.ts +0 -3
  133. package/dist/types/src/deprecated/schema/index.d.ts.map +0 -1
  134. package/dist/types/src/deprecated/schema/types.d.ts +0 -27
  135. package/dist/types/src/deprecated/schema/types.d.ts.map +0 -1
  136. package/dist/types/src/deprecated/theme.d.ts +0 -29
  137. package/dist/types/src/deprecated/theme.d.ts.map +0 -1
  138. package/dist/types/src/deprecated/translations.d.ts +0 -21
  139. package/dist/types/src/deprecated/translations.d.ts.map +0 -1
  140. package/dist/types/src/deprecated/types.d.ts +0 -26
  141. package/dist/types/src/deprecated/types.d.ts.map +0 -1
  142. package/src/deprecated/components/Cell/Cell.tsx +0 -88
  143. package/src/deprecated/components/Cell/CellCombobox.tsx +0 -103
  144. package/src/deprecated/components/Cell/index.ts +0 -5
  145. package/src/deprecated/components/ColumnMenu/ColumnMenu.stories.tsx +0 -129
  146. package/src/deprecated/components/ColumnMenu/ColumnMenu.tsx +0 -182
  147. package/src/deprecated/components/ColumnMenu/ColumnSettings.stories.tsx +0 -108
  148. package/src/deprecated/components/ColumnMenu/ColumnSettings.tsx +0 -207
  149. package/src/deprecated/components/ColumnMenu/index.ts +0 -6
  150. package/src/deprecated/components/Table/Table.stories.tsx +0 -508
  151. package/src/deprecated/components/Table/Table.tsx +0 -301
  152. package/src/deprecated/components/Table/TableBody.tsx +0 -82
  153. package/src/deprecated/components/Table/TableContext.tsx +0 -34
  154. package/src/deprecated/components/Table/TableHead.tsx +0 -78
  155. package/src/deprecated/components/Table/TableRootContext.ts +0 -39
  156. package/src/deprecated/components/Table/index.ts +0 -8
  157. package/src/deprecated/components/Table/props.ts +0 -60
  158. package/src/deprecated/components/index.ts +0 -7
  159. package/src/deprecated/helpers.tsx +0 -526
  160. package/src/deprecated/hooks/index.ts +0 -8
  161. package/src/deprecated/hooks/useColumnSizing.ts +0 -46
  162. package/src/deprecated/hooks/useColumnSorting.ts +0 -64
  163. package/src/deprecated/hooks/usePinLastRow.ts +0 -47
  164. package/src/deprecated/hooks/useRowSelection.ts +0 -40
  165. package/src/deprecated/index.ts +0 -12
  166. package/src/deprecated/schema/Schema.stories.tsx +0 -59
  167. package/src/deprecated/schema/column-utils.ts +0 -54
  168. package/src/deprecated/schema/index.ts +0 -6
  169. package/src/deprecated/schema/types.ts +0 -40
  170. package/src/deprecated/theme.ts +0 -82
  171. package/src/deprecated/translations.ts +0 -26
  172. package/src/deprecated/types.ts +0 -38
@@ -1,116 +0,0 @@
1
- import '@dxos-theme';
2
- import { type StoryObj } from '@storybook/react';
3
- import React from 'react';
4
- import { PublicKey } from '@dxos/keys';
5
- import { type TableColumnDef } from '../../types';
6
- type Item = {
7
- publicKey: PublicKey;
8
- name: string;
9
- company?: string;
10
- count?: number;
11
- started?: Date;
12
- complete?: boolean;
13
- };
14
- declare const _default: {
15
- title: string;
16
- component: (props: any) => React.JSX.Element;
17
- args: {
18
- header: boolean;
19
- keyAccessor: (item: Item) => string;
20
- };
21
- argTypes: {
22
- header: {
23
- control: string;
24
- };
25
- footer: {
26
- control: string;
27
- };
28
- border: {
29
- control: string;
30
- };
31
- fullWidth: {
32
- control: string;
33
- };
34
- grouping: {
35
- control: string;
36
- options: string[];
37
- mapping: {
38
- none: undefined;
39
- complete: string[];
40
- count: string[];
41
- };
42
- };
43
- columnVisibility: {
44
- control: string;
45
- options: string[];
46
- mapping: {
47
- all: undefined;
48
- limited: {
49
- key: boolean;
50
- started: boolean;
51
- };
52
- };
53
- };
54
- rowsSelectable: {
55
- control: string;
56
- options: (string | boolean)[];
57
- };
58
- };
59
- decorators: import("@storybook/react").Decorator[];
60
- };
61
- export default _default;
62
- export declare const Default: {
63
- args: {
64
- columns: TableColumnDef<Item, any>[];
65
- data: Item[];
66
- };
67
- };
68
- export declare const Scrolling: {
69
- args: {
70
- columns: TableColumnDef<Item, any>[];
71
- data: Item[];
72
- };
73
- };
74
- export declare const Visibility: {
75
- args: {
76
- columns: TableColumnDef<Item, any>[];
77
- data: Item[];
78
- columnVisibility: {
79
- key: boolean;
80
- started: boolean;
81
- };
82
- };
83
- };
84
- export declare const Empty: {
85
- args: {
86
- columns: TableColumnDef<Item, any>[];
87
- };
88
- };
89
- export declare const Dynamic: {
90
- render: () => React.JSX.Element;
91
- };
92
- export declare const Editable: {
93
- render: () => React.JSX.Element;
94
- };
95
- export declare const PinnedLastRow: {
96
- render: () => React.JSX.Element;
97
- };
98
- export declare const InsertDelete: {
99
- render: () => React.JSX.Element;
100
- };
101
- export declare const Resizable: {
102
- render: () => React.JSX.Element;
103
- };
104
- export declare const TenThousandRows: {
105
- render: () => React.JSX.Element;
106
- };
107
- type StoryProps = {
108
- periodicMutations: boolean;
109
- mutationInterval: number;
110
- periodicDeletions: boolean;
111
- deletionInterval: number;
112
- periodicInsertions: boolean;
113
- insertionInterval: number;
114
- };
115
- export declare const RealTimeUpdates: StoryObj<StoryProps>;
116
- //# sourceMappingURL=Table.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Table.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/deprecated/components/Table/Table.stories.tsx"],"names":[],"m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,eAAe,EAAE,QAAQ,CAAC,UAAU,CAWhD,CAAC"}
@@ -1,12 +0,0 @@
1
- import { type Row, type RowData } from '@tanstack/react-table';
2
- import React from 'react';
3
- type TableBodyProps = {
4
- rows: Row<RowData>[];
5
- };
6
- declare const TableBody: {
7
- ({ rows }: TableBodyProps): React.JSX.Element;
8
- displayName: string;
9
- };
10
- export { TableBody };
11
- export type { TableBodyProps };
12
- //# sourceMappingURL=TableBody.d.ts.map
@@ -1 +0,0 @@
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,13 +0,0 @@
1
- import { type RowData } from '@tanstack/react-table';
2
- import { type JSX, type PropsWithChildren, type ReactNode } from 'react';
3
- import { type TableContextValue } from './props';
4
- export declare const TABLE_NAME = "Table";
5
- export type TypedTableProvider<TData extends RowData> = {
6
- (props: TableContextValue<TData> & {
7
- children: ReactNode;
8
- }): JSX.Element;
9
- displayName: string;
10
- };
11
- export declare const TableProvider: ({ children, ...value }: PropsWithChildren<TableContextValue<RowData>>) => JSX.Element;
12
- export declare const useTableContext: <TData extends RowData>() => TableContextValue<TData>;
13
- //# sourceMappingURL=TableContext.d.ts.map
@@ -1 +0,0 @@
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,9 +0,0 @@
1
- import React from 'react';
2
- type TableHeadProps = {};
3
- declare const TableHead: {
4
- (_props: TableHeadProps): React.JSX.Element;
5
- displayName: string;
6
- };
7
- export { TableHead };
8
- export type { TableHeadProps };
9
- //# sourceMappingURL=TableHead.d.ts.map
@@ -1 +0,0 @@
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,17 +0,0 @@
1
- type TableRootContextActions = {
2
- type: 'updateTableCount';
3
- count: number;
4
- };
5
- export declare const useTableRootContext: () => {
6
- scrollContextRef: import("react").RefObject<HTMLDivElement>;
7
- virtualizer: import("@tanstack/react-virtual").Virtualizer<HTMLDivElement, Element>;
8
- dispatch: (action: TableRootContextActions) => void;
9
- };
10
- export type TableRootContextValue = ReturnType<typeof useTableRootContext>;
11
- export declare const TableRootContext: import("react").Context<{
12
- scrollContextRef: import("react").RefObject<HTMLDivElement>;
13
- virtualizer: import("@tanstack/react-virtual").Virtualizer<HTMLDivElement, Element>;
14
- dispatch: (action: TableRootContextActions) => void;
15
- }>;
16
- export {};
17
- //# sourceMappingURL=TableRootContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableRootContext.d.ts","sourceRoot":"","sources":["../../../../../../src/deprecated/components/Table/TableRootContext.ts"],"names":[],"mappings":"AAOA,KAAK,uBAAuB,GAAG;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3E,eAAO,MAAM,mBAAmB;;;uBAWJ,uBAAuB;CAYlD,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAI3E,eAAO,MAAM,gBAAgB;;;uBAlBD,uBAAuB;EAkB8C,CAAC"}
@@ -1,5 +0,0 @@
1
- export * from './props';
2
- export * from './Table';
3
- export * from './TableContext';
4
- export * from './TableRootContext';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/deprecated/components/Table/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC"}
@@ -1,42 +0,0 @@
1
- import { type RowData, type RowSelectionState, type Table, type VisibilityState } from '@tanstack/react-table';
2
- import { type ClassNameValue } from '@dxos/react-ui-types';
3
- import { type ColumnSorting } from '../../hooks';
4
- import { type KeyValue, type TableColumnDef } from '../../types';
5
- export type TableFlags = Partial<{
6
- role: 'table' | 'grid' | 'treegrid';
7
- grouping: string[];
8
- header: boolean;
9
- border: boolean;
10
- fullWidth: boolean;
11
- debug: boolean;
12
- expand: boolean;
13
- stickyHeader: boolean;
14
- rowsSelectable: boolean | 'multi';
15
- }>;
16
- /**
17
- * This is ‘current’ in the `aria-current` sense.
18
- */
19
- export type TableCurrent<TData extends RowData> = Partial<{
20
- currentDatum: TData;
21
- onDatumClick: (datum: TData) => void;
22
- }>;
23
- export type TableProps<TData extends RowData> = TableFlags & TableCurrent<TData> & Partial<{
24
- keyAccessor: KeyValue<TData>;
25
- data: TData[];
26
- columns: TableColumnDef<TData>[];
27
- onColumnResize: (state: Record<string, number>) => void;
28
- onColumnReorder: (columnId: string, direction: 'left' | 'right') => void;
29
- columnVisibility: VisibilityState;
30
- rowSelection: RowSelectionState;
31
- defaultRowSelection: RowSelectionState;
32
- onRowSelectionChange: (rowSelection: RowSelectionState) => void;
33
- onDataSelectionChange: (dataSelection: TData[]) => void;
34
- classNames: ClassNameValue;
35
- pinLastRow: boolean;
36
- }>;
37
- export type { RowSelectionState, VisibilityState, TableColumnDef, KeyValue };
38
- export type TableContextValue<TData> = TableFlags & TableCurrent<TData> & Pick<TableProps<TData>, 'keyAccessor'> & {
39
- table: Table<TData>;
40
- isGrid: boolean;
41
- } & ColumnSorting;
42
- //# sourceMappingURL=props.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../../../../src/deprecated/components/Table/props.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,KAAK,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE/G,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAE,MAA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,IAAI,CAAC;IAExD,UAAU,EAAE,cAAc,CAAC;IAC3B,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC,CAAC;AAEL,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC;AAE7E,MAAM,MAAM,iBAAiB,CAAC,KAAK,IAAI,UAAU,GAC/C,YAAY,CAAC,KAAK,CAAC,GACnB,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,GAAG;IACvC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;CACjB,GAAG,aAAa,CAAC"}
@@ -1,4 +0,0 @@
1
- export * from './Cell';
2
- export * from './ColumnMenu';
3
- export * from './Table';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/deprecated/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
@@ -1,91 +0,0 @@
1
- import { type Icon } from '@phosphor-icons/react';
2
- import { type ColumnDef, type ColumnMeta, type RowData, type ColumnHelper } from '@tanstack/react-table';
3
- import { type PublicKey } from '@dxos/keys';
4
- import { type ClassNameValue } from '@dxos/react-ui';
5
- export type ValueUpdater<TData extends RowData, TValue> = (row: TData, id: string, value: TValue) => void;
6
- export declare const createColumnBuilder: <TData extends RowData>() => {
7
- helper: ColumnHelper<TData>;
8
- builder: ColumnBuilder<TData>;
9
- };
10
- /**
11
- * NOTE: Can use `meta` for custom properties.
12
- */
13
- export type BaseColumnOptions<TData, TValue> = Partial<ColumnDef<TData, TValue>> & {
14
- meta?: ColumnMeta<TData, TValue>;
15
- label?: string;
16
- classNames?: ClassNameValue;
17
- onUpdate?: ValueUpdater<TData, TValue | undefined>;
18
- };
19
- export type SearchListQueryModel<TData extends RowData> = {
20
- getId(object: TData): string;
21
- getText(object: TData): string;
22
- query(text?: string): Promise<TData[]>;
23
- };
24
- export type ComboboxColumnOptions<TData extends RowData> = BaseColumnOptions<TData, any> & {
25
- model: SearchListQueryModel<TData>;
26
- };
27
- export type StringColumnOptions<TData extends RowData> = BaseColumnOptions<TData, string> & {};
28
- export type SelectRowColumnOptions<TData extends RowData> = BaseColumnOptions<TData, string> & {};
29
- export type NumberColumnOptions<TData extends RowData> = BaseColumnOptions<TData, number> & {
30
- digits?: number;
31
- };
32
- export type KeyColumnOptions<TData extends RowData> = BaseColumnOptions<TData, PublicKey> & {
33
- tooltip?: boolean;
34
- };
35
- export type DateColumnOptions<TData extends RowData> = BaseColumnOptions<TData, Date> & {
36
- format?: string;
37
- relative?: boolean;
38
- };
39
- export type SwitchColumnOptions<TData extends RowData> = BaseColumnOptions<TData, boolean> & {};
40
- export type IconColumnOptions<TData extends RowData> = BaseColumnOptions<TData, boolean> & {
41
- on?: {
42
- Icon?: Icon;
43
- className?: string;
44
- };
45
- off?: {
46
- Icon?: Icon;
47
- className?: string;
48
- };
49
- };
50
- /**
51
- * Util to create column definitions.
52
- */
53
- export declare class ColumnBuilder<TData extends RowData> {
54
- /**
55
- * Combobox value
56
- */
57
- combobox({ label, classNames, model, onUpdate, ...props }: ComboboxColumnOptions<TData>): Partial<ColumnDef<TData, any>>;
58
- /**
59
- * String formats.
60
- */
61
- string({ label, classNames, onUpdate, ...props }?: StringColumnOptions<TData>): Partial<ColumnDef<TData, string>>;
62
- /**
63
- * Number formats.
64
- */
65
- number({ label, minSize, classNames, digits, onUpdate, ...props }?: NumberColumnOptions<TData>): Partial<ColumnDef<TData, number>>;
66
- /**
67
- * Date formats.
68
- */
69
- date({ label, format: formatSpec, relative, classNames, ...props }?: DateColumnOptions<TData>): Partial<ColumnDef<TData, Date>>;
70
- /**
71
- * PublicKey with tooltip.
72
- */
73
- key({ label, tooltip, classNames, ...props }?: KeyColumnOptions<TData>): Partial<ColumnDef<TData, PublicKey>>;
74
- /**
75
- * Row selector
76
- */
77
- selectRow({ classNames, onUpdate, id }?: SelectRowColumnOptions<TData>): Parameters<ColumnHelper<TData>['display']>[0];
78
- /**
79
- * Switch
80
- */
81
- switch({ label, classNames, onUpdate, ...props }?: SwitchColumnOptions<TData>): Partial<ColumnDef<TData, boolean>>;
82
- /**
83
- * Icon based on boolean value.
84
- */
85
- icon({ label, size, on, off, ...props }?: IconColumnOptions<TData>): Partial<ColumnDef<TData, boolean>>;
86
- /**
87
- * This display column type is for nested/unhandled data to appear as JSON.
88
- */
89
- json({ label, classNames, ...props }?: KeyColumnOptions<TData>): Partial<ColumnDef<TData, PublicKey>>;
90
- }
91
- //# sourceMappingURL=helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/deprecated/helpers.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAwB,KAAK,IAAI,EAAK,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,KAAK,YAAY,EAElB,MAAM,uBAAuB,CAAC;AAK/B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,gBAAgB,CAAC;AAOrE,MAAM,MAAM,YAAY,CAAC,KAAK,SAAS,OAAO,EAAE,MAAM,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;AAE1G,eAAO,MAAM,mBAAmB,GAAI,KAAK,SAAS,OAAO;;;CAGvD,CAAC;AAGH;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAAC,KAAK,EAAE,MAAM,IAAI,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,GAAG;IACjF,IAAI,CAAC,EAAE,UAAU,CAAC,KAAK,EAAE,MAAM,CAA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AU,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,GAAE,iBAAiB,CAAC,KAAK,CAAM,GAAG,OAAO,CACzG,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,CACvB;IA4BD;;OAEG;IACH,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,GAAE,gBAAgB,CAAC,KAAK,CAAM,GAAG,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAyCjH;;OAEG;IACH,SAAS,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAgB,EAAE,GAAE,sBAAsB,CAAC,KAAK,CAAM,GAAG,UAAU,CACnG,YAAY,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAC/B,CAAC,CAAC,CAAC;IA2BJ;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,GAAE,mBAAmB,CAAC,KAAK,CAAM,GAAG,OAAO,CACzF,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAC1B;IAaD;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,GAAE,iBAAiB,CAAC,KAAK,CAAM,GAAG,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAsB3G;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,GAAE,gBAAgB,CAAC,KAAK,CAAM,GAAG,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;CAiB1G"}
@@ -1,5 +0,0 @@
1
- export * from './useColumnSizing';
2
- export * from './useColumnSorting';
3
- export * from './usePinLastRow';
4
- export * from './useRowSelection';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/deprecated/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
@@ -1,12 +0,0 @@
1
- import { type ColumnSizingInfoState, type ColumnSizingState } from '@tanstack/react-table';
2
- import { type TableColumnDef } from '../types';
3
- export declare const useColumnResizing: ({ columns, onColumnResize, }: {
4
- columns: TableColumnDef<any>[];
5
- onColumnResize: ((state: Record<string, number>) => void) | undefined;
6
- }) => {
7
- columnSizing: ColumnSizingState;
8
- columnSizingInfo: ColumnSizingInfoState;
9
- setColumnSizing: import("react").Dispatch<import("react").SetStateAction<ColumnSizingState>>;
10
- setColumnSizingInfo: import("react").Dispatch<import("react").SetStateAction<ColumnSizingInfoState>>;
11
- };
12
- //# sourceMappingURL=useColumnSizing.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useColumnSizing.d.ts","sourceRoot":"","sources":["../../../../../src/deprecated/hooks/useColumnSizing.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAK3F,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,eAAO,MAAM,iBAAiB,iCAG3B;IACD,OAAO,EAAE,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;IAC/B,cAAc,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CACvE;;;;;CA4BA,CAAC"}
@@ -1,15 +0,0 @@
1
- import { type SortDirection, type Column, type ColumnSort } from '@tanstack/react-table';
2
- export declare const useColumnSorting: () => {
3
- sorting: ColumnSort[];
4
- sortColumn: (columnId: string, sortDirection: SortDirection) => void;
5
- clearColumnSorting: () => void;
6
- };
7
- export type ColumnSorting = ReturnType<typeof useColumnSorting>;
8
- export declare const useSortColumn: (column: Column<any>) => {
9
- canSort: boolean;
10
- sortDirection: "asc" | "desc" | undefined;
11
- onSelectSort: (direction: SortDirection) => void;
12
- onToggleSort: () => void;
13
- onClearSort: () => void;
14
- };
15
- //# sourceMappingURL=useColumnSorting.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useColumnSorting.d.ts","sourceRoot":"","sources":["../../../../../src/deprecated/hooks/useColumnSorting.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,MAAM,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAKzF,eAAO,MAAM,gBAAgB;;2BAGG,MAAM,iBAAiB,aAAa;;CASnE,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,eAAO,MAAM,aAAa,WAAY,MAAM,CAAC,GAAG,CAAC;;;8BA2Bd,aAAa;;;CAW/C,CAAC"}
@@ -1,3 +0,0 @@
1
- import { type Table } from '@tanstack/react-table';
2
- export declare const usePinLastRow: (pinLastRow: boolean | undefined, table: Table<any>, data: any[]) => void;
3
- //# sourceMappingURL=usePinLastRow.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usePinLastRow.d.ts","sourceRoot":"","sources":["../../../../../src/deprecated/hooks/usePinLastRow.ts"],"names":[],"mappings":"AAIA,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAG7D,eAAO,MAAM,aAAa,eAAgB,OAAO,GAAG,SAAS,SAAS,KAAK,CAAC,GAAG,CAAC,QAAQ,GAAG,EAAE,SAuC5F,CAAC"}
@@ -1,7 +0,0 @@
1
- import { type OnChangeFn, type RowSelectionState } from '@tanstack/react-table';
2
- import { type TableProps } from '../components/Table';
3
- export declare const useRowSelection: (props: Pick<TableProps<any>, "rowsSelectable" | "defaultRowSelection" | "rowSelection" | "onRowSelectionChange" | "rowsSelectable">) => {
4
- rowSelection: RowSelectionState;
5
- handleRowSelectionChange: OnChangeFn<RowSelectionState>;
6
- };
7
- //# sourceMappingURL=useRowSelection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useRowSelection.d.ts","sourceRoot":"","sources":["../../../../../src/deprecated/hooks/useRowSelection.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAGhF,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,eAAO,MAAM,eAAe,UACnB,IAAI,CACT,UAAU,CAAC,GAAG,CAAC,EACf,gBAAgB,GAAG,qBAAqB,GAAG,cAAc,GAAG,sBAAsB,GAAG,gBAAgB,CACtG;;;CAyBF,CAAC"}
@@ -1,8 +0,0 @@
1
- export { default as translations } from './translations';
2
- export * from './components';
3
- export * from './helpers';
4
- export * from './hooks';
5
- export * from './schema';
6
- export * from './theme';
7
- export * from './types';
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/deprecated/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEzD,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
@@ -1,11 +0,0 @@
1
- import '@dxos-theme';
2
- import React from 'react';
3
- declare const _default: {
4
- title: string;
5
- decorators: import("@storybook/react").Decorator[];
6
- };
7
- export default _default;
8
- export declare const Default: {
9
- render: () => React.JSX.Element;
10
- };
11
- //# sourceMappingURL=Schema.stories.d.ts.map
@@ -1 +0,0 @@
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,7 +0,0 @@
1
- import { type ColumnDef } from '@tanstack/react-table';
2
- import { type S } from '@dxos/echo-schema';
3
- /**
4
- * @deprecated
5
- */
6
- export declare const schemaToColumnDefs: <T>(schema: S.Schema<T, any>) => ColumnDef<T, any>[];
7
- //# sourceMappingURL=column-utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"column-utils.d.ts","sourceRoot":"","sources":["../../../../../src/deprecated/schema/column-utils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAY,KAAK,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAMrD;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,KAAG,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,EAsCjF,CAAC"}
@@ -1,3 +0,0 @@
1
- export * from './column-utils';
2
- export * from './types';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/deprecated/schema/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
@@ -1,27 +0,0 @@
1
- import { type TypeEnum, type FormatEnum } from '@dxos/echo-schema';
2
- /**
3
- * @deprecated
4
- */
5
- export type TableDef = {
6
- id: string;
7
- name?: string;
8
- columns: ColumnDef[];
9
- };
10
- /**
11
- * @deprecated
12
- */
13
- export type ColumnDef = {
14
- id: string;
15
- prop: string;
16
- type: TypeEnum;
17
- format?: FormatEnum;
18
- size?: number;
19
- label?: string;
20
- digits?: number;
21
- refTable?: string;
22
- refProp?: string;
23
- fixed?: boolean;
24
- editable?: boolean;
25
- resizable?: boolean;
26
- };
27
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/deprecated/schema/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEnE;;GAEG;AAEH,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,EAAE,CAAC;CACtB,CAAC;AAEF;;GAEG;AAEH,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC"}
@@ -1,29 +0,0 @@
1
- import { type ComponentFunction } from '@dxos/react-ui-types';
2
- import { type TableContextValue, type TableFlags } from './components';
3
- export declare const currentRow = "!bg-neutral-75 !dark:bg-neutral-850";
4
- export declare const selectedRow = "!bg-primary-100 dark:!bg-primary-700";
5
- export declare const flushPadding = "pli-0 plb-0";
6
- export declare const textPadding = "pli-2 plb-0";
7
- export declare const headPadding = "pli-2 plb-0";
8
- export declare const gridCellFocusRing = "relative focus-within:outline focus-within:outline-1 outline-primary-500 outline-offset-[-1px]";
9
- export type TableStyleProps = Partial<TableContextValue<any>>;
10
- export declare const tableRoot: ComponentFunction<TableStyleProps>;
11
- export declare const groupTh: ComponentFunction<TableStyleProps>;
12
- export type TheadStyleProps = Partial<TableFlags>;
13
- export declare const theadRoot: ComponentFunction<TheadStyleProps>;
14
- export declare const theadTr: ComponentFunction<TheadStyleProps>;
15
- export declare const theadTh: ComponentFunction<TheadStyleProps>;
16
- export declare const theadResizeRoot: ComponentFunction<{
17
- isResizing: boolean;
18
- }>;
19
- export type TbodyStyleProps = Partial<TableContextValue<any>>;
20
- export declare const tbodyRoot: ComponentFunction<TbodyStyleProps>;
21
- export type TbodyTrStyleProps = Partial<{
22
- canBeCurrent?: boolean;
23
- isPinned?: boolean;
24
- }>;
25
- export declare const tbodyTr: ComponentFunction<TbodyTrStyleProps>;
26
- export declare const tdRoot: ComponentFunction<TbodyStyleProps & {
27
- pinned?: boolean;
28
- }>;
29
- //# sourceMappingURL=theme.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/deprecated/theme.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAEvE,eAAO,MAAM,UAAU,wCAAwC,CAAC;AAChE,eAAO,MAAM,WAAW,yCAAyC,CAAC;AAClE,eAAO,MAAM,YAAY,gBAAgB,CAAC;AAC1C,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,WAAW,gBAAgB,CAAC;AAEzC,eAAO,MAAM,iBAAiB,mGACoE,CAAC;AAInG,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC;AAE9D,eAAO,MAAM,SAAS,EAAE,iBAAiB,CAAC,eAAe,CACoC,CAAC;AAE9F,eAAO,MAAM,OAAO,EAAE,iBAAiB,CAAC,eAAe,CACH,CAAC;AAErD,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAElD,eAAO,MAAM,SAAS,EAAE,iBAAiB,CAAC,eAAe,CACqD,CAAC;AAE/G,eAAO,MAAM,OAAO,EAAE,iBAAiB,CAAC,eAAe,CAA2C,CAAC;AAEnG,eAAO,MAAM,OAAO,EAAE,iBAAiB,CAAC,eAAe,CAQpD,CAAC;AAEJ,eAAO,MAAM,eAAe,EAAE,iBAAiB,CAAC;IAAE,UAAU,EAAE,OAAO,CAAA;CAAE,CAUtE,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC;AAC9D,eAAO,MAAM,SAAS,EAAE,iBAAiB,CAAC,eAAe,CAAkC,CAAC;AAE5F,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC;IAAE,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AACxF,eAAO,MAAM,OAAO,EAAE,iBAAiB,CAAC,iBAAiB,CAStD,CAAC;AAEJ,eAAO,MAAM,MAAM,EAAE,iBAAiB,CAAC,eAAe,GAAG;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CAS1E,CAAC"}
@@ -1,21 +0,0 @@
1
- export declare const translationKey = "table";
2
- declare const _default: {
3
- 'en-US': {
4
- table: {
5
- 'no selection label': string;
6
- 'number column type label': string;
7
- 'boolean column type label': string;
8
- 'date column type label': string;
9
- 'string column type label': string;
10
- 'ref column type label': string;
11
- 'digits label': string;
12
- 'save label': string;
13
- 'delete label': string;
14
- 'column label label': string;
15
- 'property key label': string;
16
- 'column type label': string;
17
- };
18
- };
19
- }[];
20
- export default _default;
21
- //# sourceMappingURL=translations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../../src/deprecated/translations.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,UAAU,CAAC;;;;;;;;;;;;;;;;;;;AAEtC,wBAmBE"}
@@ -1,26 +0,0 @@
1
- import { type ColumnDef, type RowData } from '@tanstack/react-table';
2
- import { type ClassNameValue } from '@dxos/react-ui-types';
3
- import { type SearchListQueryModel, type ValueUpdater } from './helpers';
4
- declare module '@tanstack/react-table' {
5
- interface TableMeta<TData extends RowData> {
6
- }
7
- interface ColumnMeta<TData extends RowData, TValue> {
8
- expand?: boolean;
9
- resizable?: boolean;
10
- model?: SearchListQueryModel<TData>;
11
- onUpdate?: ValueUpdater<TData, any>;
12
- digits?: number;
13
- header?: {
14
- classNames?: ClassNameValue;
15
- };
16
- footer?: {
17
- classNames?: ClassNameValue;
18
- };
19
- cell?: {
20
- classNames?: ClassNameValue;
21
- };
22
- }
23
- }
24
- export type KeyValue<TData extends RowData> = (row: TData) => string;
25
- export type TableColumnDef<TData extends RowData, TValue = any> = ColumnDef<TData, TValue>;
26
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/deprecated/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAErE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,KAAK,oBAAoB,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAGzE,OAAO,QAAQ,uBAAuB,CAAC;IAGrC,UAAU,SAAS,CAAC,KAAK,SAAS,OAAO;KAAI;IAG7C,UAAU,UAAU,CAAC,KAAK,SAAS,OAAO,EAAE,MAAM;QAChD,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,KAAK,CAAC,EAAE,oBAAoB,CAAC,KAAK,CAAC,CAAC;QACpC,QAAQ,CAAC,EAAE,YAAY,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACpC,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE;YACP,UAAU,CAAC,EAAE,cAAc,CAAC;SAC7B,CAAC;QACF,MAAM,CAAC,EAAE;YACP,UAAU,CAAC,EAAE,cAAc,CAAC;SAC7B,CAAC;QACF,IAAI,CAAC,EAAE;YACL,UAAU,CAAC,EAAE,cAAc,CAAC;SAC7B,CAAC;KACH;CACF;AAED,MAAM,MAAM,QAAQ,CAAC,KAAK,SAAS,OAAO,IAAI,CAAC,GAAG,EAAE,KAAK,KAAK,MAAM,CAAC;AAErE,MAAM,MAAM,cAAc,CAAC,KAAK,SAAS,OAAO,EAAE,MAAM,GAAG,GAAG,IAAI,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC"}