@stenajs-webui/grid 18.12.1-next.0 → 18.12.2

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