@ceed/ads 1.41.3-next.5 → 1.41.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/dist/components/Autocomplete/Autocomplete.d.ts +4 -4
- package/dist/components/Autocomplete/index.d.ts +1 -2
- package/dist/components/DataTable/components.d.ts +1 -1
- package/dist/components/DataTable/hooks.d.ts +7 -6
- package/dist/components/DataTable/types.d.ts +0 -7
- package/dist/components/DataTable/utils.d.ts +0 -5
- package/dist/components/IconMenuButton/IconMenuButton.d.ts +8 -9
- package/dist/components/IconMenuButton/index.d.ts +1 -2
- package/dist/components/Modal/Modal.d.ts +4 -1
- package/dist/components/Select/Select.d.ts +4 -3
- package/dist/components/Textarea/Textarea.d.ts +4 -1
- package/dist/components/Textarea/index.d.ts +1 -2
- package/dist/components/data-display/DataTable.md +0 -4
- package/dist/components/navigation/IconMenuButton.md +12 -12
- package/dist/index.browser.js +6 -6
- package/dist/index.browser.js.map +4 -4
- package/dist/index.cjs +709 -808
- package/dist/index.js +171 -270
- package/framer/index.js +1 -1
- package/package.json +1 -1
- package/dist/libs/slot-props.d.ts +0 -22
package/dist/index.cjs
CHANGED
|
@@ -347,7 +347,7 @@ function Alert(inProps) {
|
|
|
347
347
|
Alert.displayName = "Alert";
|
|
348
348
|
|
|
349
349
|
// src/components/Autocomplete/Autocomplete.tsx
|
|
350
|
-
var
|
|
350
|
+
var import_react6 = __toESM(require("react"));
|
|
351
351
|
var import_joy10 = require("@mui/joy");
|
|
352
352
|
var import_base = require("@mui/base");
|
|
353
353
|
var import_Close = __toESM(require("@mui/icons-material/Close"));
|
|
@@ -439,37 +439,6 @@ function useControlledState(controlledValue, defaultValue, onChange) {
|
|
|
439
439
|
return [displayValue, handleChange, isControlled];
|
|
440
440
|
}
|
|
441
441
|
|
|
442
|
-
// src/libs/slot-props.ts
|
|
443
|
-
var import_react6 = require("react");
|
|
444
|
-
function assignRef(ref, value) {
|
|
445
|
-
if (typeof ref === "function") ref(value);
|
|
446
|
-
else if (ref) ref.current = value;
|
|
447
|
-
}
|
|
448
|
-
function mergeRefs(...refs) {
|
|
449
|
-
const live = refs.filter((r) => r != null);
|
|
450
|
-
if (live.length === 0) return void 0;
|
|
451
|
-
if (live.length === 1) return live[0];
|
|
452
|
-
return (value) => live.forEach((r) => assignRef(r, value));
|
|
453
|
-
}
|
|
454
|
-
function useMergedRef(a, b) {
|
|
455
|
-
return (0, import_react6.useMemo)(() => mergeRefs(a, b), [a, b]);
|
|
456
|
-
}
|
|
457
|
-
function useSlotRef(slotProp, ref) {
|
|
458
|
-
const isFunctionForm = typeof slotProp === "function";
|
|
459
|
-
const slotRef = isFunctionForm ? void 0 : slotProp?.ref;
|
|
460
|
-
const mergedRef = useMergedRef(slotRef, ref);
|
|
461
|
-
return (0, import_react6.useMemo)(() => {
|
|
462
|
-
if (isFunctionForm) {
|
|
463
|
-
return ((ownerState) => {
|
|
464
|
-
const resolved = slotProp(ownerState) ?? {};
|
|
465
|
-
const merged = mergeRefs(resolved.ref, ref);
|
|
466
|
-
return merged ? { ...resolved, ref: merged } : { ...resolved };
|
|
467
|
-
});
|
|
468
|
-
}
|
|
469
|
-
return mergedRef ? { ...slotProp, ref: mergedRef } : { ...slotProp };
|
|
470
|
-
}, [isFunctionForm, slotProp, mergedRef, ref]);
|
|
471
|
-
}
|
|
472
|
-
|
|
473
442
|
// src/components/Autocomplete/Autocomplete.tsx
|
|
474
443
|
var AutocompletePopper = (0, import_joy10.styled)(import_base2.Popper, {
|
|
475
444
|
name: "Autocomplete",
|
|
@@ -482,7 +451,7 @@ var itemHeightMap = {
|
|
|
482
451
|
md: { default: 36, secondary: 55 },
|
|
483
452
|
lg: { default: 44, secondary: 65 }
|
|
484
453
|
};
|
|
485
|
-
var AutocompleteListBox =
|
|
454
|
+
var AutocompleteListBox = import_react6.default.forwardRef((props, ref) => {
|
|
486
455
|
const {
|
|
487
456
|
anchorEl,
|
|
488
457
|
open,
|
|
@@ -492,13 +461,13 @@ var AutocompleteListBox = import_react7.default.forwardRef((props, ref) => {
|
|
|
492
461
|
ownerState: { loading, size: fontSize },
|
|
493
462
|
...innerProps
|
|
494
463
|
} = props;
|
|
495
|
-
const parentRef = (0,
|
|
464
|
+
const parentRef = (0, import_react6.useRef)(null);
|
|
496
465
|
const isGrouped = children[0].every((child) => child.hasOwnProperty("group"));
|
|
497
|
-
const itemHeight = (0,
|
|
466
|
+
const itemHeight = (0, import_react6.useMemo)(() => {
|
|
498
467
|
const heights = itemHeightMap[fontSize ?? "md"];
|
|
499
468
|
return hasSecondaryText ? heights.secondary : heights.default;
|
|
500
469
|
}, [fontSize, hasSecondaryText]);
|
|
501
|
-
const renderTargets = (0,
|
|
470
|
+
const renderTargets = (0, import_react6.useMemo)(() => {
|
|
502
471
|
if (loading) {
|
|
503
472
|
return [children[1]];
|
|
504
473
|
}
|
|
@@ -507,7 +476,7 @@ var AutocompleteListBox = import_react7.default.forwardRef((props, ref) => {
|
|
|
507
476
|
}
|
|
508
477
|
if (isGrouped) {
|
|
509
478
|
return children[0].flatMap((child) => [
|
|
510
|
-
/* @__PURE__ */
|
|
479
|
+
/* @__PURE__ */ import_react6.default.createElement(import_joy10.ListSubheader, { key: child.key, component: "li" }, child.group),
|
|
511
480
|
...child.children
|
|
512
481
|
]);
|
|
513
482
|
}
|
|
@@ -521,12 +490,12 @@ var AutocompleteListBox = import_react7.default.forwardRef((props, ref) => {
|
|
|
521
490
|
overscan: 5
|
|
522
491
|
});
|
|
523
492
|
const items = virtualizer.getVirtualItems();
|
|
524
|
-
(0,
|
|
493
|
+
(0, import_react6.useEffect)(() => {
|
|
525
494
|
if (open) {
|
|
526
495
|
virtualizer.measure();
|
|
527
496
|
}
|
|
528
497
|
}, [open, virtualizer]);
|
|
529
|
-
return /* @__PURE__ */
|
|
498
|
+
return /* @__PURE__ */ import_react6.default.createElement(AutocompletePopper, { ref, anchorEl, open, modifiers }, /* @__PURE__ */ import_react6.default.createElement(import_joy10.AutocompleteListbox, { ...innerProps, size: fontSize }, /* @__PURE__ */ import_react6.default.createElement("div", { ref: parentRef, style: { overflow: "auto" } }, /* @__PURE__ */ import_react6.default.createElement(
|
|
530
499
|
"div",
|
|
531
500
|
{
|
|
532
501
|
style: {
|
|
@@ -535,7 +504,7 @@ var AutocompleteListBox = import_react7.default.forwardRef((props, ref) => {
|
|
|
535
504
|
}
|
|
536
505
|
},
|
|
537
506
|
items.map(
|
|
538
|
-
({ index, size, start, key }) =>
|
|
507
|
+
({ index, size, start, key }) => import_react6.default.cloneElement(renderTargets[index], {
|
|
539
508
|
key,
|
|
540
509
|
style: {
|
|
541
510
|
position: "absolute",
|
|
@@ -547,7 +516,7 @@ var AutocompleteListBox = import_react7.default.forwardRef((props, ref) => {
|
|
|
547
516
|
transform: `translateY(${start}px)`,
|
|
548
517
|
overflow: "visible"
|
|
549
518
|
},
|
|
550
|
-
children: /* @__PURE__ */
|
|
519
|
+
children: /* @__PURE__ */ import_react6.default.createElement(
|
|
551
520
|
"div",
|
|
552
521
|
{
|
|
553
522
|
style: {
|
|
@@ -590,7 +559,7 @@ var autocompleteFilterOptions = (0, import_base.createFilterOptions)({
|
|
|
590
559
|
}
|
|
591
560
|
});
|
|
592
561
|
var getOptionLabel = (option) => `${option.label ?? ""}`;
|
|
593
|
-
function
|
|
562
|
+
function Autocomplete(props) {
|
|
594
563
|
const {
|
|
595
564
|
label,
|
|
596
565
|
error,
|
|
@@ -609,7 +578,7 @@ function AutocompleteInner(props, ref) {
|
|
|
609
578
|
const [rawValue, setValue] = useControlledState(
|
|
610
579
|
props.value,
|
|
611
580
|
props.defaultValue ?? null,
|
|
612
|
-
(0,
|
|
581
|
+
(0, import_react6.useCallback)(
|
|
613
582
|
(value2) => onChange?.({
|
|
614
583
|
target: {
|
|
615
584
|
value: value2,
|
|
@@ -620,7 +589,7 @@ function AutocompleteInner(props, ref) {
|
|
|
620
589
|
)
|
|
621
590
|
);
|
|
622
591
|
const _value = rawValue ?? (props.multiple ? EMPTY_MULTIPLE_VALUE : "");
|
|
623
|
-
const options = (0,
|
|
592
|
+
const options = (0, import_react6.useMemo)(
|
|
624
593
|
() => props.options.map((option) => {
|
|
625
594
|
if (typeof option !== "object") {
|
|
626
595
|
return {
|
|
@@ -632,19 +601,19 @@ function AutocompleteInner(props, ref) {
|
|
|
632
601
|
}),
|
|
633
602
|
[props.options]
|
|
634
603
|
);
|
|
635
|
-
const optionMap = (0,
|
|
604
|
+
const optionMap = (0, import_react6.useMemo)(() => {
|
|
636
605
|
const map = /* @__PURE__ */ new Map();
|
|
637
606
|
options.forEach((option) => {
|
|
638
607
|
map.set(option.value, option);
|
|
639
608
|
});
|
|
640
609
|
return map;
|
|
641
610
|
}, [options]);
|
|
642
|
-
const value = (0,
|
|
611
|
+
const value = (0, import_react6.useMemo)(() => {
|
|
643
612
|
if (props.loading) {
|
|
644
613
|
return {
|
|
645
614
|
value: "",
|
|
646
615
|
label: "",
|
|
647
|
-
startDecorator: /* @__PURE__ */
|
|
616
|
+
startDecorator: /* @__PURE__ */ import_react6.default.createElement(import_joy10.CircularProgress, { size: "sm", color: "neutral", variant: "plain", thickness: 3 })
|
|
648
617
|
};
|
|
649
618
|
}
|
|
650
619
|
if (Array.isArray(_value)) {
|
|
@@ -652,33 +621,31 @@ function AutocompleteInner(props, ref) {
|
|
|
652
621
|
}
|
|
653
622
|
return optionMap.get(_value);
|
|
654
623
|
}, [_value, optionMap, props.loading]);
|
|
655
|
-
const applySize = (0,
|
|
624
|
+
const applySize = (0, import_react6.useCallback)(
|
|
656
625
|
(node) => {
|
|
657
|
-
return
|
|
626
|
+
return import_react6.default.isValidElement(node) && !props.loading ? import_react6.default.cloneElement(node, { ...{ size } }) : node;
|
|
658
627
|
},
|
|
659
628
|
[size, props.loading]
|
|
660
629
|
);
|
|
661
|
-
const startDecorator = (0,
|
|
630
|
+
const startDecorator = (0, import_react6.useMemo)(
|
|
662
631
|
() => applySize(value?.startDecorator || props.startDecorator),
|
|
663
632
|
[value, applySize, props.startDecorator]
|
|
664
633
|
);
|
|
665
|
-
const endDecorator = (0,
|
|
634
|
+
const endDecorator = (0, import_react6.useMemo)(
|
|
666
635
|
() => applySize(value?.endDecorator || props.endDecorator),
|
|
667
636
|
[value, applySize, props.endDecorator]
|
|
668
637
|
);
|
|
669
|
-
const
|
|
670
|
-
const slotProps = (0, import_react7.useMemo)(
|
|
638
|
+
const slotProps = (0, import_react6.useMemo)(
|
|
671
639
|
() => ({
|
|
672
640
|
...props.slotProps,
|
|
673
641
|
listbox: {
|
|
674
642
|
...props.slotProps?.listbox,
|
|
675
643
|
hasSecondaryText: options.some((opt) => opt.secondaryText)
|
|
676
|
-
}
|
|
677
|
-
input: inputSlotProps
|
|
644
|
+
}
|
|
678
645
|
}),
|
|
679
|
-
[options, props.slotProps
|
|
646
|
+
[options, props.slotProps]
|
|
680
647
|
);
|
|
681
|
-
const handleChange = (0,
|
|
648
|
+
const handleChange = (0, import_react6.useCallback)(
|
|
682
649
|
(event, value2) => {
|
|
683
650
|
const newValue = value2;
|
|
684
651
|
const _value2 = Array.isArray(newValue) ? newValue.map((value3) => value3.value) : newValue?.value;
|
|
@@ -695,7 +662,7 @@ function AutocompleteInner(props, ref) {
|
|
|
695
662
|
},
|
|
696
663
|
[onChangeComplete, setValue, optionMap]
|
|
697
664
|
);
|
|
698
|
-
const autocomplete = /* @__PURE__ */
|
|
665
|
+
const autocomplete = /* @__PURE__ */ import_react6.default.createElement(
|
|
699
666
|
import_joy10.Autocomplete,
|
|
700
667
|
{
|
|
701
668
|
...innerProps,
|
|
@@ -710,10 +677,10 @@ function AutocompleteInner(props, ref) {
|
|
|
710
677
|
endDecorator,
|
|
711
678
|
getOptionLabel,
|
|
712
679
|
renderTags: (tags, getTagProps) => tags.map((tag, index) => {
|
|
713
|
-
const { onClick,
|
|
680
|
+
const { onClick, ...rest } = getTagProps({ index });
|
|
714
681
|
return applySize(
|
|
715
|
-
/* @__PURE__ */
|
|
716
|
-
/* @__PURE__ */
|
|
682
|
+
/* @__PURE__ */ import_react6.default.createElement(Chip_default, { color: "primary", ...rest }, /* @__PURE__ */ import_react6.default.createElement(Stack_default, { direction: "row", alignItems: "center", gap: 2, py: 0.5 }, tag.value, applySize(
|
|
683
|
+
/* @__PURE__ */ import_react6.default.createElement(AutocompleteTagDelete, { color: "primary", variant: "soft", onClick, size }, /* @__PURE__ */ import_react6.default.createElement(import_Close.default, null))
|
|
717
684
|
)))
|
|
718
685
|
);
|
|
719
686
|
}),
|
|
@@ -722,33 +689,30 @@ function AutocompleteInner(props, ref) {
|
|
|
722
689
|
},
|
|
723
690
|
slotProps,
|
|
724
691
|
filterOptions: autocompleteFilterOptions,
|
|
725
|
-
renderOption: (props2, option) => {
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
applySize(option.endDecorator)
|
|
746
|
-
));
|
|
747
|
-
},
|
|
692
|
+
renderOption: (props2, option) => /* @__PURE__ */ import_react6.default.createElement(import_joy10.AutocompleteOption, { ...props2 }, option.startDecorator && /* @__PURE__ */ import_react6.default.createElement(
|
|
693
|
+
import_joy10.ListItemDecorator,
|
|
694
|
+
{
|
|
695
|
+
sx: (theme) => ({
|
|
696
|
+
marginInlineEnd: `var(--Input-gap, ${theme.spacing(1)})`
|
|
697
|
+
})
|
|
698
|
+
},
|
|
699
|
+
applySize(option.startDecorator)
|
|
700
|
+
), option.secondaryText ? /* @__PURE__ */ import_react6.default.createElement(import_joy10.ListItemContent, { sx: { gap: 0.5 } }, /* @__PURE__ */ import_react6.default.createElement(import_joy10.Typography, { level: "inherit" }, applySize(option.label)), /* @__PURE__ */ import_react6.default.createElement(import_joy10.Typography, { level: secondaryTextLevelMap[size ?? "md"], textColor: "text.tertiary" }, option.secondaryText)) : (
|
|
701
|
+
// TODO: haulla에서 사용할 때, label을 ReactNode로 넘기면 에러가 발생함....
|
|
702
|
+
applySize(option.label)
|
|
703
|
+
), option.endDecorator && /* @__PURE__ */ import_react6.default.createElement(
|
|
704
|
+
import_joy10.ListItemDecorator,
|
|
705
|
+
{
|
|
706
|
+
sx: (theme) => ({
|
|
707
|
+
marginInlineStart: `var(--Input-gap, ${theme.spacing(1)})`
|
|
708
|
+
})
|
|
709
|
+
},
|
|
710
|
+
applySize(option.endDecorator)
|
|
711
|
+
)),
|
|
748
712
|
renderGroup: (params) => params
|
|
749
713
|
}
|
|
750
714
|
);
|
|
751
|
-
return /* @__PURE__ */
|
|
715
|
+
return /* @__PURE__ */ import_react6.default.createElement(
|
|
752
716
|
FormControl_default,
|
|
753
717
|
{
|
|
754
718
|
required,
|
|
@@ -759,19 +723,18 @@ function AutocompleteInner(props, ref) {
|
|
|
759
723
|
sx,
|
|
760
724
|
className
|
|
761
725
|
},
|
|
762
|
-
label && /* @__PURE__ */
|
|
726
|
+
label && /* @__PURE__ */ import_react6.default.createElement(FormLabel_default, null, label),
|
|
763
727
|
autocomplete,
|
|
764
|
-
helperText && /* @__PURE__ */
|
|
728
|
+
helperText && /* @__PURE__ */ import_react6.default.createElement(FormHelperText_default, null, helperText)
|
|
765
729
|
);
|
|
766
730
|
}
|
|
767
|
-
var Autocomplete = import_react7.default.forwardRef(AutocompleteInner);
|
|
768
731
|
Autocomplete.displayName = "Autocomplete";
|
|
769
732
|
|
|
770
733
|
// src/components/Autocomplete/index.ts
|
|
771
734
|
var Autocomplete_default = Autocomplete;
|
|
772
735
|
|
|
773
736
|
// src/components/Avatar/Avatar.tsx
|
|
774
|
-
var
|
|
737
|
+
var import_react7 = __toESM(require("react"));
|
|
775
738
|
var import_joy11 = require("@mui/joy");
|
|
776
739
|
var StyledAvatar = (0, import_joy11.styled)(import_joy11.Avatar, {
|
|
777
740
|
name: "Avatar",
|
|
@@ -793,19 +756,19 @@ var defaultGetInitial = (name) => {
|
|
|
793
756
|
return (firstName.charAt(0) + lastName.charAt(0)).toUpperCase();
|
|
794
757
|
}
|
|
795
758
|
};
|
|
796
|
-
var Avatar = (0,
|
|
759
|
+
var Avatar = (0, import_react7.forwardRef)(function Avatar2(inProps, ref) {
|
|
797
760
|
const props = (0, import_joy11.useThemeProps)({
|
|
798
761
|
props: inProps,
|
|
799
762
|
name: "Avatar"
|
|
800
763
|
});
|
|
801
764
|
const { children, getInitial = defaultGetInitial, ...inheritProps } = props;
|
|
802
|
-
const calcChildren = (0,
|
|
765
|
+
const calcChildren = (0, import_react7.useMemo)(() => {
|
|
803
766
|
if (typeof children === "string") {
|
|
804
767
|
return getInitial?.(children) ?? "";
|
|
805
768
|
}
|
|
806
769
|
return children;
|
|
807
770
|
}, [children, getInitial]);
|
|
808
|
-
return /* @__PURE__ */
|
|
771
|
+
return /* @__PURE__ */ import_react7.default.createElement(StyledAvatar, { ...inheritProps, children: calcChildren, ref });
|
|
809
772
|
});
|
|
810
773
|
|
|
811
774
|
// src/components/Box/Box.tsx
|
|
@@ -819,16 +782,16 @@ Box.displayName = "Box";
|
|
|
819
782
|
var Box_default = Box;
|
|
820
783
|
|
|
821
784
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
822
|
-
var
|
|
785
|
+
var import_react10 = __toESM(require("react"));
|
|
823
786
|
var import_joy16 = require("@mui/joy");
|
|
824
787
|
|
|
825
788
|
// src/components/Menu/Menu.tsx
|
|
826
|
-
var
|
|
789
|
+
var import_react8 = __toESM(require("react"));
|
|
827
790
|
var import_joy13 = require("@mui/joy");
|
|
828
791
|
var import_framer_motion10 = require("framer-motion");
|
|
829
792
|
var MotionMenu = (0, import_framer_motion10.motion)(import_joy13.Menu);
|
|
830
793
|
var Menu = (props) => {
|
|
831
|
-
return /* @__PURE__ */
|
|
794
|
+
return /* @__PURE__ */ import_react8.default.createElement(MotionMenu, { ...props });
|
|
832
795
|
};
|
|
833
796
|
Menu.displayName = "Menu";
|
|
834
797
|
var MenuItem = import_joy13.MenuItem;
|
|
@@ -837,22 +800,22 @@ var MenuItem = import_joy13.MenuItem;
|
|
|
837
800
|
var Menu_default = Menu;
|
|
838
801
|
|
|
839
802
|
// src/components/Dropdown/Dropdown.tsx
|
|
840
|
-
var
|
|
803
|
+
var import_react9 = __toESM(require("react"));
|
|
841
804
|
var import_joy14 = require("@mui/joy");
|
|
842
805
|
var import_joy15 = require("@mui/joy");
|
|
843
806
|
var import_useMenuButton = require("@mui/base/useMenuButton");
|
|
844
|
-
var DropdownNestedRegistryContext = (0,
|
|
807
|
+
var DropdownNestedRegistryContext = (0, import_react9.createContext)(null);
|
|
845
808
|
function Dropdown({ open: openProp, defaultOpen = false, onOpenChange, ...rest }) {
|
|
846
|
-
const [nestedCount, setNestedCount] = (0,
|
|
809
|
+
const [nestedCount, setNestedCount] = (0, import_react9.useState)(0);
|
|
847
810
|
const [open, setOpen] = useControlledState(openProp, defaultOpen);
|
|
848
|
-
const registry = (0,
|
|
811
|
+
const registry = (0, import_react9.useMemo)(
|
|
849
812
|
() => ({
|
|
850
813
|
register: () => setNestedCount((c) => c + 1),
|
|
851
814
|
unregister: () => setNestedCount((c) => Math.max(0, c - 1))
|
|
852
815
|
}),
|
|
853
816
|
[]
|
|
854
817
|
);
|
|
855
|
-
const handleOpenChange = (0,
|
|
818
|
+
const handleOpenChange = (0, import_react9.useCallback)(
|
|
856
819
|
(event, isOpen) => {
|
|
857
820
|
if (nestedCount > 0 && !isOpen && event?.type === "blur") {
|
|
858
821
|
return;
|
|
@@ -862,7 +825,7 @@ function Dropdown({ open: openProp, defaultOpen = false, onOpenChange, ...rest }
|
|
|
862
825
|
},
|
|
863
826
|
[nestedCount, setOpen, onOpenChange]
|
|
864
827
|
);
|
|
865
|
-
return /* @__PURE__ */
|
|
828
|
+
return /* @__PURE__ */ import_react9.default.createElement(DropdownNestedRegistryContext.Provider, { value: registry }, /* @__PURE__ */ import_react9.default.createElement(import_joy14.Dropdown, { open, onOpenChange: handleOpenChange, ...rest }));
|
|
866
829
|
}
|
|
867
830
|
Dropdown.displayName = "Dropdown";
|
|
868
831
|
|
|
@@ -885,29 +848,29 @@ function Breadcrumbs(props) {
|
|
|
885
848
|
} = props;
|
|
886
849
|
const Crumb = (props2) => {
|
|
887
850
|
if (props2.type === "link" && Link4) {
|
|
888
|
-
return /* @__PURE__ */
|
|
851
|
+
return /* @__PURE__ */ import_react10.default.createElement(Link4, { to: props2.linkHref, href: props2.linkHref, ...linkProps }, props2.label);
|
|
889
852
|
} else {
|
|
890
|
-
return /* @__PURE__ */
|
|
853
|
+
return /* @__PURE__ */ import_react10.default.createElement(Typography_default, null, props2.label);
|
|
891
854
|
}
|
|
892
855
|
};
|
|
893
856
|
if (!collapsed) {
|
|
894
|
-
return /* @__PURE__ */
|
|
857
|
+
return /* @__PURE__ */ import_react10.default.createElement(import_joy16.Breadcrumbs, { size, slots: restSlots, slotProps: restSlotProps, ...innerProps }, crumbs.map((crumb, index) => /* @__PURE__ */ import_react10.default.createElement(Crumb, { key: `breadcrumb-${index}`, ...crumb })));
|
|
895
858
|
}
|
|
896
859
|
const _endCrumbCount = Math.max(1, endCrumbCount);
|
|
897
|
-
const frontCrumbs = crumbs.slice(0, startCrumbCount).map((crumb) => /* @__PURE__ */
|
|
898
|
-
const backCrumbs = (startCrumbCount + _endCrumbCount > crumbs.length ? crumbs.slice(startCrumbCount) : crumbs.slice(-_endCrumbCount)).map((crumb) => /* @__PURE__ */
|
|
899
|
-
const collapsedCrumbs = crumbs.slice(startCrumbCount, -_endCrumbCount).map((crumb) => /* @__PURE__ */
|
|
900
|
-
return /* @__PURE__ */
|
|
860
|
+
const frontCrumbs = crumbs.slice(0, startCrumbCount).map((crumb) => /* @__PURE__ */ import_react10.default.createElement(Crumb, { key: `breadcrumb-${crumb.label}`, ...crumb }));
|
|
861
|
+
const backCrumbs = (startCrumbCount + _endCrumbCount > crumbs.length ? crumbs.slice(startCrumbCount) : crumbs.slice(-_endCrumbCount)).map((crumb) => /* @__PURE__ */ import_react10.default.createElement(Crumb, { key: `breadcrumb-${crumb.label}`, ...crumb }));
|
|
862
|
+
const collapsedCrumbs = crumbs.slice(startCrumbCount, -_endCrumbCount).map((crumb) => /* @__PURE__ */ import_react10.default.createElement(MenuItem, { key: `breadcrumb-${crumb.label}` }, /* @__PURE__ */ import_react10.default.createElement(Crumb, { ...crumb })));
|
|
863
|
+
return /* @__PURE__ */ import_react10.default.createElement(import_joy16.Breadcrumbs, { size, slots: restSlots, slotProps: restSlotProps, ...innerProps }, frontCrumbs, collapsedCrumbs.length && /* @__PURE__ */ import_react10.default.createElement(Dropdown_default, null, /* @__PURE__ */ import_react10.default.createElement(import_joy16.MenuButton, { size, variant: "plain" }, "..."), /* @__PURE__ */ import_react10.default.createElement(Menu_default, { size }, collapsedCrumbs)), backCrumbs);
|
|
901
864
|
}
|
|
902
865
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
903
866
|
|
|
904
867
|
// src/components/Button/Button.tsx
|
|
905
|
-
var
|
|
868
|
+
var import_react11 = __toESM(require("react"));
|
|
906
869
|
var import_joy17 = require("@mui/joy");
|
|
907
870
|
var import_framer_motion11 = require("framer-motion");
|
|
908
871
|
var MotionButton = (0, import_framer_motion11.motion)(import_joy17.Button);
|
|
909
|
-
var Button = (0,
|
|
910
|
-
return /* @__PURE__ */
|
|
872
|
+
var Button = (0, import_react11.forwardRef)(({ ...props }, ref) => {
|
|
873
|
+
return /* @__PURE__ */ import_react11.default.createElement(MotionButton, { ref, ...props });
|
|
911
874
|
});
|
|
912
875
|
Button.displayName = "Button";
|
|
913
876
|
|
|
@@ -915,19 +878,19 @@ Button.displayName = "Button";
|
|
|
915
878
|
var Button_default = Button;
|
|
916
879
|
|
|
917
880
|
// src/components/Calendar/Calendar.tsx
|
|
918
|
-
var
|
|
881
|
+
var import_react15 = __toESM(require("react"));
|
|
919
882
|
var import_joy20 = require("@mui/joy");
|
|
920
883
|
var import_ChevronLeft = __toESM(require("@mui/icons-material/ChevronLeft"));
|
|
921
884
|
var import_ChevronRight = __toESM(require("@mui/icons-material/ChevronRight"));
|
|
922
885
|
var import_framer_motion13 = require("framer-motion");
|
|
923
886
|
|
|
924
887
|
// src/components/Tooltip/Tooltip.tsx
|
|
925
|
-
var
|
|
888
|
+
var import_react12 = __toESM(require("react"));
|
|
926
889
|
var import_joy18 = require("@mui/joy");
|
|
927
890
|
var import_framer_motion12 = require("framer-motion");
|
|
928
891
|
var MotionTooltip = (0, import_framer_motion12.motion)(import_joy18.Tooltip);
|
|
929
892
|
var Tooltip = (props) => {
|
|
930
|
-
return /* @__PURE__ */
|
|
893
|
+
return /* @__PURE__ */ import_react12.default.createElement(MotionTooltip, { ...props });
|
|
931
894
|
};
|
|
932
895
|
Tooltip.displayName = "Tooltip";
|
|
933
896
|
|
|
@@ -1009,43 +972,43 @@ var isSameMonth = (date1, date2) => {
|
|
|
1009
972
|
};
|
|
1010
973
|
|
|
1011
974
|
// src/components/Calendar/hooks/use-calendar-props.ts
|
|
1012
|
-
var
|
|
975
|
+
var import_react13 = require("react");
|
|
1013
976
|
var import_joy19 = require("@mui/joy");
|
|
1014
977
|
var resolveView = (view, views) => {
|
|
1015
978
|
return views.includes(view) ? view : views[0];
|
|
1016
979
|
};
|
|
1017
980
|
var useCalendarProps = (inProps) => {
|
|
1018
|
-
const [uncontrolledView, setUncontrolledView] = (0,
|
|
981
|
+
const [uncontrolledView, setUncontrolledView] = (0, import_react13.useState)(
|
|
1019
982
|
() => resolveView(inProps.view || "day", inProps.views || ["day", "month"])
|
|
1020
983
|
);
|
|
1021
|
-
const [uncontrolledValue, setUncontrolledValue] = (0,
|
|
984
|
+
const [uncontrolledValue, setUncontrolledValue] = (0, import_react13.useState)(
|
|
1022
985
|
inProps.defaultValue
|
|
1023
986
|
);
|
|
1024
|
-
const [viewMonth, setViewMonth] = (0,
|
|
987
|
+
const [viewMonth, setViewMonth] = (0, import_react13.useState)(() => {
|
|
1025
988
|
const today = /* @__PURE__ */ new Date();
|
|
1026
989
|
today.setDate(1);
|
|
1027
990
|
today.setHours(0, 0, 0, 0);
|
|
1028
991
|
return inProps.value?.[0] || inProps.defaultValue?.[0] || today;
|
|
1029
992
|
});
|
|
1030
|
-
const [[page, direction], setPage] = (0,
|
|
993
|
+
const [[page, direction], setPage] = (0, import_react13.useState)([0, 0]);
|
|
1031
994
|
const resolvedView = inProps.view ?? uncontrolledView;
|
|
1032
|
-
const resolvedMinDate = (0,
|
|
995
|
+
const resolvedMinDate = (0, import_react13.useMemo)(() => {
|
|
1033
996
|
const minDate = inProps.minDate || /* @__PURE__ */ new Date(0);
|
|
1034
997
|
minDate.setHours(0, 0, 0, 0);
|
|
1035
998
|
return minDate;
|
|
1036
999
|
}, [inProps.minDate]);
|
|
1037
|
-
const resolvedMaxDate = (0,
|
|
1000
|
+
const resolvedMaxDate = (0, import_react13.useMemo)(() => {
|
|
1038
1001
|
const maxDate = inProps.maxDate || /* @__PURE__ */ new Date(864e13);
|
|
1039
1002
|
maxDate.setHours(0, 0, 0, 0);
|
|
1040
1003
|
return maxDate;
|
|
1041
1004
|
}, [inProps.maxDate]);
|
|
1042
|
-
const paginate = (0,
|
|
1005
|
+
const paginate = (0, import_react13.useCallback)(
|
|
1043
1006
|
(newDirection) => {
|
|
1044
1007
|
setPage([page + newDirection, newDirection]);
|
|
1045
1008
|
},
|
|
1046
1009
|
[page]
|
|
1047
1010
|
);
|
|
1048
|
-
const handleViewMonthChange = (0,
|
|
1011
|
+
const handleViewMonthChange = (0, import_react13.useCallback)(
|
|
1049
1012
|
(newMonth) => {
|
|
1050
1013
|
setViewMonth(newMonth);
|
|
1051
1014
|
if (resolvedView === "month") {
|
|
@@ -1093,22 +1056,22 @@ var useCalendarProps = (inProps) => {
|
|
|
1093
1056
|
},
|
|
1094
1057
|
name: "Calendar"
|
|
1095
1058
|
});
|
|
1096
|
-
const ownerState = (0,
|
|
1059
|
+
const ownerState = (0, import_react13.useMemo)(() => ({ ...props, viewMonth, direction }), [props, viewMonth, direction]);
|
|
1097
1060
|
return [props, ownerState];
|
|
1098
1061
|
};
|
|
1099
1062
|
|
|
1100
1063
|
// src/components/Calendar/hooks/use-calendar.ts
|
|
1101
|
-
var
|
|
1064
|
+
var import_react14 = require("react");
|
|
1102
1065
|
var useCalendar = (ownerState) => {
|
|
1103
|
-
const [localHoverDay, setLocalHoverDay] = (0,
|
|
1104
|
-
const [localHoverMonth, setLocalHoverMonth] = (0,
|
|
1066
|
+
const [localHoverDay, setLocalHoverDay] = (0, import_react14.useState)(null);
|
|
1067
|
+
const [localHoverMonth, setLocalHoverMonth] = (0, import_react14.useState)(null);
|
|
1105
1068
|
const hoverDay = ownerState.hoverDay !== void 0 ? ownerState.hoverDay : localHoverDay;
|
|
1106
1069
|
const setHoverDay = ownerState.onHoverDayChange ?? setLocalHoverDay;
|
|
1107
1070
|
const hoverMonth = ownerState.hoverMonth !== void 0 ? ownerState.hoverMonth : localHoverMonth;
|
|
1108
1071
|
const setHoverMonth = ownerState.onHoverMonthChange ?? setLocalHoverMonth;
|
|
1109
1072
|
return {
|
|
1110
1073
|
calendarTitle: ownerState.view === "month" ? getYearName(ownerState.viewMonth, ownerState.locale || "default") : getMonthName(ownerState.viewMonth, ownerState.locale || "default"),
|
|
1111
|
-
onPrev: (0,
|
|
1074
|
+
onPrev: (0, import_react14.useCallback)(() => {
|
|
1112
1075
|
if (ownerState.view === "day") {
|
|
1113
1076
|
const currentDate = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
1114
1077
|
const currentYear = currentDate.getFullYear();
|
|
@@ -1125,7 +1088,7 @@ var useCalendar = (ownerState) => {
|
|
|
1125
1088
|
ownerState.onMonthChange?.(prevYear);
|
|
1126
1089
|
}
|
|
1127
1090
|
}, [ownerState.onMonthChange, ownerState.viewMonth, ownerState.view]),
|
|
1128
|
-
onNext: (0,
|
|
1091
|
+
onNext: (0, import_react14.useCallback)(() => {
|
|
1129
1092
|
if (ownerState.view === "day") {
|
|
1130
1093
|
const currentDate = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
1131
1094
|
const currentYear = currentDate.getFullYear();
|
|
@@ -1142,7 +1105,7 @@ var useCalendar = (ownerState) => {
|
|
|
1142
1105
|
ownerState.onMonthChange?.(nextYear);
|
|
1143
1106
|
}
|
|
1144
1107
|
}, [ownerState.onMonthChange, ownerState.viewMonth, ownerState.view]),
|
|
1145
|
-
getDayCellProps: (0,
|
|
1108
|
+
getDayCellProps: (0, import_react14.useCallback)(
|
|
1146
1109
|
(day) => {
|
|
1147
1110
|
const thisDay = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
1148
1111
|
thisDay.setHours(0, 0, 0, 0);
|
|
@@ -1157,7 +1120,7 @@ var useCalendar = (ownerState) => {
|
|
|
1157
1120
|
},
|
|
1158
1121
|
[ownerState.rangeSelection, ownerState.value, ownerState.viewMonth, hoverDay]
|
|
1159
1122
|
),
|
|
1160
|
-
getMonthCellProps: (0,
|
|
1123
|
+
getMonthCellProps: (0, import_react14.useCallback)(
|
|
1161
1124
|
(monthIndex) => {
|
|
1162
1125
|
const thisMonth = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
1163
1126
|
thisMonth.setDate(1);
|
|
@@ -1174,7 +1137,7 @@ var useCalendar = (ownerState) => {
|
|
|
1174
1137
|
},
|
|
1175
1138
|
[ownerState.rangeSelection, ownerState.value, ownerState.viewMonth, hoverMonth]
|
|
1176
1139
|
),
|
|
1177
|
-
getPickerDayProps: (0,
|
|
1140
|
+
getPickerDayProps: (0, import_react14.useCallback)(
|
|
1178
1141
|
(day) => {
|
|
1179
1142
|
const thisDay = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
1180
1143
|
thisDay.setHours(0, 0, 0, 0);
|
|
@@ -1228,7 +1191,7 @@ var useCalendar = (ownerState) => {
|
|
|
1228
1191
|
hoverDay
|
|
1229
1192
|
]
|
|
1230
1193
|
),
|
|
1231
|
-
getPickerMonthProps: (0,
|
|
1194
|
+
getPickerMonthProps: (0, import_react14.useCallback)(
|
|
1232
1195
|
(monthIndex) => {
|
|
1233
1196
|
const thisMonth = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
1234
1197
|
thisMonth.setDate(1);
|
|
@@ -1525,9 +1488,9 @@ var swipePower = (offset, velocity) => {
|
|
|
1525
1488
|
var PickerDays = (props) => {
|
|
1526
1489
|
const { ownerState } = props;
|
|
1527
1490
|
const { getPickerDayProps, getDayCellProps } = useCalendar(ownerState);
|
|
1528
|
-
const calendarDates = (0,
|
|
1529
|
-
const weekdayNames = (0,
|
|
1530
|
-
return /* @__PURE__ */
|
|
1491
|
+
const calendarDates = (0, import_react15.useMemo)(() => getCalendarDates(ownerState.viewMonth), [ownerState.viewMonth]);
|
|
1492
|
+
const weekdayNames = (0, import_react15.useMemo)(() => getWeekdayNames(ownerState.locale || "default"), [ownerState.locale]);
|
|
1493
|
+
return /* @__PURE__ */ import_react15.default.createElement(CalendarViewContainer, { calendarType: "datePicker" }, /* @__PURE__ */ import_react15.default.createElement(import_framer_motion13.AnimatePresence, { initial: false, custom: ownerState.direction }, /* @__PURE__ */ import_react15.default.createElement(
|
|
1531
1494
|
CalendarViewTable,
|
|
1532
1495
|
{
|
|
1533
1496
|
key: `${ownerState.viewMonth.toString()}_${ownerState.direction}`,
|
|
@@ -1556,10 +1519,10 @@ var PickerDays = (props) => {
|
|
|
1556
1519
|
}
|
|
1557
1520
|
}
|
|
1558
1521
|
},
|
|
1559
|
-
/* @__PURE__ */
|
|
1560
|
-
/* @__PURE__ */
|
|
1561
|
-
(date, i) => date ? /* @__PURE__ */
|
|
1562
|
-
)), rowIndex < calendarDates.length - 1 && /* @__PURE__ */
|
|
1522
|
+
/* @__PURE__ */ import_react15.default.createElement(CalendarWeekHeaderContainer, null, /* @__PURE__ */ import_react15.default.createElement("tr", null, weekdayNames.map((name, i) => /* @__PURE__ */ import_react15.default.createElement(import_react15.Fragment, { key: `${ownerState.viewMonth}_${name}_${i}` }, /* @__PURE__ */ import_react15.default.createElement("th", null, /* @__PURE__ */ import_react15.default.createElement(Typography_default, { level: "body-xs", textAlign: "center" }, name)), i < 6 && /* @__PURE__ */ import_react15.default.createElement("th", { style: { width: 4 }, "aria-hidden": "true", "aria-description": "cell-gap" }))))),
|
|
1523
|
+
/* @__PURE__ */ import_react15.default.createElement(CalendarDayPickerContainer, null, calendarDates.map((weekDates, rowIndex) => /* @__PURE__ */ import_react15.default.createElement(import_react15.Fragment, { key: `${ownerState.viewMonth}_${rowIndex}` }, /* @__PURE__ */ import_react15.default.createElement("tr", null, weekDates.map(
|
|
1524
|
+
(date, i) => date ? /* @__PURE__ */ import_react15.default.createElement(import_react15.Fragment, { key: `${ownerState.viewMonth}_${date}_${i}` }, /* @__PURE__ */ import_react15.default.createElement(CalendarDayCell, { ...getDayCellProps(date) }, /* @__PURE__ */ import_react15.default.createElement(CalendarDay, { size: "sm", variant: "plain", color: "neutral", ...getPickerDayProps(date) }, date)), i < 6 && /* @__PURE__ */ import_react15.default.createElement("td", { "aria-hidden": "true", "aria-description": "cell-gap" })) : /* @__PURE__ */ import_react15.default.createElement(import_react15.Fragment, { key: `${ownerState.viewMonth}_${i}` }, /* @__PURE__ */ import_react15.default.createElement("td", null), i < 6 && /* @__PURE__ */ import_react15.default.createElement("td", { "aria-hidden": "true", "aria-description": "cell-gap" }))
|
|
1525
|
+
)), rowIndex < calendarDates.length - 1 && /* @__PURE__ */ import_react15.default.createElement("tr", { "aria-hidden": "true", "aria-description": "row-gap" }, /* @__PURE__ */ import_react15.default.createElement("td", { colSpan: 13, style: { height: 4 } })))))
|
|
1563
1526
|
)));
|
|
1564
1527
|
};
|
|
1565
1528
|
var PickerMonths = (props) => {
|
|
@@ -1576,7 +1539,7 @@ var PickerMonths = (props) => {
|
|
|
1576
1539
|
[[]]
|
|
1577
1540
|
);
|
|
1578
1541
|
const isMonthPicker = !ownerState.views?.find((view) => view === "day");
|
|
1579
|
-
return /* @__PURE__ */
|
|
1542
|
+
return /* @__PURE__ */ import_react15.default.createElement(CalendarViewContainer, { calendarType: isMonthPicker ? "monthPicker" : "datePicker" }, /* @__PURE__ */ import_react15.default.createElement(import_framer_motion13.AnimatePresence, { initial: false, custom: ownerState.direction }, /* @__PURE__ */ import_react15.default.createElement(
|
|
1580
1543
|
CalendarViewTable,
|
|
1581
1544
|
{
|
|
1582
1545
|
key: `${ownerState.viewMonth.getFullYear()}_${ownerState.direction}`,
|
|
@@ -1605,16 +1568,16 @@ var PickerMonths = (props) => {
|
|
|
1605
1568
|
}
|
|
1606
1569
|
}
|
|
1607
1570
|
},
|
|
1608
|
-
/* @__PURE__ */
|
|
1571
|
+
/* @__PURE__ */ import_react15.default.createElement("tbody", null, chunkedMonths.map((months, i) => /* @__PURE__ */ import_react15.default.createElement(import_react15.Fragment, { key: months.join("_") }, /* @__PURE__ */ import_react15.default.createElement("tr", null, months.map((monthIndex, j) => /* @__PURE__ */ import_react15.default.createElement(import_react15.Fragment, { key: monthIndex }, /* @__PURE__ */ import_react15.default.createElement(CalendarMonthCell, { ...getMonthCellProps(monthIndex) }, /* @__PURE__ */ import_react15.default.createElement(CalendarMonth, { size: "sm", variant: "plain", color: "neutral", ...getPickerMonthProps(monthIndex) }, getMonthNameFromIndex(monthIndex, ownerState.locale))), j < 3 && /* @__PURE__ */ import_react15.default.createElement("td", { style: { width: 4 }, "aria-hidden": "true", "aria-description": "cell-gap" })))), i < chunkedMonths.length - 1 && /* @__PURE__ */ import_react15.default.createElement("tr", { "aria-hidden": "true", "aria-description": "row-gap" }, /* @__PURE__ */ import_react15.default.createElement("td", { colSpan: 7, style: { height: 4 } })))))
|
|
1609
1572
|
)));
|
|
1610
1573
|
};
|
|
1611
1574
|
var PlainPickerDays = ({ ownerState }) => {
|
|
1612
1575
|
const { getPickerDayProps, getDayCellProps } = useCalendar(ownerState);
|
|
1613
|
-
const calendarDates = (0,
|
|
1614
|
-
const weekdayNames = (0,
|
|
1615
|
-
return /* @__PURE__ */
|
|
1616
|
-
(date, i) => date ? /* @__PURE__ */
|
|
1617
|
-
)), rowIndex < calendarDates.length - 1 && /* @__PURE__ */
|
|
1576
|
+
const calendarDates = (0, import_react15.useMemo)(() => getCalendarDates(ownerState.viewMonth), [ownerState.viewMonth]);
|
|
1577
|
+
const weekdayNames = (0, import_react15.useMemo)(() => getWeekdayNames(ownerState.locale || "default"), [ownerState.locale]);
|
|
1578
|
+
return /* @__PURE__ */ import_react15.default.createElement(StaticCalendarViewTable, null, /* @__PURE__ */ import_react15.default.createElement(CalendarWeekHeaderContainer, null, /* @__PURE__ */ import_react15.default.createElement("tr", null, weekdayNames.map((name, i) => /* @__PURE__ */ import_react15.default.createElement(import_react15.Fragment, { key: `${ownerState.viewMonth}_${name}_${i}` }, /* @__PURE__ */ import_react15.default.createElement("th", null, /* @__PURE__ */ import_react15.default.createElement(Typography_default, { level: "body-xs", textAlign: "center" }, name)), i < 6 && /* @__PURE__ */ import_react15.default.createElement("th", { style: { width: 4 }, "aria-hidden": "true", "aria-description": "cell-gap" }))))), /* @__PURE__ */ import_react15.default.createElement(CalendarDayPickerContainer, null, calendarDates.map((weekDates, rowIndex) => /* @__PURE__ */ import_react15.default.createElement(import_react15.Fragment, { key: `${ownerState.viewMonth}_${rowIndex}` }, /* @__PURE__ */ import_react15.default.createElement("tr", null, weekDates.map(
|
|
1579
|
+
(date, i) => date ? /* @__PURE__ */ import_react15.default.createElement(import_react15.Fragment, { key: `${ownerState.viewMonth}_${date}_${i}` }, /* @__PURE__ */ import_react15.default.createElement(CalendarDayCell, { ...getDayCellProps(date) }, /* @__PURE__ */ import_react15.default.createElement(CalendarDay, { size: "sm", variant: "plain", color: "neutral", ...getPickerDayProps(date) }, date)), i < 6 && /* @__PURE__ */ import_react15.default.createElement("td", { "aria-hidden": "true", "aria-description": "cell-gap" })) : /* @__PURE__ */ import_react15.default.createElement(import_react15.Fragment, { key: `${ownerState.viewMonth}_${i}` }, /* @__PURE__ */ import_react15.default.createElement("td", null), i < 6 && /* @__PURE__ */ import_react15.default.createElement("td", { "aria-hidden": "true", "aria-description": "cell-gap" }))
|
|
1580
|
+
)), rowIndex < calendarDates.length - 1 && /* @__PURE__ */ import_react15.default.createElement("tr", { "aria-hidden": "true", "aria-description": "row-gap" }, /* @__PURE__ */ import_react15.default.createElement("td", { colSpan: 13, style: { height: 4 } }))))));
|
|
1618
1581
|
};
|
|
1619
1582
|
var MultiMonthPickerDays = ({
|
|
1620
1583
|
panels,
|
|
@@ -1633,7 +1596,7 @@ var MultiMonthPickerDays = ({
|
|
|
1633
1596
|
})
|
|
1634
1597
|
};
|
|
1635
1598
|
const key = `${panels[0].viewMonth.toISOString()}_${direction}`;
|
|
1636
|
-
return /* @__PURE__ */
|
|
1599
|
+
return /* @__PURE__ */ import_react15.default.createElement("div", { style: { position: "relative", overflow: "hidden", minHeight: "250px" } }, /* @__PURE__ */ import_react15.default.createElement(import_framer_motion13.AnimatePresence, { initial: false, custom: direction }, /* @__PURE__ */ import_react15.default.createElement(
|
|
1637
1600
|
import_framer_motion13.motion.div,
|
|
1638
1601
|
{
|
|
1639
1602
|
key,
|
|
@@ -1663,7 +1626,7 @@ var MultiMonthPickerDays = ({
|
|
|
1663
1626
|
},
|
|
1664
1627
|
style: { display: "flex", gap: `${CALENDAR_PANEL_GAP}px`, top: 0, left: 0, width: "100%" }
|
|
1665
1628
|
},
|
|
1666
|
-
panels.map((panelOwnerState) => /* @__PURE__ */
|
|
1629
|
+
panels.map((panelOwnerState) => /* @__PURE__ */ import_react15.default.createElement(
|
|
1667
1630
|
"div",
|
|
1668
1631
|
{
|
|
1669
1632
|
key: panelOwnerState.viewMonth.toISOString(),
|
|
@@ -1675,7 +1638,7 @@ var MultiMonthPickerDays = ({
|
|
|
1675
1638
|
boxSizing: "border-box"
|
|
1676
1639
|
}
|
|
1677
1640
|
},
|
|
1678
|
-
/* @__PURE__ */
|
|
1641
|
+
/* @__PURE__ */ import_react15.default.createElement(PlainPickerDays, { ownerState: panelOwnerState })
|
|
1679
1642
|
))
|
|
1680
1643
|
)));
|
|
1681
1644
|
};
|
|
@@ -1692,7 +1655,7 @@ var CalendarPanel = ({
|
|
|
1692
1655
|
const showPrev = panelIndex === 0;
|
|
1693
1656
|
const showNext = panelIndex === totalPanels - 1;
|
|
1694
1657
|
const title = ownerState.view === "month" ? getYearName(ownerState.viewMonth, ownerState.locale || "default") : getMonthName(ownerState.viewMonth, ownerState.locale || "default");
|
|
1695
|
-
return /* @__PURE__ */
|
|
1658
|
+
return /* @__PURE__ */ import_react15.default.createElement("div", { style: { flex: 1, maxWidth: `${CALENDAR_PANEL_WIDTH}px` } }, /* @__PURE__ */ import_react15.default.createElement(CalendarHeader, null, /* @__PURE__ */ import_react15.default.createElement(
|
|
1696
1659
|
IconButton_default,
|
|
1697
1660
|
{
|
|
1698
1661
|
size: "sm",
|
|
@@ -1700,8 +1663,8 @@ var CalendarPanel = ({
|
|
|
1700
1663
|
"aria-label": `Previous ${ownerState.view === "day" ? "Month" : "Year"}`,
|
|
1701
1664
|
style: { visibility: showPrev ? "visible" : "hidden" }
|
|
1702
1665
|
},
|
|
1703
|
-
/* @__PURE__ */
|
|
1704
|
-
), /* @__PURE__ */
|
|
1666
|
+
/* @__PURE__ */ import_react15.default.createElement(import_ChevronLeft.default, null)
|
|
1667
|
+
), /* @__PURE__ */ import_react15.default.createElement(
|
|
1705
1668
|
Tooltip_default,
|
|
1706
1669
|
{
|
|
1707
1670
|
title: monthViewHintMessage,
|
|
@@ -1713,7 +1676,7 @@ var CalendarPanel = ({
|
|
|
1713
1676
|
disableTouchListener: true,
|
|
1714
1677
|
variant: "solid"
|
|
1715
1678
|
},
|
|
1716
|
-
/* @__PURE__ */
|
|
1679
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
|
1717
1680
|
CalendarSwitchViewButton,
|
|
1718
1681
|
{
|
|
1719
1682
|
ownerState,
|
|
@@ -1724,7 +1687,7 @@ var CalendarPanel = ({
|
|
|
1724
1687
|
},
|
|
1725
1688
|
title
|
|
1726
1689
|
)
|
|
1727
|
-
), /* @__PURE__ */
|
|
1690
|
+
), /* @__PURE__ */ import_react15.default.createElement(
|
|
1728
1691
|
IconButton_default,
|
|
1729
1692
|
{
|
|
1730
1693
|
size: "sm",
|
|
@@ -1732,10 +1695,10 @@ var CalendarPanel = ({
|
|
|
1732
1695
|
"aria-label": `Next ${ownerState.view === "day" ? "Month" : "Year"}`,
|
|
1733
1696
|
style: { visibility: showNext ? "visible" : "hidden" }
|
|
1734
1697
|
},
|
|
1735
|
-
/* @__PURE__ */
|
|
1698
|
+
/* @__PURE__ */ import_react15.default.createElement(import_ChevronRight.default, null)
|
|
1736
1699
|
)));
|
|
1737
1700
|
};
|
|
1738
|
-
var Calendar = (0,
|
|
1701
|
+
var Calendar = (0, import_react15.forwardRef)((inProps, ref) => {
|
|
1739
1702
|
const [props, ownerState] = useCalendarProps(inProps);
|
|
1740
1703
|
const {
|
|
1741
1704
|
value,
|
|
@@ -1751,44 +1714,42 @@ var Calendar = (0, import_react16.forwardRef)((inProps, ref) => {
|
|
|
1751
1714
|
maxDate,
|
|
1752
1715
|
disableFuture,
|
|
1753
1716
|
disablePast,
|
|
1754
|
-
shouldDisableDate,
|
|
1755
|
-
slots,
|
|
1756
1717
|
numberOfMonths,
|
|
1757
1718
|
...others
|
|
1758
1719
|
} = props;
|
|
1759
1720
|
const { calendarTitle, onPrev, onNext } = useCalendar(ownerState);
|
|
1760
|
-
const [isMonthViewAssistHintOpen, setIsMonthViewAssistHintOpen] = (0,
|
|
1761
|
-
const monthNavClickTimestampsRef = (0,
|
|
1762
|
-
const monthViewAssistHintShownInSessionRef = (0,
|
|
1763
|
-
const monthViewAssistHintTimeoutRef = (0,
|
|
1764
|
-
const [hoverDay, setHoverDay] = (0,
|
|
1765
|
-
const [hoverMonth, setHoverMonth] = (0,
|
|
1721
|
+
const [isMonthViewAssistHintOpen, setIsMonthViewAssistHintOpen] = (0, import_react15.useState)(false);
|
|
1722
|
+
const monthNavClickTimestampsRef = (0, import_react15.useRef)([]);
|
|
1723
|
+
const monthViewAssistHintShownInSessionRef = (0, import_react15.useRef)(false);
|
|
1724
|
+
const monthViewAssistHintTimeoutRef = (0, import_react15.useRef)(null);
|
|
1725
|
+
const [hoverDay, setHoverDay] = (0, import_react15.useState)(null);
|
|
1726
|
+
const [hoverMonth, setHoverMonth] = (0, import_react15.useState)(null);
|
|
1766
1727
|
const resolvedNumberOfMonths = numberOfMonths ?? 1;
|
|
1767
1728
|
const hasEndDate = Boolean(value?.[1]);
|
|
1768
1729
|
const isRangeHintEligible = Boolean(rangeSelection && !hasEndDate);
|
|
1769
1730
|
const isHintEligible = Boolean(view === "day" && (!rangeSelection || isRangeHintEligible));
|
|
1770
1731
|
const monthViewHintMessage = MONTH_VIEW_HINT_MESSAGE;
|
|
1771
|
-
(0,
|
|
1732
|
+
(0, import_react15.useEffect)(() => {
|
|
1772
1733
|
if (!isHintEligible) {
|
|
1773
1734
|
monthNavClickTimestampsRef.current = [];
|
|
1774
1735
|
setIsMonthViewAssistHintOpen(false);
|
|
1775
1736
|
}
|
|
1776
1737
|
}, [isHintEligible]);
|
|
1777
|
-
(0,
|
|
1738
|
+
(0, import_react15.useEffect)(() => {
|
|
1778
1739
|
return () => {
|
|
1779
1740
|
if (monthViewAssistHintTimeoutRef.current) {
|
|
1780
1741
|
clearTimeout(monthViewAssistHintTimeoutRef.current);
|
|
1781
1742
|
}
|
|
1782
1743
|
};
|
|
1783
1744
|
}, []);
|
|
1784
|
-
const closeMonthViewAssistHint = (0,
|
|
1745
|
+
const closeMonthViewAssistHint = (0, import_react15.useCallback)(() => {
|
|
1785
1746
|
if (monthViewAssistHintTimeoutRef.current) {
|
|
1786
1747
|
clearTimeout(monthViewAssistHintTimeoutRef.current);
|
|
1787
1748
|
monthViewAssistHintTimeoutRef.current = null;
|
|
1788
1749
|
}
|
|
1789
1750
|
setIsMonthViewAssistHintOpen(false);
|
|
1790
1751
|
}, []);
|
|
1791
|
-
const showMonthViewAssistHint = (0,
|
|
1752
|
+
const showMonthViewAssistHint = (0, import_react15.useCallback)(() => {
|
|
1792
1753
|
const now = Date.now();
|
|
1793
1754
|
if (monthViewAssistHintShownInSessionRef.current) return;
|
|
1794
1755
|
if (now - lastMonthViewAssistHintShownAt < MONTH_VIEW_HINT_COOLDOWN_MS) return;
|
|
@@ -1803,7 +1764,7 @@ var Calendar = (0, import_react16.forwardRef)((inProps, ref) => {
|
|
|
1803
1764
|
monthViewAssistHintTimeoutRef.current = null;
|
|
1804
1765
|
}, MONTH_VIEW_HINT_DURATION_MS);
|
|
1805
1766
|
}, []);
|
|
1806
|
-
const trackFastMonthNavigation = (0,
|
|
1767
|
+
const trackFastMonthNavigation = (0, import_react15.useCallback)(() => {
|
|
1807
1768
|
if (!isHintEligible) return;
|
|
1808
1769
|
const now = Date.now();
|
|
1809
1770
|
monthNavClickTimestampsRef.current = [
|
|
@@ -1814,15 +1775,15 @@ var Calendar = (0, import_react16.forwardRef)((inProps, ref) => {
|
|
|
1814
1775
|
showMonthViewAssistHint();
|
|
1815
1776
|
}
|
|
1816
1777
|
}, [isHintEligible, showMonthViewAssistHint]);
|
|
1817
|
-
const handlePrevClick = (0,
|
|
1778
|
+
const handlePrevClick = (0, import_react15.useCallback)(() => {
|
|
1818
1779
|
onPrev();
|
|
1819
1780
|
trackFastMonthNavigation();
|
|
1820
1781
|
}, [onPrev, trackFastMonthNavigation]);
|
|
1821
|
-
const handleNextClick = (0,
|
|
1782
|
+
const handleNextClick = (0, import_react15.useCallback)(() => {
|
|
1822
1783
|
onNext();
|
|
1823
1784
|
trackFastMonthNavigation();
|
|
1824
1785
|
}, [onNext, trackFastMonthNavigation]);
|
|
1825
|
-
const handleSwitchViewClick = (0,
|
|
1786
|
+
const handleSwitchViewClick = (0, import_react15.useCallback)(() => {
|
|
1826
1787
|
closeMonthViewAssistHint();
|
|
1827
1788
|
onViewChange?.();
|
|
1828
1789
|
}, [closeMonthViewAssistHint, onViewChange]);
|
|
@@ -1842,9 +1803,9 @@ var Calendar = (0, import_react16.forwardRef)((inProps, ref) => {
|
|
|
1842
1803
|
onHoverMonthChange: setHoverMonth
|
|
1843
1804
|
};
|
|
1844
1805
|
});
|
|
1845
|
-
return /* @__PURE__ */
|
|
1806
|
+
return /* @__PURE__ */ import_react15.default.createElement(CalendarRoot, { ref, ...others, style: { maxWidth: `${maxWidth}px` } }, view === "month" ? (
|
|
1846
1807
|
// Month view: single header + single month grid (consistent with single-month path)
|
|
1847
|
-
/* @__PURE__ */
|
|
1808
|
+
/* @__PURE__ */ import_react15.default.createElement(import_react15.default.Fragment, null, /* @__PURE__ */ import_react15.default.createElement(CalendarHeader, null, /* @__PURE__ */ import_react15.default.createElement(IconButton_default, { size: "sm", onClick: handlePrevClick, "aria-label": "Previous Year" }, /* @__PURE__ */ import_react15.default.createElement(import_ChevronLeft.default, null)), /* @__PURE__ */ import_react15.default.createElement(
|
|
1848
1809
|
Tooltip_default,
|
|
1849
1810
|
{
|
|
1850
1811
|
title: monthViewHintMessage,
|
|
@@ -1856,7 +1817,7 @@ var Calendar = (0, import_react16.forwardRef)((inProps, ref) => {
|
|
|
1856
1817
|
disableTouchListener: true,
|
|
1857
1818
|
variant: "solid"
|
|
1858
1819
|
},
|
|
1859
|
-
/* @__PURE__ */
|
|
1820
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
|
1860
1821
|
CalendarSwitchViewButton,
|
|
1861
1822
|
{
|
|
1862
1823
|
ownerState,
|
|
@@ -1867,8 +1828,8 @@ var Calendar = (0, import_react16.forwardRef)((inProps, ref) => {
|
|
|
1867
1828
|
},
|
|
1868
1829
|
calendarTitle
|
|
1869
1830
|
)
|
|
1870
|
-
), /* @__PURE__ */
|
|
1871
|
-
) : /* @__PURE__ */
|
|
1831
|
+
), /* @__PURE__ */ import_react15.default.createElement(IconButton_default, { size: "sm", onClick: handleNextClick, "aria-label": "Next Year" }, /* @__PURE__ */ import_react15.default.createElement(import_ChevronRight.default, null))), /* @__PURE__ */ import_react15.default.createElement(PickerMonths, { ownerState }))
|
|
1832
|
+
) : /* @__PURE__ */ import_react15.default.createElement(import_react15.default.Fragment, null, /* @__PURE__ */ import_react15.default.createElement(CalendarMultiContainer, null, panels.map((panelOwnerState, i) => /* @__PURE__ */ import_react15.default.createElement(
|
|
1872
1833
|
CalendarPanel,
|
|
1873
1834
|
{
|
|
1874
1835
|
key: panelOwnerState.viewMonth.toISOString(),
|
|
@@ -1881,7 +1842,7 @@ var Calendar = (0, import_react16.forwardRef)((inProps, ref) => {
|
|
|
1881
1842
|
isMonthViewAssistHintOpen,
|
|
1882
1843
|
monthViewHintMessage
|
|
1883
1844
|
}
|
|
1884
|
-
))), /* @__PURE__ */
|
|
1845
|
+
))), /* @__PURE__ */ import_react15.default.createElement(
|
|
1885
1846
|
MultiMonthPickerDays,
|
|
1886
1847
|
{
|
|
1887
1848
|
panels,
|
|
@@ -1890,7 +1851,7 @@ var Calendar = (0, import_react16.forwardRef)((inProps, ref) => {
|
|
|
1890
1851
|
}
|
|
1891
1852
|
)));
|
|
1892
1853
|
}
|
|
1893
|
-
return /* @__PURE__ */
|
|
1854
|
+
return /* @__PURE__ */ import_react15.default.createElement(CalendarRoot, { ref, ...others, style: { maxWidth: `${maxWidth}px` } }, /* @__PURE__ */ import_react15.default.createElement(CalendarHeader, null, /* @__PURE__ */ import_react15.default.createElement(IconButton_default, { size: "sm", onClick: handlePrevClick, "aria-label": `Previous ${view === "day" ? "Month" : "Year"}` }, /* @__PURE__ */ import_react15.default.createElement(import_ChevronLeft.default, null)), /* @__PURE__ */ import_react15.default.createElement(
|
|
1894
1855
|
Tooltip_default,
|
|
1895
1856
|
{
|
|
1896
1857
|
title: monthViewHintMessage,
|
|
@@ -1902,7 +1863,7 @@ var Calendar = (0, import_react16.forwardRef)((inProps, ref) => {
|
|
|
1902
1863
|
disableTouchListener: true,
|
|
1903
1864
|
variant: "solid"
|
|
1904
1865
|
},
|
|
1905
|
-
/* @__PURE__ */
|
|
1866
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
|
1906
1867
|
CalendarSwitchViewButton,
|
|
1907
1868
|
{
|
|
1908
1869
|
ownerState,
|
|
@@ -1913,7 +1874,7 @@ var Calendar = (0, import_react16.forwardRef)((inProps, ref) => {
|
|
|
1913
1874
|
},
|
|
1914
1875
|
calendarTitle
|
|
1915
1876
|
)
|
|
1916
|
-
), /* @__PURE__ */
|
|
1877
|
+
), /* @__PURE__ */ import_react15.default.createElement(IconButton_default, { size: "sm", onClick: handleNextClick, "aria-label": `Next ${view === "day" ? "Month" : "Year"}` }, /* @__PURE__ */ import_react15.default.createElement(import_ChevronRight.default, null))), view === "day" && /* @__PURE__ */ import_react15.default.createElement(PickerDays, { ownerState }), view === "month" && /* @__PURE__ */ import_react15.default.createElement(PickerMonths, { ownerState }));
|
|
1917
1878
|
});
|
|
1918
1879
|
Calendar.displayName = "Calendar";
|
|
1919
1880
|
|
|
@@ -1940,12 +1901,12 @@ var CardOverflow = MotionCardOverflow;
|
|
|
1940
1901
|
CardOverflow.displayName = "CardOverflow";
|
|
1941
1902
|
|
|
1942
1903
|
// src/components/Checkbox/Checkbox.tsx
|
|
1943
|
-
var
|
|
1904
|
+
var import_react16 = __toESM(require("react"));
|
|
1944
1905
|
var import_joy22 = require("@mui/joy");
|
|
1945
1906
|
var import_framer_motion15 = require("framer-motion");
|
|
1946
1907
|
var MotionCheckbox = (0, import_framer_motion15.motion)(import_joy22.Checkbox);
|
|
1947
1908
|
var Checkbox = (props) => {
|
|
1948
|
-
return /* @__PURE__ */
|
|
1909
|
+
return /* @__PURE__ */ import_react16.default.createElement(MotionCheckbox, { ...props });
|
|
1949
1910
|
};
|
|
1950
1911
|
Checkbox.displayName = "Checkbox";
|
|
1951
1912
|
|
|
@@ -1954,7 +1915,7 @@ var Checkbox_default = Checkbox;
|
|
|
1954
1915
|
|
|
1955
1916
|
// src/components/Container/Container.tsx
|
|
1956
1917
|
var import_joy23 = require("@mui/joy");
|
|
1957
|
-
var
|
|
1918
|
+
var import_react17 = __toESM(require("react"));
|
|
1958
1919
|
var ContainerRoot = (0, import_joy23.styled)("div", {
|
|
1959
1920
|
name: "Container",
|
|
1960
1921
|
slot: "root",
|
|
@@ -1980,24 +1941,24 @@ var ContainerRoot = (0, import_joy23.styled)("div", {
|
|
|
1980
1941
|
paddingRight: theme.breakpoints.values[overrideBreakpoint] >= theme.breakpoints.values.lg ? theme.spacing(8) : theme.spacing(4)
|
|
1981
1942
|
} : null
|
|
1982
1943
|
]);
|
|
1983
|
-
var Container = (0,
|
|
1984
|
-
return /* @__PURE__ */
|
|
1944
|
+
var Container = (0, import_react17.forwardRef)(function Container2(props, ref) {
|
|
1945
|
+
return /* @__PURE__ */ import_react17.default.createElement(ContainerRoot, { ref, ...props });
|
|
1985
1946
|
});
|
|
1986
1947
|
Container.displayName = "Container";
|
|
1987
1948
|
|
|
1988
1949
|
// src/components/CurrencyInput/CurrencyInput.tsx
|
|
1989
|
-
var
|
|
1950
|
+
var import_react19 = __toESM(require("react"));
|
|
1990
1951
|
var import_react_number_format = require("react-number-format");
|
|
1991
1952
|
|
|
1992
1953
|
// src/components/Input/Input.tsx
|
|
1993
|
-
var
|
|
1954
|
+
var import_react18 = __toESM(require("react"));
|
|
1994
1955
|
var import_joy24 = require("@mui/joy");
|
|
1995
1956
|
var import_framer_motion16 = require("framer-motion");
|
|
1996
1957
|
var import_Close2 = __toESM(require("@mui/icons-material/Close"));
|
|
1997
1958
|
var import_Visibility = __toESM(require("@mui/icons-material/Visibility"));
|
|
1998
1959
|
var import_VisibilityOff = __toESM(require("@mui/icons-material/VisibilityOff"));
|
|
1999
1960
|
var MotionInput = (0, import_framer_motion16.motion)(import_joy24.Input);
|
|
2000
|
-
var Input =
|
|
1961
|
+
var Input = import_react18.default.forwardRef((props, ref) => {
|
|
2001
1962
|
const {
|
|
2002
1963
|
label,
|
|
2003
1964
|
helperText,
|
|
@@ -2024,11 +1985,11 @@ var Input = import_react19.default.forwardRef((props, ref) => {
|
|
|
2024
1985
|
if (type === "password" && innerProps.endDecorator) {
|
|
2025
1986
|
console.warn('Input: endDecorator is not supported when type="password"');
|
|
2026
1987
|
}
|
|
2027
|
-
const [passwordVisible, setPasswordVisible] = (0,
|
|
1988
|
+
const [passwordVisible, setPasswordVisible] = (0, import_react18.useState)(false);
|
|
2028
1989
|
const [value, setValue] = useControlledState(
|
|
2029
1990
|
valueProp,
|
|
2030
1991
|
defaultValueProp ?? null,
|
|
2031
|
-
(0,
|
|
1992
|
+
(0, import_react18.useCallback)(
|
|
2032
1993
|
(value2) => {
|
|
2033
1994
|
onChange?.({
|
|
2034
1995
|
/**
|
|
@@ -2055,7 +2016,7 @@ var Input = import_react19.default.forwardRef((props, ref) => {
|
|
|
2055
2016
|
const actualType = type === "password" && passwordVisible ? "text" : type;
|
|
2056
2017
|
const isPasswordType = type === "password";
|
|
2057
2018
|
const showPasswordToggle = isPasswordType && !disableTogglePasswordButton;
|
|
2058
|
-
const input = /* @__PURE__ */
|
|
2019
|
+
const input = /* @__PURE__ */ import_react18.default.createElement(
|
|
2059
2020
|
MotionInput,
|
|
2060
2021
|
{
|
|
2061
2022
|
value: displayValue ?? "",
|
|
@@ -2070,7 +2031,7 @@ var Input = import_react19.default.forwardRef((props, ref) => {
|
|
|
2070
2031
|
...innerProps.slotProps
|
|
2071
2032
|
},
|
|
2072
2033
|
...innerProps,
|
|
2073
|
-
endDecorator: isPasswordType ? showPasswordToggle ? /* @__PURE__ */
|
|
2034
|
+
endDecorator: isPasswordType ? showPasswordToggle ? /* @__PURE__ */ import_react18.default.createElement(Stack_default, { gap: 1, direction: "row" }, /* @__PURE__ */ import_react18.default.createElement(
|
|
2074
2035
|
IconButton_default,
|
|
2075
2036
|
{
|
|
2076
2037
|
onMouseDown: (e) => e.preventDefault(),
|
|
@@ -2078,19 +2039,19 @@ var Input = import_react19.default.forwardRef((props, ref) => {
|
|
|
2078
2039
|
disabled,
|
|
2079
2040
|
"aria-label": passwordVisible ? "Hide password" : "Show password"
|
|
2080
2041
|
},
|
|
2081
|
-
passwordVisible ? /* @__PURE__ */
|
|
2082
|
-
)) : null : enableClearable ? /* @__PURE__ */
|
|
2042
|
+
passwordVisible ? /* @__PURE__ */ import_react18.default.createElement(import_VisibilityOff.default, null) : /* @__PURE__ */ import_react18.default.createElement(import_Visibility.default, null)
|
|
2043
|
+
)) : null : enableClearable ? /* @__PURE__ */ import_react18.default.createElement(Stack_default, { gap: 1, direction: "row" }, innerProps.endDecorator, displayValue && /* @__PURE__ */ import_react18.default.createElement(
|
|
2083
2044
|
IconButton_default,
|
|
2084
2045
|
{
|
|
2085
2046
|
onMouseDown: (e) => e.preventDefault(),
|
|
2086
2047
|
onClick: handleClear,
|
|
2087
2048
|
"aria-label": "Clear"
|
|
2088
2049
|
},
|
|
2089
|
-
/* @__PURE__ */
|
|
2050
|
+
/* @__PURE__ */ import_react18.default.createElement(import_Close2.default, null)
|
|
2090
2051
|
)) : innerProps.endDecorator
|
|
2091
2052
|
}
|
|
2092
2053
|
);
|
|
2093
|
-
return /* @__PURE__ */
|
|
2054
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
|
2094
2055
|
FormControl_default,
|
|
2095
2056
|
{
|
|
2096
2057
|
required,
|
|
@@ -2101,9 +2062,9 @@ var Input = import_react19.default.forwardRef((props, ref) => {
|
|
|
2101
2062
|
sx,
|
|
2102
2063
|
className
|
|
2103
2064
|
},
|
|
2104
|
-
label && /* @__PURE__ */
|
|
2065
|
+
label && /* @__PURE__ */ import_react18.default.createElement(FormLabel_default, null, label),
|
|
2105
2066
|
input,
|
|
2106
|
-
helperText && /* @__PURE__ */
|
|
2067
|
+
helperText && /* @__PURE__ */ import_react18.default.createElement(FormHelperText_default, null, helperText)
|
|
2107
2068
|
);
|
|
2108
2069
|
});
|
|
2109
2070
|
Input.displayName = "Input";
|
|
@@ -2275,9 +2236,9 @@ var useCurrencySetting = (props) => {
|
|
|
2275
2236
|
};
|
|
2276
2237
|
|
|
2277
2238
|
// src/components/CurrencyInput/CurrencyInput.tsx
|
|
2278
|
-
var TextMaskAdapter =
|
|
2239
|
+
var TextMaskAdapter = import_react19.default.forwardRef(function TextMaskAdapter2(props, ref) {
|
|
2279
2240
|
const { onChange, ...innerProps } = props;
|
|
2280
|
-
return /* @__PURE__ */
|
|
2241
|
+
return /* @__PURE__ */ import_react19.default.createElement(
|
|
2281
2242
|
import_react_number_format.NumericFormat,
|
|
2282
2243
|
{
|
|
2283
2244
|
...innerProps,
|
|
@@ -2297,7 +2258,7 @@ var CurrencyInputRoot = (0, import_joy25.styled)(Input_default, {
|
|
|
2297
2258
|
slot: "root",
|
|
2298
2259
|
overridesResolver: (props, styles) => styles.root
|
|
2299
2260
|
})({});
|
|
2300
|
-
var CurrencyInput =
|
|
2261
|
+
var CurrencyInput = import_react19.default.forwardRef(function CurrencyInput2(inProps, ref) {
|
|
2301
2262
|
const props = (0, import_joy25.useThemeProps)({ props: inProps, name: "CurrencyInput" });
|
|
2302
2263
|
const {
|
|
2303
2264
|
currency = "USD",
|
|
@@ -2318,22 +2279,22 @@ var CurrencyInput = import_react20.default.forwardRef(function CurrencyInput2(in
|
|
|
2318
2279
|
const [_value, setValue] = useControlledState(
|
|
2319
2280
|
props.value,
|
|
2320
2281
|
props.defaultValue ?? null,
|
|
2321
|
-
(0,
|
|
2282
|
+
(0, import_react19.useCallback)((value2) => onChange?.({ target: { name, value: value2 } }), [onChange, name])
|
|
2322
2283
|
);
|
|
2323
|
-
const value = (0,
|
|
2284
|
+
const value = (0, import_react19.useMemo)(() => {
|
|
2324
2285
|
if (_value && useMinorUnit) {
|
|
2325
2286
|
return _value / Math.pow(10, decimalScale);
|
|
2326
2287
|
}
|
|
2327
2288
|
return _value;
|
|
2328
2289
|
}, [_value, useMinorUnit, decimalScale]);
|
|
2329
|
-
const max = (0,
|
|
2290
|
+
const max = (0, import_react19.useMemo)(() => {
|
|
2330
2291
|
if (props.max && useMinorUnit) {
|
|
2331
2292
|
return props.max / Math.pow(10, decimalScale);
|
|
2332
2293
|
}
|
|
2333
2294
|
return props.max;
|
|
2334
2295
|
}, [props.max, useMinorUnit, decimalScale]);
|
|
2335
|
-
const isOverLimit = (0,
|
|
2336
|
-
const handleChange = (0,
|
|
2296
|
+
const isOverLimit = (0, import_react19.useMemo)(() => max != null && value != null && value > max, [max, value]);
|
|
2297
|
+
const handleChange = (0, import_react19.useCallback)(
|
|
2337
2298
|
(event) => {
|
|
2338
2299
|
if (event.target.value === "") {
|
|
2339
2300
|
setValue(null);
|
|
@@ -2344,7 +2305,7 @@ var CurrencyInput = import_react20.default.forwardRef(function CurrencyInput2(in
|
|
|
2344
2305
|
},
|
|
2345
2306
|
[decimalSeparator, useMinorUnit, setValue]
|
|
2346
2307
|
);
|
|
2347
|
-
return /* @__PURE__ */
|
|
2308
|
+
return /* @__PURE__ */ import_react19.default.createElement(
|
|
2348
2309
|
CurrencyInputRoot,
|
|
2349
2310
|
{
|
|
2350
2311
|
...innerProps,
|
|
@@ -2381,7 +2342,7 @@ var CurrencyInput = import_react20.default.forwardRef(function CurrencyInput2(in
|
|
|
2381
2342
|
var CurrencyInput_default = CurrencyInput;
|
|
2382
2343
|
|
|
2383
2344
|
// src/components/DataTable/DataTable.tsx
|
|
2384
|
-
var
|
|
2345
|
+
var import_react29 = __toESM(require("react"));
|
|
2385
2346
|
var import_react_virtual2 = require("@tanstack/react-virtual");
|
|
2386
2347
|
|
|
2387
2348
|
// src/libs/text-measurer.ts
|
|
@@ -2609,12 +2570,9 @@ function computeAutoFitWidth(params) {
|
|
|
2609
2570
|
if (!isNaN(maxPx) && maxPx > 0) finalWidth = Math.min(finalWidth, maxPx);
|
|
2610
2571
|
return finalWidth;
|
|
2611
2572
|
}
|
|
2612
|
-
function getHeaderCellId(tableId, columnId) {
|
|
2613
|
-
return `${tableId}_header_${columnId}`.trim();
|
|
2614
|
-
}
|
|
2615
2573
|
|
|
2616
2574
|
// src/components/DataTable/styled.tsx
|
|
2617
|
-
var
|
|
2575
|
+
var import_react20 = __toESM(require("react"));
|
|
2618
2576
|
var import_joy26 = require("@mui/joy");
|
|
2619
2577
|
var import_framer_motion17 = require("framer-motion");
|
|
2620
2578
|
var import_ArrowUpwardRounded = __toESM(require("@mui/icons-material/ArrowUpwardRounded"));
|
|
@@ -2720,9 +2678,9 @@ var StyledTd = (0, import_joy26.styled)("td")(({ theme }) => ({
|
|
|
2720
2678
|
}
|
|
2721
2679
|
}));
|
|
2722
2680
|
var MotionSortIcon = (0, import_framer_motion17.motion)(import_ArrowUpwardRounded.default);
|
|
2723
|
-
var DefaultLoadingOverlay = () => /* @__PURE__ */
|
|
2724
|
-
var DefaultNoRowsOverlay = () => /* @__PURE__ */
|
|
2725
|
-
var Resizer = (ref, targetRef = ref, onResizeStateChange, onAutoFit) => /* @__PURE__ */
|
|
2681
|
+
var DefaultLoadingOverlay = () => /* @__PURE__ */ import_react20.default.createElement(import_joy26.LinearProgress, { value: 8, variant: "plain" });
|
|
2682
|
+
var DefaultNoRowsOverlay = () => /* @__PURE__ */ import_react20.default.createElement(import_joy26.Typography, { level: "body-sm", textColor: "text.tertiary" }, "No rows");
|
|
2683
|
+
var Resizer = (ref, targetRef = ref, onResizeStateChange, onAutoFit) => /* @__PURE__ */ import_react20.default.createElement(
|
|
2726
2684
|
Box_default,
|
|
2727
2685
|
{
|
|
2728
2686
|
sx: {
|
|
@@ -2799,12 +2757,12 @@ var Resizer = (ref, targetRef = ref, onResizeStateChange, onAutoFit) => /* @__PU
|
|
|
2799
2757
|
);
|
|
2800
2758
|
|
|
2801
2759
|
// src/components/DataTable/components.tsx
|
|
2802
|
-
var
|
|
2760
|
+
var import_react25 = __toESM(require("react"));
|
|
2803
2761
|
var import_joy33 = require("@mui/joy");
|
|
2804
2762
|
var import_framer_motion21 = require("framer-motion");
|
|
2805
2763
|
|
|
2806
2764
|
// src/components/DatePicker/DatePicker.tsx
|
|
2807
|
-
var
|
|
2765
|
+
var import_react21 = __toESM(require("react"));
|
|
2808
2766
|
var import_react_imask = require("react-imask");
|
|
2809
2767
|
var import_CalendarToday = __toESM(require("@mui/icons-material/CalendarToday"));
|
|
2810
2768
|
var import_joy29 = require("@mui/joy");
|
|
@@ -2957,9 +2915,9 @@ function parseDate(dateString, format) {
|
|
|
2957
2915
|
var formatToPattern = (format) => {
|
|
2958
2916
|
return format.replace(/YYYY/g, "Y").replace(/MM/g, "M").replace(/DD/g, "D").replace(/[^YMD\s]/g, (match) => `${match}\``);
|
|
2959
2917
|
};
|
|
2960
|
-
var TextMaskAdapter3 =
|
|
2918
|
+
var TextMaskAdapter3 = import_react21.default.forwardRef(function TextMaskAdapter4(props, ref) {
|
|
2961
2919
|
const { onChange, format, ...other } = props;
|
|
2962
|
-
return /* @__PURE__ */
|
|
2920
|
+
return /* @__PURE__ */ import_react21.default.createElement(
|
|
2963
2921
|
import_react_imask.IMaskInput,
|
|
2964
2922
|
{
|
|
2965
2923
|
...other,
|
|
@@ -2994,7 +2952,7 @@ var TextMaskAdapter3 = import_react22.default.forwardRef(function TextMaskAdapte
|
|
|
2994
2952
|
}
|
|
2995
2953
|
);
|
|
2996
2954
|
});
|
|
2997
|
-
var DatePicker = (0,
|
|
2955
|
+
var DatePicker = (0, import_react21.forwardRef)((inProps, ref) => {
|
|
2998
2956
|
const props = (0, import_joy29.useThemeProps)({ props: inProps, name: "DatePicker" });
|
|
2999
2957
|
const {
|
|
3000
2958
|
onChange,
|
|
@@ -3021,29 +2979,29 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3021
2979
|
presets,
|
|
3022
2980
|
...innerProps
|
|
3023
2981
|
} = props;
|
|
3024
|
-
const innerRef = (0,
|
|
3025
|
-
const buttonRef = (0,
|
|
2982
|
+
const innerRef = (0, import_react21.useRef)(null);
|
|
2983
|
+
const buttonRef = (0, import_react21.useRef)(null);
|
|
3026
2984
|
const [rawValue, setValue] = useControlledState(
|
|
3027
2985
|
props.value,
|
|
3028
2986
|
props.defaultValue ?? null,
|
|
3029
|
-
(0,
|
|
2987
|
+
(0, import_react21.useCallback)(
|
|
3030
2988
|
(value2) => onChange?.({ target: { name: props.name, value: value2 ?? "" } }),
|
|
3031
2989
|
[props.name, onChange]
|
|
3032
2990
|
)
|
|
3033
2991
|
);
|
|
3034
2992
|
const value = rawValue ?? "";
|
|
3035
2993
|
const isAlphabeticDisplay = hasAlphabeticMonth(displayFormat);
|
|
3036
|
-
const [displayValue, setDisplayValue] = (0,
|
|
2994
|
+
const [displayValue, setDisplayValue] = (0, import_react21.useState)(
|
|
3037
2995
|
() => value ? formatValueString(parseDate(value, format), displayFormat, locale) : ""
|
|
3038
2996
|
);
|
|
3039
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
2997
|
+
const [anchorEl, setAnchorEl] = (0, import_react21.useState)(null);
|
|
3040
2998
|
const open = Boolean(anchorEl);
|
|
3041
|
-
(0,
|
|
2999
|
+
(0, import_react21.useEffect)(() => {
|
|
3042
3000
|
if (!anchorEl) {
|
|
3043
3001
|
innerRef.current?.blur();
|
|
3044
3002
|
}
|
|
3045
3003
|
}, [anchorEl, innerRef]);
|
|
3046
|
-
(0,
|
|
3004
|
+
(0, import_react21.useEffect)(() => {
|
|
3047
3005
|
if (value === "") {
|
|
3048
3006
|
setDisplayValue("");
|
|
3049
3007
|
return;
|
|
@@ -3053,8 +3011,8 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3053
3011
|
setDisplayValue(formattedValue);
|
|
3054
3012
|
}
|
|
3055
3013
|
}, [displayFormat, displayValue, format, locale, value]);
|
|
3056
|
-
(0,
|
|
3057
|
-
const handleChange = (0,
|
|
3014
|
+
(0, import_react21.useImperativeHandle)(ref, () => innerRef.current, [innerRef]);
|
|
3015
|
+
const handleChange = (0, import_react21.useCallback)(
|
|
3058
3016
|
(event) => {
|
|
3059
3017
|
const value2 = event.target.value;
|
|
3060
3018
|
setDisplayValue(value2 ? formatValueString(parseDate(value2, format), displayFormat, locale) : value2);
|
|
@@ -3062,7 +3020,7 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3062
3020
|
},
|
|
3063
3021
|
[displayFormat, format, locale, setValue]
|
|
3064
3022
|
);
|
|
3065
|
-
const handleDisplayInputChange = (0,
|
|
3023
|
+
const handleDisplayInputChange = (0, import_react21.useCallback)(
|
|
3066
3024
|
(event) => {
|
|
3067
3025
|
if (event.target.value === "") {
|
|
3068
3026
|
handleChange({
|
|
@@ -3087,7 +3045,7 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3087
3045
|
},
|
|
3088
3046
|
[displayFormat, format, handleChange, props.name]
|
|
3089
3047
|
);
|
|
3090
|
-
const handleCalendarToggle = (0,
|
|
3048
|
+
const handleCalendarToggle = (0, import_react21.useCallback)(
|
|
3091
3049
|
(event) => {
|
|
3092
3050
|
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
3093
3051
|
setTimeout(() => {
|
|
@@ -3096,7 +3054,7 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3096
3054
|
},
|
|
3097
3055
|
[anchorEl, setAnchorEl, innerRef]
|
|
3098
3056
|
);
|
|
3099
|
-
const handleInputMouseDown = (0,
|
|
3057
|
+
const handleInputMouseDown = (0, import_react21.useCallback)(
|
|
3100
3058
|
(event) => {
|
|
3101
3059
|
if (inputReadOnly || isAlphabeticDisplay) {
|
|
3102
3060
|
event.preventDefault();
|
|
@@ -3105,7 +3063,7 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3105
3063
|
},
|
|
3106
3064
|
[inputReadOnly, isAlphabeticDisplay, buttonRef]
|
|
3107
3065
|
);
|
|
3108
|
-
const handleInputClick = (0,
|
|
3066
|
+
const handleInputClick = (0, import_react21.useCallback)(
|
|
3109
3067
|
(event) => {
|
|
3110
3068
|
if (inputReadOnly && !readOnly) {
|
|
3111
3069
|
handleCalendarToggle(event);
|
|
@@ -3113,7 +3071,7 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3113
3071
|
},
|
|
3114
3072
|
[inputReadOnly, readOnly, handleCalendarToggle]
|
|
3115
3073
|
);
|
|
3116
|
-
const handlePresetClick = (0,
|
|
3074
|
+
const handlePresetClick = (0, import_react21.useCallback)(
|
|
3117
3075
|
(presetValue) => {
|
|
3118
3076
|
handleChange({
|
|
3119
3077
|
target: {
|
|
@@ -3125,7 +3083,7 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3125
3083
|
},
|
|
3126
3084
|
[handleChange, props.name]
|
|
3127
3085
|
);
|
|
3128
|
-
const isPresetDisabled = (0,
|
|
3086
|
+
const isPresetDisabled = (0, import_react21.useCallback)(
|
|
3129
3087
|
(presetValue) => {
|
|
3130
3088
|
try {
|
|
3131
3089
|
const date = parseDate(presetValue, format);
|
|
@@ -3142,7 +3100,7 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3142
3100
|
},
|
|
3143
3101
|
[format, minDate, maxDate, disableFuture, disablePast, shouldDisableDate]
|
|
3144
3102
|
);
|
|
3145
|
-
return /* @__PURE__ */
|
|
3103
|
+
return /* @__PURE__ */ import_react21.default.createElement(DatePickerRoot, { sx, className }, /* @__PURE__ */ import_react21.default.createElement(import_base3.FocusTrap, { open: true }, /* @__PURE__ */ import_react21.default.createElement(import_react21.default.Fragment, null, /* @__PURE__ */ import_react21.default.createElement(
|
|
3146
3104
|
Input_default,
|
|
3147
3105
|
{
|
|
3148
3106
|
...innerProps,
|
|
@@ -3169,7 +3127,7 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3169
3127
|
}
|
|
3170
3128
|
},
|
|
3171
3129
|
sx: { width: "100%" },
|
|
3172
|
-
endDecorator: /* @__PURE__ */
|
|
3130
|
+
endDecorator: /* @__PURE__ */ import_react21.default.createElement(
|
|
3173
3131
|
CalendarButton,
|
|
3174
3132
|
{
|
|
3175
3133
|
ref: buttonRef,
|
|
@@ -3181,13 +3139,13 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3181
3139
|
"aria-expanded": open,
|
|
3182
3140
|
disabled
|
|
3183
3141
|
},
|
|
3184
|
-
/* @__PURE__ */
|
|
3142
|
+
/* @__PURE__ */ import_react21.default.createElement(import_CalendarToday.default, null)
|
|
3185
3143
|
),
|
|
3186
3144
|
label,
|
|
3187
3145
|
helperText,
|
|
3188
3146
|
readOnly: readOnly || inputReadOnly || isAlphabeticDisplay
|
|
3189
3147
|
}
|
|
3190
|
-
), open && /* @__PURE__ */
|
|
3148
|
+
), open && /* @__PURE__ */ import_react21.default.createElement(import_base3.ClickAwayListener, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ import_react21.default.createElement(
|
|
3191
3149
|
StyledPopper,
|
|
3192
3150
|
{
|
|
3193
3151
|
id: "date-picker-popper",
|
|
@@ -3206,7 +3164,7 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3206
3164
|
"aria-label": "Calendar Tooltip",
|
|
3207
3165
|
"aria-expanded": open
|
|
3208
3166
|
},
|
|
3209
|
-
/* @__PURE__ */
|
|
3167
|
+
/* @__PURE__ */ import_react21.default.createElement(CalendarSheet, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ import_react21.default.createElement(CalendarSheetContent, null, /* @__PURE__ */ import_react21.default.createElement(CalendarSection, null, /* @__PURE__ */ import_react21.default.createElement(
|
|
3210
3168
|
Calendar_default,
|
|
3211
3169
|
{
|
|
3212
3170
|
value: value && !Number.isNaN(parseDate(value, format).getTime()) ? [parseDate(value, format), void 0] : void 0,
|
|
@@ -3226,14 +3184,14 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3226
3184
|
shouldDisableDate: shouldDisableDate ? (date) => shouldDisableDate(formatValueString(date, format)) : void 0,
|
|
3227
3185
|
locale
|
|
3228
3186
|
}
|
|
3229
|
-
), !hideClearButton && /* @__PURE__ */
|
|
3187
|
+
), !hideClearButton && /* @__PURE__ */ import_react21.default.createElement(
|
|
3230
3188
|
DialogActions_default,
|
|
3231
3189
|
{
|
|
3232
3190
|
sx: {
|
|
3233
3191
|
p: 1
|
|
3234
3192
|
}
|
|
3235
3193
|
},
|
|
3236
|
-
/* @__PURE__ */
|
|
3194
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
|
3237
3195
|
Button_default,
|
|
3238
3196
|
{
|
|
3239
3197
|
size,
|
|
@@ -3251,9 +3209,9 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3251
3209
|
},
|
|
3252
3210
|
"Clear"
|
|
3253
3211
|
)
|
|
3254
|
-
)), presets && presets.length > 0 && /* @__PURE__ */
|
|
3212
|
+
)), presets && presets.length > 0 && /* @__PURE__ */ import_react21.default.createElement(PresetPanel, null, presets.map((preset) => {
|
|
3255
3213
|
const disabled2 = isPresetDisabled(preset.value);
|
|
3256
|
-
return /* @__PURE__ */
|
|
3214
|
+
return /* @__PURE__ */ import_react21.default.createElement(
|
|
3257
3215
|
PresetItem,
|
|
3258
3216
|
{
|
|
3259
3217
|
key: preset.label,
|
|
@@ -3274,11 +3232,11 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3274
3232
|
var DatePicker_default = DatePicker;
|
|
3275
3233
|
|
|
3276
3234
|
// src/components/Textarea/Textarea.tsx
|
|
3277
|
-
var
|
|
3235
|
+
var import_react22 = __toESM(require("react"));
|
|
3278
3236
|
var import_joy30 = require("@mui/joy");
|
|
3279
3237
|
var import_framer_motion19 = require("framer-motion");
|
|
3280
3238
|
var MotionTextarea = (0, import_framer_motion19.motion)(import_joy30.Textarea);
|
|
3281
|
-
var
|
|
3239
|
+
var Textarea = (props) => {
|
|
3282
3240
|
const {
|
|
3283
3241
|
label,
|
|
3284
3242
|
error,
|
|
@@ -3294,7 +3252,7 @@ var TextareaBase = (props) => {
|
|
|
3294
3252
|
className,
|
|
3295
3253
|
...innerProps
|
|
3296
3254
|
} = props;
|
|
3297
|
-
const textarea = /* @__PURE__ */
|
|
3255
|
+
const textarea = /* @__PURE__ */ import_react22.default.createElement(
|
|
3298
3256
|
MotionTextarea,
|
|
3299
3257
|
{
|
|
3300
3258
|
required,
|
|
@@ -3306,7 +3264,7 @@ var TextareaBase = (props) => {
|
|
|
3306
3264
|
...innerProps
|
|
3307
3265
|
}
|
|
3308
3266
|
);
|
|
3309
|
-
return /* @__PURE__ */
|
|
3267
|
+
return /* @__PURE__ */ import_react22.default.createElement(
|
|
3310
3268
|
FormControl_default,
|
|
3311
3269
|
{
|
|
3312
3270
|
required,
|
|
@@ -3317,22 +3275,18 @@ var TextareaBase = (props) => {
|
|
|
3317
3275
|
sx,
|
|
3318
3276
|
className
|
|
3319
3277
|
},
|
|
3320
|
-
label && /* @__PURE__ */
|
|
3278
|
+
label && /* @__PURE__ */ import_react22.default.createElement(FormLabel_default, null, label),
|
|
3321
3279
|
textarea,
|
|
3322
|
-
helperText && /* @__PURE__ */
|
|
3280
|
+
helperText && /* @__PURE__ */ import_react22.default.createElement(FormHelperText_default, null, helperText)
|
|
3323
3281
|
);
|
|
3324
3282
|
};
|
|
3325
|
-
var Textarea = import_react23.default.forwardRef((props, ref) => {
|
|
3326
|
-
const textareaSlotProps = useSlotRef(props.slotProps?.textarea, ref);
|
|
3327
|
-
return /* @__PURE__ */ import_react23.default.createElement(TextareaBase, { ...props, slotProps: { ...props.slotProps, textarea: textareaSlotProps } });
|
|
3328
|
-
});
|
|
3329
3283
|
Textarea.displayName = "Textarea";
|
|
3330
3284
|
|
|
3331
3285
|
// src/components/Textarea/index.ts
|
|
3332
3286
|
var Textarea_default = Textarea;
|
|
3333
3287
|
|
|
3334
3288
|
// src/components/Select/Select.tsx
|
|
3335
|
-
var
|
|
3289
|
+
var import_react23 = __toESM(require("react"));
|
|
3336
3290
|
var import_joy31 = require("@mui/joy");
|
|
3337
3291
|
var import_framer_motion20 = require("framer-motion");
|
|
3338
3292
|
var MotionOption = (0, import_framer_motion20.motion)(import_joy31.Option);
|
|
@@ -3343,7 +3297,7 @@ var secondaryTextLevelMap2 = {
|
|
|
3343
3297
|
lg: "body-md"
|
|
3344
3298
|
};
|
|
3345
3299
|
Option.displayName = "Option";
|
|
3346
|
-
function
|
|
3300
|
+
function Select(props) {
|
|
3347
3301
|
const {
|
|
3348
3302
|
label,
|
|
3349
3303
|
helperText,
|
|
@@ -3369,7 +3323,7 @@ function SelectInner(props, ref) {
|
|
|
3369
3323
|
formHelperText: formHelperTextProps,
|
|
3370
3324
|
...joySlotProps
|
|
3371
3325
|
} = slotProps ?? {};
|
|
3372
|
-
const options = (0,
|
|
3326
|
+
const options = (0, import_react23.useMemo)(
|
|
3373
3327
|
() => props.options.map((option) => {
|
|
3374
3328
|
if (option.hasOwnProperty("value") && option.hasOwnProperty("label")) {
|
|
3375
3329
|
return option;
|
|
@@ -3394,15 +3348,14 @@ function SelectInner(props, ref) {
|
|
|
3394
3348
|
};
|
|
3395
3349
|
onChange?.(newEvent, newValue);
|
|
3396
3350
|
};
|
|
3397
|
-
const optionMap = (0,
|
|
3351
|
+
const optionMap = (0, import_react23.useMemo)(() => {
|
|
3398
3352
|
const map = /* @__PURE__ */ new Map();
|
|
3399
3353
|
options.forEach((option) => {
|
|
3400
3354
|
map.set(option.value, option);
|
|
3401
3355
|
});
|
|
3402
3356
|
return map;
|
|
3403
3357
|
}, [options]);
|
|
3404
|
-
const
|
|
3405
|
-
const select = /* @__PURE__ */ import_react24.default.createElement(
|
|
3358
|
+
const select = /* @__PURE__ */ import_react23.default.createElement(
|
|
3406
3359
|
import_joy31.Select,
|
|
3407
3360
|
{
|
|
3408
3361
|
...innerProps,
|
|
@@ -3410,7 +3363,7 @@ function SelectInner(props, ref) {
|
|
|
3410
3363
|
disabled,
|
|
3411
3364
|
size,
|
|
3412
3365
|
color: error ? "danger" : color,
|
|
3413
|
-
slotProps:
|
|
3366
|
+
slotProps: joySlotProps,
|
|
3414
3367
|
onChange: handleChange,
|
|
3415
3368
|
renderValue: (selected) => {
|
|
3416
3369
|
if (!selected) return null;
|
|
@@ -3420,9 +3373,9 @@ function SelectInner(props, ref) {
|
|
|
3420
3373
|
return optionMap.get(selected.value)?.label;
|
|
3421
3374
|
}
|
|
3422
3375
|
},
|
|
3423
|
-
options.map((option) => /* @__PURE__ */
|
|
3376
|
+
options.map((option) => /* @__PURE__ */ import_react23.default.createElement(Option, { key: option.value, value: option.value, disabled: option.disabled }, option.secondaryText ? /* @__PURE__ */ import_react23.default.createElement(import_joy31.ListItemContent, { sx: { gap: 0.5 } }, /* @__PURE__ */ import_react23.default.createElement(import_joy31.Typography, { level: "inherit" }, option.label), /* @__PURE__ */ import_react23.default.createElement(import_joy31.Typography, { level: secondaryTextLevelMap2[size ?? "md"], textColor: "text.tertiary" }, option.secondaryText)) : option.label))
|
|
3424
3377
|
);
|
|
3425
|
-
return /* @__PURE__ */
|
|
3378
|
+
return /* @__PURE__ */ import_react23.default.createElement(
|
|
3426
3379
|
FormControl_default,
|
|
3427
3380
|
{
|
|
3428
3381
|
required,
|
|
@@ -3435,12 +3388,11 @@ function SelectInner(props, ref) {
|
|
|
3435
3388
|
className,
|
|
3436
3389
|
...formControlProps
|
|
3437
3390
|
},
|
|
3438
|
-
label && /* @__PURE__ */
|
|
3391
|
+
label && /* @__PURE__ */ import_react23.default.createElement(FormLabel_default, { ...formLabelProps }, label),
|
|
3439
3392
|
select,
|
|
3440
|
-
helperText && /* @__PURE__ */
|
|
3393
|
+
helperText && /* @__PURE__ */ import_react23.default.createElement(FormHelperText_default, { ...formHelperTextProps }, helperText)
|
|
3441
3394
|
);
|
|
3442
3395
|
}
|
|
3443
|
-
var Select = import_react24.default.forwardRef(SelectInner);
|
|
3444
3396
|
Select.displayName = "Select";
|
|
3445
3397
|
|
|
3446
3398
|
// src/components/Select/index.ts
|
|
@@ -3450,7 +3402,7 @@ var Select_default = Select;
|
|
|
3450
3402
|
var import_joy34 = require("@mui/joy");
|
|
3451
3403
|
|
|
3452
3404
|
// src/components/InfoSign/InfoSign.tsx
|
|
3453
|
-
var
|
|
3405
|
+
var import_react24 = __toESM(require("react"));
|
|
3454
3406
|
var import_joy32 = require("@mui/joy");
|
|
3455
3407
|
var import_Info = __toESM(require("@mui/icons-material/Info"));
|
|
3456
3408
|
var InfoIcon = (0, import_joy32.styled)(import_Info.default, {
|
|
@@ -3463,7 +3415,7 @@ var InfoIcon = (0, import_joy32.styled)(import_Info.default, {
|
|
|
3463
3415
|
}));
|
|
3464
3416
|
function InfoSign(props) {
|
|
3465
3417
|
const { message, placement } = props;
|
|
3466
|
-
return /* @__PURE__ */
|
|
3418
|
+
return /* @__PURE__ */ import_react24.default.createElement(
|
|
3467
3419
|
Tooltip_default,
|
|
3468
3420
|
{
|
|
3469
3421
|
arrow: true,
|
|
@@ -3473,9 +3425,9 @@ function InfoSign(props) {
|
|
|
3473
3425
|
maxWidth: "320px"
|
|
3474
3426
|
}
|
|
3475
3427
|
},
|
|
3476
|
-
title: message?.split("\n").map((line, i) => /* @__PURE__ */
|
|
3428
|
+
title: message?.split("\n").map((line, i) => /* @__PURE__ */ import_react24.default.createElement("div", { key: `info-sign-${i}` }, line))
|
|
3477
3429
|
},
|
|
3478
|
-
/* @__PURE__ */
|
|
3430
|
+
/* @__PURE__ */ import_react24.default.createElement(InfoIcon, null)
|
|
3479
3431
|
);
|
|
3480
3432
|
}
|
|
3481
3433
|
|
|
@@ -3488,9 +3440,9 @@ var TextEllipsis = ({
|
|
|
3488
3440
|
lineClamp,
|
|
3489
3441
|
...rest
|
|
3490
3442
|
}) => {
|
|
3491
|
-
const textRef = (0,
|
|
3492
|
-
const [showTooltip, setShowTooltip] = (0,
|
|
3493
|
-
(0,
|
|
3443
|
+
const textRef = (0, import_react25.useRef)(null);
|
|
3444
|
+
const [showTooltip, setShowTooltip] = (0, import_react25.useState)(false);
|
|
3445
|
+
(0, import_react25.useLayoutEffect)(() => {
|
|
3494
3446
|
const element = textRef.current;
|
|
3495
3447
|
if (!element) return;
|
|
3496
3448
|
const checkTruncation = () => {
|
|
@@ -3502,21 +3454,21 @@ var TextEllipsis = ({
|
|
|
3502
3454
|
ro.observe(element);
|
|
3503
3455
|
return () => ro.disconnect();
|
|
3504
3456
|
}, [children, lineClamp]);
|
|
3505
|
-
return /* @__PURE__ */
|
|
3457
|
+
return /* @__PURE__ */ import_react25.default.createElement(Tooltip_default, { title: showTooltip ? children : "", placement: "top" }, /* @__PURE__ */ import_react25.default.createElement(EllipsisDiv, { ref: textRef, lineClamp, ...rest }, children));
|
|
3506
3458
|
};
|
|
3507
3459
|
var CellTextEllipsis = ({ children }) => {
|
|
3508
|
-
const textRef = (0,
|
|
3509
|
-
const [showTooltip, setShowTooltip] = (0,
|
|
3510
|
-
(0,
|
|
3460
|
+
const textRef = (0, import_react25.useRef)(null);
|
|
3461
|
+
const [showTooltip, setShowTooltip] = (0, import_react25.useState)(false);
|
|
3462
|
+
(0, import_react25.useLayoutEffect)(() => {
|
|
3511
3463
|
const element = textRef.current;
|
|
3512
3464
|
if (element) {
|
|
3513
3465
|
const isTextTruncated = element.scrollWidth > element.clientWidth;
|
|
3514
3466
|
setShowTooltip(isTextTruncated);
|
|
3515
3467
|
}
|
|
3516
3468
|
}, [children]);
|
|
3517
|
-
const content = /* @__PURE__ */
|
|
3469
|
+
const content = /* @__PURE__ */ import_react25.default.createElement(EllipsisDiv, { ref: textRef }, children);
|
|
3518
3470
|
if (showTooltip) {
|
|
3519
|
-
return /* @__PURE__ */
|
|
3471
|
+
return /* @__PURE__ */ import_react25.default.createElement(
|
|
3520
3472
|
Tooltip_default,
|
|
3521
3473
|
{
|
|
3522
3474
|
title: children,
|
|
@@ -3555,32 +3507,34 @@ var HeadCell = (props) => {
|
|
|
3555
3507
|
tableColRef,
|
|
3556
3508
|
headerClassName,
|
|
3557
3509
|
headerLineClamp,
|
|
3558
|
-
onAutoFit
|
|
3559
|
-
columnId
|
|
3510
|
+
onAutoFit
|
|
3560
3511
|
} = props;
|
|
3561
3512
|
const theme = (0, import_joy33.useTheme)();
|
|
3562
3513
|
const ref = headerRef;
|
|
3563
3514
|
const colRef = tableColRef;
|
|
3564
|
-
const localRef = (0,
|
|
3565
|
-
(0,
|
|
3515
|
+
const localRef = (0, import_react25.useRef)(null);
|
|
3516
|
+
(0, import_react25.useLayoutEffect)(() => {
|
|
3566
3517
|
ref.current = localRef.current;
|
|
3567
3518
|
}, [ref]);
|
|
3568
|
-
const [isHovered, setIsHovered] = (0,
|
|
3519
|
+
const [isHovered, setIsHovered] = (0, import_react25.useState)(false);
|
|
3569
3520
|
const sortable = type === "actions" ? false : _sortable;
|
|
3570
|
-
const headId = (0,
|
|
3571
|
-
|
|
3572
|
-
|
|
3521
|
+
const headId = (0, import_react25.useMemo)(
|
|
3522
|
+
() => `${tableId}_header_${headerName ?? field}`.trim(),
|
|
3523
|
+
[tableId, headerName, field]
|
|
3524
|
+
);
|
|
3525
|
+
const isResizingRef = (0, import_react25.useRef)(false);
|
|
3526
|
+
const resizer = (0, import_react25.useMemo)(
|
|
3573
3527
|
() => resizable ?? true ? Resizer(
|
|
3574
3528
|
ref,
|
|
3575
3529
|
colRef,
|
|
3576
3530
|
(isResizing) => {
|
|
3577
3531
|
isResizingRef.current = isResizing;
|
|
3578
3532
|
},
|
|
3579
|
-
onAutoFit ? () => onAutoFit(
|
|
3533
|
+
onAutoFit ? () => onAutoFit(field) : void 0
|
|
3580
3534
|
) : null,
|
|
3581
|
-
[resizable, ref, colRef, onAutoFit,
|
|
3535
|
+
[resizable, ref, colRef, onAutoFit, field]
|
|
3582
3536
|
);
|
|
3583
|
-
const style = (0,
|
|
3537
|
+
const style = (0, import_react25.useMemo)(
|
|
3584
3538
|
() => ({
|
|
3585
3539
|
width,
|
|
3586
3540
|
minWidth: minWidth ?? "50px",
|
|
@@ -3598,10 +3552,10 @@ var HeadCell = (props) => {
|
|
|
3598
3552
|
);
|
|
3599
3553
|
const textAlign = getTextAlign(props);
|
|
3600
3554
|
const initialSort = sortOrder[0];
|
|
3601
|
-
const sortIcon = (0,
|
|
3555
|
+
const sortIcon = (0, import_react25.useMemo)(() => {
|
|
3602
3556
|
const isSorted = !!sort;
|
|
3603
3557
|
const isVisible = sortable && (isSorted || isHovered);
|
|
3604
|
-
return /* @__PURE__ */
|
|
3558
|
+
return /* @__PURE__ */ import_react25.default.createElement(import_framer_motion21.AnimatePresence, { mode: "wait" }, isVisible && /* @__PURE__ */ import_react25.default.createElement(
|
|
3605
3559
|
MotionSortIcon,
|
|
3606
3560
|
{
|
|
3607
3561
|
key: "sort-icon",
|
|
@@ -3629,21 +3583,21 @@ var HeadCell = (props) => {
|
|
|
3629
3583
|
}
|
|
3630
3584
|
));
|
|
3631
3585
|
}, [headId, initialSort, sort, sortable, isHovered]);
|
|
3632
|
-
const infoSign = (0,
|
|
3633
|
-
() => description ? /* @__PURE__ */
|
|
3586
|
+
const infoSign = (0, import_react25.useMemo)(
|
|
3587
|
+
() => description ? /* @__PURE__ */ import_react25.default.createElement(InfoSign_default, { message: description, placement: "bottom" }) : null,
|
|
3634
3588
|
[description]
|
|
3635
3589
|
);
|
|
3636
|
-
const params = (0,
|
|
3590
|
+
const params = (0, import_react25.useMemo)(
|
|
3637
3591
|
() => ({
|
|
3638
3592
|
field
|
|
3639
3593
|
}),
|
|
3640
3594
|
[field]
|
|
3641
3595
|
);
|
|
3642
|
-
const computedHeaderClassName = (0,
|
|
3596
|
+
const computedHeaderClassName = (0, import_react25.useMemo)(
|
|
3643
3597
|
() => (typeof headerClassName === "function" ? headerClassName(params) : headerClassName) || void 0,
|
|
3644
3598
|
[headerClassName, params]
|
|
3645
3599
|
);
|
|
3646
|
-
return /* @__PURE__ */
|
|
3600
|
+
return /* @__PURE__ */ import_react25.default.createElement(
|
|
3647
3601
|
StyledTh,
|
|
3648
3602
|
{
|
|
3649
3603
|
id: headId,
|
|
@@ -3652,7 +3606,7 @@ var HeadCell = (props) => {
|
|
|
3652
3606
|
ref: localRef,
|
|
3653
3607
|
key: field,
|
|
3654
3608
|
style,
|
|
3655
|
-
onClick: (0,
|
|
3609
|
+
onClick: (0, import_react25.useCallback)(
|
|
3656
3610
|
(e) => {
|
|
3657
3611
|
if (isResizingRef.current) return;
|
|
3658
3612
|
if (!(e.target instanceof Element) || !e.currentTarget.contains(e.target)) return;
|
|
@@ -3666,7 +3620,7 @@ var HeadCell = (props) => {
|
|
|
3666
3620
|
initial: "initial",
|
|
3667
3621
|
className: computedHeaderClassName
|
|
3668
3622
|
},
|
|
3669
|
-
/* @__PURE__ */
|
|
3623
|
+
/* @__PURE__ */ import_react25.default.createElement(Stack_default, { gap: 1, direction: "row", justifyContent: textAlign, alignItems: "center", sx: { minWidth: 0 } }, textAlign === "end" && sortIcon, textAlign === "end" && infoSign, /* @__PURE__ */ import_react25.default.createElement(TextEllipsis, { lineClamp: headerLineClamp, "data-slot": "header-text" }, headerName ?? field, editMode && required && /* @__PURE__ */ import_react25.default.createElement(Asterisk, null, "*")), textAlign === "start" && infoSign, textAlign === "start" && sortIcon),
|
|
3670
3624
|
resizer
|
|
3671
3625
|
);
|
|
3672
3626
|
};
|
|
@@ -3691,9 +3645,9 @@ var BodyCell = (props) => {
|
|
|
3691
3645
|
onCellEditStop
|
|
3692
3646
|
} = props;
|
|
3693
3647
|
const theme = (0, import_joy33.useTheme)();
|
|
3694
|
-
const [value, setValue] = (0,
|
|
3695
|
-
const cellRef = (0,
|
|
3696
|
-
const params = (0,
|
|
3648
|
+
const [value, setValue] = (0, import_react25.useState)(row[field]);
|
|
3649
|
+
const cellRef = (0, import_react25.useRef)(null);
|
|
3650
|
+
const params = (0, import_react25.useMemo)(
|
|
3697
3651
|
() => ({
|
|
3698
3652
|
row,
|
|
3699
3653
|
value,
|
|
@@ -3702,20 +3656,20 @@ var BodyCell = (props) => {
|
|
|
3702
3656
|
}),
|
|
3703
3657
|
[row, rowId, value, field]
|
|
3704
3658
|
);
|
|
3705
|
-
const editMode = (0,
|
|
3659
|
+
const editMode = (0, import_react25.useMemo)(
|
|
3706
3660
|
() => !!(props.editMode && (typeof isCellEditable === "function" ? isCellEditable(params) : isCellEditable ?? true)),
|
|
3707
3661
|
[props.editMode, isCellEditable, params]
|
|
3708
3662
|
);
|
|
3709
3663
|
const propsComponentProps = "componentProps" in props ? props.componentProps : null;
|
|
3710
3664
|
const hasComponentProps = "componentProps" in props;
|
|
3711
|
-
const componentProps = (0,
|
|
3665
|
+
const componentProps = (0, import_react25.useMemo)(
|
|
3712
3666
|
() => ({
|
|
3713
3667
|
...hasComponentProps && (typeof propsComponentProps === "function" ? propsComponentProps(params) : propsComponentProps || {}),
|
|
3714
3668
|
size: "sm"
|
|
3715
3669
|
}),
|
|
3716
3670
|
[hasComponentProps, propsComponentProps, params]
|
|
3717
3671
|
);
|
|
3718
|
-
const editModeComponentProps = (0,
|
|
3672
|
+
const editModeComponentProps = (0, import_react25.useMemo)(
|
|
3719
3673
|
() => ({
|
|
3720
3674
|
...componentProps,
|
|
3721
3675
|
onChange: (e) => {
|
|
@@ -3777,25 +3731,25 @@ var BodyCell = (props) => {
|
|
|
3777
3731
|
}),
|
|
3778
3732
|
[params, row, field, value, componentProps, type, onCellEditStop, onCellEditStart]
|
|
3779
3733
|
);
|
|
3780
|
-
const MemoizedRenderEditCell = (0,
|
|
3781
|
-
const MemoizedRenderCell = (0,
|
|
3782
|
-
const EditModeComponent = (0,
|
|
3734
|
+
const MemoizedRenderEditCell = (0, import_react25.useMemo)(() => renderEditCell ? (0, import_react25.memo)(renderEditCell) : null, [renderEditCell]);
|
|
3735
|
+
const MemoizedRenderCell = (0, import_react25.useMemo)(() => renderCell ? (0, import_react25.memo)(renderCell) : null, [renderCell]);
|
|
3736
|
+
const EditModeComponent = (0, import_react25.useMemo)(() => {
|
|
3783
3737
|
if (MemoizedRenderEditCell) {
|
|
3784
|
-
return (0,
|
|
3738
|
+
return (0, import_react25.createElement)(MemoizedRenderEditCell, params);
|
|
3785
3739
|
}
|
|
3786
3740
|
return {
|
|
3787
|
-
date: /* @__PURE__ */
|
|
3788
|
-
currency: /* @__PURE__ */
|
|
3741
|
+
date: /* @__PURE__ */ import_react25.default.createElement(DatePicker_default, { value, ...editModeComponentProps }),
|
|
3742
|
+
currency: /* @__PURE__ */ import_react25.default.createElement(
|
|
3789
3743
|
CurrencyInput_default,
|
|
3790
3744
|
{
|
|
3791
3745
|
value,
|
|
3792
3746
|
...editModeComponentProps
|
|
3793
3747
|
}
|
|
3794
3748
|
),
|
|
3795
|
-
number: /* @__PURE__ */
|
|
3796
|
-
text: /* @__PURE__ */
|
|
3797
|
-
longText: /* @__PURE__ */
|
|
3798
|
-
autocomplete: /* @__PURE__ */
|
|
3749
|
+
number: /* @__PURE__ */ import_react25.default.createElement(Input_default, { value, type: "number", ...editModeComponentProps }),
|
|
3750
|
+
text: /* @__PURE__ */ import_react25.default.createElement(Input_default, { value, type: "text", ...editModeComponentProps }),
|
|
3751
|
+
longText: /* @__PURE__ */ import_react25.default.createElement(Textarea_default, { value, ...editModeComponentProps }),
|
|
3752
|
+
autocomplete: /* @__PURE__ */ import_react25.default.createElement(
|
|
3799
3753
|
Autocomplete_default,
|
|
3800
3754
|
{
|
|
3801
3755
|
value,
|
|
@@ -3803,7 +3757,7 @@ var BodyCell = (props) => {
|
|
|
3803
3757
|
...editModeComponentProps
|
|
3804
3758
|
}
|
|
3805
3759
|
),
|
|
3806
|
-
select: /* @__PURE__ */
|
|
3760
|
+
select: /* @__PURE__ */ import_react25.default.createElement(
|
|
3807
3761
|
Select_default,
|
|
3808
3762
|
{
|
|
3809
3763
|
value,
|
|
@@ -3814,13 +3768,13 @@ var BodyCell = (props) => {
|
|
|
3814
3768
|
}[type || "text"];
|
|
3815
3769
|
}, [value, editModeComponentProps, type, MemoizedRenderEditCell, params]);
|
|
3816
3770
|
const linkComponentFromProps = props.component;
|
|
3817
|
-
const ReadModeComponent = (0,
|
|
3771
|
+
const ReadModeComponent = (0, import_react25.useMemo)(() => {
|
|
3818
3772
|
if (MemoizedRenderCell) {
|
|
3819
|
-
return (0,
|
|
3773
|
+
return (0, import_react25.createElement)(MemoizedRenderCell, params);
|
|
3820
3774
|
}
|
|
3821
3775
|
const innerText = value;
|
|
3822
3776
|
const typedComponent = {
|
|
3823
|
-
link:
|
|
3777
|
+
link: import_react25.default.createElement(linkComponentFromProps || import_joy34.Link, {
|
|
3824
3778
|
children: innerText,
|
|
3825
3779
|
...componentProps
|
|
3826
3780
|
})
|
|
@@ -3828,27 +3782,27 @@ var BodyCell = (props) => {
|
|
|
3828
3782
|
return typedComponent || innerText;
|
|
3829
3783
|
}, [value, MemoizedRenderCell, params, type, componentProps, linkComponentFromProps]);
|
|
3830
3784
|
const getActions = props.getActions;
|
|
3831
|
-
const CellComponent = (0,
|
|
3785
|
+
const CellComponent = (0, import_react25.useMemo)(() => {
|
|
3832
3786
|
if (type === "actions") {
|
|
3833
|
-
return /* @__PURE__ */
|
|
3787
|
+
return /* @__PURE__ */ import_react25.default.createElement(Stack_default, { direction: "row", gap: 1, justifyContent: "center", alignItems: "center" }, getActions?.(params));
|
|
3834
3788
|
}
|
|
3835
3789
|
return editMode && EditModeComponent ? EditModeComponent : ReadModeComponent;
|
|
3836
3790
|
}, [type, getActions, params, editMode, EditModeComponent, ReadModeComponent]);
|
|
3837
|
-
const showTooltip = (0,
|
|
3791
|
+
const showTooltip = (0, import_react25.useMemo)(() => noWrap && type === "longText", [noWrap, type]);
|
|
3838
3792
|
const isBoundary = props.isLastStartPinnedColumn || props.isLastEndPinnedColumn;
|
|
3839
|
-
const computedCellClassName = (0,
|
|
3793
|
+
const computedCellClassName = (0, import_react25.useMemo)(
|
|
3840
3794
|
() => (typeof cellClassName === "function" ? cellClassName(params) : cellClassName) || "",
|
|
3841
3795
|
[cellClassName, params]
|
|
3842
3796
|
);
|
|
3843
|
-
(0,
|
|
3797
|
+
(0, import_react25.useEffect)(() => {
|
|
3844
3798
|
setValue(row[field]);
|
|
3845
3799
|
}, [row, field]);
|
|
3846
|
-
return /* @__PURE__ */
|
|
3800
|
+
return /* @__PURE__ */ import_react25.default.createElement(
|
|
3847
3801
|
StyledTd,
|
|
3848
3802
|
{
|
|
3849
3803
|
ref: cellRef,
|
|
3850
3804
|
key: field,
|
|
3851
|
-
headers:
|
|
3805
|
+
headers: `${tableId}_header_${props.headerName ?? field}`,
|
|
3852
3806
|
sx: {
|
|
3853
3807
|
textAlign: getTextAlign({ type }),
|
|
3854
3808
|
verticalAlign: editMode ? "top" : "middle",
|
|
@@ -3860,16 +3814,16 @@ var BodyCell = (props) => {
|
|
|
3860
3814
|
},
|
|
3861
3815
|
className: [isLastStartPinnedColumn && "is-last-left", isLastEndPinnedColumn && "is-last-right", computedCellClassName].filter(Boolean).join(" ") || ""
|
|
3862
3816
|
},
|
|
3863
|
-
(0,
|
|
3864
|
-
() => showTooltip ? /* @__PURE__ */
|
|
3817
|
+
(0, import_react25.useMemo)(
|
|
3818
|
+
() => showTooltip ? /* @__PURE__ */ import_react25.default.createElement(CellTextEllipsis, null, CellComponent) : CellComponent,
|
|
3865
3819
|
[CellComponent, showTooltip]
|
|
3866
3820
|
)
|
|
3867
3821
|
);
|
|
3868
3822
|
};
|
|
3869
|
-
var BodyRow = (0,
|
|
3823
|
+
var BodyRow = (0, import_react25.memo)(
|
|
3870
3824
|
(props) => {
|
|
3871
3825
|
const { tableId, columns, rowId, editMode, noWrap, row } = props;
|
|
3872
|
-
return /* @__PURE__ */
|
|
3826
|
+
return /* @__PURE__ */ import_react25.default.createElement(import_react25.default.Fragment, null, columns.map((column, i) => /* @__PURE__ */ import_react25.default.createElement(
|
|
3873
3827
|
BodyCell,
|
|
3874
3828
|
{
|
|
3875
3829
|
key: `${rowId}_${column.field.toString()}_${i}`,
|
|
@@ -3902,7 +3856,7 @@ var StyledTableRow2 = (0, import_joy33.styled)("tr", {
|
|
|
3902
3856
|
}
|
|
3903
3857
|
}
|
|
3904
3858
|
}));
|
|
3905
|
-
var VirtualizedTableRow = (0,
|
|
3859
|
+
var VirtualizedTableRow = (0, import_react25.memo)(StyledTableRow2, (prevProps, nextProps) => {
|
|
3906
3860
|
return prevProps.striped === nextProps.striped && prevProps.style?.height === nextProps.style?.height && prevProps.style?.transform === nextProps.style?.transform && // @ts-ignore
|
|
3907
3861
|
prevProps["data-row-id"] === nextProps["data-row-id"] && // @ts-ignore
|
|
3908
3862
|
prevProps["data-index"] === nextProps["data-index"] && prevProps.tabIndex === nextProps.tabIndex && prevProps["aria-checked"] === nextProps["aria-checked"] && // Track column structure changes (e.g. isCellEditable toggled, columns added/removed)
|
|
@@ -3913,46 +3867,36 @@ var VirtualizedTableRow = (0, import_react26.memo)(StyledTableRow2, (prevProps,
|
|
|
3913
3867
|
});
|
|
3914
3868
|
|
|
3915
3869
|
// src/components/DataTable/hooks.ts
|
|
3916
|
-
var
|
|
3917
|
-
function useColumnWidths(
|
|
3918
|
-
const [widths, setWidths] = (0,
|
|
3919
|
-
const roRef = (0,
|
|
3920
|
-
(0,
|
|
3870
|
+
var import_react26 = require("react");
|
|
3871
|
+
function useColumnWidths(columnsByField) {
|
|
3872
|
+
const [widths, setWidths] = (0, import_react26.useState)({});
|
|
3873
|
+
const roRef = (0, import_react26.useRef)();
|
|
3874
|
+
(0, import_react26.useLayoutEffect)(() => {
|
|
3921
3875
|
if (roRef.current) roRef.current.disconnect();
|
|
3922
3876
|
roRef.current = new ResizeObserver((entries) => {
|
|
3877
|
+
let changed = false;
|
|
3923
3878
|
setWidths((prev) => {
|
|
3924
|
-
let changed = false;
|
|
3925
3879
|
const next = { ...prev };
|
|
3926
3880
|
entries.forEach((entry) => {
|
|
3927
|
-
const
|
|
3881
|
+
const field = entry.target.dataset.field;
|
|
3928
3882
|
const w = Math.round(entry.target.getBoundingClientRect().width);
|
|
3929
|
-
if (
|
|
3930
|
-
|
|
3931
|
-
next[columnId] = w;
|
|
3883
|
+
if (next[field] !== w) {
|
|
3884
|
+
next[field] = w;
|
|
3932
3885
|
changed = true;
|
|
3933
3886
|
}
|
|
3934
3887
|
});
|
|
3935
3888
|
return changed ? next : prev;
|
|
3936
3889
|
});
|
|
3937
3890
|
});
|
|
3938
|
-
|
|
3939
|
-
Object.entries(columnsById).forEach(([columnId, def]) => {
|
|
3891
|
+
Object.entries(columnsByField).forEach(([field, def]) => {
|
|
3940
3892
|
const el = def.headerRef.current;
|
|
3941
3893
|
if (el) {
|
|
3942
|
-
el.dataset.
|
|
3943
|
-
el.dataset.field = String(def.field);
|
|
3944
|
-
const w = Math.round(el.getBoundingClientRect().width);
|
|
3945
|
-
if (w > 0) measured[columnId] = w;
|
|
3894
|
+
el.dataset.field = field;
|
|
3946
3895
|
roRef.current.observe(el);
|
|
3947
3896
|
}
|
|
3948
3897
|
});
|
|
3949
|
-
setWidths((prev) => {
|
|
3950
|
-
const keys = Object.keys(measured);
|
|
3951
|
-
const same = keys.length === Object.keys(prev).length && keys.every((key) => prev[key] === measured[key]);
|
|
3952
|
-
return same ? prev : measured;
|
|
3953
|
-
});
|
|
3954
3898
|
return () => roRef.current?.disconnect();
|
|
3955
|
-
}, [
|
|
3899
|
+
}, [columnsByField]);
|
|
3956
3900
|
return widths;
|
|
3957
3901
|
}
|
|
3958
3902
|
function useDataTableRenderer({
|
|
@@ -3984,40 +3928,33 @@ function useDataTableRenderer({
|
|
|
3984
3928
|
"You cannot use both `pinnedColumns` and `columnGroupingModel` at the same time. Please choose one of them."
|
|
3985
3929
|
);
|
|
3986
3930
|
}
|
|
3987
|
-
const onSelectionModelChangeRef = (0,
|
|
3931
|
+
const onSelectionModelChangeRef = (0, import_react26.useRef)(onSelectionModelChange);
|
|
3988
3932
|
onSelectionModelChangeRef.current = onSelectionModelChange;
|
|
3989
|
-
const [focusedRowId, setFocusedRowId] = (0,
|
|
3990
|
-
const [selectionAnchor, setSelectionAnchor] = (0,
|
|
3933
|
+
const [focusedRowId, setFocusedRowId] = (0, import_react26.useState)(null);
|
|
3934
|
+
const [selectionAnchor, setSelectionAnchor] = (0, import_react26.useState)(null);
|
|
3991
3935
|
const [sortModel, setSortModel] = useControlledState(
|
|
3992
3936
|
controlledSortModel,
|
|
3993
3937
|
initialState?.sorting?.sortModel ?? [],
|
|
3994
|
-
(0,
|
|
3938
|
+
(0, import_react26.useCallback)((sortModel2) => onSortModelChange?.(sortModel2), [onSortModelChange])
|
|
3995
3939
|
);
|
|
3996
3940
|
const [visibilityModel] = useControlledState(
|
|
3997
3941
|
columnVisibilityModel,
|
|
3998
3942
|
initialState?.columns?.columnVisibilityModel ?? {},
|
|
3999
|
-
(0,
|
|
3943
|
+
(0, import_react26.useCallback)(
|
|
4000
3944
|
(model) => onColumnVisibilityModelChange?.(model),
|
|
4001
3945
|
[onColumnVisibilityModelChange]
|
|
4002
3946
|
)
|
|
4003
3947
|
);
|
|
4004
|
-
const reorderedColumns = (0,
|
|
3948
|
+
const reorderedColumns = (0, import_react26.useMemo)(() => {
|
|
4005
3949
|
if (!columnGroupingModel) return columnsProp;
|
|
4006
3950
|
return reorderColumnsByGroupingModel(columnsProp, columnGroupingModel);
|
|
4007
3951
|
}, [columnsProp, columnGroupingModel]);
|
|
4008
|
-
const
|
|
4009
|
-
() => reorderedColumns.
|
|
4010
|
-
if (visibilityModel[col.field] !== false) acc.push(index);
|
|
4011
|
-
return acc;
|
|
4012
|
-
}, []),
|
|
3952
|
+
const visibleColumns = (0, import_react26.useMemo)(
|
|
3953
|
+
() => reorderedColumns.filter((col) => visibilityModel[col.field] !== false),
|
|
4013
3954
|
[reorderedColumns, visibilityModel]
|
|
4014
3955
|
);
|
|
4015
|
-
const
|
|
4016
|
-
|
|
4017
|
-
[visibleColumnIndexes, reorderedColumns]
|
|
4018
|
-
);
|
|
4019
|
-
const visibleFieldSet = (0, import_react27.useMemo)(() => new Set(visibleColumns.map((c) => c.field)), [visibleColumns]);
|
|
4020
|
-
const tableMinWidth = (0, import_react27.useMemo)(() => {
|
|
3956
|
+
const visibleFieldSet = (0, import_react26.useMemo)(() => new Set(visibleColumns.map((c) => c.field)), [visibleColumns]);
|
|
3957
|
+
const tableMinWidth = (0, import_react26.useMemo)(() => {
|
|
4021
3958
|
const DEFAULT_MIN = 50;
|
|
4022
3959
|
let total = checkboxSelection ? 40 : 0;
|
|
4023
3960
|
for (const col of visibleColumns) {
|
|
@@ -4025,7 +3962,7 @@ function useDataTableRenderer({
|
|
|
4025
3962
|
}
|
|
4026
3963
|
return total;
|
|
4027
3964
|
}, [visibleColumns, checkboxSelection]);
|
|
4028
|
-
const allColumnsByField = (0,
|
|
3965
|
+
const allColumnsByField = (0, import_react26.useMemo)(
|
|
4029
3966
|
() => reorderedColumns.reduce(
|
|
4030
3967
|
(acc, curr) => ({
|
|
4031
3968
|
...acc,
|
|
@@ -4035,39 +3972,21 @@ function useDataTableRenderer({
|
|
|
4035
3972
|
),
|
|
4036
3973
|
[reorderedColumns]
|
|
4037
3974
|
);
|
|
4038
|
-
const
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
}
|
|
4047
|
-
let n = 2;
|
|
4048
|
-
while (taken.has(`${field}__${n}`)) n += 1;
|
|
4049
|
-
taken.add(`${field}__${n}`);
|
|
4050
|
-
return `${field}__${n}`;
|
|
4051
|
-
});
|
|
4052
|
-
}, [reorderedColumns]);
|
|
4053
|
-
const columnIds = (0, import_react27.useMemo)(
|
|
4054
|
-
() => visibleColumnIndexes.map((index) => allColumnIds[index]),
|
|
4055
|
-
[visibleColumnIndexes, allColumnIds]
|
|
4056
|
-
);
|
|
4057
|
-
const visibleColumnsById = (0, import_react27.useMemo)(
|
|
4058
|
-
() => Object.fromEntries(
|
|
4059
|
-
visibleColumns.map((column, index) => [
|
|
4060
|
-
columnIds[index],
|
|
4061
|
-
{
|
|
4062
|
-
...column,
|
|
4063
|
-
headerRef: (0, import_react27.createRef)(),
|
|
4064
|
-
tableColRef: (0, import_react27.createRef)()
|
|
3975
|
+
const visibleColumnsByField = (0, import_react26.useMemo)(
|
|
3976
|
+
() => visibleColumns.reduce(
|
|
3977
|
+
(acc, curr) => ({
|
|
3978
|
+
...acc,
|
|
3979
|
+
[curr.field]: {
|
|
3980
|
+
...curr,
|
|
3981
|
+
headerRef: (0, import_react26.createRef)(),
|
|
3982
|
+
tableColRef: (0, import_react26.createRef)()
|
|
4065
3983
|
}
|
|
4066
|
-
|
|
3984
|
+
}),
|
|
3985
|
+
{}
|
|
4067
3986
|
),
|
|
4068
|
-
[visibleColumns
|
|
3987
|
+
[visibleColumns]
|
|
4069
3988
|
);
|
|
4070
|
-
const sortComparator = (0,
|
|
3989
|
+
const sortComparator = (0, import_react26.useCallback)(
|
|
4071
3990
|
(rowA, rowB) => {
|
|
4072
3991
|
for (const sort of sortModel) {
|
|
4073
3992
|
const { field, sort: direction } = sort;
|
|
@@ -4096,33 +4015,33 @@ function useDataTableRenderer({
|
|
|
4096
4015
|
},
|
|
4097
4016
|
[sortModel, allColumnsByField]
|
|
4098
4017
|
);
|
|
4099
|
-
const rows = (0,
|
|
4018
|
+
const rows = (0, import_react26.useMemo)(
|
|
4100
4019
|
() => sortModel.length ? [..._rows].sort(sortComparator) : _rows,
|
|
4101
4020
|
[_rows, sortModel, sortComparator]
|
|
4102
4021
|
);
|
|
4103
|
-
const sortOrder = (0,
|
|
4022
|
+
const sortOrder = (0, import_react26.useMemo)(
|
|
4104
4023
|
() => Array.from(new Set(_sortOrder || ["asc", "desc", null])),
|
|
4105
4024
|
[_sortOrder]
|
|
4106
4025
|
);
|
|
4107
|
-
const [page, setPage] = (0,
|
|
4026
|
+
const [page, setPage] = (0, import_react26.useState)(paginationModel?.page || 1);
|
|
4108
4027
|
const pageSize = paginationModel?.pageSize || 20;
|
|
4109
|
-
const getId = (0,
|
|
4028
|
+
const getId = (0, import_react26.useCallback)(
|
|
4110
4029
|
(row, index) => _getId?.(row) ?? row.id ?? `${(index || 0) + (page - 1) * pageSize}`,
|
|
4111
4030
|
[_getId, page, pageSize]
|
|
4112
4031
|
);
|
|
4113
|
-
const selectedModelSet = (0,
|
|
4114
|
-
const dataInPage = (0,
|
|
4032
|
+
const selectedModelSet = (0, import_react26.useMemo)(() => new Set(selectionModel || []), [selectionModel]);
|
|
4033
|
+
const dataInPage = (0, import_react26.useMemo)(
|
|
4115
4034
|
() => !pagination || paginationMode === "server" ? rows : rows.slice((page - 1) * pageSize, (page - 1) * pageSize + pageSize),
|
|
4116
4035
|
[rows, page, pageSize, paginationMode, pagination]
|
|
4117
4036
|
);
|
|
4118
|
-
const selectableDataInPage = (0,
|
|
4037
|
+
const selectableDataInPage = (0, import_react26.useMemo)(
|
|
4119
4038
|
() => dataInPage.filter((row, i) => {
|
|
4120
4039
|
if (!isRowSelectable) return true;
|
|
4121
4040
|
return isRowSelectable({ row, id: getId(row, i) });
|
|
4122
4041
|
}),
|
|
4123
4042
|
[dataInPage, isRowSelectable, getId]
|
|
4124
4043
|
);
|
|
4125
|
-
const handleRangeSelection = (0,
|
|
4044
|
+
const handleRangeSelection = (0, import_react26.useCallback)(
|
|
4126
4045
|
(anchor, targetIndex) => {
|
|
4127
4046
|
const startIndex = Math.min(anchor.rowIndex, targetIndex);
|
|
4128
4047
|
const endIndex = Math.max(anchor.rowIndex, targetIndex);
|
|
@@ -4145,60 +4064,51 @@ function useDataTableRenderer({
|
|
|
4145
4064
|
},
|
|
4146
4065
|
[dataInPage, getId, isRowSelectable, selectionModel, onSelectionModelChange]
|
|
4147
4066
|
);
|
|
4148
|
-
const isAllSelected = (0,
|
|
4067
|
+
const isAllSelected = (0, import_react26.useMemo)(
|
|
4149
4068
|
() => selectableDataInPage.length > 0 && selectableDataInPage.every((row, i) => selectedModelSet.has(getId(row, i))),
|
|
4150
4069
|
[selectableDataInPage, selectedModelSet, getId]
|
|
4151
4070
|
);
|
|
4152
4071
|
const rowCount = totalRowsProp || rows.length;
|
|
4153
|
-
const selectableRowCount = (0,
|
|
4072
|
+
const selectableRowCount = (0, import_react26.useMemo)(() => {
|
|
4154
4073
|
if (!isRowSelectable) return rowCount;
|
|
4155
4074
|
return rows.filter((row, i) => isRowSelectable({ row, id: getId(row, i) })).length;
|
|
4156
4075
|
}, [rows, isRowSelectable, getId, rowCount]);
|
|
4157
|
-
const isTotalSelected = (0,
|
|
4076
|
+
const isTotalSelected = (0, import_react26.useMemo)(
|
|
4158
4077
|
() => _isTotalSelected ?? (selectableRowCount > 0 && (selectionModel?.length || 0) === selectableRowCount),
|
|
4159
4078
|
[_isTotalSelected, selectionModel, selectableRowCount]
|
|
4160
4079
|
);
|
|
4161
|
-
const columnWidths = useColumnWidths(
|
|
4162
|
-
const
|
|
4163
|
-
() =>
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
[visibleColumnsById, columnWidths]
|
|
4080
|
+
const columnWidths = useColumnWidths(visibleColumnsByField);
|
|
4081
|
+
const getWidth = (0, import_react26.useCallback)(
|
|
4082
|
+
(f) => columnWidths[f] ?? allColumnsByField[f]?.width ?? // Column prop 으로 지정된 width
|
|
4083
|
+
allColumnsByField[f]?.minWidth ?? 0,
|
|
4084
|
+
[columnWidths, allColumnsByField]
|
|
4167
4085
|
);
|
|
4168
|
-
const
|
|
4169
|
-
// 반환값은 pinned offset으로 더해지므로 반드시 숫자여야 한다. width/minWidth는 '500px' 같은 문자열.
|
|
4170
|
-
(f) => measuredWidthByField[f] ?? parsePxValue(allColumnsByField[f]?.width) ?? // Column prop 으로 지정된 width
|
|
4171
|
-
parsePxValue(allColumnsByField[f]?.minWidth) ?? 0,
|
|
4172
|
-
[measuredWidthByField, allColumnsByField]
|
|
4173
|
-
);
|
|
4174
|
-
const processedColumnGroups = (0, import_react27.useMemo)(() => {
|
|
4086
|
+
const processedColumnGroups = (0, import_react26.useMemo)(() => {
|
|
4175
4087
|
if (!columnGroupingModel) return null;
|
|
4176
4088
|
return calculateColumnGroups(columnGroupingModel, visibleColumns, visibleFieldSet);
|
|
4177
4089
|
}, [columnGroupingModel, visibleColumns, visibleFieldSet]);
|
|
4178
|
-
const effectivePinnedLeft = (0,
|
|
4090
|
+
const effectivePinnedLeft = (0, import_react26.useMemo)(
|
|
4179
4091
|
() => pinnedColumns?.left?.filter((f) => visibleFieldSet.has(f)),
|
|
4180
4092
|
[pinnedColumns?.left, visibleFieldSet]
|
|
4181
4093
|
);
|
|
4182
|
-
const effectivePinnedRight = (0,
|
|
4094
|
+
const effectivePinnedRight = (0, import_react26.useMemo)(
|
|
4183
4095
|
() => pinnedColumns?.right?.filter((f) => visibleFieldSet.has(f)),
|
|
4184
4096
|
[pinnedColumns?.right, visibleFieldSet]
|
|
4185
4097
|
);
|
|
4186
4098
|
const inferredFieldsKey = JSON.stringify(Object.keys(rows[0] || {}));
|
|
4187
|
-
const inferredFields = (0,
|
|
4188
|
-
const columns = (0,
|
|
4099
|
+
const inferredFields = (0, import_react26.useMemo)(() => JSON.parse(inferredFieldsKey), [inferredFieldsKey]);
|
|
4100
|
+
const columns = (0, import_react26.useMemo)(() => {
|
|
4189
4101
|
const baseColumns = visibleColumns.length > 0 ? visibleColumns : reorderedColumns.length > 0 ? [] : inferredFields.map((key) => ({
|
|
4190
4102
|
field: key
|
|
4191
4103
|
}));
|
|
4192
|
-
return baseColumns.map((column
|
|
4193
|
-
const columnId = columnIds[index] ?? String(column.field);
|
|
4104
|
+
return baseColumns.map((column) => {
|
|
4194
4105
|
const isLeftPinned = effectivePinnedLeft?.includes(column.field);
|
|
4195
4106
|
const isRightPinned = effectivePinnedRight?.includes(column.field);
|
|
4196
4107
|
const isPinned = isLeftPinned || isRightPinned;
|
|
4197
4108
|
return {
|
|
4198
4109
|
...column,
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
tableColRef: visibleColumnsById[columnId]?.tableColRef,
|
|
4110
|
+
headerRef: visibleColumnsByField[column.field]?.headerRef,
|
|
4111
|
+
tableColRef: visibleColumnsByField[column.field]?.tableColRef,
|
|
4202
4112
|
isCellEditable: editMode && (typeof column.isCellEditable === "function" ? column.isCellEditable : column.isCellEditable ?? true),
|
|
4203
4113
|
sort: sortModel.find((sort) => sort.field === column.field)?.sort,
|
|
4204
4114
|
sortOrder: allColumnsByField[column.field]?.sortOrder || sortOrder,
|
|
@@ -4215,22 +4125,21 @@ function useDataTableRenderer({
|
|
|
4215
4125
|
inferredFields,
|
|
4216
4126
|
effectivePinnedLeft,
|
|
4217
4127
|
effectivePinnedRight,
|
|
4218
|
-
|
|
4219
|
-
visibleColumnsById,
|
|
4128
|
+
visibleColumnsByField,
|
|
4220
4129
|
allColumnsByField,
|
|
4221
4130
|
editMode,
|
|
4222
4131
|
sortModel,
|
|
4223
4132
|
sortOrder,
|
|
4224
4133
|
getWidth
|
|
4225
4134
|
]);
|
|
4226
|
-
const handlePageChange = (0,
|
|
4135
|
+
const handlePageChange = (0, import_react26.useCallback)(
|
|
4227
4136
|
(newPage) => {
|
|
4228
4137
|
setPage(newPage);
|
|
4229
4138
|
onPaginationModelChange?.({ page: newPage, pageSize });
|
|
4230
4139
|
},
|
|
4231
4140
|
[onPaginationModelChange, pageSize]
|
|
4232
4141
|
);
|
|
4233
|
-
const handleSortChange = (0,
|
|
4142
|
+
const handleSortChange = (0, import_react26.useCallback)(
|
|
4234
4143
|
(props) => {
|
|
4235
4144
|
const { field, currentSort, multiple } = props;
|
|
4236
4145
|
const column = allColumnsByField[field];
|
|
@@ -4253,37 +4162,38 @@ function useDataTableRenderer({
|
|
|
4253
4162
|
},
|
|
4254
4163
|
[sortOrder, allColumnsByField, sortModel, setSortModel]
|
|
4255
4164
|
);
|
|
4256
|
-
(0,
|
|
4165
|
+
(0, import_react26.useEffect)(() => {
|
|
4257
4166
|
if (!paginationModel) {
|
|
4258
4167
|
handlePageChange(1);
|
|
4259
4168
|
}
|
|
4260
4169
|
}, [rowCount, handlePageChange, paginationModel]);
|
|
4261
|
-
(0,
|
|
4170
|
+
(0, import_react26.useEffect)(() => {
|
|
4262
4171
|
const lastPage = Math.max(1, Math.ceil(rowCount / pageSize));
|
|
4263
4172
|
if (page > lastPage) {
|
|
4264
4173
|
handlePageChange(lastPage);
|
|
4265
4174
|
}
|
|
4266
4175
|
}, [page, rowCount, pageSize, handlePageChange]);
|
|
4267
|
-
(0,
|
|
4176
|
+
(0, import_react26.useEffect)(() => {
|
|
4268
4177
|
onSelectionModelChangeRef.current?.([]);
|
|
4269
4178
|
setSelectionAnchor(null);
|
|
4270
4179
|
}, [page]);
|
|
4271
|
-
const prevRowsRef = (0,
|
|
4272
|
-
(0,
|
|
4180
|
+
const prevRowsRef = (0, import_react26.useRef)(_rows);
|
|
4181
|
+
(0, import_react26.useEffect)(() => {
|
|
4273
4182
|
if (prevRowsRef.current !== _rows) {
|
|
4274
4183
|
setSelectionAnchor(null);
|
|
4275
4184
|
prevRowsRef.current = _rows;
|
|
4276
4185
|
}
|
|
4277
4186
|
}, [_rows]);
|
|
4278
|
-
const handleAutoFit = (0,
|
|
4279
|
-
(
|
|
4280
|
-
const colDef =
|
|
4187
|
+
const handleAutoFit = (0, import_react26.useCallback)(
|
|
4188
|
+
(field) => {
|
|
4189
|
+
const colDef = visibleColumnsByField[field];
|
|
4281
4190
|
if (!colDef?.headerRef.current) return;
|
|
4282
|
-
const
|
|
4191
|
+
const column = allColumnsByField[field];
|
|
4192
|
+
const columnType = column && "type" in column ? column.type : void 0;
|
|
4283
4193
|
if (columnType === "actions") return;
|
|
4284
4194
|
const optimalWidth = computeAutoFitWidth({
|
|
4285
4195
|
headerEl: colDef.headerRef.current,
|
|
4286
|
-
field
|
|
4196
|
+
field,
|
|
4287
4197
|
dataInPage
|
|
4288
4198
|
});
|
|
4289
4199
|
if (optimalWidth == null) return;
|
|
@@ -4291,7 +4201,7 @@ function useDataTableRenderer({
|
|
|
4291
4201
|
colDef.headerRef.current.style.width = widthPx;
|
|
4292
4202
|
if (colDef.tableColRef.current) colDef.tableColRef.current.style.width = widthPx;
|
|
4293
4203
|
},
|
|
4294
|
-
[
|
|
4204
|
+
[visibleColumnsByField, allColumnsByField, dataInPage]
|
|
4295
4205
|
);
|
|
4296
4206
|
return {
|
|
4297
4207
|
rowCount,
|
|
@@ -4307,8 +4217,8 @@ function useDataTableRenderer({
|
|
|
4307
4217
|
handleAutoFit,
|
|
4308
4218
|
isAllSelected,
|
|
4309
4219
|
isTotalSelected,
|
|
4310
|
-
isSelectedRow: (0,
|
|
4311
|
-
isRowSelectable: (0,
|
|
4220
|
+
isSelectedRow: (0, import_react26.useCallback)((model) => selectedModelSet.has(model), [selectedModelSet]),
|
|
4221
|
+
isRowSelectable: (0, import_react26.useCallback)(
|
|
4312
4222
|
(rowId, row) => {
|
|
4313
4223
|
if (!isRowSelectable) return true;
|
|
4314
4224
|
return isRowSelectable({ row, id: rowId });
|
|
@@ -4316,13 +4226,13 @@ function useDataTableRenderer({
|
|
|
4316
4226
|
[isRowSelectable]
|
|
4317
4227
|
),
|
|
4318
4228
|
focusedRowId,
|
|
4319
|
-
onRowFocus: (0,
|
|
4229
|
+
onRowFocus: (0, import_react26.useCallback)((rowId) => {
|
|
4320
4230
|
setFocusedRowId(rowId);
|
|
4321
4231
|
}, []),
|
|
4322
|
-
onAllCheckboxChange: (0,
|
|
4232
|
+
onAllCheckboxChange: (0, import_react26.useCallback)(() => {
|
|
4323
4233
|
onSelectionModelChange?.(isAllSelected ? [] : selectableDataInPage.map(getId));
|
|
4324
4234
|
}, [isAllSelected, selectableDataInPage, onSelectionModelChange, getId]),
|
|
4325
|
-
onCheckboxChange: (0,
|
|
4235
|
+
onCheckboxChange: (0, import_react26.useCallback)(
|
|
4326
4236
|
(event, selectedModel) => {
|
|
4327
4237
|
const isShiftClick = "shiftKey" in event && event.shiftKey;
|
|
4328
4238
|
const rowIndex = dataInPage.findIndex((row, i) => getId(row, i) === selectedModel);
|
|
@@ -4356,7 +4266,7 @@ function useDataTableRenderer({
|
|
|
4356
4266
|
columns,
|
|
4357
4267
|
tableMinWidth,
|
|
4358
4268
|
processedColumnGroups,
|
|
4359
|
-
onTotalSelect: (0,
|
|
4269
|
+
onTotalSelect: (0, import_react26.useCallback)(() => {
|
|
4360
4270
|
const selectableRows = rows.filter((row, i) => {
|
|
4361
4271
|
if (!isRowSelectable) return true;
|
|
4362
4272
|
return isRowSelectable({ row, id: getId(row, i) });
|
|
@@ -4370,11 +4280,11 @@ function useDataTableRenderer({
|
|
|
4370
4280
|
}
|
|
4371
4281
|
|
|
4372
4282
|
// src/components/Table/Table.tsx
|
|
4373
|
-
var
|
|
4283
|
+
var import_react27 = __toESM(require("react"));
|
|
4374
4284
|
var import_joy35 = require("@mui/joy");
|
|
4375
4285
|
var Table = (props) => {
|
|
4376
4286
|
const { children, ...inheritProps } = props;
|
|
4377
|
-
return /* @__PURE__ */
|
|
4287
|
+
return /* @__PURE__ */ import_react27.default.createElement(import_joy35.Table, { ...inheritProps }, children);
|
|
4378
4288
|
};
|
|
4379
4289
|
Table.displayName = "Table";
|
|
4380
4290
|
function TableHead(props) {
|
|
@@ -4385,7 +4295,7 @@ function TableHead(props) {
|
|
|
4385
4295
|
slots: { checkbox: RenderCheckbox = Checkbox_default } = {},
|
|
4386
4296
|
slotProps: { checkbox: checkboxProps = {} } = {}
|
|
4387
4297
|
} = props;
|
|
4388
|
-
return /* @__PURE__ */
|
|
4298
|
+
return /* @__PURE__ */ import_react27.default.createElement("thead", null, /* @__PURE__ */ import_react27.default.createElement("tr", null, showCheckbox && /* @__PURE__ */ import_react27.default.createElement(
|
|
4389
4299
|
"th",
|
|
4390
4300
|
{
|
|
4391
4301
|
style: {
|
|
@@ -4393,8 +4303,8 @@ function TableHead(props) {
|
|
|
4393
4303
|
textAlign: "center"
|
|
4394
4304
|
}
|
|
4395
4305
|
},
|
|
4396
|
-
/* @__PURE__ */
|
|
4397
|
-
), headCells.map((headCell) => /* @__PURE__ */
|
|
4306
|
+
/* @__PURE__ */ import_react27.default.createElement(RenderCheckbox, { onChange: onCheckboxChange, ...checkboxProps })
|
|
4307
|
+
), headCells.map((headCell) => /* @__PURE__ */ import_react27.default.createElement(
|
|
4398
4308
|
"th",
|
|
4399
4309
|
{
|
|
4400
4310
|
key: headCell.label,
|
|
@@ -4419,15 +4329,15 @@ function TableBody(props) {
|
|
|
4419
4329
|
slots: { checkbox: RenderCheckbox = Checkbox_default } = {},
|
|
4420
4330
|
slotProps: { checkbox: checkboxProps = {} } = {}
|
|
4421
4331
|
} = props;
|
|
4422
|
-
return /* @__PURE__ */
|
|
4332
|
+
return /* @__PURE__ */ import_react27.default.createElement("tbody", null, rows.map((row, rowIndex) => /* @__PURE__ */ import_react27.default.createElement("tr", { key: `table-row-${rowIndex}` }, showCheckbox && /* @__PURE__ */ import_react27.default.createElement(
|
|
4423
4333
|
"td",
|
|
4424
4334
|
{
|
|
4425
4335
|
style: {
|
|
4426
4336
|
textAlign: "center"
|
|
4427
4337
|
}
|
|
4428
4338
|
},
|
|
4429
|
-
/* @__PURE__ */
|
|
4430
|
-
), cellOrder.map((cellKey) => /* @__PURE__ */
|
|
4339
|
+
/* @__PURE__ */ import_react27.default.createElement(RenderCheckbox, { onChange: (event) => onCheckboxChange?.(event, rowIndex), ...checkboxProps })
|
|
4340
|
+
), cellOrder.map((cellKey) => /* @__PURE__ */ import_react27.default.createElement(
|
|
4431
4341
|
"td",
|
|
4432
4342
|
{
|
|
4433
4343
|
key: cellKey,
|
|
@@ -4441,7 +4351,7 @@ function TableBody(props) {
|
|
|
4441
4351
|
TableBody.displayName = "TableBody";
|
|
4442
4352
|
|
|
4443
4353
|
// src/components/Pagination/Pagination.tsx
|
|
4444
|
-
var
|
|
4354
|
+
var import_react28 = __toESM(require("react"));
|
|
4445
4355
|
var import_ChevronLeftRounded = __toESM(require("@mui/icons-material/ChevronLeftRounded"));
|
|
4446
4356
|
var import_ChevronRightRounded = __toESM(require("@mui/icons-material/ChevronRightRounded"));
|
|
4447
4357
|
var import_FirstPageRounded = __toESM(require("@mui/icons-material/FirstPageRounded"));
|
|
@@ -4511,7 +4421,7 @@ function Pagination(inProps) {
|
|
|
4511
4421
|
const [paginationModel, setPaginationModel] = useControlledState(
|
|
4512
4422
|
_paginationModel,
|
|
4513
4423
|
defaultPaginationModel,
|
|
4514
|
-
(0,
|
|
4424
|
+
(0, import_react28.useCallback)(
|
|
4515
4425
|
(newPage) => {
|
|
4516
4426
|
onPageChange(newPage.page);
|
|
4517
4427
|
},
|
|
@@ -4527,7 +4437,7 @@ function Pagination(inProps) {
|
|
|
4527
4437
|
const afterPages = [paginationModel.page + 1, paginationModel.page + 2].filter((p) => p <= lastPage - 1);
|
|
4528
4438
|
const isMoreAfterPages = lastPage > 1 && paginationModel.page < lastPage - 3;
|
|
4529
4439
|
const isMoreBeforePages = lastPage > 1 && paginationModel.page > 4;
|
|
4530
|
-
(0,
|
|
4440
|
+
(0, import_react28.useEffect)(() => {
|
|
4531
4441
|
if (paginationModel.page > lastPage) {
|
|
4532
4442
|
setPaginationModel({ ...paginationModel, page: lastPage });
|
|
4533
4443
|
}
|
|
@@ -4537,7 +4447,7 @@ function Pagination(inProps) {
|
|
|
4537
4447
|
value: `${i + 1}`
|
|
4538
4448
|
}));
|
|
4539
4449
|
if (variant === "compact") {
|
|
4540
|
-
return /* @__PURE__ */
|
|
4450
|
+
return /* @__PURE__ */ import_react28.default.createElement(PaginationRoot, { ...innerProps }, /* @__PURE__ */ import_react28.default.createElement(PaginationContainer, { direction: "row", size, alignItems: "center" }, /* @__PURE__ */ import_react28.default.createElement(Stack_default, { direction: "row" }, /* @__PURE__ */ import_react28.default.createElement(
|
|
4541
4451
|
PaginationIconButton,
|
|
4542
4452
|
{
|
|
4543
4453
|
size,
|
|
@@ -4547,8 +4457,8 @@ function Pagination(inProps) {
|
|
|
4547
4457
|
disabled: paginationModel.page === firstPage,
|
|
4548
4458
|
"aria-label": "First page"
|
|
4549
4459
|
},
|
|
4550
|
-
/* @__PURE__ */
|
|
4551
|
-
), /* @__PURE__ */
|
|
4460
|
+
/* @__PURE__ */ import_react28.default.createElement(import_FirstPageRounded.default, null)
|
|
4461
|
+
), /* @__PURE__ */ import_react28.default.createElement(
|
|
4552
4462
|
PaginationIconButton,
|
|
4553
4463
|
{
|
|
4554
4464
|
size,
|
|
@@ -4558,8 +4468,8 @@ function Pagination(inProps) {
|
|
|
4558
4468
|
disabled: paginationModel.page === firstPage,
|
|
4559
4469
|
"aria-label": "Previous page"
|
|
4560
4470
|
},
|
|
4561
|
-
/* @__PURE__ */
|
|
4562
|
-
)), /* @__PURE__ */
|
|
4471
|
+
/* @__PURE__ */ import_react28.default.createElement(import_ChevronLeftRounded.default, null)
|
|
4472
|
+
)), /* @__PURE__ */ import_react28.default.createElement(
|
|
4563
4473
|
Autocomplete_default,
|
|
4564
4474
|
{
|
|
4565
4475
|
size,
|
|
@@ -4578,7 +4488,7 @@ function Pagination(inProps) {
|
|
|
4578
4488
|
}[size]
|
|
4579
4489
|
}
|
|
4580
4490
|
}
|
|
4581
|
-
), /* @__PURE__ */
|
|
4491
|
+
), /* @__PURE__ */ import_react28.default.createElement(
|
|
4582
4492
|
Typography_default,
|
|
4583
4493
|
{
|
|
4584
4494
|
level: `body-${size}`,
|
|
@@ -4589,7 +4499,7 @@ function Pagination(inProps) {
|
|
|
4589
4499
|
},
|
|
4590
4500
|
"/ ",
|
|
4591
4501
|
lastPage
|
|
4592
|
-
), /* @__PURE__ */
|
|
4502
|
+
), /* @__PURE__ */ import_react28.default.createElement(Stack_default, { direction: "row" }, /* @__PURE__ */ import_react28.default.createElement(
|
|
4593
4503
|
PaginationIconButton,
|
|
4594
4504
|
{
|
|
4595
4505
|
size,
|
|
@@ -4599,8 +4509,8 @@ function Pagination(inProps) {
|
|
|
4599
4509
|
disabled: paginationModel.page === lastPage,
|
|
4600
4510
|
"aria-label": "Next page"
|
|
4601
4511
|
},
|
|
4602
|
-
/* @__PURE__ */
|
|
4603
|
-
), /* @__PURE__ */
|
|
4512
|
+
/* @__PURE__ */ import_react28.default.createElement(import_ChevronRightRounded.default, null)
|
|
4513
|
+
), /* @__PURE__ */ import_react28.default.createElement(
|
|
4604
4514
|
PaginationIconButton,
|
|
4605
4515
|
{
|
|
4606
4516
|
size,
|
|
@@ -4610,10 +4520,10 @@ function Pagination(inProps) {
|
|
|
4610
4520
|
disabled: paginationModel.page === lastPage,
|
|
4611
4521
|
"aria-label": "Last page"
|
|
4612
4522
|
},
|
|
4613
|
-
/* @__PURE__ */
|
|
4523
|
+
/* @__PURE__ */ import_react28.default.createElement(import_LastPageRounded.default, null)
|
|
4614
4524
|
))));
|
|
4615
4525
|
}
|
|
4616
|
-
return /* @__PURE__ */
|
|
4526
|
+
return /* @__PURE__ */ import_react28.default.createElement(PaginationRoot, { ...innerProps }, /* @__PURE__ */ import_react28.default.createElement(PaginationContainer, { direction: "row", size, alignItems: "center" }, /* @__PURE__ */ import_react28.default.createElement(
|
|
4617
4527
|
PaginationIconButton,
|
|
4618
4528
|
{
|
|
4619
4529
|
size,
|
|
@@ -4623,8 +4533,8 @@ function Pagination(inProps) {
|
|
|
4623
4533
|
disabled: paginationModel.page === firstPage,
|
|
4624
4534
|
"aria-label": "Previous page"
|
|
4625
4535
|
},
|
|
4626
|
-
/* @__PURE__ */
|
|
4627
|
-
), paginationModel.page !== firstPage && /* @__PURE__ */
|
|
4536
|
+
/* @__PURE__ */ import_react28.default.createElement(import_ChevronLeftRounded.default, null)
|
|
4537
|
+
), paginationModel.page !== firstPage && /* @__PURE__ */ import_react28.default.createElement(PaginationButton, { size, variant: "plain", color: "neutral", onClick: () => handlePageChange(firstPage) }, firstPage), isMoreBeforePages && /* @__PURE__ */ import_react28.default.createElement(
|
|
4628
4538
|
PaginationButton,
|
|
4629
4539
|
{
|
|
4630
4540
|
size,
|
|
@@ -4634,7 +4544,7 @@ function Pagination(inProps) {
|
|
|
4634
4544
|
"aria-label": "More previous pages"
|
|
4635
4545
|
},
|
|
4636
4546
|
"..."
|
|
4637
|
-
), beforePages.map((p) => /* @__PURE__ */
|
|
4547
|
+
), beforePages.map((p) => /* @__PURE__ */ import_react28.default.createElement(PaginationButton, { key: p, size, variant: "plain", color: "neutral", onClick: () => handlePageChange(p) }, p)), /* @__PURE__ */ import_react28.default.createElement(PaginationButton, { active: "true", size, "aria-current": "page" }, paginationModel.page), afterPages.map((p) => /* @__PURE__ */ import_react28.default.createElement(PaginationButton, { key: p, size, variant: "plain", color: "neutral", onClick: () => handlePageChange(p) }, p)), isMoreAfterPages && /* @__PURE__ */ import_react28.default.createElement(
|
|
4638
4548
|
PaginationButton,
|
|
4639
4549
|
{
|
|
4640
4550
|
size,
|
|
@@ -4644,7 +4554,7 @@ function Pagination(inProps) {
|
|
|
4644
4554
|
onClick: () => handlePageChange(paginationModel.page + 3)
|
|
4645
4555
|
},
|
|
4646
4556
|
"..."
|
|
4647
|
-
), paginationModel.page !== lastPage && /* @__PURE__ */
|
|
4557
|
+
), paginationModel.page !== lastPage && /* @__PURE__ */ import_react28.default.createElement(PaginationButton, { size, variant: "plain", color: "neutral", onClick: () => handlePageChange(lastPage) }, lastPage), /* @__PURE__ */ import_react28.default.createElement(
|
|
4648
4558
|
PaginationIconButton,
|
|
4649
4559
|
{
|
|
4650
4560
|
size,
|
|
@@ -4654,7 +4564,7 @@ function Pagination(inProps) {
|
|
|
4654
4564
|
disabled: paginationModel.page === lastPage,
|
|
4655
4565
|
"aria-label": "Next page"
|
|
4656
4566
|
},
|
|
4657
|
-
/* @__PURE__ */
|
|
4567
|
+
/* @__PURE__ */ import_react28.default.createElement(import_ChevronRightRounded.default, null)
|
|
4658
4568
|
)));
|
|
4659
4569
|
}
|
|
4660
4570
|
Pagination.displayName = "Pagination";
|
|
@@ -4728,9 +4638,9 @@ function Component(props, apiRef) {
|
|
|
4728
4638
|
isTotalSelected: ___________,
|
|
4729
4639
|
...innerProps
|
|
4730
4640
|
} = props;
|
|
4731
|
-
const tableId = (0,
|
|
4732
|
-
const parentRef = (0,
|
|
4733
|
-
const tableBodyRef = (0,
|
|
4641
|
+
const tableId = (0, import_react29.useId)();
|
|
4642
|
+
const parentRef = (0, import_react29.useRef)(null);
|
|
4643
|
+
const tableBodyRef = (0, import_react29.useRef)(null);
|
|
4734
4644
|
const {
|
|
4735
4645
|
columns,
|
|
4736
4646
|
processedColumnGroups,
|
|
@@ -4766,10 +4676,10 @@ function Component(props, apiRef) {
|
|
|
4766
4676
|
measureElement: (element) => element.clientHeight,
|
|
4767
4677
|
overscan: 10
|
|
4768
4678
|
});
|
|
4769
|
-
const paginationModel = (0,
|
|
4679
|
+
const paginationModel = (0, import_react29.useMemo)(() => ({ page, pageSize }), [page, pageSize]);
|
|
4770
4680
|
const columnsKey = getObjectVersion(columns);
|
|
4771
|
-
const headerCheckboxElement = (0,
|
|
4772
|
-
() => /* @__PURE__ */
|
|
4681
|
+
const headerCheckboxElement = (0, import_react29.useMemo)(
|
|
4682
|
+
() => /* @__PURE__ */ import_react29.default.createElement(
|
|
4773
4683
|
RenderCheckbox,
|
|
4774
4684
|
{
|
|
4775
4685
|
onChange: onAllCheckboxChange,
|
|
@@ -4794,20 +4704,20 @@ function Component(props, apiRef) {
|
|
|
4794
4704
|
const showNoRowsOverlay = !loading && rowCount === 0;
|
|
4795
4705
|
const showFillerColumn = columns.length > 0 && columns.every((c) => !!c.width);
|
|
4796
4706
|
const totalColCount = Math.max(1, columns.length + (checkboxSelection ? 1 : 0) + (showFillerColumn ? 1 : 0));
|
|
4797
|
-
const getRowClickHandler = (0,
|
|
4707
|
+
const getRowClickHandler = (0, import_react29.useCallback)(
|
|
4798
4708
|
(row, rowId) => (e) => {
|
|
4799
4709
|
onRowClick?.({ row, rowId }, e);
|
|
4800
4710
|
checkboxSelection && !disableSelectionOnClick && isRowSelectableCheck(rowId, row) && onCheckboxChange(e, rowId);
|
|
4801
4711
|
},
|
|
4802
4712
|
[onRowClick, checkboxSelection, disableSelectionOnClick, onCheckboxChange, isRowSelectableCheck]
|
|
4803
4713
|
);
|
|
4804
|
-
const getRowFocusHandler = (0,
|
|
4714
|
+
const getRowFocusHandler = (0, import_react29.useCallback)(
|
|
4805
4715
|
(rowId) => () => {
|
|
4806
4716
|
onRowFocus(rowId);
|
|
4807
4717
|
},
|
|
4808
4718
|
[onRowFocus]
|
|
4809
4719
|
);
|
|
4810
|
-
const getCheckboxClickHandler = (0,
|
|
4720
|
+
const getCheckboxClickHandler = (0, import_react29.useCallback)(
|
|
4811
4721
|
(rowId, row) => (e) => {
|
|
4812
4722
|
e.stopPropagation();
|
|
4813
4723
|
if (isRowSelectableCheck(rowId, row)) {
|
|
@@ -4817,7 +4727,7 @@ function Component(props, apiRef) {
|
|
|
4817
4727
|
},
|
|
4818
4728
|
[onCheckboxChange, isRowSelectableCheck, onRowFocus]
|
|
4819
4729
|
);
|
|
4820
|
-
const handleTableKeyDown = (0,
|
|
4730
|
+
const handleTableKeyDown = (0, import_react29.useCallback)(
|
|
4821
4731
|
(e) => {
|
|
4822
4732
|
const supportedKeys = ["ArrowUp", "ArrowDown", " ", "Home", "End", "PageUp", "PageDown"];
|
|
4823
4733
|
if (!supportedKeys.includes(e.key)) return;
|
|
@@ -4907,7 +4817,7 @@ function Component(props, apiRef) {
|
|
|
4907
4817
|
virtualizer
|
|
4908
4818
|
]
|
|
4909
4819
|
);
|
|
4910
|
-
(0,
|
|
4820
|
+
(0, import_react29.useImperativeHandle)(apiRef, () => ({
|
|
4911
4821
|
getRowIndexRelativeToVisibleRows(rowId) {
|
|
4912
4822
|
return dataInPage.findIndex((row) => String(getId(row)) === rowId);
|
|
4913
4823
|
},
|
|
@@ -4923,7 +4833,7 @@ function Component(props, apiRef) {
|
|
|
4923
4833
|
});
|
|
4924
4834
|
}
|
|
4925
4835
|
}));
|
|
4926
|
-
return /* @__PURE__ */
|
|
4836
|
+
return /* @__PURE__ */ import_react29.default.createElement(
|
|
4927
4837
|
Box_default,
|
|
4928
4838
|
{
|
|
4929
4839
|
sx: {
|
|
@@ -4933,7 +4843,7 @@ function Component(props, apiRef) {
|
|
|
4933
4843
|
flexDirection: "column"
|
|
4934
4844
|
}
|
|
4935
4845
|
},
|
|
4936
|
-
(!!checkboxSelection || !!Toolbar) && /* @__PURE__ */
|
|
4846
|
+
(!!checkboxSelection || !!Toolbar) && /* @__PURE__ */ import_react29.default.createElement(
|
|
4937
4847
|
Stack_default,
|
|
4938
4848
|
{
|
|
4939
4849
|
direction: "row",
|
|
@@ -4943,10 +4853,10 @@ function Component(props, apiRef) {
|
|
|
4943
4853
|
justifyContent: "space-between",
|
|
4944
4854
|
alignItems: "center"
|
|
4945
4855
|
},
|
|
4946
|
-
!!checkboxSelection && /* @__PURE__ */
|
|
4947
|
-
Toolbar && /* @__PURE__ */
|
|
4856
|
+
!!checkboxSelection && /* @__PURE__ */ import_react29.default.createElement(Stack_default, { direction: "row", spacing: 1 }, !isAllSelected && /* @__PURE__ */ import_react29.default.createElement(Typography_default, { level: "body-xs" }, numberFormatter(selectionModel?.length || 0), " items selected"), isAllSelected && !isTotalSelected && /* @__PURE__ */ import_react29.default.createElement(Stack_default, { direction: "row", spacing: 1, alignItems: "center" }, /* @__PURE__ */ import_react29.default.createElement(Typography_default, { level: "body-xs" }, "All ", numberFormatter(selectionModel?.length || 0), " items on this page are selected."), /* @__PURE__ */ import_react29.default.createElement(Button_default, { size: "sm", variant: "plain", onClick: onTotalSelect }, "Select all ", numberFormatter(selectableRowCount), " items")), isTotalSelected && /* @__PURE__ */ import_react29.default.createElement(Stack_default, { direction: "row", spacing: 1, alignItems: "center" }, /* @__PURE__ */ import_react29.default.createElement(Typography_default, { level: "body-xs" }, "All ", numberFormatter(selectableRowCount), " items are selected."), /* @__PURE__ */ import_react29.default.createElement(Button_default, { size: "sm", variant: "plain", color: "danger", onClick: onTotalSelect }, "Cancel"))),
|
|
4857
|
+
Toolbar && /* @__PURE__ */ import_react29.default.createElement(Toolbar, { ...toolbarProps || {} })
|
|
4948
4858
|
),
|
|
4949
|
-
/* @__PURE__ */
|
|
4859
|
+
/* @__PURE__ */ import_react29.default.createElement(
|
|
4950
4860
|
Sheet_default,
|
|
4951
4861
|
{
|
|
4952
4862
|
variant: "outlined",
|
|
@@ -4967,24 +4877,24 @@ function Component(props, apiRef) {
|
|
|
4967
4877
|
ref: parentRef,
|
|
4968
4878
|
...backgroundProps
|
|
4969
4879
|
},
|
|
4970
|
-
/* @__PURE__ */
|
|
4880
|
+
/* @__PURE__ */ import_react29.default.createElement(Table, { ...innerProps, sx: { ...innerProps.sx, minWidth: tableMinWidth } }, /* @__PURE__ */ import_react29.default.createElement("colgroup", null, checkboxSelection && /* @__PURE__ */ import_react29.default.createElement(
|
|
4971
4881
|
"col",
|
|
4972
4882
|
{
|
|
4973
4883
|
style: {
|
|
4974
4884
|
width: "40px"
|
|
4975
4885
|
}
|
|
4976
4886
|
}
|
|
4977
|
-
), columns.map((c) => /* @__PURE__ */
|
|
4887
|
+
), columns.map((c) => /* @__PURE__ */ import_react29.default.createElement(
|
|
4978
4888
|
"col",
|
|
4979
4889
|
{
|
|
4980
4890
|
ref: c.tableColRef,
|
|
4981
|
-
key: c.
|
|
4891
|
+
key: `${c.field.toString()}_${c.width}`,
|
|
4982
4892
|
style: {
|
|
4983
4893
|
width: c.width,
|
|
4984
4894
|
minWidth: c.minWidth ?? "50px"
|
|
4985
4895
|
}
|
|
4986
4896
|
}
|
|
4987
|
-
)), showFillerColumn && /* @__PURE__ */
|
|
4897
|
+
)), showFillerColumn && /* @__PURE__ */ import_react29.default.createElement("col", { style: { minWidth: 0 } })), /* @__PURE__ */ import_react29.default.createElement("thead", null, processedColumnGroups && processedColumnGroups.groups.length > 0 && processedColumnGroups.groups.map((levelGroups, level) => /* @__PURE__ */ import_react29.default.createElement("tr", { key: `group-level-${level}` }, checkboxSelection && level === 0 && /* @__PURE__ */ import_react29.default.createElement(
|
|
4988
4898
|
"th",
|
|
4989
4899
|
{
|
|
4990
4900
|
rowSpan: processedColumnGroups.maxLevel + 2,
|
|
@@ -4995,12 +4905,12 @@ function Component(props, apiRef) {
|
|
|
4995
4905
|
}
|
|
4996
4906
|
},
|
|
4997
4907
|
headerCheckboxElement
|
|
4998
|
-
), level > 0 && Array.from({ length: levelGroups[0]?.startIndex || 0 }).map((_2, i) => /* @__PURE__ */
|
|
4908
|
+
), level > 0 && Array.from({ length: levelGroups[0]?.startIndex || 0 }).map((_2, i) => /* @__PURE__ */ import_react29.default.createElement("th", { key: `empty-${level}-${i}` })), levelGroups.filter((g) => g.colspan > 0).map((group, groupIndex) => {
|
|
4999
4909
|
const nextGroup = levelGroups[groupIndex + 1];
|
|
5000
4910
|
const emptyCells = nextGroup ? nextGroup.startIndex - (group.startIndex + group.colspan) : columns.length - (group.startIndex + group.colspan);
|
|
5001
4911
|
const params = { groupId: group.groupId };
|
|
5002
4912
|
const computedHeaderClassName = group.headerClassName ? typeof group.headerClassName === "function" ? group.headerClassName(params) : group.headerClassName : void 0;
|
|
5003
|
-
return /* @__PURE__ */
|
|
4913
|
+
return /* @__PURE__ */ import_react29.default.createElement(import_react29.Fragment, { key: group.groupId }, /* @__PURE__ */ import_react29.default.createElement(
|
|
5004
4914
|
"th",
|
|
5005
4915
|
{
|
|
5006
4916
|
colSpan: group.colspan,
|
|
@@ -5012,14 +4922,14 @@ function Component(props, apiRef) {
|
|
|
5012
4922
|
className: computedHeaderClassName
|
|
5013
4923
|
},
|
|
5014
4924
|
group.headerName ?? group.groupId
|
|
5015
|
-
), emptyCells > 0 && Array.from({ length: emptyCells }).map((_2, i) => /* @__PURE__ */
|
|
5016
|
-
}), showFillerColumn && level === 0 && /* @__PURE__ */
|
|
4925
|
+
), emptyCells > 0 && Array.from({ length: emptyCells }).map((_2, i) => /* @__PURE__ */ import_react29.default.createElement("th", { key: `empty-between-${level}-${groupIndex}-${i}`, colSpan: 1 })));
|
|
4926
|
+
}), showFillerColumn && level === 0 && /* @__PURE__ */ import_react29.default.createElement(
|
|
5017
4927
|
"th",
|
|
5018
4928
|
{
|
|
5019
4929
|
"aria-hidden": "true",
|
|
5020
4930
|
rowSpan: processedColumnGroups.maxLevel + 2
|
|
5021
4931
|
}
|
|
5022
|
-
))), /* @__PURE__ */
|
|
4932
|
+
))), /* @__PURE__ */ import_react29.default.createElement("tr", null, (!processedColumnGroups || processedColumnGroups.groups.length === 0) && checkboxSelection && /* @__PURE__ */ import_react29.default.createElement(
|
|
5023
4933
|
"th",
|
|
5024
4934
|
{
|
|
5025
4935
|
style: {
|
|
@@ -5030,7 +4940,7 @@ function Component(props, apiRef) {
|
|
|
5030
4940
|
headerCheckboxElement
|
|
5031
4941
|
), columns.map((c, i) => (
|
|
5032
4942
|
// @ts-ignore
|
|
5033
|
-
/* @__PURE__ */
|
|
4943
|
+
/* @__PURE__ */ import_react29.default.createElement(
|
|
5034
4944
|
HeadCell2,
|
|
5035
4945
|
{
|
|
5036
4946
|
tableId,
|
|
@@ -5042,7 +4952,7 @@ function Component(props, apiRef) {
|
|
|
5042
4952
|
...c
|
|
5043
4953
|
}
|
|
5044
4954
|
)
|
|
5045
|
-
)), showFillerColumn && (!processedColumnGroups || processedColumnGroups.groups.length === 0) && /* @__PURE__ */
|
|
4955
|
+
)), showFillerColumn && (!processedColumnGroups || processedColumnGroups.groups.length === 0) && /* @__PURE__ */ import_react29.default.createElement("th", { "aria-hidden": "true" }))), /* @__PURE__ */ import_react29.default.createElement(
|
|
5046
4956
|
VirtualizedTableBody,
|
|
5047
4957
|
{
|
|
5048
4958
|
ref: tableBodyRef,
|
|
@@ -5053,7 +4963,7 @@ function Component(props, apiRef) {
|
|
|
5053
4963
|
role: "rowgroup",
|
|
5054
4964
|
"aria-label": "DataTableBody"
|
|
5055
4965
|
},
|
|
5056
|
-
!!loading && /* @__PURE__ */
|
|
4966
|
+
!!loading && /* @__PURE__ */ import_react29.default.createElement(OverlayWrapper, null, /* @__PURE__ */ import_react29.default.createElement(
|
|
5057
4967
|
"td",
|
|
5058
4968
|
{
|
|
5059
4969
|
style: {
|
|
@@ -5062,7 +4972,7 @@ function Component(props, apiRef) {
|
|
|
5062
4972
|
overflow: "visible"
|
|
5063
4973
|
}
|
|
5064
4974
|
},
|
|
5065
|
-
/* @__PURE__ */
|
|
4975
|
+
/* @__PURE__ */ import_react29.default.createElement(
|
|
5066
4976
|
Box_default,
|
|
5067
4977
|
{
|
|
5068
4978
|
sx: {
|
|
@@ -5072,10 +4982,10 @@ function Component(props, apiRef) {
|
|
|
5072
4982
|
right: 0
|
|
5073
4983
|
}
|
|
5074
4984
|
},
|
|
5075
|
-
/* @__PURE__ */
|
|
4985
|
+
/* @__PURE__ */ import_react29.default.createElement(LoadingOverlay, null)
|
|
5076
4986
|
)
|
|
5077
4987
|
)),
|
|
5078
|
-
showNoRowsOverlay && /* @__PURE__ */
|
|
4988
|
+
showNoRowsOverlay && /* @__PURE__ */ import_react29.default.createElement("tr", null, /* @__PURE__ */ import_react29.default.createElement("td", { colSpan: totalColCount, style: { border: "none" } }, /* @__PURE__ */ import_react29.default.createElement(
|
|
5079
4989
|
Box_default,
|
|
5080
4990
|
{
|
|
5081
4991
|
sx: {
|
|
@@ -5085,14 +4995,14 @@ function Component(props, apiRef) {
|
|
|
5085
4995
|
minHeight: "150px"
|
|
5086
4996
|
}
|
|
5087
4997
|
},
|
|
5088
|
-
/* @__PURE__ */
|
|
4998
|
+
/* @__PURE__ */ import_react29.default.createElement(NoRowsOverlay, { ...noRowsOverlayProps })
|
|
5089
4999
|
))),
|
|
5090
5000
|
virtualizedItems.map((virtualizedRow, index) => {
|
|
5091
5001
|
const rowIndex = virtualizedRow.index;
|
|
5092
5002
|
const row = dataInPage[rowIndex];
|
|
5093
5003
|
const rowId = getId(row, rowIndex);
|
|
5094
5004
|
const striped = stripe && (stripe === "even" && (rowIndex + 1) % 2 === 0 || stripe === "odd" && (rowIndex + 1) % 2 === 1);
|
|
5095
|
-
return /* @__PURE__ */
|
|
5005
|
+
return /* @__PURE__ */ import_react29.default.createElement(
|
|
5096
5006
|
VirtualizedTableRow,
|
|
5097
5007
|
{
|
|
5098
5008
|
key: virtualizedRow.key,
|
|
@@ -5112,7 +5022,7 @@ function Component(props, apiRef) {
|
|
|
5112
5022
|
transform: `translateY(${virtualizedRow.start - index * virtualizedRow.size}px)`
|
|
5113
5023
|
}
|
|
5114
5024
|
},
|
|
5115
|
-
checkboxSelection && /* @__PURE__ */
|
|
5025
|
+
checkboxSelection && /* @__PURE__ */ import_react29.default.createElement(
|
|
5116
5026
|
"th",
|
|
5117
5027
|
{
|
|
5118
5028
|
scope: "row",
|
|
@@ -5120,7 +5030,7 @@ function Component(props, apiRef) {
|
|
|
5120
5030
|
textAlign: "center"
|
|
5121
5031
|
}
|
|
5122
5032
|
},
|
|
5123
|
-
/* @__PURE__ */
|
|
5033
|
+
/* @__PURE__ */ import_react29.default.createElement(
|
|
5124
5034
|
RenderCheckbox,
|
|
5125
5035
|
{
|
|
5126
5036
|
onClick: getCheckboxClickHandler(rowId, row),
|
|
@@ -5131,7 +5041,7 @@ function Component(props, apiRef) {
|
|
|
5131
5041
|
}
|
|
5132
5042
|
)
|
|
5133
5043
|
),
|
|
5134
|
-
/* @__PURE__ */
|
|
5044
|
+
/* @__PURE__ */ import_react29.default.createElement(
|
|
5135
5045
|
BodyRow2,
|
|
5136
5046
|
{
|
|
5137
5047
|
tableId,
|
|
@@ -5142,12 +5052,12 @@ function Component(props, apiRef) {
|
|
|
5142
5052
|
noWrap: props.noWrap
|
|
5143
5053
|
}
|
|
5144
5054
|
),
|
|
5145
|
-
showFillerColumn && /* @__PURE__ */
|
|
5055
|
+
showFillerColumn && /* @__PURE__ */ import_react29.default.createElement("td", { "aria-hidden": "true" })
|
|
5146
5056
|
);
|
|
5147
5057
|
})
|
|
5148
|
-
), Footer && /* @__PURE__ */
|
|
5058
|
+
), Footer && /* @__PURE__ */ import_react29.default.createElement(Footer, null))
|
|
5149
5059
|
),
|
|
5150
|
-
pagination && /* @__PURE__ */
|
|
5060
|
+
pagination && /* @__PURE__ */ import_react29.default.createElement(
|
|
5151
5061
|
Pagination_default,
|
|
5152
5062
|
{
|
|
5153
5063
|
pt: 2,
|
|
@@ -5160,11 +5070,11 @@ function Component(props, apiRef) {
|
|
|
5160
5070
|
)
|
|
5161
5071
|
);
|
|
5162
5072
|
}
|
|
5163
|
-
var DataTable = (0,
|
|
5073
|
+
var DataTable = (0, import_react29.forwardRef)(Component);
|
|
5164
5074
|
DataTable.displayName = "DataTable";
|
|
5165
5075
|
|
|
5166
5076
|
// src/components/DateRangePicker/DateRangePicker.tsx
|
|
5167
|
-
var
|
|
5077
|
+
var import_react30 = __toESM(require("react"));
|
|
5168
5078
|
var import_react_imask2 = require("react-imask");
|
|
5169
5079
|
var import_CalendarToday2 = __toESM(require("@mui/icons-material/CalendarToday"));
|
|
5170
5080
|
var import_joy37 = require("@mui/joy");
|
|
@@ -5306,9 +5216,9 @@ var parseDates = (str, format) => {
|
|
|
5306
5216
|
var formatToPattern2 = (format) => {
|
|
5307
5217
|
return `${format} - ${format}`.replace(/YYYY/g, "Y").replace(/MM/g, "M").replace(/DD/g, "D").replace(/[^YMD\s]/g, (match) => `${match}\``);
|
|
5308
5218
|
};
|
|
5309
|
-
var TextMaskAdapter5 =
|
|
5219
|
+
var TextMaskAdapter5 = import_react30.default.forwardRef(function TextMaskAdapter6(props, ref) {
|
|
5310
5220
|
const { onChange, format, ...other } = props;
|
|
5311
|
-
return /* @__PURE__ */
|
|
5221
|
+
return /* @__PURE__ */ import_react30.default.createElement(
|
|
5312
5222
|
import_react_imask2.IMaskInput,
|
|
5313
5223
|
{
|
|
5314
5224
|
...other,
|
|
@@ -5342,7 +5252,7 @@ var TextMaskAdapter5 = import_react31.default.forwardRef(function TextMaskAdapte
|
|
|
5342
5252
|
}
|
|
5343
5253
|
);
|
|
5344
5254
|
});
|
|
5345
|
-
var DateRangePicker = (0,
|
|
5255
|
+
var DateRangePicker = (0, import_react30.forwardRef)((inProps, ref) => {
|
|
5346
5256
|
const props = (0, import_joy37.useThemeProps)({ props: inProps, name: "DateRangePicker" });
|
|
5347
5257
|
const {
|
|
5348
5258
|
onChange,
|
|
@@ -5369,28 +5279,28 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5369
5279
|
numberOfMonths,
|
|
5370
5280
|
...innerProps
|
|
5371
5281
|
} = props;
|
|
5372
|
-
const innerRef = (0,
|
|
5373
|
-
const buttonRef = (0,
|
|
5282
|
+
const innerRef = (0, import_react30.useRef)(null);
|
|
5283
|
+
const buttonRef = (0, import_react30.useRef)(null);
|
|
5374
5284
|
const [rawValue, setValue] = useControlledState(
|
|
5375
5285
|
props.value,
|
|
5376
5286
|
props.defaultValue ?? null,
|
|
5377
|
-
(0,
|
|
5287
|
+
(0, import_react30.useCallback)(
|
|
5378
5288
|
(value2) => onChange?.({ target: { name: props.name, value: value2 ?? "" } }),
|
|
5379
5289
|
[props.name, onChange]
|
|
5380
5290
|
)
|
|
5381
5291
|
);
|
|
5382
5292
|
const value = rawValue ?? "";
|
|
5383
5293
|
const isAlphabeticDisplay = hasAlphabeticMonth2(displayFormat);
|
|
5384
|
-
const [displayValue, setDisplayValue] = (0,
|
|
5294
|
+
const [displayValue, setDisplayValue] = (0, import_react30.useState)(
|
|
5385
5295
|
() => value ? formatValueString2(parseDates(value, format), displayFormat, locale) : ""
|
|
5386
5296
|
);
|
|
5387
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
5297
|
+
const [anchorEl, setAnchorEl] = (0, import_react30.useState)(null);
|
|
5388
5298
|
const open = Boolean(anchorEl);
|
|
5389
|
-
const calendarValue = (0,
|
|
5299
|
+
const calendarValue = (0, import_react30.useMemo)(
|
|
5390
5300
|
() => value ? parseDates(value, format) : void 0,
|
|
5391
5301
|
[value, format]
|
|
5392
5302
|
);
|
|
5393
|
-
(0,
|
|
5303
|
+
(0, import_react30.useEffect)(() => {
|
|
5394
5304
|
if (value) {
|
|
5395
5305
|
try {
|
|
5396
5306
|
const dates = parseDates(value, format);
|
|
@@ -5402,13 +5312,13 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5402
5312
|
setDisplayValue("");
|
|
5403
5313
|
}
|
|
5404
5314
|
}, [displayFormat, locale, value, format]);
|
|
5405
|
-
(0,
|
|
5315
|
+
(0, import_react30.useEffect)(() => {
|
|
5406
5316
|
if (!anchorEl) {
|
|
5407
5317
|
innerRef.current?.blur();
|
|
5408
5318
|
}
|
|
5409
5319
|
}, [anchorEl, innerRef]);
|
|
5410
|
-
(0,
|
|
5411
|
-
const handleChange = (0,
|
|
5320
|
+
(0, import_react30.useImperativeHandle)(ref, () => innerRef.current, [innerRef]);
|
|
5321
|
+
const handleChange = (0, import_react30.useCallback)(
|
|
5412
5322
|
(event) => {
|
|
5413
5323
|
const value2 = event.target.value;
|
|
5414
5324
|
setDisplayValue(value2 ? formatValueString2(parseDates(value2, format), displayFormat, locale) : value2);
|
|
@@ -5416,7 +5326,7 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5416
5326
|
},
|
|
5417
5327
|
[displayFormat, format, locale, setValue]
|
|
5418
5328
|
);
|
|
5419
|
-
const handleDisplayInputChange = (0,
|
|
5329
|
+
const handleDisplayInputChange = (0, import_react30.useCallback)(
|
|
5420
5330
|
(event) => {
|
|
5421
5331
|
if (event.target.value === "") {
|
|
5422
5332
|
handleChange({
|
|
@@ -5441,14 +5351,14 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5441
5351
|
},
|
|
5442
5352
|
[displayFormat, format, handleChange, props.name]
|
|
5443
5353
|
);
|
|
5444
|
-
const handleCalendarToggle = (0,
|
|
5354
|
+
const handleCalendarToggle = (0, import_react30.useCallback)(
|
|
5445
5355
|
(event) => {
|
|
5446
5356
|
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
5447
5357
|
innerRef.current?.focus();
|
|
5448
5358
|
},
|
|
5449
5359
|
[anchorEl, setAnchorEl, innerRef]
|
|
5450
5360
|
);
|
|
5451
|
-
const handleCalendarChange = (0,
|
|
5361
|
+
const handleCalendarChange = (0, import_react30.useCallback)(
|
|
5452
5362
|
([date1, date2]) => {
|
|
5453
5363
|
if (!date1 || !date2) return;
|
|
5454
5364
|
const formattedValue = formatValueString2([date1, date2], format);
|
|
@@ -5462,7 +5372,7 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5462
5372
|
},
|
|
5463
5373
|
[props.value, props.name, onChange, setValue, setAnchorEl, format, displayFormat, locale]
|
|
5464
5374
|
);
|
|
5465
|
-
const handleInputMouseDown = (0,
|
|
5375
|
+
const handleInputMouseDown = (0, import_react30.useCallback)(
|
|
5466
5376
|
(event) => {
|
|
5467
5377
|
if (inputReadOnly || isAlphabeticDisplay) {
|
|
5468
5378
|
event.preventDefault();
|
|
@@ -5471,7 +5381,7 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5471
5381
|
},
|
|
5472
5382
|
[inputReadOnly, isAlphabeticDisplay, buttonRef]
|
|
5473
5383
|
);
|
|
5474
|
-
const handleInputClick = (0,
|
|
5384
|
+
const handleInputClick = (0, import_react30.useCallback)(
|
|
5475
5385
|
(event) => {
|
|
5476
5386
|
if (inputReadOnly && !readOnly) {
|
|
5477
5387
|
handleCalendarToggle(event);
|
|
@@ -5479,7 +5389,7 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5479
5389
|
},
|
|
5480
5390
|
[inputReadOnly, readOnly, handleCalendarToggle]
|
|
5481
5391
|
);
|
|
5482
|
-
const handlePresetClick = (0,
|
|
5392
|
+
const handlePresetClick = (0, import_react30.useCallback)(
|
|
5483
5393
|
(presetValue) => {
|
|
5484
5394
|
if (props.value !== void 0) {
|
|
5485
5395
|
onChange?.({ target: { name: props.name, value: presetValue } });
|
|
@@ -5492,7 +5402,7 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5492
5402
|
},
|
|
5493
5403
|
[props.value, props.name, onChange, setValue, setAnchorEl, format, displayFormat, locale]
|
|
5494
5404
|
);
|
|
5495
|
-
const isPresetDisabled = (0,
|
|
5405
|
+
const isPresetDisabled = (0, import_react30.useCallback)(
|
|
5496
5406
|
(presetValue) => {
|
|
5497
5407
|
try {
|
|
5498
5408
|
const dates = parseDates(presetValue, format);
|
|
@@ -5511,7 +5421,7 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5511
5421
|
},
|
|
5512
5422
|
[format, minDate, maxDate, disableFuture, disablePast]
|
|
5513
5423
|
);
|
|
5514
|
-
return /* @__PURE__ */
|
|
5424
|
+
return /* @__PURE__ */ import_react30.default.createElement(DateRangePickerRoot, { sx, className }, /* @__PURE__ */ import_react30.default.createElement(import_base4.FocusTrap, { open: true }, /* @__PURE__ */ import_react30.default.createElement(import_react30.default.Fragment, null, /* @__PURE__ */ import_react30.default.createElement(
|
|
5515
5425
|
Input_default,
|
|
5516
5426
|
{
|
|
5517
5427
|
...innerProps,
|
|
@@ -5538,7 +5448,7 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5538
5448
|
},
|
|
5539
5449
|
error,
|
|
5540
5450
|
sx: { width: "100%" },
|
|
5541
|
-
endDecorator: /* @__PURE__ */
|
|
5451
|
+
endDecorator: /* @__PURE__ */ import_react30.default.createElement(
|
|
5542
5452
|
CalendarButton2,
|
|
5543
5453
|
{
|
|
5544
5454
|
ref: buttonRef,
|
|
@@ -5550,13 +5460,13 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5550
5460
|
"aria-expanded": open,
|
|
5551
5461
|
disabled
|
|
5552
5462
|
},
|
|
5553
|
-
/* @__PURE__ */
|
|
5463
|
+
/* @__PURE__ */ import_react30.default.createElement(import_CalendarToday2.default, null)
|
|
5554
5464
|
),
|
|
5555
5465
|
label,
|
|
5556
5466
|
helperText,
|
|
5557
5467
|
readOnly: readOnly || inputReadOnly || isAlphabeticDisplay
|
|
5558
5468
|
}
|
|
5559
|
-
), open && /* @__PURE__ */
|
|
5469
|
+
), open && /* @__PURE__ */ import_react30.default.createElement(import_base4.ClickAwayListener, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ import_react30.default.createElement(
|
|
5560
5470
|
StyledPopper2,
|
|
5561
5471
|
{
|
|
5562
5472
|
id: "date-range-picker-popper",
|
|
@@ -5575,7 +5485,7 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5575
5485
|
"aria-label": "Calendar Tooltip",
|
|
5576
5486
|
"aria-expanded": open
|
|
5577
5487
|
},
|
|
5578
|
-
/* @__PURE__ */
|
|
5488
|
+
/* @__PURE__ */ import_react30.default.createElement(CalendarSheet2, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ import_react30.default.createElement(CalendarSheetContent2, null, /* @__PURE__ */ import_react30.default.createElement(CalendarSection2, { style: { width: "auto" } }, /* @__PURE__ */ import_react30.default.createElement(
|
|
5579
5489
|
Calendar_default,
|
|
5580
5490
|
{
|
|
5581
5491
|
rangeSelection: true,
|
|
@@ -5588,14 +5498,14 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5588
5498
|
locale,
|
|
5589
5499
|
numberOfMonths
|
|
5590
5500
|
}
|
|
5591
|
-
), !hideClearButton && /* @__PURE__ */
|
|
5501
|
+
), !hideClearButton && /* @__PURE__ */ import_react30.default.createElement(
|
|
5592
5502
|
DialogActions_default,
|
|
5593
5503
|
{
|
|
5594
5504
|
sx: {
|
|
5595
5505
|
p: 1
|
|
5596
5506
|
}
|
|
5597
5507
|
},
|
|
5598
|
-
/* @__PURE__ */
|
|
5508
|
+
/* @__PURE__ */ import_react30.default.createElement(
|
|
5599
5509
|
Button_default,
|
|
5600
5510
|
{
|
|
5601
5511
|
size,
|
|
@@ -5609,9 +5519,9 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5609
5519
|
},
|
|
5610
5520
|
"Clear"
|
|
5611
5521
|
)
|
|
5612
|
-
)), presets && presets.length > 0 && /* @__PURE__ */
|
|
5522
|
+
)), presets && presets.length > 0 && /* @__PURE__ */ import_react30.default.createElement(PresetPanel2, null, presets.map((preset) => {
|
|
5613
5523
|
const disabled2 = isPresetDisabled(preset.value);
|
|
5614
|
-
return /* @__PURE__ */
|
|
5524
|
+
return /* @__PURE__ */ import_react30.default.createElement(
|
|
5615
5525
|
PresetItem2,
|
|
5616
5526
|
{
|
|
5617
5527
|
key: preset.label,
|
|
@@ -5656,10 +5566,10 @@ DialogTitle.displayName = "DialogTitle";
|
|
|
5656
5566
|
var DialogTitle_default = DialogTitle;
|
|
5657
5567
|
|
|
5658
5568
|
// src/components/DialogFrame/DialogFrame.tsx
|
|
5659
|
-
var
|
|
5569
|
+
var import_react32 = __toESM(require("react"));
|
|
5660
5570
|
|
|
5661
5571
|
// src/components/Modal/Modal.tsx
|
|
5662
|
-
var
|
|
5572
|
+
var import_react31 = __toESM(require("react"));
|
|
5663
5573
|
var import_joy40 = require("@mui/joy");
|
|
5664
5574
|
var import_framer_motion24 = require("framer-motion");
|
|
5665
5575
|
var MotionModal = (0, import_framer_motion24.motion)(import_joy40.Modal);
|
|
@@ -5674,10 +5584,10 @@ var ModalClose = import_joy40.ModalClose;
|
|
|
5674
5584
|
var MotionModalOverflow = (0, import_framer_motion24.motion)(import_joy40.ModalOverflow);
|
|
5675
5585
|
var ModalOverflow = MotionModalOverflow;
|
|
5676
5586
|
ModalOverflow.displayName = "ModalOverflow";
|
|
5677
|
-
|
|
5587
|
+
function ModalFrame(props) {
|
|
5678
5588
|
const { title, children, titleStartDecorator, onClose, ...innerProps } = props;
|
|
5679
|
-
return /* @__PURE__ */
|
|
5680
|
-
}
|
|
5589
|
+
return /* @__PURE__ */ import_react31.default.createElement(StyledModalDialog, { ...innerProps }, /* @__PURE__ */ import_react31.default.createElement(ModalClose, { onClick: onClose }), /* @__PURE__ */ import_react31.default.createElement(DialogTitle_default, null, titleStartDecorator, title), /* @__PURE__ */ import_react31.default.createElement(DialogContent_default, null, children));
|
|
5590
|
+
}
|
|
5681
5591
|
ModalFrame.displayName = "ModalFrame";
|
|
5682
5592
|
|
|
5683
5593
|
// src/components/DialogFrame/DialogFrame.tsx
|
|
@@ -5688,20 +5598,20 @@ var StyledDialogFrame = (0, import_joy41.styled)(ModalDialog, {
|
|
|
5688
5598
|
})({
|
|
5689
5599
|
padding: 0
|
|
5690
5600
|
});
|
|
5691
|
-
var DialogFrame =
|
|
5601
|
+
var DialogFrame = import_react32.default.forwardRef((props, ref) => {
|
|
5692
5602
|
const { title, children, actions, fullscreen, onSubmit, ...innerProps } = props;
|
|
5693
5603
|
const formProps = onSubmit ? { component: "form", onSubmit } : void 0;
|
|
5694
|
-
return /* @__PURE__ */
|
|
5604
|
+
return /* @__PURE__ */ import_react32.default.createElement(StyledDialogFrame, { layout: fullscreen ? "fullscreen" : "center", ref, ...formProps, ...innerProps }, /* @__PURE__ */ import_react32.default.createElement(DialogTitle_default, null, title), /* @__PURE__ */ import_react32.default.createElement(DialogContent_default, null, children), /* @__PURE__ */ import_react32.default.createElement(DialogActions_default, null, actions));
|
|
5695
5605
|
});
|
|
5696
5606
|
DialogFrame.displayName = "DialogFrame";
|
|
5697
5607
|
|
|
5698
5608
|
// src/components/Divider/Divider.tsx
|
|
5699
|
-
var
|
|
5609
|
+
var import_react33 = __toESM(require("react"));
|
|
5700
5610
|
var import_joy42 = require("@mui/joy");
|
|
5701
5611
|
var import_framer_motion25 = require("framer-motion");
|
|
5702
5612
|
var MotionDivider = (0, import_framer_motion25.motion)(import_joy42.Divider);
|
|
5703
5613
|
var Divider = (props) => {
|
|
5704
|
-
return /* @__PURE__ */
|
|
5614
|
+
return /* @__PURE__ */ import_react33.default.createElement(MotionDivider, { ...props });
|
|
5705
5615
|
};
|
|
5706
5616
|
Divider.displayName = "Divider";
|
|
5707
5617
|
|
|
@@ -5722,16 +5632,16 @@ var InsetDrawer = (0, import_joy43.styled)(import_joy43.Drawer)(({ theme }) => (
|
|
|
5722
5632
|
}));
|
|
5723
5633
|
|
|
5724
5634
|
// src/components/FilterableCheckboxGroup/FilterableCheckboxGroup.tsx
|
|
5725
|
-
var
|
|
5635
|
+
var import_react34 = __toESM(require("react"));
|
|
5726
5636
|
var import_Search = __toESM(require("@mui/icons-material/Search"));
|
|
5727
5637
|
var import_joy44 = require("@mui/joy");
|
|
5728
5638
|
var import_react_virtual3 = require("@tanstack/react-virtual");
|
|
5729
5639
|
var EMPTY_VALUE = [];
|
|
5730
5640
|
function LabelWithTooltip(props) {
|
|
5731
5641
|
const { label, size } = props;
|
|
5732
|
-
const labelContentRef = (0,
|
|
5733
|
-
const [isOverflowing, setIsOverflowing] = (0,
|
|
5734
|
-
const labelContent = /* @__PURE__ */
|
|
5642
|
+
const labelContentRef = (0, import_react34.useRef)(null);
|
|
5643
|
+
const [isOverflowing, setIsOverflowing] = (0, import_react34.useState)(false);
|
|
5644
|
+
const labelContent = /* @__PURE__ */ import_react34.default.createElement(
|
|
5735
5645
|
"span",
|
|
5736
5646
|
{
|
|
5737
5647
|
ref: labelContentRef,
|
|
@@ -5747,14 +5657,14 @@ function LabelWithTooltip(props) {
|
|
|
5747
5657
|
},
|
|
5748
5658
|
label
|
|
5749
5659
|
);
|
|
5750
|
-
(0,
|
|
5660
|
+
(0, import_react34.useEffect)(() => {
|
|
5751
5661
|
const element = labelContentRef.current;
|
|
5752
5662
|
if (element) {
|
|
5753
5663
|
setIsOverflowing(element.scrollWidth > element.clientWidth);
|
|
5754
5664
|
}
|
|
5755
5665
|
}, [label]);
|
|
5756
5666
|
if (isOverflowing) {
|
|
5757
|
-
return /* @__PURE__ */
|
|
5667
|
+
return /* @__PURE__ */ import_react34.default.createElement(Tooltip_default, { variant: "solid", size, title: label, placement: "bottom-start" }, labelContent);
|
|
5758
5668
|
}
|
|
5759
5669
|
return labelContent;
|
|
5760
5670
|
}
|
|
@@ -5772,22 +5682,22 @@ function FilterableCheckboxGroup(inProps) {
|
|
|
5772
5682
|
maxHeight = 300,
|
|
5773
5683
|
disabled
|
|
5774
5684
|
} = props;
|
|
5775
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
5776
|
-
const [sortedOptions, setSortedOptions] = (0,
|
|
5685
|
+
const [searchTerm, setSearchTerm] = (0, import_react34.useState)("");
|
|
5686
|
+
const [sortedOptions, setSortedOptions] = (0, import_react34.useState)(options);
|
|
5777
5687
|
const [rawValue, setInternalValue] = useControlledState(
|
|
5778
5688
|
value,
|
|
5779
5689
|
value ?? EMPTY_VALUE,
|
|
5780
|
-
(0,
|
|
5690
|
+
(0, import_react34.useCallback)((newValue) => onChange?.(newValue ?? []), [onChange])
|
|
5781
5691
|
);
|
|
5782
5692
|
const internalValue = rawValue ?? EMPTY_VALUE;
|
|
5783
|
-
const parentRef = (0,
|
|
5784
|
-
const isInitialSortRef = (0,
|
|
5785
|
-
const prevOptionsRef = (0,
|
|
5786
|
-
const filteredOptions = (0,
|
|
5693
|
+
const parentRef = (0, import_react34.useRef)(null);
|
|
5694
|
+
const isInitialSortRef = (0, import_react34.useRef)(false);
|
|
5695
|
+
const prevOptionsRef = (0, import_react34.useRef)([...options]);
|
|
5696
|
+
const filteredOptions = (0, import_react34.useMemo)(() => {
|
|
5787
5697
|
if (!searchTerm) return sortedOptions;
|
|
5788
5698
|
return sortedOptions.filter((option) => option.label.toLowerCase().includes(searchTerm.toLowerCase()));
|
|
5789
5699
|
}, [sortedOptions, searchTerm]);
|
|
5790
|
-
const itemSize = (0,
|
|
5700
|
+
const itemSize = (0, import_react34.useMemo)(() => {
|
|
5791
5701
|
switch (size) {
|
|
5792
5702
|
case "sm":
|
|
5793
5703
|
return 28;
|
|
@@ -5805,7 +5715,7 @@ function FilterableCheckboxGroup(inProps) {
|
|
|
5805
5715
|
overscan: 5
|
|
5806
5716
|
});
|
|
5807
5717
|
const items = virtualizer.getVirtualItems();
|
|
5808
|
-
(0,
|
|
5718
|
+
(0, import_react34.useEffect)(() => {
|
|
5809
5719
|
const optionsChanged = prevOptionsRef.current.length !== options.length || prevOptionsRef.current.some(
|
|
5810
5720
|
(prevOption, index) => prevOption.value !== options[index]?.value || prevOption.label !== options[index]?.label || prevOption.disabled !== options[index]?.disabled
|
|
5811
5721
|
);
|
|
@@ -5831,13 +5741,13 @@ function FilterableCheckboxGroup(inProps) {
|
|
|
5831
5741
|
}
|
|
5832
5742
|
}
|
|
5833
5743
|
}, [options, value]);
|
|
5834
|
-
(0,
|
|
5744
|
+
(0, import_react34.useEffect)(() => {
|
|
5835
5745
|
virtualizer.measure();
|
|
5836
5746
|
}, [virtualizer, filteredOptions, size]);
|
|
5837
|
-
const handleSearchChange = (0,
|
|
5747
|
+
const handleSearchChange = (0, import_react34.useCallback)((event) => {
|
|
5838
5748
|
setSearchTerm(event.target.value);
|
|
5839
5749
|
}, []);
|
|
5840
|
-
const handleCheckboxChange = (0,
|
|
5750
|
+
const handleCheckboxChange = (0, import_react34.useCallback)(
|
|
5841
5751
|
(optionValue) => (event) => {
|
|
5842
5752
|
const checked = event.target.checked;
|
|
5843
5753
|
const newValue = checked ? [...internalValue, optionValue] : internalValue.filter((v) => v !== optionValue);
|
|
@@ -5845,7 +5755,7 @@ function FilterableCheckboxGroup(inProps) {
|
|
|
5845
5755
|
},
|
|
5846
5756
|
[internalValue, setInternalValue]
|
|
5847
5757
|
);
|
|
5848
|
-
const handleSelectAll = (0,
|
|
5758
|
+
const handleSelectAll = (0, import_react34.useCallback)(
|
|
5849
5759
|
(event) => {
|
|
5850
5760
|
const checked = event.target.checked;
|
|
5851
5761
|
const enabledOptions = filteredOptions.filter((option) => !option.disabled);
|
|
@@ -5861,10 +5771,10 @@ function FilterableCheckboxGroup(inProps) {
|
|
|
5861
5771
|
},
|
|
5862
5772
|
[filteredOptions, internalValue, setInternalValue]
|
|
5863
5773
|
);
|
|
5864
|
-
const enabledFilteredOptions = (0,
|
|
5774
|
+
const enabledFilteredOptions = (0, import_react34.useMemo)(() => filteredOptions.filter((option) => !option.disabled), [filteredOptions]);
|
|
5865
5775
|
const isAllSelected = enabledFilteredOptions.length > 0 && enabledFilteredOptions.every((option) => internalValue.includes(option.value));
|
|
5866
5776
|
const isIndeterminate = !isAllSelected && enabledFilteredOptions.some((option) => internalValue.includes(option.value));
|
|
5867
|
-
return /* @__PURE__ */
|
|
5777
|
+
return /* @__PURE__ */ import_react34.default.createElement("div", { style: { width: "100%" } }, /* @__PURE__ */ import_react34.default.createElement(
|
|
5868
5778
|
Input_default,
|
|
5869
5779
|
{
|
|
5870
5780
|
label,
|
|
@@ -5877,9 +5787,9 @@ function FilterableCheckboxGroup(inProps) {
|
|
|
5877
5787
|
onChange: handleSearchChange,
|
|
5878
5788
|
size,
|
|
5879
5789
|
disabled,
|
|
5880
|
-
endDecorator: /* @__PURE__ */
|
|
5790
|
+
endDecorator: /* @__PURE__ */ import_react34.default.createElement(import_Search.default, null)
|
|
5881
5791
|
}
|
|
5882
|
-
), filteredOptions.length === 0 ? /* @__PURE__ */
|
|
5792
|
+
), filteredOptions.length === 0 ? /* @__PURE__ */ import_react34.default.createElement(Typography_default, { level: `body-${size}`, textColor: "neutral.softDisabledColor", padding: "20px 12px", textAlign: "center" }, "No options found.") : /* @__PURE__ */ import_react34.default.createElement(
|
|
5883
5793
|
"div",
|
|
5884
5794
|
{
|
|
5885
5795
|
ref: parentRef,
|
|
@@ -5890,7 +5800,7 @@ function FilterableCheckboxGroup(inProps) {
|
|
|
5890
5800
|
marginTop: "8px"
|
|
5891
5801
|
}
|
|
5892
5802
|
},
|
|
5893
|
-
!searchTerm && /* @__PURE__ */
|
|
5803
|
+
!searchTerm && /* @__PURE__ */ import_react34.default.createElement(
|
|
5894
5804
|
Checkbox_default,
|
|
5895
5805
|
{
|
|
5896
5806
|
label: "Select all",
|
|
@@ -5907,7 +5817,7 @@ function FilterableCheckboxGroup(inProps) {
|
|
|
5907
5817
|
sx: { width: "100%", height: itemSize }
|
|
5908
5818
|
}
|
|
5909
5819
|
),
|
|
5910
|
-
/* @__PURE__ */
|
|
5820
|
+
/* @__PURE__ */ import_react34.default.createElement(
|
|
5911
5821
|
Stack_default,
|
|
5912
5822
|
{
|
|
5913
5823
|
sx: {
|
|
@@ -5917,11 +5827,11 @@ function FilterableCheckboxGroup(inProps) {
|
|
|
5917
5827
|
},
|
|
5918
5828
|
items.map((virtualRow) => {
|
|
5919
5829
|
const option = filteredOptions[virtualRow.index];
|
|
5920
|
-
return /* @__PURE__ */
|
|
5830
|
+
return /* @__PURE__ */ import_react34.default.createElement(
|
|
5921
5831
|
Checkbox_default,
|
|
5922
5832
|
{
|
|
5923
5833
|
key: virtualRow.key,
|
|
5924
|
-
label: /* @__PURE__ */
|
|
5834
|
+
label: /* @__PURE__ */ import_react34.default.createElement(LabelWithTooltip, { label: option.label, size }),
|
|
5925
5835
|
checked: internalValue.includes(option.value),
|
|
5926
5836
|
onChange: handleCheckboxChange(option.value),
|
|
5927
5837
|
size,
|
|
@@ -5949,16 +5859,16 @@ function FilterableCheckboxGroup(inProps) {
|
|
|
5949
5859
|
FilterableCheckboxGroup.displayName = "FilterableCheckboxGroup";
|
|
5950
5860
|
|
|
5951
5861
|
// src/components/FilterMenu/FilterMenu.tsx
|
|
5952
|
-
var
|
|
5862
|
+
var import_react47 = __toESM(require("react"));
|
|
5953
5863
|
var import_joy58 = require("@mui/joy");
|
|
5954
5864
|
|
|
5955
5865
|
// src/components/FilterMenu/components/CheckboxGroup.tsx
|
|
5956
|
-
var
|
|
5866
|
+
var import_react35 = __toESM(require("react"));
|
|
5957
5867
|
var import_joy45 = require("@mui/joy");
|
|
5958
5868
|
function CheckboxGroup(props) {
|
|
5959
5869
|
const { id, label, options, value, onChange, hidden } = props;
|
|
5960
5870
|
const [internalValue, setInternalValue] = useControlledState(value, [], onChange);
|
|
5961
|
-
const handleCheckboxChange = (0,
|
|
5871
|
+
const handleCheckboxChange = (0, import_react35.useCallback)(
|
|
5962
5872
|
(optionValue) => (event) => {
|
|
5963
5873
|
const checked = event.target.checked;
|
|
5964
5874
|
let newValue;
|
|
@@ -5974,7 +5884,7 @@ function CheckboxGroup(props) {
|
|
|
5974
5884
|
if (hidden) {
|
|
5975
5885
|
return null;
|
|
5976
5886
|
}
|
|
5977
|
-
return /* @__PURE__ */
|
|
5887
|
+
return /* @__PURE__ */ import_react35.default.createElement(import_joy45.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react35.default.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), options.map((option) => /* @__PURE__ */ import_react35.default.createElement(
|
|
5978
5888
|
Checkbox_default,
|
|
5979
5889
|
{
|
|
5980
5890
|
key: `${id}-${option.value}`,
|
|
@@ -5987,12 +5897,12 @@ function CheckboxGroup(props) {
|
|
|
5987
5897
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
5988
5898
|
|
|
5989
5899
|
// src/components/FilterMenu/components/FilterableCheckboxGroup.tsx
|
|
5990
|
-
var
|
|
5900
|
+
var import_react36 = __toESM(require("react"));
|
|
5991
5901
|
var import_joy46 = require("@mui/joy");
|
|
5992
5902
|
function FilterableCheckboxGroup2(props) {
|
|
5993
5903
|
const { id, label, options, value, onChange, hidden, placeholder, maxHeight } = props;
|
|
5994
5904
|
const [internalValue, setInternalValue] = useControlledState(value, [], onChange);
|
|
5995
|
-
const handleChange = (0,
|
|
5905
|
+
const handleChange = (0, import_react36.useCallback)(
|
|
5996
5906
|
(newValue) => {
|
|
5997
5907
|
setInternalValue(newValue);
|
|
5998
5908
|
},
|
|
@@ -6001,7 +5911,7 @@ function FilterableCheckboxGroup2(props) {
|
|
|
6001
5911
|
if (hidden) {
|
|
6002
5912
|
return null;
|
|
6003
5913
|
}
|
|
6004
|
-
return /* @__PURE__ */
|
|
5914
|
+
return /* @__PURE__ */ import_react36.default.createElement(import_joy46.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react36.default.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ import_react36.default.createElement(
|
|
6005
5915
|
FilterableCheckboxGroup,
|
|
6006
5916
|
{
|
|
6007
5917
|
value: internalValue ?? [],
|
|
@@ -6016,7 +5926,7 @@ function FilterableCheckboxGroup2(props) {
|
|
|
6016
5926
|
FilterableCheckboxGroup2.displayName = "FilterableCheckboxGroup";
|
|
6017
5927
|
|
|
6018
5928
|
// src/components/FilterMenu/components/RadioGroup.tsx
|
|
6019
|
-
var
|
|
5929
|
+
var import_react37 = __toESM(require("react"));
|
|
6020
5930
|
|
|
6021
5931
|
// src/components/Radio/Radio.tsx
|
|
6022
5932
|
var import_joy47 = require("@mui/joy");
|
|
@@ -6033,7 +5943,7 @@ var import_joy48 = require("@mui/joy");
|
|
|
6033
5943
|
function RadioGroup2(props) {
|
|
6034
5944
|
const { id, label, options, value, onChange, hidden } = props;
|
|
6035
5945
|
const [internalValue, setInternalValue] = useControlledState(value, value ?? "", onChange);
|
|
6036
|
-
const handleRadioChange = (0,
|
|
5946
|
+
const handleRadioChange = (0, import_react37.useCallback)(
|
|
6037
5947
|
(event) => {
|
|
6038
5948
|
const newValue = event.target.value;
|
|
6039
5949
|
const option = options.find((opt) => opt.value.toString() === newValue);
|
|
@@ -6045,12 +5955,12 @@ function RadioGroup2(props) {
|
|
|
6045
5955
|
if (hidden) {
|
|
6046
5956
|
return null;
|
|
6047
5957
|
}
|
|
6048
|
-
return /* @__PURE__ */
|
|
5958
|
+
return /* @__PURE__ */ import_react37.default.createElement(import_joy48.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react37.default.createElement(import_joy48.Stack, { spacing: 1 }, /* @__PURE__ */ import_react37.default.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label)), /* @__PURE__ */ import_react37.default.createElement(RadioGroup, { name: id, value: internalValue?.toString(), onChange: handleRadioChange }, options.map((option) => /* @__PURE__ */ import_react37.default.createElement(Radio, { key: `${id}-${option.value}`, value: option.value.toString(), label: option.label }))));
|
|
6049
5959
|
}
|
|
6050
5960
|
RadioGroup2.displayName = "RadioGroup";
|
|
6051
5961
|
|
|
6052
5962
|
// src/components/FilterMenu/components/DateRange.tsx
|
|
6053
|
-
var
|
|
5963
|
+
var import_react38 = __toESM(require("react"));
|
|
6054
5964
|
var import_joy49 = require("@mui/joy");
|
|
6055
5965
|
function DateRange(props) {
|
|
6056
5966
|
const {
|
|
@@ -6068,8 +5978,8 @@ function DateRange(props) {
|
|
|
6068
5978
|
hideClearButton
|
|
6069
5979
|
} = props;
|
|
6070
5980
|
const [internalValue, setInternalValue] = useControlledState(value, null, onChange);
|
|
6071
|
-
const [selectedOption, setSelectedOption] = (0,
|
|
6072
|
-
const dateRangeOptions = (0,
|
|
5981
|
+
const [selectedOption, setSelectedOption] = (0, import_react38.useState)("all-time");
|
|
5982
|
+
const dateRangeOptions = (0, import_react38.useMemo)(
|
|
6073
5983
|
() => [
|
|
6074
5984
|
{ label: "All Time", value: "all-time" },
|
|
6075
5985
|
{ label: "This Month", value: "this-month" },
|
|
@@ -6079,7 +5989,7 @@ function DateRange(props) {
|
|
|
6079
5989
|
],
|
|
6080
5990
|
[]
|
|
6081
5991
|
);
|
|
6082
|
-
const getDateRangeForOption = (0,
|
|
5992
|
+
const getDateRangeForOption = (0, import_react38.useCallback)(
|
|
6083
5993
|
(option) => {
|
|
6084
5994
|
const now = /* @__PURE__ */ new Date();
|
|
6085
5995
|
const currentYear = now.getFullYear();
|
|
@@ -6118,7 +6028,7 @@ function DateRange(props) {
|
|
|
6118
6028
|
},
|
|
6119
6029
|
[internalValue]
|
|
6120
6030
|
);
|
|
6121
|
-
const determineOptionFromValue = (0,
|
|
6031
|
+
const determineOptionFromValue = (0, import_react38.useCallback)(
|
|
6122
6032
|
(value2) => {
|
|
6123
6033
|
if (!value2) {
|
|
6124
6034
|
return "all-time";
|
|
@@ -6134,17 +6044,17 @@ function DateRange(props) {
|
|
|
6134
6044
|
},
|
|
6135
6045
|
[getDateRangeForOption]
|
|
6136
6046
|
);
|
|
6137
|
-
const customDateRangeValue = (0,
|
|
6047
|
+
const customDateRangeValue = (0, import_react38.useMemo)(() => {
|
|
6138
6048
|
if (selectedOption === "custom" && internalValue) {
|
|
6139
6049
|
return `${internalValue[0]} - ${internalValue[1]}`;
|
|
6140
6050
|
}
|
|
6141
6051
|
return "";
|
|
6142
6052
|
}, [selectedOption, internalValue]);
|
|
6143
|
-
(0,
|
|
6053
|
+
(0, import_react38.useEffect)(() => {
|
|
6144
6054
|
const newOption = determineOptionFromValue(internalValue);
|
|
6145
6055
|
setSelectedOption(newOption);
|
|
6146
6056
|
}, [internalValue, determineOptionFromValue]);
|
|
6147
|
-
const handleOptionChange = (0,
|
|
6057
|
+
const handleOptionChange = (0, import_react38.useCallback)(
|
|
6148
6058
|
(event) => {
|
|
6149
6059
|
const newOption = event.target.value;
|
|
6150
6060
|
setSelectedOption(newOption);
|
|
@@ -6153,7 +6063,7 @@ function DateRange(props) {
|
|
|
6153
6063
|
},
|
|
6154
6064
|
[getDateRangeForOption, setInternalValue]
|
|
6155
6065
|
);
|
|
6156
|
-
const handleCustomDateChange = (0,
|
|
6066
|
+
const handleCustomDateChange = (0, import_react38.useCallback)(
|
|
6157
6067
|
(event) => {
|
|
6158
6068
|
const dateRangeString = event.target.value;
|
|
6159
6069
|
if (dateRangeString && dateRangeString.includes(" - ")) {
|
|
@@ -6174,7 +6084,7 @@ function DateRange(props) {
|
|
|
6174
6084
|
if (hidden) {
|
|
6175
6085
|
return null;
|
|
6176
6086
|
}
|
|
6177
|
-
return /* @__PURE__ */
|
|
6087
|
+
return /* @__PURE__ */ import_react38.default.createElement(import_joy49.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react38.default.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ import_react38.default.createElement(RadioGroup, { name: `${id}-options`, value: selectedOption, onChange: handleOptionChange }, dateRangeOptions.map((option) => /* @__PURE__ */ import_react38.default.createElement(Radio, { key: `${id}-${option.value}`, value: option.value, label: option.label }))), selectedOption === "custom" && /* @__PURE__ */ import_react38.default.createElement(
|
|
6178
6088
|
DateRangePicker,
|
|
6179
6089
|
{
|
|
6180
6090
|
value: customDateRangeValue,
|
|
@@ -6193,11 +6103,11 @@ function DateRange(props) {
|
|
|
6193
6103
|
DateRange.displayName = "DateRange";
|
|
6194
6104
|
|
|
6195
6105
|
// src/components/FilterMenu/components/MonthRange.tsx
|
|
6196
|
-
var
|
|
6106
|
+
var import_react40 = __toESM(require("react"));
|
|
6197
6107
|
var import_joy51 = require("@mui/joy");
|
|
6198
6108
|
|
|
6199
6109
|
// src/components/MonthRangePicker/MonthRangePicker.tsx
|
|
6200
|
-
var
|
|
6110
|
+
var import_react39 = __toESM(require("react"));
|
|
6201
6111
|
var import_react_imask3 = require("react-imask");
|
|
6202
6112
|
var import_CalendarToday3 = __toESM(require("@mui/icons-material/CalendarToday"));
|
|
6203
6113
|
var import_joy50 = require("@mui/joy");
|
|
@@ -6258,9 +6168,9 @@ var parseDates2 = (str) => {
|
|
|
6258
6168
|
var formatToPattern3 = (format) => {
|
|
6259
6169
|
return `${format} - ${format}`.replace(/YYYY/g, "Y").replace(/MM/g, "m").replace(/[^YMm\s]/g, (match) => `${match}\``);
|
|
6260
6170
|
};
|
|
6261
|
-
var TextMaskAdapter7 =
|
|
6171
|
+
var TextMaskAdapter7 = import_react39.default.forwardRef(function TextMaskAdapter8(props, ref) {
|
|
6262
6172
|
const { onChange, format, ...other } = props;
|
|
6263
|
-
return /* @__PURE__ */
|
|
6173
|
+
return /* @__PURE__ */ import_react39.default.createElement(
|
|
6264
6174
|
import_react_imask3.IMaskInput,
|
|
6265
6175
|
{
|
|
6266
6176
|
...other,
|
|
@@ -6288,7 +6198,7 @@ var TextMaskAdapter7 = import_react40.default.forwardRef(function TextMaskAdapte
|
|
|
6288
6198
|
}
|
|
6289
6199
|
);
|
|
6290
6200
|
});
|
|
6291
|
-
var MonthRangePicker = (0,
|
|
6201
|
+
var MonthRangePicker = (0, import_react39.forwardRef)((inProps, ref) => {
|
|
6292
6202
|
const props = (0, import_joy50.useThemeProps)({ props: inProps, name: "MonthRangePicker" });
|
|
6293
6203
|
const {
|
|
6294
6204
|
onChange,
|
|
@@ -6312,24 +6222,24 @@ var MonthRangePicker = (0, import_react40.forwardRef)((inProps, ref) => {
|
|
|
6312
6222
|
} = props;
|
|
6313
6223
|
const displayFormat = displayFormatProp ?? format;
|
|
6314
6224
|
const isAlphabeticDisplay = hasAlphabeticMonth3(displayFormat);
|
|
6315
|
-
const innerRef = (0,
|
|
6316
|
-
const buttonRef = (0,
|
|
6225
|
+
const innerRef = (0, import_react39.useRef)(null);
|
|
6226
|
+
const buttonRef = (0, import_react39.useRef)(null);
|
|
6317
6227
|
const [rawValue, setValue] = useControlledState(
|
|
6318
6228
|
props.value,
|
|
6319
6229
|
props.defaultValue ?? null,
|
|
6320
|
-
(0,
|
|
6230
|
+
(0, import_react39.useCallback)(
|
|
6321
6231
|
(value2) => onChange?.({ target: { name: props.name, value: value2 ?? "" } }),
|
|
6322
6232
|
[props.name, onChange]
|
|
6323
6233
|
)
|
|
6324
6234
|
);
|
|
6325
6235
|
const value = rawValue ?? "";
|
|
6326
|
-
const [displayValue, setDisplayValue] = (0,
|
|
6236
|
+
const [displayValue, setDisplayValue] = (0, import_react39.useState)(
|
|
6327
6237
|
() => value ? formatValueString3(parseDates2(value), displayFormat, locale) : ""
|
|
6328
6238
|
);
|
|
6329
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
6239
|
+
const [anchorEl, setAnchorEl] = (0, import_react39.useState)(null);
|
|
6330
6240
|
const open = Boolean(anchorEl);
|
|
6331
|
-
const calendarValue = (0,
|
|
6332
|
-
(0,
|
|
6241
|
+
const calendarValue = (0, import_react39.useMemo)(() => value ? parseDates2(value) : void 0, [value]);
|
|
6242
|
+
(0, import_react39.useEffect)(() => {
|
|
6333
6243
|
if (value) {
|
|
6334
6244
|
try {
|
|
6335
6245
|
const dates = parseDates2(value);
|
|
@@ -6341,13 +6251,13 @@ var MonthRangePicker = (0, import_react40.forwardRef)((inProps, ref) => {
|
|
|
6341
6251
|
setDisplayValue("");
|
|
6342
6252
|
}
|
|
6343
6253
|
}, [displayFormat, locale, value]);
|
|
6344
|
-
(0,
|
|
6254
|
+
(0, import_react39.useEffect)(() => {
|
|
6345
6255
|
if (!anchorEl) {
|
|
6346
6256
|
innerRef.current?.blur();
|
|
6347
6257
|
}
|
|
6348
6258
|
}, [anchorEl, innerRef]);
|
|
6349
|
-
(0,
|
|
6350
|
-
const handleChange = (0,
|
|
6259
|
+
(0, import_react39.useImperativeHandle)(ref, () => innerRef.current, [innerRef]);
|
|
6260
|
+
const handleChange = (0, import_react39.useCallback)(
|
|
6351
6261
|
(event) => {
|
|
6352
6262
|
setDisplayValue(
|
|
6353
6263
|
event.target.value ? formatValueString3(parseDates2(event.target.value), displayFormat, locale) : ""
|
|
@@ -6356,7 +6266,7 @@ var MonthRangePicker = (0, import_react40.forwardRef)((inProps, ref) => {
|
|
|
6356
6266
|
},
|
|
6357
6267
|
[displayFormat, locale, setValue]
|
|
6358
6268
|
);
|
|
6359
|
-
const handleInputMouseDown = (0,
|
|
6269
|
+
const handleInputMouseDown = (0, import_react39.useCallback)(
|
|
6360
6270
|
(event) => {
|
|
6361
6271
|
if (isAlphabeticDisplay) {
|
|
6362
6272
|
event.preventDefault();
|
|
@@ -6365,14 +6275,14 @@ var MonthRangePicker = (0, import_react40.forwardRef)((inProps, ref) => {
|
|
|
6365
6275
|
},
|
|
6366
6276
|
[isAlphabeticDisplay, buttonRef]
|
|
6367
6277
|
);
|
|
6368
|
-
const handleCalendarToggle = (0,
|
|
6278
|
+
const handleCalendarToggle = (0, import_react39.useCallback)(
|
|
6369
6279
|
(event) => {
|
|
6370
6280
|
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
6371
6281
|
innerRef.current?.focus();
|
|
6372
6282
|
},
|
|
6373
6283
|
[anchorEl, setAnchorEl, innerRef]
|
|
6374
6284
|
);
|
|
6375
|
-
const handleCalendarChange = (0,
|
|
6285
|
+
const handleCalendarChange = (0, import_react39.useCallback)(
|
|
6376
6286
|
([date1, date2]) => {
|
|
6377
6287
|
if (!date1 || !date2) return;
|
|
6378
6288
|
const formattedValue = formatValueString3([date1, date2], format);
|
|
@@ -6382,7 +6292,7 @@ var MonthRangePicker = (0, import_react40.forwardRef)((inProps, ref) => {
|
|
|
6382
6292
|
},
|
|
6383
6293
|
[setValue, setAnchorEl, format, displayFormat, locale]
|
|
6384
6294
|
);
|
|
6385
|
-
return /* @__PURE__ */
|
|
6295
|
+
return /* @__PURE__ */ import_react39.default.createElement(MonthRangePickerRoot, null, /* @__PURE__ */ import_react39.default.createElement(import_base5.FocusTrap, { open: true }, /* @__PURE__ */ import_react39.default.createElement(import_react39.default.Fragment, null, /* @__PURE__ */ import_react39.default.createElement(
|
|
6386
6296
|
Input_default,
|
|
6387
6297
|
{
|
|
6388
6298
|
...innerProps,
|
|
@@ -6412,7 +6322,7 @@ var MonthRangePicker = (0, import_react40.forwardRef)((inProps, ref) => {
|
|
|
6412
6322
|
// NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
|
|
6413
6323
|
fontFamily: "monospace"
|
|
6414
6324
|
},
|
|
6415
|
-
endDecorator: /* @__PURE__ */
|
|
6325
|
+
endDecorator: /* @__PURE__ */ import_react39.default.createElement(
|
|
6416
6326
|
IconButton_default,
|
|
6417
6327
|
{
|
|
6418
6328
|
ref: buttonRef,
|
|
@@ -6423,12 +6333,12 @@ var MonthRangePicker = (0, import_react40.forwardRef)((inProps, ref) => {
|
|
|
6423
6333
|
"aria-haspopup": "dialog",
|
|
6424
6334
|
"aria-expanded": open
|
|
6425
6335
|
},
|
|
6426
|
-
/* @__PURE__ */
|
|
6336
|
+
/* @__PURE__ */ import_react39.default.createElement(import_CalendarToday3.default, null)
|
|
6427
6337
|
),
|
|
6428
6338
|
label,
|
|
6429
6339
|
helperText
|
|
6430
6340
|
}
|
|
6431
|
-
), open && /* @__PURE__ */
|
|
6341
|
+
), open && /* @__PURE__ */ import_react39.default.createElement(import_base5.ClickAwayListener, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ import_react39.default.createElement(
|
|
6432
6342
|
StyledPopper3,
|
|
6433
6343
|
{
|
|
6434
6344
|
id: "month-range-picker-popper",
|
|
@@ -6447,7 +6357,7 @@ var MonthRangePicker = (0, import_react40.forwardRef)((inProps, ref) => {
|
|
|
6447
6357
|
"aria-label": "Calendar Tooltip",
|
|
6448
6358
|
"aria-expanded": open
|
|
6449
6359
|
},
|
|
6450
|
-
/* @__PURE__ */
|
|
6360
|
+
/* @__PURE__ */ import_react39.default.createElement(CalendarSheet3, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ import_react39.default.createElement(
|
|
6451
6361
|
Calendar_default,
|
|
6452
6362
|
{
|
|
6453
6363
|
view: "month",
|
|
@@ -6461,14 +6371,14 @@ var MonthRangePicker = (0, import_react40.forwardRef)((inProps, ref) => {
|
|
|
6461
6371
|
disablePast,
|
|
6462
6372
|
locale
|
|
6463
6373
|
}
|
|
6464
|
-
), /* @__PURE__ */
|
|
6374
|
+
), /* @__PURE__ */ import_react39.default.createElement(
|
|
6465
6375
|
DialogActions_default,
|
|
6466
6376
|
{
|
|
6467
6377
|
sx: {
|
|
6468
6378
|
p: 1
|
|
6469
6379
|
}
|
|
6470
6380
|
},
|
|
6471
|
-
/* @__PURE__ */
|
|
6381
|
+
/* @__PURE__ */ import_react39.default.createElement(
|
|
6472
6382
|
Button_default,
|
|
6473
6383
|
{
|
|
6474
6384
|
size,
|
|
@@ -6503,11 +6413,11 @@ function MonthRange(props) {
|
|
|
6503
6413
|
locale
|
|
6504
6414
|
} = props;
|
|
6505
6415
|
const [internalValue, setInternalValue] = useControlledState(value, null, onChange);
|
|
6506
|
-
const pickerValue = (0,
|
|
6416
|
+
const pickerValue = (0, import_react40.useMemo)(
|
|
6507
6417
|
() => internalValue ? `${internalValue[0]} - ${internalValue[1]}` : "",
|
|
6508
6418
|
[internalValue]
|
|
6509
6419
|
);
|
|
6510
|
-
const handleChange = (0,
|
|
6420
|
+
const handleChange = (0, import_react40.useCallback)(
|
|
6511
6421
|
(event) => {
|
|
6512
6422
|
const rangeString = event.target.value;
|
|
6513
6423
|
if (rangeString && rangeString.includes(" - ")) {
|
|
@@ -6524,7 +6434,7 @@ function MonthRange(props) {
|
|
|
6524
6434
|
if (hidden) {
|
|
6525
6435
|
return null;
|
|
6526
6436
|
}
|
|
6527
|
-
return /* @__PURE__ */
|
|
6437
|
+
return /* @__PURE__ */ import_react40.default.createElement(import_joy51.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react40.default.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ import_react40.default.createElement(
|
|
6528
6438
|
MonthRangePicker,
|
|
6529
6439
|
{
|
|
6530
6440
|
value: pickerValue,
|
|
@@ -6542,12 +6452,12 @@ function MonthRange(props) {
|
|
|
6542
6452
|
MonthRange.displayName = "MonthRange";
|
|
6543
6453
|
|
|
6544
6454
|
// src/components/FilterMenu/components/CurrencyInput.tsx
|
|
6545
|
-
var
|
|
6455
|
+
var import_react41 = __toESM(require("react"));
|
|
6546
6456
|
var import_joy52 = require("@mui/joy");
|
|
6547
6457
|
function CurrencyInput3(props) {
|
|
6548
6458
|
const { id, label, value, onChange, hidden, max, placeholder, useMinorUnit, currency = "USD" } = props;
|
|
6549
6459
|
const [internalValue, setInternalValue] = useControlledState(value, value, onChange);
|
|
6550
|
-
const handleCurrencyChange = (0,
|
|
6460
|
+
const handleCurrencyChange = (0, import_react41.useCallback)(
|
|
6551
6461
|
(event) => {
|
|
6552
6462
|
const newValue = event.target.value ?? void 0;
|
|
6553
6463
|
setInternalValue(newValue);
|
|
@@ -6557,7 +6467,7 @@ function CurrencyInput3(props) {
|
|
|
6557
6467
|
if (hidden) {
|
|
6558
6468
|
return null;
|
|
6559
6469
|
}
|
|
6560
|
-
return /* @__PURE__ */
|
|
6470
|
+
return /* @__PURE__ */ import_react41.default.createElement(import_joy52.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react41.default.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ import_react41.default.createElement(
|
|
6561
6471
|
CurrencyInput,
|
|
6562
6472
|
{
|
|
6563
6473
|
value: internalValue,
|
|
@@ -6573,14 +6483,14 @@ function CurrencyInput3(props) {
|
|
|
6573
6483
|
CurrencyInput3.displayName = "CurrencyInput";
|
|
6574
6484
|
|
|
6575
6485
|
// src/components/FilterMenu/components/CurrencyRange.tsx
|
|
6576
|
-
var
|
|
6486
|
+
var import_react42 = __toESM(require("react"));
|
|
6577
6487
|
var import_joy53 = require("@mui/joy");
|
|
6578
6488
|
function CurrencyRange(props) {
|
|
6579
6489
|
const { id, label, value, onChange, hidden, max, placeholder, useMinorUnit, currency = "USD" } = props;
|
|
6580
6490
|
const [internalValue, setInternalValue] = useControlledState(value, null, onChange);
|
|
6581
6491
|
const minValue = internalValue?.[0];
|
|
6582
6492
|
const maxValue = internalValue?.[1];
|
|
6583
|
-
const handleMinChange = (0,
|
|
6493
|
+
const handleMinChange = (0, import_react42.useCallback)(
|
|
6584
6494
|
(event) => {
|
|
6585
6495
|
const newMinValue = event.target.value ?? void 0;
|
|
6586
6496
|
const currentMaxValue = maxValue;
|
|
@@ -6594,7 +6504,7 @@ function CurrencyRange(props) {
|
|
|
6594
6504
|
},
|
|
6595
6505
|
[maxValue, setInternalValue]
|
|
6596
6506
|
);
|
|
6597
|
-
const handleMaxChange = (0,
|
|
6507
|
+
const handleMaxChange = (0, import_react42.useCallback)(
|
|
6598
6508
|
(event) => {
|
|
6599
6509
|
const newMaxValue = event.target.value ?? void 0;
|
|
6600
6510
|
const currentMinValue = minValue;
|
|
@@ -6611,7 +6521,7 @@ function CurrencyRange(props) {
|
|
|
6611
6521
|
if (hidden) {
|
|
6612
6522
|
return null;
|
|
6613
6523
|
}
|
|
6614
|
-
return /* @__PURE__ */
|
|
6524
|
+
return /* @__PURE__ */ import_react42.default.createElement(import_joy53.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react42.default.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ import_react42.default.createElement(import_joy53.Stack, { direction: "row", spacing: 2, alignItems: "flex-end" }, /* @__PURE__ */ import_react42.default.createElement(
|
|
6615
6525
|
CurrencyInput,
|
|
6616
6526
|
{
|
|
6617
6527
|
label: "Minimum",
|
|
@@ -6624,7 +6534,7 @@ function CurrencyRange(props) {
|
|
|
6624
6534
|
"aria-labelledby": label ? id : void 0,
|
|
6625
6535
|
"aria-label": "Minimum amount"
|
|
6626
6536
|
}
|
|
6627
|
-
), /* @__PURE__ */
|
|
6537
|
+
), /* @__PURE__ */ import_react42.default.createElement(
|
|
6628
6538
|
CurrencyInput,
|
|
6629
6539
|
{
|
|
6630
6540
|
label: "Maximum",
|
|
@@ -6642,20 +6552,20 @@ function CurrencyRange(props) {
|
|
|
6642
6552
|
CurrencyRange.displayName = "CurrencyRange";
|
|
6643
6553
|
|
|
6644
6554
|
// src/components/FilterMenu/components/PercentageInput.tsx
|
|
6645
|
-
var
|
|
6555
|
+
var import_react44 = __toESM(require("react"));
|
|
6646
6556
|
var import_joy55 = require("@mui/joy");
|
|
6647
6557
|
|
|
6648
6558
|
// src/components/PercentageInput/PercentageInput.tsx
|
|
6649
|
-
var
|
|
6559
|
+
var import_react43 = __toESM(require("react"));
|
|
6650
6560
|
var import_react_number_format2 = require("react-number-format");
|
|
6651
6561
|
var import_joy54 = require("@mui/joy");
|
|
6652
6562
|
var padDecimal = (value, decimalScale) => {
|
|
6653
6563
|
const [integer, decimal = ""] = `${value}`.split(".");
|
|
6654
6564
|
return Number(`${integer}${decimal.padEnd(decimalScale, "0")}`);
|
|
6655
6565
|
};
|
|
6656
|
-
var TextMaskAdapter9 =
|
|
6566
|
+
var TextMaskAdapter9 = import_react43.default.forwardRef(function TextMaskAdapter10(props, ref) {
|
|
6657
6567
|
const { onChange, min, max, ...innerProps } = props;
|
|
6658
|
-
return /* @__PURE__ */
|
|
6568
|
+
return /* @__PURE__ */ import_react43.default.createElement(
|
|
6659
6569
|
import_react_number_format2.NumericFormat,
|
|
6660
6570
|
{
|
|
6661
6571
|
...innerProps,
|
|
@@ -6680,7 +6590,7 @@ var PercentageInputRoot = (0, import_joy54.styled)(Input_default, {
|
|
|
6680
6590
|
slot: "Root",
|
|
6681
6591
|
overridesResolver: (props, styles) => styles.root
|
|
6682
6592
|
})({});
|
|
6683
|
-
var PercentageInput =
|
|
6593
|
+
var PercentageInput = import_react43.default.forwardRef(
|
|
6684
6594
|
function PercentageInput2(inProps, ref) {
|
|
6685
6595
|
const props = (0, import_joy54.useThemeProps)({ props: inProps, name: "PercentageInput" });
|
|
6686
6596
|
const {
|
|
@@ -6703,19 +6613,19 @@ var PercentageInput = import_react44.default.forwardRef(
|
|
|
6703
6613
|
const [_value, setValue] = useControlledState(
|
|
6704
6614
|
props.value,
|
|
6705
6615
|
props.defaultValue ?? null,
|
|
6706
|
-
(0,
|
|
6616
|
+
(0, import_react43.useCallback)((value2) => onChange?.({ target: { name, value: value2 } }), [onChange, name])
|
|
6707
6617
|
);
|
|
6708
|
-
const value = (0,
|
|
6618
|
+
const value = (0, import_react43.useMemo)(() => {
|
|
6709
6619
|
if (_value && useMinorUnit) {
|
|
6710
6620
|
return _value / Math.pow(10, maxDecimalScale);
|
|
6711
6621
|
}
|
|
6712
6622
|
return _value;
|
|
6713
6623
|
}, [_value, useMinorUnit, maxDecimalScale]);
|
|
6714
|
-
const internalError = (0,
|
|
6624
|
+
const internalError = (0, import_react43.useMemo)(
|
|
6715
6625
|
() => value != null && (max != null && value > max || min != null && value < min),
|
|
6716
6626
|
[max, min, value]
|
|
6717
6627
|
);
|
|
6718
|
-
const handleChange = (0,
|
|
6628
|
+
const handleChange = (0, import_react43.useCallback)(
|
|
6719
6629
|
(event) => {
|
|
6720
6630
|
if (event.target.value === "") {
|
|
6721
6631
|
setValue(null);
|
|
@@ -6727,7 +6637,7 @@ var PercentageInput = import_react44.default.forwardRef(
|
|
|
6727
6637
|
},
|
|
6728
6638
|
[setValue, useMinorUnit, maxDecimalScale]
|
|
6729
6639
|
);
|
|
6730
|
-
return /* @__PURE__ */
|
|
6640
|
+
return /* @__PURE__ */ import_react43.default.createElement(
|
|
6731
6641
|
PercentageInputRoot,
|
|
6732
6642
|
{
|
|
6733
6643
|
...innerProps,
|
|
@@ -6774,7 +6684,7 @@ var PercentageInput3 = ({
|
|
|
6774
6684
|
if (hidden) {
|
|
6775
6685
|
return null;
|
|
6776
6686
|
}
|
|
6777
|
-
return /* @__PURE__ */
|
|
6687
|
+
return /* @__PURE__ */ import_react44.default.createElement(import_joy55.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react44.default.createElement(import_joy55.Typography, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ import_react44.default.createElement(
|
|
6778
6688
|
PercentageInput,
|
|
6779
6689
|
{
|
|
6780
6690
|
value: _value,
|
|
@@ -6789,7 +6699,7 @@ var PercentageInput3 = ({
|
|
|
6789
6699
|
};
|
|
6790
6700
|
|
|
6791
6701
|
// src/components/FilterMenu/components/PercentageRange.tsx
|
|
6792
|
-
var
|
|
6702
|
+
var import_react45 = __toESM(require("react"));
|
|
6793
6703
|
var import_joy56 = require("@mui/joy");
|
|
6794
6704
|
function PercentageRange(props) {
|
|
6795
6705
|
const { id, label, value, onChange, hidden, useMinorUnit, maxDecimalScale, min, max } = props;
|
|
@@ -6800,7 +6710,7 @@ function PercentageRange(props) {
|
|
|
6800
6710
|
);
|
|
6801
6711
|
const minValue = internalValue?.[0];
|
|
6802
6712
|
const maxValue = internalValue?.[1];
|
|
6803
|
-
const handleMinChange = (0,
|
|
6713
|
+
const handleMinChange = (0, import_react45.useCallback)(
|
|
6804
6714
|
(event) => {
|
|
6805
6715
|
const newMinValue = event.target.value ?? void 0;
|
|
6806
6716
|
const currentMaxValue = maxValue;
|
|
@@ -6812,7 +6722,7 @@ function PercentageRange(props) {
|
|
|
6812
6722
|
},
|
|
6813
6723
|
[maxValue, setInternalValue]
|
|
6814
6724
|
);
|
|
6815
|
-
const handleMaxChange = (0,
|
|
6725
|
+
const handleMaxChange = (0, import_react45.useCallback)(
|
|
6816
6726
|
(event) => {
|
|
6817
6727
|
const newMaxValue = event.target.value ?? void 0;
|
|
6818
6728
|
const currentMinValue = minValue;
|
|
@@ -6827,7 +6737,7 @@ function PercentageRange(props) {
|
|
|
6827
6737
|
if (hidden) {
|
|
6828
6738
|
return null;
|
|
6829
6739
|
}
|
|
6830
|
-
return /* @__PURE__ */
|
|
6740
|
+
return /* @__PURE__ */ import_react45.default.createElement(import_joy56.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react45.default.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ import_react45.default.createElement(import_joy56.Stack, { direction: "row", spacing: 2, alignItems: "flex-end" }, /* @__PURE__ */ import_react45.default.createElement(
|
|
6831
6741
|
PercentageInput,
|
|
6832
6742
|
{
|
|
6833
6743
|
label: "Minimum",
|
|
@@ -6841,7 +6751,7 @@ function PercentageRange(props) {
|
|
|
6841
6751
|
"aria-label": "Minimum percentage",
|
|
6842
6752
|
placeholder: "0%"
|
|
6843
6753
|
}
|
|
6844
|
-
), /* @__PURE__ */
|
|
6754
|
+
), /* @__PURE__ */ import_react45.default.createElement(
|
|
6845
6755
|
PercentageInput,
|
|
6846
6756
|
{
|
|
6847
6757
|
label: "Maximum",
|
|
@@ -6860,13 +6770,13 @@ function PercentageRange(props) {
|
|
|
6860
6770
|
PercentageRange.displayName = "PercentageRange";
|
|
6861
6771
|
|
|
6862
6772
|
// src/components/FilterMenu/components/Autocomplete.tsx
|
|
6863
|
-
var
|
|
6773
|
+
var import_react46 = __toESM(require("react"));
|
|
6864
6774
|
var import_joy57 = require("@mui/joy");
|
|
6865
6775
|
function Autocomplete2(props) {
|
|
6866
6776
|
const { id, label, value, onChange, options, multiple, hidden, placeholder } = props;
|
|
6867
6777
|
const [internalValue, setInternalValue] = useControlledState(value, void 0, onChange);
|
|
6868
6778
|
const autocompleteValue = typeof internalValue === "string" || typeof internalValue === "number" ? String(internalValue) : void 0;
|
|
6869
|
-
const handleChange = (0,
|
|
6779
|
+
const handleChange = (0, import_react46.useCallback)(
|
|
6870
6780
|
(event) => {
|
|
6871
6781
|
const val = event.target.value ?? void 0;
|
|
6872
6782
|
if (val) {
|
|
@@ -6881,7 +6791,7 @@ function Autocomplete2(props) {
|
|
|
6881
6791
|
if (hidden) {
|
|
6882
6792
|
return null;
|
|
6883
6793
|
}
|
|
6884
|
-
return /* @__PURE__ */
|
|
6794
|
+
return /* @__PURE__ */ import_react46.default.createElement(import_joy57.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react46.default.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ import_react46.default.createElement(
|
|
6885
6795
|
Autocomplete,
|
|
6886
6796
|
{
|
|
6887
6797
|
value: autocompleteValue,
|
|
@@ -6916,13 +6826,13 @@ function FilterMenu(props) {
|
|
|
6916
6826
|
void 0
|
|
6917
6827
|
// onChange는 Apply 버튼에서만 호출
|
|
6918
6828
|
);
|
|
6919
|
-
const dropdownRegistry = (0,
|
|
6920
|
-
(0,
|
|
6829
|
+
const dropdownRegistry = (0, import_react47.useContext)(DropdownNestedRegistryContext);
|
|
6830
|
+
(0, import_react47.useEffect)(() => {
|
|
6921
6831
|
if (!dropdownRegistry) return void 0;
|
|
6922
6832
|
dropdownRegistry.register();
|
|
6923
6833
|
return () => dropdownRegistry.unregister();
|
|
6924
6834
|
}, [dropdownRegistry]);
|
|
6925
|
-
const handleFilterChange = (0,
|
|
6835
|
+
const handleFilterChange = (0, import_react47.useCallback)(
|
|
6926
6836
|
(filterId, value) => {
|
|
6927
6837
|
setInternalValues((prev) => ({
|
|
6928
6838
|
...prev,
|
|
@@ -6931,17 +6841,17 @@ function FilterMenu(props) {
|
|
|
6931
6841
|
},
|
|
6932
6842
|
[setInternalValues]
|
|
6933
6843
|
);
|
|
6934
|
-
const handleApply = (0,
|
|
6844
|
+
const handleApply = (0, import_react47.useCallback)(() => {
|
|
6935
6845
|
onChange?.(internalValues);
|
|
6936
6846
|
onClose?.();
|
|
6937
6847
|
}, [onChange, onClose, internalValues]);
|
|
6938
|
-
const handleClear = (0,
|
|
6848
|
+
const handleClear = (0, import_react47.useCallback)(() => {
|
|
6939
6849
|
const clearedValues = resetValues || {};
|
|
6940
6850
|
setInternalValues(clearedValues);
|
|
6941
6851
|
onChange?.(clearedValues);
|
|
6942
6852
|
onClose?.();
|
|
6943
6853
|
}, [resetValues, setInternalValues, onChange, onClose]);
|
|
6944
|
-
return /* @__PURE__ */
|
|
6854
|
+
return /* @__PURE__ */ import_react47.default.createElement(
|
|
6945
6855
|
ModalDialog,
|
|
6946
6856
|
{
|
|
6947
6857
|
sx: {
|
|
@@ -6951,9 +6861,9 @@ function FilterMenu(props) {
|
|
|
6951
6861
|
top: "initial"
|
|
6952
6862
|
}
|
|
6953
6863
|
},
|
|
6954
|
-
/* @__PURE__ */
|
|
6864
|
+
/* @__PURE__ */ import_react47.default.createElement(DialogContent, { sx: { paddingTop: 5 } }, /* @__PURE__ */ import_react47.default.createElement(import_joy58.Stack, { spacing: 6 }, filters?.map((filter) => {
|
|
6955
6865
|
const FilterComponent = componentMap[filter.type];
|
|
6956
|
-
return FilterComponent ? /* @__PURE__ */
|
|
6866
|
+
return FilterComponent ? /* @__PURE__ */ import_react47.default.createElement(
|
|
6957
6867
|
FilterComponent,
|
|
6958
6868
|
{
|
|
6959
6869
|
key: filter.id,
|
|
@@ -6965,13 +6875,13 @@ function FilterMenu(props) {
|
|
|
6965
6875
|
}
|
|
6966
6876
|
) : null;
|
|
6967
6877
|
}))),
|
|
6968
|
-
/* @__PURE__ */
|
|
6878
|
+
/* @__PURE__ */ import_react47.default.createElement(DialogActions, { sx: { justifyContent: "space-between" } }, useClear && filters?.length === 1 && /* @__PURE__ */ import_react47.default.createElement(import_joy58.Button, { variant: "plain", color: "neutral", onClick: handleClear }, "Clear"), useReset && !useClear && /* @__PURE__ */ import_react47.default.createElement(import_joy58.Button, { variant: "plain", color: "neutral", onClick: handleClear }, "Reset"), /* @__PURE__ */ import_react47.default.createElement(import_joy58.Button, { variant: "solid", color: "primary", onClick: handleApply }, "Apply"))
|
|
6969
6879
|
);
|
|
6970
6880
|
}
|
|
6971
6881
|
FilterMenu.displayName = "FilterMenu";
|
|
6972
6882
|
|
|
6973
6883
|
// src/components/Uploader/Uploader.tsx
|
|
6974
|
-
var
|
|
6884
|
+
var import_react48 = __toESM(require("react"));
|
|
6975
6885
|
var import_joy59 = require("@mui/joy");
|
|
6976
6886
|
var import_CloudUploadRounded = __toESM(require("@mui/icons-material/CloudUploadRounded"));
|
|
6977
6887
|
var import_UploadFileRounded = __toESM(require("@mui/icons-material/UploadFileRounded"));
|
|
@@ -7034,7 +6944,7 @@ var getFileSize = (n) => {
|
|
|
7034
6944
|
};
|
|
7035
6945
|
var Preview = (props) => {
|
|
7036
6946
|
const { files, uploaded, onDelete } = props;
|
|
7037
|
-
return /* @__PURE__ */
|
|
6947
|
+
return /* @__PURE__ */ import_react48.default.createElement(PreviewRoot, { gap: 1 }, [...uploaded, ...files].map((file) => /* @__PURE__ */ import_react48.default.createElement(UploadCard, { key: file.name, size: "sm", color: "neutral" }, /* @__PURE__ */ import_react48.default.createElement(Stack_default, { direction: "row", alignItems: "center", gap: 2 }, /* @__PURE__ */ import_react48.default.createElement(UploadFileIcon, null), /* @__PURE__ */ import_react48.default.createElement(Stack_default, { flex: "1", sx: { overflow: "hidden" } }, /* @__PURE__ */ import_react48.default.createElement(
|
|
7038
6948
|
Typography_default,
|
|
7039
6949
|
{
|
|
7040
6950
|
level: "body-sm",
|
|
@@ -7046,7 +6956,7 @@ var Preview = (props) => {
|
|
|
7046
6956
|
}
|
|
7047
6957
|
},
|
|
7048
6958
|
file.name
|
|
7049
|
-
), !!file.size && /* @__PURE__ */
|
|
6959
|
+
), !!file.size && /* @__PURE__ */ import_react48.default.createElement(Typography_default, { level: "body-xs", fontWeight: "300", lineHeight: "1.33", textColor: "text.tertiary" }, getFileSize(file.size))), /* @__PURE__ */ import_react48.default.createElement(IconButton_default, { onClick: () => onDelete?.(file) }, /* @__PURE__ */ import_react48.default.createElement(ClearIcon2, null))))));
|
|
7050
6960
|
};
|
|
7051
6961
|
var UploaderRoot = (0, import_joy59.styled)(Stack_default, {
|
|
7052
6962
|
name: "Uploader",
|
|
@@ -7089,7 +6999,7 @@ var UploaderIcon = (0, import_joy59.styled)(import_CloudUploadRounded.default, {
|
|
|
7089
6999
|
}
|
|
7090
7000
|
})
|
|
7091
7001
|
);
|
|
7092
|
-
var Uploader =
|
|
7002
|
+
var Uploader = import_react48.default.memo((props) => {
|
|
7093
7003
|
const {
|
|
7094
7004
|
accept,
|
|
7095
7005
|
minCount,
|
|
@@ -7105,14 +7015,14 @@ var Uploader = import_react49.default.memo((props) => {
|
|
|
7105
7015
|
error: errorProp,
|
|
7106
7016
|
helperText: helperTextProp
|
|
7107
7017
|
} = props;
|
|
7108
|
-
const dropZoneRef = (0,
|
|
7109
|
-
const inputRef = (0,
|
|
7110
|
-
const [errorText, setErrorText] = (0,
|
|
7111
|
-
const [files, setFiles] = (0,
|
|
7112
|
-
const [uploaded, setUploaded] = (0,
|
|
7113
|
-
const [previewState, setPreviewState] = (0,
|
|
7114
|
-
const accepts = (0,
|
|
7115
|
-
const parsedAccepts = (0,
|
|
7018
|
+
const dropZoneRef = (0, import_react48.useRef)(null);
|
|
7019
|
+
const inputRef = (0, import_react48.useRef)(null);
|
|
7020
|
+
const [errorText, setErrorText] = (0, import_react48.useState)();
|
|
7021
|
+
const [files, setFiles] = (0, import_react48.useState)([]);
|
|
7022
|
+
const [uploaded, setUploaded] = (0, import_react48.useState)(props.uploaded || []);
|
|
7023
|
+
const [previewState, setPreviewState] = (0, import_react48.useState)("idle");
|
|
7024
|
+
const accepts = (0, import_react48.useMemo)(() => accept.split(",").map((accept2) => accept2.trim()), [accept]);
|
|
7025
|
+
const parsedAccepts = (0, import_react48.useMemo)(
|
|
7116
7026
|
() => accepts.flatMap((type) => {
|
|
7117
7027
|
if (["image/*", "video/*", "audio/*"].includes(type)) {
|
|
7118
7028
|
return ALL_EXTENSIONS_BY_TYPE[type];
|
|
@@ -7121,7 +7031,7 @@ var Uploader = import_react49.default.memo((props) => {
|
|
|
7121
7031
|
}),
|
|
7122
7032
|
[accepts]
|
|
7123
7033
|
);
|
|
7124
|
-
const helperText = (0,
|
|
7034
|
+
const helperText = (0, import_react48.useMemo)(() => {
|
|
7125
7035
|
if (helperTextProp) {
|
|
7126
7036
|
return helperTextProp;
|
|
7127
7037
|
}
|
|
@@ -7151,12 +7061,12 @@ var Uploader = import_react49.default.memo((props) => {
|
|
|
7151
7061
|
}
|
|
7152
7062
|
return helperTexts.join(", ");
|
|
7153
7063
|
}, [accepts, maxFileTotalSize, maxCount, helperTextProp]);
|
|
7154
|
-
const error = (0,
|
|
7155
|
-
const showDropZone = (0,
|
|
7064
|
+
const error = (0, import_react48.useMemo)(() => !!errorText || errorProp, [errorProp, errorText]);
|
|
7065
|
+
const showDropZone = (0, import_react48.useMemo)(
|
|
7156
7066
|
() => !maxCount || maxCount && [...uploaded, ...files].length !== maxCount,
|
|
7157
7067
|
[files, maxCount, uploaded]
|
|
7158
7068
|
);
|
|
7159
|
-
const addFiles = (0,
|
|
7069
|
+
const addFiles = (0, import_react48.useCallback)(
|
|
7160
7070
|
(uploads) => {
|
|
7161
7071
|
try {
|
|
7162
7072
|
const types = parsedAccepts.map((type) => type.replace(".", "")) || [];
|
|
@@ -7201,7 +7111,7 @@ var Uploader = import_react49.default.memo((props) => {
|
|
|
7201
7111
|
},
|
|
7202
7112
|
[files, uploaded, maxCount, parsedAccepts, maxFileSize, maxFileTotalSize, name, onChange]
|
|
7203
7113
|
);
|
|
7204
|
-
(0,
|
|
7114
|
+
(0, import_react48.useEffect)(() => {
|
|
7205
7115
|
if (!dropZoneRef.current || disabled) {
|
|
7206
7116
|
return;
|
|
7207
7117
|
}
|
|
@@ -7229,7 +7139,7 @@ var Uploader = import_react49.default.memo((props) => {
|
|
|
7229
7139
|
})
|
|
7230
7140
|
);
|
|
7231
7141
|
}, [disabled, addFiles]);
|
|
7232
|
-
(0,
|
|
7142
|
+
(0, import_react48.useEffect)(() => {
|
|
7233
7143
|
if (inputRef.current && minCount) {
|
|
7234
7144
|
if (files.length < minCount) {
|
|
7235
7145
|
inputRef.current.setCustomValidity(`At least ${minCount} files are required.`);
|
|
@@ -7238,14 +7148,14 @@ var Uploader = import_react49.default.memo((props) => {
|
|
|
7238
7148
|
}
|
|
7239
7149
|
}
|
|
7240
7150
|
}, [inputRef, files, minCount]);
|
|
7241
|
-
const handleFileChanged = (0,
|
|
7151
|
+
const handleFileChanged = (0, import_react48.useCallback)(
|
|
7242
7152
|
(event) => {
|
|
7243
7153
|
const files2 = Array.from(event.target.files || []);
|
|
7244
7154
|
addFiles(files2);
|
|
7245
7155
|
},
|
|
7246
7156
|
[addFiles]
|
|
7247
7157
|
);
|
|
7248
|
-
const handleDeleteFile = (0,
|
|
7158
|
+
const handleDeleteFile = (0, import_react48.useCallback)(
|
|
7249
7159
|
(deletedFile) => {
|
|
7250
7160
|
if (deletedFile instanceof File) {
|
|
7251
7161
|
setFiles((current) => {
|
|
@@ -7265,10 +7175,10 @@ var Uploader = import_react49.default.memo((props) => {
|
|
|
7265
7175
|
},
|
|
7266
7176
|
[name, onChange, onDelete]
|
|
7267
7177
|
);
|
|
7268
|
-
const handleUploaderButtonClick = (0,
|
|
7178
|
+
const handleUploaderButtonClick = (0, import_react48.useCallback)(() => {
|
|
7269
7179
|
inputRef.current?.click();
|
|
7270
7180
|
}, []);
|
|
7271
|
-
const uploader = /* @__PURE__ */
|
|
7181
|
+
const uploader = /* @__PURE__ */ import_react48.default.createElement(
|
|
7272
7182
|
FileDropZone,
|
|
7273
7183
|
{
|
|
7274
7184
|
state: previewState,
|
|
@@ -7277,8 +7187,8 @@ var Uploader = import_react49.default.memo((props) => {
|
|
|
7277
7187
|
ref: dropZoneRef,
|
|
7278
7188
|
onClick: handleUploaderButtonClick
|
|
7279
7189
|
},
|
|
7280
|
-
/* @__PURE__ */
|
|
7281
|
-
/* @__PURE__ */
|
|
7190
|
+
/* @__PURE__ */ import_react48.default.createElement(Stack_default, { alignItems: "center", gap: 1 }, /* @__PURE__ */ import_react48.default.createElement(UploaderIcon, { state: previewState, error: !!(error || errorText), disabled })),
|
|
7191
|
+
/* @__PURE__ */ import_react48.default.createElement(
|
|
7282
7192
|
VisuallyHiddenInput,
|
|
7283
7193
|
{
|
|
7284
7194
|
disabled,
|
|
@@ -7301,7 +7211,7 @@ var Uploader = import_react49.default.memo((props) => {
|
|
|
7301
7211
|
}
|
|
7302
7212
|
)
|
|
7303
7213
|
);
|
|
7304
|
-
return /* @__PURE__ */
|
|
7214
|
+
return /* @__PURE__ */ import_react48.default.createElement(UploaderRoot, null, showDropZone && /* @__PURE__ */ import_react48.default.createElement(FormControl_default, { size, error: !!(error || errorText), disabled, required: !!minCount }, label && /* @__PURE__ */ import_react48.default.createElement(FormLabel_default, null, label), uploader, /* @__PURE__ */ import_react48.default.createElement(FormHelperText_default, null, /* @__PURE__ */ import_react48.default.createElement(Stack_default, null, errorText && /* @__PURE__ */ import_react48.default.createElement("div", null, errorText), /* @__PURE__ */ import_react48.default.createElement("div", null, helperText)))), [...uploaded, ...files].length > 0 && /* @__PURE__ */ import_react48.default.createElement(Preview, { files, uploaded, onDelete: handleDeleteFile }));
|
|
7305
7215
|
});
|
|
7306
7216
|
Uploader.displayName = "Uploader";
|
|
7307
7217
|
|
|
@@ -7309,12 +7219,9 @@ Uploader.displayName = "Uploader";
|
|
|
7309
7219
|
var import_joy60 = require("@mui/joy");
|
|
7310
7220
|
|
|
7311
7221
|
// src/components/IconMenuButton/IconMenuButton.tsx
|
|
7312
|
-
var
|
|
7222
|
+
var import_react49 = __toESM(require("react"));
|
|
7313
7223
|
var import_joy61 = require("@mui/joy");
|
|
7314
|
-
|
|
7315
|
-
return /* @__PURE__ */ import_react50.default.createElement(import_joy61.IconButton, { ...rest, component: as ?? "button", ref });
|
|
7316
|
-
});
|
|
7317
|
-
function IconMenuButtonInner(props, ref) {
|
|
7224
|
+
function IconMenuButton(props) {
|
|
7318
7225
|
const {
|
|
7319
7226
|
size,
|
|
7320
7227
|
icon,
|
|
@@ -7325,10 +7232,8 @@ function IconMenuButtonInner(props, ref) {
|
|
|
7325
7232
|
variant = "plain",
|
|
7326
7233
|
placement = "bottom"
|
|
7327
7234
|
} = props;
|
|
7328
|
-
const { ref: buttonComponentRef, ...buttonComponentProps } = props.buttonComponentProps ?? {};
|
|
7329
|
-
const mergedButtonRef = useMergedRef(buttonComponentRef, ref);
|
|
7330
7235
|
if (!items.length) {
|
|
7331
|
-
return /* @__PURE__ */
|
|
7236
|
+
return /* @__PURE__ */ import_react49.default.createElement(
|
|
7332
7237
|
import_joy61.IconButton,
|
|
7333
7238
|
{
|
|
7334
7239
|
component: props.buttonComponent ?? "button",
|
|
@@ -7337,16 +7242,15 @@ function IconMenuButtonInner(props, ref) {
|
|
|
7337
7242
|
color,
|
|
7338
7243
|
disabled,
|
|
7339
7244
|
loading,
|
|
7340
|
-
...buttonComponentProps
|
|
7341
|
-
ref: mergedButtonRef
|
|
7245
|
+
...props.buttonComponentProps ?? {}
|
|
7342
7246
|
},
|
|
7343
7247
|
icon
|
|
7344
7248
|
);
|
|
7345
7249
|
}
|
|
7346
|
-
return /* @__PURE__ */
|
|
7250
|
+
return /* @__PURE__ */ import_react49.default.createElement(Dropdown_default, null, /* @__PURE__ */ import_react49.default.createElement(
|
|
7347
7251
|
import_joy61.MenuButton,
|
|
7348
7252
|
{
|
|
7349
|
-
slots: { root:
|
|
7253
|
+
slots: { root: import_joy61.IconButton },
|
|
7350
7254
|
slotProps: {
|
|
7351
7255
|
root: {
|
|
7352
7256
|
component: props.buttonComponent ?? "button",
|
|
@@ -7355,27 +7259,24 @@ function IconMenuButtonInner(props, ref) {
|
|
|
7355
7259
|
color,
|
|
7356
7260
|
disabled,
|
|
7357
7261
|
loading,
|
|
7358
|
-
...buttonComponentProps
|
|
7359
|
-
// Joy의 useSlot이 내부 ref와 이 ref를 합쳐준다. 위 no-items 분기와 같은 경로로 ref를 넘긴다.
|
|
7360
|
-
ref: mergedButtonRef
|
|
7262
|
+
...props.buttonComponentProps ?? {}
|
|
7361
7263
|
}
|
|
7362
7264
|
}
|
|
7363
7265
|
},
|
|
7364
7266
|
icon
|
|
7365
|
-
), /* @__PURE__ */
|
|
7267
|
+
), /* @__PURE__ */ import_react49.default.createElement(Menu, { placement, size }, items.map((i) => /* @__PURE__ */ import_react49.default.createElement(MenuItem, { key: i.text, component: i.component, ...i.componentProps ?? {} }, i.text))));
|
|
7366
7268
|
}
|
|
7367
|
-
var IconMenuButton = import_react50.default.forwardRef(IconMenuButtonInner);
|
|
7368
7269
|
IconMenuButton.displayName = "IconMenuButton";
|
|
7369
7270
|
|
|
7370
7271
|
// src/components/Markdown/Markdown.tsx
|
|
7371
|
-
var
|
|
7272
|
+
var import_react50 = __toESM(require("react"));
|
|
7372
7273
|
var import_joy62 = require("@mui/joy");
|
|
7373
7274
|
var import_joy63 = require("@mui/joy");
|
|
7374
7275
|
var import_remark_gfm = __toESM(require("remark-gfm"));
|
|
7375
|
-
var LazyReactMarkdown = (0,
|
|
7276
|
+
var LazyReactMarkdown = (0, import_react50.lazy)(() => import("react-markdown"));
|
|
7376
7277
|
var Markdown = (props) => {
|
|
7377
|
-
const [rehypeAccent2, setRehypeAccent] = (0,
|
|
7378
|
-
(0,
|
|
7278
|
+
const [rehypeAccent2, setRehypeAccent] = (0, import_react50.useState)(null);
|
|
7279
|
+
(0, import_react50.useEffect)(() => {
|
|
7379
7280
|
const loadRehypeAccent = async () => {
|
|
7380
7281
|
const module2 = await Promise.resolve().then(() => (init_rehype_accent(), rehype_accent_exports));
|
|
7381
7282
|
setRehypeAccent(() => module2.rehypeAccent);
|
|
@@ -7397,8 +7298,8 @@ var Markdown = (props) => {
|
|
|
7397
7298
|
if (!rehypeAccent2) {
|
|
7398
7299
|
return null;
|
|
7399
7300
|
}
|
|
7400
|
-
return /* @__PURE__ */
|
|
7401
|
-
|
|
7301
|
+
return /* @__PURE__ */ import_react50.default.createElement(Typography, { component: "div", color, textColor, level: defaultLevel, ...innerProps }, /* @__PURE__ */ import_react50.default.createElement(
|
|
7302
|
+
import_react50.Suspense,
|
|
7402
7303
|
{
|
|
7403
7304
|
fallback: (
|
|
7404
7305
|
// While in the fallback state, prevent browser auto-translation (e.g. Chrome/Google Translate)
|
|
@@ -7406,10 +7307,10 @@ var Markdown = (props) => {
|
|
|
7406
7307
|
// swaps the fallback for the real content via insertBefore; if the browser has mutated the DOM
|
|
7407
7308
|
// in the meantime, the reference node's parent changes and React throws a DOMException
|
|
7408
7309
|
// ("Failed to execute 'insertBefore' on 'Node'"), crashing the subtree. (cf. facebook/react#11538)
|
|
7409
|
-
fallback || /* @__PURE__ */
|
|
7310
|
+
fallback || /* @__PURE__ */ import_react50.default.createElement(Typography, { translate: "no", className: "notranslate" }, /* @__PURE__ */ import_react50.default.createElement(import_joy62.Skeleton, null, content || ""))
|
|
7410
7311
|
)
|
|
7411
7312
|
},
|
|
7412
|
-
/* @__PURE__ */
|
|
7313
|
+
/* @__PURE__ */ import_react50.default.createElement(
|
|
7413
7314
|
LazyReactMarkdown,
|
|
7414
7315
|
{
|
|
7415
7316
|
...markdownOptions,
|
|
@@ -7417,17 +7318,17 @@ var Markdown = (props) => {
|
|
|
7417
7318
|
rehypePlugins: [[rehypeAccent2, { accentColor }]],
|
|
7418
7319
|
remarkPlugins: [import_remark_gfm.default],
|
|
7419
7320
|
components: {
|
|
7420
|
-
a: ({ children, href }) => /* @__PURE__ */
|
|
7421
|
-
hr: () => /* @__PURE__ */
|
|
7422
|
-
b: ({ children }) => /* @__PURE__ */
|
|
7423
|
-
strong: ({ children }) => /* @__PURE__ */
|
|
7321
|
+
a: ({ children, href }) => /* @__PURE__ */ import_react50.default.createElement(import_joy63.Link, { href, target: defaultLinkAction }, children),
|
|
7322
|
+
hr: () => /* @__PURE__ */ import_react50.default.createElement(Divider, { sx: { display: "block" } }),
|
|
7323
|
+
b: ({ children }) => /* @__PURE__ */ import_react50.default.createElement(Typography, { component: "strong", fontWeight: boldFontWeight || "lg" }, children),
|
|
7324
|
+
strong: ({ children }) => /* @__PURE__ */ import_react50.default.createElement(Typography, { component: "strong", fontWeight: boldFontWeight || "lg" }, children),
|
|
7424
7325
|
// Table components
|
|
7425
|
-
table: ({ children }) => /* @__PURE__ */
|
|
7326
|
+
table: ({ children }) => /* @__PURE__ */ import_react50.default.createElement(Sheet, { variant: "outlined", sx: { display: "block", borderRadius: "sm", overflow: "auto" } }, /* @__PURE__ */ import_react50.default.createElement(Table, { size: "sm" }, children)),
|
|
7426
7327
|
// Code components
|
|
7427
7328
|
code: ({ children, className }) => {
|
|
7428
7329
|
const isBlock = className?.startsWith("language-");
|
|
7429
7330
|
if (isBlock) {
|
|
7430
|
-
return /* @__PURE__ */
|
|
7331
|
+
return /* @__PURE__ */ import_react50.default.createElement(
|
|
7431
7332
|
Typography,
|
|
7432
7333
|
{
|
|
7433
7334
|
component: "code",
|
|
@@ -7441,7 +7342,7 @@ var Markdown = (props) => {
|
|
|
7441
7342
|
children
|
|
7442
7343
|
);
|
|
7443
7344
|
}
|
|
7444
|
-
return /* @__PURE__ */
|
|
7345
|
+
return /* @__PURE__ */ import_react50.default.createElement(
|
|
7445
7346
|
Typography,
|
|
7446
7347
|
{
|
|
7447
7348
|
component: "code",
|
|
@@ -7456,7 +7357,7 @@ var Markdown = (props) => {
|
|
|
7456
7357
|
children
|
|
7457
7358
|
);
|
|
7458
7359
|
},
|
|
7459
|
-
pre: ({ children }) => /* @__PURE__ */
|
|
7360
|
+
pre: ({ children }) => /* @__PURE__ */ import_react50.default.createElement(
|
|
7460
7361
|
Sheet,
|
|
7461
7362
|
{
|
|
7462
7363
|
variant: "soft",
|
|
@@ -7474,12 +7375,12 @@ var Markdown = (props) => {
|
|
|
7474
7375
|
// Task list checkbox
|
|
7475
7376
|
input: ({ checked, type }) => {
|
|
7476
7377
|
if (type === "checkbox") {
|
|
7477
|
-
return /* @__PURE__ */
|
|
7378
|
+
return /* @__PURE__ */ import_react50.default.createElement(Checkbox, { checked, disabled: true, size: "sm", sx: { mr: 1 } });
|
|
7478
7379
|
}
|
|
7479
|
-
return /* @__PURE__ */
|
|
7380
|
+
return /* @__PURE__ */ import_react50.default.createElement("input", { checked, type });
|
|
7480
7381
|
},
|
|
7481
7382
|
// Blockquote
|
|
7482
|
-
blockquote: ({ children }) => /* @__PURE__ */
|
|
7383
|
+
blockquote: ({ children }) => /* @__PURE__ */ import_react50.default.createElement(
|
|
7483
7384
|
Sheet,
|
|
7484
7385
|
{
|
|
7485
7386
|
variant: "soft",
|
|
@@ -7488,12 +7389,12 @@ var Markdown = (props) => {
|
|
|
7488
7389
|
children
|
|
7489
7390
|
),
|
|
7490
7391
|
// Image
|
|
7491
|
-
img: ({ src, alt }) => /* @__PURE__ */
|
|
7392
|
+
img: ({ src, alt }) => /* @__PURE__ */ import_react50.default.createElement("img", { src, alt, style: { maxWidth: "100%", borderRadius: "4px" } }),
|
|
7492
7393
|
// Text style components
|
|
7493
|
-
em: ({ children }) => /* @__PURE__ */
|
|
7494
|
-
del: ({ children }) => /* @__PURE__ */
|
|
7394
|
+
em: ({ children }) => /* @__PURE__ */ import_react50.default.createElement(Typography, { component: "em", sx: { fontStyle: "italic" } }, children),
|
|
7395
|
+
del: ({ children }) => /* @__PURE__ */ import_react50.default.createElement(Typography, { component: "del", sx: { textDecoration: "line-through" } }, children),
|
|
7495
7396
|
// Span for accent color (from rehype-accent plugin)
|
|
7496
|
-
span: ({ children, node }) => /* @__PURE__ */
|
|
7397
|
+
span: ({ children, node }) => /* @__PURE__ */ import_react50.default.createElement(Typography, { component: "span", textColor: node?.properties?.textColor }, children),
|
|
7497
7398
|
...markdownOptions?.components
|
|
7498
7399
|
}
|
|
7499
7400
|
}
|
|
@@ -7503,7 +7404,7 @@ var Markdown = (props) => {
|
|
|
7503
7404
|
Markdown.displayName = "Markdown";
|
|
7504
7405
|
|
|
7505
7406
|
// src/components/MenuButton/MenuButton.tsx
|
|
7506
|
-
var
|
|
7407
|
+
var import_react51 = __toESM(require("react"));
|
|
7507
7408
|
var import_joy64 = require("@mui/joy");
|
|
7508
7409
|
var import_ExpandMore = __toESM(require("@mui/icons-material/ExpandMore"));
|
|
7509
7410
|
function MenuButton2(props) {
|
|
@@ -7521,7 +7422,7 @@ function MenuButton2(props) {
|
|
|
7521
7422
|
placement = "bottom"
|
|
7522
7423
|
} = props;
|
|
7523
7424
|
if (!items.length) {
|
|
7524
|
-
return /* @__PURE__ */
|
|
7425
|
+
return /* @__PURE__ */ import_react51.default.createElement(
|
|
7525
7426
|
import_joy64.Button,
|
|
7526
7427
|
{
|
|
7527
7428
|
component: props.buttonComponent ?? "button",
|
|
@@ -7532,12 +7433,12 @@ function MenuButton2(props) {
|
|
|
7532
7433
|
loading,
|
|
7533
7434
|
startDecorator,
|
|
7534
7435
|
...props.buttonComponentProps ?? {},
|
|
7535
|
-
endDecorator: showIcon ? /* @__PURE__ */
|
|
7436
|
+
endDecorator: showIcon ? /* @__PURE__ */ import_react51.default.createElement(import_react51.default.Fragment, null, endDecorator, /* @__PURE__ */ import_react51.default.createElement(import_ExpandMore.default, null)) : /* @__PURE__ */ import_react51.default.createElement(import_react51.default.Fragment, null, endDecorator)
|
|
7536
7437
|
},
|
|
7537
7438
|
buttonText
|
|
7538
7439
|
);
|
|
7539
7440
|
}
|
|
7540
|
-
return /* @__PURE__ */
|
|
7441
|
+
return /* @__PURE__ */ import_react51.default.createElement(Dropdown_default, null, /* @__PURE__ */ import_react51.default.createElement(
|
|
7541
7442
|
import_joy64.MenuButton,
|
|
7542
7443
|
{
|
|
7543
7444
|
component: props.buttonComponent ?? "button",
|
|
@@ -7548,15 +7449,15 @@ function MenuButton2(props) {
|
|
|
7548
7449
|
loading,
|
|
7549
7450
|
startDecorator,
|
|
7550
7451
|
...props.buttonComponentProps ?? {},
|
|
7551
|
-
endDecorator: showIcon ? /* @__PURE__ */
|
|
7452
|
+
endDecorator: showIcon ? /* @__PURE__ */ import_react51.default.createElement(import_react51.default.Fragment, null, endDecorator, /* @__PURE__ */ import_react51.default.createElement(import_ExpandMore.default, null)) : /* @__PURE__ */ import_react51.default.createElement(import_react51.default.Fragment, null, endDecorator)
|
|
7552
7453
|
},
|
|
7553
7454
|
buttonText
|
|
7554
|
-
), /* @__PURE__ */
|
|
7455
|
+
), /* @__PURE__ */ import_react51.default.createElement(Menu, { placement, size }, items.map((i) => /* @__PURE__ */ import_react51.default.createElement(MenuItem, { key: i.text, component: i.component, ...i.componentProps ?? {} }, i.text))));
|
|
7555
7456
|
}
|
|
7556
7457
|
MenuButton2.displayName = "MenuButton";
|
|
7557
7458
|
|
|
7558
7459
|
// src/components/MonthPicker/MonthPicker.tsx
|
|
7559
|
-
var
|
|
7460
|
+
var import_react52 = __toESM(require("react"));
|
|
7560
7461
|
var import_CalendarToday4 = __toESM(require("@mui/icons-material/CalendarToday"));
|
|
7561
7462
|
var import_joy65 = require("@mui/joy");
|
|
7562
7463
|
var import_base6 = require("@mui/base");
|
|
@@ -7612,7 +7513,7 @@ function parseDate4(dateString, format) {
|
|
|
7612
7513
|
const result = new Date(year, month, day);
|
|
7613
7514
|
return result;
|
|
7614
7515
|
}
|
|
7615
|
-
var MonthPicker = (0,
|
|
7516
|
+
var MonthPicker = (0, import_react52.forwardRef)((inProps, ref) => {
|
|
7616
7517
|
const props = (0, import_joy65.useThemeProps)({ props: inProps, name: "MonthPicker" });
|
|
7617
7518
|
const {
|
|
7618
7519
|
onChange,
|
|
@@ -7639,18 +7540,18 @@ var MonthPicker = (0, import_react53.forwardRef)((inProps, ref) => {
|
|
|
7639
7540
|
locale,
|
|
7640
7541
|
...innerProps
|
|
7641
7542
|
} = props;
|
|
7642
|
-
const innerRef = (0,
|
|
7643
|
-
const buttonRef = (0,
|
|
7543
|
+
const innerRef = (0, import_react52.useRef)(null);
|
|
7544
|
+
const buttonRef = (0, import_react52.useRef)(null);
|
|
7644
7545
|
const [rawValue, setValue, isControlled] = useControlledState(
|
|
7645
7546
|
props.value,
|
|
7646
7547
|
props.defaultValue ?? null,
|
|
7647
|
-
(0,
|
|
7548
|
+
(0, import_react52.useCallback)(
|
|
7648
7549
|
(value2) => onChange?.({ target: { name: props.name, value: value2 ?? "" } }),
|
|
7649
7550
|
[props.name, onChange]
|
|
7650
7551
|
)
|
|
7651
7552
|
);
|
|
7652
7553
|
const value = rawValue ?? "";
|
|
7653
|
-
const getFormattedDisplayValue = (0,
|
|
7554
|
+
const getFormattedDisplayValue = (0, import_react52.useCallback)(
|
|
7654
7555
|
(inputValue) => {
|
|
7655
7556
|
if (!inputValue) return "";
|
|
7656
7557
|
try {
|
|
@@ -7661,19 +7562,19 @@ var MonthPicker = (0, import_react53.forwardRef)((inProps, ref) => {
|
|
|
7661
7562
|
},
|
|
7662
7563
|
[format, displayFormat, locale]
|
|
7663
7564
|
);
|
|
7664
|
-
const [displayValue, setDisplayValue] = (0,
|
|
7665
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
7565
|
+
const [displayValue, setDisplayValue] = (0, import_react52.useState)(() => getFormattedDisplayValue(value));
|
|
7566
|
+
const [anchorEl, setAnchorEl] = (0, import_react52.useState)(null);
|
|
7666
7567
|
const open = Boolean(anchorEl);
|
|
7667
|
-
(0,
|
|
7568
|
+
(0, import_react52.useEffect)(() => {
|
|
7668
7569
|
if (!anchorEl) {
|
|
7669
7570
|
innerRef.current?.blur();
|
|
7670
7571
|
}
|
|
7671
7572
|
}, [anchorEl, innerRef]);
|
|
7672
|
-
(0,
|
|
7673
|
-
(0,
|
|
7573
|
+
(0, import_react52.useImperativeHandle)(ref, () => innerRef.current, [innerRef]);
|
|
7574
|
+
(0, import_react52.useEffect)(() => {
|
|
7674
7575
|
setDisplayValue(getFormattedDisplayValue(value));
|
|
7675
7576
|
}, [value, getFormattedDisplayValue]);
|
|
7676
|
-
const handleChange = (0,
|
|
7577
|
+
const handleChange = (0, import_react52.useCallback)(
|
|
7677
7578
|
(event) => {
|
|
7678
7579
|
const newValue = event.target.value;
|
|
7679
7580
|
setValue(newValue);
|
|
@@ -7683,21 +7584,21 @@ var MonthPicker = (0, import_react53.forwardRef)((inProps, ref) => {
|
|
|
7683
7584
|
},
|
|
7684
7585
|
[setValue, getFormattedDisplayValue, isControlled]
|
|
7685
7586
|
);
|
|
7686
|
-
const handleCalendarToggle = (0,
|
|
7587
|
+
const handleCalendarToggle = (0, import_react52.useCallback)(
|
|
7687
7588
|
(event) => {
|
|
7688
7589
|
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
7689
7590
|
innerRef.current?.focus();
|
|
7690
7591
|
},
|
|
7691
7592
|
[anchorEl, setAnchorEl, innerRef]
|
|
7692
7593
|
);
|
|
7693
|
-
const handleInputMouseDown = (0,
|
|
7594
|
+
const handleInputMouseDown = (0, import_react52.useCallback)(
|
|
7694
7595
|
(event) => {
|
|
7695
7596
|
event.preventDefault();
|
|
7696
7597
|
buttonRef.current?.focus();
|
|
7697
7598
|
},
|
|
7698
7599
|
[buttonRef]
|
|
7699
7600
|
);
|
|
7700
|
-
return /* @__PURE__ */
|
|
7601
|
+
return /* @__PURE__ */ import_react52.default.createElement(MonthPickerRoot, null, /* @__PURE__ */ import_react52.default.createElement(import_base6.FocusTrap, { open: true }, /* @__PURE__ */ import_react52.default.createElement(import_react52.default.Fragment, null, /* @__PURE__ */ import_react52.default.createElement(
|
|
7701
7602
|
Input_default,
|
|
7702
7603
|
{
|
|
7703
7604
|
...innerProps,
|
|
@@ -7727,7 +7628,7 @@ var MonthPicker = (0, import_react53.forwardRef)((inProps, ref) => {
|
|
|
7727
7628
|
// NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
|
|
7728
7629
|
fontFamily: "monospace"
|
|
7729
7630
|
},
|
|
7730
|
-
endDecorator: /* @__PURE__ */
|
|
7631
|
+
endDecorator: /* @__PURE__ */ import_react52.default.createElement(
|
|
7731
7632
|
IconButton_default,
|
|
7732
7633
|
{
|
|
7733
7634
|
ref: buttonRef,
|
|
@@ -7739,12 +7640,12 @@ var MonthPicker = (0, import_react53.forwardRef)((inProps, ref) => {
|
|
|
7739
7640
|
"aria-expanded": open,
|
|
7740
7641
|
disabled
|
|
7741
7642
|
},
|
|
7742
|
-
/* @__PURE__ */
|
|
7643
|
+
/* @__PURE__ */ import_react52.default.createElement(import_CalendarToday4.default, null)
|
|
7743
7644
|
),
|
|
7744
7645
|
label,
|
|
7745
7646
|
helperText
|
|
7746
7647
|
}
|
|
7747
|
-
), open && /* @__PURE__ */
|
|
7648
|
+
), open && /* @__PURE__ */ import_react52.default.createElement(import_base6.ClickAwayListener, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ import_react52.default.createElement(
|
|
7748
7649
|
StyledPopper4,
|
|
7749
7650
|
{
|
|
7750
7651
|
id: "month-picker-popper",
|
|
@@ -7763,7 +7664,7 @@ var MonthPicker = (0, import_react53.forwardRef)((inProps, ref) => {
|
|
|
7763
7664
|
"aria-label": "Calendar Tooltip",
|
|
7764
7665
|
"aria-expanded": open
|
|
7765
7666
|
},
|
|
7766
|
-
/* @__PURE__ */
|
|
7667
|
+
/* @__PURE__ */ import_react52.default.createElement(CalendarSheet4, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ import_react52.default.createElement(
|
|
7767
7668
|
Calendar_default,
|
|
7768
7669
|
{
|
|
7769
7670
|
view: "month",
|
|
@@ -7784,14 +7685,14 @@ var MonthPicker = (0, import_react53.forwardRef)((inProps, ref) => {
|
|
|
7784
7685
|
disablePast,
|
|
7785
7686
|
locale
|
|
7786
7687
|
}
|
|
7787
|
-
), /* @__PURE__ */
|
|
7688
|
+
), /* @__PURE__ */ import_react52.default.createElement(
|
|
7788
7689
|
DialogActions_default,
|
|
7789
7690
|
{
|
|
7790
7691
|
sx: {
|
|
7791
7692
|
p: 1
|
|
7792
7693
|
}
|
|
7793
7694
|
},
|
|
7794
|
-
/* @__PURE__ */
|
|
7695
|
+
/* @__PURE__ */ import_react52.default.createElement(
|
|
7795
7696
|
Button_default,
|
|
7796
7697
|
{
|
|
7797
7698
|
size,
|
|
@@ -7814,7 +7715,7 @@ var MonthPicker = (0, import_react53.forwardRef)((inProps, ref) => {
|
|
|
7814
7715
|
});
|
|
7815
7716
|
|
|
7816
7717
|
// src/components/NavigationGroup/NavigationGroup.tsx
|
|
7817
|
-
var
|
|
7718
|
+
var import_react53 = __toESM(require("react"));
|
|
7818
7719
|
var import_joy66 = require("@mui/joy");
|
|
7819
7720
|
var AccordionSummary2 = (0, import_joy66.styled)(import_joy66.AccordionSummary, {
|
|
7820
7721
|
name: "NavigationGroup",
|
|
@@ -7838,11 +7739,11 @@ var AccordionDetails2 = (0, import_joy66.styled)(import_joy66.AccordionDetails,
|
|
|
7838
7739
|
}));
|
|
7839
7740
|
function NavigationGroup(props) {
|
|
7840
7741
|
const { title, children, startDecorator, level, ...rest } = props;
|
|
7841
|
-
return /* @__PURE__ */
|
|
7742
|
+
return /* @__PURE__ */ import_react53.default.createElement(import_joy66.Accordion, { ...rest }, /* @__PURE__ */ import_react53.default.createElement(AccordionSummary2, { useIcon: !!startDecorator, level }, /* @__PURE__ */ import_react53.default.createElement(import_joy66.Stack, { direction: "row", gap: 4 }, startDecorator, title)), /* @__PURE__ */ import_react53.default.createElement(AccordionDetails2, null, children));
|
|
7842
7743
|
}
|
|
7843
7744
|
|
|
7844
7745
|
// src/components/NavigationItem/NavigationItem.tsx
|
|
7845
|
-
var
|
|
7746
|
+
var import_react54 = __toESM(require("react"));
|
|
7846
7747
|
var import_joy67 = require("@mui/joy");
|
|
7847
7748
|
var ListItemButton = (0, import_joy67.styled)(import_joy67.ListItemButton, {
|
|
7848
7749
|
name: "NavigationItem",
|
|
@@ -7871,7 +7772,7 @@ function NavigationItem(props) {
|
|
|
7871
7772
|
const handleClick = () => {
|
|
7872
7773
|
onClick?.(id);
|
|
7873
7774
|
};
|
|
7874
|
-
return /* @__PURE__ */
|
|
7775
|
+
return /* @__PURE__ */ import_react54.default.createElement(import_joy67.ListItem, { ...rest }, /* @__PURE__ */ import_react54.default.createElement(
|
|
7875
7776
|
ListItemButton,
|
|
7876
7777
|
{
|
|
7877
7778
|
level,
|
|
@@ -7880,21 +7781,21 @@ function NavigationItem(props) {
|
|
|
7880
7781
|
"aria-current": selected,
|
|
7881
7782
|
onClick: handleClick
|
|
7882
7783
|
},
|
|
7883
|
-
startDecorator && /* @__PURE__ */
|
|
7784
|
+
startDecorator && /* @__PURE__ */ import_react54.default.createElement(import_joy67.ListItemDecorator, null, startDecorator),
|
|
7884
7785
|
children
|
|
7885
7786
|
));
|
|
7886
7787
|
}
|
|
7887
7788
|
|
|
7888
7789
|
// src/components/Navigator/Navigator.tsx
|
|
7889
|
-
var
|
|
7790
|
+
var import_react55 = __toESM(require("react"));
|
|
7890
7791
|
function Navigator(props) {
|
|
7891
7792
|
const { items, level = 0, onSelect } = props;
|
|
7892
7793
|
const handleItemClick = (id) => {
|
|
7893
7794
|
onSelect?.(id);
|
|
7894
7795
|
};
|
|
7895
|
-
return /* @__PURE__ */
|
|
7796
|
+
return /* @__PURE__ */ import_react55.default.createElement("div", null, items.map((item, index) => {
|
|
7896
7797
|
if (item.type === "item") {
|
|
7897
|
-
return /* @__PURE__ */
|
|
7798
|
+
return /* @__PURE__ */ import_react55.default.createElement(
|
|
7898
7799
|
NavigationItem,
|
|
7899
7800
|
{
|
|
7900
7801
|
key: item.id,
|
|
@@ -7907,7 +7808,7 @@ function Navigator(props) {
|
|
|
7907
7808
|
item.title
|
|
7908
7809
|
);
|
|
7909
7810
|
} else if (item.type === "group") {
|
|
7910
|
-
return /* @__PURE__ */
|
|
7811
|
+
return /* @__PURE__ */ import_react55.default.createElement(
|
|
7911
7812
|
NavigationGroup,
|
|
7912
7813
|
{
|
|
7913
7814
|
key: `${item.title}-${index}`,
|
|
@@ -7925,7 +7826,7 @@ function Navigator(props) {
|
|
|
7925
7826
|
Navigator.displayName = "Navigator";
|
|
7926
7827
|
|
|
7927
7828
|
// src/components/ProfileMenu/ProfileMenu.tsx
|
|
7928
|
-
var
|
|
7829
|
+
var import_react56 = __toESM(require("react"));
|
|
7929
7830
|
var import_joy68 = require("@mui/joy");
|
|
7930
7831
|
var import_base7 = require("@mui/base");
|
|
7931
7832
|
var import_ArrowDropDown = __toESM(require("@mui/icons-material/ArrowDropDown"));
|
|
@@ -7935,9 +7836,9 @@ var StyledProfileCard = (0, import_joy68.styled)(import_joy3.Stack, {
|
|
|
7935
7836
|
})({});
|
|
7936
7837
|
function ProfileCard(props) {
|
|
7937
7838
|
const { children, chip, caption, size } = props;
|
|
7938
|
-
const captionLevel = (0,
|
|
7939
|
-
const nameLevel = (0,
|
|
7940
|
-
return /* @__PURE__ */
|
|
7839
|
+
const captionLevel = (0, import_react56.useMemo)(() => size === "sm" ? "body-xs" : "body-sm", [size]);
|
|
7840
|
+
const nameLevel = (0, import_react56.useMemo)(() => size === "sm" ? "body-sm" : "body-md", [size]);
|
|
7841
|
+
return /* @__PURE__ */ import_react56.default.createElement(StyledProfileCard, { px: 4, py: 2 }, /* @__PURE__ */ import_react56.default.createElement(import_joy3.Stack, { direction: "row", gap: 2 }, /* @__PURE__ */ import_react56.default.createElement(Typography, { level: nameLevel, fontWeight: "bold", textColor: "text.primary" }, children), chip && /* @__PURE__ */ import_react56.default.createElement(Chip, { size, color: "neutral", variant: "outlined" }, chip)), caption && /* @__PURE__ */ import_react56.default.createElement(Typography, { level: captionLevel, textColor: "text.tertiary" }, caption));
|
|
7941
7842
|
}
|
|
7942
7843
|
ProfileCard.displayName = "ProfileCard";
|
|
7943
7844
|
var StyledProfileMenuButton = (0, import_joy68.styled)(import_joy68.MenuButton, {
|
|
@@ -7949,16 +7850,16 @@ var StyledProfileMenuButton = (0, import_joy68.styled)(import_joy68.MenuButton,
|
|
|
7949
7850
|
}));
|
|
7950
7851
|
function ProfileMenuButton(props) {
|
|
7951
7852
|
const { size = "sm", src, alt, children, getInitial, ...innerProps } = props;
|
|
7952
|
-
return /* @__PURE__ */
|
|
7853
|
+
return /* @__PURE__ */ import_react56.default.createElement(
|
|
7953
7854
|
StyledProfileMenuButton,
|
|
7954
7855
|
{
|
|
7955
7856
|
variant: "plain",
|
|
7956
7857
|
color: "neutral",
|
|
7957
7858
|
size,
|
|
7958
|
-
endDecorator: /* @__PURE__ */
|
|
7859
|
+
endDecorator: /* @__PURE__ */ import_react56.default.createElement(import_ArrowDropDown.default, null),
|
|
7959
7860
|
...innerProps
|
|
7960
7861
|
},
|
|
7961
|
-
/* @__PURE__ */
|
|
7862
|
+
/* @__PURE__ */ import_react56.default.createElement(Avatar, { variant: "soft", color: "primary", size, src, alt, getInitial }, children)
|
|
7962
7863
|
);
|
|
7963
7864
|
}
|
|
7964
7865
|
ProfileMenuButton.displayName = "ProfileMenuButton";
|
|
@@ -7978,9 +7879,9 @@ function ProfileMenu(inProps) {
|
|
|
7978
7879
|
const [open, setOpen] = useControlledState(
|
|
7979
7880
|
_open,
|
|
7980
7881
|
defaultOpen ?? false,
|
|
7981
|
-
(0,
|
|
7882
|
+
(0, import_react56.useCallback)((value) => onOpenChange?.(value), [onOpenChange])
|
|
7982
7883
|
);
|
|
7983
|
-
return /* @__PURE__ */
|
|
7884
|
+
return /* @__PURE__ */ import_react56.default.createElement(import_base7.ClickAwayListener, { onClickAway: () => setOpen(false) }, /* @__PURE__ */ import_react56.default.createElement("div", null, /* @__PURE__ */ import_react56.default.createElement(import_joy68.Dropdown, { open }, /* @__PURE__ */ import_react56.default.createElement(
|
|
7984
7885
|
ProfileMenuButton,
|
|
7985
7886
|
{
|
|
7986
7887
|
size,
|
|
@@ -7990,7 +7891,7 @@ function ProfileMenu(inProps) {
|
|
|
7990
7891
|
getInitial
|
|
7991
7892
|
},
|
|
7992
7893
|
profile.name
|
|
7993
|
-
), /* @__PURE__ */
|
|
7894
|
+
), /* @__PURE__ */ import_react56.default.createElement(ProfileMenuRoot, { size, placement: "bottom-end", ...innerProps, onClose: () => setOpen(false) }, /* @__PURE__ */ import_react56.default.createElement(ProfileCard, { size, caption: profile.caption, chip: profile.chip }, profile.name), !!menuItems.length && /* @__PURE__ */ import_react56.default.createElement(import_joy68.ListDivider, null), menuItems.map(({ label, ...menuProps }) => /* @__PURE__ */ import_react56.default.createElement(
|
|
7994
7895
|
MenuItem,
|
|
7995
7896
|
{
|
|
7996
7897
|
key: label,
|
|
@@ -8006,7 +7907,7 @@ function ProfileMenu(inProps) {
|
|
|
8006
7907
|
ProfileMenu.displayName = "ProfileMenu";
|
|
8007
7908
|
|
|
8008
7909
|
// src/components/RadioTileGroup/RadioTileGroup.tsx
|
|
8009
|
-
var
|
|
7910
|
+
var import_react57 = __toESM(require("react"));
|
|
8010
7911
|
var import_joy69 = require("@mui/joy");
|
|
8011
7912
|
var RadioTileGroupRoot = (0, import_joy69.styled)(RadioGroup, {
|
|
8012
7913
|
name: "RadioTileGroup",
|
|
@@ -8094,7 +7995,7 @@ function RadioTileGroup(props) {
|
|
|
8094
7995
|
error,
|
|
8095
7996
|
required
|
|
8096
7997
|
} = props;
|
|
8097
|
-
const radioGroup = /* @__PURE__ */
|
|
7998
|
+
const radioGroup = /* @__PURE__ */ import_react57.default.createElement(
|
|
8098
7999
|
RadioTileGroupRoot,
|
|
8099
8000
|
{
|
|
8100
8001
|
overlay: true,
|
|
@@ -8105,7 +8006,7 @@ function RadioTileGroup(props) {
|
|
|
8105
8006
|
flex,
|
|
8106
8007
|
columns
|
|
8107
8008
|
},
|
|
8108
|
-
options.map((option) => /* @__PURE__ */
|
|
8009
|
+
options.map((option) => /* @__PURE__ */ import_react57.default.createElement(
|
|
8109
8010
|
RadioTileSheet,
|
|
8110
8011
|
{
|
|
8111
8012
|
key: option.value,
|
|
@@ -8115,7 +8016,7 @@ function RadioTileGroup(props) {
|
|
|
8115
8016
|
flex,
|
|
8116
8017
|
textAlign
|
|
8117
8018
|
},
|
|
8118
|
-
/* @__PURE__ */
|
|
8019
|
+
/* @__PURE__ */ import_react57.default.createElement(
|
|
8119
8020
|
Radio,
|
|
8120
8021
|
{
|
|
8121
8022
|
id: `${option.value}`,
|
|
@@ -8144,7 +8045,7 @@ function RadioTileGroup(props) {
|
|
|
8144
8045
|
}
|
|
8145
8046
|
}
|
|
8146
8047
|
),
|
|
8147
|
-
option.startDecorator && /* @__PURE__ */
|
|
8048
|
+
option.startDecorator && /* @__PURE__ */ import_react57.default.createElement(
|
|
8148
8049
|
Box_default,
|
|
8149
8050
|
{
|
|
8150
8051
|
sx: {
|
|
@@ -8165,15 +8066,15 @@ function RadioTileGroup(props) {
|
|
|
8165
8066
|
)
|
|
8166
8067
|
))
|
|
8167
8068
|
);
|
|
8168
|
-
return /* @__PURE__ */
|
|
8069
|
+
return /* @__PURE__ */ import_react57.default.createElement(FormControl_default, { required, disabled: allDisabled, error, size, sx, className }, label && /* @__PURE__ */ import_react57.default.createElement(FormLabel_default, null, label), radioGroup, helperText && /* @__PURE__ */ import_react57.default.createElement(FormHelperText_default, null, helperText));
|
|
8169
8070
|
}
|
|
8170
8071
|
RadioTileGroup.displayName = "RadioTileGroup";
|
|
8171
8072
|
|
|
8172
8073
|
// src/components/RadioList/RadioList.tsx
|
|
8173
|
-
var
|
|
8074
|
+
var import_react58 = __toESM(require("react"));
|
|
8174
8075
|
function RadioList(props) {
|
|
8175
8076
|
const { items, ...innerProps } = props;
|
|
8176
|
-
return /* @__PURE__ */
|
|
8077
|
+
return /* @__PURE__ */ import_react58.default.createElement(RadioGroup, { ...innerProps }, items.map((item) => /* @__PURE__ */ import_react58.default.createElement(Radio, { key: `${item.value}`, value: item.value, label: item.label })));
|
|
8177
8078
|
}
|
|
8178
8079
|
RadioList.displayName = "RadioList";
|
|
8179
8080
|
|
|
@@ -8264,7 +8165,7 @@ var SearchBar = React56.forwardRef(function SearchBar2(inProps, ref) {
|
|
|
8264
8165
|
SearchBar.displayName = "SearchBar";
|
|
8265
8166
|
|
|
8266
8167
|
// src/components/Stepper/Stepper.tsx
|
|
8267
|
-
var
|
|
8168
|
+
var import_react59 = __toESM(require("react"));
|
|
8268
8169
|
var import_joy70 = require("@mui/joy");
|
|
8269
8170
|
var import_Check = __toESM(require("@mui/icons-material/Check"));
|
|
8270
8171
|
var import_framer_motion27 = require("framer-motion");
|
|
@@ -8293,7 +8194,7 @@ function Stepper(props) {
|
|
|
8293
8194
|
stepOrientation = "horizontal"
|
|
8294
8195
|
} = props;
|
|
8295
8196
|
const effectiveStepOrientation = orientation === "vertical" ? "horizontal" : stepOrientation;
|
|
8296
|
-
return /* @__PURE__ */
|
|
8197
|
+
return /* @__PURE__ */ import_react59.default.createElement(
|
|
8297
8198
|
MotionStepper,
|
|
8298
8199
|
{
|
|
8299
8200
|
orientation,
|
|
@@ -8332,23 +8233,23 @@ function Stepper(props) {
|
|
|
8332
8233
|
const completed = activeStep > i + 1;
|
|
8333
8234
|
const disabled = activeStep < i + 1;
|
|
8334
8235
|
const hasContent = step.label || step.extraContent;
|
|
8335
|
-
return /* @__PURE__ */
|
|
8236
|
+
return /* @__PURE__ */ import_react59.default.createElement(
|
|
8336
8237
|
Step,
|
|
8337
8238
|
{
|
|
8338
8239
|
key: `step-${i}`,
|
|
8339
|
-
indicator: /* @__PURE__ */
|
|
8240
|
+
indicator: /* @__PURE__ */ import_react59.default.createElement(StepIndicator, { variant: disabled ? "outlined" : "solid", color: disabled ? "neutral" : "primary" }, completed ? /* @__PURE__ */ import_react59.default.createElement(import_Check.default, null) : step.indicatorContent),
|
|
8340
8241
|
active,
|
|
8341
8242
|
completed,
|
|
8342
8243
|
disabled,
|
|
8343
8244
|
orientation: effectiveStepOrientation
|
|
8344
8245
|
},
|
|
8345
|
-
hasContent && /* @__PURE__ */
|
|
8246
|
+
hasContent && /* @__PURE__ */ import_react59.default.createElement(
|
|
8346
8247
|
Stack_default,
|
|
8347
8248
|
{
|
|
8348
8249
|
sx: orientation === "horizontal" && effectiveStepOrientation === "vertical" ? { alignItems: "center" } : {}
|
|
8349
8250
|
},
|
|
8350
|
-
step.label && /* @__PURE__ */
|
|
8351
|
-
step.extraContent && /* @__PURE__ */
|
|
8251
|
+
step.label && /* @__PURE__ */ import_react59.default.createElement(Typography_default, { level: "title-sm" }, step.label),
|
|
8252
|
+
step.extraContent && /* @__PURE__ */ import_react59.default.createElement(Typography_default, { level: "body-xs" }, step.extraContent)
|
|
8352
8253
|
)
|
|
8353
8254
|
);
|
|
8354
8255
|
})
|
|
@@ -8357,7 +8258,7 @@ function Stepper(props) {
|
|
|
8357
8258
|
Stepper.displayName = "Stepper";
|
|
8358
8259
|
|
|
8359
8260
|
// src/components/Switch/Switch.tsx
|
|
8360
|
-
var
|
|
8261
|
+
var import_react60 = __toESM(require("react"));
|
|
8361
8262
|
var import_joy71 = require("@mui/joy");
|
|
8362
8263
|
var import_framer_motion28 = require("framer-motion");
|
|
8363
8264
|
var MotionSwitch = (0, import_framer_motion28.motion)(import_joy71.Switch);
|
|
@@ -8379,14 +8280,14 @@ var StyledThumb = (0, import_joy71.styled)(import_framer_motion28.motion.div)({
|
|
|
8379
8280
|
right: "var(--Switch-thumbOffset)"
|
|
8380
8281
|
}
|
|
8381
8282
|
});
|
|
8382
|
-
var Thumb = (props) => /* @__PURE__ */
|
|
8283
|
+
var Thumb = (props) => /* @__PURE__ */ import_react60.default.createElement(StyledThumb, { ...props, layout: true, transition: spring });
|
|
8383
8284
|
var spring = {
|
|
8384
8285
|
type: "spring",
|
|
8385
8286
|
stiffness: 700,
|
|
8386
8287
|
damping: 30
|
|
8387
8288
|
};
|
|
8388
8289
|
var Switch = (props) => {
|
|
8389
|
-
return /* @__PURE__ */
|
|
8290
|
+
return /* @__PURE__ */ import_react60.default.createElement(
|
|
8390
8291
|
MotionSwitch,
|
|
8391
8292
|
{
|
|
8392
8293
|
...props,
|
|
@@ -8400,7 +8301,7 @@ var Switch = (props) => {
|
|
|
8400
8301
|
Switch.displayName = "Switch";
|
|
8401
8302
|
|
|
8402
8303
|
// src/components/Tabs/Tabs.tsx
|
|
8403
|
-
var
|
|
8304
|
+
var import_react61 = __toESM(require("react"));
|
|
8404
8305
|
var import_joy72 = require("@mui/joy");
|
|
8405
8306
|
var StyledTabs = (0, import_joy72.styled)(import_joy72.Tabs)(({ theme }) => ({
|
|
8406
8307
|
backgroundColor: theme.palette.background.body
|
|
@@ -8416,15 +8317,15 @@ var StyledTab = (0, import_joy72.styled)(import_joy72.Tab)(({ theme }) => ({
|
|
|
8416
8317
|
backgroundColor: theme.palette.background.body
|
|
8417
8318
|
}
|
|
8418
8319
|
}));
|
|
8419
|
-
var Tab = (0,
|
|
8420
|
-
return /* @__PURE__ */
|
|
8320
|
+
var Tab = (0, import_react61.forwardRef)(function Tab2({ startDecorator, endDecorator, children, ...props }, ref) {
|
|
8321
|
+
return /* @__PURE__ */ import_react61.default.createElement(StyledTab, { ...props, ref }, startDecorator, children, endDecorator);
|
|
8421
8322
|
});
|
|
8422
8323
|
Tab.displayName = "Tab";
|
|
8423
8324
|
var TabList = import_joy72.TabList;
|
|
8424
8325
|
var TabPanel = import_joy72.TabPanel;
|
|
8425
8326
|
|
|
8426
8327
|
// src/components/ThemeProvider/ThemeProvider.tsx
|
|
8427
|
-
var
|
|
8328
|
+
var import_react62 = __toESM(require("react"));
|
|
8428
8329
|
var import_joy73 = require("@mui/joy");
|
|
8429
8330
|
var colorScheme = {
|
|
8430
8331
|
palette: {
|
|
@@ -8821,6 +8722,6 @@ var defaultTheme = (0, import_joy73.extendTheme)({
|
|
|
8821
8722
|
});
|
|
8822
8723
|
function ThemeProvider(props) {
|
|
8823
8724
|
const theme = props.theme || defaultTheme;
|
|
8824
|
-
return /* @__PURE__ */
|
|
8725
|
+
return /* @__PURE__ */ import_react62.default.createElement(import_react62.default.Fragment, null, /* @__PURE__ */ import_react62.default.createElement(import_joy73.CssVarsProvider, { theme }, /* @__PURE__ */ import_react62.default.createElement(import_joy73.CssBaseline, null), props.children));
|
|
8825
8726
|
}
|
|
8826
8727
|
ThemeProvider.displayName = "ThemeProvider";
|