@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
|
@@ -116,7 +116,7 @@ var CSS = /* @__PURE__ */ Object.freeze({
|
|
|
116
116
|
|
|
117
117
|
// src/components/DataGridCell.tsx
|
|
118
118
|
var import_clsx9 = __toESM(require("clsx"), 1);
|
|
119
|
-
var
|
|
119
|
+
var import_react12 = require("react");
|
|
120
120
|
|
|
121
121
|
// src/classNames.ts
|
|
122
122
|
var import_clsx = __toESM(require("clsx"), 1);
|
|
@@ -260,7 +260,7 @@ var gapUsingContainerPadding = (0, import_clsx.default)(
|
|
|
260
260
|
|
|
261
261
|
// src/components/MenuOption.tsx
|
|
262
262
|
var import_clsx6 = __toESM(require("clsx"), 1);
|
|
263
|
-
var
|
|
263
|
+
var import_react7 = require("react");
|
|
264
264
|
|
|
265
265
|
// src/components/Label.tsx
|
|
266
266
|
var import_clsx2 = __toESM(require("clsx"), 1);
|
|
@@ -710,6 +710,9 @@ function useTableLayout(initialColumns, key, autosync = true) {
|
|
|
710
710
|
return { columns, setColumns: handleSaveLayout, isReady, getSavedLayout };
|
|
711
711
|
}
|
|
712
712
|
|
|
713
|
+
// src/hooks/useEditCell.tsx
|
|
714
|
+
var import_react6 = require("react");
|
|
715
|
+
|
|
713
716
|
// src/components/Caption.tsx
|
|
714
717
|
var import_clsx5 = __toESM(require("clsx"), 1);
|
|
715
718
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
@@ -861,12 +864,12 @@ var MenuOption = ({
|
|
|
861
864
|
onMouseMove,
|
|
862
865
|
small = false
|
|
863
866
|
}) => {
|
|
864
|
-
const uniqueId = (0,
|
|
865
|
-
const internalRef = (0,
|
|
867
|
+
const uniqueId = (0, import_react7.useId)();
|
|
868
|
+
const internalRef = (0, import_react7.useRef)(null);
|
|
866
869
|
const actualRef = ref || internalRef;
|
|
867
|
-
const menuId = (0,
|
|
870
|
+
const menuId = (0, import_react7.useRef)(`menu-${uniqueId}`);
|
|
868
871
|
const isMobile = useMatchesMobile();
|
|
869
|
-
const [isSubMenuHovered, setIsSubMenuHovered] = (0,
|
|
872
|
+
const [isSubMenuHovered, setIsSubMenuHovered] = (0, import_react7.useState)(false);
|
|
870
873
|
const handleMouseEnter = () => {
|
|
871
874
|
if (subMenu && onSubMenuHover && !disabled) {
|
|
872
875
|
onSubMenuHover(menuId.current, subMenuLevel);
|
|
@@ -1026,27 +1029,27 @@ function highlightMatch(text, searchValue) {
|
|
|
1026
1029
|
|
|
1027
1030
|
// src/components/Menu.tsx
|
|
1028
1031
|
var import_clsx7 = __toESM(require("clsx"), 1);
|
|
1029
|
-
var
|
|
1032
|
+
var import_react9 = require("react");
|
|
1030
1033
|
var import_react_dom = require("react-dom");
|
|
1031
1034
|
|
|
1032
1035
|
// src/components/useMenuSystem.tsx
|
|
1033
|
-
var
|
|
1036
|
+
var import_react8 = require("react");
|
|
1034
1037
|
function useSubMenuSystem(mobilePositionTo) {
|
|
1035
|
-
const [activeMenus, setActiveMenus] = (0,
|
|
1038
|
+
const [activeMenus, setActiveMenus] = (0, import_react8.useState)(
|
|
1036
1039
|
{}
|
|
1037
1040
|
);
|
|
1038
|
-
const [activeMenu, setActiveMenu] = (0,
|
|
1039
|
-
const [currentSubMenuLevel, setCurrentSubMenuLevel] = (0,
|
|
1041
|
+
const [activeMenu, setActiveMenu] = (0, import_react8.useState)("");
|
|
1042
|
+
const [currentSubMenuLevel, setCurrentSubMenuLevel] = (0, import_react8.useState)(
|
|
1040
1043
|
null
|
|
1041
1044
|
);
|
|
1042
|
-
const menuRootRef = (0,
|
|
1043
|
-
const subMenuRefs = (0,
|
|
1044
|
-
const hoverTimeoutRef = (0,
|
|
1045
|
-
const closeTimeoutRef = (0,
|
|
1046
|
-
const mouseStopTimeoutRef = (0,
|
|
1047
|
-
const isMouseMovingRef = (0,
|
|
1048
|
-
const pendingOpenActionRef = (0,
|
|
1049
|
-
const pendingCloseActionRef = (0,
|
|
1045
|
+
const menuRootRef = (0, import_react8.useRef)(null);
|
|
1046
|
+
const subMenuRefs = (0, import_react8.useRef)({});
|
|
1047
|
+
const hoverTimeoutRef = (0, import_react8.useRef)(null);
|
|
1048
|
+
const closeTimeoutRef = (0, import_react8.useRef)(null);
|
|
1049
|
+
const mouseStopTimeoutRef = (0, import_react8.useRef)(null);
|
|
1050
|
+
const isMouseMovingRef = (0, import_react8.useRef)(false);
|
|
1051
|
+
const pendingOpenActionRef = (0, import_react8.useRef)(null);
|
|
1052
|
+
const pendingCloseActionRef = (0, import_react8.useRef)(null);
|
|
1050
1053
|
const isMobile = useMatchesMobile();
|
|
1051
1054
|
const toggleMenu = (menuId, level) => {
|
|
1052
1055
|
if (closeTimeoutRef.current) {
|
|
@@ -1086,7 +1089,7 @@ function useSubMenuSystem(mobilePositionTo) {
|
|
|
1086
1089
|
return newActiveMenus;
|
|
1087
1090
|
});
|
|
1088
1091
|
};
|
|
1089
|
-
const executePendingActions = (0,
|
|
1092
|
+
const executePendingActions = (0, import_react8.useCallback)(() => {
|
|
1090
1093
|
if (pendingCloseActionRef.current) {
|
|
1091
1094
|
pendingCloseActionRef.current();
|
|
1092
1095
|
pendingCloseActionRef.current = null;
|
|
@@ -1175,7 +1178,7 @@ function useSubMenuSystem(mobilePositionTo) {
|
|
|
1175
1178
|
const isMenuActive = (menuId, level) => {
|
|
1176
1179
|
return activeMenus[level] === menuId;
|
|
1177
1180
|
};
|
|
1178
|
-
(0,
|
|
1181
|
+
(0, import_react8.useEffect)(() => {
|
|
1179
1182
|
const handleClickOutside = (event) => {
|
|
1180
1183
|
var _a;
|
|
1181
1184
|
if (Object.keys(activeMenus).length === 0) return;
|
|
@@ -1194,7 +1197,7 @@ function useSubMenuSystem(mobilePositionTo) {
|
|
|
1194
1197
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
1195
1198
|
};
|
|
1196
1199
|
}, [activeMenus]);
|
|
1197
|
-
(0,
|
|
1200
|
+
(0, import_react8.useEffect)(() => {
|
|
1198
1201
|
return () => {
|
|
1199
1202
|
if (hoverTimeoutRef.current) {
|
|
1200
1203
|
clearTimeout(hoverTimeoutRef.current);
|
|
@@ -1272,13 +1275,13 @@ function useSubMenuSystem(mobilePositionTo) {
|
|
|
1272
1275
|
};
|
|
1273
1276
|
}
|
|
1274
1277
|
function useMenuPosition(elementRef, position = "bottom", options) {
|
|
1275
|
-
const [menuPosition, setMenuPosition] = (0,
|
|
1278
|
+
const [menuPosition, setMenuPosition] = (0, import_react8.useState)({
|
|
1276
1279
|
top: 0,
|
|
1277
1280
|
left: 0,
|
|
1278
1281
|
minWidth: 0
|
|
1279
1282
|
});
|
|
1280
1283
|
const isMobile = options == null ? void 0 : options.isMobile;
|
|
1281
|
-
const updatePosition = (0,
|
|
1284
|
+
const updatePosition = (0, import_react8.useCallback)(() => {
|
|
1282
1285
|
var _a, _b, _c;
|
|
1283
1286
|
if (!(elementRef == null ? void 0 : elementRef.current)) return;
|
|
1284
1287
|
const triggerRect = elementRef.current.getBoundingClientRect();
|
|
@@ -1326,7 +1329,7 @@ function useMenuPosition(elementRef, position = "bottom", options) {
|
|
|
1326
1329
|
minWidth: triggerRect.width
|
|
1327
1330
|
});
|
|
1328
1331
|
}, [elementRef, position, options == null ? void 0 : options.menuRef, options == null ? void 0 : options.topOffset, isMobile]);
|
|
1329
|
-
(0,
|
|
1332
|
+
(0, import_react8.useEffect)(() => {
|
|
1330
1333
|
if (!(options == null ? void 0 : options.isOpen) || !(options == null ? void 0 : options.setIsOpen)) return;
|
|
1331
1334
|
const handleClickOutside = (event) => {
|
|
1332
1335
|
var _a, _b, _c, _d, _e;
|
|
@@ -1352,7 +1355,7 @@ function useMenuPosition(elementRef, position = "bottom", options) {
|
|
|
1352
1355
|
options == null ? void 0 : options.menuRef,
|
|
1353
1356
|
options == null ? void 0 : options.additionalRefs
|
|
1354
1357
|
]);
|
|
1355
|
-
(0,
|
|
1358
|
+
(0, import_react8.useEffect)(() => {
|
|
1356
1359
|
updatePosition();
|
|
1357
1360
|
const resizeObserver = new ResizeObserver(updatePosition);
|
|
1358
1361
|
if (elementRef == null ? void 0 : elementRef.current) {
|
|
@@ -1433,9 +1436,9 @@ var Menu = (_a) => {
|
|
|
1433
1436
|
"menuName",
|
|
1434
1437
|
"calculateMinMaxHeight"
|
|
1435
1438
|
]);
|
|
1436
|
-
const internalRef = (0,
|
|
1439
|
+
const internalRef = (0, import_react9.useRef)(null);
|
|
1437
1440
|
const actualRef = ref || internalRef;
|
|
1438
|
-
const [maxHeight, setMaxHeight] = (0,
|
|
1441
|
+
const [maxHeight, setMaxHeight] = (0, import_react9.useState)("180px");
|
|
1439
1442
|
const isMobile = useMatchesMobile();
|
|
1440
1443
|
const { menuPosition, updatePosition } = useMenuPosition(
|
|
1441
1444
|
isMobile && mobilePositionTo ? mobilePositionTo : positionTo,
|
|
@@ -1448,7 +1451,7 @@ var Menu = (_a) => {
|
|
|
1448
1451
|
isMobile: !!(isMobile && mobilePositionTo)
|
|
1449
1452
|
}
|
|
1450
1453
|
);
|
|
1451
|
-
(0,
|
|
1454
|
+
(0, import_react9.useEffect)(() => {
|
|
1452
1455
|
if (calculateMinMaxHeight) {
|
|
1453
1456
|
return;
|
|
1454
1457
|
}
|
|
@@ -1472,7 +1475,7 @@ var Menu = (_a) => {
|
|
|
1472
1475
|
cancelAnimationFrame(raf);
|
|
1473
1476
|
};
|
|
1474
1477
|
}, [actualRef.current, customMaxHeight, calculateMinMaxHeight]);
|
|
1475
|
-
(0,
|
|
1478
|
+
(0, import_react9.useEffect)(() => {
|
|
1476
1479
|
if (!calculateMinMaxHeight) {
|
|
1477
1480
|
return;
|
|
1478
1481
|
}
|
|
@@ -1483,14 +1486,14 @@ var Menu = (_a) => {
|
|
|
1483
1486
|
setMaxHeight(`${calculatedMaxHeight}px`);
|
|
1484
1487
|
}
|
|
1485
1488
|
}, [actualRef.current, positionTo == null ? void 0 : positionTo.current, calculateMinMaxHeight]);
|
|
1486
|
-
(0,
|
|
1489
|
+
(0, import_react9.useEffect)(() => {
|
|
1487
1490
|
if (!show) {
|
|
1488
1491
|
return;
|
|
1489
1492
|
}
|
|
1490
1493
|
initializeMenuFocus();
|
|
1491
1494
|
updatePosition();
|
|
1492
1495
|
}, [show, updatePosition]);
|
|
1493
|
-
(0,
|
|
1496
|
+
(0, import_react9.useEffect)(() => {
|
|
1494
1497
|
if (!show || !setShow) {
|
|
1495
1498
|
return;
|
|
1496
1499
|
}
|
|
@@ -1644,10 +1647,10 @@ var Menu = (_a) => {
|
|
|
1644
1647
|
Menu.displayName = "Menu";
|
|
1645
1648
|
|
|
1646
1649
|
// src/components/Search.tsx
|
|
1647
|
-
var
|
|
1650
|
+
var import_react11 = require("react");
|
|
1648
1651
|
|
|
1649
1652
|
// src/components/Input.tsx
|
|
1650
|
-
var
|
|
1653
|
+
var import_react10 = require("react");
|
|
1651
1654
|
var import_clsx8 = __toESM(require("clsx"), 1);
|
|
1652
1655
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1653
1656
|
var InputBase = (_a) => {
|
|
@@ -1704,9 +1707,9 @@ var InputBase = (_a) => {
|
|
|
1704
1707
|
"data-error": error && !focus || null,
|
|
1705
1708
|
"data-focus": focus || null
|
|
1706
1709
|
};
|
|
1707
|
-
const inputRef = (0,
|
|
1710
|
+
const inputRef = (0, import_react10.useRef)(null);
|
|
1708
1711
|
const inputId = id ? `${id}-input` : void 0;
|
|
1709
|
-
(0,
|
|
1712
|
+
(0, import_react10.useEffect)(() => {
|
|
1710
1713
|
var _a2;
|
|
1711
1714
|
const input = inputRef.current;
|
|
1712
1715
|
const focusHandler = () => {
|
|
@@ -1865,15 +1868,15 @@ var Input = (_a) => {
|
|
|
1865
1868
|
"testid",
|
|
1866
1869
|
"rightAdornment"
|
|
1867
1870
|
]);
|
|
1868
|
-
const [internalValue, setInternalValue] = (0,
|
|
1869
|
-
const [displayValue, setDisplayValue] = (0,
|
|
1870
|
-
(0,
|
|
1871
|
+
const [internalValue, setInternalValue] = (0, import_react10.useState)("");
|
|
1872
|
+
const [displayValue, setDisplayValue] = (0, import_react10.useState)("");
|
|
1873
|
+
(0, import_react10.useEffect)(() => {
|
|
1871
1874
|
var _a2;
|
|
1872
1875
|
const stringValue = (_a2 = propValue == null ? void 0 : propValue.toString()) != null ? _a2 : "";
|
|
1873
1876
|
setInternalValue(stringValue);
|
|
1874
1877
|
setDisplayValue(stringValue);
|
|
1875
1878
|
}, [propValue]);
|
|
1876
|
-
(0,
|
|
1879
|
+
(0, import_react10.useEffect)(() => {
|
|
1877
1880
|
var _a2;
|
|
1878
1881
|
if (variant !== "currency") {
|
|
1879
1882
|
return;
|
|
@@ -2134,14 +2137,14 @@ var Search = (_a) => {
|
|
|
2134
2137
|
"removeRoundness",
|
|
2135
2138
|
"autocompletePadding"
|
|
2136
2139
|
]);
|
|
2137
|
-
const inputRef = (0,
|
|
2138
|
-
const inputContainerRef = (0,
|
|
2139
|
-
const preventFocusOnInitialRender = (0,
|
|
2140
|
-
const [show, setShow] = (0,
|
|
2141
|
-
const [clearing, setClearing] = (0,
|
|
2142
|
-
const uniqueId = (0,
|
|
2140
|
+
const inputRef = (0, import_react11.useRef)(null);
|
|
2141
|
+
const inputContainerRef = (0, import_react11.useRef)(null);
|
|
2142
|
+
const preventFocusOnInitialRender = (0, import_react11.useRef)(true);
|
|
2143
|
+
const [show, setShow] = (0, import_react11.useState)(false);
|
|
2144
|
+
const [clearing, setClearing] = (0, import_react11.useState)(false);
|
|
2145
|
+
const uniqueId = (0, import_react11.useId)();
|
|
2143
2146
|
const searchMenuName = `search-menu-${uniqueId}`;
|
|
2144
|
-
(0,
|
|
2147
|
+
(0, import_react11.useEffect)(() => {
|
|
2145
2148
|
var _a2;
|
|
2146
2149
|
if (preventFocusOnInitialRender.current) {
|
|
2147
2150
|
preventFocusOnInitialRender.current = false;
|
|
@@ -2225,7 +2228,7 @@ Search.displayName = "Search";
|
|
|
2225
2228
|
|
|
2226
2229
|
// src/components/DataGridCell.tsx
|
|
2227
2230
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
2228
|
-
var DataGridCell = (0,
|
|
2231
|
+
var DataGridCell = (0, import_react12.memo)(
|
|
2229
2232
|
(_a) => {
|
|
2230
2233
|
var _b = _a, {
|
|
2231
2234
|
id,
|
|
@@ -2267,10 +2270,10 @@ var DataGridCell = (0, import_react11.memo)(
|
|
|
2267
2270
|
"testid"
|
|
2268
2271
|
]);
|
|
2269
2272
|
const Element = type === "header" ? "th" : "td";
|
|
2270
|
-
const timerRef = (0,
|
|
2271
|
-
const [isGrabbing, setIsGrabbing] = (0,
|
|
2272
|
-
const [isPointerPressed, setIsPointerPressed] = (0,
|
|
2273
|
-
(0,
|
|
2273
|
+
const timerRef = (0, import_react12.useRef)(null);
|
|
2274
|
+
const [isGrabbing, setIsGrabbing] = (0, import_react12.useState)(false);
|
|
2275
|
+
const [isPointerPressed, setIsPointerPressed] = (0, import_react12.useState)(false);
|
|
2276
|
+
(0, import_react12.useEffect)(() => {
|
|
2274
2277
|
return () => {
|
|
2275
2278
|
if (timerRef.current) {
|
|
2276
2279
|
clearTimeout(timerRef.current);
|
|
@@ -2380,12 +2383,12 @@ function DataCellHeader(_a) {
|
|
|
2380
2383
|
"useMenuDefaultMinWidth"
|
|
2381
2384
|
]);
|
|
2382
2385
|
var _a2;
|
|
2383
|
-
const [showMenu, setShowMenu] = (0,
|
|
2384
|
-
const [filter, setFilter] = (0,
|
|
2386
|
+
const [showMenu, setShowMenu] = (0, import_react12.useState)(false);
|
|
2387
|
+
const [filter, setFilter] = (0, import_react12.useState)(
|
|
2385
2388
|
(_a2 = header.column.getFilterValue()) != null ? _a2 : ""
|
|
2386
2389
|
);
|
|
2387
|
-
const ref = (0,
|
|
2388
|
-
const predeterminedPinned = (0,
|
|
2390
|
+
const ref = (0, import_react12.useRef)(null);
|
|
2391
|
+
const predeterminedPinned = (0, import_react12.useRef)(false);
|
|
2389
2392
|
const { column, getContext } = header;
|
|
2390
2393
|
const { id: columnId, setFilterValue } = column;
|
|
2391
2394
|
const {
|
|
@@ -2395,14 +2398,14 @@ function DataCellHeader(_a) {
|
|
|
2395
2398
|
listeners: subMenuListeners,
|
|
2396
2399
|
mobileHide
|
|
2397
2400
|
} = useSubMenuSystem(node ? node : ref);
|
|
2398
|
-
(0,
|
|
2401
|
+
(0, import_react12.useEffect)(() => {
|
|
2399
2402
|
var _a3, _b2, _c;
|
|
2400
2403
|
const columnPinning = (_a3 = getContext().table.options.initialState) == null ? void 0 : _a3.columnPinning;
|
|
2401
2404
|
const left = (_b2 = columnPinning == null ? void 0 : columnPinning.left) != null ? _b2 : [];
|
|
2402
2405
|
const right = (_c = columnPinning == null ? void 0 : columnPinning.right) != null ? _c : [];
|
|
2403
2406
|
predeterminedPinned.current = [...left, ...right].includes(columnId);
|
|
2404
2407
|
}, [columnId, getContext]);
|
|
2405
|
-
(0,
|
|
2408
|
+
(0, import_react12.useEffect)(() => {
|
|
2406
2409
|
const handler = setTimeout(() => {
|
|
2407
2410
|
setFilterValue(filter);
|
|
2408
2411
|
}, 500);
|
|
@@ -2665,7 +2668,7 @@ function DragAlongCell(_a) {
|
|
|
2665
2668
|
DragAlongCell.displayName = "DragAlongCell";
|
|
2666
2669
|
|
|
2667
2670
|
// src/components/DataGrid/index.tsx
|
|
2668
|
-
var
|
|
2671
|
+
var import_react17 = __toESM(require("react"), 1);
|
|
2669
2672
|
var import_react_table3 = require("@tanstack/react-table");
|
|
2670
2673
|
var import_core = require("@dnd-kit/core");
|
|
2671
2674
|
var import_sortable2 = require("@dnd-kit/sortable");
|
|
@@ -2693,7 +2696,7 @@ function getSortIcon(sort, nextSort = false) {
|
|
|
2693
2696
|
}
|
|
2694
2697
|
|
|
2695
2698
|
// src/components/DataGrid/PinnedColumns.tsx
|
|
2696
|
-
var
|
|
2699
|
+
var import_react16 = __toESM(require("react"), 1);
|
|
2697
2700
|
|
|
2698
2701
|
// src/components/DataGrid/TableBody/index.tsx
|
|
2699
2702
|
var import_react_virtual = require("@tanstack/react-virtual");
|
|
@@ -2702,7 +2705,7 @@ var import_clsx12 = __toESM(require("clsx"), 1);
|
|
|
2702
2705
|
// src/components/DataGrid/TableBody/TableBodyRow.tsx
|
|
2703
2706
|
var import_clsx11 = __toESM(require("clsx"), 1);
|
|
2704
2707
|
var import_react_table = require("@tanstack/react-table");
|
|
2705
|
-
var
|
|
2708
|
+
var import_react13 = __toESM(require("react"), 1);
|
|
2706
2709
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
2707
2710
|
var valueFormatters = {
|
|
2708
2711
|
date: (value) => typeof value === "string" ? formatDate(value) : "",
|
|
@@ -2770,7 +2773,7 @@ function TableBodyRow({
|
|
|
2770
2773
|
const cellFormat = (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.format;
|
|
2771
2774
|
const cellValue = cellFormat && isValueFormatterKey(cellFormat) ? valueFormatters[cellFormat](cell.getValue()) : cell.getValue();
|
|
2772
2775
|
const cellAlignment = (_c = (_b = cell.column.columnDef.meta) == null ? void 0 : _b.align) != null ? _c : typeof cellValue === "number" ? "right" : "left";
|
|
2773
|
-
return ((_d = cell.column.columnDef.meta) == null ? void 0 : _d.useCustomRenderer) ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2776
|
+
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)(
|
|
2774
2777
|
CellElement,
|
|
2775
2778
|
{
|
|
2776
2779
|
id: id ? `${id}-row-${row.id}-cell-${cell.id}` : void 0,
|
|
@@ -2949,10 +2952,10 @@ function TableBody({
|
|
|
2949
2952
|
}
|
|
2950
2953
|
|
|
2951
2954
|
// src/components/DataGrid/ColumnSelectorHeaderCell/index.tsx
|
|
2952
|
-
var
|
|
2955
|
+
var import_react15 = require("react");
|
|
2953
2956
|
|
|
2954
2957
|
// src/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.tsx
|
|
2955
|
-
var
|
|
2958
|
+
var import_react14 = require("react");
|
|
2956
2959
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2957
2960
|
function ColumnSelectorMenuOption({
|
|
2958
2961
|
id,
|
|
@@ -2960,7 +2963,7 @@ function ColumnSelectorMenuOption({
|
|
|
2960
2963
|
column,
|
|
2961
2964
|
toggleColumnVisibility
|
|
2962
2965
|
}) {
|
|
2963
|
-
const [isVisible, setIsVisible] = (0,
|
|
2966
|
+
const [isVisible, setIsVisible] = (0, import_react14.useState)(column.getIsVisible());
|
|
2964
2967
|
const label = typeof column.columnDef.header === "string" ? column.columnDef.header : null;
|
|
2965
2968
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MenuOption, { id, testid, defaultChecked: isVisible, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2966
2969
|
Checkbox,
|
|
@@ -2986,8 +2989,8 @@ function ColumnSelectorHeaderCell({
|
|
|
2986
2989
|
toggleColumnVisibility,
|
|
2987
2990
|
resetColumnVisibility
|
|
2988
2991
|
}) {
|
|
2989
|
-
const ref = (0,
|
|
2990
|
-
const [show, setShow] = (0,
|
|
2992
|
+
const ref = (0, import_react15.useRef)(null);
|
|
2993
|
+
const [show, setShow] = (0, import_react15.useState)(false);
|
|
2991
2994
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2992
2995
|
DataGridCell,
|
|
2993
2996
|
{
|
|
@@ -3156,7 +3159,7 @@ function PinnedColumns(_a) {
|
|
|
3156
3159
|
header.id
|
|
3157
3160
|
);
|
|
3158
3161
|
}
|
|
3159
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3162
|
+
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)(
|
|
3160
3163
|
Checkbox,
|
|
3161
3164
|
{
|
|
3162
3165
|
checked: allSelectedAcrossPages,
|
|
@@ -3238,23 +3241,23 @@ function DataGrid({
|
|
|
3238
3241
|
ref
|
|
3239
3242
|
}) {
|
|
3240
3243
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
3241
|
-
(0,
|
|
3244
|
+
(0, import_react17.useImperativeHandle)(ref, () => ({
|
|
3242
3245
|
getSavedLayout: () => {
|
|
3243
3246
|
return getSavedLayout();
|
|
3244
3247
|
}
|
|
3245
3248
|
}));
|
|
3246
|
-
const [localSorting, setLocalSorting] = (0,
|
|
3247
|
-
const [localColumnFilters, setLocalColumnFilters] = (0,
|
|
3248
|
-
const [localRowSelection, setLocalRowSelection] = (0,
|
|
3249
|
+
const [localSorting, setLocalSorting] = (0, import_react17.useState)([]);
|
|
3250
|
+
const [localColumnFilters, setLocalColumnFilters] = (0, import_react17.useState)([]);
|
|
3251
|
+
const [localRowSelection, setLocalRowSelection] = (0, import_react17.useState)({});
|
|
3249
3252
|
const {
|
|
3250
3253
|
columns: tableColumns,
|
|
3251
3254
|
setColumns: setTableColumns,
|
|
3252
3255
|
getSavedLayout
|
|
3253
3256
|
} = useTableLayout(columns, id != null ? id : testid);
|
|
3254
|
-
const [columnOrder, setColumnOrder] = (0,
|
|
3257
|
+
const [columnOrder, setColumnOrder] = (0, import_react17.useState)(
|
|
3255
3258
|
tableColumns.map((c) => c.id)
|
|
3256
3259
|
);
|
|
3257
|
-
const [columnVisibility, setColumnVisibility] = (0,
|
|
3260
|
+
const [columnVisibility, setColumnVisibility] = (0, import_react17.useState)(
|
|
3258
3261
|
Object.fromEntries(
|
|
3259
3262
|
tableColumns.filter((column) => !!column.id).map((column) => {
|
|
3260
3263
|
var _a2, _b2;
|
|
@@ -3262,7 +3265,7 @@ function DataGrid({
|
|
|
3262
3265
|
})
|
|
3263
3266
|
)
|
|
3264
3267
|
);
|
|
3265
|
-
const updateColumnVisibility = (0,
|
|
3268
|
+
const updateColumnVisibility = (0, import_react17.useCallback)(
|
|
3266
3269
|
(updateOrder) => {
|
|
3267
3270
|
setColumnVisibility(
|
|
3268
3271
|
Object.fromEntries(
|
|
@@ -3276,7 +3279,7 @@ function DataGrid({
|
|
|
3276
3279
|
},
|
|
3277
3280
|
[tableColumns]
|
|
3278
3281
|
);
|
|
3279
|
-
const resetDefaultColumnVisibility = (0,
|
|
3282
|
+
const resetDefaultColumnVisibility = (0, import_react17.useCallback)(() => {
|
|
3280
3283
|
setTableColumns((prev) => {
|
|
3281
3284
|
columns.forEach((column) => {
|
|
3282
3285
|
var _a2, _b2;
|
|
@@ -3292,7 +3295,7 @@ function DataGrid({
|
|
|
3292
3295
|
return [...prev];
|
|
3293
3296
|
}, true);
|
|
3294
3297
|
}, [columns, setTableColumns]);
|
|
3295
|
-
(0,
|
|
3298
|
+
(0, import_react17.useEffect)(() => {
|
|
3296
3299
|
updateColumnVisibility(true);
|
|
3297
3300
|
}, [updateColumnVisibility]);
|
|
3298
3301
|
const sortingState = pagination ? externalSorting != null ? externalSorting : localSorting : localSorting;
|
|
@@ -3308,7 +3311,7 @@ function DataGrid({
|
|
|
3308
3311
|
(onColumnFiltersChange != null ? onColumnFiltersChange : setLocalColumnFilters)(value);
|
|
3309
3312
|
} : setLocalColumnFilters;
|
|
3310
3313
|
const rowSelection = externalRowSelection != null ? externalRowSelection : localRowSelection;
|
|
3311
|
-
const setRowSelection = (0,
|
|
3314
|
+
const setRowSelection = (0, import_react17.useCallback)(
|
|
3312
3315
|
(updaterOrValue) => {
|
|
3313
3316
|
if (pagination) {
|
|
3314
3317
|
const value = typeof updaterOrValue === "function" ? updaterOrValue(externalRowSelection != null ? externalRowSelection : {}) : updaterOrValue;
|
|
@@ -3322,9 +3325,9 @@ function DataGrid({
|
|
|
3322
3325
|
},
|
|
3323
3326
|
[externalRowSelection, onRowSelectionChange, pagination]
|
|
3324
3327
|
);
|
|
3325
|
-
const dndId = (0,
|
|
3326
|
-
const containerRef =
|
|
3327
|
-
const toggleColumnVisibility = (0,
|
|
3328
|
+
const dndId = (0, import_react17.useId)();
|
|
3329
|
+
const containerRef = import_react17.default.useRef(null);
|
|
3330
|
+
const toggleColumnVisibility = (0, import_react17.useCallback)(
|
|
3328
3331
|
(columnId, isVisible) => {
|
|
3329
3332
|
setTableColumns((prev) => {
|
|
3330
3333
|
const persistedIndex = prev.findIndex((col) => col.id === columnId);
|
|
@@ -3572,7 +3575,7 @@ function DataGrid({
|
|
|
3572
3575
|
header.id
|
|
3573
3576
|
);
|
|
3574
3577
|
}
|
|
3575
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3578
|
+
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)(
|
|
3576
3579
|
DataGridCell,
|
|
3577
3580
|
{
|
|
3578
3581
|
id: id ? `${id}-header-${header.id}` : void 0,
|
|
@@ -3778,7 +3781,7 @@ function adaptTableStateSetter(setter) {
|
|
|
3778
3781
|
}
|
|
3779
3782
|
|
|
3780
3783
|
// src/components/Select.tsx
|
|
3781
|
-
var
|
|
3784
|
+
var import_react18 = require("react");
|
|
3782
3785
|
var import_clsx15 = __toESM(require("clsx"), 1);
|
|
3783
3786
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
3784
3787
|
var Select = (_a) => {
|
|
@@ -3812,11 +3815,11 @@ var Select = (_a) => {
|
|
|
3812
3815
|
"value"
|
|
3813
3816
|
]);
|
|
3814
3817
|
var _a2;
|
|
3815
|
-
const inputRef = (0,
|
|
3816
|
-
const inputContainerRef = (0,
|
|
3817
|
-
const preventFocusOnInitialRender = (0,
|
|
3818
|
-
const [show, setShow] = (0,
|
|
3819
|
-
(0,
|
|
3818
|
+
const inputRef = (0, import_react18.useRef)(null);
|
|
3819
|
+
const inputContainerRef = (0, import_react18.useRef)(null);
|
|
3820
|
+
const preventFocusOnInitialRender = (0, import_react18.useRef)(true);
|
|
3821
|
+
const [show, setShow] = (0, import_react18.useState)(false);
|
|
3822
|
+
(0, import_react18.useEffect)(() => {
|
|
3820
3823
|
var _a3;
|
|
3821
3824
|
if (preventFocusOnInitialRender.current) {
|
|
3822
3825
|
preventFocusOnInitialRender.current = false;
|
|
@@ -4238,7 +4241,7 @@ Button.displayName = "Button";
|
|
|
4238
4241
|
|
|
4239
4242
|
// src/components/Tooltip.tsx
|
|
4240
4243
|
var import_clsx19 = __toESM(require("clsx"), 1);
|
|
4241
|
-
var
|
|
4244
|
+
var import_react19 = require("react");
|
|
4242
4245
|
var import_react_dom2 = require("react-dom");
|
|
4243
4246
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
4244
4247
|
var Tooltip = ({
|
|
@@ -4251,11 +4254,11 @@ var Tooltip = ({
|
|
|
4251
4254
|
offset = 8,
|
|
4252
4255
|
keepHidden = false
|
|
4253
4256
|
}) => {
|
|
4254
|
-
const ref = (0,
|
|
4255
|
-
const tooltipRef = (0,
|
|
4256
|
-
const [tooltipPosition, setTooltipPosition] = (0,
|
|
4257
|
-
const [isVisible, setIsVisible] = (0,
|
|
4258
|
-
const [removeOpacity, setRemoveOpacity] = (0,
|
|
4257
|
+
const ref = (0, import_react19.useRef)(null);
|
|
4258
|
+
const tooltipRef = (0, import_react19.useRef)(null);
|
|
4259
|
+
const [tooltipPosition, setTooltipPosition] = (0, import_react19.useState)({ top: 0, left: 0 });
|
|
4260
|
+
const [isVisible, setIsVisible] = (0, import_react19.useState)(false);
|
|
4261
|
+
const [removeOpacity, setRemoveOpacity] = (0, import_react19.useState)(false);
|
|
4259
4262
|
const updatePosition = () => {
|
|
4260
4263
|
if (!ref.current || !tooltipRef.current) return;
|
|
4261
4264
|
const rect = ref.current.getBoundingClientRect();
|
|
@@ -4294,14 +4297,14 @@ var Tooltip = ({
|
|
|
4294
4297
|
setIsVisible(false);
|
|
4295
4298
|
setRemoveOpacity(false);
|
|
4296
4299
|
};
|
|
4297
|
-
(0,
|
|
4300
|
+
(0, import_react19.useEffect)(() => {
|
|
4298
4301
|
if (isVisible && tooltipRef.current) {
|
|
4299
4302
|
requestAnimationFrame(() => {
|
|
4300
4303
|
updatePosition();
|
|
4301
4304
|
});
|
|
4302
4305
|
}
|
|
4303
4306
|
}, [isVisible]);
|
|
4304
|
-
(0,
|
|
4307
|
+
(0, import_react19.useEffect)(() => {
|
|
4305
4308
|
if (isVisible) {
|
|
4306
4309
|
window.addEventListener("resize", updatePosition);
|
|
4307
4310
|
return () => window.removeEventListener("resize", updatePosition);
|
|
@@ -4359,12 +4362,12 @@ var Tooltip = ({
|
|
|
4359
4362
|
Tooltip.displayName = "Tooltip";
|
|
4360
4363
|
|
|
4361
4364
|
// src/components/DateInput.tsx
|
|
4362
|
-
var
|
|
4365
|
+
var import_react21 = require("react");
|
|
4363
4366
|
var import_react_dom3 = require("react-dom");
|
|
4364
4367
|
|
|
4365
4368
|
// src/components/CalendarRange.tsx
|
|
4366
4369
|
var import_clsx20 = __toESM(require("clsx"), 1);
|
|
4367
|
-
var
|
|
4370
|
+
var import_react20 = __toESM(require("react"), 1);
|
|
4368
4371
|
var import_polyfill = require("@js-temporal/polyfill");
|
|
4369
4372
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
4370
4373
|
function DateCell(_a) {
|
|
@@ -4477,20 +4480,20 @@ function CalendarRange({
|
|
|
4477
4480
|
const fromDate = parseDate(from);
|
|
4478
4481
|
const toDate = parseDate(to);
|
|
4479
4482
|
const today = import_polyfill.Temporal.Now.plainDateISO();
|
|
4480
|
-
const [baseMonth, setBaseMonth] = (0,
|
|
4483
|
+
const [baseMonth, setBaseMonth] = (0, import_react20.useState)(
|
|
4481
4484
|
fromDate != null ? fromDate : today.with({ day: 1 })
|
|
4482
4485
|
);
|
|
4483
|
-
const [selecting, setSelecting] = (0,
|
|
4484
|
-
const [pendingFrom, setPendingFrom] = (0,
|
|
4485
|
-
const [hoveredDate, setHoveredDate] = (0,
|
|
4486
|
-
(0,
|
|
4486
|
+
const [selecting, setSelecting] = (0, import_react20.useState)("from");
|
|
4487
|
+
const [pendingFrom, setPendingFrom] = (0, import_react20.useState)(void 0);
|
|
4488
|
+
const [hoveredDate, setHoveredDate] = (0, import_react20.useState)(void 0);
|
|
4489
|
+
(0, import_react20.useEffect)(() => {
|
|
4487
4490
|
if (fromDate) {
|
|
4488
4491
|
setBaseMonth(fromDate.with({ day: 1 }));
|
|
4489
4492
|
} else if (toDate) {
|
|
4490
4493
|
setBaseMonth(toDate.with({ day: 1 }));
|
|
4491
4494
|
}
|
|
4492
4495
|
}, [from, to]);
|
|
4493
|
-
(0,
|
|
4496
|
+
(0, import_react20.useEffect)(() => {
|
|
4494
4497
|
if (fromDate && toDate) {
|
|
4495
4498
|
setSelecting("from");
|
|
4496
4499
|
setPendingFrom(void 0);
|
|
@@ -4636,14 +4639,14 @@ function CalendarPane({
|
|
|
4636
4639
|
const years = Array.from({ length: 100 }).map(
|
|
4637
4640
|
(_, i) => baseMonth.year - 50 + i
|
|
4638
4641
|
);
|
|
4639
|
-
const [monthMenuOpen, setMonthMenuOpen] = (0,
|
|
4640
|
-
const [yearMenuOpen, setYearMenuOpen] = (0,
|
|
4641
|
-
const monthMenuRef = (0,
|
|
4642
|
-
const yearMenuRef = (0,
|
|
4642
|
+
const [monthMenuOpen, setMonthMenuOpen] = (0, import_react20.useState)(false);
|
|
4643
|
+
const [yearMenuOpen, setYearMenuOpen] = (0, import_react20.useState)(false);
|
|
4644
|
+
const monthMenuRef = (0, import_react20.useRef)(null);
|
|
4645
|
+
const yearMenuRef = (0, import_react20.useRef)(null);
|
|
4643
4646
|
const month = getMonthData(offset);
|
|
4644
4647
|
const totalCells = 42;
|
|
4645
4648
|
const emptyCells = month.firstDayOffset;
|
|
4646
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
4649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react20.default.Fragment, { children: [
|
|
4647
4650
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
4648
4651
|
"div",
|
|
4649
4652
|
{
|
|
@@ -4851,24 +4854,24 @@ var DateInput = (_a) => {
|
|
|
4851
4854
|
"label",
|
|
4852
4855
|
"isDateAvailable"
|
|
4853
4856
|
]);
|
|
4854
|
-
const [visible, setVisible] = (0,
|
|
4855
|
-
const [inputValue, setInputValue] = (0,
|
|
4856
|
-
const [isTyping, setIsTyping] = (0,
|
|
4857
|
-
const popoverRef = (0,
|
|
4858
|
-
const triggerRef = (0,
|
|
4859
|
-
const rootRef = (0,
|
|
4860
|
-
const [calendarPosition, setCalendarPosition] = (0,
|
|
4857
|
+
const [visible, setVisible] = (0, import_react21.useState)(false);
|
|
4858
|
+
const [inputValue, setInputValue] = (0, import_react21.useState)("");
|
|
4859
|
+
const [isTyping, setIsTyping] = (0, import_react21.useState)(false);
|
|
4860
|
+
const popoverRef = (0, import_react21.useRef)(null);
|
|
4861
|
+
const triggerRef = (0, import_react21.useRef)(null);
|
|
4862
|
+
const rootRef = (0, import_react21.useRef)(null);
|
|
4863
|
+
const [calendarPosition, setCalendarPosition] = (0, import_react21.useState)({
|
|
4861
4864
|
top: 0,
|
|
4862
4865
|
left: 0,
|
|
4863
4866
|
width: 0
|
|
4864
4867
|
});
|
|
4865
4868
|
const [from, to] = [value, ""];
|
|
4866
|
-
(0,
|
|
4869
|
+
(0, import_react21.useEffect)(() => {
|
|
4867
4870
|
if (!isTyping) {
|
|
4868
4871
|
setInputValue(formatDisplayValue(from));
|
|
4869
4872
|
}
|
|
4870
4873
|
}, [from, isTyping]);
|
|
4871
|
-
(0,
|
|
4874
|
+
(0, import_react21.useLayoutEffect)(() => {
|
|
4872
4875
|
if (visible) {
|
|
4873
4876
|
updatePosition();
|
|
4874
4877
|
}
|
|
@@ -4883,7 +4886,7 @@ var DateInput = (_a) => {
|
|
|
4883
4886
|
});
|
|
4884
4887
|
}
|
|
4885
4888
|
};
|
|
4886
|
-
(0,
|
|
4889
|
+
(0, import_react21.useEffect)(() => {
|
|
4887
4890
|
updatePosition();
|
|
4888
4891
|
const resizeObserver = new ResizeObserver(updatePosition);
|
|
4889
4892
|
if (triggerRef.current) {
|
|
@@ -4895,7 +4898,7 @@ var DateInput = (_a) => {
|
|
|
4895
4898
|
window.removeEventListener("scroll", updatePosition);
|
|
4896
4899
|
};
|
|
4897
4900
|
}, []);
|
|
4898
|
-
(0,
|
|
4901
|
+
(0, import_react21.useEffect)(() => {
|
|
4899
4902
|
const handleKeyDown2 = (event) => {
|
|
4900
4903
|
var _a2;
|
|
4901
4904
|
if (event.key === "Escape" && popoverRef.current) {
|
|
@@ -4908,7 +4911,7 @@ var DateInput = (_a) => {
|
|
|
4908
4911
|
document.removeEventListener("keydown", handleKeyDown2);
|
|
4909
4912
|
};
|
|
4910
4913
|
});
|
|
4911
|
-
(0,
|
|
4914
|
+
(0, import_react21.useEffect)(() => {
|
|
4912
4915
|
const handleClickOutside = (event) => {
|
|
4913
4916
|
if (popoverRef.current && !popoverRef.current.contains(event.target) && triggerRef.current && !triggerRef.current.contains(event.target)) {
|
|
4914
4917
|
setVisible(false);
|
|
@@ -5129,14 +5132,14 @@ Heading3.displayName = "Heading3";
|
|
|
5129
5132
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
5130
5133
|
|
|
5131
5134
|
// src/components/MobileDataGrid/ColumnSelector/index.tsx
|
|
5132
|
-
var
|
|
5135
|
+
var import_react24 = require("react");
|
|
5133
5136
|
|
|
5134
5137
|
// src/components/MobileDataGrid/GridContextProvider/useGridContext.ts
|
|
5135
|
-
var
|
|
5138
|
+
var import_react23 = require("react");
|
|
5136
5139
|
|
|
5137
5140
|
// src/components/MobileDataGrid/GridContextProvider/GridContext.tsx
|
|
5138
|
-
var
|
|
5139
|
-
var GridContext = (0,
|
|
5141
|
+
var import_react22 = require("react");
|
|
5142
|
+
var GridContext = (0, import_react22.createContext)(null);
|
|
5140
5143
|
|
|
5141
5144
|
// src/components/MobileDataGrid/ColumnSelector/index.tsx
|
|
5142
5145
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
@@ -5145,12 +5148,12 @@ var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
|
5145
5148
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
5146
5149
|
|
|
5147
5150
|
// src/components/MobileDataGrid/GridContextProvider/index.tsx
|
|
5148
|
-
var
|
|
5151
|
+
var import_react25 = require("react");
|
|
5149
5152
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
5150
5153
|
|
|
5151
5154
|
// src/components/Modal.tsx
|
|
5152
5155
|
var import_clsx29 = __toESM(require("clsx"), 1);
|
|
5153
|
-
var
|
|
5156
|
+
var import_react27 = require("react");
|
|
5154
5157
|
|
|
5155
5158
|
// src/components/ModalHeader.tsx
|
|
5156
5159
|
var import_clsx25 = __toESM(require("clsx"), 1);
|
|
@@ -5326,10 +5329,10 @@ var import_react_dom4 = require("react-dom");
|
|
|
5326
5329
|
var import_react_use = require("react-use");
|
|
5327
5330
|
|
|
5328
5331
|
// src/components/useMounted.tsx
|
|
5329
|
-
var
|
|
5332
|
+
var import_react26 = require("react");
|
|
5330
5333
|
var useMounted = () => {
|
|
5331
|
-
const [isMounted, setIsMounted] = (0,
|
|
5332
|
-
(0,
|
|
5334
|
+
const [isMounted, setIsMounted] = (0, import_react26.useState)(false);
|
|
5335
|
+
(0, import_react26.useEffect)(() => {
|
|
5333
5336
|
setIsMounted(true);
|
|
5334
5337
|
return () => setIsMounted(false);
|
|
5335
5338
|
}, []);
|
|
@@ -5423,12 +5426,12 @@ var Modal = ({
|
|
|
5423
5426
|
}) => {
|
|
5424
5427
|
var _a;
|
|
5425
5428
|
const mounted = useMounted();
|
|
5426
|
-
const modalRef = (0,
|
|
5427
|
-
const bgRef = (0,
|
|
5429
|
+
const modalRef = (0, import_react27.useRef)(null);
|
|
5430
|
+
const bgRef = (0, import_react27.useRef)(null);
|
|
5428
5431
|
const wasOpen = (0, import_react_use.usePrevious)(open);
|
|
5429
5432
|
const isMobile = useMatchesMobile();
|
|
5430
5433
|
const computedFixedHeightScrolling = isMobile || fixedHeightScrolling;
|
|
5431
|
-
(0,
|
|
5434
|
+
(0, import_react27.useEffect)(() => {
|
|
5432
5435
|
if (!mounted) return;
|
|
5433
5436
|
if (!modalRef.current || !bgRef.current) {
|
|
5434
5437
|
console.error("Modal or background reference is not set.");
|
|
@@ -5448,7 +5451,7 @@ var Modal = ({
|
|
|
5448
5451
|
bgFadeIn(bgRef.current);
|
|
5449
5452
|
}
|
|
5450
5453
|
}, [mounted, onClose, open, wasOpen]);
|
|
5451
|
-
const handleKeyDown = (0,
|
|
5454
|
+
const handleKeyDown = (0, import_react27.useCallback)(
|
|
5452
5455
|
(e) => {
|
|
5453
5456
|
if (e.key === "Escape") {
|
|
5454
5457
|
if (onClose) {
|
|
@@ -5459,12 +5462,12 @@ var Modal = ({
|
|
|
5459
5462
|
},
|
|
5460
5463
|
[onClose]
|
|
5461
5464
|
);
|
|
5462
|
-
const handleClose = (0,
|
|
5465
|
+
const handleClose = (0, import_react27.useCallback)(() => {
|
|
5463
5466
|
if (onClose) {
|
|
5464
5467
|
onClose();
|
|
5465
5468
|
}
|
|
5466
5469
|
}, [onClose]);
|
|
5467
|
-
(0,
|
|
5470
|
+
(0, import_react27.useEffect)(() => {
|
|
5468
5471
|
if (open) {
|
|
5469
5472
|
document.addEventListener("keyup", handleKeyDown);
|
|
5470
5473
|
}
|
|
@@ -5472,7 +5475,7 @@ var Modal = ({
|
|
|
5472
5475
|
document.removeEventListener("keyup", handleKeyDown);
|
|
5473
5476
|
};
|
|
5474
5477
|
}, [open, handleKeyDown]);
|
|
5475
|
-
(0,
|
|
5478
|
+
(0, import_react27.useEffect)(() => {
|
|
5476
5479
|
if (!open) return;
|
|
5477
5480
|
const scrollY = window.scrollY;
|
|
5478
5481
|
const body = document.body;
|
|
@@ -5493,7 +5496,7 @@ var Modal = ({
|
|
|
5493
5496
|
};
|
|
5494
5497
|
}, [open]);
|
|
5495
5498
|
const { sizeClass } = (_a = sizes[size]) != null ? _a : sizes.small;
|
|
5496
|
-
const backgroundClickHandler = (0,
|
|
5499
|
+
const backgroundClickHandler = (0, import_react27.useCallback)(
|
|
5497
5500
|
(e) => {
|
|
5498
5501
|
const target = e.target;
|
|
5499
5502
|
const currentTarget = e.currentTarget;
|
|
@@ -5602,10 +5605,10 @@ var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
|
5602
5605
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
5603
5606
|
|
|
5604
5607
|
// src/components/ProductImagePreview/Thumbnail.tsx
|
|
5605
|
-
var
|
|
5608
|
+
var import_react29 = require("react");
|
|
5606
5609
|
|
|
5607
5610
|
// src/components/ImagePlaceholder.tsx
|
|
5608
|
-
var
|
|
5611
|
+
var import_react28 = require("react");
|
|
5609
5612
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
5610
5613
|
|
|
5611
5614
|
// src/components/ProductImagePreview/Thumbnail.tsx
|
|
@@ -5616,11 +5619,11 @@ var import_clsx32 = __toESM(require("clsx"), 1);
|
|
|
5616
5619
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
5617
5620
|
|
|
5618
5621
|
// src/components/ProductImagePreview/ProductPrimaryImage.tsx
|
|
5619
|
-
var
|
|
5622
|
+
var import_react30 = require("react");
|
|
5620
5623
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
5621
5624
|
|
|
5622
5625
|
// src/components/ProductImagePreview/ZoomWindow.tsx
|
|
5623
|
-
var
|
|
5626
|
+
var import_react31 = require("react");
|
|
5624
5627
|
|
|
5625
5628
|
// src/components/Surface.tsx
|
|
5626
5629
|
var import_clsx33 = __toESM(require("clsx"), 1);
|
|
@@ -5665,17 +5668,17 @@ var import_clsx34 = require("clsx");
|
|
|
5665
5668
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
5666
5669
|
|
|
5667
5670
|
// src/components/ProductImagePreview/MobileImageCarousel.tsx
|
|
5668
|
-
var
|
|
5671
|
+
var import_react32 = require("react");
|
|
5669
5672
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
5670
5673
|
|
|
5671
5674
|
// src/components/ProductImagePreview/useProductImagePreview.ts
|
|
5672
|
-
var
|
|
5675
|
+
var import_react33 = require("react");
|
|
5673
5676
|
|
|
5674
5677
|
// src/components/ProductImagePreview/index.tsx
|
|
5675
5678
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
5676
5679
|
|
|
5677
5680
|
// src/components/CompactImagesPreview.tsx
|
|
5678
|
-
var
|
|
5681
|
+
var import_react34 = require("react");
|
|
5679
5682
|
var import_clsx35 = __toESM(require("clsx"), 1);
|
|
5680
5683
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
5681
5684
|
|
|
@@ -5684,12 +5687,12 @@ var import_clsx36 = __toESM(require("clsx"), 1);
|
|
|
5684
5687
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
5685
5688
|
|
|
5686
5689
|
// src/components/ListGroup.tsx
|
|
5687
|
-
var
|
|
5690
|
+
var import_react35 = require("react");
|
|
5688
5691
|
var import_clsx37 = __toESM(require("clsx"), 1);
|
|
5689
5692
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
5690
5693
|
|
|
5691
5694
|
// src/components/Pagination.tsx
|
|
5692
|
-
var
|
|
5695
|
+
var import_react36 = require("react");
|
|
5693
5696
|
var import_clsx38 = __toESM(require("clsx"), 1);
|
|
5694
5697
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
5695
5698
|
var Pagination = ({
|
|
@@ -5701,7 +5704,7 @@ var Pagination = ({
|
|
|
5701
5704
|
className,
|
|
5702
5705
|
disabled
|
|
5703
5706
|
}) => {
|
|
5704
|
-
const goTo = (0,
|
|
5707
|
+
const goTo = (0, import_react36.useCallback)(
|
|
5705
5708
|
(page) => {
|
|
5706
5709
|
if (disabled) return;
|
|
5707
5710
|
onPageChange(page);
|
|
@@ -5718,7 +5721,7 @@ var Pagination = ({
|
|
|
5718
5721
|
goTo(currentPage + 1);
|
|
5719
5722
|
}
|
|
5720
5723
|
};
|
|
5721
|
-
const pageTokens = (0,
|
|
5724
|
+
const pageTokens = (0, import_react36.useMemo)(() => {
|
|
5722
5725
|
if (totalPages <= 5) {
|
|
5723
5726
|
return Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
5724
5727
|
}
|
|
@@ -5841,21 +5844,21 @@ var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
|
5841
5844
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5842
5845
|
|
|
5843
5846
|
// src/components/SearchResultImage/index.tsx
|
|
5844
|
-
var
|
|
5847
|
+
var import_react37 = require("react");
|
|
5845
5848
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
5846
5849
|
|
|
5847
5850
|
// src/components/Alert.tsx
|
|
5848
5851
|
var import_clsx39 = __toESM(require("clsx"), 1);
|
|
5849
|
-
var
|
|
5852
|
+
var import_react38 = require("react");
|
|
5850
5853
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
5851
5854
|
|
|
5852
5855
|
// src/components/OrderCheckIcon.tsx
|
|
5853
5856
|
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
5854
5857
|
|
|
5855
5858
|
// src/components/EditingContext.tsx
|
|
5856
|
-
var
|
|
5859
|
+
var import_react39 = require("react");
|
|
5857
5860
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
5858
|
-
var EditingContext = (0,
|
|
5861
|
+
var EditingContext = (0, import_react39.createContext)(null);
|
|
5859
5862
|
|
|
5860
5863
|
// src/components/AccessCard.tsx
|
|
5861
5864
|
var import_clsx41 = __toESM(require("clsx"), 1);
|
|
@@ -5989,7 +5992,7 @@ var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
|
5989
5992
|
|
|
5990
5993
|
// src/components/AccessCardGroup.tsx
|
|
5991
5994
|
var import_clsx42 = __toESM(require("clsx"), 1);
|
|
5992
|
-
var
|
|
5995
|
+
var import_react40 = require("react");
|
|
5993
5996
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
5994
5997
|
|
|
5995
5998
|
// src/components/DataGrid/TableBody/LoadingCell.tsx
|