@dmsi/wedgekit-react 0.0.555 → 0.0.557

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.
Files changed (54) hide show
  1. package/dist/{chunk-MPYAHORM.js → chunk-BQAIQNYO.js} +1 -1
  2. package/dist/{chunk-HGLOO52X.js → chunk-BU5QGYOC.js} +2 -2
  3. package/dist/{chunk-ZDXJXDZT.js → chunk-CFFSOTWX.js} +1 -1
  4. package/dist/{chunk-GYQA4UIK.js → chunk-CJ7V4X6B.js} +1 -1
  5. package/dist/{chunk-DWICBU2V.js → chunk-DWKS5ZXG.js} +3 -3
  6. package/dist/{chunk-YWQEMS2C.js → chunk-GTJADN2C.js} +1 -1
  7. package/dist/{chunk-YD2JJ2VL.js → chunk-LI6F442Y.js} +3 -2
  8. package/dist/{chunk-WTT5VQPG.js → chunk-LKFYNRJZ.js} +17 -11
  9. package/dist/{chunk-Q3G6Z5DM.js → chunk-OX4JI2GK.js} +1 -1
  10. package/dist/{chunk-FIVKYEC3.js → chunk-YGAFYULX.js} +7 -7
  11. package/dist/components/CalendarRange.cjs +15 -8
  12. package/dist/components/CalendarRange.js +12 -12
  13. package/dist/components/CompactImagesPreview.js +2 -2
  14. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +15 -8
  15. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +12 -12
  16. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +15 -8
  17. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +12 -12
  18. package/dist/components/DataGrid/PinnedColumns.cjs +15 -8
  19. package/dist/components/DataGrid/PinnedColumns.js +12 -12
  20. package/dist/components/DataGrid/TableBody/LoadingCell.cjs +15 -8
  21. package/dist/components/DataGrid/TableBody/LoadingCell.js +12 -12
  22. package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +15 -8
  23. package/dist/components/DataGrid/TableBody/TableBodyRow.js +12 -12
  24. package/dist/components/DataGrid/TableBody/index.cjs +15 -8
  25. package/dist/components/DataGrid/TableBody/index.js +12 -12
  26. package/dist/components/DataGrid/index.cjs +15 -8
  27. package/dist/components/DataGrid/index.js +12 -12
  28. package/dist/components/DataGrid/utils.cjs +15 -8
  29. package/dist/components/DataGrid/utils.js +12 -12
  30. package/dist/components/DataGridCell.js +5 -5
  31. package/dist/components/DateInput.cjs +15 -8
  32. package/dist/components/DateInput.js +12 -12
  33. package/dist/components/DateRangeInput.cjs +15 -8
  34. package/dist/components/DateRangeInput.js +12 -12
  35. package/dist/components/Menu.js +3 -3
  36. package/dist/components/MenuOption.js +2 -2
  37. package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +15 -8
  38. package/dist/components/MobileDataGrid/ColumnSelector/index.js +12 -12
  39. package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +15 -8
  40. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +12 -12
  41. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +3 -3
  42. package/dist/components/MobileDataGrid/index.cjs +15 -8
  43. package/dist/components/MobileDataGrid/index.js +12 -12
  44. package/dist/components/Modal.js +2 -2
  45. package/dist/components/NestedMenu.js +2 -2
  46. package/dist/components/PDFViewer/index.js +2 -2
  47. package/dist/components/ProductImagePreview/index.js +4 -4
  48. package/dist/components/ProjectBar.js +1 -1
  49. package/dist/components/index.cjs +15 -8
  50. package/dist/components/index.js +12 -12
  51. package/dist/components/useMenuSystem.js +2 -2
  52. package/dist/hooks/index.cjs +3 -2
  53. package/dist/hooks/index.js +1 -1
  54. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useMatchesMobile
3
- } from "./chunk-YD2JJ2VL.js";
3
+ } from "./chunk-LI6F442Y.js";
4
4
  import {
5
5
  __spreadValues
6
6
  } from "./chunk-ORMEWXMH.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  useMenuPosition
3
- } from "./chunk-MPYAHORM.js";
3
+ } from "./chunk-BQAIQNYO.js";
4
4
  import {
5
5
  useMatchesMobile
6
- } from "./chunk-YD2JJ2VL.js";
6
+ } from "./chunk-LI6F442Y.js";
7
7
  import {
8
8
  findDocumentRoot
9
9
  } from "./chunk-VXWSAIB5.js";
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-AG43RS4Q.js";
16
16
  import {
17
17
  useMatchesMobile
18
- } from "./chunk-YD2JJ2VL.js";
18
+ } from "./chunk-LI6F442Y.js";
19
19
  import {
20
20
  findDocumentRoot
21
21
  } from "./chunk-VXWSAIB5.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-5IFPG6TS.js";
