@ceed/ads 1.25.1-next.2 → 1.25.1-next.3
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/README.md +0 -19
- package/dist/components/CurrencyInput/CurrencyInput.d.ts +1 -1
- package/dist/components/CurrencyInput/hooks/use-currency-setting.d.ts +2 -2
- package/dist/components/data-display/Badge.md +39 -71
- package/dist/components/data-display/DataTable.md +1 -1
- package/dist/components/data-display/InfoSign.md +98 -74
- package/dist/components/data-display/Typography.md +97 -363
- package/dist/components/feedback/Dialog.md +62 -76
- package/dist/components/feedback/Modal.md +44 -259
- package/dist/components/feedback/llms.txt +0 -2
- package/dist/components/inputs/Autocomplete.md +107 -356
- package/dist/components/inputs/ButtonGroup.md +106 -115
- package/dist/components/inputs/Calendar.md +459 -98
- package/dist/components/inputs/CurrencyInput.md +5 -183
- package/dist/components/inputs/DatePicker.md +431 -108
- package/dist/components/inputs/DateRangePicker.md +492 -131
- package/dist/components/inputs/FilterMenu.md +19 -169
- package/dist/components/inputs/FilterableCheckboxGroup.md +23 -123
- package/dist/components/inputs/IconButton.md +88 -137
- package/dist/components/inputs/Input.md +0 -5
- package/dist/components/inputs/MonthPicker.md +422 -95
- package/dist/components/inputs/MonthRangePicker.md +466 -89
- package/dist/components/inputs/PercentageInput.md +16 -185
- package/dist/components/inputs/RadioButton.md +35 -163
- package/dist/components/inputs/RadioTileGroup.md +61 -150
- package/dist/components/inputs/Select.md +326 -222
- package/dist/components/inputs/Switch.md +376 -136
- package/dist/components/inputs/Textarea.md +10 -213
- package/dist/components/inputs/Uploader/Uploader.md +66 -145
- package/dist/components/inputs/llms.txt +0 -3
- package/dist/components/navigation/Breadcrumbs.md +322 -80
- package/dist/components/navigation/Dropdown.md +221 -92
- package/dist/components/navigation/IconMenuButton.md +502 -40
- package/dist/components/navigation/InsetDrawer.md +738 -68
- package/dist/components/navigation/Link.md +298 -39
- package/dist/components/navigation/Menu.md +285 -92
- package/dist/components/navigation/MenuButton.md +448 -55
- package/dist/components/navigation/Pagination.md +338 -47
- package/dist/components/navigation/ProfileMenu.md +268 -45
- package/dist/components/navigation/Stepper.md +28 -160
- package/dist/components/navigation/Tabs.md +316 -57
- package/dist/components/surfaces/Sheet.md +334 -151
- package/dist/index.browser.js +18 -16
- package/dist/index.browser.js.map +4 -4
- package/dist/index.cjs +190 -272
- package/dist/index.js +324 -350
- package/dist/llms.txt +0 -8
- package/framer/index.js +166 -1
- package/package.json +24 -27
- package/dist/chunks/rehype-accent-FZRUD7VI.js +0 -39
- package/dist/components/feedback/CircularProgress.md +0 -257
- package/dist/components/feedback/Skeleton.md +0 -280
- package/dist/components/inputs/FormControl.md +0 -361
- package/dist/components/inputs/RadioList.md +0 -241
- package/dist/components/inputs/Slider.md +0 -334
- package/dist/guides/ThemeProvider.md +0 -116
- package/dist/guides/llms.txt +0 -9
package/dist/index.js
CHANGED
|
@@ -1,3 +1,59 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
|
+
var __esm = (fn, res) => function __init() {
|
|
4
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
5
|
+
};
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// src/libs/rehype-accent/index.ts
|
|
12
|
+
var rehype_accent_exports = {};
|
|
13
|
+
__export(rehype_accent_exports, {
|
|
14
|
+
rehypeAccent: () => rehypeAccent
|
|
15
|
+
});
|
|
16
|
+
import { visit } from "unist-util-visit";
|
|
17
|
+
function rehypeAccent(options) {
|
|
18
|
+
const { accentColor } = options;
|
|
19
|
+
return (tree) => {
|
|
20
|
+
visit(tree, "text", (node, index, parent) => {
|
|
21
|
+
const value = node.value;
|
|
22
|
+
const regex = /\|\|.*?\|\|/g;
|
|
23
|
+
let match;
|
|
24
|
+
let lastIndex = 0;
|
|
25
|
+
const newNodes = [];
|
|
26
|
+
while ((match = regex.exec(value)) !== null) {
|
|
27
|
+
if (match.index > lastIndex) {
|
|
28
|
+
newNodes.push({
|
|
29
|
+
type: "text",
|
|
30
|
+
value: value.slice(lastIndex, match.index)
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
const innerText = match[0].split("||")[1];
|
|
34
|
+
newNodes.push({
|
|
35
|
+
type: "element",
|
|
36
|
+
tagName: "span",
|
|
37
|
+
properties: { textColor: accentColor },
|
|
38
|
+
children: [{ type: "text", value: innerText }]
|
|
39
|
+
});
|
|
40
|
+
lastIndex = match.index + match[0].length;
|
|
41
|
+
}
|
|
42
|
+
if (lastIndex < value.length) {
|
|
43
|
+
newNodes.push({ type: "text", value: value.slice(lastIndex) });
|
|
44
|
+
}
|
|
45
|
+
if (newNodes.length) {
|
|
46
|
+
parent.children.splice(index, 1, ...newNodes);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
var init_rehype_accent = __esm({
|
|
52
|
+
"src/libs/rehype-accent/index.ts"() {
|
|
53
|
+
"use strict";
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
1
57
|
// src/index.ts
|
|
2
58
|
import {
|
|
3
59
|
useTheme as useTheme2,
|
|
@@ -693,24 +749,11 @@ Button.displayName = "Button";
|
|
|
693
749
|
var Button_default = Button;
|
|
694
750
|
|
|
695
751
|
// src/components/Calendar/Calendar.tsx
|
|
696
|
-
import
|
|
752
|
+
import React11, { Fragment, forwardRef as forwardRef4, useMemo as useMemo4 } from "react";
|
|
697
753
|
import { styled as styled5 } from "@mui/joy";
|
|
698
754
|
import ChevronLeftIcon from "@mui/icons-material/ChevronLeft";
|
|
699
755
|
import ChevronRightIcon from "@mui/icons-material/ChevronRight";
|
|
700
|
-
import { AnimatePresence, motion as
|
|
701
|
-
|
|
702
|
-
// src/components/Tooltip/Tooltip.tsx
|
|
703
|
-
import React10 from "react";
|
|
704
|
-
import { Tooltip as JoyTooltip } from "@mui/joy";
|
|
705
|
-
import { motion as motion12 } from "framer-motion";
|
|
706
|
-
var MotionTooltip = motion12(JoyTooltip);
|
|
707
|
-
var Tooltip = (props) => {
|
|
708
|
-
return /* @__PURE__ */ React10.createElement(MotionTooltip, { ...props });
|
|
709
|
-
};
|
|
710
|
-
Tooltip.displayName = "Tooltip";
|
|
711
|
-
|
|
712
|
-
// src/components/Tooltip/index.ts
|
|
713
|
-
var Tooltip_default = Tooltip;
|
|
756
|
+
import { AnimatePresence, motion as motion12 } from "framer-motion";
|
|
714
757
|
|
|
715
758
|
// src/components/Calendar/utils/index.ts
|
|
716
759
|
var getCalendarDates = (date) => {
|
|
@@ -1069,12 +1112,6 @@ var useCalendar = (ownerState) => {
|
|
|
1069
1112
|
};
|
|
1070
1113
|
|
|
1071
1114
|
// src/components/Calendar/Calendar.tsx
|
|
1072
|
-
var MONTH_VIEW_HINT_MESSAGE = "Click the month title to view all months.";
|
|
1073
|
-
var MONTH_NAV_CLICK_WINDOW_MS = 1200;
|
|
1074
|
-
var MONTH_NAV_CLICK_THRESHOLD = 3;
|
|
1075
|
-
var MONTH_VIEW_HINT_DURATION_MS = 5e3;
|
|
1076
|
-
var MONTH_VIEW_HINT_COOLDOWN_MS = 3e4;
|
|
1077
|
-
var lastMonthViewAssistHintShownAt = 0;
|
|
1078
1115
|
var CalendarRoot = styled5("div", {
|
|
1079
1116
|
name: "Calendar",
|
|
1080
1117
|
slot: "root"
|
|
@@ -1101,7 +1138,7 @@ var CalendarViewContainer = styled5("div", {
|
|
|
1101
1138
|
overflow: "hidden",
|
|
1102
1139
|
minHeight: calendarType === "datePicker" ? "250px" : "unset"
|
|
1103
1140
|
}));
|
|
1104
|
-
var CalendarViewTable = styled5(
|
|
1141
|
+
var CalendarViewTable = styled5(motion12.table, {
|
|
1105
1142
|
name: "Calendar",
|
|
1106
1143
|
slot: "viewTable"
|
|
1107
1144
|
})(({ theme }) => ({
|
|
@@ -1281,7 +1318,7 @@ var PickerDays = (props) => {
|
|
|
1281
1318
|
const { getPickerDayProps, getDayCellProps } = useCalendar(ownerState);
|
|
1282
1319
|
const calendarDates = useMemo4(() => getCalendarDates(ownerState.viewMonth), [ownerState.viewMonth]);
|
|
1283
1320
|
const weekdayNames = useMemo4(() => getWeekdayNames(ownerState.locale || "default"), [ownerState.locale]);
|
|
1284
|
-
return /* @__PURE__ */
|
|
1321
|
+
return /* @__PURE__ */ React11.createElement(CalendarViewContainer, { calendarType: "datePicker" }, /* @__PURE__ */ React11.createElement(AnimatePresence, { initial: false, custom: ownerState.direction }, /* @__PURE__ */ React11.createElement(
|
|
1285
1322
|
CalendarViewTable,
|
|
1286
1323
|
{
|
|
1287
1324
|
key: `${ownerState.viewMonth.toString()}_${ownerState.direction}`,
|
|
@@ -1310,10 +1347,10 @@ var PickerDays = (props) => {
|
|
|
1310
1347
|
}
|
|
1311
1348
|
}
|
|
1312
1349
|
},
|
|
1313
|
-
/* @__PURE__ */
|
|
1314
|
-
/* @__PURE__ */
|
|
1315
|
-
(date, i) => date ? /* @__PURE__ */
|
|
1316
|
-
)), rowIndex < calendarDates.length - 1 && /* @__PURE__ */
|
|
1350
|
+
/* @__PURE__ */ React11.createElement(CalendarWeekHeaderContainer, null, /* @__PURE__ */ React11.createElement("tr", null, weekdayNames.map((name, i) => /* @__PURE__ */ React11.createElement(Fragment, { key: `${ownerState.viewMonth}_${name}_${i}` }, /* @__PURE__ */ React11.createElement("th", null, /* @__PURE__ */ React11.createElement(Typography_default, { level: "body-xs", textAlign: "center" }, name)), i < 6 && /* @__PURE__ */ React11.createElement("th", { style: { width: 4 }, "aria-hidden": "true", "aria-description": "cell-gap" }))))),
|
|
1351
|
+
/* @__PURE__ */ React11.createElement(CalendarDayPickerContainer, null, calendarDates.map((weekDates, rowIndex) => /* @__PURE__ */ React11.createElement(Fragment, { key: `${ownerState.viewMonth}_${rowIndex}` }, /* @__PURE__ */ React11.createElement("tr", null, weekDates.map(
|
|
1352
|
+
(date, i) => date ? /* @__PURE__ */ React11.createElement(Fragment, { key: `${ownerState.viewMonth}_${date}_${i}` }, /* @__PURE__ */ React11.createElement(CalendarDayCell, { ...getDayCellProps(date) }, /* @__PURE__ */ React11.createElement(CalendarDay, { size: "sm", variant: "plain", color: "neutral", ...getPickerDayProps(date) }, date)), i < 6 && /* @__PURE__ */ React11.createElement("td", { "aria-hidden": "true", "aria-description": "cell-gap" })) : /* @__PURE__ */ React11.createElement(Fragment, { key: `${ownerState.viewMonth}_${i}` }, /* @__PURE__ */ React11.createElement("td", null), i < 6 && /* @__PURE__ */ React11.createElement("td", { "aria-hidden": "true", "aria-description": "cell-gap" }))
|
|
1353
|
+
)), rowIndex < calendarDates.length - 1 && /* @__PURE__ */ React11.createElement("tr", { "aria-hidden": "true", "aria-description": "row-gap" }, /* @__PURE__ */ React11.createElement("td", { colSpan: 13, style: { height: 4 } })))))
|
|
1317
1354
|
)));
|
|
1318
1355
|
};
|
|
1319
1356
|
var PickerMonths = (props) => {
|
|
@@ -1330,7 +1367,7 @@ var PickerMonths = (props) => {
|
|
|
1330
1367
|
[[]]
|
|
1331
1368
|
);
|
|
1332
1369
|
const isMonthPicker = !ownerState.views?.find((view) => view === "day");
|
|
1333
|
-
return /* @__PURE__ */
|
|
1370
|
+
return /* @__PURE__ */ React11.createElement(CalendarViewContainer, { calendarType: isMonthPicker ? "monthPicker" : "datePicker" }, /* @__PURE__ */ React11.createElement(AnimatePresence, { initial: false, custom: ownerState.direction }, /* @__PURE__ */ React11.createElement(
|
|
1334
1371
|
CalendarViewTable,
|
|
1335
1372
|
{
|
|
1336
1373
|
key: `${ownerState.viewMonth.getFullYear()}_${ownerState.direction}`,
|
|
@@ -1359,7 +1396,7 @@ var PickerMonths = (props) => {
|
|
|
1359
1396
|
}
|
|
1360
1397
|
}
|
|
1361
1398
|
},
|
|
1362
|
-
/* @__PURE__ */
|
|
1399
|
+
/* @__PURE__ */ React11.createElement("tbody", null, chunkedMonths.map((months, i) => /* @__PURE__ */ React11.createElement(Fragment, { key: months.join("_") }, /* @__PURE__ */ React11.createElement("tr", null, months.map((monthIndex, j) => /* @__PURE__ */ React11.createElement(Fragment, { key: monthIndex }, /* @__PURE__ */ React11.createElement(CalendarMonthCell, { ...getMonthCellProps(monthIndex) }, /* @__PURE__ */ React11.createElement(CalendarMonth, { size: "sm", variant: "plain", color: "neutral", ...getPickerMonthProps(monthIndex) }, getMonthNameFromIndex(monthIndex, ownerState.locale))), j < 3 && /* @__PURE__ */ React11.createElement("td", { style: { width: 4 }, "aria-hidden": "true", "aria-description": "cell-gap" })))), i < chunkedMonths.length - 1 && /* @__PURE__ */ React11.createElement("tr", { "aria-hidden": "true", "aria-description": "row-gap" }, /* @__PURE__ */ React11.createElement("td", { colSpan: 7, style: { height: 4 } })))))
|
|
1363
1400
|
)));
|
|
1364
1401
|
};
|
|
1365
1402
|
var Calendar = forwardRef4((inProps, ref) => {
|
|
@@ -1381,96 +1418,17 @@ var Calendar = forwardRef4((inProps, ref) => {
|
|
|
1381
1418
|
...others
|
|
1382
1419
|
} = props;
|
|
1383
1420
|
const { calendarTitle, onPrev, onNext } = useCalendar(ownerState);
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
const monthViewAssistHintShownInSessionRef = useRef3(false);
|
|
1387
|
-
const monthViewAssistHintTimeoutRef = useRef3(null);
|
|
1388
|
-
const hasEndDate = Boolean(value?.[1]);
|
|
1389
|
-
const isRangeHintEligible = Boolean(rangeSelection && !hasEndDate);
|
|
1390
|
-
const isHintEligible = Boolean(view === "day" && (!rangeSelection || isRangeHintEligible));
|
|
1391
|
-
const monthViewHintMessage = MONTH_VIEW_HINT_MESSAGE;
|
|
1392
|
-
useEffect3(() => {
|
|
1393
|
-
if (!isHintEligible) {
|
|
1394
|
-
monthNavClickTimestampsRef.current = [];
|
|
1395
|
-
setIsMonthViewAssistHintOpen(false);
|
|
1396
|
-
}
|
|
1397
|
-
}, [isHintEligible]);
|
|
1398
|
-
useEffect3(() => {
|
|
1399
|
-
return () => {
|
|
1400
|
-
if (monthViewAssistHintTimeoutRef.current) {
|
|
1401
|
-
clearTimeout(monthViewAssistHintTimeoutRef.current);
|
|
1402
|
-
}
|
|
1403
|
-
};
|
|
1404
|
-
}, []);
|
|
1405
|
-
const closeMonthViewAssistHint = useCallback5(() => {
|
|
1406
|
-
if (monthViewAssistHintTimeoutRef.current) {
|
|
1407
|
-
clearTimeout(monthViewAssistHintTimeoutRef.current);
|
|
1408
|
-
monthViewAssistHintTimeoutRef.current = null;
|
|
1409
|
-
}
|
|
1410
|
-
setIsMonthViewAssistHintOpen(false);
|
|
1411
|
-
}, []);
|
|
1412
|
-
const showMonthViewAssistHint = useCallback5(() => {
|
|
1413
|
-
const now = Date.now();
|
|
1414
|
-
if (monthViewAssistHintShownInSessionRef.current) return;
|
|
1415
|
-
if (now - lastMonthViewAssistHintShownAt < MONTH_VIEW_HINT_COOLDOWN_MS) return;
|
|
1416
|
-
monthViewAssistHintShownInSessionRef.current = true;
|
|
1417
|
-
lastMonthViewAssistHintShownAt = now;
|
|
1418
|
-
setIsMonthViewAssistHintOpen(true);
|
|
1419
|
-
if (monthViewAssistHintTimeoutRef.current) {
|
|
1420
|
-
clearTimeout(monthViewAssistHintTimeoutRef.current);
|
|
1421
|
-
}
|
|
1422
|
-
monthViewAssistHintTimeoutRef.current = setTimeout(() => {
|
|
1423
|
-
setIsMonthViewAssistHintOpen(false);
|
|
1424
|
-
monthViewAssistHintTimeoutRef.current = null;
|
|
1425
|
-
}, MONTH_VIEW_HINT_DURATION_MS);
|
|
1426
|
-
}, []);
|
|
1427
|
-
const trackFastMonthNavigation = useCallback5(() => {
|
|
1428
|
-
if (!isHintEligible) return;
|
|
1429
|
-
const now = Date.now();
|
|
1430
|
-
monthNavClickTimestampsRef.current = [
|
|
1431
|
-
...monthNavClickTimestampsRef.current.filter((timestamp) => now - timestamp <= MONTH_NAV_CLICK_WINDOW_MS),
|
|
1432
|
-
now
|
|
1433
|
-
];
|
|
1434
|
-
if (monthNavClickTimestampsRef.current.length >= MONTH_NAV_CLICK_THRESHOLD) {
|
|
1435
|
-
showMonthViewAssistHint();
|
|
1436
|
-
}
|
|
1437
|
-
}, [isHintEligible, showMonthViewAssistHint]);
|
|
1438
|
-
const handlePrevClick = useCallback5(() => {
|
|
1439
|
-
onPrev();
|
|
1440
|
-
trackFastMonthNavigation();
|
|
1441
|
-
}, [onPrev, trackFastMonthNavigation]);
|
|
1442
|
-
const handleNextClick = useCallback5(() => {
|
|
1443
|
-
onNext();
|
|
1444
|
-
trackFastMonthNavigation();
|
|
1445
|
-
}, [onNext, trackFastMonthNavigation]);
|
|
1446
|
-
const handleSwitchViewClick = useCallback5(() => {
|
|
1447
|
-
closeMonthViewAssistHint();
|
|
1448
|
-
onViewChange?.();
|
|
1449
|
-
}, [closeMonthViewAssistHint, onViewChange]);
|
|
1450
|
-
return /* @__PURE__ */ React12.createElement(CalendarRoot, { ref, ...others }, /* @__PURE__ */ React12.createElement(CalendarHeader, null, /* @__PURE__ */ React12.createElement(IconButton_default, { size: "sm", onClick: handlePrevClick, "aria-label": `Previous ${view === "day" ? "Month" : "Year"}` }, /* @__PURE__ */ React12.createElement(ChevronLeftIcon, null)), /* @__PURE__ */ React12.createElement(
|
|
1451
|
-
Tooltip_default,
|
|
1421
|
+
return /* @__PURE__ */ React11.createElement(CalendarRoot, { ref, ...others }, /* @__PURE__ */ React11.createElement(CalendarHeader, null, /* @__PURE__ */ React11.createElement(IconButton_default, { size: "sm", onClick: onPrev, "aria-label": `Previous ${view === "day" ? "Month" : "Year"}` }, /* @__PURE__ */ React11.createElement(ChevronLeftIcon, null)), /* @__PURE__ */ React11.createElement(
|
|
1422
|
+
CalendarSwitchViewButton,
|
|
1452
1423
|
{
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
disableHoverListener: true,
|
|
1459
|
-
disableTouchListener: true,
|
|
1460
|
-
variant: "solid"
|
|
1424
|
+
ownerState,
|
|
1425
|
+
variant: "plain",
|
|
1426
|
+
color: "neutral",
|
|
1427
|
+
onClick: onViewChange,
|
|
1428
|
+
"aria-label": "Switch Calendar View"
|
|
1461
1429
|
},
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
{
|
|
1465
|
-
ownerState,
|
|
1466
|
-
variant: "plain",
|
|
1467
|
-
color: "neutral",
|
|
1468
|
-
onClick: handleSwitchViewClick,
|
|
1469
|
-
"aria-label": "Switch Calendar View"
|
|
1470
|
-
},
|
|
1471
|
-
calendarTitle
|
|
1472
|
-
)
|
|
1473
|
-
), /* @__PURE__ */ React12.createElement(IconButton_default, { size: "sm", onClick: handleNextClick, "aria-label": `Next ${view === "day" ? "Month" : "Year"}` }, /* @__PURE__ */ React12.createElement(ChevronRightIcon, null))), view === "day" && /* @__PURE__ */ React12.createElement(PickerDays, { ownerState }), view === "month" && /* @__PURE__ */ React12.createElement(PickerMonths, { ownerState }));
|
|
1430
|
+
calendarTitle
|
|
1431
|
+
), /* @__PURE__ */ React11.createElement(IconButton_default, { size: "sm", onClick: onNext, "aria-label": `Next ${view === "day" ? "Month" : "Year"}` }, /* @__PURE__ */ React11.createElement(ChevronRightIcon, null))), view === "day" && /* @__PURE__ */ React11.createElement(PickerDays, { ownerState }), view === "month" && /* @__PURE__ */ React11.createElement(PickerMonths, { ownerState }));
|
|
1474
1432
|
});
|
|
1475
1433
|
Calendar.displayName = "Calendar";
|
|
1476
1434
|
|
|
@@ -1485,30 +1443,30 @@ import {
|
|
|
1485
1443
|
CardActions as JoyCardActions,
|
|
1486
1444
|
CardOverflow as JoyCardOverflow
|
|
1487
1445
|
} from "@mui/joy";
|
|
1488
|
-
import { motion as
|
|
1489
|
-
var MotionCard =
|
|
1446
|
+
import { motion as motion13 } from "framer-motion";
|
|
1447
|
+
var MotionCard = motion13(JoyCard);
|
|
1490
1448
|
var Card = MotionCard;
|
|
1491
1449
|
Card.displayName = "Card";
|
|
1492
|
-
var MotionCardContent =
|
|
1450
|
+
var MotionCardContent = motion13(JoyCardContent);
|
|
1493
1451
|
var CardContent = MotionCardContent;
|
|
1494
1452
|
CardContent.displayName = "CardContent";
|
|
1495
|
-
var MotionCardCover =
|
|
1453
|
+
var MotionCardCover = motion13(JoyCardCover);
|
|
1496
1454
|
var CardCover = MotionCardCover;
|
|
1497
1455
|
CardCover.displayName = "CardCover";
|
|
1498
|
-
var MotionCardActions =
|
|
1456
|
+
var MotionCardActions = motion13(JoyCardActions);
|
|
1499
1457
|
var CardActions = MotionCardActions;
|
|
1500
1458
|
CardActions.displayName = "CardActions";
|
|
1501
|
-
var MotionCardOverflow =
|
|
1459
|
+
var MotionCardOverflow = motion13(JoyCardOverflow);
|
|
1502
1460
|
var CardOverflow = MotionCardOverflow;
|
|
1503
1461
|
CardOverflow.displayName = "CardOverflow";
|
|
1504
1462
|
|
|
1505
1463
|
// src/components/Checkbox/Checkbox.tsx
|
|
1506
|
-
import
|
|
1464
|
+
import React12 from "react";
|
|
1507
1465
|
import { Checkbox as JoyCheckbox } from "@mui/joy";
|
|
1508
|
-
import { motion as
|
|
1509
|
-
var MotionCheckbox =
|
|
1466
|
+
import { motion as motion14 } from "framer-motion";
|
|
1467
|
+
var MotionCheckbox = motion14(JoyCheckbox);
|
|
1510
1468
|
var Checkbox = (props) => {
|
|
1511
|
-
return /* @__PURE__ */
|
|
1469
|
+
return /* @__PURE__ */ React12.createElement(MotionCheckbox, { ...props });
|
|
1512
1470
|
};
|
|
1513
1471
|
Checkbox.displayName = "Checkbox";
|
|
1514
1472
|
|
|
@@ -1517,7 +1475,7 @@ var Checkbox_default = Checkbox;
|
|
|
1517
1475
|
|
|
1518
1476
|
// src/components/Container/Container.tsx
|
|
1519
1477
|
import { styled as styled6 } from "@mui/joy";
|
|
1520
|
-
import
|
|
1478
|
+
import React13, { forwardRef as forwardRef5 } from "react";
|
|
1521
1479
|
var ContainerRoot = styled6("div", {
|
|
1522
1480
|
name: "Container",
|
|
1523
1481
|
slot: "root",
|
|
@@ -1544,23 +1502,24 @@ var ContainerRoot = styled6("div", {
|
|
|
1544
1502
|
} : null
|
|
1545
1503
|
]);
|
|
1546
1504
|
var Container = forwardRef5(function Container2(props, ref) {
|
|
1547
|
-
return /* @__PURE__ */
|
|
1505
|
+
return /* @__PURE__ */ React13.createElement(ContainerRoot, { ref, ...props });
|
|
1548
1506
|
});
|
|
1549
1507
|
Container.displayName = "Container";
|
|
1550
1508
|
|
|
1551
1509
|
// src/components/CurrencyInput/CurrencyInput.tsx
|
|
1552
|
-
import
|
|
1510
|
+
import React15, { useCallback as useCallback6, useMemo as useMemo5, useState as useState5 } from "react";
|
|
1511
|
+
import { IntlMessageFormat as IntlMessageFormat2 } from "intl-messageformat";
|
|
1553
1512
|
import { NumericFormat } from "react-number-format";
|
|
1554
1513
|
|
|
1555
1514
|
// src/components/Input/Input.tsx
|
|
1556
|
-
import
|
|
1515
|
+
import React14, { useCallback as useCallback5, useState as useState4 } from "react";
|
|
1557
1516
|
import { Input as JoyInput } from "@mui/joy";
|
|
1558
|
-
import { motion as
|
|
1517
|
+
import { motion as motion15 } from "framer-motion";
|
|
1559
1518
|
import ClearIcon from "@mui/icons-material/Close";
|
|
1560
1519
|
import VisibilityIcon from "@mui/icons-material/Visibility";
|
|
1561
1520
|
import VisibilityOffIcon from "@mui/icons-material/VisibilityOff";
|
|
1562
|
-
var MotionInput =
|
|
1563
|
-
var Input =
|
|
1521
|
+
var MotionInput = motion15(JoyInput);
|
|
1522
|
+
var Input = React14.forwardRef((props, ref) => {
|
|
1564
1523
|
const {
|
|
1565
1524
|
label,
|
|
1566
1525
|
helperText,
|
|
@@ -1583,11 +1542,11 @@ var Input = React15.forwardRef((props, ref) => {
|
|
|
1583
1542
|
if (type === "password" && innerProps.endDecorator) {
|
|
1584
1543
|
console.warn('Input: endDecorator is not supported when type="password"');
|
|
1585
1544
|
}
|
|
1586
|
-
const [passwordVisible, setPasswordVisible] =
|
|
1545
|
+
const [passwordVisible, setPasswordVisible] = useState4(false);
|
|
1587
1546
|
const [value, setValue] = useControlledState(
|
|
1588
1547
|
props.value,
|
|
1589
1548
|
props.defaultValue,
|
|
1590
|
-
|
|
1549
|
+
useCallback5(
|
|
1591
1550
|
(value2) => {
|
|
1592
1551
|
onChange?.({
|
|
1593
1552
|
/**
|
|
@@ -1613,7 +1572,7 @@ var Input = React15.forwardRef((props, ref) => {
|
|
|
1613
1572
|
const actualType = type === "password" && passwordVisible ? "text" : type;
|
|
1614
1573
|
const isPasswordType = type === "password";
|
|
1615
1574
|
const showPasswordToggle = isPasswordType && !disableTogglePasswordButton;
|
|
1616
|
-
const input = /* @__PURE__ */
|
|
1575
|
+
const input = /* @__PURE__ */ React14.createElement(
|
|
1617
1576
|
MotionInput,
|
|
1618
1577
|
{
|
|
1619
1578
|
value,
|
|
@@ -1628,7 +1587,7 @@ var Input = React15.forwardRef((props, ref) => {
|
|
|
1628
1587
|
...innerProps.slotProps
|
|
1629
1588
|
},
|
|
1630
1589
|
...innerProps,
|
|
1631
|
-
endDecorator: isPasswordType ? showPasswordToggle ? /* @__PURE__ */
|
|
1590
|
+
endDecorator: isPasswordType ? showPasswordToggle ? /* @__PURE__ */ React14.createElement(Stack_default, { gap: 1, direction: "row" }, /* @__PURE__ */ React14.createElement(
|
|
1632
1591
|
IconButton_default,
|
|
1633
1592
|
{
|
|
1634
1593
|
onMouseDown: (e) => e.preventDefault(),
|
|
@@ -1636,19 +1595,19 @@ var Input = React15.forwardRef((props, ref) => {
|
|
|
1636
1595
|
disabled,
|
|
1637
1596
|
"aria-label": passwordVisible ? "Hide password" : "Show password"
|
|
1638
1597
|
},
|
|
1639
|
-
passwordVisible ? /* @__PURE__ */
|
|
1640
|
-
)) : null : enableClearable ? /* @__PURE__ */
|
|
1598
|
+
passwordVisible ? /* @__PURE__ */ React14.createElement(VisibilityOffIcon, null) : /* @__PURE__ */ React14.createElement(VisibilityIcon, null)
|
|
1599
|
+
)) : null : enableClearable ? /* @__PURE__ */ React14.createElement(Stack_default, { gap: 1, direction: "row" }, innerProps.endDecorator, value && /* @__PURE__ */ React14.createElement(
|
|
1641
1600
|
IconButton_default,
|
|
1642
1601
|
{
|
|
1643
1602
|
onMouseDown: (e) => e.preventDefault(),
|
|
1644
1603
|
onClick: handleClear,
|
|
1645
1604
|
"aria-label": "Clear"
|
|
1646
1605
|
},
|
|
1647
|
-
/* @__PURE__ */
|
|
1606
|
+
/* @__PURE__ */ React14.createElement(ClearIcon, null)
|
|
1648
1607
|
)) : innerProps.endDecorator
|
|
1649
1608
|
}
|
|
1650
1609
|
);
|
|
1651
|
-
return /* @__PURE__ */
|
|
1610
|
+
return /* @__PURE__ */ React14.createElement(
|
|
1652
1611
|
FormControl_default,
|
|
1653
1612
|
{
|
|
1654
1613
|
required,
|
|
@@ -1659,9 +1618,9 @@ var Input = React15.forwardRef((props, ref) => {
|
|
|
1659
1618
|
sx,
|
|
1660
1619
|
className
|
|
1661
1620
|
},
|
|
1662
|
-
label && /* @__PURE__ */
|
|
1621
|
+
label && /* @__PURE__ */ React14.createElement(FormLabel_default, null, label),
|
|
1663
1622
|
input,
|
|
1664
|
-
helperText && /* @__PURE__ */
|
|
1623
|
+
helperText && /* @__PURE__ */ React14.createElement(FormHelperText_default, null, helperText)
|
|
1665
1624
|
);
|
|
1666
1625
|
});
|
|
1667
1626
|
Input.displayName = "Input";
|
|
@@ -1673,6 +1632,7 @@ var Input_default = Input;
|
|
|
1673
1632
|
import { styled as styled7, useThemeProps as useThemeProps3 } from "@mui/joy";
|
|
1674
1633
|
|
|
1675
1634
|
// src/components/CurrencyInput/hooks/use-currency-setting.ts
|
|
1635
|
+
import IntlMessageFormat from "intl-messageformat";
|
|
1676
1636
|
var CURRENCY_DECIMAL_MAP = {
|
|
1677
1637
|
AED: 2,
|
|
1678
1638
|
ALL: 2,
|
|
@@ -1817,10 +1777,9 @@ var CURRENCY_DECIMAL_MAP = {
|
|
|
1817
1777
|
};
|
|
1818
1778
|
var useCurrencySetting = (props) => {
|
|
1819
1779
|
const { currency = "USD", placeholder } = props;
|
|
1820
|
-
const
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
const decimalSeparator = parts.find((p) => p.type === "decimal")?.value;
|
|
1780
|
+
const [symbol, thousandSeparator, decimalSeparator, ...rest] = new IntlMessageFormat(
|
|
1781
|
+
`{amount, number, ::currency/${currency} unit-width-narrow}`
|
|
1782
|
+
).format({ amount: 1e3 }).toString().replace(/\d/g, "").split("");
|
|
1824
1783
|
const decimalScale = CURRENCY_DECIMAL_MAP[currency];
|
|
1825
1784
|
return {
|
|
1826
1785
|
symbol: `${symbol} `,
|
|
@@ -1833,9 +1792,9 @@ var useCurrencySetting = (props) => {
|
|
|
1833
1792
|
};
|
|
1834
1793
|
|
|
1835
1794
|
// src/components/CurrencyInput/CurrencyInput.tsx
|
|
1836
|
-
var TextMaskAdapter =
|
|
1795
|
+
var TextMaskAdapter = React15.forwardRef(function TextMaskAdapter2(props, ref) {
|
|
1837
1796
|
const { onChange, ...innerProps } = props;
|
|
1838
|
-
return /* @__PURE__ */
|
|
1797
|
+
return /* @__PURE__ */ React15.createElement(
|
|
1839
1798
|
NumericFormat,
|
|
1840
1799
|
{
|
|
1841
1800
|
...innerProps,
|
|
@@ -1855,7 +1814,7 @@ var CurrencyInputRoot = styled7(Input_default, {
|
|
|
1855
1814
|
slot: "root",
|
|
1856
1815
|
overridesResolver: (props, styles) => styles.root
|
|
1857
1816
|
})({});
|
|
1858
|
-
var CurrencyInput =
|
|
1817
|
+
var CurrencyInput = React15.forwardRef(function CurrencyInput2(inProps, ref) {
|
|
1859
1818
|
const props = useThemeProps3({ props: inProps, name: "CurrencyInput" });
|
|
1860
1819
|
const {
|
|
1861
1820
|
currency = "USD",
|
|
@@ -1876,7 +1835,7 @@ var CurrencyInput = React16.forwardRef(function CurrencyInput2(inProps, ref) {
|
|
|
1876
1835
|
const [_value, setValue] = useControlledState(
|
|
1877
1836
|
props.value,
|
|
1878
1837
|
props.defaultValue,
|
|
1879
|
-
|
|
1838
|
+
useCallback6((value2) => onChange?.({ target: { name, value: value2 } }), [onChange, name])
|
|
1880
1839
|
);
|
|
1881
1840
|
const value = useMemo5(() => {
|
|
1882
1841
|
if (_value && useMinorUnit) {
|
|
@@ -1890,14 +1849,14 @@ var CurrencyInput = React16.forwardRef(function CurrencyInput2(inProps, ref) {
|
|
|
1890
1849
|
}
|
|
1891
1850
|
return props.max;
|
|
1892
1851
|
}, [props.max, useMinorUnit, decimalScale]);
|
|
1893
|
-
const [isOverLimit, setIsOverLimit] =
|
|
1894
|
-
const handleChange =
|
|
1852
|
+
const [isOverLimit, setIsOverLimit] = useState5(!!max && !!value && value > max);
|
|
1853
|
+
const handleChange = useCallback6(
|
|
1895
1854
|
(event) => {
|
|
1896
1855
|
if (event.target.value === "") {
|
|
1897
1856
|
setValue(void 0);
|
|
1898
1857
|
return;
|
|
1899
1858
|
}
|
|
1900
|
-
const amount = useMinorUnit ? Number(
|
|
1859
|
+
const amount = useMinorUnit ? Number(event.target.value?.replace(decimalSeparator, "")) : Number(event.target.value);
|
|
1901
1860
|
if (!!max && Number(event.target.value) > max) {
|
|
1902
1861
|
setIsOverLimit(true);
|
|
1903
1862
|
} else {
|
|
@@ -1907,7 +1866,7 @@ var CurrencyInput = React16.forwardRef(function CurrencyInput2(inProps, ref) {
|
|
|
1907
1866
|
},
|
|
1908
1867
|
[decimalSeparator, max, useMinorUnit, setValue]
|
|
1909
1868
|
);
|
|
1910
|
-
return /* @__PURE__ */
|
|
1869
|
+
return /* @__PURE__ */ React15.createElement(
|
|
1911
1870
|
CurrencyInputRoot,
|
|
1912
1871
|
{
|
|
1913
1872
|
...innerProps,
|
|
@@ -1920,7 +1879,9 @@ var CurrencyInput = React16.forwardRef(function CurrencyInput2(inProps, ref) {
|
|
|
1920
1879
|
required,
|
|
1921
1880
|
color: error || isOverLimit ? "danger" : props.color,
|
|
1922
1881
|
label,
|
|
1923
|
-
helperText: isOverLimit ? `limit:
|
|
1882
|
+
helperText: isOverLimit ? new IntlMessageFormat2(`limit: {amount, number, ::currency/${currency} unit-width-narrow}`).format({
|
|
1883
|
+
amount: max
|
|
1884
|
+
}) : helperText,
|
|
1924
1885
|
slotProps: {
|
|
1925
1886
|
input: {
|
|
1926
1887
|
component: TextMaskAdapter,
|
|
@@ -1945,9 +1906,9 @@ var CurrencyInput_default = CurrencyInput;
|
|
|
1945
1906
|
|
|
1946
1907
|
// src/components/DataTable/DataTable.tsx
|
|
1947
1908
|
import React25, {
|
|
1948
|
-
useCallback as
|
|
1909
|
+
useCallback as useCallback11,
|
|
1949
1910
|
useMemo as useMemo10,
|
|
1950
|
-
useRef as
|
|
1911
|
+
useRef as useRef6,
|
|
1951
1912
|
useId,
|
|
1952
1913
|
forwardRef as forwardRef7,
|
|
1953
1914
|
useImperativeHandle as useImperativeHandle2,
|
|
@@ -2075,9 +2036,9 @@ function getTextAlign(props) {
|
|
|
2075
2036
|
var numberFormatter = (value) => "Intl" in window ? new Intl.NumberFormat().format(value) : value;
|
|
2076
2037
|
|
|
2077
2038
|
// src/components/DataTable/styled.tsx
|
|
2078
|
-
import
|
|
2039
|
+
import React16 from "react";
|
|
2079
2040
|
import { styled as styled8, LinearProgress, buttonClasses, iconButtonClasses } from "@mui/joy";
|
|
2080
|
-
import { motion as
|
|
2041
|
+
import { motion as motion16 } from "framer-motion";
|
|
2081
2042
|
import SortIcon from "@mui/icons-material/ArrowUpwardRounded";
|
|
2082
2043
|
var EllipsisDiv = styled8("div", {
|
|
2083
2044
|
name: "DataTable",
|
|
@@ -2151,7 +2112,7 @@ var Asterisk = styled8("span", {
|
|
|
2151
2112
|
color: "var(--ceed-palette-danger-500)",
|
|
2152
2113
|
marginLeft: theme.spacing(0.5)
|
|
2153
2114
|
}));
|
|
2154
|
-
var StyledTh = styled8(
|
|
2115
|
+
var StyledTh = styled8(motion16.th)(({ theme }) => ({
|
|
2155
2116
|
boxShadow: "1px 0 var(--TableCell-borderColor)"
|
|
2156
2117
|
}));
|
|
2157
2118
|
var StyledTd = styled8("td")(({ theme }) => ({
|
|
@@ -2170,9 +2131,9 @@ var StyledTd = styled8("td")(({ theme }) => ({
|
|
|
2170
2131
|
}
|
|
2171
2132
|
}
|
|
2172
2133
|
}));
|
|
2173
|
-
var MotionSortIcon =
|
|
2174
|
-
var DefaultLoadingOverlay = () => /* @__PURE__ */
|
|
2175
|
-
var Resizer = (ref, targetRef = ref) => /* @__PURE__ */
|
|
2134
|
+
var MotionSortIcon = motion16(SortIcon);
|
|
2135
|
+
var DefaultLoadingOverlay = () => /* @__PURE__ */ React16.createElement(LinearProgress, { value: 8, variant: "plain" });
|
|
2136
|
+
var Resizer = (ref, targetRef = ref) => /* @__PURE__ */ React16.createElement(
|
|
2176
2137
|
Box_default,
|
|
2177
2138
|
{
|
|
2178
2139
|
sx: {
|
|
@@ -2205,12 +2166,12 @@ var Resizer = (ref, targetRef = ref) => /* @__PURE__ */ React17.createElement(
|
|
|
2205
2166
|
|
|
2206
2167
|
// src/components/DataTable/components.tsx
|
|
2207
2168
|
import React22, {
|
|
2208
|
-
useRef as
|
|
2209
|
-
useState as
|
|
2169
|
+
useRef as useRef4,
|
|
2170
|
+
useState as useState7,
|
|
2210
2171
|
useLayoutEffect,
|
|
2211
2172
|
useMemo as useMemo8,
|
|
2212
|
-
useCallback as
|
|
2213
|
-
useEffect as
|
|
2173
|
+
useCallback as useCallback8,
|
|
2174
|
+
useEffect as useEffect4,
|
|
2214
2175
|
memo,
|
|
2215
2176
|
createElement
|
|
2216
2177
|
} from "react";
|
|
@@ -2218,7 +2179,7 @@ import { styled as styled12, useTheme } from "@mui/joy";
|
|
|
2218
2179
|
import { AnimatePresence as AnimatePresence2 } from "framer-motion";
|
|
2219
2180
|
|
|
2220
2181
|
// src/components/DatePicker/DatePicker.tsx
|
|
2221
|
-
import
|
|
2182
|
+
import React17, { forwardRef as forwardRef6, useCallback as useCallback7, useEffect as useEffect3, useImperativeHandle, useRef as useRef3, useState as useState6 } from "react";
|
|
2222
2183
|
import { IMaskInput, IMask } from "react-imask";
|
|
2223
2184
|
import CalendarTodayIcon from "@mui/icons-material/CalendarToday";
|
|
2224
2185
|
import { styled as styled10, useThemeProps as useThemeProps4 } from "@mui/joy";
|
|
@@ -2233,8 +2194,8 @@ var Sheet_default = Sheet;
|
|
|
2233
2194
|
|
|
2234
2195
|
// src/components/DialogActions/DialogActions.tsx
|
|
2235
2196
|
import { DialogActions as JoyDialogActions, styled as styled9 } from "@mui/joy";
|
|
2236
|
-
import { motion as
|
|
2237
|
-
var MotionDialogActions =
|
|
2197
|
+
import { motion as motion17 } from "framer-motion";
|
|
2198
|
+
var MotionDialogActions = motion17(JoyDialogActions);
|
|
2238
2199
|
var StyledDialogActions = styled9(MotionDialogActions)(({ theme }) => ({
|
|
2239
2200
|
padding: theme.spacing(2),
|
|
2240
2201
|
gap: theme.spacing(2),
|
|
@@ -2330,9 +2291,9 @@ function parseDate(dateString, format) {
|
|
|
2330
2291
|
var formatToPattern = (format) => {
|
|
2331
2292
|
return format.replace(/YYYY/g, "Y").replace(/MM/g, "M").replace(/DD/g, "D").replace(/[^YMD\s]/g, (match) => `${match}\``);
|
|
2332
2293
|
};
|
|
2333
|
-
var TextMaskAdapter3 =
|
|
2294
|
+
var TextMaskAdapter3 = React17.forwardRef(function TextMaskAdapter4(props, ref) {
|
|
2334
2295
|
const { onChange, format, ...other } = props;
|
|
2335
|
-
return /* @__PURE__ */
|
|
2296
|
+
return /* @__PURE__ */ React17.createElement(
|
|
2336
2297
|
IMaskInput,
|
|
2337
2298
|
{
|
|
2338
2299
|
...other,
|
|
@@ -2392,24 +2353,24 @@ var DatePicker = forwardRef6((inProps, ref) => {
|
|
|
2392
2353
|
shouldDisableDate,
|
|
2393
2354
|
...innerProps
|
|
2394
2355
|
} = props;
|
|
2395
|
-
const innerRef =
|
|
2396
|
-
const buttonRef =
|
|
2356
|
+
const innerRef = useRef3(null);
|
|
2357
|
+
const buttonRef = useRef3(null);
|
|
2397
2358
|
const [value, setValue] = useControlledState(
|
|
2398
2359
|
props.value,
|
|
2399
2360
|
props.defaultValue || "",
|
|
2400
|
-
|
|
2361
|
+
useCallback7((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
|
|
2401
2362
|
);
|
|
2402
|
-
const [displayValue, setDisplayValue] =
|
|
2363
|
+
const [displayValue, setDisplayValue] = useState6(
|
|
2403
2364
|
() => value ? formatValueString(parseDate(value, format), displayFormat) : ""
|
|
2404
2365
|
);
|
|
2405
|
-
const [anchorEl, setAnchorEl] =
|
|
2366
|
+
const [anchorEl, setAnchorEl] = useState6(null);
|
|
2406
2367
|
const open = Boolean(anchorEl);
|
|
2407
|
-
|
|
2368
|
+
useEffect3(() => {
|
|
2408
2369
|
if (!anchorEl) {
|
|
2409
2370
|
innerRef.current?.blur();
|
|
2410
2371
|
}
|
|
2411
2372
|
}, [anchorEl, innerRef]);
|
|
2412
|
-
|
|
2373
|
+
useEffect3(() => {
|
|
2413
2374
|
if (value === "") {
|
|
2414
2375
|
setDisplayValue("");
|
|
2415
2376
|
return;
|
|
@@ -2420,7 +2381,7 @@ var DatePicker = forwardRef6((inProps, ref) => {
|
|
|
2420
2381
|
}
|
|
2421
2382
|
}, [displayFormat, displayValue, format, value]);
|
|
2422
2383
|
useImperativeHandle(ref, () => innerRef.current, [innerRef]);
|
|
2423
|
-
const handleChange =
|
|
2384
|
+
const handleChange = useCallback7(
|
|
2424
2385
|
(event) => {
|
|
2425
2386
|
const value2 = event.target.value;
|
|
2426
2387
|
setDisplayValue(value2 ? formatValueString(parseDate(value2, format), displayFormat) : value2);
|
|
@@ -2428,7 +2389,7 @@ var DatePicker = forwardRef6((inProps, ref) => {
|
|
|
2428
2389
|
},
|
|
2429
2390
|
[displayFormat, format, setValue]
|
|
2430
2391
|
);
|
|
2431
|
-
const handleDisplayInputChange =
|
|
2392
|
+
const handleDisplayInputChange = useCallback7(
|
|
2432
2393
|
(event) => {
|
|
2433
2394
|
if (event.target.value === "") {
|
|
2434
2395
|
handleChange({
|
|
@@ -2453,7 +2414,7 @@ var DatePicker = forwardRef6((inProps, ref) => {
|
|
|
2453
2414
|
},
|
|
2454
2415
|
[displayFormat, format, handleChange, props.name]
|
|
2455
2416
|
);
|
|
2456
|
-
const handleCalendarToggle =
|
|
2417
|
+
const handleCalendarToggle = useCallback7(
|
|
2457
2418
|
(event) => {
|
|
2458
2419
|
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
2459
2420
|
setTimeout(() => {
|
|
@@ -2462,7 +2423,7 @@ var DatePicker = forwardRef6((inProps, ref) => {
|
|
|
2462
2423
|
},
|
|
2463
2424
|
[anchorEl, setAnchorEl, innerRef]
|
|
2464
2425
|
);
|
|
2465
|
-
const handleInputMouseDown =
|
|
2426
|
+
const handleInputMouseDown = useCallback7(
|
|
2466
2427
|
(event) => {
|
|
2467
2428
|
if (inputReadOnly) {
|
|
2468
2429
|
event.preventDefault();
|
|
@@ -2471,7 +2432,7 @@ var DatePicker = forwardRef6((inProps, ref) => {
|
|
|
2471
2432
|
},
|
|
2472
2433
|
[inputReadOnly, buttonRef]
|
|
2473
2434
|
);
|
|
2474
|
-
return /* @__PURE__ */
|
|
2435
|
+
return /* @__PURE__ */ React17.createElement(DatePickerRoot, null, /* @__PURE__ */ React17.createElement(FocusTrap, { open: true }, /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(
|
|
2475
2436
|
Input_default,
|
|
2476
2437
|
{
|
|
2477
2438
|
...innerProps,
|
|
@@ -2499,7 +2460,7 @@ var DatePicker = forwardRef6((inProps, ref) => {
|
|
|
2499
2460
|
},
|
|
2500
2461
|
className,
|
|
2501
2462
|
sx,
|
|
2502
|
-
endDecorator: /* @__PURE__ */
|
|
2463
|
+
endDecorator: /* @__PURE__ */ React17.createElement(
|
|
2503
2464
|
CalendarButton,
|
|
2504
2465
|
{
|
|
2505
2466
|
ref: buttonRef,
|
|
@@ -2511,13 +2472,13 @@ var DatePicker = forwardRef6((inProps, ref) => {
|
|
|
2511
2472
|
"aria-expanded": open,
|
|
2512
2473
|
disabled
|
|
2513
2474
|
},
|
|
2514
|
-
/* @__PURE__ */
|
|
2475
|
+
/* @__PURE__ */ React17.createElement(CalendarTodayIcon, null)
|
|
2515
2476
|
),
|
|
2516
2477
|
label,
|
|
2517
2478
|
helperText,
|
|
2518
2479
|
readOnly: readOnly || inputReadOnly
|
|
2519
2480
|
}
|
|
2520
|
-
), open && /* @__PURE__ */
|
|
2481
|
+
), open && /* @__PURE__ */ React17.createElement(ClickAwayListener, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React17.createElement(
|
|
2521
2482
|
StyledPopper,
|
|
2522
2483
|
{
|
|
2523
2484
|
id: "date-picker-popper",
|
|
@@ -2536,7 +2497,7 @@ var DatePicker = forwardRef6((inProps, ref) => {
|
|
|
2536
2497
|
"aria-label": "Calendar Tooltip",
|
|
2537
2498
|
"aria-expanded": open
|
|
2538
2499
|
},
|
|
2539
|
-
/* @__PURE__ */
|
|
2500
|
+
/* @__PURE__ */ React17.createElement(CalendarSheet, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React17.createElement(
|
|
2540
2501
|
Calendar_default,
|
|
2541
2502
|
{
|
|
2542
2503
|
value: value && !Number.isNaN(parseDate(value, format).getTime()) ? [parseDate(value, format), void 0] : void 0,
|
|
@@ -2555,14 +2516,14 @@ var DatePicker = forwardRef6((inProps, ref) => {
|
|
|
2555
2516
|
disablePast,
|
|
2556
2517
|
shouldDisableDate: shouldDisableDate ? (date) => shouldDisableDate(formatValueString(date, format)) : void 0
|
|
2557
2518
|
}
|
|
2558
|
-
), !hideClearButton && /* @__PURE__ */
|
|
2519
|
+
), !hideClearButton && /* @__PURE__ */ React17.createElement(
|
|
2559
2520
|
DialogActions_default,
|
|
2560
2521
|
{
|
|
2561
2522
|
sx: {
|
|
2562
2523
|
p: 1
|
|
2563
2524
|
}
|
|
2564
2525
|
},
|
|
2565
|
-
/* @__PURE__ */
|
|
2526
|
+
/* @__PURE__ */ React17.createElement(
|
|
2566
2527
|
Button_default,
|
|
2567
2528
|
{
|
|
2568
2529
|
size,
|
|
@@ -2588,10 +2549,10 @@ var DatePicker = forwardRef6((inProps, ref) => {
|
|
|
2588
2549
|
var DatePicker_default = DatePicker;
|
|
2589
2550
|
|
|
2590
2551
|
// src/components/Textarea/Textarea.tsx
|
|
2591
|
-
import
|
|
2552
|
+
import React18 from "react";
|
|
2592
2553
|
import { Textarea as JoyTextarea } from "@mui/joy";
|
|
2593
|
-
import { motion as
|
|
2594
|
-
var MotionTextarea =
|
|
2554
|
+
import { motion as motion18 } from "framer-motion";
|
|
2555
|
+
var MotionTextarea = motion18(JoyTextarea);
|
|
2595
2556
|
var Textarea = (props) => {
|
|
2596
2557
|
const {
|
|
2597
2558
|
label,
|
|
@@ -2608,7 +2569,7 @@ var Textarea = (props) => {
|
|
|
2608
2569
|
className,
|
|
2609
2570
|
...innerProps
|
|
2610
2571
|
} = props;
|
|
2611
|
-
const textarea = /* @__PURE__ */
|
|
2572
|
+
const textarea = /* @__PURE__ */ React18.createElement(
|
|
2612
2573
|
MotionTextarea,
|
|
2613
2574
|
{
|
|
2614
2575
|
required,
|
|
@@ -2620,7 +2581,7 @@ var Textarea = (props) => {
|
|
|
2620
2581
|
...innerProps
|
|
2621
2582
|
}
|
|
2622
2583
|
);
|
|
2623
|
-
return /* @__PURE__ */
|
|
2584
|
+
return /* @__PURE__ */ React18.createElement(
|
|
2624
2585
|
FormControl_default,
|
|
2625
2586
|
{
|
|
2626
2587
|
required,
|
|
@@ -2631,9 +2592,9 @@ var Textarea = (props) => {
|
|
|
2631
2592
|
sx,
|
|
2632
2593
|
className
|
|
2633
2594
|
},
|
|
2634
|
-
label && /* @__PURE__ */
|
|
2595
|
+
label && /* @__PURE__ */ React18.createElement(FormLabel_default, null, label),
|
|
2635
2596
|
textarea,
|
|
2636
|
-
helperText && /* @__PURE__ */
|
|
2597
|
+
helperText && /* @__PURE__ */ React18.createElement(FormHelperText_default, null, helperText)
|
|
2637
2598
|
);
|
|
2638
2599
|
};
|
|
2639
2600
|
Textarea.displayName = "Textarea";
|
|
@@ -2642,10 +2603,10 @@ Textarea.displayName = "Textarea";
|
|
|
2642
2603
|
var Textarea_default = Textarea;
|
|
2643
2604
|
|
|
2644
2605
|
// src/components/Select/Select.tsx
|
|
2645
|
-
import
|
|
2606
|
+
import React19, { useMemo as useMemo7 } from "react";
|
|
2646
2607
|
import { Select as JoySelect, Option as JoyOption, ListItemContent as ListItemContent2, Typography as Typography3 } from "@mui/joy";
|
|
2647
|
-
import { motion as
|
|
2648
|
-
var MotionOption =
|
|
2608
|
+
import { motion as motion19 } from "framer-motion";
|
|
2609
|
+
var MotionOption = motion19(JoyOption);
|
|
2649
2610
|
var Option = MotionOption;
|
|
2650
2611
|
var secondaryTextLevelMap2 = {
|
|
2651
2612
|
sm: "body-xs",
|
|
@@ -2700,7 +2661,7 @@ function Select(props) {
|
|
|
2700
2661
|
});
|
|
2701
2662
|
return map;
|
|
2702
2663
|
}, [options]);
|
|
2703
|
-
const select = /* @__PURE__ */
|
|
2664
|
+
const select = /* @__PURE__ */ React19.createElement(
|
|
2704
2665
|
JoySelect,
|
|
2705
2666
|
{
|
|
2706
2667
|
...innerProps,
|
|
@@ -2717,9 +2678,9 @@ function Select(props) {
|
|
|
2717
2678
|
return optionMap.get(selected.value)?.label;
|
|
2718
2679
|
}
|
|
2719
2680
|
},
|
|
2720
|
-
options.map((option) => /* @__PURE__ */
|
|
2681
|
+
options.map((option) => /* @__PURE__ */ React19.createElement(Option, { key: option.value, value: option.value, disabled: option.disabled }, option.secondaryText ? /* @__PURE__ */ React19.createElement(ListItemContent2, { sx: { gap: 0.5 } }, /* @__PURE__ */ React19.createElement(Typography3, { level: "inherit" }, option.label), /* @__PURE__ */ React19.createElement(Typography3, { level: secondaryTextLevelMap2[size ?? "md"], textColor: "text.tertiary" }, option.secondaryText)) : option.label))
|
|
2721
2682
|
);
|
|
2722
|
-
return /* @__PURE__ */
|
|
2683
|
+
return /* @__PURE__ */ React19.createElement(
|
|
2723
2684
|
FormControl_default,
|
|
2724
2685
|
{
|
|
2725
2686
|
required,
|
|
@@ -2730,9 +2691,9 @@ function Select(props) {
|
|
|
2730
2691
|
sx,
|
|
2731
2692
|
className
|
|
2732
2693
|
},
|
|
2733
|
-
label && /* @__PURE__ */
|
|
2694
|
+
label && /* @__PURE__ */ React19.createElement(FormLabel_default, null, label),
|
|
2734
2695
|
select,
|
|
2735
|
-
helperText && /* @__PURE__ */
|
|
2696
|
+
helperText && /* @__PURE__ */ React19.createElement(FormHelperText_default, null, helperText)
|
|
2736
2697
|
);
|
|
2737
2698
|
}
|
|
2738
2699
|
Select.displayName = "Select";
|
|
@@ -2743,6 +2704,19 @@ var Select_default = Select;
|
|
|
2743
2704
|
// src/components/DataTable/components.tsx
|
|
2744
2705
|
import { Link } from "@mui/joy";
|
|
2745
2706
|
|
|
2707
|
+
// src/components/Tooltip/Tooltip.tsx
|
|
2708
|
+
import React20 from "react";
|
|
2709
|
+
import { Tooltip as JoyTooltip } from "@mui/joy";
|
|
2710
|
+
import { motion as motion20 } from "framer-motion";
|
|
2711
|
+
var MotionTooltip = motion20(JoyTooltip);
|
|
2712
|
+
var Tooltip = (props) => {
|
|
2713
|
+
return /* @__PURE__ */ React20.createElement(MotionTooltip, { ...props });
|
|
2714
|
+
};
|
|
2715
|
+
Tooltip.displayName = "Tooltip";
|
|
2716
|
+
|
|
2717
|
+
// src/components/Tooltip/index.ts
|
|
2718
|
+
var Tooltip_default = Tooltip;
|
|
2719
|
+
|
|
2746
2720
|
// src/components/InfoSign/InfoSign.tsx
|
|
2747
2721
|
import React21 from "react";
|
|
2748
2722
|
import { styled as styled11, tooltipClasses } from "@mui/joy";
|
|
@@ -2778,8 +2752,8 @@ var InfoSign_default = InfoSign;
|
|
|
2778
2752
|
|
|
2779
2753
|
// src/components/DataTable/components.tsx
|
|
2780
2754
|
var TextEllipsis = ({ children }) => {
|
|
2781
|
-
const textRef =
|
|
2782
|
-
const [showTooltip, setShowTooltip] =
|
|
2755
|
+
const textRef = useRef4(null);
|
|
2756
|
+
const [showTooltip, setShowTooltip] = useState7(false);
|
|
2783
2757
|
useLayoutEffect(() => {
|
|
2784
2758
|
const element = textRef.current;
|
|
2785
2759
|
if (element) {
|
|
@@ -2794,8 +2768,8 @@ var TextEllipsis = ({ children }) => {
|
|
|
2794
2768
|
return content;
|
|
2795
2769
|
};
|
|
2796
2770
|
var CellTextEllipsis = ({ children }) => {
|
|
2797
|
-
const textRef =
|
|
2798
|
-
const [showTooltip, setShowTooltip] =
|
|
2771
|
+
const textRef = useRef4(null);
|
|
2772
|
+
const [showTooltip, setShowTooltip] = useState7(false);
|
|
2799
2773
|
useLayoutEffect(() => {
|
|
2800
2774
|
const element = textRef.current;
|
|
2801
2775
|
if (element) {
|
|
@@ -2847,7 +2821,7 @@ var HeadCell = (props) => {
|
|
|
2847
2821
|
const theme = useTheme();
|
|
2848
2822
|
const ref = headerRef;
|
|
2849
2823
|
const colRef = tableColRef;
|
|
2850
|
-
const [isHovered, setIsHovered] =
|
|
2824
|
+
const [isHovered, setIsHovered] = useState7(false);
|
|
2851
2825
|
const sortable = type === "actions" ? false : _sortable;
|
|
2852
2826
|
const headId = useMemo8(
|
|
2853
2827
|
() => `${tableId}_header_${headerName ?? field}`.trim(),
|
|
@@ -2926,7 +2900,7 @@ var HeadCell = (props) => {
|
|
|
2926
2900
|
ref,
|
|
2927
2901
|
key: field,
|
|
2928
2902
|
style,
|
|
2929
|
-
onClick:
|
|
2903
|
+
onClick: useCallback8(
|
|
2930
2904
|
(e) => sortable && onSortChange?.({ field, currentSort: sort, multiple: e.shiftKey }),
|
|
2931
2905
|
[field, onSortChange, sort, sortable]
|
|
2932
2906
|
),
|
|
@@ -2961,8 +2935,8 @@ var BodyCell = (props) => {
|
|
|
2961
2935
|
onCellEditStop
|
|
2962
2936
|
} = props;
|
|
2963
2937
|
const theme = useTheme();
|
|
2964
|
-
const [value, setValue] =
|
|
2965
|
-
const cellRef =
|
|
2938
|
+
const [value, setValue] = useState7(row[field]);
|
|
2939
|
+
const cellRef = useRef4(null);
|
|
2966
2940
|
const params = useMemo8(
|
|
2967
2941
|
() => ({
|
|
2968
2942
|
row,
|
|
@@ -3107,7 +3081,7 @@ var BodyCell = (props) => {
|
|
|
3107
3081
|
() => (typeof cellClassName === "function" ? cellClassName(params) : cellClassName) || "",
|
|
3108
3082
|
[cellClassName, params]
|
|
3109
3083
|
);
|
|
3110
|
-
|
|
3084
|
+
useEffect4(() => {
|
|
3111
3085
|
setValue(row[field]);
|
|
3112
3086
|
}, [row, field]);
|
|
3113
3087
|
return /* @__PURE__ */ React22.createElement(
|
|
@@ -3177,10 +3151,10 @@ var VirtualizedTableRow = memo(StyledTableRow2, (prevProps, nextProps) => {
|
|
|
3177
3151
|
});
|
|
3178
3152
|
|
|
3179
3153
|
// src/components/DataTable/hooks.ts
|
|
3180
|
-
import { useState as
|
|
3154
|
+
import { useState as useState8, useLayoutEffect as useLayoutEffect2, useRef as useRef5, useMemo as useMemo9, useCallback as useCallback9, useEffect as useEffect5, createRef } from "react";
|
|
3181
3155
|
function useColumnWidths(columnsByField) {
|
|
3182
|
-
const [widths, setWidths] =
|
|
3183
|
-
const roRef =
|
|
3156
|
+
const [widths, setWidths] = useState8({});
|
|
3157
|
+
const roRef = useRef5();
|
|
3184
3158
|
useLayoutEffect2(() => {
|
|
3185
3159
|
if (roRef.current) roRef.current.disconnect();
|
|
3186
3160
|
roRef.current = new ResizeObserver((entries) => {
|
|
@@ -3235,14 +3209,14 @@ function useDataTableRenderer({
|
|
|
3235
3209
|
"You cannot use both `pinnedColumns` and `columnGroupingModel` at the same time. Please choose one of them."
|
|
3236
3210
|
);
|
|
3237
3211
|
}
|
|
3238
|
-
const onSelectionModelChangeRef =
|
|
3212
|
+
const onSelectionModelChangeRef = useRef5(onSelectionModelChange);
|
|
3239
3213
|
onSelectionModelChangeRef.current = onSelectionModelChange;
|
|
3240
|
-
const [focusedRowId, setFocusedRowId] =
|
|
3241
|
-
const [selectionAnchor, setSelectionAnchor] =
|
|
3214
|
+
const [focusedRowId, setFocusedRowId] = useState8(null);
|
|
3215
|
+
const [selectionAnchor, setSelectionAnchor] = useState8(null);
|
|
3242
3216
|
const [sortModel, setSortModel] = useControlledState(
|
|
3243
3217
|
controlledSortModel,
|
|
3244
3218
|
initialState?.sorting?.sortModel ?? [],
|
|
3245
|
-
|
|
3219
|
+
useCallback9((sortModel2) => onSortModelChange?.(sortModel2), [onSortModelChange])
|
|
3246
3220
|
);
|
|
3247
3221
|
const reorderedColumns = useMemo9(() => {
|
|
3248
3222
|
if (!columnGroupingModel) return columnsProp;
|
|
@@ -3262,7 +3236,7 @@ function useDataTableRenderer({
|
|
|
3262
3236
|
),
|
|
3263
3237
|
[reorderedColumns]
|
|
3264
3238
|
);
|
|
3265
|
-
const sortComparator =
|
|
3239
|
+
const sortComparator = useCallback9(
|
|
3266
3240
|
(rowA, rowB) => {
|
|
3267
3241
|
for (const sort of sortModel) {
|
|
3268
3242
|
const { field, sort: direction } = sort;
|
|
@@ -3298,9 +3272,9 @@ function useDataTableRenderer({
|
|
|
3298
3272
|
() => Array.from(new Set(_sortOrder || ["asc", "desc", null])),
|
|
3299
3273
|
[_sortOrder]
|
|
3300
3274
|
);
|
|
3301
|
-
const [page, setPage] =
|
|
3275
|
+
const [page, setPage] = useState8(paginationModel?.page || 1);
|
|
3302
3276
|
const pageSize = paginationModel?.pageSize || 20;
|
|
3303
|
-
const getId =
|
|
3277
|
+
const getId = useCallback9(
|
|
3304
3278
|
(row, index) => _getId?.(row) ?? row.id ?? `${(index || 0) + (page - 1) * pageSize}`,
|
|
3305
3279
|
[_getId, page, pageSize]
|
|
3306
3280
|
);
|
|
@@ -3316,7 +3290,7 @@ function useDataTableRenderer({
|
|
|
3316
3290
|
}),
|
|
3317
3291
|
[dataInPage, isRowSelectable, getId]
|
|
3318
3292
|
);
|
|
3319
|
-
const handleRangeSelection =
|
|
3293
|
+
const handleRangeSelection = useCallback9(
|
|
3320
3294
|
(anchor, targetIndex) => {
|
|
3321
3295
|
const startIndex = Math.min(anchor.rowIndex, targetIndex);
|
|
3322
3296
|
const endIndex = Math.max(anchor.rowIndex, targetIndex);
|
|
@@ -3353,7 +3327,7 @@ function useDataTableRenderer({
|
|
|
3353
3327
|
[_isTotalSelected, selectionModel, selectableRowCount]
|
|
3354
3328
|
);
|
|
3355
3329
|
const columnWidths = useColumnWidths(columnsByField);
|
|
3356
|
-
const getWidth =
|
|
3330
|
+
const getWidth = useCallback9(
|
|
3357
3331
|
(f) => columnWidths[f] ?? columnsByField[f].width ?? // Column prop 으로 지정된 width
|
|
3358
3332
|
columnsByField[f].minWidth ?? 0,
|
|
3359
3333
|
[columnWidths, columnsByField]
|
|
@@ -3395,14 +3369,14 @@ function useDataTableRenderer({
|
|
|
3395
3369
|
sortOrder,
|
|
3396
3370
|
getWidth
|
|
3397
3371
|
]);
|
|
3398
|
-
const handlePageChange =
|
|
3372
|
+
const handlePageChange = useCallback9(
|
|
3399
3373
|
(newPage) => {
|
|
3400
3374
|
setPage(newPage);
|
|
3401
3375
|
onPaginationModelChange?.({ page: newPage, pageSize });
|
|
3402
3376
|
},
|
|
3403
3377
|
[onPaginationModelChange, pageSize]
|
|
3404
3378
|
);
|
|
3405
|
-
const handleSortChange =
|
|
3379
|
+
const handleSortChange = useCallback9(
|
|
3406
3380
|
(props) => {
|
|
3407
3381
|
const { field, currentSort, multiple } = props;
|
|
3408
3382
|
const column = columnsByField[field];
|
|
@@ -3425,23 +3399,23 @@ function useDataTableRenderer({
|
|
|
3425
3399
|
},
|
|
3426
3400
|
[sortOrder, columnsByField, sortModel, setSortModel]
|
|
3427
3401
|
);
|
|
3428
|
-
|
|
3402
|
+
useEffect5(() => {
|
|
3429
3403
|
if (!paginationModel) {
|
|
3430
3404
|
handlePageChange(1);
|
|
3431
3405
|
}
|
|
3432
3406
|
}, [rowCount, handlePageChange, paginationModel]);
|
|
3433
|
-
|
|
3407
|
+
useEffect5(() => {
|
|
3434
3408
|
const lastPage = Math.max(1, Math.ceil(rowCount / pageSize));
|
|
3435
3409
|
if (page > lastPage) {
|
|
3436
3410
|
handlePageChange(lastPage);
|
|
3437
3411
|
}
|
|
3438
3412
|
}, [page, rowCount, pageSize, handlePageChange]);
|
|
3439
|
-
|
|
3413
|
+
useEffect5(() => {
|
|
3440
3414
|
onSelectionModelChangeRef.current?.([]);
|
|
3441
3415
|
setSelectionAnchor(null);
|
|
3442
3416
|
}, [page]);
|
|
3443
|
-
const prevRowsRef =
|
|
3444
|
-
|
|
3417
|
+
const prevRowsRef = useRef5(_rows);
|
|
3418
|
+
useEffect5(() => {
|
|
3445
3419
|
if (prevRowsRef.current !== _rows) {
|
|
3446
3420
|
setSelectionAnchor(null);
|
|
3447
3421
|
prevRowsRef.current = _rows;
|
|
@@ -3460,8 +3434,8 @@ function useDataTableRenderer({
|
|
|
3460
3434
|
handleSortChange,
|
|
3461
3435
|
isAllSelected,
|
|
3462
3436
|
isTotalSelected,
|
|
3463
|
-
isSelectedRow:
|
|
3464
|
-
isRowSelectable:
|
|
3437
|
+
isSelectedRow: useCallback9((model) => selectedModelSet.has(model), [selectedModelSet]),
|
|
3438
|
+
isRowSelectable: useCallback9(
|
|
3465
3439
|
(rowId, row) => {
|
|
3466
3440
|
if (!isRowSelectable) return true;
|
|
3467
3441
|
return isRowSelectable({ row, id: rowId });
|
|
@@ -3469,13 +3443,13 @@ function useDataTableRenderer({
|
|
|
3469
3443
|
[isRowSelectable]
|
|
3470
3444
|
),
|
|
3471
3445
|
focusedRowId,
|
|
3472
|
-
onRowFocus:
|
|
3446
|
+
onRowFocus: useCallback9((rowId) => {
|
|
3473
3447
|
setFocusedRowId(rowId);
|
|
3474
3448
|
}, []),
|
|
3475
|
-
onAllCheckboxChange:
|
|
3449
|
+
onAllCheckboxChange: useCallback9(() => {
|
|
3476
3450
|
onSelectionModelChange?.(isAllSelected ? [] : selectableDataInPage.map(getId));
|
|
3477
3451
|
}, [isAllSelected, selectableDataInPage, onSelectionModelChange, getId]),
|
|
3478
|
-
onCheckboxChange:
|
|
3452
|
+
onCheckboxChange: useCallback9(
|
|
3479
3453
|
(event, selectedModel) => {
|
|
3480
3454
|
const isShiftClick = "shiftKey" in event && event.shiftKey;
|
|
3481
3455
|
const rowIndex = dataInPage.findIndex((row, i) => getId(row, i) === selectedModel);
|
|
@@ -3508,7 +3482,7 @@ function useDataTableRenderer({
|
|
|
3508
3482
|
),
|
|
3509
3483
|
columns,
|
|
3510
3484
|
processedColumnGroups,
|
|
3511
|
-
onTotalSelect:
|
|
3485
|
+
onTotalSelect: useCallback9(() => {
|
|
3512
3486
|
const selectableRows = rows.filter((row, i) => {
|
|
3513
3487
|
if (!isRowSelectable) return true;
|
|
3514
3488
|
return isRowSelectable({ row, id: getId(row, i) });
|
|
@@ -3593,7 +3567,7 @@ function TableBody(props) {
|
|
|
3593
3567
|
TableBody.displayName = "TableBody";
|
|
3594
3568
|
|
|
3595
3569
|
// src/components/Pagination/Pagination.tsx
|
|
3596
|
-
import React24, { useCallback as
|
|
3570
|
+
import React24, { useCallback as useCallback10, useEffect as useEffect6 } from "react";
|
|
3597
3571
|
import PreviousIcon from "@mui/icons-material/ChevronLeftRounded";
|
|
3598
3572
|
import NextIcon from "@mui/icons-material/ChevronRightRounded";
|
|
3599
3573
|
import FirstPageIcon from "@mui/icons-material/FirstPageRounded";
|
|
@@ -3662,7 +3636,7 @@ function Pagination(props) {
|
|
|
3662
3636
|
const [paginationModel, setPaginationModel] = useControlledState(
|
|
3663
3637
|
_paginationModel,
|
|
3664
3638
|
defaultPaginationModel,
|
|
3665
|
-
|
|
3639
|
+
useCallback10(
|
|
3666
3640
|
(newPage) => {
|
|
3667
3641
|
onPageChange(newPage.page);
|
|
3668
3642
|
},
|
|
@@ -3678,7 +3652,7 @@ function Pagination(props) {
|
|
|
3678
3652
|
const afterPages = [paginationModel.page + 1, paginationModel.page + 2].filter((p) => p <= lastPage - 1);
|
|
3679
3653
|
const isMoreAfterPages = lastPage > 1 && paginationModel.page < lastPage - 3;
|
|
3680
3654
|
const isMoreBeforePages = lastPage > 1 && paginationModel.page > 4;
|
|
3681
|
-
|
|
3655
|
+
useEffect6(() => {
|
|
3682
3656
|
if (paginationModel.page > lastPage) {
|
|
3683
3657
|
setPaginationModel({ ...paginationModel, page: lastPage });
|
|
3684
3658
|
}
|
|
@@ -3861,8 +3835,8 @@ function Component(props, apiRef) {
|
|
|
3861
3835
|
...innerProps
|
|
3862
3836
|
} = props;
|
|
3863
3837
|
const tableId = useId();
|
|
3864
|
-
const parentRef =
|
|
3865
|
-
const tableBodyRef =
|
|
3838
|
+
const parentRef = useRef6(null);
|
|
3839
|
+
const tableBodyRef = useRef6(null);
|
|
3866
3840
|
const {
|
|
3867
3841
|
columns,
|
|
3868
3842
|
processedColumnGroups,
|
|
@@ -3899,20 +3873,20 @@ function Component(props, apiRef) {
|
|
|
3899
3873
|
const paginationModel = useMemo10(() => ({ page, pageSize }), [page, pageSize]);
|
|
3900
3874
|
const totalSize = virtualizer.getTotalSize();
|
|
3901
3875
|
const virtualizedItems = virtualizer.getVirtualItems();
|
|
3902
|
-
const getRowClickHandler =
|
|
3876
|
+
const getRowClickHandler = useCallback11(
|
|
3903
3877
|
(row, rowId) => (e) => {
|
|
3904
3878
|
onRowClick?.({ row, rowId }, e);
|
|
3905
3879
|
checkboxSelection && !disableSelectionOnClick && isRowSelectableCheck(rowId, row) && onCheckboxChange(e, rowId);
|
|
3906
3880
|
},
|
|
3907
3881
|
[onRowClick, checkboxSelection, disableSelectionOnClick, onCheckboxChange, isRowSelectableCheck]
|
|
3908
3882
|
);
|
|
3909
|
-
const getRowFocusHandler =
|
|
3883
|
+
const getRowFocusHandler = useCallback11(
|
|
3910
3884
|
(rowId) => () => {
|
|
3911
3885
|
onRowFocus(rowId);
|
|
3912
3886
|
},
|
|
3913
3887
|
[onRowFocus]
|
|
3914
3888
|
);
|
|
3915
|
-
const getCheckboxClickHandler =
|
|
3889
|
+
const getCheckboxClickHandler = useCallback11(
|
|
3916
3890
|
(rowId, row) => (e) => {
|
|
3917
3891
|
e.stopPropagation();
|
|
3918
3892
|
if (isRowSelectableCheck(rowId, row)) {
|
|
@@ -3922,7 +3896,7 @@ function Component(props, apiRef) {
|
|
|
3922
3896
|
},
|
|
3923
3897
|
[onCheckboxChange, isRowSelectableCheck, onRowFocus]
|
|
3924
3898
|
);
|
|
3925
|
-
const handleTableKeyDown =
|
|
3899
|
+
const handleTableKeyDown = useCallback11(
|
|
3926
3900
|
(e) => {
|
|
3927
3901
|
const supportedKeys = ["ArrowUp", "ArrowDown", " ", "Home", "End", "PageUp", "PageDown"];
|
|
3928
3902
|
if (!supportedKeys.includes(e.key)) return;
|
|
@@ -4264,7 +4238,7 @@ var DataTable = forwardRef7(Component);
|
|
|
4264
4238
|
DataTable.displayName = "DataTable";
|
|
4265
4239
|
|
|
4266
4240
|
// src/components/DateRangePicker/DateRangePicker.tsx
|
|
4267
|
-
import React26, { forwardRef as forwardRef8, useCallback as
|
|
4241
|
+
import React26, { forwardRef as forwardRef8, useCallback as useCallback12, useEffect as useEffect7, useImperativeHandle as useImperativeHandle3, useMemo as useMemo11, useRef as useRef7, useState as useState9 } from "react";
|
|
4268
4242
|
import { IMaskInput as IMaskInput2, IMask as IMask2 } from "react-imask";
|
|
4269
4243
|
import CalendarTodayIcon2 from "@mui/icons-material/CalendarToday";
|
|
4270
4244
|
import { styled as styled14, useThemeProps as useThemeProps5 } from "@mui/joy";
|
|
@@ -4425,23 +4399,23 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
|
|
|
4425
4399
|
readOnly,
|
|
4426
4400
|
...innerProps
|
|
4427
4401
|
} = props;
|
|
4428
|
-
const innerRef =
|
|
4429
|
-
const buttonRef =
|
|
4402
|
+
const innerRef = useRef7(null);
|
|
4403
|
+
const buttonRef = useRef7(null);
|
|
4430
4404
|
const [value, setValue] = useControlledState(
|
|
4431
4405
|
props.value,
|
|
4432
4406
|
props.defaultValue || "",
|
|
4433
|
-
|
|
4407
|
+
useCallback12((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
|
|
4434
4408
|
);
|
|
4435
|
-
const [displayValue, setDisplayValue] =
|
|
4409
|
+
const [displayValue, setDisplayValue] = useState9(
|
|
4436
4410
|
() => value ? formatValueString2(parseDates(value, format), displayFormat) : ""
|
|
4437
4411
|
);
|
|
4438
|
-
const [anchorEl, setAnchorEl] =
|
|
4412
|
+
const [anchorEl, setAnchorEl] = useState9(null);
|
|
4439
4413
|
const open = Boolean(anchorEl);
|
|
4440
4414
|
const calendarValue = useMemo11(
|
|
4441
4415
|
() => value ? parseDates(value, format) : void 0,
|
|
4442
4416
|
[value, format]
|
|
4443
4417
|
);
|
|
4444
|
-
|
|
4418
|
+
useEffect7(() => {
|
|
4445
4419
|
if (value) {
|
|
4446
4420
|
try {
|
|
4447
4421
|
const dates = parseDates(value, format);
|
|
@@ -4453,13 +4427,13 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
|
|
|
4453
4427
|
setDisplayValue("");
|
|
4454
4428
|
}
|
|
4455
4429
|
}, [displayFormat, value, format]);
|
|
4456
|
-
|
|
4430
|
+
useEffect7(() => {
|
|
4457
4431
|
if (!anchorEl) {
|
|
4458
4432
|
innerRef.current?.blur();
|
|
4459
4433
|
}
|
|
4460
4434
|
}, [anchorEl, innerRef]);
|
|
4461
4435
|
useImperativeHandle3(ref, () => innerRef.current, [innerRef]);
|
|
4462
|
-
const handleChange =
|
|
4436
|
+
const handleChange = useCallback12(
|
|
4463
4437
|
(event) => {
|
|
4464
4438
|
const value2 = event.target.value;
|
|
4465
4439
|
setDisplayValue(value2 ? formatValueString2(parseDates(value2, format), displayFormat) : value2);
|
|
@@ -4467,7 +4441,7 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
|
|
|
4467
4441
|
},
|
|
4468
4442
|
[displayFormat, format, setValue]
|
|
4469
4443
|
);
|
|
4470
|
-
const handleDisplayInputChange =
|
|
4444
|
+
const handleDisplayInputChange = useCallback12(
|
|
4471
4445
|
(event) => {
|
|
4472
4446
|
if (event.target.value === "") {
|
|
4473
4447
|
handleChange({
|
|
@@ -4492,14 +4466,14 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
|
|
|
4492
4466
|
},
|
|
4493
4467
|
[displayFormat, format, handleChange, props.name]
|
|
4494
4468
|
);
|
|
4495
|
-
const handleCalendarToggle =
|
|
4469
|
+
const handleCalendarToggle = useCallback12(
|
|
4496
4470
|
(event) => {
|
|
4497
4471
|
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
4498
4472
|
innerRef.current?.focus();
|
|
4499
4473
|
},
|
|
4500
4474
|
[anchorEl, setAnchorEl, innerRef]
|
|
4501
4475
|
);
|
|
4502
|
-
const handleCalendarChange =
|
|
4476
|
+
const handleCalendarChange = useCallback12(
|
|
4503
4477
|
([date1, date2]) => {
|
|
4504
4478
|
if (!date1 || !date2) return;
|
|
4505
4479
|
const formattedValue = formatValueString2([date1, date2], format);
|
|
@@ -4513,7 +4487,7 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
|
|
|
4513
4487
|
},
|
|
4514
4488
|
[props.value, props.name, onChange, setValue, setAnchorEl, format, displayFormat]
|
|
4515
4489
|
);
|
|
4516
|
-
const handleInputMouseDown =
|
|
4490
|
+
const handleInputMouseDown = useCallback12(
|
|
4517
4491
|
(event) => {
|
|
4518
4492
|
if (inputReadOnly) {
|
|
4519
4493
|
event.preventDefault();
|
|
@@ -4722,13 +4696,13 @@ var InsetDrawer = styled19(JoyDrawer)(({ theme }) => ({
|
|
|
4722
4696
|
}));
|
|
4723
4697
|
|
|
4724
4698
|
// src/components/FilterableCheckboxGroup/FilterableCheckboxGroup.tsx
|
|
4725
|
-
import React30, { useCallback as
|
|
4699
|
+
import React30, { useCallback as useCallback13, useEffect as useEffect8, useMemo as useMemo12, useRef as useRef8, useState as useState10 } from "react";
|
|
4726
4700
|
import SearchIcon from "@mui/icons-material/Search";
|
|
4727
4701
|
import { useVirtualizer as useVirtualizer3 } from "@tanstack/react-virtual";
|
|
4728
4702
|
function LabelWithTooltip(props) {
|
|
4729
4703
|
const { label, size } = props;
|
|
4730
|
-
const labelContentRef =
|
|
4731
|
-
const [isOverflowing, setIsOverflowing] =
|
|
4704
|
+
const labelContentRef = useRef8(null);
|
|
4705
|
+
const [isOverflowing, setIsOverflowing] = useState10(false);
|
|
4732
4706
|
const labelContent = /* @__PURE__ */ React30.createElement(
|
|
4733
4707
|
"span",
|
|
4734
4708
|
{
|
|
@@ -4745,7 +4719,7 @@ function LabelWithTooltip(props) {
|
|
|
4745
4719
|
},
|
|
4746
4720
|
label
|
|
4747
4721
|
);
|
|
4748
|
-
|
|
4722
|
+
useEffect8(() => {
|
|
4749
4723
|
const element = labelContentRef.current;
|
|
4750
4724
|
if (element) {
|
|
4751
4725
|
setIsOverflowing(element.scrollWidth > element.clientWidth);
|
|
@@ -4769,16 +4743,16 @@ function FilterableCheckboxGroup(props) {
|
|
|
4769
4743
|
maxHeight = 300,
|
|
4770
4744
|
disabled
|
|
4771
4745
|
} = props;
|
|
4772
|
-
const [searchTerm, setSearchTerm] =
|
|
4773
|
-
const [sortedOptions, setSortedOptions] =
|
|
4746
|
+
const [searchTerm, setSearchTerm] = useState10("");
|
|
4747
|
+
const [sortedOptions, setSortedOptions] = useState10(options);
|
|
4774
4748
|
const [internalValue, setInternalValue] = useControlledState(
|
|
4775
4749
|
value,
|
|
4776
4750
|
value ?? [],
|
|
4777
|
-
|
|
4751
|
+
useCallback13((newValue) => onChange?.(newValue), [onChange])
|
|
4778
4752
|
);
|
|
4779
|
-
const parentRef =
|
|
4780
|
-
const isInitialSortRef =
|
|
4781
|
-
const prevOptionsRef =
|
|
4753
|
+
const parentRef = useRef8(null);
|
|
4754
|
+
const isInitialSortRef = useRef8(false);
|
|
4755
|
+
const prevOptionsRef = useRef8([...options]);
|
|
4782
4756
|
const filteredOptions = useMemo12(() => {
|
|
4783
4757
|
if (!searchTerm) return sortedOptions;
|
|
4784
4758
|
return sortedOptions.filter((option) => option.label.toLowerCase().includes(searchTerm.toLowerCase()));
|
|
@@ -4801,7 +4775,7 @@ function FilterableCheckboxGroup(props) {
|
|
|
4801
4775
|
overscan: 5
|
|
4802
4776
|
});
|
|
4803
4777
|
const items = virtualizer.getVirtualItems();
|
|
4804
|
-
|
|
4778
|
+
useEffect8(() => {
|
|
4805
4779
|
const optionsChanged = prevOptionsRef.current.length !== options.length || prevOptionsRef.current.some(
|
|
4806
4780
|
(prevOption, index) => prevOption.value !== options[index]?.value || prevOption.label !== options[index]?.label || prevOption.disabled !== options[index]?.disabled
|
|
4807
4781
|
);
|
|
@@ -4827,13 +4801,13 @@ function FilterableCheckboxGroup(props) {
|
|
|
4827
4801
|
}
|
|
4828
4802
|
}
|
|
4829
4803
|
}, [options, value]);
|
|
4830
|
-
|
|
4804
|
+
useEffect8(() => {
|
|
4831
4805
|
virtualizer.measure();
|
|
4832
4806
|
}, [virtualizer, filteredOptions, size]);
|
|
4833
|
-
const handleSearchChange =
|
|
4807
|
+
const handleSearchChange = useCallback13((event) => {
|
|
4834
4808
|
setSearchTerm(event.target.value);
|
|
4835
4809
|
}, []);
|
|
4836
|
-
const handleCheckboxChange =
|
|
4810
|
+
const handleCheckboxChange = useCallback13(
|
|
4837
4811
|
(optionValue) => (event) => {
|
|
4838
4812
|
const checked = event.target.checked;
|
|
4839
4813
|
const newValue = checked ? [...internalValue, optionValue] : internalValue.filter((v) => v !== optionValue);
|
|
@@ -4841,7 +4815,7 @@ function FilterableCheckboxGroup(props) {
|
|
|
4841
4815
|
},
|
|
4842
4816
|
[internalValue, setInternalValue]
|
|
4843
4817
|
);
|
|
4844
|
-
const handleSelectAll =
|
|
4818
|
+
const handleSelectAll = useCallback13(
|
|
4845
4819
|
(event) => {
|
|
4846
4820
|
const checked = event.target.checked;
|
|
4847
4821
|
const enabledOptions = filteredOptions.filter((option) => !option.disabled);
|
|
@@ -4945,16 +4919,16 @@ function FilterableCheckboxGroup(props) {
|
|
|
4945
4919
|
FilterableCheckboxGroup.displayName = "FilterableCheckboxGroup";
|
|
4946
4920
|
|
|
4947
4921
|
// src/components/FilterMenu/FilterMenu.tsx
|
|
4948
|
-
import React41, { useCallback as
|
|
4922
|
+
import React41, { useCallback as useCallback23 } from "react";
|
|
4949
4923
|
import { Button as Button2, Stack as Stack11 } from "@mui/joy";
|
|
4950
4924
|
|
|
4951
4925
|
// src/components/FilterMenu/components/CheckboxGroup.tsx
|
|
4952
|
-
import React31, { useCallback as
|
|
4926
|
+
import React31, { useCallback as useCallback14 } from "react";
|
|
4953
4927
|
import { Stack as Stack2 } from "@mui/joy";
|
|
4954
4928
|
function CheckboxGroup(props) {
|
|
4955
4929
|
const { id, label, options, value, onChange, hidden } = props;
|
|
4956
4930
|
const [internalValue, setInternalValue] = useControlledState(value, [], onChange);
|
|
4957
|
-
const handleCheckboxChange =
|
|
4931
|
+
const handleCheckboxChange = useCallback14(
|
|
4958
4932
|
(optionValue) => (event) => {
|
|
4959
4933
|
const checked = event.target.checked;
|
|
4960
4934
|
let newValue;
|
|
@@ -4983,12 +4957,12 @@ function CheckboxGroup(props) {
|
|
|
4983
4957
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
4984
4958
|
|
|
4985
4959
|
// src/components/FilterMenu/components/FilterableCheckboxGroup.tsx
|
|
4986
|
-
import React32, { useCallback as
|
|
4960
|
+
import React32, { useCallback as useCallback15 } from "react";
|
|
4987
4961
|
import { Stack as Stack3 } from "@mui/joy";
|
|
4988
4962
|
function FilterableCheckboxGroup2(props) {
|
|
4989
4963
|
const { id, label, options, value, onChange, hidden, placeholder, maxHeight } = props;
|
|
4990
4964
|
const [internalValue, setInternalValue] = useControlledState(value, [], onChange);
|
|
4991
|
-
const handleChange =
|
|
4965
|
+
const handleChange = useCallback15(
|
|
4992
4966
|
(newValue) => {
|
|
4993
4967
|
setInternalValue(newValue);
|
|
4994
4968
|
},
|
|
@@ -5012,7 +4986,7 @@ function FilterableCheckboxGroup2(props) {
|
|
|
5012
4986
|
FilterableCheckboxGroup2.displayName = "FilterableCheckboxGroup";
|
|
5013
4987
|
|
|
5014
4988
|
// src/components/FilterMenu/components/RadioGroup.tsx
|
|
5015
|
-
import React33, { useCallback as
|
|
4989
|
+
import React33, { useCallback as useCallback16 } from "react";
|
|
5016
4990
|
|
|
5017
4991
|
// src/components/Radio/Radio.tsx
|
|
5018
4992
|
import { Radio as JoyRadio, RadioGroup as JoyRadioGroup } from "@mui/joy";
|
|
@@ -5029,7 +5003,7 @@ import { Stack as Stack4 } from "@mui/joy";
|
|
|
5029
5003
|
function RadioGroup2(props) {
|
|
5030
5004
|
const { id, label, options, value, onChange, hidden } = props;
|
|
5031
5005
|
const [internalValue, setInternalValue] = useControlledState(value, value ?? "", onChange);
|
|
5032
|
-
const handleRadioChange =
|
|
5006
|
+
const handleRadioChange = useCallback16(
|
|
5033
5007
|
(event) => {
|
|
5034
5008
|
const newValue = event.target.value;
|
|
5035
5009
|
const option = options.find((opt) => opt.value.toString() === newValue);
|
|
@@ -5046,7 +5020,7 @@ function RadioGroup2(props) {
|
|
|
5046
5020
|
RadioGroup2.displayName = "RadioGroup";
|
|
5047
5021
|
|
|
5048
5022
|
// src/components/FilterMenu/components/DateRange.tsx
|
|
5049
|
-
import React34, { useCallback as
|
|
5023
|
+
import React34, { useCallback as useCallback17, useMemo as useMemo13, useState as useState11, useEffect as useEffect9 } from "react";
|
|
5050
5024
|
import { Stack as Stack5 } from "@mui/joy";
|
|
5051
5025
|
function DateRange(props) {
|
|
5052
5026
|
const {
|
|
@@ -5064,7 +5038,7 @@ function DateRange(props) {
|
|
|
5064
5038
|
hideClearButton
|
|
5065
5039
|
} = props;
|
|
5066
5040
|
const [internalValue, setInternalValue] = useControlledState(value, null, onChange);
|
|
5067
|
-
const [selectedOption, setSelectedOption] =
|
|
5041
|
+
const [selectedOption, setSelectedOption] = useState11("all-time");
|
|
5068
5042
|
const dateRangeOptions = useMemo13(
|
|
5069
5043
|
() => [
|
|
5070
5044
|
{ label: "All Time", value: "all-time" },
|
|
@@ -5075,7 +5049,7 @@ function DateRange(props) {
|
|
|
5075
5049
|
],
|
|
5076
5050
|
[]
|
|
5077
5051
|
);
|
|
5078
|
-
const getDateRangeForOption =
|
|
5052
|
+
const getDateRangeForOption = useCallback17(
|
|
5079
5053
|
(option) => {
|
|
5080
5054
|
const now = /* @__PURE__ */ new Date();
|
|
5081
5055
|
const currentYear = now.getFullYear();
|
|
@@ -5114,7 +5088,7 @@ function DateRange(props) {
|
|
|
5114
5088
|
},
|
|
5115
5089
|
[internalValue]
|
|
5116
5090
|
);
|
|
5117
|
-
const determineOptionFromValue =
|
|
5091
|
+
const determineOptionFromValue = useCallback17(
|
|
5118
5092
|
(value2) => {
|
|
5119
5093
|
if (!value2) {
|
|
5120
5094
|
return "all-time";
|
|
@@ -5136,11 +5110,11 @@ function DateRange(props) {
|
|
|
5136
5110
|
}
|
|
5137
5111
|
return "";
|
|
5138
5112
|
}, [selectedOption, internalValue]);
|
|
5139
|
-
|
|
5113
|
+
useEffect9(() => {
|
|
5140
5114
|
const newOption = determineOptionFromValue(internalValue);
|
|
5141
5115
|
setSelectedOption(newOption);
|
|
5142
5116
|
}, [internalValue, determineOptionFromValue]);
|
|
5143
|
-
const handleOptionChange =
|
|
5117
|
+
const handleOptionChange = useCallback17(
|
|
5144
5118
|
(event) => {
|
|
5145
5119
|
const newOption = event.target.value;
|
|
5146
5120
|
setSelectedOption(newOption);
|
|
@@ -5149,7 +5123,7 @@ function DateRange(props) {
|
|
|
5149
5123
|
},
|
|
5150
5124
|
[getDateRangeForOption, setInternalValue]
|
|
5151
5125
|
);
|
|
5152
|
-
const handleCustomDateChange =
|
|
5126
|
+
const handleCustomDateChange = useCallback17(
|
|
5153
5127
|
(event) => {
|
|
5154
5128
|
const dateRangeString = event.target.value;
|
|
5155
5129
|
if (dateRangeString && dateRangeString.includes(" - ")) {
|
|
@@ -5189,12 +5163,12 @@ function DateRange(props) {
|
|
|
5189
5163
|
DateRange.displayName = "DateRange";
|
|
5190
5164
|
|
|
5191
5165
|
// src/components/FilterMenu/components/CurrencyInput.tsx
|
|
5192
|
-
import React35, { useCallback as
|
|
5166
|
+
import React35, { useCallback as useCallback18 } from "react";
|
|
5193
5167
|
import { Stack as Stack6 } from "@mui/joy";
|
|
5194
5168
|
function CurrencyInput3(props) {
|
|
5195
5169
|
const { id, label, value, onChange, hidden, max, placeholder, useMinorUnit, currency = "USD" } = props;
|
|
5196
5170
|
const [internalValue, setInternalValue] = useControlledState(value, value, onChange);
|
|
5197
|
-
const handleCurrencyChange =
|
|
5171
|
+
const handleCurrencyChange = useCallback18(
|
|
5198
5172
|
(event) => {
|
|
5199
5173
|
const newValue = event.target.value;
|
|
5200
5174
|
setInternalValue(newValue);
|
|
@@ -5220,14 +5194,14 @@ function CurrencyInput3(props) {
|
|
|
5220
5194
|
CurrencyInput3.displayName = "CurrencyInput";
|
|
5221
5195
|
|
|
5222
5196
|
// src/components/FilterMenu/components/CurrencyRange.tsx
|
|
5223
|
-
import React36, { useCallback as
|
|
5197
|
+
import React36, { useCallback as useCallback19 } from "react";
|
|
5224
5198
|
import { Stack as Stack7 } from "@mui/joy";
|
|
5225
5199
|
function CurrencyRange(props) {
|
|
5226
5200
|
const { id, label, value, onChange, hidden, max, placeholder, useMinorUnit, currency = "USD" } = props;
|
|
5227
5201
|
const [internalValue, setInternalValue] = useControlledState(value, null, onChange);
|
|
5228
5202
|
const minValue = internalValue?.[0];
|
|
5229
5203
|
const maxValue = internalValue?.[1];
|
|
5230
|
-
const handleMinChange =
|
|
5204
|
+
const handleMinChange = useCallback19(
|
|
5231
5205
|
(event) => {
|
|
5232
5206
|
const newMinValue = event.target.value;
|
|
5233
5207
|
const currentMaxValue = maxValue;
|
|
@@ -5241,7 +5215,7 @@ function CurrencyRange(props) {
|
|
|
5241
5215
|
},
|
|
5242
5216
|
[maxValue, setInternalValue]
|
|
5243
5217
|
);
|
|
5244
|
-
const handleMaxChange =
|
|
5218
|
+
const handleMaxChange = useCallback19(
|
|
5245
5219
|
(event) => {
|
|
5246
5220
|
const newMaxValue = event.target.value;
|
|
5247
5221
|
const currentMinValue = minValue;
|
|
@@ -5293,7 +5267,7 @@ import React38 from "react";
|
|
|
5293
5267
|
import { Stack as Stack8, Typography as Typography4 } from "@mui/joy";
|
|
5294
5268
|
|
|
5295
5269
|
// src/components/PercentageInput/PercentageInput.tsx
|
|
5296
|
-
import React37, { useCallback as
|
|
5270
|
+
import React37, { useCallback as useCallback20, useMemo as useMemo14, useState as useState12 } from "react";
|
|
5297
5271
|
import { NumericFormat as NumericFormat2 } from "react-number-format";
|
|
5298
5272
|
import { styled as styled20, useThemeProps as useThemeProps6 } from "@mui/joy";
|
|
5299
5273
|
var padDecimal = (value, decimalScale) => {
|
|
@@ -5350,9 +5324,9 @@ var PercentageInput = React37.forwardRef(
|
|
|
5350
5324
|
const [_value, setValue] = useControlledState(
|
|
5351
5325
|
props.value,
|
|
5352
5326
|
props.defaultValue,
|
|
5353
|
-
|
|
5327
|
+
useCallback20((value2) => onChange?.({ target: { name, value: value2 } }), [onChange, name])
|
|
5354
5328
|
);
|
|
5355
|
-
const [internalError, setInternalError] =
|
|
5329
|
+
const [internalError, setInternalError] = useState12(
|
|
5356
5330
|
max && _value && _value > max || min && _value && _value < min
|
|
5357
5331
|
);
|
|
5358
5332
|
const value = useMemo14(() => {
|
|
@@ -5361,7 +5335,7 @@ var PercentageInput = React37.forwardRef(
|
|
|
5361
5335
|
}
|
|
5362
5336
|
return _value;
|
|
5363
5337
|
}, [_value, useMinorUnit, maxDecimalScale]);
|
|
5364
|
-
const handleChange =
|
|
5338
|
+
const handleChange = useCallback20(
|
|
5365
5339
|
(event) => {
|
|
5366
5340
|
if (event.target.value === "") {
|
|
5367
5341
|
setValue(void 0);
|
|
@@ -5440,7 +5414,7 @@ var PercentageInput3 = ({
|
|
|
5440
5414
|
};
|
|
5441
5415
|
|
|
5442
5416
|
// src/components/FilterMenu/components/PercentageRange.tsx
|
|
5443
|
-
import React39, { useCallback as
|
|
5417
|
+
import React39, { useCallback as useCallback21 } from "react";
|
|
5444
5418
|
import { Stack as Stack9 } from "@mui/joy";
|
|
5445
5419
|
function PercentageRange(props) {
|
|
5446
5420
|
const { id, label, value, onChange, hidden, useMinorUnit, maxDecimalScale, min, max } = props;
|
|
@@ -5451,7 +5425,7 @@ function PercentageRange(props) {
|
|
|
5451
5425
|
);
|
|
5452
5426
|
const minValue = internalValue?.[0];
|
|
5453
5427
|
const maxValue = internalValue?.[1];
|
|
5454
|
-
const handleMinChange =
|
|
5428
|
+
const handleMinChange = useCallback21(
|
|
5455
5429
|
(event) => {
|
|
5456
5430
|
const newMinValue = event.target.value;
|
|
5457
5431
|
const currentMaxValue = maxValue;
|
|
@@ -5463,7 +5437,7 @@ function PercentageRange(props) {
|
|
|
5463
5437
|
},
|
|
5464
5438
|
[maxValue, setInternalValue]
|
|
5465
5439
|
);
|
|
5466
|
-
const handleMaxChange =
|
|
5440
|
+
const handleMaxChange = useCallback21(
|
|
5467
5441
|
(event) => {
|
|
5468
5442
|
const newMaxValue = event.target.value;
|
|
5469
5443
|
const currentMinValue = minValue;
|
|
@@ -5511,13 +5485,13 @@ function PercentageRange(props) {
|
|
|
5511
5485
|
PercentageRange.displayName = "PercentageRange";
|
|
5512
5486
|
|
|
5513
5487
|
// src/components/FilterMenu/components/Autocomplete.tsx
|
|
5514
|
-
import React40, { useCallback as
|
|
5488
|
+
import React40, { useCallback as useCallback22 } from "react";
|
|
5515
5489
|
import { Stack as Stack10 } from "@mui/joy";
|
|
5516
5490
|
function Autocomplete2(props) {
|
|
5517
5491
|
const { id, label, value, onChange, options, multiple, hidden, placeholder } = props;
|
|
5518
5492
|
const [internalValue, setInternalValue] = useControlledState(value, void 0, onChange);
|
|
5519
5493
|
const autocompleteValue = typeof internalValue === "string" || typeof internalValue === "number" ? String(internalValue) : void 0;
|
|
5520
|
-
const handleChange =
|
|
5494
|
+
const handleChange = useCallback22(
|
|
5521
5495
|
(event) => {
|
|
5522
5496
|
const val = event.target.value;
|
|
5523
5497
|
if (val) {
|
|
@@ -5566,7 +5540,7 @@ function FilterMenu(props) {
|
|
|
5566
5540
|
void 0
|
|
5567
5541
|
// onChange는 Apply 버튼에서만 호출
|
|
5568
5542
|
);
|
|
5569
|
-
const handleFilterChange =
|
|
5543
|
+
const handleFilterChange = useCallback23(
|
|
5570
5544
|
(filterId, value) => {
|
|
5571
5545
|
setInternalValues((prev) => ({
|
|
5572
5546
|
...prev,
|
|
@@ -5575,11 +5549,11 @@ function FilterMenu(props) {
|
|
|
5575
5549
|
},
|
|
5576
5550
|
[setInternalValues]
|
|
5577
5551
|
);
|
|
5578
|
-
const handleApply =
|
|
5552
|
+
const handleApply = useCallback23(() => {
|
|
5579
5553
|
onChange?.(internalValues);
|
|
5580
5554
|
onClose?.();
|
|
5581
5555
|
}, [onChange, onClose, internalValues]);
|
|
5582
|
-
const handleClear =
|
|
5556
|
+
const handleClear = useCallback23(() => {
|
|
5583
5557
|
const clearedValues = resetValues || {};
|
|
5584
5558
|
setInternalValues(clearedValues);
|
|
5585
5559
|
onChange?.(clearedValues);
|
|
@@ -5615,7 +5589,7 @@ function FilterMenu(props) {
|
|
|
5615
5589
|
FilterMenu.displayName = "FilterMenu";
|
|
5616
5590
|
|
|
5617
5591
|
// src/components/Uploader/Uploader.tsx
|
|
5618
|
-
import React42, { useCallback as
|
|
5592
|
+
import React42, { useCallback as useCallback24, useEffect as useEffect10, useMemo as useMemo15, useRef as useRef9, useState as useState13 } from "react";
|
|
5619
5593
|
import { styled as styled21, Input as Input2 } from "@mui/joy";
|
|
5620
5594
|
import MuiFileUploadIcon from "@mui/icons-material/CloudUploadRounded";
|
|
5621
5595
|
import MuiUploadFileIcon from "@mui/icons-material/UploadFileRounded";
|
|
@@ -5764,12 +5738,12 @@ var Uploader = React42.memo(
|
|
|
5764
5738
|
error: errorProp,
|
|
5765
5739
|
helperText: helperTextProp
|
|
5766
5740
|
} = props;
|
|
5767
|
-
const dropZoneRef =
|
|
5768
|
-
const inputRef =
|
|
5769
|
-
const [errorText, setErrorText] =
|
|
5770
|
-
const [files, setFiles] =
|
|
5771
|
-
const [uploaded, setUploaded] =
|
|
5772
|
-
const [previewState, setPreviewState] =
|
|
5741
|
+
const dropZoneRef = useRef9(null);
|
|
5742
|
+
const inputRef = useRef9(null);
|
|
5743
|
+
const [errorText, setErrorText] = useState13();
|
|
5744
|
+
const [files, setFiles] = useState13([]);
|
|
5745
|
+
const [uploaded, setUploaded] = useState13(props.uploaded || []);
|
|
5746
|
+
const [previewState, setPreviewState] = useState13("idle");
|
|
5773
5747
|
const accepts = useMemo15(() => accept.split(",").map((accept2) => accept2.trim()), [accept]);
|
|
5774
5748
|
const parsedAccepts = useMemo15(
|
|
5775
5749
|
() => accepts.flatMap((type) => {
|
|
@@ -5815,7 +5789,7 @@ var Uploader = React42.memo(
|
|
|
5815
5789
|
() => !maxCount || maxCount && [...uploaded, ...files].length !== maxCount,
|
|
5816
5790
|
[files, maxCount, uploaded]
|
|
5817
5791
|
);
|
|
5818
|
-
const addFiles =
|
|
5792
|
+
const addFiles = useCallback24(
|
|
5819
5793
|
(uploads) => {
|
|
5820
5794
|
try {
|
|
5821
5795
|
const types = parsedAccepts.map((type) => type.replace(".", "")) || [];
|
|
@@ -5860,7 +5834,7 @@ var Uploader = React42.memo(
|
|
|
5860
5834
|
},
|
|
5861
5835
|
[files, uploaded, maxCount, parsedAccepts, maxFileSize, maxFileTotalSize, name, onChange]
|
|
5862
5836
|
);
|
|
5863
|
-
|
|
5837
|
+
useEffect10(() => {
|
|
5864
5838
|
if (!dropZoneRef.current || disabled) {
|
|
5865
5839
|
return;
|
|
5866
5840
|
}
|
|
@@ -5898,7 +5872,7 @@ var Uploader = React42.memo(
|
|
|
5898
5872
|
);
|
|
5899
5873
|
return () => cleanup?.();
|
|
5900
5874
|
}, [disabled, addFiles]);
|
|
5901
|
-
|
|
5875
|
+
useEffect10(() => {
|
|
5902
5876
|
if (inputRef.current && minCount) {
|
|
5903
5877
|
if (files.length < minCount) {
|
|
5904
5878
|
inputRef.current.setCustomValidity(`At least ${minCount} files are required.`);
|
|
@@ -5907,14 +5881,14 @@ var Uploader = React42.memo(
|
|
|
5907
5881
|
}
|
|
5908
5882
|
}
|
|
5909
5883
|
}, [inputRef, files, minCount]);
|
|
5910
|
-
const handleFileChanged =
|
|
5884
|
+
const handleFileChanged = useCallback24(
|
|
5911
5885
|
(event) => {
|
|
5912
5886
|
const files2 = Array.from(event.target.files || []);
|
|
5913
5887
|
addFiles(files2);
|
|
5914
5888
|
},
|
|
5915
5889
|
[addFiles]
|
|
5916
5890
|
);
|
|
5917
|
-
const handleDeleteFile =
|
|
5891
|
+
const handleDeleteFile = useCallback24(
|
|
5918
5892
|
(deletedFile) => {
|
|
5919
5893
|
if (deletedFile instanceof File) {
|
|
5920
5894
|
setFiles((current) => {
|
|
@@ -5934,7 +5908,7 @@ var Uploader = React42.memo(
|
|
|
5934
5908
|
},
|
|
5935
5909
|
[name, onChange, onDelete]
|
|
5936
5910
|
);
|
|
5937
|
-
const handleUploaderButtonClick =
|
|
5911
|
+
const handleUploaderButtonClick = useCallback24(() => {
|
|
5938
5912
|
inputRef.current?.click();
|
|
5939
5913
|
}, []);
|
|
5940
5914
|
const uploader = /* @__PURE__ */ React42.createElement(
|
|
@@ -6029,16 +6003,16 @@ function IconMenuButton(props) {
|
|
|
6029
6003
|
IconMenuButton.displayName = "IconMenuButton";
|
|
6030
6004
|
|
|
6031
6005
|
// src/components/Markdown/Markdown.tsx
|
|
6032
|
-
import React44, { lazy, Suspense, useEffect as
|
|
6006
|
+
import React44, { lazy, Suspense, useEffect as useEffect11, useState as useState14 } from "react";
|
|
6033
6007
|
import { Skeleton } from "@mui/joy";
|
|
6034
6008
|
import { Link as Link2 } from "@mui/joy";
|
|
6035
6009
|
import remarkGfm from "remark-gfm";
|
|
6036
6010
|
var LazyReactMarkdown = lazy(() => import("react-markdown"));
|
|
6037
6011
|
var Markdown = (props) => {
|
|
6038
|
-
const [
|
|
6039
|
-
|
|
6012
|
+
const [rehypeAccent2, setRehypeAccent] = useState14(null);
|
|
6013
|
+
useEffect11(() => {
|
|
6040
6014
|
const loadRehypeAccent = async () => {
|
|
6041
|
-
const module = await
|
|
6015
|
+
const module = await Promise.resolve().then(() => (init_rehype_accent(), rehype_accent_exports));
|
|
6042
6016
|
setRehypeAccent(() => module.rehypeAccent);
|
|
6043
6017
|
};
|
|
6044
6018
|
loadRehypeAccent();
|
|
@@ -6055,7 +6029,7 @@ var Markdown = (props) => {
|
|
|
6055
6029
|
fallback,
|
|
6056
6030
|
...innerProps
|
|
6057
6031
|
} = props;
|
|
6058
|
-
if (!
|
|
6032
|
+
if (!rehypeAccent2) {
|
|
6059
6033
|
return null;
|
|
6060
6034
|
}
|
|
6061
6035
|
return /* @__PURE__ */ React44.createElement(Typography, { component: "div", color, textColor, level: defaultLevel, ...innerProps }, /* @__PURE__ */ React44.createElement(
|
|
@@ -6068,7 +6042,7 @@ var Markdown = (props) => {
|
|
|
6068
6042
|
{
|
|
6069
6043
|
...markdownOptions,
|
|
6070
6044
|
children: content,
|
|
6071
|
-
rehypePlugins: [[
|
|
6045
|
+
rehypePlugins: [[rehypeAccent2, { accentColor }]],
|
|
6072
6046
|
remarkPlugins: [remarkGfm],
|
|
6073
6047
|
components: {
|
|
6074
6048
|
a: ({ children, href }) => /* @__PURE__ */ React44.createElement(Link2, { href, target: defaultLinkAction }, children),
|
|
@@ -6210,7 +6184,7 @@ function MenuButton(props) {
|
|
|
6210
6184
|
MenuButton.displayName = "MenuButton";
|
|
6211
6185
|
|
|
6212
6186
|
// src/components/MonthPicker/MonthPicker.tsx
|
|
6213
|
-
import React46, { forwardRef as forwardRef9, useCallback as
|
|
6187
|
+
import React46, { forwardRef as forwardRef9, useCallback as useCallback25, useEffect as useEffect12, useImperativeHandle as useImperativeHandle4, useRef as useRef10, useState as useState15 } from "react";
|
|
6214
6188
|
import CalendarTodayIcon3 from "@mui/icons-material/CalendarToday";
|
|
6215
6189
|
import { styled as styled22, useThemeProps as useThemeProps7 } from "@mui/joy";
|
|
6216
6190
|
import { FocusTrap as FocusTrap3, ClickAwayListener as ClickAwayListener3, Popper as Popper4 } from "@mui/base";
|
|
@@ -6292,14 +6266,14 @@ var MonthPicker = forwardRef9((inProps, ref) => {
|
|
|
6292
6266
|
locale,
|
|
6293
6267
|
...innerProps
|
|
6294
6268
|
} = props;
|
|
6295
|
-
const innerRef =
|
|
6296
|
-
const buttonRef =
|
|
6269
|
+
const innerRef = useRef10(null);
|
|
6270
|
+
const buttonRef = useRef10(null);
|
|
6297
6271
|
const [value, setValue, isControlled] = useControlledState(
|
|
6298
6272
|
props.value,
|
|
6299
6273
|
props.defaultValue || "",
|
|
6300
|
-
|
|
6274
|
+
useCallback25((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
|
|
6301
6275
|
);
|
|
6302
|
-
const getFormattedDisplayValue =
|
|
6276
|
+
const getFormattedDisplayValue = useCallback25(
|
|
6303
6277
|
(inputValue) => {
|
|
6304
6278
|
if (!inputValue) return "";
|
|
6305
6279
|
try {
|
|
@@ -6310,19 +6284,19 @@ var MonthPicker = forwardRef9((inProps, ref) => {
|
|
|
6310
6284
|
},
|
|
6311
6285
|
[format, displayFormat, locale]
|
|
6312
6286
|
);
|
|
6313
|
-
const [displayValue, setDisplayValue] =
|
|
6314
|
-
const [anchorEl, setAnchorEl] =
|
|
6287
|
+
const [displayValue, setDisplayValue] = useState15(() => getFormattedDisplayValue(value));
|
|
6288
|
+
const [anchorEl, setAnchorEl] = useState15(null);
|
|
6315
6289
|
const open = Boolean(anchorEl);
|
|
6316
|
-
|
|
6290
|
+
useEffect12(() => {
|
|
6317
6291
|
if (!anchorEl) {
|
|
6318
6292
|
innerRef.current?.blur();
|
|
6319
6293
|
}
|
|
6320
6294
|
}, [anchorEl, innerRef]);
|
|
6321
6295
|
useImperativeHandle4(ref, () => innerRef.current, [innerRef]);
|
|
6322
|
-
|
|
6296
|
+
useEffect12(() => {
|
|
6323
6297
|
setDisplayValue(getFormattedDisplayValue(value));
|
|
6324
6298
|
}, [value, getFormattedDisplayValue]);
|
|
6325
|
-
const handleChange =
|
|
6299
|
+
const handleChange = useCallback25(
|
|
6326
6300
|
(event) => {
|
|
6327
6301
|
const newValue = event.target.value;
|
|
6328
6302
|
setValue(newValue);
|
|
@@ -6332,14 +6306,14 @@ var MonthPicker = forwardRef9((inProps, ref) => {
|
|
|
6332
6306
|
},
|
|
6333
6307
|
[setValue, getFormattedDisplayValue, isControlled]
|
|
6334
6308
|
);
|
|
6335
|
-
const handleCalendarToggle =
|
|
6309
|
+
const handleCalendarToggle = useCallback25(
|
|
6336
6310
|
(event) => {
|
|
6337
6311
|
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
6338
6312
|
innerRef.current?.focus();
|
|
6339
6313
|
},
|
|
6340
6314
|
[anchorEl, setAnchorEl, innerRef]
|
|
6341
6315
|
);
|
|
6342
|
-
const handleInputMouseDown =
|
|
6316
|
+
const handleInputMouseDown = useCallback25(
|
|
6343
6317
|
(event) => {
|
|
6344
6318
|
event.preventDefault();
|
|
6345
6319
|
buttonRef.current?.focus();
|
|
@@ -6463,7 +6437,7 @@ var MonthPicker = forwardRef9((inProps, ref) => {
|
|
|
6463
6437
|
});
|
|
6464
6438
|
|
|
6465
6439
|
// src/components/MonthRangePicker/MonthRangePicker.tsx
|
|
6466
|
-
import React47, { forwardRef as forwardRef10, useCallback as
|
|
6440
|
+
import React47, { forwardRef as forwardRef10, useCallback as useCallback26, useEffect as useEffect13, useImperativeHandle as useImperativeHandle5, useMemo as useMemo16, useRef as useRef11, useState as useState16 } from "react";
|
|
6467
6441
|
import { IMaskInput as IMaskInput3, IMask as IMask3 } from "react-imask";
|
|
6468
6442
|
import CalendarTodayIcon4 from "@mui/icons-material/CalendarToday";
|
|
6469
6443
|
import { styled as styled23, useThemeProps as useThemeProps8 } from "@mui/joy";
|
|
@@ -6571,35 +6545,35 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
|
|
|
6571
6545
|
size,
|
|
6572
6546
|
...innerProps
|
|
6573
6547
|
} = props;
|
|
6574
|
-
const innerRef =
|
|
6548
|
+
const innerRef = useRef11(null);
|
|
6575
6549
|
const [value, setValue] = useControlledState(
|
|
6576
6550
|
props.value,
|
|
6577
6551
|
props.defaultValue || "",
|
|
6578
|
-
|
|
6552
|
+
useCallback26((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
|
|
6579
6553
|
);
|
|
6580
|
-
const [anchorEl, setAnchorEl] =
|
|
6554
|
+
const [anchorEl, setAnchorEl] = useState16(null);
|
|
6581
6555
|
const open = Boolean(anchorEl);
|
|
6582
6556
|
const calendarValue = useMemo16(() => value ? parseDates2(value) : void 0, [value]);
|
|
6583
|
-
|
|
6557
|
+
useEffect13(() => {
|
|
6584
6558
|
if (!anchorEl) {
|
|
6585
6559
|
innerRef.current?.blur();
|
|
6586
6560
|
}
|
|
6587
6561
|
}, [anchorEl, innerRef]);
|
|
6588
6562
|
useImperativeHandle5(ref, () => innerRef.current, [innerRef]);
|
|
6589
|
-
const handleChange =
|
|
6563
|
+
const handleChange = useCallback26(
|
|
6590
6564
|
(event) => {
|
|
6591
6565
|
setValue(event.target.value);
|
|
6592
6566
|
},
|
|
6593
6567
|
[setValue]
|
|
6594
6568
|
);
|
|
6595
|
-
const handleCalendarToggle =
|
|
6569
|
+
const handleCalendarToggle = useCallback26(
|
|
6596
6570
|
(event) => {
|
|
6597
6571
|
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
6598
6572
|
innerRef.current?.focus();
|
|
6599
6573
|
},
|
|
6600
6574
|
[anchorEl, setAnchorEl, innerRef]
|
|
6601
6575
|
);
|
|
6602
|
-
const handleCalendarChange =
|
|
6576
|
+
const handleCalendarChange = useCallback26(
|
|
6603
6577
|
([date1, date2]) => {
|
|
6604
6578
|
if (!date1 || !date2) return;
|
|
6605
6579
|
setValue(formatValueString4([date1, date2], format));
|
|
@@ -6826,7 +6800,7 @@ function Navigator(props) {
|
|
|
6826
6800
|
Navigator.displayName = "Navigator";
|
|
6827
6801
|
|
|
6828
6802
|
// src/components/ProfileMenu/ProfileMenu.tsx
|
|
6829
|
-
import React51, { useCallback as
|
|
6803
|
+
import React51, { useCallback as useCallback27, useMemo as useMemo17 } from "react";
|
|
6830
6804
|
import { Dropdown as Dropdown2, ListDivider, menuItemClasses, styled as styled26, MenuButton as MenuButton2 } from "@mui/joy";
|
|
6831
6805
|
import { ClickAwayListener as ClickAwayListener5 } from "@mui/base";
|
|
6832
6806
|
import DropdownIcon from "@mui/icons-material/ArrowDropDown";
|
|
@@ -6878,7 +6852,7 @@ function ProfileMenu(props) {
|
|
|
6878
6852
|
const [open, setOpen] = useControlledState(
|
|
6879
6853
|
_open,
|
|
6880
6854
|
defaultOpen ?? false,
|
|
6881
|
-
|
|
6855
|
+
useCallback27((value) => onOpenChange?.(value), [onOpenChange])
|
|
6882
6856
|
);
|
|
6883
6857
|
return /* @__PURE__ */ React51.createElement(ClickAwayListener5, { onClickAway: () => setOpen(false) }, /* @__PURE__ */ React51.createElement("div", null, /* @__PURE__ */ React51.createElement(Dropdown2, { open }, /* @__PURE__ */ React51.createElement(
|
|
6884
6858
|
ProfileMenuButton,
|