@dmsi/wedgekit-react 0.0.644 → 0.0.646
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-XVWCVBVF.js → chunk-3MV3KMQH.js} +1 -1
- package/dist/{chunk-Z3Q7PLVD.js → chunk-3PBA2EZ5.js} +1 -1
- package/dist/{chunk-LN3HVXH5.js → chunk-B3T7KBDA.js} +1 -1
- package/dist/{chunk-VAARSN7U.js → chunk-EXCAOI2L.js} +3 -3
- package/dist/{chunk-OXOMO76M.js → chunk-FCGPQNS2.js} +1 -1
- package/dist/{chunk-J2QD64F2.js → chunk-FJXWYGB7.js} +5 -5
- package/dist/{chunk-V2GSI3ZX.js → chunk-HIGNJAQA.js} +2 -2
- package/dist/{chunk-NUFBAJ6L.js → chunk-ISRG77J6.js} +1 -1
- package/dist/{chunk-YXZRGZ2I.js → chunk-REC2XOPI.js} +1 -1
- package/dist/{chunk-K22B4L3G.js → chunk-ZSRTAMSW.js} +28 -1
- package/dist/components/CalendarRange.cjs +157 -154
- package/dist/components/CalendarRange.js +11 -11
- package/dist/components/CompactImagesPreview.cjs +6 -3
- package/dist/components/CompactImagesPreview.js +2 -2
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +157 -154
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +11 -11
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +157 -154
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +11 -11
- package/dist/components/DataGrid/PinnedColumns.cjs +157 -154
- package/dist/components/DataGrid/PinnedColumns.js +11 -11
- package/dist/components/DataGrid/TableBody/LoadingCell.cjs +157 -154
- package/dist/components/DataGrid/TableBody/LoadingCell.js +11 -11
- package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +157 -154
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +11 -11
- package/dist/components/DataGrid/TableBody/index.cjs +157 -154
- package/dist/components/DataGrid/TableBody/index.js +11 -11
- package/dist/components/DataGrid/index.cjs +158 -155
- package/dist/components/DataGrid/index.js +11 -11
- package/dist/components/DataGrid/utils.cjs +157 -154
- package/dist/components/DataGrid/utils.js +11 -11
- package/dist/components/DataGridCell.cjs +61 -58
- package/dist/components/DataGridCell.js +5 -5
- package/dist/components/DateInput.cjs +150 -147
- package/dist/components/DateInput.js +11 -11
- package/dist/components/DateRangeInput.cjs +163 -160
- package/dist/components/DateRangeInput.js +11 -11
- package/dist/components/Menu.cjs +15 -12
- package/dist/components/Menu.js +3 -3
- package/dist/components/MenuOption.cjs +8 -5
- package/dist/components/MenuOption.js +2 -2
- package/dist/components/MobileDataGrid/ColumnList.js +1 -1
- package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +161 -158
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +11 -11
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +1 -1
- package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +161 -158
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +11 -11
- package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +1 -1
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.cjs +19 -16
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +4 -4
- package/dist/components/MobileDataGrid/index.cjs +170 -167
- package/dist/components/MobileDataGrid/index.js +11 -11
- package/dist/components/Modal.cjs +15 -12
- package/dist/components/Modal.js +2 -2
- package/dist/components/NestedMenu.cjs +11 -8
- package/dist/components/NestedMenu.js +2 -2
- package/dist/components/PDFViewer/index.cjs +31 -28
- package/dist/components/PDFViewer/index.js +2 -2
- package/dist/components/ProductImagePreview/index.cjs +18 -15
- package/dist/components/ProductImagePreview/index.js +2 -2
- package/dist/components/ProjectBar.cjs +3 -0
- package/dist/components/ProjectBar.js +1 -1
- package/dist/components/index.cjs +218 -215
- package/dist/components/index.js +11 -11
- package/dist/components/useMenuSystem.cjs +22 -19
- package/dist/components/useMenuSystem.js +2 -2
- package/dist/hooks/index.cjs +28 -0
- package/dist/hooks/index.js +3 -1
- package/package.json +1 -1
|
@@ -62,7 +62,7 @@ __export(ColumnSelectorHeaderCell_exports, {
|
|
|
62
62
|
ColumnSelectorHeaderCell: () => ColumnSelectorHeaderCell
|
|
63
63
|
});
|
|
64
64
|
module.exports = __toCommonJS(ColumnSelectorHeaderCell_exports);
|
|
65
|
-
var
|
|
65
|
+
var import_react40 = require("react");
|
|
66
66
|
|
|
67
67
|
// src/components/DataGridCell.tsx
|
|
68
68
|
var import_sortable = require("@dnd-kit/sortable");
|
|
@@ -117,7 +117,7 @@ var CSS = /* @__PURE__ */ Object.freeze({
|
|
|
117
117
|
|
|
118
118
|
// src/components/DataGridCell.tsx
|
|
119
119
|
var import_clsx9 = __toESM(require("clsx"), 1);
|
|
120
|
-
var
|
|
120
|
+
var import_react12 = require("react");
|
|
121
121
|
|
|
122
122
|
// src/classNames.ts
|
|
123
123
|
var import_clsx = __toESM(require("clsx"), 1);
|
|
@@ -261,7 +261,7 @@ var gapUsingContainerPadding = (0, import_clsx.default)(
|
|
|
261
261
|
|
|
262
262
|
// src/components/MenuOption.tsx
|
|
263
263
|
var import_clsx6 = __toESM(require("clsx"), 1);
|
|
264
|
-
var
|
|
264
|
+
var import_react7 = require("react");
|
|
265
265
|
|
|
266
266
|
// src/components/Label.tsx
|
|
267
267
|
var import_clsx2 = __toESM(require("clsx"), 1);
|
|
@@ -711,6 +711,9 @@ function useTableLayout(initialColumns, key, autosync = true) {
|
|
|
711
711
|
return { columns, setColumns: handleSaveLayout, isReady, getSavedLayout };
|
|
712
712
|
}
|
|
713
713
|
|
|
714
|
+
// src/hooks/useEditCell.tsx
|
|
715
|
+
var import_react6 = require("react");
|
|
716
|
+
|
|
714
717
|
// src/components/Caption.tsx
|
|
715
718
|
var import_clsx5 = __toESM(require("clsx"), 1);
|
|
716
719
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
@@ -862,12 +865,12 @@ var MenuOption = ({
|
|
|
862
865
|
onMouseMove,
|
|
863
866
|
small = false
|
|
864
867
|
}) => {
|
|
865
|
-
const uniqueId = (0,
|
|
866
|
-
const internalRef = (0,
|
|
868
|
+
const uniqueId = (0, import_react7.useId)();
|
|
869
|
+
const internalRef = (0, import_react7.useRef)(null);
|
|
867
870
|
const actualRef = ref || internalRef;
|
|
868
|
-
const menuId = (0,
|
|
871
|
+
const menuId = (0, import_react7.useRef)(`menu-${uniqueId}`);
|
|
869
872
|
const isMobile = useMatchesMobile();
|
|
870
|
-
const [isSubMenuHovered, setIsSubMenuHovered] = (0,
|
|
873
|
+
const [isSubMenuHovered, setIsSubMenuHovered] = (0, import_react7.useState)(false);
|
|
871
874
|
const handleMouseEnter = () => {
|
|
872
875
|
if (subMenu && onSubMenuHover && !disabled) {
|
|
873
876
|
onSubMenuHover(menuId.current, subMenuLevel);
|
|
@@ -1027,27 +1030,27 @@ function highlightMatch(text, searchValue) {
|
|
|
1027
1030
|
|
|
1028
1031
|
// src/components/Menu.tsx
|
|
1029
1032
|
var import_clsx7 = __toESM(require("clsx"), 1);
|
|
1030
|
-
var
|
|
1033
|
+
var import_react9 = require("react");
|
|
1031
1034
|
var import_react_dom = require("react-dom");
|
|
1032
1035
|
|
|
1033
1036
|
// src/components/useMenuSystem.tsx
|
|
1034
|
-
var
|
|
1037
|
+
var import_react8 = require("react");
|
|
1035
1038
|
function useSubMenuSystem(mobilePositionTo) {
|
|
1036
|
-
const [activeMenus, setActiveMenus] = (0,
|
|
1039
|
+
const [activeMenus, setActiveMenus] = (0, import_react8.useState)(
|
|
1037
1040
|
{}
|
|
1038
1041
|
);
|
|
1039
|
-
const [activeMenu, setActiveMenu] = (0,
|
|
1040
|
-
const [currentSubMenuLevel, setCurrentSubMenuLevel] = (0,
|
|
1042
|
+
const [activeMenu, setActiveMenu] = (0, import_react8.useState)("");
|
|
1043
|
+
const [currentSubMenuLevel, setCurrentSubMenuLevel] = (0, import_react8.useState)(
|
|
1041
1044
|
null
|
|
1042
1045
|
);
|
|
1043
|
-
const menuRootRef = (0,
|
|
1044
|
-
const subMenuRefs = (0,
|
|
1045
|
-
const hoverTimeoutRef = (0,
|
|
1046
|
-
const closeTimeoutRef = (0,
|
|
1047
|
-
const mouseStopTimeoutRef = (0,
|
|
1048
|
-
const isMouseMovingRef = (0,
|
|
1049
|
-
const pendingOpenActionRef = (0,
|
|
1050
|
-
const pendingCloseActionRef = (0,
|
|
1046
|
+
const menuRootRef = (0, import_react8.useRef)(null);
|
|
1047
|
+
const subMenuRefs = (0, import_react8.useRef)({});
|
|
1048
|
+
const hoverTimeoutRef = (0, import_react8.useRef)(null);
|
|
1049
|
+
const closeTimeoutRef = (0, import_react8.useRef)(null);
|
|
1050
|
+
const mouseStopTimeoutRef = (0, import_react8.useRef)(null);
|
|
1051
|
+
const isMouseMovingRef = (0, import_react8.useRef)(false);
|
|
1052
|
+
const pendingOpenActionRef = (0, import_react8.useRef)(null);
|
|
1053
|
+
const pendingCloseActionRef = (0, import_react8.useRef)(null);
|
|
1051
1054
|
const isMobile = useMatchesMobile();
|
|
1052
1055
|
const toggleMenu = (menuId, level) => {
|
|
1053
1056
|
if (closeTimeoutRef.current) {
|
|
@@ -1087,7 +1090,7 @@ function useSubMenuSystem(mobilePositionTo) {
|
|
|
1087
1090
|
return newActiveMenus;
|
|
1088
1091
|
});
|
|
1089
1092
|
};
|
|
1090
|
-
const executePendingActions = (0,
|
|
1093
|
+
const executePendingActions = (0, import_react8.useCallback)(() => {
|
|
1091
1094
|
if (pendingCloseActionRef.current) {
|
|
1092
1095
|
pendingCloseActionRef.current();
|
|
1093
1096
|
pendingCloseActionRef.current = null;
|
|
@@ -1176,7 +1179,7 @@ function useSubMenuSystem(mobilePositionTo) {
|
|
|
1176
1179
|
const isMenuActive = (menuId, level) => {
|
|
1177
1180
|
return activeMenus[level] === menuId;
|
|
1178
1181
|
};
|
|
1179
|
-
(0,
|
|
1182
|
+
(0, import_react8.useEffect)(() => {
|
|
1180
1183
|
const handleClickOutside = (event) => {
|
|
1181
1184
|
var _a;
|
|
1182
1185
|
if (Object.keys(activeMenus).length === 0) return;
|
|
@@ -1195,7 +1198,7 @@ function useSubMenuSystem(mobilePositionTo) {
|
|
|
1195
1198
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
1196
1199
|
};
|
|
1197
1200
|
}, [activeMenus]);
|
|
1198
|
-
(0,
|
|
1201
|
+
(0, import_react8.useEffect)(() => {
|
|
1199
1202
|
return () => {
|
|
1200
1203
|
if (hoverTimeoutRef.current) {
|
|
1201
1204
|
clearTimeout(hoverTimeoutRef.current);
|
|
@@ -1273,13 +1276,13 @@ function useSubMenuSystem(mobilePositionTo) {
|
|
|
1273
1276
|
};
|
|
1274
1277
|
}
|
|
1275
1278
|
function useMenuPosition(elementRef, position = "bottom", options) {
|
|
1276
|
-
const [menuPosition, setMenuPosition] = (0,
|
|
1279
|
+
const [menuPosition, setMenuPosition] = (0, import_react8.useState)({
|
|
1277
1280
|
top: 0,
|
|
1278
1281
|
left: 0,
|
|
1279
1282
|
minWidth: 0
|
|
1280
1283
|
});
|
|
1281
1284
|
const isMobile = options == null ? void 0 : options.isMobile;
|
|
1282
|
-
const updatePosition = (0,
|
|
1285
|
+
const updatePosition = (0, import_react8.useCallback)(() => {
|
|
1283
1286
|
var _a, _b, _c;
|
|
1284
1287
|
if (!(elementRef == null ? void 0 : elementRef.current)) return;
|
|
1285
1288
|
const triggerRect = elementRef.current.getBoundingClientRect();
|
|
@@ -1327,7 +1330,7 @@ function useMenuPosition(elementRef, position = "bottom", options) {
|
|
|
1327
1330
|
minWidth: triggerRect.width
|
|
1328
1331
|
});
|
|
1329
1332
|
}, [elementRef, position, options == null ? void 0 : options.menuRef, options == null ? void 0 : options.topOffset, isMobile]);
|
|
1330
|
-
(0,
|
|
1333
|
+
(0, import_react8.useEffect)(() => {
|
|
1331
1334
|
if (!(options == null ? void 0 : options.isOpen) || !(options == null ? void 0 : options.setIsOpen)) return;
|
|
1332
1335
|
const handleClickOutside = (event) => {
|
|
1333
1336
|
var _a, _b, _c, _d, _e;
|
|
@@ -1353,7 +1356,7 @@ function useMenuPosition(elementRef, position = "bottom", options) {
|
|
|
1353
1356
|
options == null ? void 0 : options.menuRef,
|
|
1354
1357
|
options == null ? void 0 : options.additionalRefs
|
|
1355
1358
|
]);
|
|
1356
|
-
(0,
|
|
1359
|
+
(0, import_react8.useEffect)(() => {
|
|
1357
1360
|
updatePosition();
|
|
1358
1361
|
const resizeObserver = new ResizeObserver(updatePosition);
|
|
1359
1362
|
if (elementRef == null ? void 0 : elementRef.current) {
|
|
@@ -1434,9 +1437,9 @@ var Menu = (_a) => {
|
|
|
1434
1437
|
"menuName",
|
|
1435
1438
|
"calculateMinMaxHeight"
|
|
1436
1439
|
]);
|
|
1437
|
-
const internalRef = (0,
|
|
1440
|
+
const internalRef = (0, import_react9.useRef)(null);
|
|
1438
1441
|
const actualRef = ref || internalRef;
|
|
1439
|
-
const [maxHeight, setMaxHeight] = (0,
|
|
1442
|
+
const [maxHeight, setMaxHeight] = (0, import_react9.useState)("180px");
|
|
1440
1443
|
const isMobile = useMatchesMobile();
|
|
1441
1444
|
const { menuPosition, updatePosition } = useMenuPosition(
|
|
1442
1445
|
isMobile && mobilePositionTo ? mobilePositionTo : positionTo,
|
|
@@ -1449,7 +1452,7 @@ var Menu = (_a) => {
|
|
|
1449
1452
|
isMobile: !!(isMobile && mobilePositionTo)
|
|
1450
1453
|
}
|
|
1451
1454
|
);
|
|
1452
|
-
(0,
|
|
1455
|
+
(0, import_react9.useEffect)(() => {
|
|
1453
1456
|
if (calculateMinMaxHeight) {
|
|
1454
1457
|
return;
|
|
1455
1458
|
}
|
|
@@ -1473,7 +1476,7 @@ var Menu = (_a) => {
|
|
|
1473
1476
|
cancelAnimationFrame(raf);
|
|
1474
1477
|
};
|
|
1475
1478
|
}, [actualRef.current, customMaxHeight, calculateMinMaxHeight]);
|
|
1476
|
-
(0,
|
|
1479
|
+
(0, import_react9.useEffect)(() => {
|
|
1477
1480
|
if (!calculateMinMaxHeight) {
|
|
1478
1481
|
return;
|
|
1479
1482
|
}
|
|
@@ -1484,14 +1487,14 @@ var Menu = (_a) => {
|
|
|
1484
1487
|
setMaxHeight(`${calculatedMaxHeight}px`);
|
|
1485
1488
|
}
|
|
1486
1489
|
}, [actualRef.current, positionTo == null ? void 0 : positionTo.current, calculateMinMaxHeight]);
|
|
1487
|
-
(0,
|
|
1490
|
+
(0, import_react9.useEffect)(() => {
|
|
1488
1491
|
if (!show) {
|
|
1489
1492
|
return;
|
|
1490
1493
|
}
|
|
1491
1494
|
initializeMenuFocus();
|
|
1492
1495
|
updatePosition();
|
|
1493
1496
|
}, [show, updatePosition]);
|
|
1494
|
-
(0,
|
|
1497
|
+
(0, import_react9.useEffect)(() => {
|
|
1495
1498
|
if (!show || !setShow) {
|
|
1496
1499
|
return;
|
|
1497
1500
|
}
|
|
@@ -1645,10 +1648,10 @@ var Menu = (_a) => {
|
|
|
1645
1648
|
Menu.displayName = "Menu";
|
|
1646
1649
|
|
|
1647
1650
|
// src/components/Search.tsx
|
|
1648
|
-
var
|
|
1651
|
+
var import_react11 = require("react");
|
|
1649
1652
|
|
|
1650
1653
|
// src/components/Input.tsx
|
|
1651
|
-
var
|
|
1654
|
+
var import_react10 = require("react");
|
|
1652
1655
|
var import_clsx8 = __toESM(require("clsx"), 1);
|
|
1653
1656
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1654
1657
|
var InputBase = (_a) => {
|
|
@@ -1705,9 +1708,9 @@ var InputBase = (_a) => {
|
|
|
1705
1708
|
"data-error": error && !focus || null,
|
|
1706
1709
|
"data-focus": focus || null
|
|
1707
1710
|
};
|
|
1708
|
-
const inputRef = (0,
|
|
1711
|
+
const inputRef = (0, import_react10.useRef)(null);
|
|
1709
1712
|
const inputId = id ? `${id}-input` : void 0;
|
|
1710
|
-
(0,
|
|
1713
|
+
(0, import_react10.useEffect)(() => {
|
|
1711
1714
|
var _a2;
|
|
1712
1715
|
const input = inputRef.current;
|
|
1713
1716
|
const focusHandler = () => {
|
|
@@ -1866,15 +1869,15 @@ var Input = (_a) => {
|
|
|
1866
1869
|
"testid",
|
|
1867
1870
|
"rightAdornment"
|
|
1868
1871
|
]);
|
|
1869
|
-
const [internalValue, setInternalValue] = (0,
|
|
1870
|
-
const [displayValue, setDisplayValue] = (0,
|
|
1871
|
-
(0,
|
|
1872
|
+
const [internalValue, setInternalValue] = (0, import_react10.useState)("");
|
|
1873
|
+
const [displayValue, setDisplayValue] = (0, import_react10.useState)("");
|
|
1874
|
+
(0, import_react10.useEffect)(() => {
|
|
1872
1875
|
var _a2;
|
|
1873
1876
|
const stringValue = (_a2 = propValue == null ? void 0 : propValue.toString()) != null ? _a2 : "";
|
|
1874
1877
|
setInternalValue(stringValue);
|
|
1875
1878
|
setDisplayValue(stringValue);
|
|
1876
1879
|
}, [propValue]);
|
|
1877
|
-
(0,
|
|
1880
|
+
(0, import_react10.useEffect)(() => {
|
|
1878
1881
|
var _a2;
|
|
1879
1882
|
if (variant !== "currency") {
|
|
1880
1883
|
return;
|
|
@@ -2135,14 +2138,14 @@ var Search = (_a) => {
|
|
|
2135
2138
|
"removeRoundness",
|
|
2136
2139
|
"autocompletePadding"
|
|
2137
2140
|
]);
|
|
2138
|
-
const inputRef = (0,
|
|
2139
|
-
const inputContainerRef = (0,
|
|
2140
|
-
const preventFocusOnInitialRender = (0,
|
|
2141
|
-
const [show, setShow] = (0,
|
|
2142
|
-
const [clearing, setClearing] = (0,
|
|
2143
|
-
const uniqueId = (0,
|
|
2141
|
+
const inputRef = (0, import_react11.useRef)(null);
|
|
2142
|
+
const inputContainerRef = (0, import_react11.useRef)(null);
|
|
2143
|
+
const preventFocusOnInitialRender = (0, import_react11.useRef)(true);
|
|
2144
|
+
const [show, setShow] = (0, import_react11.useState)(false);
|
|
2145
|
+
const [clearing, setClearing] = (0, import_react11.useState)(false);
|
|
2146
|
+
const uniqueId = (0, import_react11.useId)();
|
|
2144
2147
|
const searchMenuName = `search-menu-${uniqueId}`;
|
|
2145
|
-
(0,
|
|
2148
|
+
(0, import_react11.useEffect)(() => {
|
|
2146
2149
|
var _a2;
|
|
2147
2150
|
if (preventFocusOnInitialRender.current) {
|
|
2148
2151
|
preventFocusOnInitialRender.current = false;
|
|
@@ -2226,7 +2229,7 @@ Search.displayName = "Search";
|
|
|
2226
2229
|
|
|
2227
2230
|
// src/components/DataGridCell.tsx
|
|
2228
2231
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
2229
|
-
var DataGridCell = (0,
|
|
2232
|
+
var DataGridCell = (0, import_react12.memo)(
|
|
2230
2233
|
(_a) => {
|
|
2231
2234
|
var _b = _a, {
|
|
2232
2235
|
id,
|
|
@@ -2268,10 +2271,10 @@ var DataGridCell = (0, import_react11.memo)(
|
|
|
2268
2271
|
"testid"
|
|
2269
2272
|
]);
|
|
2270
2273
|
const Element = type === "header" ? "th" : "td";
|
|
2271
|
-
const timerRef = (0,
|
|
2272
|
-
const [isGrabbing, setIsGrabbing] = (0,
|
|
2273
|
-
const [isPointerPressed, setIsPointerPressed] = (0,
|
|
2274
|
-
(0,
|
|
2274
|
+
const timerRef = (0, import_react12.useRef)(null);
|
|
2275
|
+
const [isGrabbing, setIsGrabbing] = (0, import_react12.useState)(false);
|
|
2276
|
+
const [isPointerPressed, setIsPointerPressed] = (0, import_react12.useState)(false);
|
|
2277
|
+
(0, import_react12.useEffect)(() => {
|
|
2275
2278
|
return () => {
|
|
2276
2279
|
if (timerRef.current) {
|
|
2277
2280
|
clearTimeout(timerRef.current);
|
|
@@ -2381,12 +2384,12 @@ function DataCellHeader(_a) {
|
|
|
2381
2384
|
"useMenuDefaultMinWidth"
|
|
2382
2385
|
]);
|
|
2383
2386
|
var _a2;
|
|
2384
|
-
const [showMenu, setShowMenu] = (0,
|
|
2385
|
-
const [filter, setFilter] = (0,
|
|
2387
|
+
const [showMenu, setShowMenu] = (0, import_react12.useState)(false);
|
|
2388
|
+
const [filter, setFilter] = (0, import_react12.useState)(
|
|
2386
2389
|
(_a2 = header.column.getFilterValue()) != null ? _a2 : ""
|
|
2387
2390
|
);
|
|
2388
|
-
const ref = (0,
|
|
2389
|
-
const predeterminedPinned = (0,
|
|
2391
|
+
const ref = (0, import_react12.useRef)(null);
|
|
2392
|
+
const predeterminedPinned = (0, import_react12.useRef)(false);
|
|
2390
2393
|
const { column, getContext } = header;
|
|
2391
2394
|
const { id: columnId, setFilterValue } = column;
|
|
2392
2395
|
const {
|
|
@@ -2396,14 +2399,14 @@ function DataCellHeader(_a) {
|
|
|
2396
2399
|
listeners: subMenuListeners,
|
|
2397
2400
|
mobileHide
|
|
2398
2401
|
} = useSubMenuSystem(node ? node : ref);
|
|
2399
|
-
(0,
|
|
2402
|
+
(0, import_react12.useEffect)(() => {
|
|
2400
2403
|
var _a3, _b2, _c;
|
|
2401
2404
|
const columnPinning = (_a3 = getContext().table.options.initialState) == null ? void 0 : _a3.columnPinning;
|
|
2402
2405
|
const left = (_b2 = columnPinning == null ? void 0 : columnPinning.left) != null ? _b2 : [];
|
|
2403
2406
|
const right = (_c = columnPinning == null ? void 0 : columnPinning.right) != null ? _c : [];
|
|
2404
2407
|
predeterminedPinned.current = [...left, ...right].includes(columnId);
|
|
2405
2408
|
}, [columnId, getContext]);
|
|
2406
|
-
(0,
|
|
2409
|
+
(0, import_react12.useEffect)(() => {
|
|
2407
2410
|
const handler = setTimeout(() => {
|
|
2408
2411
|
setFilterValue(filter);
|
|
2409
2412
|
}, 500);
|
|
@@ -2666,7 +2669,7 @@ function DragAlongCell(_a) {
|
|
|
2666
2669
|
DragAlongCell.displayName = "DragAlongCell";
|
|
2667
2670
|
|
|
2668
2671
|
// src/components/DataGrid/index.tsx
|
|
2669
|
-
var
|
|
2672
|
+
var import_react15 = __toESM(require("react"), 1);
|
|
2670
2673
|
var import_react_table3 = require("@tanstack/react-table");
|
|
2671
2674
|
var import_core = require("@dnd-kit/core");
|
|
2672
2675
|
var import_sortable2 = require("@dnd-kit/sortable");
|
|
@@ -2694,7 +2697,7 @@ function getSortIcon(sort, nextSort = false) {
|
|
|
2694
2697
|
}
|
|
2695
2698
|
|
|
2696
2699
|
// src/components/DataGrid/PinnedColumns.tsx
|
|
2697
|
-
var
|
|
2700
|
+
var import_react14 = __toESM(require("react"), 1);
|
|
2698
2701
|
|
|
2699
2702
|
// src/components/DataGrid/TableBody/index.tsx
|
|
2700
2703
|
var import_react_virtual = require("@tanstack/react-virtual");
|
|
@@ -2703,7 +2706,7 @@ var import_clsx12 = __toESM(require("clsx"), 1);
|
|
|
2703
2706
|
// src/components/DataGrid/TableBody/TableBodyRow.tsx
|
|
2704
2707
|
var import_clsx11 = __toESM(require("clsx"), 1);
|
|
2705
2708
|
var import_react_table = require("@tanstack/react-table");
|
|
2706
|
-
var
|
|
2709
|
+
var import_react13 = __toESM(require("react"), 1);
|
|
2707
2710
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
2708
2711
|
var valueFormatters = {
|
|
2709
2712
|
date: (value) => typeof value === "string" ? formatDate(value) : "",
|
|
@@ -2771,7 +2774,7 @@ function TableBodyRow({
|
|
|
2771
2774
|
const cellFormat = (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.format;
|
|
2772
2775
|
const cellValue = cellFormat && isValueFormatterKey(cellFormat) ? valueFormatters[cellFormat](cell.getValue()) : cell.getValue();
|
|
2773
2776
|
const cellAlignment = (_c = (_b = cell.column.columnDef.meta) == null ? void 0 : _b.align) != null ? _c : typeof cellValue === "number" ? "right" : "left";
|
|
2774
|
-
return ((_d = cell.column.columnDef.meta) == null ? void 0 : _d.useCustomRenderer) ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2777
|
+
return ((_d = cell.column.columnDef.meta) == null ? void 0 : _d.useCustomRenderer) ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react13.default.Fragment, { children: (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext()) }, cell.id) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2775
2778
|
CellElement,
|
|
2776
2779
|
{
|
|
2777
2780
|
id: id ? `${id}-row-${row.id}-cell-${cell.id}` : void 0,
|
|
@@ -3086,7 +3089,7 @@ function PinnedColumns(_a) {
|
|
|
3086
3089
|
header.id
|
|
3087
3090
|
);
|
|
3088
3091
|
}
|
|
3089
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react14.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)(
|
|
3090
3093
|
Checkbox,
|
|
3091
3094
|
{
|
|
3092
3095
|
checked: allSelectedAcrossPages,
|
|
@@ -3168,23 +3171,23 @@ function DataGrid({
|
|
|
3168
3171
|
ref
|
|
3169
3172
|
}) {
|
|
3170
3173
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
3171
|
-
(0,
|
|
3174
|
+
(0, import_react15.useImperativeHandle)(ref, () => ({
|
|
3172
3175
|
getSavedLayout: () => {
|
|
3173
3176
|
return getSavedLayout();
|
|
3174
3177
|
}
|
|
3175
3178
|
}));
|
|
3176
|
-
const [localSorting, setLocalSorting] = (0,
|
|
3177
|
-
const [localColumnFilters, setLocalColumnFilters] = (0,
|
|
3178
|
-
const [localRowSelection, setLocalRowSelection] = (0,
|
|
3179
|
+
const [localSorting, setLocalSorting] = (0, import_react15.useState)([]);
|
|
3180
|
+
const [localColumnFilters, setLocalColumnFilters] = (0, import_react15.useState)([]);
|
|
3181
|
+
const [localRowSelection, setLocalRowSelection] = (0, import_react15.useState)({});
|
|
3179
3182
|
const {
|
|
3180
3183
|
columns: tableColumns,
|
|
3181
3184
|
setColumns: setTableColumns,
|
|
3182
3185
|
getSavedLayout
|
|
3183
3186
|
} = useTableLayout(columns, id != null ? id : testid);
|
|
3184
|
-
const [columnOrder, setColumnOrder] = (0,
|
|
3187
|
+
const [columnOrder, setColumnOrder] = (0, import_react15.useState)(
|
|
3185
3188
|
tableColumns.map((c) => c.id)
|
|
3186
3189
|
);
|
|
3187
|
-
const [columnVisibility, setColumnVisibility] = (0,
|
|
3190
|
+
const [columnVisibility, setColumnVisibility] = (0, import_react15.useState)(
|
|
3188
3191
|
Object.fromEntries(
|
|
3189
3192
|
tableColumns.filter((column) => !!column.id).map((column) => {
|
|
3190
3193
|
var _a2, _b2;
|
|
@@ -3192,7 +3195,7 @@ function DataGrid({
|
|
|
3192
3195
|
})
|
|
3193
3196
|
)
|
|
3194
3197
|
);
|
|
3195
|
-
const updateColumnVisibility = (0,
|
|
3198
|
+
const updateColumnVisibility = (0, import_react15.useCallback)(
|
|
3196
3199
|
(updateOrder) => {
|
|
3197
3200
|
setColumnVisibility(
|
|
3198
3201
|
Object.fromEntries(
|
|
@@ -3206,7 +3209,7 @@ function DataGrid({
|
|
|
3206
3209
|
},
|
|
3207
3210
|
[tableColumns]
|
|
3208
3211
|
);
|
|
3209
|
-
const resetDefaultColumnVisibility = (0,
|
|
3212
|
+
const resetDefaultColumnVisibility = (0, import_react15.useCallback)(() => {
|
|
3210
3213
|
setTableColumns((prev) => {
|
|
3211
3214
|
columns.forEach((column) => {
|
|
3212
3215
|
var _a2, _b2;
|
|
@@ -3222,7 +3225,7 @@ function DataGrid({
|
|
|
3222
3225
|
return [...prev];
|
|
3223
3226
|
}, true);
|
|
3224
3227
|
}, [columns, setTableColumns]);
|
|
3225
|
-
(0,
|
|
3228
|
+
(0, import_react15.useEffect)(() => {
|
|
3226
3229
|
updateColumnVisibility(true);
|
|
3227
3230
|
}, [updateColumnVisibility]);
|
|
3228
3231
|
const sortingState = pagination ? externalSorting != null ? externalSorting : localSorting : localSorting;
|
|
@@ -3238,7 +3241,7 @@ function DataGrid({
|
|
|
3238
3241
|
(onColumnFiltersChange != null ? onColumnFiltersChange : setLocalColumnFilters)(value);
|
|
3239
3242
|
} : setLocalColumnFilters;
|
|
3240
3243
|
const rowSelection = externalRowSelection != null ? externalRowSelection : localRowSelection;
|
|
3241
|
-
const setRowSelection = (0,
|
|
3244
|
+
const setRowSelection = (0, import_react15.useCallback)(
|
|
3242
3245
|
(updaterOrValue) => {
|
|
3243
3246
|
if (pagination) {
|
|
3244
3247
|
const value = typeof updaterOrValue === "function" ? updaterOrValue(externalRowSelection != null ? externalRowSelection : {}) : updaterOrValue;
|
|
@@ -3252,9 +3255,9 @@ function DataGrid({
|
|
|
3252
3255
|
},
|
|
3253
3256
|
[externalRowSelection, onRowSelectionChange, pagination]
|
|
3254
3257
|
);
|
|
3255
|
-
const dndId = (0,
|
|
3256
|
-
const containerRef =
|
|
3257
|
-
const toggleColumnVisibility = (0,
|
|
3258
|
+
const dndId = (0, import_react15.useId)();
|
|
3259
|
+
const containerRef = import_react15.default.useRef(null);
|
|
3260
|
+
const toggleColumnVisibility = (0, import_react15.useCallback)(
|
|
3258
3261
|
(columnId, isVisible) => {
|
|
3259
3262
|
setTableColumns((prev) => {
|
|
3260
3263
|
const persistedIndex = prev.findIndex((col) => col.id === columnId);
|
|
@@ -3502,7 +3505,7 @@ function DataGrid({
|
|
|
3502
3505
|
header.id
|
|
3503
3506
|
);
|
|
3504
3507
|
}
|
|
3505
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react15.default.Fragment, { children: ((_e2 = header.column.columnDef.meta) == null ? void 0 : _e2.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3506
3509
|
DataGridCell,
|
|
3507
3510
|
{
|
|
3508
3511
|
id: id ? `${id}-header-${header.id}` : void 0,
|
|
@@ -3708,7 +3711,7 @@ function adaptTableStateSetter(setter) {
|
|
|
3708
3711
|
}
|
|
3709
3712
|
|
|
3710
3713
|
// src/components/Select.tsx
|
|
3711
|
-
var
|
|
3714
|
+
var import_react16 = require("react");
|
|
3712
3715
|
var import_clsx15 = __toESM(require("clsx"), 1);
|
|
3713
3716
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
3714
3717
|
var Select = (_a) => {
|
|
@@ -3742,11 +3745,11 @@ var Select = (_a) => {
|
|
|
3742
3745
|
"value"
|
|
3743
3746
|
]);
|
|
3744
3747
|
var _a2;
|
|
3745
|
-
const inputRef = (0,
|
|
3746
|
-
const inputContainerRef = (0,
|
|
3747
|
-
const preventFocusOnInitialRender = (0,
|
|
3748
|
-
const [show, setShow] = (0,
|
|
3749
|
-
(0,
|
|
3748
|
+
const inputRef = (0, import_react16.useRef)(null);
|
|
3749
|
+
const inputContainerRef = (0, import_react16.useRef)(null);
|
|
3750
|
+
const preventFocusOnInitialRender = (0, import_react16.useRef)(true);
|
|
3751
|
+
const [show, setShow] = (0, import_react16.useState)(false);
|
|
3752
|
+
(0, import_react16.useEffect)(() => {
|
|
3750
3753
|
var _a3;
|
|
3751
3754
|
if (preventFocusOnInitialRender.current) {
|
|
3752
3755
|
preventFocusOnInitialRender.current = false;
|
|
@@ -4168,7 +4171,7 @@ Button.displayName = "Button";
|
|
|
4168
4171
|
|
|
4169
4172
|
// src/components/Tooltip.tsx
|
|
4170
4173
|
var import_clsx19 = __toESM(require("clsx"), 1);
|
|
4171
|
-
var
|
|
4174
|
+
var import_react17 = require("react");
|
|
4172
4175
|
var import_react_dom2 = require("react-dom");
|
|
4173
4176
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
4174
4177
|
var Tooltip = ({
|
|
@@ -4181,11 +4184,11 @@ var Tooltip = ({
|
|
|
4181
4184
|
offset = 8,
|
|
4182
4185
|
keepHidden = false
|
|
4183
4186
|
}) => {
|
|
4184
|
-
const ref = (0,
|
|
4185
|
-
const tooltipRef = (0,
|
|
4186
|
-
const [tooltipPosition, setTooltipPosition] = (0,
|
|
4187
|
-
const [isVisible, setIsVisible] = (0,
|
|
4188
|
-
const [removeOpacity, setRemoveOpacity] = (0,
|
|
4187
|
+
const ref = (0, import_react17.useRef)(null);
|
|
4188
|
+
const tooltipRef = (0, import_react17.useRef)(null);
|
|
4189
|
+
const [tooltipPosition, setTooltipPosition] = (0, import_react17.useState)({ top: 0, left: 0 });
|
|
4190
|
+
const [isVisible, setIsVisible] = (0, import_react17.useState)(false);
|
|
4191
|
+
const [removeOpacity, setRemoveOpacity] = (0, import_react17.useState)(false);
|
|
4189
4192
|
const updatePosition = () => {
|
|
4190
4193
|
if (!ref.current || !tooltipRef.current) return;
|
|
4191
4194
|
const rect = ref.current.getBoundingClientRect();
|
|
@@ -4224,14 +4227,14 @@ var Tooltip = ({
|
|
|
4224
4227
|
setIsVisible(false);
|
|
4225
4228
|
setRemoveOpacity(false);
|
|
4226
4229
|
};
|
|
4227
|
-
(0,
|
|
4230
|
+
(0, import_react17.useEffect)(() => {
|
|
4228
4231
|
if (isVisible && tooltipRef.current) {
|
|
4229
4232
|
requestAnimationFrame(() => {
|
|
4230
4233
|
updatePosition();
|
|
4231
4234
|
});
|
|
4232
4235
|
}
|
|
4233
4236
|
}, [isVisible]);
|
|
4234
|
-
(0,
|
|
4237
|
+
(0, import_react17.useEffect)(() => {
|
|
4235
4238
|
if (isVisible) {
|
|
4236
4239
|
window.addEventListener("resize", updatePosition);
|
|
4237
4240
|
return () => window.removeEventListener("resize", updatePosition);
|
|
@@ -4289,12 +4292,12 @@ var Tooltip = ({
|
|
|
4289
4292
|
Tooltip.displayName = "Tooltip";
|
|
4290
4293
|
|
|
4291
4294
|
// src/components/DateInput.tsx
|
|
4292
|
-
var
|
|
4295
|
+
var import_react19 = require("react");
|
|
4293
4296
|
var import_react_dom3 = require("react-dom");
|
|
4294
4297
|
|
|
4295
4298
|
// src/components/CalendarRange.tsx
|
|
4296
4299
|
var import_clsx20 = __toESM(require("clsx"), 1);
|
|
4297
|
-
var
|
|
4300
|
+
var import_react18 = __toESM(require("react"), 1);
|
|
4298
4301
|
var import_polyfill = require("@js-temporal/polyfill");
|
|
4299
4302
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
4300
4303
|
function DateCell(_a) {
|
|
@@ -4407,20 +4410,20 @@ function CalendarRange({
|
|
|
4407
4410
|
const fromDate = parseDate(from);
|
|
4408
4411
|
const toDate = parseDate(to);
|
|
4409
4412
|
const today = import_polyfill.Temporal.Now.plainDateISO();
|
|
4410
|
-
const [baseMonth, setBaseMonth] = (0,
|
|
4413
|
+
const [baseMonth, setBaseMonth] = (0, import_react18.useState)(
|
|
4411
4414
|
fromDate != null ? fromDate : today.with({ day: 1 })
|
|
4412
4415
|
);
|
|
4413
|
-
const [selecting, setSelecting] = (0,
|
|
4414
|
-
const [pendingFrom, setPendingFrom] = (0,
|
|
4415
|
-
const [hoveredDate, setHoveredDate] = (0,
|
|
4416
|
-
(0,
|
|
4416
|
+
const [selecting, setSelecting] = (0, import_react18.useState)("from");
|
|
4417
|
+
const [pendingFrom, setPendingFrom] = (0, import_react18.useState)(void 0);
|
|
4418
|
+
const [hoveredDate, setHoveredDate] = (0, import_react18.useState)(void 0);
|
|
4419
|
+
(0, import_react18.useEffect)(() => {
|
|
4417
4420
|
if (fromDate) {
|
|
4418
4421
|
setBaseMonth(fromDate.with({ day: 1 }));
|
|
4419
4422
|
} else if (toDate) {
|
|
4420
4423
|
setBaseMonth(toDate.with({ day: 1 }));
|
|
4421
4424
|
}
|
|
4422
4425
|
}, [from, to]);
|
|
4423
|
-
(0,
|
|
4426
|
+
(0, import_react18.useEffect)(() => {
|
|
4424
4427
|
if (fromDate && toDate) {
|
|
4425
4428
|
setSelecting("from");
|
|
4426
4429
|
setPendingFrom(void 0);
|
|
@@ -4566,14 +4569,14 @@ function CalendarPane({
|
|
|
4566
4569
|
const years = Array.from({ length: 100 }).map(
|
|
4567
4570
|
(_, i) => baseMonth.year - 50 + i
|
|
4568
4571
|
);
|
|
4569
|
-
const [monthMenuOpen, setMonthMenuOpen] = (0,
|
|
4570
|
-
const [yearMenuOpen, setYearMenuOpen] = (0,
|
|
4571
|
-
const monthMenuRef = (0,
|
|
4572
|
-
const yearMenuRef = (0,
|
|
4572
|
+
const [monthMenuOpen, setMonthMenuOpen] = (0, import_react18.useState)(false);
|
|
4573
|
+
const [yearMenuOpen, setYearMenuOpen] = (0, import_react18.useState)(false);
|
|
4574
|
+
const monthMenuRef = (0, import_react18.useRef)(null);
|
|
4575
|
+
const yearMenuRef = (0, import_react18.useRef)(null);
|
|
4573
4576
|
const month = getMonthData(offset);
|
|
4574
4577
|
const totalCells = 42;
|
|
4575
4578
|
const emptyCells = month.firstDayOffset;
|
|
4576
|
-
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
4579
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_react18.default.Fragment, { children: [
|
|
4577
4580
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
4578
4581
|
"div",
|
|
4579
4582
|
{
|
|
@@ -4781,24 +4784,24 @@ var DateInput = (_a) => {
|
|
|
4781
4784
|
"label",
|
|
4782
4785
|
"isDateAvailable"
|
|
4783
4786
|
]);
|
|
4784
|
-
const [visible, setVisible] = (0,
|
|
4785
|
-
const [inputValue, setInputValue] = (0,
|
|
4786
|
-
const [isTyping, setIsTyping] = (0,
|
|
4787
|
-
const popoverRef = (0,
|
|
4788
|
-
const triggerRef = (0,
|
|
4789
|
-
const rootRef = (0,
|
|
4790
|
-
const [calendarPosition, setCalendarPosition] = (0,
|
|
4787
|
+
const [visible, setVisible] = (0, import_react19.useState)(false);
|
|
4788
|
+
const [inputValue, setInputValue] = (0, import_react19.useState)("");
|
|
4789
|
+
const [isTyping, setIsTyping] = (0, import_react19.useState)(false);
|
|
4790
|
+
const popoverRef = (0, import_react19.useRef)(null);
|
|
4791
|
+
const triggerRef = (0, import_react19.useRef)(null);
|
|
4792
|
+
const rootRef = (0, import_react19.useRef)(null);
|
|
4793
|
+
const [calendarPosition, setCalendarPosition] = (0, import_react19.useState)({
|
|
4791
4794
|
top: 0,
|
|
4792
4795
|
left: 0,
|
|
4793
4796
|
width: 0
|
|
4794
4797
|
});
|
|
4795
4798
|
const [from, to] = [value, ""];
|
|
4796
|
-
(0,
|
|
4799
|
+
(0, import_react19.useEffect)(() => {
|
|
4797
4800
|
if (!isTyping) {
|
|
4798
4801
|
setInputValue(formatDisplayValue(from));
|
|
4799
4802
|
}
|
|
4800
4803
|
}, [from, isTyping]);
|
|
4801
|
-
(0,
|
|
4804
|
+
(0, import_react19.useLayoutEffect)(() => {
|
|
4802
4805
|
if (visible) {
|
|
4803
4806
|
updatePosition();
|
|
4804
4807
|
}
|
|
@@ -4813,7 +4816,7 @@ var DateInput = (_a) => {
|
|
|
4813
4816
|
});
|
|
4814
4817
|
}
|
|
4815
4818
|
};
|
|
4816
|
-
(0,
|
|
4819
|
+
(0, import_react19.useEffect)(() => {
|
|
4817
4820
|
updatePosition();
|
|
4818
4821
|
const resizeObserver = new ResizeObserver(updatePosition);
|
|
4819
4822
|
if (triggerRef.current) {
|
|
@@ -4825,7 +4828,7 @@ var DateInput = (_a) => {
|
|
|
4825
4828
|
window.removeEventListener("scroll", updatePosition);
|
|
4826
4829
|
};
|
|
4827
4830
|
}, []);
|
|
4828
|
-
(0,
|
|
4831
|
+
(0, import_react19.useEffect)(() => {
|
|
4829
4832
|
const handleKeyDown2 = (event) => {
|
|
4830
4833
|
var _a2;
|
|
4831
4834
|
if (event.key === "Escape" && popoverRef.current) {
|
|
@@ -4838,7 +4841,7 @@ var DateInput = (_a) => {
|
|
|
4838
4841
|
document.removeEventListener("keydown", handleKeyDown2);
|
|
4839
4842
|
};
|
|
4840
4843
|
});
|
|
4841
|
-
(0,
|
|
4844
|
+
(0, import_react19.useEffect)(() => {
|
|
4842
4845
|
const handleClickOutside = (event) => {
|
|
4843
4846
|
if (popoverRef.current && !popoverRef.current.contains(event.target) && triggerRef.current && !triggerRef.current.contains(event.target)) {
|
|
4844
4847
|
setVisible(false);
|
|
@@ -5059,14 +5062,14 @@ Heading3.displayName = "Heading3";
|
|
|
5059
5062
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
5060
5063
|
|
|
5061
5064
|
// src/components/MobileDataGrid/ColumnSelector/index.tsx
|
|
5062
|
-
var
|
|
5065
|
+
var import_react22 = require("react");
|
|
5063
5066
|
|
|
5064
5067
|
// src/components/MobileDataGrid/GridContextProvider/useGridContext.ts
|
|
5065
|
-
var
|
|
5068
|
+
var import_react21 = require("react");
|
|
5066
5069
|
|
|
5067
5070
|
// src/components/MobileDataGrid/GridContextProvider/GridContext.tsx
|
|
5068
|
-
var
|
|
5069
|
-
var GridContext = (0,
|
|
5071
|
+
var import_react20 = require("react");
|
|
5072
|
+
var GridContext = (0, import_react20.createContext)(null);
|
|
5070
5073
|
|
|
5071
5074
|
// src/components/MobileDataGrid/ColumnSelector/index.tsx
|
|
5072
5075
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
@@ -5075,12 +5078,12 @@ var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
|
5075
5078
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
5076
5079
|
|
|
5077
5080
|
// src/components/MobileDataGrid/GridContextProvider/index.tsx
|
|
5078
|
-
var
|
|
5081
|
+
var import_react23 = require("react");
|
|
5079
5082
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
5080
5083
|
|
|
5081
5084
|
// src/components/Modal.tsx
|
|
5082
5085
|
var import_clsx29 = __toESM(require("clsx"), 1);
|
|
5083
|
-
var
|
|
5086
|
+
var import_react25 = require("react");
|
|
5084
5087
|
|
|
5085
5088
|
// src/components/ModalHeader.tsx
|
|
5086
5089
|
var import_clsx25 = __toESM(require("clsx"), 1);
|
|
@@ -5256,10 +5259,10 @@ var import_react_dom4 = require("react-dom");
|
|
|
5256
5259
|
var import_react_use = require("react-use");
|
|
5257
5260
|
|
|
5258
5261
|
// src/components/useMounted.tsx
|
|
5259
|
-
var
|
|
5262
|
+
var import_react24 = require("react");
|
|
5260
5263
|
var useMounted = () => {
|
|
5261
|
-
const [isMounted, setIsMounted] = (0,
|
|
5262
|
-
(0,
|
|
5264
|
+
const [isMounted, setIsMounted] = (0, import_react24.useState)(false);
|
|
5265
|
+
(0, import_react24.useEffect)(() => {
|
|
5263
5266
|
setIsMounted(true);
|
|
5264
5267
|
return () => setIsMounted(false);
|
|
5265
5268
|
}, []);
|
|
@@ -5353,12 +5356,12 @@ var Modal = ({
|
|
|
5353
5356
|
}) => {
|
|
5354
5357
|
var _a;
|
|
5355
5358
|
const mounted = useMounted();
|
|
5356
|
-
const modalRef = (0,
|
|
5357
|
-
const bgRef = (0,
|
|
5359
|
+
const modalRef = (0, import_react25.useRef)(null);
|
|
5360
|
+
const bgRef = (0, import_react25.useRef)(null);
|
|
5358
5361
|
const wasOpen = (0, import_react_use.usePrevious)(open);
|
|
5359
5362
|
const isMobile = useMatchesMobile();
|
|
5360
5363
|
const computedFixedHeightScrolling = isMobile || fixedHeightScrolling;
|
|
5361
|
-
(0,
|
|
5364
|
+
(0, import_react25.useEffect)(() => {
|
|
5362
5365
|
if (!mounted) return;
|
|
5363
5366
|
if (!modalRef.current || !bgRef.current) {
|
|
5364
5367
|
console.error("Modal or background reference is not set.");
|
|
@@ -5378,7 +5381,7 @@ var Modal = ({
|
|
|
5378
5381
|
bgFadeIn(bgRef.current);
|
|
5379
5382
|
}
|
|
5380
5383
|
}, [mounted, onClose, open, wasOpen]);
|
|
5381
|
-
const handleKeyDown = (0,
|
|
5384
|
+
const handleKeyDown = (0, import_react25.useCallback)(
|
|
5382
5385
|
(e) => {
|
|
5383
5386
|
if (e.key === "Escape") {
|
|
5384
5387
|
if (onClose) {
|
|
@@ -5389,12 +5392,12 @@ var Modal = ({
|
|
|
5389
5392
|
},
|
|
5390
5393
|
[onClose]
|
|
5391
5394
|
);
|
|
5392
|
-
const handleClose = (0,
|
|
5395
|
+
const handleClose = (0, import_react25.useCallback)(() => {
|
|
5393
5396
|
if (onClose) {
|
|
5394
5397
|
onClose();
|
|
5395
5398
|
}
|
|
5396
5399
|
}, [onClose]);
|
|
5397
|
-
(0,
|
|
5400
|
+
(0, import_react25.useEffect)(() => {
|
|
5398
5401
|
if (open) {
|
|
5399
5402
|
document.addEventListener("keyup", handleKeyDown);
|
|
5400
5403
|
}
|
|
@@ -5402,7 +5405,7 @@ var Modal = ({
|
|
|
5402
5405
|
document.removeEventListener("keyup", handleKeyDown);
|
|
5403
5406
|
};
|
|
5404
5407
|
}, [open, handleKeyDown]);
|
|
5405
|
-
(0,
|
|
5408
|
+
(0, import_react25.useEffect)(() => {
|
|
5406
5409
|
if (!open) return;
|
|
5407
5410
|
const scrollY = window.scrollY;
|
|
5408
5411
|
const body = document.body;
|
|
@@ -5423,7 +5426,7 @@ var Modal = ({
|
|
|
5423
5426
|
};
|
|
5424
5427
|
}, [open]);
|
|
5425
5428
|
const { sizeClass } = (_a = sizes[size]) != null ? _a : sizes.small;
|
|
5426
|
-
const backgroundClickHandler = (0,
|
|
5429
|
+
const backgroundClickHandler = (0, import_react25.useCallback)(
|
|
5427
5430
|
(e) => {
|
|
5428
5431
|
const target = e.target;
|
|
5429
5432
|
const currentTarget = e.currentTarget;
|
|
@@ -5532,10 +5535,10 @@ var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
|
5532
5535
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
5533
5536
|
|
|
5534
5537
|
// src/components/ProductImagePreview/Thumbnail.tsx
|
|
5535
|
-
var
|
|
5538
|
+
var import_react27 = require("react");
|
|
5536
5539
|
|
|
5537
5540
|
// src/components/ImagePlaceholder.tsx
|
|
5538
|
-
var
|
|
5541
|
+
var import_react26 = require("react");
|
|
5539
5542
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
5540
5543
|
|
|
5541
5544
|
// src/components/ProductImagePreview/Thumbnail.tsx
|
|
@@ -5546,11 +5549,11 @@ var import_clsx32 = __toESM(require("clsx"), 1);
|
|
|
5546
5549
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
5547
5550
|
|
|
5548
5551
|
// src/components/ProductImagePreview/ProductPrimaryImage.tsx
|
|
5549
|
-
var
|
|
5552
|
+
var import_react28 = require("react");
|
|
5550
5553
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
5551
5554
|
|
|
5552
5555
|
// src/components/ProductImagePreview/ZoomWindow.tsx
|
|
5553
|
-
var
|
|
5556
|
+
var import_react29 = require("react");
|
|
5554
5557
|
|
|
5555
5558
|
// src/components/Surface.tsx
|
|
5556
5559
|
var import_clsx33 = __toESM(require("clsx"), 1);
|
|
@@ -5595,17 +5598,17 @@ var import_clsx34 = require("clsx");
|
|
|
5595
5598
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
5596
5599
|
|
|
5597
5600
|
// src/components/ProductImagePreview/MobileImageCarousel.tsx
|
|
5598
|
-
var
|
|
5601
|
+
var import_react30 = require("react");
|
|
5599
5602
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
5600
5603
|
|
|
5601
5604
|
// src/components/ProductImagePreview/useProductImagePreview.ts
|
|
5602
|
-
var
|
|
5605
|
+
var import_react31 = require("react");
|
|
5603
5606
|
|
|
5604
5607
|
// src/components/ProductImagePreview/index.tsx
|
|
5605
5608
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
5606
5609
|
|
|
5607
5610
|
// src/components/CompactImagesPreview.tsx
|
|
5608
|
-
var
|
|
5611
|
+
var import_react32 = require("react");
|
|
5609
5612
|
var import_clsx35 = __toESM(require("clsx"), 1);
|
|
5610
5613
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
5611
5614
|
|
|
@@ -5614,12 +5617,12 @@ var import_clsx36 = __toESM(require("clsx"), 1);
|
|
|
5614
5617
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
5615
5618
|
|
|
5616
5619
|
// src/components/ListGroup.tsx
|
|
5617
|
-
var
|
|
5620
|
+
var import_react33 = require("react");
|
|
5618
5621
|
var import_clsx37 = __toESM(require("clsx"), 1);
|
|
5619
5622
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
5620
5623
|
|
|
5621
5624
|
// src/components/Pagination.tsx
|
|
5622
|
-
var
|
|
5625
|
+
var import_react34 = require("react");
|
|
5623
5626
|
var import_clsx38 = __toESM(require("clsx"), 1);
|
|
5624
5627
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
5625
5628
|
var Pagination = ({
|
|
@@ -5631,7 +5634,7 @@ var Pagination = ({
|
|
|
5631
5634
|
className,
|
|
5632
5635
|
disabled
|
|
5633
5636
|
}) => {
|
|
5634
|
-
const goTo = (0,
|
|
5637
|
+
const goTo = (0, import_react34.useCallback)(
|
|
5635
5638
|
(page) => {
|
|
5636
5639
|
if (disabled) return;
|
|
5637
5640
|
onPageChange(page);
|
|
@@ -5648,7 +5651,7 @@ var Pagination = ({
|
|
|
5648
5651
|
goTo(currentPage + 1);
|
|
5649
5652
|
}
|
|
5650
5653
|
};
|
|
5651
|
-
const pageTokens = (0,
|
|
5654
|
+
const pageTokens = (0, import_react34.useMemo)(() => {
|
|
5652
5655
|
if (totalPages <= 5) {
|
|
5653
5656
|
return Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
5654
5657
|
}
|
|
@@ -5771,21 +5774,21 @@ var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
|
5771
5774
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
5772
5775
|
|
|
5773
5776
|
// src/components/SearchResultImage/index.tsx
|
|
5774
|
-
var
|
|
5777
|
+
var import_react35 = require("react");
|
|
5775
5778
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5776
5779
|
|
|
5777
5780
|
// src/components/Alert.tsx
|
|
5778
5781
|
var import_clsx39 = __toESM(require("clsx"), 1);
|
|
5779
|
-
var
|
|
5782
|
+
var import_react36 = require("react");
|
|
5780
5783
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
5781
5784
|
|
|
5782
5785
|
// src/components/OrderCheckIcon.tsx
|
|
5783
5786
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
5784
5787
|
|
|
5785
5788
|
// src/components/EditingContext.tsx
|
|
5786
|
-
var
|
|
5789
|
+
var import_react37 = require("react");
|
|
5787
5790
|
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
5788
|
-
var EditingContext = (0,
|
|
5791
|
+
var EditingContext = (0, import_react37.createContext)(null);
|
|
5789
5792
|
|
|
5790
5793
|
// src/components/AccessCard.tsx
|
|
5791
5794
|
var import_clsx41 = __toESM(require("clsx"), 1);
|
|
@@ -5919,11 +5922,11 @@ var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
|
5919
5922
|
|
|
5920
5923
|
// src/components/AccessCardGroup.tsx
|
|
5921
5924
|
var import_clsx42 = __toESM(require("clsx"), 1);
|
|
5922
|
-
var
|
|
5925
|
+
var import_react38 = require("react");
|
|
5923
5926
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
5924
5927
|
|
|
5925
5928
|
// src/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.tsx
|
|
5926
|
-
var
|
|
5929
|
+
var import_react39 = require("react");
|
|
5927
5930
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
5928
5931
|
function ColumnSelectorMenuOption({
|
|
5929
5932
|
id,
|
|
@@ -5931,7 +5934,7 @@ function ColumnSelectorMenuOption({
|
|
|
5931
5934
|
column,
|
|
5932
5935
|
toggleColumnVisibility
|
|
5933
5936
|
}) {
|
|
5934
|
-
const [isVisible, setIsVisible] = (0,
|
|
5937
|
+
const [isVisible, setIsVisible] = (0, import_react39.useState)(column.getIsVisible());
|
|
5935
5938
|
const label = typeof column.columnDef.header === "string" ? column.columnDef.header : null;
|
|
5936
5939
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(MenuOption, { id, testid, defaultChecked: isVisible, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
5937
5940
|
Checkbox,
|
|
@@ -5957,8 +5960,8 @@ function ColumnSelectorHeaderCell({
|
|
|
5957
5960
|
toggleColumnVisibility,
|
|
5958
5961
|
resetColumnVisibility
|
|
5959
5962
|
}) {
|
|
5960
|
-
const ref = (0,
|
|
5961
|
-
const [show, setShow] = (0,
|
|
5963
|
+
const ref = (0, import_react40.useRef)(null);
|
|
5964
|
+
const [show, setShow] = (0, import_react40.useState)(false);
|
|
5962
5965
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
5963
5966
|
DataGridCell,
|
|
5964
5967
|
{
|