@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
@@ -2,17 +2,17 @@
2
2
  import {
3
3
  DataGrid,
4
4
  DataGrid_default
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";
@@ -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`)
@@ -3103,12 +3104,14 @@ function PinnedColumns(_a) {
3103
3104
  className: "flex w-full",
3104
3105
  children: [
3105
3106
  headerGroup.headers.map((header) => {
3106
- var _a3, _b2, _c;
3107
+ var _a3, _b2, _c, _d, _e, _f;
3107
3108
  if (!header) {
3108
3109
  return;
3109
3110
  }
3111
+ const cellValue = (_a3 = table.getRowModel().rows[0]) == null ? void 0 : _a3.getValue(header.column.id);
3112
+ const cellAlignment = (_c = (_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.align) != null ? _c : typeof cellValue === "number" ? "right" : "left";
3110
3113
  if (typeof header.column.columnDef.header === "string") {
3111
- const customHeaderWidth = (_a3 = header.column.columnDef.meta) == null ? void 0 : _a3.headerWidth;
3114
+ const customHeaderWidth = (_d = header.column.columnDef.meta) == null ? void 0 : _d.headerWidth;
3112
3115
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
3113
3116
  DataCellHeader,
3114
3117
  {
@@ -3119,14 +3122,18 @@ function PinnedColumns(_a) {
3119
3122
  width: customHeaderWidth,
3120
3123
  className: (0, import_clsx12.default)(
3121
3124
  header.column.getCanSort() ? "cursor-pointer" : "cursor-grab",
3122
- "group"
3125
+ "group",
3126
+ {
3127
+ "justify-start": cellAlignment === "left",
3128
+ "justify-end": cellAlignment === "right"
3129
+ }
3123
3130
  ),
3124
3131
  children: [
3125
3132
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Subheader, { tall: true, children: header.column.columnDef.header }),
3126
3133
  getSortIcon(header.column.getIsSorted()),
3127
3134
  !header.column.getIsSorted() && header.column.getCanSort() && getSortIcon(header.column.getNextSortingOrder(), true),
3128
3135
  header.column.getSortIndex() !== -1 && table.getState().sorting.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Subheader, { tall: true, children: header.column.getSortIndex() + 1 }),
3129
- !((_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.locked) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3136
+ !((_e = header.column.columnDef.meta) == null ? void 0 : _e.locked) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3130
3137
  "div",
3131
3138
  {
3132
3139
  onDoubleClick: (e) => {
@@ -3149,7 +3156,7 @@ function PinnedColumns(_a) {
3149
3156
  header.id
3150
3157
  );
3151
3158
  }
3152
- 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)(
3159
+ 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)(
3153
3160
  Checkbox,
3154
3161
  {
3155
3162
  checked: allSelectedAcrossPages,
@@ -3184,7 +3191,7 @@ function PinnedColumns(_a) {
3184
3191
  testid: pinnedTestId
3185
3192
  }, props), {
3186
3193
  table,
3187
- locked: !enableColumnSelector,
3194
+ locked: !enableColumnSelector || pinDirection === "right",
3188
3195
  pinDirection
3189
3196
  })
3190
3197
  )
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  getSortIcon
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";
@@ -4,15 +4,15 @@ import {
4
4
  DataGridCell,
5
5
  DragAlongCell,
6
6
  DraggableCellHeader
7
- } from "../chunk-DWICBU2V.js";
8
- import "../chunk-HGLOO52X.js";
9
- import "../chunk-MPYAHORM.js";
10
- import "../chunk-YWQEMS2C.js";
7
+ } from "../chunk-DWKS5ZXG.js";
8
+ import "../chunk-BU5QGYOC.js";
9
+ import "../chunk-BQAIQNYO.js";
10
+ import "../chunk-GTJADN2C.js";
11
11
  import "../chunk-BKBJOF4J.js";
12
12
  import "../chunk-NWTVBVBC.js";
13
13
  import "../chunk-HXGJVYGQ.js";
14
14
  import "../chunk-WVUIIBRR.js";
15
- import "../chunk-YD2JJ2VL.js";
15
+ import "../chunk-LI6F442Y.js";
16
16
  import "../chunk-VXWSAIB5.js";
17
17
  import "../chunk-DQRQZE6O.js";
18
18
  import "../chunk-5UH6QUFB.js";
@@ -1100,7 +1100,7 @@ function findDocumentRoot(element) {
1100
1100
  var import_react6 = require("react");
1101
1101
  var LocalStoragePrefix = `${LocalStoragePrefixVersion}-tableLayout`;
1102
1102
  var getLocalStorageKeyWithPrefix = (key) => `${LocalStoragePrefix}__${key}`;
1103
- function useTableLayout(initialColumns, key) {
1103
+ function useTableLayout(initialColumns, key, autosync = true) {
1104
1104
  const [columns, setColumns] = (0, import_react6.useState)(initialColumns);
1105
1105
  const [isReady, setIsReady] = (0, import_react6.useState)(false);
1106
1106
  const renderCountRef = (0, import_react6.useRef)(0);
@@ -1121,6 +1121,7 @@ function useTableLayout(initialColumns, key) {
1121
1121
  [isReady, key]
1122
1122
  );
1123
1123
  (0, import_react6.useEffect)(() => {
1124
+ if (!autosync) return;
1124
1125
  if (!key) return setIsReady(true);
1125
1126
  if (renderCountRef.current > 1) {
1126
1127
  throw new Error(
@@ -1147,7 +1148,7 @@ function useTableLayout(initialColumns, key) {
1147
1148
  return () => {
1148
1149
  renderCountRef.current = 0;
1149
1150
  };
1150
- }, [handleSaveLayout, initialColumns, key]);
1151
+ }, [handleSaveLayout, initialColumns, key, autosync]);
1151
1152
  const getSavedLayout = (0, import_react6.useCallback)(() => {
1152
1153
  const savedLayout = localStorage.getItem(
1153
1154
  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
  )
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  DateInput
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";
@@ -1108,7 +1108,7 @@ function findDocumentRoot(element) {
1108
1108
  var import_react6 = require("react");
1109
1109
  var LocalStoragePrefix = `${LocalStoragePrefixVersion}-tableLayout`;
1110
1110
  var getLocalStorageKeyWithPrefix = (key) => `${LocalStoragePrefix}__${key}`;
1111
- function useTableLayout(initialColumns, key) {
1111
+ function useTableLayout(initialColumns, key, autosync = true) {
1112
1112
  const [columns, setColumns] = (0, import_react6.useState)(initialColumns);
1113
1113
  const [isReady, setIsReady] = (0, import_react6.useState)(false);
1114
1114
  const renderCountRef = (0, import_react6.useRef)(0);
@@ -1129,6 +1129,7 @@ function useTableLayout(initialColumns, key) {
1129
1129
  [isReady, key]
1130
1130
  );
1131
1131
  (0, import_react6.useEffect)(() => {
1132
+ if (!autosync) return;
1132
1133
  if (!key) return setIsReady(true);
1133
1134
  if (renderCountRef.current > 1) {
1134
1135
  throw new Error(
@@ -1155,7 +1156,7 @@ function useTableLayout(initialColumns, key) {
1155
1156
  return () => {
1156
1157
  renderCountRef.current = 0;
1157
1158
  };
1158
- }, [handleSaveLayout, initialColumns, key]);
1159
+ }, [handleSaveLayout, initialColumns, key, autosync]);
1159
1160
  const getSavedLayout = (0, import_react6.useCallback)(() => {
1160
1161
  const savedLayout = localStorage.getItem(
1161
1162
  getLocalStorageKeyWithPrefix(`${key}-tableLayout`)
@@ -3134,12 +3135,14 @@ function PinnedColumns(_a) {
3134
3135
  className: "flex w-full",
3135
3136
  children: [
3136
3137
  headerGroup.headers.map((header) => {
3137
- var _a3, _b2, _c;
3138
+ var _a3, _b2, _c, _d, _e, _f;
3138
3139
  if (!header) {
3139
3140
  return;
3140
3141
  }
3142
+ const cellValue = (_a3 = table.getRowModel().rows[0]) == null ? void 0 : _a3.getValue(header.column.id);
3143
+ const cellAlignment = (_c = (_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.align) != null ? _c : typeof cellValue === "number" ? "right" : "left";
3141
3144
  if (typeof header.column.columnDef.header === "string") {
3142
- const customHeaderWidth = (_a3 = header.column.columnDef.meta) == null ? void 0 : _a3.headerWidth;
3145
+ const customHeaderWidth = (_d = header.column.columnDef.meta) == null ? void 0 : _d.headerWidth;
3143
3146
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
3144
3147
  DataCellHeader,
3145
3148
  {
@@ -3150,14 +3153,18 @@ function PinnedColumns(_a) {
3150
3153
  width: customHeaderWidth,
3151
3154
  className: (0, import_clsx13.default)(
3152
3155
  header.column.getCanSort() ? "cursor-pointer" : "cursor-grab",
3153
- "group"
3156
+ "group",
3157
+ {
3158
+ "justify-start": cellAlignment === "left",
3159
+ "justify-end": cellAlignment === "right"
3160
+ }
3154
3161
  ),
3155
3162
  children: [
3156
3163
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Subheader, { tall: true, children: header.column.columnDef.header }),
3157
3164
  getSortIcon(header.column.getIsSorted()),
3158
3165
  !header.column.getIsSorted() && header.column.getCanSort() && getSortIcon(header.column.getNextSortingOrder(), true),
3159
3166
  header.column.getSortIndex() !== -1 && table.getState().sorting.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Subheader, { tall: true, children: header.column.getSortIndex() + 1 }),
3160
- !((_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.locked) && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3167
+ !((_e = header.column.columnDef.meta) == null ? void 0 : _e.locked) && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3161
3168
  "div",
3162
3169
  {
3163
3170
  onDoubleClick: (e) => {
@@ -3180,7 +3187,7 @@ function PinnedColumns(_a) {
3180
3187
  header.id
3181
3188
  );
3182
3189
  }
3183
- 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)(
3190
+ 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)(
3184
3191
  Checkbox,
3185
3192
  {
3186
3193
  checked: allSelectedAcrossPages,
@@ -3215,7 +3222,7 @@ function PinnedColumns(_a) {
3215
3222
  testid: pinnedTestId
3216
3223
  }, props), {
3217
3224
  table,
3218
- locked: !enableColumnSelector,
3225
+ locked: !enableColumnSelector || pinDirection === "right",
3219
3226
  pinDirection
3220
3227
  })
3221
3228
  )
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  CalendarRange
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,10 +34,10 @@ 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 {
43
43
  InputBase
@@ -45,8 +45,8 @@ import {
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 {
51
51
  findDocumentRoot
52
52
  } from "../chunk-VXWSAIB5.js";
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  Menu
4
- } from "../chunk-HGLOO52X.js";
5
- import "../chunk-MPYAHORM.js";
6
- import "../chunk-YD2JJ2VL.js";
4
+ } from "../chunk-BU5QGYOC.js";
5
+ import "../chunk-BQAIQNYO.js";
6
+ import "../chunk-LI6F442Y.js";
7
7
  import "../chunk-VXWSAIB5.js";
8
8
  import "../chunk-DQRQZE6O.js";
9
9
  import "../chunk-5UH6QUFB.js";
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  MenuOption
4
- } from "../chunk-YWQEMS2C.js";
4
+ } from "../chunk-GTJADN2C.js";
5
5
  import "../chunk-HXGJVYGQ.js";
6
- import "../chunk-YD2JJ2VL.js";
6
+ import "../chunk-LI6F442Y.js";
7
7
  import "../chunk-VXWSAIB5.js";
8
8
  import "../chunk-DQRQZE6O.js";
9
9
  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`)
