@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
@@ -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`)
@@ -5892,12 +5893,14 @@ function PinnedColumns(_a) {
5892
5893
  className: "flex w-full",
5893
5894
  children: [
5894
5895
  headerGroup.headers.map((header) => {
5895
- var _a3, _b2, _c;
5896
+ var _a3, _b2, _c, _d, _e, _f;
5896
5897
  if (!header) {
5897
5898
  return;
5898
5899
  }
5900
+ const cellValue = (_a3 = table.getRowModel().rows[0]) == null ? void 0 : _a3.getValue(header.column.id);
5901
+ const cellAlignment = (_c = (_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.align) != null ? _c : typeof cellValue === "number" ? "right" : "left";
5899
5902
  if (typeof header.column.columnDef.header === "string") {
5900
- const customHeaderWidth = (_a3 = header.column.columnDef.meta) == null ? void 0 : _a3.headerWidth;
5903
+ const customHeaderWidth = (_d = header.column.columnDef.meta) == null ? void 0 : _d.headerWidth;
5901
5904
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
5902
5905
  DataCellHeader,
5903
5906
  {
@@ -5908,14 +5911,18 @@ function PinnedColumns(_a) {
5908
5911
  width: customHeaderWidth,
5909
5912
  className: (0, import_clsx42.default)(
5910
5913
  header.column.getCanSort() ? "cursor-pointer" : "cursor-grab",
5911
- "group"
5914
+ "group",
5915
+ {
5916
+ "justify-start": cellAlignment === "left",
5917
+ "justify-end": cellAlignment === "right"
5918
+ }
5912
5919
  ),
5913
5920
  children: [
5914
5921
  /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Subheader, { tall: true, children: header.column.columnDef.header }),
5915
5922
  getSortIcon(header.column.getIsSorted()),
5916
5923
  !header.column.getIsSorted() && header.column.getCanSort() && getSortIcon(header.column.getNextSortingOrder(), true),
5917
5924
  header.column.getSortIndex() !== -1 && table.getState().sorting.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Subheader, { tall: true, children: header.column.getSortIndex() + 1 }),
5918
- !((_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.locked) && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5925
+ !((_e = header.column.columnDef.meta) == null ? void 0 : _e.locked) && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5919
5926
  "div",
5920
5927
  {
5921
5928
  onDoubleClick: (e) => {
@@ -5938,7 +5945,7 @@ function PinnedColumns(_a) {
5938
5945
  header.id
5939
5946
  );
5940
5947
  }
5941
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react38.default.Fragment, { children: ((_c = header.column.columnDef.meta) == null ? void 0 : _c.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(DataGridCell, { type: "header", component: "checkbox", locked: true, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5948
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react38.default.Fragment, { children: ((_f = header.column.columnDef.meta) == null ? void 0 : _f.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(DataGridCell, { type: "header", component: "checkbox", locked: true, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5942
5949
  Checkbox,
5943
5950
  {
5944
5951
  checked: allSelectedAcrossPages,
@@ -5973,7 +5980,7 @@ function PinnedColumns(_a) {
5973
5980
  testid: pinnedTestId
5974
5981
  }, props), {
5975
5982
  table,
5976
- locked: !enableColumnSelector,
5983
+ locked: !enableColumnSelector || pinDirection === "right",
5977
5984
  pinDirection
5978
5985
  })
5979
5986
  )
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  PinnedColumns
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";
@@ -631,7 +631,7 @@ function findDocumentRoot(element) {
631
631
  var import_react5 = require("react");
632
632
  var LocalStoragePrefix = `${LocalStoragePrefixVersion}-tableLayout`;
633
633
  var getLocalStorageKeyWithPrefix = (key) => `${LocalStoragePrefix}__${key}`;
634
- function useTableLayout(initialColumns, key) {
634
+ function useTableLayout(initialColumns, key, autosync = true) {
635
635
  const [columns, setColumns] = (0, import_react5.useState)(initialColumns);
636
636
  const [isReady, setIsReady] = (0, import_react5.useState)(false);
637
637
  const renderCountRef = (0, import_react5.useRef)(0);
@@ -652,6 +652,7 @@ function useTableLayout(initialColumns, key) {
652
652
  [isReady, key]
653
653
  );
654
654
  (0, import_react5.useEffect)(() => {
655
+ if (!autosync) return;
655
656
  if (!key) return setIsReady(true);
656
657
  if (renderCountRef.current > 1) {
657
658
  throw new Error(
@@ -678,7 +679,7 @@ function useTableLayout(initialColumns, key) {
678
679
  return () => {
679
680
  renderCountRef.current = 0;
680
681
  };
681
- }, [handleSaveLayout, initialColumns, key]);
682
+ }, [handleSaveLayout, initialColumns, key, autosync]);
682
683
  const getSavedLayout = (0, import_react5.useCallback)(() => {
683
684
  const savedLayout = localStorage.getItem(
684
685
  getLocalStorageKeyWithPrefix(`${key}-tableLayout`)
@@ -3084,12 +3085,14 @@ function PinnedColumns(_a) {
3084
3085
  className: "flex w-full",
3085
3086
  children: [
3086
3087
  headerGroup.headers.map((header) => {
3087
- var _a3, _b2, _c;
3088
+ var _a3, _b2, _c, _d, _e, _f;
3088
3089
  if (!header) {
3089
3090
  return;
3090
3091
  }
3092
+ const cellValue = (_a3 = table.getRowModel().rows[0]) == null ? void 0 : _a3.getValue(header.column.id);
3093
+ const cellAlignment = (_c = (_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.align) != null ? _c : typeof cellValue === "number" ? "right" : "left";
3091
3094
  if (typeof header.column.columnDef.header === "string") {
3092
- const customHeaderWidth = (_a3 = header.column.columnDef.meta) == null ? void 0 : _a3.headerWidth;
3095
+ const customHeaderWidth = (_d = header.column.columnDef.meta) == null ? void 0 : _d.headerWidth;
3093
3096
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
3094
3097
  DataCellHeader,
3095
3098
  {
@@ -3100,14 +3103,18 @@ function PinnedColumns(_a) {
3100
3103
  width: customHeaderWidth,
3101
3104
  className: (0, import_clsx13.default)(
3102
3105
  header.column.getCanSort() ? "cursor-pointer" : "cursor-grab",
3103
- "group"
3106
+ "group",
3107
+ {
3108
+ "justify-start": cellAlignment === "left",
3109
+ "justify-end": cellAlignment === "right"
3110
+ }
3104
3111
  ),
3105
3112
  children: [
3106
3113
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Subheader, { tall: true, children: header.column.columnDef.header }),
3107
3114
  getSortIcon(header.column.getIsSorted()),
3108
3115
  !header.column.getIsSorted() && header.column.getCanSort() && getSortIcon(header.column.getNextSortingOrder(), true),
3109
3116
  header.column.getSortIndex() !== -1 && table.getState().sorting.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Subheader, { tall: true, children: header.column.getSortIndex() + 1 }),
3110
- !((_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.locked) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3117
+ !((_e = header.column.columnDef.meta) == null ? void 0 : _e.locked) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3111
3118
  "div",
3112
3119
  {
3113
3120
  onDoubleClick: (e) => {
@@ -3130,7 +3137,7 @@ function PinnedColumns(_a) {
3130
3137
  header.id
3131
3138
  );
3132
3139
  }
3133
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react15.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)(
3140
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react15.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)(
3134
3141
  Checkbox,
3135
3142
  {
3136
3143
  checked: allSelectedAcrossPages,
@@ -3165,7 +3172,7 @@ function PinnedColumns(_a) {
3165
3172
  testid: pinnedTestId
3166
3173
  }, props), {
3167
3174
  table,
3168
- locked: !enableColumnSelector,
3175
+ locked: !enableColumnSelector || pinDirection === "right",
3169
3176
  pinDirection
3170
3177
  })
3171
3178
  )
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  LoadingCell
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";
@@ -634,7 +634,7 @@ function findDocumentRoot(element) {
634
634
  var import_react5 = require("react");
635
635
  var LocalStoragePrefix = `${LocalStoragePrefixVersion}-tableLayout`;
636
636
  var getLocalStorageKeyWithPrefix = (key) => `${LocalStoragePrefix}__${key}`;
637
- function useTableLayout(initialColumns, key) {
637
+ function useTableLayout(initialColumns, key, autosync = true) {
638
638
  const [columns, setColumns] = (0, import_react5.useState)(initialColumns);
639
639
  const [isReady, setIsReady] = (0, import_react5.useState)(false);
640
640
  const renderCountRef = (0, import_react5.useRef)(0);
@@ -655,6 +655,7 @@ function useTableLayout(initialColumns, key) {
655
655
  [isReady, key]
656
656
  );
657
657
  (0, import_react5.useEffect)(() => {
658
+ if (!autosync) return;
658
659
  if (!key) return setIsReady(true);
659
660
  if (renderCountRef.current > 1) {
660
661
  throw new Error(
@@ -681,7 +682,7 @@ function useTableLayout(initialColumns, key) {
681
682
  return () => {
682
683
  renderCountRef.current = 0;
683
684
  };
684
- }, [handleSaveLayout, initialColumns, key]);
685
+ }, [handleSaveLayout, initialColumns, key, autosync]);
685
686
  const getSavedLayout = (0, import_react5.useCallback)(() => {
686
687
  const savedLayout = localStorage.getItem(
687
688
  getLocalStorageKeyWithPrefix(`${key}-tableLayout`)
@@ -3016,12 +3017,14 @@ function PinnedColumns(_a) {
3016
3017
  className: "flex w-full",
3017
3018
  children: [
3018
3019
  headerGroup.headers.map((header) => {
3019
- var _a3, _b2, _c;
3020
+ var _a3, _b2, _c, _d, _e, _f;
3020
3021
  if (!header) {
3021
3022
  return;
3022
3023
  }
3024
+ const cellValue = (_a3 = table.getRowModel().rows[0]) == null ? void 0 : _a3.getValue(header.column.id);
3025
+ const cellAlignment = (_c = (_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.align) != null ? _c : typeof cellValue === "number" ? "right" : "left";
3023
3026
  if (typeof header.column.columnDef.header === "string") {
3024
- const customHeaderWidth = (_a3 = header.column.columnDef.meta) == null ? void 0 : _a3.headerWidth;
3027
+ const customHeaderWidth = (_d = header.column.columnDef.meta) == null ? void 0 : _d.headerWidth;
3025
3028
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
3026
3029
  DataCellHeader,
3027
3030
  {
@@ -3032,14 +3035,18 @@ function PinnedColumns(_a) {
3032
3035
  width: customHeaderWidth,
3033
3036
  className: (0, import_clsx12.default)(
3034
3037
  header.column.getCanSort() ? "cursor-pointer" : "cursor-grab",
3035
- "group"
3038
+ "group",
3039
+ {
3040
+ "justify-start": cellAlignment === "left",
3041
+ "justify-end": cellAlignment === "right"
3042
+ }
3036
3043
  ),
3037
3044
  children: [
3038
3045
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Subheader, { tall: true, children: header.column.columnDef.header }),
3039
3046
  getSortIcon(header.column.getIsSorted()),
3040
3047
  !header.column.getIsSorted() && header.column.getCanSort() && getSortIcon(header.column.getNextSortingOrder(), true),
3041
3048
  header.column.getSortIndex() !== -1 && table.getState().sorting.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Subheader, { tall: true, children: header.column.getSortIndex() + 1 }),
3042
- !((_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.locked) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3049
+ !((_e = header.column.columnDef.meta) == null ? void 0 : _e.locked) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3043
3050
  "div",
3044
3051
  {
3045
3052
  onDoubleClick: (e) => {
@@ -3062,7 +3069,7 @@ function PinnedColumns(_a) {
3062
3069
  header.id
3063
3070
  );
3064
3071
  }
3065
- 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)(
3072
+ 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)(
3066
3073
  Checkbox,
3067
3074
  {
3068
3075
  checked: allSelectedAcrossPages,
@@ -3097,7 +3104,7 @@ function PinnedColumns(_a) {
3097
3104
  testid: pinnedTestId
3098
3105
  }, props), {
3099
3106
  table,
3100
- locked: !enableColumnSelector,
3107
+ locked: !enableColumnSelector || pinDirection === "right",
3101
3108
  pinDirection
3102
3109
  })
3103
3110
  )
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  TableBodyRow
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`)
@@ -2832,12 +2833,14 @@ function PinnedColumns(_a) {
2832
2833
  className: "flex w-full",
2833
2834
  children: [
2834
2835
  headerGroup.headers.map((header) => {
2835
- var _a3, _b2, _c;
2836
+ var _a3, _b2, _c, _d, _e, _f;
2836
2837
  if (!header) {
2837
2838
  return;
2838
2839
  }
2840
+ const cellValue = (_a3 = table.getRowModel().rows[0]) == null ? void 0 : _a3.getValue(header.column.id);
2841
+ const cellAlignment = (_c = (_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.align) != null ? _c : typeof cellValue === "number" ? "right" : "left";
2839
2842
  if (typeof header.column.columnDef.header === "string") {
2840
- const customHeaderWidth = (_a3 = header.column.columnDef.meta) == null ? void 0 : _a3.headerWidth;
2843
+ const customHeaderWidth = (_d = header.column.columnDef.meta) == null ? void 0 : _d.headerWidth;
2841
2844
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
2842
2845
  DataCellHeader,
2843
2846
  {
@@ -2848,14 +2851,18 @@ function PinnedColumns(_a) {
2848
2851
  width: customHeaderWidth,
2849
2852
  className: (0, import_clsx11.default)(
2850
2853
  header.column.getCanSort() ? "cursor-pointer" : "cursor-grab",
2851
- "group"
2854
+ "group",
2855
+ {
2856
+ "justify-start": cellAlignment === "left",
2857
+ "justify-end": cellAlignment === "right"
2858
+ }
2852
2859
  ),
2853
2860
  children: [
2854
2861
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Subheader, { tall: true, children: header.column.columnDef.header }),
2855
2862
  getSortIcon(header.column.getIsSorted()),
2856
2863
  !header.column.getIsSorted() && header.column.getCanSort() && getSortIcon(header.column.getNextSortingOrder(), true),
2857
2864
  header.column.getSortIndex() !== -1 && table.getState().sorting.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Subheader, { tall: true, children: header.column.getSortIndex() + 1 }),
2858
- !((_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.locked) && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2865
+ !((_e = header.column.columnDef.meta) == null ? void 0 : _e.locked) && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2859
2866
  "div",
2860
2867
  {
2861
2868
  onDoubleClick: (e) => {
@@ -2878,7 +2885,7 @@ function PinnedColumns(_a) {
2878
2885
  header.id
2879
2886
  );
2880
2887
  }
2881
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react14.default.Fragment, { children: ((_c = header.column.columnDef.meta) == null ? void 0 : _c.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DataGridCell, { type: "header", component: "checkbox", locked: true, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2888
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react14.default.Fragment, { children: ((_f = header.column.columnDef.meta) == null ? void 0 : _f.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DataGridCell, { type: "header", component: "checkbox", locked: true, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2882
2889
  Checkbox,
2883
2890
  {
2884
2891
  checked: allSelectedAcrossPages,
@@ -2913,7 +2920,7 @@ function PinnedColumns(_a) {
2913
2920
  testid: pinnedTestId
2914
2921
  }, props), {
2915
2922
  table,
2916
- locked: !enableColumnSelector,
2923
+ locked: !enableColumnSelector || pinDirection === "right",
2917
2924
  pinDirection
2918
2925
  })
2919
2926
  )
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  TableBody
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";
@@ -302,7 +302,7 @@ function findDocumentRoot(element) {
302
302
  var import_react4 = require("react");
303
303
  var LocalStoragePrefix = `${LocalStoragePrefixVersion}-tableLayout`;
304
304
  var getLocalStorageKeyWithPrefix = (key) => `${LocalStoragePrefix}__${key}`;
305
- function useTableLayout(initialColumns, key) {
305
+ function useTableLayout(initialColumns, key, autosync = true) {
306
306
  const [columns, setColumns] = (0, import_react4.useState)(initialColumns);
307
307
  const [isReady, setIsReady] = (0, import_react4.useState)(false);
308
308
  const renderCountRef = (0, import_react4.useRef)(0);
@@ -323,6 +323,7 @@ function useTableLayout(initialColumns, key) {
323
323
  [isReady, key]
324
324
  );
325
325
  (0, import_react4.useEffect)(() => {
326
+ if (!autosync) return;
326
327
  if (!key) return setIsReady(true);
327
328
  if (renderCountRef.current > 1) {
328
329
  throw new Error(
@@ -349,7 +350,7 @@ function useTableLayout(initialColumns, key) {
349
350
  return () => {
350
351
  renderCountRef.current = 0;
351
352
  };
352
- }, [handleSaveLayout, initialColumns, key]);
353
+ }, [handleSaveLayout, initialColumns, key, autosync]);
353
354
  const getSavedLayout = (0, import_react4.useCallback)(() => {
354
355
  const savedLayout = localStorage.getItem(
355
356
  getLocalStorageKeyWithPrefix(`${key}-tableLayout`)
@@ -5319,12 +5320,14 @@ function PinnedColumns(_a) {
5319
5320
  className: "flex w-full",
5320
5321
  children: [
5321
5322
  headerGroup.headers.map((header) => {
5322
- var _a3, _b2, _c;
5323
+ var _a3, _b2, _c, _d, _e, _f;
5323
5324
  if (!header) {
5324
5325
  return;
5325
5326
  }
5327
+ const cellValue = (_a3 = table.getRowModel().rows[0]) == null ? void 0 : _a3.getValue(header.column.id);
5328
+ const cellAlignment = (_c = (_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.align) != null ? _c : typeof cellValue === "number" ? "right" : "left";
5326
5329
  if (typeof header.column.columnDef.header === "string") {
5327
- const customHeaderWidth = (_a3 = header.column.columnDef.meta) == null ? void 0 : _a3.headerWidth;
5330
+ const customHeaderWidth = (_d = header.column.columnDef.meta) == null ? void 0 : _d.headerWidth;
5328
5331
  return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
5329
5332
  DataCellHeader,
5330
5333
  {
@@ -5335,14 +5338,18 @@ function PinnedColumns(_a) {
5335
5338
  width: customHeaderWidth,
5336
5339
  className: (0, import_clsx41.default)(
5337
5340
  header.column.getCanSort() ? "cursor-pointer" : "cursor-grab",
5338
- "group"
5341
+ "group",
5342
+ {
5343
+ "justify-start": cellAlignment === "left",
5344
+ "justify-end": cellAlignment === "right"
5345
+ }
5339
5346
  ),
5340
5347
  children: [
5341
5348
  /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Subheader, { tall: true, children: header.column.columnDef.header }),
5342
5349
  getSortIcon(header.column.getIsSorted()),
5343
5350
  !header.column.getIsSorted() && header.column.getCanSort() && getSortIcon(header.column.getNextSortingOrder(), true),
5344
5351
  header.column.getSortIndex() !== -1 && table.getState().sorting.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Subheader, { tall: true, children: header.column.getSortIndex() + 1 }),
5345
- !((_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.locked) && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5352
+ !((_e = header.column.columnDef.meta) == null ? void 0 : _e.locked) && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5346
5353
  "div",
5347
5354
  {
5348
5355
  onDoubleClick: (e) => {
@@ -5365,7 +5372,7 @@ function PinnedColumns(_a) {
5365
5372
  header.id
5366
5373
  );
5367
5374
  }
5368
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react37.default.Fragment, { children: ((_c = header.column.columnDef.meta) == null ? void 0 : _c.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(DataGridCell, { type: "header", component: "checkbox", locked: true, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5375
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react37.default.Fragment, { children: ((_f = header.column.columnDef.meta) == null ? void 0 : _f.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(DataGridCell, { type: "header", component: "checkbox", locked: true, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5369
5376
  Checkbox,
5370
5377
  {
5371
5378
  checked: allSelectedAcrossPages,
@@ -5400,7 +5407,7 @@ function PinnedColumns(_a) {
5400
5407
  testid: pinnedTestId
5401
5408
  }, props), {
5402
5409
  table,
5403
- locked: !enableColumnSelector,
5410
+ locked: !enableColumnSelector || pinDirection === "right",
5404
5411
  pinDirection
5405
5412
  })
5406
5413
  )