@dmsi/wedgekit-react 0.0.644 → 0.0.646
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-XVWCVBVF.js → chunk-3MV3KMQH.js} +1 -1
- package/dist/{chunk-Z3Q7PLVD.js → chunk-3PBA2EZ5.js} +1 -1
- package/dist/{chunk-LN3HVXH5.js → chunk-B3T7KBDA.js} +1 -1
- package/dist/{chunk-VAARSN7U.js → chunk-EXCAOI2L.js} +3 -3
- package/dist/{chunk-OXOMO76M.js → chunk-FCGPQNS2.js} +1 -1
- package/dist/{chunk-J2QD64F2.js → chunk-FJXWYGB7.js} +5 -5
- package/dist/{chunk-V2GSI3ZX.js → chunk-HIGNJAQA.js} +2 -2
- package/dist/{chunk-NUFBAJ6L.js → chunk-ISRG77J6.js} +1 -1
- package/dist/{chunk-YXZRGZ2I.js → chunk-REC2XOPI.js} +1 -1
- package/dist/{chunk-K22B4L3G.js → chunk-ZSRTAMSW.js} +28 -1
- package/dist/components/CalendarRange.cjs +157 -154
- package/dist/components/CalendarRange.js +11 -11
- package/dist/components/CompactImagesPreview.cjs +6 -3
- package/dist/components/CompactImagesPreview.js +2 -2
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +157 -154
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +11 -11
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +157 -154
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +11 -11
- package/dist/components/DataGrid/PinnedColumns.cjs +157 -154
- package/dist/components/DataGrid/PinnedColumns.js +11 -11
- package/dist/components/DataGrid/TableBody/LoadingCell.cjs +157 -154
- package/dist/components/DataGrid/TableBody/LoadingCell.js +11 -11
- package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +157 -154
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +11 -11
- package/dist/components/DataGrid/TableBody/index.cjs +157 -154
- package/dist/components/DataGrid/TableBody/index.js +11 -11
- package/dist/components/DataGrid/index.cjs +158 -155
- package/dist/components/DataGrid/index.js +11 -11
- package/dist/components/DataGrid/utils.cjs +157 -154
- package/dist/components/DataGrid/utils.js +11 -11
- package/dist/components/DataGridCell.cjs +61 -58
- package/dist/components/DataGridCell.js +5 -5
- package/dist/components/DateInput.cjs +150 -147
- package/dist/components/DateInput.js +11 -11
- package/dist/components/DateRangeInput.cjs +163 -160
- package/dist/components/DateRangeInput.js +11 -11
- package/dist/components/Menu.cjs +15 -12
- package/dist/components/Menu.js +3 -3
- package/dist/components/MenuOption.cjs +8 -5
- package/dist/components/MenuOption.js +2 -2
- package/dist/components/MobileDataGrid/ColumnList.js +1 -1
- package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +161 -158
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +11 -11
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +1 -1
- package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +161 -158
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +11 -11
- package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +1 -1
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.cjs +19 -16
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +4 -4
- package/dist/components/MobileDataGrid/index.cjs +170 -167
- package/dist/components/MobileDataGrid/index.js +11 -11
- package/dist/components/Modal.cjs +15 -12
- package/dist/components/Modal.js +2 -2
- package/dist/components/NestedMenu.cjs +11 -8
- package/dist/components/NestedMenu.js +2 -2
- package/dist/components/PDFViewer/index.cjs +31 -28
- package/dist/components/PDFViewer/index.js +2 -2
- package/dist/components/ProductImagePreview/index.cjs +18 -15
- package/dist/components/ProductImagePreview/index.js +2 -2
- package/dist/components/ProjectBar.cjs +3 -0
- package/dist/components/ProjectBar.js +1 -1
- package/dist/components/index.cjs +218 -215
- package/dist/components/index.js +11 -11
- package/dist/components/useMenuSystem.cjs +22 -19
- package/dist/components/useMenuSystem.js +2 -2
- package/dist/hooks/index.cjs +28 -0
- package/dist/hooks/index.js +3 -1
- package/package.json +1 -1
|
@@ -117,7 +117,7 @@ var CSS = /* @__PURE__ */ Object.freeze({
|
|
|
117
117
|
|
|
118
118
|
// src/components/DataGridCell.tsx
|
|
119
119
|
var import_clsx9 = __toESM(require("clsx"), 1);
|
|
120
|
-
var
|
|
120
|
+
var import_react12 = require("react");
|
|
121
121
|
|
|
122
122
|
// src/classNames.ts
|
|
123
123
|
var import_clsx = __toESM(require("clsx"), 1);
|
|
@@ -261,7 +261,7 @@ var gapUsingContainerPadding = (0, import_clsx.default)(
|
|
|
261
261
|
|
|
262
262
|
// src/components/MenuOption.tsx
|
|
263
263
|
var import_clsx6 = __toESM(require("clsx"), 1);
|
|
264
|
-
var
|
|
264
|
+
var import_react7 = require("react");
|
|
265
265
|
|
|
266
266
|
// src/components/Label.tsx
|
|
267
267
|
var import_clsx2 = __toESM(require("clsx"), 1);
|
|
@@ -711,6 +711,9 @@ function useTableLayout(initialColumns, key, autosync = true) {
|
|
|
711
711
|
return { columns, setColumns: handleSaveLayout, isReady, getSavedLayout };
|
|
712
712
|
}
|
|
713
713
|
|
|
714
|
+
// src/hooks/useEditCell.tsx
|
|
715
|
+
var import_react6 = require("react");
|
|
716
|
+
|
|
714
717
|
// src/components/Caption.tsx
|
|
715
718
|
var import_clsx5 = __toESM(require("clsx"), 1);
|
|
716
719
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
@@ -862,12 +865,12 @@ var MenuOption = ({
|
|
|
862
865
|
onMouseMove,
|
|
863
866
|
small = false
|
|
864
867
|
}) => {
|
|
865
|
-
const uniqueId = (0,
|
|
866
|
-
const internalRef = (0,
|
|
868
|
+
const uniqueId = (0, import_react7.useId)();
|
|
869
|
+
const internalRef = (0, import_react7.useRef)(null);
|
|
867
870
|
const actualRef = ref || internalRef;
|
|
868
|
-
const menuId = (0,
|
|
871
|
+
const menuId = (0, import_react7.useRef)(`menu-${uniqueId}`);
|
|
869
872
|
const isMobile = useMatchesMobile();
|
|
870
|
-
const [isSubMenuHovered, setIsSubMenuHovered] = (0,
|
|
873
|
+
const [isSubMenuHovered, setIsSubMenuHovered] = (0, import_react7.useState)(false);
|
|
871
874
|
const handleMouseEnter = () => {
|
|
872
875
|
if (subMenu && onSubMenuHover && !disabled) {
|
|
873
876
|
onSubMenuHover(menuId.current, subMenuLevel);
|
|
@@ -1027,27 +1030,27 @@ function highlightMatch(text, searchValue) {
|
|
|
1027
1030
|
|
|
1028
1031
|
// src/components/Menu.tsx
|
|
1029
1032
|
var import_clsx7 = __toESM(require("clsx"), 1);
|
|
1030
|
-
var
|
|
1033
|
+
var import_react9 = require("react");
|
|
1031
1034
|
var import_react_dom = require("react-dom");
|
|
1032
1035
|
|
|
1033
1036
|
// src/components/useMenuSystem.tsx
|
|
1034
|
-
var
|
|
1037
|
+
var import_react8 = require("react");
|
|
1035
1038
|
function useSubMenuSystem(mobilePositionTo) {
|
|
1036
|
-
const [activeMenus, setActiveMenus] = (0,
|
|
1039
|
+
const [activeMenus, setActiveMenus] = (0, import_react8.useState)(
|
|
1037
1040
|
{}
|
|
1038
1041
|
);
|
|
1039
|
-
const [activeMenu, setActiveMenu] = (0,
|
|
1040
|
-
const [currentSubMenuLevel, setCurrentSubMenuLevel] = (0,
|
|
1042
|
+
const [activeMenu, setActiveMenu] = (0, import_react8.useState)("");
|
|
1043
|
+
const [currentSubMenuLevel, setCurrentSubMenuLevel] = (0, import_react8.useState)(
|
|
1041
1044
|
null
|
|
1042
1045
|
);
|
|
1043
|
-
const menuRootRef = (0,
|
|
1044
|
-
const subMenuRefs = (0,
|
|
1045
|
-
const hoverTimeoutRef = (0,
|
|
1046
|
-
const closeTimeoutRef = (0,
|
|
1047
|
-
const mouseStopTimeoutRef = (0,
|
|
1048
|
-
const isMouseMovingRef = (0,
|
|
1049
|
-
const pendingOpenActionRef = (0,
|
|
1050
|
-
const pendingCloseActionRef = (0,
|
|
1046
|
+
const menuRootRef = (0, import_react8.useRef)(null);
|
|
1047
|
+
const subMenuRefs = (0, import_react8.useRef)({});
|
|
1048
|
+
const hoverTimeoutRef = (0, import_react8.useRef)(null);
|
|
1049
|
+
const closeTimeoutRef = (0, import_react8.useRef)(null);
|
|
1050
|
+
const mouseStopTimeoutRef = (0, import_react8.useRef)(null);
|
|
1051
|
+
const isMouseMovingRef = (0, import_react8.useRef)(false);
|
|
1052
|
+
const pendingOpenActionRef = (0, import_react8.useRef)(null);
|
|
1053
|
+
const pendingCloseActionRef = (0, import_react8.useRef)(null);
|
|
1051
1054
|
const isMobile = useMatchesMobile();
|
|
1052
1055
|
const toggleMenu = (menuId, level) => {
|
|
1053
1056
|
if (closeTimeoutRef.current) {
|
|
@@ -1087,7 +1090,7 @@ function useSubMenuSystem(mobilePositionTo) {
|
|
|
1087
1090
|
return newActiveMenus;
|
|
1088
1091
|
});
|
|
1089
1092
|
};
|
|
1090
|
-
const executePendingActions = (0,
|
|
1093
|
+
const executePendingActions = (0, import_react8.useCallback)(() => {
|
|
1091
1094
|
if (pendingCloseActionRef.current) {
|
|
1092
1095
|
pendingCloseActionRef.current();
|
|
1093
1096
|
pendingCloseActionRef.current = null;
|
|
@@ -1176,7 +1179,7 @@ function useSubMenuSystem(mobilePositionTo) {
|
|
|
1176
1179
|
const isMenuActive = (menuId, level) => {
|
|
1177
1180
|
return activeMenus[level] === menuId;
|
|
1178
1181
|
};
|
|
1179
|
-
(0,
|
|
1182
|
+
(0, import_react8.useEffect)(() => {
|
|
1180
1183
|
const handleClickOutside = (event) => {
|
|
1181
1184
|
var _a;
|
|
1182
1185
|
if (Object.keys(activeMenus).length === 0) return;
|
|
@@ -1195,7 +1198,7 @@ function useSubMenuSystem(mobilePositionTo) {
|
|
|
1195
1198
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
1196
1199
|
};
|
|
1197
1200
|
}, [activeMenus]);
|
|
1198
|
-
(0,
|
|
1201
|
+
(0, import_react8.useEffect)(() => {
|
|
1199
1202
|
return () => {
|
|
1200
1203
|
if (hoverTimeoutRef.current) {
|
|
1201
1204
|
clearTimeout(hoverTimeoutRef.current);
|
|
@@ -1273,13 +1276,13 @@ function useSubMenuSystem(mobilePositionTo) {
|
|
|
1273
1276
|
};
|
|
1274
1277
|
}
|
|
1275
1278
|
function useMenuPosition(elementRef, position = "bottom", options) {
|
|
1276
|
-
const [menuPosition, setMenuPosition] = (0,
|
|
1279
|
+
const [menuPosition, setMenuPosition] = (0, import_react8.useState)({
|
|
1277
1280
|
top: 0,
|
|
1278
1281
|
left: 0,
|
|
1279
1282
|
minWidth: 0
|
|
1280
1283
|
});
|
|
1281
1284
|
const isMobile = options == null ? void 0 : options.isMobile;
|
|
1282
|
-
const updatePosition = (0,
|
|
1285
|
+
const updatePosition = (0, import_react8.useCallback)(() => {
|
|
1283
1286
|
var _a, _b, _c;
|
|
1284
1287
|
if (!(elementRef == null ? void 0 : elementRef.current)) return;
|
|
1285
1288
|
const triggerRect = elementRef.current.getBoundingClientRect();
|
|
@@ -1327,7 +1330,7 @@ function useMenuPosition(elementRef, position = "bottom", options) {
|
|
|
1327
1330
|
minWidth: triggerRect.width
|
|
1328
1331
|
});
|
|
1329
1332
|
}, [elementRef, position, options == null ? void 0 : options.menuRef, options == null ? void 0 : options.topOffset, isMobile]);
|
|
1330
|
-
(0,
|
|
1333
|
+
(0, import_react8.useEffect)(() => {
|
|
1331
1334
|
if (!(options == null ? void 0 : options.isOpen) || !(options == null ? void 0 : options.setIsOpen)) return;
|
|
1332
1335
|
const handleClickOutside = (event) => {
|
|
1333
1336
|
var _a, _b, _c, _d, _e;
|
|
@@ -1353,7 +1356,7 @@ function useMenuPosition(elementRef, position = "bottom", options) {
|
|
|
1353
1356
|
options == null ? void 0 : options.menuRef,
|
|
1354
1357
|
options == null ? void 0 : options.additionalRefs
|
|
1355
1358
|
]);
|
|
1356
|
-
(0,
|
|
1359
|
+
(0, import_react8.useEffect)(() => {
|
|
1357
1360
|
updatePosition();
|
|
1358
1361
|
const resizeObserver = new ResizeObserver(updatePosition);
|
|
1359
1362
|
if (elementRef == null ? void 0 : elementRef.current) {
|
|
@@ -1434,9 +1437,9 @@ var Menu = (_a) => {
|
|
|
1434
1437
|
"menuName",
|
|
1435
1438
|
"calculateMinMaxHeight"
|
|
1436
1439
|
]);
|
|
1437
|
-
const internalRef = (0,
|
|
1440
|
+
const internalRef = (0, import_react9.useRef)(null);
|
|
1438
1441
|
const actualRef = ref || internalRef;
|
|
1439
|
-
const [maxHeight, setMaxHeight] = (0,
|
|
1442
|
+
const [maxHeight, setMaxHeight] = (0, import_react9.useState)("180px");
|
|
1440
1443
|
const isMobile = useMatchesMobile();
|
|
1441
1444
|
const { menuPosition, updatePosition } = useMenuPosition(
|
|
1442
1445
|
isMobile && mobilePositionTo ? mobilePositionTo : positionTo,
|
|
@@ -1449,7 +1452,7 @@ var Menu = (_a) => {
|
|
|
1449
1452
|
isMobile: !!(isMobile && mobilePositionTo)
|
|
1450
1453
|
}
|
|
1451
1454
|
);
|
|
1452
|
-
(0,
|
|
1455
|
+
(0, import_react9.useEffect)(() => {
|
|
1453
1456
|
if (calculateMinMaxHeight) {
|
|
1454
1457
|
return;
|
|
1455
1458
|
}
|
|
@@ -1473,7 +1476,7 @@ var Menu = (_a) => {
|
|
|
1473
1476
|
cancelAnimationFrame(raf);
|
|
1474
1477
|
};
|
|
1475
1478
|
}, [actualRef.current, customMaxHeight, calculateMinMaxHeight]);
|
|
1476
|
-
(0,
|
|
1479
|
+
(0, import_react9.useEffect)(() => {
|
|
1477
1480
|
if (!calculateMinMaxHeight) {
|
|
1478
1481
|
return;
|
|
1479
1482
|
}
|
|
@@ -1484,14 +1487,14 @@ var Menu = (_a) => {
|
|
|
1484
1487
|
setMaxHeight(`${calculatedMaxHeight}px`);
|
|
1485
1488
|
}
|
|
1486
1489
|
}, [actualRef.current, positionTo == null ? void 0 : positionTo.current, calculateMinMaxHeight]);
|
|
1487
|
-
(0,
|
|
1490
|
+
(0, import_react9.useEffect)(() => {
|
|
1488
1491
|
if (!show) {
|
|
1489
1492
|
return;
|
|
1490
1493
|
}
|
|
1491
1494
|
initializeMenuFocus();
|
|
1492
1495
|
updatePosition();
|
|
1493
1496
|
}, [show, updatePosition]);
|
|
1494
|
-
(0,
|
|
1497
|
+
(0, import_react9.useEffect)(() => {
|
|
1495
1498
|
if (!show || !setShow) {
|
|
1496
1499
|
return;
|
|
1497
1500
|
}
|
|
@@ -1645,10 +1648,10 @@ var Menu = (_a) => {
|
|
|
1645
1648
|
Menu.displayName = "Menu";
|
|
1646
1649
|
|
|
1647
1650
|
// src/components/Search.tsx
|
|
1648
|
-
var
|
|
1651
|
+
var import_react11 = require("react");
|
|
1649
1652
|
|
|
1650
1653
|
// src/components/Input.tsx
|
|
1651
|
-
var
|
|
1654
|
+
var import_react10 = require("react");
|
|
1652
1655
|
var import_clsx8 = __toESM(require("clsx"), 1);
|
|
1653
1656
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1654
1657
|
var InputBase = (_a) => {
|
|
@@ -1705,9 +1708,9 @@ var InputBase = (_a) => {
|
|
|
1705
1708
|
"data-error": error && !focus || null,
|
|
1706
1709
|
"data-focus": focus || null
|
|
1707
1710
|
};
|
|
1708
|
-
const inputRef = (0,
|
|
1711
|
+
const inputRef = (0, import_react10.useRef)(null);
|
|
1709
1712
|
const inputId = id ? `${id}-input` : void 0;
|
|
1710
|
-
(0,
|
|
1713
|
+
(0, import_react10.useEffect)(() => {
|
|
1711
1714
|
var _a2;
|
|
1712
1715
|
const input = inputRef.current;
|
|
1713
1716
|
const focusHandler = () => {
|
|
@@ -1866,15 +1869,15 @@ var Input = (_a) => {
|
|
|
1866
1869
|
"testid",
|
|
1867
1870
|
"rightAdornment"
|
|
1868
1871
|
]);
|
|
1869
|
-
const [internalValue, setInternalValue] = (0,
|
|
1870
|
-
const [displayValue, setDisplayValue] = (0,
|
|
1871
|
-
(0,
|
|
1872
|
+
const [internalValue, setInternalValue] = (0, import_react10.useState)("");
|
|
1873
|
+
const [displayValue, setDisplayValue] = (0, import_react10.useState)("");
|
|
1874
|
+
(0, import_react10.useEffect)(() => {
|
|
1872
1875
|
var _a2;
|
|
1873
1876
|
const stringValue = (_a2 = propValue == null ? void 0 : propValue.toString()) != null ? _a2 : "";
|
|
1874
1877
|
setInternalValue(stringValue);
|
|
1875
1878
|
setDisplayValue(stringValue);
|
|
1876
1879
|
}, [propValue]);
|
|
1877
|
-
(0,
|
|
1880
|
+
(0, import_react10.useEffect)(() => {
|
|
1878
1881
|
var _a2;
|
|
1879
1882
|
if (variant !== "currency") {
|
|
1880
1883
|
return;
|
|
@@ -2135,14 +2138,14 @@ var Search = (_a) => {
|
|
|
2135
2138
|
"removeRoundness",
|
|
2136
2139
|
"autocompletePadding"
|
|
2137
2140
|
]);
|
|
2138
|
-
const inputRef = (0,
|
|
2139
|
-
const inputContainerRef = (0,
|
|
2140
|
-
const preventFocusOnInitialRender = (0,
|
|
2141
|
-
const [show, setShow] = (0,
|
|
2142
|
-
const [clearing, setClearing] = (0,
|
|
2143
|
-
const uniqueId = (0,
|
|
2141
|
+
const inputRef = (0, import_react11.useRef)(null);
|
|
2142
|
+
const inputContainerRef = (0, import_react11.useRef)(null);
|
|
2143
|
+
const preventFocusOnInitialRender = (0, import_react11.useRef)(true);
|
|
2144
|
+
const [show, setShow] = (0, import_react11.useState)(false);
|
|
2145
|
+
const [clearing, setClearing] = (0, import_react11.useState)(false);
|
|
2146
|
+
const uniqueId = (0, import_react11.useId)();
|
|
2144
2147
|
const searchMenuName = `search-menu-${uniqueId}`;
|
|
2145
|
-
(0,
|
|
2148
|
+
(0, import_react11.useEffect)(() => {
|
|
2146
2149
|
var _a2;
|
|
2147
2150
|
if (preventFocusOnInitialRender.current) {
|
|
2148
2151
|
preventFocusOnInitialRender.current = false;
|
|
@@ -2226,7 +2229,7 @@ Search.displayName = "Search";
|
|
|
2226
2229
|
|
|
2227
2230
|
// src/components/DataGridCell.tsx
|
|
2228
2231
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
2229
|
-
var DataGridCell = (0,
|
|
2232
|
+
var DataGridCell = (0, import_react12.memo)(
|
|
2230
2233
|
(_a) => {
|
|
2231
2234
|
var _b = _a, {
|
|
2232
2235
|
id,
|
|
@@ -2268,10 +2271,10 @@ var DataGridCell = (0, import_react11.memo)(
|
|
|
2268
2271
|
"testid"
|
|
2269
2272
|
]);
|
|
2270
2273
|
const Element = type === "header" ? "th" : "td";
|
|
2271
|
-
const timerRef = (0,
|
|
2272
|
-
const [isGrabbing, setIsGrabbing] = (0,
|
|
2273
|
-
const [isPointerPressed, setIsPointerPressed] = (0,
|
|
2274
|
-
(0,
|
|
2274
|
+
const timerRef = (0, import_react12.useRef)(null);
|
|
2275
|
+
const [isGrabbing, setIsGrabbing] = (0, import_react12.useState)(false);
|
|
2276
|
+
const [isPointerPressed, setIsPointerPressed] = (0, import_react12.useState)(false);
|
|
2277
|
+
(0, import_react12.useEffect)(() => {
|
|
2275
2278
|
return () => {
|
|
2276
2279
|
if (timerRef.current) {
|
|
2277
2280
|
clearTimeout(timerRef.current);
|
|
@@ -2381,12 +2384,12 @@ function DataCellHeader(_a) {
|
|
|
2381
2384
|
"useMenuDefaultMinWidth"
|
|
2382
2385
|
]);
|
|
2383
2386
|
var _a2;
|
|
2384
|
-
const [showMenu, setShowMenu] = (0,
|
|
2385
|
-
const [filter, setFilter] = (0,
|
|
2387
|
+
const [showMenu, setShowMenu] = (0, import_react12.useState)(false);
|
|
2388
|
+
const [filter, setFilter] = (0, import_react12.useState)(
|
|
2386
2389
|
(_a2 = header.column.getFilterValue()) != null ? _a2 : ""
|
|
2387
2390
|
);
|
|
2388
|
-
const ref = (0,
|
|
2389
|
-
const predeterminedPinned = (0,
|
|
2391
|
+
const ref = (0, import_react12.useRef)(null);
|
|
2392
|
+
const predeterminedPinned = (0, import_react12.useRef)(false);
|
|
2390
2393
|
const { column, getContext } = header;
|
|
2391
2394
|
const { id: columnId, setFilterValue } = column;
|
|
2392
2395
|
const {
|
|
@@ -2396,14 +2399,14 @@ function DataCellHeader(_a) {
|
|
|
2396
2399
|
listeners: subMenuListeners,
|
|
2397
2400
|
mobileHide
|
|
2398
2401
|
} = useSubMenuSystem(node ? node : ref);
|
|
2399
|
-
(0,
|
|
2402
|
+
(0, import_react12.useEffect)(() => {
|
|
2400
2403
|
var _a3, _b2, _c;
|
|
2401
2404
|
const columnPinning = (_a3 = getContext().table.options.initialState) == null ? void 0 : _a3.columnPinning;
|
|
2402
2405
|
const left = (_b2 = columnPinning == null ? void 0 : columnPinning.left) != null ? _b2 : [];
|
|
2403
2406
|
const right = (_c = columnPinning == null ? void 0 : columnPinning.right) != null ? _c : [];
|
|
2404
2407
|
predeterminedPinned.current = [...left, ...right].includes(columnId);
|
|
2405
2408
|
}, [columnId, getContext]);
|
|
2406
|
-
(0,
|
|
2409
|
+
(0, import_react12.useEffect)(() => {
|
|
2407
2410
|
const handler = setTimeout(() => {
|
|
2408
2411
|
setFilterValue(filter);
|
|
2409
2412
|
}, 500);
|
|
@@ -2666,7 +2669,7 @@ function DragAlongCell(_a) {
|
|
|
2666
2669
|
DragAlongCell.displayName = "DragAlongCell";
|
|
2667
2670
|
|
|
2668
2671
|
// src/components/DataGrid/index.tsx
|
|
2669
|
-
var
|
|
2672
|
+
var import_react16 = __toESM(require("react"), 1);
|
|
2670
2673
|
var import_react_table2 = require("@tanstack/react-table");
|
|
2671
2674
|
var import_core = require("@dnd-kit/core");
|
|
2672
2675
|
var import_sortable2 = require("@dnd-kit/sortable");
|
|
@@ -2694,13 +2697,13 @@ function getSortIcon(sort, nextSort = false) {
|
|
|
2694
2697
|
}
|
|
2695
2698
|
|
|
2696
2699
|
// src/components/DataGrid/PinnedColumns.tsx
|
|
2697
|
-
var
|
|
2700
|
+
var import_react15 = __toESM(require("react"), 1);
|
|
2698
2701
|
|
|
2699
2702
|
// src/components/DataGrid/ColumnSelectorHeaderCell/index.tsx
|
|
2700
|
-
var
|
|
2703
|
+
var import_react14 = require("react");
|
|
2701
2704
|
|
|
2702
2705
|
// src/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.tsx
|
|
2703
|
-
var
|
|
2706
|
+
var import_react13 = require("react");
|
|
2704
2707
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
2705
2708
|
function ColumnSelectorMenuOption({
|
|
2706
2709
|
id,
|
|
@@ -2708,7 +2711,7 @@ function ColumnSelectorMenuOption({
|
|
|
2708
2711
|
column,
|
|
2709
2712
|
toggleColumnVisibility
|
|
2710
2713
|
}) {
|
|
2711
|
-
const [isVisible, setIsVisible] = (0,
|
|
2714
|
+
const [isVisible, setIsVisible] = (0, import_react13.useState)(column.getIsVisible());
|
|
2712
2715
|
const label = typeof column.columnDef.header === "string" ? column.columnDef.header : null;
|
|
2713
2716
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(MenuOption, { id, testid, defaultChecked: isVisible, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2714
2717
|
Checkbox,
|
|
@@ -2734,8 +2737,8 @@ function ColumnSelectorHeaderCell({
|
|
|
2734
2737
|
toggleColumnVisibility,
|
|
2735
2738
|
resetColumnVisibility
|
|
2736
2739
|
}) {
|
|
2737
|
-
const ref = (0,
|
|
2738
|
-
const [show, setShow] = (0,
|
|
2740
|
+
const ref = (0, import_react14.useRef)(null);
|
|
2741
|
+
const [show, setShow] = (0, import_react14.useState)(false);
|
|
2739
2742
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2740
2743
|
DataGridCell,
|
|
2741
2744
|
{
|
|
@@ -2904,7 +2907,7 @@ function PinnedColumns(_a) {
|
|
|
2904
2907
|
header.id
|
|
2905
2908
|
);
|
|
2906
2909
|
}
|
|
2907
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react15.default.Fragment, { children: ((_f = header.column.columnDef.meta) == null ? void 0 : _f.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DataGridCell, { type: "header", component: "checkbox", locked: true, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2908
2911
|
Checkbox,
|
|
2909
2912
|
{
|
|
2910
2913
|
checked: allSelectedAcrossPages,
|
|
@@ -2986,23 +2989,23 @@ function DataGrid({
|
|
|
2986
2989
|
ref
|
|
2987
2990
|
}) {
|
|
2988
2991
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
2989
|
-
(0,
|
|
2992
|
+
(0, import_react16.useImperativeHandle)(ref, () => ({
|
|
2990
2993
|
getSavedLayout: () => {
|
|
2991
2994
|
return getSavedLayout();
|
|
2992
2995
|
}
|
|
2993
2996
|
}));
|
|
2994
|
-
const [localSorting, setLocalSorting] = (0,
|
|
2995
|
-
const [localColumnFilters, setLocalColumnFilters] = (0,
|
|
2996
|
-
const [localRowSelection, setLocalRowSelection] = (0,
|
|
2997
|
+
const [localSorting, setLocalSorting] = (0, import_react16.useState)([]);
|
|
2998
|
+
const [localColumnFilters, setLocalColumnFilters] = (0, import_react16.useState)([]);
|
|
2999
|
+
const [localRowSelection, setLocalRowSelection] = (0, import_react16.useState)({});
|
|
2997
3000
|
const {
|
|
2998
3001
|
columns: tableColumns,
|
|
2999
3002
|
setColumns: setTableColumns,
|
|
3000
3003
|
getSavedLayout
|
|
3001
3004
|
} = useTableLayout(columns, id != null ? id : testid);
|
|
3002
|
-
const [columnOrder, setColumnOrder] = (0,
|
|
3005
|
+
const [columnOrder, setColumnOrder] = (0, import_react16.useState)(
|
|
3003
3006
|
tableColumns.map((c) => c.id)
|
|
3004
3007
|
);
|
|
3005
|
-
const [columnVisibility, setColumnVisibility] = (0,
|
|
3008
|
+
const [columnVisibility, setColumnVisibility] = (0, import_react16.useState)(
|
|
3006
3009
|
Object.fromEntries(
|
|
3007
3010
|
tableColumns.filter((column) => !!column.id).map((column) => {
|
|
3008
3011
|
var _a2, _b2;
|
|
@@ -3010,7 +3013,7 @@ function DataGrid({
|
|
|
3010
3013
|
})
|
|
3011
3014
|
)
|
|
3012
3015
|
);
|
|
3013
|
-
const updateColumnVisibility = (0,
|
|
3016
|
+
const updateColumnVisibility = (0, import_react16.useCallback)(
|
|
3014
3017
|
(updateOrder) => {
|
|
3015
3018
|
setColumnVisibility(
|
|
3016
3019
|
Object.fromEntries(
|
|
@@ -3024,7 +3027,7 @@ function DataGrid({
|
|
|
3024
3027
|
},
|
|
3025
3028
|
[tableColumns]
|
|
3026
3029
|
);
|
|
3027
|
-
const resetDefaultColumnVisibility = (0,
|
|
3030
|
+
const resetDefaultColumnVisibility = (0, import_react16.useCallback)(() => {
|
|
3028
3031
|
setTableColumns((prev) => {
|
|
3029
3032
|
columns.forEach((column) => {
|
|
3030
3033
|
var _a2, _b2;
|
|
@@ -3040,7 +3043,7 @@ function DataGrid({
|
|
|
3040
3043
|
return [...prev];
|
|
3041
3044
|
}, true);
|
|
3042
3045
|
}, [columns, setTableColumns]);
|
|
3043
|
-
(0,
|
|
3046
|
+
(0, import_react16.useEffect)(() => {
|
|
3044
3047
|
updateColumnVisibility(true);
|
|
3045
3048
|
}, [updateColumnVisibility]);
|
|
3046
3049
|
const sortingState = pagination ? externalSorting != null ? externalSorting : localSorting : localSorting;
|
|
@@ -3056,7 +3059,7 @@ function DataGrid({
|
|
|
3056
3059
|
(onColumnFiltersChange != null ? onColumnFiltersChange : setLocalColumnFilters)(value);
|
|
3057
3060
|
} : setLocalColumnFilters;
|
|
3058
3061
|
const rowSelection = externalRowSelection != null ? externalRowSelection : localRowSelection;
|
|
3059
|
-
const setRowSelection = (0,
|
|
3062
|
+
const setRowSelection = (0, import_react16.useCallback)(
|
|
3060
3063
|
(updaterOrValue) => {
|
|
3061
3064
|
if (pagination) {
|
|
3062
3065
|
const value = typeof updaterOrValue === "function" ? updaterOrValue(externalRowSelection != null ? externalRowSelection : {}) : updaterOrValue;
|
|
@@ -3070,9 +3073,9 @@ function DataGrid({
|
|
|
3070
3073
|
},
|
|
3071
3074
|
[externalRowSelection, onRowSelectionChange, pagination]
|
|
3072
3075
|
);
|
|
3073
|
-
const dndId = (0,
|
|
3074
|
-
const containerRef =
|
|
3075
|
-
const toggleColumnVisibility = (0,
|
|
3076
|
+
const dndId = (0, import_react16.useId)();
|
|
3077
|
+
const containerRef = import_react16.default.useRef(null);
|
|
3078
|
+
const toggleColumnVisibility = (0, import_react16.useCallback)(
|
|
3076
3079
|
(columnId, isVisible) => {
|
|
3077
3080
|
setTableColumns((prev) => {
|
|
3078
3081
|
const persistedIndex = prev.findIndex((col) => col.id === columnId);
|
|
@@ -3320,7 +3323,7 @@ function DataGrid({
|
|
|
3320
3323
|
header.id
|
|
3321
3324
|
);
|
|
3322
3325
|
}
|
|
3323
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react16.default.Fragment, { children: ((_e2 = header.column.columnDef.meta) == null ? void 0 : _e2.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3324
3327
|
DataGridCell,
|
|
3325
3328
|
{
|
|
3326
3329
|
id: id ? `${id}-header-${header.id}` : void 0,
|
|
@@ -3526,7 +3529,7 @@ function adaptTableStateSetter(setter) {
|
|
|
3526
3529
|
}
|
|
3527
3530
|
|
|
3528
3531
|
// src/components/Select.tsx
|
|
3529
|
-
var
|
|
3532
|
+
var import_react17 = require("react");
|
|
3530
3533
|
var import_clsx13 = __toESM(require("clsx"), 1);
|
|
3531
3534
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
3532
3535
|
var Select = (_a) => {
|
|
@@ -3560,11 +3563,11 @@ var Select = (_a) => {
|
|
|
3560
3563
|
"value"
|
|
3561
3564
|
]);
|
|
3562
3565
|
var _a2;
|
|
3563
|
-
const inputRef = (0,
|
|
3564
|
-
const inputContainerRef = (0,
|
|
3565
|
-
const preventFocusOnInitialRender = (0,
|
|
3566
|
-
const [show, setShow] = (0,
|
|
3567
|
-
(0,
|
|
3566
|
+
const inputRef = (0, import_react17.useRef)(null);
|
|
3567
|
+
const inputContainerRef = (0, import_react17.useRef)(null);
|
|
3568
|
+
const preventFocusOnInitialRender = (0, import_react17.useRef)(true);
|
|
3569
|
+
const [show, setShow] = (0, import_react17.useState)(false);
|
|
3570
|
+
(0, import_react17.useEffect)(() => {
|
|
3568
3571
|
var _a3;
|
|
3569
3572
|
if (preventFocusOnInitialRender.current) {
|
|
3570
3573
|
preventFocusOnInitialRender.current = false;
|
|
@@ -3986,7 +3989,7 @@ Button.displayName = "Button";
|
|
|
3986
3989
|
|
|
3987
3990
|
// src/components/Tooltip.tsx
|
|
3988
3991
|
var import_clsx17 = __toESM(require("clsx"), 1);
|
|
3989
|
-
var
|
|
3992
|
+
var import_react18 = require("react");
|
|
3990
3993
|
var import_react_dom2 = require("react-dom");
|
|
3991
3994
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
3992
3995
|
var Tooltip = ({
|
|
@@ -3999,11 +4002,11 @@ var Tooltip = ({
|
|
|
3999
4002
|
offset = 8,
|
|
4000
4003
|
keepHidden = false
|
|
4001
4004
|
}) => {
|
|
4002
|
-
const ref = (0,
|
|
4003
|
-
const tooltipRef = (0,
|
|
4004
|
-
const [tooltipPosition, setTooltipPosition] = (0,
|
|
4005
|
-
const [isVisible, setIsVisible] = (0,
|
|
4006
|
-
const [removeOpacity, setRemoveOpacity] = (0,
|
|
4005
|
+
const ref = (0, import_react18.useRef)(null);
|
|
4006
|
+
const tooltipRef = (0, import_react18.useRef)(null);
|
|
4007
|
+
const [tooltipPosition, setTooltipPosition] = (0, import_react18.useState)({ top: 0, left: 0 });
|
|
4008
|
+
const [isVisible, setIsVisible] = (0, import_react18.useState)(false);
|
|
4009
|
+
const [removeOpacity, setRemoveOpacity] = (0, import_react18.useState)(false);
|
|
4007
4010
|
const updatePosition = () => {
|
|
4008
4011
|
if (!ref.current || !tooltipRef.current) return;
|
|
4009
4012
|
const rect = ref.current.getBoundingClientRect();
|
|
@@ -4042,14 +4045,14 @@ var Tooltip = ({
|
|
|
4042
4045
|
setIsVisible(false);
|
|
4043
4046
|
setRemoveOpacity(false);
|
|
4044
4047
|
};
|
|
4045
|
-
(0,
|
|
4048
|
+
(0, import_react18.useEffect)(() => {
|
|
4046
4049
|
if (isVisible && tooltipRef.current) {
|
|
4047
4050
|
requestAnimationFrame(() => {
|
|
4048
4051
|
updatePosition();
|
|
4049
4052
|
});
|
|
4050
4053
|
}
|
|
4051
4054
|
}, [isVisible]);
|
|
4052
|
-
(0,
|
|
4055
|
+
(0, import_react18.useEffect)(() => {
|
|
4053
4056
|
if (isVisible) {
|
|
4054
4057
|
window.addEventListener("resize", updatePosition);
|
|
4055
4058
|
return () => window.removeEventListener("resize", updatePosition);
|
|
@@ -4107,12 +4110,12 @@ var Tooltip = ({
|
|
|
4107
4110
|
Tooltip.displayName = "Tooltip";
|
|
4108
4111
|
|
|
4109
4112
|
// src/components/DateInput.tsx
|
|
4110
|
-
var
|
|
4113
|
+
var import_react20 = require("react");
|
|
4111
4114
|
var import_react_dom3 = require("react-dom");
|
|
4112
4115
|
|
|
4113
4116
|
// src/components/CalendarRange.tsx
|
|
4114
4117
|
var import_clsx18 = __toESM(require("clsx"), 1);
|
|
4115
|
-
var
|
|
4118
|
+
var import_react19 = __toESM(require("react"), 1);
|
|
4116
4119
|
var import_polyfill = require("@js-temporal/polyfill");
|
|
4117
4120
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
4118
4121
|
function DateCell(_a) {
|
|
@@ -4225,20 +4228,20 @@ function CalendarRange({
|
|
|
4225
4228
|
const fromDate = parseDate(from);
|
|
4226
4229
|
const toDate = parseDate(to);
|
|
4227
4230
|
const today = import_polyfill.Temporal.Now.plainDateISO();
|
|
4228
|
-
const [baseMonth, setBaseMonth] = (0,
|
|
4231
|
+
const [baseMonth, setBaseMonth] = (0, import_react19.useState)(
|
|
4229
4232
|
fromDate != null ? fromDate : today.with({ day: 1 })
|
|
4230
4233
|
);
|
|
4231
|
-
const [selecting, setSelecting] = (0,
|
|
4232
|
-
const [pendingFrom, setPendingFrom] = (0,
|
|
4233
|
-
const [hoveredDate, setHoveredDate] = (0,
|
|
4234
|
-
(0,
|
|
4234
|
+
const [selecting, setSelecting] = (0, import_react19.useState)("from");
|
|
4235
|
+
const [pendingFrom, setPendingFrom] = (0, import_react19.useState)(void 0);
|
|
4236
|
+
const [hoveredDate, setHoveredDate] = (0, import_react19.useState)(void 0);
|
|
4237
|
+
(0, import_react19.useEffect)(() => {
|
|
4235
4238
|
if (fromDate) {
|
|
4236
4239
|
setBaseMonth(fromDate.with({ day: 1 }));
|
|
4237
4240
|
} else if (toDate) {
|
|
4238
4241
|
setBaseMonth(toDate.with({ day: 1 }));
|
|
4239
4242
|
}
|
|
4240
4243
|
}, [from, to]);
|
|
4241
|
-
(0,
|
|
4244
|
+
(0, import_react19.useEffect)(() => {
|
|
4242
4245
|
if (fromDate && toDate) {
|
|
4243
4246
|
setSelecting("from");
|
|
4244
4247
|
setPendingFrom(void 0);
|
|
@@ -4384,14 +4387,14 @@ function CalendarPane({
|
|
|
4384
4387
|
const years = Array.from({ length: 100 }).map(
|
|
4385
4388
|
(_, i) => baseMonth.year - 50 + i
|
|
4386
4389
|
);
|
|
4387
|
-
const [monthMenuOpen, setMonthMenuOpen] = (0,
|
|
4388
|
-
const [yearMenuOpen, setYearMenuOpen] = (0,
|
|
4389
|
-
const monthMenuRef = (0,
|
|
4390
|
-
const yearMenuRef = (0,
|
|
4390
|
+
const [monthMenuOpen, setMonthMenuOpen] = (0, import_react19.useState)(false);
|
|
4391
|
+
const [yearMenuOpen, setYearMenuOpen] = (0, import_react19.useState)(false);
|
|
4392
|
+
const monthMenuRef = (0, import_react19.useRef)(null);
|
|
4393
|
+
const yearMenuRef = (0, import_react19.useRef)(null);
|
|
4391
4394
|
const month = getMonthData(offset);
|
|
4392
4395
|
const totalCells = 42;
|
|
4393
4396
|
const emptyCells = month.firstDayOffset;
|
|
4394
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react19.default.Fragment, { children: [
|
|
4395
4398
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4396
4399
|
"div",
|
|
4397
4400
|
{
|
|
@@ -4599,24 +4602,24 @@ var DateInput = (_a) => {
|
|
|
4599
4602
|
"label",
|
|
4600
4603
|
"isDateAvailable"
|
|
4601
4604
|
]);
|
|
4602
|
-
const [visible, setVisible] = (0,
|
|
4603
|
-
const [inputValue, setInputValue] = (0,
|
|
4604
|
-
const [isTyping, setIsTyping] = (0,
|
|
4605
|
-
const popoverRef = (0,
|
|
4606
|
-
const triggerRef = (0,
|
|
4607
|
-
const rootRef = (0,
|
|
4608
|
-
const [calendarPosition, setCalendarPosition] = (0,
|
|
4605
|
+
const [visible, setVisible] = (0, import_react20.useState)(false);
|
|
4606
|
+
const [inputValue, setInputValue] = (0, import_react20.useState)("");
|
|
4607
|
+
const [isTyping, setIsTyping] = (0, import_react20.useState)(false);
|
|
4608
|
+
const popoverRef = (0, import_react20.useRef)(null);
|
|
4609
|
+
const triggerRef = (0, import_react20.useRef)(null);
|
|
4610
|
+
const rootRef = (0, import_react20.useRef)(null);
|
|
4611
|
+
const [calendarPosition, setCalendarPosition] = (0, import_react20.useState)({
|
|
4609
4612
|
top: 0,
|
|
4610
4613
|
left: 0,
|
|
4611
4614
|
width: 0
|
|
4612
4615
|
});
|
|
4613
4616
|
const [from, to] = [value, ""];
|
|
4614
|
-
(0,
|
|
4617
|
+
(0, import_react20.useEffect)(() => {
|
|
4615
4618
|
if (!isTyping) {
|
|
4616
4619
|
setInputValue(formatDisplayValue(from));
|
|
4617
4620
|
}
|
|
4618
4621
|
}, [from, isTyping]);
|
|
4619
|
-
(0,
|
|
4622
|
+
(0, import_react20.useLayoutEffect)(() => {
|
|
4620
4623
|
if (visible) {
|
|
4621
4624
|
updatePosition();
|
|
4622
4625
|
}
|
|
@@ -4631,7 +4634,7 @@ var DateInput = (_a) => {
|
|
|
4631
4634
|
});
|
|
4632
4635
|
}
|
|
4633
4636
|
};
|
|
4634
|
-
(0,
|
|
4637
|
+
(0, import_react20.useEffect)(() => {
|
|
4635
4638
|
updatePosition();
|
|
4636
4639
|
const resizeObserver = new ResizeObserver(updatePosition);
|
|
4637
4640
|
if (triggerRef.current) {
|
|
@@ -4643,7 +4646,7 @@ var DateInput = (_a) => {
|
|
|
4643
4646
|
window.removeEventListener("scroll", updatePosition);
|
|
4644
4647
|
};
|
|
4645
4648
|
}, []);
|
|
4646
|
-
(0,
|
|
4649
|
+
(0, import_react20.useEffect)(() => {
|
|
4647
4650
|
const handleKeyDown2 = (event) => {
|
|
4648
4651
|
var _a2;
|
|
4649
4652
|
if (event.key === "Escape" && popoverRef.current) {
|
|
@@ -4656,7 +4659,7 @@ var DateInput = (_a) => {
|
|
|
4656
4659
|
document.removeEventListener("keydown", handleKeyDown2);
|
|
4657
4660
|
};
|
|
4658
4661
|
});
|
|
4659
|
-
(0,
|
|
4662
|
+
(0, import_react20.useEffect)(() => {
|
|
4660
4663
|
const handleClickOutside = (event) => {
|
|
4661
4664
|
if (popoverRef.current && !popoverRef.current.contains(event.target) && triggerRef.current && !triggerRef.current.contains(event.target)) {
|
|
4662
4665
|
setVisible(false);
|
|
@@ -4877,14 +4880,14 @@ Heading3.displayName = "Heading3";
|
|
|
4877
4880
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
4878
4881
|
|
|
4879
4882
|
// src/components/MobileDataGrid/ColumnSelector/index.tsx
|
|
4880
|
-
var
|
|
4883
|
+
var import_react23 = require("react");
|
|
4881
4884
|
|
|
4882
4885
|
// src/components/MobileDataGrid/GridContextProvider/useGridContext.ts
|
|
4883
|
-
var
|
|
4886
|
+
var import_react22 = require("react");
|
|
4884
4887
|
|
|
4885
4888
|
// src/components/MobileDataGrid/GridContextProvider/GridContext.tsx
|
|
4886
|
-
var
|
|
4887
|
-
var GridContext = (0,
|
|
4889
|
+
var import_react21 = require("react");
|
|
4890
|
+
var GridContext = (0, import_react21.createContext)(null);
|
|
4888
4891
|
|
|
4889
4892
|
// src/components/MobileDataGrid/ColumnSelector/index.tsx
|
|
4890
4893
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
@@ -4893,12 +4896,12 @@ var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
|
4893
4896
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
4894
4897
|
|
|
4895
4898
|
// src/components/MobileDataGrid/GridContextProvider/index.tsx
|
|
4896
|
-
var
|
|
4899
|
+
var import_react24 = require("react");
|
|
4897
4900
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
4898
4901
|
|
|
4899
4902
|
// src/components/Modal.tsx
|
|
4900
4903
|
var import_clsx27 = __toESM(require("clsx"), 1);
|
|
4901
|
-
var
|
|
4904
|
+
var import_react26 = require("react");
|
|
4902
4905
|
|
|
4903
4906
|
// src/components/ModalHeader.tsx
|
|
4904
4907
|
var import_clsx23 = __toESM(require("clsx"), 1);
|
|
@@ -5074,10 +5077,10 @@ var import_react_dom4 = require("react-dom");
|
|
|
5074
5077
|
var import_react_use = require("react-use");
|
|
5075
5078
|
|
|
5076
5079
|
// src/components/useMounted.tsx
|
|
5077
|
-
var
|
|
5080
|
+
var import_react25 = require("react");
|
|
5078
5081
|
var useMounted = () => {
|
|
5079
|
-
const [isMounted, setIsMounted] = (0,
|
|
5080
|
-
(0,
|
|
5082
|
+
const [isMounted, setIsMounted] = (0, import_react25.useState)(false);
|
|
5083
|
+
(0, import_react25.useEffect)(() => {
|
|
5081
5084
|
setIsMounted(true);
|
|
5082
5085
|
return () => setIsMounted(false);
|
|
5083
5086
|
}, []);
|
|
@@ -5171,12 +5174,12 @@ var Modal = ({
|
|
|
5171
5174
|
}) => {
|
|
5172
5175
|
var _a;
|
|
5173
5176
|
const mounted = useMounted();
|
|
5174
|
-
const modalRef = (0,
|
|
5175
|
-
const bgRef = (0,
|
|
5177
|
+
const modalRef = (0, import_react26.useRef)(null);
|
|
5178
|
+
const bgRef = (0, import_react26.useRef)(null);
|
|
5176
5179
|
const wasOpen = (0, import_react_use.usePrevious)(open);
|
|
5177
5180
|
const isMobile = useMatchesMobile();
|
|
5178
5181
|
const computedFixedHeightScrolling = isMobile || fixedHeightScrolling;
|
|
5179
|
-
(0,
|
|
5182
|
+
(0, import_react26.useEffect)(() => {
|
|
5180
5183
|
if (!mounted) return;
|
|
5181
5184
|
if (!modalRef.current || !bgRef.current) {
|
|
5182
5185
|
console.error("Modal or background reference is not set.");
|
|
@@ -5196,7 +5199,7 @@ var Modal = ({
|
|
|
5196
5199
|
bgFadeIn(bgRef.current);
|
|
5197
5200
|
}
|
|
5198
5201
|
}, [mounted, onClose, open, wasOpen]);
|
|
5199
|
-
const handleKeyDown = (0,
|
|
5202
|
+
const handleKeyDown = (0, import_react26.useCallback)(
|
|
5200
5203
|
(e) => {
|
|
5201
5204
|
if (e.key === "Escape") {
|
|
5202
5205
|
if (onClose) {
|
|
@@ -5207,12 +5210,12 @@ var Modal = ({
|
|
|
5207
5210
|
},
|
|
5208
5211
|
[onClose]
|
|
5209
5212
|
);
|
|
5210
|
-
const handleClose = (0,
|
|
5213
|
+
const handleClose = (0, import_react26.useCallback)(() => {
|
|
5211
5214
|
if (onClose) {
|
|
5212
5215
|
onClose();
|
|
5213
5216
|
}
|
|
5214
5217
|
}, [onClose]);
|
|
5215
|
-
(0,
|
|
5218
|
+
(0, import_react26.useEffect)(() => {
|
|
5216
5219
|
if (open) {
|
|
5217
5220
|
document.addEventListener("keyup", handleKeyDown);
|
|
5218
5221
|
}
|
|
@@ -5220,7 +5223,7 @@ var Modal = ({
|
|
|
5220
5223
|
document.removeEventListener("keyup", handleKeyDown);
|
|
5221
5224
|
};
|
|
5222
5225
|
}, [open, handleKeyDown]);
|
|
5223
|
-
(0,
|
|
5226
|
+
(0, import_react26.useEffect)(() => {
|
|
5224
5227
|
if (!open) return;
|
|
5225
5228
|
const scrollY = window.scrollY;
|
|
5226
5229
|
const body = document.body;
|
|
@@ -5241,7 +5244,7 @@ var Modal = ({
|
|
|
5241
5244
|
};
|
|
5242
5245
|
}, [open]);
|
|
5243
5246
|
const { sizeClass } = (_a = sizes[size]) != null ? _a : sizes.small;
|
|
5244
|
-
const backgroundClickHandler = (0,
|
|
5247
|
+
const backgroundClickHandler = (0, import_react26.useCallback)(
|
|
5245
5248
|
(e) => {
|
|
5246
5249
|
const target = e.target;
|
|
5247
5250
|
const currentTarget = e.currentTarget;
|
|
@@ -5350,10 +5353,10 @@ var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
|
5350
5353
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
5351
5354
|
|
|
5352
5355
|
// src/components/ProductImagePreview/Thumbnail.tsx
|
|
5353
|
-
var
|
|
5356
|
+
var import_react28 = require("react");
|
|
5354
5357
|
|
|
5355
5358
|
// src/components/ImagePlaceholder.tsx
|
|
5356
|
-
var
|
|
5359
|
+
var import_react27 = require("react");
|
|
5357
5360
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
5358
5361
|
|
|
5359
5362
|
// src/components/ProductImagePreview/Thumbnail.tsx
|
|
@@ -5364,11 +5367,11 @@ var import_clsx30 = __toESM(require("clsx"), 1);
|
|
|
5364
5367
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
5365
5368
|
|
|
5366
5369
|
// src/components/ProductImagePreview/ProductPrimaryImage.tsx
|
|
5367
|
-
var
|
|
5370
|
+
var import_react29 = require("react");
|
|
5368
5371
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
5369
5372
|
|
|
5370
5373
|
// src/components/ProductImagePreview/ZoomWindow.tsx
|
|
5371
|
-
var
|
|
5374
|
+
var import_react30 = require("react");
|
|
5372
5375
|
|
|
5373
5376
|
// src/components/Surface.tsx
|
|
5374
5377
|
var import_clsx31 = __toESM(require("clsx"), 1);
|
|
@@ -5413,17 +5416,17 @@ var import_clsx32 = require("clsx");
|
|
|
5413
5416
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
5414
5417
|
|
|
5415
5418
|
// src/components/ProductImagePreview/MobileImageCarousel.tsx
|
|
5416
|
-
var
|
|
5419
|
+
var import_react31 = require("react");
|
|
5417
5420
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
5418
5421
|
|
|
5419
5422
|
// src/components/ProductImagePreview/useProductImagePreview.ts
|
|
5420
|
-
var
|
|
5423
|
+
var import_react32 = require("react");
|
|
5421
5424
|
|
|
5422
5425
|
// src/components/ProductImagePreview/index.tsx
|
|
5423
5426
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
5424
5427
|
|
|
5425
5428
|
// src/components/CompactImagesPreview.tsx
|
|
5426
|
-
var
|
|
5429
|
+
var import_react33 = require("react");
|
|
5427
5430
|
var import_clsx33 = __toESM(require("clsx"), 1);
|
|
5428
5431
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
5429
5432
|
|
|
@@ -5432,12 +5435,12 @@ var import_clsx34 = __toESM(require("clsx"), 1);
|
|
|
5432
5435
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
5433
5436
|
|
|
5434
5437
|
// src/components/ListGroup.tsx
|
|
5435
|
-
var
|
|
5438
|
+
var import_react34 = require("react");
|
|
5436
5439
|
var import_clsx35 = __toESM(require("clsx"), 1);
|
|
5437
5440
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
5438
5441
|
|
|
5439
5442
|
// src/components/Pagination.tsx
|
|
5440
|
-
var
|
|
5443
|
+
var import_react35 = require("react");
|
|
5441
5444
|
var import_clsx36 = __toESM(require("clsx"), 1);
|
|
5442
5445
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
5443
5446
|
var Pagination = ({
|
|
@@ -5449,7 +5452,7 @@ var Pagination = ({
|
|
|
5449
5452
|
className,
|
|
5450
5453
|
disabled
|
|
5451
5454
|
}) => {
|
|
5452
|
-
const goTo = (0,
|
|
5455
|
+
const goTo = (0, import_react35.useCallback)(
|
|
5453
5456
|
(page) => {
|
|
5454
5457
|
if (disabled) return;
|
|
5455
5458
|
onPageChange(page);
|
|
@@ -5466,7 +5469,7 @@ var Pagination = ({
|
|
|
5466
5469
|
goTo(currentPage + 1);
|
|
5467
5470
|
}
|
|
5468
5471
|
};
|
|
5469
|
-
const pageTokens = (0,
|
|
5472
|
+
const pageTokens = (0, import_react35.useMemo)(() => {
|
|
5470
5473
|
if (totalPages <= 5) {
|
|
5471
5474
|
return Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
5472
5475
|
}
|
|
@@ -5589,21 +5592,21 @@ var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
|
5589
5592
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
5590
5593
|
|
|
5591
5594
|
// src/components/SearchResultImage/index.tsx
|
|
5592
|
-
var
|
|
5595
|
+
var import_react36 = require("react");
|
|
5593
5596
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
5594
5597
|
|
|
5595
5598
|
// src/components/Alert.tsx
|
|
5596
5599
|
var import_clsx37 = __toESM(require("clsx"), 1);
|
|
5597
|
-
var
|
|
5600
|
+
var import_react37 = require("react");
|
|
5598
5601
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5599
5602
|
|
|
5600
5603
|
// src/components/OrderCheckIcon.tsx
|
|
5601
5604
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
5602
5605
|
|
|
5603
5606
|
// src/components/EditingContext.tsx
|
|
5604
|
-
var
|
|
5607
|
+
var import_react38 = require("react");
|
|
5605
5608
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
5606
|
-
var EditingContext = (0,
|
|
5609
|
+
var EditingContext = (0, import_react38.createContext)(null);
|
|
5607
5610
|
|
|
5608
5611
|
// src/components/AccessCard.tsx
|
|
5609
5612
|
var import_clsx39 = __toESM(require("clsx"), 1);
|
|
@@ -5737,7 +5740,7 @@ var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
|
5737
5740
|
|
|
5738
5741
|
// src/components/AccessCardGroup.tsx
|
|
5739
5742
|
var import_clsx40 = __toESM(require("clsx"), 1);
|
|
5740
|
-
var
|
|
5743
|
+
var import_react39 = require("react");
|
|
5741
5744
|
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
5742
5745
|
|
|
5743
5746
|
// src/components/DataGrid/TableBody/index.tsx
|
|
@@ -5746,7 +5749,7 @@ var import_clsx42 = __toESM(require("clsx"), 1);
|
|
|
5746
5749
|
// src/components/DataGrid/TableBody/TableBodyRow.tsx
|
|
5747
5750
|
var import_clsx41 = __toESM(require("clsx"), 1);
|
|
5748
5751
|
var import_react_table3 = require("@tanstack/react-table");
|
|
5749
|
-
var
|
|
5752
|
+
var import_react40 = __toESM(require("react"), 1);
|
|
5750
5753
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
5751
5754
|
var valueFormatters = {
|
|
5752
5755
|
date: (value) => typeof value === "string" ? formatDate(value) : "",
|
|
@@ -5814,7 +5817,7 @@ function TableBodyRow({
|
|
|
5814
5817
|
const cellFormat = (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.format;
|
|
5815
5818
|
const cellValue = cellFormat && isValueFormatterKey(cellFormat) ? valueFormatters[cellFormat](cell.getValue()) : cell.getValue();
|
|
5816
5819
|
const cellAlignment = (_c = (_b = cell.column.columnDef.meta) == null ? void 0 : _b.align) != null ? _c : typeof cellValue === "number" ? "right" : "left";
|
|
5817
|
-
return ((_d = cell.column.columnDef.meta) == null ? void 0 : _d.useCustomRenderer) ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
5820
|
+
return ((_d = cell.column.columnDef.meta) == null ? void 0 : _d.useCustomRenderer) ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react40.default.Fragment, { children: (0, import_react_table3.flexRender)(cell.column.columnDef.cell, cell.getContext()) }, cell.id) : /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
5818
5821
|
CellElement,
|
|
5819
5822
|
{
|
|
5820
5823
|
id: id ? `${id}-row-${row.id}-cell-${cell.id}` : void 0,
|