@stenajs-webui/grid 18.0.2 → 18.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # v18.0.3 (Mon Feb 27 2023)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - Add blue bottom line to sorted column header [#539](https://github.com/StenaIT/stenajs-webui/pull/539) (david.zetterdahl@stenaline.com [@mattias800](https://github.com/mattias800) [@LordDz](https://github.com/LordDz))
6
+
7
+ #### Authors: 3
8
+
9
+ - David ([@LordDz](https://github.com/LordDz))
10
+ - David Zetterdahl (david.zetterdahl@stenaline.com)
11
+ - Mattias Andersson ([@mattias800](https://github.com/mattias800))
12
+
13
+ ---
14
+
1
15
  # v17.31.0 (Wed Feb 01 2023)
2
16
 
3
17
  #### 🚀 Enhancement
package/dist/index.es.js CHANGED
@@ -1,18 +1,18 @@
1
1
  (function(){"use strict";try{var e=document.createElement("style");e.appendChild(document.createTextNode("._tableRow_1cphw_1:focus-within{background:var(--focus-within-background, var(--lhds-color-blue-50))}._standardTable_1iok0_1{--swui-standard-table-height: 40px;--swui-sticky-header-shadow: 2px 4px 4px 0 rgba(0, 0, 0, .05);--swui-sticky-header-shadow-and-right: var(--swui-sticky-header-shadow), var(--swui-sticky-column-shadow-right);--swui-sticky-header-shadow-and-left: var(--swui-sticky-header-shadow), var(--swui-sticky-column-shadow-left);--swui-sticky-column-shadow-right: 4px 2px 4px 0 rgba(0, 0, 0, .05);--swui-sticky-column-shadow-left: -4px 2px 4px 0 rgba(0, 0, 0, .05);--swui-sticky-header-z-index: 10;--swui-sticky-column-z-index: 20;--swui-sticky-group-group-z-index: 25;--swui-sticky-group-header-z-index: 26;--swui-sticky-header-column-group-z-index: 30;--swui-sticky-column-group-label-z-index: 40;--swui-sticky-header-in-sticky-column-z-index: 50;--swui-sticky-popover-z-index: 60;--swui-expand-cell-width: 45px;--swui-checkbox-cell-width: 45px;--swui-expand-highlight-border-width: 2px;--current-row-height: var(--swui-standard-table-height);--current-left-offset: 0px;border-spacing:0}._standardTable_1iok0_1 td{border-top:1px solid var(--lhds-color-ui-300);padding:0}._standardTable_1iok0_1 th{padding:0}._standardTable_1iok0_1._relaxed_1iok0_37{--current-row-height: 48px}._standardTable_1iok0_1._condensed_1iok0_41{--current-row-height: 32px}._standardTable_1iok0_1._compact_1iok0_45{--current-row-height: 24px}._standardTableCell_1xzcm_1{outline:none}._textCell_1yv6v_1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._summaryRow_12x8k_1 td{border-top:1px solid var(--lhds-color-ui-400)}")),document.head.appendChild(e)}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
2
2
  import * as T 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";
3
+ import { useMemo as v, useRef as ne, useState as ve, useCallback as I, useEffect as je, useContext as H, createContext as K, useReducer as Et, useId as Rt } from "react";
4
4
  import { jsx as r, Fragment as G, jsxs as g } from "react/jsx-runtime";
5
5
  import { faExclamationTriangle as ue } from "@fortawesome/free-solid-svg-icons/faExclamationTriangle";
6
6
  import { InputSpinner as ye, Icon as F, stenaArrowRight as Gt, stenaInfoCircle as Tt, FlatButton as xe, ResultListBanner as Ot, Banner as Le } from "@stenajs-webui/elements";
7
7
  import { cssColor as _ } from "@stenajs-webui/theme";
8
8
  import { Tooltip as se, Popover as Pt } from "@stenajs-webui/tooltip";
9
- import { Text as U, Indent as N, Space as L, 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";
9
+ import { Text as U, Indent as N, Space as B, Row as E, Box as oe, exhaustSwitchCaseElseThrow as At, Heading as We, booleanOrNumberToNumber as Lt, useArraySet as qe, useOnScreen as Bt, Spacing as we } from "@stenajs-webui/core";
10
10
  import { faEllipsisV as Dt } from "@fortawesome/free-solid-svg-icons/faEllipsisV";
11
11
  import { faSortAlphaDown as Nt } from "@fortawesome/free-solid-svg-icons/faSortAlphaDown";
12
12
  import { faSortAlphaUp as zt } from "@fortawesome/free-solid-svg-icons/faSortAlphaUp";
13
13
  import { faSortAmountDownAlt as Kt } from "@fortawesome/free-solid-svg-icons/faSortAmountDownAlt";
14
- import { faSortAmountUpAlt as Ht } from "@fortawesome/free-solid-svg-icons/faSortAmountUpAlt";
15
- import { faSortNumericDown as $t } from "@fortawesome/free-solid-svg-icons/faSortNumericDown";
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
16
  import { faSortNumericUp as Mt } from "@fortawesome/free-solid-svg-icons/faSortNumericUp";
17
17
  import Fe from "classnames";
18
18
  import { faArrowRight as Vt } from "@fortawesome/free-solid-svg-icons/faArrowRight";
@@ -107,7 +107,7 @@ const Xe = T.createContext({}), br = ({
107
107
  variant: "bold",
108
108
  children: o.newValue
109
109
  })]
110
- }), i && /* @__PURE__ */ r(L, {}), c ? /* @__PURE__ */ r(se, {
110
+ }), i && /* @__PURE__ */ r(B, {}), c ? /* @__PURE__ */ r(se, {
111
111
  label: t,
112
112
  zIndex: 100,
113
113
  children: /* @__PURE__ */ r(F, {
@@ -151,9 +151,9 @@ const Xe = T.createContext({}), br = ({
151
151
  case "alpha":
152
152
  return e === "up" ? zt : Nt;
153
153
  case "numeric":
154
- return e === "up" ? Mt : $t;
154
+ return e === "up" ? Mt : Ht;
155
155
  case "amount":
156
- return e === "up" ? Ht : Kt;
156
+ return e === "up" ? $t : Kt;
157
157
  default:
158
158
  return At(t);
159
159
  }
@@ -171,39 +171,41 @@ const Xe = T.createContext({}), br = ({
171
171
  sortOrderIconVariant: a,
172
172
  ...p
173
173
  }) => {
174
- const f = ne(null);
174
+ const f = ne(null), m = n ? {
175
+ cursor: "pointer",
176
+ userSelect: "none"
177
+ } : void 0, C = !e && !t && !i;
175
178
  return /* @__PURE__ */ g(E, {
176
179
  height: "100%",
177
180
  alignItems: "center",
178
181
  ref: f,
179
182
  overflow: d,
180
183
  justifyContent: u ? "flex-end" : "flex-start",
184
+ borderTop: "2px solid transparent",
185
+ borderBottom: `2px solid ${s ? _("--lhds-color-blue-500") : "transparent"}`,
181
186
  ...p,
182
187
  children: [/* @__PURE__ */ g(E, {
183
188
  alignItems: "center",
184
189
  indent: !0,
185
190
  children: [!t && u && /* @__PURE__ */ g(G, {
186
- children: [/* @__PURE__ */ r(L, {}), /* @__PURE__ */ r(oe, {
191
+ children: [/* @__PURE__ */ r(B, {}), /* @__PURE__ */ r(oe, {
187
192
  width: "14px"
188
- }), /* @__PURE__ */ r(L, {
193
+ }), /* @__PURE__ */ r(B, {
189
194
  num: 0.5
190
195
  })]
191
196
  }), (o || e) && /* @__PURE__ */ g(E, {
192
197
  onClick: n,
193
- style: n ? {
194
- cursor: "pointer",
195
- userSelect: "none"
196
- } : void 0,
198
+ style: m,
197
199
  alignItems: "center",
198
200
  children: [o && /* @__PURE__ */ g(G, {
199
- children: [o, !(!e && !t && !i) && /* @__PURE__ */ r(L, {
201
+ children: [o, !C && /* @__PURE__ */ r(B, {
200
202
  num: 0.5
201
203
  })]
202
204
  }), t && u && /* @__PURE__ */ g(G, {
203
- children: [/* @__PURE__ */ r(L, {}), /* @__PURE__ */ r(Ke, {
205
+ children: [/* @__PURE__ */ r(B, {}), /* @__PURE__ */ r(Ke, {
204
206
  direction: t,
205
207
  iconVariant: a
206
- }), /* @__PURE__ */ r(L, {
208
+ }), /* @__PURE__ */ r(B, {
207
209
  num: 0.5
208
210
  })]
209
211
  }), e && /* @__PURE__ */ r(We, {
@@ -213,15 +215,15 @@ const Xe = T.createContext({}), br = ({
213
215
  },
214
216
  children: e
215
217
  }), t && !u && /* @__PURE__ */ g(G, {
216
- children: [/* @__PURE__ */ r(L, {
218
+ children: [/* @__PURE__ */ r(B, {
217
219
  num: 0.5
218
220
  }), /* @__PURE__ */ r(Ke, {
219
221
  direction: t,
220
222
  iconVariant: a
221
- }), /* @__PURE__ */ r(L, {})]
223
+ }), /* @__PURE__ */ r(B, {})]
222
224
  })]
223
225
  }), i && /* @__PURE__ */ g(G, {
224
- children: [/* @__PURE__ */ r(L, {}), /* @__PURE__ */ g(E, {
226
+ children: [/* @__PURE__ */ r(B, {}), /* @__PURE__ */ g(E, {
225
227
  onClick: (h) => h.stopPropagation(),
226
228
  children: [/* @__PURE__ */ r(se, {
227
229
  label: i,
@@ -231,7 +233,7 @@ const Xe = T.createContext({}), br = ({
231
233
  size: 14,
232
234
  color: _("--lhds-color-blue-400")
233
235
  })
234
- }), /* @__PURE__ */ r(L, {})]
236
+ }), /* @__PURE__ */ r(B, {})]
235
237
  })]
236
238
  })]
237
239
  }), /* @__PURE__ */ r(E, {
@@ -248,9 +250,9 @@ const Xe = T.createContext({}), br = ({
248
250
  })
249
251
  }) : null
250
252
  }), !t && !u && /* @__PURE__ */ g(G, {
251
- children: [/* @__PURE__ */ r(L, {}), /* @__PURE__ */ r(oe, {
253
+ children: [/* @__PURE__ */ r(B, {}), /* @__PURE__ */ r(oe, {
252
254
  width: "14px"
253
- }), /* @__PURE__ */ r(L, {
255
+ }), /* @__PURE__ */ r(B, {
254
256
  num: 0.5
255
257
  })]
256
258
  })]
@@ -402,9 +404,9 @@ const Xe = T.createContext({}), br = ({
402
404
  realX: s,
403
405
  realY: c
404
406
  };
405
- }, He = (e, t, n) => Math.max(Math.min(e, n), t), kn = (e, t, n) => ({
406
- rowIndex: He(e.rowIndex, 0, t),
407
- colIndex: He(e.colIndex, 0, n)
407
+ }, $e = (e, t, n) => Math.max(Math.min(e, n), t), kn = (e, t, n) => ({
408
+ rowIndex: $e(e.rowIndex, 0, t),
409
+ colIndex: $e(e.colIndex, 0, n)
408
410
  }), Sn = (e, t, n) => {
409
411
  const o = bn(e.colIndex, e.rowIndex, n, t);
410
412
  return {
@@ -438,7 +440,7 @@ const Xe = T.createContext({}), br = ({
438
440
  throw new Error("numCols is required.");
439
441
  return e;
440
442
  }, nt = (e) => {
441
- const t = $(Xe);
443
+ const t = H(Xe);
442
444
  return v(
443
445
  () => Gn({
444
446
  ...t,
@@ -591,20 +593,20 @@ const Xe = T.createContext({}), br = ({
591
593
  numRows: p,
592
594
  warningOnEmpty: f
593
595
  }) {
594
- const m = _t(), C = Be(i.selectors.getState), h = Be(l.selectors.getState), w = C.entities[o], y = h.entities[o], b = I((H = "") => {
595
- m(H === n ? i.actions.clearEntity(o) : i.actions.setEntity({
596
+ const m = _t(), C = Be(i.selectors.getState), h = Be(l.selectors.getState), w = C.entities[o], y = h.entities[o], b = I(($ = "") => {
597
+ m($ === n ? i.actions.clearEntity(o) : i.actions.setEntity({
596
598
  id: o,
597
599
  originalValue: n,
598
- newValue: H,
600
+ newValue: $,
599
601
  modified: !0
600
602
  }));
601
603
  }, [m, o, i.actions, n]), {
602
604
  isEditing: S,
603
605
  stopEditing: x,
604
- editorValue: B,
605
- setEditorValue: k,
606
- stopEditingAndRevert: A,
607
- stopEditingAndMove: O,
606
+ editorValue: L,
607
+ setEditorValue: O,
608
+ stopEditingAndRevert: k,
609
+ stopEditingAndMove: P,
608
610
  lastKeyEvent: z,
609
611
  requiredProps: {
610
612
  onKeyDown: D,
@@ -619,11 +621,11 @@ const Xe = T.createContext({}), br = ({
619
621
  onChange: b,
620
622
  isEditable: s,
621
623
  allowedInputType: t
622
- }), M = I((H) => {
623
- H.key === "Delete" ? (m(i.actions.clearEntity(o)), m(l.actions.setEntityFields(o, {
624
+ }), M = I(($) => {
625
+ $.key === "Delete" ? (m(i.actions.clearEntity(o)), m(l.actions.setEntityFields(o, {
624
626
  hasError: !1,
625
627
  errorMessage: void 0
626
- }))) : D(H);
628
+ }))) : D($);
627
629
  }, [D, o, m, i.actions, l.actions]);
628
630
  return /* @__PURE__ */ g(E, {
629
631
  height: Se,
@@ -648,13 +650,13 @@ const Xe = T.createContext({}), br = ({
648
650
  row: !0,
649
651
  alignItems: "center",
650
652
  children: S ? /* @__PURE__ */ r(ge, {
651
- onValueChange: k,
652
- value: B,
653
+ onValueChange: O,
654
+ value: L,
653
655
  onDone: x,
654
- onEsc: A,
656
+ onEsc: k,
655
657
  autoFocus: !0,
656
658
  selectAllOnMount: !z,
657
- onMove: O
659
+ onMove: P
658
660
  }) : /* @__PURE__ */ g(G, {
659
661
  children: [/* @__PURE__ */ r(U, {
660
662
  color: s ? "var(--primary-action-color)" : void 0,
@@ -671,7 +673,7 @@ const Xe = T.createContext({}), br = ({
671
673
  variant: "bold",
672
674
  children: w.newValue
673
675
  })]
674
- }), y && be(y) && /* @__PURE__ */ r(L, {
676
+ }), y && be(y) && /* @__PURE__ */ r(B, {
675
677
  num: 2
676
678
  }), f && (w == null ? void 0 : w.modified) && (w == null ? void 0 : w.newValue) === "" ? /* @__PURE__ */ r(se, {
677
679
  label: f,
@@ -723,7 +725,7 @@ const Xe = T.createContext({}), br = ({
723
725
  expandedRows: s,
724
726
  fields: c
725
727
  });
726
- }, Re = () => $(st), R = () => $(it), Q = () => $(ct), ce = () => $(lt), dt = K([]), Z = () => $(
728
+ }, Re = () => H(st), R = () => H(it), Q = () => H(ct), ce = () => H(lt), dt = K([]), Z = () => H(
727
729
  dt
728
730
  ), ut = () => {
729
731
  const e = R(), t = Z();
@@ -732,7 +734,7 @@ const Xe = T.createContext({}), br = ({
732
734
  () => t.map((o) => o.groupConfig.columnOrder.length).reduce((o, s) => o + s, 0),
733
735
  [t]
734
736
  );
735
- }, 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({}), Ge = () => $(ft), wt = K(0), Te = () => $(wt), Ct = (e, t, n) => {
737
+ }, ht = K(void 0), Bn = () => H(ht), pt = K(void 0), Dn = () => H(pt), mt = K(void 0), Nn = K(!1), zn = () => H(mt), Kn = K("standard"), ft = K({}), Ge = () => H(ft), wt = K(0), Te = () => H(wt), Ct = (e, t, n) => {
736
738
  var o;
737
739
  return e ? Yt(
738
740
  (o = t == null ? void 0 : t.map((s) => {
@@ -769,11 +771,11 @@ const Xe = T.createContext({}), br = ({
769
771
  if (!n)
770
772
  throw new Error("No config for column with id=" + e);
771
773
  return n;
772
- }, Hn = () => {
774
+ }, $n = () => {
773
775
  var n, o, s;
774
776
  const e = R(), t = (s = (o = (n = Z()) == null ? void 0 : n[0]) == null ? void 0 : o.groupConfig.columnOrder) == null ? void 0 : s[0];
775
777
  return t ? e.columns[t] : void 0;
776
- }, $n = () => {
778
+ }, Hn = () => {
777
779
  var s;
778
780
  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;
779
781
  return o ? e.columns[o] : void 0;
@@ -801,27 +803,27 @@ const Xe = T.createContext({}), br = ({
801
803
  } = le(t), y = R(), {
802
804
  stickyHeader: b,
803
805
  headerRowOffsetTop: S
804
- } = y, x = "columnGroupOrder" in y ? y.stickyColumnGroups : void 0, B = Vn(o, w), k = c && (x === "first" || x === "both"), A = l && (x === "last" || x === "both"), O = k || A || b, z = k || A;
806
+ } = y, x = "columnGroupOrder" in y ? y.stickyColumnGroups : void 0, L = Vn(o, w), O = c && (x === "first" || x === "both"), k = l && (x === "last" || x === "both"), P = O || k || b, z = O || k;
805
807
  return /* @__PURE__ */ r("th", {
806
808
  colSpan: s,
807
809
  style: {
808
- position: O ? "sticky" : void 0,
810
+ position: P ? "sticky" : void 0,
809
811
  height: "var(--current-row-height)",
810
812
  width: m,
811
813
  minWidth: (D = C != null ? C : m) != null ? D : "20px",
812
- background: O ? "white" : "transparent",
813
- left: k ? "var(--current-left-offset)" : void 0,
814
- right: A ? "0px" : void 0,
814
+ background: P ? "white" : "transparent",
815
+ left: O ? "var(--current-left-offset)" : void 0,
816
+ right: k ? "0px" : void 0,
815
817
  top: b ? S != null ? S : "0px" : void 0,
816
- borderLeft: B,
818
+ borderLeft: L,
817
819
  zIndex: b && z ? "var(--swui-sticky-column-group-label-z-index)" : z ? "var(--swui-sticky-group-group-z-index)" : b ? h != null ? h : "var(--swui-sticky-header-column-group-z-index)" : h != null ? h : 1,
818
- boxShadow: k ? "var(--swui-sticky-column-shadow-right)" : A ? "var(--swui-sticky-column-shadow-left)" : void 0
820
+ boxShadow: O ? "var(--swui-sticky-column-shadow-right)" : k ? "var(--swui-sticky-column-shadow-left)" : void 0
819
821
  },
820
822
  children: /* @__PURE__ */ r(E, {
821
823
  alignItems: "center",
822
824
  children: /* @__PURE__ */ g(G, {
823
825
  children: [u && /* @__PURE__ */ g(G, {
824
- children: [/* @__PURE__ */ r(L, {}), u, /* @__PURE__ */ r(L, {
826
+ children: [/* @__PURE__ */ r(B, {}), u, /* @__PURE__ */ r(B, {
825
827
  num: 0.5
826
828
  })]
827
829
  }), d ? d(n) : /* @__PURE__ */ r(N, {
@@ -831,7 +833,7 @@ const Xe = T.createContext({}), br = ({
831
833
  children: i
832
834
  })
833
835
  }), a && /* @__PURE__ */ g(G, {
834
- children: [/* @__PURE__ */ r(L, {
836
+ children: [/* @__PURE__ */ r(B, {
835
837
  num: 0.5
836
838
  }), a]
837
839
  }), (f || p) && /* @__PURE__ */ r(N, {}), p ? /* @__PURE__ */ r(ye, {}) : f ? /* @__PURE__ */ r(se, {
@@ -929,10 +931,10 @@ const Xe = T.createContext({}), br = ({
929
931
  }, Fn = (e) => !e.disableGridCell, vt = K({
930
932
  columnIndexPerColumnId: {},
931
933
  numNavigableColumns: 0
932
- }), yt = () => $(
934
+ }), yt = () => H(
933
935
  vt
934
936
  ), Un = (e) => {
935
- "columnGroupOrder" in e && (Zn(e), (e.stickyColumnGroups === "first" || e.stickyColumnGroups === "both") && $e(e, 0), (e.stickyColumnGroups === "last" || e.stickyColumnGroups === "both") && $e(
937
+ "columnGroupOrder" in e && (Zn(e), (e.stickyColumnGroups === "first" || e.stickyColumnGroups === "both") && He(e, 0), (e.stickyColumnGroups === "last" || e.stickyColumnGroups === "both") && He(
936
938
  e,
937
939
  e.columnGroupOrder.length - 1
938
940
  ));
@@ -943,7 +945,7 @@ const Xe = T.createContext({}), br = ({
943
945
  "Columns can not be sticky when column groups are used. columnId: " + n
944
946
  );
945
947
  });
946
- }, $e = (e, t) => {
948
+ }, He = (e, t) => {
947
949
  var s;
948
950
  if (!e.columnGroupOrder || e.columnGroupOrder.length === 0)
949
951
  throw new Error(
@@ -1338,15 +1340,15 @@ const Xe = T.createContext({}), br = ({
1338
1340
  itemValueResolver: b,
1339
1341
  itemLabelFormatter: S,
1340
1342
  width: x,
1341
- minWidth: B,
1342
- justifyContentCell: k = "flex-start",
1343
- borderLeft: A,
1344
- renderCell: O,
1343
+ minWidth: L,
1344
+ justifyContentCell: O = "flex-start",
1345
+ borderLeft: k,
1346
+ renderCell: P,
1345
1347
  gridCellOptions: z,
1346
1348
  isEditable: D,
1347
1349
  onChange: j,
1348
1350
  onKeyDown: M,
1349
- disableGridCell: H,
1351
+ disableGridCell: $,
1350
1352
  disableGridCellFocus: J,
1351
1353
  zIndex: W
1352
1354
  } = le(t), q = v(() => b ? b(n) : t in n ? n[t] : "", [b, n, t]), ee = v(() => S ? S(q, n) : go(q), [q, S, n]), te = typeof D == "boolean" ? D : D ? D(n) : void 0, me = I((ae) => {
@@ -1367,7 +1369,7 @@ const Xe = T.createContext({}), br = ({
1367
1369
  onChange: j ? (ae) => j(n, ae) : void 0,
1368
1370
  ...a,
1369
1371
  ...z
1370
- }), P = h[t], ie = (Ae = xo(t, n)) != null ? Ae : "inherit", fe = P.sticky ? W != null ? W : "var(--swui-sticky-column-z-index)" : W != null ? W : 1, kt = v(() => O ? O({
1372
+ }), A = h[t], ie = (Ae = xo(t, n)) != null ? Ae : "inherit", fe = A.sticky ? W != null ? W : "var(--swui-sticky-column-z-index)" : W != null ? W : 1, kt = v(() => P ? P({
1371
1373
  label: ee,
1372
1374
  value: q,
1373
1375
  item: n,
@@ -1378,25 +1380,25 @@ const Xe = T.createContext({}), br = ({
1378
1380
  itemKey: w
1379
1381
  }) : /* @__PURE__ */ r(Go, {
1380
1382
  label: ee
1381
- }), [O, ee, q, n, X, te, y, fe, w]), St = Oe(l, i, A), It = 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;
1383
+ }), [P, ee, q, n, X, te, y, fe, w]), St = Oe(l, i, k), It = A.sticky && A.type === "last-group" && A.isFirstColumnInLastGroup || A.sticky && A.type === "column" && A.right ? "var(--swui-sticky-column-shadow-left)" : A.sticky ? "var(--swui-sticky-column-shadow-right)" : void 0;
1382
1384
  return /* @__PURE__ */ r("td", {
1383
1385
  style: {
1384
1386
  borderLeft: St,
1385
- position: P.sticky ? "sticky" : void 0,
1386
- left: P.sticky ? P.left : void 0,
1387
- right: P.sticky ? P.right : void 0,
1387
+ position: A.sticky ? "sticky" : void 0,
1388
+ left: A.sticky ? A.left : void 0,
1389
+ right: A.sticky ? A.right : void 0,
1388
1390
  boxShadow: It,
1389
1391
  zIndex: fe,
1390
1392
  height: "var(--current-row-height)",
1391
1393
  background: ie
1392
1394
  },
1393
1395
  children: /* @__PURE__ */ r(Io, {
1394
- enableGridCell: u && !H && !J,
1396
+ enableGridCell: u && !$ && !J,
1395
1397
  gridCellRequiredProps: X.requiredProps,
1396
1398
  isEditing: X.isEditing,
1397
1399
  width: x,
1398
- minWidth: B,
1399
- justifyContent: k,
1400
+ minWidth: L,
1401
+ justifyContent: O,
1400
1402
  onKeyDown: me,
1401
1403
  children: kt
1402
1404
  })
@@ -1468,12 +1470,12 @@ const Xe = T.createContext({}), br = ({
1468
1470
  isExpanded: S
1469
1471
  } = Pe(t), {
1470
1472
  isSelected: x,
1471
- toggleSelected: B,
1472
- shiftAndToggleSelected: k
1473
- } = Co(t, n), A = Bt(d, {
1473
+ toggleSelected: L,
1474
+ shiftAndToggleSelected: O
1475
+ } = Co(t, n), k = Bt(d, {
1474
1476
  rootMargin: "400px 0px 400px 0px",
1475
1477
  threshold: 0
1476
- }), O = v(() => C == null ? void 0 : C(t, x), [x, t, C]), z = Ao(O, x, S), D = Lo(O, x, S), j = Bo(O, x, D), M = v(() => h == null ? void 0 : h(t), [t, h]), H = Hn(), J = _e(H, t), W = $n(), q = _e(W, t), ee = v(() => /* @__PURE__ */ r(G, {
1478
+ }), P = v(() => C == null ? void 0 : C(t, x), [x, t, C]), z = Ao(P, x, S), D = Lo(P, x, S), j = Bo(P, x, D), M = v(() => h == null ? void 0 : h(t), [t, h]), $ = $n(), J = _e($, t), W = Hn(), q = _e(W, t), ee = v(() => /* @__PURE__ */ r(G, {
1477
1479
  children: /* @__PURE__ */ g(G, {
1478
1480
  children: [y && /* @__PURE__ */ r("td", {
1479
1481
  style: {
@@ -1519,8 +1521,8 @@ const Xe = T.createContext({}), br = ({
1519
1521
  children: /* @__PURE__ */ r(fo, {
1520
1522
  disabled: M,
1521
1523
  value: x,
1522
- onValueChange: B,
1523
- onValueChangeAndShift: k,
1524
+ onValueChange: L,
1525
+ onValueChangeAndShift: O,
1524
1526
  colIndex: c + (b ? 1 : 0),
1525
1527
  rowIndex: o,
1526
1528
  numRows: s,
@@ -1531,15 +1533,15 @@ const Xe = T.createContext({}), br = ({
1531
1533
  groupConfig: te,
1532
1534
  groupId: me
1533
1535
  }, X) => /* @__PURE__ */ r(T.Fragment, {
1534
- children: te.columnOrder.map((P, ie) => /* @__PURE__ */ r(To, {
1535
- columnId: P,
1536
+ children: te.columnOrder.map((A, ie) => /* @__PURE__ */ r(To, {
1537
+ columnId: A,
1536
1538
  item: t,
1537
- colIndex: c + f[P],
1539
+ colIndex: c + f[A],
1538
1540
  rowIndex: o,
1539
1541
  numRows: s,
1540
1542
  borderFromGroup: pe(X, ie, te.borderLeft),
1541
1543
  disableBorderLeft: X === 0 && ie === 0
1542
- }, P))
1544
+ }, A))
1543
1545
  }, me)), y && /* @__PURE__ */ r("td", {
1544
1546
  style: {
1545
1547
  background: q
@@ -1549,7 +1551,7 @@ const Xe = T.createContext({}), br = ({
1549
1551
  })
1550
1552
  }), /* @__PURE__ */ r("td", {})]
1551
1553
  })
1552
- }), [c, f, M, b, w, J, p, x, t, q, s, y, o, k, i, m, a, B]);
1554
+ }), [c, f, M, b, w, J, p, x, t, q, s, y, o, O, i, m, a, L]);
1553
1555
  return /* @__PURE__ */ g(G, {
1554
1556
  children: [/* @__PURE__ */ r(gt, {
1555
1557
  hoverBackground: D,
@@ -1557,7 +1559,7 @@ const Xe = T.createContext({}), br = ({
1557
1559
  focusBackground: j,
1558
1560
  borderLeft: S ? et : ke,
1559
1561
  ref: d,
1560
- children: A || l || S ? ee : /* @__PURE__ */ r("td", {
1562
+ children: k || l || S ? ee : /* @__PURE__ */ r("td", {
1561
1563
  colSpan: u,
1562
1564
  style: {
1563
1565
  height: "var(--current-row-height)"
@@ -1574,7 +1576,7 @@ const Xe = T.createContext({}), br = ({
1574
1576
  return n;
1575
1577
  }, Do = (e) => Object.values(e).some((t) => No(t)), No = (e) => Boolean(e.renderSummaryCell || e.summaryText), zo = "_summaryRow_12x8k_1", Ko = {
1576
1578
  summaryRow: zo
1577
- }, Ho = T.memo(function({
1579
+ }, $o = T.memo(function({
1578
1580
  columnId: t,
1579
1581
  items: n,
1580
1582
  disableBorderLeft: o,
@@ -1621,7 +1623,7 @@ const Xe = T.createContext({}), br = ({
1621
1623
  })
1622
1624
  })
1623
1625
  });
1624
- }), $o = (e, t) => {
1626
+ }), Ho = (e, t) => {
1625
1627
  const n = [];
1626
1628
  for (let o = 0; o < e.length; o++) {
1627
1629
  const { summaryCellColSpan: s } = t[e[o]], c = Math.min(
@@ -1652,10 +1654,10 @@ const Xe = T.createContext({}), br = ({
1652
1654
  groupConfig: i,
1653
1655
  groupId: d
1654
1656
  }, u) => /* @__PURE__ */ r(T.Fragment, {
1655
- children: $o(i.columnOrder, c).map(({
1657
+ children: Ho(i.columnOrder, c).map(({
1656
1658
  columnId: a,
1657
1659
  colSpan: p
1658
- }, f) => /* @__PURE__ */ r(Ho, {
1660
+ }, f) => /* @__PURE__ */ r($o, {
1659
1661
  colSpan: p,
1660
1662
  columnId: a,
1661
1663
  items: t,
@@ -1893,12 +1895,13 @@ const Xe = T.createContext({}), br = ({
1893
1895
  sortOrderIconVariant: w
1894
1896
  } = R(), y = Ge(), {
1895
1897
  arrow: b,
1896
- onClickColumnHead: S
1897
- } = Fo(t), x = typeof i == "string" ? i : bo(t), B = Oe(n, o, d), k = y[t];
1898
+ selected: S,
1899
+ onClickColumnHead: x
1900
+ } = Fo(t), L = typeof i == "string" ? i : bo(t), O = Oe(n, o, d), k = y[t];
1898
1901
  return /* @__PURE__ */ r("th", {
1899
1902
  style: {
1900
1903
  background: a != null ? a : "white",
1901
- borderLeft: B,
1904
+ borderLeft: O,
1902
1905
  position: s || k.sticky ? "sticky" : void 0,
1903
1906
  left: k.left,
1904
1907
  right: k.right,
@@ -1911,12 +1914,14 @@ const Xe = T.createContext({}), br = ({
1911
1914
  children: /* @__PURE__ */ r(Ee, {
1912
1915
  width: "inherit",
1913
1916
  minWidth: "inherit",
1914
- arrow: !h && x ? b : void 0,
1915
- onClick: h ? void 0 : S,
1916
- label: x,
1917
+ arrow: !h && L ? b : void 0,
1918
+ onClick: h ? void 0 : x,
1919
+ label: L,
1917
1920
  infoIconTooltipText: u,
1918
1921
  alignRight: l === "flex-end",
1919
- sortOrderIconVariant: f != null ? f : w
1922
+ sortOrderIconVariant: f != null ? f : w,
1923
+ selected: S,
1924
+ height: "var(--current-row-height)"
1920
1925
  })
1921
1926
  });
1922
1927
  }), Zo = (e, t, n, o) => {
@@ -2001,17 +2006,17 @@ const Xe = T.createContext({}), br = ({
2001
2006
  })
2002
2007
  })
2003
2008
  }), o.map(({
2004
- groupConfig: B,
2005
- groupId: k
2006
- }, A) => /* @__PURE__ */ r(T.Fragment, {
2007
- children: B.columnOrder.map((O, z) => /* @__PURE__ */ r(Uo, {
2008
- columnId: O,
2009
- borderFromGroup: pe(A, z, B.borderLeft),
2010
- disableBorderLeft: A === 0 && z === 0,
2009
+ groupConfig: L,
2010
+ groupId: O
2011
+ }, k) => /* @__PURE__ */ r(T.Fragment, {
2012
+ children: L.columnOrder.map((P, z) => /* @__PURE__ */ r(Uo, {
2013
+ columnId: P,
2014
+ borderFromGroup: pe(k, z, L.borderLeft),
2015
+ disableBorderLeft: k === 0 && z === 0,
2011
2016
  stickyHeader: a,
2012
2017
  top: x.top
2013
- }, O))
2014
- }, k)), i && /* @__PURE__ */ r("th", {
2018
+ }, P))
2019
+ }, O)), i && /* @__PURE__ */ r("th", {
2015
2020
  style: x,
2016
2021
  children: /* @__PURE__ */ r(E, {
2017
2022
  indent: i
@@ -2045,7 +2050,7 @@ const Xe = T.createContext({}), br = ({
2045
2050
  } = w, x = v(() => ({
2046
2051
  actions: b,
2047
2052
  dispatch: S
2048
- }), [b, S]), B = Boolean(s != null ? s : "columnGroupOrder" in n), k = "columnGroups" in n ? n.columnGroups : void 0, A = "columnGroupOrder" in n ? n.columnGroupOrder : void 0, O = "columnOrder" in n ? n.columnOrder : void 0, z = v(() => Ct(k, A, O), [k, A, O]), D = v(() => qn(n), [n]), j = v(() => so(n), [n]), M = v(() => eo(n), [n]), H = v(() => {
2053
+ }), [b, S]), L = Boolean(s != null ? s : "columnGroupOrder" in n), O = "columnGroups" in n ? n.columnGroups : void 0, k = "columnGroupOrder" in n ? n.columnGroupOrder : void 0, P = "columnOrder" in n ? n.columnOrder : void 0, z = v(() => Ct(O, k, P), [O, k, P]), D = v(() => qn(n), [n]), j = v(() => so(n), [n]), M = v(() => eo(n), [n]), $ = v(() => {
2049
2054
  try {
2050
2055
  Un(n);
2051
2056
  return;
@@ -2053,8 +2058,8 @@ const Xe = T.createContext({}), br = ({
2053
2058
  return J instanceof Error ? J : new Error("Unknown error");
2054
2059
  }
2055
2060
  }, [n]);
2056
- return H ? /* @__PURE__ */ r(Xt, {
2057
- text: H.message
2061
+ return $ ? /* @__PURE__ */ r(Xt, {
2062
+ text: $.message
2058
2063
  }) : /* @__PURE__ */ r("table", {
2059
2064
  className: Fe(Ve.standardTable, Ve[l]),
2060
2065
  style: {
@@ -2081,7 +2086,7 @@ const Xe = T.createContext({}), br = ({
2081
2086
  children: /* @__PURE__ */ r(vt.Provider, {
2082
2087
  value: D,
2083
2088
  children: /* @__PURE__ */ r(Nn.Provider, {
2084
- value: B,
2089
+ value: L,
2085
2090
  children: /* @__PURE__ */ g(mt.Provider, {
2086
2091
  value: "columnGroupOrder" in n ? s != null ? s : n.columnGroupOrder : s,
2087
2092
  children: [/* @__PURE__ */ r(lo, {}), /* @__PURE__ */ r(ht.Provider, {
@@ -2230,11 +2235,11 @@ export {
2230
2235
  le as useColumnConfigById,
2231
2236
  mo as useColumnValueResolver,
2232
2237
  fn as useEditableCell,
2233
- Hn as useFirstColumnConfig,
2238
+ $n as useFirstColumnConfig,
2234
2239
  he as useGridCell,
2235
2240
  Tn as useGridNavigation,
2236
2241
  nt as useGridNavigationOptionsFromContext,
2237
- $n as useLastColumnConfig,
2242
+ Hn as useLastColumnConfig,
2238
2243
  ro as useLocalStateTableContext,
2239
2244
  hn as useRevertableValue,
2240
2245
  Co as useRowCheckbox,