@stenajs-webui/grid 19.0.0-next.2 → 19.0.0-next.21

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