@@ -3120,12 +3121,14 @@ function PinnedColumns(_a) {
3120
3121
  className: "flex w-full",
3121
3122
  children: [
3122
3123
  headerGroup.headers.map((header) => {
3123
- var _a3, _b2, _c;
3124
+ var _a3, _b2, _c, _d, _e, _f;
3124
3125
  if (!header) {
3125
3126
  return;
3126
3127
  }
3128
+ const cellValue = (_a3 = table.getRowModel().rows[0]) == null ? void 0 : _a3.getValue(header.column.id);
3129
+ const cellAlignment = (_c = (_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.align) != null ? _c : typeof cellValue === "number" ? "right" : "left";
3127
3130
  if (typeof header.column.columnDef.header === "string") {
3128
- const customHeaderWidth = (_a3 = header.column.columnDef.meta) == null ? void 0 : _a3.headerWidth;
3131
+ const customHeaderWidth = (_d = header.column.columnDef.meta) == null ? void 0 : _d.headerWidth;
3129
3132
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
3130
3133
  DataCellHeader,
3131
3134
  {
@@ -3136,14 +3139,18 @@ function PinnedColumns(_a) {
3136
3139
  width: customHeaderWidth,
3137
3140
  className: (0, import_clsx13.default)(
3138
3141
  header.column.getCanSort() ? "cursor-pointer" : "cursor-grab",
3139
- "group"
3142
+ "group",
3143
+ {
3144
+ "justify-start": cellAlignment === "left",
3145
+ "justify-end": cellAlignment === "right"
3146
+ }
3140
3147
  ),
3141
3148
  children: [
3142
3149
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Subheader, { tall: true, children: header.column.columnDef.header }),
3143
3150
  getSortIcon(header.column.getIsSorted()),
3144
3151
  !header.column.getIsSorted() && header.column.getCanSort() && getSortIcon(header.column.getNextSortingOrder(), true),
3145
3152
  header.column.getSortIndex() !== -1 && table.getState().sorting.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Subheader, { tall: true, children: header.column.getSortIndex() + 1 }),
3146
- !((_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.locked) && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3153
+ !((_e = header.column.columnDef.meta) == null ? void 0 : _e.locked) && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3147
3154
  "div",
3148
3155
  {
3149
3156
  onDoubleClick: (e) => {
@@ -3166,7 +3173,7 @@ function PinnedColumns(_a) {
3166
3173
  header.id
3167
3174
  );
3168
3175
  }
3169
- 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)(
3176
+ 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)(
3170
3177
  Checkbox,
3171
3178
  {
3172
3179
  checked: allSelectedAcrossPages,
@@ -3201,7 +3208,7 @@ function PinnedColumns(_a) {
3201
3208
  testid: pinnedTestId
3202
3209
  }, props), {
3203
3210
  table,
3204
- locked: !enableColumnSelector,
3211
+ locked: !enableColumnSelector || pinDirection === "right",
3205
3212
  pinDirection
3206
3213
  })
3207
3214
  )