@ceed/ads 1.41.3-next.4 → 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 -806
- package/dist/index.js +171 -268
- 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,
|
|
@@ -1755,38 +1718,38 @@ var Calendar = (0, import_react16.forwardRef)((inProps, ref) => {
|
|
|
1755
1718
|
...others
|
|
1756
1719
|
} = props;
|
|
1757
1720
|
const { calendarTitle, onPrev, onNext } = useCalendar(ownerState);
|
|
1758
|
-
const [isMonthViewAssistHintOpen, setIsMonthViewAssistHintOpen] = (0,
|
|
1759
|
-
const monthNavClickTimestampsRef = (0,
|
|
1760
|
-
const monthViewAssistHintShownInSessionRef = (0,
|
|
1761
|
-
const monthViewAssistHintTimeoutRef = (0,
|
|
1762
|
-
const [hoverDay, setHoverDay] = (0,
|
|
1763
|
-
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);
|
|
1764
1727
|
const resolvedNumberOfMonths = numberOfMonths ?? 1;
|
|
1765
1728
|
const hasEndDate = Boolean(value?.[1]);
|
|
1766
1729
|
const isRangeHintEligible = Boolean(rangeSelection && !hasEndDate);
|
|
1767
1730
|
const isHintEligible = Boolean(view === "day" && (!rangeSelection || isRangeHintEligible));
|
|
1768
1731
|
const monthViewHintMessage = MONTH_VIEW_HINT_MESSAGE;
|
|
1769
|
-
(0,
|
|
1732
|
+
(0, import_react15.useEffect)(() => {
|
|
1770
1733
|
if (!isHintEligible) {
|
|
1771
1734
|
monthNavClickTimestampsRef.current = [];
|
|
1772
1735
|
setIsMonthViewAssistHintOpen(false);
|
|
1773
1736
|
}
|
|
1774
1737
|
}, [isHintEligible]);
|
|
1775
|
-
(0,
|
|
1738
|
+
(0, import_react15.useEffect)(() => {
|
|
1776
1739
|
return () => {
|
|
1777
1740
|
if (monthViewAssistHintTimeoutRef.current) {
|
|
1778
1741
|
clearTimeout(monthViewAssistHintTimeoutRef.current);
|
|
1779
1742
|
}
|
|
1780
1743
|
};
|
|
1781
1744
|
}, []);
|
|
1782
|
-
const closeMonthViewAssistHint = (0,
|
|
1745
|
+
const closeMonthViewAssistHint = (0, import_react15.useCallback)(() => {
|
|
1783
1746
|
if (monthViewAssistHintTimeoutRef.current) {
|
|
1784
1747
|
clearTimeout(monthViewAssistHintTimeoutRef.current);
|
|
1785
1748
|
monthViewAssistHintTimeoutRef.current = null;
|
|
1786
1749
|
}
|
|
1787
1750
|
setIsMonthViewAssistHintOpen(false);
|
|
1788
1751
|
}, []);
|
|
1789
|
-
const showMonthViewAssistHint = (0,
|
|
1752
|
+
const showMonthViewAssistHint = (0, import_react15.useCallback)(() => {
|
|
1790
1753
|
const now = Date.now();
|
|
1791
1754
|
if (monthViewAssistHintShownInSessionRef.current) return;
|
|
1792
1755
|
if (now - lastMonthViewAssistHintShownAt < MONTH_VIEW_HINT_COOLDOWN_MS) return;
|
|
@@ -1801,7 +1764,7 @@ var Calendar = (0, import_react16.forwardRef)((inProps, ref) => {
|
|
|
1801
1764
|
monthViewAssistHintTimeoutRef.current = null;
|
|
1802
1765
|
}, MONTH_VIEW_HINT_DURATION_MS);
|
|
1803
1766
|
}, []);
|
|
1804
|
-
const trackFastMonthNavigation = (0,
|
|
1767
|
+
const trackFastMonthNavigation = (0, import_react15.useCallback)(() => {
|
|
1805
1768
|
if (!isHintEligible) return;
|
|
1806
1769
|
const now = Date.now();
|
|
1807
1770
|
monthNavClickTimestampsRef.current = [
|
|
@@ -1812,15 +1775,15 @@ var Calendar = (0, import_react16.forwardRef)((inProps, ref) => {
|
|
|
1812
1775
|
showMonthViewAssistHint();
|
|
1813
1776
|
}
|
|
1814
1777
|
}, [isHintEligible, showMonthViewAssistHint]);
|
|
1815
|
-
const handlePrevClick = (0,
|
|
1778
|
+
const handlePrevClick = (0, import_react15.useCallback)(() => {
|
|
1816
1779
|
onPrev();
|
|
1817
1780
|
trackFastMonthNavigation();
|
|
1818
1781
|
}, [onPrev, trackFastMonthNavigation]);
|
|
1819
|
-
const handleNextClick = (0,
|
|
1782
|
+
const handleNextClick = (0, import_react15.useCallback)(() => {
|
|
1820
1783
|
onNext();
|
|
1821
1784
|
trackFastMonthNavigation();
|
|
1822
1785
|
}, [onNext, trackFastMonthNavigation]);
|
|
1823
|
-
const handleSwitchViewClick = (0,
|
|
1786
|
+
const handleSwitchViewClick = (0, import_react15.useCallback)(() => {
|
|
1824
1787
|
closeMonthViewAssistHint();
|
|
1825
1788
|
onViewChange?.();
|
|
1826
1789
|
}, [closeMonthViewAssistHint, onViewChange]);
|
|
@@ -1840,9 +1803,9 @@ var Calendar = (0, import_react16.forwardRef)((inProps, ref) => {
|
|
|
1840
1803
|
onHoverMonthChange: setHoverMonth
|
|
1841
1804
|
};
|
|
1842
1805
|
});
|
|
1843
|
-
return /* @__PURE__ */
|
|
1806
|
+
return /* @__PURE__ */ import_react15.default.createElement(CalendarRoot, { ref, ...others, style: { maxWidth: `${maxWidth}px` } }, view === "month" ? (
|
|
1844
1807
|
// Month view: single header + single month grid (consistent with single-month path)
|
|
1845
|
-
/* @__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(
|
|
1846
1809
|
Tooltip_default,
|
|
1847
1810
|
{
|
|
1848
1811
|
title: monthViewHintMessage,
|
|
@@ -1854,7 +1817,7 @@ var Calendar = (0, import_react16.forwardRef)((inProps, ref) => {
|
|
|
1854
1817
|
disableTouchListener: true,
|
|
1855
1818
|
variant: "solid"
|
|
1856
1819
|
},
|
|
1857
|
-
/* @__PURE__ */
|
|
1820
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
|
1858
1821
|
CalendarSwitchViewButton,
|
|
1859
1822
|
{
|
|
1860
1823
|
ownerState,
|
|
@@ -1865,8 +1828,8 @@ var Calendar = (0, import_react16.forwardRef)((inProps, ref) => {
|
|
|
1865
1828
|
},
|
|
1866
1829
|
calendarTitle
|
|
1867
1830
|
)
|
|
1868
|
-
), /* @__PURE__ */
|
|
1869
|
-
) : /* @__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(
|
|
1870
1833
|
CalendarPanel,
|
|
1871
1834
|
{
|
|
1872
1835
|
key: panelOwnerState.viewMonth.toISOString(),
|
|
@@ -1879,7 +1842,7 @@ var Calendar = (0, import_react16.forwardRef)((inProps, ref) => {
|
|
|
1879
1842
|
isMonthViewAssistHintOpen,
|
|
1880
1843
|
monthViewHintMessage
|
|
1881
1844
|
}
|
|
1882
|
-
))), /* @__PURE__ */
|
|
1845
|
+
))), /* @__PURE__ */ import_react15.default.createElement(
|
|
1883
1846
|
MultiMonthPickerDays,
|
|
1884
1847
|
{
|
|
1885
1848
|
panels,
|
|
@@ -1888,7 +1851,7 @@ var Calendar = (0, import_react16.forwardRef)((inProps, ref) => {
|
|
|
1888
1851
|
}
|
|
1889
1852
|
)));
|
|
1890
1853
|
}
|
|
1891
|
-
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(
|
|
1892
1855
|
Tooltip_default,
|
|
1893
1856
|
{
|
|
1894
1857
|
title: monthViewHintMessage,
|
|
@@ -1900,7 +1863,7 @@ var Calendar = (0, import_react16.forwardRef)((inProps, ref) => {
|
|
|
1900
1863
|
disableTouchListener: true,
|
|
1901
1864
|
variant: "solid"
|
|
1902
1865
|
},
|
|
1903
|
-
/* @__PURE__ */
|
|
1866
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
|
1904
1867
|
CalendarSwitchViewButton,
|
|
1905
1868
|
{
|
|
1906
1869
|
ownerState,
|
|
@@ -1911,7 +1874,7 @@ var Calendar = (0, import_react16.forwardRef)((inProps, ref) => {
|
|
|
1911
1874
|
},
|
|
1912
1875
|
calendarTitle
|
|
1913
1876
|
)
|
|
1914
|
-
), /* @__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 }));
|
|
1915
1878
|
});
|
|
1916
1879
|
Calendar.displayName = "Calendar";
|
|
1917
1880
|
|
|
@@ -1938,12 +1901,12 @@ var CardOverflow = MotionCardOverflow;
|
|
|
1938
1901
|
CardOverflow.displayName = "CardOverflow";
|
|
1939
1902
|
|
|
1940
1903
|
// src/components/Checkbox/Checkbox.tsx
|
|
1941
|
-
var
|
|
1904
|
+
var import_react16 = __toESM(require("react"));
|
|
1942
1905
|
var import_joy22 = require("@mui/joy");
|
|
1943
1906
|
var import_framer_motion15 = require("framer-motion");
|
|
1944
1907
|
var MotionCheckbox = (0, import_framer_motion15.motion)(import_joy22.Checkbox);
|
|
1945
1908
|
var Checkbox = (props) => {
|
|
1946
|
-
return /* @__PURE__ */
|
|
1909
|
+
return /* @__PURE__ */ import_react16.default.createElement(MotionCheckbox, { ...props });
|
|
1947
1910
|
};
|
|
1948
1911
|
Checkbox.displayName = "Checkbox";
|
|
1949
1912
|
|
|
@@ -1952,7 +1915,7 @@ var Checkbox_default = Checkbox;
|
|
|
1952
1915
|
|
|
1953
1916
|
// src/components/Container/Container.tsx
|
|
1954
1917
|
var import_joy23 = require("@mui/joy");
|
|
1955
|
-
var
|
|
1918
|
+
var import_react17 = __toESM(require("react"));
|
|
1956
1919
|
var ContainerRoot = (0, import_joy23.styled)("div", {
|
|
1957
1920
|
name: "Container",
|
|
1958
1921
|
slot: "root",
|
|
@@ -1978,24 +1941,24 @@ var ContainerRoot = (0, import_joy23.styled)("div", {
|
|
|
1978
1941
|
paddingRight: theme.breakpoints.values[overrideBreakpoint] >= theme.breakpoints.values.lg ? theme.spacing(8) : theme.spacing(4)
|
|
1979
1942
|
} : null
|
|
1980
1943
|
]);
|
|
1981
|
-
var Container = (0,
|
|
1982
|
-
return /* @__PURE__ */
|
|
1944
|
+
var Container = (0, import_react17.forwardRef)(function Container2(props, ref) {
|
|
1945
|
+
return /* @__PURE__ */ import_react17.default.createElement(ContainerRoot, { ref, ...props });
|
|
1983
1946
|
});
|
|
1984
1947
|
Container.displayName = "Container";
|
|
1985
1948
|
|
|
1986
1949
|
// src/components/CurrencyInput/CurrencyInput.tsx
|
|
1987
|
-
var
|
|
1950
|
+
var import_react19 = __toESM(require("react"));
|
|
1988
1951
|
var import_react_number_format = require("react-number-format");
|
|
1989
1952
|
|
|
1990
1953
|
// src/components/Input/Input.tsx
|
|
1991
|
-
var
|
|
1954
|
+
var import_react18 = __toESM(require("react"));
|
|
1992
1955
|
var import_joy24 = require("@mui/joy");
|
|
1993
1956
|
var import_framer_motion16 = require("framer-motion");
|
|
1994
1957
|
var import_Close2 = __toESM(require("@mui/icons-material/Close"));
|
|
1995
1958
|
var import_Visibility = __toESM(require("@mui/icons-material/Visibility"));
|
|
1996
1959
|
var import_VisibilityOff = __toESM(require("@mui/icons-material/VisibilityOff"));
|
|
1997
1960
|
var MotionInput = (0, import_framer_motion16.motion)(import_joy24.Input);
|
|
1998
|
-
var Input =
|
|
1961
|
+
var Input = import_react18.default.forwardRef((props, ref) => {
|
|
1999
1962
|
const {
|
|
2000
1963
|
label,
|
|
2001
1964
|
helperText,
|
|
@@ -2022,11 +1985,11 @@ var Input = import_react19.default.forwardRef((props, ref) => {
|
|
|
2022
1985
|
if (type === "password" && innerProps.endDecorator) {
|
|
2023
1986
|
console.warn('Input: endDecorator is not supported when type="password"');
|
|
2024
1987
|
}
|
|
2025
|
-
const [passwordVisible, setPasswordVisible] = (0,
|
|
1988
|
+
const [passwordVisible, setPasswordVisible] = (0, import_react18.useState)(false);
|
|
2026
1989
|
const [value, setValue] = useControlledState(
|
|
2027
1990
|
valueProp,
|
|
2028
1991
|
defaultValueProp ?? null,
|
|
2029
|
-
(0,
|
|
1992
|
+
(0, import_react18.useCallback)(
|
|
2030
1993
|
(value2) => {
|
|
2031
1994
|
onChange?.({
|
|
2032
1995
|
/**
|
|
@@ -2053,7 +2016,7 @@ var Input = import_react19.default.forwardRef((props, ref) => {
|
|
|
2053
2016
|
const actualType = type === "password" && passwordVisible ? "text" : type;
|
|
2054
2017
|
const isPasswordType = type === "password";
|
|
2055
2018
|
const showPasswordToggle = isPasswordType && !disableTogglePasswordButton;
|
|
2056
|
-
const input = /* @__PURE__ */
|
|
2019
|
+
const input = /* @__PURE__ */ import_react18.default.createElement(
|
|
2057
2020
|
MotionInput,
|
|
2058
2021
|
{
|
|
2059
2022
|
value: displayValue ?? "",
|
|
@@ -2068,7 +2031,7 @@ var Input = import_react19.default.forwardRef((props, ref) => {
|
|
|
2068
2031
|
...innerProps.slotProps
|
|
2069
2032
|
},
|
|
2070
2033
|
...innerProps,
|
|
2071
|
-
endDecorator: isPasswordType ? showPasswordToggle ? /* @__PURE__ */
|
|
2034
|
+
endDecorator: isPasswordType ? showPasswordToggle ? /* @__PURE__ */ import_react18.default.createElement(Stack_default, { gap: 1, direction: "row" }, /* @__PURE__ */ import_react18.default.createElement(
|
|
2072
2035
|
IconButton_default,
|
|
2073
2036
|
{
|
|
2074
2037
|
onMouseDown: (e) => e.preventDefault(),
|
|
@@ -2076,19 +2039,19 @@ var Input = import_react19.default.forwardRef((props, ref) => {
|
|
|
2076
2039
|
disabled,
|
|
2077
2040
|
"aria-label": passwordVisible ? "Hide password" : "Show password"
|
|
2078
2041
|
},
|
|
2079
|
-
passwordVisible ? /* @__PURE__ */
|
|
2080
|
-
)) : 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(
|
|
2081
2044
|
IconButton_default,
|
|
2082
2045
|
{
|
|
2083
2046
|
onMouseDown: (e) => e.preventDefault(),
|
|
2084
2047
|
onClick: handleClear,
|
|
2085
2048
|
"aria-label": "Clear"
|
|
2086
2049
|
},
|
|
2087
|
-
/* @__PURE__ */
|
|
2050
|
+
/* @__PURE__ */ import_react18.default.createElement(import_Close2.default, null)
|
|
2088
2051
|
)) : innerProps.endDecorator
|
|
2089
2052
|
}
|
|
2090
2053
|
);
|
|
2091
|
-
return /* @__PURE__ */
|
|
2054
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
|
2092
2055
|
FormControl_default,
|
|
2093
2056
|
{
|
|
2094
2057
|
required,
|
|
@@ -2099,9 +2062,9 @@ var Input = import_react19.default.forwardRef((props, ref) => {
|
|
|
2099
2062
|
sx,
|
|
2100
2063
|
className
|
|
2101
2064
|
},
|
|
2102
|
-
label && /* @__PURE__ */
|
|
2065
|
+
label && /* @__PURE__ */ import_react18.default.createElement(FormLabel_default, null, label),
|
|
2103
2066
|
input,
|
|
2104
|
-
helperText && /* @__PURE__ */
|
|
2067
|
+
helperText && /* @__PURE__ */ import_react18.default.createElement(FormHelperText_default, null, helperText)
|
|
2105
2068
|
);
|
|
2106
2069
|
});
|
|
2107
2070
|
Input.displayName = "Input";
|
|
@@ -2273,9 +2236,9 @@ var useCurrencySetting = (props) => {
|
|
|
2273
2236
|
};
|
|
2274
2237
|
|
|
2275
2238
|
// src/components/CurrencyInput/CurrencyInput.tsx
|
|
2276
|
-
var TextMaskAdapter =
|
|
2239
|
+
var TextMaskAdapter = import_react19.default.forwardRef(function TextMaskAdapter2(props, ref) {
|
|
2277
2240
|
const { onChange, ...innerProps } = props;
|
|
2278
|
-
return /* @__PURE__ */
|
|
2241
|
+
return /* @__PURE__ */ import_react19.default.createElement(
|
|
2279
2242
|
import_react_number_format.NumericFormat,
|
|
2280
2243
|
{
|
|
2281
2244
|
...innerProps,
|
|
@@ -2295,7 +2258,7 @@ var CurrencyInputRoot = (0, import_joy25.styled)(Input_default, {
|
|
|
2295
2258
|
slot: "root",
|
|
2296
2259
|
overridesResolver: (props, styles) => styles.root
|
|
2297
2260
|
})({});
|
|
2298
|
-
var CurrencyInput =
|
|
2261
|
+
var CurrencyInput = import_react19.default.forwardRef(function CurrencyInput2(inProps, ref) {
|
|
2299
2262
|
const props = (0, import_joy25.useThemeProps)({ props: inProps, name: "CurrencyInput" });
|
|
2300
2263
|
const {
|
|
2301
2264
|
currency = "USD",
|
|
@@ -2316,22 +2279,22 @@ var CurrencyInput = import_react20.default.forwardRef(function CurrencyInput2(in
|
|
|
2316
2279
|
const [_value, setValue] = useControlledState(
|
|
2317
2280
|
props.value,
|
|
2318
2281
|
props.defaultValue ?? null,
|
|
2319
|
-
(0,
|
|
2282
|
+
(0, import_react19.useCallback)((value2) => onChange?.({ target: { name, value: value2 } }), [onChange, name])
|
|
2320
2283
|
);
|
|
2321
|
-
const value = (0,
|
|
2284
|
+
const value = (0, import_react19.useMemo)(() => {
|
|
2322
2285
|
if (_value && useMinorUnit) {
|
|
2323
2286
|
return _value / Math.pow(10, decimalScale);
|
|
2324
2287
|
}
|
|
2325
2288
|
return _value;
|
|
2326
2289
|
}, [_value, useMinorUnit, decimalScale]);
|
|
2327
|
-
const max = (0,
|
|
2290
|
+
const max = (0, import_react19.useMemo)(() => {
|
|
2328
2291
|
if (props.max && useMinorUnit) {
|
|
2329
2292
|
return props.max / Math.pow(10, decimalScale);
|
|
2330
2293
|
}
|
|
2331
2294
|
return props.max;
|
|
2332
2295
|
}, [props.max, useMinorUnit, decimalScale]);
|
|
2333
|
-
const isOverLimit = (0,
|
|
2334
|
-
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)(
|
|
2335
2298
|
(event) => {
|
|
2336
2299
|
if (event.target.value === "") {
|
|
2337
2300
|
setValue(null);
|
|
@@ -2342,7 +2305,7 @@ var CurrencyInput = import_react20.default.forwardRef(function CurrencyInput2(in
|
|
|
2342
2305
|
},
|
|
2343
2306
|
[decimalSeparator, useMinorUnit, setValue]
|
|
2344
2307
|
);
|
|
2345
|
-
return /* @__PURE__ */
|
|
2308
|
+
return /* @__PURE__ */ import_react19.default.createElement(
|
|
2346
2309
|
CurrencyInputRoot,
|
|
2347
2310
|
{
|
|
2348
2311
|
...innerProps,
|
|
@@ -2379,7 +2342,7 @@ var CurrencyInput = import_react20.default.forwardRef(function CurrencyInput2(in
|
|
|
2379
2342
|
var CurrencyInput_default = CurrencyInput;
|
|
2380
2343
|
|
|
2381
2344
|
// src/components/DataTable/DataTable.tsx
|
|
2382
|
-
var
|
|
2345
|
+
var import_react29 = __toESM(require("react"));
|
|
2383
2346
|
var import_react_virtual2 = require("@tanstack/react-virtual");
|
|
2384
2347
|
|
|
2385
2348
|
// src/libs/text-measurer.ts
|
|
@@ -2607,12 +2570,9 @@ function computeAutoFitWidth(params) {
|
|
|
2607
2570
|
if (!isNaN(maxPx) && maxPx > 0) finalWidth = Math.min(finalWidth, maxPx);
|
|
2608
2571
|
return finalWidth;
|
|
2609
2572
|
}
|
|
2610
|
-
function getHeaderCellId(tableId, columnId) {
|
|
2611
|
-
return `${tableId}_header_${columnId}`.trim();
|
|
2612
|
-
}
|
|
2613
2573
|
|
|
2614
2574
|
// src/components/DataTable/styled.tsx
|
|
2615
|
-
var
|
|
2575
|
+
var import_react20 = __toESM(require("react"));
|
|
2616
2576
|
var import_joy26 = require("@mui/joy");
|
|
2617
2577
|
var import_framer_motion17 = require("framer-motion");
|
|
2618
2578
|
var import_ArrowUpwardRounded = __toESM(require("@mui/icons-material/ArrowUpwardRounded"));
|
|
@@ -2718,9 +2678,9 @@ var StyledTd = (0, import_joy26.styled)("td")(({ theme }) => ({
|
|
|
2718
2678
|
}
|
|
2719
2679
|
}));
|
|
2720
2680
|
var MotionSortIcon = (0, import_framer_motion17.motion)(import_ArrowUpwardRounded.default);
|
|
2721
|
-
var DefaultLoadingOverlay = () => /* @__PURE__ */
|
|
2722
|
-
var DefaultNoRowsOverlay = () => /* @__PURE__ */
|
|
2723
|
-
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(
|
|
2724
2684
|
Box_default,
|
|
2725
2685
|
{
|
|
2726
2686
|
sx: {
|
|
@@ -2797,12 +2757,12 @@ var Resizer = (ref, targetRef = ref, onResizeStateChange, onAutoFit) => /* @__PU
|
|
|
2797
2757
|
);
|
|
2798
2758
|
|
|
2799
2759
|
// src/components/DataTable/components.tsx
|
|
2800
|
-
var
|
|
2760
|
+
var import_react25 = __toESM(require("react"));
|
|
2801
2761
|
var import_joy33 = require("@mui/joy");
|
|
2802
2762
|
var import_framer_motion21 = require("framer-motion");
|
|
2803
2763
|
|
|
2804
2764
|
// src/components/DatePicker/DatePicker.tsx
|
|
2805
|
-
var
|
|
2765
|
+
var import_react21 = __toESM(require("react"));
|
|
2806
2766
|
var import_react_imask = require("react-imask");
|
|
2807
2767
|
var import_CalendarToday = __toESM(require("@mui/icons-material/CalendarToday"));
|
|
2808
2768
|
var import_joy29 = require("@mui/joy");
|
|
@@ -2955,9 +2915,9 @@ function parseDate(dateString, format) {
|
|
|
2955
2915
|
var formatToPattern = (format) => {
|
|
2956
2916
|
return format.replace(/YYYY/g, "Y").replace(/MM/g, "M").replace(/DD/g, "D").replace(/[^YMD\s]/g, (match) => `${match}\``);
|
|
2957
2917
|
};
|
|
2958
|
-
var TextMaskAdapter3 =
|
|
2918
|
+
var TextMaskAdapter3 = import_react21.default.forwardRef(function TextMaskAdapter4(props, ref) {
|
|
2959
2919
|
const { onChange, format, ...other } = props;
|
|
2960
|
-
return /* @__PURE__ */
|
|
2920
|
+
return /* @__PURE__ */ import_react21.default.createElement(
|
|
2961
2921
|
import_react_imask.IMaskInput,
|
|
2962
2922
|
{
|
|
2963
2923
|
...other,
|
|
@@ -2992,7 +2952,7 @@ var TextMaskAdapter3 = import_react22.default.forwardRef(function TextMaskAdapte
|
|
|
2992
2952
|
}
|
|
2993
2953
|
);
|
|
2994
2954
|
});
|
|
2995
|
-
var DatePicker = (0,
|
|
2955
|
+
var DatePicker = (0, import_react21.forwardRef)((inProps, ref) => {
|
|
2996
2956
|
const props = (0, import_joy29.useThemeProps)({ props: inProps, name: "DatePicker" });
|
|
2997
2957
|
const {
|
|
2998
2958
|
onChange,
|
|
@@ -3019,29 +2979,29 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3019
2979
|
presets,
|
|
3020
2980
|
...innerProps
|
|
3021
2981
|
} = props;
|
|
3022
|
-
const innerRef = (0,
|
|
3023
|
-
const buttonRef = (0,
|
|
2982
|
+
const innerRef = (0, import_react21.useRef)(null);
|
|
2983
|
+
const buttonRef = (0, import_react21.useRef)(null);
|
|
3024
2984
|
const [rawValue, setValue] = useControlledState(
|
|
3025
2985
|
props.value,
|
|
3026
2986
|
props.defaultValue ?? null,
|
|
3027
|
-
(0,
|
|
2987
|
+
(0, import_react21.useCallback)(
|
|
3028
2988
|
(value2) => onChange?.({ target: { name: props.name, value: value2 ?? "" } }),
|
|
3029
2989
|
[props.name, onChange]
|
|
3030
2990
|
)
|
|
3031
2991
|
);
|
|
3032
2992
|
const value = rawValue ?? "";
|
|
3033
2993
|
const isAlphabeticDisplay = hasAlphabeticMonth(displayFormat);
|
|
3034
|
-
const [displayValue, setDisplayValue] = (0,
|
|
2994
|
+
const [displayValue, setDisplayValue] = (0, import_react21.useState)(
|
|
3035
2995
|
() => value ? formatValueString(parseDate(value, format), displayFormat, locale) : ""
|
|
3036
2996
|
);
|
|
3037
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
2997
|
+
const [anchorEl, setAnchorEl] = (0, import_react21.useState)(null);
|
|
3038
2998
|
const open = Boolean(anchorEl);
|
|
3039
|
-
(0,
|
|
2999
|
+
(0, import_react21.useEffect)(() => {
|
|
3040
3000
|
if (!anchorEl) {
|
|
3041
3001
|
innerRef.current?.blur();
|
|
3042
3002
|
}
|
|
3043
3003
|
}, [anchorEl, innerRef]);
|
|
3044
|
-
(0,
|
|
3004
|
+
(0, import_react21.useEffect)(() => {
|
|
3045
3005
|
if (value === "") {
|
|
3046
3006
|
setDisplayValue("");
|
|
3047
3007
|
return;
|
|
@@ -3051,8 +3011,8 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3051
3011
|
setDisplayValue(formattedValue);
|
|
3052
3012
|
}
|
|
3053
3013
|
}, [displayFormat, displayValue, format, locale, value]);
|
|
3054
|
-
(0,
|
|
3055
|
-
const handleChange = (0,
|
|
3014
|
+
(0, import_react21.useImperativeHandle)(ref, () => innerRef.current, [innerRef]);
|
|
3015
|
+
const handleChange = (0, import_react21.useCallback)(
|
|
3056
3016
|
(event) => {
|
|
3057
3017
|
const value2 = event.target.value;
|
|
3058
3018
|
setDisplayValue(value2 ? formatValueString(parseDate(value2, format), displayFormat, locale) : value2);
|
|
@@ -3060,7 +3020,7 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3060
3020
|
},
|
|
3061
3021
|
[displayFormat, format, locale, setValue]
|
|
3062
3022
|
);
|
|
3063
|
-
const handleDisplayInputChange = (0,
|
|
3023
|
+
const handleDisplayInputChange = (0, import_react21.useCallback)(
|
|
3064
3024
|
(event) => {
|
|
3065
3025
|
if (event.target.value === "") {
|
|
3066
3026
|
handleChange({
|
|
@@ -3085,7 +3045,7 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3085
3045
|
},
|
|
3086
3046
|
[displayFormat, format, handleChange, props.name]
|
|
3087
3047
|
);
|
|
3088
|
-
const handleCalendarToggle = (0,
|
|
3048
|
+
const handleCalendarToggle = (0, import_react21.useCallback)(
|
|
3089
3049
|
(event) => {
|
|
3090
3050
|
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
3091
3051
|
setTimeout(() => {
|
|
@@ -3094,7 +3054,7 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3094
3054
|
},
|
|
3095
3055
|
[anchorEl, setAnchorEl, innerRef]
|
|
3096
3056
|
);
|
|
3097
|
-
const handleInputMouseDown = (0,
|
|
3057
|
+
const handleInputMouseDown = (0, import_react21.useCallback)(
|
|
3098
3058
|
(event) => {
|
|
3099
3059
|
if (inputReadOnly || isAlphabeticDisplay) {
|
|
3100
3060
|
event.preventDefault();
|
|
@@ -3103,7 +3063,7 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3103
3063
|
},
|
|
3104
3064
|
[inputReadOnly, isAlphabeticDisplay, buttonRef]
|
|
3105
3065
|
);
|
|
3106
|
-
const handleInputClick = (0,
|
|
3066
|
+
const handleInputClick = (0, import_react21.useCallback)(
|
|
3107
3067
|
(event) => {
|
|
3108
3068
|
if (inputReadOnly && !readOnly) {
|
|
3109
3069
|
handleCalendarToggle(event);
|
|
@@ -3111,7 +3071,7 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3111
3071
|
},
|
|
3112
3072
|
[inputReadOnly, readOnly, handleCalendarToggle]
|
|
3113
3073
|
);
|
|
3114
|
-
const handlePresetClick = (0,
|
|
3074
|
+
const handlePresetClick = (0, import_react21.useCallback)(
|
|
3115
3075
|
(presetValue) => {
|
|
3116
3076
|
handleChange({
|
|
3117
3077
|
target: {
|
|
@@ -3123,7 +3083,7 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3123
3083
|
},
|
|
3124
3084
|
[handleChange, props.name]
|
|
3125
3085
|
);
|
|
3126
|
-
const isPresetDisabled = (0,
|
|
3086
|
+
const isPresetDisabled = (0, import_react21.useCallback)(
|
|
3127
3087
|
(presetValue) => {
|
|
3128
3088
|
try {
|
|
3129
3089
|
const date = parseDate(presetValue, format);
|
|
@@ -3140,7 +3100,7 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3140
3100
|
},
|
|
3141
3101
|
[format, minDate, maxDate, disableFuture, disablePast, shouldDisableDate]
|
|
3142
3102
|
);
|
|
3143
|
-
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(
|
|
3144
3104
|
Input_default,
|
|
3145
3105
|
{
|
|
3146
3106
|
...innerProps,
|
|
@@ -3167,7 +3127,7 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3167
3127
|
}
|
|
3168
3128
|
},
|
|
3169
3129
|
sx: { width: "100%" },
|
|
3170
|
-
endDecorator: /* @__PURE__ */
|
|
3130
|
+
endDecorator: /* @__PURE__ */ import_react21.default.createElement(
|
|
3171
3131
|
CalendarButton,
|
|
3172
3132
|
{
|
|
3173
3133
|
ref: buttonRef,
|
|
@@ -3179,13 +3139,13 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3179
3139
|
"aria-expanded": open,
|
|
3180
3140
|
disabled
|
|
3181
3141
|
},
|
|
3182
|
-
/* @__PURE__ */
|
|
3142
|
+
/* @__PURE__ */ import_react21.default.createElement(import_CalendarToday.default, null)
|
|
3183
3143
|
),
|
|
3184
3144
|
label,
|
|
3185
3145
|
helperText,
|
|
3186
3146
|
readOnly: readOnly || inputReadOnly || isAlphabeticDisplay
|
|
3187
3147
|
}
|
|
3188
|
-
), open && /* @__PURE__ */
|
|
3148
|
+
), open && /* @__PURE__ */ import_react21.default.createElement(import_base3.ClickAwayListener, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ import_react21.default.createElement(
|
|
3189
3149
|
StyledPopper,
|
|
3190
3150
|
{
|
|
3191
3151
|
id: "date-picker-popper",
|
|
@@ -3204,7 +3164,7 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3204
3164
|
"aria-label": "Calendar Tooltip",
|
|
3205
3165
|
"aria-expanded": open
|
|
3206
3166
|
},
|
|
3207
|
-
/* @__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(
|
|
3208
3168
|
Calendar_default,
|
|
3209
3169
|
{
|
|
3210
3170
|
value: value && !Number.isNaN(parseDate(value, format).getTime()) ? [parseDate(value, format), void 0] : void 0,
|
|
@@ -3224,14 +3184,14 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3224
3184
|
shouldDisableDate: shouldDisableDate ? (date) => shouldDisableDate(formatValueString(date, format)) : void 0,
|
|
3225
3185
|
locale
|
|
3226
3186
|
}
|
|
3227
|
-
), !hideClearButton && /* @__PURE__ */
|
|
3187
|
+
), !hideClearButton && /* @__PURE__ */ import_react21.default.createElement(
|
|
3228
3188
|
DialogActions_default,
|
|
3229
3189
|
{
|
|
3230
3190
|
sx: {
|
|
3231
3191
|
p: 1
|
|
3232
3192
|
}
|
|
3233
3193
|
},
|
|
3234
|
-
/* @__PURE__ */
|
|
3194
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
|
3235
3195
|
Button_default,
|
|
3236
3196
|
{
|
|
3237
3197
|
size,
|
|
@@ -3249,9 +3209,9 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3249
3209
|
},
|
|
3250
3210
|
"Clear"
|
|
3251
3211
|
)
|
|
3252
|
-
)), presets && presets.length > 0 && /* @__PURE__ */
|
|
3212
|
+
)), presets && presets.length > 0 && /* @__PURE__ */ import_react21.default.createElement(PresetPanel, null, presets.map((preset) => {
|
|
3253
3213
|
const disabled2 = isPresetDisabled(preset.value);
|
|
3254
|
-
return /* @__PURE__ */
|
|
3214
|
+
return /* @__PURE__ */ import_react21.default.createElement(
|
|
3255
3215
|
PresetItem,
|
|
3256
3216
|
{
|
|
3257
3217
|
key: preset.label,
|
|
@@ -3272,11 +3232,11 @@ var DatePicker = (0, import_react22.forwardRef)((inProps, ref) => {
|
|
|
3272
3232
|
var DatePicker_default = DatePicker;
|
|
3273
3233
|
|
|
3274
3234
|
// src/components/Textarea/Textarea.tsx
|
|
3275
|
-
var
|
|
3235
|
+
var import_react22 = __toESM(require("react"));
|
|
3276
3236
|
var import_joy30 = require("@mui/joy");
|
|
3277
3237
|
var import_framer_motion19 = require("framer-motion");
|
|
3278
3238
|
var MotionTextarea = (0, import_framer_motion19.motion)(import_joy30.Textarea);
|
|
3279
|
-
var
|
|
3239
|
+
var Textarea = (props) => {
|
|
3280
3240
|
const {
|
|
3281
3241
|
label,
|
|
3282
3242
|
error,
|
|
@@ -3292,7 +3252,7 @@ var TextareaBase = (props) => {
|
|
|
3292
3252
|
className,
|
|
3293
3253
|
...innerProps
|
|
3294
3254
|
} = props;
|
|
3295
|
-
const textarea = /* @__PURE__ */
|
|
3255
|
+
const textarea = /* @__PURE__ */ import_react22.default.createElement(
|
|
3296
3256
|
MotionTextarea,
|
|
3297
3257
|
{
|
|
3298
3258
|
required,
|
|
@@ -3304,7 +3264,7 @@ var TextareaBase = (props) => {
|
|
|
3304
3264
|
...innerProps
|
|
3305
3265
|
}
|
|
3306
3266
|
);
|
|
3307
|
-
return /* @__PURE__ */
|
|
3267
|
+
return /* @__PURE__ */ import_react22.default.createElement(
|
|
3308
3268
|
FormControl_default,
|
|
3309
3269
|
{
|
|
3310
3270
|
required,
|
|
@@ -3315,22 +3275,18 @@ var TextareaBase = (props) => {
|
|
|
3315
3275
|
sx,
|
|
3316
3276
|
className
|
|
3317
3277
|
},
|
|
3318
|
-
label && /* @__PURE__ */
|
|
3278
|
+
label && /* @__PURE__ */ import_react22.default.createElement(FormLabel_default, null, label),
|
|
3319
3279
|
textarea,
|
|
3320
|
-
helperText && /* @__PURE__ */
|
|
3280
|
+
helperText && /* @__PURE__ */ import_react22.default.createElement(FormHelperText_default, null, helperText)
|
|
3321
3281
|
);
|
|
3322
3282
|
};
|
|
3323
|
-
var Textarea = import_react23.default.forwardRef((props, ref) => {
|
|
3324
|
-
const textareaSlotProps = useSlotRef(props.slotProps?.textarea, ref);
|
|
3325
|
-
return /* @__PURE__ */ import_react23.default.createElement(TextareaBase, { ...props, slotProps: { ...props.slotProps, textarea: textareaSlotProps } });
|
|
3326
|
-
});
|
|
3327
3283
|
Textarea.displayName = "Textarea";
|
|
3328
3284
|
|
|
3329
3285
|
// src/components/Textarea/index.ts
|
|
3330
3286
|
var Textarea_default = Textarea;
|
|
3331
3287
|
|
|
3332
3288
|
// src/components/Select/Select.tsx
|
|
3333
|
-
var
|
|
3289
|
+
var import_react23 = __toESM(require("react"));
|
|
3334
3290
|
var import_joy31 = require("@mui/joy");
|
|
3335
3291
|
var import_framer_motion20 = require("framer-motion");
|
|
3336
3292
|
var MotionOption = (0, import_framer_motion20.motion)(import_joy31.Option);
|
|
@@ -3341,7 +3297,7 @@ var secondaryTextLevelMap2 = {
|
|
|
3341
3297
|
lg: "body-md"
|
|
3342
3298
|
};
|
|
3343
3299
|
Option.displayName = "Option";
|
|
3344
|
-
function
|
|
3300
|
+
function Select(props) {
|
|
3345
3301
|
const {
|
|
3346
3302
|
label,
|
|
3347
3303
|
helperText,
|
|
@@ -3367,7 +3323,7 @@ function SelectInner(props, ref) {
|
|
|
3367
3323
|
formHelperText: formHelperTextProps,
|
|
3368
3324
|
...joySlotProps
|
|
3369
3325
|
} = slotProps ?? {};
|
|
3370
|
-
const options = (0,
|
|
3326
|
+
const options = (0, import_react23.useMemo)(
|
|
3371
3327
|
() => props.options.map((option) => {
|
|
3372
3328
|
if (option.hasOwnProperty("value") && option.hasOwnProperty("label")) {
|
|
3373
3329
|
return option;
|
|
@@ -3392,15 +3348,14 @@ function SelectInner(props, ref) {
|
|
|
3392
3348
|
};
|
|
3393
3349
|
onChange?.(newEvent, newValue);
|
|
3394
3350
|
};
|
|
3395
|
-
const optionMap = (0,
|
|
3351
|
+
const optionMap = (0, import_react23.useMemo)(() => {
|
|
3396
3352
|
const map = /* @__PURE__ */ new Map();
|
|
3397
3353
|
options.forEach((option) => {
|
|
3398
3354
|
map.set(option.value, option);
|
|
3399
3355
|
});
|
|
3400
3356
|
return map;
|
|
3401
3357
|
}, [options]);
|
|
3402
|
-
const
|
|
3403
|
-
const select = /* @__PURE__ */ import_react24.default.createElement(
|
|
3358
|
+
const select = /* @__PURE__ */ import_react23.default.createElement(
|
|
3404
3359
|
import_joy31.Select,
|
|
3405
3360
|
{
|
|
3406
3361
|
...innerProps,
|
|
@@ -3408,7 +3363,7 @@ function SelectInner(props, ref) {
|
|
|
3408
3363
|
disabled,
|
|
3409
3364
|
size,
|
|
3410
3365
|
color: error ? "danger" : color,
|
|
3411
|
-
slotProps:
|
|
3366
|
+
slotProps: joySlotProps,
|
|
3412
3367
|
onChange: handleChange,
|
|
3413
3368
|
renderValue: (selected) => {
|
|
3414
3369
|
if (!selected) return null;
|
|
@@ -3418,9 +3373,9 @@ function SelectInner(props, ref) {
|
|
|
3418
3373
|
return optionMap.get(selected.value)?.label;
|
|
3419
3374
|
}
|
|
3420
3375
|
},
|
|
3421
|
-
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))
|
|
3422
3377
|
);
|
|
3423
|
-
return /* @__PURE__ */
|
|
3378
|
+
return /* @__PURE__ */ import_react23.default.createElement(
|
|
3424
3379
|
FormControl_default,
|
|
3425
3380
|
{
|
|
3426
3381
|
required,
|
|
@@ -3433,12 +3388,11 @@ function SelectInner(props, ref) {
|
|
|
3433
3388
|
className,
|
|
3434
3389
|
...formControlProps
|
|
3435
3390
|
},
|
|
3436
|
-
label && /* @__PURE__ */
|
|
3391
|
+
label && /* @__PURE__ */ import_react23.default.createElement(FormLabel_default, { ...formLabelProps }, label),
|
|
3437
3392
|
select,
|
|
3438
|
-
helperText && /* @__PURE__ */
|
|
3393
|
+
helperText && /* @__PURE__ */ import_react23.default.createElement(FormHelperText_default, { ...formHelperTextProps }, helperText)
|
|
3439
3394
|
);
|
|
3440
3395
|
}
|
|
3441
|
-
var Select = import_react24.default.forwardRef(SelectInner);
|
|
3442
3396
|
Select.displayName = "Select";
|
|
3443
3397
|
|
|
3444
3398
|
// src/components/Select/index.ts
|
|
@@ -3448,7 +3402,7 @@ var Select_default = Select;
|
|
|
3448
3402
|
var import_joy34 = require("@mui/joy");
|
|
3449
3403
|
|
|
3450
3404
|
// src/components/InfoSign/InfoSign.tsx
|
|
3451
|
-
var
|
|
3405
|
+
var import_react24 = __toESM(require("react"));
|
|
3452
3406
|
var import_joy32 = require("@mui/joy");
|
|
3453
3407
|
var import_Info = __toESM(require("@mui/icons-material/Info"));
|
|
3454
3408
|
var InfoIcon = (0, import_joy32.styled)(import_Info.default, {
|
|
@@ -3461,7 +3415,7 @@ var InfoIcon = (0, import_joy32.styled)(import_Info.default, {
|
|
|
3461
3415
|
}));
|
|
3462
3416
|
function InfoSign(props) {
|
|
3463
3417
|
const { message, placement } = props;
|
|
3464
|
-
return /* @__PURE__ */
|
|
3418
|
+
return /* @__PURE__ */ import_react24.default.createElement(
|
|
3465
3419
|
Tooltip_default,
|
|
3466
3420
|
{
|
|
3467
3421
|
arrow: true,
|
|
@@ -3471,9 +3425,9 @@ function InfoSign(props) {
|
|
|
3471
3425
|
maxWidth: "320px"
|
|
3472
3426
|
}
|
|
3473
3427
|
},
|
|
3474
|
-
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))
|
|
3475
3429
|
},
|
|
3476
|
-
/* @__PURE__ */
|
|
3430
|
+
/* @__PURE__ */ import_react24.default.createElement(InfoIcon, null)
|
|
3477
3431
|
);
|
|
3478
3432
|
}
|
|
3479
3433
|
|
|
@@ -3486,9 +3440,9 @@ var TextEllipsis = ({
|
|
|
3486
3440
|
lineClamp,
|
|
3487
3441
|
...rest
|
|
3488
3442
|
}) => {
|
|
3489
|
-
const textRef = (0,
|
|
3490
|
-
const [showTooltip, setShowTooltip] = (0,
|
|
3491
|
-
(0,
|
|
3443
|
+
const textRef = (0, import_react25.useRef)(null);
|
|
3444
|
+
const [showTooltip, setShowTooltip] = (0, import_react25.useState)(false);
|
|
3445
|
+
(0, import_react25.useLayoutEffect)(() => {
|
|
3492
3446
|
const element = textRef.current;
|
|
3493
3447
|
if (!element) return;
|
|
3494
3448
|
const checkTruncation = () => {
|
|
@@ -3500,21 +3454,21 @@ var TextEllipsis = ({
|
|
|
3500
3454
|
ro.observe(element);
|
|
3501
3455
|
return () => ro.disconnect();
|
|
3502
3456
|
}, [children, lineClamp]);
|
|
3503
|
-
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));
|
|
3504
3458
|
};
|
|
3505
3459
|
var CellTextEllipsis = ({ children }) => {
|
|
3506
|
-
const textRef = (0,
|
|
3507
|
-
const [showTooltip, setShowTooltip] = (0,
|
|
3508
|
-
(0,
|
|
3460
|
+
const textRef = (0, import_react25.useRef)(null);
|
|
3461
|
+
const [showTooltip, setShowTooltip] = (0, import_react25.useState)(false);
|
|
3462
|
+
(0, import_react25.useLayoutEffect)(() => {
|
|
3509
3463
|
const element = textRef.current;
|
|
3510
3464
|
if (element) {
|
|
3511
3465
|
const isTextTruncated = element.scrollWidth > element.clientWidth;
|
|
3512
3466
|
setShowTooltip(isTextTruncated);
|
|
3513
3467
|
}
|
|
3514
3468
|
}, [children]);
|
|
3515
|
-
const content = /* @__PURE__ */
|
|
3469
|
+
const content = /* @__PURE__ */ import_react25.default.createElement(EllipsisDiv, { ref: textRef }, children);
|
|
3516
3470
|
if (showTooltip) {
|
|
3517
|
-
return /* @__PURE__ */
|
|
3471
|
+
return /* @__PURE__ */ import_react25.default.createElement(
|
|
3518
3472
|
Tooltip_default,
|
|
3519
3473
|
{
|
|
3520
3474
|
title: children,
|
|
@@ -3553,32 +3507,34 @@ var HeadCell = (props) => {
|
|
|
3553
3507
|
tableColRef,
|
|
3554
3508
|
headerClassName,
|
|
3555
3509
|
headerLineClamp,
|
|
3556
|
-
onAutoFit
|
|
3557
|
-
columnId
|
|
3510
|
+
onAutoFit
|
|
3558
3511
|
} = props;
|
|
3559
3512
|
const theme = (0, import_joy33.useTheme)();
|
|
3560
3513
|
const ref = headerRef;
|
|
3561
3514
|
const colRef = tableColRef;
|
|
3562
|
-
const localRef = (0,
|
|
3563
|
-
(0,
|
|
3515
|
+
const localRef = (0, import_react25.useRef)(null);
|
|
3516
|
+
(0, import_react25.useLayoutEffect)(() => {
|
|
3564
3517
|
ref.current = localRef.current;
|
|
3565
3518
|
}, [ref]);
|
|
3566
|
-
const [isHovered, setIsHovered] = (0,
|
|
3519
|
+
const [isHovered, setIsHovered] = (0, import_react25.useState)(false);
|
|
3567
3520
|
const sortable = type === "actions" ? false : _sortable;
|
|
3568
|
-
const headId = (0,
|
|
3569
|
-
|
|
3570
|
-
|
|
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)(
|
|
3571
3527
|
() => resizable ?? true ? Resizer(
|
|
3572
3528
|
ref,
|
|
3573
3529
|
colRef,
|
|
3574
3530
|
(isResizing) => {
|
|
3575
3531
|
isResizingRef.current = isResizing;
|
|
3576
3532
|
},
|
|
3577
|
-
onAutoFit ? () => onAutoFit(
|
|
3533
|
+
onAutoFit ? () => onAutoFit(field) : void 0
|
|
3578
3534
|
) : null,
|
|
3579
|
-
[resizable, ref, colRef, onAutoFit,
|
|
3535
|
+
[resizable, ref, colRef, onAutoFit, field]
|
|
3580
3536
|
);
|
|
3581
|
-
const style = (0,
|
|
3537
|
+
const style = (0, import_react25.useMemo)(
|
|
3582
3538
|
() => ({
|
|
3583
3539
|
width,
|
|
3584
3540
|
minWidth: minWidth ?? "50px",
|
|
@@ -3596,10 +3552,10 @@ var HeadCell = (props) => {
|
|
|
3596
3552
|
);
|
|
3597
3553
|
const textAlign = getTextAlign(props);
|
|
3598
3554
|
const initialSort = sortOrder[0];
|
|
3599
|
-
const sortIcon = (0,
|
|
3555
|
+
const sortIcon = (0, import_react25.useMemo)(() => {
|
|
3600
3556
|
const isSorted = !!sort;
|
|
3601
3557
|
const isVisible = sortable && (isSorted || isHovered);
|
|
3602
|
-
return /* @__PURE__ */
|
|
3558
|
+
return /* @__PURE__ */ import_react25.default.createElement(import_framer_motion21.AnimatePresence, { mode: "wait" }, isVisible && /* @__PURE__ */ import_react25.default.createElement(
|
|
3603
3559
|
MotionSortIcon,
|
|
3604
3560
|
{
|
|
3605
3561
|
key: "sort-icon",
|
|
@@ -3627,21 +3583,21 @@ var HeadCell = (props) => {
|
|
|
3627
3583
|
}
|
|
3628
3584
|
));
|
|
3629
3585
|
}, [headId, initialSort, sort, sortable, isHovered]);
|
|
3630
|
-
const infoSign = (0,
|
|
3631
|
-
() => description ? /* @__PURE__ */
|
|
3586
|
+
const infoSign = (0, import_react25.useMemo)(
|
|
3587
|
+
() => description ? /* @__PURE__ */ import_react25.default.createElement(InfoSign_default, { message: description, placement: "bottom" }) : null,
|
|
3632
3588
|
[description]
|
|
3633
3589
|
);
|
|
3634
|
-
const params = (0,
|
|
3590
|
+
const params = (0, import_react25.useMemo)(
|
|
3635
3591
|
() => ({
|
|
3636
3592
|
field
|
|
3637
3593
|
}),
|
|
3638
3594
|
[field]
|
|
3639
3595
|
);
|
|
3640
|
-
const computedHeaderClassName = (0,
|
|
3596
|
+
const computedHeaderClassName = (0, import_react25.useMemo)(
|
|
3641
3597
|
() => (typeof headerClassName === "function" ? headerClassName(params) : headerClassName) || void 0,
|
|
3642
3598
|
[headerClassName, params]
|
|
3643
3599
|
);
|
|
3644
|
-
return /* @__PURE__ */
|
|
3600
|
+
return /* @__PURE__ */ import_react25.default.createElement(
|
|
3645
3601
|
StyledTh,
|
|
3646
3602
|
{
|
|
3647
3603
|
id: headId,
|
|
@@ -3650,7 +3606,7 @@ var HeadCell = (props) => {
|
|
|
3650
3606
|
ref: localRef,
|
|
3651
3607
|
key: field,
|
|
3652
3608
|
style,
|
|
3653
|
-
onClick: (0,
|
|
3609
|
+
onClick: (0, import_react25.useCallback)(
|
|
3654
3610
|
(e) => {
|
|
3655
3611
|
if (isResizingRef.current) return;
|
|
3656
3612
|
if (!(e.target instanceof Element) || !e.currentTarget.contains(e.target)) return;
|
|
@@ -3664,7 +3620,7 @@ var HeadCell = (props) => {
|
|
|
3664
3620
|
initial: "initial",
|
|
3665
3621
|
className: computedHeaderClassName
|
|
3666
3622
|
},
|
|
3667
|
-
/* @__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),
|
|
3668
3624
|
resizer
|
|
3669
3625
|
);
|
|
3670
3626
|
};
|
|
@@ -3689,9 +3645,9 @@ var BodyCell = (props) => {
|
|
|
3689
3645
|
onCellEditStop
|
|
3690
3646
|
} = props;
|
|
3691
3647
|
const theme = (0, import_joy33.useTheme)();
|
|
3692
|
-
const [value, setValue] = (0,
|
|
3693
|
-
const cellRef = (0,
|
|
3694
|
-
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)(
|
|
3695
3651
|
() => ({
|
|
3696
3652
|
row,
|
|
3697
3653
|
value,
|
|
@@ -3700,20 +3656,20 @@ var BodyCell = (props) => {
|
|
|
3700
3656
|
}),
|
|
3701
3657
|
[row, rowId, value, field]
|
|
3702
3658
|
);
|
|
3703
|
-
const editMode = (0,
|
|
3659
|
+
const editMode = (0, import_react25.useMemo)(
|
|
3704
3660
|
() => !!(props.editMode && (typeof isCellEditable === "function" ? isCellEditable(params) : isCellEditable ?? true)),
|
|
3705
3661
|
[props.editMode, isCellEditable, params]
|
|
3706
3662
|
);
|
|
3707
3663
|
const propsComponentProps = "componentProps" in props ? props.componentProps : null;
|
|
3708
3664
|
const hasComponentProps = "componentProps" in props;
|
|
3709
|
-
const componentProps = (0,
|
|
3665
|
+
const componentProps = (0, import_react25.useMemo)(
|
|
3710
3666
|
() => ({
|
|
3711
3667
|
...hasComponentProps && (typeof propsComponentProps === "function" ? propsComponentProps(params) : propsComponentProps || {}),
|
|
3712
3668
|
size: "sm"
|
|
3713
3669
|
}),
|
|
3714
3670
|
[hasComponentProps, propsComponentProps, params]
|
|
3715
3671
|
);
|
|
3716
|
-
const editModeComponentProps = (0,
|
|
3672
|
+
const editModeComponentProps = (0, import_react25.useMemo)(
|
|
3717
3673
|
() => ({
|
|
3718
3674
|
...componentProps,
|
|
3719
3675
|
onChange: (e) => {
|
|
@@ -3775,25 +3731,25 @@ var BodyCell = (props) => {
|
|
|
3775
3731
|
}),
|
|
3776
3732
|
[params, row, field, value, componentProps, type, onCellEditStop, onCellEditStart]
|
|
3777
3733
|
);
|
|
3778
|
-
const MemoizedRenderEditCell = (0,
|
|
3779
|
-
const MemoizedRenderCell = (0,
|
|
3780
|
-
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)(() => {
|
|
3781
3737
|
if (MemoizedRenderEditCell) {
|
|
3782
|
-
return (0,
|
|
3738
|
+
return (0, import_react25.createElement)(MemoizedRenderEditCell, params);
|
|
3783
3739
|
}
|
|
3784
3740
|
return {
|
|
3785
|
-
date: /* @__PURE__ */
|
|
3786
|
-
currency: /* @__PURE__ */
|
|
3741
|
+
date: /* @__PURE__ */ import_react25.default.createElement(DatePicker_default, { value, ...editModeComponentProps }),
|
|
3742
|
+
currency: /* @__PURE__ */ import_react25.default.createElement(
|
|
3787
3743
|
CurrencyInput_default,
|
|
3788
3744
|
{
|
|
3789
3745
|
value,
|
|
3790
3746
|
...editModeComponentProps
|
|
3791
3747
|
}
|
|
3792
3748
|
),
|
|
3793
|
-
number: /* @__PURE__ */
|
|
3794
|
-
text: /* @__PURE__ */
|
|
3795
|
-
longText: /* @__PURE__ */
|
|
3796
|
-
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(
|
|
3797
3753
|
Autocomplete_default,
|
|
3798
3754
|
{
|
|
3799
3755
|
value,
|
|
@@ -3801,7 +3757,7 @@ var BodyCell = (props) => {
|
|
|
3801
3757
|
...editModeComponentProps
|
|
3802
3758
|
}
|
|
3803
3759
|
),
|
|
3804
|
-
select: /* @__PURE__ */
|
|
3760
|
+
select: /* @__PURE__ */ import_react25.default.createElement(
|
|
3805
3761
|
Select_default,
|
|
3806
3762
|
{
|
|
3807
3763
|
value,
|
|
@@ -3812,13 +3768,13 @@ var BodyCell = (props) => {
|
|
|
3812
3768
|
}[type || "text"];
|
|
3813
3769
|
}, [value, editModeComponentProps, type, MemoizedRenderEditCell, params]);
|
|
3814
3770
|
const linkComponentFromProps = props.component;
|
|
3815
|
-
const ReadModeComponent = (0,
|
|
3771
|
+
const ReadModeComponent = (0, import_react25.useMemo)(() => {
|
|
3816
3772
|
if (MemoizedRenderCell) {
|
|
3817
|
-
return (0,
|
|
3773
|
+
return (0, import_react25.createElement)(MemoizedRenderCell, params);
|
|
3818
3774
|
}
|
|
3819
3775
|
const innerText = value;
|
|
3820
3776
|
const typedComponent = {
|
|
3821
|
-
link:
|
|
3777
|
+
link: import_react25.default.createElement(linkComponentFromProps || import_joy34.Link, {
|
|
3822
3778
|
children: innerText,
|
|
3823
3779
|
...componentProps
|
|
3824
3780
|
})
|
|
@@ -3826,27 +3782,27 @@ var BodyCell = (props) => {
|
|
|
3826
3782
|
return typedComponent || innerText;
|
|
3827
3783
|
}, [value, MemoizedRenderCell, params, type, componentProps, linkComponentFromProps]);
|
|
3828
3784
|
const getActions = props.getActions;
|
|
3829
|
-
const CellComponent = (0,
|
|
3785
|
+
const CellComponent = (0, import_react25.useMemo)(() => {
|
|
3830
3786
|
if (type === "actions") {
|
|
3831
|
-
return /* @__PURE__ */
|
|
3787
|
+
return /* @__PURE__ */ import_react25.default.createElement(Stack_default, { direction: "row", gap: 1, justifyContent: "center", alignItems: "center" }, getActions?.(params));
|
|
3832
3788
|
}
|
|
3833
3789
|
return editMode && EditModeComponent ? EditModeComponent : ReadModeComponent;
|
|
3834
3790
|
}, [type, getActions, params, editMode, EditModeComponent, ReadModeComponent]);
|
|
3835
|
-
const showTooltip = (0,
|
|
3791
|
+
const showTooltip = (0, import_react25.useMemo)(() => noWrap && type === "longText", [noWrap, type]);
|
|
3836
3792
|
const isBoundary = props.isLastStartPinnedColumn || props.isLastEndPinnedColumn;
|
|
3837
|
-
const computedCellClassName = (0,
|
|
3793
|
+
const computedCellClassName = (0, import_react25.useMemo)(
|
|
3838
3794
|
() => (typeof cellClassName === "function" ? cellClassName(params) : cellClassName) || "",
|
|
3839
3795
|
[cellClassName, params]
|
|
3840
3796
|
);
|
|
3841
|
-
(0,
|
|
3797
|
+
(0, import_react25.useEffect)(() => {
|
|
3842
3798
|
setValue(row[field]);
|
|
3843
3799
|
}, [row, field]);
|
|
3844
|
-
return /* @__PURE__ */
|
|
3800
|
+
return /* @__PURE__ */ import_react25.default.createElement(
|
|
3845
3801
|
StyledTd,
|
|
3846
3802
|
{
|
|
3847
3803
|
ref: cellRef,
|
|
3848
3804
|
key: field,
|
|
3849
|
-
headers:
|
|
3805
|
+
headers: `${tableId}_header_${props.headerName ?? field}`,
|
|
3850
3806
|
sx: {
|
|
3851
3807
|
textAlign: getTextAlign({ type }),
|
|
3852
3808
|
verticalAlign: editMode ? "top" : "middle",
|
|
@@ -3858,16 +3814,16 @@ var BodyCell = (props) => {
|
|
|
3858
3814
|
},
|
|
3859
3815
|
className: [isLastStartPinnedColumn && "is-last-left", isLastEndPinnedColumn && "is-last-right", computedCellClassName].filter(Boolean).join(" ") || ""
|
|
3860
3816
|
},
|
|
3861
|
-
(0,
|
|
3862
|
-
() => showTooltip ? /* @__PURE__ */
|
|
3817
|
+
(0, import_react25.useMemo)(
|
|
3818
|
+
() => showTooltip ? /* @__PURE__ */ import_react25.default.createElement(CellTextEllipsis, null, CellComponent) : CellComponent,
|
|
3863
3819
|
[CellComponent, showTooltip]
|
|
3864
3820
|
)
|
|
3865
3821
|
);
|
|
3866
3822
|
};
|
|
3867
|
-
var BodyRow = (0,
|
|
3823
|
+
var BodyRow = (0, import_react25.memo)(
|
|
3868
3824
|
(props) => {
|
|
3869
3825
|
const { tableId, columns, rowId, editMode, noWrap, row } = props;
|
|
3870
|
-
return /* @__PURE__ */
|
|
3826
|
+
return /* @__PURE__ */ import_react25.default.createElement(import_react25.default.Fragment, null, columns.map((column, i) => /* @__PURE__ */ import_react25.default.createElement(
|
|
3871
3827
|
BodyCell,
|
|
3872
3828
|
{
|
|
3873
3829
|
key: `${rowId}_${column.field.toString()}_${i}`,
|
|
@@ -3900,7 +3856,7 @@ var StyledTableRow2 = (0, import_joy33.styled)("tr", {
|
|
|
3900
3856
|
}
|
|
3901
3857
|
}
|
|
3902
3858
|
}));
|
|
3903
|
-
var VirtualizedTableRow = (0,
|
|
3859
|
+
var VirtualizedTableRow = (0, import_react25.memo)(StyledTableRow2, (prevProps, nextProps) => {
|
|
3904
3860
|
return prevProps.striped === nextProps.striped && prevProps.style?.height === nextProps.style?.height && prevProps.style?.transform === nextProps.style?.transform && // @ts-ignore
|
|
3905
3861
|
prevProps["data-row-id"] === nextProps["data-row-id"] && // @ts-ignore
|
|
3906
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)
|
|
@@ -3911,46 +3867,36 @@ var VirtualizedTableRow = (0, import_react26.memo)(StyledTableRow2, (prevProps,
|
|
|
3911
3867
|
});
|
|
3912
3868
|
|
|
3913
3869
|
// src/components/DataTable/hooks.ts
|
|
3914
|
-
var
|
|
3915
|
-
function useColumnWidths(
|
|
3916
|
-
const [widths, setWidths] = (0,
|
|
3917
|
-
const roRef = (0,
|
|
3918
|
-
(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)(() => {
|
|
3919
3875
|
if (roRef.current) roRef.current.disconnect();
|
|
3920
3876
|
roRef.current = new ResizeObserver((entries) => {
|
|
3877
|
+
let changed = false;
|
|
3921
3878
|
setWidths((prev) => {
|
|
3922
|
-
let changed = false;
|
|
3923
3879
|
const next = { ...prev };
|
|
3924
3880
|
entries.forEach((entry) => {
|
|
3925
|
-
const
|
|
3881
|
+
const field = entry.target.dataset.field;
|
|
3926
3882
|
const w = Math.round(entry.target.getBoundingClientRect().width);
|
|
3927
|
-
if (
|
|
3928
|
-
|
|
3929
|
-
next[columnId] = w;
|
|
3883
|
+
if (next[field] !== w) {
|
|
3884
|
+
next[field] = w;
|
|
3930
3885
|
changed = true;
|
|
3931
3886
|
}
|
|
3932
3887
|
});
|
|
3933
3888
|
return changed ? next : prev;
|
|
3934
3889
|
});
|
|
3935
3890
|
});
|
|
3936
|
-
|
|
3937
|
-
Object.entries(columnsById).forEach(([columnId, def]) => {
|
|
3891
|
+
Object.entries(columnsByField).forEach(([field, def]) => {
|
|
3938
3892
|
const el = def.headerRef.current;
|
|
3939
3893
|
if (el) {
|
|
3940
|
-
el.dataset.
|
|
3941
|
-
el.dataset.field = String(def.field);
|
|
3942
|
-
const w = Math.round(el.getBoundingClientRect().width);
|
|
3943
|
-
if (w > 0) measured[columnId] = w;
|
|
3894
|
+
el.dataset.field = field;
|
|
3944
3895
|
roRef.current.observe(el);
|
|
3945
3896
|
}
|
|
3946
3897
|
});
|
|
3947
|
-
setWidths((prev) => {
|
|
3948
|
-
const keys = Object.keys(measured);
|
|
3949
|
-
const same = keys.length === Object.keys(prev).length && keys.every((key) => prev[key] === measured[key]);
|
|
3950
|
-
return same ? prev : measured;
|
|
3951
|
-
});
|
|
3952
3898
|
return () => roRef.current?.disconnect();
|
|
3953
|
-
}, [
|
|
3899
|
+
}, [columnsByField]);
|
|
3954
3900
|
return widths;
|
|
3955
3901
|
}
|
|
3956
3902
|
function useDataTableRenderer({
|
|
@@ -3982,40 +3928,33 @@ function useDataTableRenderer({
|
|
|
3982
3928
|
"You cannot use both `pinnedColumns` and `columnGroupingModel` at the same time. Please choose one of them."
|
|
3983
3929
|
);
|
|
3984
3930
|
}
|
|
3985
|
-
const onSelectionModelChangeRef = (0,
|
|
3931
|
+
const onSelectionModelChangeRef = (0, import_react26.useRef)(onSelectionModelChange);
|
|
3986
3932
|
onSelectionModelChangeRef.current = onSelectionModelChange;
|
|
3987
|
-
const [focusedRowId, setFocusedRowId] = (0,
|
|
3988
|
-
const [selectionAnchor, setSelectionAnchor] = (0,
|
|
3933
|
+
const [focusedRowId, setFocusedRowId] = (0, import_react26.useState)(null);
|
|
3934
|
+
const [selectionAnchor, setSelectionAnchor] = (0, import_react26.useState)(null);
|
|
3989
3935
|
const [sortModel, setSortModel] = useControlledState(
|
|
3990
3936
|
controlledSortModel,
|
|
3991
3937
|
initialState?.sorting?.sortModel ?? [],
|
|
3992
|
-
(0,
|
|
3938
|
+
(0, import_react26.useCallback)((sortModel2) => onSortModelChange?.(sortModel2), [onSortModelChange])
|
|
3993
3939
|
);
|
|
3994
3940
|
const [visibilityModel] = useControlledState(
|
|
3995
3941
|
columnVisibilityModel,
|
|
3996
3942
|
initialState?.columns?.columnVisibilityModel ?? {},
|
|
3997
|
-
(0,
|
|
3943
|
+
(0, import_react26.useCallback)(
|
|
3998
3944
|
(model) => onColumnVisibilityModelChange?.(model),
|
|
3999
3945
|
[onColumnVisibilityModelChange]
|
|
4000
3946
|
)
|
|
4001
3947
|
);
|
|
4002
|
-
const reorderedColumns = (0,
|
|
3948
|
+
const reorderedColumns = (0, import_react26.useMemo)(() => {
|
|
4003
3949
|
if (!columnGroupingModel) return columnsProp;
|
|
4004
3950
|
return reorderColumnsByGroupingModel(columnsProp, columnGroupingModel);
|
|
4005
3951
|
}, [columnsProp, columnGroupingModel]);
|
|
4006
|
-
const
|
|
4007
|
-
() => reorderedColumns.
|
|
4008
|
-
if (visibilityModel[col.field] !== false) acc.push(index);
|
|
4009
|
-
return acc;
|
|
4010
|
-
}, []),
|
|
3952
|
+
const visibleColumns = (0, import_react26.useMemo)(
|
|
3953
|
+
() => reorderedColumns.filter((col) => visibilityModel[col.field] !== false),
|
|
4011
3954
|
[reorderedColumns, visibilityModel]
|
|
4012
3955
|
);
|
|
4013
|
-
const
|
|
4014
|
-
|
|
4015
|
-
[visibleColumnIndexes, reorderedColumns]
|
|
4016
|
-
);
|
|
4017
|
-
const visibleFieldSet = (0, import_react27.useMemo)(() => new Set(visibleColumns.map((c) => c.field)), [visibleColumns]);
|
|
4018
|
-
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)(() => {
|
|
4019
3958
|
const DEFAULT_MIN = 50;
|
|
4020
3959
|
let total = checkboxSelection ? 40 : 0;
|
|
4021
3960
|
for (const col of visibleColumns) {
|
|
@@ -4023,7 +3962,7 @@ function useDataTableRenderer({
|
|
|
4023
3962
|
}
|
|
4024
3963
|
return total;
|
|
4025
3964
|
}, [visibleColumns, checkboxSelection]);
|
|
4026
|
-
const allColumnsByField = (0,
|
|
3965
|
+
const allColumnsByField = (0, import_react26.useMemo)(
|
|
4027
3966
|
() => reorderedColumns.reduce(
|
|
4028
3967
|
(acc, curr) => ({
|
|
4029
3968
|
...acc,
|
|
@@ -4033,39 +3972,21 @@ function useDataTableRenderer({
|
|
|
4033
3972
|
),
|
|
4034
3973
|
[reorderedColumns]
|
|
4035
3974
|
);
|
|
4036
|
-
const
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
}
|
|
4045
|
-
let n = 2;
|
|
4046
|
-
while (taken.has(`${field}__${n}`)) n += 1;
|
|
4047
|
-
taken.add(`${field}__${n}`);
|
|
4048
|
-
return `${field}__${n}`;
|
|
4049
|
-
});
|
|
4050
|
-
}, [reorderedColumns]);
|
|
4051
|
-
const columnIds = (0, import_react27.useMemo)(
|
|
4052
|
-
() => visibleColumnIndexes.map((index) => allColumnIds[index]),
|
|
4053
|
-
[visibleColumnIndexes, allColumnIds]
|
|
4054
|
-
);
|
|
4055
|
-
const visibleColumnsById = (0, import_react27.useMemo)(
|
|
4056
|
-
() => Object.fromEntries(
|
|
4057
|
-
visibleColumns.map((column, index) => [
|
|
4058
|
-
columnIds[index],
|
|
4059
|
-
{
|
|
4060
|
-
...column,
|
|
4061
|
-
headerRef: (0, import_react27.createRef)(),
|
|
4062
|
-
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)()
|
|
4063
3983
|
}
|
|
4064
|
-
|
|
3984
|
+
}),
|
|
3985
|
+
{}
|
|
4065
3986
|
),
|
|
4066
|
-
[visibleColumns
|
|
3987
|
+
[visibleColumns]
|
|
4067
3988
|
);
|
|
4068
|
-
const sortComparator = (0,
|
|
3989
|
+
const sortComparator = (0, import_react26.useCallback)(
|
|
4069
3990
|
(rowA, rowB) => {
|
|
4070
3991
|
for (const sort of sortModel) {
|
|
4071
3992
|
const { field, sort: direction } = sort;
|
|
@@ -4094,33 +4015,33 @@ function useDataTableRenderer({
|
|
|
4094
4015
|
},
|
|
4095
4016
|
[sortModel, allColumnsByField]
|
|
4096
4017
|
);
|
|
4097
|
-
const rows = (0,
|
|
4018
|
+
const rows = (0, import_react26.useMemo)(
|
|
4098
4019
|
() => sortModel.length ? [..._rows].sort(sortComparator) : _rows,
|
|
4099
4020
|
[_rows, sortModel, sortComparator]
|
|
4100
4021
|
);
|
|
4101
|
-
const sortOrder = (0,
|
|
4022
|
+
const sortOrder = (0, import_react26.useMemo)(
|
|
4102
4023
|
() => Array.from(new Set(_sortOrder || ["asc", "desc", null])),
|
|
4103
4024
|
[_sortOrder]
|
|
4104
4025
|
);
|
|
4105
|
-
const [page, setPage] = (0,
|
|
4026
|
+
const [page, setPage] = (0, import_react26.useState)(paginationModel?.page || 1);
|
|
4106
4027
|
const pageSize = paginationModel?.pageSize || 20;
|
|
4107
|
-
const getId = (0,
|
|
4028
|
+
const getId = (0, import_react26.useCallback)(
|
|
4108
4029
|
(row, index) => _getId?.(row) ?? row.id ?? `${(index || 0) + (page - 1) * pageSize}`,
|
|
4109
4030
|
[_getId, page, pageSize]
|
|
4110
4031
|
);
|
|
4111
|
-
const selectedModelSet = (0,
|
|
4112
|
-
const dataInPage = (0,
|
|
4032
|
+
const selectedModelSet = (0, import_react26.useMemo)(() => new Set(selectionModel || []), [selectionModel]);
|
|
4033
|
+
const dataInPage = (0, import_react26.useMemo)(
|
|
4113
4034
|
() => !pagination || paginationMode === "server" ? rows : rows.slice((page - 1) * pageSize, (page - 1) * pageSize + pageSize),
|
|
4114
4035
|
[rows, page, pageSize, paginationMode, pagination]
|
|
4115
4036
|
);
|
|
4116
|
-
const selectableDataInPage = (0,
|
|
4037
|
+
const selectableDataInPage = (0, import_react26.useMemo)(
|
|
4117
4038
|
() => dataInPage.filter((row, i) => {
|
|
4118
4039
|
if (!isRowSelectable) return true;
|
|
4119
4040
|
return isRowSelectable({ row, id: getId(row, i) });
|
|
4120
4041
|
}),
|
|
4121
4042
|
[dataInPage, isRowSelectable, getId]
|
|
4122
4043
|
);
|
|
4123
|
-
const handleRangeSelection = (0,
|
|
4044
|
+
const handleRangeSelection = (0, import_react26.useCallback)(
|
|
4124
4045
|
(anchor, targetIndex) => {
|
|
4125
4046
|
const startIndex = Math.min(anchor.rowIndex, targetIndex);
|
|
4126
4047
|
const endIndex = Math.max(anchor.rowIndex, targetIndex);
|
|
@@ -4143,60 +4064,51 @@ function useDataTableRenderer({
|
|
|
4143
4064
|
},
|
|
4144
4065
|
[dataInPage, getId, isRowSelectable, selectionModel, onSelectionModelChange]
|
|
4145
4066
|
);
|
|
4146
|
-
const isAllSelected = (0,
|
|
4067
|
+
const isAllSelected = (0, import_react26.useMemo)(
|
|
4147
4068
|
() => selectableDataInPage.length > 0 && selectableDataInPage.every((row, i) => selectedModelSet.has(getId(row, i))),
|
|
4148
4069
|
[selectableDataInPage, selectedModelSet, getId]
|
|
4149
4070
|
);
|
|
4150
4071
|
const rowCount = totalRowsProp || rows.length;
|
|
4151
|
-
const selectableRowCount = (0,
|
|
4072
|
+
const selectableRowCount = (0, import_react26.useMemo)(() => {
|
|
4152
4073
|
if (!isRowSelectable) return rowCount;
|
|
4153
4074
|
return rows.filter((row, i) => isRowSelectable({ row, id: getId(row, i) })).length;
|
|
4154
4075
|
}, [rows, isRowSelectable, getId, rowCount]);
|
|
4155
|
-
const isTotalSelected = (0,
|
|
4076
|
+
const isTotalSelected = (0, import_react26.useMemo)(
|
|
4156
4077
|
() => _isTotalSelected ?? (selectableRowCount > 0 && (selectionModel?.length || 0) === selectableRowCount),
|
|
4157
4078
|
[_isTotalSelected, selectionModel, selectableRowCount]
|
|
4158
4079
|
);
|
|
4159
|
-
const columnWidths = useColumnWidths(
|
|
4160
|
-
const
|
|
4161
|
-
() =>
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
[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]
|
|
4165
4085
|
);
|
|
4166
|
-
const
|
|
4167
|
-
// 반환값은 pinned offset으로 더해지므로 반드시 숫자여야 한다. width/minWidth는 '500px' 같은 문자열.
|
|
4168
|
-
(f) => measuredWidthByField[f] ?? parsePxValue(allColumnsByField[f]?.width) ?? // Column prop 으로 지정된 width
|
|
4169
|
-
parsePxValue(allColumnsByField[f]?.minWidth) ?? 0,
|
|
4170
|
-
[measuredWidthByField, allColumnsByField]
|
|
4171
|
-
);
|
|
4172
|
-
const processedColumnGroups = (0, import_react27.useMemo)(() => {
|
|
4086
|
+
const processedColumnGroups = (0, import_react26.useMemo)(() => {
|
|
4173
4087
|
if (!columnGroupingModel) return null;
|
|
4174
4088
|
return calculateColumnGroups(columnGroupingModel, visibleColumns, visibleFieldSet);
|
|
4175
4089
|
}, [columnGroupingModel, visibleColumns, visibleFieldSet]);
|
|
4176
|
-
const effectivePinnedLeft = (0,
|
|
4090
|
+
const effectivePinnedLeft = (0, import_react26.useMemo)(
|
|
4177
4091
|
() => pinnedColumns?.left?.filter((f) => visibleFieldSet.has(f)),
|
|
4178
4092
|
[pinnedColumns?.left, visibleFieldSet]
|
|
4179
4093
|
);
|
|
4180
|
-
const effectivePinnedRight = (0,
|
|
4094
|
+
const effectivePinnedRight = (0, import_react26.useMemo)(
|
|
4181
4095
|
() => pinnedColumns?.right?.filter((f) => visibleFieldSet.has(f)),
|
|
4182
4096
|
[pinnedColumns?.right, visibleFieldSet]
|
|
4183
4097
|
);
|
|
4184
4098
|
const inferredFieldsKey = JSON.stringify(Object.keys(rows[0] || {}));
|
|
4185
|
-
const inferredFields = (0,
|
|
4186
|
-
const columns = (0,
|
|
4099
|
+
const inferredFields = (0, import_react26.useMemo)(() => JSON.parse(inferredFieldsKey), [inferredFieldsKey]);
|
|
4100
|
+
const columns = (0, import_react26.useMemo)(() => {
|
|
4187
4101
|
const baseColumns = visibleColumns.length > 0 ? visibleColumns : reorderedColumns.length > 0 ? [] : inferredFields.map((key) => ({
|
|
4188
4102
|
field: key
|
|
4189
4103
|
}));
|
|
4190
|
-
return baseColumns.map((column
|
|
4191
|
-
const columnId = columnIds[index] ?? String(column.field);
|
|
4104
|
+
return baseColumns.map((column) => {
|
|
4192
4105
|
const isLeftPinned = effectivePinnedLeft?.includes(column.field);
|
|
4193
4106
|
const isRightPinned = effectivePinnedRight?.includes(column.field);
|
|
4194
4107
|
const isPinned = isLeftPinned || isRightPinned;
|
|
4195
4108
|
return {
|
|
4196
4109
|
...column,
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
tableColRef: visibleColumnsById[columnId]?.tableColRef,
|
|
4110
|
+
headerRef: visibleColumnsByField[column.field]?.headerRef,
|
|
4111
|
+
tableColRef: visibleColumnsByField[column.field]?.tableColRef,
|
|
4200
4112
|
isCellEditable: editMode && (typeof column.isCellEditable === "function" ? column.isCellEditable : column.isCellEditable ?? true),
|
|
4201
4113
|
sort: sortModel.find((sort) => sort.field === column.field)?.sort,
|
|
4202
4114
|
sortOrder: allColumnsByField[column.field]?.sortOrder || sortOrder,
|
|
@@ -4213,22 +4125,21 @@ function useDataTableRenderer({
|
|
|
4213
4125
|
inferredFields,
|
|
4214
4126
|
effectivePinnedLeft,
|
|
4215
4127
|
effectivePinnedRight,
|
|
4216
|
-
|
|
4217
|
-
visibleColumnsById,
|
|
4128
|
+
visibleColumnsByField,
|
|
4218
4129
|
allColumnsByField,
|
|
4219
4130
|
editMode,
|
|
4220
4131
|
sortModel,
|
|
4221
4132
|
sortOrder,
|
|
4222
4133
|
getWidth
|
|
4223
4134
|
]);
|
|
4224
|
-
const handlePageChange = (0,
|
|
4135
|
+
const handlePageChange = (0, import_react26.useCallback)(
|
|
4225
4136
|
(newPage) => {
|
|
4226
4137
|
setPage(newPage);
|
|
4227
4138
|
onPaginationModelChange?.({ page: newPage, pageSize });
|
|
4228
4139
|
},
|
|
4229
4140
|
[onPaginationModelChange, pageSize]
|
|
4230
4141
|
);
|
|
4231
|
-
const handleSortChange = (0,
|
|
4142
|
+
const handleSortChange = (0, import_react26.useCallback)(
|
|
4232
4143
|
(props) => {
|
|
4233
4144
|
const { field, currentSort, multiple } = props;
|
|
4234
4145
|
const column = allColumnsByField[field];
|
|
@@ -4251,37 +4162,38 @@ function useDataTableRenderer({
|
|
|
4251
4162
|
},
|
|
4252
4163
|
[sortOrder, allColumnsByField, sortModel, setSortModel]
|
|
4253
4164
|
);
|
|
4254
|
-
(0,
|
|
4165
|
+
(0, import_react26.useEffect)(() => {
|
|
4255
4166
|
if (!paginationModel) {
|
|
4256
4167
|
handlePageChange(1);
|
|
4257
4168
|
}
|
|
4258
4169
|
}, [rowCount, handlePageChange, paginationModel]);
|
|
4259
|
-
(0,
|
|
4170
|
+
(0, import_react26.useEffect)(() => {
|
|
4260
4171
|
const lastPage = Math.max(1, Math.ceil(rowCount / pageSize));
|
|
4261
4172
|
if (page > lastPage) {
|
|
4262
4173
|
handlePageChange(lastPage);
|
|
4263
4174
|
}
|
|
4264
4175
|
}, [page, rowCount, pageSize, handlePageChange]);
|
|
4265
|
-
(0,
|
|
4176
|
+
(0, import_react26.useEffect)(() => {
|
|
4266
4177
|
onSelectionModelChangeRef.current?.([]);
|
|
4267
4178
|
setSelectionAnchor(null);
|
|
4268
4179
|
}, [page]);
|
|
4269
|
-
const prevRowsRef = (0,
|
|
4270
|
-
(0,
|
|
4180
|
+
const prevRowsRef = (0, import_react26.useRef)(_rows);
|
|
4181
|
+
(0, import_react26.useEffect)(() => {
|
|
4271
4182
|
if (prevRowsRef.current !== _rows) {
|
|
4272
4183
|
setSelectionAnchor(null);
|
|
4273
4184
|
prevRowsRef.current = _rows;
|
|
4274
4185
|
}
|
|
4275
4186
|
}, [_rows]);
|
|
4276
|
-
const handleAutoFit = (0,
|
|
4277
|
-
(
|
|
4278
|
-
const colDef =
|
|
4187
|
+
const handleAutoFit = (0, import_react26.useCallback)(
|
|
4188
|
+
(field) => {
|
|
4189
|
+
const colDef = visibleColumnsByField[field];
|
|
4279
4190
|
if (!colDef?.headerRef.current) return;
|
|
4280
|
-
const
|
|
4191
|
+
const column = allColumnsByField[field];
|
|
4192
|
+
const columnType = column && "type" in column ? column.type : void 0;
|
|
4281
4193
|
if (columnType === "actions") return;
|
|
4282
4194
|
const optimalWidth = computeAutoFitWidth({
|
|
4283
4195
|
headerEl: colDef.headerRef.current,
|
|
4284
|
-
field
|
|
4196
|
+
field,
|
|
4285
4197
|
dataInPage
|
|
4286
4198
|
});
|
|
4287
4199
|
if (optimalWidth == null) return;
|
|
@@ -4289,7 +4201,7 @@ function useDataTableRenderer({
|
|
|
4289
4201
|
colDef.headerRef.current.style.width = widthPx;
|
|
4290
4202
|
if (colDef.tableColRef.current) colDef.tableColRef.current.style.width = widthPx;
|
|
4291
4203
|
},
|
|
4292
|
-
[
|
|
4204
|
+
[visibleColumnsByField, allColumnsByField, dataInPage]
|
|
4293
4205
|
);
|
|
4294
4206
|
return {
|
|
4295
4207
|
rowCount,
|
|
@@ -4305,8 +4217,8 @@ function useDataTableRenderer({
|
|
|
4305
4217
|
handleAutoFit,
|
|
4306
4218
|
isAllSelected,
|
|
4307
4219
|
isTotalSelected,
|
|
4308
|
-
isSelectedRow: (0,
|
|
4309
|
-
isRowSelectable: (0,
|
|
4220
|
+
isSelectedRow: (0, import_react26.useCallback)((model) => selectedModelSet.has(model), [selectedModelSet]),
|
|
4221
|
+
isRowSelectable: (0, import_react26.useCallback)(
|
|
4310
4222
|
(rowId, row) => {
|
|
4311
4223
|
if (!isRowSelectable) return true;
|
|
4312
4224
|
return isRowSelectable({ row, id: rowId });
|
|
@@ -4314,13 +4226,13 @@ function useDataTableRenderer({
|
|
|
4314
4226
|
[isRowSelectable]
|
|
4315
4227
|
),
|
|
4316
4228
|
focusedRowId,
|
|
4317
|
-
onRowFocus: (0,
|
|
4229
|
+
onRowFocus: (0, import_react26.useCallback)((rowId) => {
|
|
4318
4230
|
setFocusedRowId(rowId);
|
|
4319
4231
|
}, []),
|
|
4320
|
-
onAllCheckboxChange: (0,
|
|
4232
|
+
onAllCheckboxChange: (0, import_react26.useCallback)(() => {
|
|
4321
4233
|
onSelectionModelChange?.(isAllSelected ? [] : selectableDataInPage.map(getId));
|
|
4322
4234
|
}, [isAllSelected, selectableDataInPage, onSelectionModelChange, getId]),
|
|
4323
|
-
onCheckboxChange: (0,
|
|
4235
|
+
onCheckboxChange: (0, import_react26.useCallback)(
|
|
4324
4236
|
(event, selectedModel) => {
|
|
4325
4237
|
const isShiftClick = "shiftKey" in event && event.shiftKey;
|
|
4326
4238
|
const rowIndex = dataInPage.findIndex((row, i) => getId(row, i) === selectedModel);
|
|
@@ -4354,7 +4266,7 @@ function useDataTableRenderer({
|
|
|
4354
4266
|
columns,
|
|
4355
4267
|
tableMinWidth,
|
|
4356
4268
|
processedColumnGroups,
|
|
4357
|
-
onTotalSelect: (0,
|
|
4269
|
+
onTotalSelect: (0, import_react26.useCallback)(() => {
|
|
4358
4270
|
const selectableRows = rows.filter((row, i) => {
|
|
4359
4271
|
if (!isRowSelectable) return true;
|
|
4360
4272
|
return isRowSelectable({ row, id: getId(row, i) });
|
|
@@ -4368,11 +4280,11 @@ function useDataTableRenderer({
|
|
|
4368
4280
|
}
|
|
4369
4281
|
|
|
4370
4282
|
// src/components/Table/Table.tsx
|
|
4371
|
-
var
|
|
4283
|
+
var import_react27 = __toESM(require("react"));
|
|
4372
4284
|
var import_joy35 = require("@mui/joy");
|
|
4373
4285
|
var Table = (props) => {
|
|
4374
4286
|
const { children, ...inheritProps } = props;
|
|
4375
|
-
return /* @__PURE__ */
|
|
4287
|
+
return /* @__PURE__ */ import_react27.default.createElement(import_joy35.Table, { ...inheritProps }, children);
|
|
4376
4288
|
};
|
|
4377
4289
|
Table.displayName = "Table";
|
|
4378
4290
|
function TableHead(props) {
|
|
@@ -4383,7 +4295,7 @@ function TableHead(props) {
|
|
|
4383
4295
|
slots: { checkbox: RenderCheckbox = Checkbox_default } = {},
|
|
4384
4296
|
slotProps: { checkbox: checkboxProps = {} } = {}
|
|
4385
4297
|
} = props;
|
|
4386
|
-
return /* @__PURE__ */
|
|
4298
|
+
return /* @__PURE__ */ import_react27.default.createElement("thead", null, /* @__PURE__ */ import_react27.default.createElement("tr", null, showCheckbox && /* @__PURE__ */ import_react27.default.createElement(
|
|
4387
4299
|
"th",
|
|
4388
4300
|
{
|
|
4389
4301
|
style: {
|
|
@@ -4391,8 +4303,8 @@ function TableHead(props) {
|
|
|
4391
4303
|
textAlign: "center"
|
|
4392
4304
|
}
|
|
4393
4305
|
},
|
|
4394
|
-
/* @__PURE__ */
|
|
4395
|
-
), headCells.map((headCell) => /* @__PURE__ */
|
|
4306
|
+
/* @__PURE__ */ import_react27.default.createElement(RenderCheckbox, { onChange: onCheckboxChange, ...checkboxProps })
|
|
4307
|
+
), headCells.map((headCell) => /* @__PURE__ */ import_react27.default.createElement(
|
|
4396
4308
|
"th",
|
|
4397
4309
|
{
|
|
4398
4310
|
key: headCell.label,
|
|
@@ -4417,15 +4329,15 @@ function TableBody(props) {
|
|
|
4417
4329
|
slots: { checkbox: RenderCheckbox = Checkbox_default } = {},
|
|
4418
4330
|
slotProps: { checkbox: checkboxProps = {} } = {}
|
|
4419
4331
|
} = props;
|
|
4420
|
-
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(
|
|
4421
4333
|
"td",
|
|
4422
4334
|
{
|
|
4423
4335
|
style: {
|
|
4424
4336
|
textAlign: "center"
|
|
4425
4337
|
}
|
|
4426
4338
|
},
|
|
4427
|
-
/* @__PURE__ */
|
|
4428
|
-
), 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(
|
|
4429
4341
|
"td",
|
|
4430
4342
|
{
|
|
4431
4343
|
key: cellKey,
|
|
@@ -4439,7 +4351,7 @@ function TableBody(props) {
|
|
|
4439
4351
|
TableBody.displayName = "TableBody";
|
|
4440
4352
|
|
|
4441
4353
|
// src/components/Pagination/Pagination.tsx
|
|
4442
|
-
var
|
|
4354
|
+
var import_react28 = __toESM(require("react"));
|
|
4443
4355
|
var import_ChevronLeftRounded = __toESM(require("@mui/icons-material/ChevronLeftRounded"));
|
|
4444
4356
|
var import_ChevronRightRounded = __toESM(require("@mui/icons-material/ChevronRightRounded"));
|
|
4445
4357
|
var import_FirstPageRounded = __toESM(require("@mui/icons-material/FirstPageRounded"));
|
|
@@ -4509,7 +4421,7 @@ function Pagination(inProps) {
|
|
|
4509
4421
|
const [paginationModel, setPaginationModel] = useControlledState(
|
|
4510
4422
|
_paginationModel,
|
|
4511
4423
|
defaultPaginationModel,
|
|
4512
|
-
(0,
|
|
4424
|
+
(0, import_react28.useCallback)(
|
|
4513
4425
|
(newPage) => {
|
|
4514
4426
|
onPageChange(newPage.page);
|
|
4515
4427
|
},
|
|
@@ -4525,7 +4437,7 @@ function Pagination(inProps) {
|
|
|
4525
4437
|
const afterPages = [paginationModel.page + 1, paginationModel.page + 2].filter((p) => p <= lastPage - 1);
|
|
4526
4438
|
const isMoreAfterPages = lastPage > 1 && paginationModel.page < lastPage - 3;
|
|
4527
4439
|
const isMoreBeforePages = lastPage > 1 && paginationModel.page > 4;
|
|
4528
|
-
(0,
|
|
4440
|
+
(0, import_react28.useEffect)(() => {
|
|
4529
4441
|
if (paginationModel.page > lastPage) {
|
|
4530
4442
|
setPaginationModel({ ...paginationModel, page: lastPage });
|
|
4531
4443
|
}
|
|
@@ -4535,7 +4447,7 @@ function Pagination(inProps) {
|
|
|
4535
4447
|
value: `${i + 1}`
|
|
4536
4448
|
}));
|
|
4537
4449
|
if (variant === "compact") {
|
|
4538
|
-
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(
|
|
4539
4451
|
PaginationIconButton,
|
|
4540
4452
|
{
|
|
4541
4453
|
size,
|
|
@@ -4545,8 +4457,8 @@ function Pagination(inProps) {
|
|
|
4545
4457
|
disabled: paginationModel.page === firstPage,
|
|
4546
4458
|
"aria-label": "First page"
|
|
4547
4459
|
},
|
|
4548
|
-
/* @__PURE__ */
|
|
4549
|
-
), /* @__PURE__ */
|
|
4460
|
+
/* @__PURE__ */ import_react28.default.createElement(import_FirstPageRounded.default, null)
|
|
4461
|
+
), /* @__PURE__ */ import_react28.default.createElement(
|
|
4550
4462
|
PaginationIconButton,
|
|
4551
4463
|
{
|
|
4552
4464
|
size,
|
|
@@ -4556,8 +4468,8 @@ function Pagination(inProps) {
|
|
|
4556
4468
|
disabled: paginationModel.page === firstPage,
|
|
4557
4469
|
"aria-label": "Previous page"
|
|
4558
4470
|
},
|
|
4559
|
-
/* @__PURE__ */
|
|
4560
|
-
)), /* @__PURE__ */
|
|
4471
|
+
/* @__PURE__ */ import_react28.default.createElement(import_ChevronLeftRounded.default, null)
|
|
4472
|
+
)), /* @__PURE__ */ import_react28.default.createElement(
|
|
4561
4473
|
Autocomplete_default,
|
|
4562
4474
|
{
|
|
4563
4475
|
size,
|
|
@@ -4576,7 +4488,7 @@ function Pagination(inProps) {
|
|
|
4576
4488
|
}[size]
|
|
4577
4489
|
}
|
|
4578
4490
|
}
|
|
4579
|
-
), /* @__PURE__ */
|
|
4491
|
+
), /* @__PURE__ */ import_react28.default.createElement(
|
|
4580
4492
|
Typography_default,
|
|
4581
4493
|
{
|
|
4582
4494
|
level: `body-${size}`,
|
|
@@ -4587,7 +4499,7 @@ function Pagination(inProps) {
|
|
|
4587
4499
|
},
|
|
4588
4500
|
"/ ",
|
|
4589
4501
|
lastPage
|
|
4590
|
-
), /* @__PURE__ */
|
|
4502
|
+
), /* @__PURE__ */ import_react28.default.createElement(Stack_default, { direction: "row" }, /* @__PURE__ */ import_react28.default.createElement(
|
|
4591
4503
|
PaginationIconButton,
|
|
4592
4504
|
{
|
|
4593
4505
|
size,
|
|
@@ -4597,8 +4509,8 @@ function Pagination(inProps) {
|
|
|
4597
4509
|
disabled: paginationModel.page === lastPage,
|
|
4598
4510
|
"aria-label": "Next page"
|
|
4599
4511
|
},
|
|
4600
|
-
/* @__PURE__ */
|
|
4601
|
-
), /* @__PURE__ */
|
|
4512
|
+
/* @__PURE__ */ import_react28.default.createElement(import_ChevronRightRounded.default, null)
|
|
4513
|
+
), /* @__PURE__ */ import_react28.default.createElement(
|
|
4602
4514
|
PaginationIconButton,
|
|
4603
4515
|
{
|
|
4604
4516
|
size,
|
|
@@ -4608,10 +4520,10 @@ function Pagination(inProps) {
|
|
|
4608
4520
|
disabled: paginationModel.page === lastPage,
|
|
4609
4521
|
"aria-label": "Last page"
|
|
4610
4522
|
},
|
|
4611
|
-
/* @__PURE__ */
|
|
4523
|
+
/* @__PURE__ */ import_react28.default.createElement(import_LastPageRounded.default, null)
|
|
4612
4524
|
))));
|
|
4613
4525
|
}
|
|
4614
|
-
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(
|
|
4615
4527
|
PaginationIconButton,
|
|
4616
4528
|
{
|
|
4617
4529
|
size,
|
|
@@ -4621,8 +4533,8 @@ function Pagination(inProps) {
|
|
|
4621
4533
|
disabled: paginationModel.page === firstPage,
|
|
4622
4534
|
"aria-label": "Previous page"
|
|
4623
4535
|
},
|
|
4624
|
-
/* @__PURE__ */
|
|
4625
|
-
), 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(
|
|
4626
4538
|
PaginationButton,
|
|
4627
4539
|
{
|
|
4628
4540
|
size,
|
|
@@ -4632,7 +4544,7 @@ function Pagination(inProps) {
|
|
|
4632
4544
|
"aria-label": "More previous pages"
|
|
4633
4545
|
},
|
|
4634
4546
|
"..."
|
|
4635
|
-
), 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(
|
|
4636
4548
|
PaginationButton,
|
|
4637
4549
|
{
|
|
4638
4550
|
size,
|
|
@@ -4642,7 +4554,7 @@ function Pagination(inProps) {
|
|
|
4642
4554
|
onClick: () => handlePageChange(paginationModel.page + 3)
|
|
4643
4555
|
},
|
|
4644
4556
|
"..."
|
|
4645
|
-
), 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(
|
|
4646
4558
|
PaginationIconButton,
|
|
4647
4559
|
{
|
|
4648
4560
|
size,
|
|
@@ -4652,7 +4564,7 @@ function Pagination(inProps) {
|
|
|
4652
4564
|
disabled: paginationModel.page === lastPage,
|
|
4653
4565
|
"aria-label": "Next page"
|
|
4654
4566
|
},
|
|
4655
|
-
/* @__PURE__ */
|
|
4567
|
+
/* @__PURE__ */ import_react28.default.createElement(import_ChevronRightRounded.default, null)
|
|
4656
4568
|
)));
|
|
4657
4569
|
}
|
|
4658
4570
|
Pagination.displayName = "Pagination";
|
|
@@ -4726,9 +4638,9 @@ function Component(props, apiRef) {
|
|
|
4726
4638
|
isTotalSelected: ___________,
|
|
4727
4639
|
...innerProps
|
|
4728
4640
|
} = props;
|
|
4729
|
-
const tableId = (0,
|
|
4730
|
-
const parentRef = (0,
|
|
4731
|
-
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);
|
|
4732
4644
|
const {
|
|
4733
4645
|
columns,
|
|
4734
4646
|
processedColumnGroups,
|
|
@@ -4764,10 +4676,10 @@ function Component(props, apiRef) {
|
|
|
4764
4676
|
measureElement: (element) => element.clientHeight,
|
|
4765
4677
|
overscan: 10
|
|
4766
4678
|
});
|
|
4767
|
-
const paginationModel = (0,
|
|
4679
|
+
const paginationModel = (0, import_react29.useMemo)(() => ({ page, pageSize }), [page, pageSize]);
|
|
4768
4680
|
const columnsKey = getObjectVersion(columns);
|
|
4769
|
-
const headerCheckboxElement = (0,
|
|
4770
|
-
() => /* @__PURE__ */
|
|
4681
|
+
const headerCheckboxElement = (0, import_react29.useMemo)(
|
|
4682
|
+
() => /* @__PURE__ */ import_react29.default.createElement(
|
|
4771
4683
|
RenderCheckbox,
|
|
4772
4684
|
{
|
|
4773
4685
|
onChange: onAllCheckboxChange,
|
|
@@ -4792,20 +4704,20 @@ function Component(props, apiRef) {
|
|
|
4792
4704
|
const showNoRowsOverlay = !loading && rowCount === 0;
|
|
4793
4705
|
const showFillerColumn = columns.length > 0 && columns.every((c) => !!c.width);
|
|
4794
4706
|
const totalColCount = Math.max(1, columns.length + (checkboxSelection ? 1 : 0) + (showFillerColumn ? 1 : 0));
|
|
4795
|
-
const getRowClickHandler = (0,
|
|
4707
|
+
const getRowClickHandler = (0, import_react29.useCallback)(
|
|
4796
4708
|
(row, rowId) => (e) => {
|
|
4797
4709
|
onRowClick?.({ row, rowId }, e);
|
|
4798
4710
|
checkboxSelection && !disableSelectionOnClick && isRowSelectableCheck(rowId, row) && onCheckboxChange(e, rowId);
|
|
4799
4711
|
},
|
|
4800
4712
|
[onRowClick, checkboxSelection, disableSelectionOnClick, onCheckboxChange, isRowSelectableCheck]
|
|
4801
4713
|
);
|
|
4802
|
-
const getRowFocusHandler = (0,
|
|
4714
|
+
const getRowFocusHandler = (0, import_react29.useCallback)(
|
|
4803
4715
|
(rowId) => () => {
|
|
4804
4716
|
onRowFocus(rowId);
|
|
4805
4717
|
},
|
|
4806
4718
|
[onRowFocus]
|
|
4807
4719
|
);
|
|
4808
|
-
const getCheckboxClickHandler = (0,
|
|
4720
|
+
const getCheckboxClickHandler = (0, import_react29.useCallback)(
|
|
4809
4721
|
(rowId, row) => (e) => {
|
|
4810
4722
|
e.stopPropagation();
|
|
4811
4723
|
if (isRowSelectableCheck(rowId, row)) {
|
|
@@ -4815,7 +4727,7 @@ function Component(props, apiRef) {
|
|
|
4815
4727
|
},
|
|
4816
4728
|
[onCheckboxChange, isRowSelectableCheck, onRowFocus]
|
|
4817
4729
|
);
|
|
4818
|
-
const handleTableKeyDown = (0,
|
|
4730
|
+
const handleTableKeyDown = (0, import_react29.useCallback)(
|
|
4819
4731
|
(e) => {
|
|
4820
4732
|
const supportedKeys = ["ArrowUp", "ArrowDown", " ", "Home", "End", "PageUp", "PageDown"];
|
|
4821
4733
|
if (!supportedKeys.includes(e.key)) return;
|
|
@@ -4905,7 +4817,7 @@ function Component(props, apiRef) {
|
|
|
4905
4817
|
virtualizer
|
|
4906
4818
|
]
|
|
4907
4819
|
);
|
|
4908
|
-
(0,
|
|
4820
|
+
(0, import_react29.useImperativeHandle)(apiRef, () => ({
|
|
4909
4821
|
getRowIndexRelativeToVisibleRows(rowId) {
|
|
4910
4822
|
return dataInPage.findIndex((row) => String(getId(row)) === rowId);
|
|
4911
4823
|
},
|
|
@@ -4921,7 +4833,7 @@ function Component(props, apiRef) {
|
|
|
4921
4833
|
});
|
|
4922
4834
|
}
|
|
4923
4835
|
}));
|
|
4924
|
-
return /* @__PURE__ */
|
|
4836
|
+
return /* @__PURE__ */ import_react29.default.createElement(
|
|
4925
4837
|
Box_default,
|
|
4926
4838
|
{
|
|
4927
4839
|
sx: {
|
|
@@ -4931,7 +4843,7 @@ function Component(props, apiRef) {
|
|
|
4931
4843
|
flexDirection: "column"
|
|
4932
4844
|
}
|
|
4933
4845
|
},
|
|
4934
|
-
(!!checkboxSelection || !!Toolbar) && /* @__PURE__ */
|
|
4846
|
+
(!!checkboxSelection || !!Toolbar) && /* @__PURE__ */ import_react29.default.createElement(
|
|
4935
4847
|
Stack_default,
|
|
4936
4848
|
{
|
|
4937
4849
|
direction: "row",
|
|
@@ -4941,10 +4853,10 @@ function Component(props, apiRef) {
|
|
|
4941
4853
|
justifyContent: "space-between",
|
|
4942
4854
|
alignItems: "center"
|
|
4943
4855
|
},
|
|
4944
|
-
!!checkboxSelection && /* @__PURE__ */
|
|
4945
|
-
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 || {} })
|
|
4946
4858
|
),
|
|
4947
|
-
/* @__PURE__ */
|
|
4859
|
+
/* @__PURE__ */ import_react29.default.createElement(
|
|
4948
4860
|
Sheet_default,
|
|
4949
4861
|
{
|
|
4950
4862
|
variant: "outlined",
|
|
@@ -4965,24 +4877,24 @@ function Component(props, apiRef) {
|
|
|
4965
4877
|
ref: parentRef,
|
|
4966
4878
|
...backgroundProps
|
|
4967
4879
|
},
|
|
4968
|
-
/* @__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(
|
|
4969
4881
|
"col",
|
|
4970
4882
|
{
|
|
4971
4883
|
style: {
|
|
4972
4884
|
width: "40px"
|
|
4973
4885
|
}
|
|
4974
4886
|
}
|
|
4975
|
-
), columns.map((c) => /* @__PURE__ */
|
|
4887
|
+
), columns.map((c) => /* @__PURE__ */ import_react29.default.createElement(
|
|
4976
4888
|
"col",
|
|
4977
4889
|
{
|
|
4978
4890
|
ref: c.tableColRef,
|
|
4979
|
-
key: c.
|
|
4891
|
+
key: `${c.field.toString()}_${c.width}`,
|
|
4980
4892
|
style: {
|
|
4981
4893
|
width: c.width,
|
|
4982
4894
|
minWidth: c.minWidth ?? "50px"
|
|
4983
4895
|
}
|
|
4984
4896
|
}
|
|
4985
|
-
)), 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(
|
|
4986
4898
|
"th",
|
|
4987
4899
|
{
|
|
4988
4900
|
rowSpan: processedColumnGroups.maxLevel + 2,
|
|
@@ -4993,12 +4905,12 @@ function Component(props, apiRef) {
|
|
|
4993
4905
|
}
|
|
4994
4906
|
},
|
|
4995
4907
|
headerCheckboxElement
|
|
4996
|
-
), 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) => {
|
|
4997
4909
|
const nextGroup = levelGroups[groupIndex + 1];
|
|
4998
4910
|
const emptyCells = nextGroup ? nextGroup.startIndex - (group.startIndex + group.colspan) : columns.length - (group.startIndex + group.colspan);
|
|
4999
4911
|
const params = { groupId: group.groupId };
|
|
5000
4912
|
const computedHeaderClassName = group.headerClassName ? typeof group.headerClassName === "function" ? group.headerClassName(params) : group.headerClassName : void 0;
|
|
5001
|
-
return /* @__PURE__ */
|
|
4913
|
+
return /* @__PURE__ */ import_react29.default.createElement(import_react29.Fragment, { key: group.groupId }, /* @__PURE__ */ import_react29.default.createElement(
|
|
5002
4914
|
"th",
|
|
5003
4915
|
{
|
|
5004
4916
|
colSpan: group.colspan,
|
|
@@ -5010,14 +4922,14 @@ function Component(props, apiRef) {
|
|
|
5010
4922
|
className: computedHeaderClassName
|
|
5011
4923
|
},
|
|
5012
4924
|
group.headerName ?? group.groupId
|
|
5013
|
-
), emptyCells > 0 && Array.from({ length: emptyCells }).map((_2, i) => /* @__PURE__ */
|
|
5014
|
-
}), 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(
|
|
5015
4927
|
"th",
|
|
5016
4928
|
{
|
|
5017
4929
|
"aria-hidden": "true",
|
|
5018
4930
|
rowSpan: processedColumnGroups.maxLevel + 2
|
|
5019
4931
|
}
|
|
5020
|
-
))), /* @__PURE__ */
|
|
4932
|
+
))), /* @__PURE__ */ import_react29.default.createElement("tr", null, (!processedColumnGroups || processedColumnGroups.groups.length === 0) && checkboxSelection && /* @__PURE__ */ import_react29.default.createElement(
|
|
5021
4933
|
"th",
|
|
5022
4934
|
{
|
|
5023
4935
|
style: {
|
|
@@ -5028,7 +4940,7 @@ function Component(props, apiRef) {
|
|
|
5028
4940
|
headerCheckboxElement
|
|
5029
4941
|
), columns.map((c, i) => (
|
|
5030
4942
|
// @ts-ignore
|
|
5031
|
-
/* @__PURE__ */
|
|
4943
|
+
/* @__PURE__ */ import_react29.default.createElement(
|
|
5032
4944
|
HeadCell2,
|
|
5033
4945
|
{
|
|
5034
4946
|
tableId,
|
|
@@ -5040,7 +4952,7 @@ function Component(props, apiRef) {
|
|
|
5040
4952
|
...c
|
|
5041
4953
|
}
|
|
5042
4954
|
)
|
|
5043
|
-
)), 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(
|
|
5044
4956
|
VirtualizedTableBody,
|
|
5045
4957
|
{
|
|
5046
4958
|
ref: tableBodyRef,
|
|
@@ -5051,7 +4963,7 @@ function Component(props, apiRef) {
|
|
|
5051
4963
|
role: "rowgroup",
|
|
5052
4964
|
"aria-label": "DataTableBody"
|
|
5053
4965
|
},
|
|
5054
|
-
!!loading && /* @__PURE__ */
|
|
4966
|
+
!!loading && /* @__PURE__ */ import_react29.default.createElement(OverlayWrapper, null, /* @__PURE__ */ import_react29.default.createElement(
|
|
5055
4967
|
"td",
|
|
5056
4968
|
{
|
|
5057
4969
|
style: {
|
|
@@ -5060,7 +4972,7 @@ function Component(props, apiRef) {
|
|
|
5060
4972
|
overflow: "visible"
|
|
5061
4973
|
}
|
|
5062
4974
|
},
|
|
5063
|
-
/* @__PURE__ */
|
|
4975
|
+
/* @__PURE__ */ import_react29.default.createElement(
|
|
5064
4976
|
Box_default,
|
|
5065
4977
|
{
|
|
5066
4978
|
sx: {
|
|
@@ -5070,10 +4982,10 @@ function Component(props, apiRef) {
|
|
|
5070
4982
|
right: 0
|
|
5071
4983
|
}
|
|
5072
4984
|
},
|
|
5073
|
-
/* @__PURE__ */
|
|
4985
|
+
/* @__PURE__ */ import_react29.default.createElement(LoadingOverlay, null)
|
|
5074
4986
|
)
|
|
5075
4987
|
)),
|
|
5076
|
-
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(
|
|
5077
4989
|
Box_default,
|
|
5078
4990
|
{
|
|
5079
4991
|
sx: {
|
|
@@ -5083,14 +4995,14 @@ function Component(props, apiRef) {
|
|
|
5083
4995
|
minHeight: "150px"
|
|
5084
4996
|
}
|
|
5085
4997
|
},
|
|
5086
|
-
/* @__PURE__ */
|
|
4998
|
+
/* @__PURE__ */ import_react29.default.createElement(NoRowsOverlay, { ...noRowsOverlayProps })
|
|
5087
4999
|
))),
|
|
5088
5000
|
virtualizedItems.map((virtualizedRow, index) => {
|
|
5089
5001
|
const rowIndex = virtualizedRow.index;
|
|
5090
5002
|
const row = dataInPage[rowIndex];
|
|
5091
5003
|
const rowId = getId(row, rowIndex);
|
|
5092
5004
|
const striped = stripe && (stripe === "even" && (rowIndex + 1) % 2 === 0 || stripe === "odd" && (rowIndex + 1) % 2 === 1);
|
|
5093
|
-
return /* @__PURE__ */
|
|
5005
|
+
return /* @__PURE__ */ import_react29.default.createElement(
|
|
5094
5006
|
VirtualizedTableRow,
|
|
5095
5007
|
{
|
|
5096
5008
|
key: virtualizedRow.key,
|
|
@@ -5110,7 +5022,7 @@ function Component(props, apiRef) {
|
|
|
5110
5022
|
transform: `translateY(${virtualizedRow.start - index * virtualizedRow.size}px)`
|
|
5111
5023
|
}
|
|
5112
5024
|
},
|
|
5113
|
-
checkboxSelection && /* @__PURE__ */
|
|
5025
|
+
checkboxSelection && /* @__PURE__ */ import_react29.default.createElement(
|
|
5114
5026
|
"th",
|
|
5115
5027
|
{
|
|
5116
5028
|
scope: "row",
|
|
@@ -5118,7 +5030,7 @@ function Component(props, apiRef) {
|
|
|
5118
5030
|
textAlign: "center"
|
|
5119
5031
|
}
|
|
5120
5032
|
},
|
|
5121
|
-
/* @__PURE__ */
|
|
5033
|
+
/* @__PURE__ */ import_react29.default.createElement(
|
|
5122
5034
|
RenderCheckbox,
|
|
5123
5035
|
{
|
|
5124
5036
|
onClick: getCheckboxClickHandler(rowId, row),
|
|
@@ -5129,7 +5041,7 @@ function Component(props, apiRef) {
|
|
|
5129
5041
|
}
|
|
5130
5042
|
)
|
|
5131
5043
|
),
|
|
5132
|
-
/* @__PURE__ */
|
|
5044
|
+
/* @__PURE__ */ import_react29.default.createElement(
|
|
5133
5045
|
BodyRow2,
|
|
5134
5046
|
{
|
|
5135
5047
|
tableId,
|
|
@@ -5140,12 +5052,12 @@ function Component(props, apiRef) {
|
|
|
5140
5052
|
noWrap: props.noWrap
|
|
5141
5053
|
}
|
|
5142
5054
|
),
|
|
5143
|
-
showFillerColumn && /* @__PURE__ */
|
|
5055
|
+
showFillerColumn && /* @__PURE__ */ import_react29.default.createElement("td", { "aria-hidden": "true" })
|
|
5144
5056
|
);
|
|
5145
5057
|
})
|
|
5146
|
-
), Footer && /* @__PURE__ */
|
|
5058
|
+
), Footer && /* @__PURE__ */ import_react29.default.createElement(Footer, null))
|
|
5147
5059
|
),
|
|
5148
|
-
pagination && /* @__PURE__ */
|
|
5060
|
+
pagination && /* @__PURE__ */ import_react29.default.createElement(
|
|
5149
5061
|
Pagination_default,
|
|
5150
5062
|
{
|
|
5151
5063
|
pt: 2,
|
|
@@ -5158,11 +5070,11 @@ function Component(props, apiRef) {
|
|
|
5158
5070
|
)
|
|
5159
5071
|
);
|
|
5160
5072
|
}
|
|
5161
|
-
var DataTable = (0,
|
|
5073
|
+
var DataTable = (0, import_react29.forwardRef)(Component);
|
|
5162
5074
|
DataTable.displayName = "DataTable";
|
|
5163
5075
|
|
|
5164
5076
|
// src/components/DateRangePicker/DateRangePicker.tsx
|
|
5165
|
-
var
|
|
5077
|
+
var import_react30 = __toESM(require("react"));
|
|
5166
5078
|
var import_react_imask2 = require("react-imask");
|
|
5167
5079
|
var import_CalendarToday2 = __toESM(require("@mui/icons-material/CalendarToday"));
|
|
5168
5080
|
var import_joy37 = require("@mui/joy");
|
|
@@ -5304,9 +5216,9 @@ var parseDates = (str, format) => {
|
|
|
5304
5216
|
var formatToPattern2 = (format) => {
|
|
5305
5217
|
return `${format} - ${format}`.replace(/YYYY/g, "Y").replace(/MM/g, "M").replace(/DD/g, "D").replace(/[^YMD\s]/g, (match) => `${match}\``);
|
|
5306
5218
|
};
|
|
5307
|
-
var TextMaskAdapter5 =
|
|
5219
|
+
var TextMaskAdapter5 = import_react30.default.forwardRef(function TextMaskAdapter6(props, ref) {
|
|
5308
5220
|
const { onChange, format, ...other } = props;
|
|
5309
|
-
return /* @__PURE__ */
|
|
5221
|
+
return /* @__PURE__ */ import_react30.default.createElement(
|
|
5310
5222
|
import_react_imask2.IMaskInput,
|
|
5311
5223
|
{
|
|
5312
5224
|
...other,
|
|
@@ -5340,7 +5252,7 @@ var TextMaskAdapter5 = import_react31.default.forwardRef(function TextMaskAdapte
|
|
|
5340
5252
|
}
|
|
5341
5253
|
);
|
|
5342
5254
|
});
|
|
5343
|
-
var DateRangePicker = (0,
|
|
5255
|
+
var DateRangePicker = (0, import_react30.forwardRef)((inProps, ref) => {
|
|
5344
5256
|
const props = (0, import_joy37.useThemeProps)({ props: inProps, name: "DateRangePicker" });
|
|
5345
5257
|
const {
|
|
5346
5258
|
onChange,
|
|
@@ -5367,28 +5279,28 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5367
5279
|
numberOfMonths,
|
|
5368
5280
|
...innerProps
|
|
5369
5281
|
} = props;
|
|
5370
|
-
const innerRef = (0,
|
|
5371
|
-
const buttonRef = (0,
|
|
5282
|
+
const innerRef = (0, import_react30.useRef)(null);
|
|
5283
|
+
const buttonRef = (0, import_react30.useRef)(null);
|
|
5372
5284
|
const [rawValue, setValue] = useControlledState(
|
|
5373
5285
|
props.value,
|
|
5374
5286
|
props.defaultValue ?? null,
|
|
5375
|
-
(0,
|
|
5287
|
+
(0, import_react30.useCallback)(
|
|
5376
5288
|
(value2) => onChange?.({ target: { name: props.name, value: value2 ?? "" } }),
|
|
5377
5289
|
[props.name, onChange]
|
|
5378
5290
|
)
|
|
5379
5291
|
);
|
|
5380
5292
|
const value = rawValue ?? "";
|
|
5381
5293
|
const isAlphabeticDisplay = hasAlphabeticMonth2(displayFormat);
|
|
5382
|
-
const [displayValue, setDisplayValue] = (0,
|
|
5294
|
+
const [displayValue, setDisplayValue] = (0, import_react30.useState)(
|
|
5383
5295
|
() => value ? formatValueString2(parseDates(value, format), displayFormat, locale) : ""
|
|
5384
5296
|
);
|
|
5385
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
5297
|
+
const [anchorEl, setAnchorEl] = (0, import_react30.useState)(null);
|
|
5386
5298
|
const open = Boolean(anchorEl);
|
|
5387
|
-
const calendarValue = (0,
|
|
5299
|
+
const calendarValue = (0, import_react30.useMemo)(
|
|
5388
5300
|
() => value ? parseDates(value, format) : void 0,
|
|
5389
5301
|
[value, format]
|
|
5390
5302
|
);
|
|
5391
|
-
(0,
|
|
5303
|
+
(0, import_react30.useEffect)(() => {
|
|
5392
5304
|
if (value) {
|
|
5393
5305
|
try {
|
|
5394
5306
|
const dates = parseDates(value, format);
|
|
@@ -5400,13 +5312,13 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5400
5312
|
setDisplayValue("");
|
|
5401
5313
|
}
|
|
5402
5314
|
}, [displayFormat, locale, value, format]);
|
|
5403
|
-
(0,
|
|
5315
|
+
(0, import_react30.useEffect)(() => {
|
|
5404
5316
|
if (!anchorEl) {
|
|
5405
5317
|
innerRef.current?.blur();
|
|
5406
5318
|
}
|
|
5407
5319
|
}, [anchorEl, innerRef]);
|
|
5408
|
-
(0,
|
|
5409
|
-
const handleChange = (0,
|
|
5320
|
+
(0, import_react30.useImperativeHandle)(ref, () => innerRef.current, [innerRef]);
|
|
5321
|
+
const handleChange = (0, import_react30.useCallback)(
|
|
5410
5322
|
(event) => {
|
|
5411
5323
|
const value2 = event.target.value;
|
|
5412
5324
|
setDisplayValue(value2 ? formatValueString2(parseDates(value2, format), displayFormat, locale) : value2);
|
|
@@ -5414,7 +5326,7 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5414
5326
|
},
|
|
5415
5327
|
[displayFormat, format, locale, setValue]
|
|
5416
5328
|
);
|
|
5417
|
-
const handleDisplayInputChange = (0,
|
|
5329
|
+
const handleDisplayInputChange = (0, import_react30.useCallback)(
|
|
5418
5330
|
(event) => {
|
|
5419
5331
|
if (event.target.value === "") {
|
|
5420
5332
|
handleChange({
|
|
@@ -5439,14 +5351,14 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5439
5351
|
},
|
|
5440
5352
|
[displayFormat, format, handleChange, props.name]
|
|
5441
5353
|
);
|
|
5442
|
-
const handleCalendarToggle = (0,
|
|
5354
|
+
const handleCalendarToggle = (0, import_react30.useCallback)(
|
|
5443
5355
|
(event) => {
|
|
5444
5356
|
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
5445
5357
|
innerRef.current?.focus();
|
|
5446
5358
|
},
|
|
5447
5359
|
[anchorEl, setAnchorEl, innerRef]
|
|
5448
5360
|
);
|
|
5449
|
-
const handleCalendarChange = (0,
|
|
5361
|
+
const handleCalendarChange = (0, import_react30.useCallback)(
|
|
5450
5362
|
([date1, date2]) => {
|
|
5451
5363
|
if (!date1 || !date2) return;
|
|
5452
5364
|
const formattedValue = formatValueString2([date1, date2], format);
|
|
@@ -5460,7 +5372,7 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5460
5372
|
},
|
|
5461
5373
|
[props.value, props.name, onChange, setValue, setAnchorEl, format, displayFormat, locale]
|
|
5462
5374
|
);
|
|
5463
|
-
const handleInputMouseDown = (0,
|
|
5375
|
+
const handleInputMouseDown = (0, import_react30.useCallback)(
|
|
5464
5376
|
(event) => {
|
|
5465
5377
|
if (inputReadOnly || isAlphabeticDisplay) {
|
|
5466
5378
|
event.preventDefault();
|
|
@@ -5469,7 +5381,7 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5469
5381
|
},
|
|
5470
5382
|
[inputReadOnly, isAlphabeticDisplay, buttonRef]
|
|
5471
5383
|
);
|
|
5472
|
-
const handleInputClick = (0,
|
|
5384
|
+
const handleInputClick = (0, import_react30.useCallback)(
|
|
5473
5385
|
(event) => {
|
|
5474
5386
|
if (inputReadOnly && !readOnly) {
|
|
5475
5387
|
handleCalendarToggle(event);
|
|
@@ -5477,7 +5389,7 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5477
5389
|
},
|
|
5478
5390
|
[inputReadOnly, readOnly, handleCalendarToggle]
|
|
5479
5391
|
);
|
|
5480
|
-
const handlePresetClick = (0,
|
|
5392
|
+
const handlePresetClick = (0, import_react30.useCallback)(
|
|
5481
5393
|
(presetValue) => {
|
|
5482
5394
|
if (props.value !== void 0) {
|
|
5483
5395
|
onChange?.({ target: { name: props.name, value: presetValue } });
|
|
@@ -5490,7 +5402,7 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5490
5402
|
},
|
|
5491
5403
|
[props.value, props.name, onChange, setValue, setAnchorEl, format, displayFormat, locale]
|
|
5492
5404
|
);
|
|
5493
|
-
const isPresetDisabled = (0,
|
|
5405
|
+
const isPresetDisabled = (0, import_react30.useCallback)(
|
|
5494
5406
|
(presetValue) => {
|
|
5495
5407
|
try {
|
|
5496
5408
|
const dates = parseDates(presetValue, format);
|
|
@@ -5509,7 +5421,7 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5509
5421
|
},
|
|
5510
5422
|
[format, minDate, maxDate, disableFuture, disablePast]
|
|
5511
5423
|
);
|
|
5512
|
-
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(
|
|
5513
5425
|
Input_default,
|
|
5514
5426
|
{
|
|
5515
5427
|
...innerProps,
|
|
@@ -5536,7 +5448,7 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5536
5448
|
},
|
|
5537
5449
|
error,
|
|
5538
5450
|
sx: { width: "100%" },
|
|
5539
|
-
endDecorator: /* @__PURE__ */
|
|
5451
|
+
endDecorator: /* @__PURE__ */ import_react30.default.createElement(
|
|
5540
5452
|
CalendarButton2,
|
|
5541
5453
|
{
|
|
5542
5454
|
ref: buttonRef,
|
|
@@ -5548,13 +5460,13 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5548
5460
|
"aria-expanded": open,
|
|
5549
5461
|
disabled
|
|
5550
5462
|
},
|
|
5551
|
-
/* @__PURE__ */
|
|
5463
|
+
/* @__PURE__ */ import_react30.default.createElement(import_CalendarToday2.default, null)
|
|
5552
5464
|
),
|
|
5553
5465
|
label,
|
|
5554
5466
|
helperText,
|
|
5555
5467
|
readOnly: readOnly || inputReadOnly || isAlphabeticDisplay
|
|
5556
5468
|
}
|
|
5557
|
-
), open && /* @__PURE__ */
|
|
5469
|
+
), open && /* @__PURE__ */ import_react30.default.createElement(import_base4.ClickAwayListener, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ import_react30.default.createElement(
|
|
5558
5470
|
StyledPopper2,
|
|
5559
5471
|
{
|
|
5560
5472
|
id: "date-range-picker-popper",
|
|
@@ -5573,7 +5485,7 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5573
5485
|
"aria-label": "Calendar Tooltip",
|
|
5574
5486
|
"aria-expanded": open
|
|
5575
5487
|
},
|
|
5576
|
-
/* @__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(
|
|
5577
5489
|
Calendar_default,
|
|
5578
5490
|
{
|
|
5579
5491
|
rangeSelection: true,
|
|
@@ -5586,14 +5498,14 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5586
5498
|
locale,
|
|
5587
5499
|
numberOfMonths
|
|
5588
5500
|
}
|
|
5589
|
-
), !hideClearButton && /* @__PURE__ */
|
|
5501
|
+
), !hideClearButton && /* @__PURE__ */ import_react30.default.createElement(
|
|
5590
5502
|
DialogActions_default,
|
|
5591
5503
|
{
|
|
5592
5504
|
sx: {
|
|
5593
5505
|
p: 1
|
|
5594
5506
|
}
|
|
5595
5507
|
},
|
|
5596
|
-
/* @__PURE__ */
|
|
5508
|
+
/* @__PURE__ */ import_react30.default.createElement(
|
|
5597
5509
|
Button_default,
|
|
5598
5510
|
{
|
|
5599
5511
|
size,
|
|
@@ -5607,9 +5519,9 @@ var DateRangePicker = (0, import_react31.forwardRef)((inProps, ref) => {
|
|
|
5607
5519
|
},
|
|
5608
5520
|
"Clear"
|
|
5609
5521
|
)
|
|
5610
|
-
)), presets && presets.length > 0 && /* @__PURE__ */
|
|
5522
|
+
)), presets && presets.length > 0 && /* @__PURE__ */ import_react30.default.createElement(PresetPanel2, null, presets.map((preset) => {
|
|
5611
5523
|
const disabled2 = isPresetDisabled(preset.value);
|
|
5612
|
-
return /* @__PURE__ */
|
|
5524
|
+
return /* @__PURE__ */ import_react30.default.createElement(
|
|
5613
5525
|
PresetItem2,
|
|
5614
5526
|
{
|
|
5615
5527
|
key: preset.label,
|
|
@@ -5654,10 +5566,10 @@ DialogTitle.displayName = "DialogTitle";
|
|
|
5654
5566
|
var DialogTitle_default = DialogTitle;
|
|
5655
5567
|
|
|
5656
5568
|
// src/components/DialogFrame/DialogFrame.tsx
|
|
5657
|
-
var
|
|
5569
|
+
var import_react32 = __toESM(require("react"));
|
|
5658
5570
|
|
|
5659
5571
|
// src/components/Modal/Modal.tsx
|
|
5660
|
-
var
|
|
5572
|
+
var import_react31 = __toESM(require("react"));
|
|
5661
5573
|
var import_joy40 = require("@mui/joy");
|
|
5662
5574
|
var import_framer_motion24 = require("framer-motion");
|
|
5663
5575
|
var MotionModal = (0, import_framer_motion24.motion)(import_joy40.Modal);
|
|
@@ -5672,10 +5584,10 @@ var ModalClose = import_joy40.ModalClose;
|
|
|
5672
5584
|
var MotionModalOverflow = (0, import_framer_motion24.motion)(import_joy40.ModalOverflow);
|
|
5673
5585
|
var ModalOverflow = MotionModalOverflow;
|
|
5674
5586
|
ModalOverflow.displayName = "ModalOverflow";
|
|
5675
|
-
|
|
5587
|
+
function ModalFrame(props) {
|
|
5676
5588
|
const { title, children, titleStartDecorator, onClose, ...innerProps } = props;
|
|
5677
|
-
return /* @__PURE__ */
|
|
5678
|
-
}
|
|
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
|
+
}
|
|
5679
5591
|
ModalFrame.displayName = "ModalFrame";
|
|
5680
5592
|
|
|
5681
5593
|
// src/components/DialogFrame/DialogFrame.tsx
|
|
@@ -5686,20 +5598,20 @@ var StyledDialogFrame = (0, import_joy41.styled)(ModalDialog, {
|
|
|
5686
5598
|
})({
|
|
5687
5599
|
padding: 0
|
|
5688
5600
|
});
|
|
5689
|
-
var DialogFrame =
|
|
5601
|
+
var DialogFrame = import_react32.default.forwardRef((props, ref) => {
|
|
5690
5602
|
const { title, children, actions, fullscreen, onSubmit, ...innerProps } = props;
|
|
5691
5603
|
const formProps = onSubmit ? { component: "form", onSubmit } : void 0;
|
|
5692
|
-
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));
|
|
5693
5605
|
});
|
|
5694
5606
|
DialogFrame.displayName = "DialogFrame";
|
|
5695
5607
|
|
|
5696
5608
|
// src/components/Divider/Divider.tsx
|
|
5697
|
-
var
|
|
5609
|
+
var import_react33 = __toESM(require("react"));
|
|
5698
5610
|
var import_joy42 = require("@mui/joy");
|
|
5699
5611
|
var import_framer_motion25 = require("framer-motion");
|
|
5700
5612
|
var MotionDivider = (0, import_framer_motion25.motion)(import_joy42.Divider);
|
|
5701
5613
|
var Divider = (props) => {
|
|
5702
|
-
return /* @__PURE__ */
|
|
5614
|
+
return /* @__PURE__ */ import_react33.default.createElement(MotionDivider, { ...props });
|
|
5703
5615
|
};
|
|
5704
5616
|
Divider.displayName = "Divider";
|
|
5705
5617
|
|
|
@@ -5720,16 +5632,16 @@ var InsetDrawer = (0, import_joy43.styled)(import_joy43.Drawer)(({ theme }) => (
|
|
|
5720
5632
|
}));
|
|
5721
5633
|
|
|
5722
5634
|
// src/components/FilterableCheckboxGroup/FilterableCheckboxGroup.tsx
|
|
5723
|
-
var
|
|
5635
|
+
var import_react34 = __toESM(require("react"));
|
|
5724
5636
|
var import_Search = __toESM(require("@mui/icons-material/Search"));
|
|
5725
5637
|
var import_joy44 = require("@mui/joy");
|
|
5726
5638
|
var import_react_virtual3 = require("@tanstack/react-virtual");
|
|
5727
5639
|
var EMPTY_VALUE = [];
|
|
5728
5640
|
function LabelWithTooltip(props) {
|
|
5729
5641
|
const { label, size } = props;
|
|
5730
|
-
const labelContentRef = (0,
|
|
5731
|
-
const [isOverflowing, setIsOverflowing] = (0,
|
|
5732
|
-
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(
|
|
5733
5645
|
"span",
|
|
5734
5646
|
{
|
|
5735
5647
|
ref: labelContentRef,
|
|
@@ -5745,14 +5657,14 @@ function LabelWithTooltip(props) {
|
|
|
5745
5657
|
},
|
|
5746
5658
|
label
|
|
5747
5659
|
);
|
|
5748
|
-
(0,
|
|
5660
|
+
(0, import_react34.useEffect)(() => {
|
|
5749
5661
|
const element = labelContentRef.current;
|
|
5750
5662
|
if (element) {
|
|
5751
5663
|
setIsOverflowing(element.scrollWidth > element.clientWidth);
|
|
5752
5664
|
}
|
|
5753
5665
|
}, [label]);
|
|
5754
5666
|
if (isOverflowing) {
|
|
5755
|
-
return /* @__PURE__ */
|
|
5667
|
+
return /* @__PURE__ */ import_react34.default.createElement(Tooltip_default, { variant: "solid", size, title: label, placement: "bottom-start" }, labelContent);
|
|
5756
5668
|
}
|
|
5757
5669
|
return labelContent;
|
|
5758
5670
|
}
|
|
@@ -5770,22 +5682,22 @@ function FilterableCheckboxGroup(inProps) {
|
|
|
5770
5682
|
maxHeight = 300,
|
|
5771
5683
|
disabled
|
|
5772
5684
|
} = props;
|
|
5773
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
5774
|
-
const [sortedOptions, setSortedOptions] = (0,
|
|
5685
|
+
const [searchTerm, setSearchTerm] = (0, import_react34.useState)("");
|
|
5686
|
+
const [sortedOptions, setSortedOptions] = (0, import_react34.useState)(options);
|
|
5775
5687
|
const [rawValue, setInternalValue] = useControlledState(
|
|
5776
5688
|
value,
|
|
5777
5689
|
value ?? EMPTY_VALUE,
|
|
5778
|
-
(0,
|
|
5690
|
+
(0, import_react34.useCallback)((newValue) => onChange?.(newValue ?? []), [onChange])
|
|
5779
5691
|
);
|
|
5780
5692
|
const internalValue = rawValue ?? EMPTY_VALUE;
|
|
5781
|
-
const parentRef = (0,
|
|
5782
|
-
const isInitialSortRef = (0,
|
|
5783
|
-
const prevOptionsRef = (0,
|
|
5784
|
-
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)(() => {
|
|
5785
5697
|
if (!searchTerm) return sortedOptions;
|
|
5786
5698
|
return sortedOptions.filter((option) => option.label.toLowerCase().includes(searchTerm.toLowerCase()));
|
|
5787
5699
|
}, [sortedOptions, searchTerm]);
|
|
5788
|
-
const itemSize = (0,
|
|
5700
|
+
const itemSize = (0, import_react34.useMemo)(() => {
|
|
5789
5701
|
switch (size) {
|
|
5790
5702
|
case "sm":
|
|
5791
5703
|
return 28;
|
|
@@ -5803,7 +5715,7 @@ function FilterableCheckboxGroup(inProps) {
|
|
|
5803
5715
|
overscan: 5
|
|
5804
5716
|
});
|
|
5805
5717
|
const items = virtualizer.getVirtualItems();
|
|
5806
|
-
(0,
|
|
5718
|
+
(0, import_react34.useEffect)(() => {
|
|
5807
5719
|
const optionsChanged = prevOptionsRef.current.length !== options.length || prevOptionsRef.current.some(
|
|
5808
5720
|
(prevOption, index) => prevOption.value !== options[index]?.value || prevOption.label !== options[index]?.label || prevOption.disabled !== options[index]?.disabled
|
|
5809
5721
|
);
|
|
@@ -5829,13 +5741,13 @@ function FilterableCheckboxGroup(inProps) {
|
|
|
5829
5741
|
}
|
|
5830
5742
|
}
|
|
5831
5743
|
}, [options, value]);
|
|
5832
|
-
(0,
|
|
5744
|
+
(0, import_react34.useEffect)(() => {
|
|
5833
5745
|
virtualizer.measure();
|
|
5834
5746
|
}, [virtualizer, filteredOptions, size]);
|
|
5835
|
-
const handleSearchChange = (0,
|
|
5747
|
+
const handleSearchChange = (0, import_react34.useCallback)((event) => {
|
|
5836
5748
|
setSearchTerm(event.target.value);
|
|
5837
5749
|
}, []);
|
|
5838
|
-
const handleCheckboxChange = (0,
|
|
5750
|
+
const handleCheckboxChange = (0, import_react34.useCallback)(
|
|
5839
5751
|
(optionValue) => (event) => {
|
|
5840
5752
|
const checked = event.target.checked;
|
|
5841
5753
|
const newValue = checked ? [...internalValue, optionValue] : internalValue.filter((v) => v !== optionValue);
|
|
@@ -5843,7 +5755,7 @@ function FilterableCheckboxGroup(inProps) {
|
|
|
5843
5755
|
},
|
|
5844
5756
|
[internalValue, setInternalValue]
|
|
5845
5757
|
);
|
|
5846
|
-
const handleSelectAll = (0,
|
|
5758
|
+
const handleSelectAll = (0, import_react34.useCallback)(
|
|
5847
5759
|
(event) => {
|
|
5848
5760
|
const checked = event.target.checked;
|
|
5849
5761
|
const enabledOptions = filteredOptions.filter((option) => !option.disabled);
|
|
@@ -5859,10 +5771,10 @@ function FilterableCheckboxGroup(inProps) {
|
|
|
5859
5771
|
},
|
|
5860
5772
|
[filteredOptions, internalValue, setInternalValue]
|
|
5861
5773
|
);
|
|
5862
|
-
const enabledFilteredOptions = (0,
|
|
5774
|
+
const enabledFilteredOptions = (0, import_react34.useMemo)(() => filteredOptions.filter((option) => !option.disabled), [filteredOptions]);
|
|
5863
5775
|
const isAllSelected = enabledFilteredOptions.length > 0 && enabledFilteredOptions.every((option) => internalValue.includes(option.value));
|
|
5864
5776
|
const isIndeterminate = !isAllSelected && enabledFilteredOptions.some((option) => internalValue.includes(option.value));
|
|
5865
|
-
return /* @__PURE__ */
|
|
5777
|
+
return /* @__PURE__ */ import_react34.default.createElement("div", { style: { width: "100%" } }, /* @__PURE__ */ import_react34.default.createElement(
|
|
5866
5778
|
Input_default,
|
|
5867
5779
|
{
|
|
5868
5780
|
label,
|
|
@@ -5875,9 +5787,9 @@ function FilterableCheckboxGroup(inProps) {
|
|
|
5875
5787
|
onChange: handleSearchChange,
|
|
5876
5788
|
size,
|
|
5877
5789
|
disabled,
|
|
5878
|
-
endDecorator: /* @__PURE__ */
|
|
5790
|
+
endDecorator: /* @__PURE__ */ import_react34.default.createElement(import_Search.default, null)
|
|
5879
5791
|
}
|
|
5880
|
-
), 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(
|
|
5881
5793
|
"div",
|
|
5882
5794
|
{
|
|
5883
5795
|
ref: parentRef,
|
|
@@ -5888,7 +5800,7 @@ function FilterableCheckboxGroup(inProps) {
|
|
|
5888
5800
|
marginTop: "8px"
|
|
5889
5801
|
}
|
|
5890
5802
|
},
|
|
5891
|
-
!searchTerm && /* @__PURE__ */
|
|
5803
|
+
!searchTerm && /* @__PURE__ */ import_react34.default.createElement(
|
|
5892
5804
|
Checkbox_default,
|
|
5893
5805
|
{
|
|
5894
5806
|
label: "Select all",
|
|
@@ -5905,7 +5817,7 @@ function FilterableCheckboxGroup(inProps) {
|
|
|
5905
5817
|
sx: { width: "100%", height: itemSize }
|
|
5906
5818
|
}
|
|
5907
5819
|
),
|
|
5908
|
-
/* @__PURE__ */
|
|
5820
|
+
/* @__PURE__ */ import_react34.default.createElement(
|
|
5909
5821
|
Stack_default,
|
|
5910
5822
|
{
|
|
5911
5823
|
sx: {
|
|
@@ -5915,11 +5827,11 @@ function FilterableCheckboxGroup(inProps) {
|
|
|
5915
5827
|
},
|
|
5916
5828
|
items.map((virtualRow) => {
|
|
5917
5829
|
const option = filteredOptions[virtualRow.index];
|
|
5918
|
-
return /* @__PURE__ */
|
|
5830
|
+
return /* @__PURE__ */ import_react34.default.createElement(
|
|
5919
5831
|
Checkbox_default,
|
|
5920
5832
|
{
|
|
5921
5833
|
key: virtualRow.key,
|
|
5922
|
-
label: /* @__PURE__ */
|
|
5834
|
+
label: /* @__PURE__ */ import_react34.default.createElement(LabelWithTooltip, { label: option.label, size }),
|
|
5923
5835
|
checked: internalValue.includes(option.value),
|
|
5924
5836
|
onChange: handleCheckboxChange(option.value),
|
|
5925
5837
|
size,
|
|
@@ -5947,16 +5859,16 @@ function FilterableCheckboxGroup(inProps) {
|
|
|
5947
5859
|
FilterableCheckboxGroup.displayName = "FilterableCheckboxGroup";
|
|
5948
5860
|
|
|
5949
5861
|
// src/components/FilterMenu/FilterMenu.tsx
|
|
5950
|
-
var
|
|
5862
|
+
var import_react47 = __toESM(require("react"));
|
|
5951
5863
|
var import_joy58 = require("@mui/joy");
|
|
5952
5864
|
|
|
5953
5865
|
// src/components/FilterMenu/components/CheckboxGroup.tsx
|
|
5954
|
-
var
|
|
5866
|
+
var import_react35 = __toESM(require("react"));
|
|
5955
5867
|
var import_joy45 = require("@mui/joy");
|
|
5956
5868
|
function CheckboxGroup(props) {
|
|
5957
5869
|
const { id, label, options, value, onChange, hidden } = props;
|
|
5958
5870
|
const [internalValue, setInternalValue] = useControlledState(value, [], onChange);
|
|
5959
|
-
const handleCheckboxChange = (0,
|
|
5871
|
+
const handleCheckboxChange = (0, import_react35.useCallback)(
|
|
5960
5872
|
(optionValue) => (event) => {
|
|
5961
5873
|
const checked = event.target.checked;
|
|
5962
5874
|
let newValue;
|
|
@@ -5972,7 +5884,7 @@ function CheckboxGroup(props) {
|
|
|
5972
5884
|
if (hidden) {
|
|
5973
5885
|
return null;
|
|
5974
5886
|
}
|
|
5975
|
-
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(
|
|
5976
5888
|
Checkbox_default,
|
|
5977
5889
|
{
|
|
5978
5890
|
key: `${id}-${option.value}`,
|
|
@@ -5985,12 +5897,12 @@ function CheckboxGroup(props) {
|
|
|
5985
5897
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
5986
5898
|
|
|
5987
5899
|
// src/components/FilterMenu/components/FilterableCheckboxGroup.tsx
|
|
5988
|
-
var
|
|
5900
|
+
var import_react36 = __toESM(require("react"));
|
|
5989
5901
|
var import_joy46 = require("@mui/joy");
|
|
5990
5902
|
function FilterableCheckboxGroup2(props) {
|
|
5991
5903
|
const { id, label, options, value, onChange, hidden, placeholder, maxHeight } = props;
|
|
5992
5904
|
const [internalValue, setInternalValue] = useControlledState(value, [], onChange);
|
|
5993
|
-
const handleChange = (0,
|
|
5905
|
+
const handleChange = (0, import_react36.useCallback)(
|
|
5994
5906
|
(newValue) => {
|
|
5995
5907
|
setInternalValue(newValue);
|
|
5996
5908
|
},
|
|
@@ -5999,7 +5911,7 @@ function FilterableCheckboxGroup2(props) {
|
|
|
5999
5911
|
if (hidden) {
|
|
6000
5912
|
return null;
|
|
6001
5913
|
}
|
|
6002
|
-
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(
|
|
6003
5915
|
FilterableCheckboxGroup,
|
|
6004
5916
|
{
|
|
6005
5917
|
value: internalValue ?? [],
|
|
@@ -6014,7 +5926,7 @@ function FilterableCheckboxGroup2(props) {
|
|
|
6014
5926
|
FilterableCheckboxGroup2.displayName = "FilterableCheckboxGroup";
|
|
6015
5927
|
|
|
6016
5928
|
// src/components/FilterMenu/components/RadioGroup.tsx
|
|
6017
|
-
var
|
|
5929
|
+
var import_react37 = __toESM(require("react"));
|
|
6018
5930
|
|
|
6019
5931
|
// src/components/Radio/Radio.tsx
|
|
6020
5932
|
var import_joy47 = require("@mui/joy");
|
|
@@ -6031,7 +5943,7 @@ var import_joy48 = require("@mui/joy");
|
|
|
6031
5943
|
function RadioGroup2(props) {
|
|
6032
5944
|
const { id, label, options, value, onChange, hidden } = props;
|
|
6033
5945
|
const [internalValue, setInternalValue] = useControlledState(value, value ?? "", onChange);
|
|
6034
|
-
const handleRadioChange = (0,
|
|
5946
|
+
const handleRadioChange = (0, import_react37.useCallback)(
|
|
6035
5947
|
(event) => {
|
|
6036
5948
|
const newValue = event.target.value;
|
|
6037
5949
|
const option = options.find((opt) => opt.value.toString() === newValue);
|
|
@@ -6043,12 +5955,12 @@ function RadioGroup2(props) {
|
|
|
6043
5955
|
if (hidden) {
|
|
6044
5956
|
return null;
|
|
6045
5957
|
}
|
|
6046
|
-
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 }))));
|
|
6047
5959
|
}
|
|
6048
5960
|
RadioGroup2.displayName = "RadioGroup";
|
|
6049
5961
|
|
|
6050
5962
|
// src/components/FilterMenu/components/DateRange.tsx
|
|
6051
|
-
var
|
|
5963
|
+
var import_react38 = __toESM(require("react"));
|
|
6052
5964
|
var import_joy49 = require("@mui/joy");
|
|
6053
5965
|
function DateRange(props) {
|
|
6054
5966
|
const {
|
|
@@ -6066,8 +5978,8 @@ function DateRange(props) {
|
|
|
6066
5978
|
hideClearButton
|
|
6067
5979
|
} = props;
|
|
6068
5980
|
const [internalValue, setInternalValue] = useControlledState(value, null, onChange);
|
|
6069
|
-
const [selectedOption, setSelectedOption] = (0,
|
|
6070
|
-
const dateRangeOptions = (0,
|
|
5981
|
+
const [selectedOption, setSelectedOption] = (0, import_react38.useState)("all-time");
|
|
5982
|
+
const dateRangeOptions = (0, import_react38.useMemo)(
|
|
6071
5983
|
() => [
|
|
6072
5984
|
{ label: "All Time", value: "all-time" },
|
|
6073
5985
|
{ label: "This Month", value: "this-month" },
|
|
@@ -6077,7 +5989,7 @@ function DateRange(props) {
|
|
|
6077
5989
|
],
|
|
6078
5990
|
[]
|
|
6079
5991
|
);
|
|
6080
|
-
const getDateRangeForOption = (0,
|
|
5992
|
+
const getDateRangeForOption = (0, import_react38.useCallback)(
|
|
6081
5993
|
(option) => {
|
|
6082
5994
|
const now = /* @__PURE__ */ new Date();
|
|
6083
5995
|
const currentYear = now.getFullYear();
|
|
@@ -6116,7 +6028,7 @@ function DateRange(props) {
|
|
|
6116
6028
|
},
|
|
6117
6029
|
[internalValue]
|
|
6118
6030
|
);
|
|
6119
|
-
const determineOptionFromValue = (0,
|
|
6031
|
+
const determineOptionFromValue = (0, import_react38.useCallback)(
|
|
6120
6032
|
(value2) => {
|
|
6121
6033
|
if (!value2) {
|
|
6122
6034
|
return "all-time";
|
|
@@ -6132,17 +6044,17 @@ function DateRange(props) {
|
|
|
6132
6044
|
},
|
|
6133
6045
|
[getDateRangeForOption]
|
|
6134
6046
|
);
|
|
6135
|
-
const customDateRangeValue = (0,
|
|
6047
|
+
const customDateRangeValue = (0, import_react38.useMemo)(() => {
|
|
6136
6048
|
if (selectedOption === "custom" && internalValue) {
|
|
6137
6049
|
return `${internalValue[0]} - ${internalValue[1]}`;
|
|
6138
6050
|
}
|
|
6139
6051
|
return "";
|
|
6140
6052
|
}, [selectedOption, internalValue]);
|
|
6141
|
-
(0,
|
|
6053
|
+
(0, import_react38.useEffect)(() => {
|
|
6142
6054
|
const newOption = determineOptionFromValue(internalValue);
|
|
6143
6055
|
setSelectedOption(newOption);
|
|
6144
6056
|
}, [internalValue, determineOptionFromValue]);
|
|
6145
|
-
const handleOptionChange = (0,
|
|
6057
|
+
const handleOptionChange = (0, import_react38.useCallback)(
|
|
6146
6058
|
(event) => {
|
|
6147
6059
|
const newOption = event.target.value;
|
|
6148
6060
|
setSelectedOption(newOption);
|
|
@@ -6151,7 +6063,7 @@ function DateRange(props) {
|
|
|
6151
6063
|
},
|
|
6152
6064
|
[getDateRangeForOption, setInternalValue]
|
|
6153
6065
|
);
|
|
6154
|
-
const handleCustomDateChange = (0,
|
|
6066
|
+
const handleCustomDateChange = (0, import_react38.useCallback)(
|
|
6155
6067
|
(event) => {
|
|
6156
6068
|
const dateRangeString = event.target.value;
|
|
6157
6069
|
if (dateRangeString && dateRangeString.includes(" - ")) {
|
|
@@ -6172,7 +6084,7 @@ function DateRange(props) {
|
|
|
6172
6084
|
if (hidden) {
|
|
6173
6085
|
return null;
|
|
6174
6086
|
}
|
|
6175
|
-
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(
|
|
6176
6088
|
DateRangePicker,
|
|
6177
6089
|
{
|
|
6178
6090
|
value: customDateRangeValue,
|
|
@@ -6191,11 +6103,11 @@ function DateRange(props) {
|
|
|
6191
6103
|
DateRange.displayName = "DateRange";
|
|
6192
6104
|
|
|
6193
6105
|
// src/components/FilterMenu/components/MonthRange.tsx
|
|
6194
|
-
var
|
|
6106
|
+
var import_react40 = __toESM(require("react"));
|
|
6195
6107
|
var import_joy51 = require("@mui/joy");
|
|
6196
6108
|
|
|
6197
6109
|
// src/components/MonthRangePicker/MonthRangePicker.tsx
|
|
6198
|
-
var
|
|
6110
|
+
var import_react39 = __toESM(require("react"));
|
|
6199
6111
|
var import_react_imask3 = require("react-imask");
|
|
6200
6112
|
var import_CalendarToday3 = __toESM(require("@mui/icons-material/CalendarToday"));
|
|
6201
6113
|
var import_joy50 = require("@mui/joy");
|
|
@@ -6256,9 +6168,9 @@ var parseDates2 = (str) => {
|
|
|
6256
6168
|
var formatToPattern3 = (format) => {
|
|
6257
6169
|
return `${format} - ${format}`.replace(/YYYY/g, "Y").replace(/MM/g, "m").replace(/[^YMm\s]/g, (match) => `${match}\``);
|
|
6258
6170
|
};
|
|
6259
|
-
var TextMaskAdapter7 =
|
|
6171
|
+
var TextMaskAdapter7 = import_react39.default.forwardRef(function TextMaskAdapter8(props, ref) {
|
|
6260
6172
|
const { onChange, format, ...other } = props;
|
|
6261
|
-
return /* @__PURE__ */
|
|
6173
|
+
return /* @__PURE__ */ import_react39.default.createElement(
|
|
6262
6174
|
import_react_imask3.IMaskInput,
|
|
6263
6175
|
{
|
|
6264
6176
|
...other,
|
|
@@ -6286,7 +6198,7 @@ var TextMaskAdapter7 = import_react40.default.forwardRef(function TextMaskAdapte
|
|
|
6286
6198
|
}
|
|
6287
6199
|
);
|
|
6288
6200
|
});
|
|
6289
|
-
var MonthRangePicker = (0,
|
|
6201
|
+
var MonthRangePicker = (0, import_react39.forwardRef)((inProps, ref) => {
|
|
6290
6202
|
const props = (0, import_joy50.useThemeProps)({ props: inProps, name: "MonthRangePicker" });
|
|
6291
6203
|
const {
|
|
6292
6204
|
onChange,
|
|
@@ -6310,24 +6222,24 @@ var MonthRangePicker = (0, import_react40.forwardRef)((inProps, ref) => {
|
|
|
6310
6222
|
} = props;
|
|
6311
6223
|
const displayFormat = displayFormatProp ?? format;
|
|
6312
6224
|
const isAlphabeticDisplay = hasAlphabeticMonth3(displayFormat);
|
|
6313
|
-
const innerRef = (0,
|
|
6314
|
-
const buttonRef = (0,
|
|
6225
|
+
const innerRef = (0, import_react39.useRef)(null);
|
|
6226
|
+
const buttonRef = (0, import_react39.useRef)(null);
|
|
6315
6227
|
const [rawValue, setValue] = useControlledState(
|
|
6316
6228
|
props.value,
|
|
6317
6229
|
props.defaultValue ?? null,
|
|
6318
|
-
(0,
|
|
6230
|
+
(0, import_react39.useCallback)(
|
|
6319
6231
|
(value2) => onChange?.({ target: { name: props.name, value: value2 ?? "" } }),
|
|
6320
6232
|
[props.name, onChange]
|
|
6321
6233
|
)
|
|
6322
6234
|
);
|
|
6323
6235
|
const value = rawValue ?? "";
|
|
6324
|
-
const [displayValue, setDisplayValue] = (0,
|
|
6236
|
+
const [displayValue, setDisplayValue] = (0, import_react39.useState)(
|
|
6325
6237
|
() => value ? formatValueString3(parseDates2(value), displayFormat, locale) : ""
|
|
6326
6238
|
);
|
|
6327
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
6239
|
+
const [anchorEl, setAnchorEl] = (0, import_react39.useState)(null);
|
|
6328
6240
|
const open = Boolean(anchorEl);
|
|
6329
|
-
const calendarValue = (0,
|
|
6330
|
-
(0,
|
|
6241
|
+
const calendarValue = (0, import_react39.useMemo)(() => value ? parseDates2(value) : void 0, [value]);
|
|
6242
|
+
(0, import_react39.useEffect)(() => {
|
|
6331
6243
|
if (value) {
|
|
6332
6244
|
try {
|
|
6333
6245
|
const dates = parseDates2(value);
|
|
@@ -6339,13 +6251,13 @@ var MonthRangePicker = (0, import_react40.forwardRef)((inProps, ref) => {
|
|
|
6339
6251
|
setDisplayValue("");
|
|
6340
6252
|
}
|
|
6341
6253
|
}, [displayFormat, locale, value]);
|
|
6342
|
-
(0,
|
|
6254
|
+
(0, import_react39.useEffect)(() => {
|
|
6343
6255
|
if (!anchorEl) {
|
|
6344
6256
|
innerRef.current?.blur();
|
|
6345
6257
|
}
|
|
6346
6258
|
}, [anchorEl, innerRef]);
|
|
6347
|
-
(0,
|
|
6348
|
-
const handleChange = (0,
|
|
6259
|
+
(0, import_react39.useImperativeHandle)(ref, () => innerRef.current, [innerRef]);
|
|
6260
|
+
const handleChange = (0, import_react39.useCallback)(
|
|
6349
6261
|
(event) => {
|
|
6350
6262
|
setDisplayValue(
|
|
6351
6263
|
event.target.value ? formatValueString3(parseDates2(event.target.value), displayFormat, locale) : ""
|
|
@@ -6354,7 +6266,7 @@ var MonthRangePicker = (0, import_react40.forwardRef)((inProps, ref) => {
|
|
|
6354
6266
|
},
|
|
6355
6267
|
[displayFormat, locale, setValue]
|
|
6356
6268
|
);
|
|
6357
|
-
const handleInputMouseDown = (0,
|
|
6269
|
+
const handleInputMouseDown = (0, import_react39.useCallback)(
|
|
6358
6270
|
(event) => {
|
|
6359
6271
|
if (isAlphabeticDisplay) {
|
|
6360
6272
|
event.preventDefault();
|
|
@@ -6363,14 +6275,14 @@ var MonthRangePicker = (0, import_react40.forwardRef)((inProps, ref) => {
|
|
|
6363
6275
|
},
|
|
6364
6276
|
[isAlphabeticDisplay, buttonRef]
|
|
6365
6277
|
);
|
|
6366
|
-
const handleCalendarToggle = (0,
|
|
6278
|
+
const handleCalendarToggle = (0, import_react39.useCallback)(
|
|
6367
6279
|
(event) => {
|
|
6368
6280
|
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
6369
6281
|
innerRef.current?.focus();
|
|
6370
6282
|
},
|
|
6371
6283
|
[anchorEl, setAnchorEl, innerRef]
|
|
6372
6284
|
);
|
|
6373
|
-
const handleCalendarChange = (0,
|
|
6285
|
+
const handleCalendarChange = (0, import_react39.useCallback)(
|
|
6374
6286
|
([date1, date2]) => {
|
|
6375
6287
|
if (!date1 || !date2) return;
|
|
6376
6288
|
const formattedValue = formatValueString3([date1, date2], format);
|
|
@@ -6380,7 +6292,7 @@ var MonthRangePicker = (0, import_react40.forwardRef)((inProps, ref) => {
|
|
|
6380
6292
|
},
|
|
6381
6293
|
[setValue, setAnchorEl, format, displayFormat, locale]
|
|
6382
6294
|
);
|
|
6383
|
-
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(
|
|
6384
6296
|
Input_default,
|
|
6385
6297
|
{
|
|
6386
6298
|
...innerProps,
|
|
@@ -6410,7 +6322,7 @@ var MonthRangePicker = (0, import_react40.forwardRef)((inProps, ref) => {
|
|
|
6410
6322
|
// NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
|
|
6411
6323
|
fontFamily: "monospace"
|
|
6412
6324
|
},
|
|
6413
|
-
endDecorator: /* @__PURE__ */
|
|
6325
|
+
endDecorator: /* @__PURE__ */ import_react39.default.createElement(
|
|
6414
6326
|
IconButton_default,
|
|
6415
6327
|
{
|
|
6416
6328
|
ref: buttonRef,
|
|
@@ -6421,12 +6333,12 @@ var MonthRangePicker = (0, import_react40.forwardRef)((inProps, ref) => {
|
|
|
6421
6333
|
"aria-haspopup": "dialog",
|
|
6422
6334
|
"aria-expanded": open
|
|
6423
6335
|
},
|
|
6424
|
-
/* @__PURE__ */
|
|
6336
|
+
/* @__PURE__ */ import_react39.default.createElement(import_CalendarToday3.default, null)
|
|
6425
6337
|
),
|
|
6426
6338
|
label,
|
|
6427
6339
|
helperText
|
|
6428
6340
|
}
|
|
6429
|
-
), open && /* @__PURE__ */
|
|
6341
|
+
), open && /* @__PURE__ */ import_react39.default.createElement(import_base5.ClickAwayListener, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ import_react39.default.createElement(
|
|
6430
6342
|
StyledPopper3,
|
|
6431
6343
|
{
|
|
6432
6344
|
id: "month-range-picker-popper",
|
|
@@ -6445,7 +6357,7 @@ var MonthRangePicker = (0, import_react40.forwardRef)((inProps, ref) => {
|
|
|
6445
6357
|
"aria-label": "Calendar Tooltip",
|
|
6446
6358
|
"aria-expanded": open
|
|
6447
6359
|
},
|
|
6448
|
-
/* @__PURE__ */
|
|
6360
|
+
/* @__PURE__ */ import_react39.default.createElement(CalendarSheet3, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ import_react39.default.createElement(
|
|
6449
6361
|
Calendar_default,
|
|
6450
6362
|
{
|
|
6451
6363
|
view: "month",
|
|
@@ -6459,14 +6371,14 @@ var MonthRangePicker = (0, import_react40.forwardRef)((inProps, ref) => {
|
|
|
6459
6371
|
disablePast,
|
|
6460
6372
|
locale
|
|
6461
6373
|
}
|
|
6462
|
-
), /* @__PURE__ */
|
|
6374
|
+
), /* @__PURE__ */ import_react39.default.createElement(
|
|
6463
6375
|
DialogActions_default,
|
|
6464
6376
|
{
|
|
6465
6377
|
sx: {
|
|
6466
6378
|
p: 1
|
|
6467
6379
|
}
|
|
6468
6380
|
},
|
|
6469
|
-
/* @__PURE__ */
|
|
6381
|
+
/* @__PURE__ */ import_react39.default.createElement(
|
|
6470
6382
|
Button_default,
|
|
6471
6383
|
{
|
|
6472
6384
|
size,
|
|
@@ -6501,11 +6413,11 @@ function MonthRange(props) {
|
|
|
6501
6413
|
locale
|
|
6502
6414
|
} = props;
|
|
6503
6415
|
const [internalValue, setInternalValue] = useControlledState(value, null, onChange);
|
|
6504
|
-
const pickerValue = (0,
|
|
6416
|
+
const pickerValue = (0, import_react40.useMemo)(
|
|
6505
6417
|
() => internalValue ? `${internalValue[0]} - ${internalValue[1]}` : "",
|
|
6506
6418
|
[internalValue]
|
|
6507
6419
|
);
|
|
6508
|
-
const handleChange = (0,
|
|
6420
|
+
const handleChange = (0, import_react40.useCallback)(
|
|
6509
6421
|
(event) => {
|
|
6510
6422
|
const rangeString = event.target.value;
|
|
6511
6423
|
if (rangeString && rangeString.includes(" - ")) {
|
|
@@ -6522,7 +6434,7 @@ function MonthRange(props) {
|
|
|
6522
6434
|
if (hidden) {
|
|
6523
6435
|
return null;
|
|
6524
6436
|
}
|
|
6525
|
-
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(
|
|
6526
6438
|
MonthRangePicker,
|
|
6527
6439
|
{
|
|
6528
6440
|
value: pickerValue,
|
|
@@ -6540,12 +6452,12 @@ function MonthRange(props) {
|
|
|
6540
6452
|
MonthRange.displayName = "MonthRange";
|
|
6541
6453
|
|
|
6542
6454
|
// src/components/FilterMenu/components/CurrencyInput.tsx
|
|
6543
|
-
var
|
|
6455
|
+
var import_react41 = __toESM(require("react"));
|
|
6544
6456
|
var import_joy52 = require("@mui/joy");
|
|
6545
6457
|
function CurrencyInput3(props) {
|
|
6546
6458
|
const { id, label, value, onChange, hidden, max, placeholder, useMinorUnit, currency = "USD" } = props;
|
|
6547
6459
|
const [internalValue, setInternalValue] = useControlledState(value, value, onChange);
|
|
6548
|
-
const handleCurrencyChange = (0,
|
|
6460
|
+
const handleCurrencyChange = (0, import_react41.useCallback)(
|
|
6549
6461
|
(event) => {
|
|
6550
6462
|
const newValue = event.target.value ?? void 0;
|
|
6551
6463
|
setInternalValue(newValue);
|
|
@@ -6555,7 +6467,7 @@ function CurrencyInput3(props) {
|
|
|
6555
6467
|
if (hidden) {
|
|
6556
6468
|
return null;
|
|
6557
6469
|
}
|
|
6558
|
-
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(
|
|
6559
6471
|
CurrencyInput,
|
|
6560
6472
|
{
|
|
6561
6473
|
value: internalValue,
|
|
@@ -6571,14 +6483,14 @@ function CurrencyInput3(props) {
|
|
|
6571
6483
|
CurrencyInput3.displayName = "CurrencyInput";
|
|
6572
6484
|
|
|
6573
6485
|
// src/components/FilterMenu/components/CurrencyRange.tsx
|
|
6574
|
-
var
|
|
6486
|
+
var import_react42 = __toESM(require("react"));
|
|
6575
6487
|
var import_joy53 = require("@mui/joy");
|
|
6576
6488
|
function CurrencyRange(props) {
|
|
6577
6489
|
const { id, label, value, onChange, hidden, max, placeholder, useMinorUnit, currency = "USD" } = props;
|
|
6578
6490
|
const [internalValue, setInternalValue] = useControlledState(value, null, onChange);
|
|
6579
6491
|
const minValue = internalValue?.[0];
|
|
6580
6492
|
const maxValue = internalValue?.[1];
|
|
6581
|
-
const handleMinChange = (0,
|
|
6493
|
+
const handleMinChange = (0, import_react42.useCallback)(
|
|
6582
6494
|
(event) => {
|
|
6583
6495
|
const newMinValue = event.target.value ?? void 0;
|
|
6584
6496
|
const currentMaxValue = maxValue;
|
|
@@ -6592,7 +6504,7 @@ function CurrencyRange(props) {
|
|
|
6592
6504
|
},
|
|
6593
6505
|
[maxValue, setInternalValue]
|
|
6594
6506
|
);
|
|
6595
|
-
const handleMaxChange = (0,
|
|
6507
|
+
const handleMaxChange = (0, import_react42.useCallback)(
|
|
6596
6508
|
(event) => {
|
|
6597
6509
|
const newMaxValue = event.target.value ?? void 0;
|
|
6598
6510
|
const currentMinValue = minValue;
|
|
@@ -6609,7 +6521,7 @@ function CurrencyRange(props) {
|
|
|
6609
6521
|
if (hidden) {
|
|
6610
6522
|
return null;
|
|
6611
6523
|
}
|
|
6612
|
-
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(
|
|
6613
6525
|
CurrencyInput,
|
|
6614
6526
|
{
|
|
6615
6527
|
label: "Minimum",
|
|
@@ -6622,7 +6534,7 @@ function CurrencyRange(props) {
|
|
|
6622
6534
|
"aria-labelledby": label ? id : void 0,
|
|
6623
6535
|
"aria-label": "Minimum amount"
|
|
6624
6536
|
}
|
|
6625
|
-
), /* @__PURE__ */
|
|
6537
|
+
), /* @__PURE__ */ import_react42.default.createElement(
|
|
6626
6538
|
CurrencyInput,
|
|
6627
6539
|
{
|
|
6628
6540
|
label: "Maximum",
|
|
@@ -6640,20 +6552,20 @@ function CurrencyRange(props) {
|
|
|
6640
6552
|
CurrencyRange.displayName = "CurrencyRange";
|
|
6641
6553
|
|
|
6642
6554
|
// src/components/FilterMenu/components/PercentageInput.tsx
|
|
6643
|
-
var
|
|
6555
|
+
var import_react44 = __toESM(require("react"));
|
|
6644
6556
|
var import_joy55 = require("@mui/joy");
|
|
6645
6557
|
|
|
6646
6558
|
// src/components/PercentageInput/PercentageInput.tsx
|
|
6647
|
-
var
|
|
6559
|
+
var import_react43 = __toESM(require("react"));
|
|
6648
6560
|
var import_react_number_format2 = require("react-number-format");
|
|
6649
6561
|
var import_joy54 = require("@mui/joy");
|
|
6650
6562
|
var padDecimal = (value, decimalScale) => {
|
|
6651
6563
|
const [integer, decimal = ""] = `${value}`.split(".");
|
|
6652
6564
|
return Number(`${integer}${decimal.padEnd(decimalScale, "0")}`);
|
|
6653
6565
|
};
|
|
6654
|
-
var TextMaskAdapter9 =
|
|
6566
|
+
var TextMaskAdapter9 = import_react43.default.forwardRef(function TextMaskAdapter10(props, ref) {
|
|
6655
6567
|
const { onChange, min, max, ...innerProps } = props;
|
|
6656
|
-
return /* @__PURE__ */
|
|
6568
|
+
return /* @__PURE__ */ import_react43.default.createElement(
|
|
6657
6569
|
import_react_number_format2.NumericFormat,
|
|
6658
6570
|
{
|
|
6659
6571
|
...innerProps,
|
|
@@ -6678,7 +6590,7 @@ var PercentageInputRoot = (0, import_joy54.styled)(Input_default, {
|
|
|
6678
6590
|
slot: "Root",
|
|
6679
6591
|
overridesResolver: (props, styles) => styles.root
|
|
6680
6592
|
})({});
|
|
6681
|
-
var PercentageInput =
|
|
6593
|
+
var PercentageInput = import_react43.default.forwardRef(
|
|
6682
6594
|
function PercentageInput2(inProps, ref) {
|
|
6683
6595
|
const props = (0, import_joy54.useThemeProps)({ props: inProps, name: "PercentageInput" });
|
|
6684
6596
|
const {
|
|
@@ -6701,19 +6613,19 @@ var PercentageInput = import_react44.default.forwardRef(
|
|
|
6701
6613
|
const [_value, setValue] = useControlledState(
|
|
6702
6614
|
props.value,
|
|
6703
6615
|
props.defaultValue ?? null,
|
|
6704
|
-
(0,
|
|
6616
|
+
(0, import_react43.useCallback)((value2) => onChange?.({ target: { name, value: value2 } }), [onChange, name])
|
|
6705
6617
|
);
|
|
6706
|
-
const value = (0,
|
|
6618
|
+
const value = (0, import_react43.useMemo)(() => {
|
|
6707
6619
|
if (_value && useMinorUnit) {
|
|
6708
6620
|
return _value / Math.pow(10, maxDecimalScale);
|
|
6709
6621
|
}
|
|
6710
6622
|
return _value;
|
|
6711
6623
|
}, [_value, useMinorUnit, maxDecimalScale]);
|
|
6712
|
-
const internalError = (0,
|
|
6624
|
+
const internalError = (0, import_react43.useMemo)(
|
|
6713
6625
|
() => value != null && (max != null && value > max || min != null && value < min),
|
|
6714
6626
|
[max, min, value]
|
|
6715
6627
|
);
|
|
6716
|
-
const handleChange = (0,
|
|
6628
|
+
const handleChange = (0, import_react43.useCallback)(
|
|
6717
6629
|
(event) => {
|
|
6718
6630
|
if (event.target.value === "") {
|
|
6719
6631
|
setValue(null);
|
|
@@ -6725,7 +6637,7 @@ var PercentageInput = import_react44.default.forwardRef(
|
|
|
6725
6637
|
},
|
|
6726
6638
|
[setValue, useMinorUnit, maxDecimalScale]
|
|
6727
6639
|
);
|
|
6728
|
-
return /* @__PURE__ */
|
|
6640
|
+
return /* @__PURE__ */ import_react43.default.createElement(
|
|
6729
6641
|
PercentageInputRoot,
|
|
6730
6642
|
{
|
|
6731
6643
|
...innerProps,
|
|
@@ -6772,7 +6684,7 @@ var PercentageInput3 = ({
|
|
|
6772
6684
|
if (hidden) {
|
|
6773
6685
|
return null;
|
|
6774
6686
|
}
|
|
6775
|
-
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(
|
|
6776
6688
|
PercentageInput,
|
|
6777
6689
|
{
|
|
6778
6690
|
value: _value,
|
|
@@ -6787,7 +6699,7 @@ var PercentageInput3 = ({
|
|
|
6787
6699
|
};
|
|
6788
6700
|
|
|
6789
6701
|
// src/components/FilterMenu/components/PercentageRange.tsx
|
|
6790
|
-
var
|
|
6702
|
+
var import_react45 = __toESM(require("react"));
|
|
6791
6703
|
var import_joy56 = require("@mui/joy");
|
|
6792
6704
|
function PercentageRange(props) {
|
|
6793
6705
|
const { id, label, value, onChange, hidden, useMinorUnit, maxDecimalScale, min, max } = props;
|
|
@@ -6798,7 +6710,7 @@ function PercentageRange(props) {
|
|
|
6798
6710
|
);
|
|
6799
6711
|
const minValue = internalValue?.[0];
|
|
6800
6712
|
const maxValue = internalValue?.[1];
|
|
6801
|
-
const handleMinChange = (0,
|
|
6713
|
+
const handleMinChange = (0, import_react45.useCallback)(
|
|
6802
6714
|
(event) => {
|
|
6803
6715
|
const newMinValue = event.target.value ?? void 0;
|
|
6804
6716
|
const currentMaxValue = maxValue;
|
|
@@ -6810,7 +6722,7 @@ function PercentageRange(props) {
|
|
|
6810
6722
|
},
|
|
6811
6723
|
[maxValue, setInternalValue]
|
|
6812
6724
|
);
|
|
6813
|
-
const handleMaxChange = (0,
|
|
6725
|
+
const handleMaxChange = (0, import_react45.useCallback)(
|
|
6814
6726
|
(event) => {
|
|
6815
6727
|
const newMaxValue = event.target.value ?? void 0;
|
|
6816
6728
|
const currentMinValue = minValue;
|
|
@@ -6825,7 +6737,7 @@ function PercentageRange(props) {
|
|
|
6825
6737
|
if (hidden) {
|
|
6826
6738
|
return null;
|
|
6827
6739
|
}
|
|
6828
|
-
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(
|
|
6829
6741
|
PercentageInput,
|
|
6830
6742
|
{
|
|
6831
6743
|
label: "Minimum",
|
|
@@ -6839,7 +6751,7 @@ function PercentageRange(props) {
|
|
|
6839
6751
|
"aria-label": "Minimum percentage",
|
|
6840
6752
|
placeholder: "0%"
|
|
6841
6753
|
}
|
|
6842
|
-
), /* @__PURE__ */
|
|
6754
|
+
), /* @__PURE__ */ import_react45.default.createElement(
|
|
6843
6755
|
PercentageInput,
|
|
6844
6756
|
{
|
|
6845
6757
|
label: "Maximum",
|
|
@@ -6858,13 +6770,13 @@ function PercentageRange(props) {
|
|
|
6858
6770
|
PercentageRange.displayName = "PercentageRange";
|
|
6859
6771
|
|
|
6860
6772
|
// src/components/FilterMenu/components/Autocomplete.tsx
|
|
6861
|
-
var
|
|
6773
|
+
var import_react46 = __toESM(require("react"));
|
|
6862
6774
|
var import_joy57 = require("@mui/joy");
|
|
6863
6775
|
function Autocomplete2(props) {
|
|
6864
6776
|
const { id, label, value, onChange, options, multiple, hidden, placeholder } = props;
|
|
6865
6777
|
const [internalValue, setInternalValue] = useControlledState(value, void 0, onChange);
|
|
6866
6778
|
const autocompleteValue = typeof internalValue === "string" || typeof internalValue === "number" ? String(internalValue) : void 0;
|
|
6867
|
-
const handleChange = (0,
|
|
6779
|
+
const handleChange = (0, import_react46.useCallback)(
|
|
6868
6780
|
(event) => {
|
|
6869
6781
|
const val = event.target.value ?? void 0;
|
|
6870
6782
|
if (val) {
|
|
@@ -6879,7 +6791,7 @@ function Autocomplete2(props) {
|
|
|
6879
6791
|
if (hidden) {
|
|
6880
6792
|
return null;
|
|
6881
6793
|
}
|
|
6882
|
-
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(
|
|
6883
6795
|
Autocomplete,
|
|
6884
6796
|
{
|
|
6885
6797
|
value: autocompleteValue,
|
|
@@ -6914,13 +6826,13 @@ function FilterMenu(props) {
|
|
|
6914
6826
|
void 0
|
|
6915
6827
|
// onChange는 Apply 버튼에서만 호출
|
|
6916
6828
|
);
|
|
6917
|
-
const dropdownRegistry = (0,
|
|
6918
|
-
(0,
|
|
6829
|
+
const dropdownRegistry = (0, import_react47.useContext)(DropdownNestedRegistryContext);
|
|
6830
|
+
(0, import_react47.useEffect)(() => {
|
|
6919
6831
|
if (!dropdownRegistry) return void 0;
|
|
6920
6832
|
dropdownRegistry.register();
|
|
6921
6833
|
return () => dropdownRegistry.unregister();
|
|
6922
6834
|
}, [dropdownRegistry]);
|
|
6923
|
-
const handleFilterChange = (0,
|
|
6835
|
+
const handleFilterChange = (0, import_react47.useCallback)(
|
|
6924
6836
|
(filterId, value) => {
|
|
6925
6837
|
setInternalValues((prev) => ({
|
|
6926
6838
|
...prev,
|
|
@@ -6929,17 +6841,17 @@ function FilterMenu(props) {
|
|
|
6929
6841
|
},
|
|
6930
6842
|
[setInternalValues]
|
|
6931
6843
|
);
|
|
6932
|
-
const handleApply = (0,
|
|
6844
|
+
const handleApply = (0, import_react47.useCallback)(() => {
|
|
6933
6845
|
onChange?.(internalValues);
|
|
6934
6846
|
onClose?.();
|
|
6935
6847
|
}, [onChange, onClose, internalValues]);
|
|
6936
|
-
const handleClear = (0,
|
|
6848
|
+
const handleClear = (0, import_react47.useCallback)(() => {
|
|
6937
6849
|
const clearedValues = resetValues || {};
|
|
6938
6850
|
setInternalValues(clearedValues);
|
|
6939
6851
|
onChange?.(clearedValues);
|
|
6940
6852
|
onClose?.();
|
|
6941
6853
|
}, [resetValues, setInternalValues, onChange, onClose]);
|
|
6942
|
-
return /* @__PURE__ */
|
|
6854
|
+
return /* @__PURE__ */ import_react47.default.createElement(
|
|
6943
6855
|
ModalDialog,
|
|
6944
6856
|
{
|
|
6945
6857
|
sx: {
|
|
@@ -6949,9 +6861,9 @@ function FilterMenu(props) {
|
|
|
6949
6861
|
top: "initial"
|
|
6950
6862
|
}
|
|
6951
6863
|
},
|
|
6952
|
-
/* @__PURE__ */
|
|
6864
|
+
/* @__PURE__ */ import_react47.default.createElement(DialogContent, { sx: { paddingTop: 5 } }, /* @__PURE__ */ import_react47.default.createElement(import_joy58.Stack, { spacing: 6 }, filters?.map((filter) => {
|
|
6953
6865
|
const FilterComponent = componentMap[filter.type];
|
|
6954
|
-
return FilterComponent ? /* @__PURE__ */
|
|
6866
|
+
return FilterComponent ? /* @__PURE__ */ import_react47.default.createElement(
|
|
6955
6867
|
FilterComponent,
|
|
6956
6868
|
{
|
|
6957
6869
|
key: filter.id,
|
|
@@ -6963,13 +6875,13 @@ function FilterMenu(props) {
|
|
|
6963
6875
|
}
|
|
6964
6876
|
) : null;
|
|
6965
6877
|
}))),
|
|
6966
|
-
/* @__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"))
|
|
6967
6879
|
);
|
|
6968
6880
|
}
|
|
6969
6881
|
FilterMenu.displayName = "FilterMenu";
|
|
6970
6882
|
|
|
6971
6883
|
// src/components/Uploader/Uploader.tsx
|
|
6972
|
-
var
|
|
6884
|
+
var import_react48 = __toESM(require("react"));
|
|
6973
6885
|
var import_joy59 = require("@mui/joy");
|
|
6974
6886
|
var import_CloudUploadRounded = __toESM(require("@mui/icons-material/CloudUploadRounded"));
|
|
6975
6887
|
var import_UploadFileRounded = __toESM(require("@mui/icons-material/UploadFileRounded"));
|
|
@@ -7032,7 +6944,7 @@ var getFileSize = (n) => {
|
|
|
7032
6944
|
};
|
|
7033
6945
|
var Preview = (props) => {
|
|
7034
6946
|
const { files, uploaded, onDelete } = props;
|
|
7035
|
-
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(
|
|
7036
6948
|
Typography_default,
|
|
7037
6949
|
{
|
|
7038
6950
|
level: "body-sm",
|
|
@@ -7044,7 +6956,7 @@ var Preview = (props) => {
|
|
|
7044
6956
|
}
|
|
7045
6957
|
},
|
|
7046
6958
|
file.name
|
|
7047
|
-
), !!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))))));
|
|
7048
6960
|
};
|
|
7049
6961
|
var UploaderRoot = (0, import_joy59.styled)(Stack_default, {
|
|
7050
6962
|
name: "Uploader",
|
|
@@ -7087,7 +6999,7 @@ var UploaderIcon = (0, import_joy59.styled)(import_CloudUploadRounded.default, {
|
|
|
7087
6999
|
}
|
|
7088
7000
|
})
|
|
7089
7001
|
);
|
|
7090
|
-
var Uploader =
|
|
7002
|
+
var Uploader = import_react48.default.memo((props) => {
|
|
7091
7003
|
const {
|
|
7092
7004
|
accept,
|
|
7093
7005
|
minCount,
|
|
@@ -7103,14 +7015,14 @@ var Uploader = import_react49.default.memo((props) => {
|
|
|
7103
7015
|
error: errorProp,
|
|
7104
7016
|
helperText: helperTextProp
|
|
7105
7017
|
} = props;
|
|
7106
|
-
const dropZoneRef = (0,
|
|
7107
|
-
const inputRef = (0,
|
|
7108
|
-
const [errorText, setErrorText] = (0,
|
|
7109
|
-
const [files, setFiles] = (0,
|
|
7110
|
-
const [uploaded, setUploaded] = (0,
|
|
7111
|
-
const [previewState, setPreviewState] = (0,
|
|
7112
|
-
const accepts = (0,
|
|
7113
|
-
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)(
|
|
7114
7026
|
() => accepts.flatMap((type) => {
|
|
7115
7027
|
if (["image/*", "video/*", "audio/*"].includes(type)) {
|
|
7116
7028
|
return ALL_EXTENSIONS_BY_TYPE[type];
|
|
@@ -7119,7 +7031,7 @@ var Uploader = import_react49.default.memo((props) => {
|
|
|
7119
7031
|
}),
|
|
7120
7032
|
[accepts]
|
|
7121
7033
|
);
|
|
7122
|
-
const helperText = (0,
|
|
7034
|
+
const helperText = (0, import_react48.useMemo)(() => {
|
|
7123
7035
|
if (helperTextProp) {
|
|
7124
7036
|
return helperTextProp;
|
|
7125
7037
|
}
|
|
@@ -7149,12 +7061,12 @@ var Uploader = import_react49.default.memo((props) => {
|
|
|
7149
7061
|
}
|
|
7150
7062
|
return helperTexts.join(", ");
|
|
7151
7063
|
}, [accepts, maxFileTotalSize, maxCount, helperTextProp]);
|
|
7152
|
-
const error = (0,
|
|
7153
|
-
const showDropZone = (0,
|
|
7064
|
+
const error = (0, import_react48.useMemo)(() => !!errorText || errorProp, [errorProp, errorText]);
|
|
7065
|
+
const showDropZone = (0, import_react48.useMemo)(
|
|
7154
7066
|
() => !maxCount || maxCount && [...uploaded, ...files].length !== maxCount,
|
|
7155
7067
|
[files, maxCount, uploaded]
|
|
7156
7068
|
);
|
|
7157
|
-
const addFiles = (0,
|
|
7069
|
+
const addFiles = (0, import_react48.useCallback)(
|
|
7158
7070
|
(uploads) => {
|
|
7159
7071
|
try {
|
|
7160
7072
|
const types = parsedAccepts.map((type) => type.replace(".", "")) || [];
|
|
@@ -7199,7 +7111,7 @@ var Uploader = import_react49.default.memo((props) => {
|
|
|
7199
7111
|
},
|
|
7200
7112
|
[files, uploaded, maxCount, parsedAccepts, maxFileSize, maxFileTotalSize, name, onChange]
|
|
7201
7113
|
);
|
|
7202
|
-
(0,
|
|
7114
|
+
(0, import_react48.useEffect)(() => {
|
|
7203
7115
|
if (!dropZoneRef.current || disabled) {
|
|
7204
7116
|
return;
|
|
7205
7117
|
}
|
|
@@ -7227,7 +7139,7 @@ var Uploader = import_react49.default.memo((props) => {
|
|
|
7227
7139
|
})
|
|
7228
7140
|
);
|
|
7229
7141
|
}, [disabled, addFiles]);
|
|
7230
|
-
(0,
|
|
7142
|
+
(0, import_react48.useEffect)(() => {
|
|
7231
7143
|
if (inputRef.current && minCount) {
|
|
7232
7144
|
if (files.length < minCount) {
|
|
7233
7145
|
inputRef.current.setCustomValidity(`At least ${minCount} files are required.`);
|
|
@@ -7236,14 +7148,14 @@ var Uploader = import_react49.default.memo((props) => {
|
|
|
7236
7148
|
}
|
|
7237
7149
|
}
|
|
7238
7150
|
}, [inputRef, files, minCount]);
|
|
7239
|
-
const handleFileChanged = (0,
|
|
7151
|
+
const handleFileChanged = (0, import_react48.useCallback)(
|
|
7240
7152
|
(event) => {
|
|
7241
7153
|
const files2 = Array.from(event.target.files || []);
|
|
7242
7154
|
addFiles(files2);
|
|
7243
7155
|
},
|
|
7244
7156
|
[addFiles]
|
|
7245
7157
|
);
|
|
7246
|
-
const handleDeleteFile = (0,
|
|
7158
|
+
const handleDeleteFile = (0, import_react48.useCallback)(
|
|
7247
7159
|
(deletedFile) => {
|
|
7248
7160
|
if (deletedFile instanceof File) {
|
|
7249
7161
|
setFiles((current) => {
|
|
@@ -7263,10 +7175,10 @@ var Uploader = import_react49.default.memo((props) => {
|
|
|
7263
7175
|
},
|
|
7264
7176
|
[name, onChange, onDelete]
|
|
7265
7177
|
);
|
|
7266
|
-
const handleUploaderButtonClick = (0,
|
|
7178
|
+
const handleUploaderButtonClick = (0, import_react48.useCallback)(() => {
|
|
7267
7179
|
inputRef.current?.click();
|
|
7268
7180
|
}, []);
|
|
7269
|
-
const uploader = /* @__PURE__ */
|
|
7181
|
+
const uploader = /* @__PURE__ */ import_react48.default.createElement(
|
|
7270
7182
|
FileDropZone,
|
|
7271
7183
|
{
|
|
7272
7184
|
state: previewState,
|
|
@@ -7275,8 +7187,8 @@ var Uploader = import_react49.default.memo((props) => {
|
|
|
7275
7187
|
ref: dropZoneRef,
|
|
7276
7188
|
onClick: handleUploaderButtonClick
|
|
7277
7189
|
},
|
|
7278
|
-
/* @__PURE__ */
|
|
7279
|
-
/* @__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(
|
|
7280
7192
|
VisuallyHiddenInput,
|
|
7281
7193
|
{
|
|
7282
7194
|
disabled,
|
|
@@ -7299,7 +7211,7 @@ var Uploader = import_react49.default.memo((props) => {
|
|
|
7299
7211
|
}
|
|
7300
7212
|
)
|
|
7301
7213
|
);
|
|
7302
|
-
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 }));
|
|
7303
7215
|
});
|
|
7304
7216
|
Uploader.displayName = "Uploader";
|
|
7305
7217
|
|
|
@@ -7307,12 +7219,9 @@ Uploader.displayName = "Uploader";
|
|
|
7307
7219
|
var import_joy60 = require("@mui/joy");
|
|
7308
7220
|
|
|
7309
7221
|
// src/components/IconMenuButton/IconMenuButton.tsx
|
|
7310
|
-
var
|
|
7222
|
+
var import_react49 = __toESM(require("react"));
|
|
7311
7223
|
var import_joy61 = require("@mui/joy");
|
|
7312
|
-
|
|
7313
|
-
return /* @__PURE__ */ import_react50.default.createElement(import_joy61.IconButton, { ...rest, component: as ?? "button", ref });
|
|
7314
|
-
});
|
|
7315
|
-
function IconMenuButtonInner(props, ref) {
|
|
7224
|
+
function IconMenuButton(props) {
|
|
7316
7225
|
const {
|
|
7317
7226
|
size,
|
|
7318
7227
|
icon,
|
|
@@ -7323,10 +7232,8 @@ function IconMenuButtonInner(props, ref) {
|
|
|
7323
7232
|
variant = "plain",
|
|
7324
7233
|
placement = "bottom"
|
|
7325
7234
|
} = props;
|
|
7326
|
-
const { ref: buttonComponentRef, ...buttonComponentProps } = props.buttonComponentProps ?? {};
|
|
7327
|
-
const mergedButtonRef = useMergedRef(buttonComponentRef, ref);
|
|
7328
7235
|
if (!items.length) {
|
|
7329
|
-
return /* @__PURE__ */
|
|
7236
|
+
return /* @__PURE__ */ import_react49.default.createElement(
|
|
7330
7237
|
import_joy61.IconButton,
|
|
7331
7238
|
{
|
|
7332
7239
|
component: props.buttonComponent ?? "button",
|
|
@@ -7335,16 +7242,15 @@ function IconMenuButtonInner(props, ref) {
|
|
|
7335
7242
|
color,
|
|
7336
7243
|
disabled,
|
|
7337
7244
|
loading,
|
|
7338
|
-
...buttonComponentProps
|
|
7339
|
-
ref: mergedButtonRef
|
|
7245
|
+
...props.buttonComponentProps ?? {}
|
|
7340
7246
|
},
|
|
7341
7247
|
icon
|
|
7342
7248
|
);
|
|
7343
7249
|
}
|
|
7344
|
-
return /* @__PURE__ */
|
|
7250
|
+
return /* @__PURE__ */ import_react49.default.createElement(Dropdown_default, null, /* @__PURE__ */ import_react49.default.createElement(
|
|
7345
7251
|
import_joy61.MenuButton,
|
|
7346
7252
|
{
|
|
7347
|
-
slots: { root:
|
|
7253
|
+
slots: { root: import_joy61.IconButton },
|
|
7348
7254
|
slotProps: {
|
|
7349
7255
|
root: {
|
|
7350
7256
|
component: props.buttonComponent ?? "button",
|
|
@@ -7353,27 +7259,24 @@ function IconMenuButtonInner(props, ref) {
|
|
|
7353
7259
|
color,
|
|
7354
7260
|
disabled,
|
|
7355
7261
|
loading,
|
|
7356
|
-
...buttonComponentProps
|
|
7357
|
-
// Joy의 useSlot이 내부 ref와 이 ref를 합쳐준다. 위 no-items 분기와 같은 경로로 ref를 넘긴다.
|
|
7358
|
-
ref: mergedButtonRef
|
|
7262
|
+
...props.buttonComponentProps ?? {}
|
|
7359
7263
|
}
|
|
7360
7264
|
}
|
|
7361
7265
|
},
|
|
7362
7266
|
icon
|
|
7363
|
-
), /* @__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))));
|
|
7364
7268
|
}
|
|
7365
|
-
var IconMenuButton = import_react50.default.forwardRef(IconMenuButtonInner);
|
|
7366
7269
|
IconMenuButton.displayName = "IconMenuButton";
|
|
7367
7270
|
|
|
7368
7271
|
// src/components/Markdown/Markdown.tsx
|
|
7369
|
-
var
|
|
7272
|
+
var import_react50 = __toESM(require("react"));
|
|
7370
7273
|
var import_joy62 = require("@mui/joy");
|
|
7371
7274
|
var import_joy63 = require("@mui/joy");
|
|
7372
7275
|
var import_remark_gfm = __toESM(require("remark-gfm"));
|
|
7373
|
-
var LazyReactMarkdown = (0,
|
|
7276
|
+
var LazyReactMarkdown = (0, import_react50.lazy)(() => import("react-markdown"));
|
|
7374
7277
|
var Markdown = (props) => {
|
|
7375
|
-
const [rehypeAccent2, setRehypeAccent] = (0,
|
|
7376
|
-
(0,
|
|
7278
|
+
const [rehypeAccent2, setRehypeAccent] = (0, import_react50.useState)(null);
|
|
7279
|
+
(0, import_react50.useEffect)(() => {
|
|
7377
7280
|
const loadRehypeAccent = async () => {
|
|
7378
7281
|
const module2 = await Promise.resolve().then(() => (init_rehype_accent(), rehype_accent_exports));
|
|
7379
7282
|
setRehypeAccent(() => module2.rehypeAccent);
|
|
@@ -7395,8 +7298,8 @@ var Markdown = (props) => {
|
|
|
7395
7298
|
if (!rehypeAccent2) {
|
|
7396
7299
|
return null;
|
|
7397
7300
|
}
|
|
7398
|
-
return /* @__PURE__ */
|
|
7399
|
-
|
|
7301
|
+
return /* @__PURE__ */ import_react50.default.createElement(Typography, { component: "div", color, textColor, level: defaultLevel, ...innerProps }, /* @__PURE__ */ import_react50.default.createElement(
|
|
7302
|
+
import_react50.Suspense,
|
|
7400
7303
|
{
|
|
7401
7304
|
fallback: (
|
|
7402
7305
|
// While in the fallback state, prevent browser auto-translation (e.g. Chrome/Google Translate)
|
|
@@ -7404,10 +7307,10 @@ var Markdown = (props) => {
|
|
|
7404
7307
|
// swaps the fallback for the real content via insertBefore; if the browser has mutated the DOM
|
|
7405
7308
|
// in the meantime, the reference node's parent changes and React throws a DOMException
|
|
7406
7309
|
// ("Failed to execute 'insertBefore' on 'Node'"), crashing the subtree. (cf. facebook/react#11538)
|
|
7407
|
-
fallback || /* @__PURE__ */
|
|
7310
|
+
fallback || /* @__PURE__ */ import_react50.default.createElement(Typography, { translate: "no", className: "notranslate" }, /* @__PURE__ */ import_react50.default.createElement(import_joy62.Skeleton, null, content || ""))
|
|
7408
7311
|
)
|
|
7409
7312
|
},
|
|
7410
|
-
/* @__PURE__ */
|
|
7313
|
+
/* @__PURE__ */ import_react50.default.createElement(
|
|
7411
7314
|
LazyReactMarkdown,
|
|
7412
7315
|
{
|
|
7413
7316
|
...markdownOptions,
|
|
@@ -7415,17 +7318,17 @@ var Markdown = (props) => {
|
|
|
7415
7318
|
rehypePlugins: [[rehypeAccent2, { accentColor }]],
|
|
7416
7319
|
remarkPlugins: [import_remark_gfm.default],
|
|
7417
7320
|
components: {
|
|
7418
|
-
a: ({ children, href }) => /* @__PURE__ */
|
|
7419
|
-
hr: () => /* @__PURE__ */
|
|
7420
|
-
b: ({ children }) => /* @__PURE__ */
|
|
7421
|
-
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),
|
|
7422
7325
|
// Table components
|
|
7423
|
-
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)),
|
|
7424
7327
|
// Code components
|
|
7425
7328
|
code: ({ children, className }) => {
|
|
7426
7329
|
const isBlock = className?.startsWith("language-");
|
|
7427
7330
|
if (isBlock) {
|
|
7428
|
-
return /* @__PURE__ */
|
|
7331
|
+
return /* @__PURE__ */ import_react50.default.createElement(
|
|
7429
7332
|
Typography,
|
|
7430
7333
|
{
|
|
7431
7334
|
component: "code",
|
|
@@ -7439,7 +7342,7 @@ var Markdown = (props) => {
|
|
|
7439
7342
|
children
|
|
7440
7343
|
);
|
|
7441
7344
|
}
|
|
7442
|
-
return /* @__PURE__ */
|
|
7345
|
+
return /* @__PURE__ */ import_react50.default.createElement(
|
|
7443
7346
|
Typography,
|
|
7444
7347
|
{
|
|
7445
7348
|
component: "code",
|
|
@@ -7454,7 +7357,7 @@ var Markdown = (props) => {
|
|
|
7454
7357
|
children
|
|
7455
7358
|
);
|
|
7456
7359
|
},
|
|
7457
|
-
pre: ({ children }) => /* @__PURE__ */
|
|
7360
|
+
pre: ({ children }) => /* @__PURE__ */ import_react50.default.createElement(
|
|
7458
7361
|
Sheet,
|
|
7459
7362
|
{
|
|
7460
7363
|
variant: "soft",
|
|
@@ -7472,12 +7375,12 @@ var Markdown = (props) => {
|
|
|
7472
7375
|
// Task list checkbox
|
|
7473
7376
|
input: ({ checked, type }) => {
|
|
7474
7377
|
if (type === "checkbox") {
|
|
7475
|
-
return /* @__PURE__ */
|
|
7378
|
+
return /* @__PURE__ */ import_react50.default.createElement(Checkbox, { checked, disabled: true, size: "sm", sx: { mr: 1 } });
|
|
7476
7379
|
}
|
|
7477
|
-
return /* @__PURE__ */
|
|
7380
|
+
return /* @__PURE__ */ import_react50.default.createElement("input", { checked, type });
|
|
7478
7381
|
},
|
|
7479
7382
|
// Blockquote
|
|
7480
|
-
blockquote: ({ children }) => /* @__PURE__ */
|
|
7383
|
+
blockquote: ({ children }) => /* @__PURE__ */ import_react50.default.createElement(
|
|
7481
7384
|
Sheet,
|
|
7482
7385
|
{
|
|
7483
7386
|
variant: "soft",
|
|
@@ -7486,12 +7389,12 @@ var Markdown = (props) => {
|
|
|
7486
7389
|
children
|
|
7487
7390
|
),
|
|
7488
7391
|
// Image
|
|
7489
|
-
img: ({ src, alt }) => /* @__PURE__ */
|
|
7392
|
+
img: ({ src, alt }) => /* @__PURE__ */ import_react50.default.createElement("img", { src, alt, style: { maxWidth: "100%", borderRadius: "4px" } }),
|
|
7490
7393
|
// Text style components
|
|
7491
|
-
em: ({ children }) => /* @__PURE__ */
|
|
7492
|
-
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),
|
|
7493
7396
|
// Span for accent color (from rehype-accent plugin)
|
|
7494
|
-
span: ({ children, node }) => /* @__PURE__ */
|
|
7397
|
+
span: ({ children, node }) => /* @__PURE__ */ import_react50.default.createElement(Typography, { component: "span", textColor: node?.properties?.textColor }, children),
|
|
7495
7398
|
...markdownOptions?.components
|
|
7496
7399
|
}
|
|
7497
7400
|
}
|
|
@@ -7501,7 +7404,7 @@ var Markdown = (props) => {
|
|
|
7501
7404
|
Markdown.displayName = "Markdown";
|
|
7502
7405
|
|
|
7503
7406
|
// src/components/MenuButton/MenuButton.tsx
|
|
7504
|
-
var
|
|
7407
|
+
var import_react51 = __toESM(require("react"));
|
|
7505
7408
|
var import_joy64 = require("@mui/joy");
|
|
7506
7409
|
var import_ExpandMore = __toESM(require("@mui/icons-material/ExpandMore"));
|
|
7507
7410
|
function MenuButton2(props) {
|
|
@@ -7519,7 +7422,7 @@ function MenuButton2(props) {
|
|
|
7519
7422
|
placement = "bottom"
|
|
7520
7423
|
} = props;
|
|
7521
7424
|
if (!items.length) {
|
|
7522
|
-
return /* @__PURE__ */
|
|
7425
|
+
return /* @__PURE__ */ import_react51.default.createElement(
|
|
7523
7426
|
import_joy64.Button,
|
|
7524
7427
|
{
|
|
7525
7428
|
component: props.buttonComponent ?? "button",
|
|
@@ -7530,12 +7433,12 @@ function MenuButton2(props) {
|
|
|
7530
7433
|
loading,
|
|
7531
7434
|
startDecorator,
|
|
7532
7435
|
...props.buttonComponentProps ?? {},
|
|
7533
|
-
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)
|
|
7534
7437
|
},
|
|
7535
7438
|
buttonText
|
|
7536
7439
|
);
|
|
7537
7440
|
}
|
|
7538
|
-
return /* @__PURE__ */
|
|
7441
|
+
return /* @__PURE__ */ import_react51.default.createElement(Dropdown_default, null, /* @__PURE__ */ import_react51.default.createElement(
|
|
7539
7442
|
import_joy64.MenuButton,
|
|
7540
7443
|
{
|
|
7541
7444
|
component: props.buttonComponent ?? "button",
|
|
@@ -7546,15 +7449,15 @@ function MenuButton2(props) {
|
|
|
7546
7449
|
loading,
|
|
7547
7450
|
startDecorator,
|
|
7548
7451
|
...props.buttonComponentProps ?? {},
|
|
7549
|
-
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)
|
|
7550
7453
|
},
|
|
7551
7454
|
buttonText
|
|
7552
|
-
), /* @__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))));
|
|
7553
7456
|
}
|
|
7554
7457
|
MenuButton2.displayName = "MenuButton";
|
|
7555
7458
|
|
|
7556
7459
|
// src/components/MonthPicker/MonthPicker.tsx
|
|
7557
|
-
var
|
|
7460
|
+
var import_react52 = __toESM(require("react"));
|
|
7558
7461
|
var import_CalendarToday4 = __toESM(require("@mui/icons-material/CalendarToday"));
|
|
7559
7462
|
var import_joy65 = require("@mui/joy");
|
|
7560
7463
|
var import_base6 = require("@mui/base");
|
|
@@ -7610,7 +7513,7 @@ function parseDate4(dateString, format) {
|
|
|
7610
7513
|
const result = new Date(year, month, day);
|
|
7611
7514
|
return result;
|
|
7612
7515
|
}
|
|
7613
|
-
var MonthPicker = (0,
|
|
7516
|
+
var MonthPicker = (0, import_react52.forwardRef)((inProps, ref) => {
|
|
7614
7517
|
const props = (0, import_joy65.useThemeProps)({ props: inProps, name: "MonthPicker" });
|
|
7615
7518
|
const {
|
|
7616
7519
|
onChange,
|
|
@@ -7637,18 +7540,18 @@ var MonthPicker = (0, import_react53.forwardRef)((inProps, ref) => {
|
|
|
7637
7540
|
locale,
|
|
7638
7541
|
...innerProps
|
|
7639
7542
|
} = props;
|
|
7640
|
-
const innerRef = (0,
|
|
7641
|
-
const buttonRef = (0,
|
|
7543
|
+
const innerRef = (0, import_react52.useRef)(null);
|
|
7544
|
+
const buttonRef = (0, import_react52.useRef)(null);
|
|
7642
7545
|
const [rawValue, setValue, isControlled] = useControlledState(
|
|
7643
7546
|
props.value,
|
|
7644
7547
|
props.defaultValue ?? null,
|
|
7645
|
-
(0,
|
|
7548
|
+
(0, import_react52.useCallback)(
|
|
7646
7549
|
(value2) => onChange?.({ target: { name: props.name, value: value2 ?? "" } }),
|
|
7647
7550
|
[props.name, onChange]
|
|
7648
7551
|
)
|
|
7649
7552
|
);
|
|
7650
7553
|
const value = rawValue ?? "";
|
|
7651
|
-
const getFormattedDisplayValue = (0,
|
|
7554
|
+
const getFormattedDisplayValue = (0, import_react52.useCallback)(
|
|
7652
7555
|
(inputValue) => {
|
|
7653
7556
|
if (!inputValue) return "";
|
|
7654
7557
|
try {
|
|
@@ -7659,19 +7562,19 @@ var MonthPicker = (0, import_react53.forwardRef)((inProps, ref) => {
|
|
|
7659
7562
|
},
|
|
7660
7563
|
[format, displayFormat, locale]
|
|
7661
7564
|
);
|
|
7662
|
-
const [displayValue, setDisplayValue] = (0,
|
|
7663
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
7565
|
+
const [displayValue, setDisplayValue] = (0, import_react52.useState)(() => getFormattedDisplayValue(value));
|
|
7566
|
+
const [anchorEl, setAnchorEl] = (0, import_react52.useState)(null);
|
|
7664
7567
|
const open = Boolean(anchorEl);
|
|
7665
|
-
(0,
|
|
7568
|
+
(0, import_react52.useEffect)(() => {
|
|
7666
7569
|
if (!anchorEl) {
|
|
7667
7570
|
innerRef.current?.blur();
|
|
7668
7571
|
}
|
|
7669
7572
|
}, [anchorEl, innerRef]);
|
|
7670
|
-
(0,
|
|
7671
|
-
(0,
|
|
7573
|
+
(0, import_react52.useImperativeHandle)(ref, () => innerRef.current, [innerRef]);
|
|
7574
|
+
(0, import_react52.useEffect)(() => {
|
|
7672
7575
|
setDisplayValue(getFormattedDisplayValue(value));
|
|
7673
7576
|
}, [value, getFormattedDisplayValue]);
|
|
7674
|
-
const handleChange = (0,
|
|
7577
|
+
const handleChange = (0, import_react52.useCallback)(
|
|
7675
7578
|
(event) => {
|
|
7676
7579
|
const newValue = event.target.value;
|
|
7677
7580
|
setValue(newValue);
|
|
@@ -7681,21 +7584,21 @@ var MonthPicker = (0, import_react53.forwardRef)((inProps, ref) => {
|
|
|
7681
7584
|
},
|
|
7682
7585
|
[setValue, getFormattedDisplayValue, isControlled]
|
|
7683
7586
|
);
|
|
7684
|
-
const handleCalendarToggle = (0,
|
|
7587
|
+
const handleCalendarToggle = (0, import_react52.useCallback)(
|
|
7685
7588
|
(event) => {
|
|
7686
7589
|
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
7687
7590
|
innerRef.current?.focus();
|
|
7688
7591
|
},
|
|
7689
7592
|
[anchorEl, setAnchorEl, innerRef]
|
|
7690
7593
|
);
|
|
7691
|
-
const handleInputMouseDown = (0,
|
|
7594
|
+
const handleInputMouseDown = (0, import_react52.useCallback)(
|
|
7692
7595
|
(event) => {
|
|
7693
7596
|
event.preventDefault();
|
|
7694
7597
|
buttonRef.current?.focus();
|
|
7695
7598
|
},
|
|
7696
7599
|
[buttonRef]
|
|
7697
7600
|
);
|
|
7698
|
-
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(
|
|
7699
7602
|
Input_default,
|
|
7700
7603
|
{
|
|
7701
7604
|
...innerProps,
|
|
@@ -7725,7 +7628,7 @@ var MonthPicker = (0, import_react53.forwardRef)((inProps, ref) => {
|
|
|
7725
7628
|
// NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
|
|
7726
7629
|
fontFamily: "monospace"
|
|
7727
7630
|
},
|
|
7728
|
-
endDecorator: /* @__PURE__ */
|
|
7631
|
+
endDecorator: /* @__PURE__ */ import_react52.default.createElement(
|
|
7729
7632
|
IconButton_default,
|
|
7730
7633
|
{
|
|
7731
7634
|
ref: buttonRef,
|
|
@@ -7737,12 +7640,12 @@ var MonthPicker = (0, import_react53.forwardRef)((inProps, ref) => {
|
|
|
7737
7640
|
"aria-expanded": open,
|
|
7738
7641
|
disabled
|
|
7739
7642
|
},
|
|
7740
|
-
/* @__PURE__ */
|
|
7643
|
+
/* @__PURE__ */ import_react52.default.createElement(import_CalendarToday4.default, null)
|
|
7741
7644
|
),
|
|
7742
7645
|
label,
|
|
7743
7646
|
helperText
|
|
7744
7647
|
}
|
|
7745
|
-
), open && /* @__PURE__ */
|
|
7648
|
+
), open && /* @__PURE__ */ import_react52.default.createElement(import_base6.ClickAwayListener, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ import_react52.default.createElement(
|
|
7746
7649
|
StyledPopper4,
|
|
7747
7650
|
{
|
|
7748
7651
|
id: "month-picker-popper",
|
|
@@ -7761,7 +7664,7 @@ var MonthPicker = (0, import_react53.forwardRef)((inProps, ref) => {
|
|
|
7761
7664
|
"aria-label": "Calendar Tooltip",
|
|
7762
7665
|
"aria-expanded": open
|
|
7763
7666
|
},
|
|
7764
|
-
/* @__PURE__ */
|
|
7667
|
+
/* @__PURE__ */ import_react52.default.createElement(CalendarSheet4, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ import_react52.default.createElement(
|
|
7765
7668
|
Calendar_default,
|
|
7766
7669
|
{
|
|
7767
7670
|
view: "month",
|
|
@@ -7782,14 +7685,14 @@ var MonthPicker = (0, import_react53.forwardRef)((inProps, ref) => {
|
|
|
7782
7685
|
disablePast,
|
|
7783
7686
|
locale
|
|
7784
7687
|
}
|
|
7785
|
-
), /* @__PURE__ */
|
|
7688
|
+
), /* @__PURE__ */ import_react52.default.createElement(
|
|
7786
7689
|
DialogActions_default,
|
|
7787
7690
|
{
|
|
7788
7691
|
sx: {
|
|
7789
7692
|
p: 1
|
|
7790
7693
|
}
|
|
7791
7694
|
},
|
|
7792
|
-
/* @__PURE__ */
|
|
7695
|
+
/* @__PURE__ */ import_react52.default.createElement(
|
|
7793
7696
|
Button_default,
|
|
7794
7697
|
{
|
|
7795
7698
|
size,
|
|
@@ -7812,7 +7715,7 @@ var MonthPicker = (0, import_react53.forwardRef)((inProps, ref) => {
|
|
|
7812
7715
|
});
|
|
7813
7716
|
|
|
7814
7717
|
// src/components/NavigationGroup/NavigationGroup.tsx
|
|
7815
|
-
var
|
|
7718
|
+
var import_react53 = __toESM(require("react"));
|
|
7816
7719
|
var import_joy66 = require("@mui/joy");
|
|
7817
7720
|
var AccordionSummary2 = (0, import_joy66.styled)(import_joy66.AccordionSummary, {
|
|
7818
7721
|
name: "NavigationGroup",
|
|
@@ -7836,11 +7739,11 @@ var AccordionDetails2 = (0, import_joy66.styled)(import_joy66.AccordionDetails,
|
|
|
7836
7739
|
}));
|
|
7837
7740
|
function NavigationGroup(props) {
|
|
7838
7741
|
const { title, children, startDecorator, level, ...rest } = props;
|
|
7839
|
-
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));
|
|
7840
7743
|
}
|
|
7841
7744
|
|
|
7842
7745
|
// src/components/NavigationItem/NavigationItem.tsx
|
|
7843
|
-
var
|
|
7746
|
+
var import_react54 = __toESM(require("react"));
|
|
7844
7747
|
var import_joy67 = require("@mui/joy");
|
|
7845
7748
|
var ListItemButton = (0, import_joy67.styled)(import_joy67.ListItemButton, {
|
|
7846
7749
|
name: "NavigationItem",
|
|
@@ -7869,7 +7772,7 @@ function NavigationItem(props) {
|
|
|
7869
7772
|
const handleClick = () => {
|
|
7870
7773
|
onClick?.(id);
|
|
7871
7774
|
};
|
|
7872
|
-
return /* @__PURE__ */
|
|
7775
|
+
return /* @__PURE__ */ import_react54.default.createElement(import_joy67.ListItem, { ...rest }, /* @__PURE__ */ import_react54.default.createElement(
|
|
7873
7776
|
ListItemButton,
|
|
7874
7777
|
{
|
|
7875
7778
|
level,
|
|
@@ -7878,21 +7781,21 @@ function NavigationItem(props) {
|
|
|
7878
7781
|
"aria-current": selected,
|
|
7879
7782
|
onClick: handleClick
|
|
7880
7783
|
},
|
|
7881
|
-
startDecorator && /* @__PURE__ */
|
|
7784
|
+
startDecorator && /* @__PURE__ */ import_react54.default.createElement(import_joy67.ListItemDecorator, null, startDecorator),
|
|
7882
7785
|
children
|
|
7883
7786
|
));
|
|
7884
7787
|
}
|
|
7885
7788
|
|
|
7886
7789
|
// src/components/Navigator/Navigator.tsx
|
|
7887
|
-
var
|
|
7790
|
+
var import_react55 = __toESM(require("react"));
|
|
7888
7791
|
function Navigator(props) {
|
|
7889
7792
|
const { items, level = 0, onSelect } = props;
|
|
7890
7793
|
const handleItemClick = (id) => {
|
|
7891
7794
|
onSelect?.(id);
|
|
7892
7795
|
};
|
|
7893
|
-
return /* @__PURE__ */
|
|
7796
|
+
return /* @__PURE__ */ import_react55.default.createElement("div", null, items.map((item, index) => {
|
|
7894
7797
|
if (item.type === "item") {
|
|
7895
|
-
return /* @__PURE__ */
|
|
7798
|
+
return /* @__PURE__ */ import_react55.default.createElement(
|
|
7896
7799
|
NavigationItem,
|
|
7897
7800
|
{
|
|
7898
7801
|
key: item.id,
|
|
@@ -7905,7 +7808,7 @@ function Navigator(props) {
|
|
|
7905
7808
|
item.title
|
|
7906
7809
|
);
|
|
7907
7810
|
} else if (item.type === "group") {
|
|
7908
|
-
return /* @__PURE__ */
|
|
7811
|
+
return /* @__PURE__ */ import_react55.default.createElement(
|
|
7909
7812
|
NavigationGroup,
|
|
7910
7813
|
{
|
|
7911
7814
|
key: `${item.title}-${index}`,
|
|
@@ -7923,7 +7826,7 @@ function Navigator(props) {
|
|
|
7923
7826
|
Navigator.displayName = "Navigator";
|
|
7924
7827
|
|
|
7925
7828
|
// src/components/ProfileMenu/ProfileMenu.tsx
|
|
7926
|
-
var
|
|
7829
|
+
var import_react56 = __toESM(require("react"));
|
|
7927
7830
|
var import_joy68 = require("@mui/joy");
|
|
7928
7831
|
var import_base7 = require("@mui/base");
|
|
7929
7832
|
var import_ArrowDropDown = __toESM(require("@mui/icons-material/ArrowDropDown"));
|
|
@@ -7933,9 +7836,9 @@ var StyledProfileCard = (0, import_joy68.styled)(import_joy3.Stack, {
|
|
|
7933
7836
|
})({});
|
|
7934
7837
|
function ProfileCard(props) {
|
|
7935
7838
|
const { children, chip, caption, size } = props;
|
|
7936
|
-
const captionLevel = (0,
|
|
7937
|
-
const nameLevel = (0,
|
|
7938
|
-
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));
|
|
7939
7842
|
}
|
|
7940
7843
|
ProfileCard.displayName = "ProfileCard";
|
|
7941
7844
|
var StyledProfileMenuButton = (0, import_joy68.styled)(import_joy68.MenuButton, {
|
|
@@ -7947,16 +7850,16 @@ var StyledProfileMenuButton = (0, import_joy68.styled)(import_joy68.MenuButton,
|
|
|
7947
7850
|
}));
|
|
7948
7851
|
function ProfileMenuButton(props) {
|
|
7949
7852
|
const { size = "sm", src, alt, children, getInitial, ...innerProps } = props;
|
|
7950
|
-
return /* @__PURE__ */
|
|
7853
|
+
return /* @__PURE__ */ import_react56.default.createElement(
|
|
7951
7854
|
StyledProfileMenuButton,
|
|
7952
7855
|
{
|
|
7953
7856
|
variant: "plain",
|
|
7954
7857
|
color: "neutral",
|
|
7955
7858
|
size,
|
|
7956
|
-
endDecorator: /* @__PURE__ */
|
|
7859
|
+
endDecorator: /* @__PURE__ */ import_react56.default.createElement(import_ArrowDropDown.default, null),
|
|
7957
7860
|
...innerProps
|
|
7958
7861
|
},
|
|
7959
|
-
/* @__PURE__ */
|
|
7862
|
+
/* @__PURE__ */ import_react56.default.createElement(Avatar, { variant: "soft", color: "primary", size, src, alt, getInitial }, children)
|
|
7960
7863
|
);
|
|
7961
7864
|
}
|
|
7962
7865
|
ProfileMenuButton.displayName = "ProfileMenuButton";
|
|
@@ -7976,9 +7879,9 @@ function ProfileMenu(inProps) {
|
|
|
7976
7879
|
const [open, setOpen] = useControlledState(
|
|
7977
7880
|
_open,
|
|
7978
7881
|
defaultOpen ?? false,
|
|
7979
|
-
(0,
|
|
7882
|
+
(0, import_react56.useCallback)((value) => onOpenChange?.(value), [onOpenChange])
|
|
7980
7883
|
);
|
|
7981
|
-
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(
|
|
7982
7885
|
ProfileMenuButton,
|
|
7983
7886
|
{
|
|
7984
7887
|
size,
|
|
@@ -7988,7 +7891,7 @@ function ProfileMenu(inProps) {
|
|
|
7988
7891
|
getInitial
|
|
7989
7892
|
},
|
|
7990
7893
|
profile.name
|
|
7991
|
-
), /* @__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(
|
|
7992
7895
|
MenuItem,
|
|
7993
7896
|
{
|
|
7994
7897
|
key: label,
|
|
@@ -8004,7 +7907,7 @@ function ProfileMenu(inProps) {
|
|
|
8004
7907
|
ProfileMenu.displayName = "ProfileMenu";
|
|
8005
7908
|
|
|
8006
7909
|
// src/components/RadioTileGroup/RadioTileGroup.tsx
|
|
8007
|
-
var
|
|
7910
|
+
var import_react57 = __toESM(require("react"));
|
|
8008
7911
|
var import_joy69 = require("@mui/joy");
|
|
8009
7912
|
var RadioTileGroupRoot = (0, import_joy69.styled)(RadioGroup, {
|
|
8010
7913
|
name: "RadioTileGroup",
|
|
@@ -8092,7 +7995,7 @@ function RadioTileGroup(props) {
|
|
|
8092
7995
|
error,
|
|
8093
7996
|
required
|
|
8094
7997
|
} = props;
|
|
8095
|
-
const radioGroup = /* @__PURE__ */
|
|
7998
|
+
const radioGroup = /* @__PURE__ */ import_react57.default.createElement(
|
|
8096
7999
|
RadioTileGroupRoot,
|
|
8097
8000
|
{
|
|
8098
8001
|
overlay: true,
|
|
@@ -8103,7 +8006,7 @@ function RadioTileGroup(props) {
|
|
|
8103
8006
|
flex,
|
|
8104
8007
|
columns
|
|
8105
8008
|
},
|
|
8106
|
-
options.map((option) => /* @__PURE__ */
|
|
8009
|
+
options.map((option) => /* @__PURE__ */ import_react57.default.createElement(
|
|
8107
8010
|
RadioTileSheet,
|
|
8108
8011
|
{
|
|
8109
8012
|
key: option.value,
|
|
@@ -8113,7 +8016,7 @@ function RadioTileGroup(props) {
|
|
|
8113
8016
|
flex,
|
|
8114
8017
|
textAlign
|
|
8115
8018
|
},
|
|
8116
|
-
/* @__PURE__ */
|
|
8019
|
+
/* @__PURE__ */ import_react57.default.createElement(
|
|
8117
8020
|
Radio,
|
|
8118
8021
|
{
|
|
8119
8022
|
id: `${option.value}`,
|
|
@@ -8142,7 +8045,7 @@ function RadioTileGroup(props) {
|
|
|
8142
8045
|
}
|
|
8143
8046
|
}
|
|
8144
8047
|
),
|
|
8145
|
-
option.startDecorator && /* @__PURE__ */
|
|
8048
|
+
option.startDecorator && /* @__PURE__ */ import_react57.default.createElement(
|
|
8146
8049
|
Box_default,
|
|
8147
8050
|
{
|
|
8148
8051
|
sx: {
|
|
@@ -8163,15 +8066,15 @@ function RadioTileGroup(props) {
|
|
|
8163
8066
|
)
|
|
8164
8067
|
))
|
|
8165
8068
|
);
|
|
8166
|
-
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));
|
|
8167
8070
|
}
|
|
8168
8071
|
RadioTileGroup.displayName = "RadioTileGroup";
|
|
8169
8072
|
|
|
8170
8073
|
// src/components/RadioList/RadioList.tsx
|
|
8171
|
-
var
|
|
8074
|
+
var import_react58 = __toESM(require("react"));
|
|
8172
8075
|
function RadioList(props) {
|
|
8173
8076
|
const { items, ...innerProps } = props;
|
|
8174
|
-
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 })));
|
|
8175
8078
|
}
|
|
8176
8079
|
RadioList.displayName = "RadioList";
|
|
8177
8080
|
|
|
@@ -8262,7 +8165,7 @@ var SearchBar = React56.forwardRef(function SearchBar2(inProps, ref) {
|
|
|
8262
8165
|
SearchBar.displayName = "SearchBar";
|
|
8263
8166
|
|
|
8264
8167
|
// src/components/Stepper/Stepper.tsx
|
|
8265
|
-
var
|
|
8168
|
+
var import_react59 = __toESM(require("react"));
|
|
8266
8169
|
var import_joy70 = require("@mui/joy");
|
|
8267
8170
|
var import_Check = __toESM(require("@mui/icons-material/Check"));
|
|
8268
8171
|
var import_framer_motion27 = require("framer-motion");
|
|
@@ -8291,7 +8194,7 @@ function Stepper(props) {
|
|
|
8291
8194
|
stepOrientation = "horizontal"
|
|
8292
8195
|
} = props;
|
|
8293
8196
|
const effectiveStepOrientation = orientation === "vertical" ? "horizontal" : stepOrientation;
|
|
8294
|
-
return /* @__PURE__ */
|
|
8197
|
+
return /* @__PURE__ */ import_react59.default.createElement(
|
|
8295
8198
|
MotionStepper,
|
|
8296
8199
|
{
|
|
8297
8200
|
orientation,
|
|
@@ -8330,23 +8233,23 @@ function Stepper(props) {
|
|
|
8330
8233
|
const completed = activeStep > i + 1;
|
|
8331
8234
|
const disabled = activeStep < i + 1;
|
|
8332
8235
|
const hasContent = step.label || step.extraContent;
|
|
8333
|
-
return /* @__PURE__ */
|
|
8236
|
+
return /* @__PURE__ */ import_react59.default.createElement(
|
|
8334
8237
|
Step,
|
|
8335
8238
|
{
|
|
8336
8239
|
key: `step-${i}`,
|
|
8337
|
-
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),
|
|
8338
8241
|
active,
|
|
8339
8242
|
completed,
|
|
8340
8243
|
disabled,
|
|
8341
8244
|
orientation: effectiveStepOrientation
|
|
8342
8245
|
},
|
|
8343
|
-
hasContent && /* @__PURE__ */
|
|
8246
|
+
hasContent && /* @__PURE__ */ import_react59.default.createElement(
|
|
8344
8247
|
Stack_default,
|
|
8345
8248
|
{
|
|
8346
8249
|
sx: orientation === "horizontal" && effectiveStepOrientation === "vertical" ? { alignItems: "center" } : {}
|
|
8347
8250
|
},
|
|
8348
|
-
step.label && /* @__PURE__ */
|
|
8349
|
-
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)
|
|
8350
8253
|
)
|
|
8351
8254
|
);
|
|
8352
8255
|
})
|
|
@@ -8355,7 +8258,7 @@ function Stepper(props) {
|
|
|
8355
8258
|
Stepper.displayName = "Stepper";
|
|
8356
8259
|
|
|
8357
8260
|
// src/components/Switch/Switch.tsx
|
|
8358
|
-
var
|
|
8261
|
+
var import_react60 = __toESM(require("react"));
|
|
8359
8262
|
var import_joy71 = require("@mui/joy");
|
|
8360
8263
|
var import_framer_motion28 = require("framer-motion");
|
|
8361
8264
|
var MotionSwitch = (0, import_framer_motion28.motion)(import_joy71.Switch);
|
|
@@ -8377,14 +8280,14 @@ var StyledThumb = (0, import_joy71.styled)(import_framer_motion28.motion.div)({
|
|
|
8377
8280
|
right: "var(--Switch-thumbOffset)"
|
|
8378
8281
|
}
|
|
8379
8282
|
});
|
|
8380
|
-
var Thumb = (props) => /* @__PURE__ */
|
|
8283
|
+
var Thumb = (props) => /* @__PURE__ */ import_react60.default.createElement(StyledThumb, { ...props, layout: true, transition: spring });
|
|
8381
8284
|
var spring = {
|
|
8382
8285
|
type: "spring",
|
|
8383
8286
|
stiffness: 700,
|
|
8384
8287
|
damping: 30
|
|
8385
8288
|
};
|
|
8386
8289
|
var Switch = (props) => {
|
|
8387
|
-
return /* @__PURE__ */
|
|
8290
|
+
return /* @__PURE__ */ import_react60.default.createElement(
|
|
8388
8291
|
MotionSwitch,
|
|
8389
8292
|
{
|
|
8390
8293
|
...props,
|
|
@@ -8398,7 +8301,7 @@ var Switch = (props) => {
|
|
|
8398
8301
|
Switch.displayName = "Switch";
|
|
8399
8302
|
|
|
8400
8303
|
// src/components/Tabs/Tabs.tsx
|
|
8401
|
-
var
|
|
8304
|
+
var import_react61 = __toESM(require("react"));
|
|
8402
8305
|
var import_joy72 = require("@mui/joy");
|
|
8403
8306
|
var StyledTabs = (0, import_joy72.styled)(import_joy72.Tabs)(({ theme }) => ({
|
|
8404
8307
|
backgroundColor: theme.palette.background.body
|
|
@@ -8414,15 +8317,15 @@ var StyledTab = (0, import_joy72.styled)(import_joy72.Tab)(({ theme }) => ({
|
|
|
8414
8317
|
backgroundColor: theme.palette.background.body
|
|
8415
8318
|
}
|
|
8416
8319
|
}));
|
|
8417
|
-
var Tab = (0,
|
|
8418
|
-
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);
|
|
8419
8322
|
});
|
|
8420
8323
|
Tab.displayName = "Tab";
|
|
8421
8324
|
var TabList = import_joy72.TabList;
|
|
8422
8325
|
var TabPanel = import_joy72.TabPanel;
|
|
8423
8326
|
|
|
8424
8327
|
// src/components/ThemeProvider/ThemeProvider.tsx
|
|
8425
|
-
var
|
|
8328
|
+
var import_react62 = __toESM(require("react"));
|
|
8426
8329
|
var import_joy73 = require("@mui/joy");
|
|
8427
8330
|
var colorScheme = {
|
|
8428
8331
|
palette: {
|
|
@@ -8819,6 +8722,6 @@ var defaultTheme = (0, import_joy73.extendTheme)({
|
|
|
8819
8722
|
});
|
|
8820
8723
|
function ThemeProvider(props) {
|
|
8821
8724
|
const theme = props.theme || defaultTheme;
|
|
8822
|
-
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));
|
|
8823
8726
|
}
|
|
8824
8727
|
ThemeProvider.displayName = "ThemeProvider";
|