@dmsi/wedgekit-react 3.0.1 → 3.1.0
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/components/Breadcrumbs.js +29 -29
- package/dist/components/DataGrid/TableBody/TableBodyRow.d.ts.map +1 -1
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +29 -22
- package/dist/components/DataGrid/index.d.ts.map +1 -1
- package/dist/components/DataGrid/index.js +289 -285
- package/dist/components/DataGridCell.d.ts +1 -0
- package/dist/components/DataGridCell.d.ts.map +1 -1
- package/dist/components/DataGridCell.js +167 -166
- package/dist/index.js +213 -212
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -20,6 +20,7 @@ type DataGridCellProps = PropsWithChildren<{
|
|
|
20
20
|
disabled?: boolean;
|
|
21
21
|
isLast?: boolean;
|
|
22
22
|
}>;
|
|
23
|
+
export declare const GridColumnSizeContext: import('react').Context<number | null>;
|
|
23
24
|
export declare const DataGridCell: import('react').MemoExoticComponent<({ id, type, component, children, className, locked, noPadding, paddedLeft, style, onClick, onRightClick, error, warning, pending, center, width, minWidth, disabled, isLast, testid, ...props }: AsProps<Tags> & DataGridCellProps) => import("react/jsx-runtime").JSX.Element>;
|
|
24
25
|
export type DataGridCellHeaderProps<T> = {
|
|
25
26
|
header: Header<T, unknown>;
|
|
@@ -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,
|
|
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,qBAAqB,wCAAqC,CAAC;AAExE,eAAO,MAAM,YAAY,wOAuBpB,OAAO,CAAC,IAAI,CAAC,GAAG,iBAAiB,6CA4IrC,CAAC;AAIF,MAAM,MAAM,uBAAuB,CAAC,CAAC,IAAI;IACvC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD,IAAI,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACrC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,GAAG,iBAAiB,GACnB,cAAc,CAAC,IAAI,CAAC,CAAC;AAEvB,wBAAgB,cAAc,CAAC,CAAC,EAAE,EAChC,MAAM,EACN,QAAQ,EACR,UAAU,EACV,IAAI,EACJ,EAAE,EACF,MAAM,EACN,sBAAsB,EACtB,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,uBAAuB,CAAC,CAAC,CAAC,2CAsS5B;yBAhTe,cAAc;;;AAqT9B,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,EACjE,MAAM,EACN,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,uBAAuB,CAAC,CAAC,CAAC,2CA+B5B;yBAnCe,mBAAmB;;;AAuCnC,wBAAgB,aAAa,CAAC,CAAC,SAAS,OAAO,EAAE,MAAM,EAAE,EACvD,IAAI,EACJ,QAAQ,EACR,GAAG,KAAK,EACT,EAAE;IACD,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IAC1C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,GAAG,iBAAiB,2CAkBpB;yBAzBe,aAAa"}
|
|
@@ -1,251 +1,251 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as r, jsxs as
|
|
3
|
-
import { useSortable as
|
|
4
|
-
import { CSS as
|
|
2
|
+
import { jsx as r, jsxs as N, Fragment as ee } from "react/jsx-runtime";
|
|
3
|
+
import { useSortable as J } from "../node_modules/@dnd-kit/sortable/dist/sortable.esm.js";
|
|
4
|
+
import { CSS as Q } from "../node_modules/@dnd-kit/utilities/dist/utilities.esm.js";
|
|
5
5
|
import { clsx as v } from "../node_modules/clsx/dist/clsx.js";
|
|
6
|
-
import { memo as
|
|
7
|
-
import { componentPadding as
|
|
8
|
-
import { MenuOption as
|
|
9
|
-
import { Menu as
|
|
6
|
+
import { createContext as ne, memo as te, useRef as B, useState as A, useContext as oe, useEffect as _ } from "react";
|
|
7
|
+
import { componentPadding as re, paddingUsingComponentGap as ie } from "../classNames.js";
|
|
8
|
+
import { MenuOption as m } from "./MenuOption.js";
|
|
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 le } from "./Search.js";
|
|
12
|
+
import { useSubMenuSystem as se } from "../hooks/useMenuSystem.js";
|
|
13
|
+
const ae = ne(null), K = te(
|
|
14
14
|
({
|
|
15
15
|
id: e,
|
|
16
16
|
type: d = "default",
|
|
17
17
|
component: o = "static",
|
|
18
|
-
children:
|
|
18
|
+
children: u,
|
|
19
19
|
className: t,
|
|
20
20
|
locked: n = !1,
|
|
21
|
-
noPadding:
|
|
22
|
-
paddedLeft:
|
|
23
|
-
style:
|
|
24
|
-
onClick:
|
|
25
|
-
onRightClick:
|
|
26
|
-
error:
|
|
27
|
-
warning:
|
|
28
|
-
pending:
|
|
29
|
-
center:
|
|
30
|
-
width:
|
|
31
|
-
minWidth:
|
|
32
|
-
disabled:
|
|
33
|
-
isLast:
|
|
21
|
+
noPadding: f = !1,
|
|
22
|
+
paddedLeft: M = !1,
|
|
23
|
+
style: C,
|
|
24
|
+
onClick: g,
|
|
25
|
+
onRightClick: w,
|
|
26
|
+
error: p,
|
|
27
|
+
warning: F,
|
|
28
|
+
pending: G,
|
|
29
|
+
center: I,
|
|
30
|
+
width: h,
|
|
31
|
+
minWidth: x,
|
|
32
|
+
disabled: T,
|
|
33
|
+
isLast: H,
|
|
34
34
|
testid: O,
|
|
35
|
-
...
|
|
35
|
+
...L
|
|
36
36
|
}) => {
|
|
37
|
-
const
|
|
38
|
-
|
|
37
|
+
const E = d === "header" ? "th" : "td", c = B(null), [R, y] = A(!1), [W, S] = A(!1), z = oe(ae), $ = h ?? (z != null ? `${z}px` : void 0), U = x ?? (h == null ? $ : void 0);
|
|
38
|
+
_(() => () => {
|
|
39
39
|
c.current && (clearTimeout(c.current), c.current = null);
|
|
40
40
|
}, []);
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
const D = (k) => {
|
|
42
|
+
S(!0), c.current = window.setTimeout(() => {
|
|
43
|
+
y(!0);
|
|
44
44
|
}, 500);
|
|
45
|
-
},
|
|
45
|
+
}, P = (k) => {
|
|
46
46
|
c.current && (clearTimeout(c.current), c.current = null);
|
|
47
|
-
const
|
|
48
|
-
!
|
|
49
|
-
},
|
|
47
|
+
const q = k.nativeEvent instanceof MouseEvent && k.nativeEvent.button === 2;
|
|
48
|
+
!R && g && !q && W && g(k), q && w && w(), y(!1), S(!1);
|
|
49
|
+
}, l = () => {
|
|
50
50
|
c.current && (clearTimeout(c.current), c.current = null);
|
|
51
|
-
},
|
|
52
|
-
|
|
51
|
+
}, a = d === "header" && !n && !["button"].includes(o) && "bg-brand-400 border-brand-200", s = n && !["button"].includes(o) && "bg-neutral-400 border-neutral-300", i = d === "header" && o !== "button" && o !== "icon" && !H && v("border-r"), b = o === "button" && v("border-r border-b border-border-primary-normal"), Y = o === "icon" && v("border-l"), Z = v(
|
|
52
|
+
i,
|
|
53
|
+
b,
|
|
53
54
|
a,
|
|
54
|
-
T,
|
|
55
|
-
N,
|
|
56
55
|
s,
|
|
56
|
+
Y,
|
|
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",
|
|
60
60
|
"overflow-x-hidden",
|
|
61
61
|
"overflow-y-hidden",
|
|
62
62
|
o === "input" && "border",
|
|
63
|
-
o === "input" && !
|
|
64
|
-
o === "input" && !
|
|
65
|
-
o === "input" &&
|
|
66
|
-
o === "input" &&
|
|
67
|
-
!["button", "icon"].includes(o) && !
|
|
68
|
-
|
|
63
|
+
o === "input" && !p && !F && "border-border-primary-normal",
|
|
64
|
+
o === "input" && !p && !F && G && "[&:not(:focus-within)]:border-background-warning-normal",
|
|
65
|
+
o === "input" && p && "border-border-primary-error",
|
|
66
|
+
o === "input" && F && "border-background-warning-normal",
|
|
67
|
+
!["button", "icon"].includes(o) && !f && re,
|
|
68
|
+
M && "pl-2",
|
|
69
69
|
o === "icon" && "border-l",
|
|
70
|
-
|
|
71
|
-
o === "checkbox" ||
|
|
72
|
-
|
|
70
|
+
R && "!cursor-grabbing",
|
|
71
|
+
o === "checkbox" || I && "justify-center",
|
|
72
|
+
T && "!text-text-primary-disabled"
|
|
73
73
|
);
|
|
74
74
|
return /* @__PURE__ */ r(
|
|
75
|
-
|
|
75
|
+
E,
|
|
76
76
|
{
|
|
77
77
|
id: e,
|
|
78
78
|
"data-testid": O,
|
|
79
|
-
className: v("flex h-10",
|
|
80
|
-
style: { width:
|
|
81
|
-
...
|
|
79
|
+
className: v("flex h-10", !$ && "flex-1"),
|
|
80
|
+
style: { width: $, minWidth: U },
|
|
81
|
+
...L,
|
|
82
82
|
"data-theme": d === "header" && !n ? "brand" : void 0,
|
|
83
83
|
children: /* @__PURE__ */ r(
|
|
84
84
|
"div",
|
|
85
85
|
{
|
|
86
|
-
className:
|
|
86
|
+
className: Z,
|
|
87
87
|
style: {
|
|
88
|
-
...
|
|
88
|
+
...C
|
|
89
89
|
},
|
|
90
|
-
onMouseDown:
|
|
91
|
-
onMouseUp:
|
|
92
|
-
onMouseLeave:
|
|
93
|
-
onTouchStart:
|
|
94
|
-
onTouchEnd:
|
|
95
|
-
onTouchCancel:
|
|
96
|
-
onContextMenu: (
|
|
97
|
-
children:
|
|
90
|
+
onMouseDown: D,
|
|
91
|
+
onMouseUp: P,
|
|
92
|
+
onMouseLeave: l,
|
|
93
|
+
onTouchStart: D,
|
|
94
|
+
onTouchEnd: P,
|
|
95
|
+
onTouchCancel: l,
|
|
96
|
+
onContextMenu: (k) => k.preventDefault(),
|
|
97
|
+
children: u
|
|
98
98
|
}
|
|
99
99
|
)
|
|
100
100
|
}
|
|
101
101
|
);
|
|
102
102
|
}
|
|
103
103
|
);
|
|
104
|
-
|
|
105
|
-
function
|
|
104
|
+
K.displayName = "DataGridCell";
|
|
105
|
+
function X({
|
|
106
106
|
header: e,
|
|
107
107
|
children: d,
|
|
108
108
|
setNodeRef: o,
|
|
109
|
-
node:
|
|
109
|
+
node: u,
|
|
110
110
|
id: t,
|
|
111
111
|
testid: n,
|
|
112
|
-
useMenuDefaultMinWidth:
|
|
113
|
-
allowUserGrouping:
|
|
114
|
-
...
|
|
112
|
+
useMenuDefaultMinWidth: f,
|
|
113
|
+
allowUserGrouping: M,
|
|
114
|
+
...C
|
|
115
115
|
}) {
|
|
116
|
-
const [
|
|
116
|
+
const [g, w] = A(!1), [p, F] = A(
|
|
117
117
|
e.column.getFilterValue() ?? ""
|
|
118
|
-
),
|
|
118
|
+
), G = B(null), I = B(!1), { column: h, getContext: x } = e, { id: T, setFilterValue: H } = h, {
|
|
119
119
|
menuRootRef: O,
|
|
120
|
-
isMenuActive:
|
|
121
|
-
registerSubMenu:
|
|
120
|
+
isMenuActive: L,
|
|
121
|
+
registerSubMenu: E,
|
|
122
122
|
listeners: c,
|
|
123
|
-
mobileHide:
|
|
124
|
-
} =
|
|
125
|
-
|
|
126
|
-
const l =
|
|
127
|
-
|
|
128
|
-
}, [
|
|
123
|
+
mobileHide: R
|
|
124
|
+
} = se(u || G);
|
|
125
|
+
_(() => {
|
|
126
|
+
const l = x().table.options.initialState?.columnPinning, a = l?.left ?? [], s = l?.right ?? [];
|
|
127
|
+
I.current = [...a, ...s].includes(T);
|
|
128
|
+
}, [T, x]), _(() => {
|
|
129
129
|
const l = setTimeout(() => {
|
|
130
|
-
|
|
130
|
+
H(p);
|
|
131
131
|
}, 500);
|
|
132
132
|
return () => {
|
|
133
133
|
clearTimeout(l);
|
|
134
134
|
};
|
|
135
|
-
}, [
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
const s = a.indexOf(
|
|
135
|
+
}, [p, H]);
|
|
136
|
+
const y = !!M && h.getCanGroup(), W = h.getIsGrouped(), S = h.getGroupedIndex(), z = x().table.getState().grouping.length, $ = (l) => {
|
|
137
|
+
x().table.setGrouping((a) => {
|
|
138
|
+
const s = a.indexOf(T), i = s + l;
|
|
139
139
|
if (s === -1 || i < 0 || i >= a.length)
|
|
140
140
|
return a;
|
|
141
|
-
const
|
|
142
|
-
return [
|
|
141
|
+
const b = [...a];
|
|
142
|
+
return [b[s], b[i]] = [b[i], b[s]], b;
|
|
143
143
|
});
|
|
144
|
-
},
|
|
144
|
+
}, U = {
|
|
145
145
|
position: "relative",
|
|
146
146
|
whiteSpace: "nowrap",
|
|
147
147
|
minWidth: e.column.getSize(),
|
|
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
|
+
...C.style
|
|
152
152
|
};
|
|
153
|
-
return /* @__PURE__ */
|
|
154
|
-
|
|
153
|
+
return /* @__PURE__ */ N(
|
|
154
|
+
K,
|
|
155
155
|
{
|
|
156
156
|
id: t,
|
|
157
157
|
testid: n,
|
|
158
|
-
ref: o ||
|
|
158
|
+
ref: o || G,
|
|
159
159
|
type: "header",
|
|
160
160
|
component: "header",
|
|
161
|
-
style:
|
|
161
|
+
style: U,
|
|
162
162
|
minWidth: `${e.column.getSize()}px`,
|
|
163
163
|
onClick: e.column.getToggleSortingHandler(),
|
|
164
|
-
onRightClick: () =>
|
|
165
|
-
...
|
|
164
|
+
onRightClick: () => w(!g),
|
|
165
|
+
...C,
|
|
166
166
|
children: [
|
|
167
167
|
d,
|
|
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 ${S + 1})`,
|
|
175
175
|
"data-testid": n ? `${n}-grouped-indicator` : void 0
|
|
176
176
|
}
|
|
177
177
|
),
|
|
178
|
-
(e.column.getCanFilter() || !
|
|
179
|
-
|
|
178
|
+
(e.column.getCanFilter() || !I.current && e.column.getCanPin() || y) && /* @__PURE__ */ N(
|
|
179
|
+
V,
|
|
180
180
|
{
|
|
181
181
|
id: t ? `${t}-menu` : void 0,
|
|
182
182
|
testid: n ? `${n}-menu` : void 0,
|
|
183
183
|
ref: O,
|
|
184
|
-
positionTo:
|
|
185
|
-
show:
|
|
186
|
-
setShow:
|
|
187
|
-
mobileHide:
|
|
188
|
-
useDefaultMinWidth:
|
|
184
|
+
positionTo: u || G,
|
|
185
|
+
show: g,
|
|
186
|
+
setShow: w,
|
|
187
|
+
mobileHide: R,
|
|
188
|
+
useDefaultMinWidth: f,
|
|
189
189
|
children: [
|
|
190
190
|
e.column.getCanFilter() && /* @__PURE__ */ r(
|
|
191
|
-
|
|
191
|
+
m,
|
|
192
192
|
{
|
|
193
193
|
id: t ? `${t}-filter-option` : void 0,
|
|
194
194
|
testid: n ? `${n}-filter-option` : void 0,
|
|
195
195
|
...c,
|
|
196
|
-
subMenu: ({ menuId: l, subMenuLevel: a, ...s }) => /* @__PURE__ */
|
|
197
|
-
|
|
196
|
+
subMenu: ({ menuId: l, subMenuLevel: a, ...s }) => /* @__PURE__ */ N(
|
|
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:
|
|
202
|
+
show: L(l, a),
|
|
203
203
|
ref: (i) => {
|
|
204
|
-
|
|
204
|
+
E(l, i);
|
|
205
205
|
},
|
|
206
|
-
useDefaultMinWidth:
|
|
206
|
+
useDefaultMinWidth: f,
|
|
207
207
|
children: [
|
|
208
|
-
/* @__PURE__ */ r("div", { className: v(
|
|
209
|
-
|
|
208
|
+
/* @__PURE__ */ r("div", { className: v(ie), children: /* @__PURE__ */ r(
|
|
209
|
+
le,
|
|
210
210
|
{
|
|
211
211
|
id: t ? `${t}-filter-search` : void 0,
|
|
212
212
|
testid: n ? `${n}-filter-search` : void 0,
|
|
213
213
|
onChange: (i) => {
|
|
214
|
-
|
|
214
|
+
F(i.target.value);
|
|
215
215
|
},
|
|
216
216
|
onKeyDown: (i) => {
|
|
217
217
|
[" ", "Space"].includes(i.key) && i.stopPropagation();
|
|
218
218
|
},
|
|
219
|
-
value:
|
|
219
|
+
value: p ?? ""
|
|
220
220
|
}
|
|
221
221
|
) }),
|
|
222
222
|
/* @__PURE__ */ r(
|
|
223
|
-
|
|
223
|
+
m,
|
|
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: P,
|
|
228
|
+
before: D("includesString"),
|
|
229
229
|
children: "Contains"
|
|
230
230
|
}
|
|
231
231
|
),
|
|
232
232
|
/* @__PURE__ */ r(
|
|
233
|
-
|
|
233
|
+
m,
|
|
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: P,
|
|
238
|
+
before: D("startsWith"),
|
|
239
239
|
children: "Starts with"
|
|
240
240
|
}
|
|
241
241
|
),
|
|
242
242
|
/* @__PURE__ */ r(
|
|
243
|
-
|
|
243
|
+
m,
|
|
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: P,
|
|
248
|
+
before: D("endsWith"),
|
|
249
249
|
children: "Ends with"
|
|
250
250
|
}
|
|
251
251
|
)
|
|
@@ -255,24 +255,24 @@ function Q({
|
|
|
255
255
|
children: "Filter"
|
|
256
256
|
}
|
|
257
257
|
),
|
|
258
|
-
!
|
|
259
|
-
|
|
258
|
+
!I.current && e.column.getCanPin() && /* @__PURE__ */ r(
|
|
259
|
+
m,
|
|
260
260
|
{
|
|
261
261
|
onClick: () => {
|
|
262
|
-
|
|
262
|
+
w(!g);
|
|
263
263
|
},
|
|
264
264
|
...c,
|
|
265
|
-
subMenu: ({ menuId: l, subMenuLevel: a, ...s }) => /* @__PURE__ */
|
|
266
|
-
|
|
265
|
+
subMenu: ({ menuId: l, subMenuLevel: a, ...s }) => /* @__PURE__ */ N(
|
|
266
|
+
V,
|
|
267
267
|
{
|
|
268
268
|
...s,
|
|
269
|
-
show:
|
|
269
|
+
show: L(l, a),
|
|
270
270
|
ref: (i) => {
|
|
271
|
-
|
|
271
|
+
E(l, i);
|
|
272
272
|
},
|
|
273
273
|
children: [
|
|
274
274
|
/* @__PURE__ */ r(
|
|
275
|
-
|
|
275
|
+
m,
|
|
276
276
|
{
|
|
277
277
|
selected: e.column.getIsPinned() === "left",
|
|
278
278
|
onClick: () => {
|
|
@@ -283,7 +283,7 @@ function Q({
|
|
|
283
283
|
}
|
|
284
284
|
),
|
|
285
285
|
/* @__PURE__ */ r(
|
|
286
|
-
|
|
286
|
+
m,
|
|
287
287
|
{
|
|
288
288
|
selected: e.column.getIsPinned() === "right",
|
|
289
289
|
onClick: () => {
|
|
@@ -296,36 +296,36 @@ function Q({
|
|
|
296
296
|
]
|
|
297
297
|
}
|
|
298
298
|
),
|
|
299
|
-
children: `Freeze
|
|
299
|
+
children: `Freeze ${e.column.columnDef.header}`
|
|
300
300
|
}
|
|
301
301
|
),
|
|
302
|
-
|
|
303
|
-
|
|
302
|
+
y && /* @__PURE__ */ r(
|
|
303
|
+
m,
|
|
304
304
|
{
|
|
305
305
|
id: t ? `${t}-group-option` : void 0,
|
|
306
306
|
testid: n ? `${n}-group-option` : void 0,
|
|
307
307
|
onClick: e.column.getToggleGroupingHandler(),
|
|
308
|
-
children:
|
|
308
|
+
children: W ? "Remove group" : `Group by [${e.column.columnDef.header}]`
|
|
309
309
|
}
|
|
310
310
|
),
|
|
311
|
-
|
|
311
|
+
y && W && z > 1 && /* @__PURE__ */ N(ee, { 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: S === 0,
|
|
318
|
+
onClick: () => $(-1),
|
|
319
319
|
children: "Move up"
|
|
320
320
|
}
|
|
321
321
|
),
|
|
322
322
|
/* @__PURE__ */ r(
|
|
323
|
-
|
|
323
|
+
m,
|
|
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: S === z - 1,
|
|
328
|
+
onClick: () => $(1),
|
|
329
329
|
children: "Move down"
|
|
330
330
|
}
|
|
331
331
|
)
|
|
@@ -336,7 +336,7 @@ function Q({
|
|
|
336
336
|
]
|
|
337
337
|
}
|
|
338
338
|
);
|
|
339
|
-
function
|
|
339
|
+
function D(l) {
|
|
340
340
|
return /* @__PURE__ */ r(
|
|
341
341
|
j,
|
|
342
342
|
{
|
|
@@ -347,24 +347,24 @@ function Q({
|
|
|
347
347
|
}
|
|
348
348
|
);
|
|
349
349
|
}
|
|
350
|
-
function
|
|
350
|
+
function P(l, a) {
|
|
351
351
|
let s = "includesString";
|
|
352
352
|
const i = e.column.columnDef.filterFn;
|
|
353
|
-
a?.toLowerCase() === "starts with" && (s = i === "startsWith" ? "auto" : "startsWith"), a?.toLowerCase() === "ends with" && (s = i === "endsWith" ? "auto" : "endsWith"), a?.toLowerCase() === "contains" && (s = i === "includesString" ? "auto" : "includesString"), e.column.columnDef.filterFn = s, e.column.setFilterValue(
|
|
353
|
+
a?.toLowerCase() === "starts with" && (s = i === "startsWith" ? "auto" : "startsWith"), a?.toLowerCase() === "ends with" && (s = i === "endsWith" ? "auto" : "endsWith"), a?.toLowerCase() === "contains" && (s = i === "includesString" ? "auto" : "includesString"), e.column.columnDef.filterFn = s, e.column.setFilterValue(p);
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
|
-
|
|
357
|
-
function
|
|
356
|
+
X.displayName = "DataCellHeader";
|
|
357
|
+
function ce({
|
|
358
358
|
header: e,
|
|
359
359
|
children: d,
|
|
360
360
|
...o
|
|
361
361
|
}) {
|
|
362
|
-
const { attributes:
|
|
362
|
+
const { attributes: u, isDragging: t, listeners: n, setNodeRef: f, transform: M, node: C } = J({
|
|
363
363
|
id: e.column.id
|
|
364
|
-
}),
|
|
364
|
+
}), g = {
|
|
365
365
|
opacity: t ? 0.8 : 1,
|
|
366
366
|
position: "relative",
|
|
367
|
-
transform:
|
|
367
|
+
transform: Q.Translate.toString(M),
|
|
368
368
|
transition: "width transform 0.2s ease-in-out",
|
|
369
369
|
whiteSpace: "nowrap",
|
|
370
370
|
zIndex: t ? 1 : 0,
|
|
@@ -373,40 +373,41 @@ function oe({
|
|
|
373
373
|
userSelect: "none"
|
|
374
374
|
};
|
|
375
375
|
return /* @__PURE__ */ r(
|
|
376
|
-
|
|
376
|
+
X,
|
|
377
377
|
{
|
|
378
378
|
header: e,
|
|
379
|
-
setNodeRef:
|
|
380
|
-
node:
|
|
381
|
-
style:
|
|
379
|
+
setNodeRef: f,
|
|
380
|
+
node: C,
|
|
381
|
+
style: g,
|
|
382
382
|
...o,
|
|
383
|
-
...
|
|
383
|
+
...u,
|
|
384
384
|
...n,
|
|
385
385
|
children: d
|
|
386
386
|
}
|
|
387
387
|
);
|
|
388
388
|
}
|
|
389
|
-
|
|
390
|
-
function
|
|
389
|
+
ce.displayName = "DraggableCellHeader";
|
|
390
|
+
function ue({
|
|
391
391
|
cell: e,
|
|
392
392
|
children: d,
|
|
393
393
|
...o
|
|
394
394
|
}) {
|
|
395
|
-
const { isDragging:
|
|
395
|
+
const { isDragging: u, setNodeRef: t, transform: n } = J({
|
|
396
396
|
id: e.column.id
|
|
397
|
-
}),
|
|
398
|
-
opacity:
|
|
397
|
+
}), f = {
|
|
398
|
+
opacity: u ? 0.8 : 1,
|
|
399
399
|
position: "relative",
|
|
400
|
-
transform:
|
|
400
|
+
transform: Q.Translate.toString(n),
|
|
401
401
|
transition: "width transform 0.2s ease-in-out",
|
|
402
|
-
zIndex:
|
|
402
|
+
zIndex: u ? 1 : 0
|
|
403
403
|
};
|
|
404
|
-
return /* @__PURE__ */ r(
|
|
404
|
+
return /* @__PURE__ */ r(K, { style: f, ref: t, width: `${e.column.getSize()}px`, ...o, children: d });
|
|
405
405
|
}
|
|
406
|
-
|
|
406
|
+
ue.displayName = "DragAlongCell";
|
|
407
407
|
export {
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
408
|
+
X as DataCellHeader,
|
|
409
|
+
K as DataGridCell,
|
|
410
|
+
ue as DragAlongCell,
|
|
411
|
+
ce as DraggableCellHeader,
|
|
412
|
+
ae as GridColumnSizeContext
|
|
412
413
|
};
|