@stenajs-webui/grid 18.9.2 → 18.10.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/features/standard-table/components/StandardTable.d.ts +7 -1
- package/dist/features/standard-table/components/StandardTableHeadItem.d.ts +2 -0
- package/dist/features/standard-table/components/StandardTableHeadRow.d.ts +3 -1
- package/dist/features/table-ui/components/table/TableHeadItem.d.ts +2 -1
- package/dist/index.es.js +496 -488
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
package/dist/index.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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
|
-
import * as
|
|
3
|
-
import { useMemo as v, useRef as ne, useState as ve, useCallback as I, useEffect as je, useContext as
|
|
4
|
-
import { jsx as r, Fragment as
|
|
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 Et, useId as Rt } from "react";
|
|
4
|
+
import { jsx as r, Fragment as O, jsxs as g } from "react/jsx-runtime";
|
|
5
5
|
import { faExclamationTriangle as ue } from "@fortawesome/free-solid-svg-icons/faExclamationTriangle";
|
|
6
|
-
import { InputSpinner as ye, Icon as F, stenaArrowRight as
|
|
7
|
-
import { cssColor as
|
|
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";
|
|
7
|
+
import { cssColor as j } from "@stenajs-webui/theme";
|
|
8
8
|
import { Tooltip as se, Popover as Pt } from "@stenajs-webui/tooltip";
|
|
9
|
-
import { Text as U, Indent as N, Space as
|
|
9
|
+
import { Text as U, Indent as N, Space as D, Row as E, Box as oe, exhaustSwitchCaseElseThrow as At, Heading as We, booleanOrNumberToNumber as Lt, useArraySet as qe, useOnScreen as Bt, Spacing as we } from "@stenajs-webui/core";
|
|
10
10
|
import { faEllipsisV as Dt } from "@fortawesome/free-solid-svg-icons/faEllipsisV";
|
|
11
11
|
import { faSortAlphaDown as Nt } from "@fortawesome/free-solid-svg-icons/faSortAlphaDown";
|
|
12
12
|
import { faSortAlphaUp as zt } from "@fortawesome/free-solid-svg-icons/faSortAlphaUp";
|
|
@@ -25,7 +25,7 @@ import { compact as Yt, upperFirst as Qt, lowerCase as en } from "lodash";
|
|
|
25
25
|
import { faChevronDown as Ze } from "@fortawesome/free-solid-svg-icons/faChevronDown";
|
|
26
26
|
import { faChevronRight as Je } from "@fortawesome/free-solid-svg-icons/faChevronRight";
|
|
27
27
|
import tn from "@emotion/styled";
|
|
28
|
-
const Xe =
|
|
28
|
+
const Xe = P.createContext({}), br = ({
|
|
29
29
|
children: e,
|
|
30
30
|
numCols: t,
|
|
31
31
|
numRows: n,
|
|
@@ -66,15 +66,15 @@ const Xe = T.createContext({}), br = ({
|
|
|
66
66
|
} = e;
|
|
67
67
|
if (o || s || c || l)
|
|
68
68
|
return /* @__PURE__ */ r(ye, {
|
|
69
|
-
color:
|
|
69
|
+
color: j("--lhds-color-ui-500")
|
|
70
70
|
});
|
|
71
71
|
if (n) {
|
|
72
72
|
const i = /* @__PURE__ */ r(F, {
|
|
73
73
|
icon: ue,
|
|
74
|
-
color:
|
|
74
|
+
color: j("--lhds-color-orange-600"),
|
|
75
75
|
size: 14
|
|
76
76
|
});
|
|
77
|
-
return /* @__PURE__ */ r(
|
|
77
|
+
return /* @__PURE__ */ r(O, {
|
|
78
78
|
children: t ? /* @__PURE__ */ r(se, {
|
|
79
79
|
label: t,
|
|
80
80
|
zIndex: 100,
|
|
@@ -91,15 +91,15 @@ const Xe = T.createContext({}), br = ({
|
|
|
91
91
|
crudStatus: s
|
|
92
92
|
}) => {
|
|
93
93
|
const c = t && (o == null ? void 0 : o.modified) && (o == null ? void 0 : o.newValue) === "", l = s && be(s), i = c || l;
|
|
94
|
-
return /* @__PURE__ */ g(
|
|
94
|
+
return /* @__PURE__ */ g(O, {
|
|
95
95
|
children: [/* @__PURE__ */ r(U, {
|
|
96
96
|
color: e ? "var(--swui-primary-action-color)" : void 0,
|
|
97
97
|
variant: o != null && o.modified ? "bold" : void 0,
|
|
98
98
|
children: n
|
|
99
|
-
}), (o == null ? void 0 : o.newValue) !== void 0 && /* @__PURE__ */ g(
|
|
99
|
+
}), (o == null ? void 0 : o.newValue) !== void 0 && /* @__PURE__ */ g(O, {
|
|
100
100
|
children: [/* @__PURE__ */ r(N, {
|
|
101
101
|
children: /* @__PURE__ */ r(F, {
|
|
102
|
-
icon:
|
|
102
|
+
icon: Tt,
|
|
103
103
|
size: 12
|
|
104
104
|
})
|
|
105
105
|
}), /* @__PURE__ */ r(U, {
|
|
@@ -107,12 +107,12 @@ const Xe = T.createContext({}), br = ({
|
|
|
107
107
|
variant: "bold",
|
|
108
108
|
children: o.newValue
|
|
109
109
|
})]
|
|
110
|
-
}), i && /* @__PURE__ */ r(
|
|
110
|
+
}), i && /* @__PURE__ */ r(D, {}), c ? /* @__PURE__ */ r(se, {
|
|
111
111
|
label: t,
|
|
112
112
|
zIndex: 100,
|
|
113
113
|
children: /* @__PURE__ */ r(F, {
|
|
114
114
|
icon: ue,
|
|
115
|
-
color:
|
|
115
|
+
color: j("--lhds-color-orange-600"),
|
|
116
116
|
size: 14
|
|
117
117
|
})
|
|
118
118
|
}) : /* @__PURE__ */ r(Ye, {
|
|
@@ -143,7 +143,7 @@ const Xe = T.createContext({}), br = ({
|
|
|
143
143
|
width: "14px",
|
|
144
144
|
children: /* @__PURE__ */ r(F, {
|
|
145
145
|
size: 14,
|
|
146
|
-
color:
|
|
146
|
+
color: j("--lhds-color-ui-500"),
|
|
147
147
|
icon: an(t, e)
|
|
148
148
|
})
|
|
149
149
|
}), an = (e, t) => {
|
|
@@ -157,7 +157,7 @@ const Xe = T.createContext({}), br = ({
|
|
|
157
157
|
default:
|
|
158
158
|
return At(t);
|
|
159
159
|
}
|
|
160
|
-
}, Ee =
|
|
160
|
+
}, Ee = P.memo(({
|
|
161
161
|
label: e,
|
|
162
162
|
arrow: t,
|
|
163
163
|
onClick: n,
|
|
@@ -166,46 +166,47 @@ const Xe = T.createContext({}), br = ({
|
|
|
166
166
|
popoverContent: c,
|
|
167
167
|
loading: l,
|
|
168
168
|
infoIconTooltipText: i,
|
|
169
|
-
overflow:
|
|
169
|
+
overflow: a = "hidden",
|
|
170
170
|
alignRight: u,
|
|
171
|
-
sortOrderIconVariant:
|
|
172
|
-
|
|
171
|
+
sortOrderIconVariant: d,
|
|
172
|
+
appendTooltipTo: h,
|
|
173
|
+
...f
|
|
173
174
|
}) => {
|
|
174
|
-
const
|
|
175
|
+
const m = ne(null), C = n ? {
|
|
175
176
|
cursor: "pointer",
|
|
176
177
|
userSelect: "none"
|
|
177
|
-
} : void 0,
|
|
178
|
+
} : void 0, p = !e && !t && !i;
|
|
178
179
|
return /* @__PURE__ */ g(E, {
|
|
179
180
|
height: "100%",
|
|
180
181
|
alignItems: "center",
|
|
181
|
-
ref:
|
|
182
|
-
overflow:
|
|
182
|
+
ref: m,
|
|
183
|
+
overflow: a,
|
|
183
184
|
justifyContent: u ? "flex-end" : "flex-start",
|
|
184
185
|
borderTop: "2px solid transparent",
|
|
185
|
-
borderBottom: `2px solid ${s ?
|
|
186
|
-
...
|
|
186
|
+
borderBottom: `2px solid ${s ? j("--lhds-color-blue-500") : "transparent"}`,
|
|
187
|
+
...f,
|
|
187
188
|
children: [/* @__PURE__ */ g(E, {
|
|
188
189
|
alignItems: "center",
|
|
189
190
|
indent: !0,
|
|
190
|
-
children: [!t && u && /* @__PURE__ */ g(
|
|
191
|
-
children: [/* @__PURE__ */ r(
|
|
191
|
+
children: [!t && u && /* @__PURE__ */ g(O, {
|
|
192
|
+
children: [/* @__PURE__ */ r(D, {}), /* @__PURE__ */ r(oe, {
|
|
192
193
|
width: "14px"
|
|
193
|
-
}), /* @__PURE__ */ r(
|
|
194
|
+
}), /* @__PURE__ */ r(D, {
|
|
194
195
|
num: 0.5
|
|
195
196
|
})]
|
|
196
197
|
}), (o || e) && /* @__PURE__ */ g(E, {
|
|
197
198
|
onClick: n,
|
|
198
|
-
style:
|
|
199
|
+
style: C,
|
|
199
200
|
alignItems: "center",
|
|
200
|
-
children: [o && /* @__PURE__ */ g(
|
|
201
|
-
children: [o, !
|
|
201
|
+
children: [o && /* @__PURE__ */ g(O, {
|
|
202
|
+
children: [o, !p && /* @__PURE__ */ r(D, {
|
|
202
203
|
num: 0.5
|
|
203
204
|
})]
|
|
204
|
-
}), t && u && /* @__PURE__ */ g(
|
|
205
|
-
children: [/* @__PURE__ */ r(
|
|
205
|
+
}), t && u && /* @__PURE__ */ g(O, {
|
|
206
|
+
children: [/* @__PURE__ */ r(D, {}), /* @__PURE__ */ r(Ke, {
|
|
206
207
|
direction: t,
|
|
207
|
-
iconVariant:
|
|
208
|
-
}), /* @__PURE__ */ r(
|
|
208
|
+
iconVariant: d
|
|
209
|
+
}), /* @__PURE__ */ r(D, {
|
|
209
210
|
num: 0.5
|
|
210
211
|
})]
|
|
211
212
|
}), e && /* @__PURE__ */ r(We, {
|
|
@@ -214,26 +215,27 @@ const Xe = T.createContext({}), br = ({
|
|
|
214
215
|
textAlign: "left"
|
|
215
216
|
},
|
|
216
217
|
children: e
|
|
217
|
-
}), t && !u && /* @__PURE__ */ g(
|
|
218
|
-
children: [/* @__PURE__ */ r(
|
|
218
|
+
}), t && !u && /* @__PURE__ */ g(O, {
|
|
219
|
+
children: [/* @__PURE__ */ r(D, {
|
|
219
220
|
num: 0.5
|
|
220
221
|
}), /* @__PURE__ */ r(Ke, {
|
|
221
222
|
direction: t,
|
|
222
|
-
iconVariant:
|
|
223
|
-
}), /* @__PURE__ */ r(
|
|
223
|
+
iconVariant: d
|
|
224
|
+
}), /* @__PURE__ */ r(D, {})]
|
|
224
225
|
})]
|
|
225
|
-
}), i && /* @__PURE__ */ g(
|
|
226
|
-
children: [/* @__PURE__ */ r(
|
|
227
|
-
onClick: (
|
|
226
|
+
}), i && /* @__PURE__ */ g(O, {
|
|
227
|
+
children: [/* @__PURE__ */ r(D, {}), /* @__PURE__ */ g(E, {
|
|
228
|
+
onClick: (w) => w.stopPropagation(),
|
|
228
229
|
children: [/* @__PURE__ */ r(se, {
|
|
229
230
|
label: i,
|
|
230
231
|
zIndex: "var(--swui-sticky-popover-z-index)",
|
|
232
|
+
appendTo: h,
|
|
231
233
|
children: /* @__PURE__ */ r(F, {
|
|
232
|
-
icon:
|
|
234
|
+
icon: Gt,
|
|
233
235
|
size: 14,
|
|
234
|
-
color:
|
|
236
|
+
color: j("--lhds-color-blue-400")
|
|
235
237
|
})
|
|
236
|
-
}), /* @__PURE__ */ r(
|
|
238
|
+
}), /* @__PURE__ */ r(D, {})]
|
|
237
239
|
})]
|
|
238
240
|
})]
|
|
239
241
|
}), /* @__PURE__ */ r(E, {
|
|
@@ -249,10 +251,10 @@ const Xe = T.createContext({}), br = ({
|
|
|
249
251
|
size: "small"
|
|
250
252
|
})
|
|
251
253
|
}) : null
|
|
252
|
-
}), !t && !u && /* @__PURE__ */ g(
|
|
253
|
-
children: [/* @__PURE__ */ r(
|
|
254
|
+
}), !t && !u && /* @__PURE__ */ g(O, {
|
|
255
|
+
children: [/* @__PURE__ */ r(D, {}), /* @__PURE__ */ r(oe, {
|
|
254
256
|
width: "14px"
|
|
255
|
-
}), /* @__PURE__ */ r(
|
|
257
|
+
}), /* @__PURE__ */ r(D, {
|
|
256
258
|
num: 0.5
|
|
257
259
|
})]
|
|
258
260
|
})]
|
|
@@ -279,7 +281,7 @@ const Xe = T.createContext({}), br = ({
|
|
|
279
281
|
children: e
|
|
280
282
|
})
|
|
281
283
|
})
|
|
282
|
-
}), Er =
|
|
284
|
+
}), Er = P.memo(({
|
|
283
285
|
style: e,
|
|
284
286
|
height: t = Ie,
|
|
285
287
|
...n
|
|
@@ -301,8 +303,8 @@ const Xe = T.createContext({}), br = ({
|
|
|
301
303
|
...o
|
|
302
304
|
}), hn = (e) => {
|
|
303
305
|
const [t, n] = ve(e), o = ne(e), s = ne(e), c = I(
|
|
304
|
-
(
|
|
305
|
-
n(
|
|
306
|
+
(d) => {
|
|
307
|
+
n(d), s.current = d;
|
|
306
308
|
},
|
|
307
309
|
[n, s]
|
|
308
310
|
);
|
|
@@ -312,18 +314,18 @@ const Xe = T.createContext({}), br = ({
|
|
|
312
314
|
const l = I(() => {
|
|
313
315
|
o && c(o.current);
|
|
314
316
|
}, [c, o]), i = I(
|
|
315
|
-
(
|
|
316
|
-
o.current = t,
|
|
317
|
+
(d) => {
|
|
318
|
+
o.current = t, d && c(d);
|
|
317
319
|
},
|
|
318
320
|
[t, c]
|
|
319
|
-
),
|
|
320
|
-
(
|
|
321
|
+
), a = I(
|
|
322
|
+
(d) => o.current = d,
|
|
321
323
|
[o]
|
|
322
324
|
), u = I(() => s.current, [s]);
|
|
323
325
|
return {
|
|
324
326
|
value: t,
|
|
325
327
|
setValue: c,
|
|
326
|
-
setRevertValue:
|
|
328
|
+
setRevertValue: a,
|
|
327
329
|
revert: l,
|
|
328
330
|
commit: i,
|
|
329
331
|
getValue: u
|
|
@@ -348,42 +350,42 @@ const Xe = T.createContext({}), br = ({
|
|
|
348
350
|
onStopEditing: c,
|
|
349
351
|
transformEnteredValue: l = mn
|
|
350
352
|
}) => {
|
|
351
|
-
const [i,
|
|
353
|
+
const [i, a] = ve(!1), [u, d] = ve(
|
|
352
354
|
void 0
|
|
353
|
-
),
|
|
354
|
-
(
|
|
355
|
-
t && (C(e),
|
|
355
|
+
), h = hn(e), { getValue: f, revert: m, setValue: C, setRevertValue: p } = h, w = I(
|
|
356
|
+
(S) => {
|
|
357
|
+
t && (C(e), p(e), a(!0), s && s(S));
|
|
356
358
|
},
|
|
357
|
-
[t, s,
|
|
359
|
+
[t, s, p, C, e]
|
|
358
360
|
), y = I(() => {
|
|
359
|
-
t && (
|
|
360
|
-
}, [t, o, c, f,
|
|
361
|
-
t && (
|
|
362
|
-
}, [t, c, m,
|
|
361
|
+
t && (a(!1), c && c(), o && o(f()));
|
|
362
|
+
}, [t, o, c, f, a]), b = I(() => {
|
|
363
|
+
t && (a(!1), c && c(), m());
|
|
364
|
+
}, [t, c, m, a]);
|
|
363
365
|
return {
|
|
364
366
|
onKeyDown: v(
|
|
365
367
|
() => gn(
|
|
366
368
|
i,
|
|
367
369
|
t,
|
|
368
370
|
w,
|
|
369
|
-
|
|
371
|
+
d,
|
|
370
372
|
n,
|
|
371
373
|
l,
|
|
372
|
-
|
|
374
|
+
h
|
|
373
375
|
),
|
|
374
376
|
[
|
|
375
377
|
i,
|
|
376
378
|
t,
|
|
377
379
|
w,
|
|
378
|
-
|
|
380
|
+
d,
|
|
379
381
|
n,
|
|
380
382
|
l,
|
|
381
|
-
|
|
383
|
+
h
|
|
382
384
|
]
|
|
383
385
|
),
|
|
384
386
|
isEditing: i,
|
|
385
387
|
lastKeyEvent: u,
|
|
386
|
-
revertableValue:
|
|
388
|
+
revertableValue: h,
|
|
387
389
|
startEditing: w,
|
|
388
390
|
stopEditing: y,
|
|
389
391
|
stopEditingAndRevert: b,
|
|
@@ -394,8 +396,8 @@ const Xe = T.createContext({}), br = ({
|
|
|
394
396
|
if (i.key === "Enter" && t)
|
|
395
397
|
o(void 0), n(), l.commit(), i.preventDefault(), i.stopPropagation();
|
|
396
398
|
else if (t) {
|
|
397
|
-
const
|
|
398
|
-
(xn(i.key) && wn(s) || yn(i.key) && Cn(s) || vn(i.key)) && (n(
|
|
399
|
+
const a = pn(i);
|
|
400
|
+
(xn(i.key) && wn(s) || yn(i.key) && Cn(s) || vn(i.key)) && (n(a), o(a), l.commit(), l.setValue(c(a.key)), i.preventDefault(), i.stopPropagation());
|
|
399
401
|
}
|
|
400
402
|
}
|
|
401
403
|
}, bn = (e, t, n, o) => {
|
|
@@ -431,7 +433,7 @@ const Xe = T.createContext({}), br = ({
|
|
|
431
433
|
} : {
|
|
432
434
|
rowIndex: e,
|
|
433
435
|
colIndex: t
|
|
434
|
-
}, Rn = (e) => e.replace(/^[^a-z]+|[^\w:.-]+/gi, ""),
|
|
436
|
+
}, Rn = (e) => e.replace(/^[^a-z]+|[^\w:.-]+/gi, ""), Tn = (e) => {
|
|
435
437
|
if (!e.tableId)
|
|
436
438
|
throw new Error("tableId is required.");
|
|
437
439
|
if (e.numRows == null)
|
|
@@ -440,15 +442,15 @@ const Xe = T.createContext({}), br = ({
|
|
|
440
442
|
throw new Error("numCols is required.");
|
|
441
443
|
return e;
|
|
442
444
|
}, nt = (e) => {
|
|
443
|
-
const t =
|
|
445
|
+
const t = $(Xe);
|
|
444
446
|
return v(
|
|
445
|
-
() =>
|
|
447
|
+
() => Tn({
|
|
446
448
|
...t,
|
|
447
449
|
...e
|
|
448
450
|
}),
|
|
449
451
|
[t, e]
|
|
450
452
|
);
|
|
451
|
-
},
|
|
453
|
+
}, Gn = (e) => {
|
|
452
454
|
const {
|
|
453
455
|
rowIndex: t,
|
|
454
456
|
colIndex: n,
|
|
@@ -457,7 +459,7 @@ const Xe = T.createContext({}), br = ({
|
|
|
457
459
|
tableId: c,
|
|
458
460
|
edgeMode: l,
|
|
459
461
|
onCellMove: i,
|
|
460
|
-
onCellNavigation:
|
|
462
|
+
onCellNavigation: a
|
|
461
463
|
} = nt(e), u = v(
|
|
462
464
|
() => On(
|
|
463
465
|
c,
|
|
@@ -467,7 +469,7 @@ const Xe = T.createContext({}), br = ({
|
|
|
467
469
|
s,
|
|
468
470
|
l,
|
|
469
471
|
i,
|
|
470
|
-
|
|
472
|
+
a
|
|
471
473
|
),
|
|
472
474
|
[
|
|
473
475
|
c,
|
|
@@ -477,53 +479,53 @@ const Xe = T.createContext({}), br = ({
|
|
|
477
479
|
s,
|
|
478
480
|
l,
|
|
479
481
|
i,
|
|
480
|
-
|
|
482
|
+
a
|
|
481
483
|
]
|
|
482
|
-
),
|
|
484
|
+
), d = v(
|
|
483
485
|
() => Pn(u),
|
|
484
486
|
[u]
|
|
485
|
-
),
|
|
487
|
+
), h = v(
|
|
486
488
|
() => ot(c, t, n),
|
|
487
489
|
[c, t, n]
|
|
488
490
|
), f = v(
|
|
489
491
|
() => ({
|
|
490
492
|
tabIndex: 0,
|
|
491
|
-
onKeyDown:
|
|
492
|
-
id:
|
|
493
|
+
onKeyDown: d,
|
|
494
|
+
id: h
|
|
493
495
|
}),
|
|
494
|
-
[
|
|
496
|
+
[d, h]
|
|
495
497
|
);
|
|
496
498
|
return {
|
|
497
499
|
focusOnCell: rt,
|
|
498
500
|
moveHandler: u,
|
|
499
501
|
requiredProps: f
|
|
500
502
|
};
|
|
501
|
-
}, On = (e, t, n, o, s, c, l, i) => (
|
|
503
|
+
}, On = (e, t, n, o, s, c, l, i) => (a) => {
|
|
502
504
|
const u = In(
|
|
503
505
|
t,
|
|
504
506
|
n,
|
|
505
507
|
o,
|
|
506
508
|
s,
|
|
507
|
-
|
|
509
|
+
a,
|
|
508
510
|
c
|
|
509
|
-
),
|
|
510
|
-
(
|
|
511
|
-
direction:
|
|
511
|
+
), d = n !== u.colIndex, h = t !== u.rowIndex;
|
|
512
|
+
(d || h) && (l && l({
|
|
513
|
+
direction: a,
|
|
512
514
|
fromRowIndex: t,
|
|
513
515
|
fromColIndex: n,
|
|
514
516
|
rowIndex: u.rowIndex,
|
|
515
517
|
colIndex: u.colIndex,
|
|
516
|
-
colDidChange:
|
|
517
|
-
rowDidChange:
|
|
518
|
+
colDidChange: d,
|
|
519
|
+
rowDidChange: h
|
|
518
520
|
}), rt(e, u)), i && i({
|
|
519
|
-
direction:
|
|
521
|
+
direction: a,
|
|
520
522
|
fromRowIndex: t,
|
|
521
523
|
fromColIndex: n,
|
|
522
524
|
rowIndex: u.rowIndex,
|
|
523
525
|
colIndex: u.colIndex,
|
|
524
|
-
colDidChange:
|
|
525
|
-
rowDidChange:
|
|
526
|
-
cellDidChange:
|
|
526
|
+
colDidChange: d,
|
|
527
|
+
rowDidChange: h,
|
|
528
|
+
cellDidChange: d || h
|
|
527
529
|
});
|
|
528
530
|
}, ot = (e, t, n) => Rn(`table-${e}-${t}-${n}`), Pn = (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, rt = (e, t) => {
|
|
529
531
|
const n = document.getElementById(
|
|
@@ -531,7 +533,7 @@ const Xe = T.createContext({}), br = ({
|
|
|
531
533
|
);
|
|
532
534
|
n && n.focus();
|
|
533
535
|
}, he = (e, t) => {
|
|
534
|
-
const { tableId: n } = nt(t), o =
|
|
536
|
+
const { tableId: n } = nt(t), o = Gn(t), s = fn(e, t), c = v(
|
|
535
537
|
() => ({
|
|
536
538
|
rowIndex: t.rowIndex,
|
|
537
539
|
colIndex: t.colIndex
|
|
@@ -541,19 +543,19 @@ const Xe = T.createContext({}), br = ({
|
|
|
541
543
|
s.startEditing(), o.focusOnCell(n, c);
|
|
542
544
|
}, [s, o, n, c]), i = I(() => {
|
|
543
545
|
s.stopEditing(), o.focusOnCell(n, c);
|
|
544
|
-
}, [s, o, n, c]),
|
|
546
|
+
}, [s, o, n, c]), a = I(() => {
|
|
545
547
|
s.stopEditingAndRevert(), o.focusOnCell(n, c);
|
|
546
548
|
}, [s, o, n, c]), u = I(
|
|
547
549
|
(m) => {
|
|
548
550
|
s.stopEditing(), o.moveHandler(m);
|
|
549
551
|
},
|
|
550
552
|
[s, o]
|
|
551
|
-
),
|
|
553
|
+
), d = I(
|
|
552
554
|
(m) => {
|
|
553
555
|
o.moveHandler(m);
|
|
554
556
|
},
|
|
555
557
|
[o]
|
|
556
|
-
),
|
|
558
|
+
), h = I(
|
|
557
559
|
(m) => {
|
|
558
560
|
s.isEditing || o.requiredProps.onKeyDown(m) || s.onKeyDown(m);
|
|
559
561
|
},
|
|
@@ -561,10 +563,10 @@ const Xe = T.createContext({}), br = ({
|
|
|
561
563
|
), f = v(
|
|
562
564
|
() => ({
|
|
563
565
|
...o.requiredProps,
|
|
564
|
-
onKeyDown:
|
|
566
|
+
onKeyDown: h,
|
|
565
567
|
onDoubleClick: s.onDoubleClick
|
|
566
568
|
}),
|
|
567
|
-
[
|
|
569
|
+
[h, s.onDoubleClick, o.requiredProps]
|
|
568
570
|
);
|
|
569
571
|
return {
|
|
570
572
|
isEditing: s.isEditing,
|
|
@@ -573,13 +575,13 @@ const Xe = T.createContext({}), br = ({
|
|
|
573
575
|
setEditorValue: s.revertableValue.setValue,
|
|
574
576
|
revertEditorValue: s.revertableValue.revert,
|
|
575
577
|
requiredProps: f,
|
|
576
|
-
move:
|
|
578
|
+
move: d,
|
|
577
579
|
startEditing: l,
|
|
578
580
|
stopEditing: i,
|
|
579
|
-
stopEditingAndRevert:
|
|
581
|
+
stopEditingAndRevert: a,
|
|
580
582
|
stopEditingAndMove: u
|
|
581
583
|
};
|
|
582
|
-
},
|
|
584
|
+
}, Tr = function({
|
|
583
585
|
allowedInputType: t,
|
|
584
586
|
value: n = "",
|
|
585
587
|
entityId: o,
|
|
@@ -587,46 +589,46 @@ const Xe = T.createContext({}), br = ({
|
|
|
587
589
|
rowIndent: c,
|
|
588
590
|
crudStatusRedux: l,
|
|
589
591
|
modifiedFieldsRedux: i,
|
|
590
|
-
colIndex:
|
|
592
|
+
colIndex: a,
|
|
591
593
|
rowIndex: u,
|
|
592
|
-
numCols:
|
|
593
|
-
numRows:
|
|
594
|
+
numCols: d,
|
|
595
|
+
numRows: h,
|
|
594
596
|
warningOnEmpty: f
|
|
595
597
|
}) {
|
|
596
|
-
const m = _t(), C = Be(i.selectors.getState),
|
|
597
|
-
m(
|
|
598
|
+
const m = _t(), C = Be(i.selectors.getState), p = Be(l.selectors.getState), w = C.entities[o], y = p.entities[o], b = I((M = "") => {
|
|
599
|
+
m(M === n ? i.actions.clearEntity(o) : i.actions.setEntity({
|
|
598
600
|
id: o,
|
|
599
601
|
originalValue: n,
|
|
600
|
-
newValue:
|
|
602
|
+
newValue: M,
|
|
601
603
|
modified: !0
|
|
602
604
|
}));
|
|
603
605
|
}, [m, o, i.actions, n]), {
|
|
604
|
-
isEditing:
|
|
605
|
-
stopEditing:
|
|
606
|
-
editorValue:
|
|
607
|
-
setEditorValue:
|
|
608
|
-
stopEditingAndRevert:
|
|
609
|
-
stopEditingAndMove:
|
|
606
|
+
isEditing: k,
|
|
607
|
+
stopEditing: S,
|
|
608
|
+
editorValue: T,
|
|
609
|
+
setEditorValue: G,
|
|
610
|
+
stopEditingAndRevert: L,
|
|
611
|
+
stopEditingAndMove: x,
|
|
610
612
|
lastKeyEvent: z,
|
|
611
613
|
requiredProps: {
|
|
612
|
-
onKeyDown:
|
|
613
|
-
...
|
|
614
|
+
onKeyDown: A,
|
|
615
|
+
...W
|
|
614
616
|
}
|
|
615
617
|
} = he(n, {
|
|
616
618
|
rowIndex: u,
|
|
617
|
-
colIndex:
|
|
618
|
-
numCols:
|
|
619
|
-
numRows:
|
|
619
|
+
colIndex: a,
|
|
620
|
+
numCols: d,
|
|
621
|
+
numRows: h,
|
|
620
622
|
tableId: "serviceManningMatrixTable",
|
|
621
623
|
onChange: b,
|
|
622
624
|
isEditable: s,
|
|
623
625
|
allowedInputType: t
|
|
624
|
-
}),
|
|
625
|
-
|
|
626
|
+
}), H = I((M) => {
|
|
627
|
+
M.key === "Delete" ? (m(i.actions.clearEntity(o)), m(l.actions.setEntityFields(o, {
|
|
626
628
|
hasError: !1,
|
|
627
629
|
errorMessage: void 0
|
|
628
|
-
}))) :
|
|
629
|
-
}, [
|
|
630
|
+
}))) : A(M);
|
|
631
|
+
}, [A, o, m, i.actions, l.actions]);
|
|
630
632
|
return /* @__PURE__ */ g(E, {
|
|
631
633
|
height: Se,
|
|
632
634
|
width: "100%",
|
|
@@ -642,27 +644,27 @@ const Xe = T.createContext({}), br = ({
|
|
|
642
644
|
alignItems: "center",
|
|
643
645
|
border: "1px solid transparent",
|
|
644
646
|
borderRadius: "4px",
|
|
645
|
-
focusBorder:
|
|
646
|
-
hoverBorder:
|
|
647
|
-
onKeyDown:
|
|
648
|
-
...
|
|
647
|
+
focusBorder: k ? void 0 : "1px solid var(--primary-action-color)",
|
|
648
|
+
hoverBorder: k ? void 0 : "var(--ui5) solid 1px;",
|
|
649
|
+
onKeyDown: H,
|
|
650
|
+
...W,
|
|
649
651
|
children: /* @__PURE__ */ r(N, {
|
|
650
652
|
row: !0,
|
|
651
653
|
alignItems: "center",
|
|
652
|
-
children:
|
|
653
|
-
onValueChange:
|
|
654
|
-
value:
|
|
655
|
-
onDone:
|
|
656
|
-
onEsc:
|
|
654
|
+
children: k ? /* @__PURE__ */ r(ge, {
|
|
655
|
+
onValueChange: G,
|
|
656
|
+
value: T,
|
|
657
|
+
onDone: S,
|
|
658
|
+
onEsc: L,
|
|
657
659
|
autoFocus: !0,
|
|
658
660
|
selectAllOnMount: !z,
|
|
659
|
-
onMove:
|
|
660
|
-
}) : /* @__PURE__ */ g(
|
|
661
|
+
onMove: x
|
|
662
|
+
}) : /* @__PURE__ */ g(O, {
|
|
661
663
|
children: [/* @__PURE__ */ r(U, {
|
|
662
664
|
color: s ? "var(--primary-action-color)" : void 0,
|
|
663
665
|
variant: w != null && w.modified ? "bold" : void 0,
|
|
664
666
|
children: n
|
|
665
|
-
}), (w == null ? void 0 : w.newValue) !== void 0 && /* @__PURE__ */ g(
|
|
667
|
+
}), (w == null ? void 0 : w.newValue) !== void 0 && /* @__PURE__ */ g(O, {
|
|
666
668
|
children: [/* @__PURE__ */ r(N, {
|
|
667
669
|
children: /* @__PURE__ */ r(F, {
|
|
668
670
|
icon: Vt,
|
|
@@ -673,7 +675,7 @@ const Xe = T.createContext({}), br = ({
|
|
|
673
675
|
variant: "bold",
|
|
674
676
|
children: w.newValue
|
|
675
677
|
})]
|
|
676
|
-
}), y && be(y) && /* @__PURE__ */ r(
|
|
678
|
+
}), y && be(y) && /* @__PURE__ */ r(D, {
|
|
677
679
|
num: 2
|
|
678
680
|
}), f && (w == null ? void 0 : w.modified) && (w == null ? void 0 : w.newValue) === "" ? /* @__PURE__ */ r(se, {
|
|
679
681
|
label: f,
|
|
@@ -699,7 +701,7 @@ const Xe = T.createContext({}), br = ({
|
|
|
699
701
|
selectedIds: De(),
|
|
700
702
|
expandedRows: De(),
|
|
701
703
|
fields: Wt()
|
|
702
|
-
}),
|
|
704
|
+
}), _ = (e, t) => `${e}.${t}`, at = (e = void 0, t = !1, n = [], o = []) => ({
|
|
703
705
|
sortOrder: qt(e, t),
|
|
704
706
|
selectedIds: Ne(n),
|
|
705
707
|
expandedRows: Ne(o),
|
|
@@ -707,16 +709,16 @@ const Xe = T.createContext({}), br = ({
|
|
|
707
709
|
}), Ln = (e, t) => {
|
|
708
710
|
var l;
|
|
709
711
|
const n = de(
|
|
710
|
-
|
|
712
|
+
_(e, "sortOrder"),
|
|
711
713
|
Ft(t == null ? void 0 : t.sortOrder)
|
|
712
714
|
), o = de(
|
|
713
|
-
|
|
715
|
+
_(e, "selectedIds"),
|
|
714
716
|
ze(t == null ? void 0 : t.selectedIds)
|
|
715
717
|
), s = de(
|
|
716
|
-
|
|
718
|
+
_(e, "expandedRows"),
|
|
717
719
|
ze(t == null ? void 0 : t.expandedRows)
|
|
718
720
|
), c = de(
|
|
719
|
-
|
|
721
|
+
_(e, "fields"),
|
|
720
722
|
Ut((l = t == null ? void 0 : t.fields) != null ? l : {})
|
|
721
723
|
);
|
|
722
724
|
return Zt({
|
|
@@ -725,7 +727,7 @@ const Xe = T.createContext({}), br = ({
|
|
|
725
727
|
expandedRows: s,
|
|
726
728
|
fields: c
|
|
727
729
|
});
|
|
728
|
-
}, Re = () =>
|
|
730
|
+
}, Re = () => $(st), R = () => $(it), Q = () => $(ct), ce = () => $(lt), dt = K([]), Z = () => $(
|
|
729
731
|
dt
|
|
730
732
|
), ut = () => {
|
|
731
733
|
const e = R(), t = Z();
|
|
@@ -734,7 +736,7 @@ const Xe = T.createContext({}), br = ({
|
|
|
734
736
|
() => t.map((o) => o.groupConfig.columnOrder.length).reduce((o, s) => o + s, 0),
|
|
735
737
|
[t]
|
|
736
738
|
);
|
|
737
|
-
}, ht = K(void 0), Bn = () =>
|
|
739
|
+
}, ht = K(void 0), Bn = () => $(ht), pt = K(void 0), Dn = () => $(pt), mt = K(void 0), Nn = K(!1), zn = () => $(mt), Kn = K("standard"), ft = K({}), Te = () => $(ft), wt = K(0), Ge = () => $(wt), Ct = (e, t, n) => {
|
|
738
740
|
var o;
|
|
739
741
|
return e ? Yt(
|
|
740
742
|
(o = t == null ? void 0 : t.map((s) => {
|
|
@@ -787,62 +789,62 @@ const Xe = T.createContext({}), br = ({
|
|
|
787
789
|
isFirstGroup: c,
|
|
788
790
|
isLastGroup: l
|
|
789
791
|
}) {
|
|
790
|
-
var
|
|
792
|
+
var A;
|
|
791
793
|
const {
|
|
792
794
|
label: i,
|
|
793
|
-
render:
|
|
795
|
+
render: a,
|
|
794
796
|
contentLeft: u,
|
|
795
|
-
contentRight:
|
|
796
|
-
loading:
|
|
797
|
+
contentRight: d,
|
|
798
|
+
loading: h,
|
|
797
799
|
error: f
|
|
798
800
|
} = n, {
|
|
799
801
|
width: m,
|
|
800
802
|
minWidth: C,
|
|
801
|
-
zIndex:
|
|
803
|
+
zIndex: p,
|
|
802
804
|
borderLeft: w
|
|
803
805
|
} = le(t), y = R(), {
|
|
804
806
|
stickyHeader: b,
|
|
805
|
-
headerRowOffsetTop:
|
|
806
|
-
} = y,
|
|
807
|
+
headerRowOffsetTop: k
|
|
808
|
+
} = y, S = "columnGroupOrder" in y ? y.stickyColumnGroups : void 0, T = Vn(o, w), G = c && (S === "first" || S === "both"), L = l && (S === "last" || S === "both"), x = G || L || b, z = G || L;
|
|
807
809
|
return /* @__PURE__ */ r("th", {
|
|
808
810
|
colSpan: s,
|
|
809
811
|
style: {
|
|
810
|
-
position:
|
|
812
|
+
position: x ? "sticky" : void 0,
|
|
811
813
|
height: "var(--current-row-height)",
|
|
812
814
|
width: m,
|
|
813
|
-
minWidth: (
|
|
814
|
-
background:
|
|
815
|
-
left:
|
|
816
|
-
right:
|
|
817
|
-
top: b ?
|
|
818
|
-
borderLeft:
|
|
819
|
-
zIndex: b && z ? "var(--swui-sticky-column-group-label-z-index)" : z ? "var(--swui-sticky-group-group-z-index)" : b ?
|
|
820
|
-
boxShadow:
|
|
815
|
+
minWidth: (A = C != null ? C : m) != null ? A : "20px",
|
|
816
|
+
background: x ? "white" : "transparent",
|
|
817
|
+
left: G ? "var(--current-left-offset)" : void 0,
|
|
818
|
+
right: L ? "0px" : void 0,
|
|
819
|
+
top: b ? k != null ? k : "0px" : void 0,
|
|
820
|
+
borderLeft: T,
|
|
821
|
+
zIndex: b && z ? "var(--swui-sticky-column-group-label-z-index)" : z ? "var(--swui-sticky-group-group-z-index)" : b ? p != null ? p : "var(--swui-sticky-header-column-group-z-index)" : p != null ? p : 1,
|
|
822
|
+
boxShadow: G ? "var(--swui-sticky-column-shadow-right)" : L ? "var(--swui-sticky-column-shadow-left)" : void 0
|
|
821
823
|
},
|
|
822
824
|
children: /* @__PURE__ */ r(E, {
|
|
823
825
|
alignItems: "center",
|
|
824
|
-
children: /* @__PURE__ */ g(
|
|
825
|
-
children: [u && /* @__PURE__ */ g(
|
|
826
|
-
children: [/* @__PURE__ */ r(
|
|
826
|
+
children: /* @__PURE__ */ g(O, {
|
|
827
|
+
children: [u && /* @__PURE__ */ g(O, {
|
|
828
|
+
children: [/* @__PURE__ */ r(D, {}), u, /* @__PURE__ */ r(D, {
|
|
827
829
|
num: 0.5
|
|
828
830
|
})]
|
|
829
|
-
}),
|
|
831
|
+
}), a ? a(n) : /* @__PURE__ */ r(N, {
|
|
830
832
|
children: /* @__PURE__ */ r(We, {
|
|
831
833
|
variant: "h5",
|
|
832
834
|
whiteSpace: "nowrap",
|
|
833
835
|
children: i
|
|
834
836
|
})
|
|
835
|
-
}),
|
|
836
|
-
children: [/* @__PURE__ */ r(
|
|
837
|
+
}), d && /* @__PURE__ */ g(O, {
|
|
838
|
+
children: [/* @__PURE__ */ r(D, {
|
|
837
839
|
num: 0.5
|
|
838
|
-
}),
|
|
839
|
-
}), (f ||
|
|
840
|
+
}), d]
|
|
841
|
+
}), (f || h) && /* @__PURE__ */ r(N, {}), h ? /* @__PURE__ */ r(ye, {}) : f ? /* @__PURE__ */ r(se, {
|
|
840
842
|
label: f,
|
|
841
843
|
placement: "bottom",
|
|
842
844
|
appendTo: document.body,
|
|
843
845
|
children: /* @__PURE__ */ r(F, {
|
|
844
846
|
icon: ue,
|
|
845
|
-
color:
|
|
847
|
+
color: j("--lhds-color-red-500"),
|
|
846
848
|
size: 14
|
|
847
849
|
})
|
|
848
850
|
}) : void 0]
|
|
@@ -867,7 +869,7 @@ const Xe = T.createContext({}), br = ({
|
|
|
867
869
|
return t;
|
|
868
870
|
if (e)
|
|
869
871
|
return 0;
|
|
870
|
-
}, Wn =
|
|
872
|
+
}, Wn = P.memo(function({
|
|
871
873
|
height: t = Se
|
|
872
874
|
}) {
|
|
873
875
|
const n = Z(), o = R(), {
|
|
@@ -875,44 +877,44 @@ const Xe = T.createContext({}), br = ({
|
|
|
875
877
|
enableExpandCollapse: c,
|
|
876
878
|
rowIndent: l,
|
|
877
879
|
zIndex: i,
|
|
878
|
-
stickyHeader:
|
|
880
|
+
stickyHeader: a,
|
|
879
881
|
stickyCheckboxColumn: u,
|
|
880
|
-
headerRowOffsetTop:
|
|
881
|
-
} = o,
|
|
882
|
+
headerRowOffsetTop: d
|
|
883
|
+
} = o, h = _n(a, u, d, i), f = a ? "var(--swui-sticky-column-group-label-z-index)" : "var(--swui-sticky-group-group-z-index)";
|
|
882
884
|
return /* @__PURE__ */ g("tr", {
|
|
883
885
|
style: {
|
|
884
886
|
height: t,
|
|
885
887
|
borderLeft: ke
|
|
886
888
|
},
|
|
887
889
|
children: [l && /* @__PURE__ */ r("th", {
|
|
888
|
-
style:
|
|
890
|
+
style: h
|
|
889
891
|
}), c && /* @__PURE__ */ r("th", {
|
|
890
892
|
style: {
|
|
891
|
-
...
|
|
893
|
+
...h,
|
|
892
894
|
width: "var(--swui-expand-cell-width)",
|
|
893
895
|
left: u ? "0px" : void 0,
|
|
894
896
|
zIndex: f
|
|
895
897
|
}
|
|
896
898
|
}), s && /* @__PURE__ */ r("th", {
|
|
897
899
|
style: {
|
|
898
|
-
...
|
|
900
|
+
...h,
|
|
899
901
|
left: u && c ? "var(--swui-expand-cell-width)" : u ? "0px" : void 0,
|
|
900
902
|
zIndex: f
|
|
901
903
|
}
|
|
902
904
|
}), n.map(({
|
|
903
905
|
groupConfig: m,
|
|
904
906
|
groupId: C
|
|
905
|
-
},
|
|
906
|
-
isFirstGroup:
|
|
907
|
-
isLastGroup:
|
|
907
|
+
}, p) => /* @__PURE__ */ r(Mn, {
|
|
908
|
+
isFirstGroup: p === 0,
|
|
909
|
+
isLastGroup: p === n.length - 1,
|
|
908
910
|
groupConfig: m,
|
|
909
911
|
columnId: m.columnOrder[0],
|
|
910
912
|
colSpan: m.columnOrder.length,
|
|
911
|
-
borderFromGroup: pe(
|
|
913
|
+
borderFromGroup: pe(p, 0, m.borderLeft)
|
|
912
914
|
}, C)), l && /* @__PURE__ */ r("th", {
|
|
913
|
-
style:
|
|
915
|
+
style: h
|
|
914
916
|
}), /* @__PURE__ */ r("th", {
|
|
915
|
-
style:
|
|
917
|
+
style: h
|
|
916
918
|
})]
|
|
917
919
|
});
|
|
918
920
|
}), qn = (e) => {
|
|
@@ -933,7 +935,7 @@ const Xe = T.createContext({}), br = ({
|
|
|
933
935
|
}, Fn = (e) => !e.disableGridCell, vt = K({
|
|
934
936
|
columnIndexPerColumnId: {},
|
|
935
937
|
numNavigableColumns: 0
|
|
936
|
-
}), yt = () =>
|
|
938
|
+
}), yt = () => $(
|
|
937
939
|
vt
|
|
938
940
|
), Un = (e) => {
|
|
939
941
|
"columnGroupOrder" in e && (Zn(e), (e.stickyColumnGroups === "first" || e.stickyColumnGroups === "both") && He(e, 0), (e.stickyColumnGroups === "last" || e.stickyColumnGroups === "both") && He(
|
|
@@ -984,8 +986,8 @@ const Xe = T.createContext({}), br = ({
|
|
|
984
986
|
n ? "var(--current-left-offset)" : "0px"
|
|
985
987
|
];
|
|
986
988
|
for (let l = 0; l < e.length; l++) {
|
|
987
|
-
const i = e[l],
|
|
988
|
-
o[i] = Xn(s), s.push((c =
|
|
989
|
+
const i = e[l], a = t == null ? void 0 : t[i];
|
|
990
|
+
o[i] = Xn(s), s.push((c = a == null ? void 0 : a.width) != null ? c : "0px");
|
|
989
991
|
}
|
|
990
992
|
return o;
|
|
991
993
|
}, Xn = (e) => e.length === 0 ? "0px" : e.length === 1 ? e[0] : "calc(" + e.join(" + ") + ")", Yn = (e) => {
|
|
@@ -1020,13 +1022,13 @@ const Xe = T.createContext({}), br = ({
|
|
|
1020
1022
|
const t = {}, n = e.columnGroupOrder, o = Jn(e), s = e.stickyColumnGroups === "first" || e.stickyColumnGroups === "both", c = e.stickyColumnGroups === "last" || e.stickyColumnGroups === "both";
|
|
1021
1023
|
return n.forEach((l, i) => {
|
|
1022
1024
|
const u = e.columnGroups[l].columnOrder;
|
|
1023
|
-
u.forEach((
|
|
1024
|
-
const f = i === 0, m = i === n.length - 1, C = f && s,
|
|
1025
|
-
t[
|
|
1026
|
-
sticky: C ||
|
|
1027
|
-
left: C ? o[
|
|
1028
|
-
right:
|
|
1029
|
-
type: C ? "first-group" :
|
|
1025
|
+
u.forEach((d, h) => {
|
|
1026
|
+
const f = i === 0, m = i === n.length - 1, C = f && s, p = m && c, w = h === 0 && m, y = h === u.length - 1 && f;
|
|
1027
|
+
t[d] = {
|
|
1028
|
+
sticky: C || p,
|
|
1029
|
+
left: C ? o[d] : void 0,
|
|
1030
|
+
right: p ? o[d] : void 0,
|
|
1031
|
+
type: C ? "first-group" : p ? "last-group" : void 0,
|
|
1030
1032
|
isFirstColumnInLastGroup: w,
|
|
1031
1033
|
isLastColumnInFirstGroup: y
|
|
1032
1034
|
};
|
|
@@ -1034,31 +1036,31 @@ const Xe = T.createContext({}), br = ({
|
|
|
1034
1036
|
}), t;
|
|
1035
1037
|
}, oo = (e, t) => ({
|
|
1036
1038
|
setSelectedIds: (n) => Y(
|
|
1037
|
-
|
|
1039
|
+
_(e, "selectedIds"),
|
|
1038
1040
|
t.selectedIds.setSelectedIds(n)
|
|
1039
1041
|
),
|
|
1040
1042
|
clearSelection: () => Y(
|
|
1041
|
-
|
|
1043
|
+
_(e, "selectedIds"),
|
|
1042
1044
|
t.selectedIds.clearSelectedIds()
|
|
1043
1045
|
),
|
|
1044
1046
|
expandByIds: (n) => Y(
|
|
1045
|
-
|
|
1047
|
+
_(e, "expandedRows"),
|
|
1046
1048
|
t.expandedRows.setSelectedIds(n)
|
|
1047
1049
|
),
|
|
1048
1050
|
collapseAll: () => Y(
|
|
1049
|
-
|
|
1051
|
+
_(e, "expandedRows"),
|
|
1050
1052
|
t.expandedRows.clearSelectedIds()
|
|
1051
1053
|
),
|
|
1052
1054
|
sortBy: (n, o) => Y(
|
|
1053
|
-
|
|
1055
|
+
_(e, "sortOrder"),
|
|
1054
1056
|
t.sortOrder.sortBy(n, o != null ? o : !1)
|
|
1055
1057
|
),
|
|
1056
1058
|
clearSortOrder: () => Y(
|
|
1057
|
-
|
|
1059
|
+
_(e, "sortOrder"),
|
|
1058
1060
|
t.sortOrder.clearSortOrder()
|
|
1059
1061
|
),
|
|
1060
1062
|
setLastSelectedId: (n) => Y(
|
|
1061
|
-
|
|
1063
|
+
_(e, "fields"),
|
|
1062
1064
|
t.fields.setEntityFields({ lastSelectedId: n })
|
|
1063
1065
|
)
|
|
1064
1066
|
}), ro = (e, t = at()) => {
|
|
@@ -1085,13 +1087,13 @@ const Xe = T.createContext({}), br = ({
|
|
|
1085
1087
|
}, so = (e) => (e.rowIndent ? 2 : 0) + (e.enableExpandCollapse ? 1 : 0) + (e.showRowCheckbox ? 1 : 0) + co(e), co = (e) => {
|
|
1086
1088
|
var t, n;
|
|
1087
1089
|
return "columnGroupOrder" in e ? e.columnGroupOrder.reduce((o, s) => {
|
|
1088
|
-
var l, i,
|
|
1090
|
+
var l, i, a;
|
|
1089
1091
|
const c = (l = e.columnGroups) == null ? void 0 : l[s];
|
|
1090
|
-
return o + ((
|
|
1092
|
+
return o + ((a = (i = c == null ? void 0 : c.columnOrder) == null ? void 0 : i.length) != null ? a : 0);
|
|
1091
1093
|
}, 0) : (n = (t = e.columnOrder) == null ? void 0 : t.length) != null ? n : 0;
|
|
1092
1094
|
}, lo = () => {
|
|
1093
1095
|
const e = R(), t = Z(), n = e.enableExpandCollapse || e.showRowCheckbox, o = Lt(e.rowIndent);
|
|
1094
|
-
return /* @__PURE__ */ g(
|
|
1096
|
+
return /* @__PURE__ */ g(O, {
|
|
1095
1097
|
children: [o ? /* @__PURE__ */ r("colgroup", {
|
|
1096
1098
|
children: /* @__PURE__ */ r("col", {
|
|
1097
1099
|
style: {
|
|
@@ -1138,7 +1140,7 @@ const Xe = T.createContext({}), br = ({
|
|
|
1138
1140
|
const n = t[e];
|
|
1139
1141
|
if (!!n)
|
|
1140
1142
|
return n.itemValueResolver;
|
|
1141
|
-
}, fo =
|
|
1143
|
+
}, fo = P.memo(function({
|
|
1142
1144
|
value: t,
|
|
1143
1145
|
onValueChange: n,
|
|
1144
1146
|
colIndex: o,
|
|
@@ -1146,19 +1148,19 @@ const Xe = T.createContext({}), br = ({
|
|
|
1146
1148
|
numRows: c,
|
|
1147
1149
|
disabled: l,
|
|
1148
1150
|
onValueChangeAndShift: i,
|
|
1149
|
-
shiftPressedRef:
|
|
1151
|
+
shiftPressedRef: a
|
|
1150
1152
|
}) {
|
|
1151
|
-
const u = ut(),
|
|
1153
|
+
const u = ut(), d = Re(), h = he(Boolean(t), {
|
|
1152
1154
|
colIndex: o,
|
|
1153
1155
|
numCols: u,
|
|
1154
1156
|
numRows: c,
|
|
1155
1157
|
rowIndex: s,
|
|
1156
|
-
tableId:
|
|
1158
|
+
tableId: d
|
|
1157
1159
|
}), {
|
|
1158
1160
|
requiredProps: f
|
|
1159
|
-
} =
|
|
1160
|
-
|
|
1161
|
-
}, [n, i,
|
|
1161
|
+
} = h, m = I((C) => {
|
|
1162
|
+
a.current ? i == null || i(C) : n == null || n(C);
|
|
1163
|
+
}, [n, i, a]);
|
|
1162
1164
|
return /* @__PURE__ */ r(Ue, {
|
|
1163
1165
|
size: "small",
|
|
1164
1166
|
disabled: l,
|
|
@@ -1181,36 +1183,36 @@ const Xe = T.createContext({}), br = ({
|
|
|
1181
1183
|
} = Q(), {
|
|
1182
1184
|
actions: { setSelectedIds: c, setLastSelectedId: l },
|
|
1183
1185
|
dispatch: i
|
|
1184
|
-
} = ce(),
|
|
1185
|
-
() => o.includes(
|
|
1186
|
-
[o,
|
|
1187
|
-
), { toggle:
|
|
1186
|
+
} = ce(), a = v(() => n(e), [n, e]), u = v(
|
|
1187
|
+
() => o.includes(a),
|
|
1188
|
+
[o, a]
|
|
1189
|
+
), { toggle: d, addMultiple: h, removeMultiple: f } = qe(
|
|
1188
1190
|
o,
|
|
1189
|
-
(
|
|
1191
|
+
(p) => i(c(p))
|
|
1190
1192
|
), m = I(() => {
|
|
1191
1193
|
if (t && s) {
|
|
1192
|
-
const
|
|
1194
|
+
const p = wo(
|
|
1193
1195
|
t,
|
|
1194
1196
|
s,
|
|
1195
|
-
|
|
1197
|
+
a
|
|
1196
1198
|
);
|
|
1197
|
-
|
|
1199
|
+
p != null && p.length ? u ? f(p) : h(p) : d(a);
|
|
1198
1200
|
} else
|
|
1199
|
-
a
|
|
1200
|
-
i(l(
|
|
1201
|
+
d(a);
|
|
1202
|
+
i(l(a));
|
|
1201
1203
|
}, [
|
|
1202
1204
|
t,
|
|
1203
1205
|
s,
|
|
1204
1206
|
i,
|
|
1205
1207
|
l,
|
|
1206
|
-
|
|
1208
|
+
a,
|
|
1207
1209
|
u,
|
|
1208
1210
|
f,
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
+
h,
|
|
1212
|
+
d
|
|
1211
1213
|
]), C = I(() => {
|
|
1212
|
-
a
|
|
1213
|
-
}, [
|
|
1214
|
+
d(a), i(l(a));
|
|
1215
|
+
}, [d, a, i, l]);
|
|
1214
1216
|
return {
|
|
1215
1217
|
isSelected: u,
|
|
1216
1218
|
toggleSelected: C,
|
|
@@ -1250,18 +1252,18 @@ const Xe = T.createContext({}), br = ({
|
|
|
1250
1252
|
}), {
|
|
1251
1253
|
requiredProps: i
|
|
1252
1254
|
} = l, {
|
|
1253
|
-
expandCollapseDisableResolver:
|
|
1255
|
+
expandCollapseDisableResolver: a
|
|
1254
1256
|
} = R(), {
|
|
1255
1257
|
toggleRowExpanded: u,
|
|
1256
|
-
isExpanded:
|
|
1257
|
-
} = Pe(e),
|
|
1258
|
+
isExpanded: d
|
|
1259
|
+
} = Pe(e), h = v(() => a ? a(e) : !1, [a, e]);
|
|
1258
1260
|
return /* @__PURE__ */ r(E, {
|
|
1259
1261
|
alignItems: "center",
|
|
1260
1262
|
justifyContent: "center",
|
|
1261
1263
|
indent: !0,
|
|
1262
|
-
children: !
|
|
1264
|
+
children: !h && /* @__PURE__ */ r(xe, {
|
|
1263
1265
|
size: "small",
|
|
1264
|
-
leftIcon:
|
|
1266
|
+
leftIcon: d ? Ze : Je,
|
|
1265
1267
|
onClick: u,
|
|
1266
1268
|
...i
|
|
1267
1269
|
})
|
|
@@ -1277,7 +1279,7 @@ const Xe = T.createContext({}), br = ({
|
|
|
1277
1279
|
return xt(o, t, n);
|
|
1278
1280
|
}, go = (e) => e == null ? "" : e instanceof Date ? e.toISOString() : typeof e == "object" ? JSON.stringify(e) : String(e), bo = (e) => Qt(en(e)), ko = "_standardTableCell_1xzcm_1", So = {
|
|
1279
1281
|
standardTableCell: ko
|
|
1280
|
-
}, Io =
|
|
1282
|
+
}, Io = P.memo(function({
|
|
1281
1283
|
enableGridCell: t,
|
|
1282
1284
|
children: n,
|
|
1283
1285
|
background: o,
|
|
@@ -1285,11 +1287,11 @@ const Xe = T.createContext({}), br = ({
|
|
|
1285
1287
|
isEditing: c,
|
|
1286
1288
|
justifyContent: l,
|
|
1287
1289
|
onKeyDown: i,
|
|
1288
|
-
width:
|
|
1290
|
+
width: a,
|
|
1289
1291
|
minWidth: u
|
|
1290
1292
|
}) {
|
|
1291
1293
|
return /* @__PURE__ */ r(E, {
|
|
1292
|
-
width:
|
|
1294
|
+
width: a,
|
|
1293
1295
|
minWidth: u,
|
|
1294
1296
|
height: "inherit",
|
|
1295
1297
|
background: o,
|
|
@@ -1311,7 +1313,7 @@ const Xe = T.createContext({}), br = ({
|
|
|
1311
1313
|
});
|
|
1312
1314
|
}), Eo = "_textCell_1yv6v_1", Ro = {
|
|
1313
1315
|
textCell: Eo
|
|
1314
|
-
},
|
|
1316
|
+
}, To = P.memo(function({
|
|
1315
1317
|
label: t
|
|
1316
1318
|
}) {
|
|
1317
1319
|
return /* @__PURE__ */ r(N, {
|
|
@@ -1322,7 +1324,7 @@ const Xe = T.createContext({}), br = ({
|
|
|
1322
1324
|
children: t
|
|
1323
1325
|
})
|
|
1324
1326
|
});
|
|
1325
|
-
}),
|
|
1327
|
+
}), Go = P.memo(function({
|
|
1326
1328
|
columnId: t,
|
|
1327
1329
|
item: n,
|
|
1328
1330
|
colIndex: o,
|
|
@@ -1333,45 +1335,45 @@ const Xe = T.createContext({}), br = ({
|
|
|
1333
1335
|
}) {
|
|
1334
1336
|
var Ae;
|
|
1335
1337
|
const {
|
|
1336
|
-
keyResolver:
|
|
1338
|
+
keyResolver: a,
|
|
1337
1339
|
enableGridCell: u,
|
|
1338
|
-
gridCellOptions:
|
|
1339
|
-
} = R(),
|
|
1340
|
+
gridCellOptions: d
|
|
1341
|
+
} = R(), h = Q().selectedIds.selectedIds, f = Re(), m = Bn(), {
|
|
1340
1342
|
numNavigableColumns: C
|
|
1341
|
-
} = yt(),
|
|
1343
|
+
} = yt(), p = Te(), w = v(() => a(n), [n, a]), y = v(() => h.indexOf(w) >= 0, [w, h]), {
|
|
1342
1344
|
itemValueResolver: b,
|
|
1343
|
-
itemLabelFormatter:
|
|
1344
|
-
width:
|
|
1345
|
-
minWidth:
|
|
1346
|
-
justifyContentCell:
|
|
1347
|
-
borderLeft:
|
|
1348
|
-
renderCell:
|
|
1345
|
+
itemLabelFormatter: k,
|
|
1346
|
+
width: S,
|
|
1347
|
+
minWidth: T,
|
|
1348
|
+
justifyContentCell: G = "flex-start",
|
|
1349
|
+
borderLeft: L,
|
|
1350
|
+
renderCell: x,
|
|
1349
1351
|
gridCellOptions: z,
|
|
1350
|
-
isEditable:
|
|
1351
|
-
onChange:
|
|
1352
|
-
onKeyDown:
|
|
1353
|
-
disableGridCell:
|
|
1352
|
+
isEditable: A,
|
|
1353
|
+
onChange: W,
|
|
1354
|
+
onKeyDown: H,
|
|
1355
|
+
disableGridCell: M,
|
|
1354
1356
|
disableGridCellFocus: J,
|
|
1355
|
-
zIndex:
|
|
1356
|
-
} = le(t), q = v(() => b ? b(n) : t in n ? n[t] : "", [b, n, t]), ee = v(() =>
|
|
1357
|
-
|
|
1357
|
+
zIndex: V
|
|
1358
|
+
} = le(t), q = v(() => b ? b(n) : t in n ? n[t] : "", [b, n, t]), ee = v(() => k ? k(q, n) : go(q), [q, k, n]), te = typeof A == "boolean" ? A : A ? A(n) : void 0, me = I((ae) => {
|
|
1359
|
+
H == null || H(ae, {
|
|
1358
1360
|
columnId: t,
|
|
1359
1361
|
item: n
|
|
1360
1362
|
}), m == null || m(ae, {
|
|
1361
1363
|
columnId: t,
|
|
1362
1364
|
item: n
|
|
1363
1365
|
});
|
|
1364
|
-
}, [m, t, n,
|
|
1366
|
+
}, [m, t, n, H]), X = he(ee, {
|
|
1365
1367
|
colIndex: o,
|
|
1366
1368
|
rowIndex: s,
|
|
1367
1369
|
numRows: c,
|
|
1368
1370
|
numCols: C,
|
|
1369
1371
|
tableId: f,
|
|
1370
1372
|
isEditable: te,
|
|
1371
|
-
onChange:
|
|
1372
|
-
...
|
|
1373
|
+
onChange: W ? (ae) => W(n, ae) : void 0,
|
|
1374
|
+
...d,
|
|
1373
1375
|
...z
|
|
1374
|
-
}),
|
|
1376
|
+
}), B = p[t], ie = (Ae = xo(t, n)) != null ? Ae : "inherit", fe = B.sticky ? V != null ? V : "var(--swui-sticky-column-z-index)" : V != null ? V : 1, kt = v(() => x ? x({
|
|
1375
1377
|
label: ee,
|
|
1376
1378
|
value: q,
|
|
1377
1379
|
item: n,
|
|
@@ -1380,27 +1382,27 @@ const Xe = T.createContext({}), br = ({
|
|
|
1380
1382
|
isSelected: y,
|
|
1381
1383
|
zIndex: fe,
|
|
1382
1384
|
itemKey: w
|
|
1383
|
-
}) : /* @__PURE__ */ r(
|
|
1385
|
+
}) : /* @__PURE__ */ r(To, {
|
|
1384
1386
|
label: ee
|
|
1385
|
-
}), [
|
|
1387
|
+
}), [x, ee, q, n, X, te, y, fe, w]), St = Oe(l, i, L), It = 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;
|
|
1386
1388
|
return /* @__PURE__ */ r("td", {
|
|
1387
1389
|
style: {
|
|
1388
1390
|
borderLeft: St,
|
|
1389
|
-
position:
|
|
1390
|
-
left:
|
|
1391
|
-
right:
|
|
1391
|
+
position: B.sticky ? "sticky" : void 0,
|
|
1392
|
+
left: B.sticky ? B.left : void 0,
|
|
1393
|
+
right: B.sticky ? B.right : void 0,
|
|
1392
1394
|
boxShadow: It,
|
|
1393
1395
|
zIndex: fe,
|
|
1394
1396
|
height: "var(--current-row-height)",
|
|
1395
1397
|
background: ie
|
|
1396
1398
|
},
|
|
1397
1399
|
children: /* @__PURE__ */ r(Io, {
|
|
1398
|
-
enableGridCell: u &&
|
|
1400
|
+
enableGridCell: u && !M && !J,
|
|
1399
1401
|
gridCellRequiredProps: X.requiredProps,
|
|
1400
1402
|
isEditing: X.isEditing,
|
|
1401
|
-
width:
|
|
1402
|
-
minWidth:
|
|
1403
|
-
justifyContent:
|
|
1403
|
+
width: S,
|
|
1404
|
+
minWidth: T,
|
|
1405
|
+
justifyContent: G,
|
|
1404
1406
|
onKeyDown: me,
|
|
1405
1407
|
children: kt
|
|
1406
1408
|
})
|
|
@@ -1414,8 +1416,8 @@ const Xe = T.createContext({}), br = ({
|
|
|
1414
1416
|
} = R(), {
|
|
1415
1417
|
isExpanded: s,
|
|
1416
1418
|
toggleRowExpanded: c
|
|
1417
|
-
} = Pe(t), l =
|
|
1418
|
-
return /* @__PURE__ */ r(
|
|
1419
|
+
} = Pe(t), l = Ge();
|
|
1420
|
+
return /* @__PURE__ */ r(O, {
|
|
1419
1421
|
children: o && n && s && /* @__PURE__ */ r("tr", {
|
|
1420
1422
|
style: {
|
|
1421
1423
|
borderLeft: et,
|
|
@@ -1448,7 +1450,7 @@ const Xe = T.createContext({}), br = ({
|
|
|
1448
1450
|
background: ${e};
|
|
1449
1451
|
}
|
|
1450
1452
|
` : ""}
|
|
1451
|
-
`, Po =
|
|
1453
|
+
`, Po = P.memo(function({
|
|
1452
1454
|
item: t,
|
|
1453
1455
|
idListForEnabledItems: n,
|
|
1454
1456
|
rowIndex: o,
|
|
@@ -1457,28 +1459,28 @@ const Xe = T.createContext({}), br = ({
|
|
|
1457
1459
|
alwaysVisible: l,
|
|
1458
1460
|
shiftPressedRef: i
|
|
1459
1461
|
}) {
|
|
1460
|
-
const
|
|
1461
|
-
stickyCheckboxColumn:
|
|
1462
|
-
} = R(),
|
|
1462
|
+
const a = ne(null), u = Ge(), {
|
|
1463
|
+
stickyCheckboxColumn: d
|
|
1464
|
+
} = R(), h = Z(), {
|
|
1463
1465
|
columnIndexPerColumnId: f
|
|
1464
1466
|
} = yt(), {
|
|
1465
1467
|
showRowCheckbox: m,
|
|
1466
1468
|
rowBackgroundResolver: C,
|
|
1467
|
-
checkboxDisabledResolver:
|
|
1469
|
+
checkboxDisabledResolver: p,
|
|
1468
1470
|
enableGridCell: w,
|
|
1469
1471
|
rowIndent: y,
|
|
1470
1472
|
enableExpandCollapse: b
|
|
1471
1473
|
} = R(), {
|
|
1472
|
-
isExpanded:
|
|
1474
|
+
isExpanded: k
|
|
1473
1475
|
} = Pe(t), {
|
|
1474
|
-
isSelected:
|
|
1475
|
-
toggleSelected:
|
|
1476
|
-
shiftAndToggleSelected:
|
|
1477
|
-
} = Co(t, n),
|
|
1476
|
+
isSelected: S,
|
|
1477
|
+
toggleSelected: T,
|
|
1478
|
+
shiftAndToggleSelected: G
|
|
1479
|
+
} = Co(t, n), L = Bt(a, {
|
|
1478
1480
|
rootMargin: "400px 0px 400px 0px",
|
|
1479
1481
|
threshold: 0
|
|
1480
|
-
}),
|
|
1481
|
-
children: /* @__PURE__ */ g(
|
|
1482
|
+
}), x = v(() => C == null ? void 0 : C(t, S), [S, t, C]), z = Ao(x, S, k), A = Lo(x, S, k), W = Bo(x, S, A), H = v(() => p == null ? void 0 : p(t), [t, p]), M = $n(), J = _e(M, t), V = Hn(), q = _e(V, t), ee = v(() => /* @__PURE__ */ r(O, {
|
|
1483
|
+
children: /* @__PURE__ */ g(O, {
|
|
1482
1484
|
children: [y && /* @__PURE__ */ r("td", {
|
|
1483
1485
|
style: {
|
|
1484
1486
|
background: J
|
|
@@ -1488,11 +1490,11 @@ const Xe = T.createContext({}), br = ({
|
|
|
1488
1490
|
})
|
|
1489
1491
|
}), b && /* @__PURE__ */ r("td", {
|
|
1490
1492
|
style: {
|
|
1491
|
-
background:
|
|
1492
|
-
position:
|
|
1493
|
-
left:
|
|
1494
|
-
boxShadow:
|
|
1495
|
-
zIndex:
|
|
1493
|
+
background: d ? "inherit" : void 0,
|
|
1494
|
+
position: d ? "sticky" : void 0,
|
|
1495
|
+
left: d ? "0px" : void 0,
|
|
1496
|
+
boxShadow: d ? "var(--swui-sticky-column-shadow-right)" : void 0,
|
|
1497
|
+
zIndex: d ? "var(--swui-sticky-column-z-index)" : void 0
|
|
1496
1498
|
},
|
|
1497
1499
|
children: /* @__PURE__ */ r(E, {
|
|
1498
1500
|
width: "var(--swui-expand-cell-width)",
|
|
@@ -1508,12 +1510,12 @@ const Xe = T.createContext({}), br = ({
|
|
|
1508
1510
|
})
|
|
1509
1511
|
}), m && /* @__PURE__ */ r("td", {
|
|
1510
1512
|
style: {
|
|
1511
|
-
background:
|
|
1512
|
-
position:
|
|
1513
|
-
left: b &&
|
|
1513
|
+
background: d ? "inherit" : void 0,
|
|
1514
|
+
position: d ? "sticky" : void 0,
|
|
1515
|
+
left: b && d ? "var(--swui-expand-cell-width)" : d ? "0px" : void 0,
|
|
1514
1516
|
textAlign: "center",
|
|
1515
|
-
boxShadow:
|
|
1516
|
-
zIndex:
|
|
1517
|
+
boxShadow: d ? "var(--swui-sticky-column-shadow-right)" : void 0,
|
|
1518
|
+
zIndex: d ? "var(--swui-sticky-column-z-index)" : void 0
|
|
1517
1519
|
},
|
|
1518
1520
|
children: /* @__PURE__ */ r(E, {
|
|
1519
1521
|
width: "var(--swui-checkbox-cell-width)",
|
|
@@ -1521,29 +1523,29 @@ const Xe = T.createContext({}), br = ({
|
|
|
1521
1523
|
alignItems: "center",
|
|
1522
1524
|
justifyContent: "center",
|
|
1523
1525
|
children: /* @__PURE__ */ r(fo, {
|
|
1524
|
-
disabled:
|
|
1525
|
-
value:
|
|
1526
|
-
onValueChange:
|
|
1527
|
-
onValueChangeAndShift:
|
|
1526
|
+
disabled: H,
|
|
1527
|
+
value: S,
|
|
1528
|
+
onValueChange: T,
|
|
1529
|
+
onValueChangeAndShift: G,
|
|
1528
1530
|
colIndex: c + (b ? 1 : 0),
|
|
1529
1531
|
rowIndex: o,
|
|
1530
1532
|
numRows: s,
|
|
1531
1533
|
shiftPressedRef: i
|
|
1532
1534
|
})
|
|
1533
1535
|
})
|
|
1534
|
-
}),
|
|
1536
|
+
}), h.map(({
|
|
1535
1537
|
groupConfig: te,
|
|
1536
1538
|
groupId: me
|
|
1537
|
-
}, X) => /* @__PURE__ */ r(
|
|
1538
|
-
children: te.columnOrder.map((
|
|
1539
|
-
columnId:
|
|
1539
|
+
}, X) => /* @__PURE__ */ r(P.Fragment, {
|
|
1540
|
+
children: te.columnOrder.map((B, ie) => /* @__PURE__ */ r(Go, {
|
|
1541
|
+
columnId: B,
|
|
1540
1542
|
item: t,
|
|
1541
|
-
colIndex: c + f[
|
|
1543
|
+
colIndex: c + f[B],
|
|
1542
1544
|
rowIndex: o,
|
|
1543
1545
|
numRows: s,
|
|
1544
1546
|
borderFromGroup: pe(X, ie, te.borderLeft),
|
|
1545
1547
|
disableBorderLeft: X === 0 && ie === 0
|
|
1546
|
-
},
|
|
1548
|
+
}, B))
|
|
1547
1549
|
}, me)), y && /* @__PURE__ */ r("td", {
|
|
1548
1550
|
style: {
|
|
1549
1551
|
background: q
|
|
@@ -1553,15 +1555,15 @@ const Xe = T.createContext({}), br = ({
|
|
|
1553
1555
|
})
|
|
1554
1556
|
}), /* @__PURE__ */ r("td", {})]
|
|
1555
1557
|
})
|
|
1556
|
-
}), [c, f,
|
|
1557
|
-
return /* @__PURE__ */ g(
|
|
1558
|
+
}), [c, f, H, b, w, J, h, S, t, q, s, y, o, G, i, m, d, T]);
|
|
1559
|
+
return /* @__PURE__ */ g(O, {
|
|
1558
1560
|
children: [/* @__PURE__ */ r(gt, {
|
|
1559
|
-
hoverBackground:
|
|
1561
|
+
hoverBackground: A,
|
|
1560
1562
|
background: z,
|
|
1561
|
-
focusBackground:
|
|
1562
|
-
borderLeft:
|
|
1563
|
-
ref:
|
|
1564
|
-
children:
|
|
1563
|
+
focusBackground: W,
|
|
1564
|
+
borderLeft: k ? et : ke,
|
|
1565
|
+
ref: a,
|
|
1566
|
+
children: L || l || k ? ee : /* @__PURE__ */ r("td", {
|
|
1565
1567
|
colSpan: u,
|
|
1566
1568
|
style: {
|
|
1567
1569
|
height: "var(--current-row-height)"
|
|
@@ -1571,31 +1573,31 @@ const Xe = T.createContext({}), br = ({
|
|
|
1571
1573
|
item: t
|
|
1572
1574
|
})]
|
|
1573
1575
|
});
|
|
1574
|
-
}), Ao = (e, t, n) => e ? typeof e == "string" ? e : e == null ? void 0 : e.background : t ?
|
|
1576
|
+
}), Ao = (e, t, n) => e ? typeof e == "string" ? e : e == null ? void 0 : e.background : t ? j("--lhds-color-blue-100") : n ? Qe : "white", Lo = (e, t, n) => e ? typeof e == "string" ? e : e == null ? void 0 : e.hoverBackground : t ? j("--lhds-color-blue-200") : n ? cn : j("--lhds-color-ui-200"), Bo = (e, t, n) => {
|
|
1575
1577
|
if (t)
|
|
1576
|
-
return
|
|
1578
|
+
return j("--lhds-color-blue-200");
|
|
1577
1579
|
if (e)
|
|
1578
1580
|
return n;
|
|
1579
1581
|
}, Do = (e) => Object.values(e).some((t) => No(t)), No = (e) => Boolean(e.renderSummaryCell || e.summaryText), zo = "_summaryRow_12x8k_1", Ko = {
|
|
1580
1582
|
summaryRow: zo
|
|
1581
|
-
}, $o =
|
|
1583
|
+
}, $o = P.memo(function({
|
|
1582
1584
|
columnId: t,
|
|
1583
1585
|
items: n,
|
|
1584
1586
|
disableBorderLeft: o,
|
|
1585
1587
|
borderFromGroup: s,
|
|
1586
1588
|
colSpan: c
|
|
1587
1589
|
}) {
|
|
1588
|
-
const l =
|
|
1590
|
+
const l = Te(), {
|
|
1589
1591
|
renderSummaryCell: i,
|
|
1590
|
-
summaryText:
|
|
1592
|
+
summaryText: a,
|
|
1591
1593
|
borderLeft: u,
|
|
1592
|
-
zIndex:
|
|
1593
|
-
width:
|
|
1594
|
+
zIndex: d,
|
|
1595
|
+
width: h,
|
|
1594
1596
|
minWidth: f,
|
|
1595
1597
|
justifyContentCell: m
|
|
1596
|
-
} = le(t), C = Oe(s, o, u),
|
|
1598
|
+
} = le(t), C = Oe(s, o, u), p = l[t], w = 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({
|
|
1597
1599
|
items: n
|
|
1598
|
-
}), [n,
|
|
1600
|
+
}), [n, a]), k = v(() => i == null ? void 0 : i({
|
|
1599
1601
|
items: n,
|
|
1600
1602
|
text: b
|
|
1601
1603
|
}), [n, i, b]);
|
|
@@ -1603,21 +1605,21 @@ const Xe = T.createContext({}), br = ({
|
|
|
1603
1605
|
colSpan: c,
|
|
1604
1606
|
style: {
|
|
1605
1607
|
borderLeft: C,
|
|
1606
|
-
position:
|
|
1607
|
-
left:
|
|
1608
|
-
right:
|
|
1608
|
+
position: p.sticky ? "sticky" : void 0,
|
|
1609
|
+
left: p.sticky ? p.left : void 0,
|
|
1610
|
+
right: p.sticky ? p.right : void 0,
|
|
1609
1611
|
boxShadow: y,
|
|
1610
1612
|
zIndex: w,
|
|
1611
1613
|
height: "var(--current-row-height)"
|
|
1612
1614
|
},
|
|
1613
1615
|
children: /* @__PURE__ */ r(E, {
|
|
1614
|
-
width:
|
|
1616
|
+
width: h,
|
|
1615
1617
|
minWidth: f,
|
|
1616
1618
|
height: "inherit",
|
|
1617
1619
|
overflow: "hidden",
|
|
1618
1620
|
justifyContent: m,
|
|
1619
1621
|
alignItems: "center",
|
|
1620
|
-
children: i ?
|
|
1622
|
+
children: i ? k : /* @__PURE__ */ r(N, {
|
|
1621
1623
|
children: /* @__PURE__ */ r(U, {
|
|
1622
1624
|
variant: "bold",
|
|
1623
1625
|
children: b
|
|
@@ -1637,7 +1639,7 @@ const Xe = T.createContext({}), br = ({
|
|
|
1637
1639
|
l > 1 && (o += l - 1);
|
|
1638
1640
|
}
|
|
1639
1641
|
return n;
|
|
1640
|
-
}, Mo =
|
|
1642
|
+
}, Mo = P.memo(function({
|
|
1641
1643
|
items: t
|
|
1642
1644
|
}) {
|
|
1643
1645
|
const n = Z(), {
|
|
@@ -1654,19 +1656,19 @@ const Xe = T.createContext({}), br = ({
|
|
|
1654
1656
|
})
|
|
1655
1657
|
}), s && /* @__PURE__ */ r("td", {}), o && /* @__PURE__ */ r("td", {}), n.map(({
|
|
1656
1658
|
groupConfig: i,
|
|
1657
|
-
groupId:
|
|
1658
|
-
}, u) => /* @__PURE__ */ r(
|
|
1659
|
+
groupId: a
|
|
1660
|
+
}, u) => /* @__PURE__ */ r(P.Fragment, {
|
|
1659
1661
|
children: Ho(i.columnOrder, c).map(({
|
|
1660
|
-
columnId:
|
|
1661
|
-
colSpan:
|
|
1662
|
+
columnId: d,
|
|
1663
|
+
colSpan: h
|
|
1662
1664
|
}, f) => /* @__PURE__ */ r($o, {
|
|
1663
|
-
colSpan:
|
|
1664
|
-
columnId:
|
|
1665
|
+
colSpan: h,
|
|
1666
|
+
columnId: d,
|
|
1665
1667
|
items: t,
|
|
1666
1668
|
borderFromGroup: pe(u, f, i.borderLeft),
|
|
1667
1669
|
disableBorderLeft: u === 0 && f === 0
|
|
1668
|
-
},
|
|
1669
|
-
},
|
|
1670
|
+
}, d))
|
|
1671
|
+
}, a)), l && /* @__PURE__ */ r("td", {
|
|
1670
1672
|
children: /* @__PURE__ */ r(N, {
|
|
1671
1673
|
num: l
|
|
1672
1674
|
})
|
|
@@ -1681,7 +1683,7 @@ const Xe = T.createContext({}), br = ({
|
|
|
1681
1683
|
return v(() => Do(n), [n]) ? /* @__PURE__ */ r(Mo, {
|
|
1682
1684
|
items: t
|
|
1683
1685
|
}) : null;
|
|
1684
|
-
}, bt = (e) => (t) => !(e != null && e(t)), _o =
|
|
1686
|
+
}, bt = (e) => (t) => !(e != null && e(t)), _o = P.memo(function({
|
|
1685
1687
|
items: t,
|
|
1686
1688
|
colIndexOffset: n = 0,
|
|
1687
1689
|
rowIndexOffset: o = 0
|
|
@@ -1689,46 +1691,46 @@ const Xe = T.createContext({}), br = ({
|
|
|
1689
1691
|
const s = ne(0), c = ne(!1), {
|
|
1690
1692
|
keyResolver: l,
|
|
1691
1693
|
disableInfiniteList: i,
|
|
1692
|
-
checkboxDisabledResolver:
|
|
1694
|
+
checkboxDisabledResolver: a,
|
|
1693
1695
|
enableExternalSorting: u
|
|
1694
1696
|
} = R(), {
|
|
1695
1697
|
sortOrder: {
|
|
1696
|
-
sortBy:
|
|
1697
|
-
desc:
|
|
1698
|
+
sortBy: d,
|
|
1699
|
+
desc: h
|
|
1698
1700
|
}
|
|
1699
|
-
} = Q(), f = mo(
|
|
1701
|
+
} = Q(), f = mo(d), m = v(() => {
|
|
1700
1702
|
if (u)
|
|
1701
1703
|
return t != null ? t : [];
|
|
1702
1704
|
if (!t || !t.length)
|
|
1703
1705
|
return [];
|
|
1704
1706
|
if (!f)
|
|
1705
1707
|
return t;
|
|
1706
|
-
const
|
|
1707
|
-
return
|
|
1708
|
-
}, [u, t, f,
|
|
1708
|
+
const p = [...t];
|
|
1709
|
+
return p.sort((w, y) => po(f(w), f(y))), h && p.reverse(), i || s.current++, p;
|
|
1710
|
+
}, [u, t, f, h, i]), C = v(() => m.filter(bt(a)).map((p) => l(p)), [m, a, l]);
|
|
1709
1711
|
return je(() => {
|
|
1710
|
-
const
|
|
1712
|
+
const p = (y) => {
|
|
1711
1713
|
y.key === "Shift" && (c.current = !1);
|
|
1712
1714
|
}, w = (y) => {
|
|
1713
1715
|
y.key === "Shift" && (c.current = !0);
|
|
1714
1716
|
};
|
|
1715
|
-
return document.addEventListener("keyup",
|
|
1716
|
-
document.removeEventListener("keyup",
|
|
1717
|
+
return document.addEventListener("keyup", p), document.addEventListener("keydown", w), () => {
|
|
1718
|
+
document.removeEventListener("keyup", p), document.removeEventListener("keydown", w);
|
|
1717
1719
|
};
|
|
1718
|
-
}, []), /* @__PURE__ */ g(
|
|
1719
|
-
children: [m.map((
|
|
1720
|
+
}, []), /* @__PURE__ */ g(P.Fragment, {
|
|
1721
|
+
children: [m.map((p, w) => /* @__PURE__ */ r(Po, {
|
|
1720
1722
|
alwaysVisible: i || m.length < 30,
|
|
1721
|
-
item:
|
|
1723
|
+
item: p,
|
|
1722
1724
|
idListForEnabledItems: C,
|
|
1723
1725
|
colIndexOffset: n,
|
|
1724
1726
|
rowIndex: w + o,
|
|
1725
1727
|
numRows: m.length,
|
|
1726
1728
|
shiftPressedRef: c
|
|
1727
|
-
}, l(
|
|
1729
|
+
}, l(p))), /* @__PURE__ */ r(Vo, {
|
|
1728
1730
|
items: m
|
|
1729
1731
|
})]
|
|
1730
1732
|
}, s.current);
|
|
1731
|
-
}), jo =
|
|
1733
|
+
}), jo = P.memo(function({
|
|
1732
1734
|
error: t,
|
|
1733
1735
|
bannerError: n,
|
|
1734
1736
|
loading: o,
|
|
@@ -1736,14 +1738,14 @@ const Xe = T.createContext({}), br = ({
|
|
|
1736
1738
|
noItemsLabel: c = "There is no data available.",
|
|
1737
1739
|
noItemsContentRight: l,
|
|
1738
1740
|
noItemsContentBottom: i,
|
|
1739
|
-
noItemsHeader:
|
|
1741
|
+
noItemsHeader: a,
|
|
1740
1742
|
colIndexOffset: u,
|
|
1741
|
-
rowIndexOffset:
|
|
1742
|
-
variant:
|
|
1743
|
+
rowIndexOffset: d,
|
|
1744
|
+
variant: h,
|
|
1743
1745
|
errorLabel: f
|
|
1744
1746
|
}) {
|
|
1745
1747
|
var C;
|
|
1746
|
-
const m =
|
|
1748
|
+
const m = Ge();
|
|
1747
1749
|
return n ? /* @__PURE__ */ r("tbody", {
|
|
1748
1750
|
children: /* @__PURE__ */ r("tr", {
|
|
1749
1751
|
children: /* @__PURE__ */ r("td", {
|
|
@@ -1797,7 +1799,7 @@ const Xe = T.createContext({}), br = ({
|
|
|
1797
1799
|
justifyContent: "center",
|
|
1798
1800
|
children: /* @__PURE__ */ r(Le, {
|
|
1799
1801
|
text: c,
|
|
1800
|
-
headerText:
|
|
1802
|
+
headerText: a,
|
|
1801
1803
|
contentRight: l,
|
|
1802
1804
|
variant: "info",
|
|
1803
1805
|
children: i
|
|
@@ -1807,10 +1809,10 @@ const Xe = T.createContext({}), br = ({
|
|
|
1807
1809
|
})
|
|
1808
1810
|
}) : /* @__PURE__ */ r("tbody", {
|
|
1809
1811
|
children: /* @__PURE__ */ r(_o, {
|
|
1810
|
-
variant:
|
|
1812
|
+
variant: h,
|
|
1811
1813
|
items: s,
|
|
1812
1814
|
colIndexOffset: u,
|
|
1813
|
-
rowIndexOffset:
|
|
1815
|
+
rowIndexOffset: d
|
|
1814
1816
|
})
|
|
1815
1817
|
});
|
|
1816
1818
|
}), Wo = (e) => {
|
|
@@ -1819,10 +1821,10 @@ const Xe = T.createContext({}), br = ({
|
|
|
1819
1821
|
} = Q(), {
|
|
1820
1822
|
actions: { setSelectedIds: s, clearSelection: c },
|
|
1821
1823
|
dispatch: l
|
|
1822
|
-
} = ce(), i = o.length === 0,
|
|
1824
|
+
} = ce(), i = o.length === 0, a = e ? e.length > 0 && o.length === e.length : !1, u = I(() => {
|
|
1823
1825
|
e && l(
|
|
1824
1826
|
i ? s(
|
|
1825
|
-
e.filter(bt(n)).map((
|
|
1827
|
+
e.filter(bt(n)).map((d) => t(d))
|
|
1826
1828
|
) : c()
|
|
1827
1829
|
);
|
|
1828
1830
|
}, [
|
|
@@ -1836,7 +1838,7 @@ const Xe = T.createContext({}), br = ({
|
|
|
1836
1838
|
]);
|
|
1837
1839
|
return {
|
|
1838
1840
|
selectionIsEmpty: i,
|
|
1839
|
-
allItemsAreSelected:
|
|
1841
|
+
allItemsAreSelected: a,
|
|
1840
1842
|
onClickCheckbox: u
|
|
1841
1843
|
};
|
|
1842
1844
|
}, qo = (e) => {
|
|
@@ -1846,7 +1848,7 @@ const Xe = T.createContext({}), br = ({
|
|
|
1846
1848
|
actions: { collapseAll: o, expandByIds: s },
|
|
1847
1849
|
dispatch: c
|
|
1848
1850
|
} = ce(), l = e ? e.length > 0 && n.length === e.length : !1, i = I(() => {
|
|
1849
|
-
e && c(l ? o() : s(e.map((
|
|
1851
|
+
e && c(l ? o() : s(e.map((a) => t(a))));
|
|
1850
1852
|
}, [
|
|
1851
1853
|
l,
|
|
1852
1854
|
o,
|
|
@@ -1875,54 +1877,56 @@ const Xe = T.createContext({}), br = ({
|
|
|
1875
1877
|
}
|
|
1876
1878
|
};
|
|
1877
1879
|
}, [e, c, s, t, n, o]);
|
|
1878
|
-
}, Uo =
|
|
1880
|
+
}, Uo = P.memo(function({
|
|
1879
1881
|
columnId: t,
|
|
1880
1882
|
borderFromGroup: n,
|
|
1881
1883
|
disableBorderLeft: o,
|
|
1882
1884
|
stickyHeader: s,
|
|
1883
|
-
top: c
|
|
1885
|
+
top: c,
|
|
1886
|
+
appendTooltipTo: l
|
|
1884
1887
|
}) {
|
|
1885
1888
|
const {
|
|
1886
|
-
justifyContentHeader:
|
|
1887
|
-
columnLabel:
|
|
1888
|
-
borderLeft:
|
|
1889
|
-
infoIconTooltipText:
|
|
1890
|
-
background:
|
|
1891
|
-
zIndex:
|
|
1892
|
-
sortOrderIconVariant:
|
|
1893
|
-
width:
|
|
1894
|
-
minWidth:
|
|
1889
|
+
justifyContentHeader: i,
|
|
1890
|
+
columnLabel: a,
|
|
1891
|
+
borderLeft: u,
|
|
1892
|
+
infoIconTooltipText: d,
|
|
1893
|
+
background: h,
|
|
1894
|
+
zIndex: f,
|
|
1895
|
+
sortOrderIconVariant: m,
|
|
1896
|
+
width: C,
|
|
1897
|
+
minWidth: p
|
|
1895
1898
|
} = le(t), {
|
|
1896
|
-
disableSorting:
|
|
1897
|
-
sortOrderIconVariant:
|
|
1898
|
-
} = R(),
|
|
1899
|
-
arrow:
|
|
1899
|
+
disableSorting: w,
|
|
1900
|
+
sortOrderIconVariant: y
|
|
1901
|
+
} = R(), b = Te(), {
|
|
1902
|
+
arrow: k,
|
|
1900
1903
|
selected: S,
|
|
1901
|
-
onClickColumnHead:
|
|
1902
|
-
} = Fo(t),
|
|
1904
|
+
onClickColumnHead: T
|
|
1905
|
+
} = Fo(t), G = typeof a == "string" ? a : bo(t), L = Oe(n, o, u), x = b[t];
|
|
1903
1906
|
return /* @__PURE__ */ r("th", {
|
|
1904
1907
|
style: {
|
|
1905
|
-
background:
|
|
1906
|
-
borderLeft:
|
|
1907
|
-
position: s ||
|
|
1908
|
-
left:
|
|
1909
|
-
right:
|
|
1908
|
+
background: h != null ? h : "white",
|
|
1909
|
+
borderLeft: L,
|
|
1910
|
+
position: s || x.sticky ? "sticky" : void 0,
|
|
1911
|
+
left: x.left,
|
|
1912
|
+
right: x.right,
|
|
1910
1913
|
top: c,
|
|
1911
|
-
boxShadow:
|
|
1912
|
-
zIndex: s &&
|
|
1914
|
+
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)" : f,
|
|
1913
1916
|
height: 0,
|
|
1914
|
-
width:
|
|
1915
|
-
minWidth:
|
|
1917
|
+
width: C,
|
|
1918
|
+
minWidth: p
|
|
1916
1919
|
},
|
|
1917
1920
|
children: /* @__PURE__ */ r(Ee, {
|
|
1918
1921
|
width: "inherit",
|
|
1919
1922
|
minWidth: "inherit",
|
|
1920
|
-
arrow: !
|
|
1921
|
-
onClick:
|
|
1922
|
-
label:
|
|
1923
|
-
infoIconTooltipText:
|
|
1924
|
-
alignRight:
|
|
1925
|
-
sortOrderIconVariant:
|
|
1923
|
+
arrow: !w && G ? k : void 0,
|
|
1924
|
+
onClick: w ? void 0 : T,
|
|
1925
|
+
label: G,
|
|
1926
|
+
infoIconTooltipText: d,
|
|
1927
|
+
alignRight: i === "flex-end",
|
|
1928
|
+
sortOrderIconVariant: m != null ? m : y,
|
|
1929
|
+
appendTooltipTo: l,
|
|
1926
1930
|
selected: S,
|
|
1927
1931
|
height: "100%"
|
|
1928
1932
|
})
|
|
@@ -1936,45 +1940,46 @@ const Xe = T.createContext({}), br = ({
|
|
|
1936
1940
|
return e;
|
|
1937
1941
|
if (o)
|
|
1938
1942
|
return 0;
|
|
1939
|
-
}, Jo =
|
|
1943
|
+
}, Jo = P.memo(function({
|
|
1940
1944
|
items: t,
|
|
1941
|
-
|
|
1945
|
+
appendTooltipTo: n,
|
|
1946
|
+
height: o = Se
|
|
1942
1947
|
}) {
|
|
1943
|
-
const
|
|
1944
|
-
showHeaderCheckbox:
|
|
1945
|
-
showHeaderExpandCollapse:
|
|
1946
|
-
enableExpandCollapse:
|
|
1947
|
-
rowIndent:
|
|
1948
|
-
headerRowOffsetTop:
|
|
1949
|
-
zIndex:
|
|
1950
|
-
stickyHeader:
|
|
1951
|
-
stickyCheckboxColumn:
|
|
1952
|
-
showRowCheckbox:
|
|
1953
|
-
} = R(),
|
|
1954
|
-
allItemsAreExpanded:
|
|
1955
|
-
toggleExpanded:
|
|
1948
|
+
const s = Z(), {
|
|
1949
|
+
showHeaderCheckbox: c,
|
|
1950
|
+
showHeaderExpandCollapse: l,
|
|
1951
|
+
enableExpandCollapse: i,
|
|
1952
|
+
rowIndent: a,
|
|
1953
|
+
headerRowOffsetTop: u,
|
|
1954
|
+
zIndex: d,
|
|
1955
|
+
stickyHeader: h,
|
|
1956
|
+
stickyCheckboxColumn: f,
|
|
1957
|
+
showRowCheckbox: m
|
|
1958
|
+
} = R(), C = zn(), {
|
|
1959
|
+
allItemsAreExpanded: p,
|
|
1960
|
+
toggleExpanded: w
|
|
1956
1961
|
} = qo(t), {
|
|
1957
|
-
allItemsAreSelected:
|
|
1958
|
-
onClickCheckbox:
|
|
1959
|
-
selectionIsEmpty:
|
|
1960
|
-
} = Wo(t), S = !t || t.length === 0,
|
|
1961
|
-
zIndex:
|
|
1962
|
-
top: Zo(
|
|
1963
|
-
background:
|
|
1964
|
-
position:
|
|
1965
|
-
boxShadow:
|
|
1962
|
+
allItemsAreSelected: y,
|
|
1963
|
+
onClickCheckbox: b,
|
|
1964
|
+
selectionIsEmpty: k
|
|
1965
|
+
} = Wo(t), S = !t || t.length === 0, T = {
|
|
1966
|
+
zIndex: h && f ? "var(--swui-sticky-header-in-sticky-column-z-index)" : f ? "var(--swui-sticky-group-header-z-index)" : h ? "var(--swui-sticky-header-z-index)" : d,
|
|
1967
|
+
top: Zo(u, C, o, h),
|
|
1968
|
+
background: h || f ? "white" : void 0,
|
|
1969
|
+
position: h || f ? "sticky" : void 0,
|
|
1970
|
+
boxShadow: h && f ? "var(--swui-sticky-header-shadow-and-right)" : f ? "var(--swui-sticky-column-shadow-right)" : h ? "var(--swui-sticky-header-shadow)" : void 0
|
|
1966
1971
|
};
|
|
1967
1972
|
return /* @__PURE__ */ g(gt, {
|
|
1968
|
-
height:
|
|
1973
|
+
height: o,
|
|
1969
1974
|
borderLeft: ke,
|
|
1970
|
-
children: [
|
|
1971
|
-
style:
|
|
1975
|
+
children: [a && /* @__PURE__ */ r("th", {
|
|
1976
|
+
style: T,
|
|
1972
1977
|
children: /* @__PURE__ */ r(E, {
|
|
1973
|
-
indent:
|
|
1978
|
+
indent: a
|
|
1974
1979
|
})
|
|
1975
|
-
}),
|
|
1980
|
+
}), i && /* @__PURE__ */ r("th", {
|
|
1976
1981
|
style: {
|
|
1977
|
-
...
|
|
1982
|
+
...T,
|
|
1978
1983
|
left: "0px",
|
|
1979
1984
|
textAlign: "left"
|
|
1980
1985
|
},
|
|
@@ -1983,52 +1988,53 @@ const Xe = T.createContext({}), br = ({
|
|
|
1983
1988
|
minWidth: "var(--swui-expand-cell-width)",
|
|
1984
1989
|
alignItems: "center",
|
|
1985
1990
|
justifyContent: "center",
|
|
1986
|
-
children:
|
|
1991
|
+
children: l && /* @__PURE__ */ r(xe, {
|
|
1987
1992
|
size: "small",
|
|
1988
|
-
leftIcon:
|
|
1989
|
-
onClick:
|
|
1993
|
+
leftIcon: p ? Ze : Je,
|
|
1994
|
+
onClick: w
|
|
1990
1995
|
})
|
|
1991
1996
|
})
|
|
1992
|
-
}), (
|
|
1997
|
+
}), (m || c) && /* @__PURE__ */ r("th", {
|
|
1993
1998
|
style: {
|
|
1994
|
-
...
|
|
1999
|
+
...T,
|
|
1995
2000
|
overflow: "hidden",
|
|
1996
|
-
left:
|
|
2001
|
+
left: f && i ? "var(--swui-expand-cell-width)" : f ? "0px" : void 0
|
|
1997
2002
|
},
|
|
1998
2003
|
children: /* @__PURE__ */ r(E, {
|
|
1999
2004
|
width: "var(--swui-checkbox-cell-width)",
|
|
2000
2005
|
minWidth: "var(--swui-checkbox-cell-width)",
|
|
2001
2006
|
alignItems: "center",
|
|
2002
2007
|
justifyContent: "center",
|
|
2003
|
-
children:
|
|
2008
|
+
children: c && /* @__PURE__ */ r(Ue, {
|
|
2004
2009
|
size: "small",
|
|
2005
2010
|
disabled: S,
|
|
2006
|
-
value:
|
|
2007
|
-
indeterminate: !
|
|
2008
|
-
onValueChange:
|
|
2011
|
+
value: y,
|
|
2012
|
+
indeterminate: !k && !y,
|
|
2013
|
+
onValueChange: b
|
|
2009
2014
|
})
|
|
2010
2015
|
})
|
|
2011
|
-
}),
|
|
2012
|
-
groupConfig:
|
|
2013
|
-
groupId:
|
|
2014
|
-
},
|
|
2015
|
-
children:
|
|
2016
|
-
columnId:
|
|
2017
|
-
borderFromGroup: pe(
|
|
2018
|
-
disableBorderLeft:
|
|
2019
|
-
stickyHeader:
|
|
2020
|
-
top:
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2016
|
+
}), s.map(({
|
|
2017
|
+
groupConfig: G,
|
|
2018
|
+
groupId: L
|
|
2019
|
+
}, x) => /* @__PURE__ */ r(P.Fragment, {
|
|
2020
|
+
children: G.columnOrder.map((z, A) => /* @__PURE__ */ r(Uo, {
|
|
2021
|
+
columnId: z,
|
|
2022
|
+
borderFromGroup: pe(x, A, G.borderLeft),
|
|
2023
|
+
disableBorderLeft: x === 0 && A === 0,
|
|
2024
|
+
stickyHeader: h,
|
|
2025
|
+
top: T.top,
|
|
2026
|
+
appendTooltipTo: n
|
|
2027
|
+
}, z))
|
|
2028
|
+
}, L)), a && /* @__PURE__ */ r("th", {
|
|
2029
|
+
style: T,
|
|
2024
2030
|
children: /* @__PURE__ */ r(E, {
|
|
2025
|
-
indent:
|
|
2031
|
+
indent: a
|
|
2026
2032
|
})
|
|
2027
2033
|
}), /* @__PURE__ */ r("th", {
|
|
2028
|
-
style:
|
|
2034
|
+
style: T
|
|
2029
2035
|
})]
|
|
2030
2036
|
});
|
|
2031
|
-
}),
|
|
2037
|
+
}), Gr = function({
|
|
2032
2038
|
tableContext: t,
|
|
2033
2039
|
config: n,
|
|
2034
2040
|
columnOrder: o,
|
|
@@ -2036,76 +2042,78 @@ const Xe = T.createContext({}), br = ({
|
|
|
2036
2042
|
tableId: c,
|
|
2037
2043
|
variant: l = "standard",
|
|
2038
2044
|
onKeyDown: i,
|
|
2039
|
-
onSortOrderChange:
|
|
2040
|
-
|
|
2045
|
+
onSortOrderChange: a,
|
|
2046
|
+
appendTooltipTo: u,
|
|
2047
|
+
...d
|
|
2041
2048
|
}) {
|
|
2042
|
-
const
|
|
2043
|
-
initialSortOrderDesc:
|
|
2044
|
-
initialSortOrder:
|
|
2045
|
-
enableExpandCollapse:
|
|
2046
|
-
stickyCheckboxColumn:
|
|
2049
|
+
const h = Rt(), {
|
|
2050
|
+
initialSortOrderDesc: f,
|
|
2051
|
+
initialSortOrder: m,
|
|
2052
|
+
enableExpandCollapse: C,
|
|
2053
|
+
stickyCheckboxColumn: p
|
|
2047
2054
|
} = n, {
|
|
2048
|
-
tableContext:
|
|
2049
|
-
} = ro(c != null ? c :
|
|
2050
|
-
state:
|
|
2051
|
-
actions:
|
|
2055
|
+
tableContext: w
|
|
2056
|
+
} = ro(c != null ? c : h, at(m, f)), y = t || w, {
|
|
2057
|
+
state: b,
|
|
2058
|
+
actions: k,
|
|
2052
2059
|
dispatch: S
|
|
2053
|
-
} =
|
|
2054
|
-
actions:
|
|
2060
|
+
} = y, T = v(() => ({
|
|
2061
|
+
actions: k,
|
|
2055
2062
|
dispatch: S
|
|
2056
|
-
}), [
|
|
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(() => Ct(L, x, z), [L, x, z]), W = v(() => qn(n), [n]), H = v(() => so(n), [n]), M = v(() => eo(n), [n]), J = v(() => {
|
|
2057
2064
|
try {
|
|
2058
2065
|
Un(n);
|
|
2059
2066
|
return;
|
|
2060
|
-
} catch (
|
|
2061
|
-
return
|
|
2067
|
+
} catch (V) {
|
|
2068
|
+
return V instanceof Error ? V : new Error("Unknown error");
|
|
2062
2069
|
}
|
|
2063
2070
|
}, [n]);
|
|
2064
|
-
return
|
|
2065
|
-
text:
|
|
2071
|
+
return J ? /* @__PURE__ */ r(Xt, {
|
|
2072
|
+
text: J.message
|
|
2066
2073
|
}) : /* @__PURE__ */ r("table", {
|
|
2067
2074
|
className: Fe(Ve.standardTable, Ve[l]),
|
|
2068
2075
|
style: {
|
|
2069
2076
|
width: "100%",
|
|
2070
2077
|
isolation: "isolate",
|
|
2071
|
-
"--current-left-offset":
|
|
2078
|
+
"--current-left-offset": C && p ? "calc(var(--swui-expand-cell-width) + var(--swui-checkbox-cell-width))" : p ? "var(--swui-checkbox-cell-width)" : C ? "var(--swui-expand-cell-width)" : "0px"
|
|
2072
2079
|
},
|
|
2073
2080
|
children: /* @__PURE__ */ r(ft.Provider, {
|
|
2074
2081
|
value: M,
|
|
2075
2082
|
children: /* @__PURE__ */ r(wt.Provider, {
|
|
2076
|
-
value:
|
|
2083
|
+
value: H,
|
|
2077
2084
|
children: /* @__PURE__ */ r(Kn.Provider, {
|
|
2078
2085
|
value: l,
|
|
2079
2086
|
children: /* @__PURE__ */ r(st.Provider, {
|
|
2080
|
-
value: c != null ? c :
|
|
2087
|
+
value: c != null ? c : h,
|
|
2081
2088
|
children: /* @__PURE__ */ r(ct.Provider, {
|
|
2082
|
-
value:
|
|
2089
|
+
value: b,
|
|
2083
2090
|
children: /* @__PURE__ */ r(lt.Provider, {
|
|
2084
|
-
value:
|
|
2091
|
+
value: T,
|
|
2085
2092
|
children: /* @__PURE__ */ r(it.Provider, {
|
|
2086
2093
|
value: n,
|
|
2087
2094
|
children: /* @__PURE__ */ r(dt.Provider, {
|
|
2088
|
-
value:
|
|
2095
|
+
value: A,
|
|
2089
2096
|
children: /* @__PURE__ */ r(vt.Provider, {
|
|
2090
|
-
value:
|
|
2097
|
+
value: W,
|
|
2091
2098
|
children: /* @__PURE__ */ r(Nn.Provider, {
|
|
2092
|
-
value:
|
|
2099
|
+
value: G,
|
|
2093
2100
|
children: /* @__PURE__ */ g(mt.Provider, {
|
|
2094
2101
|
value: "columnGroupOrder" in n ? s != null ? s : n.columnGroupOrder : s,
|
|
2095
2102
|
children: [/* @__PURE__ */ r(lo, {}), /* @__PURE__ */ r(ht.Provider, {
|
|
2096
2103
|
value: i,
|
|
2097
2104
|
children: /* @__PURE__ */ g(pt.Provider, {
|
|
2098
|
-
value:
|
|
2105
|
+
value: a,
|
|
2099
2106
|
children: [/* @__PURE__ */ g("thead", {
|
|
2100
2107
|
children: [(s || "columnGroupOrder" in n) && /* @__PURE__ */ r(Wn, {
|
|
2101
2108
|
height: "var(--current-row-height)"
|
|
2102
2109
|
}), /* @__PURE__ */ r(Jo, {
|
|
2103
|
-
items:
|
|
2104
|
-
height: "var(--current-row-height)"
|
|
2110
|
+
items: d.items,
|
|
2111
|
+
height: "var(--current-row-height)",
|
|
2112
|
+
appendTooltipTo: u
|
|
2105
2113
|
})]
|
|
2106
2114
|
}), /* @__PURE__ */ r(jo, {
|
|
2107
2115
|
variant: l,
|
|
2108
|
-
...
|
|
2116
|
+
...d
|
|
2109
2117
|
})]
|
|
2110
2118
|
})
|
|
2111
2119
|
})]
|
|
@@ -2155,28 +2163,28 @@ const Xe = T.createContext({}), br = ({
|
|
|
2155
2163
|
editorValue: c,
|
|
2156
2164
|
isEditing: l,
|
|
2157
2165
|
setEditorValue: i,
|
|
2158
|
-
stopEditingAndRevert:
|
|
2166
|
+
stopEditingAndRevert: a,
|
|
2159
2167
|
lastKeyEvent: u,
|
|
2160
|
-
stopEditing:
|
|
2161
|
-
stopEditingAndMove:
|
|
2168
|
+
stopEditing: d,
|
|
2169
|
+
stopEditingAndMove: h
|
|
2162
2170
|
},
|
|
2163
2171
|
isEditable: f
|
|
2164
2172
|
}) => {
|
|
2165
|
-
const m = typeof e == "function" ? e(s) : e, C = t ? t(s) : void 0,
|
|
2173
|
+
const m = typeof e == "function" ? e(s) : e, C = t ? t(s) : void 0, p = n ? n(s) : void 0;
|
|
2166
2174
|
return f && l ? /* @__PURE__ */ r(ge, {
|
|
2167
2175
|
onValueChange: i,
|
|
2168
2176
|
value: c,
|
|
2169
|
-
onDone:
|
|
2170
|
-
onEsc:
|
|
2177
|
+
onDone: d,
|
|
2178
|
+
onEsc: a,
|
|
2171
2179
|
autoFocus: !0,
|
|
2172
2180
|
selectAllOnMount: !u,
|
|
2173
|
-
onMove:
|
|
2181
|
+
onMove: h
|
|
2174
2182
|
}) : /* @__PURE__ */ r(N, {
|
|
2175
2183
|
row: !0,
|
|
2176
2184
|
alignItems: "center",
|
|
2177
2185
|
children: /* @__PURE__ */ r(nn, {
|
|
2178
2186
|
value: o,
|
|
2179
|
-
modifiedField:
|
|
2187
|
+
modifiedField: p,
|
|
2180
2188
|
crudStatus: C,
|
|
2181
2189
|
isEditable: f,
|
|
2182
2190
|
warningOnEmpty: m
|
|
@@ -2185,15 +2193,15 @@ const Xe = T.createContext({}), br = ({
|
|
|
2185
2193
|
};
|
|
2186
2194
|
export {
|
|
2187
2195
|
Ye as CrudStatusIndicator,
|
|
2188
|
-
|
|
2196
|
+
Tr as EditableTextCellWithCrudAndModified,
|
|
2189
2197
|
Xe as GridHooksContext,
|
|
2190
2198
|
br as GridHooksTable,
|
|
2191
2199
|
nn as ModifiedField,
|
|
2192
2200
|
kr as SmallTableCell,
|
|
2193
2201
|
Sr as SmallTableHead,
|
|
2194
|
-
|
|
2202
|
+
Gr as StandardTable,
|
|
2195
2203
|
lt as StandardTableActionsContext,
|
|
2196
|
-
|
|
2204
|
+
Go as StandardTableCell,
|
|
2197
2205
|
Io as StandardTableCellUi,
|
|
2198
2206
|
it as StandardTableConfigContext,
|
|
2199
2207
|
jo as StandardTableContent,
|
|
@@ -2208,7 +2216,7 @@ export {
|
|
|
2208
2216
|
Ee as TableHeadItem,
|
|
2209
2217
|
Er as TableHeadRow,
|
|
2210
2218
|
Rr as TableRow,
|
|
2211
|
-
|
|
2219
|
+
To as TextCell,
|
|
2212
2220
|
Or as createColumnConfig,
|
|
2213
2221
|
Ar as createEditableTextCellWithStatus,
|
|
2214
2222
|
Ct as createGroupConfigAndIdsForRows,
|
|
@@ -2240,7 +2248,7 @@ export {
|
|
|
2240
2248
|
fn as useEditableCell,
|
|
2241
2249
|
$n as useFirstColumnConfig,
|
|
2242
2250
|
he as useGridCell,
|
|
2243
|
-
|
|
2251
|
+
Gn as useGridNavigation,
|
|
2244
2252
|
nt as useGridNavigationOptionsFromContext,
|
|
2245
2253
|
Hn as useLastColumnConfig,
|
|
2246
2254
|
ro as useLocalStateTableContext,
|