@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
|
@@ -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_react14 = __toESM(require("react"), 1);
|
|
2670
2673
|
var import_react_table2 = require("@tanstack/react-table");
|
|
2671
2674
|
var import_core = require("@dnd-kit/core");
|
|
2672
2675
|
var import_sortable2 = require("@dnd-kit/sortable");
|
|
@@ -2696,7 +2699,7 @@ var import_clsx12 = __toESM(require("clsx"), 1);
|
|
|
2696
2699
|
// src/components/DataGrid/TableBody/TableBodyRow.tsx
|
|
2697
2700
|
var import_clsx11 = __toESM(require("clsx"), 1);
|
|
2698
2701
|
var import_react_table = require("@tanstack/react-table");
|
|
2699
|
-
var
|
|
2702
|
+
var import_react13 = __toESM(require("react"), 1);
|
|
2700
2703
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
2701
2704
|
var valueFormatters = {
|
|
2702
2705
|
date: (value) => typeof value === "string" ? formatDate(value) : "",
|
|
@@ -2764,7 +2767,7 @@ function TableBodyRow({
|
|
|
2764
2767
|
const cellFormat = (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.format;
|
|
2765
2768
|
const cellValue = cellFormat && isValueFormatterKey(cellFormat) ? valueFormatters[cellFormat](cell.getValue()) : cell.getValue();
|
|
2766
2769
|
const cellAlignment = (_c = (_b = cell.column.columnDef.meta) == null ? void 0 : _b.align) != null ? _c : typeof cellValue === "number" ? "right" : "left";
|
|
2767
|
-
return ((_d = cell.column.columnDef.meta) == null ? void 0 : _d.useCustomRenderer) ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2770
|
+
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)(
|
|
2768
2771
|
CellElement,
|
|
2769
2772
|
{
|
|
2770
2773
|
id: id ? `${id}-row-${row.id}-cell-${cell.id}` : void 0,
|
|
@@ -3015,23 +3018,23 @@ function DataGrid({
|
|
|
3015
3018
|
ref
|
|
3016
3019
|
}) {
|
|
3017
3020
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
3018
|
-
(0,
|
|
3021
|
+
(0, import_react14.useImperativeHandle)(ref, () => ({
|
|
3019
3022
|
getSavedLayout: () => {
|
|
3020
3023
|
return getSavedLayout();
|
|
3021
3024
|
}
|
|
3022
3025
|
}));
|
|
3023
|
-
const [localSorting, setLocalSorting] = (0,
|
|
3024
|
-
const [localColumnFilters, setLocalColumnFilters] = (0,
|
|
3025
|
-
const [localRowSelection, setLocalRowSelection] = (0,
|
|
3026
|
+
const [localSorting, setLocalSorting] = (0, import_react14.useState)([]);
|
|
3027
|
+
const [localColumnFilters, setLocalColumnFilters] = (0, import_react14.useState)([]);
|
|
3028
|
+
const [localRowSelection, setLocalRowSelection] = (0, import_react14.useState)({});
|
|
3026
3029
|
const {
|
|
3027
3030
|
columns: tableColumns,
|
|
3028
3031
|
setColumns: setTableColumns,
|
|
3029
3032
|
getSavedLayout
|
|
3030
3033
|
} = useTableLayout(columns, id != null ? id : testid);
|
|
3031
|
-
const [columnOrder, setColumnOrder] = (0,
|
|
3034
|
+
const [columnOrder, setColumnOrder] = (0, import_react14.useState)(
|
|
3032
3035
|
tableColumns.map((c) => c.id)
|
|
3033
3036
|
);
|
|
3034
|
-
const [columnVisibility, setColumnVisibility] = (0,
|
|
3037
|
+
const [columnVisibility, setColumnVisibility] = (0, import_react14.useState)(
|
|
3035
3038
|
Object.fromEntries(
|
|
3036
3039
|
tableColumns.filter((column) => !!column.id).map((column) => {
|
|
3037
3040
|
var _a2, _b2;
|
|
@@ -3039,7 +3042,7 @@ function DataGrid({
|
|
|
3039
3042
|
})
|
|
3040
3043
|
)
|
|
3041
3044
|
);
|
|
3042
|
-
const updateColumnVisibility = (0,
|
|
3045
|
+
const updateColumnVisibility = (0, import_react14.useCallback)(
|
|
3043
3046
|
(updateOrder) => {
|
|
3044
3047
|
setColumnVisibility(
|
|
3045
3048
|
Object.fromEntries(
|
|
@@ -3053,7 +3056,7 @@ function DataGrid({
|
|
|
3053
3056
|
},
|
|
3054
3057
|
[tableColumns]
|
|
3055
3058
|
);
|
|
3056
|
-
const resetDefaultColumnVisibility = (0,
|
|
3059
|
+
const resetDefaultColumnVisibility = (0, import_react14.useCallback)(() => {
|
|
3057
3060
|
setTableColumns((prev) => {
|
|
3058
3061
|
columns.forEach((column) => {
|
|
3059
3062
|
var _a2, _b2;
|
|
@@ -3069,7 +3072,7 @@ function DataGrid({
|
|
|
3069
3072
|
return [...prev];
|
|
3070
3073
|
}, true);
|
|
3071
3074
|
}, [columns, setTableColumns]);
|
|
3072
|
-
(0,
|
|
3075
|
+
(0, import_react14.useEffect)(() => {
|
|
3073
3076
|
updateColumnVisibility(true);
|
|
3074
3077
|
}, [updateColumnVisibility]);
|
|
3075
3078
|
const sortingState = pagination ? externalSorting != null ? externalSorting : localSorting : localSorting;
|
|
@@ -3085,7 +3088,7 @@ function DataGrid({
|
|
|
3085
3088
|
(onColumnFiltersChange != null ? onColumnFiltersChange : setLocalColumnFilters)(value);
|
|
3086
3089
|
} : setLocalColumnFilters;
|
|
3087
3090
|
const rowSelection = externalRowSelection != null ? externalRowSelection : localRowSelection;
|
|
3088
|
-
const setRowSelection = (0,
|
|
3091
|
+
const setRowSelection = (0, import_react14.useCallback)(
|
|
3089
3092
|
(updaterOrValue) => {
|
|
3090
3093
|
if (pagination) {
|
|
3091
3094
|
const value = typeof updaterOrValue === "function" ? updaterOrValue(externalRowSelection != null ? externalRowSelection : {}) : updaterOrValue;
|
|
@@ -3099,9 +3102,9 @@ function DataGrid({
|
|
|
3099
3102
|
},
|
|
3100
3103
|
[externalRowSelection, onRowSelectionChange, pagination]
|
|
3101
3104
|
);
|
|
3102
|
-
const dndId = (0,
|
|
3103
|
-
const containerRef =
|
|
3104
|
-
const toggleColumnVisibility = (0,
|
|
3105
|
+
const dndId = (0, import_react14.useId)();
|
|
3106
|
+
const containerRef = import_react14.default.useRef(null);
|
|
3107
|
+
const toggleColumnVisibility = (0, import_react14.useCallback)(
|
|
3105
3108
|
(columnId, isVisible) => {
|
|
3106
3109
|
setTableColumns((prev) => {
|
|
3107
3110
|
const persistedIndex = prev.findIndex((col) => col.id === columnId);
|
|
@@ -3349,7 +3352,7 @@ function DataGrid({
|
|
|
3349
3352
|
header.id
|
|
3350
3353
|
);
|
|
3351
3354
|
}
|
|
3352
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react14.default.Fragment, { children: ((_e2 = header.column.columnDef.meta) == null ? void 0 : _e2.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3353
3356
|
DataGridCell,
|
|
3354
3357
|
{
|
|
3355
3358
|
id: id ? `${id}-header-${header.id}` : void 0,
|
|
@@ -3555,7 +3558,7 @@ function adaptTableStateSetter(setter) {
|
|
|
3555
3558
|
}
|
|
3556
3559
|
|
|
3557
3560
|
// src/components/Select.tsx
|
|
3558
|
-
var
|
|
3561
|
+
var import_react15 = require("react");
|
|
3559
3562
|
var import_clsx14 = __toESM(require("clsx"), 1);
|
|
3560
3563
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
3561
3564
|
var Select = (_a) => {
|
|
@@ -3589,11 +3592,11 @@ var Select = (_a) => {
|
|
|
3589
3592
|
"value"
|
|
3590
3593
|
]);
|
|
3591
3594
|
var _a2;
|
|
3592
|
-
const inputRef = (0,
|
|
3593
|
-
const inputContainerRef = (0,
|
|
3594
|
-
const preventFocusOnInitialRender = (0,
|
|
3595
|
-
const [show, setShow] = (0,
|
|
3596
|
-
(0,
|
|
3595
|
+
const inputRef = (0, import_react15.useRef)(null);
|
|
3596
|
+
const inputContainerRef = (0, import_react15.useRef)(null);
|
|
3597
|
+
const preventFocusOnInitialRender = (0, import_react15.useRef)(true);
|
|
3598
|
+
const [show, setShow] = (0, import_react15.useState)(false);
|
|
3599
|
+
(0, import_react15.useEffect)(() => {
|
|
3597
3600
|
var _a3;
|
|
3598
3601
|
if (preventFocusOnInitialRender.current) {
|
|
3599
3602
|
preventFocusOnInitialRender.current = false;
|
|
@@ -4015,7 +4018,7 @@ Button.displayName = "Button";
|
|
|
4015
4018
|
|
|
4016
4019
|
// src/components/Tooltip.tsx
|
|
4017
4020
|
var import_clsx18 = __toESM(require("clsx"), 1);
|
|
4018
|
-
var
|
|
4021
|
+
var import_react16 = require("react");
|
|
4019
4022
|
var import_react_dom2 = require("react-dom");
|
|
4020
4023
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
4021
4024
|
var Tooltip = ({
|
|
@@ -4028,11 +4031,11 @@ var Tooltip = ({
|
|
|
4028
4031
|
offset = 8,
|
|
4029
4032
|
keepHidden = false
|
|
4030
4033
|
}) => {
|
|
4031
|
-
const ref = (0,
|
|
4032
|
-
const tooltipRef = (0,
|
|
4033
|
-
const [tooltipPosition, setTooltipPosition] = (0,
|
|
4034
|
-
const [isVisible, setIsVisible] = (0,
|
|
4035
|
-
const [removeOpacity, setRemoveOpacity] = (0,
|
|
4034
|
+
const ref = (0, import_react16.useRef)(null);
|
|
4035
|
+
const tooltipRef = (0, import_react16.useRef)(null);
|
|
4036
|
+
const [tooltipPosition, setTooltipPosition] = (0, import_react16.useState)({ top: 0, left: 0 });
|
|
4037
|
+
const [isVisible, setIsVisible] = (0, import_react16.useState)(false);
|
|
4038
|
+
const [removeOpacity, setRemoveOpacity] = (0, import_react16.useState)(false);
|
|
4036
4039
|
const updatePosition = () => {
|
|
4037
4040
|
if (!ref.current || !tooltipRef.current) return;
|
|
4038
4041
|
const rect = ref.current.getBoundingClientRect();
|
|
@@ -4071,14 +4074,14 @@ var Tooltip = ({
|
|
|
4071
4074
|
setIsVisible(false);
|
|
4072
4075
|
setRemoveOpacity(false);
|
|
4073
4076
|
};
|
|
4074
|
-
(0,
|
|
4077
|
+
(0, import_react16.useEffect)(() => {
|
|
4075
4078
|
if (isVisible && tooltipRef.current) {
|
|
4076
4079
|
requestAnimationFrame(() => {
|
|
4077
4080
|
updatePosition();
|
|
4078
4081
|
});
|
|
4079
4082
|
}
|
|
4080
4083
|
}, [isVisible]);
|
|
4081
|
-
(0,
|
|
4084
|
+
(0, import_react16.useEffect)(() => {
|
|
4082
4085
|
if (isVisible) {
|
|
4083
4086
|
window.addEventListener("resize", updatePosition);
|
|
4084
4087
|
return () => window.removeEventListener("resize", updatePosition);
|
|
@@ -4136,12 +4139,12 @@ var Tooltip = ({
|
|
|
4136
4139
|
Tooltip.displayName = "Tooltip";
|
|
4137
4140
|
|
|
4138
4141
|
// src/components/DateInput.tsx
|
|
4139
|
-
var
|
|
4142
|
+
var import_react18 = require("react");
|
|
4140
4143
|
var import_react_dom3 = require("react-dom");
|
|
4141
4144
|
|
|
4142
4145
|
// src/components/CalendarRange.tsx
|
|
4143
4146
|
var import_clsx19 = __toESM(require("clsx"), 1);
|
|
4144
|
-
var
|
|
4147
|
+
var import_react17 = __toESM(require("react"), 1);
|
|
4145
4148
|
var import_polyfill = require("@js-temporal/polyfill");
|
|
4146
4149
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
4147
4150
|
function DateCell(_a) {
|
|
@@ -4254,20 +4257,20 @@ function CalendarRange({
|
|
|
4254
4257
|
const fromDate = parseDate(from);
|
|
4255
4258
|
const toDate = parseDate(to);
|
|
4256
4259
|
const today = import_polyfill.Temporal.Now.plainDateISO();
|
|
4257
|
-
const [baseMonth, setBaseMonth] = (0,
|
|
4260
|
+
const [baseMonth, setBaseMonth] = (0, import_react17.useState)(
|
|
4258
4261
|
fromDate != null ? fromDate : today.with({ day: 1 })
|
|
4259
4262
|
);
|
|
4260
|
-
const [selecting, setSelecting] = (0,
|
|
4261
|
-
const [pendingFrom, setPendingFrom] = (0,
|
|
4262
|
-
const [hoveredDate, setHoveredDate] = (0,
|
|
4263
|
-
(0,
|
|
4263
|
+
const [selecting, setSelecting] = (0, import_react17.useState)("from");
|
|
4264
|
+
const [pendingFrom, setPendingFrom] = (0, import_react17.useState)(void 0);
|
|
4265
|
+
const [hoveredDate, setHoveredDate] = (0, import_react17.useState)(void 0);
|
|
4266
|
+
(0, import_react17.useEffect)(() => {
|
|
4264
4267
|
if (fromDate) {
|
|
4265
4268
|
setBaseMonth(fromDate.with({ day: 1 }));
|
|
4266
4269
|
} else if (toDate) {
|
|
4267
4270
|
setBaseMonth(toDate.with({ day: 1 }));
|
|
4268
4271
|
}
|
|
4269
4272
|
}, [from, to]);
|
|
4270
|
-
(0,
|
|
4273
|
+
(0, import_react17.useEffect)(() => {
|
|
4271
4274
|
if (fromDate && toDate) {
|
|
4272
4275
|
setSelecting("from");
|
|
4273
4276
|
setPendingFrom(void 0);
|
|
@@ -4413,14 +4416,14 @@ function CalendarPane({
|
|
|
4413
4416
|
const years = Array.from({ length: 100 }).map(
|
|
4414
4417
|
(_, i) => baseMonth.year - 50 + i
|
|
4415
4418
|
);
|
|
4416
|
-
const [monthMenuOpen, setMonthMenuOpen] = (0,
|
|
4417
|
-
const [yearMenuOpen, setYearMenuOpen] = (0,
|
|
4418
|
-
const monthMenuRef = (0,
|
|
4419
|
-
const yearMenuRef = (0,
|
|
4419
|
+
const [monthMenuOpen, setMonthMenuOpen] = (0, import_react17.useState)(false);
|
|
4420
|
+
const [yearMenuOpen, setYearMenuOpen] = (0, import_react17.useState)(false);
|
|
4421
|
+
const monthMenuRef = (0, import_react17.useRef)(null);
|
|
4422
|
+
const yearMenuRef = (0, import_react17.useRef)(null);
|
|
4420
4423
|
const month = getMonthData(offset);
|
|
4421
4424
|
const totalCells = 42;
|
|
4422
4425
|
const emptyCells = month.firstDayOffset;
|
|
4423
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react17.default.Fragment, { children: [
|
|
4424
4427
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4425
4428
|
"div",
|
|
4426
4429
|
{
|
|
@@ -4628,24 +4631,24 @@ var DateInput = (_a) => {
|
|
|
4628
4631
|
"label",
|
|
4629
4632
|
"isDateAvailable"
|
|
4630
4633
|
]);
|
|
4631
|
-
const [visible, setVisible] = (0,
|
|
4632
|
-
const [inputValue, setInputValue] = (0,
|
|
4633
|
-
const [isTyping, setIsTyping] = (0,
|
|
4634
|
-
const popoverRef = (0,
|
|
4635
|
-
const triggerRef = (0,
|
|
4636
|
-
const rootRef = (0,
|
|
4637
|
-
const [calendarPosition, setCalendarPosition] = (0,
|
|
4634
|
+
const [visible, setVisible] = (0, import_react18.useState)(false);
|
|
4635
|
+
const [inputValue, setInputValue] = (0, import_react18.useState)("");
|
|
4636
|
+
const [isTyping, setIsTyping] = (0, import_react18.useState)(false);
|
|
4637
|
+
const popoverRef = (0, import_react18.useRef)(null);
|
|
4638
|
+
const triggerRef = (0, import_react18.useRef)(null);
|
|
4639
|
+
const rootRef = (0, import_react18.useRef)(null);
|
|
4640
|
+
const [calendarPosition, setCalendarPosition] = (0, import_react18.useState)({
|
|
4638
4641
|
top: 0,
|
|
4639
4642
|
left: 0,
|
|
4640
4643
|
width: 0
|
|
4641
4644
|
});
|
|
4642
4645
|
const [from, to] = [value, ""];
|
|
4643
|
-
(0,
|
|
4646
|
+
(0, import_react18.useEffect)(() => {
|
|
4644
4647
|
if (!isTyping) {
|
|
4645
4648
|
setInputValue(formatDisplayValue(from));
|
|
4646
4649
|
}
|
|
4647
4650
|
}, [from, isTyping]);
|
|
4648
|
-
(0,
|
|
4651
|
+
(0, import_react18.useLayoutEffect)(() => {
|
|
4649
4652
|
if (visible) {
|
|
4650
4653
|
updatePosition();
|
|
4651
4654
|
}
|
|
@@ -4660,7 +4663,7 @@ var DateInput = (_a) => {
|
|
|
4660
4663
|
});
|
|
4661
4664
|
}
|
|
4662
4665
|
};
|
|
4663
|
-
(0,
|
|
4666
|
+
(0, import_react18.useEffect)(() => {
|
|
4664
4667
|
updatePosition();
|
|
4665
4668
|
const resizeObserver = new ResizeObserver(updatePosition);
|
|
4666
4669
|
if (triggerRef.current) {
|
|
@@ -4672,7 +4675,7 @@ var DateInput = (_a) => {
|
|
|
4672
4675
|
window.removeEventListener("scroll", updatePosition);
|
|
4673
4676
|
};
|
|
4674
4677
|
}, []);
|
|
4675
|
-
(0,
|
|
4678
|
+
(0, import_react18.useEffect)(() => {
|
|
4676
4679
|
const handleKeyDown2 = (event) => {
|
|
4677
4680
|
var _a2;
|
|
4678
4681
|
if (event.key === "Escape" && popoverRef.current) {
|
|
@@ -4685,7 +4688,7 @@ var DateInput = (_a) => {
|
|
|
4685
4688
|
document.removeEventListener("keydown", handleKeyDown2);
|
|
4686
4689
|
};
|
|
4687
4690
|
});
|
|
4688
|
-
(0,
|
|
4691
|
+
(0, import_react18.useEffect)(() => {
|
|
4689
4692
|
const handleClickOutside = (event) => {
|
|
4690
4693
|
if (popoverRef.current && !popoverRef.current.contains(event.target) && triggerRef.current && !triggerRef.current.contains(event.target)) {
|
|
4691
4694
|
setVisible(false);
|
|
@@ -4906,14 +4909,14 @@ Heading3.displayName = "Heading3";
|
|
|
4906
4909
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
4907
4910
|
|
|
4908
4911
|
// src/components/MobileDataGrid/ColumnSelector/index.tsx
|
|
4909
|
-
var
|
|
4912
|
+
var import_react21 = require("react");
|
|
4910
4913
|
|
|
4911
4914
|
// src/components/MobileDataGrid/GridContextProvider/useGridContext.ts
|
|
4912
|
-
var
|
|
4915
|
+
var import_react20 = require("react");
|
|
4913
4916
|
|
|
4914
4917
|
// src/components/MobileDataGrid/GridContextProvider/GridContext.tsx
|
|
4915
|
-
var
|
|
4916
|
-
var GridContext = (0,
|
|
4918
|
+
var import_react19 = require("react");
|
|
4919
|
+
var GridContext = (0, import_react19.createContext)(null);
|
|
4917
4920
|
|
|
4918
4921
|
// src/components/MobileDataGrid/ColumnSelector/index.tsx
|
|
4919
4922
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
@@ -4922,12 +4925,12 @@ var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
|
4922
4925
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
4923
4926
|
|
|
4924
4927
|
// src/components/MobileDataGrid/GridContextProvider/index.tsx
|
|
4925
|
-
var
|
|
4928
|
+
var import_react22 = require("react");
|
|
4926
4929
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
4927
4930
|
|
|
4928
4931
|
// src/components/Modal.tsx
|
|
4929
4932
|
var import_clsx28 = __toESM(require("clsx"), 1);
|
|
4930
|
-
var
|
|
4933
|
+
var import_react24 = require("react");
|
|
4931
4934
|
|
|
4932
4935
|
// src/components/ModalHeader.tsx
|
|
4933
4936
|
var import_clsx24 = __toESM(require("clsx"), 1);
|
|
@@ -5103,10 +5106,10 @@ var import_react_dom4 = require("react-dom");
|
|
|
5103
5106
|
var import_react_use = require("react-use");
|
|
5104
5107
|
|
|
5105
5108
|
// src/components/useMounted.tsx
|
|
5106
|
-
var
|
|
5109
|
+
var import_react23 = require("react");
|
|
5107
5110
|
var useMounted = () => {
|
|
5108
|
-
const [isMounted, setIsMounted] = (0,
|
|
5109
|
-
(0,
|
|
5111
|
+
const [isMounted, setIsMounted] = (0, import_react23.useState)(false);
|
|
5112
|
+
(0, import_react23.useEffect)(() => {
|
|
5110
5113
|
setIsMounted(true);
|
|
5111
5114
|
return () => setIsMounted(false);
|
|
5112
5115
|
}, []);
|
|
@@ -5200,12 +5203,12 @@ var Modal = ({
|
|
|
5200
5203
|
}) => {
|
|
5201
5204
|
var _a;
|
|
5202
5205
|
const mounted = useMounted();
|
|
5203
|
-
const modalRef = (0,
|
|
5204
|
-
const bgRef = (0,
|
|
5206
|
+
const modalRef = (0, import_react24.useRef)(null);
|
|
5207
|
+
const bgRef = (0, import_react24.useRef)(null);
|
|
5205
5208
|
const wasOpen = (0, import_react_use.usePrevious)(open);
|
|
5206
5209
|
const isMobile = useMatchesMobile();
|
|
5207
5210
|
const computedFixedHeightScrolling = isMobile || fixedHeightScrolling;
|
|
5208
|
-
(0,
|
|
5211
|
+
(0, import_react24.useEffect)(() => {
|
|
5209
5212
|
if (!mounted) return;
|
|
5210
5213
|
if (!modalRef.current || !bgRef.current) {
|
|
5211
5214
|
console.error("Modal or background reference is not set.");
|
|
@@ -5225,7 +5228,7 @@ var Modal = ({
|
|
|
5225
5228
|
bgFadeIn(bgRef.current);
|
|
5226
5229
|
}
|
|
5227
5230
|
}, [mounted, onClose, open, wasOpen]);
|
|
5228
|
-
const handleKeyDown = (0,
|
|
5231
|
+
const handleKeyDown = (0, import_react24.useCallback)(
|
|
5229
5232
|
(e) => {
|
|
5230
5233
|
if (e.key === "Escape") {
|
|
5231
5234
|
if (onClose) {
|
|
@@ -5236,12 +5239,12 @@ var Modal = ({
|
|
|
5236
5239
|
},
|
|
5237
5240
|
[onClose]
|
|
5238
5241
|
);
|
|
5239
|
-
const handleClose = (0,
|
|
5242
|
+
const handleClose = (0, import_react24.useCallback)(() => {
|
|
5240
5243
|
if (onClose) {
|
|
5241
5244
|
onClose();
|
|
5242
5245
|
}
|
|
5243
5246
|
}, [onClose]);
|
|
5244
|
-
(0,
|
|
5247
|
+
(0, import_react24.useEffect)(() => {
|
|
5245
5248
|
if (open) {
|
|
5246
5249
|
document.addEventListener("keyup", handleKeyDown);
|
|
5247
5250
|
}
|
|
@@ -5249,7 +5252,7 @@ var Modal = ({
|
|
|
5249
5252
|
document.removeEventListener("keyup", handleKeyDown);
|
|
5250
5253
|
};
|
|
5251
5254
|
}, [open, handleKeyDown]);
|
|
5252
|
-
(0,
|
|
5255
|
+
(0, import_react24.useEffect)(() => {
|
|
5253
5256
|
if (!open) return;
|
|
5254
5257
|
const scrollY = window.scrollY;
|
|
5255
5258
|
const body = document.body;
|
|
@@ -5270,7 +5273,7 @@ var Modal = ({
|
|
|
5270
5273
|
};
|
|
5271
5274
|
}, [open]);
|
|
5272
5275
|
const { sizeClass } = (_a = sizes[size]) != null ? _a : sizes.small;
|
|
5273
|
-
const backgroundClickHandler = (0,
|
|
5276
|
+
const backgroundClickHandler = (0, import_react24.useCallback)(
|
|
5274
5277
|
(e) => {
|
|
5275
5278
|
const target = e.target;
|
|
5276
5279
|
const currentTarget = e.currentTarget;
|
|
@@ -5379,10 +5382,10 @@ var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
|
5379
5382
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
5380
5383
|
|
|
5381
5384
|
// src/components/ProductImagePreview/Thumbnail.tsx
|
|
5382
|
-
var
|
|
5385
|
+
var import_react26 = require("react");
|
|
5383
5386
|
|
|
5384
5387
|
// src/components/ImagePlaceholder.tsx
|
|
5385
|
-
var
|
|
5388
|
+
var import_react25 = require("react");
|
|
5386
5389
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
5387
5390
|
|
|
5388
5391
|
// src/components/ProductImagePreview/Thumbnail.tsx
|
|
@@ -5393,11 +5396,11 @@ var import_clsx31 = __toESM(require("clsx"), 1);
|
|
|
5393
5396
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
5394
5397
|
|
|
5395
5398
|
// src/components/ProductImagePreview/ProductPrimaryImage.tsx
|
|
5396
|
-
var
|
|
5399
|
+
var import_react27 = require("react");
|
|
5397
5400
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
5398
5401
|
|
|
5399
5402
|
// src/components/ProductImagePreview/ZoomWindow.tsx
|
|
5400
|
-
var
|
|
5403
|
+
var import_react28 = require("react");
|
|
5401
5404
|
|
|
5402
5405
|
// src/components/Surface.tsx
|
|
5403
5406
|
var import_clsx32 = __toESM(require("clsx"), 1);
|
|
@@ -5442,17 +5445,17 @@ var import_clsx33 = require("clsx");
|
|
|
5442
5445
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
5443
5446
|
|
|
5444
5447
|
// src/components/ProductImagePreview/MobileImageCarousel.tsx
|
|
5445
|
-
var
|
|
5448
|
+
var import_react29 = require("react");
|
|
5446
5449
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
5447
5450
|
|
|
5448
5451
|
// src/components/ProductImagePreview/useProductImagePreview.ts
|
|
5449
|
-
var
|
|
5452
|
+
var import_react30 = require("react");
|
|
5450
5453
|
|
|
5451
5454
|
// src/components/ProductImagePreview/index.tsx
|
|
5452
5455
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
5453
5456
|
|
|
5454
5457
|
// src/components/CompactImagesPreview.tsx
|
|
5455
|
-
var
|
|
5458
|
+
var import_react31 = require("react");
|
|
5456
5459
|
var import_clsx34 = __toESM(require("clsx"), 1);
|
|
5457
5460
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
5458
5461
|
|
|
@@ -5461,12 +5464,12 @@ var import_clsx35 = __toESM(require("clsx"), 1);
|
|
|
5461
5464
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
5462
5465
|
|
|
5463
5466
|
// src/components/ListGroup.tsx
|
|
5464
|
-
var
|
|
5467
|
+
var import_react32 = require("react");
|
|
5465
5468
|
var import_clsx36 = __toESM(require("clsx"), 1);
|
|
5466
5469
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
5467
5470
|
|
|
5468
5471
|
// src/components/Pagination.tsx
|
|
5469
|
-
var
|
|
5472
|
+
var import_react33 = require("react");
|
|
5470
5473
|
var import_clsx37 = __toESM(require("clsx"), 1);
|
|
5471
5474
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
5472
5475
|
var Pagination = ({
|
|
@@ -5478,7 +5481,7 @@ var Pagination = ({
|
|
|
5478
5481
|
className,
|
|
5479
5482
|
disabled
|
|
5480
5483
|
}) => {
|
|
5481
|
-
const goTo = (0,
|
|
5484
|
+
const goTo = (0, import_react33.useCallback)(
|
|
5482
5485
|
(page) => {
|
|
5483
5486
|
if (disabled) return;
|
|
5484
5487
|
onPageChange(page);
|
|
@@ -5495,7 +5498,7 @@ var Pagination = ({
|
|
|
5495
5498
|
goTo(currentPage + 1);
|
|
5496
5499
|
}
|
|
5497
5500
|
};
|
|
5498
|
-
const pageTokens = (0,
|
|
5501
|
+
const pageTokens = (0, import_react33.useMemo)(() => {
|
|
5499
5502
|
if (totalPages <= 5) {
|
|
5500
5503
|
return Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
5501
5504
|
}
|
|
@@ -5618,21 +5621,21 @@ var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
|
5618
5621
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
5619
5622
|
|
|
5620
5623
|
// src/components/SearchResultImage/index.tsx
|
|
5621
|
-
var
|
|
5624
|
+
var import_react34 = require("react");
|
|
5622
5625
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
5623
5626
|
|
|
5624
5627
|
// src/components/Alert.tsx
|
|
5625
5628
|
var import_clsx38 = __toESM(require("clsx"), 1);
|
|
5626
|
-
var
|
|
5629
|
+
var import_react35 = require("react");
|
|
5627
5630
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5628
5631
|
|
|
5629
5632
|
// src/components/OrderCheckIcon.tsx
|
|
5630
5633
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
5631
5634
|
|
|
5632
5635
|
// src/components/EditingContext.tsx
|
|
5633
|
-
var
|
|
5636
|
+
var import_react36 = require("react");
|
|
5634
5637
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
5635
|
-
var EditingContext = (0,
|
|
5638
|
+
var EditingContext = (0, import_react36.createContext)(null);
|
|
5636
5639
|
|
|
5637
5640
|
// src/components/AccessCard.tsx
|
|
5638
5641
|
var import_clsx40 = __toESM(require("clsx"), 1);
|
|
@@ -5766,18 +5769,18 @@ var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
|
5766
5769
|
|
|
5767
5770
|
// src/components/AccessCardGroup.tsx
|
|
5768
5771
|
var import_clsx41 = __toESM(require("clsx"), 1);
|
|
5769
|
-
var
|
|
5772
|
+
var import_react37 = require("react");
|
|
5770
5773
|
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
5771
5774
|
|
|
5772
5775
|
// src/components/DataGrid/PinnedColumns.tsx
|
|
5773
5776
|
var import_clsx42 = __toESM(require("clsx"), 1);
|
|
5774
|
-
var
|
|
5777
|
+
var import_react40 = __toESM(require("react"), 1);
|
|
5775
5778
|
|
|
5776
5779
|
// src/components/DataGrid/ColumnSelectorHeaderCell/index.tsx
|
|
5777
|
-
var
|
|
5780
|
+
var import_react39 = require("react");
|
|
5778
5781
|
|
|
5779
5782
|
// src/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.tsx
|
|
5780
|
-
var
|
|
5783
|
+
var import_react38 = require("react");
|
|
5781
5784
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
5782
5785
|
function ColumnSelectorMenuOption({
|
|
5783
5786
|
id,
|
|
@@ -5785,7 +5788,7 @@ function ColumnSelectorMenuOption({
|
|
|
5785
5788
|
column,
|
|
5786
5789
|
toggleColumnVisibility
|
|
5787
5790
|
}) {
|
|
5788
|
-
const [isVisible, setIsVisible] = (0,
|
|
5791
|
+
const [isVisible, setIsVisible] = (0, import_react38.useState)(column.getIsVisible());
|
|
5789
5792
|
const label = typeof column.columnDef.header === "string" ? column.columnDef.header : null;
|
|
5790
5793
|
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(MenuOption, { id, testid, defaultChecked: isVisible, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
5791
5794
|
Checkbox,
|
|
@@ -5811,8 +5814,8 @@ function ColumnSelectorHeaderCell({
|
|
|
5811
5814
|
toggleColumnVisibility,
|
|
5812
5815
|
resetColumnVisibility
|
|
5813
5816
|
}) {
|
|
5814
|
-
const ref = (0,
|
|
5815
|
-
const [show, setShow] = (0,
|
|
5817
|
+
const ref = (0, import_react39.useRef)(null);
|
|
5818
|
+
const [show, setShow] = (0, import_react39.useState)(false);
|
|
5816
5819
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
5817
5820
|
DataGridCell,
|
|
5818
5821
|
{
|
|
@@ -5981,7 +5984,7 @@ function PinnedColumns(_a) {
|
|
|
5981
5984
|
header.id
|
|
5982
5985
|
);
|
|
5983
5986
|
}
|
|
5984
|
-
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5987
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react40.default.Fragment, { children: ((_f = header.column.columnDef.meta) == null ? void 0 : _f.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(DataGridCell, { type: "header", component: "checkbox", locked: true, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5985
5988
|
Checkbox,
|
|
5986
5989
|
{
|
|
5987
5990
|
checked: allSelectedAcrossPages,
|