@dxos/react-ui-table 0.7.4 → 0.7.5-main.937ce75
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-IYCSJDMB.mjs → chunk-AT7O4RAD.mjs} +4 -4
- package/dist/lib/browser/{chunk-IYCSJDMB.mjs.map → chunk-AT7O4RAD.mjs.map} +2 -2
- package/dist/lib/browser/index.mjs +1442 -1219
- 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-MHBMVCFZ.cjs → chunk-YSBXNBDJ.cjs} +6 -6
- package/dist/lib/node/{chunk-MHBMVCFZ.cjs.map → chunk-YSBXNBDJ.cjs.map} +2 -2
- package/dist/lib/node/index.cjs +1351 -1111
- 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-BMWGPXPL.mjs → chunk-6OH2NHUX.mjs} +4 -4
- package/dist/lib/node-esm/{chunk-BMWGPXPL.mjs.map → chunk-6OH2NHUX.mjs.map} +2 -2
- package/dist/lib/node-esm/index.mjs +1442 -1219
- 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/hooks/useColumnSorting.d.ts +1 -1
- package/dist/types/src/components/Table/ColumnActionsMenu.d.ts +4 -3
- package/dist/types/src/components/Table/ColumnActionsMenu.d.ts.map +1 -1
- package/dist/types/src/components/Table/ColumnSettings.d.ts +3 -2
- package/dist/types/src/components/Table/ColumnSettings.d.ts.map +1 -1
- package/dist/types/src/components/Table/CreateRefPanel.d.ts +3 -2
- package/dist/types/src/components/Table/CreateRefPanel.d.ts.map +1 -1
- package/dist/types/src/components/Table/RefPanel.d.ts +4 -3
- package/dist/types/src/components/Table/RefPanel.d.ts.map +1 -1
- package/dist/types/src/components/Table/RowActionsMenu.d.ts +3 -2
- package/dist/types/src/components/Table/RowActionsMenu.d.ts.map +1 -1
- package/dist/types/src/components/Table/Table.d.ts +2 -1
- package/dist/types/src/components/Table/Table.d.ts.map +1 -1
- package/dist/types/src/components/Table/Table.stories.d.ts.map +1 -1
- package/dist/types/src/components/TableCellEditor/TableCellEditor.d.ts +3 -2
- package/dist/types/src/components/TableCellEditor/TableCellEditor.d.ts.map +1 -1
- package/dist/types/src/components/TableCellEditor/TableCellEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/testing.d.ts +55 -71
- package/dist/types/src/components/testing.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/model/index.d.ts +1 -0
- package/dist/types/src/model/index.d.ts.map +1 -1
- package/dist/types/src/model/modal-controller.d.ts +6 -2
- package/dist/types/src/model/modal-controller.d.ts.map +1 -1
- package/dist/types/src/model/selection-model.d.ts.map +1 -1
- package/dist/types/src/model/table-model.d.ts +14 -27
- package/dist/types/src/model/table-model.d.ts.map +1 -1
- package/dist/types/src/model/table-presentation.d.ts +22 -0
- package/dist/types/src/model/table-presentation.d.ts.map +1 -0
- package/dist/types/src/model/table-presentation.test.d.ts +2 -0
- package/dist/types/src/model/table-presentation.test.d.ts.map +1 -0
- package/dist/types/src/model/table-sorting.d.ts +48 -0
- package/dist/types/src/model/table-sorting.d.ts.map +1 -0
- package/dist/types/src/playwright/TableManager.d.ts +2 -1
- package/dist/types/src/playwright/TableManager.d.ts.map +1 -1
- package/dist/types/src/types/table.d.ts +118 -154
- package/dist/types/src/types/table.d.ts.map +1 -1
- package/dist/types/src/util/index.d.ts +1 -0
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/table-buttons.d.ts +50 -20
- package/dist/types/src/util/table-buttons.d.ts.map +1 -1
- package/dist/types/src/util/table-controls.d.ts +32 -9
- package/dist/types/src/util/table-controls.d.ts.map +1 -1
- package/dist/types/src/util/table.d.ts +2 -2
- package/dist/types/src/util/table.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +29 -29
- package/src/components/Table/ColumnActionsMenu.tsx +8 -8
- package/src/components/Table/ColumnSettings.tsx +11 -11
- package/src/components/Table/CreateRefPanel.tsx +13 -14
- package/src/components/Table/RefPanel.tsx +9 -9
- package/src/components/Table/RowActionsMenu.tsx +6 -7
- package/src/components/Table/Table.stories.tsx +40 -23
- package/src/components/Table/Table.tsx +235 -148
- package/src/components/TableCellEditor/TableCellEditor.stories.tsx +13 -12
- package/src/components/TableCellEditor/TableCellEditor.tsx +6 -4
- package/src/components/testing.ts +10 -8
- package/src/index.ts +2 -0
- package/src/model/index.ts +1 -0
- package/src/model/modal-controller.ts +15 -48
- package/src/model/selection-model.ts +12 -1
- package/src/model/table-model.test.ts +4 -71
- package/src/model/table-model.ts +61 -292
- package/src/model/table-presentation.test.ts +102 -0
- package/src/model/table-presentation.ts +217 -0
- package/src/model/table-sorting.ts +131 -0
- package/src/playwright/TableManager.ts +5 -1
- package/src/playwright/smoke.spec.ts +79 -1
- package/src/types/table.ts +3 -3
- package/src/util/index.ts +1 -0
- package/src/util/table-buttons.ts +97 -48
- package/src/util/table-controls.ts +71 -7
- package/src/util/table.ts +21 -13
|
@@ -1,161 +1,125 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S } from '@dxos/echo-schema';
|
|
2
2
|
export declare const TableSchema: S.Struct<{
|
|
3
|
-
id:
|
|
4
|
-
random(): ObjectId;
|
|
5
|
-
};
|
|
3
|
+
id: import("@dxos/echo-schema").ObjectIdClass;
|
|
6
4
|
name: S.optional<typeof S.String>;
|
|
7
|
-
view: S.optional<
|
|
8
|
-
name: string
|
|
9
|
-
schema
|
|
10
|
-
|
|
11
|
-
fields: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
properties?: {
|
|
45
|
-
[x: string]: any;
|
|
46
|
-
} | undefined;
|
|
47
|
-
context?: import("@dxos/echo-schema").Ref<import("@dxos/echo-schema").Expando>;
|
|
48
|
-
} & {
|
|
49
|
-
id: string;
|
|
50
|
-
}>[];
|
|
51
|
-
} & {
|
|
52
|
-
id: string;
|
|
53
|
-
}>>>;
|
|
5
|
+
view: S.optional<import("@dxos/echo-schema").Ref$<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
|
|
6
|
+
name: S.SchemaClass<string, string, never>;
|
|
7
|
+
query: S.Schema<import("@dxos/echo-schema").QueryType, import("@dxos/echo-schema").QueryType, never>;
|
|
8
|
+
schema: S.optional<S.Schema<import("@dxos/echo-schema").JsonSchemaType, import("@dxos/echo-schema").JsonSchemaType, never>>;
|
|
9
|
+
fields: S.mutable<S.Array$<S.mutable<S.Struct<{
|
|
10
|
+
id: typeof S.String;
|
|
11
|
+
path: S.Schema<import("@dxos/echo-schema").JsonPath, import("@dxos/echo-schema").JsonPath, never>;
|
|
12
|
+
visible: S.optional<typeof S.Boolean>;
|
|
13
|
+
size: S.optional<typeof S.Number>;
|
|
14
|
+
referencePath: S.optional<S.Schema<import("@dxos/echo-schema").JsonPath, import("@dxos/echo-schema").JsonPath, never>>;
|
|
15
|
+
}>>>>;
|
|
16
|
+
}, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>>>;
|
|
17
|
+
threads: S.optional<S.Array$<import("@dxos/echo-schema").Ref$<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
|
|
18
|
+
name: S.optional<typeof S.String>;
|
|
19
|
+
anchor: S.optional<typeof S.String>;
|
|
20
|
+
status: S.optional<S.Union<[S.Literal<["staged"]>, S.Literal<["active"]>, S.Literal<["resolved"]>]>>;
|
|
21
|
+
messages: S.mutable<S.Array$<import("@dxos/echo-schema").Ref$<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
|
|
22
|
+
timestamp: typeof S.String;
|
|
23
|
+
state: S.optional<S.Enums<typeof import("@dxos/plugin-space").MessageState>>;
|
|
24
|
+
sender: S.mutable<S.Struct<{
|
|
25
|
+
contact: S.optional<import("@dxos/echo-schema").Ref$<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
|
|
26
|
+
name: S.optional<typeof S.String>;
|
|
27
|
+
identifiers: S.mutable<S.Array$<S.Struct<{
|
|
28
|
+
type: typeof S.String;
|
|
29
|
+
value: typeof S.String;
|
|
30
|
+
}>>>;
|
|
31
|
+
}, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>>>;
|
|
32
|
+
identityKey: S.optional<typeof S.String>;
|
|
33
|
+
email: S.optional<typeof S.String>;
|
|
34
|
+
name: S.optional<typeof S.String>;
|
|
35
|
+
}>>;
|
|
36
|
+
text: typeof S.String;
|
|
37
|
+
parts: S.optional<S.mutable<S.Array$<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").Expando>>>>;
|
|
38
|
+
properties: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
|
|
39
|
+
context: S.optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").Expando>>;
|
|
40
|
+
}, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>>>>;
|
|
41
|
+
}, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>>>>;
|
|
54
42
|
}>;
|
|
55
|
-
declare const TableType_base: import("@dxos/echo-schema").
|
|
56
|
-
|
|
57
|
-
id: string;
|
|
58
|
-
view?: import("@dxos/echo-schema").Ref<{
|
|
59
|
-
name: string;
|
|
60
|
-
schema?: import("@dxos/echo-schema").JsonSchemaType | undefined;
|
|
61
|
-
query: import("@dxos/echo-schema").QueryType;
|
|
62
|
-
fields: {
|
|
63
|
-
referencePath?: import("@dxos/echo-schema").JsonPath | undefined;
|
|
64
|
-
id: string;
|
|
65
|
-
path: import("@dxos/echo-schema").JsonPath;
|
|
66
|
-
visible?: boolean | undefined;
|
|
67
|
-
size?: number | undefined;
|
|
68
|
-
}[];
|
|
69
|
-
} & {
|
|
70
|
-
id: string;
|
|
71
|
-
}>;
|
|
72
|
-
threads?: readonly import("@dxos/echo-schema").Ref<{
|
|
73
|
-
name?: string | undefined;
|
|
74
|
-
anchor?: string | undefined;
|
|
75
|
-
status?: "active" | "staged" | "resolved" | undefined;
|
|
76
|
-
messages: import("@dxos/echo-schema").Ref<{
|
|
77
|
-
text: string;
|
|
78
|
-
timestamp: string;
|
|
79
|
-
state?: import("@dxos/plugin-space").MessageState | undefined;
|
|
80
|
-
sender: {
|
|
81
|
-
name?: string | undefined;
|
|
82
|
-
contact?: import("@dxos/echo-schema").Ref<{
|
|
83
|
-
name?: string | undefined;
|
|
84
|
-
identifiers: {
|
|
85
|
-
readonly value: string;
|
|
86
|
-
readonly type: string;
|
|
87
|
-
}[];
|
|
88
|
-
} & {
|
|
89
|
-
id: string;
|
|
90
|
-
}>;
|
|
91
|
-
identityKey?: string | undefined;
|
|
92
|
-
email?: string | undefined;
|
|
93
|
-
};
|
|
94
|
-
parts?: import("@dxos/echo-schema").Ref<import("@dxos/echo-schema").Expando>[] | undefined;
|
|
95
|
-
properties?: {
|
|
96
|
-
[x: string]: any;
|
|
97
|
-
} | undefined;
|
|
98
|
-
context?: import("@dxos/echo-schema").Ref<import("@dxos/echo-schema").Expando>;
|
|
99
|
-
} & {
|
|
100
|
-
id: string;
|
|
101
|
-
}>[];
|
|
102
|
-
} & {
|
|
103
|
-
id: string;
|
|
104
|
-
}>[] | undefined;
|
|
105
|
-
} & {
|
|
106
|
-
id: string;
|
|
107
|
-
}, S.Struct.Encoded<{
|
|
108
|
-
readonly id: S.SchemaClass<string, string, never> & {
|
|
109
|
-
random(): ObjectId;
|
|
110
|
-
};
|
|
43
|
+
declare const TableType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
|
|
44
|
+
readonly id: import("@dxos/echo-schema").ObjectIdClass;
|
|
111
45
|
readonly name: S.optional<typeof S.String>;
|
|
112
|
-
readonly view: S.optional<
|
|
113
|
-
name: string
|
|
114
|
-
schema
|
|
115
|
-
|
|
116
|
-
fields: {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
46
|
+
readonly view: S.optional<import("@dxos/echo-schema").Ref$<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
|
|
47
|
+
name: S.SchemaClass<string, string, never>;
|
|
48
|
+
query: S.Schema<import("@dxos/echo-schema").QueryType, import("@dxos/echo-schema").QueryType, never>;
|
|
49
|
+
schema: S.optional<S.Schema<import("@dxos/echo-schema").JsonSchemaType, import("@dxos/echo-schema").JsonSchemaType, never>>;
|
|
50
|
+
fields: S.mutable<S.Array$<S.mutable<S.Struct<{
|
|
51
|
+
id: typeof S.String;
|
|
52
|
+
path: S.Schema<import("@dxos/echo-schema").JsonPath, import("@dxos/echo-schema").JsonPath, never>;
|
|
53
|
+
visible: S.optional<typeof S.Boolean>;
|
|
54
|
+
size: S.optional<typeof S.Number>;
|
|
55
|
+
referencePath: S.optional<S.Schema<import("@dxos/echo-schema").JsonPath, import("@dxos/echo-schema").JsonPath, never>>;
|
|
56
|
+
}>>>>;
|
|
57
|
+
}, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>>>;
|
|
58
|
+
readonly threads: S.optional<S.Array$<import("@dxos/echo-schema").Ref$<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
|
|
59
|
+
name: S.optional<typeof S.String>;
|
|
60
|
+
anchor: S.optional<typeof S.String>;
|
|
61
|
+
status: S.optional<S.Union<[S.Literal<["staged"]>, S.Literal<["active"]>, S.Literal<["resolved"]>]>>;
|
|
62
|
+
messages: S.mutable<S.Array$<import("@dxos/echo-schema").Ref$<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
|
|
63
|
+
timestamp: typeof S.String;
|
|
64
|
+
state: S.optional<S.Enums<typeof import("@dxos/plugin-space").MessageState>>;
|
|
65
|
+
sender: S.mutable<S.Struct<{
|
|
66
|
+
contact: S.optional<import("@dxos/echo-schema").Ref$<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
|
|
67
|
+
name: S.optional<typeof S.String>;
|
|
68
|
+
identifiers: S.mutable<S.Array$<S.Struct<{
|
|
69
|
+
type: typeof S.String;
|
|
70
|
+
value: typeof S.String;
|
|
71
|
+
}>>>;
|
|
72
|
+
}, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>>>;
|
|
73
|
+
identityKey: S.optional<typeof S.String>;
|
|
74
|
+
email: S.optional<typeof S.String>;
|
|
75
|
+
name: S.optional<typeof S.String>;
|
|
76
|
+
}>>;
|
|
77
|
+
text: typeof S.String;
|
|
78
|
+
parts: S.optional<S.mutable<S.Array$<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").Expando>>>>;
|
|
79
|
+
properties: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
|
|
80
|
+
context: S.optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").Expando>>;
|
|
81
|
+
}, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>>>>;
|
|
82
|
+
}, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>>>>;
|
|
83
|
+
}, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>, S.Struct.Encoded<{
|
|
84
|
+
readonly id: import("@dxos/echo-schema").ObjectIdClass;
|
|
85
|
+
readonly name: S.optional<typeof S.String>;
|
|
86
|
+
readonly view: S.optional<import("@dxos/echo-schema").Ref$<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
|
|
87
|
+
name: S.SchemaClass<string, string, never>;
|
|
88
|
+
query: S.Schema<import("@dxos/echo-schema").QueryType, import("@dxos/echo-schema").QueryType, never>;
|
|
89
|
+
schema: S.optional<S.Schema<import("@dxos/echo-schema").JsonSchemaType, import("@dxos/echo-schema").JsonSchemaType, never>>;
|
|
90
|
+
fields: S.mutable<S.Array$<S.mutable<S.Struct<{
|
|
91
|
+
id: typeof S.String;
|
|
92
|
+
path: S.Schema<import("@dxos/echo-schema").JsonPath, import("@dxos/echo-schema").JsonPath, never>;
|
|
93
|
+
visible: S.optional<typeof S.Boolean>;
|
|
94
|
+
size: S.optional<typeof S.Number>;
|
|
95
|
+
referencePath: S.optional<S.Schema<import("@dxos/echo-schema").JsonPath, import("@dxos/echo-schema").JsonPath, never>>;
|
|
96
|
+
}>>>>;
|
|
97
|
+
}, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>>>;
|
|
98
|
+
readonly threads: S.optional<S.Array$<import("@dxos/echo-schema").Ref$<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
|
|
99
|
+
name: S.optional<typeof S.String>;
|
|
100
|
+
anchor: S.optional<typeof S.String>;
|
|
101
|
+
status: S.optional<S.Union<[S.Literal<["staged"]>, S.Literal<["active"]>, S.Literal<["resolved"]>]>>;
|
|
102
|
+
messages: S.mutable<S.Array$<import("@dxos/echo-schema").Ref$<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
|
|
103
|
+
timestamp: typeof S.String;
|
|
104
|
+
state: S.optional<S.Enums<typeof import("@dxos/plugin-space").MessageState>>;
|
|
105
|
+
sender: S.mutable<S.Struct<{
|
|
106
|
+
contact: S.optional<import("@dxos/echo-schema").Ref$<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
|
|
107
|
+
name: S.optional<typeof S.String>;
|
|
108
|
+
identifiers: S.mutable<S.Array$<S.Struct<{
|
|
109
|
+
type: typeof S.String;
|
|
110
|
+
value: typeof S.String;
|
|
111
|
+
}>>>;
|
|
112
|
+
}, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>>>;
|
|
113
|
+
identityKey: S.optional<typeof S.String>;
|
|
114
|
+
email: S.optional<typeof S.String>;
|
|
115
|
+
name: S.optional<typeof S.String>;
|
|
116
|
+
}>>;
|
|
117
|
+
text: typeof S.String;
|
|
118
|
+
parts: S.optional<S.mutable<S.Array$<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").Expando>>>>;
|
|
119
|
+
properties: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
|
|
120
|
+
context: S.optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").Expando>>;
|
|
121
|
+
}, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>>>>;
|
|
122
|
+
}, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>>>>;
|
|
159
123
|
}>>;
|
|
160
124
|
export declare class TableType extends TableType_base {
|
|
161
125
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../../src/types/table.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../../src/types/table.ts"],"names":[],"mappings":"AAIA,OAAO,EAAiB,CAAC,EAAe,MAAM,mBAAmB,CAAC;AAIlE,eAAO,MAAM,WAAW;;;;cAcyB,EAAG,WAAW;eAAoP,EAAG,MAAM;gBAAmI,EAAG,QAAQ,CAAC,EAAE,MAAM;gBAAgJ,EAAG,OAAO,CAAC,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM;uBAAqB,EAAG,MAAM;kBAAe,EAAG,MAAM;qBAA6C,EAAG,QAAQ,QAAO,EAAG,OAAO;kBAAgB,EAAG,QAAQ,QAAO,EAAG,MAAM;2BAAyB,EAAG,QAAQ,CAAC,EAAE,MAAM;;;;cAA0vG,EAAG,QAAQ,QAAO,EAAG,MAAM;gBAAqD,EAAG,QAAQ,QAAO,EAAG,MAAM;gBAAc,EAAG,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,cAAa,EAAG,OAAO,cAAa,EAAG,OAAO;kBAAgC,EAAG,OAAO,CAAC,EAAE,MAAM,QAAQ,mBAAmB,cAAc,6DAA6D;8BAAyG,EAAG,MAAM;mBAA8C,EAAG,QAAQ,CAAC,EAAE,KAAK;oBAAsF,EAAG,OAAO,CAAC,EAAE,MAAM;yBAAuB,EAAG,QAAQ,QAAQ,mBAAmB,cAAc,6DAA6D;0BAA2C,EAAG,QAAQ,QAAO,EAAG,MAAM;iCAA+B,EAAG,OAAO,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM;qCAAmC,EAAG,MAAM;sCAAmC,EAAG,MAAM;;0BAA8C,6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AM;;0BAA8C,6DAA6D;6BAAiD,EAAG,QAAQ,QAAO,EAAG,MAAM;uBAAqB,EAAG,QAAQ,QAAO,EAAG,MAAM;sBAAoB,EAAG,QAAQ,QAAO,EAAG,MAAM;;yBAAgF,EAAG,MAAM;mBAA+F,EAAG,QAAQ,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,QAAQ,mBAAmB;wBAAsI,EAAG,QAAQ,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,QAAO,EAAG,MAAM,SAAQ,EAAG,GAAG;qBAAyF,EAAG,QAAQ,QAAQ,mBAAmB;kBAAgC,6DAA6D;;;AAJ39L,qBAAa,SAAU,SAAQ,cAGT;CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/util/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/util/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
|
|
@@ -1,32 +1,62 @@
|
|
|
1
|
+
export type TableButton = 'columnSettings' | 'rowMenu' | 'newColumn' | 'referencedCell';
|
|
2
|
+
export declare const BUTTON_IDENTIFIERS: {
|
|
3
|
+
[K in TableButton]: string;
|
|
4
|
+
};
|
|
5
|
+
type ButtonData = {
|
|
6
|
+
type: 'columnSettings';
|
|
7
|
+
fieldId: string;
|
|
8
|
+
} | {
|
|
9
|
+
type: 'newColumn';
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
} | {
|
|
12
|
+
type: 'referencedCell';
|
|
13
|
+
schemaId: string;
|
|
14
|
+
targetId: string;
|
|
15
|
+
} | {
|
|
16
|
+
type: 'rowMenu';
|
|
17
|
+
rowIndex: number;
|
|
18
|
+
};
|
|
1
19
|
export declare const tableButtons: {
|
|
2
|
-
readonly
|
|
20
|
+
readonly addColumn: {
|
|
3
21
|
readonly attr: string;
|
|
4
|
-
readonly icon:
|
|
5
|
-
readonly render: ({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
22
|
+
readonly icon: "ph--plus--regular";
|
|
23
|
+
readonly render: ({ disabled }: Omit<Extract<ButtonData, {
|
|
24
|
+
type: "newColumn";
|
|
25
|
+
}>, "type">) => string;
|
|
26
|
+
readonly getData: (_el: HTMLElement) => Extract<ButtonData, {
|
|
27
|
+
type: "newColumn";
|
|
28
|
+
}>;
|
|
9
29
|
};
|
|
10
30
|
readonly columnSettings: {
|
|
11
31
|
readonly attr: string;
|
|
12
|
-
readonly icon:
|
|
13
|
-
readonly render: ({ fieldId }: {
|
|
14
|
-
|
|
15
|
-
}) => string;
|
|
32
|
+
readonly icon: "ph--caret-down--regular";
|
|
33
|
+
readonly render: ({ fieldId }: Omit<Extract<ButtonData, {
|
|
34
|
+
type: "columnSettings";
|
|
35
|
+
}>, "type">) => string;
|
|
36
|
+
readonly getData: (el: HTMLElement) => Extract<ButtonData, {
|
|
37
|
+
type: "columnSettings";
|
|
38
|
+
}>;
|
|
16
39
|
};
|
|
17
|
-
readonly
|
|
40
|
+
readonly referencedCell: {
|
|
18
41
|
readonly attr: string;
|
|
19
|
-
readonly icon:
|
|
20
|
-
readonly render: ({
|
|
21
|
-
|
|
22
|
-
}) => string;
|
|
42
|
+
readonly icon: "ph--link-simple-horizontal--regular";
|
|
43
|
+
readonly render: ({ targetId, schemaId }: Omit<Extract<ButtonData, {
|
|
44
|
+
type: "referencedCell";
|
|
45
|
+
}>, "type">) => string;
|
|
46
|
+
readonly getData: (el: HTMLElement) => Extract<ButtonData, {
|
|
47
|
+
type: "referencedCell";
|
|
48
|
+
}>;
|
|
23
49
|
};
|
|
24
|
-
readonly
|
|
50
|
+
readonly rowMenu: {
|
|
25
51
|
readonly attr: string;
|
|
26
|
-
readonly icon:
|
|
27
|
-
readonly render: ({
|
|
28
|
-
|
|
29
|
-
}) => string;
|
|
52
|
+
readonly icon: "ph--dots-three--regular";
|
|
53
|
+
readonly render: ({ rowIndex }: Omit<Extract<ButtonData, {
|
|
54
|
+
type: "rowMenu";
|
|
55
|
+
}>, "type">) => string;
|
|
56
|
+
readonly getData: (el: HTMLElement) => Extract<ButtonData, {
|
|
57
|
+
type: "rowMenu";
|
|
58
|
+
}>;
|
|
30
59
|
};
|
|
31
60
|
};
|
|
61
|
+
export {};
|
|
32
62
|
//# sourceMappingURL=table-buttons.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-buttons.d.ts","sourceRoot":"","sources":["../../../../src/util/table-buttons.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"table-buttons.d.ts","sourceRoot":"","sources":["../../../../src/util/table-buttons.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,WAAW,GAAG,gBAAgB,GAAG,SAAS,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAExF,eAAO,MAAM,kBAAkB,EAAE;KAAG,CAAC,IAAI,WAAW,GAAG,MAAM;CAKnD,CAAC;AAEX,KAAK,UAAU,GACX;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC3C;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,GACzC;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAC9D;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAgG1C,eAAO,MAAM,YAAY;;;;wCAvEA,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YAAE,IAAI,EAAE,WAAW,CAAA;SAAE,CAAC,EAAE,MAAM,CAAC;gCAShE,WAAW,KAAG,OAAO,CAAC,UAAU,EAAE;YAAE,IAAI,EAAE,WAAW,CAAA;SAAE,CAAC;;;;;uCAMjD,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YAAE,IAAI,EAAE,gBAAgB,CAAA;SAAE,CAAC,EAAE,MAAM,CAAC;+BAUrE,WAAW,KAAG,OAAO,CAAC,UAAU,EAAE;YAAE,IAAI,EAAE,gBAAgB,CAAA;SAAE,CAAC;;;;;kDAS1C,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YAAE,IAAI,EAAE,gBAAgB,CAAA;SAAE,CAAC,EAAE,MAAM,CAAC;+BAWhF,WAAW,KAAG,OAAO,CAAC,UAAU,EAAE;YAAE,IAAI,EAAE,gBAAgB,CAAA;SAAE,CAAC;;;;;wCAUpD,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YAAE,IAAI,EAAE,SAAS,CAAA;SAAE,CAAC,EAAE,MAAM,CAAC;+BAU/D,WAAW,KAAG,OAAO,CAAC,UAAU,EAAE;YAAE,IAAI,EAAE,SAAS,CAAA;SAAE,CAAC;;CAW5D,CAAC"}
|
|
@@ -1,21 +1,44 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
export type RenderCheckboxProps = {
|
|
1
|
+
export type TableControl = 'checkbox' | 'switch';
|
|
2
|
+
export type ControlData = {
|
|
3
|
+
type: 'checkbox';
|
|
6
4
|
rowIndex: number;
|
|
7
5
|
header?: boolean;
|
|
6
|
+
} | {
|
|
7
|
+
type: 'switch';
|
|
8
|
+
colIndex: number;
|
|
9
|
+
rowIndex: number;
|
|
10
|
+
};
|
|
11
|
+
type CommonRenderProps = {
|
|
8
12
|
checked?: boolean;
|
|
9
13
|
disabled?: boolean;
|
|
10
14
|
};
|
|
15
|
+
export type RenderCheckboxProps = CommonRenderProps & Omit<Extract<ControlData, {
|
|
16
|
+
type: 'checkbox';
|
|
17
|
+
}>, 'type'>;
|
|
18
|
+
export type RenderSwitchProps = CommonRenderProps & Omit<Extract<ControlData, {
|
|
19
|
+
type: 'switch';
|
|
20
|
+
}>, 'type'>;
|
|
21
|
+
export declare const CONTROL_IDENTIFIERS: {
|
|
22
|
+
readonly checkbox: "data-table-checkbox";
|
|
23
|
+
readonly switch: "data-table-switch";
|
|
24
|
+
};
|
|
11
25
|
export declare const renderCheckbox: ({ rowIndex, header, checked, disabled, }: RenderCheckboxProps) => string;
|
|
26
|
+
export declare const renderSwitch: ({ colIndex, rowIndex, checked, disabled }: RenderSwitchProps) => string;
|
|
12
27
|
export declare const tableControls: {
|
|
13
28
|
readonly checkbox: {
|
|
14
|
-
readonly
|
|
15
|
-
readonly checkbox: "data-table-checkbox";
|
|
16
|
-
readonly header: "data-table-header";
|
|
17
|
-
};
|
|
29
|
+
readonly attr: "data-table-checkbox";
|
|
18
30
|
readonly render: ({ rowIndex, header, checked, disabled, }: RenderCheckboxProps) => string;
|
|
31
|
+
readonly getData: (el: HTMLElement) => Extract<ControlData, {
|
|
32
|
+
type: "checkbox";
|
|
33
|
+
}>;
|
|
34
|
+
};
|
|
35
|
+
readonly switch: {
|
|
36
|
+
readonly attr: "data-table-switch";
|
|
37
|
+
readonly render: ({ colIndex, rowIndex, checked, disabled }: RenderSwitchProps) => string;
|
|
38
|
+
readonly getData: (el: HTMLElement) => Extract<ControlData, {
|
|
39
|
+
type: "switch";
|
|
40
|
+
}>;
|
|
19
41
|
};
|
|
20
42
|
};
|
|
43
|
+
export {};
|
|
21
44
|
//# sourceMappingURL=table-controls.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-controls.d.ts","sourceRoot":"","sources":["../../../../src/util/table-controls.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"table-controls.d.ts","sourceRoot":"","sources":["../../../../src/util/table-controls.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,QAAQ,CAAC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
3
3
|
import { type TableType } from '../types';
|
|
4
4
|
type InitialiseTableProps = {
|
|
@@ -6,6 +6,6 @@ type InitialiseTableProps = {
|
|
|
6
6
|
table: TableType;
|
|
7
7
|
initialRow?: boolean;
|
|
8
8
|
};
|
|
9
|
-
export declare const initializeTable: ({ space, table, initialRow }: InitialiseTableProps) =>
|
|
9
|
+
export declare const initializeTable: ({ space, table, initialRow, }: InitialiseTableProps) => Promise<EchoSchema>;
|
|
10
10
|
export {};
|
|
11
11
|
//# sourceMappingURL=table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../../src/util/table.ts"],"names":[],"mappings":"AAIA,OAAO,EAML,KAAK,
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../../src/util/table.ts"],"names":[],"mappings":"AAIA,OAAO,EAML,KAAK,UAAU,EAIhB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAmB,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAGtE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAIF,eAAO,MAAM,eAAe,kCAIzB,oBAAoB,KAAG,OAAO,CAAC,UAAU,CA0D3C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"5.7.2"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/react-ui-table",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.5-main.937ce75",
|
|
4
4
|
"description": "A table component.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -53,26 +53,26 @@
|
|
|
53
53
|
"@tanstack/react-virtual": "^3.9.0",
|
|
54
54
|
"date-fns": "^3.3.1",
|
|
55
55
|
"lodash.orderby": "^4.6.0",
|
|
56
|
-
"@dxos/context": "0.7.
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/react-ui-
|
|
68
|
-
"@dxos/react-ui-
|
|
69
|
-
"@dxos/react-ui-
|
|
70
|
-
"@dxos/react-
|
|
71
|
-
"@dxos/react-ui-
|
|
72
|
-
"@dxos/react-ui-
|
|
73
|
-
"@dxos/react-ui-types": "0.7.
|
|
74
|
-
"@dxos/schema": "0.7.
|
|
75
|
-
"@dxos/util": "0.7.
|
|
56
|
+
"@dxos/context": "0.7.5-main.937ce75",
|
|
57
|
+
"@dxos/echo-schema": "0.7.5-main.937ce75",
|
|
58
|
+
"@dxos/debug": "0.7.5-main.937ce75",
|
|
59
|
+
"@dxos/keys": "0.7.5-main.937ce75",
|
|
60
|
+
"@dxos/invariant": "0.7.5-main.937ce75",
|
|
61
|
+
"@dxos/lit-grid": "0.7.5-main.937ce75",
|
|
62
|
+
"@dxos/live-object": "0.7.5-main.937ce75",
|
|
63
|
+
"@dxos/log": "0.7.5-main.937ce75",
|
|
64
|
+
"@dxos/plugin-search": "0.7.5-main.937ce75",
|
|
65
|
+
"@dxos/plugin-space": "0.7.5-main.937ce75",
|
|
66
|
+
"@dxos/react-ui-attention": "0.7.5-main.937ce75",
|
|
67
|
+
"@dxos/react-ui-form": "0.7.5-main.937ce75",
|
|
68
|
+
"@dxos/react-ui-grid": "0.7.5-main.937ce75",
|
|
69
|
+
"@dxos/react-ui-searchlist": "0.7.5-main.937ce75",
|
|
70
|
+
"@dxos/react-client": "0.7.5-main.937ce75",
|
|
71
|
+
"@dxos/react-ui-stack": "0.7.5-main.937ce75",
|
|
72
|
+
"@dxos/react-ui-syntax-highlighter": "0.7.5-main.937ce75",
|
|
73
|
+
"@dxos/react-ui-types": "0.7.5-main.937ce75",
|
|
74
|
+
"@dxos/schema": "0.7.5-main.937ce75",
|
|
75
|
+
"@dxos/util": "0.7.5-main.937ce75"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -83,19 +83,19 @@
|
|
|
83
83
|
"react": "~18.2.0",
|
|
84
84
|
"react-dom": "~18.2.0",
|
|
85
85
|
"vite": "5.4.7",
|
|
86
|
-
"@dxos/echo-signals": "0.7.
|
|
87
|
-
"@dxos/
|
|
88
|
-
"@dxos/
|
|
89
|
-
"@dxos/react-ui-theme": "0.7.
|
|
90
|
-
"@dxos/
|
|
91
|
-
"@dxos/
|
|
86
|
+
"@dxos/echo-signals": "0.7.5-main.937ce75",
|
|
87
|
+
"@dxos/react-ui": "0.7.5-main.937ce75",
|
|
88
|
+
"@dxos/random": "0.7.5-main.937ce75",
|
|
89
|
+
"@dxos/react-ui-theme": "0.7.5-main.937ce75",
|
|
90
|
+
"@dxos/storybook-utils": "0.7.5-main.937ce75",
|
|
91
|
+
"@dxos/test-utils": "0.7.5-main.937ce75"
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
94
|
"@phosphor-icons/react": "^2.1.5",
|
|
95
95
|
"react": "~18.2.0",
|
|
96
96
|
"react-dom": "~18.2.0",
|
|
97
|
-
"@dxos/react-ui": "0.7.
|
|
98
|
-
"@dxos/react-ui-theme": "0.7.
|
|
97
|
+
"@dxos/react-ui": "0.7.5-main.937ce75",
|
|
98
|
+
"@dxos/react-ui-theme": "0.7.5-main.937ce75"
|
|
99
99
|
},
|
|
100
100
|
"publishConfig": {
|
|
101
101
|
"access": "public"
|
|
@@ -6,15 +6,15 @@ import React from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { DropdownMenu, useTranslation } from '@dxos/react-ui';
|
|
8
8
|
|
|
9
|
-
import { type TableModel } from '../../model';
|
|
9
|
+
import { type TableModel, type ModalController } from '../../model';
|
|
10
10
|
import { translationKey } from '../../translations';
|
|
11
11
|
|
|
12
|
-
type ColumnActionsMenuProps = { model
|
|
12
|
+
type ColumnActionsMenuProps = { model: TableModel; modals: ModalController };
|
|
13
13
|
|
|
14
|
-
export const ColumnActionsMenu = ({ model }: ColumnActionsMenuProps) => {
|
|
14
|
+
export const ColumnActionsMenu = ({ model, modals }: ColumnActionsMenuProps) => {
|
|
15
15
|
const { t } = useTranslation(translationKey);
|
|
16
|
-
const state =
|
|
17
|
-
if (
|
|
16
|
+
const state = modals.state.value;
|
|
17
|
+
if (state?.type !== 'column') {
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -22,8 +22,8 @@ export const ColumnActionsMenu = ({ model }: ColumnActionsMenuProps) => {
|
|
|
22
22
|
const isCurrentColumnSorted = currentSort?.fieldId === state.fieldId;
|
|
23
23
|
|
|
24
24
|
return (
|
|
25
|
-
<DropdownMenu.Root modal={false} open={
|
|
26
|
-
<DropdownMenu.VirtualTrigger virtualRef={
|
|
25
|
+
<DropdownMenu.Root modal={false} open={true} onOpenChange={modals.close}>
|
|
26
|
+
<DropdownMenu.VirtualTrigger virtualRef={modals.trigger} />
|
|
27
27
|
<DropdownMenu.Portal>
|
|
28
28
|
<DropdownMenu.Content>
|
|
29
29
|
<DropdownMenu.Viewport>
|
|
@@ -53,7 +53,7 @@ export const ColumnActionsMenu = ({ model }: ColumnActionsMenuProps) => {
|
|
|
53
53
|
{t('column action delete')}
|
|
54
54
|
</DropdownMenu.Item>
|
|
55
55
|
)}
|
|
56
|
-
<DropdownMenu.Item data-testid='column-settings' onClick={() =>
|
|
56
|
+
<DropdownMenu.Item data-testid='column-settings' onClick={() => modals.openColumnSettings()}>
|
|
57
57
|
{t('column action settings')}
|
|
58
58
|
</DropdownMenu.Item>
|
|
59
59
|
</DropdownMenu.Viewport>
|