@dmsi/wedgekit-react 0.0.644 → 0.0.646
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-XVWCVBVF.js → chunk-3MV3KMQH.js} +1 -1
- package/dist/{chunk-Z3Q7PLVD.js → chunk-3PBA2EZ5.js} +1 -1
- package/dist/{chunk-LN3HVXH5.js → chunk-B3T7KBDA.js} +1 -1
- package/dist/{chunk-VAARSN7U.js → chunk-EXCAOI2L.js} +3 -3
- package/dist/{chunk-OXOMO76M.js → chunk-FCGPQNS2.js} +1 -1
- package/dist/{chunk-J2QD64F2.js → chunk-FJXWYGB7.js} +5 -5
- package/dist/{chunk-V2GSI3ZX.js → chunk-HIGNJAQA.js} +2 -2
- package/dist/{chunk-NUFBAJ6L.js → chunk-ISRG77J6.js} +1 -1
- package/dist/{chunk-YXZRGZ2I.js → chunk-REC2XOPI.js} +1 -1
- package/dist/{chunk-K22B4L3G.js → chunk-ZSRTAMSW.js} +28 -1
- package/dist/components/CalendarRange.cjs +157 -154
- package/dist/components/CalendarRange.js +11 -11
- package/dist/components/CompactImagesPreview.cjs +6 -3
- package/dist/components/CompactImagesPreview.js +2 -2
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +157 -154
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +11 -11
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +157 -154
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +11 -11
- package/dist/components/DataGrid/PinnedColumns.cjs +157 -154
- package/dist/components/DataGrid/PinnedColumns.js +11 -11
- package/dist/components/DataGrid/TableBody/LoadingCell.cjs +157 -154
- package/dist/components/DataGrid/TableBody/LoadingCell.js +11 -11
- package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +157 -154
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +11 -11
- package/dist/components/DataGrid/TableBody/index.cjs +157 -154
- package/dist/components/DataGrid/TableBody/index.js +11 -11
- package/dist/components/DataGrid/index.cjs +158 -155
- package/dist/components/DataGrid/index.js +11 -11
- package/dist/components/DataGrid/utils.cjs +157 -154
- package/dist/components/DataGrid/utils.js +11 -11
- package/dist/components/DataGridCell.cjs +61 -58
- package/dist/components/DataGridCell.js +5 -5
- package/dist/components/DateInput.cjs +150 -147
- package/dist/components/DateInput.js +11 -11
- package/dist/components/DateRangeInput.cjs +163 -160
- package/dist/components/DateRangeInput.js +11 -11
- package/dist/components/Menu.cjs +15 -12
- package/dist/components/Menu.js +3 -3
- package/dist/components/MenuOption.cjs +8 -5
- package/dist/components/MenuOption.js +2 -2
- package/dist/components/MobileDataGrid/ColumnList.js +1 -1
- package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +161 -158
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +11 -11
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +1 -1
- package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +161 -158
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +11 -11
- package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +1 -1
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.cjs +19 -16
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +4 -4
- package/dist/components/MobileDataGrid/index.cjs +170 -167
- package/dist/components/MobileDataGrid/index.js +11 -11
- package/dist/components/Modal.cjs +15 -12
- package/dist/components/Modal.js +2 -2
- package/dist/components/NestedMenu.cjs +11 -8
- package/dist/components/NestedMenu.js +2 -2
- package/dist/components/PDFViewer/index.cjs +31 -28
- package/dist/components/PDFViewer/index.js +2 -2
- package/dist/components/ProductImagePreview/index.cjs +18 -15
- package/dist/components/ProductImagePreview/index.js +2 -2
- package/dist/components/ProjectBar.cjs +3 -0
- package/dist/components/ProjectBar.js +1 -1
- package/dist/components/index.cjs +218 -215
- package/dist/components/index.js +11 -11
- package/dist/components/useMenuSystem.cjs +22 -19
- package/dist/components/useMenuSystem.js +2 -2
- package/dist/hooks/index.cjs +28 -0
- package/dist/hooks/index.js +3 -1
- package/package.json +1 -1
|
@@ -62,7 +62,7 @@ __export(ColumnSelector_exports, {
|
|
|
62
62
|
ColumnSelector: () => ColumnSelector
|
|
63
63
|
});
|
|
64
64
|
module.exports = __toCommonJS(ColumnSelector_exports);
|
|
65
|
-
var
|
|
65
|
+
var import_react40 = require("react");
|
|
66
66
|
|
|
67
67
|
// src/components/DataGridCell.tsx
|
|
68
68
|
var import_sortable = require("@dnd-kit/sortable");
|
|
@@ -117,7 +117,7 @@ var CSS = /* @__PURE__ */ Object.freeze({
|
|
|
117
117
|
|
|
118
118
|
// src/components/DataGridCell.tsx
|
|
119
119
|
var import_clsx9 = __toESM(require("clsx"), 1);
|
|
120
|
-
var
|
|
120
|
+
var import_react12 = require("react");
|
|
121
121
|
|
|
122
122
|
// src/classNames.ts
|
|
123
123
|
var import_clsx = __toESM(require("clsx"), 1);
|
|
@@ -261,7 +261,7 @@ var gapUsingContainerPadding = (0, import_clsx.default)(
|
|
|
261
261
|
|
|
262
262
|
// src/components/MenuOption.tsx
|
|
263
263
|
var import_clsx6 = __toESM(require("clsx"), 1);
|
|
264
|
-
var
|
|
264
|
+
var import_react7 = require("react");
|
|
265
265
|
|
|
266
266
|
// src/components/Label.tsx
|
|
267
267
|
var import_clsx2 = __toESM(require("clsx"), 1);
|
|
@@ -711,6 +711,9 @@ function useTableLayout(initialColumns, key, autosync = true) {
|
|
|
711
711
|
return { columns, setColumns: handleSaveLayout, isReady, getSavedLayout };
|
|
712
712
|
}
|
|
713
713
|
|
|
714
|
+
// src/hooks/useEditCell.tsx
|
|
715
|
+
var import_react6 = require("react");
|
|
716
|
+
|
|
714
717
|
// src/components/Caption.tsx
|
|
715
718
|
var import_clsx5 = __toESM(require("clsx"), 1);
|
|
716
719
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
@@ -862,12 +865,12 @@ var MenuOption = ({
|
|
|
862
865
|
onMouseMove,
|
|
863
866
|
small = false
|
|
864
867
|
}) => {
|
|
865
|
-
const uniqueId = (0,
|
|
866
|
-
const internalRef = (0,
|
|
868
|
+
const uniqueId = (0, import_react7.useId)();
|
|
869
|
+
const internalRef = (0, import_react7.useRef)(null);
|
|
867
870
|
const actualRef = ref || internalRef;
|
|
868
|
-
const menuId = (0,
|
|
871
|
+
const menuId = (0, import_react7.useRef)(`menu-${uniqueId}`);
|
|
869
872
|
const isMobile = useMatchesMobile();
|
|
870
|
-
const [isSubMenuHovered, setIsSubMenuHovered] = (0,
|
|
873
|
+
const [isSubMenuHovered, setIsSubMenuHovered] = (0, import_react7.useState)(false);
|
|
871
874
|
const handleMouseEnter = () => {
|
|
872
875
|
if (subMenu && onSubMenuHover && !disabled) {
|
|
873
876
|
onSubMenuHover(menuId.current, subMenuLevel);
|
|
@@ -1027,27 +1030,27 @@ function highlightMatch(text, searchValue) {
|
|
|
1027
1030
|
|
|
1028
1031
|
// src/components/Menu.tsx
|
|
1029
1032
|
var import_clsx7 = __toESM(require("clsx"), 1);
|
|
1030
|
-
var
|
|
1033
|
+
var import_react9 = require("react");
|
|
1031
1034
|
var import_react_dom = require("react-dom");
|
|
1032
1035
|
|
|
1033
1036
|
// src/components/useMenuSystem.tsx
|
|
1034
|
-
var
|
|
1037
|
+
var import_react8 = require("react");
|
|
1035
1038
|
function useSubMenuSystem(mobilePositionTo) {
|
|
1036
|
-
const [activeMenus, setActiveMenus] = (0,
|
|
1039
|
+
const [activeMenus, setActiveMenus] = (0, import_react8.useState)(
|
|
1037
1040
|
{}
|
|
1038
1041
|
);
|
|
1039
|
-
const [activeMenu, setActiveMenu] = (0,
|
|
1040
|
-
const [currentSubMenuLevel, setCurrentSubMenuLevel] = (0,
|
|
1042
|
+
const [activeMenu, setActiveMenu] = (0, import_react8.useState)("");
|
|
1043
|
+
const [currentSubMenuLevel, setCurrentSubMenuLevel] = (0, import_react8.useState)(
|
|
1041
1044
|
null
|
|
1042
1045
|
);
|
|
1043
|
-
const menuRootRef = (0,
|
|
1044
|
-
const subMenuRefs = (0,
|
|
1045
|
-
const hoverTimeoutRef = (0,
|
|
1046
|
-
const closeTimeoutRef = (0,
|
|
1047
|
-
const mouseStopTimeoutRef = (0,
|
|
1048
|
-
const isMouseMovingRef = (0,
|
|
1049
|
-
const pendingOpenActionRef = (0,
|
|
1050
|
-
const pendingCloseActionRef = (0,
|
|
1046
|
+
const menuRootRef = (0, import_react8.useRef)(null);
|
|
1047
|
+
const subMenuRefs = (0, import_react8.useRef)({});
|
|
1048
|
+
const hoverTimeoutRef = (0, import_react8.useRef)(null);
|
|
1049
|
+
const closeTimeoutRef = (0, import_react8.useRef)(null);
|
|
1050
|
+
const mouseStopTimeoutRef = (0, import_react8.useRef)(null);
|
|
1051
|
+
const isMouseMovingRef = (0, import_react8.useRef)(false);
|
|
1052
|
+
const pendingOpenActionRef = (0, import_react8.useRef)(null);
|
|
1053
|
+
const pendingCloseActionRef = (0, import_react8.useRef)(null);
|
|
1051
1054
|
const isMobile = useMatchesMobile();
|
|
1052
1055
|
const toggleMenu = (menuId, level) => {
|
|
1053
1056
|
if (closeTimeoutRef.current) {
|
|
@@ -1087,7 +1090,7 @@ function useSubMenuSystem(mobilePositionTo) {
|
|
|
1087
1090
|
return newActiveMenus;
|
|
1088
1091
|
});
|
|
1089
1092
|
};
|
|
1090
|
-
const executePendingActions = (0,
|
|
1093
|
+
const executePendingActions = (0, import_react8.useCallback)(() => {
|
|
1091
1094
|
if (pendingCloseActionRef.current) {
|
|
1092
1095
|
pendingCloseActionRef.current();
|
|
1093
1096
|
pendingCloseActionRef.current = null;
|
|
@@ -1176,7 +1179,7 @@ function useSubMenuSystem(mobilePositionTo) {
|
|
|
1176
1179
|
const isMenuActive = (menuId, level) => {
|
|
1177
1180
|
return activeMenus[level] === menuId;
|
|
1178
1181
|
};
|
|
1179
|
-
(0,
|
|
1182
|
+
(0, import_react8.useEffect)(() => {
|
|
1180
1183
|
const handleClickOutside = (event) => {
|
|
1181
1184
|
var _a;
|
|
1182
1185
|
if (Object.keys(activeMenus).length === 0) return;
|
|
@@ -1195,7 +1198,7 @@ function useSubMenuSystem(mobilePositionTo) {
|
|
|
1195
1198
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
1196
1199
|
};
|
|
1197
1200
|
}, [activeMenus]);
|
|
1198
|
-
(0,
|
|
1201
|
+
(0, import_react8.useEffect)(() => {
|
|
1199
1202
|
return () => {
|
|
1200
1203
|
if (hoverTimeoutRef.current) {
|
|
1201
1204
|
clearTimeout(hoverTimeoutRef.current);
|
|
@@ -1273,13 +1276,13 @@ function useSubMenuSystem(mobilePositionTo) {
|
|
|
1273
1276
|
};
|
|
1274
1277
|
}
|
|
1275
1278
|
function useMenuPosition(elementRef, position = "bottom", options) {
|
|
1276
|
-
const [menuPosition, setMenuPosition] = (0,
|
|
1279
|
+
const [menuPosition, setMenuPosition] = (0, import_react8.useState)({
|
|
1277
1280
|
top: 0,
|
|
1278
1281
|
left: 0,
|
|
1279
1282
|
minWidth: 0
|
|
1280
1283
|
});
|
|
1281
1284
|
const isMobile = options == null ? void 0 : options.isMobile;
|
|
1282
|
-
const updatePosition = (0,
|
|
1285
|
+
const updatePosition = (0, import_react8.useCallback)(() => {
|
|
1283
1286
|
var _a, _b, _c;
|
|
1284
1287
|
if (!(elementRef == null ? void 0 : elementRef.current)) return;
|
|
1285
1288
|
const triggerRect = elementRef.current.getBoundingClientRect();
|
|
@@ -1327,7 +1330,7 @@ function useMenuPosition(elementRef, position = "bottom", options) {
|
|
|
1327
1330
|
minWidth: triggerRect.width
|
|
1328
1331
|
});
|
|
1329
1332
|
}, [elementRef, position, options == null ? void 0 : options.menuRef, options == null ? void 0 : options.topOffset, isMobile]);
|
|
1330
|
-
(0,
|
|
1333
|
+
(0, import_react8.useEffect)(() => {
|
|
1331
1334
|
if (!(options == null ? void 0 : options.isOpen) || !(options == null ? void 0 : options.setIsOpen)) return;
|
|
1332
1335
|
const handleClickOutside = (event) => {
|
|
1333
1336
|
var _a, _b, _c, _d, _e;
|
|
@@ -1353,7 +1356,7 @@ function useMenuPosition(elementRef, position = "bottom", options) {
|
|
|
1353
1356
|
options == null ? void 0 : options.menuRef,
|
|
1354
1357
|
options == null ? void 0 : options.additionalRefs
|
|
1355
1358
|
]);
|
|
1356
|
-
(0,
|
|
1359
|
+
(0, import_react8.useEffect)(() => {
|
|
1357
1360
|
updatePosition();
|
|
1358
1361
|
const resizeObserver = new ResizeObserver(updatePosition);
|
|
1359
1362
|
if (elementRef == null ? void 0 : elementRef.current) {
|
|
@@ -1434,9 +1437,9 @@ var Menu = (_a) => {
|
|
|
1434
1437
|
"menuName",
|
|
1435
1438
|
"calculateMinMaxHeight"
|
|
1436
1439
|
]);
|
|
1437
|
-
const internalRef = (0,
|
|
1440
|
+
const internalRef = (0, import_react9.useRef)(null);
|
|
1438
1441
|
const actualRef = ref || internalRef;
|
|
1439
|
-
const [maxHeight, setMaxHeight] = (0,
|
|
1442
|
+
const [maxHeight, setMaxHeight] = (0, import_react9.useState)("180px");
|
|
1440
1443
|
const isMobile = useMatchesMobile();
|
|
1441
1444
|
const { menuPosition, updatePosition } = useMenuPosition(
|
|
1442
1445
|
isMobile && mobilePositionTo ? mobilePositionTo : positionTo,
|
|
@@ -1449,7 +1452,7 @@ var Menu = (_a) => {
|
|
|
1449
1452
|
isMobile: !!(isMobile && mobilePositionTo)
|
|
1450
1453
|
}
|
|
1451
1454
|
);
|
|
1452
|
-
(0,
|
|
1455
|
+
(0, import_react9.useEffect)(() => {
|
|
1453
1456
|
if (calculateMinMaxHeight) {
|
|
1454
1457
|
return;
|
|
1455
1458
|
}
|
|
@@ -1473,7 +1476,7 @@ var Menu = (_a) => {
|
|
|
1473
1476
|
cancelAnimationFrame(raf);
|
|
1474
1477
|
};
|
|
1475
1478
|
}, [actualRef.current, customMaxHeight, calculateMinMaxHeight]);
|
|
1476
|
-
(0,
|
|
1479
|
+
(0, import_react9.useEffect)(() => {
|
|
1477
1480
|
if (!calculateMinMaxHeight) {
|
|
1478
1481
|
return;
|
|
1479
1482
|
}
|
|
@@ -1484,14 +1487,14 @@ var Menu = (_a) => {
|
|
|
1484
1487
|
setMaxHeight(`${calculatedMaxHeight}px`);
|
|
1485
1488
|
}
|
|
1486
1489
|
}, [actualRef.current, positionTo == null ? void 0 : positionTo.current, calculateMinMaxHeight]);
|
|
1487
|
-
(0,
|
|
1490
|
+
(0, import_react9.useEffect)(() => {
|
|
1488
1491
|
if (!show) {
|
|
1489
1492
|
return;
|
|
1490
1493
|
}
|
|
1491
1494
|
initializeMenuFocus();
|
|
1492
1495
|
updatePosition();
|
|
1493
1496
|
}, [show, updatePosition]);
|
|
1494
|
-
(0,
|
|
1497
|
+
(0, import_react9.useEffect)(() => {
|
|
1495
1498
|
if (!show || !setShow) {
|
|
1496
1499
|
return;
|
|
1497
1500
|
}
|
|
@@ -1645,10 +1648,10 @@ var Menu = (_a) => {
|
|
|
1645
1648
|
Menu.displayName = "Menu";
|
|
1646
1649
|
|
|
1647
1650
|
// src/components/Search.tsx
|
|
1648
|
-
var
|
|
1651
|
+
var import_react11 = require("react");
|
|
1649
1652
|
|
|
1650
1653
|
// src/components/Input.tsx
|
|
1651
|
-
var
|
|
1654
|
+
var import_react10 = require("react");
|
|
1652
1655
|
var import_clsx8 = __toESM(require("clsx"), 1);
|
|
1653
1656
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1654
1657
|
var InputBase = (_a) => {
|
|
@@ -1705,9 +1708,9 @@ var InputBase = (_a) => {
|
|
|
1705
1708
|
"data-error": error && !focus || null,
|
|
1706
1709
|
"data-focus": focus || null
|
|
1707
1710
|
};
|
|
1708
|
-
const inputRef = (0,
|
|
1711
|
+
const inputRef = (0, import_react10.useRef)(null);
|
|
1709
1712
|
const inputId = id ? `${id}-input` : void 0;
|
|
1710
|
-
(0,
|
|
1713
|
+
(0, import_react10.useEffect)(() => {
|
|
1711
1714
|
var _a2;
|
|
1712
1715
|
const input = inputRef.current;
|
|
1713
1716
|
const focusHandler = () => {
|
|
@@ -1866,15 +1869,15 @@ var Input = (_a) => {
|
|
|
1866
1869
|
"testid",
|
|
1867
1870
|
"rightAdornment"
|
|
1868
1871
|
]);
|
|
1869
|
-
const [internalValue, setInternalValue] = (0,
|
|
1870
|
-
const [displayValue, setDisplayValue] = (0,
|
|
1871
|
-
(0,
|
|
1872
|
+
const [internalValue, setInternalValue] = (0, import_react10.useState)("");
|
|
1873
|
+
const [displayValue, setDisplayValue] = (0, import_react10.useState)("");
|
|
1874
|
+
(0, import_react10.useEffect)(() => {
|
|
1872
1875
|
var _a2;
|
|
1873
1876
|
const stringValue = (_a2 = propValue == null ? void 0 : propValue.toString()) != null ? _a2 : "";
|
|
1874
1877
|
setInternalValue(stringValue);
|
|
1875
1878
|
setDisplayValue(stringValue);
|
|
1876
1879
|
}, [propValue]);
|
|
1877
|
-
(0,
|
|
1880
|
+
(0, import_react10.useEffect)(() => {
|
|
1878
1881
|
var _a2;
|
|
1879
1882
|
if (variant !== "currency") {
|
|
1880
1883
|
return;
|
|
@@ -2135,14 +2138,14 @@ var Search = (_a) => {
|
|
|
2135
2138
|
"removeRoundness",
|
|
2136
2139
|
"autocompletePadding"
|
|
2137
2140
|
]);
|
|
2138
|
-
const inputRef = (0,
|
|
2139
|
-
const inputContainerRef = (0,
|
|
2140
|
-
const preventFocusOnInitialRender = (0,
|
|
2141
|
-
const [show, setShow] = (0,
|
|
2142
|
-
const [clearing, setClearing] = (0,
|
|
2143
|
-
const uniqueId = (0,
|
|
2141
|
+
const inputRef = (0, import_react11.useRef)(null);
|
|
2142
|
+
const inputContainerRef = (0, import_react11.useRef)(null);
|
|
2143
|
+
const preventFocusOnInitialRender = (0, import_react11.useRef)(true);
|
|
2144
|
+
const [show, setShow] = (0, import_react11.useState)(false);
|
|
2145
|
+
const [clearing, setClearing] = (0, import_react11.useState)(false);
|
|
2146
|
+
const uniqueId = (0, import_react11.useId)();
|
|
2144
2147
|
const searchMenuName = `search-menu-${uniqueId}`;
|
|
2145
|
-
(0,
|
|
2148
|
+
(0, import_react11.useEffect)(() => {
|
|
2146
2149
|
var _a2;
|
|
2147
2150
|
if (preventFocusOnInitialRender.current) {
|
|
2148
2151
|
preventFocusOnInitialRender.current = false;
|
|
@@ -2226,7 +2229,7 @@ Search.displayName = "Search";
|
|
|
2226
2229
|
|
|
2227
2230
|
// src/components/DataGridCell.tsx
|
|
2228
2231
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
2229
|
-
var DataGridCell = (0,
|
|
2232
|
+
var DataGridCell = (0, import_react12.memo)(
|
|
2230
2233
|
(_a) => {
|
|
2231
2234
|
var _b = _a, {
|
|
2232
2235
|
id,
|
|
@@ -2268,10 +2271,10 @@ var DataGridCell = (0, import_react11.memo)(
|
|
|
2268
2271
|
"testid"
|
|
2269
2272
|
]);
|
|
2270
2273
|
const Element = type === "header" ? "th" : "td";
|
|
2271
|
-
const timerRef = (0,
|
|
2272
|
-
const [isGrabbing, setIsGrabbing] = (0,
|
|
2273
|
-
const [isPointerPressed, setIsPointerPressed] = (0,
|
|
2274
|
-
(0,
|
|
2274
|
+
const timerRef = (0, import_react12.useRef)(null);
|
|
2275
|
+
const [isGrabbing, setIsGrabbing] = (0, import_react12.useState)(false);
|
|
2276
|
+
const [isPointerPressed, setIsPointerPressed] = (0, import_react12.useState)(false);
|
|
2277
|
+
(0, import_react12.useEffect)(() => {
|
|
2275
2278
|
return () => {
|
|
2276
2279
|
if (timerRef.current) {
|
|
2277
2280
|
clearTimeout(timerRef.current);
|
|
@@ -2381,12 +2384,12 @@ function DataCellHeader(_a) {
|
|
|
2381
2384
|
"useMenuDefaultMinWidth"
|
|
2382
2385
|
]);
|
|
2383
2386
|
var _a2;
|
|
2384
|
-
const [showMenu, setShowMenu] = (0,
|
|
2385
|
-
const [filter, setFilter] = (0,
|
|
2387
|
+
const [showMenu, setShowMenu] = (0, import_react12.useState)(false);
|
|
2388
|
+
const [filter, setFilter] = (0, import_react12.useState)(
|
|
2386
2389
|
(_a2 = header.column.getFilterValue()) != null ? _a2 : ""
|
|
2387
2390
|
);
|
|
2388
|
-
const ref = (0,
|
|
2389
|
-
const predeterminedPinned = (0,
|
|
2391
|
+
const ref = (0, import_react12.useRef)(null);
|
|
2392
|
+
const predeterminedPinned = (0, import_react12.useRef)(false);
|
|
2390
2393
|
const { column, getContext } = header;
|
|
2391
2394
|
const { id: columnId, setFilterValue } = column;
|
|
2392
2395
|
const {
|
|
@@ -2396,14 +2399,14 @@ function DataCellHeader(_a) {
|
|
|
2396
2399
|
listeners: subMenuListeners,
|
|
2397
2400
|
mobileHide
|
|
2398
2401
|
} = useSubMenuSystem(node ? node : ref);
|
|
2399
|
-
(0,
|
|
2402
|
+
(0, import_react12.useEffect)(() => {
|
|
2400
2403
|
var _a3, _b2, _c;
|
|
2401
2404
|
const columnPinning = (_a3 = getContext().table.options.initialState) == null ? void 0 : _a3.columnPinning;
|
|
2402
2405
|
const left = (_b2 = columnPinning == null ? void 0 : columnPinning.left) != null ? _b2 : [];
|
|
2403
2406
|
const right = (_c = columnPinning == null ? void 0 : columnPinning.right) != null ? _c : [];
|
|
2404
2407
|
predeterminedPinned.current = [...left, ...right].includes(columnId);
|
|
2405
2408
|
}, [columnId, getContext]);
|
|
2406
|
-
(0,
|
|
2409
|
+
(0, import_react12.useEffect)(() => {
|
|
2407
2410
|
const handler = setTimeout(() => {
|
|
2408
2411
|
setFilterValue(filter);
|
|
2409
2412
|
}, 500);
|
|
@@ -2666,7 +2669,7 @@ function DragAlongCell(_a) {
|
|
|
2666
2669
|
DragAlongCell.displayName = "DragAlongCell";
|
|
2667
2670
|
|
|
2668
2671
|
// src/components/DataGrid/index.tsx
|
|
2669
|
-
var
|
|
2672
|
+
var import_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");
|
|
@@ -2694,7 +2697,7 @@ function getSortIcon(sort, nextSort = false) {
|
|
|
2694
2697
|
}
|
|
2695
2698
|
|
|
2696
2699
|
// src/components/DataGrid/PinnedColumns.tsx
|
|
2697
|
-
var
|
|
2700
|
+
var import_react16 = __toESM(require("react"), 1);
|
|
2698
2701
|
|
|
2699
2702
|
// src/components/DataGrid/TableBody/index.tsx
|
|
2700
2703
|
var import_react_virtual = require("@tanstack/react-virtual");
|
|
@@ -2703,7 +2706,7 @@ var import_clsx12 = __toESM(require("clsx"), 1);
|
|
|
2703
2706
|
// src/components/DataGrid/TableBody/TableBodyRow.tsx
|
|
2704
2707
|
var import_clsx11 = __toESM(require("clsx"), 1);
|
|
2705
2708
|
var import_react_table = require("@tanstack/react-table");
|
|
2706
|
-
var
|
|
2709
|
+
var import_react13 = __toESM(require("react"), 1);
|
|
2707
2710
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
2708
2711
|
var valueFormatters = {
|
|
2709
2712
|
date: (value) => typeof value === "string" ? formatDate(value) : "",
|
|
@@ -2771,7 +2774,7 @@ function TableBodyRow({
|
|
|
2771
2774
|
const cellFormat = (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.format;
|
|
2772
2775
|
const cellValue = cellFormat && isValueFormatterKey(cellFormat) ? valueFormatters[cellFormat](cell.getValue()) : cell.getValue();
|
|
2773
2776
|
const cellAlignment = (_c = (_b = cell.column.columnDef.meta) == null ? void 0 : _b.align) != null ? _c : typeof cellValue === "number" ? "right" : "left";
|
|
2774
|
-
return ((_d = cell.column.columnDef.meta) == null ? void 0 : _d.useCustomRenderer) ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2777
|
+
return ((_d = cell.column.columnDef.meta) == null ? void 0 : _d.useCustomRenderer) ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react13.default.Fragment, { children: (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext()) }, cell.id) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2775
2778
|
CellElement,
|
|
2776
2779
|
{
|
|
2777
2780
|
id: id ? `${id}-row-${row.id}-cell-${cell.id}` : void 0,
|
|
@@ -2985,10 +2988,10 @@ function TableBody({
|
|
|
2985
2988
|
}
|
|
2986
2989
|
|
|
2987
2990
|
// src/components/DataGrid/ColumnSelectorHeaderCell/index.tsx
|
|
2988
|
-
var
|
|
2991
|
+
var import_react15 = require("react");
|
|
2989
2992
|
|
|
2990
2993
|
// src/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.tsx
|
|
2991
|
-
var
|
|
2994
|
+
var import_react14 = require("react");
|
|
2992
2995
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2993
2996
|
function ColumnSelectorMenuOption({
|
|
2994
2997
|
id,
|
|
@@ -2996,7 +2999,7 @@ function ColumnSelectorMenuOption({
|
|
|
2996
2999
|
column,
|
|
2997
3000
|
toggleColumnVisibility
|
|
2998
3001
|
}) {
|
|
2999
|
-
const [isVisible, setIsVisible] = (0,
|
|
3002
|
+
const [isVisible, setIsVisible] = (0, import_react14.useState)(column.getIsVisible());
|
|
3000
3003
|
const label = typeof column.columnDef.header === "string" ? column.columnDef.header : null;
|
|
3001
3004
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MenuOption, { id, testid, defaultChecked: isVisible, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3002
3005
|
Checkbox,
|
|
@@ -3022,8 +3025,8 @@ function ColumnSelectorHeaderCell({
|
|
|
3022
3025
|
toggleColumnVisibility,
|
|
3023
3026
|
resetColumnVisibility
|
|
3024
3027
|
}) {
|
|
3025
|
-
const ref = (0,
|
|
3026
|
-
const [show, setShow] = (0,
|
|
3028
|
+
const ref = (0, import_react15.useRef)(null);
|
|
3029
|
+
const [show, setShow] = (0, import_react15.useState)(false);
|
|
3027
3030
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3028
3031
|
DataGridCell,
|
|
3029
3032
|
{
|
|
@@ -3192,7 +3195,7 @@ function PinnedColumns(_a) {
|
|
|
3192
3195
|
header.id
|
|
3193
3196
|
);
|
|
3194
3197
|
}
|
|
3195
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react16.default.Fragment, { children: ((_f = header.column.columnDef.meta) == null ? void 0 : _f.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DataGridCell, { type: "header", component: "checkbox", locked: true, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3196
3199
|
Checkbox,
|
|
3197
3200
|
{
|
|
3198
3201
|
checked: allSelectedAcrossPages,
|
|
@@ -3274,23 +3277,23 @@ function DataGrid({
|
|
|
3274
3277
|
ref
|
|
3275
3278
|
}) {
|
|
3276
3279
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
3277
|
-
(0,
|
|
3280
|
+
(0, import_react17.useImperativeHandle)(ref, () => ({
|
|
3278
3281
|
getSavedLayout: () => {
|
|
3279
3282
|
return getSavedLayout();
|
|
3280
3283
|
}
|
|
3281
3284
|
}));
|
|
3282
|
-
const [localSorting, setLocalSorting] = (0,
|
|
3283
|
-
const [localColumnFilters, setLocalColumnFilters] = (0,
|
|
3284
|
-
const [localRowSelection, setLocalRowSelection] = (0,
|
|
3285
|
+
const [localSorting, setLocalSorting] = (0, import_react17.useState)([]);
|
|
3286
|
+
const [localColumnFilters, setLocalColumnFilters] = (0, import_react17.useState)([]);
|
|
3287
|
+
const [localRowSelection, setLocalRowSelection] = (0, import_react17.useState)({});
|
|
3285
3288
|
const {
|
|
3286
3289
|
columns: tableColumns,
|
|
3287
3290
|
setColumns: setTableColumns,
|
|
3288
3291
|
getSavedLayout
|
|
3289
3292
|
} = useTableLayout(columns, id != null ? id : testid);
|
|
3290
|
-
const [columnOrder, setColumnOrder] = (0,
|
|
3293
|
+
const [columnOrder, setColumnOrder] = (0, import_react17.useState)(
|
|
3291
3294
|
tableColumns.map((c) => c.id)
|
|
3292
3295
|
);
|
|
3293
|
-
const [columnVisibility, setColumnVisibility] = (0,
|
|
3296
|
+
const [columnVisibility, setColumnVisibility] = (0, import_react17.useState)(
|
|
3294
3297
|
Object.fromEntries(
|
|
3295
3298
|
tableColumns.filter((column) => !!column.id).map((column) => {
|
|
3296
3299
|
var _a2, _b2;
|
|
@@ -3298,7 +3301,7 @@ function DataGrid({
|
|
|
3298
3301
|
})
|
|
3299
3302
|
)
|
|
3300
3303
|
);
|
|
3301
|
-
const updateColumnVisibility = (0,
|
|
3304
|
+
const updateColumnVisibility = (0, import_react17.useCallback)(
|
|
3302
3305
|
(updateOrder) => {
|
|
3303
3306
|
setColumnVisibility(
|
|
3304
3307
|
Object.fromEntries(
|
|
@@ -3312,7 +3315,7 @@ function DataGrid({
|
|
|
3312
3315
|
},
|
|
3313
3316
|
[tableColumns]
|
|
3314
3317
|
);
|
|
3315
|
-
const resetDefaultColumnVisibility = (0,
|
|
3318
|
+
const resetDefaultColumnVisibility = (0, import_react17.useCallback)(() => {
|
|
3316
3319
|
setTableColumns((prev) => {
|
|
3317
3320
|
columns.forEach((column) => {
|
|
3318
3321
|
var _a2, _b2;
|
|
@@ -3328,7 +3331,7 @@ function DataGrid({
|
|
|
3328
3331
|
return [...prev];
|
|
3329
3332
|
}, true);
|
|
3330
3333
|
}, [columns, setTableColumns]);
|
|
3331
|
-
(0,
|
|
3334
|
+
(0, import_react17.useEffect)(() => {
|
|
3332
3335
|
updateColumnVisibility(true);
|
|
3333
3336
|
}, [updateColumnVisibility]);
|
|
3334
3337
|
const sortingState = pagination ? externalSorting != null ? externalSorting : localSorting : localSorting;
|
|
@@ -3344,7 +3347,7 @@ function DataGrid({
|
|
|
3344
3347
|
(onColumnFiltersChange != null ? onColumnFiltersChange : setLocalColumnFilters)(value);
|
|
3345
3348
|
} : setLocalColumnFilters;
|
|
3346
3349
|
const rowSelection = externalRowSelection != null ? externalRowSelection : localRowSelection;
|
|
3347
|
-
const setRowSelection = (0,
|
|
3350
|
+
const setRowSelection = (0, import_react17.useCallback)(
|
|
3348
3351
|
(updaterOrValue) => {
|
|
3349
3352
|
if (pagination) {
|
|
3350
3353
|
const value = typeof updaterOrValue === "function" ? updaterOrValue(externalRowSelection != null ? externalRowSelection : {}) : updaterOrValue;
|
|
@@ -3358,9 +3361,9 @@ function DataGrid({
|
|
|
3358
3361
|
},
|
|
3359
3362
|
[externalRowSelection, onRowSelectionChange, pagination]
|
|
3360
3363
|
);
|
|
3361
|
-
const dndId = (0,
|
|
3362
|
-
const containerRef =
|
|
3363
|
-
const toggleColumnVisibility = (0,
|
|
3364
|
+
const dndId = (0, import_react17.useId)();
|
|
3365
|
+
const containerRef = import_react17.default.useRef(null);
|
|
3366
|
+
const toggleColumnVisibility = (0, import_react17.useCallback)(
|
|
3364
3367
|
(columnId, isVisible) => {
|
|
3365
3368
|
setTableColumns((prev) => {
|
|
3366
3369
|
const persistedIndex = prev.findIndex((col) => col.id === columnId);
|
|
@@ -3608,7 +3611,7 @@ function DataGrid({
|
|
|
3608
3611
|
header.id
|
|
3609
3612
|
);
|
|
3610
3613
|
}
|
|
3611
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3614
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react17.default.Fragment, { children: ((_e2 = header.column.columnDef.meta) == null ? void 0 : _e2.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3612
3615
|
DataGridCell,
|
|
3613
3616
|
{
|
|
3614
3617
|
id: id ? `${id}-header-${header.id}` : void 0,
|
|
@@ -3814,7 +3817,7 @@ function adaptTableStateSetter(setter) {
|
|
|
3814
3817
|
}
|
|
3815
3818
|
|
|
3816
3819
|
// src/components/Select.tsx
|
|
3817
|
-
var
|
|
3820
|
+
var import_react18 = require("react");
|
|
3818
3821
|
var import_clsx15 = __toESM(require("clsx"), 1);
|
|
3819
3822
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
3820
3823
|
var Select = (_a) => {
|
|
@@ -3848,11 +3851,11 @@ var Select = (_a) => {
|
|
|
3848
3851
|
"value"
|
|
3849
3852
|
]);
|
|
3850
3853
|
var _a2;
|
|
3851
|
-
const inputRef = (0,
|
|
3852
|
-
const inputContainerRef = (0,
|
|
3853
|
-
const preventFocusOnInitialRender = (0,
|
|
3854
|
-
const [show, setShow] = (0,
|
|
3855
|
-
(0,
|
|
3854
|
+
const inputRef = (0, import_react18.useRef)(null);
|
|
3855
|
+
const inputContainerRef = (0, import_react18.useRef)(null);
|
|
3856
|
+
const preventFocusOnInitialRender = (0, import_react18.useRef)(true);
|
|
3857
|
+
const [show, setShow] = (0, import_react18.useState)(false);
|
|
3858
|
+
(0, import_react18.useEffect)(() => {
|
|
3856
3859
|
var _a3;
|
|
3857
3860
|
if (preventFocusOnInitialRender.current) {
|
|
3858
3861
|
preventFocusOnInitialRender.current = false;
|
|
@@ -4274,7 +4277,7 @@ Button.displayName = "Button";
|
|
|
4274
4277
|
|
|
4275
4278
|
// src/components/Tooltip.tsx
|
|
4276
4279
|
var import_clsx19 = __toESM(require("clsx"), 1);
|
|
4277
|
-
var
|
|
4280
|
+
var import_react19 = require("react");
|
|
4278
4281
|
var import_react_dom2 = require("react-dom");
|
|
4279
4282
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
4280
4283
|
var Tooltip = ({
|
|
@@ -4287,11 +4290,11 @@ var Tooltip = ({
|
|
|
4287
4290
|
offset = 8,
|
|
4288
4291
|
keepHidden = false
|
|
4289
4292
|
}) => {
|
|
4290
|
-
const ref = (0,
|
|
4291
|
-
const tooltipRef = (0,
|
|
4292
|
-
const [tooltipPosition, setTooltipPosition] = (0,
|
|
4293
|
-
const [isVisible, setIsVisible] = (0,
|
|
4294
|
-
const [removeOpacity, setRemoveOpacity] = (0,
|
|
4293
|
+
const ref = (0, import_react19.useRef)(null);
|
|
4294
|
+
const tooltipRef = (0, import_react19.useRef)(null);
|
|
4295
|
+
const [tooltipPosition, setTooltipPosition] = (0, import_react19.useState)({ top: 0, left: 0 });
|
|
4296
|
+
const [isVisible, setIsVisible] = (0, import_react19.useState)(false);
|
|
4297
|
+
const [removeOpacity, setRemoveOpacity] = (0, import_react19.useState)(false);
|
|
4295
4298
|
const updatePosition = () => {
|
|
4296
4299
|
if (!ref.current || !tooltipRef.current) return;
|
|
4297
4300
|
const rect = ref.current.getBoundingClientRect();
|
|
@@ -4330,14 +4333,14 @@ var Tooltip = ({
|
|
|
4330
4333
|
setIsVisible(false);
|
|
4331
4334
|
setRemoveOpacity(false);
|
|
4332
4335
|
};
|
|
4333
|
-
(0,
|
|
4336
|
+
(0, import_react19.useEffect)(() => {
|
|
4334
4337
|
if (isVisible && tooltipRef.current) {
|
|
4335
4338
|
requestAnimationFrame(() => {
|
|
4336
4339
|
updatePosition();
|
|
4337
4340
|
});
|
|
4338
4341
|
}
|
|
4339
4342
|
}, [isVisible]);
|
|
4340
|
-
(0,
|
|
4343
|
+
(0, import_react19.useEffect)(() => {
|
|
4341
4344
|
if (isVisible) {
|
|
4342
4345
|
window.addEventListener("resize", updatePosition);
|
|
4343
4346
|
return () => window.removeEventListener("resize", updatePosition);
|
|
@@ -4395,12 +4398,12 @@ var Tooltip = ({
|
|
|
4395
4398
|
Tooltip.displayName = "Tooltip";
|
|
4396
4399
|
|
|
4397
4400
|
// src/components/DateInput.tsx
|
|
4398
|
-
var
|
|
4401
|
+
var import_react21 = require("react");
|
|
4399
4402
|
var import_react_dom3 = require("react-dom");
|
|
4400
4403
|
|
|
4401
4404
|
// src/components/CalendarRange.tsx
|
|
4402
4405
|
var import_clsx20 = __toESM(require("clsx"), 1);
|
|
4403
|
-
var
|
|
4406
|
+
var import_react20 = __toESM(require("react"), 1);
|
|
4404
4407
|
var import_polyfill = require("@js-temporal/polyfill");
|
|
4405
4408
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
4406
4409
|
function DateCell(_a) {
|
|
@@ -4513,20 +4516,20 @@ function CalendarRange({
|
|
|
4513
4516
|
const fromDate = parseDate(from);
|
|
4514
4517
|
const toDate = parseDate(to);
|
|
4515
4518
|
const today = import_polyfill.Temporal.Now.plainDateISO();
|
|
4516
|
-
const [baseMonth, setBaseMonth] = (0,
|
|
4519
|
+
const [baseMonth, setBaseMonth] = (0, import_react20.useState)(
|
|
4517
4520
|
fromDate != null ? fromDate : today.with({ day: 1 })
|
|
4518
4521
|
);
|
|
4519
|
-
const [selecting, setSelecting] = (0,
|
|
4520
|
-
const [pendingFrom, setPendingFrom] = (0,
|
|
4521
|
-
const [hoveredDate, setHoveredDate] = (0,
|
|
4522
|
-
(0,
|
|
4522
|
+
const [selecting, setSelecting] = (0, import_react20.useState)("from");
|
|
4523
|
+
const [pendingFrom, setPendingFrom] = (0, import_react20.useState)(void 0);
|
|
4524
|
+
const [hoveredDate, setHoveredDate] = (0, import_react20.useState)(void 0);
|
|
4525
|
+
(0, import_react20.useEffect)(() => {
|
|
4523
4526
|
if (fromDate) {
|
|
4524
4527
|
setBaseMonth(fromDate.with({ day: 1 }));
|
|
4525
4528
|
} else if (toDate) {
|
|
4526
4529
|
setBaseMonth(toDate.with({ day: 1 }));
|
|
4527
4530
|
}
|
|
4528
4531
|
}, [from, to]);
|
|
4529
|
-
(0,
|
|
4532
|
+
(0, import_react20.useEffect)(() => {
|
|
4530
4533
|
if (fromDate && toDate) {
|
|
4531
4534
|
setSelecting("from");
|
|
4532
4535
|
setPendingFrom(void 0);
|
|
@@ -4672,14 +4675,14 @@ function CalendarPane({
|
|
|
4672
4675
|
const years = Array.from({ length: 100 }).map(
|
|
4673
4676
|
(_, i) => baseMonth.year - 50 + i
|
|
4674
4677
|
);
|
|
4675
|
-
const [monthMenuOpen, setMonthMenuOpen] = (0,
|
|
4676
|
-
const [yearMenuOpen, setYearMenuOpen] = (0,
|
|
4677
|
-
const monthMenuRef = (0,
|
|
4678
|
-
const yearMenuRef = (0,
|
|
4678
|
+
const [monthMenuOpen, setMonthMenuOpen] = (0, import_react20.useState)(false);
|
|
4679
|
+
const [yearMenuOpen, setYearMenuOpen] = (0, import_react20.useState)(false);
|
|
4680
|
+
const monthMenuRef = (0, import_react20.useRef)(null);
|
|
4681
|
+
const yearMenuRef = (0, import_react20.useRef)(null);
|
|
4679
4682
|
const month = getMonthData(offset);
|
|
4680
4683
|
const totalCells = 42;
|
|
4681
4684
|
const emptyCells = month.firstDayOffset;
|
|
4682
|
-
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
4685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react20.default.Fragment, { children: [
|
|
4683
4686
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
4684
4687
|
"div",
|
|
4685
4688
|
{
|
|
@@ -4887,24 +4890,24 @@ var DateInput = (_a) => {
|
|
|
4887
4890
|
"label",
|
|
4888
4891
|
"isDateAvailable"
|
|
4889
4892
|
]);
|
|
4890
|
-
const [visible, setVisible] = (0,
|
|
4891
|
-
const [inputValue, setInputValue] = (0,
|
|
4892
|
-
const [isTyping, setIsTyping] = (0,
|
|
4893
|
-
const popoverRef = (0,
|
|
4894
|
-
const triggerRef = (0,
|
|
4895
|
-
const rootRef = (0,
|
|
4896
|
-
const [calendarPosition, setCalendarPosition] = (0,
|
|
4893
|
+
const [visible, setVisible] = (0, import_react21.useState)(false);
|
|
4894
|
+
const [inputValue, setInputValue] = (0, import_react21.useState)("");
|
|
4895
|
+
const [isTyping, setIsTyping] = (0, import_react21.useState)(false);
|
|
4896
|
+
const popoverRef = (0, import_react21.useRef)(null);
|
|
4897
|
+
const triggerRef = (0, import_react21.useRef)(null);
|
|
4898
|
+
const rootRef = (0, import_react21.useRef)(null);
|
|
4899
|
+
const [calendarPosition, setCalendarPosition] = (0, import_react21.useState)({
|
|
4897
4900
|
top: 0,
|
|
4898
4901
|
left: 0,
|
|
4899
4902
|
width: 0
|
|
4900
4903
|
});
|
|
4901
4904
|
const [from, to] = [value, ""];
|
|
4902
|
-
(0,
|
|
4905
|
+
(0, import_react21.useEffect)(() => {
|
|
4903
4906
|
if (!isTyping) {
|
|
4904
4907
|
setInputValue(formatDisplayValue(from));
|
|
4905
4908
|
}
|
|
4906
4909
|
}, [from, isTyping]);
|
|
4907
|
-
(0,
|
|
4910
|
+
(0, import_react21.useLayoutEffect)(() => {
|
|
4908
4911
|
if (visible) {
|
|
4909
4912
|
updatePosition();
|
|
4910
4913
|
}
|
|
@@ -4919,7 +4922,7 @@ var DateInput = (_a) => {
|
|
|
4919
4922
|
});
|
|
4920
4923
|
}
|
|
4921
4924
|
};
|
|
4922
|
-
(0,
|
|
4925
|
+
(0, import_react21.useEffect)(() => {
|
|
4923
4926
|
updatePosition();
|
|
4924
4927
|
const resizeObserver = new ResizeObserver(updatePosition);
|
|
4925
4928
|
if (triggerRef.current) {
|
|
@@ -4931,7 +4934,7 @@ var DateInput = (_a) => {
|
|
|
4931
4934
|
window.removeEventListener("scroll", updatePosition);
|
|
4932
4935
|
};
|
|
4933
4936
|
}, []);
|
|
4934
|
-
(0,
|
|
4937
|
+
(0, import_react21.useEffect)(() => {
|
|
4935
4938
|
const handleKeyDown2 = (event) => {
|
|
4936
4939
|
var _a2;
|
|
4937
4940
|
if (event.key === "Escape" && popoverRef.current) {
|
|
@@ -4944,7 +4947,7 @@ var DateInput = (_a) => {
|
|
|
4944
4947
|
document.removeEventListener("keydown", handleKeyDown2);
|
|
4945
4948
|
};
|
|
4946
4949
|
});
|
|
4947
|
-
(0,
|
|
4950
|
+
(0, import_react21.useEffect)(() => {
|
|
4948
4951
|
const handleClickOutside = (event) => {
|
|
4949
4952
|
if (popoverRef.current && !popoverRef.current.contains(event.target) && triggerRef.current && !triggerRef.current.contains(event.target)) {
|
|
4950
4953
|
setVisible(false);
|
|
@@ -5165,15 +5168,15 @@ Heading3.displayName = "Heading3";
|
|
|
5165
5168
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
5166
5169
|
|
|
5167
5170
|
// src/components/MobileDataGrid/GridContextProvider/useGridContext.ts
|
|
5168
|
-
var
|
|
5171
|
+
var import_react23 = require("react");
|
|
5169
5172
|
|
|
5170
5173
|
// src/components/MobileDataGrid/GridContextProvider/GridContext.tsx
|
|
5171
|
-
var
|
|
5172
|
-
var GridContext = (0,
|
|
5174
|
+
var import_react22 = require("react");
|
|
5175
|
+
var GridContext = (0, import_react22.createContext)(null);
|
|
5173
5176
|
|
|
5174
5177
|
// src/components/MobileDataGrid/GridContextProvider/useGridContext.ts
|
|
5175
5178
|
function useGridContext() {
|
|
5176
|
-
const ctx = (0,
|
|
5179
|
+
const ctx = (0, import_react23.useContext)(GridContext);
|
|
5177
5180
|
if (!ctx) {
|
|
5178
5181
|
throw new Error("useGridContext must be used within GridContextProvider");
|
|
5179
5182
|
}
|
|
@@ -5184,12 +5187,12 @@ function useGridContext() {
|
|
|
5184
5187
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
5185
5188
|
|
|
5186
5189
|
// src/components/MobileDataGrid/GridContextProvider/index.tsx
|
|
5187
|
-
var
|
|
5190
|
+
var import_react24 = require("react");
|
|
5188
5191
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
5189
5192
|
|
|
5190
5193
|
// src/components/Modal.tsx
|
|
5191
5194
|
var import_clsx29 = __toESM(require("clsx"), 1);
|
|
5192
|
-
var
|
|
5195
|
+
var import_react26 = require("react");
|
|
5193
5196
|
|
|
5194
5197
|
// src/components/ModalHeader.tsx
|
|
5195
5198
|
var import_clsx25 = __toESM(require("clsx"), 1);
|
|
@@ -5365,10 +5368,10 @@ var import_react_dom4 = require("react-dom");
|
|
|
5365
5368
|
var import_react_use = require("react-use");
|
|
5366
5369
|
|
|
5367
5370
|
// src/components/useMounted.tsx
|
|
5368
|
-
var
|
|
5371
|
+
var import_react25 = require("react");
|
|
5369
5372
|
var useMounted = () => {
|
|
5370
|
-
const [isMounted, setIsMounted] = (0,
|
|
5371
|
-
(0,
|
|
5373
|
+
const [isMounted, setIsMounted] = (0, import_react25.useState)(false);
|
|
5374
|
+
(0, import_react25.useEffect)(() => {
|
|
5372
5375
|
setIsMounted(true);
|
|
5373
5376
|
return () => setIsMounted(false);
|
|
5374
5377
|
}, []);
|
|
@@ -5462,12 +5465,12 @@ var Modal = ({
|
|
|
5462
5465
|
}) => {
|
|
5463
5466
|
var _a;
|
|
5464
5467
|
const mounted = useMounted();
|
|
5465
|
-
const modalRef = (0,
|
|
5466
|
-
const bgRef = (0,
|
|
5468
|
+
const modalRef = (0, import_react26.useRef)(null);
|
|
5469
|
+
const bgRef = (0, import_react26.useRef)(null);
|
|
5467
5470
|
const wasOpen = (0, import_react_use.usePrevious)(open);
|
|
5468
5471
|
const isMobile = useMatchesMobile();
|
|
5469
5472
|
const computedFixedHeightScrolling = isMobile || fixedHeightScrolling;
|
|
5470
|
-
(0,
|
|
5473
|
+
(0, import_react26.useEffect)(() => {
|
|
5471
5474
|
if (!mounted) return;
|
|
5472
5475
|
if (!modalRef.current || !bgRef.current) {
|
|
5473
5476
|
console.error("Modal or background reference is not set.");
|
|
@@ -5487,7 +5490,7 @@ var Modal = ({
|
|
|
5487
5490
|
bgFadeIn(bgRef.current);
|
|
5488
5491
|
}
|
|
5489
5492
|
}, [mounted, onClose, open, wasOpen]);
|
|
5490
|
-
const handleKeyDown = (0,
|
|
5493
|
+
const handleKeyDown = (0, import_react26.useCallback)(
|
|
5491
5494
|
(e) => {
|
|
5492
5495
|
if (e.key === "Escape") {
|
|
5493
5496
|
if (onClose) {
|
|
@@ -5498,12 +5501,12 @@ var Modal = ({
|
|
|
5498
5501
|
},
|
|
5499
5502
|
[onClose]
|
|
5500
5503
|
);
|
|
5501
|
-
const handleClose = (0,
|
|
5504
|
+
const handleClose = (0, import_react26.useCallback)(() => {
|
|
5502
5505
|
if (onClose) {
|
|
5503
5506
|
onClose();
|
|
5504
5507
|
}
|
|
5505
5508
|
}, [onClose]);
|
|
5506
|
-
(0,
|
|
5509
|
+
(0, import_react26.useEffect)(() => {
|
|
5507
5510
|
if (open) {
|
|
5508
5511
|
document.addEventListener("keyup", handleKeyDown);
|
|
5509
5512
|
}
|
|
@@ -5511,7 +5514,7 @@ var Modal = ({
|
|
|
5511
5514
|
document.removeEventListener("keyup", handleKeyDown);
|
|
5512
5515
|
};
|
|
5513
5516
|
}, [open, handleKeyDown]);
|
|
5514
|
-
(0,
|
|
5517
|
+
(0, import_react26.useEffect)(() => {
|
|
5515
5518
|
if (!open) return;
|
|
5516
5519
|
const scrollY = window.scrollY;
|
|
5517
5520
|
const body = document.body;
|
|
@@ -5532,7 +5535,7 @@ var Modal = ({
|
|
|
5532
5535
|
};
|
|
5533
5536
|
}, [open]);
|
|
5534
5537
|
const { sizeClass } = (_a = sizes[size]) != null ? _a : sizes.small;
|
|
5535
|
-
const backgroundClickHandler = (0,
|
|
5538
|
+
const backgroundClickHandler = (0, import_react26.useCallback)(
|
|
5536
5539
|
(e) => {
|
|
5537
5540
|
const target = e.target;
|
|
5538
5541
|
const currentTarget = e.currentTarget;
|
|
@@ -5641,10 +5644,10 @@ var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
|
5641
5644
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
5642
5645
|
|
|
5643
5646
|
// src/components/ProductImagePreview/Thumbnail.tsx
|
|
5644
|
-
var
|
|
5647
|
+
var import_react28 = require("react");
|
|
5645
5648
|
|
|
5646
5649
|
// src/components/ImagePlaceholder.tsx
|
|
5647
|
-
var
|
|
5650
|
+
var import_react27 = require("react");
|
|
5648
5651
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
5649
5652
|
|
|
5650
5653
|
// src/components/ProductImagePreview/Thumbnail.tsx
|
|
@@ -5655,11 +5658,11 @@ var import_clsx32 = __toESM(require("clsx"), 1);
|
|
|
5655
5658
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
5656
5659
|
|
|
5657
5660
|
// src/components/ProductImagePreview/ProductPrimaryImage.tsx
|
|
5658
|
-
var
|
|
5661
|
+
var import_react29 = require("react");
|
|
5659
5662
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
5660
5663
|
|
|
5661
5664
|
// src/components/ProductImagePreview/ZoomWindow.tsx
|
|
5662
|
-
var
|
|
5665
|
+
var import_react30 = require("react");
|
|
5663
5666
|
|
|
5664
5667
|
// src/components/Surface.tsx
|
|
5665
5668
|
var import_clsx33 = __toESM(require("clsx"), 1);
|
|
@@ -5704,17 +5707,17 @@ var import_clsx34 = require("clsx");
|
|
|
5704
5707
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
5705
5708
|
|
|
5706
5709
|
// src/components/ProductImagePreview/MobileImageCarousel.tsx
|
|
5707
|
-
var
|
|
5710
|
+
var import_react31 = require("react");
|
|
5708
5711
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
5709
5712
|
|
|
5710
5713
|
// src/components/ProductImagePreview/useProductImagePreview.ts
|
|
5711
|
-
var
|
|
5714
|
+
var import_react32 = require("react");
|
|
5712
5715
|
|
|
5713
5716
|
// src/components/ProductImagePreview/index.tsx
|
|
5714
5717
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
5715
5718
|
|
|
5716
5719
|
// src/components/CompactImagesPreview.tsx
|
|
5717
|
-
var
|
|
5720
|
+
var import_react33 = require("react");
|
|
5718
5721
|
var import_clsx35 = __toESM(require("clsx"), 1);
|
|
5719
5722
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
5720
5723
|
|
|
@@ -5723,12 +5726,12 @@ var import_clsx36 = __toESM(require("clsx"), 1);
|
|
|
5723
5726
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
5724
5727
|
|
|
5725
5728
|
// src/components/ListGroup.tsx
|
|
5726
|
-
var
|
|
5729
|
+
var import_react34 = require("react");
|
|
5727
5730
|
var import_clsx37 = __toESM(require("clsx"), 1);
|
|
5728
5731
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
5729
5732
|
|
|
5730
5733
|
// src/components/Pagination.tsx
|
|
5731
|
-
var
|
|
5734
|
+
var import_react35 = require("react");
|
|
5732
5735
|
var import_clsx38 = __toESM(require("clsx"), 1);
|
|
5733
5736
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
5734
5737
|
var Pagination = ({
|
|
@@ -5740,7 +5743,7 @@ var Pagination = ({
|
|
|
5740
5743
|
className,
|
|
5741
5744
|
disabled
|
|
5742
5745
|
}) => {
|
|
5743
|
-
const goTo = (0,
|
|
5746
|
+
const goTo = (0, import_react35.useCallback)(
|
|
5744
5747
|
(page) => {
|
|
5745
5748
|
if (disabled) return;
|
|
5746
5749
|
onPageChange(page);
|
|
@@ -5757,7 +5760,7 @@ var Pagination = ({
|
|
|
5757
5760
|
goTo(currentPage + 1);
|
|
5758
5761
|
}
|
|
5759
5762
|
};
|
|
5760
|
-
const pageTokens = (0,
|
|
5763
|
+
const pageTokens = (0, import_react35.useMemo)(() => {
|
|
5761
5764
|
if (totalPages <= 5) {
|
|
5762
5765
|
return Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
5763
5766
|
}
|
|
@@ -5880,21 +5883,21 @@ var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
|
5880
5883
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5881
5884
|
|
|
5882
5885
|
// src/components/SearchResultImage/index.tsx
|
|
5883
|
-
var
|
|
5886
|
+
var import_react36 = require("react");
|
|
5884
5887
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
5885
5888
|
|
|
5886
5889
|
// src/components/Alert.tsx
|
|
5887
5890
|
var import_clsx39 = __toESM(require("clsx"), 1);
|
|
5888
|
-
var
|
|
5891
|
+
var import_react37 = require("react");
|
|
5889
5892
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
5890
5893
|
|
|
5891
5894
|
// src/components/OrderCheckIcon.tsx
|
|
5892
5895
|
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
5893
5896
|
|
|
5894
5897
|
// src/components/EditingContext.tsx
|
|
5895
|
-
var
|
|
5898
|
+
var import_react38 = require("react");
|
|
5896
5899
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
5897
|
-
var EditingContext = (0,
|
|
5900
|
+
var EditingContext = (0, import_react38.createContext)(null);
|
|
5898
5901
|
|
|
5899
5902
|
// src/components/AccessCard.tsx
|
|
5900
5903
|
var import_clsx41 = __toESM(require("clsx"), 1);
|
|
@@ -6028,15 +6031,15 @@ var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
|
6028
6031
|
|
|
6029
6032
|
// src/components/AccessCardGroup.tsx
|
|
6030
6033
|
var import_clsx42 = __toESM(require("clsx"), 1);
|
|
6031
|
-
var
|
|
6034
|
+
var import_react39 = require("react");
|
|
6032
6035
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
6033
6036
|
|
|
6034
6037
|
// src/components/MobileDataGrid/ColumnSelector/index.tsx
|
|
6035
6038
|
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
6036
6039
|
function ColumnSelector() {
|
|
6037
6040
|
const context = useGridContext();
|
|
6038
|
-
const ref = (0,
|
|
6039
|
-
const [show, setShow] = (0,
|
|
6041
|
+
const ref = (0, import_react40.useRef)(null);
|
|
6042
|
+
const [show, setShow] = (0, import_react40.useState)(false);
|
|
6040
6043
|
const {
|
|
6041
6044
|
columns,
|
|
6042
6045
|
id,
|
|
@@ -6047,7 +6050,7 @@ function ColumnSelector() {
|
|
|
6047
6050
|
resetColumnVisibility,
|
|
6048
6051
|
dispatch
|
|
6049
6052
|
} = context;
|
|
6050
|
-
const toggleColumnVisibility = (0,
|
|
6053
|
+
const toggleColumnVisibility = (0, import_react40.useCallback)(
|
|
6051
6054
|
(index, visible) => {
|
|
6052
6055
|
dispatch({ type: "UPDATE", index, payload: { meta: { visible } } });
|
|
6053
6056
|
},
|