7
7
  import {
8
8
  Modal
9
- } from "./chunk-ZDXJXDZT.js";
9
+ } from "./chunk-CFFSOTWX.js";
10
10
  import {
11
11
  Heading2
12
12
  } from "./chunk-MXSJF6TW.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  Menu
3
- } from "./chunk-HGLOO52X.js";
3
+ } from "./chunk-BU5QGYOC.js";
4
4
  import {
5
5
  useSubMenuSystem
6
- } from "./chunk-MPYAHORM.js";
6
+ } from "./chunk-BQAIQNYO.js";
7
7
  import {
8
8
  MenuOption
9
- } from "./chunk-YWQEMS2C.js";
9
+ } from "./chunk-GTJADN2C.js";
10
10
  import {
11
11
  Search
12
12
  } from "./chunk-BKBJOF4J.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-HXGJVYGQ.js";
4
4
  import {
5
5
  useMatchesMobile
6
- } from "./chunk-YD2JJ2VL.js";
6
+ } from "./chunk-LI6F442Y.js";
7
7
  import {
8
8
  Caption
9
9
  } from "./chunk-PS6UJZVH.js";
@@ -85,7 +85,7 @@ import {
85
85
  } from "react";
86
86
  var LocalStoragePrefix = `${LocalStoragePrefixVersion}-tableLayout`;
87
87
  var getLocalStorageKeyWithPrefix = (key) => `${LocalStoragePrefix}__${key}`;
