@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_react17 = __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");
|
|
@@ -2677,7 +2680,7 @@ var import_clsx13 = __toESM(require("clsx"), 1);
|
|
|
2677
2680
|
// src/components/DataGrid/PinnedColumns.tsx
|
|
2678
2681
|
var import_react_table2 = require("@tanstack/react-table");
|
|
2679
2682
|
var import_clsx12 = __toESM(require("clsx"), 1);
|
|
2680
|
-
var
|
|
2683
|
+
var import_react16 = __toESM(require("react"), 1);
|
|
2681
2684
|
|
|
2682
2685
|
// src/components/DataGrid/TableBody/index.tsx
|
|
2683
2686
|
var import_react_virtual = require("@tanstack/react-virtual");
|
|
@@ -2686,7 +2689,7 @@ var import_clsx11 = __toESM(require("clsx"), 1);
|
|
|
2686
2689
|
// src/components/DataGrid/TableBody/TableBodyRow.tsx
|
|
2687
2690
|
var import_clsx10 = __toESM(require("clsx"), 1);
|
|
2688
2691
|
var import_react_table = require("@tanstack/react-table");
|
|
2689
|
-
var
|
|
2692
|
+
var import_react13 = __toESM(require("react"), 1);
|
|
2690
2693
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
2691
2694
|
var valueFormatters = {
|
|
2692
2695
|
date: (value) => typeof value === "string" ? formatDate(value) : "",
|
|
@@ -2754,7 +2757,7 @@ function TableBodyRow({
|
|
|
2754
2757
|
const cellFormat = (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.format;
|
|
2755
2758
|
const cellValue = cellFormat && isValueFormatterKey(cellFormat) ? valueFormatters[cellFormat](cell.getValue()) : cell.getValue();
|
|
2756
2759
|
const cellAlignment = (_c = (_b = cell.column.columnDef.meta) == null ? void 0 : _b.align) != null ? _c : typeof cellValue === "number" ? "right" : "left";
|
|
2757
|
-
return ((_d = cell.column.columnDef.meta) == null ? void 0 : _d.useCustomRenderer) ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2760
|
+
return ((_d = cell.column.columnDef.meta) == null ? void 0 : _d.useCustomRenderer) ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react13.default.Fragment, { children: (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext()) }, cell.id) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2758
2761
|
CellElement,
|
|
2759
2762
|
{
|
|
2760
2763
|
id: id ? `${id}-row-${row.id}-cell-${cell.id}` : void 0,
|
|
@@ -2968,10 +2971,10 @@ function TableBody({
|
|
|
2968
2971
|
}
|
|
2969
2972
|
|
|
2970
2973
|
// src/components/DataGrid/ColumnSelectorHeaderCell/index.tsx
|
|
2971
|
-
var
|
|
2974
|
+
var import_react15 = require("react");
|
|
2972
2975
|
|
|
2973
2976
|
// src/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.tsx
|
|
2974
|
-
var
|
|
2977
|
+
var import_react14 = require("react");
|
|
2975
2978
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2976
2979
|
function ColumnSelectorMenuOption({
|
|
2977
2980
|
id,
|
|
@@ -2979,7 +2982,7 @@ function ColumnSelectorMenuOption({
|
|
|
2979
2982
|
column,
|
|
2980
2983
|
toggleColumnVisibility
|
|
2981
2984
|
}) {
|
|
2982
|
-
const [isVisible, setIsVisible] = (0,
|
|
2985
|
+
const [isVisible, setIsVisible] = (0, import_react14.useState)(column.getIsVisible());
|
|
2983
2986
|
const label = typeof column.columnDef.header === "string" ? column.columnDef.header : null;
|
|
2984
2987
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MenuOption, { id, testid, defaultChecked: isVisible, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2985
2988
|
Checkbox,
|
|
@@ -3005,8 +3008,8 @@ function ColumnSelectorHeaderCell({
|
|
|
3005
3008
|
toggleColumnVisibility,
|
|
3006
3009
|
resetColumnVisibility
|
|
3007
3010
|
}) {
|
|
3008
|
-
const ref = (0,
|
|
3009
|
-
const [show, setShow] = (0,
|
|
3011
|
+
const ref = (0, import_react15.useRef)(null);
|
|
3012
|
+
const [show, setShow] = (0, import_react15.useState)(false);
|
|
3010
3013
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
3011
3014
|
DataGridCell,
|
|
3012
3015
|
{
|
|
@@ -3175,7 +3178,7 @@ function PinnedColumns(_a) {
|
|
|
3175
3178
|
header.id
|
|
3176
3179
|
);
|
|
3177
3180
|
}
|
|
3178
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3181
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react16.default.Fragment, { children: ((_f = header.column.columnDef.meta) == null ? void 0 : _f.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DataGridCell, { type: "header", component: "checkbox", locked: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3179
3182
|
Checkbox,
|
|
3180
3183
|
{
|
|
3181
3184
|
checked: allSelectedAcrossPages,
|
|
@@ -3257,23 +3260,23 @@ function DataGrid({
|
|
|
3257
3260
|
ref
|
|
3258
3261
|
}) {
|
|
3259
3262
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
3260
|
-
(0,
|
|
3263
|
+
(0, import_react17.useImperativeHandle)(ref, () => ({
|
|
3261
3264
|
getSavedLayout: () => {
|
|
3262
3265
|
return getSavedLayout();
|
|
3263
3266
|
}
|
|
3264
3267
|
}));
|
|
3265
|
-
const [localSorting, setLocalSorting] = (0,
|
|
3266
|
-
const [localColumnFilters, setLocalColumnFilters] = (0,
|
|
3267
|
-
const [localRowSelection, setLocalRowSelection] = (0,
|
|
3268
|
+
const [localSorting, setLocalSorting] = (0, import_react17.useState)([]);
|
|
3269
|
+
const [localColumnFilters, setLocalColumnFilters] = (0, import_react17.useState)([]);
|
|
3270
|
+
const [localRowSelection, setLocalRowSelection] = (0, import_react17.useState)({});
|
|
3268
3271
|
const {
|
|
3269
3272
|
columns: tableColumns,
|
|
3270
3273
|
setColumns: setTableColumns,
|
|
3271
3274
|
getSavedLayout
|
|
3272
3275
|
} = useTableLayout(columns, id != null ? id : testid);
|
|
3273
|
-
const [columnOrder, setColumnOrder] = (0,
|
|
3276
|
+
const [columnOrder, setColumnOrder] = (0, import_react17.useState)(
|
|
3274
3277
|
tableColumns.map((c) => c.id)
|
|
3275
3278
|
);
|
|
3276
|
-
const [columnVisibility, setColumnVisibility] = (0,
|
|
3279
|
+
const [columnVisibility, setColumnVisibility] = (0, import_react17.useState)(
|
|
3277
3280
|
Object.fromEntries(
|
|
3278
3281
|
tableColumns.filter((column) => !!column.id).map((column) => {
|
|
3279
3282
|
var _a2, _b2;
|
|
@@ -3281,7 +3284,7 @@ function DataGrid({
|
|
|
3281
3284
|
})
|
|
3282
3285
|
)
|
|
3283
3286
|
);
|
|
3284
|
-
const updateColumnVisibility = (0,
|
|
3287
|
+
const updateColumnVisibility = (0, import_react17.useCallback)(
|
|
3285
3288
|
(updateOrder) => {
|
|
3286
3289
|
setColumnVisibility(
|
|
3287
3290
|
Object.fromEntries(
|
|
@@ -3295,7 +3298,7 @@ function DataGrid({
|
|
|
3295
3298
|
},
|
|
3296
3299
|
[tableColumns]
|
|
3297
3300
|
);
|
|
3298
|
-
const resetDefaultColumnVisibility = (0,
|
|
3301
|
+
const resetDefaultColumnVisibility = (0, import_react17.useCallback)(() => {
|
|
3299
3302
|
setTableColumns((prev) => {
|
|
3300
3303
|
columns.forEach((column) => {
|
|
3301
3304
|
var _a2, _b2;
|
|
@@ -3311,7 +3314,7 @@ function DataGrid({
|
|
|
3311
3314
|
return [...prev];
|
|
3312
3315
|
}, true);
|
|
3313
3316
|
}, [columns, setTableColumns]);
|
|
3314
|
-
(0,
|
|
3317
|
+
(0, import_react17.useEffect)(() => {
|
|
3315
3318
|
updateColumnVisibility(true);
|
|
3316
3319
|
}, [updateColumnVisibility]);
|
|
3317
3320
|
const sortingState = pagination ? externalSorting != null ? externalSorting : localSorting : localSorting;
|
|
@@ -3327,7 +3330,7 @@ function DataGrid({
|
|
|
3327
3330
|
(onColumnFiltersChange != null ? onColumnFiltersChange : setLocalColumnFilters)(value);
|
|
3328
3331
|
} : setLocalColumnFilters;
|
|
3329
3332
|
const rowSelection = externalRowSelection != null ? externalRowSelection : localRowSelection;
|
|
3330
|
-
const setRowSelection = (0,
|
|
3333
|
+
const setRowSelection = (0, import_react17.useCallback)(
|
|
3331
3334
|
(updaterOrValue) => {
|
|
3332
3335
|
if (pagination) {
|
|
3333
3336
|
const value = typeof updaterOrValue === "function" ? updaterOrValue(externalRowSelection != null ? externalRowSelection : {}) : updaterOrValue;
|
|
@@ -3341,9 +3344,9 @@ function DataGrid({
|
|
|
3341
3344
|
},
|
|
3342
3345
|
[externalRowSelection, onRowSelectionChange, pagination]
|
|
3343
3346
|
);
|
|
3344
|
-
const dndId = (0,
|
|
3345
|
-
const containerRef =
|
|
3346
|
-
const toggleColumnVisibility = (0,
|
|
3347
|
+
const dndId = (0, import_react17.useId)();
|
|
3348
|
+
const containerRef = import_react17.default.useRef(null);
|
|
3349
|
+
const toggleColumnVisibility = (0, import_react17.useCallback)(
|
|
3347
3350
|
(columnId, isVisible) => {
|
|
3348
3351
|
setTableColumns((prev) => {
|
|
3349
3352
|
const persistedIndex = prev.findIndex((col) => col.id === columnId);
|
|
@@ -3591,7 +3594,7 @@ function DataGrid({
|
|
|
3591
3594
|
header.id
|
|
3592
3595
|
);
|
|
3593
3596
|
}
|
|
3594
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react17.default.Fragment, { children: ((_e2 = header.column.columnDef.meta) == null ? void 0 : _e2.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3595
3598
|
DataGridCell,
|
|
3596
3599
|
{
|
|
3597
3600
|
id: id ? `${id}-header-${header.id}` : void 0,
|
|
@@ -3797,7 +3800,7 @@ function adaptTableStateSetter(setter) {
|
|
|
3797
3800
|
}
|
|
3798
3801
|
|
|
3799
3802
|
// src/components/Select.tsx
|
|
3800
|
-
var
|
|
3803
|
+
var import_react18 = require("react");
|
|
3801
3804
|
var import_clsx14 = __toESM(require("clsx"), 1);
|
|
3802
3805
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
3803
3806
|
var Select = (_a) => {
|
|
@@ -3831,11 +3834,11 @@ var Select = (_a) => {
|
|
|
3831
3834
|
"value"
|
|
3832
3835
|
]);
|
|
3833
3836
|
var _a2;
|
|
3834
|
-
const inputRef = (0,
|
|
3835
|
-
const inputContainerRef = (0,
|
|
3836
|
-
const preventFocusOnInitialRender = (0,
|
|
3837
|
-
const [show, setShow] = (0,
|
|
3838
|
-
(0,
|
|
3837
|
+
const inputRef = (0, import_react18.useRef)(null);
|
|
3838
|
+
const inputContainerRef = (0, import_react18.useRef)(null);
|
|
3839
|
+
const preventFocusOnInitialRender = (0, import_react18.useRef)(true);
|
|
3840
|
+
const [show, setShow] = (0, import_react18.useState)(false);
|
|
3841
|
+
(0, import_react18.useEffect)(() => {
|
|
3839
3842
|
var _a3;
|
|
3840
3843
|
if (preventFocusOnInitialRender.current) {
|
|
3841
3844
|
preventFocusOnInitialRender.current = false;
|
|
@@ -4257,7 +4260,7 @@ Button.displayName = "Button";
|
|
|
4257
4260
|
|
|
4258
4261
|
// src/components/Tooltip.tsx
|
|
4259
4262
|
var import_clsx18 = __toESM(require("clsx"), 1);
|
|
4260
|
-
var
|
|
4263
|
+
var import_react19 = require("react");
|
|
4261
4264
|
var import_react_dom2 = require("react-dom");
|
|
4262
4265
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
4263
4266
|
var Tooltip = ({
|
|
@@ -4270,11 +4273,11 @@ var Tooltip = ({
|
|
|
4270
4273
|
offset = 8,
|
|
4271
4274
|
keepHidden = false
|
|
4272
4275
|
}) => {
|
|
4273
|
-
const ref = (0,
|
|
4274
|
-
const tooltipRef = (0,
|
|
4275
|
-
const [tooltipPosition, setTooltipPosition] = (0,
|
|
4276
|
-
const [isVisible, setIsVisible] = (0,
|
|
4277
|
-
const [removeOpacity, setRemoveOpacity] = (0,
|
|
4276
|
+
const ref = (0, import_react19.useRef)(null);
|
|
4277
|
+
const tooltipRef = (0, import_react19.useRef)(null);
|
|
4278
|
+
const [tooltipPosition, setTooltipPosition] = (0, import_react19.useState)({ top: 0, left: 0 });
|
|
4279
|
+
const [isVisible, setIsVisible] = (0, import_react19.useState)(false);
|
|
4280
|
+
const [removeOpacity, setRemoveOpacity] = (0, import_react19.useState)(false);
|
|
4278
4281
|
const updatePosition = () => {
|
|
4279
4282
|
if (!ref.current || !tooltipRef.current) return;
|
|
4280
4283
|
const rect = ref.current.getBoundingClientRect();
|
|
@@ -4313,14 +4316,14 @@ var Tooltip = ({
|
|
|
4313
4316
|
setIsVisible(false);
|
|
4314
4317
|
setRemoveOpacity(false);
|
|
4315
4318
|
};
|
|
4316
|
-
(0,
|
|
4319
|
+
(0, import_react19.useEffect)(() => {
|
|
4317
4320
|
if (isVisible && tooltipRef.current) {
|
|
4318
4321
|
requestAnimationFrame(() => {
|
|
4319
4322
|
updatePosition();
|
|
4320
4323
|
});
|
|
4321
4324
|
}
|
|
4322
4325
|
}, [isVisible]);
|
|
4323
|
-
(0,
|
|
4326
|
+
(0, import_react19.useEffect)(() => {
|
|
4324
4327
|
if (isVisible) {
|
|
4325
4328
|
window.addEventListener("resize", updatePosition);
|
|
4326
4329
|
return () => window.removeEventListener("resize", updatePosition);
|
|
@@ -4378,12 +4381,12 @@ var Tooltip = ({
|
|
|
4378
4381
|
Tooltip.displayName = "Tooltip";
|
|
4379
4382
|
|
|
4380
4383
|
// src/components/DateInput.tsx
|
|
4381
|
-
var
|
|
4384
|
+
var import_react21 = require("react");
|
|
4382
4385
|
var import_react_dom3 = require("react-dom");
|
|
4383
4386
|
|
|
4384
4387
|
// src/components/CalendarRange.tsx
|
|
4385
4388
|
var import_clsx19 = __toESM(require("clsx"), 1);
|
|
4386
|
-
var
|
|
4389
|
+
var import_react20 = __toESM(require("react"), 1);
|
|
4387
4390
|
var import_polyfill = require("@js-temporal/polyfill");
|
|
4388
4391
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
4389
4392
|
function DateCell(_a) {
|
|
@@ -4496,20 +4499,20 @@ function CalendarRange({
|
|
|
4496
4499
|
const fromDate = parseDate(from);
|
|
4497
4500
|
const toDate = parseDate(to);
|
|
4498
4501
|
const today = import_polyfill.Temporal.Now.plainDateISO();
|
|
4499
|
-
const [baseMonth, setBaseMonth] = (0,
|
|
4502
|
+
const [baseMonth, setBaseMonth] = (0, import_react20.useState)(
|
|
4500
4503
|
fromDate != null ? fromDate : today.with({ day: 1 })
|
|
4501
4504
|
);
|
|
4502
|
-
const [selecting, setSelecting] = (0,
|
|
4503
|
-
const [pendingFrom, setPendingFrom] = (0,
|
|
4504
|
-
const [hoveredDate, setHoveredDate] = (0,
|
|
4505
|
-
(0,
|
|
4505
|
+
const [selecting, setSelecting] = (0, import_react20.useState)("from");
|
|
4506
|
+
const [pendingFrom, setPendingFrom] = (0, import_react20.useState)(void 0);
|
|
4507
|
+
const [hoveredDate, setHoveredDate] = (0, import_react20.useState)(void 0);
|
|
4508
|
+
(0, import_react20.useEffect)(() => {
|
|
4506
4509
|
if (fromDate) {
|
|
4507
4510
|
setBaseMonth(fromDate.with({ day: 1 }));
|
|
4508
4511
|
} else if (toDate) {
|
|
4509
4512
|
setBaseMonth(toDate.with({ day: 1 }));
|
|
4510
4513
|
}
|
|
4511
4514
|
}, [from, to]);
|
|
4512
|
-
(0,
|
|
4515
|
+
(0, import_react20.useEffect)(() => {
|
|
4513
4516
|
if (fromDate && toDate) {
|
|
4514
4517
|
setSelecting("from");
|
|
4515
4518
|
setPendingFrom(void 0);
|
|
@@ -4655,14 +4658,14 @@ function CalendarPane({
|
|
|
4655
4658
|
const years = Array.from({ length: 100 }).map(
|
|
4656
4659
|
(_, i) => baseMonth.year - 50 + i
|
|
4657
4660
|
);
|
|
4658
|
-
const [monthMenuOpen, setMonthMenuOpen] = (0,
|
|
4659
|
-
const [yearMenuOpen, setYearMenuOpen] = (0,
|
|
4660
|
-
const monthMenuRef = (0,
|
|
4661
|
-
const yearMenuRef = (0,
|
|
4661
|
+
const [monthMenuOpen, setMonthMenuOpen] = (0, import_react20.useState)(false);
|
|
4662
|
+
const [yearMenuOpen, setYearMenuOpen] = (0, import_react20.useState)(false);
|
|
4663
|
+
const monthMenuRef = (0, import_react20.useRef)(null);
|
|
4664
|
+
const yearMenuRef = (0, import_react20.useRef)(null);
|
|
4662
4665
|
const month = getMonthData(offset);
|
|
4663
4666
|
const totalCells = 42;
|
|
4664
4667
|
const emptyCells = month.firstDayOffset;
|
|
4665
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
4668
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react20.default.Fragment, { children: [
|
|
4666
4669
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
4667
4670
|
"div",
|
|
4668
4671
|
{
|
|
@@ -4870,24 +4873,24 @@ var DateInput = (_a) => {
|
|
|
4870
4873
|
"label",
|
|
4871
4874
|
"isDateAvailable"
|
|
4872
4875
|
]);
|
|
4873
|
-
const [visible, setVisible] = (0,
|
|
4874
|
-
const [inputValue, setInputValue] = (0,
|
|
4875
|
-
const [isTyping, setIsTyping] = (0,
|
|
4876
|
-
const popoverRef = (0,
|
|
4877
|
-
const triggerRef = (0,
|
|
4878
|
-
const rootRef = (0,
|
|
4879
|
-
const [calendarPosition, setCalendarPosition] = (0,
|
|
4876
|
+
const [visible, setVisible] = (0, import_react21.useState)(false);
|
|
4877
|
+
const [inputValue, setInputValue] = (0, import_react21.useState)("");
|
|
4878
|
+
const [isTyping, setIsTyping] = (0, import_react21.useState)(false);
|
|
4879
|
+
const popoverRef = (0, import_react21.useRef)(null);
|
|
4880
|
+
const triggerRef = (0, import_react21.useRef)(null);
|
|
4881
|
+
const rootRef = (0, import_react21.useRef)(null);
|
|
4882
|
+
const [calendarPosition, setCalendarPosition] = (0, import_react21.useState)({
|
|
4880
4883
|
top: 0,
|
|
4881
4884
|
left: 0,
|
|
4882
4885
|
width: 0
|
|
4883
4886
|
});
|
|
4884
4887
|
const [from, to] = [value, ""];
|
|
4885
|
-
(0,
|
|
4888
|
+
(0, import_react21.useEffect)(() => {
|
|
4886
4889
|
if (!isTyping) {
|
|
4887
4890
|
setInputValue(formatDisplayValue(from));
|
|
4888
4891
|
}
|
|
4889
4892
|
}, [from, isTyping]);
|
|
4890
|
-
(0,
|
|
4893
|
+
(0, import_react21.useLayoutEffect)(() => {
|
|
4891
4894
|
if (visible) {
|
|
4892
4895
|
updatePosition();
|
|
4893
4896
|
}
|
|
@@ -4902,7 +4905,7 @@ var DateInput = (_a) => {
|
|
|
4902
4905
|
});
|
|
4903
4906
|
}
|
|
4904
4907
|
};
|
|
4905
|
-
(0,
|
|
4908
|
+
(0, import_react21.useEffect)(() => {
|
|
4906
4909
|
updatePosition();
|
|
4907
4910
|
const resizeObserver = new ResizeObserver(updatePosition);
|
|
4908
4911
|
if (triggerRef.current) {
|
|
@@ -4914,7 +4917,7 @@ var DateInput = (_a) => {
|
|
|
4914
4917
|
window.removeEventListener("scroll", updatePosition);
|
|
4915
4918
|
};
|
|
4916
4919
|
}, []);
|
|
4917
|
-
(0,
|
|
4920
|
+
(0, import_react21.useEffect)(() => {
|
|
4918
4921
|
const handleKeyDown2 = (event) => {
|
|
4919
4922
|
var _a2;
|
|
4920
4923
|
if (event.key === "Escape" && popoverRef.current) {
|
|
@@ -4927,7 +4930,7 @@ var DateInput = (_a) => {
|
|
|
4927
4930
|
document.removeEventListener("keydown", handleKeyDown2);
|
|
4928
4931
|
};
|
|
4929
4932
|
});
|
|
4930
|
-
(0,
|
|
4933
|
+
(0, import_react21.useEffect)(() => {
|
|
4931
4934
|
const handleClickOutside = (event) => {
|
|
4932
4935
|
if (popoverRef.current && !popoverRef.current.contains(event.target) && triggerRef.current && !triggerRef.current.contains(event.target)) {
|
|
4933
4936
|
setVisible(false);
|
|
@@ -5148,14 +5151,14 @@ Heading3.displayName = "Heading3";
|
|
|
5148
5151
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
5149
5152
|
|
|
5150
5153
|
// src/components/MobileDataGrid/ColumnSelector/index.tsx
|
|
5151
|
-
var
|
|
5154
|
+
var import_react24 = require("react");
|
|
5152
5155
|
|
|
5153
5156
|
// src/components/MobileDataGrid/GridContextProvider/useGridContext.ts
|
|
5154
|
-
var
|
|
5157
|
+
var import_react23 = require("react");
|
|
5155
5158
|
|
|
5156
5159
|
// src/components/MobileDataGrid/GridContextProvider/GridContext.tsx
|
|
5157
|
-
var
|
|
5158
|
-
var GridContext = (0,
|
|
5160
|
+
var import_react22 = require("react");
|
|
5161
|
+
var GridContext = (0, import_react22.createContext)(null);
|
|
5159
5162
|
|
|
5160
5163
|
// src/components/MobileDataGrid/ColumnSelector/index.tsx
|
|
5161
5164
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
@@ -5164,12 +5167,12 @@ var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
|
5164
5167
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
5165
5168
|
|
|
5166
5169
|
// src/components/MobileDataGrid/GridContextProvider/index.tsx
|
|
5167
|
-
var
|
|
5170
|
+
var import_react25 = require("react");
|
|
5168
5171
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
5169
5172
|
|
|
5170
5173
|
// src/components/Modal.tsx
|
|
5171
5174
|
var import_clsx28 = __toESM(require("clsx"), 1);
|
|
5172
|
-
var
|
|
5175
|
+
var import_react27 = require("react");
|
|
5173
5176
|
|
|
5174
5177
|
// src/components/ModalHeader.tsx
|
|
5175
5178
|
var import_clsx24 = __toESM(require("clsx"), 1);
|
|
@@ -5345,10 +5348,10 @@ var import_react_dom4 = require("react-dom");
|
|
|
5345
5348
|
var import_react_use = require("react-use");
|
|
5346
5349
|
|
|
5347
5350
|
// src/components/useMounted.tsx
|
|
5348
|
-
var
|
|
5351
|
+
var import_react26 = require("react");
|
|
5349
5352
|
var useMounted = () => {
|
|
5350
|
-
const [isMounted, setIsMounted] = (0,
|
|
5351
|
-
(0,
|
|
5353
|
+
const [isMounted, setIsMounted] = (0, import_react26.useState)(false);
|
|
5354
|
+
(0, import_react26.useEffect)(() => {
|
|
5352
5355
|
setIsMounted(true);
|
|
5353
5356
|
return () => setIsMounted(false);
|
|
5354
5357
|
}, []);
|
|
@@ -5442,12 +5445,12 @@ var Modal = ({
|
|
|
5442
5445
|
}) => {
|
|
5443
5446
|
var _a;
|
|
5444
5447
|
const mounted = useMounted();
|
|
5445
|
-
const modalRef = (0,
|
|
5446
|
-
const bgRef = (0,
|
|
5448
|
+
const modalRef = (0, import_react27.useRef)(null);
|
|
5449
|
+
const bgRef = (0, import_react27.useRef)(null);
|
|
5447
5450
|
const wasOpen = (0, import_react_use.usePrevious)(open);
|
|
5448
5451
|
const isMobile = useMatchesMobile();
|
|
5449
5452
|
const computedFixedHeightScrolling = isMobile || fixedHeightScrolling;
|
|
5450
|
-
(0,
|
|
5453
|
+
(0, import_react27.useEffect)(() => {
|
|
5451
5454
|
if (!mounted) return;
|
|
5452
5455
|
if (!modalRef.current || !bgRef.current) {
|
|
5453
5456
|
console.error("Modal or background reference is not set.");
|
|
@@ -5467,7 +5470,7 @@ var Modal = ({
|
|
|
5467
5470
|
bgFadeIn(bgRef.current);
|
|
5468
5471
|
}
|
|
5469
5472
|
}, [mounted, onClose, open, wasOpen]);
|
|
5470
|
-
const handleKeyDown = (0,
|
|
5473
|
+
const handleKeyDown = (0, import_react27.useCallback)(
|
|
5471
5474
|
(e) => {
|
|
5472
5475
|
if (e.key === "Escape") {
|
|
5473
5476
|
if (onClose) {
|
|
@@ -5478,12 +5481,12 @@ var Modal = ({
|
|
|
5478
5481
|
},
|
|
5479
5482
|
[onClose]
|
|
5480
5483
|
);
|
|
5481
|
-
const handleClose = (0,
|
|
5484
|
+
const handleClose = (0, import_react27.useCallback)(() => {
|
|
5482
5485
|
if (onClose) {
|
|
5483
5486
|
onClose();
|
|
5484
5487
|
}
|
|
5485
5488
|
}, [onClose]);
|
|
5486
|
-
(0,
|
|
5489
|
+
(0, import_react27.useEffect)(() => {
|
|
5487
5490
|
if (open) {
|
|
5488
5491
|
document.addEventListener("keyup", handleKeyDown);
|
|
5489
5492
|
}
|
|
@@ -5491,7 +5494,7 @@ var Modal = ({
|
|
|
5491
5494
|
document.removeEventListener("keyup", handleKeyDown);
|
|
5492
5495
|
};
|
|
5493
5496
|
}, [open, handleKeyDown]);
|
|
5494
|
-
(0,
|
|
5497
|
+
(0, import_react27.useEffect)(() => {
|
|
5495
5498
|
if (!open) return;
|
|
5496
5499
|
const scrollY = window.scrollY;
|
|
5497
5500
|
const body = document.body;
|
|
@@ -5512,7 +5515,7 @@ var Modal = ({
|
|
|
5512
5515
|
};
|
|
5513
5516
|
}, [open]);
|
|
5514
5517
|
const { sizeClass } = (_a = sizes[size]) != null ? _a : sizes.small;
|
|
5515
|
-
const backgroundClickHandler = (0,
|
|
5518
|
+
const backgroundClickHandler = (0, import_react27.useCallback)(
|
|
5516
5519
|
(e) => {
|
|
5517
5520
|
const target = e.target;
|
|
5518
5521
|
const currentTarget = e.currentTarget;
|
|
@@ -5621,10 +5624,10 @@ var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
|
5621
5624
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
5622
5625
|
|
|
5623
5626
|
// src/components/ProductImagePreview/Thumbnail.tsx
|
|
5624
|
-
var
|
|
5627
|
+
var import_react29 = require("react");
|
|
5625
5628
|
|
|
5626
5629
|
// src/components/ImagePlaceholder.tsx
|
|
5627
|
-
var
|
|
5630
|
+
var import_react28 = require("react");
|
|
5628
5631
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
5629
5632
|
|
|
5630
5633
|
// src/components/ProductImagePreview/Thumbnail.tsx
|
|
@@ -5635,11 +5638,11 @@ var import_clsx31 = __toESM(require("clsx"), 1);
|
|
|
5635
5638
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
5636
5639
|
|
|
5637
5640
|
// src/components/ProductImagePreview/ProductPrimaryImage.tsx
|
|
5638
|
-
var
|
|
5641
|
+
var import_react30 = require("react");
|
|
5639
5642
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
5640
5643
|
|
|
5641
5644
|
// src/components/ProductImagePreview/ZoomWindow.tsx
|
|
5642
|
-
var
|
|
5645
|
+
var import_react31 = require("react");
|
|
5643
5646
|
|
|
5644
5647
|
// src/components/Surface.tsx
|
|
5645
5648
|
var import_clsx32 = __toESM(require("clsx"), 1);
|
|
@@ -5684,17 +5687,17 @@ var import_clsx33 = require("clsx");
|
|
|
5684
5687
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
5685
5688
|
|
|
5686
5689
|
// src/components/ProductImagePreview/MobileImageCarousel.tsx
|
|
5687
|
-
var
|
|
5690
|
+
var import_react32 = require("react");
|
|
5688
5691
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
5689
5692
|
|
|
5690
5693
|
// src/components/ProductImagePreview/useProductImagePreview.ts
|
|
5691
|
-
var
|
|
5694
|
+
var import_react33 = require("react");
|
|
5692
5695
|
|
|
5693
5696
|
// src/components/ProductImagePreview/index.tsx
|
|
5694
5697
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
5695
5698
|
|
|
5696
5699
|
// src/components/CompactImagesPreview.tsx
|
|
5697
|
-
var
|
|
5700
|
+
var import_react34 = require("react");
|
|
5698
5701
|
var import_clsx34 = __toESM(require("clsx"), 1);
|
|
5699
5702
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
5700
5703
|
|
|
@@ -5703,12 +5706,12 @@ var import_clsx35 = __toESM(require("clsx"), 1);
|
|
|
5703
5706
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
5704
5707
|
|
|
5705
5708
|
// src/components/ListGroup.tsx
|
|
5706
|
-
var
|
|
5709
|
+
var import_react35 = require("react");
|
|
5707
5710
|
var import_clsx36 = __toESM(require("clsx"), 1);
|
|
5708
5711
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
5709
5712
|
|
|
5710
5713
|
// src/components/Pagination.tsx
|
|
5711
|
-
var
|
|
5714
|
+
var import_react36 = require("react");
|
|
5712
5715
|
var import_clsx37 = __toESM(require("clsx"), 1);
|
|
5713
5716
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
5714
5717
|
var Pagination = ({
|
|
@@ -5720,7 +5723,7 @@ var Pagination = ({
|
|
|
5720
5723
|
className,
|
|
5721
5724
|
disabled
|
|
5722
5725
|
}) => {
|
|
5723
|
-
const goTo = (0,
|
|
5726
|
+
const goTo = (0, import_react36.useCallback)(
|
|
5724
5727
|
(page) => {
|
|
5725
5728
|
if (disabled) return;
|
|
5726
5729
|
onPageChange(page);
|
|
@@ -5737,7 +5740,7 @@ var Pagination = ({
|
|
|
5737
5740
|
goTo(currentPage + 1);
|
|
5738
5741
|
}
|
|
5739
5742
|
};
|
|
5740
|
-
const pageTokens = (0,
|
|
5743
|
+
const pageTokens = (0, import_react36.useMemo)(() => {
|
|
5741
5744
|
if (totalPages <= 5) {
|
|
5742
5745
|
return Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
5743
5746
|
}
|
|
@@ -5860,21 +5863,21 @@ var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
|
5860
5863
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5861
5864
|
|
|
5862
5865
|
// src/components/SearchResultImage/index.tsx
|
|
5863
|
-
var
|
|
5866
|
+
var import_react37 = require("react");
|
|
5864
5867
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
5865
5868
|
|
|
5866
5869
|
// src/components/Alert.tsx
|
|
5867
5870
|
var import_clsx38 = __toESM(require("clsx"), 1);
|
|
5868
|
-
var
|
|
5871
|
+
var import_react38 = require("react");
|
|
5869
5872
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
5870
5873
|
|
|
5871
5874
|
// src/components/OrderCheckIcon.tsx
|
|
5872
5875
|
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
5873
5876
|
|
|
5874
5877
|
// src/components/EditingContext.tsx
|
|
5875
|
-
var
|
|
5878
|
+
var import_react39 = require("react");
|
|
5876
5879
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
5877
|
-
var EditingContext = (0,
|
|
5880
|
+
var EditingContext = (0, import_react39.createContext)(null);
|
|
5878
5881
|
|
|
5879
5882
|
// src/components/AccessCard.tsx
|
|
5880
5883
|
var import_clsx40 = __toESM(require("clsx"), 1);
|
|
@@ -6008,7 +6011,7 @@ var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
|
6008
6011
|
|
|
6009
6012
|
// src/components/AccessCardGroup.tsx
|
|
6010
6013
|
var import_clsx41 = __toESM(require("clsx"), 1);
|
|
6011
|
-
var
|
|
6014
|
+
var import_react40 = require("react");
|
|
6012
6015
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
6013
6016
|
|
|
6014
6017
|
// src/components/DataGrid/utils.tsx
|