@stenajs-webui/grid 19.0.0-next.11 → 19.0.0-next.12
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/index.es.js +1117 -1064
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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 { jsx as r, Fragment as O, jsxs as g } from "react/jsx-runtime";
|
|
2
3
|
import * as P from "react";
|
|
3
4
|
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
|
-
import { jsx as r, Fragment as O, jsxs as g } from "react/jsx-runtime";
|
|
5
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";
|
|
6
6
|
import { cssColor as j } from "@stenajs-webui/theme";
|
|
7
7
|
import { Tooltip as se, Popover as At } from "@stenajs-webui/tooltip";
|
|
@@ -27,55 +27,30 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
27
27
|
tableId: o,
|
|
28
28
|
wrap: s
|
|
29
29
|
}) => {
|
|
30
|
-
const c = v(
|
|
31
|
-
numCols: t,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}), [t, n, o, s]);
|
|
36
|
-
return /* @__PURE__ */ r(Ye.Provider, {
|
|
37
|
-
value: c,
|
|
38
|
-
children: e
|
|
39
|
-
});
|
|
30
|
+
const c = v(
|
|
31
|
+
() => ({ numCols: t, numRows: n, tableId: o, wrap: s }),
|
|
32
|
+
[t, n, o, s]
|
|
33
|
+
);
|
|
34
|
+
return /* @__PURE__ */ r(Ye.Provider, { value: c, children: e });
|
|
40
35
|
}, be = (e) => {
|
|
41
|
-
const {
|
|
42
|
-
loading: t,
|
|
43
|
-
creating: n,
|
|
44
|
-
deleting: o,
|
|
45
|
-
updating: s,
|
|
46
|
-
hasError: c
|
|
47
|
-
} = e;
|
|
36
|
+
const { loading: t, creating: n, deleting: o, updating: s, hasError: c } = e;
|
|
48
37
|
return Boolean(t || n || o || s || c);
|
|
49
|
-
}, Qe = ({
|
|
50
|
-
crudStatus: e
|
|
51
|
-
}) => {
|
|
38
|
+
}, Qe = ({ crudStatus: e }) => {
|
|
52
39
|
if (!e || !be(e))
|
|
53
40
|
return null;
|
|
54
|
-
const {
|
|
55
|
-
errorMessage: t,
|
|
56
|
-
hasError: n,
|
|
57
|
-
loading: o,
|
|
58
|
-
creating: s,
|
|
59
|
-
deleting: c,
|
|
60
|
-
updating: l
|
|
61
|
-
} = e;
|
|
41
|
+
const { errorMessage: t, hasError: n, loading: o, creating: s, deleting: c, updating: l } = e;
|
|
62
42
|
if (o || s || c || l)
|
|
63
|
-
return /* @__PURE__ */ r(ye, {
|
|
64
|
-
color: j("--lhds-color-ui-500")
|
|
65
|
-
});
|
|
43
|
+
return /* @__PURE__ */ r(ye, { color: j("--lhds-color-ui-500") });
|
|
66
44
|
if (n) {
|
|
67
|
-
const i = /* @__PURE__ */ r(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
children: i
|
|
77
|
-
}) : i
|
|
78
|
-
});
|
|
45
|
+
const i = /* @__PURE__ */ r(
|
|
46
|
+
F,
|
|
47
|
+
{
|
|
48
|
+
icon: ue,
|
|
49
|
+
color: j("--lhds-color-orange-600"),
|
|
50
|
+
size: 14
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
return /* @__PURE__ */ r(O, { children: t ? /* @__PURE__ */ r(se, { label: t, zIndex: 100, children: i }) : i });
|
|
79
54
|
}
|
|
80
55
|
return null;
|
|
81
56
|
}, tn = ({
|
|
@@ -86,62 +61,63 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
86
61
|
crudStatus: s
|
|
87
62
|
}) => {
|
|
88
63
|
const c = t && (o == null ? void 0 : o.modified) && (o == null ? void 0 : o.newValue) === "", l = s && be(s), i = c || l;
|
|
89
|
-
return /* @__PURE__ */ g(O, {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
label: t,
|
|
107
|
-
zIndex: 100,
|
|
108
|
-
children: /* @__PURE__ */ r(F, {
|
|
64
|
+
return /* @__PURE__ */ g(O, { children: [
|
|
65
|
+
/* @__PURE__ */ r(
|
|
66
|
+
U,
|
|
67
|
+
{
|
|
68
|
+
color: e ? "var(--swui-primary-action-color)" : void 0,
|
|
69
|
+
variant: o != null && o.modified ? "bold" : void 0,
|
|
70
|
+
children: n
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
(o == null ? void 0 : o.newValue) !== void 0 && /* @__PURE__ */ g(O, { children: [
|
|
74
|
+
/* @__PURE__ */ r(N, { children: /* @__PURE__ */ r(F, { icon: We, size: 12 }) }),
|
|
75
|
+
/* @__PURE__ */ r(U, { color: "var(--swui-primary-action-color)", variant: "bold", children: o.newValue })
|
|
76
|
+
] }),
|
|
77
|
+
i && /* @__PURE__ */ r(D, {}),
|
|
78
|
+
c ? /* @__PURE__ */ r(se, { label: t, zIndex: 100, children: /* @__PURE__ */ r(
|
|
79
|
+
F,
|
|
80
|
+
{
|
|
109
81
|
icon: ue,
|
|
110
82
|
color: j("--lhds-color-orange-600"),
|
|
111
83
|
size: 14
|
|
112
|
-
}
|
|
113
|
-
}) : /* @__PURE__ */ r(Qe, {
|
|
114
|
-
|
|
115
|
-
})]
|
|
116
|
-
});
|
|
84
|
+
}
|
|
85
|
+
) }) : /* @__PURE__ */ r(Qe, { crudStatus: s })
|
|
86
|
+
] });
|
|
117
87
|
}, nn = ({
|
|
118
88
|
alignItems: e = "center",
|
|
119
89
|
justifyContent: t = "flex-start",
|
|
120
90
|
overflow: n = "hidden",
|
|
121
91
|
indent: o = 1,
|
|
122
92
|
...s
|
|
123
|
-
}) => /* @__PURE__ */ r(
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
93
|
+
}) => /* @__PURE__ */ r(
|
|
94
|
+
E,
|
|
95
|
+
{
|
|
96
|
+
height: "100%",
|
|
97
|
+
alignItems: e,
|
|
98
|
+
justifyContent: t,
|
|
99
|
+
overflow: n,
|
|
100
|
+
indent: o,
|
|
101
|
+
...s
|
|
102
|
+
}
|
|
103
|
+
), 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(
|
|
104
|
+
nn,
|
|
105
|
+
{
|
|
106
|
+
width: nt,
|
|
107
|
+
justifyContent: "center",
|
|
108
|
+
...e
|
|
109
|
+
}
|
|
110
|
+
), Ke = ({
|
|
135
111
|
iconVariant: e = "amount",
|
|
136
112
|
direction: t
|
|
137
|
-
}) => /* @__PURE__ */ r(oe, {
|
|
138
|
-
|
|
139
|
-
|
|
113
|
+
}) => /* @__PURE__ */ r(oe, { width: "14px", children: /* @__PURE__ */ r(
|
|
114
|
+
F,
|
|
115
|
+
{
|
|
140
116
|
size: 14,
|
|
141
117
|
color: j("--lhds-color-ui-500"),
|
|
142
118
|
icon: ln(t, e)
|
|
143
|
-
}
|
|
144
|
-
}), ln = (e, t) => {
|
|
119
|
+
}
|
|
120
|
+
) }), ln = (e, t) => {
|
|
145
121
|
switch (t) {
|
|
146
122
|
case "alpha":
|
|
147
123
|
return e === "up" ? zt : Nt;
|
|
@@ -152,151 +128,145 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
152
128
|
default:
|
|
153
129
|
return Lt(t);
|
|
154
130
|
}
|
|
155
|
-
}, Ee = P.memo(
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
cursor: "pointer",
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
alignItems: "center",
|
|
177
|
-
ref: m,
|
|
178
|
-
overflow: a,
|
|
179
|
-
justifyContent: u ? "flex-end" : "flex-start",
|
|
180
|
-
borderTop: "2px solid transparent",
|
|
181
|
-
borderBottom: `2px solid ${s ? j("--lhds-color-blue-500") : "transparent"}`,
|
|
182
|
-
...w,
|
|
183
|
-
children: [/* @__PURE__ */ g(E, {
|
|
184
|
-
alignItems: "center",
|
|
185
|
-
indent: !0,
|
|
186
|
-
children: [!t && u && /* @__PURE__ */ g(O, {
|
|
187
|
-
children: [/* @__PURE__ */ r(D, {}), /* @__PURE__ */ r(oe, {
|
|
188
|
-
width: "14px"
|
|
189
|
-
}), /* @__PURE__ */ r(D, {
|
|
190
|
-
num: 0.5
|
|
191
|
-
})]
|
|
192
|
-
}), (o || e) && /* @__PURE__ */ g(E, {
|
|
193
|
-
onClick: n,
|
|
194
|
-
style: f,
|
|
131
|
+
}, Ee = P.memo(
|
|
132
|
+
({
|
|
133
|
+
label: e,
|
|
134
|
+
arrow: t,
|
|
135
|
+
onClick: n,
|
|
136
|
+
children: o,
|
|
137
|
+
selected: s,
|
|
138
|
+
popoverContent: c,
|
|
139
|
+
loading: l,
|
|
140
|
+
infoIconTooltipText: i,
|
|
141
|
+
overflow: a = "hidden",
|
|
142
|
+
alignRight: u,
|
|
143
|
+
sortOrderIconVariant: d,
|
|
144
|
+
appendTooltipTo: h,
|
|
145
|
+
...w
|
|
146
|
+
}) => {
|
|
147
|
+
const m = ne(null), f = n ? { cursor: "pointer", userSelect: "none" } : void 0, p = !e && !t && !i;
|
|
148
|
+
return /* @__PURE__ */ g(
|
|
149
|
+
E,
|
|
150
|
+
{
|
|
151
|
+
height: "100%",
|
|
195
152
|
alignItems: "center",
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
})
|
|
153
|
+
ref: m,
|
|
154
|
+
overflow: a,
|
|
155
|
+
justifyContent: u ? "flex-end" : "flex-start",
|
|
156
|
+
borderTop: "2px solid transparent",
|
|
157
|
+
borderBottom: `2px solid ${s ? j("--lhds-color-blue-500") : "transparent"}`,
|
|
158
|
+
...w,
|
|
159
|
+
children: [
|
|
160
|
+
/* @__PURE__ */ g(E, { alignItems: "center", indent: !0, children: [
|
|
161
|
+
!t && u && /* @__PURE__ */ g(O, { children: [
|
|
162
|
+
/* @__PURE__ */ r(D, {}),
|
|
163
|
+
/* @__PURE__ */ r(oe, { width: "14px" }),
|
|
164
|
+
/* @__PURE__ */ r(D, { num: 0.5 })
|
|
165
|
+
] }),
|
|
166
|
+
(o || e) && /* @__PURE__ */ g(E, { onClick: n, style: f, alignItems: "center", children: [
|
|
167
|
+
o && /* @__PURE__ */ g(O, { children: [
|
|
168
|
+
o,
|
|
169
|
+
!p && /* @__PURE__ */ r(D, { num: 0.5 })
|
|
170
|
+
] }),
|
|
171
|
+
t && u && /* @__PURE__ */ g(O, { children: [
|
|
172
|
+
/* @__PURE__ */ r(D, {}),
|
|
173
|
+
/* @__PURE__ */ r(
|
|
174
|
+
Ke,
|
|
175
|
+
{
|
|
176
|
+
direction: t,
|
|
177
|
+
iconVariant: d
|
|
178
|
+
}
|
|
179
|
+
),
|
|
180
|
+
/* @__PURE__ */ r(D, { num: 0.5 })
|
|
181
|
+
] }),
|
|
182
|
+
e && /* @__PURE__ */ r(Ue, { variant: "h6", style: { textAlign: "left" }, children: e }),
|
|
183
|
+
t && !u && /* @__PURE__ */ g(O, { children: [
|
|
184
|
+
/* @__PURE__ */ r(D, { num: 0.5 }),
|
|
185
|
+
/* @__PURE__ */ r(
|
|
186
|
+
Ke,
|
|
187
|
+
{
|
|
188
|
+
direction: t,
|
|
189
|
+
iconVariant: d
|
|
190
|
+
}
|
|
191
|
+
),
|
|
192
|
+
/* @__PURE__ */ r(D, {})
|
|
193
|
+
] })
|
|
194
|
+
] }),
|
|
195
|
+
i && /* @__PURE__ */ g(O, { children: [
|
|
196
|
+
/* @__PURE__ */ r(D, {}),
|
|
197
|
+
/* @__PURE__ */ g(E, { onClick: (C) => C.stopPropagation(), children: [
|
|
198
|
+
/* @__PURE__ */ r(
|
|
199
|
+
se,
|
|
200
|
+
{
|
|
201
|
+
label: i,
|
|
202
|
+
zIndex: "var(--swui-sticky-popover-z-index)",
|
|
203
|
+
appendTo: h,
|
|
204
|
+
children: /* @__PURE__ */ r(
|
|
205
|
+
F,
|
|
206
|
+
{
|
|
207
|
+
icon: Gt,
|
|
208
|
+
size: 14,
|
|
209
|
+
color: j("--lhds-color-blue-400")
|
|
210
|
+
}
|
|
211
|
+
)
|
|
212
|
+
}
|
|
213
|
+
),
|
|
214
|
+
/* @__PURE__ */ r(D, {})
|
|
215
|
+
] })
|
|
216
|
+
] })
|
|
217
|
+
] }),
|
|
218
|
+
/* @__PURE__ */ r(E, { children: l ? /* @__PURE__ */ r(ye, {}) : c ? /* @__PURE__ */ r(
|
|
219
|
+
At,
|
|
220
|
+
{
|
|
221
|
+
content: c,
|
|
222
|
+
trigger: "click",
|
|
223
|
+
zIndex: 1e3,
|
|
224
|
+
disablePadding: !0,
|
|
225
|
+
variant: "outlined",
|
|
226
|
+
arrow: !1,
|
|
227
|
+
children: /* @__PURE__ */ r(xe, { leftIcon: Ot, size: "small" })
|
|
228
|
+
}
|
|
229
|
+
) : null }),
|
|
230
|
+
!t && !u && /* @__PURE__ */ g(O, { children: [
|
|
231
|
+
/* @__PURE__ */ r(D, {}),
|
|
232
|
+
/* @__PURE__ */ r(oe, { width: "14px" }),
|
|
233
|
+
/* @__PURE__ */ r(D, { num: 0.5 })
|
|
234
|
+
] })
|
|
235
|
+
]
|
|
236
|
+
}
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
), vr = (e) => /* @__PURE__ */ r(
|
|
240
|
+
Ee,
|
|
241
|
+
{
|
|
242
|
+
width: nt,
|
|
243
|
+
justifyContent: "center",
|
|
244
|
+
...e
|
|
245
|
+
}
|
|
246
|
+
), yr = ({
|
|
262
247
|
label: e,
|
|
263
248
|
flex: t,
|
|
264
249
|
width: n,
|
|
265
250
|
indent: o = 1,
|
|
266
251
|
height: s = Ie
|
|
267
|
-
}) => /* @__PURE__ */ r(Ee, {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
height: s,
|
|
271
|
-
children: /* @__PURE__ */ r(oe, {
|
|
272
|
-
indent: o,
|
|
273
|
-
spacing: !0,
|
|
274
|
-
children: /* @__PURE__ */ r(U, {
|
|
275
|
-
variant: "bold",
|
|
276
|
-
children: e
|
|
277
|
-
})
|
|
278
|
-
})
|
|
279
|
-
}), xr = P.memo(({
|
|
280
|
-
style: e,
|
|
281
|
-
height: t = Ie,
|
|
282
|
-
...n
|
|
283
|
-
}) => /* @__PURE__ */ r(E, {
|
|
284
|
-
style: e,
|
|
285
|
-
height: t,
|
|
286
|
-
...n
|
|
287
|
-
})), an = "_tableRow_1cphw_1", dn = {
|
|
252
|
+
}) => /* @__PURE__ */ r(Ee, { width: n, flex: t, height: s, children: /* @__PURE__ */ r(oe, { indent: o, spacing: !0, children: /* @__PURE__ */ r(U, { variant: "bold", children: e }) }) }), xr = P.memo(
|
|
253
|
+
({ style: e, height: t = Ie, ...n }) => /* @__PURE__ */ r(E, { style: e, height: t, ...n })
|
|
254
|
+
), an = "_tableRow_1cphw_1", dn = {
|
|
288
255
|
tableRow: an
|
|
289
256
|
}, gr = ({
|
|
290
257
|
hideBorderTop: e,
|
|
291
258
|
height: t = Ie,
|
|
292
259
|
className: n,
|
|
293
260
|
...o
|
|
294
|
-
}) => /* @__PURE__ */ r(
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
261
|
+
}) => /* @__PURE__ */ r(
|
|
262
|
+
E,
|
|
263
|
+
{
|
|
264
|
+
borderTop: e ? cn : re,
|
|
265
|
+
height: t,
|
|
266
|
+
className: Je(dn.tableRow, n),
|
|
267
|
+
...o
|
|
268
|
+
}
|
|
269
|
+
), un = (e) => {
|
|
300
270
|
const [t, n] = ve(e), o = ne(e), s = ne(e), c = I(
|
|
301
271
|
(d) => {
|
|
302
272
|
n(d), s.current = d;
|
|
@@ -590,14 +560,19 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
590
560
|
numRows: h,
|
|
591
561
|
warningOnEmpty: w
|
|
592
562
|
}) {
|
|
593
|
-
const m = Vt(), f = Be(
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
563
|
+
const m = Vt(), f = Be(
|
|
564
|
+
i.selectors.getState
|
|
565
|
+
), p = Be(l.selectors.getState), C = f.entities[o], y = p.entities[o], b = I(
|
|
566
|
+
(M = "") => {
|
|
567
|
+
m(M === n ? i.actions.clearEntity(o) : i.actions.setEntity({
|
|
568
|
+
id: o,
|
|
569
|
+
originalValue: n,
|
|
570
|
+
newValue: M,
|
|
571
|
+
modified: !0
|
|
572
|
+
}));
|
|
573
|
+
},
|
|
574
|
+
[m, o, i.actions, n]
|
|
575
|
+
), {
|
|
601
576
|
isEditing: k,
|
|
602
577
|
stopEditing: S,
|
|
603
578
|
editorValue: T,
|
|
@@ -605,10 +580,7 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
605
580
|
stopEditingAndRevert: L,
|
|
606
581
|
stopEditingAndMove: x,
|
|
607
582
|
lastKeyEvent: z,
|
|
608
|
-
requiredProps: {
|
|
609
|
-
onKeyDown: A,
|
|
610
|
-
...W
|
|
611
|
-
}
|
|
583
|
+
requiredProps: { onKeyDown: A, ...W }
|
|
612
584
|
} = he(n, {
|
|
613
585
|
rowIndex: u,
|
|
614
586
|
colIndex: a,
|
|
@@ -618,77 +590,93 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
618
590
|
onChange: b,
|
|
619
591
|
isEditable: s,
|
|
620
592
|
allowedInputType: t
|
|
621
|
-
}), H = I(
|
|
622
|
-
M
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
593
|
+
}), H = I(
|
|
594
|
+
(M) => {
|
|
595
|
+
M.key === "Delete" ? (m(i.actions.clearEntity(o)), m(
|
|
596
|
+
l.actions.setEntityFields(o, {
|
|
597
|
+
hasError: !1,
|
|
598
|
+
errorMessage: void 0
|
|
599
|
+
})
|
|
600
|
+
)) : A(M);
|
|
601
|
+
},
|
|
602
|
+
[
|
|
603
|
+
A,
|
|
604
|
+
o,
|
|
605
|
+
m,
|
|
606
|
+
i.actions,
|
|
607
|
+
l.actions
|
|
608
|
+
]
|
|
609
|
+
);
|
|
610
|
+
return /* @__PURE__ */ g(
|
|
611
|
+
E,
|
|
612
|
+
{
|
|
613
|
+
height: Se,
|
|
636
614
|
width: "100%",
|
|
637
|
-
|
|
638
|
-
|
|
615
|
+
borderBottom: re,
|
|
616
|
+
hoverBackground: "var(--ui7)",
|
|
639
617
|
alignItems: "center",
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
618
|
+
children: [
|
|
619
|
+
c && /* @__PURE__ */ r(N, { num: c }),
|
|
620
|
+
/* @__PURE__ */ r(
|
|
621
|
+
E,
|
|
622
|
+
{
|
|
623
|
+
width: "100%",
|
|
624
|
+
height: "100%",
|
|
625
|
+
justifyContent: "flex-end",
|
|
626
|
+
alignItems: "center",
|
|
627
|
+
border: "1px solid transparent",
|
|
628
|
+
borderRadius: "4px",
|
|
629
|
+
focusBorder: k ? void 0 : "1px solid var(--primary-action-color)",
|
|
630
|
+
hoverBorder: k ? void 0 : "var(--ui5) solid 1px;",
|
|
631
|
+
onKeyDown: H,
|
|
632
|
+
...W,
|
|
633
|
+
children: /* @__PURE__ */ r(N, { row: !0, alignItems: "center", children: k ? /* @__PURE__ */ r(
|
|
634
|
+
ge,
|
|
635
|
+
{
|
|
636
|
+
onValueChange: G,
|
|
637
|
+
value: T,
|
|
638
|
+
onDone: S,
|
|
639
|
+
onEsc: L,
|
|
640
|
+
autoFocus: !0,
|
|
641
|
+
selectAllOnMount: !z,
|
|
642
|
+
onMove: x
|
|
643
|
+
}
|
|
644
|
+
) : /* @__PURE__ */ g(O, { children: [
|
|
645
|
+
/* @__PURE__ */ r(
|
|
646
|
+
U,
|
|
647
|
+
{
|
|
648
|
+
color: s ? "var(--primary-action-color)" : void 0,
|
|
649
|
+
variant: C != null && C.modified ? "bold" : void 0,
|
|
650
|
+
children: n
|
|
651
|
+
}
|
|
652
|
+
),
|
|
653
|
+
(C == null ? void 0 : C.newValue) !== void 0 && /* @__PURE__ */ g(O, { children: [
|
|
654
|
+
/* @__PURE__ */ r(N, { children: /* @__PURE__ */ r(F, { icon: We, size: 12 }) }),
|
|
655
|
+
/* @__PURE__ */ r(
|
|
656
|
+
U,
|
|
657
|
+
{
|
|
658
|
+
color: "var(--primary-action-color)",
|
|
659
|
+
variant: "bold",
|
|
660
|
+
children: C.newValue
|
|
661
|
+
}
|
|
662
|
+
)
|
|
663
|
+
] }),
|
|
664
|
+
y && be(y) && /* @__PURE__ */ r(D, { num: 2 }),
|
|
665
|
+
w && (C == null ? void 0 : C.modified) && (C == null ? void 0 : C.newValue) === "" ? /* @__PURE__ */ r(se, { label: w, zIndex: 100, children: /* @__PURE__ */ r(
|
|
666
|
+
F,
|
|
667
|
+
{
|
|
668
|
+
icon: ue,
|
|
669
|
+
color: "var(--ui-alert1)",
|
|
670
|
+
size: 14
|
|
671
|
+
}
|
|
672
|
+
) }) : /* @__PURE__ */ r(Qe, { crudStatus: y })
|
|
673
|
+
] }) })
|
|
674
|
+
}
|
|
675
|
+
),
|
|
676
|
+
c && /* @__PURE__ */ r(N, { num: c })
|
|
677
|
+
]
|
|
678
|
+
}
|
|
679
|
+
);
|
|
692
680
|
}, ct = K(""), lt = K(
|
|
693
681
|
void 0
|
|
694
682
|
), it = K(void 0), at = K(void 0), Pn = () => ({
|
|
@@ -785,67 +773,55 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
785
773
|
isLastGroup: l
|
|
786
774
|
}) {
|
|
787
775
|
var A;
|
|
788
|
-
const {
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
label: w,
|
|
838
|
-
placement: "bottom",
|
|
839
|
-
appendTo: document.body,
|
|
840
|
-
children: /* @__PURE__ */ r(F, {
|
|
841
|
-
icon: ue,
|
|
842
|
-
color: j("--lhds-color-red-500"),
|
|
843
|
-
size: 14
|
|
844
|
-
})
|
|
845
|
-
}) : void 0]
|
|
846
|
-
})
|
|
847
|
-
})
|
|
848
|
-
});
|
|
776
|
+
const { label: i, render: a, contentLeft: u, contentRight: d, loading: h, error: w } = n, { width: m, minWidth: f, zIndex: p, borderLeft: C } = le(t), y = R(), { stickyHeader: b, headerRowOffsetTop: k } = 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;
|
|
777
|
+
return /* @__PURE__ */ r(
|
|
778
|
+
"th",
|
|
779
|
+
{
|
|
780
|
+
colSpan: s,
|
|
781
|
+
style: {
|
|
782
|
+
position: x ? "sticky" : void 0,
|
|
783
|
+
height: "var(--current-row-height)",
|
|
784
|
+
width: m,
|
|
785
|
+
minWidth: (A = f != null ? f : m) != null ? A : "20px",
|
|
786
|
+
background: x ? "white" : "transparent",
|
|
787
|
+
left: G ? "var(--current-left-offset)" : void 0,
|
|
788
|
+
right: L ? "0px" : void 0,
|
|
789
|
+
top: b ? k != null ? k : "0px" : void 0,
|
|
790
|
+
borderLeft: T,
|
|
791
|
+
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,
|
|
792
|
+
boxShadow: G ? "var(--swui-sticky-column-shadow-right)" : L ? "var(--swui-sticky-column-shadow-left)" : void 0
|
|
793
|
+
},
|
|
794
|
+
children: /* @__PURE__ */ r(E, { alignItems: "center", children: /* @__PURE__ */ g(O, { children: [
|
|
795
|
+
u && /* @__PURE__ */ g(O, { children: [
|
|
796
|
+
/* @__PURE__ */ r(D, {}),
|
|
797
|
+
u,
|
|
798
|
+
/* @__PURE__ */ r(D, { num: 0.5 })
|
|
799
|
+
] }),
|
|
800
|
+
a ? a(n) : /* @__PURE__ */ r(N, { children: /* @__PURE__ */ r(Ue, { variant: "h5", whiteSpace: "nowrap", children: i }) }),
|
|
801
|
+
d && /* @__PURE__ */ g(O, { children: [
|
|
802
|
+
/* @__PURE__ */ r(D, { num: 0.5 }),
|
|
803
|
+
d
|
|
804
|
+
] }),
|
|
805
|
+
(w || h) && /* @__PURE__ */ r(N, {}),
|
|
806
|
+
h ? /* @__PURE__ */ r(ye, {}) : w ? /* @__PURE__ */ r(
|
|
807
|
+
se,
|
|
808
|
+
{
|
|
809
|
+
label: w,
|
|
810
|
+
placement: "bottom",
|
|
811
|
+
appendTo: document.body,
|
|
812
|
+
children: /* @__PURE__ */ r(
|
|
813
|
+
F,
|
|
814
|
+
{
|
|
815
|
+
icon: ue,
|
|
816
|
+
color: j("--lhds-color-red-500"),
|
|
817
|
+
size: 14
|
|
818
|
+
}
|
|
819
|
+
)
|
|
820
|
+
}
|
|
821
|
+
) : void 0
|
|
822
|
+
] }) })
|
|
823
|
+
}
|
|
824
|
+
);
|
|
849
825
|
}, Mn = (e, t) => {
|
|
850
826
|
if (e)
|
|
851
827
|
return e;
|
|
@@ -875,43 +851,63 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
875
851
|
stickyHeader: a,
|
|
876
852
|
stickyCheckboxColumn: u,
|
|
877
853
|
headerRowOffsetTop: d
|
|
878
|
-
} = o, h = Vn(
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
style: {
|
|
888
|
-
...h,
|
|
889
|
-
width: "var(--swui-expand-cell-width)",
|
|
890
|
-
left: u ? "0px" : void 0,
|
|
891
|
-
zIndex: w
|
|
892
|
-
}
|
|
893
|
-
}), s && /* @__PURE__ */ r("th", {
|
|
854
|
+
} = o, h = Vn(
|
|
855
|
+
a,
|
|
856
|
+
u,
|
|
857
|
+
d,
|
|
858
|
+
i
|
|
859
|
+
), w = a ? "var(--swui-sticky-column-group-label-z-index)" : "var(--swui-sticky-group-group-z-index)";
|
|
860
|
+
return /* @__PURE__ */ g(
|
|
861
|
+
"tr",
|
|
862
|
+
{
|
|
894
863
|
style: {
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
864
|
+
height: t,
|
|
865
|
+
borderLeft: ke
|
|
866
|
+
},
|
|
867
|
+
children: [
|
|
868
|
+
l && /* @__PURE__ */ r("th", { style: h }),
|
|
869
|
+
c && /* @__PURE__ */ r(
|
|
870
|
+
"th",
|
|
871
|
+
{
|
|
872
|
+
style: {
|
|
873
|
+
...h,
|
|
874
|
+
width: "var(--swui-expand-cell-width)",
|
|
875
|
+
left: u ? "0px" : void 0,
|
|
876
|
+
zIndex: w
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
),
|
|
880
|
+
s && /* @__PURE__ */ r(
|
|
881
|
+
"th",
|
|
882
|
+
{
|
|
883
|
+
style: {
|
|
884
|
+
...h,
|
|
885
|
+
left: u && c ? "var(--swui-expand-cell-width)" : u ? "0px" : void 0,
|
|
886
|
+
zIndex: w
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
),
|
|
890
|
+
n.map(({ groupConfig: m, groupId: f }, p) => /* @__PURE__ */ r(
|
|
891
|
+
Hn,
|
|
892
|
+
{
|
|
893
|
+
isFirstGroup: p === 0,
|
|
894
|
+
isLastGroup: p === n.length - 1,
|
|
895
|
+
groupConfig: m,
|
|
896
|
+
columnId: m.columnOrder[0],
|
|
897
|
+
colSpan: m.columnOrder.length,
|
|
898
|
+
borderFromGroup: pe(
|
|
899
|
+
p,
|
|
900
|
+
0,
|
|
901
|
+
m.borderLeft
|
|
902
|
+
)
|
|
903
|
+
},
|
|
904
|
+
f
|
|
905
|
+
)),
|
|
906
|
+
l && /* @__PURE__ */ r("th", { style: h }),
|
|
907
|
+
/* @__PURE__ */ r("th", { style: h })
|
|
908
|
+
]
|
|
909
|
+
}
|
|
910
|
+
);
|
|
915
911
|
}), Wn = (e) => {
|
|
916
912
|
const t = vt(
|
|
917
913
|
"columnGroups" in e ? e.columnGroups : void 0,
|
|
@@ -1088,41 +1084,34 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
1088
1084
|
}, 0) : (n = (t = e.columnOrder) == null ? void 0 : t.length) != null ? n : 0;
|
|
1089
1085
|
}, co = () => {
|
|
1090
1086
|
const e = R(), t = Z(), n = e.enableExpandCollapse || e.showRowCheckbox, o = Bt(e.rowIndent);
|
|
1091
|
-
return /* @__PURE__ */ g(O, {
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
width: "var(--swui-checkbox-cell-width)"
|
|
1106
|
-
}
|
|
1107
|
-
})]
|
|
1108
|
-
}), t.map(({
|
|
1109
|
-
groupConfig: s,
|
|
1110
|
-
groupId: c
|
|
1111
|
-
}) => /* @__PURE__ */ r("colgroup", {
|
|
1112
|
-
children: s.columnOrder.map((l) => /* @__PURE__ */ r("col", {
|
|
1087
|
+
return /* @__PURE__ */ g(O, { children: [
|
|
1088
|
+
o ? /* @__PURE__ */ r("colgroup", { children: /* @__PURE__ */ r(
|
|
1089
|
+
"col",
|
|
1090
|
+
{
|
|
1091
|
+
style: { width: `calc(var(--swui-metrics-indent) * ${o})` }
|
|
1092
|
+
}
|
|
1093
|
+
) }) : null,
|
|
1094
|
+
n && /* @__PURE__ */ g("colgroup", { children: [
|
|
1095
|
+
e.enableExpandCollapse && /* @__PURE__ */ r("col", { style: { width: "var(--swui-expand-cell-width)" } }),
|
|
1096
|
+
e.showRowCheckbox && /* @__PURE__ */ r("col", { style: { width: "var(--swui-checkbox-cell-width)" } })
|
|
1097
|
+
] }),
|
|
1098
|
+
t.map(({ groupConfig: s, groupId: c }) => /* @__PURE__ */ r("colgroup", { children: s.columnOrder.map((l) => /* @__PURE__ */ r(
|
|
1099
|
+
"col",
|
|
1100
|
+
{
|
|
1113
1101
|
style: {
|
|
1114
1102
|
width: e.columns[l].width,
|
|
1115
1103
|
minWidth: e.columns[l].minWidth
|
|
1116
1104
|
}
|
|
1117
|
-
},
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1105
|
+
},
|
|
1106
|
+
l
|
|
1107
|
+
)) }, c)),
|
|
1108
|
+
o ? /* @__PURE__ */ r("colgroup", { children: /* @__PURE__ */ r(
|
|
1109
|
+
"col",
|
|
1110
|
+
{
|
|
1111
|
+
style: { width: `calc(var(--swui-metrics-indent) * ${o})` }
|
|
1112
|
+
}
|
|
1113
|
+
) }) : null
|
|
1114
|
+
] });
|
|
1126
1115
|
}, lo = "_standardTable_1iok0_1", io = "_relaxed_1iok0_37", ao = "_condensed_1iok0_41", uo = "_compact_1iok0_45", Ve = {
|
|
1127
1116
|
standardTable: lo,
|
|
1128
1117
|
relaxed: io,
|
|
@@ -1135,35 +1124,41 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
1135
1124
|
const n = t[e];
|
|
1136
1125
|
if (!!n)
|
|
1137
1126
|
return n.itemValueResolver;
|
|
1138
|
-
}, mo = P.memo(
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
rowIndex: s,
|
|
1143
|
-
numRows: c,
|
|
1144
|
-
disabled: l,
|
|
1145
|
-
onValueChangeAndShift: i,
|
|
1146
|
-
shiftPressedRef: a
|
|
1147
|
-
}) {
|
|
1148
|
-
const u = ht(), d = Re(), h = he(Boolean(t), {
|
|
1127
|
+
}, mo = P.memo(
|
|
1128
|
+
function({
|
|
1129
|
+
value: t,
|
|
1130
|
+
onValueChange: n,
|
|
1149
1131
|
colIndex: o,
|
|
1150
|
-
numCols: u,
|
|
1151
|
-
numRows: c,
|
|
1152
1132
|
rowIndex: s,
|
|
1153
|
-
|
|
1154
|
-
}), {
|
|
1155
|
-
requiredProps: w
|
|
1156
|
-
} = h, m = I((f) => {
|
|
1157
|
-
a.current ? i == null || i(f) : n == null || n(f);
|
|
1158
|
-
}, [n, i, a]);
|
|
1159
|
-
return /* @__PURE__ */ r(Xe, {
|
|
1160
|
-
size: "small",
|
|
1133
|
+
numRows: c,
|
|
1161
1134
|
disabled: l,
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1135
|
+
onValueChangeAndShift: i,
|
|
1136
|
+
shiftPressedRef: a
|
|
1137
|
+
}) {
|
|
1138
|
+
const u = ht(), d = Re(), h = he(Boolean(t), {
|
|
1139
|
+
colIndex: o,
|
|
1140
|
+
numCols: u,
|
|
1141
|
+
numRows: c,
|
|
1142
|
+
rowIndex: s,
|
|
1143
|
+
tableId: d
|
|
1144
|
+
}), { requiredProps: w } = h, m = I(
|
|
1145
|
+
(f) => {
|
|
1146
|
+
a.current ? i == null || i(f) : n == null || n(f);
|
|
1147
|
+
},
|
|
1148
|
+
[n, i, a]
|
|
1149
|
+
);
|
|
1150
|
+
return /* @__PURE__ */ r(
|
|
1151
|
+
Xe,
|
|
1152
|
+
{
|
|
1153
|
+
size: "small",
|
|
1154
|
+
disabled: l,
|
|
1155
|
+
value: t,
|
|
1156
|
+
onValueChange: m,
|
|
1157
|
+
...w
|
|
1158
|
+
}
|
|
1159
|
+
);
|
|
1160
|
+
}
|
|
1161
|
+
), wo = (e, t, n) => {
|
|
1167
1162
|
if (t == null || n == null || e == null || t === n)
|
|
1168
1163
|
return;
|
|
1169
1164
|
const o = e.indexOf(t), s = e.indexOf(n);
|
|
@@ -1244,25 +1239,16 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
1244
1239
|
numRows: n,
|
|
1245
1240
|
rowIndex: o,
|
|
1246
1241
|
tableId: c
|
|
1247
|
-
}), {
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
} = R(), {
|
|
1252
|
-
toggleRowExpanded: u,
|
|
1253
|
-
isExpanded: d
|
|
1254
|
-
} = Pe(e), h = v(() => a ? a(e) : !1, [a, e]);
|
|
1255
|
-
return /* @__PURE__ */ r(E, {
|
|
1256
|
-
alignItems: "center",
|
|
1257
|
-
justifyContent: "center",
|
|
1258
|
-
indent: !0,
|
|
1259
|
-
children: !h && /* @__PURE__ */ r(xe, {
|
|
1242
|
+
}), { requiredProps: i } = l, { expandCollapseDisableResolver: a } = R(), { toggleRowExpanded: u, isExpanded: d } = Pe(e), h = v(() => a ? a(e) : !1, [a, e]);
|
|
1243
|
+
return /* @__PURE__ */ r(E, { alignItems: "center", justifyContent: "center", indent: !0, children: !h && /* @__PURE__ */ r(
|
|
1244
|
+
xe,
|
|
1245
|
+
{
|
|
1260
1246
|
size: "small",
|
|
1261
1247
|
leftIcon: d ? qe : Fe,
|
|
1262
1248
|
onClick: u,
|
|
1263
1249
|
...i
|
|
1264
|
-
}
|
|
1265
|
-
});
|
|
1250
|
+
}
|
|
1251
|
+
) });
|
|
1266
1252
|
}, vo = (e, t, n) => e ? e(t) : n, gt = (e, t, n) => v(
|
|
1267
1253
|
() => vo(e, t, n),
|
|
1268
1254
|
[e, t, n]
|
|
@@ -1274,51 +1260,52 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
1274
1260
|
return gt(o, t, n);
|
|
1275
1261
|
}, 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
1262
|
standardTableCell: bo
|
|
1277
|
-
}, So = P.memo(
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
gridCellRequiredProps: s,
|
|
1282
|
-
isEditing: c,
|
|
1283
|
-
justifyContent: l,
|
|
1284
|
-
onKeyDown: i,
|
|
1285
|
-
width: a,
|
|
1286
|
-
minWidth: u
|
|
1287
|
-
}) {
|
|
1288
|
-
return /* @__PURE__ */ r(E, {
|
|
1289
|
-
width: a,
|
|
1290
|
-
minWidth: u,
|
|
1291
|
-
height: "inherit",
|
|
1263
|
+
}, So = P.memo(
|
|
1264
|
+
function({
|
|
1265
|
+
enableGridCell: t,
|
|
1266
|
+
children: n,
|
|
1292
1267
|
background: o,
|
|
1293
|
-
|
|
1268
|
+
gridCellRequiredProps: s,
|
|
1269
|
+
isEditing: c,
|
|
1270
|
+
justifyContent: l,
|
|
1294
1271
|
onKeyDown: i,
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1272
|
+
width: a,
|
|
1273
|
+
minWidth: u
|
|
1274
|
+
}) {
|
|
1275
|
+
return /* @__PURE__ */ r(
|
|
1276
|
+
E,
|
|
1277
|
+
{
|
|
1278
|
+
width: a,
|
|
1279
|
+
minWidth: u,
|
|
1280
|
+
height: "inherit",
|
|
1281
|
+
background: o,
|
|
1282
|
+
overflow: "hidden",
|
|
1283
|
+
onKeyDown: i,
|
|
1284
|
+
children: /* @__PURE__ */ r(
|
|
1285
|
+
E,
|
|
1286
|
+
{
|
|
1287
|
+
border: "1px solid transparent",
|
|
1288
|
+
className: ko.standardTableCell,
|
|
1289
|
+
width: "100%",
|
|
1290
|
+
height: "100%",
|
|
1291
|
+
justifyContent: l,
|
|
1292
|
+
alignItems: "center",
|
|
1293
|
+
borderRadius: t ? "4px" : void 0,
|
|
1294
|
+
focusBorder: t && !c ? "1px solid var(--swui-primary-action-color)" : void 0,
|
|
1295
|
+
hoverBorder: t && !c ? "1px solid var(--lhds-color-ui-300)" : void 0,
|
|
1296
|
+
...t ? s : void 0,
|
|
1297
|
+
children: n
|
|
1298
|
+
}
|
|
1299
|
+
)
|
|
1300
|
+
}
|
|
1301
|
+
);
|
|
1302
|
+
}
|
|
1303
|
+
), Io = "_textCell_1yv6v_1", Eo = {
|
|
1310
1304
|
textCell: Io
|
|
1311
1305
|
}, Ro = P.memo(function({
|
|
1312
1306
|
label: t
|
|
1313
1307
|
}) {
|
|
1314
|
-
return /* @__PURE__ */ r(N, {
|
|
1315
|
-
overflow: "hidden",
|
|
1316
|
-
children: /* @__PURE__ */ r(U, {
|
|
1317
|
-
className: Eo.textCell,
|
|
1318
|
-
title: t,
|
|
1319
|
-
children: t
|
|
1320
|
-
})
|
|
1321
|
-
});
|
|
1308
|
+
return /* @__PURE__ */ r(N, { overflow: "hidden", children: /* @__PURE__ */ r(U, { className: Eo.textCell, title: t, children: t }) });
|
|
1322
1309
|
}), To = P.memo(function({
|
|
1323
1310
|
columnId: t,
|
|
1324
1311
|
item: n,
|
|
@@ -1333,9 +1320,7 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
1333
1320
|
keyResolver: a,
|
|
1334
1321
|
enableGridCell: u,
|
|
1335
1322
|
gridCellOptions: d
|
|
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]), {
|
|
1323
|
+
} = R(), h = Q().selectedIds.selectedIds, w = Re(), m = Ln(), { numNavigableColumns: f } = xt(), p = Te(), C = v(() => a(n), [n, a]), y = v(() => h.indexOf(C) >= 0, [C, h]), {
|
|
1339
1324
|
itemValueResolver: b,
|
|
1340
1325
|
itemLabelFormatter: k,
|
|
1341
1326
|
width: S,
|
|
@@ -1350,15 +1335,15 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
1350
1335
|
disableGridCell: M,
|
|
1351
1336
|
disableGridCellFocus: J,
|
|
1352
1337
|
zIndex: V
|
|
1353
|
-
} = le(t), q = v(() => b ? b(n) : t in n ? n[t] : "", [b, n, t]), ee = v(
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
columnId: t,
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1338
|
+
} = le(t), q = v(() => b ? b(n) : t in n ? n[t] : "", [b, n, t]), ee = v(
|
|
1339
|
+
() => k ? k(q, n) : xo(q),
|
|
1340
|
+
[q, k, n]
|
|
1341
|
+
), te = typeof A == "boolean" ? A : A ? A(n) : void 0, me = I(
|
|
1342
|
+
(ae) => {
|
|
1343
|
+
H == null || H(ae, { columnId: t, item: n }), m == null || m(ae, { columnId: t, item: n });
|
|
1344
|
+
},
|
|
1345
|
+
[m, t, n, H]
|
|
1346
|
+
), X = he(ee, {
|
|
1362
1347
|
colIndex: o,
|
|
1363
1348
|
rowIndex: s,
|
|
1364
1349
|
numRows: c,
|
|
@@ -1368,80 +1353,79 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
1368
1353
|
onChange: W ? (ae) => W(n, ae) : void 0,
|
|
1369
1354
|
...d,
|
|
1370
1355
|
...z
|
|
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(
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
itemKey: C
|
|
1380
|
-
}) : /* @__PURE__ */ r(Ro, {
|
|
1381
|
-
label: ee
|
|
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;
|
|
1383
|
-
return /* @__PURE__ */ r("td", {
|
|
1384
|
-
style: {
|
|
1385
|
-
borderLeft: It,
|
|
1386
|
-
position: B.sticky ? "sticky" : void 0,
|
|
1387
|
-
left: B.sticky ? B.left : void 0,
|
|
1388
|
-
right: B.sticky ? B.right : void 0,
|
|
1389
|
-
boxShadow: Et,
|
|
1356
|
+
}), 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(
|
|
1357
|
+
() => x ? x({
|
|
1358
|
+
label: ee,
|
|
1359
|
+
value: q,
|
|
1360
|
+
item: n,
|
|
1361
|
+
gridCell: X,
|
|
1362
|
+
isEditable: te,
|
|
1363
|
+
isSelected: y,
|
|
1390
1364
|
zIndex: we,
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1365
|
+
itemKey: C
|
|
1366
|
+
}) : /* @__PURE__ */ r(Ro, { label: ee }),
|
|
1367
|
+
[
|
|
1368
|
+
x,
|
|
1369
|
+
ee,
|
|
1370
|
+
q,
|
|
1371
|
+
n,
|
|
1372
|
+
X,
|
|
1373
|
+
te,
|
|
1374
|
+
y,
|
|
1375
|
+
we,
|
|
1376
|
+
C
|
|
1377
|
+
]
|
|
1378
|
+
), It = Oe(
|
|
1379
|
+
l,
|
|
1380
|
+
i,
|
|
1381
|
+
L
|
|
1382
|
+
), 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;
|
|
1383
|
+
return /* @__PURE__ */ r(
|
|
1384
|
+
"td",
|
|
1385
|
+
{
|
|
1386
|
+
style: {
|
|
1387
|
+
borderLeft: It,
|
|
1388
|
+
position: B.sticky ? "sticky" : void 0,
|
|
1389
|
+
left: B.sticky ? B.left : void 0,
|
|
1390
|
+
right: B.sticky ? B.right : void 0,
|
|
1391
|
+
boxShadow: Et,
|
|
1392
|
+
zIndex: we,
|
|
1393
|
+
height: "var(--current-row-height)",
|
|
1394
|
+
background: ie
|
|
1395
|
+
},
|
|
1396
|
+
children: /* @__PURE__ */ r(
|
|
1397
|
+
So,
|
|
1398
|
+
{
|
|
1399
|
+
enableGridCell: u && !M && !J,
|
|
1400
|
+
gridCellRequiredProps: X.requiredProps,
|
|
1401
|
+
isEditing: X.isEditing,
|
|
1402
|
+
width: S,
|
|
1403
|
+
minWidth: T,
|
|
1404
|
+
justifyContent: G,
|
|
1405
|
+
onKeyDown: me,
|
|
1406
|
+
children: St
|
|
1407
|
+
}
|
|
1408
|
+
)
|
|
1409
|
+
}
|
|
1410
|
+
);
|
|
1411
|
+
}), Go = function({ item: t }) {
|
|
1412
|
+
const { renderRowExpansion: n, enableExpandCollapse: o } = R(), { isExpanded: s, toggleRowExpanded: c } = Pe(t), l = Ge();
|
|
1413
|
+
return /* @__PURE__ */ r(O, { children: o && n && s && /* @__PURE__ */ r(
|
|
1414
|
+
"tr",
|
|
1415
|
+
{
|
|
1417
1416
|
style: {
|
|
1418
1417
|
borderLeft: tt,
|
|
1419
1418
|
background: et
|
|
1420
1419
|
},
|
|
1421
|
-
children: /* @__PURE__ */ r("td", {
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
onRequestCollapse: c
|
|
1425
|
-
})
|
|
1426
|
-
})
|
|
1427
|
-
})
|
|
1428
|
-
});
|
|
1420
|
+
children: /* @__PURE__ */ r("td", { colSpan: l, children: n(t, { onRequestCollapse: c }) })
|
|
1421
|
+
}
|
|
1422
|
+
) });
|
|
1429
1423
|
}, bt = en.tr`
|
|
1430
|
-
${({
|
|
1431
|
-
|
|
1432
|
-
}) => e ?
|
|
1433
|
-
${({
|
|
1434
|
-
|
|
1435
|
-
}) => e ? `border-left: ${e};` : ""};
|
|
1436
|
-
${({
|
|
1437
|
-
background: e
|
|
1438
|
-
}) => e ? `background: ${e};` : ""};
|
|
1439
|
-
${({
|
|
1440
|
-
height: e
|
|
1441
|
-
}) => e ? `height: ${e};` : ""};
|
|
1442
|
-
${({
|
|
1443
|
-
hoverBackground: e
|
|
1444
|
-
}) => e ? ` &:hover {
|
|
1424
|
+
${({ focusBackground: e }) => e ? `--focus-within-background: ${e};` : ""}
|
|
1425
|
+
${({ borderLeft: e }) => e ? `border-left: ${e};` : ""};
|
|
1426
|
+
${({ background: e }) => e ? `background: ${e};` : ""};
|
|
1427
|
+
${({ height: e }) => e ? `height: ${e};` : ""};
|
|
1428
|
+
${({ hoverBackground: e }) => e ? ` &:hover {
|
|
1445
1429
|
background: ${e};
|
|
1446
1430
|
}
|
|
1447
1431
|
` : ""}
|
|
@@ -1454,120 +1438,188 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
1454
1438
|
alwaysVisible: l,
|
|
1455
1439
|
shiftPressedRef: i
|
|
1456
1440
|
}) {
|
|
1457
|
-
const a = ne(null), u = Ge(), {
|
|
1458
|
-
stickyCheckboxColumn: d
|
|
1459
|
-
} = R(), h = Z(), {
|
|
1460
|
-
columnIndexPerColumnId: w
|
|
1461
|
-
} = xt(), {
|
|
1441
|
+
const a = ne(null), u = Ge(), { stickyCheckboxColumn: d } = R(), h = Z(), { columnIndexPerColumnId: w } = xt(), {
|
|
1462
1442
|
showRowCheckbox: m,
|
|
1463
1443
|
rowBackgroundResolver: f,
|
|
1464
1444
|
checkboxDisabledResolver: p,
|
|
1465
1445
|
enableGridCell: C,
|
|
1466
1446
|
rowIndent: y,
|
|
1467
1447
|
enableExpandCollapse: b
|
|
1468
|
-
} = R(), {
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
toggleSelected: T,
|
|
1473
|
-
shiftAndToggleSelected: G
|
|
1474
|
-
} = Co(t, n), L = Dt(a, {
|
|
1448
|
+
} = R(), { isExpanded: k } = Pe(t), { isSelected: S, toggleSelected: T, shiftAndToggleSelected: G } = Co(
|
|
1449
|
+
t,
|
|
1450
|
+
n
|
|
1451
|
+
), L = Dt(a, {
|
|
1475
1452
|
rootMargin: "400px 0px 400px 0px",
|
|
1476
1453
|
threshold: 0
|
|
1477
|
-
}), x = v(
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1454
|
+
}), x = v(
|
|
1455
|
+
() => f == null ? void 0 : f(t, S),
|
|
1456
|
+
[S, t, f]
|
|
1457
|
+
), z = Po(
|
|
1458
|
+
x,
|
|
1459
|
+
S,
|
|
1460
|
+
k
|
|
1461
|
+
), A = Ao(
|
|
1462
|
+
x,
|
|
1463
|
+
S,
|
|
1464
|
+
k
|
|
1465
|
+
), W = Lo(
|
|
1466
|
+
x,
|
|
1467
|
+
S,
|
|
1468
|
+
A
|
|
1469
|
+
), H = v(
|
|
1470
|
+
() => p == null ? void 0 : p(t),
|
|
1471
|
+
[t, p]
|
|
1472
|
+
), M = Kn(), J = _e(
|
|
1473
|
+
M,
|
|
1474
|
+
t
|
|
1475
|
+
), V = $n(), q = _e(
|
|
1476
|
+
V,
|
|
1477
|
+
t
|
|
1478
|
+
), ee = v(
|
|
1479
|
+
() => /* @__PURE__ */ r(O, { children: /* @__PURE__ */ g(O, { children: [
|
|
1480
|
+
y && /* @__PURE__ */ r(
|
|
1481
|
+
"td",
|
|
1482
|
+
{
|
|
1483
|
+
style: {
|
|
1484
|
+
background: J
|
|
1485
|
+
},
|
|
1486
|
+
children: /* @__PURE__ */ r(N, { num: y })
|
|
1487
|
+
}
|
|
1488
|
+
),
|
|
1489
|
+
b && /* @__PURE__ */ r(
|
|
1490
|
+
"td",
|
|
1491
|
+
{
|
|
1492
|
+
style: {
|
|
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
|
|
1498
|
+
},
|
|
1499
|
+
children: /* @__PURE__ */ r(
|
|
1500
|
+
E,
|
|
1501
|
+
{
|
|
1502
|
+
width: "var(--swui-expand-cell-width)",
|
|
1503
|
+
minWidth: "var(--swui-expand-cell-width)",
|
|
1504
|
+
alignItems: "center",
|
|
1505
|
+
justifyContent: "center",
|
|
1506
|
+
children: /* @__PURE__ */ r(
|
|
1507
|
+
fo,
|
|
1508
|
+
{
|
|
1509
|
+
colIndex: c,
|
|
1510
|
+
rowIndex: C ? o : 0,
|
|
1511
|
+
numRows: C ? s : 0,
|
|
1512
|
+
item: t
|
|
1513
|
+
}
|
|
1514
|
+
)
|
|
1515
|
+
}
|
|
1516
|
+
)
|
|
1517
|
+
}
|
|
1518
|
+
),
|
|
1519
|
+
m && /* @__PURE__ */ r(
|
|
1520
|
+
"td",
|
|
1521
|
+
{
|
|
1522
|
+
style: {
|
|
1523
|
+
background: d ? "inherit" : void 0,
|
|
1524
|
+
position: d ? "sticky" : void 0,
|
|
1525
|
+
left: b && d ? "var(--swui-expand-cell-width)" : d ? "0px" : void 0,
|
|
1526
|
+
textAlign: "center",
|
|
1527
|
+
boxShadow: d ? "var(--swui-sticky-column-shadow-right)" : void 0,
|
|
1528
|
+
zIndex: d ? "var(--swui-sticky-column-z-index)" : void 0
|
|
1529
|
+
},
|
|
1530
|
+
children: /* @__PURE__ */ r(
|
|
1531
|
+
E,
|
|
1532
|
+
{
|
|
1533
|
+
width: "var(--swui-checkbox-cell-width)",
|
|
1534
|
+
minWidth: "var(--swui-checkbox-cell-width)",
|
|
1535
|
+
alignItems: "center",
|
|
1536
|
+
justifyContent: "center",
|
|
1537
|
+
children: /* @__PURE__ */ r(
|
|
1538
|
+
mo,
|
|
1539
|
+
{
|
|
1540
|
+
disabled: H,
|
|
1541
|
+
value: S,
|
|
1542
|
+
onValueChange: T,
|
|
1543
|
+
onValueChangeAndShift: G,
|
|
1544
|
+
colIndex: c + (b ? 1 : 0),
|
|
1545
|
+
rowIndex: o,
|
|
1546
|
+
numRows: s,
|
|
1547
|
+
shiftPressedRef: i
|
|
1548
|
+
}
|
|
1549
|
+
)
|
|
1550
|
+
}
|
|
1551
|
+
)
|
|
1552
|
+
}
|
|
1553
|
+
),
|
|
1554
|
+
h.map(({ groupConfig: te, groupId: me }, X) => /* @__PURE__ */ r(P.Fragment, { children: te.columnOrder.map((B, ie) => /* @__PURE__ */ r(
|
|
1555
|
+
To,
|
|
1556
|
+
{
|
|
1536
1557
|
columnId: B,
|
|
1537
1558
|
item: t,
|
|
1538
1559
|
colIndex: c + w[B],
|
|
1539
1560
|
rowIndex: o,
|
|
1540
1561
|
numRows: s,
|
|
1541
|
-
borderFromGroup: pe(
|
|
1562
|
+
borderFromGroup: pe(
|
|
1563
|
+
X,
|
|
1564
|
+
ie,
|
|
1565
|
+
te.borderLeft
|
|
1566
|
+
),
|
|
1542
1567
|
disableBorderLeft: X === 0 && ie === 0
|
|
1543
|
-
}, B))
|
|
1544
|
-
}, me)), y && /* @__PURE__ */ r("td", {
|
|
1545
|
-
style: {
|
|
1546
|
-
background: q
|
|
1547
1568
|
},
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
background: z,
|
|
1558
|
-
focusBackground: W,
|
|
1559
|
-
borderLeft: k ? tt : ke,
|
|
1560
|
-
ref: a,
|
|
1561
|
-
children: L || l || k ? ee : /* @__PURE__ */ r("td", {
|
|
1562
|
-
colSpan: u,
|
|
1563
|
-
style: {
|
|
1564
|
-
height: "var(--current-row-height)"
|
|
1569
|
+
B
|
|
1570
|
+
)) }, me)),
|
|
1571
|
+
y && /* @__PURE__ */ r(
|
|
1572
|
+
"td",
|
|
1573
|
+
{
|
|
1574
|
+
style: {
|
|
1575
|
+
background: q
|
|
1576
|
+
},
|
|
1577
|
+
children: /* @__PURE__ */ r(N, { num: y })
|
|
1565
1578
|
}
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1579
|
+
),
|
|
1580
|
+
/* @__PURE__ */ r("td", {})
|
|
1581
|
+
] }) }),
|
|
1582
|
+
[
|
|
1583
|
+
c,
|
|
1584
|
+
w,
|
|
1585
|
+
H,
|
|
1586
|
+
b,
|
|
1587
|
+
C,
|
|
1588
|
+
J,
|
|
1589
|
+
h,
|
|
1590
|
+
S,
|
|
1591
|
+
t,
|
|
1592
|
+
q,
|
|
1593
|
+
s,
|
|
1594
|
+
y,
|
|
1595
|
+
o,
|
|
1596
|
+
G,
|
|
1597
|
+
i,
|
|
1598
|
+
m,
|
|
1599
|
+
d,
|
|
1600
|
+
T
|
|
1601
|
+
]
|
|
1602
|
+
);
|
|
1603
|
+
return /* @__PURE__ */ g(O, { children: [
|
|
1604
|
+
/* @__PURE__ */ r(
|
|
1605
|
+
bt,
|
|
1606
|
+
{
|
|
1607
|
+
hoverBackground: A,
|
|
1608
|
+
background: z,
|
|
1609
|
+
focusBackground: W,
|
|
1610
|
+
borderLeft: k ? tt : ke,
|
|
1611
|
+
ref: a,
|
|
1612
|
+
children: L || l || k ? ee : /* @__PURE__ */ r(
|
|
1613
|
+
"td",
|
|
1614
|
+
{
|
|
1615
|
+
colSpan: u,
|
|
1616
|
+
style: { height: "var(--current-row-height)" }
|
|
1617
|
+
}
|
|
1618
|
+
)
|
|
1619
|
+
}
|
|
1620
|
+
),
|
|
1621
|
+
/* @__PURE__ */ r(Go, { item: t })
|
|
1622
|
+
] });
|
|
1571
1623
|
}), 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) => {
|
|
1572
1624
|
if (t)
|
|
1573
1625
|
return j("--lhds-color-blue-200");
|
|
@@ -1590,38 +1642,41 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
1590
1642
|
width: h,
|
|
1591
1643
|
minWidth: w,
|
|
1592
1644
|
justifyContentCell: m
|
|
1593
|
-
} = le(t), f = Oe(
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1645
|
+
} = le(t), f = Oe(
|
|
1646
|
+
s,
|
|
1647
|
+
o,
|
|
1648
|
+
u
|
|
1649
|
+
), 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({ items: n }), [n, a]), k = v(
|
|
1650
|
+
() => i == null ? void 0 : i({ items: n, text: b }),
|
|
1651
|
+
[n, i, b]
|
|
1652
|
+
);
|
|
1653
|
+
return /* @__PURE__ */ r(
|
|
1654
|
+
"td",
|
|
1655
|
+
{
|
|
1656
|
+
colSpan: c,
|
|
1657
|
+
style: {
|
|
1658
|
+
borderLeft: f,
|
|
1659
|
+
position: p.sticky ? "sticky" : void 0,
|
|
1660
|
+
left: p.sticky ? p.left : void 0,
|
|
1661
|
+
right: p.sticky ? p.right : void 0,
|
|
1662
|
+
boxShadow: y,
|
|
1663
|
+
zIndex: C,
|
|
1664
|
+
height: "var(--current-row-height)"
|
|
1665
|
+
},
|
|
1666
|
+
children: /* @__PURE__ */ r(
|
|
1667
|
+
E,
|
|
1668
|
+
{
|
|
1669
|
+
width: h,
|
|
1670
|
+
minWidth: w,
|
|
1671
|
+
height: "inherit",
|
|
1672
|
+
overflow: "hidden",
|
|
1673
|
+
justifyContent: m,
|
|
1674
|
+
alignItems: "center",
|
|
1675
|
+
children: i ? k : /* @__PURE__ */ r(N, { children: /* @__PURE__ */ r(U, { variant: "bold", children: b }) })
|
|
1676
|
+
}
|
|
1677
|
+
)
|
|
1678
|
+
}
|
|
1679
|
+
);
|
|
1625
1680
|
}), $o = (e, t) => {
|
|
1626
1681
|
const n = [];
|
|
1627
1682
|
for (let o = 0; o < e.length; o++) {
|
|
@@ -1634,50 +1689,41 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
1634
1689
|
l > 1 && (o += l - 1);
|
|
1635
1690
|
}
|
|
1636
1691
|
return n;
|
|
1637
|
-
}, Ho = P.memo(
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
showRowCheckbox: o,
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
num: l
|
|
1669
|
-
})
|
|
1670
|
-
}), /* @__PURE__ */ r("td", {})]
|
|
1671
|
-
});
|
|
1672
|
-
}), Mo = function({
|
|
1692
|
+
}, Ho = P.memo(
|
|
1693
|
+
function({
|
|
1694
|
+
items: t
|
|
1695
|
+
}) {
|
|
1696
|
+
const n = Z(), { showRowCheckbox: o, enableExpandCollapse: s, columns: c, rowIndent: l } = R();
|
|
1697
|
+
return /* @__PURE__ */ g("tr", { className: zo.summaryRow, children: [
|
|
1698
|
+
l && /* @__PURE__ */ r("td", { children: /* @__PURE__ */ r(N, { num: l }) }),
|
|
1699
|
+
s && /* @__PURE__ */ r("td", {}),
|
|
1700
|
+
o && /* @__PURE__ */ r("td", {}),
|
|
1701
|
+
n.map(({ groupConfig: i, groupId: a }, u) => /* @__PURE__ */ r(P.Fragment, { children: $o(i.columnOrder, c).map(
|
|
1702
|
+
({ columnId: d, colSpan: h }, w) => /* @__PURE__ */ r(
|
|
1703
|
+
Ko,
|
|
1704
|
+
{
|
|
1705
|
+
colSpan: h,
|
|
1706
|
+
columnId: d,
|
|
1707
|
+
items: t,
|
|
1708
|
+
borderFromGroup: pe(
|
|
1709
|
+
u,
|
|
1710
|
+
w,
|
|
1711
|
+
i.borderLeft
|
|
1712
|
+
),
|
|
1713
|
+
disableBorderLeft: u === 0 && w === 0
|
|
1714
|
+
},
|
|
1715
|
+
d
|
|
1716
|
+
)
|
|
1717
|
+
) }, a)),
|
|
1718
|
+
l && /* @__PURE__ */ r("td", { children: /* @__PURE__ */ r(N, { num: l }) }),
|
|
1719
|
+
/* @__PURE__ */ r("td", {})
|
|
1720
|
+
] });
|
|
1721
|
+
}
|
|
1722
|
+
), Mo = function({
|
|
1673
1723
|
items: t
|
|
1674
1724
|
}) {
|
|
1675
|
-
const {
|
|
1676
|
-
|
|
1677
|
-
} = R();
|
|
1678
|
-
return v(() => Bo(n), [n]) ? /* @__PURE__ */ r(Ho, {
|
|
1679
|
-
items: t
|
|
1680
|
-
}) : null;
|
|
1725
|
+
const { columns: n } = R();
|
|
1726
|
+
return v(() => Bo(n), [n]) ? /* @__PURE__ */ r(Ho, { items: t }) : null;
|
|
1681
1727
|
}, kt = (e) => (t) => !(e != null && e(t)), Vo = P.memo(function({
|
|
1682
1728
|
items: t,
|
|
1683
1729
|
colIndexOffset: n = 0,
|
|
@@ -1689,10 +1735,7 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
1689
1735
|
checkboxDisabledResolver: a,
|
|
1690
1736
|
enableExternalSorting: u
|
|
1691
1737
|
} = R(), {
|
|
1692
|
-
sortOrder: {
|
|
1693
|
-
sortBy: d,
|
|
1694
|
-
desc: h
|
|
1695
|
-
}
|
|
1738
|
+
sortOrder: { sortBy: d, desc: h }
|
|
1696
1739
|
} = Q(), w = po(d), m = v(() => {
|
|
1697
1740
|
if (u)
|
|
1698
1741
|
return t != null ? t : [];
|
|
@@ -1701,8 +1744,13 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
1701
1744
|
if (!w)
|
|
1702
1745
|
return t;
|
|
1703
1746
|
const p = [...t];
|
|
1704
|
-
return p.sort(
|
|
1705
|
-
|
|
1747
|
+
return p.sort(
|
|
1748
|
+
(C, y) => ho(w(C), w(y))
|
|
1749
|
+
), h && p.reverse(), i || s.current++, p;
|
|
1750
|
+
}, [u, t, w, h, i]), f = v(
|
|
1751
|
+
() => m.filter(kt(a)).map((p) => l(p)),
|
|
1752
|
+
[m, a, l]
|
|
1753
|
+
);
|
|
1706
1754
|
return je(() => {
|
|
1707
1755
|
const p = (y) => {
|
|
1708
1756
|
y.key === "Shift" && (c.current = !1);
|
|
@@ -1712,19 +1760,22 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
1712
1760
|
return document.addEventListener("keyup", p), document.addEventListener("keydown", C), () => {
|
|
1713
1761
|
document.removeEventListener("keyup", p), document.removeEventListener("keydown", C);
|
|
1714
1762
|
};
|
|
1715
|
-
}, []), /* @__PURE__ */ g(P.Fragment, {
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1763
|
+
}, []), /* @__PURE__ */ g(P.Fragment, { children: [
|
|
1764
|
+
m.map((p, C) => /* @__PURE__ */ r(
|
|
1765
|
+
Oo,
|
|
1766
|
+
{
|
|
1767
|
+
alwaysVisible: i || m.length < 30,
|
|
1768
|
+
item: p,
|
|
1769
|
+
idListForEnabledItems: f,
|
|
1770
|
+
colIndexOffset: n,
|
|
1771
|
+
rowIndex: C + o,
|
|
1772
|
+
numRows: m.length,
|
|
1773
|
+
shiftPressedRef: c
|
|
1774
|
+
},
|
|
1775
|
+
l(p)
|
|
1776
|
+
)),
|
|
1777
|
+
/* @__PURE__ */ r(Mo, { items: m })
|
|
1778
|
+
] }, s.current);
|
|
1728
1779
|
}), _o = P.memo(function({
|
|
1729
1780
|
error: t,
|
|
1730
1781
|
bannerError: n,
|
|
@@ -1741,75 +1792,30 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
1741
1792
|
}) {
|
|
1742
1793
|
var f;
|
|
1743
1794
|
const m = Ge();
|
|
1744
|
-
return n ? /* @__PURE__ */ r("tbody", {
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
children: /* @__PURE__ */ r("tr", {
|
|
1763
|
-
children: /* @__PURE__ */ r("td", {
|
|
1764
|
-
colSpan: m,
|
|
1765
|
-
children: /* @__PURE__ */ r(Ce, {
|
|
1766
|
-
num: 4,
|
|
1767
|
-
justifyContent: "center",
|
|
1768
|
-
children: /* @__PURE__ */ r(oe, {
|
|
1769
|
-
alignItems: "center",
|
|
1770
|
-
children: /* @__PURE__ */ r(Le, {
|
|
1771
|
-
headerText: (f = t ? t.message : w) != null ? f : "Unknown error",
|
|
1772
|
-
variant: "error"
|
|
1773
|
-
})
|
|
1774
|
-
})
|
|
1775
|
-
})
|
|
1776
|
-
})
|
|
1777
|
-
})
|
|
1778
|
-
}) : o ? /* @__PURE__ */ r("tbody", {
|
|
1779
|
-
children: /* @__PURE__ */ r("tr", {
|
|
1780
|
-
children: /* @__PURE__ */ r("td", {
|
|
1781
|
-
colSpan: m,
|
|
1782
|
-
children: /* @__PURE__ */ r(Ce, {
|
|
1783
|
-
num: 4,
|
|
1784
|
-
children: /* @__PURE__ */ r(Zt, {})
|
|
1785
|
-
})
|
|
1786
|
-
})
|
|
1787
|
-
})
|
|
1788
|
-
}) : !s || !s.length ? /* @__PURE__ */ r("tbody", {
|
|
1789
|
-
children: /* @__PURE__ */ r("tr", {
|
|
1790
|
-
children: /* @__PURE__ */ r("td", {
|
|
1791
|
-
colSpan: m,
|
|
1792
|
-
children: /* @__PURE__ */ r(E, {
|
|
1793
|
-
spacing: 4,
|
|
1794
|
-
justifyContent: "center",
|
|
1795
|
-
children: /* @__PURE__ */ r(Le, {
|
|
1796
|
-
text: c,
|
|
1797
|
-
headerText: a,
|
|
1798
|
-
contentRight: l,
|
|
1799
|
-
variant: "info",
|
|
1800
|
-
children: i
|
|
1801
|
-
})
|
|
1802
|
-
})
|
|
1803
|
-
})
|
|
1804
|
-
})
|
|
1805
|
-
}) : /* @__PURE__ */ r("tbody", {
|
|
1806
|
-
children: /* @__PURE__ */ r(Vo, {
|
|
1795
|
+
return n ? /* @__PURE__ */ r("tbody", { children: /* @__PURE__ */ r("tr", { children: /* @__PURE__ */ r("td", { colSpan: m, children: /* @__PURE__ */ r(Ce, { num: 4, justifyContent: "center", children: /* @__PURE__ */ r(oe, { alignItems: "center", children: /* @__PURE__ */ r(Pt, { bannerState: n, variant: "error" }) }) }) }) }) }) : t || w ? /* @__PURE__ */ r("tbody", { children: /* @__PURE__ */ r("tr", { children: /* @__PURE__ */ r("td", { colSpan: m, children: /* @__PURE__ */ r(Ce, { num: 4, justifyContent: "center", children: /* @__PURE__ */ r(oe, { alignItems: "center", children: /* @__PURE__ */ r(
|
|
1796
|
+
Le,
|
|
1797
|
+
{
|
|
1798
|
+
headerText: (f = t ? t.message : w) != null ? f : "Unknown error",
|
|
1799
|
+
variant: "error"
|
|
1800
|
+
}
|
|
1801
|
+
) }) }) }) }) }) : o ? /* @__PURE__ */ r("tbody", { children: /* @__PURE__ */ r("tr", { children: /* @__PURE__ */ r("td", { colSpan: m, children: /* @__PURE__ */ r(Ce, { num: 4, children: /* @__PURE__ */ r(Zt, {}) }) }) }) }) : !s || !s.length ? /* @__PURE__ */ r("tbody", { children: /* @__PURE__ */ r("tr", { children: /* @__PURE__ */ r("td", { colSpan: m, children: /* @__PURE__ */ r(E, { spacing: 4, justifyContent: "center", children: /* @__PURE__ */ r(
|
|
1802
|
+
Le,
|
|
1803
|
+
{
|
|
1804
|
+
text: c,
|
|
1805
|
+
headerText: a,
|
|
1806
|
+
contentRight: l,
|
|
1807
|
+
variant: "info",
|
|
1808
|
+
children: i
|
|
1809
|
+
}
|
|
1810
|
+
) }) }) }) }) : /* @__PURE__ */ r("tbody", { children: /* @__PURE__ */ r(
|
|
1811
|
+
Vo,
|
|
1812
|
+
{
|
|
1807
1813
|
variant: h,
|
|
1808
1814
|
items: s,
|
|
1809
1815
|
colIndexOffset: u,
|
|
1810
1816
|
rowIndexOffset: d
|
|
1811
|
-
}
|
|
1812
|
-
});
|
|
1817
|
+
}
|
|
1818
|
+
) });
|
|
1813
1819
|
}), jo = (e) => {
|
|
1814
1820
|
const { keyResolver: t, checkboxDisabledResolver: n } = R(), {
|
|
1815
1821
|
selectedIds: { selectedIds: o }
|
|
@@ -1872,61 +1878,69 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
1872
1878
|
}
|
|
1873
1879
|
};
|
|
1874
1880
|
}, [e, c, s, t, n, o]);
|
|
1875
|
-
}, Fo = P.memo(
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
minWidth: p
|
|
1893
|
-
} = le(t), {
|
|
1894
|
-
disableSorting: C,
|
|
1895
|
-
sortOrderIconVariant: y
|
|
1896
|
-
} = R(), b = Te(), {
|
|
1897
|
-
arrow: k,
|
|
1898
|
-
selected: S,
|
|
1899
|
-
onClickColumnHead: T
|
|
1900
|
-
} = qo(t), G = typeof a == "string" ? a : go(t), L = Oe(n, o, u), x = b[t];
|
|
1901
|
-
return /* @__PURE__ */ r("th", {
|
|
1902
|
-
style: {
|
|
1903
|
-
background: h != null ? h : "white",
|
|
1904
|
-
borderLeft: L,
|
|
1905
|
-
position: s || x.sticky ? "sticky" : void 0,
|
|
1906
|
-
left: x.left,
|
|
1907
|
-
right: x.right,
|
|
1908
|
-
top: c,
|
|
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,
|
|
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,
|
|
1911
|
-
height: 0,
|
|
1881
|
+
}, Fo = P.memo(
|
|
1882
|
+
function({
|
|
1883
|
+
columnId: t,
|
|
1884
|
+
borderFromGroup: n,
|
|
1885
|
+
disableBorderLeft: o,
|
|
1886
|
+
stickyHeader: s,
|
|
1887
|
+
top: c,
|
|
1888
|
+
appendTooltipTo: l
|
|
1889
|
+
}) {
|
|
1890
|
+
const {
|
|
1891
|
+
justifyContentHeader: i,
|
|
1892
|
+
columnLabel: a,
|
|
1893
|
+
borderLeft: u,
|
|
1894
|
+
infoIconTooltipText: d,
|
|
1895
|
+
background: h,
|
|
1896
|
+
zIndex: w,
|
|
1897
|
+
sortOrderIconVariant: m,
|
|
1912
1898
|
width: f,
|
|
1913
1899
|
minWidth: p
|
|
1914
|
-
},
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1900
|
+
} = le(t), {
|
|
1901
|
+
disableSorting: C,
|
|
1902
|
+
sortOrderIconVariant: y
|
|
1903
|
+
} = R(), b = Te(), { arrow: k, selected: S, onClickColumnHead: T } = qo(t), G = typeof a == "string" ? a : go(t), L = Oe(
|
|
1904
|
+
n,
|
|
1905
|
+
o,
|
|
1906
|
+
u
|
|
1907
|
+
), x = b[t];
|
|
1908
|
+
return /* @__PURE__ */ r(
|
|
1909
|
+
"th",
|
|
1910
|
+
{
|
|
1911
|
+
style: {
|
|
1912
|
+
background: h != null ? h : "white",
|
|
1913
|
+
borderLeft: L,
|
|
1914
|
+
position: s || x.sticky ? "sticky" : void 0,
|
|
1915
|
+
left: x.left,
|
|
1916
|
+
right: x.right,
|
|
1917
|
+
top: c,
|
|
1918
|
+
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,
|
|
1919
|
+
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,
|
|
1920
|
+
height: 0,
|
|
1921
|
+
width: f,
|
|
1922
|
+
minWidth: p
|
|
1923
|
+
},
|
|
1924
|
+
children: /* @__PURE__ */ r(
|
|
1925
|
+
Ee,
|
|
1926
|
+
{
|
|
1927
|
+
width: "inherit",
|
|
1928
|
+
minWidth: "inherit",
|
|
1929
|
+
arrow: !C && G ? k : void 0,
|
|
1930
|
+
onClick: C ? void 0 : T,
|
|
1931
|
+
label: G,
|
|
1932
|
+
infoIconTooltipText: d,
|
|
1933
|
+
alignRight: i === "flex-end",
|
|
1934
|
+
sortOrderIconVariant: m != null ? m : y,
|
|
1935
|
+
appendTooltipTo: l,
|
|
1936
|
+
selected: S,
|
|
1937
|
+
height: "100%"
|
|
1938
|
+
}
|
|
1939
|
+
)
|
|
1940
|
+
}
|
|
1941
|
+
);
|
|
1942
|
+
}
|
|
1943
|
+
), Uo = (e, t, n, o) => {
|
|
1930
1944
|
if (e && t !== void 0)
|
|
1931
1945
|
return `calc(${e} + ${n})`;
|
|
1932
1946
|
if (o && t)
|
|
@@ -1950,85 +1964,95 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
1950
1964
|
stickyHeader: h,
|
|
1951
1965
|
stickyCheckboxColumn: w,
|
|
1952
1966
|
showRowCheckbox: m
|
|
1953
|
-
} = R(), f = Nn(), {
|
|
1954
|
-
allItemsAreExpanded: p,
|
|
1955
|
-
toggleExpanded: C
|
|
1956
|
-
} = Wo(t), {
|
|
1957
|
-
allItemsAreSelected: y,
|
|
1958
|
-
onClickCheckbox: b,
|
|
1959
|
-
selectionIsEmpty: k
|
|
1960
|
-
} = jo(t), S = !t || t.length === 0, T = {
|
|
1967
|
+
} = R(), f = Nn(), { allItemsAreExpanded: p, toggleExpanded: C } = Wo(t), { allItemsAreSelected: y, onClickCheckbox: b, selectionIsEmpty: k } = jo(t), S = !t || t.length === 0, T = {
|
|
1961
1968
|
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(
|
|
1969
|
+
top: Uo(
|
|
1970
|
+
u,
|
|
1971
|
+
f,
|
|
1972
|
+
o,
|
|
1973
|
+
h
|
|
1974
|
+
),
|
|
1963
1975
|
background: h || w ? "white" : void 0,
|
|
1964
1976
|
position: h || w ? "sticky" : void 0,
|
|
1965
1977
|
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
|
|
1966
1978
|
};
|
|
1967
|
-
return /* @__PURE__ */ g(bt, {
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
1979
|
+
return /* @__PURE__ */ g(bt, { height: o, borderLeft: ke, children: [
|
|
1980
|
+
a && /* @__PURE__ */ r("th", { style: T, children: /* @__PURE__ */ r(E, { indent: a }) }),
|
|
1981
|
+
i && /* @__PURE__ */ r(
|
|
1982
|
+
"th",
|
|
1983
|
+
{
|
|
1984
|
+
style: {
|
|
1985
|
+
...T,
|
|
1986
|
+
left: "0px",
|
|
1987
|
+
textAlign: "left"
|
|
1988
|
+
},
|
|
1989
|
+
children: /* @__PURE__ */ r(
|
|
1990
|
+
E,
|
|
1991
|
+
{
|
|
1992
|
+
width: "var(--swui-expand-cell-width)",
|
|
1993
|
+
minWidth: "var(--swui-expand-cell-width)",
|
|
1994
|
+
alignItems: "center",
|
|
1995
|
+
justifyContent: "center",
|
|
1996
|
+
children: l && /* @__PURE__ */ r(
|
|
1997
|
+
xe,
|
|
1998
|
+
{
|
|
1999
|
+
size: "small",
|
|
2000
|
+
leftIcon: p ? qe : Fe,
|
|
2001
|
+
onClick: C
|
|
2002
|
+
}
|
|
2003
|
+
)
|
|
2004
|
+
}
|
|
2005
|
+
)
|
|
2006
|
+
}
|
|
2007
|
+
),
|
|
2008
|
+
(m || c) && /* @__PURE__ */ r(
|
|
2009
|
+
"th",
|
|
2010
|
+
{
|
|
2011
|
+
style: {
|
|
2012
|
+
...T,
|
|
2013
|
+
overflow: "hidden",
|
|
2014
|
+
left: w && i ? "var(--swui-expand-cell-width)" : w ? "0px" : void 0
|
|
2015
|
+
},
|
|
2016
|
+
children: /* @__PURE__ */ r(
|
|
2017
|
+
E,
|
|
2018
|
+
{
|
|
2019
|
+
width: "var(--swui-checkbox-cell-width)",
|
|
2020
|
+
minWidth: "var(--swui-checkbox-cell-width)",
|
|
2021
|
+
alignItems: "center",
|
|
2022
|
+
justifyContent: "center",
|
|
2023
|
+
children: c && /* @__PURE__ */ r(
|
|
2024
|
+
Xe,
|
|
2025
|
+
{
|
|
2026
|
+
size: "small",
|
|
2027
|
+
disabled: S,
|
|
2028
|
+
value: y,
|
|
2029
|
+
indeterminate: !k && !y,
|
|
2030
|
+
onValueChange: b
|
|
2031
|
+
}
|
|
2032
|
+
)
|
|
2033
|
+
}
|
|
2034
|
+
)
|
|
2035
|
+
}
|
|
2036
|
+
),
|
|
2037
|
+
s.map(({ groupConfig: G, groupId: L }, x) => /* @__PURE__ */ r(P.Fragment, { children: G.columnOrder.map((z, A) => /* @__PURE__ */ r(
|
|
2038
|
+
Fo,
|
|
2039
|
+
{
|
|
2016
2040
|
columnId: z,
|
|
2017
|
-
borderFromGroup: pe(
|
|
2041
|
+
borderFromGroup: pe(
|
|
2042
|
+
x,
|
|
2043
|
+
A,
|
|
2044
|
+
G.borderLeft
|
|
2045
|
+
),
|
|
2018
2046
|
disableBorderLeft: x === 0 && A === 0,
|
|
2019
2047
|
stickyHeader: h,
|
|
2020
2048
|
top: T.top,
|
|
2021
2049
|
appendTooltipTo: n
|
|
2022
|
-
},
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
}), /* @__PURE__ */ r("th", {
|
|
2029
|
-
style: T
|
|
2030
|
-
})]
|
|
2031
|
-
});
|
|
2050
|
+
},
|
|
2051
|
+
z
|
|
2052
|
+
)) }, L)),
|
|
2053
|
+
a && /* @__PURE__ */ r("th", { style: T, children: /* @__PURE__ */ r(E, { indent: a }) }),
|
|
2054
|
+
/* @__PURE__ */ r("th", { style: T })
|
|
2055
|
+
] });
|
|
2032
2056
|
}), kr = function({
|
|
2033
2057
|
tableContext: t,
|
|
2034
2058
|
config: n,
|
|
@@ -2046,16 +2070,31 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
2046
2070
|
initialSortOrder: m,
|
|
2047
2071
|
enableExpandCollapse: f,
|
|
2048
2072
|
stickyCheckboxColumn: p
|
|
2049
|
-
} = n, {
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2073
|
+
} = n, { tableContext: C } = oo(
|
|
2074
|
+
c != null ? c : h,
|
|
2075
|
+
dt(m, w)
|
|
2076
|
+
), y = t || C, { state: b, actions: k, dispatch: S } = y, T = v(
|
|
2077
|
+
() => ({
|
|
2078
|
+
actions: k,
|
|
2079
|
+
dispatch: S
|
|
2080
|
+
}),
|
|
2081
|
+
[k, S]
|
|
2082
|
+
), G = Boolean(
|
|
2083
|
+
s != null ? s : "columnGroupOrder" in n
|
|
2084
|
+
), 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(
|
|
2085
|
+
() => vt(
|
|
2086
|
+
L,
|
|
2087
|
+
x,
|
|
2088
|
+
z
|
|
2089
|
+
),
|
|
2090
|
+
[L, x, z]
|
|
2091
|
+
), W = v(
|
|
2092
|
+
() => Wn(n),
|
|
2093
|
+
[n]
|
|
2094
|
+
), H = v(() => ro(n), [n]), M = v(
|
|
2095
|
+
() => Qn(n),
|
|
2096
|
+
[n]
|
|
2097
|
+
), J = v(() => {
|
|
2059
2098
|
try {
|
|
2060
2099
|
Fn(n);
|
|
2061
2100
|
return;
|
|
@@ -2063,67 +2102,81 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
2063
2102
|
return V instanceof Error ? V : new Error("Unknown error");
|
|
2064
2103
|
}
|
|
2065
2104
|
}, [n]);
|
|
2066
|
-
return J ? /* @__PURE__ */ r(Jt, {
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
value: G,
|
|
2095
|
-
children: /* @__PURE__ */ g(wt.Provider, {
|
|
2105
|
+
return J ? /* @__PURE__ */ r(Jt, { text: J.message }) : /* @__PURE__ */ r(
|
|
2106
|
+
"table",
|
|
2107
|
+
{
|
|
2108
|
+
className: Je(Ve.standardTable, Ve[l]),
|
|
2109
|
+
style: {
|
|
2110
|
+
width: "100%",
|
|
2111
|
+
isolation: "isolate",
|
|
2112
|
+
"--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"
|
|
2113
|
+
},
|
|
2114
|
+
children: /* @__PURE__ */ r(Ct.Provider, { value: M, children: /* @__PURE__ */ r(ft.Provider, { value: H, children: /* @__PURE__ */ r(zn.Provider, { value: l, children: /* @__PURE__ */ r(
|
|
2115
|
+
ct.Provider,
|
|
2116
|
+
{
|
|
2117
|
+
value: c != null ? c : h,
|
|
2118
|
+
children: /* @__PURE__ */ r(lt.Provider, { value: b, children: /* @__PURE__ */ r(it.Provider, { value: T, children: /* @__PURE__ */ r(at.Provider, { value: n, children: /* @__PURE__ */ r(
|
|
2119
|
+
ut.Provider,
|
|
2120
|
+
{
|
|
2121
|
+
value: A,
|
|
2122
|
+
children: /* @__PURE__ */ r(
|
|
2123
|
+
yt.Provider,
|
|
2124
|
+
{
|
|
2125
|
+
value: W,
|
|
2126
|
+
children: /* @__PURE__ */ r(
|
|
2127
|
+
Dn.Provider,
|
|
2128
|
+
{
|
|
2129
|
+
value: G,
|
|
2130
|
+
children: /* @__PURE__ */ g(
|
|
2131
|
+
wt.Provider,
|
|
2132
|
+
{
|
|
2096
2133
|
value: "columnGroupOrder" in n ? s != null ? s : n.columnGroupOrder : s,
|
|
2097
|
-
children: [
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2134
|
+
children: [
|
|
2135
|
+
/* @__PURE__ */ r(co, {}),
|
|
2136
|
+
/* @__PURE__ */ r(pt.Provider, { value: i, children: /* @__PURE__ */ g(
|
|
2137
|
+
mt.Provider,
|
|
2138
|
+
{
|
|
2139
|
+
value: a,
|
|
2140
|
+
children: [
|
|
2141
|
+
/* @__PURE__ */ g("thead", { children: [
|
|
2142
|
+
(s || "columnGroupOrder" in n) && /* @__PURE__ */ r(
|
|
2143
|
+
jn,
|
|
2144
|
+
{
|
|
2145
|
+
height: "var(--current-row-height)"
|
|
2146
|
+
}
|
|
2147
|
+
),
|
|
2148
|
+
/* @__PURE__ */ r(
|
|
2149
|
+
Zo,
|
|
2150
|
+
{
|
|
2151
|
+
items: d.items,
|
|
2152
|
+
height: "var(--current-row-height)",
|
|
2153
|
+
appendTooltipTo: u
|
|
2154
|
+
}
|
|
2155
|
+
)
|
|
2156
|
+
] }),
|
|
2157
|
+
/* @__PURE__ */ r(
|
|
2158
|
+
_o,
|
|
2159
|
+
{
|
|
2160
|
+
variant: l,
|
|
2161
|
+
...d
|
|
2162
|
+
}
|
|
2163
|
+
)
|
|
2164
|
+
]
|
|
2165
|
+
}
|
|
2166
|
+
) })
|
|
2167
|
+
]
|
|
2168
|
+
}
|
|
2169
|
+
)
|
|
2170
|
+
}
|
|
2171
|
+
)
|
|
2172
|
+
}
|
|
2173
|
+
)
|
|
2174
|
+
}
|
|
2175
|
+
) }) }) })
|
|
2176
|
+
}
|
|
2177
|
+
) }) }) })
|
|
2178
|
+
}
|
|
2179
|
+
);
|
|
2127
2180
|
}, Sr = (e, t) => ({
|
|
2128
2181
|
...t,
|
|
2129
2182
|
itemValueResolver: e
|
|
@@ -2138,20 +2191,18 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
2138
2191
|
stopEditing: l,
|
|
2139
2192
|
stopEditingAndMove: i
|
|
2140
2193
|
}
|
|
2141
|
-
}) => n ? /* @__PURE__ */ r(
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
})
|
|
2154
|
-
}), Er = (e, t, n) => ({
|
|
2194
|
+
}) => n ? /* @__PURE__ */ r(
|
|
2195
|
+
ge,
|
|
2196
|
+
{
|
|
2197
|
+
onValueChange: o,
|
|
2198
|
+
value: t,
|
|
2199
|
+
onDone: l,
|
|
2200
|
+
onEsc: s,
|
|
2201
|
+
autoFocus: !0,
|
|
2202
|
+
selectAllOnMount: !c,
|
|
2203
|
+
onMove: i
|
|
2204
|
+
}
|
|
2205
|
+
) : /* @__PURE__ */ r(N, { children: /* @__PURE__ */ r(U, { color: "var(--swui-primary-action-color)", children: e }) }), Er = (e, t, n) => ({
|
|
2155
2206
|
label: o,
|
|
2156
2207
|
item: s,
|
|
2157
2208
|
gridCell: {
|
|
@@ -2166,25 +2217,27 @@ const Ye = P.createContext({}), Cr = ({
|
|
|
2166
2217
|
isEditable: w
|
|
2167
2218
|
}) => {
|
|
2168
2219
|
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(
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2220
|
+
return w && l ? /* @__PURE__ */ r(
|
|
2221
|
+
ge,
|
|
2222
|
+
{
|
|
2223
|
+
onValueChange: i,
|
|
2224
|
+
value: c,
|
|
2225
|
+
onDone: d,
|
|
2226
|
+
onEsc: a,
|
|
2227
|
+
autoFocus: !0,
|
|
2228
|
+
selectAllOnMount: !u,
|
|
2229
|
+
onMove: h
|
|
2230
|
+
}
|
|
2231
|
+
) : /* @__PURE__ */ r(N, { row: !0, alignItems: "center", children: /* @__PURE__ */ r(
|
|
2232
|
+
tn,
|
|
2233
|
+
{
|
|
2181
2234
|
value: o,
|
|
2182
2235
|
modifiedField: p,
|
|
2183
2236
|
crudStatus: f,
|
|
2184
2237
|
isEditable: w,
|
|
2185
2238
|
warningOnEmpty: m
|
|
2186
|
-
}
|
|
2187
|
-
});
|
|
2239
|
+
}
|
|
2240
|
+
) });
|
|
2188
2241
|
};
|
|
2189
2242
|
export {
|
|
2190
2243
|
Qe as CrudStatusIndicator,
|