88
- function useTableLayout(initialColumns, key) {
88
+ function useTableLayout(initialColumns, key, autosync = true) {
89
89
  const [columns, setColumns] = useState2(initialColumns);
90
90
  const [isReady, setIsReady] = useState2(false);
91
91
  const renderCountRef = useRef(0);
@@ -106,6 +106,7 @@ function useTableLayout(initialColumns, key) {
106
106
  [isReady, key]
107
107
  );
108
108
  useEffect3(() => {
109
+ if (!autosync) return;
109
110
  if (!key) return setIsReady(true);
110
111
  if (renderCountRef.current > 1) {
111
112
  throw new Error(
@@ -132,7 +133,7 @@ function useTableLayout(initialColumns, key) {
132
133
  return () => {
133
134
  renderCountRef.current = 0;
134
135
  };
135
- }, [handleSaveLayout, initialColumns, key]);
136
+ }, [handleSaveLayout, initialColumns, key, autosync]);
136
137
  const getSavedLayout = useCallback(() => {
137
138
  const savedLayout = localStorage.getItem(
138
139
  getLocalStorageKeyWithPrefix(`${key}-tableLayout`)
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  RowDetailModalProvider
3
- } from "./chunk-GYQA4UIK.js";
3
+ } from "./chunk-CJ7V4X6B.js";
4
4
  import {
5
5
  GridContextProvider
6
6
  } from "./chunk-M7INAUAJ.js";
@@ -24,13 +24,13 @@ import {
24
24
  DataGridCell,
25
25
  DragAlongCell,
26
26
  DraggableCellHeader
27
- } from "./chunk-DWICBU2V.js";
27
+ } from "./chunk-DWKS5ZXG.js";
28
28
  import {
29
29
  Menu
30
- } from "./chunk-HGLOO52X.js";
30
+ } from "./chunk-BU5QGYOC.js";
31
31
  import {
32
32
  MenuOption
33
- } from "./chunk-YWQEMS2C.js";
33
+ } from "./chunk-GTJADN2C.js";
34
34
  import {
35
35
  Search
36
36
  } from "./chunk-BKBJOF4J.js";
@@ -47,7 +47,7 @@ import {
47
47
  import {
48
48
  useInfiniteScroll,
49
49
  useTableLayout
50
- } from "./chunk-YD2JJ2VL.js";
50
+ } from "./chunk-LI6F442Y.js";
51
51
  import {
52
52
  findDocumentRoot
53
53
  } from "./chunk-VXWSAIB5.js";
@@ -577,12 +577,14 @@ function PinnedColumns(_a) {
577
577
  className: "flex w-full",
578
578
  children: [
579
579
  headerGroup.headers.map((header) => {
580
- var _a3, _b2, _c;
580
+ var _a3, _b2, _c, _d, _e, _f;
581
581
  if (!header) {
582
582
  return;
583
583
  }
584
+ const cellValue = (_a3 = table.getRowModel().rows[0]) == null ? void 0 : _a3.getValue(header.column.id);
585
+ const cellAlignment = (_c = (_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.align) != null ? _c : typeof cellValue === "number" ? "right" : "left";
584
586
  if (typeof header.column.columnDef.header === "string") {
585
- const customHeaderWidth = (_a3 = header.column.columnDef.meta) == null ? void 0 : _a3.headerWidth;
587
+ const customHeaderWidth = (_d = header.column.columnDef.meta) == null ? void 0 : _d.headerWidth;
586
588
  return /* @__PURE__ */ jsxs4(
587
589
  DataCellHeader,
588
590
  {
@@ -593,14 +595,18 @@ function PinnedColumns(_a) {
593
595
  width: customHeaderWidth,
594
596
  className: clsx3(
595
597
  header.column.getCanSort() ? "cursor-pointer" : "cursor-grab",
596
- "group"
598
+ "group",
599
+ {
600
+ "justify-start": cellAlignment === "left",
601
+ "justify-end": cellAlignment === "right"
602
+ }
597
603
  ),
598
604
  children: [
599
605
  /* @__PURE__ */ jsx6(Subheader, { tall: true, children: header.column.columnDef.header }),
600
606
  getSortIcon(header.column.getIsSorted()),
601
607
  !header.column.getIsSorted() && header.column.getCanSort() && getSortIcon(header.column.getNextSortingOrder(), true),
602
608
  header.column.getSortIndex() !== -1 && table.getState().sorting.length > 1 && /* @__PURE__ */ jsx6(Subheader, { tall: true, children: header.column.getSortIndex() + 1 }),
603
- !((_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.locked) && /* @__PURE__ */ jsx6(
609
+ !((_e = header.column.columnDef.meta) == null ? void 0 : _e.locked) && /* @__PURE__ */ jsx6(
604
610
  "div",
605
611
  {
606
612
  onDoubleClick: (e) => {
@@ -623,7 +629,7 @@ function PinnedColumns(_a) {
623
629
  header.id
624
630
  );
625
631
  }
626
- return /* @__PURE__ */ jsx6(React2.Fragment, { children: ((_c = header.column.columnDef.meta) == null ? void 0 : _c.checkbox) ? /* @__PURE__ */ jsx6(DataGridCell, { type: "header", component: "checkbox", locked: true, children: /* @__PURE__ */ jsx6(
632
+ return /* @__PURE__ */ jsx6(React2.Fragment, { children: ((_f = header.column.columnDef.meta) == null ? void 0 : _f.checkbox) ? /* @__PURE__ */ jsx6(DataGridCell, { type: "header", component: "checkbox", locked: true, children: /* @__PURE__ */ jsx6(
627
633
  Checkbox,
628
634
  {
629
635
  checked: allSelectedAcrossPages,
@@ -658,7 +664,7 @@ function PinnedColumns(_a) {
658
664
  testid: pinnedTestId
659
665
  }, props), {
660
666
  table,
661
- locked: !enableColumnSelector,
667
+ locked: !enableColumnSelector || pinDirection === "right",
662
668
  pinDirection
663
669
  })
664
670
  )
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useMatchesMobile
3
- } from "./chunk-YD2JJ2VL.js";
3
+ } from "./chunk-LI6F442Y.js";
4
4
  import {
5
5
  Stack
6
6
  } from "./chunk-MTGNBARV.js";
@@ -1,3 +1,9 @@
1
+ import {
2
+ CarouselPagination
3
+ } from "./chunk-MBZ55T2D.js";
4
+ import {
5
+ MobileImageCarousel
6
+ } from "./chunk-2IKT6IHB.js";
1
7
  import {
2
8
  ProductPrimaryImage
3
9
  } from "./chunk-YCDDBSVU.js";
@@ -7,18 +13,12 @@ import {
7
13
  import {
8
14
  ZoomWindow
9
15
  } from "./chunk-BQNPOGD5.js";
10
- import {
11
- CarouselPagination
12
- } from "./chunk-MBZ55T2D.js";
13
- import {
14
- MobileImageCarousel
15
- } from "./chunk-2IKT6IHB.js";
16
16
  import {
17
17
  Grid
18
18
  } from "./chunk-BWPNXY7T.js";
19
19
  import {
20
20
  useMatchesMobile
21
- } from "./chunk-YD2JJ2VL.js";
21
+ } from "./chunk-LI6F442Y.js";
22
22
  import {
23
23
  Stack
24
24
  } from "./chunk-MTGNBARV.js";
@@ -638,7 +638,7 @@ function findDocumentRoot(element) {
638
638
  var import_react5 = require("react");
639
639
  var LocalStoragePrefix = `${LocalStoragePrefixVersion}-tableLayout`;
640
640
  var getLocalStorageKeyWithPrefix = (key) => `${LocalStoragePrefix}__${key}`;
641
- function useTableLayout(initialColumns, key) {
641
+ function useTableLayout(initialColumns, key, autosync = true) {
642
642
  const [columns, setColumns] = (0, import_react5.useState)(initialColumns);
643
643
  const [isReady, setIsReady] = (0, import_react5.useState)(false);
644
644
  const renderCountRef = (0, import_react5.useRef)(0);
@@ -659,6 +659,7 @@ function useTableLayout(initialColumns, key) {
659
659
  [isReady, key]
660
660
  );
661
661
  (0, import_react5.useEffect)(() => {
662
+ if (!autosync) return;
662
663
  if (!key) return setIsReady(true);
663
664
  if (renderCountRef.current > 1) {
664
665
  throw new Error(
@@ -685,7 +686,7 @@ function useTableLayout(initialColumns, key) {
685
686
  return () => {
686
687
  renderCountRef.current = 0;
687
688
  };
688
- }, [handleSaveLayout, initialColumns, key]);
689
+ }, [handleSaveLayout, initialColumns, key, autosync]);
689
690
  const getSavedLayout = (0, import_react5.useCallback)(() => {
690
691
  const savedLayout = localStorage.getItem(
691
692
  getLocalStorageKeyWithPrefix(`${key}-tableLayout`)
@@ -3126,12 +3127,14 @@ function PinnedColumns(_a) {
3126
3127
  className: "flex w-full",
3127
3128
  children: [
3128
3129
  headerGroup.headers.map((header) => {
3129
- var _a3, _b2, _c;
3130
+ var _a3, _b2, _c, _d, _e, _f;
3130
3131
  if (!header) {
3131
3132
  return;
3132
3133
  }
3134
+ const cellValue = (_a3 = table.getRowModel().rows[0]) == null ? void 0 : _a3.getValue(header.column.id);
3135
+ const cellAlignment = (_c = (_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.align) != null ? _c : typeof cellValue === "number" ? "right" : "left";
3133
3136
  if (typeof header.column.columnDef.header === "string") {
3134
- const customHeaderWidth = (_a3 = header.column.columnDef.meta) == null ? void 0 : _a3.headerWidth;
3137
+ const customHeaderWidth = (_d = header.column.columnDef.meta) == null ? void 0 : _d.headerWidth;
3135
3138
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
3136
3139
  DataCellHeader,
3137
3140
  {
@@ -3142,14 +3145,18 @@ function PinnedColumns(_a) {
3142
3145
  width: customHeaderWidth,
3143
3146
  className: (0, import_clsx13.default)(
3144
3147
  header.column.getCanSort() ? "cursor-pointer" : "cursor-grab",
3145
- "group"
3148
+ "group",
3149
+ {
3150
+ "justify-start": cellAlignment === "left",
3151
+ "justify-end": cellAlignment === "right"
3152
+ }
3146
3153
  ),
3147
3154
  children: [
3148
3155
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Subheader, { tall: true, children: header.column.columnDef.header }),
3149
3156
  getSortIcon(header.column.getIsSorted()),
3150
3157
  !header.column.getIsSorted() && header.column.getCanSort() && getSortIcon(header.column.getNextSortingOrder(), true),
3151
3158
  header.column.getSortIndex() !== -1 && table.getState().sorting.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Subheader, { tall: true, children: header.column.getSortIndex() + 1 }),
3152
- !((_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.locked) && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3159
+ !((_e = header.column.columnDef.meta) == null ? void 0 : _e.locked) && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3153
3160
  "div",
3154
3161
  {
3155
3162
  onDoubleClick: (e) => {
@@ -3172,7 +3179,7 @@ function PinnedColumns(_a) {
3172
3179
  header.id
3173
3180
  );
3174
3181
  }
3175
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react15.default.Fragment, { children: ((_c = header.column.columnDef.meta) == null ? void 0 : _c.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DataGridCell, { type: "header", component: "checkbox", locked: true, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3182
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react15.default.Fragment, { children: ((_f = header.column.columnDef.meta) == null ? void 0 : _f.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DataGridCell, { type: "header", component: "checkbox", locked: true, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3176
3183
  Checkbox,
3177
3184
  {
3178
3185
  checked: allSelectedAcrossPages,
@@ -3207,7 +3214,7 @@ function PinnedColumns(_a) {
3207
3214
  testid: pinnedTestId
3208
3215
  }, props), {
3209
3216
  table,
3210
- locked: !enableColumnSelector,
3217
+ locked: !enableColumnSelector || pinDirection === "right",
3211
3218
  pinDirection
3212
3219
  })
3213
3220
  )
@@ -2,17 +2,17 @@ import {
2
2
  CalendarRange,
3
3
  CalendarRange_default,
4
4
  isWeekend
5
- } from "../chunk-WTT5VQPG.js";
6
- import "../chunk-GYQA4UIK.js";
5
+ } from "../chunk-LKFYNRJZ.js";
6
+ import "../chunk-CJ7V4X6B.js";
7
7
  import "../chunk-M7INAUAJ.js";
8
8
  import "../chunk-7ZCXZDJD.js";
9
- import "../chunk-FIVKYEC3.js";
9
+ import "../chunk-YGAFYULX.js";
10
+ import "../chunk-MBZ55T2D.js";
11
+ import "../chunk-2IKT6IHB.js";
10
12
  import "../chunk-YCDDBSVU.js";
11
13
  import "../chunk-3X3Y4TMS.js";
12
14
  import "../chunk-BQNPOGD5.js";
13
15
  import "../chunk-Y5GD2FJA.js";
14
- import "../chunk-MBZ55T2D.js";
15
- import "../chunk-2IKT6IHB.js";
16
16
  import "../chunk-RZ5EIDX4.js";
17
17
  import "../chunk-AGHBLWDZ.js";
18
18
  import "../chunk-5IFPG6TS.js";
@@ -26,7 +26,7 @@ import "../chunk-L3BXRDLP.js";
26
26
  import "../chunk-34VEVX5H.js";
27
27
  import "../chunk-LB7UT6F3.js";
28
28
  import "../chunk-MDB26F6T.js";
29
- import "../chunk-ZDXJXDZT.js";
29
+ import "../chunk-CFFSOTWX.js";
30
30
  import "../chunk-4RJKB7LC.js";
31
31
  import "../chunk-KV7LAH3T.js";
32
32
  import "../chunk-WVVEOCEH.js";
@@ -36,17 +36,17 @@ import "../chunk-QVWYTQKL.js";
36
36
  import "../chunk-UAMI54FE.js";
37
37
  import "../chunk-75USUR3I.js";
38
38
  import "../chunk-BWPNXY7T.js";
39
- import "../chunk-DWICBU2V.js";
40
- import "../chunk-HGLOO52X.js";
41
- import "../chunk-MPYAHORM.js";
42
- import "../chunk-YWQEMS2C.js";
39
+ import "../chunk-DWKS5ZXG.js";
40
+ import "../chunk-BU5QGYOC.js";
41
+ import "../chunk-BQAIQNYO.js";
42
+ import "../chunk-GTJADN2C.js";
43
43
  import "../chunk-BKBJOF4J.js";
44
44
  import "../chunk-NWTVBVBC.js";
45
45
  import "../chunk-HXGJVYGQ.js";
46
46
  import "../chunk-WVUIIBRR.js";
47
47
  import "../chunk-M7WHWZ2J.js";
48
- import "../chunk-Q3G6Z5DM.js";
49
- import "../chunk-YD2JJ2VL.js";
48
+ import "../chunk-OX4JI2GK.js";
49
+ import "../chunk-LI6F442Y.js";
50
50
  import "../chunk-VXWSAIB5.js";
51
51
  import "../chunk-DQRQZE6O.js";
52
52
  import "../chunk-5UH6QUFB.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CompactImagesPreview
3
- } from "../chunk-Q3G6Z5DM.js";
4
- import "../chunk-YD2JJ2VL.js";
3
+ } from "../chunk-OX4JI2GK.js";
4
+ import "../chunk-LI6F442Y.js";
5
5
  import "../chunk-VXWSAIB5.js";
6
6
  import "../chunk-DQRQZE6O.js";
7
7
  import "../chunk-5UH6QUFB.js";
@@ -632,7 +632,7 @@ function findDocumentRoot(element) {
632
632
  var import_react5 = require("react");
633
633
  var LocalStoragePrefix = `${LocalStoragePrefixVersion}-tableLayout`;
634
634
  var getLocalStorageKeyWithPrefix = (key) => `${LocalStoragePrefix}__${key}`;
635
- function useTableLayout(initialColumns, key) {
635
+ function useTableLayout(initialColumns, key, autosync = true) {
636
636
  const [columns, setColumns] = (0, import_react5.useState)(initialColumns);
637
637
  const [isReady, setIsReady] = (0, import_react5.useState)(false);
638
638
  const renderCountRef = (0, import_react5.useRef)(0);
@@ -653,6 +653,7 @@ function useTableLayout(initialColumns, key) {
653
653
  [isReady, key]
654
654
  );
655
655
  (0, import_react5.useEffect)(() => {
656
+ if (!autosync) return;
656
657
  if (!key) return setIsReady(true);
657
658
  if (renderCountRef.current > 1) {
658
659
  throw new Error(
@@ -679,7 +680,7 @@ function useTableLayout(initialColumns, key) {
679
680
  return () => {
680
681
  renderCountRef.current = 0;
681
682
  };
682
- }, [handleSaveLayout, initialColumns, key]);
683
+ }, [handleSaveLayout, initialColumns, key, autosync]);
683
684
  const getSavedLayout = (0, import_react5.useCallback)(() => {
684
685
  const savedLayout = localStorage.getItem(
685
686
  getLocalStorageKeyWithPrefix(`${key}-tableLayout`)
@@ -3092,12 +3093,14 @@ function PinnedColumns(_a) {
3092
3093
  className: "flex w-full",
3093
3094
  children: [
3094
3095
  headerGroup.headers.map((header) => {
3095
- var _a3, _b2, _c;
3096
+ var _a3, _b2, _c, _d, _e, _f;
3096
3097
  if (!header) {
3097
3098
  return;
3098
3099
  }
3100
+ const cellValue = (_a3 = table.getRowModel().rows[0]) == null ? void 0 : _a3.getValue(header.column.id);
3101
+ const cellAlignment = (_c = (_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.align) != null ? _c : typeof cellValue === "number" ? "right" : "left";
3099
3102
  if (typeof header.column.columnDef.header === "string") {
3100
- const customHeaderWidth = (_a3 = header.column.columnDef.meta) == null ? void 0 : _a3.headerWidth;
3103
+ const customHeaderWidth = (_d = header.column.columnDef.meta) == null ? void 0 : _d.headerWidth;
3101
3104
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
3102
3105
  DataCellHeader,
3103
3106
  {
@@ -3108,14 +3111,18 @@ function PinnedColumns(_a) {
3108
3111
  width: customHeaderWidth,
3109
3112
  className: (0, import_clsx13.default)(
3110
3113
  header.column.getCanSort() ? "cursor-pointer" : "cursor-grab",
3111
- "group"
3114
+ "group",
3115
+ {
3116
+ "justify-start": cellAlignment === "left",
3117
+ "justify-end": cellAlignment === "right"
3118
+ }
3112
3119
  ),
3113
3120
  children: [
3114
3121
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Subheader, { tall: true, children: header.column.columnDef.header }),
3115
3122
  getSortIcon(header.column.getIsSorted()),
3116
3123
  !header.column.getIsSorted() && header.column.getCanSort() && getSortIcon(header.column.getNextSortingOrder(), true),
3117
3124
  header.column.getSortIndex() !== -1 && table.getState().sorting.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Subheader, { tall: true, children: header.column.getSortIndex() + 1 }),
3118
- !((_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.locked) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3125
+ !((_e = header.column.columnDef.meta) == null ? void 0 : _e.locked) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3119
3126
  "div",
3120
3127
  {
3121
3128
  onDoubleClick: (e) => {
@@ -3138,7 +3145,7 @@ function PinnedColumns(_a) {
3138
3145
  header.id
3139
3146
  );
3140
3147
  }
3141
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react14.default.Fragment, { children: ((_c = header.column.columnDef.meta) == null ? void 0 : _c.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DataGridCell, { type: "header", component: "checkbox", locked: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3148
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react14.default.Fragment, { children: ((_f = header.column.columnDef.meta) == null ? void 0 : _f.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DataGridCell, { type: "header", component: "checkbox", locked: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3142
3149
  Checkbox,
3143
3150
  {
3144
3151
  checked: allSelectedAcrossPages,
@@ -3173,7 +3180,7 @@ function PinnedColumns(_a) {
3173
3180
  testid: pinnedTestId
3174
3181
  }, props), {
3175
3182
  table,
3176
- locked: !enableColumnSelector,
3183
+ locked: !enableColumnSelector || pinDirection === "right",
3177
3184
  pinDirection
3178
3185
  })
3179
3186
  )
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  ColumnSelectorMenuOption
3
- } from "../../../chunk-WTT5VQPG.js";
4
- import "../../../chunk-GYQA4UIK.js";
3
+ } from "../../../chunk-LKFYNRJZ.js";
4
+ import "../../../chunk-CJ7V4X6B.js";
5
5
  import "../../../chunk-M7INAUAJ.js";
6
6
  import "../../../chunk-7ZCXZDJD.js";
7
- import "../../../chunk-FIVKYEC3.js";
7
+ import "../../../chunk-YGAFYULX.js";
8
+ import "../../../chunk-MBZ55T2D.js";
9
+ import "../../../chunk-2IKT6IHB.js";
8
10
  import "../../../chunk-YCDDBSVU.js";
9
11
  import "../../../chunk-3X3Y4TMS.js";
10
12
  import "../../../chunk-BQNPOGD5.js";
11
13
  import "../../../chunk-Y5GD2FJA.js";
12
- import "../../../chunk-MBZ55T2D.js";
13
- import "../../../chunk-2IKT6IHB.js";
14
14
  import "../../../chunk-RZ5EIDX4.js";
15
15
  import "../../../chunk-AGHBLWDZ.js";
16
16
  import "../../../chunk-5IFPG6TS.js";
@@ -24,7 +24,7 @@ import "../../../chunk-L3BXRDLP.js";
24
24
  import "../../../chunk-34VEVX5H.js";
25
25
  import "../../../chunk-LB7UT6F3.js";
26
26
  import "../../../chunk-MDB26F6T.js";
27
- import "../../../chunk-ZDXJXDZT.js";
27
+ import "../../../chunk-CFFSOTWX.js";
28
28
  import "../../../chunk-4RJKB7LC.js";
29
29
  import "../../../chunk-KV7LAH3T.js";
30
30
  import "../../../chunk-WVVEOCEH.js";
@@ -34,17 +34,17 @@ import "../../../chunk-QVWYTQKL.js";
34
34
  import "../../../chunk-UAMI54FE.js";
35
35
  import "../../../chunk-75USUR3I.js";
36
36
  import "../../../chunk-BWPNXY7T.js";
37
- import "../../../chunk-DWICBU2V.js";
38
- import "../../../chunk-HGLOO52X.js";
39
- import "../../../chunk-MPYAHORM.js";
40
- import "../../../chunk-YWQEMS2C.js";
37
+ import "../../../chunk-DWKS5ZXG.js";
38
+ import "../../../chunk-BU5QGYOC.js";
39
+ import "../../../chunk-BQAIQNYO.js";
40
+ import "../../../chunk-GTJADN2C.js";
41
41
  import "../../../chunk-BKBJOF4J.js";
42
42
  import "../../../chunk-NWTVBVBC.js";
43
43
  import "../../../chunk-HXGJVYGQ.js";
44
44
  import "../../../chunk-WVUIIBRR.js";
45
45
  import "../../../chunk-M7WHWZ2J.js";
46
- import "../../../chunk-Q3G6Z5DM.js";
47
- import "../../../chunk-YD2JJ2VL.js";
46
+ import "../../../chunk-OX4JI2GK.js";
47
+ import "../../../chunk-LI6F442Y.js";
48
48
  import "../../../chunk-VXWSAIB5.js";
49
49
  import "../../../chunk-DQRQZE6O.js";
50
50
  import "../../../chunk-5UH6QUFB.js";
@@ -632,7 +632,7 @@ function findDocumentRoot(element) {
632
632
  var import_react5 = require("react");
633
633
  var LocalStoragePrefix = `${LocalStoragePrefixVersion}-tableLayout`;
634
634
  var getLocalStorageKeyWithPrefix = (key) => `${LocalStoragePrefix}__${key}`;
635
- function useTableLayout(initialColumns, key) {
635
+ function useTableLayout(initialColumns, key, autosync = true) {
636
636
  const [columns, setColumns] = (0, import_react5.useState)(initialColumns);
637
637
  const [isReady, setIsReady] = (0, import_react5.useState)(false);
638
638
  const renderCountRef = (0, import_react5.useRef)(0);
@@ -653,6 +653,7 @@ function useTableLayout(initialColumns, key) {
653
653
  [isReady, key]
654
654
  );
655
655
  (0, import_react5.useEffect)(() => {
656
+ if (!autosync) return;
656
657
  if (!key) return setIsReady(true);
657
658
  if (renderCountRef.current > 1) {
658
659
  throw new Error(
@@ -679,7 +680,7 @@ function useTableLayout(initialColumns, key) {
679
680
  return () => {
680
681
  renderCountRef.current = 0;
681
682
  };
682
- }, [handleSaveLayout, initialColumns, key]);
683
+ }, [handleSaveLayout, initialColumns, key, autosync]);
683
684
  const getSavedLayout = (0, import_react5.useCallback)(() => {
684
685
  const savedLayout = localStorage.getItem(
685
686
  getLocalStorageKeyWithPrefix(`${key}-tableLayout`)
@@ -3014,12 +3015,14 @@ function PinnedColumns(_a) {
3014
3015
  className: "flex w-full",
3015
3016
  children: [
3016
3017
  headerGroup.headers.map((header) => {
3017
- var _a3, _b2, _c;
3018
+ var _a3, _b2, _c, _d, _e, _f;
3018
3019
  if (!header) {
3019
3020
  return;
3020
3021
  }
3022
+ const cellValue = (_a3 = table.getRowModel().rows[0]) == null ? void 0 : _a3.getValue(header.column.id);
3023
+ const cellAlignment = (_c = (_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.align) != null ? _c : typeof cellValue === "number" ? "right" : "left";
3021
3024
  if (typeof header.column.columnDef.header === "string") {
3022
- const customHeaderWidth = (_a3 = header.column.columnDef.meta) == null ? void 0 : _a3.headerWidth;
3025
+ const customHeaderWidth = (_d = header.column.columnDef.meta) == null ? void 0 : _d.headerWidth;
3023
3026
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
3024
3027
  DataCellHeader,
3025
3028
  {
@@ -3030,14 +3033,18 @@ function PinnedColumns(_a) {
3030
3033
  width: customHeaderWidth,
3031
3034
  className: (0, import_clsx13.default)(
3032
3035
  header.column.getCanSort() ? "cursor-pointer" : "cursor-grab",
3033
- "group"
3036
+ "group",
3037
+ {
3038
+ "justify-start": cellAlignment === "left",
3039
+ "justify-end": cellAlignment === "right"
3040
+ }
3034
3041
  ),
3035
3042
  children: [
3036
3043
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Subheader, { tall: true, children: header.column.columnDef.header }),
3037
3044
  getSortIcon(header.column.getIsSorted()),
3038
3045
  !header.column.getIsSorted() && header.column.getCanSort() && getSortIcon(header.column.getNextSortingOrder(), true),
3039
3046
  header.column.getSortIndex() !== -1 && table.getState().sorting.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Subheader, { tall: true, children: header.column.getSortIndex() + 1 }),
3040
- !((_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.locked) && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
3047
+ !((_e = header.column.columnDef.meta) == null ? void 0 : _e.locked) && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
3041
3048
  "div",
3042
3049
  {
3043
3050
  onDoubleClick: (e) => {
@@ -3060,7 +3067,7 @@ function PinnedColumns(_a) {
3060
3067
  header.id
3061
3068
  );
3062
3069
  }
3063
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react13.default.Fragment, { children: ((_c = header.column.columnDef.meta) == null ? void 0 : _c.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DataGridCell, { type: "header", component: "checkbox", locked: true, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
3070
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react13.default.Fragment, { children: ((_f = header.column.columnDef.meta) == null ? void 0 : _f.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DataGridCell, { type: "header", component: "checkbox", locked: true, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
3064
3071
  Checkbox,
3065
3072
  {
3066
3073
  checked: allSelectedAcrossPages,
@@ -3095,7 +3102,7 @@ function PinnedColumns(_a) {
3095
3102
  testid: pinnedTestId
3096
3103
  }, props), {
3097
3104
  table,
3098
- locked: !enableColumnSelector,
3105
+ locked: !enableColumnSelector || pinDirection === "right",
3099
3106
  pinDirection
3100
3107
  })
3101
3108
  )
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  ColumnSelectorHeaderCell
3
- } from "../../../chunk-WTT5VQPG.js";
4
- import "../../../chunk-GYQA4UIK.js";
3
+ } from "../../../chunk-LKFYNRJZ.js";
4
+ import "../../../chunk-CJ7V4X6B.js";
5
5
  import "../../../chunk-M7INAUAJ.js";
6
6
  import "../../../chunk-7ZCXZDJD.js";
7
- import "../../../chunk-FIVKYEC3.js";
7
+ import "../../../chunk-YGAFYULX.js";
8
+ import "../../../chunk-MBZ55T2D.js";
9
+ import "../../../chunk-2IKT6IHB.js";
8
10
  import "../../../chunk-YCDDBSVU.js";
9
11
  import "../../../chunk-3X3Y4TMS.js";
10
12
  import "../../../chunk-BQNPOGD5.js";
11
13
  import "../../../chunk-Y5GD2FJA.js";
12
- import "../../../chunk-MBZ55T2D.js";
13
- import "../../../chunk-2IKT6IHB.js";
14
14
  import "../../../chunk-RZ5EIDX4.js";
15
15
  import "../../../chunk-AGHBLWDZ.js";
16
16
  import "../../../chunk-5IFPG6TS.js";
@@ -24,7 +24,7 @@ import "../../../chunk-L3BXRDLP.js";
24
24
  import "../../../chunk-34VEVX5H.js";
25
25
  import "../../../chunk-LB7UT6F3.js";
26
26
  import "../../../chunk-MDB26F6T.js";
27
- import "../../../chunk-ZDXJXDZT.js";
27
+ import "../../../chunk-CFFSOTWX.js";
28
28
  import "../../../chunk-4RJKB7LC.js";
29
29
  import "../../../chunk-KV7LAH3T.js";
30
30
  import "../../../chunk-WVVEOCEH.js";
@@ -34,17 +34,17 @@ import "../../../chunk-QVWYTQKL.js";
34
34
  import "../../../chunk-UAMI54FE.js";
35
35
  import "../../../chunk-75USUR3I.js";
36
36
  import "../../../chunk-BWPNXY7T.js";
37
- import "../../../chunk-DWICBU2V.js";
38
- import "../../../chunk-HGLOO52X.js";
39
- import "../../../chunk-MPYAHORM.js";
40
- import "../../../chunk-YWQEMS2C.js";
37
+ import "../../../chunk-DWKS5ZXG.js";
38
+ import "../../../chunk-BU5QGYOC.js";
39
+ import "../../../chunk-BQAIQNYO.js";
40
+ import "../../../chunk-GTJADN2C.js";
41
41
  import "../../../chunk-BKBJOF4J.js";
42
42
  import "../../../chunk-NWTVBVBC.js";
43
43
  import "../../../chunk-HXGJVYGQ.js";
44
44
  import "../../../chunk-WVUIIBRR.js";
45
45
  import "../../../chunk-M7WHWZ2J.js";
46
- import "../../../chunk-Q3G6Z5DM.js";
47
- import "../../../chunk-YD2JJ2VL.js";
46
+ import "../../../chunk-OX4JI2GK.js";
47
+ import "../../../chunk-LI6F442Y.js";
48
48
  import "../../../chunk-VXWSAIB5.js";
49
49
  import "../../../chunk-DQRQZE6O.js";
50
50
  import "../../../chunk-5UH6QUFB.js";