@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(DateInput_exports, {
|
|
|
62
62
|
DateInput: () => DateInput
|
|
63
63
|
});
|
|
64
64
|
module.exports = __toCommonJS(DateInput_exports);
|
|
65
|
-
var
|
|
65
|
+
var import_react40 = require("react");
|
|
66
66
|
var import_react_dom4 = require("react-dom");
|
|
67
67
|
|
|
68
68
|
// src/components/Input.tsx
|
|
@@ -834,7 +834,7 @@ Percentage.displayName = "Percentage";
|
|
|
834
834
|
|
|
835
835
|
// src/components/CalendarRange.tsx
|
|
836
836
|
var import_clsx42 = __toESM(require("clsx"), 1);
|
|
837
|
-
var
|
|
837
|
+
var import_react39 = __toESM(require("react"), 1);
|
|
838
838
|
var import_polyfill = require("@js-temporal/polyfill");
|
|
839
839
|
|
|
840
840
|
// src/components/DataGridCell.tsx
|
|
@@ -890,11 +890,11 @@ var CSS = /* @__PURE__ */ Object.freeze({
|
|
|
890
890
|
|
|
891
891
|
// src/components/DataGridCell.tsx
|
|
892
892
|
var import_clsx9 = __toESM(require("clsx"), 1);
|
|
893
|
-
var
|
|
893
|
+
var import_react12 = require("react");
|
|
894
894
|
|
|
895
895
|
// src/components/MenuOption.tsx
|
|
896
896
|
var import_clsx7 = __toESM(require("clsx"), 1);
|
|
897
|
-
var
|
|
897
|
+
var import_react8 = require("react");
|
|
898
898
|
|
|
899
899
|
// src/hooks/useKeydown.ts
|
|
900
900
|
var import_react3 = require("react");
|
|
@@ -1179,6 +1179,9 @@ function useTableLayout(initialColumns, key, autosync = true) {
|
|
|
1179
1179
|
return { columns, setColumns: handleSaveLayout, isReady, getSavedLayout };
|
|
1180
1180
|
}
|
|
1181
1181
|
|
|
1182
|
+
// src/hooks/useEditCell.tsx
|
|
1183
|
+
var import_react7 = require("react");
|
|
1184
|
+
|
|
1182
1185
|
// src/components/Caption.tsx
|
|
1183
1186
|
var import_clsx6 = __toESM(require("clsx"), 1);
|
|
1184
1187
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
@@ -1330,12 +1333,12 @@ var MenuOption = ({
|
|
|
1330
1333
|
onMouseMove,
|
|
1331
1334
|
small = false
|
|
1332
1335
|
}) => {
|
|
1333
|
-
const uniqueId = (0,
|
|
1334
|
-
const internalRef = (0,
|
|
1336
|
+
const uniqueId = (0, import_react8.useId)();
|
|
1337
|
+
const internalRef = (0, import_react8.useRef)(null);
|
|
1335
1338
|
const actualRef = ref || internalRef;
|
|
1336
|
-
const menuId = (0,
|
|
1339
|
+
const menuId = (0, import_react8.useRef)(`menu-${uniqueId}`);
|
|
1337
1340
|
const isMobile = useMatchesMobile();
|
|
1338
|
-
const [isSubMenuHovered, setIsSubMenuHovered] = (0,
|
|
1341
|
+
const [isSubMenuHovered, setIsSubMenuHovered] = (0, import_react8.useState)(false);
|
|
1339
1342
|
const handleMouseEnter = () => {
|
|
1340
1343
|
if (subMenu && onSubMenuHover && !disabled) {
|
|
1341
1344
|
onSubMenuHover(menuId.current, subMenuLevel);
|
|
@@ -1495,27 +1498,27 @@ function highlightMatch(text, searchValue) {
|
|
|
1495
1498
|
|
|
1496
1499
|
// src/components/Menu.tsx
|
|
1497
1500
|
var import_clsx8 = __toESM(require("clsx"), 1);
|
|
1498
|
-
var
|
|
1501
|
+
var import_react10 = require("react");
|
|
1499
1502
|
var import_react_dom = require("react-dom");
|
|
1500
1503
|
|
|
1501
1504
|
// src/components/useMenuSystem.tsx
|
|
1502
|
-
var
|
|
1505
|
+
var import_react9 = require("react");
|
|
1503
1506
|
function useSubMenuSystem(mobilePositionTo) {
|
|
1504
|
-
const [activeMenus, setActiveMenus] = (0,
|
|
1507
|
+
const [activeMenus, setActiveMenus] = (0, import_react9.useState)(
|
|
1505
1508
|
{}
|
|
1506
1509
|
);
|
|
1507
|
-
const [activeMenu, setActiveMenu] = (0,
|
|
1508
|
-
const [currentSubMenuLevel, setCurrentSubMenuLevel] = (0,
|
|
1510
|
+
const [activeMenu, setActiveMenu] = (0, import_react9.useState)("");
|
|
1511
|
+
const [currentSubMenuLevel, setCurrentSubMenuLevel] = (0, import_react9.useState)(
|
|
1509
1512
|
null
|
|
1510
1513
|
);
|
|
1511
|
-
const menuRootRef = (0,
|
|
1512
|
-
const subMenuRefs = (0,
|
|
1513
|
-
const hoverTimeoutRef = (0,
|
|
1514
|
-
const closeTimeoutRef = (0,
|
|
1515
|
-
const mouseStopTimeoutRef = (0,
|
|
1516
|
-
const isMouseMovingRef = (0,
|
|
1517
|
-
const pendingOpenActionRef = (0,
|
|
1518
|
-
const pendingCloseActionRef = (0,
|
|
1514
|
+
const menuRootRef = (0, import_react9.useRef)(null);
|
|
1515
|
+
const subMenuRefs = (0, import_react9.useRef)({});
|
|
1516
|
+
const hoverTimeoutRef = (0, import_react9.useRef)(null);
|
|
1517
|
+
const closeTimeoutRef = (0, import_react9.useRef)(null);
|
|
1518
|
+
const mouseStopTimeoutRef = (0, import_react9.useRef)(null);
|
|
1519
|
+
const isMouseMovingRef = (0, import_react9.useRef)(false);
|
|
1520
|
+
const pendingOpenActionRef = (0, import_react9.useRef)(null);
|
|
1521
|
+
const pendingCloseActionRef = (0, import_react9.useRef)(null);
|
|
1519
1522
|
const isMobile = useMatchesMobile();
|
|
1520
1523
|
const toggleMenu = (menuId, level) => {
|
|
1521
1524
|
if (closeTimeoutRef.current) {
|
|
@@ -1555,7 +1558,7 @@ function useSubMenuSystem(mobilePositionTo) {
|
|
|
1555
1558
|
return newActiveMenus;
|
|
1556
1559
|
});
|
|
1557
1560
|
};
|
|
1558
|
-
const executePendingActions = (0,
|
|
1561
|
+
const executePendingActions = (0, import_react9.useCallback)(() => {
|
|
1559
1562
|
if (pendingCloseActionRef.current) {
|
|
1560
1563
|
pendingCloseActionRef.current();
|
|
1561
1564
|
pendingCloseActionRef.current = null;
|
|
@@ -1644,7 +1647,7 @@ function useSubMenuSystem(mobilePositionTo) {
|
|
|
1644
1647
|
const isMenuActive = (menuId, level) => {
|
|
1645
1648
|
return activeMenus[level] === menuId;
|
|
1646
1649
|
};
|
|
1647
|
-
(0,
|
|
1650
|
+
(0, import_react9.useEffect)(() => {
|
|
1648
1651
|
const handleClickOutside = (event) => {
|
|
1649
1652
|
var _a;
|
|
1650
1653
|
if (Object.keys(activeMenus).length === 0) return;
|
|
@@ -1663,7 +1666,7 @@ function useSubMenuSystem(mobilePositionTo) {
|
|
|
1663
1666
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
1664
1667
|
};
|
|
1665
1668
|
}, [activeMenus]);
|
|
1666
|
-
(0,
|
|
1669
|
+
(0, import_react9.useEffect)(() => {
|
|
1667
1670
|
return () => {
|
|
1668
1671
|
if (hoverTimeoutRef.current) {
|
|
1669
1672
|
clearTimeout(hoverTimeoutRef.current);
|
|
@@ -1741,13 +1744,13 @@ function useSubMenuSystem(mobilePositionTo) {
|
|
|
1741
1744
|
};
|
|
1742
1745
|
}
|
|
1743
1746
|
function useMenuPosition(elementRef, position = "bottom", options) {
|
|
1744
|
-
const [menuPosition, setMenuPosition] = (0,
|
|
1747
|
+
const [menuPosition, setMenuPosition] = (0, import_react9.useState)({
|
|
1745
1748
|
top: 0,
|
|
1746
1749
|
left: 0,
|
|
1747
1750
|
minWidth: 0
|
|
1748
1751
|
});
|
|
1749
1752
|
const isMobile = options == null ? void 0 : options.isMobile;
|
|
1750
|
-
const updatePosition = (0,
|
|
1753
|
+
const updatePosition = (0, import_react9.useCallback)(() => {
|
|
1751
1754
|
var _a, _b, _c;
|
|
1752
1755
|
if (!(elementRef == null ? void 0 : elementRef.current)) return;
|
|
1753
1756
|
const triggerRect = elementRef.current.getBoundingClientRect();
|
|
@@ -1795,7 +1798,7 @@ function useMenuPosition(elementRef, position = "bottom", options) {
|
|
|
1795
1798
|
minWidth: triggerRect.width
|
|
1796
1799
|
});
|
|
1797
1800
|
}, [elementRef, position, options == null ? void 0 : options.menuRef, options == null ? void 0 : options.topOffset, isMobile]);
|
|
1798
|
-
(0,
|
|
1801
|
+
(0, import_react9.useEffect)(() => {
|
|
1799
1802
|
if (!(options == null ? void 0 : options.isOpen) || !(options == null ? void 0 : options.setIsOpen)) return;
|
|
1800
1803
|
const handleClickOutside = (event) => {
|
|
1801
1804
|
var _a, _b, _c, _d, _e;
|
|
@@ -1821,7 +1824,7 @@ function useMenuPosition(elementRef, position = "bottom", options) {
|
|
|
1821
1824
|
options == null ? void 0 : options.menuRef,
|
|
1822
1825
|
options == null ? void 0 : options.additionalRefs
|
|
1823
1826
|
]);
|
|
1824
|
-
(0,
|
|
1827
|
+
(0, import_react9.useEffect)(() => {
|
|
1825
1828
|
updatePosition();
|
|
1826
1829
|
const resizeObserver = new ResizeObserver(updatePosition);
|
|
1827
1830
|
if (elementRef == null ? void 0 : elementRef.current) {
|
|
@@ -1902,9 +1905,9 @@ var Menu = (_a) => {
|
|
|
1902
1905
|
"menuName",
|
|
1903
1906
|
"calculateMinMaxHeight"
|
|
1904
1907
|
]);
|
|
1905
|
-
const internalRef = (0,
|
|
1908
|
+
const internalRef = (0, import_react10.useRef)(null);
|
|
1906
1909
|
const actualRef = ref || internalRef;
|
|
1907
|
-
const [maxHeight, setMaxHeight] = (0,
|
|
1910
|
+
const [maxHeight, setMaxHeight] = (0, import_react10.useState)("180px");
|
|
1908
1911
|
const isMobile = useMatchesMobile();
|
|
1909
1912
|
const { menuPosition, updatePosition } = useMenuPosition(
|
|
1910
1913
|
isMobile && mobilePositionTo ? mobilePositionTo : positionTo,
|
|
@@ -1917,7 +1920,7 @@ var Menu = (_a) => {
|
|
|
1917
1920
|
isMobile: !!(isMobile && mobilePositionTo)
|
|
1918
1921
|
}
|
|
1919
1922
|
);
|
|
1920
|
-
(0,
|
|
1923
|
+
(0, import_react10.useEffect)(() => {
|
|
1921
1924
|
if (calculateMinMaxHeight) {
|
|
1922
1925
|
return;
|
|
1923
1926
|
}
|
|
@@ -1941,7 +1944,7 @@ var Menu = (_a) => {
|
|
|
1941
1944
|
cancelAnimationFrame(raf);
|
|
1942
1945
|
};
|
|
1943
1946
|
}, [actualRef.current, customMaxHeight, calculateMinMaxHeight]);
|
|
1944
|
-
(0,
|
|
1947
|
+
(0, import_react10.useEffect)(() => {
|
|
1945
1948
|
if (!calculateMinMaxHeight) {
|
|
1946
1949
|
return;
|
|
1947
1950
|
}
|
|
@@ -1952,14 +1955,14 @@ var Menu = (_a) => {
|
|
|
1952
1955
|
setMaxHeight(`${calculatedMaxHeight}px`);
|
|
1953
1956
|
}
|
|
1954
1957
|
}, [actualRef.current, positionTo == null ? void 0 : positionTo.current, calculateMinMaxHeight]);
|
|
1955
|
-
(0,
|
|
1958
|
+
(0, import_react10.useEffect)(() => {
|
|
1956
1959
|
if (!show) {
|
|
1957
1960
|
return;
|
|
1958
1961
|
}
|
|
1959
1962
|
initializeMenuFocus();
|
|
1960
1963
|
updatePosition();
|
|
1961
1964
|
}, [show, updatePosition]);
|
|
1962
|
-
(0,
|
|
1965
|
+
(0, import_react10.useEffect)(() => {
|
|
1963
1966
|
if (!show || !setShow) {
|
|
1964
1967
|
return;
|
|
1965
1968
|
}
|
|
@@ -2113,7 +2116,7 @@ var Menu = (_a) => {
|
|
|
2113
2116
|
Menu.displayName = "Menu";
|
|
2114
2117
|
|
|
2115
2118
|
// src/components/Search.tsx
|
|
2116
|
-
var
|
|
2119
|
+
var import_react11 = require("react");
|
|
2117
2120
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
2118
2121
|
var Search = (_a) => {
|
|
2119
2122
|
var _b = _a, {
|
|
@@ -2141,14 +2144,14 @@ var Search = (_a) => {
|
|
|
2141
2144
|
"removeRoundness",
|
|
2142
2145
|
"autocompletePadding"
|
|
2143
2146
|
]);
|
|
2144
|
-
const inputRef = (0,
|
|
2145
|
-
const inputContainerRef = (0,
|
|
2146
|
-
const preventFocusOnInitialRender = (0,
|
|
2147
|
-
const [show, setShow] = (0,
|
|
2148
|
-
const [clearing, setClearing] = (0,
|
|
2149
|
-
const uniqueId = (0,
|
|
2147
|
+
const inputRef = (0, import_react11.useRef)(null);
|
|
2148
|
+
const inputContainerRef = (0, import_react11.useRef)(null);
|
|
2149
|
+
const preventFocusOnInitialRender = (0, import_react11.useRef)(true);
|
|
2150
|
+
const [show, setShow] = (0, import_react11.useState)(false);
|
|
2151
|
+
const [clearing, setClearing] = (0, import_react11.useState)(false);
|
|
2152
|
+
const uniqueId = (0, import_react11.useId)();
|
|
2150
2153
|
const searchMenuName = `search-menu-${uniqueId}`;
|
|
2151
|
-
(0,
|
|
2154
|
+
(0, import_react11.useEffect)(() => {
|
|
2152
2155
|
var _a2;
|
|
2153
2156
|
if (preventFocusOnInitialRender.current) {
|
|
2154
2157
|
preventFocusOnInitialRender.current = false;
|
|
@@ -2232,7 +2235,7 @@ Search.displayName = "Search";
|
|
|
2232
2235
|
|
|
2233
2236
|
// src/components/DataGridCell.tsx
|
|
2234
2237
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
2235
|
-
var DataGridCell = (0,
|
|
2238
|
+
var DataGridCell = (0, import_react12.memo)(
|
|
2236
2239
|
(_a) => {
|
|
2237
2240
|
var _b = _a, {
|
|
2238
2241
|
id,
|
|
@@ -2274,10 +2277,10 @@ var DataGridCell = (0, import_react11.memo)(
|
|
|
2274
2277
|
"testid"
|
|
2275
2278
|
]);
|
|
2276
2279
|
const Element = type === "header" ? "th" : "td";
|
|
2277
|
-
const timerRef = (0,
|
|
2278
|
-
const [isGrabbing, setIsGrabbing] = (0,
|
|
2279
|
-
const [isPointerPressed, setIsPointerPressed] = (0,
|
|
2280
|
-
(0,
|
|
2280
|
+
const timerRef = (0, import_react12.useRef)(null);
|
|
2281
|
+
const [isGrabbing, setIsGrabbing] = (0, import_react12.useState)(false);
|
|
2282
|
+
const [isPointerPressed, setIsPointerPressed] = (0, import_react12.useState)(false);
|
|
2283
|
+
(0, import_react12.useEffect)(() => {
|
|
2281
2284
|
return () => {
|
|
2282
2285
|
if (timerRef.current) {
|
|
2283
2286
|
clearTimeout(timerRef.current);
|
|
@@ -2387,12 +2390,12 @@ function DataCellHeader(_a) {
|
|
|
2387
2390
|
"useMenuDefaultMinWidth"
|
|
2388
2391
|
]);
|
|
2389
2392
|
var _a2;
|
|
2390
|
-
const [showMenu, setShowMenu] = (0,
|
|
2391
|
-
const [filter, setFilter] = (0,
|
|
2393
|
+
const [showMenu, setShowMenu] = (0, import_react12.useState)(false);
|
|
2394
|
+
const [filter, setFilter] = (0, import_react12.useState)(
|
|
2392
2395
|
(_a2 = header.column.getFilterValue()) != null ? _a2 : ""
|
|
2393
2396
|
);
|
|
2394
|
-
const ref = (0,
|
|
2395
|
-
const predeterminedPinned = (0,
|
|
2397
|
+
const ref = (0, import_react12.useRef)(null);
|
|
2398
|
+
const predeterminedPinned = (0, import_react12.useRef)(false);
|
|
2396
2399
|
const { column, getContext } = header;
|
|
2397
2400
|
const { id: columnId, setFilterValue } = column;
|
|
2398
2401
|
const {
|
|
@@ -2402,14 +2405,14 @@ function DataCellHeader(_a) {
|
|
|
2402
2405
|
listeners: subMenuListeners,
|
|
2403
2406
|
mobileHide
|
|
2404
2407
|
} = useSubMenuSystem(node ? node : ref);
|
|
2405
|
-
(0,
|
|
2408
|
+
(0, import_react12.useEffect)(() => {
|
|
2406
2409
|
var _a3, _b2, _c;
|
|
2407
2410
|
const columnPinning = (_a3 = getContext().table.options.initialState) == null ? void 0 : _a3.columnPinning;
|
|
2408
2411
|
const left = (_b2 = columnPinning == null ? void 0 : columnPinning.left) != null ? _b2 : [];
|
|
2409
2412
|
const right = (_c = columnPinning == null ? void 0 : columnPinning.right) != null ? _c : [];
|
|
2410
2413
|
predeterminedPinned.current = [...left, ...right].includes(columnId);
|
|
2411
2414
|
}, [columnId, getContext]);
|
|
2412
|
-
(0,
|
|
2415
|
+
(0, import_react12.useEffect)(() => {
|
|
2413
2416
|
const handler = setTimeout(() => {
|
|
2414
2417
|
setFilterValue(filter);
|
|
2415
2418
|
}, 500);
|
|
@@ -2672,7 +2675,7 @@ function DragAlongCell(_a) {
|
|
|
2672
2675
|
DragAlongCell.displayName = "DragAlongCell";
|
|
2673
2676
|
|
|
2674
2677
|
// src/components/DataGrid/index.tsx
|
|
2675
|
-
var
|
|
2678
|
+
var import_react17 = __toESM(require("react"), 1);
|
|
2676
2679
|
var import_react_table3 = require("@tanstack/react-table");
|
|
2677
2680
|
var import_core = require("@dnd-kit/core");
|
|
2678
2681
|
var import_sortable2 = require("@dnd-kit/sortable");
|
|
@@ -2700,7 +2703,7 @@ function getSortIcon(sort, nextSort = false) {
|
|
|
2700
2703
|
}
|
|
2701
2704
|
|
|
2702
2705
|
// src/components/DataGrid/PinnedColumns.tsx
|
|
2703
|
-
var
|
|
2706
|
+
var import_react16 = __toESM(require("react"), 1);
|
|
2704
2707
|
|
|
2705
2708
|
// src/components/DataGrid/TableBody/index.tsx
|
|
2706
2709
|
var import_react_virtual = require("@tanstack/react-virtual");
|
|
@@ -2709,7 +2712,7 @@ var import_clsx12 = __toESM(require("clsx"), 1);
|
|
|
2709
2712
|
// src/components/DataGrid/TableBody/TableBodyRow.tsx
|
|
2710
2713
|
var import_clsx11 = __toESM(require("clsx"), 1);
|
|
2711
2714
|
var import_react_table = require("@tanstack/react-table");
|
|
2712
|
-
var
|
|
2715
|
+
var import_react13 = __toESM(require("react"), 1);
|
|
2713
2716
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
2714
2717
|
var valueFormatters = {
|
|
2715
2718
|
date: (value) => typeof value === "string" ? formatDate(value) : "",
|
|
@@ -2777,7 +2780,7 @@ function TableBodyRow({
|
|
|
2777
2780
|
const cellFormat = (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.format;
|
|
2778
2781
|
const cellValue = cellFormat && isValueFormatterKey(cellFormat) ? valueFormatters[cellFormat](cell.getValue()) : cell.getValue();
|
|
2779
2782
|
const cellAlignment = (_c = (_b = cell.column.columnDef.meta) == null ? void 0 : _b.align) != null ? _c : typeof cellValue === "number" ? "right" : "left";
|
|
2780
|
-
return ((_d = cell.column.columnDef.meta) == null ? void 0 : _d.useCustomRenderer) ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2783
|
+
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)(
|
|
2781
2784
|
CellElement,
|
|
2782
2785
|
{
|
|
2783
2786
|
id: id ? `${id}-row-${row.id}-cell-${cell.id}` : void 0,
|
|
@@ -2991,10 +2994,10 @@ function TableBody({
|
|
|
2991
2994
|
}
|
|
2992
2995
|
|
|
2993
2996
|
// src/components/DataGrid/ColumnSelectorHeaderCell/index.tsx
|
|
2994
|
-
var
|
|
2997
|
+
var import_react15 = require("react");
|
|
2995
2998
|
|
|
2996
2999
|
// src/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.tsx
|
|
2997
|
-
var
|
|
3000
|
+
var import_react14 = require("react");
|
|
2998
3001
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2999
3002
|
function ColumnSelectorMenuOption({
|
|
3000
3003
|
id,
|
|
@@ -3002,7 +3005,7 @@ function ColumnSelectorMenuOption({
|
|
|
3002
3005
|
column,
|
|
3003
3006
|
toggleColumnVisibility
|
|
3004
3007
|
}) {
|
|
3005
|
-
const [isVisible, setIsVisible] = (0,
|
|
3008
|
+
const [isVisible, setIsVisible] = (0, import_react14.useState)(column.getIsVisible());
|
|
3006
3009
|
const label = typeof column.columnDef.header === "string" ? column.columnDef.header : null;
|
|
3007
3010
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MenuOption, { id, testid, defaultChecked: isVisible, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3008
3011
|
Checkbox,
|
|
@@ -3028,8 +3031,8 @@ function ColumnSelectorHeaderCell({
|
|
|
3028
3031
|
toggleColumnVisibility,
|
|
3029
3032
|
resetColumnVisibility
|
|
3030
3033
|
}) {
|
|
3031
|
-
const ref = (0,
|
|
3032
|
-
const [show, setShow] = (0,
|
|
3034
|
+
const ref = (0, import_react15.useRef)(null);
|
|
3035
|
+
const [show, setShow] = (0, import_react15.useState)(false);
|
|
3033
3036
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3034
3037
|
DataGridCell,
|
|
3035
3038
|
{
|
|
@@ -3198,7 +3201,7 @@ function PinnedColumns(_a) {
|
|
|
3198
3201
|
header.id
|
|
3199
3202
|
);
|
|
3200
3203
|
}
|
|
3201
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3204
|
+
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)(
|
|
3202
3205
|
Checkbox,
|
|
3203
3206
|
{
|
|
3204
3207
|
checked: allSelectedAcrossPages,
|
|
@@ -3280,23 +3283,23 @@ function DataGrid({
|
|
|
3280
3283
|
ref
|
|
3281
3284
|
}) {
|
|
3282
3285
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
3283
|
-
(0,
|
|
3286
|
+
(0, import_react17.useImperativeHandle)(ref, () => ({
|
|
3284
3287
|
getSavedLayout: () => {
|
|
3285
3288
|
return getSavedLayout();
|
|
3286
3289
|
}
|
|
3287
3290
|
}));
|
|
3288
|
-
const [localSorting, setLocalSorting] = (0,
|
|
3289
|
-
const [localColumnFilters, setLocalColumnFilters] = (0,
|
|
3290
|
-
const [localRowSelection, setLocalRowSelection] = (0,
|
|
3291
|
+
const [localSorting, setLocalSorting] = (0, import_react17.useState)([]);
|
|
3292
|
+
const [localColumnFilters, setLocalColumnFilters] = (0, import_react17.useState)([]);
|
|
3293
|
+
const [localRowSelection, setLocalRowSelection] = (0, import_react17.useState)({});
|
|
3291
3294
|
const {
|
|
3292
3295
|
columns: tableColumns,
|
|
3293
3296
|
setColumns: setTableColumns,
|
|
3294
3297
|
getSavedLayout
|
|
3295
3298
|
} = useTableLayout(columns, id != null ? id : testid);
|
|
3296
|
-
const [columnOrder, setColumnOrder] = (0,
|
|
3299
|
+
const [columnOrder, setColumnOrder] = (0, import_react17.useState)(
|
|
3297
3300
|
tableColumns.map((c) => c.id)
|
|
3298
3301
|
);
|
|
3299
|
-
const [columnVisibility, setColumnVisibility] = (0,
|
|
3302
|
+
const [columnVisibility, setColumnVisibility] = (0, import_react17.useState)(
|
|
3300
3303
|
Object.fromEntries(
|
|
3301
3304
|
tableColumns.filter((column) => !!column.id).map((column) => {
|
|
3302
3305
|
var _a2, _b2;
|
|
@@ -3304,7 +3307,7 @@ function DataGrid({
|
|
|
3304
3307
|
})
|
|
3305
3308
|
)
|
|
3306
3309
|
);
|
|
3307
|
-
const updateColumnVisibility = (0,
|
|
3310
|
+
const updateColumnVisibility = (0, import_react17.useCallback)(
|
|
3308
3311
|
(updateOrder) => {
|
|
3309
3312
|
setColumnVisibility(
|
|
3310
3313
|
Object.fromEntries(
|
|
@@ -3318,7 +3321,7 @@ function DataGrid({
|
|
|
3318
3321
|
},
|
|
3319
3322
|
[tableColumns]
|
|
3320
3323
|
);
|
|
3321
|
-
const resetDefaultColumnVisibility = (0,
|
|
3324
|
+
const resetDefaultColumnVisibility = (0, import_react17.useCallback)(() => {
|
|
3322
3325
|
setTableColumns((prev) => {
|
|
3323
3326
|
columns.forEach((column) => {
|
|
3324
3327
|
var _a2, _b2;
|
|
@@ -3334,7 +3337,7 @@ function DataGrid({
|
|
|
3334
3337
|
return [...prev];
|
|
3335
3338
|
}, true);
|
|
3336
3339
|
}, [columns, setTableColumns]);
|
|
3337
|
-
(0,
|
|
3340
|
+
(0, import_react17.useEffect)(() => {
|
|
3338
3341
|
updateColumnVisibility(true);
|
|
3339
3342
|
}, [updateColumnVisibility]);
|
|
3340
3343
|
const sortingState = pagination ? externalSorting != null ? externalSorting : localSorting : localSorting;
|
|
@@ -3350,7 +3353,7 @@ function DataGrid({
|
|
|
3350
3353
|
(onColumnFiltersChange != null ? onColumnFiltersChange : setLocalColumnFilters)(value);
|
|
3351
3354
|
} : setLocalColumnFilters;
|
|
3352
3355
|
const rowSelection = externalRowSelection != null ? externalRowSelection : localRowSelection;
|
|
3353
|
-
const setRowSelection = (0,
|
|
3356
|
+
const setRowSelection = (0, import_react17.useCallback)(
|
|
3354
3357
|
(updaterOrValue) => {
|
|
3355
3358
|
if (pagination) {
|
|
3356
3359
|
const value = typeof updaterOrValue === "function" ? updaterOrValue(externalRowSelection != null ? externalRowSelection : {}) : updaterOrValue;
|
|
@@ -3364,9 +3367,9 @@ function DataGrid({
|
|
|
3364
3367
|
},
|
|
3365
3368
|
[externalRowSelection, onRowSelectionChange, pagination]
|
|
3366
3369
|
);
|
|
3367
|
-
const dndId = (0,
|
|
3368
|
-
const containerRef =
|
|
3369
|
-
const toggleColumnVisibility = (0,
|
|
3370
|
+
const dndId = (0, import_react17.useId)();
|
|
3371
|
+
const containerRef = import_react17.default.useRef(null);
|
|
3372
|
+
const toggleColumnVisibility = (0, import_react17.useCallback)(
|
|
3370
3373
|
(columnId, isVisible) => {
|
|
3371
3374
|
setTableColumns((prev) => {
|
|
3372
3375
|
const persistedIndex = prev.findIndex((col) => col.id === columnId);
|
|
@@ -3614,7 +3617,7 @@ function DataGrid({
|
|
|
3614
3617
|
header.id
|
|
3615
3618
|
);
|
|
3616
3619
|
}
|
|
3617
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3620
|
+
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)(
|
|
3618
3621
|
DataGridCell,
|
|
3619
3622
|
{
|
|
3620
3623
|
id: id ? `${id}-header-${header.id}` : void 0,
|
|
@@ -3820,7 +3823,7 @@ function adaptTableStateSetter(setter) {
|
|
|
3820
3823
|
}
|
|
3821
3824
|
|
|
3822
3825
|
// src/components/Select.tsx
|
|
3823
|
-
var
|
|
3826
|
+
var import_react18 = require("react");
|
|
3824
3827
|
var import_clsx15 = __toESM(require("clsx"), 1);
|
|
3825
3828
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
3826
3829
|
var Select = (_a) => {
|
|
@@ -3854,11 +3857,11 @@ var Select = (_a) => {
|
|
|
3854
3857
|
"value"
|
|
3855
3858
|
]);
|
|
3856
3859
|
var _a2;
|
|
3857
|
-
const inputRef = (0,
|
|
3858
|
-
const inputContainerRef = (0,
|
|
3859
|
-
const preventFocusOnInitialRender = (0,
|
|
3860
|
-
const [show, setShow] = (0,
|
|
3861
|
-
(0,
|
|
3860
|
+
const inputRef = (0, import_react18.useRef)(null);
|
|
3861
|
+
const inputContainerRef = (0, import_react18.useRef)(null);
|
|
3862
|
+
const preventFocusOnInitialRender = (0, import_react18.useRef)(true);
|
|
3863
|
+
const [show, setShow] = (0, import_react18.useState)(false);
|
|
3864
|
+
(0, import_react18.useEffect)(() => {
|
|
3862
3865
|
var _a3;
|
|
3863
3866
|
if (preventFocusOnInitialRender.current) {
|
|
3864
3867
|
preventFocusOnInitialRender.current = false;
|
|
@@ -4280,7 +4283,7 @@ Button.displayName = "Button";
|
|
|
4280
4283
|
|
|
4281
4284
|
// src/components/Tooltip.tsx
|
|
4282
4285
|
var import_clsx19 = __toESM(require("clsx"), 1);
|
|
4283
|
-
var
|
|
4286
|
+
var import_react19 = require("react");
|
|
4284
4287
|
var import_react_dom2 = require("react-dom");
|
|
4285
4288
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
4286
4289
|
var Tooltip = ({
|
|
@@ -4293,11 +4296,11 @@ var Tooltip = ({
|
|
|
4293
4296
|
offset = 8,
|
|
4294
4297
|
keepHidden = false
|
|
4295
4298
|
}) => {
|
|
4296
|
-
const ref = (0,
|
|
4297
|
-
const tooltipRef = (0,
|
|
4298
|
-
const [tooltipPosition, setTooltipPosition] = (0,
|
|
4299
|
-
const [isVisible, setIsVisible] = (0,
|
|
4300
|
-
const [removeOpacity, setRemoveOpacity] = (0,
|
|
4299
|
+
const ref = (0, import_react19.useRef)(null);
|
|
4300
|
+
const tooltipRef = (0, import_react19.useRef)(null);
|
|
4301
|
+
const [tooltipPosition, setTooltipPosition] = (0, import_react19.useState)({ top: 0, left: 0 });
|
|
4302
|
+
const [isVisible, setIsVisible] = (0, import_react19.useState)(false);
|
|
4303
|
+
const [removeOpacity, setRemoveOpacity] = (0, import_react19.useState)(false);
|
|
4301
4304
|
const updatePosition = () => {
|
|
4302
4305
|
if (!ref.current || !tooltipRef.current) return;
|
|
4303
4306
|
const rect = ref.current.getBoundingClientRect();
|
|
@@ -4336,14 +4339,14 @@ var Tooltip = ({
|
|
|
4336
4339
|
setIsVisible(false);
|
|
4337
4340
|
setRemoveOpacity(false);
|
|
4338
4341
|
};
|
|
4339
|
-
(0,
|
|
4342
|
+
(0, import_react19.useEffect)(() => {
|
|
4340
4343
|
if (isVisible && tooltipRef.current) {
|
|
4341
4344
|
requestAnimationFrame(() => {
|
|
4342
4345
|
updatePosition();
|
|
4343
4346
|
});
|
|
4344
4347
|
}
|
|
4345
4348
|
}, [isVisible]);
|
|
4346
|
-
(0,
|
|
4349
|
+
(0, import_react19.useEffect)(() => {
|
|
4347
4350
|
if (isVisible) {
|
|
4348
4351
|
window.addEventListener("resize", updatePosition);
|
|
4349
4352
|
return () => window.removeEventListener("resize", updatePosition);
|
|
@@ -4471,14 +4474,14 @@ Heading3.displayName = "Heading3";
|
|
|
4471
4474
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
4472
4475
|
|
|
4473
4476
|
// src/components/MobileDataGrid/ColumnSelector/index.tsx
|
|
4474
|
-
var
|
|
4477
|
+
var import_react22 = require("react");
|
|
4475
4478
|
|
|
4476
4479
|
// src/components/MobileDataGrid/GridContextProvider/useGridContext.ts
|
|
4477
|
-
var
|
|
4480
|
+
var import_react21 = require("react");
|
|
4478
4481
|
|
|
4479
4482
|
// src/components/MobileDataGrid/GridContextProvider/GridContext.tsx
|
|
4480
|
-
var
|
|
4481
|
-
var GridContext = (0,
|
|
4483
|
+
var import_react20 = require("react");
|
|
4484
|
+
var GridContext = (0, import_react20.createContext)(null);
|
|
4482
4485
|
|
|
4483
4486
|
// src/components/MobileDataGrid/ColumnSelector/index.tsx
|
|
4484
4487
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
@@ -4487,12 +4490,12 @@ var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
|
4487
4490
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
4488
4491
|
|
|
4489
4492
|
// src/components/MobileDataGrid/GridContextProvider/index.tsx
|
|
4490
|
-
var
|
|
4493
|
+
var import_react23 = require("react");
|
|
4491
4494
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
4492
4495
|
|
|
4493
4496
|
// src/components/Modal.tsx
|
|
4494
4497
|
var import_clsx28 = __toESM(require("clsx"), 1);
|
|
4495
|
-
var
|
|
4498
|
+
var import_react25 = require("react");
|
|
4496
4499
|
|
|
4497
4500
|
// src/components/ModalHeader.tsx
|
|
4498
4501
|
var import_clsx24 = __toESM(require("clsx"), 1);
|
|
@@ -4668,10 +4671,10 @@ var import_react_dom3 = require("react-dom");
|
|
|
4668
4671
|
var import_react_use = require("react-use");
|
|
4669
4672
|
|
|
4670
4673
|
// src/components/useMounted.tsx
|
|
4671
|
-
var
|
|
4674
|
+
var import_react24 = require("react");
|
|
4672
4675
|
var useMounted = () => {
|
|
4673
|
-
const [isMounted, setIsMounted] = (0,
|
|
4674
|
-
(0,
|
|
4676
|
+
const [isMounted, setIsMounted] = (0, import_react24.useState)(false);
|
|
4677
|
+
(0, import_react24.useEffect)(() => {
|
|
4675
4678
|
setIsMounted(true);
|
|
4676
4679
|
return () => setIsMounted(false);
|
|
4677
4680
|
}, []);
|
|
@@ -4765,12 +4768,12 @@ var Modal = ({
|
|
|
4765
4768
|
}) => {
|
|
4766
4769
|
var _a;
|
|
4767
4770
|
const mounted = useMounted();
|
|
4768
|
-
const modalRef = (0,
|
|
4769
|
-
const bgRef = (0,
|
|
4771
|
+
const modalRef = (0, import_react25.useRef)(null);
|
|
4772
|
+
const bgRef = (0, import_react25.useRef)(null);
|
|
4770
4773
|
const wasOpen = (0, import_react_use.usePrevious)(open);
|
|
4771
4774
|
const isMobile = useMatchesMobile();
|
|
4772
4775
|
const computedFixedHeightScrolling = isMobile || fixedHeightScrolling;
|
|
4773
|
-
(0,
|
|
4776
|
+
(0, import_react25.useEffect)(() => {
|
|
4774
4777
|
if (!mounted) return;
|
|
4775
4778
|
if (!modalRef.current || !bgRef.current) {
|
|
4776
4779
|
console.error("Modal or background reference is not set.");
|
|
@@ -4790,7 +4793,7 @@ var Modal = ({
|
|
|
4790
4793
|
bgFadeIn(bgRef.current);
|
|
4791
4794
|
}
|
|
4792
4795
|
}, [mounted, onClose, open, wasOpen]);
|
|
4793
|
-
const handleKeyDown = (0,
|
|
4796
|
+
const handleKeyDown = (0, import_react25.useCallback)(
|
|
4794
4797
|
(e) => {
|
|
4795
4798
|
if (e.key === "Escape") {
|
|
4796
4799
|
if (onClose) {
|
|
@@ -4801,12 +4804,12 @@ var Modal = ({
|
|
|
4801
4804
|
},
|
|
4802
4805
|
[onClose]
|
|
4803
4806
|
);
|
|
4804
|
-
const handleClose = (0,
|
|
4807
|
+
const handleClose = (0, import_react25.useCallback)(() => {
|
|
4805
4808
|
if (onClose) {
|
|
4806
4809
|
onClose();
|
|
4807
4810
|
}
|
|
4808
4811
|
}, [onClose]);
|
|
4809
|
-
(0,
|
|
4812
|
+
(0, import_react25.useEffect)(() => {
|
|
4810
4813
|
if (open) {
|
|
4811
4814
|
document.addEventListener("keyup", handleKeyDown);
|
|
4812
4815
|
}
|
|
@@ -4814,7 +4817,7 @@ var Modal = ({
|
|
|
4814
4817
|
document.removeEventListener("keyup", handleKeyDown);
|
|
4815
4818
|
};
|
|
4816
4819
|
}, [open, handleKeyDown]);
|
|
4817
|
-
(0,
|
|
4820
|
+
(0, import_react25.useEffect)(() => {
|
|
4818
4821
|
if (!open) return;
|
|
4819
4822
|
const scrollY = window.scrollY;
|
|
4820
4823
|
const body = document.body;
|
|
@@ -4835,7 +4838,7 @@ var Modal = ({
|
|
|
4835
4838
|
};
|
|
4836
4839
|
}, [open]);
|
|
4837
4840
|
const { sizeClass } = (_a = sizes[size]) != null ? _a : sizes.small;
|
|
4838
|
-
const backgroundClickHandler = (0,
|
|
4841
|
+
const backgroundClickHandler = (0, import_react25.useCallback)(
|
|
4839
4842
|
(e) => {
|
|
4840
4843
|
const target = e.target;
|
|
4841
4844
|
const currentTarget = e.currentTarget;
|
|
@@ -4944,10 +4947,10 @@ var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
|
4944
4947
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
4945
4948
|
|
|
4946
4949
|
// src/components/ProductImagePreview/Thumbnail.tsx
|
|
4947
|
-
var
|
|
4950
|
+
var import_react27 = require("react");
|
|
4948
4951
|
|
|
4949
4952
|
// src/components/ImagePlaceholder.tsx
|
|
4950
|
-
var
|
|
4953
|
+
var import_react26 = require("react");
|
|
4951
4954
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
4952
4955
|
|
|
4953
4956
|
// src/components/ProductImagePreview/Thumbnail.tsx
|
|
@@ -4958,11 +4961,11 @@ var import_clsx31 = __toESM(require("clsx"), 1);
|
|
|
4958
4961
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
4959
4962
|
|
|
4960
4963
|
// src/components/ProductImagePreview/ProductPrimaryImage.tsx
|
|
4961
|
-
var
|
|
4964
|
+
var import_react28 = require("react");
|
|
4962
4965
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
4963
4966
|
|
|
4964
4967
|
// src/components/ProductImagePreview/ZoomWindow.tsx
|
|
4965
|
-
var
|
|
4968
|
+
var import_react29 = require("react");
|
|
4966
4969
|
|
|
4967
4970
|
// src/components/Surface.tsx
|
|
4968
4971
|
var import_clsx32 = __toESM(require("clsx"), 1);
|
|
@@ -5007,17 +5010,17 @@ var import_clsx33 = require("clsx");
|
|
|
5007
5010
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
5008
5011
|
|
|
5009
5012
|
// src/components/ProductImagePreview/MobileImageCarousel.tsx
|
|
5010
|
-
var
|
|
5013
|
+
var import_react30 = require("react");
|
|
5011
5014
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
5012
5015
|
|
|
5013
5016
|
// src/components/ProductImagePreview/useProductImagePreview.ts
|
|
5014
|
-
var
|
|
5017
|
+
var import_react31 = require("react");
|
|
5015
5018
|
|
|
5016
5019
|
// src/components/ProductImagePreview/index.tsx
|
|
5017
5020
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
5018
5021
|
|
|
5019
5022
|
// src/components/CompactImagesPreview.tsx
|
|
5020
|
-
var
|
|
5023
|
+
var import_react32 = require("react");
|
|
5021
5024
|
var import_clsx34 = __toESM(require("clsx"), 1);
|
|
5022
5025
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
5023
5026
|
|
|
@@ -5026,12 +5029,12 @@ var import_clsx35 = __toESM(require("clsx"), 1);
|
|
|
5026
5029
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
5027
5030
|
|
|
5028
5031
|
// src/components/ListGroup.tsx
|
|
5029
|
-
var
|
|
5032
|
+
var import_react33 = require("react");
|
|
5030
5033
|
var import_clsx36 = __toESM(require("clsx"), 1);
|
|
5031
5034
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
5032
5035
|
|
|
5033
5036
|
// src/components/Pagination.tsx
|
|
5034
|
-
var
|
|
5037
|
+
var import_react34 = require("react");
|
|
5035
5038
|
var import_clsx37 = __toESM(require("clsx"), 1);
|
|
5036
5039
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
5037
5040
|
var Pagination = ({
|
|
@@ -5043,7 +5046,7 @@ var Pagination = ({
|
|
|
5043
5046
|
className,
|
|
5044
5047
|
disabled
|
|
5045
5048
|
}) => {
|
|
5046
|
-
const goTo = (0,
|
|
5049
|
+
const goTo = (0, import_react34.useCallback)(
|
|
5047
5050
|
(page) => {
|
|
5048
5051
|
if (disabled) return;
|
|
5049
5052
|
onPageChange(page);
|
|
@@ -5060,7 +5063,7 @@ var Pagination = ({
|
|
|
5060
5063
|
goTo(currentPage + 1);
|
|
5061
5064
|
}
|
|
5062
5065
|
};
|
|
5063
|
-
const pageTokens = (0,
|
|
5066
|
+
const pageTokens = (0, import_react34.useMemo)(() => {
|
|
5064
5067
|
if (totalPages <= 5) {
|
|
5065
5068
|
return Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
5066
5069
|
}
|
|
@@ -5183,21 +5186,21 @@ var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
|
5183
5186
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
5184
5187
|
|
|
5185
5188
|
// src/components/SearchResultImage/index.tsx
|
|
5186
|
-
var
|
|
5189
|
+
var import_react35 = require("react");
|
|
5187
5190
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5188
5191
|
|
|
5189
5192
|
// src/components/Alert.tsx
|
|
5190
5193
|
var import_clsx38 = __toESM(require("clsx"), 1);
|
|
5191
|
-
var
|
|
5194
|
+
var import_react36 = require("react");
|
|
5192
5195
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
5193
5196
|
|
|
5194
5197
|
// src/components/OrderCheckIcon.tsx
|
|
5195
5198
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
5196
5199
|
|
|
5197
5200
|
// src/components/EditingContext.tsx
|
|
5198
|
-
var
|
|
5201
|
+
var import_react37 = require("react");
|
|
5199
5202
|
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
5200
|
-
var EditingContext = (0,
|
|
5203
|
+
var EditingContext = (0, import_react37.createContext)(null);
|
|
5201
5204
|
|
|
5202
5205
|
// src/components/AccessCard.tsx
|
|
5203
5206
|
var import_clsx40 = __toESM(require("clsx"), 1);
|
|
@@ -5331,7 +5334,7 @@ var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
|
5331
5334
|
|
|
5332
5335
|
// src/components/AccessCardGroup.tsx
|
|
5333
5336
|
var import_clsx41 = __toESM(require("clsx"), 1);
|
|
5334
|
-
var
|
|
5337
|
+
var import_react38 = require("react");
|
|
5335
5338
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
5336
5339
|
|
|
5337
5340
|
// src/components/CalendarRange.tsx
|
|
@@ -5446,20 +5449,20 @@ function CalendarRange({
|
|
|
5446
5449
|
const fromDate = parseDate(from);
|
|
5447
5450
|
const toDate = parseDate(to);
|
|
5448
5451
|
const today = import_polyfill.Temporal.Now.plainDateISO();
|
|
5449
|
-
const [baseMonth, setBaseMonth] = (0,
|
|
5452
|
+
const [baseMonth, setBaseMonth] = (0, import_react39.useState)(
|
|
5450
5453
|
fromDate != null ? fromDate : today.with({ day: 1 })
|
|
5451
5454
|
);
|
|
5452
|
-
const [selecting, setSelecting] = (0,
|
|
5453
|
-
const [pendingFrom, setPendingFrom] = (0,
|
|
5454
|
-
const [hoveredDate, setHoveredDate] = (0,
|
|
5455
|
-
(0,
|
|
5455
|
+
const [selecting, setSelecting] = (0, import_react39.useState)("from");
|
|
5456
|
+
const [pendingFrom, setPendingFrom] = (0, import_react39.useState)(void 0);
|
|
5457
|
+
const [hoveredDate, setHoveredDate] = (0, import_react39.useState)(void 0);
|
|
5458
|
+
(0, import_react39.useEffect)(() => {
|
|
5456
5459
|
if (fromDate) {
|
|
5457
5460
|
setBaseMonth(fromDate.with({ day: 1 }));
|
|
5458
5461
|
} else if (toDate) {
|
|
5459
5462
|
setBaseMonth(toDate.with({ day: 1 }));
|
|
5460
5463
|
}
|
|
5461
5464
|
}, [from, to]);
|
|
5462
|
-
(0,
|
|
5465
|
+
(0, import_react39.useEffect)(() => {
|
|
5463
5466
|
if (fromDate && toDate) {
|
|
5464
5467
|
setSelecting("from");
|
|
5465
5468
|
setPendingFrom(void 0);
|
|
@@ -5605,14 +5608,14 @@ function CalendarPane({
|
|
|
5605
5608
|
const years = Array.from({ length: 100 }).map(
|
|
5606
5609
|
(_, i) => baseMonth.year - 50 + i
|
|
5607
5610
|
);
|
|
5608
|
-
const [monthMenuOpen, setMonthMenuOpen] = (0,
|
|
5609
|
-
const [yearMenuOpen, setYearMenuOpen] = (0,
|
|
5610
|
-
const monthMenuRef = (0,
|
|
5611
|
-
const yearMenuRef = (0,
|
|
5611
|
+
const [monthMenuOpen, setMonthMenuOpen] = (0, import_react39.useState)(false);
|
|
5612
|
+
const [yearMenuOpen, setYearMenuOpen] = (0, import_react39.useState)(false);
|
|
5613
|
+
const monthMenuRef = (0, import_react39.useRef)(null);
|
|
5614
|
+
const yearMenuRef = (0, import_react39.useRef)(null);
|
|
5612
5615
|
const month = getMonthData(offset);
|
|
5613
5616
|
const totalCells = 42;
|
|
5614
5617
|
const emptyCells = month.firstDayOffset;
|
|
5615
|
-
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
5618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_react39.default.Fragment, { children: [
|
|
5616
5619
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
5617
5620
|
"div",
|
|
5618
5621
|
{
|
|
@@ -5820,24 +5823,24 @@ var DateInput = (_a) => {
|
|
|
5820
5823
|
"label",
|
|
5821
5824
|
"isDateAvailable"
|
|
5822
5825
|
]);
|
|
5823
|
-
const [visible, setVisible] = (0,
|
|
5824
|
-
const [inputValue, setInputValue] = (0,
|
|
5825
|
-
const [isTyping, setIsTyping] = (0,
|
|
5826
|
-
const popoverRef = (0,
|
|
5827
|
-
const triggerRef = (0,
|
|
5828
|
-
const rootRef = (0,
|
|
5829
|
-
const [calendarPosition, setCalendarPosition] = (0,
|
|
5826
|
+
const [visible, setVisible] = (0, import_react40.useState)(false);
|
|
5827
|
+
const [inputValue, setInputValue] = (0, import_react40.useState)("");
|
|
5828
|
+
const [isTyping, setIsTyping] = (0, import_react40.useState)(false);
|
|
5829
|
+
const popoverRef = (0, import_react40.useRef)(null);
|
|
5830
|
+
const triggerRef = (0, import_react40.useRef)(null);
|
|
5831
|
+
const rootRef = (0, import_react40.useRef)(null);
|
|
5832
|
+
const [calendarPosition, setCalendarPosition] = (0, import_react40.useState)({
|
|
5830
5833
|
top: 0,
|
|
5831
5834
|
left: 0,
|
|
5832
5835
|
width: 0
|
|
5833
5836
|
});
|
|
5834
5837
|
const [from, to] = [value, ""];
|
|
5835
|
-
(0,
|
|
5838
|
+
(0, import_react40.useEffect)(() => {
|
|
5836
5839
|
if (!isTyping) {
|
|
5837
5840
|
setInputValue(formatDisplayValue(from));
|
|
5838
5841
|
}
|
|
5839
5842
|
}, [from, isTyping]);
|
|
5840
|
-
(0,
|
|
5843
|
+
(0, import_react40.useLayoutEffect)(() => {
|
|
5841
5844
|
if (visible) {
|
|
5842
5845
|
updatePosition();
|
|
5843
5846
|
}
|
|
@@ -5852,7 +5855,7 @@ var DateInput = (_a) => {
|
|
|
5852
5855
|
});
|
|
5853
5856
|
}
|
|
5854
5857
|
};
|
|
5855
|
-
(0,
|
|
5858
|
+
(0, import_react40.useEffect)(() => {
|
|
5856
5859
|
updatePosition();
|
|
5857
5860
|
const resizeObserver = new ResizeObserver(updatePosition);
|
|
5858
5861
|
if (triggerRef.current) {
|
|
@@ -5864,7 +5867,7 @@ var DateInput = (_a) => {
|
|
|
5864
5867
|
window.removeEventListener("scroll", updatePosition);
|
|
5865
5868
|
};
|
|
5866
5869
|
}, []);
|
|
5867
|
-
(0,
|
|
5870
|
+
(0, import_react40.useEffect)(() => {
|
|
5868
5871
|
const handleKeyDown2 = (event) => {
|
|
5869
5872
|
var _a2;
|
|
5870
5873
|
if (event.key === "Escape" && popoverRef.current) {
|
|
@@ -5877,7 +5880,7 @@ var DateInput = (_a) => {
|
|
|
5877
5880
|
document.removeEventListener("keydown", handleKeyDown2);
|
|
5878
5881
|
};
|
|
5879
5882
|
});
|
|
5880
|
-
(0,
|
|
5883
|
+
(0, import_react40.useEffect)(() => {
|
|
5881
5884
|
const handleClickOutside = (event) => {
|
|
5882
5885
|
if (popoverRef.current && !popoverRef.current.contains(event.target) && triggerRef.current && !triggerRef.current.contains(event.target)) {
|
|
5883
5886
|
setVisible(false);
|