@stenajs-webui/grid 19.0.0-next.0 → 19.0.0-next.11
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/features/table-ui/components/table/SortOrderIcon.d.ts +1 -1
- package/dist/index.es.js +401 -406
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +11 -9
package/dist/index.es.js
CHANGED
|
@@ -1,31 +1,26 @@
|
|
|
1
1
|
(function(){"use strict";try{var e=document.createElement("style");e.appendChild(document.createTextNode("._tableRow_1cphw_1:focus-within{background:var(--focus-within-background, var(--lhds-color-blue-50))}._standardTable_1iok0_1{--swui-standard-table-height: 40px;--swui-sticky-header-shadow: 2px 4px 4px 0 rgba(0, 0, 0, .05);--swui-sticky-header-shadow-and-right: var(--swui-sticky-header-shadow), var(--swui-sticky-column-shadow-right);--swui-sticky-header-shadow-and-left: var(--swui-sticky-header-shadow), var(--swui-sticky-column-shadow-left);--swui-sticky-column-shadow-right: 4px 2px 4px 0 rgba(0, 0, 0, .05);--swui-sticky-column-shadow-left: -4px 2px 4px 0 rgba(0, 0, 0, .05);--swui-sticky-header-z-index: 10;--swui-sticky-column-z-index: 20;--swui-sticky-group-group-z-index: 25;--swui-sticky-group-header-z-index: 26;--swui-sticky-header-column-group-z-index: 30;--swui-sticky-column-group-label-z-index: 40;--swui-sticky-header-in-sticky-column-z-index: 50;--swui-sticky-popover-z-index: 60;--swui-expand-cell-width: 45px;--swui-checkbox-cell-width: 45px;--swui-expand-highlight-border-width: 2px;--current-row-height: var(--swui-standard-table-height);--current-left-offset: 0px;border-spacing:0}._standardTable_1iok0_1 td{border-top:1px solid var(--lhds-color-ui-300);padding:0}._standardTable_1iok0_1 th{padding:0}._standardTable_1iok0_1._relaxed_1iok0_37{--current-row-height: 48px}._standardTable_1iok0_1._condensed_1iok0_41{--current-row-height: 32px}._standardTable_1iok0_1._compact_1iok0_45{--current-row-height: 24px}._standardTableCell_1xzcm_1{outline:none}._textCell_1yv6v_1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._summaryRow_12x8k_1 td{border-top:1px solid var(--lhds-color-ui-400)}")),document.head.appendChild(e)}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
2
2
|
import * as P from "react";
|
|
3
|
-
import { useMemo as v, useRef as ne, useState as ve, useCallback as I, useEffect as je, useContext as $, createContext as K, useReducer as
|
|
3
|
+
import { useMemo as v, useRef as ne, useState as ve, useCallback as I, useEffect as je, useContext as $, createContext as K, useReducer as Rt, useId as Tt } from "react";
|
|
4
4
|
import { jsx as r, Fragment as O, jsxs as g } from "react/jsx-runtime";
|
|
5
|
-
import {
|
|
6
|
-
import { InputSpinner as ye, Icon as F, stenaArrowRight as Tt, stenaInfoCircle as Gt, FlatButton as xe, ResultListBanner as Ot, Banner as Le } from "@stenajs-webui/elements";
|
|
5
|
+
import { InputSpinner as ye, Icon as F, stenaExclamationTriangle as ue, stenaArrowRight as We, stenaInfoCircle as Gt, FlatButton as xe, stenaDotsVertical as Ot, stenaAngleDown as qe, stenaAngleRight as Fe, ResultListBanner as Pt, Banner as Le } from "@stenajs-webui/elements";
|
|
7
6
|
import { cssColor as j } from "@stenajs-webui/theme";
|
|
8
|
-
import { Tooltip as se, Popover as
|
|
9
|
-
import { Text as U, Indent as N, Space as D, Row as E, Box as oe, exhaustSwitchCaseElseThrow as
|
|
10
|
-
import { faEllipsisV as Dt } from "@fortawesome/free-solid-svg-icons/faEllipsisV";
|
|
7
|
+
import { Tooltip as se, Popover as At } from "@stenajs-webui/tooltip";
|
|
8
|
+
import { Text as U, Indent as N, Space as D, Row as E, Box as oe, exhaustSwitchCaseElseThrow as Lt, Heading as Ue, booleanOrNumberToNumber as Bt, useArraySet as Ze, useOnScreen as Dt, Spacing as Ce } from "@stenajs-webui/core";
|
|
11
9
|
import { faSortAlphaDown as Nt } from "@fortawesome/free-solid-svg-icons/faSortAlphaDown";
|
|
12
10
|
import { faSortAlphaUp as zt } from "@fortawesome/free-solid-svg-icons/faSortAlphaUp";
|
|
13
11
|
import { faSortAmountDownAlt as Kt } from "@fortawesome/free-solid-svg-icons/faSortAmountDownAlt";
|
|
14
12
|
import { faSortAmountUpAlt as $t } from "@fortawesome/free-solid-svg-icons/faSortAmountUpAlt";
|
|
15
13
|
import { faSortNumericDown as Ht } from "@fortawesome/free-solid-svg-icons/faSortNumericDown";
|
|
16
14
|
import { faSortNumericUp as Mt } from "@fortawesome/free-solid-svg-icons/faSortNumericUp";
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import
|
|
25
|
-
|
|
26
|
-
import { faChevronRight as Je } from "@fortawesome/free-solid-svg-icons/faChevronRight";
|
|
27
|
-
import tn from "@emotion/styled";
|
|
28
|
-
const Xe = P.createContext({}), br = ({
|
|
15
|
+
import Je from "classnames";
|
|
16
|
+
import { TextInput as ge, Checkbox as Xe } from "@stenajs-webui/forms";
|
|
17
|
+
import { useDispatch as Vt, useSelector as Be } from "react-redux";
|
|
18
|
+
import { createSortOrderActions as _t, createSelectedIdsActions as De, createEntityActions as jt, createSortOrderReducerInitialState as Wt, createSelectedIdsReducerInitialState as Ne, reducerIdGate as de, createSortOrderReducer as qt, createSelectedIdsReducer as ze, createEntityReducer as Ft, reducerIdGateAction as Y } from "@stenajs-webui/redux";
|
|
19
|
+
import { combineReducers as Ut } from "redux";
|
|
20
|
+
import { LoadingScreen as Zt, ErrorScreen as Jt } from "@stenajs-webui/panels";
|
|
21
|
+
import { compact as Xt, upperFirst as Yt, lowerCase as Qt } from "lodash";
|
|
22
|
+
import en from "@emotion/styled";
|
|
23
|
+
const Ye = P.createContext({}), Cr = ({
|
|
29
24
|
children: e,
|
|
30
25
|
numCols: t,
|
|
31
26
|
numRows: n,
|
|
@@ -38,7 +33,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
38
33
|
tableId: o,
|
|
39
34
|
wrap: s
|
|
40
35
|
}), [t, n, o, s]);
|
|
41
|
-
return /* @__PURE__ */ r(
|
|
36
|
+
return /* @__PURE__ */ r(Ye.Provider, {
|
|
42
37
|
value: c,
|
|
43
38
|
children: e
|
|
44
39
|
});
|
|
@@ -51,7 +46,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
51
46
|
hasError: c
|
|
52
47
|
} = e;
|
|
53
48
|
return Boolean(t || n || o || s || c);
|
|
54
|
-
},
|
|
49
|
+
}, Qe = ({
|
|
55
50
|
crudStatus: e
|
|
56
51
|
}) => {
|
|
57
52
|
if (!e || !be(e))
|
|
@@ -83,7 +78,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
83
78
|
});
|
|
84
79
|
}
|
|
85
80
|
return null;
|
|
86
|
-
},
|
|
81
|
+
}, tn = ({
|
|
87
82
|
isEditable: e,
|
|
88
83
|
warningOnEmpty: t,
|
|
89
84
|
value: n,
|
|
@@ -99,7 +94,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
99
94
|
}), (o == null ? void 0 : o.newValue) !== void 0 && /* @__PURE__ */ g(O, {
|
|
100
95
|
children: [/* @__PURE__ */ r(N, {
|
|
101
96
|
children: /* @__PURE__ */ r(F, {
|
|
102
|
-
icon:
|
|
97
|
+
icon: We,
|
|
103
98
|
size: 12
|
|
104
99
|
})
|
|
105
100
|
}), /* @__PURE__ */ r(U, {
|
|
@@ -115,11 +110,11 @@ const Xe = P.createContext({}), br = ({
|
|
|
115
110
|
color: j("--lhds-color-orange-600"),
|
|
116
111
|
size: 14
|
|
117
112
|
})
|
|
118
|
-
}) : /* @__PURE__ */ r(
|
|
113
|
+
}) : /* @__PURE__ */ r(Qe, {
|
|
119
114
|
crudStatus: s
|
|
120
115
|
})]
|
|
121
116
|
});
|
|
122
|
-
},
|
|
117
|
+
}, nn = ({
|
|
123
118
|
alignItems: e = "center",
|
|
124
119
|
justifyContent: t = "flex-start",
|
|
125
120
|
overflow: n = "hidden",
|
|
@@ -132,8 +127,8 @@ const Xe = P.createContext({}), br = ({
|
|
|
132
127
|
overflow: n,
|
|
133
128
|
indent: o,
|
|
134
129
|
...s
|
|
135
|
-
}),
|
|
136
|
-
width:
|
|
130
|
+
}), on = "var(--lhds-color-ui-300)", rn = "var(--lhds-color-blue-500)", et = "var(--lhds-color-blue-50)", sn = "var(--lhds-color-blue-100)", re = `1px solid ${on}`, cn = "1px solid transparent", ke = "var(--swui-expand-highlight-border-width) solid transparent", tt = `var(--swui-expand-highlight-border-width) solid ${rn}`, Se = "40px", Ie = "40px", nt = "40px", fr = (e) => /* @__PURE__ */ r(nn, {
|
|
131
|
+
width: nt,
|
|
137
132
|
justifyContent: "center",
|
|
138
133
|
...e
|
|
139
134
|
}), Ke = ({
|
|
@@ -144,9 +139,9 @@ const Xe = P.createContext({}), br = ({
|
|
|
144
139
|
children: /* @__PURE__ */ r(F, {
|
|
145
140
|
size: 14,
|
|
146
141
|
color: j("--lhds-color-ui-500"),
|
|
147
|
-
icon:
|
|
142
|
+
icon: ln(t, e)
|
|
148
143
|
})
|
|
149
|
-
}),
|
|
144
|
+
}), ln = (e, t) => {
|
|
150
145
|
switch (t) {
|
|
151
146
|
case "alpha":
|
|
152
147
|
return e === "up" ? zt : Nt;
|
|
@@ -155,7 +150,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
155
150
|
case "amount":
|
|
156
151
|
return e === "up" ? $t : Kt;
|
|
157
152
|
default:
|
|
158
|
-
return
|
|
153
|
+
return Lt(t);
|
|
159
154
|
}
|
|
160
155
|
}, Ee = P.memo(({
|
|
161
156
|
label: e,
|
|
@@ -170,9 +165,9 @@ const Xe = P.createContext({}), br = ({
|
|
|
170
165
|
alignRight: u,
|
|
171
166
|
sortOrderIconVariant: d,
|
|
172
167
|
appendTooltipTo: h,
|
|
173
|
-
...
|
|
168
|
+
...w
|
|
174
169
|
}) => {
|
|
175
|
-
const m = ne(null),
|
|
170
|
+
const m = ne(null), f = n ? {
|
|
176
171
|
cursor: "pointer",
|
|
177
172
|
userSelect: "none"
|
|
178
173
|
} : void 0, p = !e && !t && !i;
|
|
@@ -184,7 +179,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
184
179
|
justifyContent: u ? "flex-end" : "flex-start",
|
|
185
180
|
borderTop: "2px solid transparent",
|
|
186
181
|
borderBottom: `2px solid ${s ? j("--lhds-color-blue-500") : "transparent"}`,
|
|
187
|
-
...
|
|
182
|
+
...w,
|
|
188
183
|
children: [/* @__PURE__ */ g(E, {
|
|
189
184
|
alignItems: "center",
|
|
190
185
|
indent: !0,
|
|
@@ -196,7 +191,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
196
191
|
})]
|
|
197
192
|
}), (o || e) && /* @__PURE__ */ g(E, {
|
|
198
193
|
onClick: n,
|
|
199
|
-
style:
|
|
194
|
+
style: f,
|
|
200
195
|
alignItems: "center",
|
|
201
196
|
children: [o && /* @__PURE__ */ g(O, {
|
|
202
197
|
children: [o, !p && /* @__PURE__ */ r(D, {
|
|
@@ -209,7 +204,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
209
204
|
}), /* @__PURE__ */ r(D, {
|
|
210
205
|
num: 0.5
|
|
211
206
|
})]
|
|
212
|
-
}), e && /* @__PURE__ */ r(
|
|
207
|
+
}), e && /* @__PURE__ */ r(Ue, {
|
|
213
208
|
variant: "h6",
|
|
214
209
|
style: {
|
|
215
210
|
textAlign: "left"
|
|
@@ -225,7 +220,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
225
220
|
})]
|
|
226
221
|
}), i && /* @__PURE__ */ g(O, {
|
|
227
222
|
children: [/* @__PURE__ */ r(D, {}), /* @__PURE__ */ g(E, {
|
|
228
|
-
onClick: (
|
|
223
|
+
onClick: (C) => C.stopPropagation(),
|
|
229
224
|
children: [/* @__PURE__ */ r(se, {
|
|
230
225
|
label: i,
|
|
231
226
|
zIndex: "var(--swui-sticky-popover-z-index)",
|
|
@@ -239,7 +234,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
239
234
|
})]
|
|
240
235
|
})]
|
|
241
236
|
}), /* @__PURE__ */ r(E, {
|
|
242
|
-
children: l ? /* @__PURE__ */ r(ye, {}) : c ? /* @__PURE__ */ r(
|
|
237
|
+
children: l ? /* @__PURE__ */ r(ye, {}) : c ? /* @__PURE__ */ r(At, {
|
|
243
238
|
content: c,
|
|
244
239
|
trigger: "click",
|
|
245
240
|
zIndex: 1e3,
|
|
@@ -247,7 +242,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
247
242
|
variant: "outlined",
|
|
248
243
|
arrow: !1,
|
|
249
244
|
children: /* @__PURE__ */ r(xe, {
|
|
250
|
-
leftIcon:
|
|
245
|
+
leftIcon: Ot,
|
|
251
246
|
size: "small"
|
|
252
247
|
})
|
|
253
248
|
}) : null
|
|
@@ -259,11 +254,11 @@ const Xe = P.createContext({}), br = ({
|
|
|
259
254
|
})]
|
|
260
255
|
})]
|
|
261
256
|
});
|
|
262
|
-
}),
|
|
263
|
-
width:
|
|
257
|
+
}), vr = (e) => /* @__PURE__ */ r(Ee, {
|
|
258
|
+
width: nt,
|
|
264
259
|
justifyContent: "center",
|
|
265
260
|
...e
|
|
266
|
-
}),
|
|
261
|
+
}), yr = ({
|
|
267
262
|
label: e,
|
|
268
263
|
flex: t,
|
|
269
264
|
width: n,
|
|
@@ -281,7 +276,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
281
276
|
children: e
|
|
282
277
|
})
|
|
283
278
|
})
|
|
284
|
-
}),
|
|
279
|
+
}), xr = P.memo(({
|
|
285
280
|
style: e,
|
|
286
281
|
height: t = Ie,
|
|
287
282
|
...n
|
|
@@ -289,19 +284,19 @@ const Xe = P.createContext({}), br = ({
|
|
|
289
284
|
style: e,
|
|
290
285
|
height: t,
|
|
291
286
|
...n
|
|
292
|
-
})),
|
|
293
|
-
tableRow:
|
|
294
|
-
},
|
|
287
|
+
})), an = "_tableRow_1cphw_1", dn = {
|
|
288
|
+
tableRow: an
|
|
289
|
+
}, gr = ({
|
|
295
290
|
hideBorderTop: e,
|
|
296
291
|
height: t = Ie,
|
|
297
292
|
className: n,
|
|
298
293
|
...o
|
|
299
294
|
}) => /* @__PURE__ */ r(E, {
|
|
300
|
-
borderTop: e ?
|
|
295
|
+
borderTop: e ? cn : re,
|
|
301
296
|
height: t,
|
|
302
|
-
className:
|
|
297
|
+
className: Je(dn.tableRow, n),
|
|
303
298
|
...o
|
|
304
|
-
}),
|
|
299
|
+
}), un = (e) => {
|
|
305
300
|
const [t, n] = ve(e), o = ne(e), s = ne(e), c = I(
|
|
306
301
|
(d) => {
|
|
307
302
|
n(d), s.current = d;
|
|
@@ -330,7 +325,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
330
325
|
commit: i,
|
|
331
326
|
getValue: u
|
|
332
327
|
};
|
|
333
|
-
},
|
|
328
|
+
}, hn = (e) => ({
|
|
334
329
|
altKey: e.altKey,
|
|
335
330
|
charCode: e.charCode,
|
|
336
331
|
ctrlKey: e.ctrlKey,
|
|
@@ -342,32 +337,32 @@ const Xe = P.createContext({}), br = ({
|
|
|
342
337
|
repeat: e.repeat,
|
|
343
338
|
shiftKey: e.shiftKey,
|
|
344
339
|
which: e.which
|
|
345
|
-
}),
|
|
340
|
+
}), pn = (e) => e, mn = (e, {
|
|
346
341
|
isEditable: t = !1,
|
|
347
342
|
allowedInputType: n = "all",
|
|
348
343
|
onChange: o,
|
|
349
344
|
onStartEditing: s,
|
|
350
345
|
onStopEditing: c,
|
|
351
|
-
transformEnteredValue: l =
|
|
346
|
+
transformEnteredValue: l = pn
|
|
352
347
|
}) => {
|
|
353
348
|
const [i, a] = ve(!1), [u, d] = ve(
|
|
354
349
|
void 0
|
|
355
|
-
), h =
|
|
350
|
+
), h = un(e), { getValue: w, revert: m, setValue: f, setRevertValue: p } = h, C = I(
|
|
356
351
|
(S) => {
|
|
357
|
-
t && (
|
|
352
|
+
t && (f(e), p(e), a(!0), s && s(S));
|
|
358
353
|
},
|
|
359
|
-
[t, s, p,
|
|
354
|
+
[t, s, p, f, e]
|
|
360
355
|
), y = I(() => {
|
|
361
|
-
t && (a(!1), c && c(), o && o(
|
|
362
|
-
}, [t, o, c,
|
|
356
|
+
t && (a(!1), c && c(), o && o(w()));
|
|
357
|
+
}, [t, o, c, w, a]), b = I(() => {
|
|
363
358
|
t && (a(!1), c && c(), m());
|
|
364
359
|
}, [t, c, m, a]);
|
|
365
360
|
return {
|
|
366
361
|
onKeyDown: v(
|
|
367
|
-
() =>
|
|
362
|
+
() => xn(
|
|
368
363
|
i,
|
|
369
364
|
t,
|
|
370
|
-
|
|
365
|
+
C,
|
|
371
366
|
d,
|
|
372
367
|
n,
|
|
373
368
|
l,
|
|
@@ -376,7 +371,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
376
371
|
[
|
|
377
372
|
i,
|
|
378
373
|
t,
|
|
379
|
-
|
|
374
|
+
C,
|
|
380
375
|
d,
|
|
381
376
|
n,
|
|
382
377
|
l,
|
|
@@ -386,39 +381,39 @@ const Xe = P.createContext({}), br = ({
|
|
|
386
381
|
isEditing: i,
|
|
387
382
|
lastKeyEvent: u,
|
|
388
383
|
revertableValue: h,
|
|
389
|
-
startEditing:
|
|
384
|
+
startEditing: C,
|
|
390
385
|
stopEditing: y,
|
|
391
386
|
stopEditingAndRevert: b,
|
|
392
|
-
onDoubleClick:
|
|
387
|
+
onDoubleClick: C
|
|
393
388
|
};
|
|
394
|
-
}, wn = (e) => e === "all" || e === "numeric" || e === "alphanumeric", Cn = (e) => e === "all" || e === "alphanumeric" || e === "letters",
|
|
389
|
+
}, wn = (e) => e === "all" || e === "numeric" || e === "alphanumeric", Cn = (e) => e === "all" || e === "alphanumeric" || e === "letters", fn = (e) => !!e.match(/^[-+*<>]$/), vn = (e) => !!e.match(/^[a-zA-Z0-9]$/), yn = (e) => !isNaN(parseInt(e, 10)), xn = (e, t, n, o, s, c, l) => (i) => {
|
|
395
390
|
if (!(i.ctrlKey || i.metaKey || i.shiftKey)) {
|
|
396
391
|
if (i.key === "Enter" && t)
|
|
397
392
|
o(void 0), n(), l.commit(), i.preventDefault(), i.stopPropagation();
|
|
398
393
|
else if (t) {
|
|
399
|
-
const a =
|
|
400
|
-
(
|
|
394
|
+
const a = hn(i);
|
|
395
|
+
(yn(i.key) && wn(s) || vn(i.key) && Cn(s) || fn(i.key)) && (n(a), o(a), l.commit(), l.setValue(c(a.key)), i.preventDefault(), i.stopPropagation());
|
|
401
396
|
}
|
|
402
397
|
}
|
|
403
|
-
},
|
|
398
|
+
}, gn = (e, t, n, o) => {
|
|
404
399
|
let s = e, c = t;
|
|
405
400
|
return t > o && (c = 0), t < 0 && (c = o), e > n && (s = 0), e < 0 && (s = n), {
|
|
406
401
|
realX: s,
|
|
407
402
|
realY: c
|
|
408
403
|
};
|
|
409
|
-
}, $e = (e, t, n) => Math.max(Math.min(e, n), t),
|
|
404
|
+
}, $e = (e, t, n) => Math.max(Math.min(e, n), t), bn = (e, t, n) => ({
|
|
410
405
|
rowIndex: $e(e.rowIndex, 0, t),
|
|
411
406
|
colIndex: $e(e.colIndex, 0, n)
|
|
412
|
-
}),
|
|
413
|
-
const o =
|
|
407
|
+
}), kn = (e, t, n) => {
|
|
408
|
+
const o = gn(e.colIndex, e.rowIndex, n, t);
|
|
414
409
|
return {
|
|
415
410
|
rowIndex: o.realY,
|
|
416
411
|
colIndex: o.realX
|
|
417
412
|
};
|
|
418
|
-
},
|
|
419
|
-
const l =
|
|
420
|
-
return c === "clamped" ?
|
|
421
|
-
},
|
|
413
|
+
}, Sn = (e, t, n, o, s, c = "clamped") => {
|
|
414
|
+
const l = In(e, t, s);
|
|
415
|
+
return c === "clamped" ? bn(l, n - 1, o - 1) : c === "wrapped" ? kn(l, n - 1, o - 1) : l;
|
|
416
|
+
}, In = (e, t, n) => n === "up" ? {
|
|
422
417
|
rowIndex: e - 1,
|
|
423
418
|
colIndex: t
|
|
424
419
|
} : n === "down" ? {
|
|
@@ -433,7 +428,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
433
428
|
} : {
|
|
434
429
|
rowIndex: e,
|
|
435
430
|
colIndex: t
|
|
436
|
-
},
|
|
431
|
+
}, En = (e) => e.replace(/^[^a-z]+|[^\w:.-]+/gi, ""), Rn = (e) => {
|
|
437
432
|
if (!e.tableId)
|
|
438
433
|
throw new Error("tableId is required.");
|
|
439
434
|
if (e.numRows == null)
|
|
@@ -441,16 +436,16 @@ const Xe = P.createContext({}), br = ({
|
|
|
441
436
|
if (e.numCols == null)
|
|
442
437
|
throw new Error("numCols is required.");
|
|
443
438
|
return e;
|
|
444
|
-
},
|
|
445
|
-
const t = $(
|
|
439
|
+
}, ot = (e) => {
|
|
440
|
+
const t = $(Ye);
|
|
446
441
|
return v(
|
|
447
|
-
() =>
|
|
442
|
+
() => Rn({
|
|
448
443
|
...t,
|
|
449
444
|
...e
|
|
450
445
|
}),
|
|
451
446
|
[t, e]
|
|
452
447
|
);
|
|
453
|
-
},
|
|
448
|
+
}, Tn = (e) => {
|
|
454
449
|
const {
|
|
455
450
|
rowIndex: t,
|
|
456
451
|
colIndex: n,
|
|
@@ -460,8 +455,8 @@ const Xe = P.createContext({}), br = ({
|
|
|
460
455
|
edgeMode: l,
|
|
461
456
|
onCellMove: i,
|
|
462
457
|
onCellNavigation: a
|
|
463
|
-
} =
|
|
464
|
-
() =>
|
|
458
|
+
} = ot(e), u = v(
|
|
459
|
+
() => Gn(
|
|
465
460
|
c,
|
|
466
461
|
t,
|
|
467
462
|
n,
|
|
@@ -482,12 +477,12 @@ const Xe = P.createContext({}), br = ({
|
|
|
482
477
|
a
|
|
483
478
|
]
|
|
484
479
|
), d = v(
|
|
485
|
-
() =>
|
|
480
|
+
() => On(u),
|
|
486
481
|
[u]
|
|
487
482
|
), h = v(
|
|
488
|
-
() =>
|
|
483
|
+
() => rt(c, t, n),
|
|
489
484
|
[c, t, n]
|
|
490
|
-
),
|
|
485
|
+
), w = v(
|
|
491
486
|
() => ({
|
|
492
487
|
tabIndex: 0,
|
|
493
488
|
onKeyDown: d,
|
|
@@ -496,12 +491,12 @@ const Xe = P.createContext({}), br = ({
|
|
|
496
491
|
[d, h]
|
|
497
492
|
);
|
|
498
493
|
return {
|
|
499
|
-
focusOnCell:
|
|
494
|
+
focusOnCell: st,
|
|
500
495
|
moveHandler: u,
|
|
501
|
-
requiredProps:
|
|
496
|
+
requiredProps: w
|
|
502
497
|
};
|
|
503
|
-
},
|
|
504
|
-
const u =
|
|
498
|
+
}, Gn = (e, t, n, o, s, c, l, i) => (a) => {
|
|
499
|
+
const u = Sn(
|
|
505
500
|
t,
|
|
506
501
|
n,
|
|
507
502
|
o,
|
|
@@ -517,7 +512,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
517
512
|
colIndex: u.colIndex,
|
|
518
513
|
colDidChange: d,
|
|
519
514
|
rowDidChange: h
|
|
520
|
-
}),
|
|
515
|
+
}), st(e, u)), i && i({
|
|
521
516
|
direction: a,
|
|
522
517
|
fromRowIndex: t,
|
|
523
518
|
fromColIndex: n,
|
|
@@ -527,13 +522,13 @@ const Xe = P.createContext({}), br = ({
|
|
|
527
522
|
rowDidChange: h,
|
|
528
523
|
cellDidChange: d || h
|
|
529
524
|
});
|
|
530
|
-
},
|
|
525
|
+
}, rt = (e, t, n) => En(`table-${e}-${t}-${n}`), On = (e) => (t) => t.key === "ArrowLeft" ? (e("left"), t.preventDefault(), t.stopPropagation(), !0) : t.key === "ArrowUp" ? (e("up"), t.preventDefault(), t.stopPropagation(), !0) : t.key === "ArrowRight" ? (e("right"), t.preventDefault(), t.stopPropagation(), !0) : t.key === "ArrowDown" ? (e("down"), t.preventDefault(), t.stopPropagation(), !0) : !1, st = (e, t) => {
|
|
531
526
|
const n = document.getElementById(
|
|
532
|
-
|
|
527
|
+
rt(e, t.rowIndex, t.colIndex)
|
|
533
528
|
);
|
|
534
529
|
n && n.focus();
|
|
535
530
|
}, he = (e, t) => {
|
|
536
|
-
const { tableId: n } =
|
|
531
|
+
const { tableId: n } = ot(t), o = Tn(t), s = mn(e, t), c = v(
|
|
537
532
|
() => ({
|
|
538
533
|
rowIndex: t.rowIndex,
|
|
539
534
|
colIndex: t.colIndex
|
|
@@ -560,7 +555,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
560
555
|
s.isEditing || o.requiredProps.onKeyDown(m) || s.onKeyDown(m);
|
|
561
556
|
},
|
|
562
557
|
[s, o.requiredProps]
|
|
563
|
-
),
|
|
558
|
+
), w = v(
|
|
564
559
|
() => ({
|
|
565
560
|
...o.requiredProps,
|
|
566
561
|
onKeyDown: h,
|
|
@@ -574,14 +569,14 @@ const Xe = P.createContext({}), br = ({
|
|
|
574
569
|
editorValue: s.revertableValue.value,
|
|
575
570
|
setEditorValue: s.revertableValue.setValue,
|
|
576
571
|
revertEditorValue: s.revertableValue.revert,
|
|
577
|
-
requiredProps:
|
|
572
|
+
requiredProps: w,
|
|
578
573
|
move: d,
|
|
579
574
|
startEditing: l,
|
|
580
575
|
stopEditing: i,
|
|
581
576
|
stopEditingAndRevert: a,
|
|
582
577
|
stopEditingAndMove: u
|
|
583
578
|
};
|
|
584
|
-
},
|
|
579
|
+
}, br = function({
|
|
585
580
|
allowedInputType: t,
|
|
586
581
|
value: n = "",
|
|
587
582
|
entityId: o,
|
|
@@ -593,9 +588,9 @@ const Xe = P.createContext({}), br = ({
|
|
|
593
588
|
rowIndex: u,
|
|
594
589
|
numCols: d,
|
|
595
590
|
numRows: h,
|
|
596
|
-
warningOnEmpty:
|
|
591
|
+
warningOnEmpty: w
|
|
597
592
|
}) {
|
|
598
|
-
const m =
|
|
593
|
+
const m = Vt(), f = Be(i.selectors.getState), p = Be(l.selectors.getState), C = f.entities[o], y = p.entities[o], b = I((M = "") => {
|
|
599
594
|
m(M === n ? i.actions.clearEntity(o) : i.actions.setEntity({
|
|
600
595
|
id: o,
|
|
601
596
|
originalValue: n,
|
|
@@ -662,30 +657,30 @@ const Xe = P.createContext({}), br = ({
|
|
|
662
657
|
}) : /* @__PURE__ */ g(O, {
|
|
663
658
|
children: [/* @__PURE__ */ r(U, {
|
|
664
659
|
color: s ? "var(--primary-action-color)" : void 0,
|
|
665
|
-
variant:
|
|
660
|
+
variant: C != null && C.modified ? "bold" : void 0,
|
|
666
661
|
children: n
|
|
667
|
-
}), (
|
|
662
|
+
}), (C == null ? void 0 : C.newValue) !== void 0 && /* @__PURE__ */ g(O, {
|
|
668
663
|
children: [/* @__PURE__ */ r(N, {
|
|
669
664
|
children: /* @__PURE__ */ r(F, {
|
|
670
|
-
icon:
|
|
665
|
+
icon: We,
|
|
671
666
|
size: 12
|
|
672
667
|
})
|
|
673
668
|
}), /* @__PURE__ */ r(U, {
|
|
674
669
|
color: "var(--primary-action-color)",
|
|
675
670
|
variant: "bold",
|
|
676
|
-
children:
|
|
671
|
+
children: C.newValue
|
|
677
672
|
})]
|
|
678
673
|
}), y && be(y) && /* @__PURE__ */ r(D, {
|
|
679
674
|
num: 2
|
|
680
|
-
}),
|
|
681
|
-
label:
|
|
675
|
+
}), w && (C == null ? void 0 : C.modified) && (C == null ? void 0 : C.newValue) === "" ? /* @__PURE__ */ r(se, {
|
|
676
|
+
label: w,
|
|
682
677
|
zIndex: 100,
|
|
683
678
|
children: /* @__PURE__ */ r(F, {
|
|
684
679
|
icon: ue,
|
|
685
680
|
color: "var(--ui-alert1)",
|
|
686
681
|
size: 14
|
|
687
682
|
})
|
|
688
|
-
}) : /* @__PURE__ */ r(
|
|
683
|
+
}) : /* @__PURE__ */ r(Qe, {
|
|
689
684
|
crudStatus: y
|
|
690
685
|
})]
|
|
691
686
|
})
|
|
@@ -694,23 +689,23 @@ const Xe = P.createContext({}), br = ({
|
|
|
694
689
|
num: c
|
|
695
690
|
})]
|
|
696
691
|
});
|
|
697
|
-
},
|
|
692
|
+
}, ct = K(""), lt = K(
|
|
698
693
|
void 0
|
|
699
|
-
),
|
|
700
|
-
sortOrder:
|
|
694
|
+
), it = K(void 0), at = K(void 0), Pn = () => ({
|
|
695
|
+
sortOrder: _t(),
|
|
701
696
|
selectedIds: De(),
|
|
702
697
|
expandedRows: De(),
|
|
703
|
-
fields:
|
|
704
|
-
}), _ = (e, t) => `${e}.${t}`,
|
|
705
|
-
sortOrder:
|
|
698
|
+
fields: jt()
|
|
699
|
+
}), _ = (e, t) => `${e}.${t}`, dt = (e = void 0, t = !1, n = [], o = []) => ({
|
|
700
|
+
sortOrder: Wt(e, t),
|
|
706
701
|
selectedIds: Ne(n),
|
|
707
702
|
expandedRows: Ne(o),
|
|
708
703
|
fields: { lastSelectedId: void 0 }
|
|
709
|
-
}),
|
|
704
|
+
}), An = (e, t) => {
|
|
710
705
|
var l;
|
|
711
706
|
const n = de(
|
|
712
707
|
_(e, "sortOrder"),
|
|
713
|
-
|
|
708
|
+
qt(t == null ? void 0 : t.sortOrder)
|
|
714
709
|
), o = de(
|
|
715
710
|
_(e, "selectedIds"),
|
|
716
711
|
ze(t == null ? void 0 : t.selectedIds)
|
|
@@ -719,26 +714,26 @@ const Xe = P.createContext({}), br = ({
|
|
|
719
714
|
ze(t == null ? void 0 : t.expandedRows)
|
|
720
715
|
), c = de(
|
|
721
716
|
_(e, "fields"),
|
|
722
|
-
|
|
717
|
+
Ft((l = t == null ? void 0 : t.fields) != null ? l : {})
|
|
723
718
|
);
|
|
724
|
-
return
|
|
719
|
+
return Ut({
|
|
725
720
|
sortOrder: n,
|
|
726
721
|
selectedIds: o,
|
|
727
722
|
expandedRows: s,
|
|
728
723
|
fields: c
|
|
729
724
|
});
|
|
730
|
-
}, Re = () => $(
|
|
731
|
-
|
|
732
|
-
),
|
|
725
|
+
}, Re = () => $(ct), R = () => $(at), Q = () => $(lt), ce = () => $(it), ut = K([]), Z = () => $(
|
|
726
|
+
ut
|
|
727
|
+
), ht = () => {
|
|
733
728
|
const e = R(), t = Z();
|
|
734
729
|
let n = 0;
|
|
735
730
|
return e.enableExpandCollapse && n++, e.showRowCheckbox && n++, n + v(
|
|
736
731
|
() => t.map((o) => o.groupConfig.columnOrder.length).reduce((o, s) => o + s, 0),
|
|
737
732
|
[t]
|
|
738
733
|
);
|
|
739
|
-
},
|
|
734
|
+
}, pt = K(void 0), Ln = () => $(pt), mt = K(void 0), Bn = () => $(mt), wt = K(void 0), Dn = K(!1), Nn = () => $(wt), zn = K("standard"), Ct = K({}), Te = () => $(Ct), ft = K(0), Ge = () => $(ft), vt = (e, t, n) => {
|
|
740
735
|
var o;
|
|
741
|
-
return e ?
|
|
736
|
+
return e ? Xt(
|
|
742
737
|
(o = t == null ? void 0 : t.map((s) => {
|
|
743
738
|
const c = e == null ? void 0 : e[s];
|
|
744
739
|
return {
|
|
@@ -773,15 +768,15 @@ const Xe = P.createContext({}), br = ({
|
|
|
773
768
|
if (!n)
|
|
774
769
|
throw new Error("No config for column with id=" + e);
|
|
775
770
|
return n;
|
|
776
|
-
},
|
|
771
|
+
}, Kn = () => {
|
|
777
772
|
var n, o, s;
|
|
778
773
|
const e = R(), t = (s = (o = (n = Z()) == null ? void 0 : n[0]) == null ? void 0 : o.groupConfig.columnOrder) == null ? void 0 : s[0];
|
|
779
774
|
return t ? e.columns[t] : void 0;
|
|
780
|
-
},
|
|
775
|
+
}, $n = () => {
|
|
781
776
|
var s;
|
|
782
777
|
const e = R(), t = Z(), n = t[t.length - 1], o = (s = n == null ? void 0 : n.groupConfig.columnOrder[n.groupConfig.columnOrder.length - 1]) != null ? s : void 0;
|
|
783
778
|
return o ? e.columns[o] : void 0;
|
|
784
|
-
},
|
|
779
|
+
}, Hn = function({
|
|
785
780
|
columnId: t,
|
|
786
781
|
groupConfig: n,
|
|
787
782
|
borderFromGroup: o,
|
|
@@ -796,23 +791,23 @@ const Xe = P.createContext({}), br = ({
|
|
|
796
791
|
contentLeft: u,
|
|
797
792
|
contentRight: d,
|
|
798
793
|
loading: h,
|
|
799
|
-
error:
|
|
794
|
+
error: w
|
|
800
795
|
} = n, {
|
|
801
796
|
width: m,
|
|
802
|
-
minWidth:
|
|
797
|
+
minWidth: f,
|
|
803
798
|
zIndex: p,
|
|
804
|
-
borderLeft:
|
|
799
|
+
borderLeft: C
|
|
805
800
|
} = le(t), y = R(), {
|
|
806
801
|
stickyHeader: b,
|
|
807
802
|
headerRowOffsetTop: k
|
|
808
|
-
} = y, S = "columnGroupOrder" in y ? y.stickyColumnGroups : void 0, T =
|
|
803
|
+
} = y, S = "columnGroupOrder" in y ? y.stickyColumnGroups : void 0, T = Mn(o, C), G = c && (S === "first" || S === "both"), L = l && (S === "last" || S === "both"), x = G || L || b, z = G || L;
|
|
809
804
|
return /* @__PURE__ */ r("th", {
|
|
810
805
|
colSpan: s,
|
|
811
806
|
style: {
|
|
812
807
|
position: x ? "sticky" : void 0,
|
|
813
808
|
height: "var(--current-row-height)",
|
|
814
809
|
width: m,
|
|
815
|
-
minWidth: (A =
|
|
810
|
+
minWidth: (A = f != null ? f : m) != null ? A : "20px",
|
|
816
811
|
background: x ? "white" : "transparent",
|
|
817
812
|
left: G ? "var(--current-left-offset)" : void 0,
|
|
818
813
|
right: L ? "0px" : void 0,
|
|
@@ -829,7 +824,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
829
824
|
num: 0.5
|
|
830
825
|
})]
|
|
831
826
|
}), a ? a(n) : /* @__PURE__ */ r(N, {
|
|
832
|
-
children: /* @__PURE__ */ r(
|
|
827
|
+
children: /* @__PURE__ */ r(Ue, {
|
|
833
828
|
variant: "h5",
|
|
834
829
|
whiteSpace: "nowrap",
|
|
835
830
|
children: i
|
|
@@ -838,8 +833,8 @@ const Xe = P.createContext({}), br = ({
|
|
|
838
833
|
children: [/* @__PURE__ */ r(D, {
|
|
839
834
|
num: 0.5
|
|
840
835
|
}), d]
|
|
841
|
-
}), (
|
|
842
|
-
label:
|
|
836
|
+
}), (w || h) && /* @__PURE__ */ r(N, {}), h ? /* @__PURE__ */ r(ye, {}) : w ? /* @__PURE__ */ r(se, {
|
|
837
|
+
label: w,
|
|
843
838
|
placement: "bottom",
|
|
844
839
|
appendTo: document.body,
|
|
845
840
|
children: /* @__PURE__ */ r(F, {
|
|
@@ -851,25 +846,25 @@ const Xe = P.createContext({}), br = ({
|
|
|
851
846
|
})
|
|
852
847
|
})
|
|
853
848
|
});
|
|
854
|
-
},
|
|
849
|
+
}, Mn = (e, t) => {
|
|
855
850
|
if (e)
|
|
856
851
|
return e;
|
|
857
852
|
if (t)
|
|
858
853
|
return "1px solid transparent";
|
|
859
|
-
},
|
|
860
|
-
top: e ?
|
|
854
|
+
}, Vn = (e, t, n, o) => ({
|
|
855
|
+
top: e ? _n(e, n) : void 0,
|
|
861
856
|
background: e || t ? "white" : void 0,
|
|
862
857
|
position: e || t ? "sticky" : void 0,
|
|
863
858
|
boxShadow: t ? "var(--swui-sticky-column-shadow-right)" : void 0,
|
|
864
859
|
zIndex: e || t ? o != null ? o : "var(--swui-sticky-header-z-index)" : o
|
|
865
|
-
}),
|
|
860
|
+
}), _n = (e, t) => {
|
|
866
861
|
if (e && t)
|
|
867
862
|
return t;
|
|
868
863
|
if (t)
|
|
869
864
|
return t;
|
|
870
865
|
if (e)
|
|
871
866
|
return 0;
|
|
872
|
-
},
|
|
867
|
+
}, jn = P.memo(function({
|
|
873
868
|
height: t = Se
|
|
874
869
|
}) {
|
|
875
870
|
const n = Z(), o = R(), {
|
|
@@ -880,7 +875,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
880
875
|
stickyHeader: a,
|
|
881
876
|
stickyCheckboxColumn: u,
|
|
882
877
|
headerRowOffsetTop: d
|
|
883
|
-
} = o, h =
|
|
878
|
+
} = o, h = Vn(a, u, d, i), w = a ? "var(--swui-sticky-column-group-label-z-index)" : "var(--swui-sticky-group-group-z-index)";
|
|
884
879
|
return /* @__PURE__ */ g("tr", {
|
|
885
880
|
style: {
|
|
886
881
|
height: t,
|
|
@@ -893,32 +888,32 @@ const Xe = P.createContext({}), br = ({
|
|
|
893
888
|
...h,
|
|
894
889
|
width: "var(--swui-expand-cell-width)",
|
|
895
890
|
left: u ? "0px" : void 0,
|
|
896
|
-
zIndex:
|
|
891
|
+
zIndex: w
|
|
897
892
|
}
|
|
898
893
|
}), s && /* @__PURE__ */ r("th", {
|
|
899
894
|
style: {
|
|
900
895
|
...h,
|
|
901
896
|
left: u && c ? "var(--swui-expand-cell-width)" : u ? "0px" : void 0,
|
|
902
|
-
zIndex:
|
|
897
|
+
zIndex: w
|
|
903
898
|
}
|
|
904
899
|
}), n.map(({
|
|
905
900
|
groupConfig: m,
|
|
906
|
-
groupId:
|
|
907
|
-
}, p) => /* @__PURE__ */ r(
|
|
901
|
+
groupId: f
|
|
902
|
+
}, p) => /* @__PURE__ */ r(Hn, {
|
|
908
903
|
isFirstGroup: p === 0,
|
|
909
904
|
isLastGroup: p === n.length - 1,
|
|
910
905
|
groupConfig: m,
|
|
911
906
|
columnId: m.columnOrder[0],
|
|
912
907
|
colSpan: m.columnOrder.length,
|
|
913
908
|
borderFromGroup: pe(p, 0, m.borderLeft)
|
|
914
|
-
},
|
|
909
|
+
}, f)), l && /* @__PURE__ */ r("th", {
|
|
915
910
|
style: h
|
|
916
911
|
}), /* @__PURE__ */ r("th", {
|
|
917
912
|
style: h
|
|
918
913
|
})]
|
|
919
914
|
});
|
|
920
|
-
}),
|
|
921
|
-
const t =
|
|
915
|
+
}), Wn = (e) => {
|
|
916
|
+
const t = vt(
|
|
922
917
|
"columnGroups" in e ? e.columnGroups : void 0,
|
|
923
918
|
"columnGroupOrder" in e ? e.columnGroupOrder : void 0,
|
|
924
919
|
"columnOrder" in e ? e.columnOrder : void 0
|
|
@@ -926,23 +921,23 @@ const Xe = P.createContext({}), br = ({
|
|
|
926
921
|
let n = {}, o = 0;
|
|
927
922
|
return e.showRowCheckbox && o++, e.enableExpandCollapse && o++, t.forEach((s) => {
|
|
928
923
|
s.groupConfig.columnOrder.forEach((c) => {
|
|
929
|
-
|
|
924
|
+
qn(e.columns[c]) && (n[c] = o++);
|
|
930
925
|
});
|
|
931
926
|
}), {
|
|
932
927
|
columnIndexPerColumnId: n,
|
|
933
928
|
numNavigableColumns: o
|
|
934
929
|
};
|
|
935
|
-
},
|
|
930
|
+
}, qn = (e) => !e.disableGridCell, yt = K({
|
|
936
931
|
columnIndexPerColumnId: {},
|
|
937
932
|
numNavigableColumns: 0
|
|
938
|
-
}),
|
|
939
|
-
|
|
940
|
-
),
|
|
941
|
-
"columnGroupOrder" in e && (
|
|
933
|
+
}), xt = () => $(
|
|
934
|
+
yt
|
|
935
|
+
), Fn = (e) => {
|
|
936
|
+
"columnGroupOrder" in e && (Un(e), (e.stickyColumnGroups === "first" || e.stickyColumnGroups === "both") && He(e, 0), (e.stickyColumnGroups === "last" || e.stickyColumnGroups === "both") && He(
|
|
942
937
|
e,
|
|
943
938
|
e.columnGroupOrder.length - 1
|
|
944
939
|
));
|
|
945
|
-
},
|
|
940
|
+
}, Un = (e) => {
|
|
946
941
|
Object.keys(e.columns).forEach((n) => {
|
|
947
942
|
if (e.columns[n].sticky)
|
|
948
943
|
throw new Error(
|
|
@@ -966,13 +961,13 @@ const Xe = P.createContext({}), br = ({
|
|
|
966
961
|
"All columns in sticky column group must have width set."
|
|
967
962
|
);
|
|
968
963
|
});
|
|
969
|
-
},
|
|
964
|
+
}, Zn = (e) => {
|
|
970
965
|
const t = e.stickyColumnGroups === "first" || e.stickyColumnGroups === "both" ? Me(
|
|
971
|
-
|
|
966
|
+
Xn(e),
|
|
972
967
|
e.columns,
|
|
973
968
|
!0
|
|
974
969
|
) : void 0, n = e.stickyColumnGroups === "last" || e.stickyColumnGroups === "both" ? Me(
|
|
975
|
-
|
|
970
|
+
Yn(e),
|
|
976
971
|
e.columns,
|
|
977
972
|
!1
|
|
978
973
|
) : void 0;
|
|
@@ -987,17 +982,17 @@ const Xe = P.createContext({}), br = ({
|
|
|
987
982
|
];
|
|
988
983
|
for (let l = 0; l < e.length; l++) {
|
|
989
984
|
const i = e[l], a = t == null ? void 0 : t[i];
|
|
990
|
-
o[i] =
|
|
985
|
+
o[i] = Jn(s), s.push((c = a == null ? void 0 : a.width) != null ? c : "0px");
|
|
991
986
|
}
|
|
992
987
|
return o;
|
|
993
|
-
},
|
|
988
|
+
}, Jn = (e) => e.length === 0 ? "0px" : e.length === 1 ? e[0] : "calc(" + e.join(" + ") + ")", Xn = (e) => {
|
|
994
989
|
var o, s, c;
|
|
995
990
|
const t = (o = e.columnGroupOrder) == null ? void 0 : o[0];
|
|
996
991
|
if (!t)
|
|
997
992
|
return [];
|
|
998
993
|
const n = (s = e.columnGroups) == null ? void 0 : s[t];
|
|
999
994
|
return (c = n == null ? void 0 : n.columnOrder) != null ? c : [];
|
|
1000
|
-
},
|
|
995
|
+
}, Yn = (e) => {
|
|
1001
996
|
var s, c, l;
|
|
1002
997
|
const t = (c = e.columnGroupOrder) == null ? void 0 : c[((s = e.columnGroupOrder) == null ? void 0 : s.length) - 1];
|
|
1003
998
|
if (!t)
|
|
@@ -1007,7 +1002,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
1007
1002
|
return [];
|
|
1008
1003
|
const o = [...n.columnOrder];
|
|
1009
1004
|
return o.reverse(), o;
|
|
1010
|
-
},
|
|
1005
|
+
}, Qn = (e) => "columnGroups" in e ? to(e) : eo(e), eo = (e) => Object.keys(e.columns).reduce((n, o) => {
|
|
1011
1006
|
var l;
|
|
1012
1007
|
const s = e.columns[o], c = Boolean(s.sticky);
|
|
1013
1008
|
return n[o] = {
|
|
@@ -1018,23 +1013,23 @@ const Xe = P.createContext({}), br = ({
|
|
|
1018
1013
|
isFirstColumnInLastGroup: !1,
|
|
1019
1014
|
isLastColumnInFirstGroup: !1
|
|
1020
1015
|
}, n;
|
|
1021
|
-
}, {}),
|
|
1022
|
-
const t = {}, n = e.columnGroupOrder, o =
|
|
1016
|
+
}, {}), to = (e) => {
|
|
1017
|
+
const t = {}, n = e.columnGroupOrder, o = Zn(e), s = e.stickyColumnGroups === "first" || e.stickyColumnGroups === "both", c = e.stickyColumnGroups === "last" || e.stickyColumnGroups === "both";
|
|
1023
1018
|
return n.forEach((l, i) => {
|
|
1024
1019
|
const u = e.columnGroups[l].columnOrder;
|
|
1025
1020
|
u.forEach((d, h) => {
|
|
1026
|
-
const
|
|
1021
|
+
const w = i === 0, m = i === n.length - 1, f = w && s, p = m && c, C = h === 0 && m, y = h === u.length - 1 && w;
|
|
1027
1022
|
t[d] = {
|
|
1028
|
-
sticky:
|
|
1029
|
-
left:
|
|
1023
|
+
sticky: f || p,
|
|
1024
|
+
left: f ? o[d] : void 0,
|
|
1030
1025
|
right: p ? o[d] : void 0,
|
|
1031
|
-
type:
|
|
1032
|
-
isFirstColumnInLastGroup:
|
|
1026
|
+
type: f ? "first-group" : p ? "last-group" : void 0,
|
|
1027
|
+
isFirstColumnInLastGroup: C,
|
|
1033
1028
|
isLastColumnInFirstGroup: y
|
|
1034
1029
|
};
|
|
1035
1030
|
});
|
|
1036
1031
|
}), t;
|
|
1037
|
-
},
|
|
1032
|
+
}, no = (e, t) => ({
|
|
1038
1033
|
setSelectedIds: (n) => Y(
|
|
1039
1034
|
_(e, "selectedIds"),
|
|
1040
1035
|
t.selectedIds.setSelectedIds(n)
|
|
@@ -1063,14 +1058,14 @@ const Xe = P.createContext({}), br = ({
|
|
|
1063
1058
|
_(e, "fields"),
|
|
1064
1059
|
t.fields.setEntityFields({ lastSelectedId: n })
|
|
1065
1060
|
)
|
|
1066
|
-
}),
|
|
1067
|
-
const [n, o] =
|
|
1068
|
-
|
|
1061
|
+
}), oo = (e, t = dt()) => {
|
|
1062
|
+
const [n, o] = Rt(
|
|
1063
|
+
An(e),
|
|
1069
1064
|
t
|
|
1070
1065
|
), s = v(
|
|
1071
|
-
() =>
|
|
1066
|
+
() => no(
|
|
1072
1067
|
e,
|
|
1073
|
-
|
|
1068
|
+
Pn()
|
|
1074
1069
|
),
|
|
1075
1070
|
[e]
|
|
1076
1071
|
);
|
|
@@ -1084,15 +1079,15 @@ const Xe = P.createContext({}), br = ({
|
|
|
1084
1079
|
[n, s, o]
|
|
1085
1080
|
)
|
|
1086
1081
|
};
|
|
1087
|
-
},
|
|
1082
|
+
}, ro = (e) => (e.rowIndent ? 2 : 0) + (e.enableExpandCollapse ? 1 : 0) + (e.showRowCheckbox ? 1 : 0) + so(e), so = (e) => {
|
|
1088
1083
|
var t, n;
|
|
1089
1084
|
return "columnGroupOrder" in e ? e.columnGroupOrder.reduce((o, s) => {
|
|
1090
1085
|
var l, i, a;
|
|
1091
1086
|
const c = (l = e.columnGroups) == null ? void 0 : l[s];
|
|
1092
1087
|
return o + ((a = (i = c == null ? void 0 : c.columnOrder) == null ? void 0 : i.length) != null ? a : 0);
|
|
1093
1088
|
}, 0) : (n = (t = e.columnOrder) == null ? void 0 : t.length) != null ? n : 0;
|
|
1094
|
-
},
|
|
1095
|
-
const e = R(), t = Z(), n = e.enableExpandCollapse || e.showRowCheckbox, o =
|
|
1089
|
+
}, co = () => {
|
|
1090
|
+
const e = R(), t = Z(), n = e.enableExpandCollapse || e.showRowCheckbox, o = Bt(e.rowIndent);
|
|
1096
1091
|
return /* @__PURE__ */ g(O, {
|
|
1097
1092
|
children: [o ? /* @__PURE__ */ r("colgroup", {
|
|
1098
1093
|
children: /* @__PURE__ */ r("col", {
|
|
@@ -1128,19 +1123,19 @@ const Xe = P.createContext({}), br = ({
|
|
|
1128
1123
|
})
|
|
1129
1124
|
}) : null]
|
|
1130
1125
|
});
|
|
1131
|
-
},
|
|
1132
|
-
standardTable:
|
|
1133
|
-
relaxed:
|
|
1134
|
-
condensed:
|
|
1135
|
-
compact:
|
|
1136
|
-
},
|
|
1126
|
+
}, lo = "_standardTable_1iok0_1", io = "_relaxed_1iok0_37", ao = "_condensed_1iok0_41", uo = "_compact_1iok0_45", Ve = {
|
|
1127
|
+
standardTable: lo,
|
|
1128
|
+
relaxed: io,
|
|
1129
|
+
condensed: ao,
|
|
1130
|
+
compact: uo
|
|
1131
|
+
}, ho = (e, t) => e != null && t == null ? -1 : e == null && t != null ? 1 : fe(e, t, "number") ? Number(e) - Number(t) : fe(e, t, "boolean") ? Number(t) - Number(e) : fe(e, t, "string") ? String(e).localeCompare(String(t)) : e instanceof Date && t instanceof Date ? e.getTime() - t.getTime() : 0, fe = (e, t, n) => typeof e === n && typeof t === n, po = (e) => {
|
|
1137
1132
|
const { columns: t } = R();
|
|
1138
1133
|
if (!e)
|
|
1139
1134
|
return;
|
|
1140
1135
|
const n = t[e];
|
|
1141
1136
|
if (!!n)
|
|
1142
1137
|
return n.itemValueResolver;
|
|
1143
|
-
},
|
|
1138
|
+
}, mo = P.memo(function({
|
|
1144
1139
|
value: t,
|
|
1145
1140
|
onValueChange: n,
|
|
1146
1141
|
colIndex: o,
|
|
@@ -1150,23 +1145,23 @@ const Xe = P.createContext({}), br = ({
|
|
|
1150
1145
|
onValueChangeAndShift: i,
|
|
1151
1146
|
shiftPressedRef: a
|
|
1152
1147
|
}) {
|
|
1153
|
-
const u =
|
|
1148
|
+
const u = ht(), d = Re(), h = he(Boolean(t), {
|
|
1154
1149
|
colIndex: o,
|
|
1155
1150
|
numCols: u,
|
|
1156
1151
|
numRows: c,
|
|
1157
1152
|
rowIndex: s,
|
|
1158
1153
|
tableId: d
|
|
1159
1154
|
}), {
|
|
1160
|
-
requiredProps:
|
|
1161
|
-
} = h, m = I((
|
|
1162
|
-
a.current ? i == null || i(
|
|
1155
|
+
requiredProps: w
|
|
1156
|
+
} = h, m = I((f) => {
|
|
1157
|
+
a.current ? i == null || i(f) : n == null || n(f);
|
|
1163
1158
|
}, [n, i, a]);
|
|
1164
|
-
return /* @__PURE__ */ r(
|
|
1159
|
+
return /* @__PURE__ */ r(Xe, {
|
|
1165
1160
|
size: "small",
|
|
1166
1161
|
disabled: l,
|
|
1167
1162
|
value: t,
|
|
1168
1163
|
onValueChange: m,
|
|
1169
|
-
...
|
|
1164
|
+
...w
|
|
1170
1165
|
});
|
|
1171
1166
|
}), wo = (e, t, n) => {
|
|
1172
1167
|
if (t == null || n == null || e == null || t === n)
|
|
@@ -1186,7 +1181,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
1186
1181
|
} = ce(), a = v(() => n(e), [n, e]), u = v(
|
|
1187
1182
|
() => o.includes(a),
|
|
1188
1183
|
[o, a]
|
|
1189
|
-
), { toggle: d, addMultiple: h, removeMultiple:
|
|
1184
|
+
), { toggle: d, addMultiple: h, removeMultiple: w } = Ze(
|
|
1190
1185
|
o,
|
|
1191
1186
|
(p) => i(c(p))
|
|
1192
1187
|
), m = I(() => {
|
|
@@ -1196,7 +1191,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
1196
1191
|
s,
|
|
1197
1192
|
a
|
|
1198
1193
|
);
|
|
1199
|
-
p != null && p.length ? u ?
|
|
1194
|
+
p != null && p.length ? u ? w(p) : h(p) : d(a);
|
|
1200
1195
|
} else
|
|
1201
1196
|
d(a);
|
|
1202
1197
|
i(l(a));
|
|
@@ -1207,15 +1202,15 @@ const Xe = P.createContext({}), br = ({
|
|
|
1207
1202
|
l,
|
|
1208
1203
|
a,
|
|
1209
1204
|
u,
|
|
1210
|
-
|
|
1205
|
+
w,
|
|
1211
1206
|
h,
|
|
1212
1207
|
d
|
|
1213
|
-
]),
|
|
1208
|
+
]), f = I(() => {
|
|
1214
1209
|
d(a), i(l(a));
|
|
1215
1210
|
}, [d, a, i, l]);
|
|
1216
1211
|
return {
|
|
1217
1212
|
isSelected: u,
|
|
1218
|
-
toggleSelected:
|
|
1213
|
+
toggleSelected: f,
|
|
1219
1214
|
shiftAndToggleSelected: m
|
|
1220
1215
|
};
|
|
1221
1216
|
}, Pe = (e) => {
|
|
@@ -1227,7 +1222,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
1227
1222
|
} = ce(), c = v(() => t(e), [t, e]), l = v(
|
|
1228
1223
|
() => n.includes(c),
|
|
1229
1224
|
[n, c]
|
|
1230
|
-
), { toggle: i } =
|
|
1225
|
+
), { toggle: i } = Ze(
|
|
1231
1226
|
n,
|
|
1232
1227
|
(u) => s(o(u))
|
|
1233
1228
|
);
|
|
@@ -1237,13 +1232,13 @@ const Xe = P.createContext({}), br = ({
|
|
|
1237
1232
|
}, [i, c]),
|
|
1238
1233
|
isExpanded: l
|
|
1239
1234
|
};
|
|
1240
|
-
},
|
|
1235
|
+
}, fo = function({
|
|
1241
1236
|
item: e,
|
|
1242
1237
|
colIndex: t,
|
|
1243
1238
|
numRows: n,
|
|
1244
1239
|
rowIndex: o
|
|
1245
1240
|
}) {
|
|
1246
|
-
const s =
|
|
1241
|
+
const s = ht(), c = Re(), l = he(!0, {
|
|
1247
1242
|
colIndex: t,
|
|
1248
1243
|
numCols: s,
|
|
1249
1244
|
numRows: n,
|
|
@@ -1263,23 +1258,23 @@ const Xe = P.createContext({}), br = ({
|
|
|
1263
1258
|
indent: !0,
|
|
1264
1259
|
children: !h && /* @__PURE__ */ r(xe, {
|
|
1265
1260
|
size: "small",
|
|
1266
|
-
leftIcon: d ?
|
|
1261
|
+
leftIcon: d ? qe : Fe,
|
|
1267
1262
|
onClick: u,
|
|
1268
1263
|
...i
|
|
1269
1264
|
})
|
|
1270
1265
|
});
|
|
1271
|
-
},
|
|
1272
|
-
() =>
|
|
1266
|
+
}, vo = (e, t, n) => e ? e(t) : n, gt = (e, t, n) => v(
|
|
1267
|
+
() => vo(e, t, n),
|
|
1273
1268
|
[e, t, n]
|
|
1274
|
-
),
|
|
1269
|
+
), yo = (e, t) => {
|
|
1275
1270
|
const { background: n, backgroundResolver: o } = le(e);
|
|
1276
|
-
return
|
|
1271
|
+
return gt(o, t, n);
|
|
1277
1272
|
}, _e = (e, t) => {
|
|
1278
1273
|
const { background: n, backgroundResolver: o } = e != null ? e : {};
|
|
1279
|
-
return
|
|
1280
|
-
},
|
|
1281
|
-
standardTableCell:
|
|
1282
|
-
},
|
|
1274
|
+
return gt(o, t, n);
|
|
1275
|
+
}, xo = (e) => e == null ? "" : e instanceof Date ? e.toISOString() : typeof e == "object" ? JSON.stringify(e) : String(e), go = (e) => Yt(Qt(e)), bo = "_standardTableCell_1xzcm_1", ko = {
|
|
1276
|
+
standardTableCell: bo
|
|
1277
|
+
}, So = P.memo(function({
|
|
1283
1278
|
enableGridCell: t,
|
|
1284
1279
|
children: n,
|
|
1285
1280
|
background: o,
|
|
@@ -1299,7 +1294,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
1299
1294
|
onKeyDown: i,
|
|
1300
1295
|
children: /* @__PURE__ */ r(E, {
|
|
1301
1296
|
border: "1px solid transparent",
|
|
1302
|
-
className:
|
|
1297
|
+
className: ko.standardTableCell,
|
|
1303
1298
|
width: "100%",
|
|
1304
1299
|
height: "100%",
|
|
1305
1300
|
justifyContent: l,
|
|
@@ -1311,20 +1306,20 @@ const Xe = P.createContext({}), br = ({
|
|
|
1311
1306
|
children: n
|
|
1312
1307
|
})
|
|
1313
1308
|
});
|
|
1314
|
-
}),
|
|
1315
|
-
textCell:
|
|
1316
|
-
},
|
|
1309
|
+
}), Io = "_textCell_1yv6v_1", Eo = {
|
|
1310
|
+
textCell: Io
|
|
1311
|
+
}, Ro = P.memo(function({
|
|
1317
1312
|
label: t
|
|
1318
1313
|
}) {
|
|
1319
1314
|
return /* @__PURE__ */ r(N, {
|
|
1320
1315
|
overflow: "hidden",
|
|
1321
1316
|
children: /* @__PURE__ */ r(U, {
|
|
1322
|
-
className:
|
|
1317
|
+
className: Eo.textCell,
|
|
1323
1318
|
title: t,
|
|
1324
1319
|
children: t
|
|
1325
1320
|
})
|
|
1326
1321
|
});
|
|
1327
|
-
}),
|
|
1322
|
+
}), To = P.memo(function({
|
|
1328
1323
|
columnId: t,
|
|
1329
1324
|
item: n,
|
|
1330
1325
|
colIndex: o,
|
|
@@ -1338,9 +1333,9 @@ const Xe = P.createContext({}), br = ({
|
|
|
1338
1333
|
keyResolver: a,
|
|
1339
1334
|
enableGridCell: u,
|
|
1340
1335
|
gridCellOptions: d
|
|
1341
|
-
} = R(), h = Q().selectedIds.selectedIds,
|
|
1342
|
-
numNavigableColumns:
|
|
1343
|
-
} =
|
|
1336
|
+
} = R(), h = Q().selectedIds.selectedIds, w = Re(), m = Ln(), {
|
|
1337
|
+
numNavigableColumns: f
|
|
1338
|
+
} = xt(), p = Te(), C = v(() => a(n), [n, a]), y = v(() => h.indexOf(C) >= 0, [C, h]), {
|
|
1344
1339
|
itemValueResolver: b,
|
|
1345
1340
|
itemLabelFormatter: k,
|
|
1346
1341
|
width: S,
|
|
@@ -1355,7 +1350,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
1355
1350
|
disableGridCell: M,
|
|
1356
1351
|
disableGridCellFocus: J,
|
|
1357
1352
|
zIndex: V
|
|
1358
|
-
} = le(t), q = v(() => b ? b(n) : t in n ? n[t] : "", [b, n, t]), ee = v(() => k ? k(q, n) :
|
|
1353
|
+
} = le(t), q = v(() => b ? b(n) : t in n ? n[t] : "", [b, n, t]), ee = v(() => k ? k(q, n) : xo(q), [q, k, n]), te = typeof A == "boolean" ? A : A ? A(n) : void 0, me = I((ae) => {
|
|
1359
1354
|
H == null || H(ae, {
|
|
1360
1355
|
columnId: t,
|
|
1361
1356
|
item: n
|
|
@@ -1367,36 +1362,36 @@ const Xe = P.createContext({}), br = ({
|
|
|
1367
1362
|
colIndex: o,
|
|
1368
1363
|
rowIndex: s,
|
|
1369
1364
|
numRows: c,
|
|
1370
|
-
numCols:
|
|
1371
|
-
tableId:
|
|
1365
|
+
numCols: f,
|
|
1366
|
+
tableId: w,
|
|
1372
1367
|
isEditable: te,
|
|
1373
1368
|
onChange: W ? (ae) => W(n, ae) : void 0,
|
|
1374
1369
|
...d,
|
|
1375
1370
|
...z
|
|
1376
|
-
}), B = p[t], ie = (Ae =
|
|
1371
|
+
}), B = p[t], ie = (Ae = yo(t, n)) != null ? Ae : "inherit", we = B.sticky ? V != null ? V : "var(--swui-sticky-column-z-index)" : V != null ? V : 1, St = v(() => x ? x({
|
|
1377
1372
|
label: ee,
|
|
1378
1373
|
value: q,
|
|
1379
1374
|
item: n,
|
|
1380
1375
|
gridCell: X,
|
|
1381
1376
|
isEditable: te,
|
|
1382
1377
|
isSelected: y,
|
|
1383
|
-
zIndex:
|
|
1384
|
-
itemKey:
|
|
1385
|
-
}) : /* @__PURE__ */ r(
|
|
1378
|
+
zIndex: we,
|
|
1379
|
+
itemKey: C
|
|
1380
|
+
}) : /* @__PURE__ */ r(Ro, {
|
|
1386
1381
|
label: ee
|
|
1387
|
-
}), [x, ee, q, n, X, te, y,
|
|
1382
|
+
}), [x, ee, q, n, X, te, y, we, C]), It = Oe(l, i, L), Et = B.sticky && B.type === "last-group" && B.isFirstColumnInLastGroup || B.sticky && B.type === "column" && B.right ? "var(--swui-sticky-column-shadow-left)" : B.sticky ? "var(--swui-sticky-column-shadow-right)" : void 0;
|
|
1388
1383
|
return /* @__PURE__ */ r("td", {
|
|
1389
1384
|
style: {
|
|
1390
|
-
borderLeft:
|
|
1385
|
+
borderLeft: It,
|
|
1391
1386
|
position: B.sticky ? "sticky" : void 0,
|
|
1392
1387
|
left: B.sticky ? B.left : void 0,
|
|
1393
1388
|
right: B.sticky ? B.right : void 0,
|
|
1394
|
-
boxShadow:
|
|
1395
|
-
zIndex:
|
|
1389
|
+
boxShadow: Et,
|
|
1390
|
+
zIndex: we,
|
|
1396
1391
|
height: "var(--current-row-height)",
|
|
1397
1392
|
background: ie
|
|
1398
1393
|
},
|
|
1399
|
-
children: /* @__PURE__ */ r(
|
|
1394
|
+
children: /* @__PURE__ */ r(So, {
|
|
1400
1395
|
enableGridCell: u && !M && !J,
|
|
1401
1396
|
gridCellRequiredProps: X.requiredProps,
|
|
1402
1397
|
isEditing: X.isEditing,
|
|
@@ -1404,10 +1399,10 @@ const Xe = P.createContext({}), br = ({
|
|
|
1404
1399
|
minWidth: T,
|
|
1405
1400
|
justifyContent: G,
|
|
1406
1401
|
onKeyDown: me,
|
|
1407
|
-
children:
|
|
1402
|
+
children: St
|
|
1408
1403
|
})
|
|
1409
1404
|
});
|
|
1410
|
-
}),
|
|
1405
|
+
}), Go = function({
|
|
1411
1406
|
item: t
|
|
1412
1407
|
}) {
|
|
1413
1408
|
const {
|
|
@@ -1420,8 +1415,8 @@ const Xe = P.createContext({}), br = ({
|
|
|
1420
1415
|
return /* @__PURE__ */ r(O, {
|
|
1421
1416
|
children: o && n && s && /* @__PURE__ */ r("tr", {
|
|
1422
1417
|
style: {
|
|
1423
|
-
borderLeft:
|
|
1424
|
-
background:
|
|
1418
|
+
borderLeft: tt,
|
|
1419
|
+
background: et
|
|
1425
1420
|
},
|
|
1426
1421
|
children: /* @__PURE__ */ r("td", {
|
|
1427
1422
|
colSpan: l,
|
|
@@ -1431,7 +1426,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
1431
1426
|
})
|
|
1432
1427
|
})
|
|
1433
1428
|
});
|
|
1434
|
-
},
|
|
1429
|
+
}, bt = en.tr`
|
|
1435
1430
|
${({
|
|
1436
1431
|
focusBackground: e
|
|
1437
1432
|
}) => e ? `--focus-within-background: ${e};` : ""}
|
|
@@ -1450,7 +1445,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
1450
1445
|
background: ${e};
|
|
1451
1446
|
}
|
|
1452
1447
|
` : ""}
|
|
1453
|
-
`,
|
|
1448
|
+
`, Oo = P.memo(function({
|
|
1454
1449
|
item: t,
|
|
1455
1450
|
idListForEnabledItems: n,
|
|
1456
1451
|
rowIndex: o,
|
|
@@ -1462,12 +1457,12 @@ const Xe = P.createContext({}), br = ({
|
|
|
1462
1457
|
const a = ne(null), u = Ge(), {
|
|
1463
1458
|
stickyCheckboxColumn: d
|
|
1464
1459
|
} = R(), h = Z(), {
|
|
1465
|
-
columnIndexPerColumnId:
|
|
1466
|
-
} =
|
|
1460
|
+
columnIndexPerColumnId: w
|
|
1461
|
+
} = xt(), {
|
|
1467
1462
|
showRowCheckbox: m,
|
|
1468
|
-
rowBackgroundResolver:
|
|
1463
|
+
rowBackgroundResolver: f,
|
|
1469
1464
|
checkboxDisabledResolver: p,
|
|
1470
|
-
enableGridCell:
|
|
1465
|
+
enableGridCell: C,
|
|
1471
1466
|
rowIndent: y,
|
|
1472
1467
|
enableExpandCollapse: b
|
|
1473
1468
|
} = R(), {
|
|
@@ -1476,10 +1471,10 @@ const Xe = P.createContext({}), br = ({
|
|
|
1476
1471
|
isSelected: S,
|
|
1477
1472
|
toggleSelected: T,
|
|
1478
1473
|
shiftAndToggleSelected: G
|
|
1479
|
-
} = Co(t, n), L =
|
|
1474
|
+
} = Co(t, n), L = Dt(a, {
|
|
1480
1475
|
rootMargin: "400px 0px 400px 0px",
|
|
1481
1476
|
threshold: 0
|
|
1482
|
-
}), x = v(() =>
|
|
1477
|
+
}), x = v(() => f == null ? void 0 : f(t, S), [S, t, f]), z = Po(x, S, k), A = Ao(x, S, k), W = Lo(x, S, A), H = v(() => p == null ? void 0 : p(t), [t, p]), M = Kn(), J = _e(M, t), V = $n(), q = _e(V, t), ee = v(() => /* @__PURE__ */ r(O, {
|
|
1483
1478
|
children: /* @__PURE__ */ g(O, {
|
|
1484
1479
|
children: [y && /* @__PURE__ */ r("td", {
|
|
1485
1480
|
style: {
|
|
@@ -1501,10 +1496,10 @@ const Xe = P.createContext({}), br = ({
|
|
|
1501
1496
|
minWidth: "var(--swui-expand-cell-width)",
|
|
1502
1497
|
alignItems: "center",
|
|
1503
1498
|
justifyContent: "center",
|
|
1504
|
-
children: /* @__PURE__ */ r(
|
|
1499
|
+
children: /* @__PURE__ */ r(fo, {
|
|
1505
1500
|
colIndex: c,
|
|
1506
|
-
rowIndex:
|
|
1507
|
-
numRows:
|
|
1501
|
+
rowIndex: C ? o : 0,
|
|
1502
|
+
numRows: C ? s : 0,
|
|
1508
1503
|
item: t
|
|
1509
1504
|
})
|
|
1510
1505
|
})
|
|
@@ -1522,7 +1517,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
1522
1517
|
minWidth: "var(--swui-checkbox-cell-width)",
|
|
1523
1518
|
alignItems: "center",
|
|
1524
1519
|
justifyContent: "center",
|
|
1525
|
-
children: /* @__PURE__ */ r(
|
|
1520
|
+
children: /* @__PURE__ */ r(mo, {
|
|
1526
1521
|
disabled: H,
|
|
1527
1522
|
value: S,
|
|
1528
1523
|
onValueChange: T,
|
|
@@ -1537,10 +1532,10 @@ const Xe = P.createContext({}), br = ({
|
|
|
1537
1532
|
groupConfig: te,
|
|
1538
1533
|
groupId: me
|
|
1539
1534
|
}, X) => /* @__PURE__ */ r(P.Fragment, {
|
|
1540
|
-
children: te.columnOrder.map((B, ie) => /* @__PURE__ */ r(
|
|
1535
|
+
children: te.columnOrder.map((B, ie) => /* @__PURE__ */ r(To, {
|
|
1541
1536
|
columnId: B,
|
|
1542
1537
|
item: t,
|
|
1543
|
-
colIndex: c +
|
|
1538
|
+
colIndex: c + w[B],
|
|
1544
1539
|
rowIndex: o,
|
|
1545
1540
|
numRows: s,
|
|
1546
1541
|
borderFromGroup: pe(X, ie, te.borderLeft),
|
|
@@ -1555,13 +1550,13 @@ const Xe = P.createContext({}), br = ({
|
|
|
1555
1550
|
})
|
|
1556
1551
|
}), /* @__PURE__ */ r("td", {})]
|
|
1557
1552
|
})
|
|
1558
|
-
}), [c,
|
|
1553
|
+
}), [c, w, H, b, C, J, h, S, t, q, s, y, o, G, i, m, d, T]);
|
|
1559
1554
|
return /* @__PURE__ */ g(O, {
|
|
1560
|
-
children: [/* @__PURE__ */ r(
|
|
1555
|
+
children: [/* @__PURE__ */ r(bt, {
|
|
1561
1556
|
hoverBackground: A,
|
|
1562
1557
|
background: z,
|
|
1563
1558
|
focusBackground: W,
|
|
1564
|
-
borderLeft: k ?
|
|
1559
|
+
borderLeft: k ? tt : ke,
|
|
1565
1560
|
ref: a,
|
|
1566
1561
|
children: L || l || k ? ee : /* @__PURE__ */ r("td", {
|
|
1567
1562
|
colSpan: u,
|
|
@@ -1569,18 +1564,18 @@ const Xe = P.createContext({}), br = ({
|
|
|
1569
1564
|
height: "var(--current-row-height)"
|
|
1570
1565
|
}
|
|
1571
1566
|
})
|
|
1572
|
-
}), /* @__PURE__ */ r(
|
|
1567
|
+
}), /* @__PURE__ */ r(Go, {
|
|
1573
1568
|
item: t
|
|
1574
1569
|
})]
|
|
1575
1570
|
});
|
|
1576
|
-
}),
|
|
1571
|
+
}), Po = (e, t, n) => e ? typeof e == "string" ? e : e == null ? void 0 : e.background : t ? j("--lhds-color-blue-100") : n ? et : "white", Ao = (e, t, n) => e ? typeof e == "string" ? e : e == null ? void 0 : e.hoverBackground : t ? j("--lhds-color-blue-200") : n ? sn : j("--lhds-color-ui-200"), Lo = (e, t, n) => {
|
|
1577
1572
|
if (t)
|
|
1578
1573
|
return j("--lhds-color-blue-200");
|
|
1579
1574
|
if (e)
|
|
1580
1575
|
return n;
|
|
1581
|
-
},
|
|
1582
|
-
summaryRow:
|
|
1583
|
-
},
|
|
1576
|
+
}, Bo = (e) => Object.values(e).some((t) => Do(t)), Do = (e) => Boolean(e.renderSummaryCell || e.summaryText), No = "_summaryRow_12x8k_1", zo = {
|
|
1577
|
+
summaryRow: No
|
|
1578
|
+
}, Ko = P.memo(function({
|
|
1584
1579
|
columnId: t,
|
|
1585
1580
|
items: n,
|
|
1586
1581
|
disableBorderLeft: o,
|
|
@@ -1593,9 +1588,9 @@ const Xe = P.createContext({}), br = ({
|
|
|
1593
1588
|
borderLeft: u,
|
|
1594
1589
|
zIndex: d,
|
|
1595
1590
|
width: h,
|
|
1596
|
-
minWidth:
|
|
1591
|
+
minWidth: w,
|
|
1597
1592
|
justifyContentCell: m
|
|
1598
|
-
} = le(t),
|
|
1593
|
+
} = le(t), f = Oe(s, o, u), p = l[t], C = p.sticky ? d != null ? d : "var(--swui-sticky-column-z-index)" : d != null ? d : 1, y = p.sticky && p.type === "last-group" && p.isFirstColumnInLastGroup || p.sticky && p.type === "column" && p.right ? "var(--swui-sticky-column-shadow-left)" : p.sticky ? "var(--swui-sticky-column-shadow-right)" : void 0, b = v(() => a == null ? void 0 : a({
|
|
1599
1594
|
items: n
|
|
1600
1595
|
}), [n, a]), k = v(() => i == null ? void 0 : i({
|
|
1601
1596
|
items: n,
|
|
@@ -1604,17 +1599,17 @@ const Xe = P.createContext({}), br = ({
|
|
|
1604
1599
|
return /* @__PURE__ */ r("td", {
|
|
1605
1600
|
colSpan: c,
|
|
1606
1601
|
style: {
|
|
1607
|
-
borderLeft:
|
|
1602
|
+
borderLeft: f,
|
|
1608
1603
|
position: p.sticky ? "sticky" : void 0,
|
|
1609
1604
|
left: p.sticky ? p.left : void 0,
|
|
1610
1605
|
right: p.sticky ? p.right : void 0,
|
|
1611
1606
|
boxShadow: y,
|
|
1612
|
-
zIndex:
|
|
1607
|
+
zIndex: C,
|
|
1613
1608
|
height: "var(--current-row-height)"
|
|
1614
1609
|
},
|
|
1615
1610
|
children: /* @__PURE__ */ r(E, {
|
|
1616
1611
|
width: h,
|
|
1617
|
-
minWidth:
|
|
1612
|
+
minWidth: w,
|
|
1618
1613
|
height: "inherit",
|
|
1619
1614
|
overflow: "hidden",
|
|
1620
1615
|
justifyContent: m,
|
|
@@ -1627,7 +1622,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
1627
1622
|
})
|
|
1628
1623
|
})
|
|
1629
1624
|
});
|
|
1630
|
-
}),
|
|
1625
|
+
}), $o = (e, t) => {
|
|
1631
1626
|
const n = [];
|
|
1632
1627
|
for (let o = 0; o < e.length; o++) {
|
|
1633
1628
|
const { summaryCellColSpan: s } = t[e[o]], c = Math.min(
|
|
@@ -1639,7 +1634,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
1639
1634
|
l > 1 && (o += l - 1);
|
|
1640
1635
|
}
|
|
1641
1636
|
return n;
|
|
1642
|
-
},
|
|
1637
|
+
}, Ho = P.memo(function({
|
|
1643
1638
|
items: t
|
|
1644
1639
|
}) {
|
|
1645
1640
|
const n = Z(), {
|
|
@@ -1649,7 +1644,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
1649
1644
|
rowIndent: l
|
|
1650
1645
|
} = R();
|
|
1651
1646
|
return /* @__PURE__ */ g("tr", {
|
|
1652
|
-
className:
|
|
1647
|
+
className: zo.summaryRow,
|
|
1653
1648
|
children: [l && /* @__PURE__ */ r("td", {
|
|
1654
1649
|
children: /* @__PURE__ */ r(N, {
|
|
1655
1650
|
num: l
|
|
@@ -1658,15 +1653,15 @@ const Xe = P.createContext({}), br = ({
|
|
|
1658
1653
|
groupConfig: i,
|
|
1659
1654
|
groupId: a
|
|
1660
1655
|
}, u) => /* @__PURE__ */ r(P.Fragment, {
|
|
1661
|
-
children:
|
|
1656
|
+
children: $o(i.columnOrder, c).map(({
|
|
1662
1657
|
columnId: d,
|
|
1663
1658
|
colSpan: h
|
|
1664
|
-
},
|
|
1659
|
+
}, w) => /* @__PURE__ */ r(Ko, {
|
|
1665
1660
|
colSpan: h,
|
|
1666
1661
|
columnId: d,
|
|
1667
1662
|
items: t,
|
|
1668
|
-
borderFromGroup: pe(u,
|
|
1669
|
-
disableBorderLeft: u === 0 &&
|
|
1663
|
+
borderFromGroup: pe(u, w, i.borderLeft),
|
|
1664
|
+
disableBorderLeft: u === 0 && w === 0
|
|
1670
1665
|
}, d))
|
|
1671
1666
|
}, a)), l && /* @__PURE__ */ r("td", {
|
|
1672
1667
|
children: /* @__PURE__ */ r(N, {
|
|
@@ -1674,16 +1669,16 @@ const Xe = P.createContext({}), br = ({
|
|
|
1674
1669
|
})
|
|
1675
1670
|
}), /* @__PURE__ */ r("td", {})]
|
|
1676
1671
|
});
|
|
1677
|
-
}),
|
|
1672
|
+
}), Mo = function({
|
|
1678
1673
|
items: t
|
|
1679
1674
|
}) {
|
|
1680
1675
|
const {
|
|
1681
1676
|
columns: n
|
|
1682
1677
|
} = R();
|
|
1683
|
-
return v(() =>
|
|
1678
|
+
return v(() => Bo(n), [n]) ? /* @__PURE__ */ r(Ho, {
|
|
1684
1679
|
items: t
|
|
1685
1680
|
}) : null;
|
|
1686
|
-
},
|
|
1681
|
+
}, kt = (e) => (t) => !(e != null && e(t)), Vo = P.memo(function({
|
|
1687
1682
|
items: t,
|
|
1688
1683
|
colIndexOffset: n = 0,
|
|
1689
1684
|
rowIndexOffset: o = 0
|
|
@@ -1698,39 +1693,39 @@ const Xe = P.createContext({}), br = ({
|
|
|
1698
1693
|
sortBy: d,
|
|
1699
1694
|
desc: h
|
|
1700
1695
|
}
|
|
1701
|
-
} = Q(),
|
|
1696
|
+
} = Q(), w = po(d), m = v(() => {
|
|
1702
1697
|
if (u)
|
|
1703
1698
|
return t != null ? t : [];
|
|
1704
1699
|
if (!t || !t.length)
|
|
1705
1700
|
return [];
|
|
1706
|
-
if (!
|
|
1701
|
+
if (!w)
|
|
1707
1702
|
return t;
|
|
1708
1703
|
const p = [...t];
|
|
1709
|
-
return p.sort((
|
|
1710
|
-
}, [u, t,
|
|
1704
|
+
return p.sort((C, y) => ho(w(C), w(y))), h && p.reverse(), i || s.current++, p;
|
|
1705
|
+
}, [u, t, w, h, i]), f = v(() => m.filter(kt(a)).map((p) => l(p)), [m, a, l]);
|
|
1711
1706
|
return je(() => {
|
|
1712
1707
|
const p = (y) => {
|
|
1713
1708
|
y.key === "Shift" && (c.current = !1);
|
|
1714
|
-
},
|
|
1709
|
+
}, C = (y) => {
|
|
1715
1710
|
y.key === "Shift" && (c.current = !0);
|
|
1716
1711
|
};
|
|
1717
|
-
return document.addEventListener("keyup", p), document.addEventListener("keydown",
|
|
1718
|
-
document.removeEventListener("keyup", p), document.removeEventListener("keydown",
|
|
1712
|
+
return document.addEventListener("keyup", p), document.addEventListener("keydown", C), () => {
|
|
1713
|
+
document.removeEventListener("keyup", p), document.removeEventListener("keydown", C);
|
|
1719
1714
|
};
|
|
1720
1715
|
}, []), /* @__PURE__ */ g(P.Fragment, {
|
|
1721
|
-
children: [m.map((p,
|
|
1716
|
+
children: [m.map((p, C) => /* @__PURE__ */ r(Oo, {
|
|
1722
1717
|
alwaysVisible: i || m.length < 30,
|
|
1723
1718
|
item: p,
|
|
1724
|
-
idListForEnabledItems:
|
|
1719
|
+
idListForEnabledItems: f,
|
|
1725
1720
|
colIndexOffset: n,
|
|
1726
|
-
rowIndex:
|
|
1721
|
+
rowIndex: C + o,
|
|
1727
1722
|
numRows: m.length,
|
|
1728
1723
|
shiftPressedRef: c
|
|
1729
|
-
}, l(p))), /* @__PURE__ */ r(
|
|
1724
|
+
}, l(p))), /* @__PURE__ */ r(Mo, {
|
|
1730
1725
|
items: m
|
|
1731
1726
|
})]
|
|
1732
1727
|
}, s.current);
|
|
1733
|
-
}),
|
|
1728
|
+
}), _o = P.memo(function({
|
|
1734
1729
|
error: t,
|
|
1735
1730
|
bannerError: n,
|
|
1736
1731
|
loading: o,
|
|
@@ -1742,20 +1737,20 @@ const Xe = P.createContext({}), br = ({
|
|
|
1742
1737
|
colIndexOffset: u,
|
|
1743
1738
|
rowIndexOffset: d,
|
|
1744
1739
|
variant: h,
|
|
1745
|
-
errorLabel:
|
|
1740
|
+
errorLabel: w
|
|
1746
1741
|
}) {
|
|
1747
|
-
var
|
|
1742
|
+
var f;
|
|
1748
1743
|
const m = Ge();
|
|
1749
1744
|
return n ? /* @__PURE__ */ r("tbody", {
|
|
1750
1745
|
children: /* @__PURE__ */ r("tr", {
|
|
1751
1746
|
children: /* @__PURE__ */ r("td", {
|
|
1752
1747
|
colSpan: m,
|
|
1753
|
-
children: /* @__PURE__ */ r(
|
|
1748
|
+
children: /* @__PURE__ */ r(Ce, {
|
|
1754
1749
|
num: 4,
|
|
1755
1750
|
justifyContent: "center",
|
|
1756
1751
|
children: /* @__PURE__ */ r(oe, {
|
|
1757
1752
|
alignItems: "center",
|
|
1758
|
-
children: /* @__PURE__ */ r(
|
|
1753
|
+
children: /* @__PURE__ */ r(Pt, {
|
|
1759
1754
|
bannerState: n,
|
|
1760
1755
|
variant: "error"
|
|
1761
1756
|
})
|
|
@@ -1763,17 +1758,17 @@ const Xe = P.createContext({}), br = ({
|
|
|
1763
1758
|
})
|
|
1764
1759
|
})
|
|
1765
1760
|
})
|
|
1766
|
-
}) : t ||
|
|
1761
|
+
}) : t || w ? /* @__PURE__ */ r("tbody", {
|
|
1767
1762
|
children: /* @__PURE__ */ r("tr", {
|
|
1768
1763
|
children: /* @__PURE__ */ r("td", {
|
|
1769
1764
|
colSpan: m,
|
|
1770
|
-
children: /* @__PURE__ */ r(
|
|
1765
|
+
children: /* @__PURE__ */ r(Ce, {
|
|
1771
1766
|
num: 4,
|
|
1772
1767
|
justifyContent: "center",
|
|
1773
1768
|
children: /* @__PURE__ */ r(oe, {
|
|
1774
1769
|
alignItems: "center",
|
|
1775
1770
|
children: /* @__PURE__ */ r(Le, {
|
|
1776
|
-
headerText: (
|
|
1771
|
+
headerText: (f = t ? t.message : w) != null ? f : "Unknown error",
|
|
1777
1772
|
variant: "error"
|
|
1778
1773
|
})
|
|
1779
1774
|
})
|
|
@@ -1784,9 +1779,9 @@ const Xe = P.createContext({}), br = ({
|
|
|
1784
1779
|
children: /* @__PURE__ */ r("tr", {
|
|
1785
1780
|
children: /* @__PURE__ */ r("td", {
|
|
1786
1781
|
colSpan: m,
|
|
1787
|
-
children: /* @__PURE__ */ r(
|
|
1782
|
+
children: /* @__PURE__ */ r(Ce, {
|
|
1788
1783
|
num: 4,
|
|
1789
|
-
children: /* @__PURE__ */ r(
|
|
1784
|
+
children: /* @__PURE__ */ r(Zt, {})
|
|
1790
1785
|
})
|
|
1791
1786
|
})
|
|
1792
1787
|
})
|
|
@@ -1808,14 +1803,14 @@ const Xe = P.createContext({}), br = ({
|
|
|
1808
1803
|
})
|
|
1809
1804
|
})
|
|
1810
1805
|
}) : /* @__PURE__ */ r("tbody", {
|
|
1811
|
-
children: /* @__PURE__ */ r(
|
|
1806
|
+
children: /* @__PURE__ */ r(Vo, {
|
|
1812
1807
|
variant: h,
|
|
1813
1808
|
items: s,
|
|
1814
1809
|
colIndexOffset: u,
|
|
1815
1810
|
rowIndexOffset: d
|
|
1816
1811
|
})
|
|
1817
1812
|
});
|
|
1818
|
-
}),
|
|
1813
|
+
}), jo = (e) => {
|
|
1819
1814
|
const { keyResolver: t, checkboxDisabledResolver: n } = R(), {
|
|
1820
1815
|
selectedIds: { selectedIds: o }
|
|
1821
1816
|
} = Q(), {
|
|
@@ -1824,7 +1819,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
1824
1819
|
} = ce(), i = o.length === 0, a = e ? e.length > 0 && o.length === e.length : !1, u = I(() => {
|
|
1825
1820
|
e && l(
|
|
1826
1821
|
i ? s(
|
|
1827
|
-
e.filter(
|
|
1822
|
+
e.filter(kt(n)).map((d) => t(d))
|
|
1828
1823
|
) : c()
|
|
1829
1824
|
);
|
|
1830
1825
|
}, [
|
|
@@ -1841,7 +1836,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
1841
1836
|
allItemsAreSelected: a,
|
|
1842
1837
|
onClickCheckbox: u
|
|
1843
1838
|
};
|
|
1844
|
-
},
|
|
1839
|
+
}, Wo = (e) => {
|
|
1845
1840
|
const { keyResolver: t } = R(), {
|
|
1846
1841
|
expandedRows: { selectedIds: n }
|
|
1847
1842
|
} = Q(), {
|
|
@@ -1861,8 +1856,8 @@ const Xe = P.createContext({}), br = ({
|
|
|
1861
1856
|
allItemsAreExpanded: l,
|
|
1862
1857
|
toggleExpanded: i
|
|
1863
1858
|
};
|
|
1864
|
-
},
|
|
1865
|
-
const { dispatch: t, actions: n } = ce(), o =
|
|
1859
|
+
}, qo = (e) => {
|
|
1860
|
+
const { dispatch: t, actions: n } = ce(), o = Bn(), {
|
|
1866
1861
|
sortOrder: { desc: s, sortBy: c }
|
|
1867
1862
|
} = Q();
|
|
1868
1863
|
return v(() => {
|
|
@@ -1877,7 +1872,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
1877
1872
|
}
|
|
1878
1873
|
};
|
|
1879
1874
|
}, [e, c, s, t, n, o]);
|
|
1880
|
-
},
|
|
1875
|
+
}, Fo = P.memo(function({
|
|
1881
1876
|
columnId: t,
|
|
1882
1877
|
borderFromGroup: n,
|
|
1883
1878
|
disableBorderLeft: o,
|
|
@@ -1891,18 +1886,18 @@ const Xe = P.createContext({}), br = ({
|
|
|
1891
1886
|
borderLeft: u,
|
|
1892
1887
|
infoIconTooltipText: d,
|
|
1893
1888
|
background: h,
|
|
1894
|
-
zIndex:
|
|
1889
|
+
zIndex: w,
|
|
1895
1890
|
sortOrderIconVariant: m,
|
|
1896
|
-
width:
|
|
1891
|
+
width: f,
|
|
1897
1892
|
minWidth: p
|
|
1898
1893
|
} = le(t), {
|
|
1899
|
-
disableSorting:
|
|
1894
|
+
disableSorting: C,
|
|
1900
1895
|
sortOrderIconVariant: y
|
|
1901
1896
|
} = R(), b = Te(), {
|
|
1902
1897
|
arrow: k,
|
|
1903
1898
|
selected: S,
|
|
1904
1899
|
onClickColumnHead: T
|
|
1905
|
-
} =
|
|
1900
|
+
} = qo(t), G = typeof a == "string" ? a : go(t), L = Oe(n, o, u), x = b[t];
|
|
1906
1901
|
return /* @__PURE__ */ r("th", {
|
|
1907
1902
|
style: {
|
|
1908
1903
|
background: h != null ? h : "white",
|
|
@@ -1912,16 +1907,16 @@ const Xe = P.createContext({}), br = ({
|
|
|
1912
1907
|
right: x.right,
|
|
1913
1908
|
top: c,
|
|
1914
1909
|
boxShadow: x.sticky && x.isFirstColumnInLastGroup && s ? "var(--swui-sticky-header-shadow-and-left)" : x.sticky && x.isFirstColumnInLastGroup ? "var(--swui-sticky-column-shadow-left)" : s && x.sticky ? "var(--swui-sticky-header-shadow-and-right)" : s ? "var(--swui-sticky-header-shadow)" : x.sticky ? "var(--swui-sticky-column-shadow-right)" : void 0,
|
|
1915
|
-
zIndex: s && x.sticky ? "var(--swui-sticky-header-in-sticky-column-z-index)" : s ? "var(--swui-sticky-header-z-index)" : x.sticky ? "var(--swui-sticky-group-header-z-index)" :
|
|
1910
|
+
zIndex: s && x.sticky ? "var(--swui-sticky-header-in-sticky-column-z-index)" : s ? "var(--swui-sticky-header-z-index)" : x.sticky ? "var(--swui-sticky-group-header-z-index)" : w,
|
|
1916
1911
|
height: 0,
|
|
1917
|
-
width:
|
|
1912
|
+
width: f,
|
|
1918
1913
|
minWidth: p
|
|
1919
1914
|
},
|
|
1920
1915
|
children: /* @__PURE__ */ r(Ee, {
|
|
1921
1916
|
width: "inherit",
|
|
1922
1917
|
minWidth: "inherit",
|
|
1923
|
-
arrow: !
|
|
1924
|
-
onClick:
|
|
1918
|
+
arrow: !C && G ? k : void 0,
|
|
1919
|
+
onClick: C ? void 0 : T,
|
|
1925
1920
|
label: G,
|
|
1926
1921
|
infoIconTooltipText: d,
|
|
1927
1922
|
alignRight: i === "flex-end",
|
|
@@ -1931,7 +1926,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
1931
1926
|
height: "100%"
|
|
1932
1927
|
})
|
|
1933
1928
|
});
|
|
1934
|
-
}),
|
|
1929
|
+
}), Uo = (e, t, n, o) => {
|
|
1935
1930
|
if (e && t !== void 0)
|
|
1936
1931
|
return `calc(${e} + ${n})`;
|
|
1937
1932
|
if (o && t)
|
|
@@ -1940,7 +1935,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
1940
1935
|
return e;
|
|
1941
1936
|
if (o)
|
|
1942
1937
|
return 0;
|
|
1943
|
-
},
|
|
1938
|
+
}, Zo = P.memo(function({
|
|
1944
1939
|
items: t,
|
|
1945
1940
|
appendTooltipTo: n,
|
|
1946
1941
|
height: o = Se
|
|
@@ -1953,23 +1948,23 @@ const Xe = P.createContext({}), br = ({
|
|
|
1953
1948
|
headerRowOffsetTop: u,
|
|
1954
1949
|
zIndex: d,
|
|
1955
1950
|
stickyHeader: h,
|
|
1956
|
-
stickyCheckboxColumn:
|
|
1951
|
+
stickyCheckboxColumn: w,
|
|
1957
1952
|
showRowCheckbox: m
|
|
1958
|
-
} = R(),
|
|
1953
|
+
} = R(), f = Nn(), {
|
|
1959
1954
|
allItemsAreExpanded: p,
|
|
1960
|
-
toggleExpanded:
|
|
1961
|
-
} =
|
|
1955
|
+
toggleExpanded: C
|
|
1956
|
+
} = Wo(t), {
|
|
1962
1957
|
allItemsAreSelected: y,
|
|
1963
1958
|
onClickCheckbox: b,
|
|
1964
1959
|
selectionIsEmpty: k
|
|
1965
|
-
} =
|
|
1966
|
-
zIndex: h &&
|
|
1967
|
-
top:
|
|
1968
|
-
background: h ||
|
|
1969
|
-
position: h ||
|
|
1970
|
-
boxShadow: h &&
|
|
1960
|
+
} = jo(t), S = !t || t.length === 0, T = {
|
|
1961
|
+
zIndex: h && w ? "var(--swui-sticky-header-in-sticky-column-z-index)" : w ? "var(--swui-sticky-group-header-z-index)" : h ? "var(--swui-sticky-header-z-index)" : d,
|
|
1962
|
+
top: Uo(u, f, o, h),
|
|
1963
|
+
background: h || w ? "white" : void 0,
|
|
1964
|
+
position: h || w ? "sticky" : void 0,
|
|
1965
|
+
boxShadow: h && w ? "var(--swui-sticky-header-shadow-and-right)" : w ? "var(--swui-sticky-column-shadow-right)" : h ? "var(--swui-sticky-header-shadow)" : void 0
|
|
1971
1966
|
};
|
|
1972
|
-
return /* @__PURE__ */ g(
|
|
1967
|
+
return /* @__PURE__ */ g(bt, {
|
|
1973
1968
|
height: o,
|
|
1974
1969
|
borderLeft: ke,
|
|
1975
1970
|
children: [a && /* @__PURE__ */ r("th", {
|
|
@@ -1990,22 +1985,22 @@ const Xe = P.createContext({}), br = ({
|
|
|
1990
1985
|
justifyContent: "center",
|
|
1991
1986
|
children: l && /* @__PURE__ */ r(xe, {
|
|
1992
1987
|
size: "small",
|
|
1993
|
-
leftIcon: p ?
|
|
1994
|
-
onClick:
|
|
1988
|
+
leftIcon: p ? qe : Fe,
|
|
1989
|
+
onClick: C
|
|
1995
1990
|
})
|
|
1996
1991
|
})
|
|
1997
1992
|
}), (m || c) && /* @__PURE__ */ r("th", {
|
|
1998
1993
|
style: {
|
|
1999
1994
|
...T,
|
|
2000
1995
|
overflow: "hidden",
|
|
2001
|
-
left:
|
|
1996
|
+
left: w && i ? "var(--swui-expand-cell-width)" : w ? "0px" : void 0
|
|
2002
1997
|
},
|
|
2003
1998
|
children: /* @__PURE__ */ r(E, {
|
|
2004
1999
|
width: "var(--swui-checkbox-cell-width)",
|
|
2005
2000
|
minWidth: "var(--swui-checkbox-cell-width)",
|
|
2006
2001
|
alignItems: "center",
|
|
2007
2002
|
justifyContent: "center",
|
|
2008
|
-
children: c && /* @__PURE__ */ r(
|
|
2003
|
+
children: c && /* @__PURE__ */ r(Xe, {
|
|
2009
2004
|
size: "small",
|
|
2010
2005
|
disabled: S,
|
|
2011
2006
|
value: y,
|
|
@@ -2017,7 +2012,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
2017
2012
|
groupConfig: G,
|
|
2018
2013
|
groupId: L
|
|
2019
2014
|
}, x) => /* @__PURE__ */ r(P.Fragment, {
|
|
2020
|
-
children: G.columnOrder.map((z, A) => /* @__PURE__ */ r(
|
|
2015
|
+
children: G.columnOrder.map((z, A) => /* @__PURE__ */ r(Fo, {
|
|
2021
2016
|
columnId: z,
|
|
2022
2017
|
borderFromGroup: pe(x, A, G.borderLeft),
|
|
2023
2018
|
disableBorderLeft: x === 0 && A === 0,
|
|
@@ -2034,7 +2029,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
2034
2029
|
style: T
|
|
2035
2030
|
})]
|
|
2036
2031
|
});
|
|
2037
|
-
}),
|
|
2032
|
+
}), kr = function({
|
|
2038
2033
|
tableContext: t,
|
|
2039
2034
|
config: n,
|
|
2040
2035
|
columnOrder: o,
|
|
@@ -2046,72 +2041,72 @@ const Xe = P.createContext({}), br = ({
|
|
|
2046
2041
|
appendTooltipTo: u,
|
|
2047
2042
|
...d
|
|
2048
2043
|
}) {
|
|
2049
|
-
const h =
|
|
2050
|
-
initialSortOrderDesc:
|
|
2044
|
+
const h = Tt(), {
|
|
2045
|
+
initialSortOrderDesc: w,
|
|
2051
2046
|
initialSortOrder: m,
|
|
2052
|
-
enableExpandCollapse:
|
|
2047
|
+
enableExpandCollapse: f,
|
|
2053
2048
|
stickyCheckboxColumn: p
|
|
2054
2049
|
} = n, {
|
|
2055
|
-
tableContext:
|
|
2056
|
-
} =
|
|
2050
|
+
tableContext: C
|
|
2051
|
+
} = oo(c != null ? c : h, dt(m, w)), y = t || C, {
|
|
2057
2052
|
state: b,
|
|
2058
2053
|
actions: k,
|
|
2059
2054
|
dispatch: S
|
|
2060
2055
|
} = y, T = v(() => ({
|
|
2061
2056
|
actions: k,
|
|
2062
2057
|
dispatch: S
|
|
2063
|
-
}), [k, S]), G = Boolean(s != null ? s : "columnGroupOrder" in n), L = "columnGroups" in n ? n.columnGroups : void 0, x = "columnGroupOrder" in n ? n.columnGroupOrder : void 0, z = "columnOrder" in n ? n.columnOrder : void 0, A = v(() =>
|
|
2058
|
+
}), [k, S]), G = Boolean(s != null ? s : "columnGroupOrder" in n), L = "columnGroups" in n ? n.columnGroups : void 0, x = "columnGroupOrder" in n ? n.columnGroupOrder : void 0, z = "columnOrder" in n ? n.columnOrder : void 0, A = v(() => vt(L, x, z), [L, x, z]), W = v(() => Wn(n), [n]), H = v(() => ro(n), [n]), M = v(() => Qn(n), [n]), J = v(() => {
|
|
2064
2059
|
try {
|
|
2065
|
-
|
|
2060
|
+
Fn(n);
|
|
2066
2061
|
return;
|
|
2067
2062
|
} catch (V) {
|
|
2068
2063
|
return V instanceof Error ? V : new Error("Unknown error");
|
|
2069
2064
|
}
|
|
2070
2065
|
}, [n]);
|
|
2071
|
-
return J ? /* @__PURE__ */ r(
|
|
2066
|
+
return J ? /* @__PURE__ */ r(Jt, {
|
|
2072
2067
|
text: J.message
|
|
2073
2068
|
}) : /* @__PURE__ */ r("table", {
|
|
2074
|
-
className:
|
|
2069
|
+
className: Je(Ve.standardTable, Ve[l]),
|
|
2075
2070
|
style: {
|
|
2076
2071
|
width: "100%",
|
|
2077
2072
|
isolation: "isolate",
|
|
2078
|
-
"--current-left-offset":
|
|
2073
|
+
"--current-left-offset": f && p ? "calc(var(--swui-expand-cell-width) + var(--swui-checkbox-cell-width))" : p ? "var(--swui-checkbox-cell-width)" : f ? "var(--swui-expand-cell-width)" : "0px"
|
|
2079
2074
|
},
|
|
2080
|
-
children: /* @__PURE__ */ r(
|
|
2075
|
+
children: /* @__PURE__ */ r(Ct.Provider, {
|
|
2081
2076
|
value: M,
|
|
2082
|
-
children: /* @__PURE__ */ r(
|
|
2077
|
+
children: /* @__PURE__ */ r(ft.Provider, {
|
|
2083
2078
|
value: H,
|
|
2084
|
-
children: /* @__PURE__ */ r(
|
|
2079
|
+
children: /* @__PURE__ */ r(zn.Provider, {
|
|
2085
2080
|
value: l,
|
|
2086
|
-
children: /* @__PURE__ */ r(
|
|
2081
|
+
children: /* @__PURE__ */ r(ct.Provider, {
|
|
2087
2082
|
value: c != null ? c : h,
|
|
2088
|
-
children: /* @__PURE__ */ r(
|
|
2083
|
+
children: /* @__PURE__ */ r(lt.Provider, {
|
|
2089
2084
|
value: b,
|
|
2090
|
-
children: /* @__PURE__ */ r(
|
|
2085
|
+
children: /* @__PURE__ */ r(it.Provider, {
|
|
2091
2086
|
value: T,
|
|
2092
|
-
children: /* @__PURE__ */ r(
|
|
2087
|
+
children: /* @__PURE__ */ r(at.Provider, {
|
|
2093
2088
|
value: n,
|
|
2094
|
-
children: /* @__PURE__ */ r(
|
|
2089
|
+
children: /* @__PURE__ */ r(ut.Provider, {
|
|
2095
2090
|
value: A,
|
|
2096
|
-
children: /* @__PURE__ */ r(
|
|
2091
|
+
children: /* @__PURE__ */ r(yt.Provider, {
|
|
2097
2092
|
value: W,
|
|
2098
|
-
children: /* @__PURE__ */ r(
|
|
2093
|
+
children: /* @__PURE__ */ r(Dn.Provider, {
|
|
2099
2094
|
value: G,
|
|
2100
|
-
children: /* @__PURE__ */ g(
|
|
2095
|
+
children: /* @__PURE__ */ g(wt.Provider, {
|
|
2101
2096
|
value: "columnGroupOrder" in n ? s != null ? s : n.columnGroupOrder : s,
|
|
2102
|
-
children: [/* @__PURE__ */ r(
|
|
2097
|
+
children: [/* @__PURE__ */ r(co, {}), /* @__PURE__ */ r(pt.Provider, {
|
|
2103
2098
|
value: i,
|
|
2104
|
-
children: /* @__PURE__ */ g(
|
|
2099
|
+
children: /* @__PURE__ */ g(mt.Provider, {
|
|
2105
2100
|
value: a,
|
|
2106
2101
|
children: [/* @__PURE__ */ g("thead", {
|
|
2107
|
-
children: [(s || "columnGroupOrder" in n) && /* @__PURE__ */ r(
|
|
2102
|
+
children: [(s || "columnGroupOrder" in n) && /* @__PURE__ */ r(jn, {
|
|
2108
2103
|
height: "var(--current-row-height)"
|
|
2109
|
-
}), /* @__PURE__ */ r(
|
|
2104
|
+
}), /* @__PURE__ */ r(Zo, {
|
|
2110
2105
|
items: d.items,
|
|
2111
2106
|
height: "var(--current-row-height)",
|
|
2112
2107
|
appendTooltipTo: u
|
|
2113
2108
|
})]
|
|
2114
|
-
}), /* @__PURE__ */ r(
|
|
2109
|
+
}), /* @__PURE__ */ r(_o, {
|
|
2115
2110
|
variant: l,
|
|
2116
2111
|
...d
|
|
2117
2112
|
})]
|
|
@@ -2129,10 +2124,10 @@ const Xe = P.createContext({}), br = ({
|
|
|
2129
2124
|
})
|
|
2130
2125
|
})
|
|
2131
2126
|
});
|
|
2132
|
-
},
|
|
2127
|
+
}, Sr = (e, t) => ({
|
|
2133
2128
|
...t,
|
|
2134
2129
|
itemValueResolver: e
|
|
2135
|
-
}),
|
|
2130
|
+
}), Ir = () => ({
|
|
2136
2131
|
label: e,
|
|
2137
2132
|
gridCell: {
|
|
2138
2133
|
editorValue: t,
|
|
@@ -2156,7 +2151,7 @@ const Xe = P.createContext({}), br = ({
|
|
|
2156
2151
|
color: "var(--swui-primary-action-color)",
|
|
2157
2152
|
children: e
|
|
2158
2153
|
})
|
|
2159
|
-
}),
|
|
2154
|
+
}), Er = (e, t, n) => ({
|
|
2160
2155
|
label: o,
|
|
2161
2156
|
item: s,
|
|
2162
2157
|
gridCell: {
|
|
@@ -2168,10 +2163,10 @@ const Xe = P.createContext({}), br = ({
|
|
|
2168
2163
|
stopEditing: d,
|
|
2169
2164
|
stopEditingAndMove: h
|
|
2170
2165
|
},
|
|
2171
|
-
isEditable:
|
|
2166
|
+
isEditable: w
|
|
2172
2167
|
}) => {
|
|
2173
|
-
const m = typeof e == "function" ? e(s) : e,
|
|
2174
|
-
return
|
|
2168
|
+
const m = typeof e == "function" ? e(s) : e, f = t ? t(s) : void 0, p = n ? n(s) : void 0;
|
|
2169
|
+
return w && l ? /* @__PURE__ */ r(ge, {
|
|
2175
2170
|
onValueChange: i,
|
|
2176
2171
|
value: c,
|
|
2177
2172
|
onDone: d,
|
|
@@ -2182,83 +2177,83 @@ const Xe = P.createContext({}), br = ({
|
|
|
2182
2177
|
}) : /* @__PURE__ */ r(N, {
|
|
2183
2178
|
row: !0,
|
|
2184
2179
|
alignItems: "center",
|
|
2185
|
-
children: /* @__PURE__ */ r(
|
|
2180
|
+
children: /* @__PURE__ */ r(tn, {
|
|
2186
2181
|
value: o,
|
|
2187
2182
|
modifiedField: p,
|
|
2188
|
-
crudStatus:
|
|
2189
|
-
isEditable:
|
|
2183
|
+
crudStatus: f,
|
|
2184
|
+
isEditable: w,
|
|
2190
2185
|
warningOnEmpty: m
|
|
2191
2186
|
})
|
|
2192
2187
|
});
|
|
2193
2188
|
};
|
|
2194
2189
|
export {
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2190
|
+
Qe as CrudStatusIndicator,
|
|
2191
|
+
br as EditableTextCellWithCrudAndModified,
|
|
2192
|
+
Ye as GridHooksContext,
|
|
2193
|
+
Cr as GridHooksTable,
|
|
2194
|
+
tn as ModifiedField,
|
|
2195
|
+
fr as SmallTableCell,
|
|
2196
|
+
vr as SmallTableHead,
|
|
2197
|
+
kr as StandardTable,
|
|
2198
|
+
it as StandardTableActionsContext,
|
|
2199
|
+
To as StandardTableCell,
|
|
2200
|
+
So as StandardTableCellUi,
|
|
2201
|
+
at as StandardTableConfigContext,
|
|
2202
|
+
_o as StandardTableContent,
|
|
2203
|
+
Zo as StandardTableHeadRow,
|
|
2204
|
+
Oo as StandardTableRow,
|
|
2205
|
+
mo as StandardTableRowCheckbox,
|
|
2206
|
+
Vo as StandardTableRowList,
|
|
2207
|
+
lt as StandardTableStateContext,
|
|
2208
|
+
ct as StandardTableTableIdContext,
|
|
2209
|
+
nn as TableCell,
|
|
2210
|
+
yr as TableColumnGroupHead,
|
|
2216
2211
|
Ee as TableHeadItem,
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2212
|
+
xr as TableHeadRow,
|
|
2213
|
+
gr as TableRow,
|
|
2214
|
+
Ro as TextCell,
|
|
2215
|
+
Sr as createColumnConfig,
|
|
2216
|
+
Er as createEditableTextCellWithStatus,
|
|
2217
|
+
vt as createGroupConfigAndIdsForRows,
|
|
2218
|
+
Pn as createInternalStandardTableActions,
|
|
2219
|
+
Ir as createStandardEditableTextCell,
|
|
2220
|
+
no as createStandardTableActions,
|
|
2221
|
+
dt as createStandardTableInitialState,
|
|
2222
|
+
An as createStandardTableReducer,
|
|
2228
2223
|
Ie as defaultTableHeadRowHeight,
|
|
2229
2224
|
Se as defaultTableRowHeight,
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2225
|
+
st as focusOnCell,
|
|
2226
|
+
go as formatColumnIdToHeaderCellLabel,
|
|
2227
|
+
xo as formatValueLabel,
|
|
2233
2228
|
be as hasIndicatorContent,
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2229
|
+
ho as multitypeComparator,
|
|
2230
|
+
nt as smallTableRowWidth,
|
|
2231
|
+
et as tableBackgroundColorExpanded,
|
|
2232
|
+
sn as tableBackgroundHoverColorExpanded,
|
|
2238
2233
|
re as tableBorder,
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2234
|
+
on as tableBorderColor,
|
|
2235
|
+
rn as tableBorderColorExpanded,
|
|
2236
|
+
cn as tableBorderHidden,
|
|
2242
2237
|
ke as tableBorderLeft,
|
|
2243
|
-
|
|
2238
|
+
tt as tableBorderLeftExpanded,
|
|
2244
2239
|
_e as useCellBackgroundByColumnConfig,
|
|
2245
|
-
|
|
2240
|
+
yo as useCellBackgroundByColumnId,
|
|
2246
2241
|
le as useColumnConfigById,
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2242
|
+
po as useColumnValueResolver,
|
|
2243
|
+
mn as useEditableCell,
|
|
2244
|
+
Kn as useFirstColumnConfig,
|
|
2250
2245
|
he as useGridCell,
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2246
|
+
Tn as useGridNavigation,
|
|
2247
|
+
ot as useGridNavigationOptionsFromContext,
|
|
2248
|
+
$n as useLastColumnConfig,
|
|
2249
|
+
oo as useLocalStateTableContext,
|
|
2250
|
+
un as useRevertableValue,
|
|
2256
2251
|
Co as useRowCheckbox,
|
|
2257
2252
|
ce as useStandardTableActions,
|
|
2258
2253
|
R as useStandardTableConfig,
|
|
2259
2254
|
Re as useStandardTableId,
|
|
2260
2255
|
Q as useStandardTableState,
|
|
2261
|
-
|
|
2262
|
-
|
|
2256
|
+
jo as useTableHeadCheckbox,
|
|
2257
|
+
qo as useTableSortHeader
|
|
2263
2258
|
};
|
|
2264
2259
|
//# sourceMappingURL=index.es.js.map
|