@dmsi/wedgekit-react 3.1.0 → 3.1.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGridCell.d.ts","sourceRoot":"","sources":["../../src/components/DataGridCell.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,IAAI,EAGJ,MAAM,EACN,OAAO,EACR,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,cAAc,EAEd,iBAAiB,EACjB,SAAS,EAOV,MAAM,OAAO,CAAC;AAOf,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAExC,KAAK,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAExB,KAAK,iBAAiB,GAAG,iBAAiB,CAAC;IACzC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;IACxC,SAAS,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC3E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC,CAAC;AAMH,eAAO,MAAM,qBA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|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as r, jsxs as N, Fragment as
|
|
2
|
+
import { jsx as r, jsxs as N, Fragment as te } from "react/jsx-runtime";
|
|
3
3
|
import { useSortable as J } from "../node_modules/@dnd-kit/sortable/dist/sortable.esm.js";
|
|
4
4
|
import { CSS as Q } from "../node_modules/@dnd-kit/utilities/dist/utilities.esm.js";
|
|
5
|
-
import { clsx as
|
|
6
|
-
import { createContext as
|
|
7
|
-
import { componentPadding as
|
|
5
|
+
import { clsx as C } from "../node_modules/clsx/dist/clsx.js";
|
|
6
|
+
import { createContext as oe, memo as re, useRef as B, useState as A, useContext as X, useEffect as _ } from "react";
|
|
7
|
+
import { componentPadding as ie, paddingUsingComponentGap as le } from "../classNames.js";
|
|
8
8
|
import { MenuOption as m } from "./MenuOption.js";
|
|
9
9
|
import { Menu as V } from "./Menu.js";
|
|
10
10
|
import { Icon as j } from "./Icon.js";
|
|
11
|
-
import { Search as
|
|
12
|
-
import { useSubMenuSystem as
|
|
13
|
-
const
|
|
11
|
+
import { Search as se } from "./Search.js";
|
|
12
|
+
import { useSubMenuSystem as ce } from "../hooks/useMenuSystem.js";
|
|
13
|
+
const Y = oe(null), K = re(
|
|
14
14
|
({
|
|
15
15
|
id: e,
|
|
16
|
-
type:
|
|
16
|
+
type: u = "default",
|
|
17
17
|
component: o = "static",
|
|
18
|
-
children:
|
|
18
|
+
children: d,
|
|
19
19
|
className: t,
|
|
20
20
|
locked: n = !1,
|
|
21
21
|
noPadding: f = !1,
|
|
22
|
-
paddedLeft:
|
|
23
|
-
style:
|
|
22
|
+
paddedLeft: h = !1,
|
|
23
|
+
style: w,
|
|
24
24
|
onClick: g,
|
|
25
|
-
onRightClick:
|
|
25
|
+
onRightClick: x,
|
|
26
26
|
error: p,
|
|
27
27
|
warning: F,
|
|
28
28
|
pending: G,
|
|
29
29
|
center: I,
|
|
30
|
-
width:
|
|
31
|
-
minWidth:
|
|
30
|
+
width: b,
|
|
31
|
+
minWidth: S,
|
|
32
32
|
disabled: T,
|
|
33
33
|
isLast: H,
|
|
34
34
|
testid: O,
|
|
35
35
|
...L
|
|
36
36
|
}) => {
|
|
37
|
-
const E =
|
|
37
|
+
const E = u === "header" ? "th" : "td", a = B(null), [R, y] = A(!1), [W, $] = A(!1), z = X(Y), D = b ?? (z != null ? `${z}px` : void 0), U = S ?? (b == null ? D : void 0);
|
|
38
38
|
_(() => () => {
|
|
39
|
-
|
|
39
|
+
a.current && (clearTimeout(a.current), a.current = null);
|
|
40
40
|
}, []);
|
|
41
|
-
const
|
|
42
|
-
|
|
41
|
+
const P = (M) => {
|
|
42
|
+
$(!0), a.current = window.setTimeout(() => {
|
|
43
43
|
y(!0);
|
|
44
44
|
}, 500);
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
const q =
|
|
48
|
-
!R && g && !q && W && g(
|
|
45
|
+
}, k = (M) => {
|
|
46
|
+
a.current && (clearTimeout(a.current), a.current = null);
|
|
47
|
+
const q = M.nativeEvent instanceof MouseEvent && M.nativeEvent.button === 2;
|
|
48
|
+
!R && g && !q && W && g(M), q && x && x(), y(!1), $(!1);
|
|
49
49
|
}, l = () => {
|
|
50
|
-
|
|
51
|
-
},
|
|
50
|
+
a.current && (clearTimeout(a.current), a.current = null);
|
|
51
|
+
}, c = u === "header" && !n && !["button"].includes(o) && "bg-brand-400 border-brand-200", s = n && !["button"].includes(o) && "bg-neutral-400 border-neutral-300", i = u === "header" && o !== "button" && o !== "icon" && !H && C("border-r"), v = o === "button" && C("border-r border-b border-border-primary-normal"), ee = o === "icon" && C("border-l"), ne = C(
|
|
52
52
|
i,
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
v,
|
|
54
|
+
c,
|
|
55
55
|
s,
|
|
56
|
-
|
|
56
|
+
ee,
|
|
57
57
|
t,
|
|
58
58
|
"flex flex-1 items-center gap-1 whitespace-nowrap h-10 relative text-text-primary-normal",
|
|
59
59
|
"focus-within:!z-10",
|
|
@@ -64,8 +64,8 @@ const ae = ne(null), K = te(
|
|
|
64
64
|
o === "input" && !p && !F && G && "[&:not(:focus-within)]:border-background-warning-normal",
|
|
65
65
|
o === "input" && p && "border-border-primary-error",
|
|
66
66
|
o === "input" && F && "border-background-warning-normal",
|
|
67
|
-
!["button", "icon"].includes(o) && !f &&
|
|
68
|
-
|
|
67
|
+
!["button", "icon"].includes(o) && !f && ie,
|
|
68
|
+
h && "pl-2",
|
|
69
69
|
o === "icon" && "border-l",
|
|
70
70
|
R && "!cursor-grabbing",
|
|
71
71
|
o === "checkbox" || I && "justify-center",
|
|
@@ -76,25 +76,25 @@ const ae = ne(null), K = te(
|
|
|
76
76
|
{
|
|
77
77
|
id: e,
|
|
78
78
|
"data-testid": O,
|
|
79
|
-
className:
|
|
80
|
-
style: { width:
|
|
79
|
+
className: C("flex h-10", !D && "flex-1"),
|
|
80
|
+
style: { width: D, minWidth: U },
|
|
81
81
|
...L,
|
|
82
|
-
"data-theme":
|
|
82
|
+
"data-theme": u === "header" && !n ? "brand" : void 0,
|
|
83
83
|
children: /* @__PURE__ */ r(
|
|
84
84
|
"div",
|
|
85
85
|
{
|
|
86
|
-
className:
|
|
86
|
+
className: ne,
|
|
87
87
|
style: {
|
|
88
|
-
...
|
|
88
|
+
...w
|
|
89
89
|
},
|
|
90
|
-
onMouseDown:
|
|
91
|
-
onMouseUp:
|
|
90
|
+
onMouseDown: P,
|
|
91
|
+
onMouseUp: k,
|
|
92
92
|
onMouseLeave: l,
|
|
93
|
-
onTouchStart:
|
|
94
|
-
onTouchEnd:
|
|
93
|
+
onTouchStart: P,
|
|
94
|
+
onTouchEnd: k,
|
|
95
95
|
onTouchCancel: l,
|
|
96
|
-
onContextMenu: (
|
|
97
|
-
children:
|
|
96
|
+
onContextMenu: (M) => M.preventDefault(),
|
|
97
|
+
children: d
|
|
98
98
|
}
|
|
99
99
|
)
|
|
100
100
|
}
|
|
@@ -102,30 +102,30 @@ const ae = ne(null), K = te(
|
|
|
102
102
|
}
|
|
103
103
|
);
|
|
104
104
|
K.displayName = "DataGridCell";
|
|
105
|
-
function
|
|
105
|
+
function Z({
|
|
106
106
|
header: e,
|
|
107
|
-
children:
|
|
107
|
+
children: u,
|
|
108
108
|
setNodeRef: o,
|
|
109
|
-
node:
|
|
109
|
+
node: d,
|
|
110
110
|
id: t,
|
|
111
111
|
testid: n,
|
|
112
112
|
useMenuDefaultMinWidth: f,
|
|
113
|
-
allowUserGrouping:
|
|
114
|
-
...
|
|
113
|
+
allowUserGrouping: h,
|
|
114
|
+
...w
|
|
115
115
|
}) {
|
|
116
|
-
const [g,
|
|
116
|
+
const [g, x] = A(!1), [p, F] = A(
|
|
117
117
|
e.column.getFilterValue() ?? ""
|
|
118
|
-
), G = B(null), I = B(!1), { column:
|
|
118
|
+
), G = B(null), I = B(!1), { column: b, getContext: S } = e, { id: T, setFilterValue: H } = b, {
|
|
119
119
|
menuRootRef: O,
|
|
120
120
|
isMenuActive: L,
|
|
121
121
|
registerSubMenu: E,
|
|
122
|
-
listeners:
|
|
122
|
+
listeners: a,
|
|
123
123
|
mobileHide: R
|
|
124
|
-
} =
|
|
124
|
+
} = ce(d || G);
|
|
125
125
|
_(() => {
|
|
126
|
-
const l =
|
|
127
|
-
I.current = [...
|
|
128
|
-
}, [T,
|
|
126
|
+
const l = S().table.options.initialState?.columnPinning, c = l?.left ?? [], s = l?.right ?? [];
|
|
127
|
+
I.current = [...c, ...s].includes(T);
|
|
128
|
+
}, [T, S]), _(() => {
|
|
129
129
|
const l = setTimeout(() => {
|
|
130
130
|
H(p);
|
|
131
131
|
}, 500);
|
|
@@ -133,13 +133,13 @@ function X({
|
|
|
133
133
|
clearTimeout(l);
|
|
134
134
|
};
|
|
135
135
|
}, [p, H]);
|
|
136
|
-
const y = !!
|
|
137
|
-
|
|
138
|
-
const s =
|
|
139
|
-
if (s === -1 || i < 0 || i >=
|
|
140
|
-
return
|
|
141
|
-
const
|
|
142
|
-
return [
|
|
136
|
+
const y = !!h && b.getCanGroup(), W = b.getIsGrouped(), $ = b.getGroupedIndex(), z = S().table.getState().grouping.length, D = (l) => {
|
|
137
|
+
S().table.setGrouping((c) => {
|
|
138
|
+
const s = c.indexOf(T), i = s + l;
|
|
139
|
+
if (s === -1 || i < 0 || i >= c.length)
|
|
140
|
+
return c;
|
|
141
|
+
const v = [...c];
|
|
142
|
+
return [v[s], v[i]] = [v[i], v[s]], v;
|
|
143
143
|
});
|
|
144
144
|
}, U = {
|
|
145
145
|
position: "relative",
|
|
@@ -148,7 +148,7 @@ function X({
|
|
|
148
148
|
"--color-text-primary-normal": "var(--color-text-brand-primary-normal)",
|
|
149
149
|
"--color-icon-on-action-primary-normal": "var(--color-text-brand-primary-normal)",
|
|
150
150
|
"--background-action-secondary-normal": "var(--color-text-brand-primary-normal)",
|
|
151
|
-
...
|
|
151
|
+
...w.style
|
|
152
152
|
};
|
|
153
153
|
return /* @__PURE__ */ N(
|
|
154
154
|
K,
|
|
@@ -161,17 +161,17 @@ function X({
|
|
|
161
161
|
style: U,
|
|
162
162
|
minWidth: `${e.column.getSize()}px`,
|
|
163
163
|
onClick: e.column.getToggleSortingHandler(),
|
|
164
|
-
onRightClick: () =>
|
|
165
|
-
...
|
|
164
|
+
onRightClick: () => x(!g),
|
|
165
|
+
...w,
|
|
166
166
|
children: [
|
|
167
|
-
|
|
167
|
+
u,
|
|
168
168
|
W && /* @__PURE__ */ r(
|
|
169
169
|
j,
|
|
170
170
|
{
|
|
171
171
|
name: "workspaces",
|
|
172
172
|
size: 16,
|
|
173
173
|
className: "shrink-0",
|
|
174
|
-
title: `Grouped (level ${
|
|
174
|
+
title: `Grouped (level ${$ + 1})`,
|
|
175
175
|
"data-testid": n ? `${n}-grouped-indicator` : void 0
|
|
176
176
|
}
|
|
177
177
|
),
|
|
@@ -181,9 +181,9 @@ function X({
|
|
|
181
181
|
id: t ? `${t}-menu` : void 0,
|
|
182
182
|
testid: n ? `${n}-menu` : void 0,
|
|
183
183
|
ref: O,
|
|
184
|
-
positionTo:
|
|
184
|
+
positionTo: d || G,
|
|
185
185
|
show: g,
|
|
186
|
-
setShow:
|
|
186
|
+
setShow: x,
|
|
187
187
|
mobileHide: R,
|
|
188
188
|
useDefaultMinWidth: f,
|
|
189
189
|
children: [
|
|
@@ -192,21 +192,21 @@ function X({
|
|
|
192
192
|
{
|
|
193
193
|
id: t ? `${t}-filter-option` : void 0,
|
|
194
194
|
testid: n ? `${n}-filter-option` : void 0,
|
|
195
|
-
...
|
|
196
|
-
subMenu: ({ menuId: l, subMenuLevel:
|
|
195
|
+
...a,
|
|
196
|
+
subMenu: ({ menuId: l, subMenuLevel: c, ...s }) => /* @__PURE__ */ N(
|
|
197
197
|
V,
|
|
198
198
|
{
|
|
199
199
|
id: t ? `${t}-filter-submenu` : void 0,
|
|
200
200
|
testid: n ? `${n}-filter-submenu` : void 0,
|
|
201
201
|
...s,
|
|
202
|
-
show: L(l,
|
|
202
|
+
show: L(l, c),
|
|
203
203
|
ref: (i) => {
|
|
204
204
|
E(l, i);
|
|
205
205
|
},
|
|
206
206
|
useDefaultMinWidth: f,
|
|
207
207
|
children: [
|
|
208
|
-
/* @__PURE__ */ r("div", { className:
|
|
209
|
-
|
|
208
|
+
/* @__PURE__ */ r("div", { className: C(le), children: /* @__PURE__ */ r(
|
|
209
|
+
se,
|
|
210
210
|
{
|
|
211
211
|
id: t ? `${t}-filter-search` : void 0,
|
|
212
212
|
testid: n ? `${n}-filter-search` : void 0,
|
|
@@ -224,8 +224,8 @@ function X({
|
|
|
224
224
|
{
|
|
225
225
|
id: t ? `${t}-filter-contains` : void 0,
|
|
226
226
|
testid: n ? `${n}-filter-contains` : void 0,
|
|
227
|
-
onClick:
|
|
228
|
-
before:
|
|
227
|
+
onClick: k,
|
|
228
|
+
before: P("includesString"),
|
|
229
229
|
children: "Contains"
|
|
230
230
|
}
|
|
231
231
|
),
|
|
@@ -234,8 +234,8 @@ function X({
|
|
|
234
234
|
{
|
|
235
235
|
id: t ? `${t}-filter-startswith` : void 0,
|
|
236
236
|
testid: n ? `${n}-filter-startswith` : void 0,
|
|
237
|
-
onClick:
|
|
238
|
-
before:
|
|
237
|
+
onClick: k,
|
|
238
|
+
before: P("startsWith"),
|
|
239
239
|
children: "Starts with"
|
|
240
240
|
}
|
|
241
241
|
),
|
|
@@ -244,8 +244,8 @@ function X({
|
|
|
244
244
|
{
|
|
245
245
|
id: t ? `${t}-filter-endswith` : void 0,
|
|
246
246
|
testid: n ? `${n}-filter-endswith` : void 0,
|
|
247
|
-
onClick:
|
|
248
|
-
before:
|
|
247
|
+
onClick: k,
|
|
248
|
+
before: P("endsWith"),
|
|
249
249
|
children: "Ends with"
|
|
250
250
|
}
|
|
251
251
|
)
|
|
@@ -259,14 +259,14 @@ function X({
|
|
|
259
259
|
m,
|
|
260
260
|
{
|
|
261
261
|
onClick: () => {
|
|
262
|
-
|
|
262
|
+
x(!g);
|
|
263
263
|
},
|
|
264
|
-
...
|
|
265
|
-
subMenu: ({ menuId: l, subMenuLevel:
|
|
264
|
+
...a,
|
|
265
|
+
subMenu: ({ menuId: l, subMenuLevel: c, ...s }) => /* @__PURE__ */ N(
|
|
266
266
|
V,
|
|
267
267
|
{
|
|
268
268
|
...s,
|
|
269
|
-
show: L(l,
|
|
269
|
+
show: L(l, c),
|
|
270
270
|
ref: (i) => {
|
|
271
271
|
E(l, i);
|
|
272
272
|
},
|
|
@@ -308,14 +308,14 @@ function X({
|
|
|
308
308
|
children: W ? "Remove group" : `Group by [${e.column.columnDef.header}]`
|
|
309
309
|
}
|
|
310
310
|
),
|
|
311
|
-
y && W && z > 1 && /* @__PURE__ */ N(
|
|
311
|
+
y && W && z > 1 && /* @__PURE__ */ N(te, { children: [
|
|
312
312
|
/* @__PURE__ */ r(
|
|
313
313
|
m,
|
|
314
314
|
{
|
|
315
315
|
id: t ? `${t}-group-move-up` : void 0,
|
|
316
316
|
testid: n ? `${n}-group-move-up` : void 0,
|
|
317
|
-
disabled:
|
|
318
|
-
onClick: () =>
|
|
317
|
+
disabled: $ === 0,
|
|
318
|
+
onClick: () => D(-1),
|
|
319
319
|
children: "Move up"
|
|
320
320
|
}
|
|
321
321
|
),
|
|
@@ -324,8 +324,8 @@ function X({
|
|
|
324
324
|
{
|
|
325
325
|
id: t ? `${t}-group-move-down` : void 0,
|
|
326
326
|
testid: n ? `${n}-group-move-down` : void 0,
|
|
327
|
-
disabled:
|
|
328
|
-
onClick: () =>
|
|
327
|
+
disabled: $ === z - 1,
|
|
328
|
+
onClick: () => D(1),
|
|
329
329
|
children: "Move down"
|
|
330
330
|
}
|
|
331
331
|
)
|
|
@@ -336,35 +336,35 @@ function X({
|
|
|
336
336
|
]
|
|
337
337
|
}
|
|
338
338
|
);
|
|
339
|
-
function
|
|
339
|
+
function P(l) {
|
|
340
340
|
return /* @__PURE__ */ r(
|
|
341
341
|
j,
|
|
342
342
|
{
|
|
343
343
|
name: "check",
|
|
344
|
-
className:
|
|
344
|
+
className: C(
|
|
345
345
|
e.column.columnDef.filterFn !== l && "text-transparent"
|
|
346
346
|
)
|
|
347
347
|
}
|
|
348
348
|
);
|
|
349
349
|
}
|
|
350
|
-
function
|
|
350
|
+
function k(l, c) {
|
|
351
351
|
let s = "includesString";
|
|
352
352
|
const i = e.column.columnDef.filterFn;
|
|
353
|
-
|
|
353
|
+
c?.toLowerCase() === "starts with" && (s = i === "startsWith" ? "auto" : "startsWith"), c?.toLowerCase() === "ends with" && (s = i === "endsWith" ? "auto" : "endsWith"), c?.toLowerCase() === "contains" && (s = i === "includesString" ? "auto" : "includesString"), e.column.columnDef.filterFn = s, e.column.setFilterValue(p);
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
|
-
|
|
357
|
-
function
|
|
356
|
+
Z.displayName = "DataCellHeader";
|
|
357
|
+
function ae({
|
|
358
358
|
header: e,
|
|
359
|
-
children:
|
|
359
|
+
children: u,
|
|
360
360
|
...o
|
|
361
361
|
}) {
|
|
362
|
-
const { attributes:
|
|
362
|
+
const { attributes: d, isDragging: t, listeners: n, setNodeRef: f, transform: h, node: w } = J({
|
|
363
363
|
id: e.column.id
|
|
364
364
|
}), g = {
|
|
365
365
|
opacity: t ? 0.8 : 1,
|
|
366
366
|
position: "relative",
|
|
367
|
-
transform: Q.Translate.toString(
|
|
367
|
+
transform: Q.Translate.toString(h),
|
|
368
368
|
transition: "width transform 0.2s ease-in-out",
|
|
369
369
|
whiteSpace: "nowrap",
|
|
370
370
|
zIndex: t ? 1 : 0,
|
|
@@ -373,41 +373,55 @@ function ce({
|
|
|
373
373
|
userSelect: "none"
|
|
374
374
|
};
|
|
375
375
|
return /* @__PURE__ */ r(
|
|
376
|
-
|
|
376
|
+
Z,
|
|
377
377
|
{
|
|
378
378
|
header: e,
|
|
379
379
|
setNodeRef: f,
|
|
380
|
-
node:
|
|
380
|
+
node: w,
|
|
381
381
|
style: g,
|
|
382
382
|
...o,
|
|
383
|
-
...
|
|
383
|
+
...d,
|
|
384
384
|
...n,
|
|
385
|
-
children:
|
|
385
|
+
children: u
|
|
386
386
|
}
|
|
387
387
|
);
|
|
388
388
|
}
|
|
389
|
-
|
|
389
|
+
ae.displayName = "DraggableCellHeader";
|
|
390
390
|
function ue({
|
|
391
391
|
cell: e,
|
|
392
|
-
children:
|
|
392
|
+
children: u,
|
|
393
393
|
...o
|
|
394
394
|
}) {
|
|
395
|
-
const { isDragging:
|
|
395
|
+
const d = X(Y), { isDragging: t, setNodeRef: n, transform: f } = J({
|
|
396
396
|
id: e.column.id
|
|
397
|
-
}),
|
|
398
|
-
opacity:
|
|
397
|
+
}), h = {
|
|
398
|
+
opacity: t ? 0.8 : 1,
|
|
399
399
|
position: "relative",
|
|
400
|
-
transform: Q.Translate.toString(
|
|
400
|
+
transform: Q.Translate.toString(f),
|
|
401
401
|
transition: "width transform 0.2s ease-in-out",
|
|
402
|
-
zIndex:
|
|
402
|
+
zIndex: t ? 1 : 0
|
|
403
403
|
};
|
|
404
|
-
return
|
|
404
|
+
return (
|
|
405
|
+
// Inside a custom cell the grid provides the live column size and DataGridCell
|
|
406
|
+
// resolves it itself. A width computed here would be reused along with this
|
|
407
|
+
// element whenever a consumer memoizes its cell, and go stale on resize.
|
|
408
|
+
/* @__PURE__ */ r(
|
|
409
|
+
K,
|
|
410
|
+
{
|
|
411
|
+
style: h,
|
|
412
|
+
ref: n,
|
|
413
|
+
width: d == null ? `${e.column.getSize()}px` : void 0,
|
|
414
|
+
...o,
|
|
415
|
+
children: u
|
|
416
|
+
}
|
|
417
|
+
)
|
|
418
|
+
);
|
|
405
419
|
}
|
|
406
420
|
ue.displayName = "DragAlongCell";
|
|
407
421
|
export {
|
|
408
|
-
|
|
422
|
+
Z as DataCellHeader,
|
|
409
423
|
K as DataGridCell,
|
|
410
424
|
ue as DragAlongCell,
|
|
411
|
-
|
|
412
|
-
|
|
425
|
+
ae as DraggableCellHeader,
|
|
426
|
+
Y as GridColumnSizeContext
|
|
413
427
|
};
|