@dxos/react-ui-table 0.8.4-main.c85a9c8dae → 0.8.4-main.d05673bc65
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-DSR2MRZB.mjs → chunk-BF54SSNL.mjs} +3 -13
- package/dist/lib/{node-esm/chunk-HTZJSULI.mjs.map → browser/chunk-BF54SSNL.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +6 -8
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +1 -1
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node-esm/{chunk-HTZJSULI.mjs → chunk-SIRDIPHZ.mjs} +3 -13
- package/dist/lib/{browser/chunk-DSR2MRZB.mjs.map → node-esm/chunk-SIRDIPHZ.mjs.map} +3 -3
- package/dist/lib/node-esm/index.mjs +6 -8
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +1 -1
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/components/Table/Table.d.ts +2 -2
- package/dist/types/src/components/Table/Table.d.ts.map +1 -1
- package/dist/types/src/types/Table.d.ts +0 -5
- package/dist/types/src/types/Table.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +35 -35
- package/src/components/Table/DynamicTable.tsx +1 -1
- package/src/components/Table/Table.stories.tsx +3 -3
- package/src/components/Table/Table.tsx +4 -5
- package/src/components/testing.ts +1 -1
- package/src/model/table-model.test.ts +1 -1
- package/src/model/table-presentation.test.ts +1 -1
- package/src/types/Table.ts +2 -18
- package/src/util/dynamic-table.test.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/react-ui-table",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.d05673bc65",
|
|
4
4
|
"description": "A table component.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -68,31 +68,31 @@
|
|
|
68
68
|
"@radix-ui/react-use-controllable-state": "1.1.0",
|
|
69
69
|
"date-fns": "^3.3.1",
|
|
70
70
|
"lodash.orderby": "^4.6.0",
|
|
71
|
-
"@dxos/async": "0.8.4-main.
|
|
72
|
-
"@dxos/context": "0.8.4-main.
|
|
73
|
-
"@dxos/effect": "0.8.4-main.
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/keys": "0.8.4-main.
|
|
78
|
-
"@dxos/log": "0.8.4-main.
|
|
79
|
-
"@dxos/
|
|
80
|
-
"@dxos/
|
|
81
|
-
"@dxos/
|
|
82
|
-
"@dxos/react-client": "0.8.4-main.
|
|
83
|
-
"@dxos/react-ui-editor": "0.8.4-main.
|
|
84
|
-
"@dxos/react-ui-
|
|
85
|
-
"@dxos/
|
|
86
|
-
"@dxos/react-ui-
|
|
87
|
-
"@dxos/react-ui-
|
|
88
|
-
"@dxos/react-ui-
|
|
89
|
-
"@dxos/react-ui-
|
|
90
|
-
"@dxos/
|
|
91
|
-
"@dxos/
|
|
92
|
-
"@dxos/
|
|
93
|
-
"@dxos/
|
|
94
|
-
"@dxos/
|
|
95
|
-
"@dxos/
|
|
71
|
+
"@dxos/async": "0.8.4-main.d05673bc65",
|
|
72
|
+
"@dxos/context": "0.8.4-main.d05673bc65",
|
|
73
|
+
"@dxos/effect": "0.8.4-main.d05673bc65",
|
|
74
|
+
"@dxos/echo-atom": "0.8.4-main.d05673bc65",
|
|
75
|
+
"@dxos/invariant": "0.8.4-main.d05673bc65",
|
|
76
|
+
"@dxos/lit-grid": "0.8.4-main.d05673bc65",
|
|
77
|
+
"@dxos/keys": "0.8.4-main.d05673bc65",
|
|
78
|
+
"@dxos/log": "0.8.4-main.d05673bc65",
|
|
79
|
+
"@dxos/random": "0.8.4-main.d05673bc65",
|
|
80
|
+
"@dxos/react-ui-attention": "0.8.4-main.d05673bc65",
|
|
81
|
+
"@dxos/echo": "0.8.4-main.d05673bc65",
|
|
82
|
+
"@dxos/react-client": "0.8.4-main.d05673bc65",
|
|
83
|
+
"@dxos/react-ui-editor": "0.8.4-main.d05673bc65",
|
|
84
|
+
"@dxos/react-ui-form": "0.8.4-main.d05673bc65",
|
|
85
|
+
"@dxos/react-ui-grid": "0.8.4-main.d05673bc65",
|
|
86
|
+
"@dxos/react-ui-menu": "0.8.4-main.d05673bc65",
|
|
87
|
+
"@dxos/react-ui-searchlist": "0.8.4-main.d05673bc65",
|
|
88
|
+
"@dxos/react-ui-stack": "0.8.4-main.d05673bc65",
|
|
89
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.d05673bc65",
|
|
90
|
+
"@dxos/schema": "0.8.4-main.d05673bc65",
|
|
91
|
+
"@dxos/types": "0.8.4-main.d05673bc65",
|
|
92
|
+
"@dxos/util": "0.8.4-main.d05673bc65",
|
|
93
|
+
"@dxos/ui-types": "0.8.4-main.d05673bc65",
|
|
94
|
+
"@dxos/react-ui-components": "0.8.4-main.d05673bc65",
|
|
95
|
+
"@dxos/debug": "0.8.4-main.d05673bc65"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
98
|
"@effect/platform": "0.94.4",
|
|
@@ -104,13 +104,13 @@
|
|
|
104
104
|
"react": "~19.2.3",
|
|
105
105
|
"react-dom": "~19.2.3",
|
|
106
106
|
"vite": "^7.1.11",
|
|
107
|
-
"@dxos/
|
|
108
|
-
"@dxos/
|
|
109
|
-
"@dxos/
|
|
110
|
-
"@dxos/
|
|
111
|
-
"@dxos/
|
|
112
|
-
"@dxos/
|
|
113
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
107
|
+
"@dxos/lit-ui": "0.8.4-main.d05673bc65",
|
|
108
|
+
"@dxos/random": "0.8.4-main.d05673bc65",
|
|
109
|
+
"@dxos/react-client": "0.8.4-main.d05673bc65",
|
|
110
|
+
"@dxos/react-ui": "0.8.4-main.d05673bc65",
|
|
111
|
+
"@dxos/storybook-utils": "0.8.4-main.d05673bc65",
|
|
112
|
+
"@dxos/test-utils": "0.8.4-main.d05673bc65",
|
|
113
|
+
"@dxos/ui-theme": "0.8.4-main.d05673bc65"
|
|
114
114
|
},
|
|
115
115
|
"peerDependencies": {
|
|
116
116
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -118,8 +118,8 @@
|
|
|
118
118
|
"effect": "3.19.16",
|
|
119
119
|
"react": "~19.2.3",
|
|
120
120
|
"react-dom": "~19.2.3",
|
|
121
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
122
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
121
|
+
"@dxos/react-ui": "0.8.4-main.d05673bc65",
|
|
122
|
+
"@dxos/ui-theme": "0.8.4-main.d05673bc65"
|
|
123
123
|
},
|
|
124
124
|
"publishConfig": {
|
|
125
125
|
"access": "public"
|
|
@@ -39,7 +39,7 @@ export type DynamicTableProps<T extends Type.AnyEntity = Type.AnyEntity> = Theme
|
|
|
39
39
|
export const DynamicTable = <T extends Type.AnyEntity = Type.AnyEntity>({
|
|
40
40
|
classNames,
|
|
41
41
|
schema,
|
|
42
|
-
name = 'example.
|
|
42
|
+
name = 'com.example.dynamic-table', // Remove default or make random; this will lead to type collisions.
|
|
43
43
|
rows,
|
|
44
44
|
properties,
|
|
45
45
|
jsonSchema: jsonSchemaProp,
|
|
@@ -52,7 +52,7 @@ const Example = Schema.Struct({
|
|
|
52
52
|
title: 'Parent',
|
|
53
53
|
}),
|
|
54
54
|
}).pipe(
|
|
55
|
-
Type.object({ typename: `example.
|
|
55
|
+
Type.object({ typename: `com.example.type.${PublicKey.random().truncate()}`, version: '0.1.0' }),
|
|
56
56
|
Annotation.LabelAnnotation.set(['name']),
|
|
57
57
|
);
|
|
58
58
|
interface Example extends Schema.Schema.Type<typeof Example> {}
|
|
@@ -252,7 +252,7 @@ const ContactWithArrayOfEmails = Schema.Struct({
|
|
|
252
252
|
),
|
|
253
253
|
}).pipe(
|
|
254
254
|
Type.object({
|
|
255
|
-
typename: 'dxos.
|
|
255
|
+
typename: 'org.dxos.type.contact-with-array-of-emails',
|
|
256
256
|
version: '0.1.0',
|
|
257
257
|
}),
|
|
258
258
|
);
|
|
@@ -297,7 +297,7 @@ export const Tags: Meta<StoryProps> = {
|
|
|
297
297
|
createSpace: true,
|
|
298
298
|
onCreateSpace: async ({ space }) => {
|
|
299
299
|
// Configure schema.
|
|
300
|
-
const typename = 'example.
|
|
300
|
+
const typename = 'com.example.type.single-select';
|
|
301
301
|
const selectOptions = [
|
|
302
302
|
{ id: 'one', title: 'One', color: 'emerald' },
|
|
303
303
|
{ id: 'two', title: 'Two', color: 'blue' },
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
gridSeparatorInlineEnd,
|
|
36
36
|
} from '@dxos/react-ui-grid';
|
|
37
37
|
import { DxEditRequest } from '@dxos/react-ui-grid';
|
|
38
|
-
import {
|
|
38
|
+
import { composableProps, mx } from '@dxos/ui-theme';
|
|
39
39
|
import { type ComposableProps } from '@dxos/ui-types';
|
|
40
40
|
|
|
41
41
|
import { type InsertRowResult, ModalController, type TableModel, type TablePresentation } from '../../model';
|
|
@@ -73,7 +73,7 @@ export type TableController = {
|
|
|
73
73
|
handleInsertRowResult?: (insertRowResult?: InsertRowResult) => void;
|
|
74
74
|
};
|
|
75
75
|
|
|
76
|
-
export type TableMainProps<T extends Type.AnyEntity = Type.AnyEntity> = ComposableProps<{
|
|
76
|
+
export type TableMainProps<T extends Type.AnyEntity = Type.AnyEntity> = ComposableProps<HTMLDivElement> & {
|
|
77
77
|
schema?: T;
|
|
78
78
|
model?: TableModel;
|
|
79
79
|
presentation?: TablePresentation;
|
|
@@ -82,7 +82,7 @@ export type TableMainProps<T extends Type.AnyEntity = Type.AnyEntity> = Composab
|
|
|
82
82
|
onCreate?: OnCreateHandler;
|
|
83
83
|
onRowClick?: (row: any) => void;
|
|
84
84
|
testId?: string;
|
|
85
|
-
}
|
|
85
|
+
};
|
|
86
86
|
|
|
87
87
|
const TableMainInner = <T extends Type.AnyEntity = Type.AnyEntity>(
|
|
88
88
|
{ schema, model, presentation, ignoreAttention, onCreate, onRowClick, testId, ...props }: TableMainProps<T>,
|
|
@@ -415,9 +415,8 @@ const TableMainInner = <T extends Type.AnyEntity = Type.AnyEntity>(
|
|
|
415
415
|
return <span role='none' className='dx-attention-surface' />;
|
|
416
416
|
}
|
|
417
417
|
|
|
418
|
-
const { className, ...rest } = useComposableProps(props);
|
|
419
418
|
return (
|
|
420
|
-
<div {...
|
|
419
|
+
<div {...composableProps(props, { role: 'none', className: 'dx-container relative' })}>
|
|
421
420
|
<Grid.Root id={model.id ?? 'table-grid'}>
|
|
422
421
|
<TableValueEditor<T>
|
|
423
422
|
model={model}
|
package/src/types/Table.ts
CHANGED
|
@@ -23,8 +23,8 @@ export const Table = Schema.Struct({
|
|
|
23
23
|
}).pipe(Schema.mutable, FormInputAnnotation.set(false)),
|
|
24
24
|
}).pipe(
|
|
25
25
|
Type.object({
|
|
26
|
-
typename: 'dxos.
|
|
27
|
-
version: '0.
|
|
26
|
+
typename: 'org.dxos.type.table',
|
|
27
|
+
version: '0.1.0',
|
|
28
28
|
}),
|
|
29
29
|
LabelAnnotation.set(['name']),
|
|
30
30
|
ViewAnnotation.set(true),
|
|
@@ -77,19 +77,3 @@ export const make = ({ name, sizes = {}, view, jsonSchema }: MakeProps): Table =
|
|
|
77
77
|
|
|
78
78
|
return table;
|
|
79
79
|
};
|
|
80
|
-
|
|
81
|
-
//
|
|
82
|
-
// V1
|
|
83
|
-
//
|
|
84
|
-
|
|
85
|
-
export const TableV1 = Schema.Struct({
|
|
86
|
-
sizes: Schema.Record({
|
|
87
|
-
key: Schema.String,
|
|
88
|
-
value: Schema.Number,
|
|
89
|
-
}).pipe(Schema.mutable),
|
|
90
|
-
}).pipe(
|
|
91
|
-
Type.object({
|
|
92
|
-
typename: 'dxos.org/type/Table',
|
|
93
|
-
version: '0.1.0',
|
|
94
|
-
}),
|
|
95
|
-
);
|
|
@@ -49,7 +49,7 @@ describe('makeDynamicTable', () => {
|
|
|
49
49
|
*/
|
|
50
50
|
test('makeDynamicTable with jsonSchema from getBaseSchema(typename, properties) and properties with title does not throw', () => {
|
|
51
51
|
const registry = Registry.make();
|
|
52
|
-
const typename = 'example.
|
|
52
|
+
const typename = 'com.example.type.dynamic-table-test';
|
|
53
53
|
const properties: TablePropertyDefinition[] = [
|
|
54
54
|
{ name: 'id', format: Format.TypeFormat.String },
|
|
55
55
|
{ name: 'name', format: Format.TypeFormat.String, title: 'Name' },
|