@tipp/ui 1.5.1 → 1.5.2
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/app/index.cjs +102 -96
- package/dist/app/index.cjs.map +1 -1
- package/dist/app/index.js +30 -30
- package/dist/app/platform/coach-question-list.js +12 -12
- package/dist/app/platform/edit-coaching-time.js +20 -20
- package/dist/app/platform/edit-service-type.js +19 -19
- package/dist/app/platform/goal-manage-card-edit.js +18 -18
- package/dist/app/platform/goal-manage-card-read.js +13 -13
- package/dist/app/platform/on-offline-radio-card.js +17 -17
- package/dist/app/platform/report-card.js +17 -17
- package/dist/app/platform/reservation-card.js +18 -18
- package/dist/app/platform/session-card.cjs +54 -48
- package/dist/app/platform/session-card.cjs.map +1 -1
- package/dist/app/platform/session-card.js +21 -21
- package/dist/app/platform/session-review-simple-read.js +13 -13
- package/dist/app/platform/userInfos/coaching-customer-info/index.js +16 -16
- package/dist/app/platform/userInfos/coaching-customer-info/large.js +13 -13
- package/dist/app/platform/userInfos/coaching-customer-info/medium.js +13 -13
- package/dist/app/platform/userInfos/coaching-customer-info/small.js +13 -13
- package/dist/app/platform/userInfos/session-user-info-detail.js +13 -13
- package/dist/app/platform/userInfos/utils.js +12 -12
- package/dist/atoms/button.d.cts +1 -1
- package/dist/atoms/button.d.ts +1 -1
- package/dist/atoms/dialog.cjs +7 -1
- package/dist/atoms/dialog.cjs.map +1 -1
- package/dist/atoms/dialog.js +2 -2
- package/dist/atoms/drawer.js +2 -2
- package/dist/atoms/index.cjs +73 -67
- package/dist/atoms/index.cjs.map +1 -1
- package/dist/atoms/index.js +28 -28
- package/dist/chunk-6GXQGGUZ.js +64 -0
- package/dist/chunk-6GXQGGUZ.js.map +1 -0
- package/dist/chunk-AGPJA7IM.js +110 -0
- package/dist/chunk-AGPJA7IM.js.map +1 -0
- package/dist/chunk-B6XJ2W4L.js +243 -0
- package/dist/chunk-B6XJ2W4L.js.map +1 -0
- package/dist/chunk-CCYMLZTF.js +73 -0
- package/dist/chunk-CCYMLZTF.js.map +1 -0
- package/dist/chunk-GZRUTEDV.js +101 -0
- package/dist/chunk-GZRUTEDV.js.map +1 -0
- package/dist/chunk-I55PKI44.js +57 -0
- package/dist/chunk-I55PKI44.js.map +1 -0
- package/dist/chunk-IFHIVCXR.js +76 -0
- package/dist/chunk-IFHIVCXR.js.map +1 -0
- package/dist/chunk-LWPBL4WG.js +243 -0
- package/dist/chunk-LWPBL4WG.js.map +1 -0
- package/dist/chunk-MODBHLOL.js +138 -0
- package/dist/chunk-MODBHLOL.js.map +1 -0
- package/dist/chunk-PMLOM6GM.js +138 -0
- package/dist/chunk-PMLOM6GM.js.map +1 -0
- package/dist/chunk-PWD34ME3.js +76 -0
- package/dist/chunk-PWD34ME3.js.map +1 -0
- package/dist/chunk-QLPJXYNG.js +30 -0
- package/dist/chunk-QLPJXYNG.js.map +1 -0
- package/dist/chunk-STD6C6HS.js +52 -0
- package/dist/chunk-STD6C6HS.js.map +1 -0
- package/dist/chunk-UDV652HT.js +145 -0
- package/dist/chunk-UDV652HT.js.map +1 -0
- package/dist/chunk-VXTOWVUI.js +203 -0
- package/dist/chunk-VXTOWVUI.js.map +1 -0
- package/dist/chunk-WOVEXBEW.js +64 -0
- package/dist/chunk-WOVEXBEW.js.map +1 -0
- package/dist/chunk-XGFGTMZU.js +350 -0
- package/dist/chunk-XGFGTMZU.js.map +1 -0
- package/dist/chunk-XKB7JSXW.js +171 -0
- package/dist/chunk-XKB7JSXW.js.map +1 -0
- package/dist/chunk-Y2TFOMTA.js +30 -0
- package/dist/chunk-Y2TFOMTA.js.map +1 -0
- package/dist/index.cjs +182 -176
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +65 -65
- package/dist/layouts/index.js +12 -12
- package/dist/layouts/response-display.js +12 -12
- package/dist/molecules/date-picker/date-picker-button.js +14 -14
- package/dist/molecules/date-picker/index.js +2 -2
- package/dist/molecules/expand-table/index.js +12 -12
- package/dist/molecules/expand-table/row.js +12 -12
- package/dist/molecules/form.d.cts +1 -1
- package/dist/molecules/form.d.ts +1 -1
- package/dist/molecules/index.js +17 -17
- package/dist/molecules/learning-post.js +2 -2
- package/dist/molecules/navigation.js +12 -12
- package/dist/molecules/radio-button-card.js +12 -12
- package/dist/molecules/stepper.js +2 -2
- package/dist/molecules/tag-selector.js +13 -13
- package/dist/molecules/time-select.js +12 -12
- package/package.json +1 -1
- package/src/atoms/dialog.tsx +9 -1
package/dist/index.cjs
CHANGED
|
@@ -447,6 +447,7 @@ var import_themes15 = require("@radix-ui/themes");
|
|
|
447
447
|
var RadixDialog = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
448
448
|
var import_react_icons2 = require("@radix-ui/react-icons");
|
|
449
449
|
var import_themes19 = require("@radix-ui/themes");
|
|
450
|
+
var import_react8 = require("react");
|
|
450
451
|
|
|
451
452
|
// src/atoms/toast.tsx
|
|
452
453
|
var import_react_icons = require("@radix-ui/react-icons");
|
|
@@ -534,7 +535,12 @@ function Content2(props) {
|
|
|
534
535
|
"title",
|
|
535
536
|
"buttons"
|
|
536
537
|
]);
|
|
537
|
-
|
|
538
|
+
const containerRef = (0, import_react8.useRef)(null);
|
|
539
|
+
if (typeof document !== "undefined") {
|
|
540
|
+
const container = document.getElementsByClassName("radix-themes")[0];
|
|
541
|
+
containerRef.current = container;
|
|
542
|
+
}
|
|
543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(RadixDialog.Portal, { container: containerRef.current, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_themes19.Theme, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(RadixDialog.Overlay, { className: "DialogOverlay", children: [
|
|
538
544
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
539
545
|
RadixDialog.Content,
|
|
540
546
|
__spreadProps(__spreadValues({
|
|
@@ -589,11 +595,11 @@ var Dialog = {
|
|
|
589
595
|
|
|
590
596
|
// src/atoms/dropdown-menu.tsx
|
|
591
597
|
var import_themes20 = require("@radix-ui/themes");
|
|
592
|
-
var
|
|
598
|
+
var import_react9 = require("react");
|
|
593
599
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
594
|
-
var Content3 = (0,
|
|
600
|
+
var Content3 = (0, import_react9.forwardRef)((props, ref) => {
|
|
595
601
|
const _a = props, { isNavigation, className } = _a, rest = __objRest(_a, ["isNavigation", "className"]);
|
|
596
|
-
const contentClassName = (0,
|
|
602
|
+
const contentClassName = (0, import_react9.useMemo)(() => {
|
|
597
603
|
const cls = isNavigation ? "dropdown-navigation" : "";
|
|
598
604
|
return [cls, className].join(" ");
|
|
599
605
|
}, [isNavigation, className]);
|
|
@@ -631,12 +637,12 @@ var import_themes26 = require("@radix-ui/themes");
|
|
|
631
637
|
|
|
632
638
|
// src/atoms/link.tsx
|
|
633
639
|
var import_themes27 = require("@radix-ui/themes");
|
|
634
|
-
var
|
|
640
|
+
var import_react10 = require("react");
|
|
635
641
|
var import_themes28 = require("@radix-ui/themes");
|
|
636
642
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
637
643
|
function Link(props) {
|
|
638
644
|
const _a = props, { size, children, variant } = _a, rest = __objRest(_a, ["size", "children", "variant"]);
|
|
639
|
-
const radixSize = (0,
|
|
645
|
+
const radixSize = (0, import_react10.useMemo)(() => {
|
|
640
646
|
switch (variant) {
|
|
641
647
|
case "caption":
|
|
642
648
|
return "1";
|
|
@@ -680,15 +686,15 @@ var import_themes37 = require("@radix-ui/themes");
|
|
|
680
686
|
|
|
681
687
|
// src/atoms/select.tsx
|
|
682
688
|
var import_themes38 = require("@radix-ui/themes");
|
|
683
|
-
var
|
|
689
|
+
var import_react11 = require("react");
|
|
684
690
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
685
|
-
var SelectContext = (0,
|
|
691
|
+
var SelectContext = (0, import_react11.createContext)({
|
|
686
692
|
error: false
|
|
687
693
|
});
|
|
688
|
-
var Content4 = (0,
|
|
694
|
+
var Content4 = (0, import_react11.forwardRef)((props, ref) => {
|
|
689
695
|
const _a = props, { className, isNavigation } = _a, rest = __objRest(_a, ["className", "isNavigation"]);
|
|
690
|
-
const { error } = (0,
|
|
691
|
-
const cls = (0,
|
|
696
|
+
const { error } = (0, import_react11.useContext)(SelectContext);
|
|
697
|
+
const cls = (0, import_react11.useMemo)(() => {
|
|
692
698
|
const etc = isNavigation ? "nav-select" : "";
|
|
693
699
|
const errorCls = error ? "tipp-error" : "";
|
|
694
700
|
return [etc, errorCls, className].join(" ");
|
|
@@ -704,11 +710,11 @@ var Content4 = (0, import_react10.forwardRef)((props, ref) => {
|
|
|
704
710
|
);
|
|
705
711
|
});
|
|
706
712
|
Content4.displayName = "Select.Content";
|
|
707
|
-
var Trigger3 = (0,
|
|
713
|
+
var Trigger3 = (0, import_react11.forwardRef)(
|
|
708
714
|
(props, ref) => {
|
|
709
715
|
const _a = props, { className } = _a, rest = __objRest(_a, ["className"]);
|
|
710
|
-
const { error } = (0,
|
|
711
|
-
const cls = (0,
|
|
716
|
+
const { error } = (0, import_react11.useContext)(SelectContext);
|
|
717
|
+
const cls = (0, import_react11.useMemo)(() => {
|
|
712
718
|
const errorCls = error ? "error" : "";
|
|
713
719
|
return [errorCls, className].join(" ");
|
|
714
720
|
}, [className, error]);
|
|
@@ -747,12 +753,12 @@ var import_themes44 = require("@radix-ui/themes");
|
|
|
747
753
|
|
|
748
754
|
// src/atoms/text-area.tsx
|
|
749
755
|
var import_themes45 = require("@radix-ui/themes");
|
|
750
|
-
var
|
|
756
|
+
var import_react12 = require("react");
|
|
751
757
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
752
|
-
var TextArea = (0,
|
|
758
|
+
var TextArea = (0, import_react12.forwardRef)(
|
|
753
759
|
(props, ref) => {
|
|
754
760
|
const _a = props, { error, style, className } = _a, rest = __objRest(_a, ["error", "style", "className"]);
|
|
755
|
-
const fieldStyle = (0,
|
|
761
|
+
const fieldStyle = (0, import_react12.useMemo)(() => {
|
|
756
762
|
if (!error)
|
|
757
763
|
return style;
|
|
758
764
|
const errorStyle = {
|
|
@@ -775,12 +781,12 @@ TextArea.displayName = "TextArea";
|
|
|
775
781
|
|
|
776
782
|
// src/atoms/typo.tsx
|
|
777
783
|
var import_themes46 = require("@radix-ui/themes");
|
|
778
|
-
var
|
|
784
|
+
var import_react13 = require("react");
|
|
779
785
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
780
|
-
var Typo = (0,
|
|
786
|
+
var Typo = (0, import_react13.forwardRef)(
|
|
781
787
|
(props, ref) => {
|
|
782
788
|
const _a = props, { size, variant, children } = _a, rest = __objRest(_a, ["size", "variant", "children"]);
|
|
783
|
-
const radixSize = (0,
|
|
789
|
+
const radixSize = (0, import_react13.useMemo)(() => {
|
|
784
790
|
if (size !== void 0)
|
|
785
791
|
return size;
|
|
786
792
|
switch (variant) {
|
|
@@ -800,11 +806,11 @@ Typo.displayName = "Typo";
|
|
|
800
806
|
|
|
801
807
|
// src/atoms/text-field.tsx
|
|
802
808
|
var import_themes47 = require("@radix-ui/themes");
|
|
803
|
-
var
|
|
809
|
+
var import_react14 = require("react");
|
|
804
810
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
805
|
-
var Root4 = (0,
|
|
811
|
+
var Root4 = (0, import_react14.forwardRef)((props, ref) => {
|
|
806
812
|
const _a = props, { error, style, className } = _a, rest = __objRest(_a, ["error", "style", "className"]);
|
|
807
|
-
const fieldStyle = (0,
|
|
813
|
+
const fieldStyle = (0, import_react14.useMemo)(() => {
|
|
808
814
|
if (!error)
|
|
809
815
|
return style;
|
|
810
816
|
const errorStyle = {
|
|
@@ -829,20 +835,20 @@ var TextField = { Root: Root4, Slot: import_themes47.TextField.Slot };
|
|
|
829
835
|
var import_themes48 = require("@radix-ui/themes");
|
|
830
836
|
|
|
831
837
|
// src/atoms/collapse.tsx
|
|
832
|
-
var
|
|
838
|
+
var import_react15 = require("react");
|
|
833
839
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
834
840
|
function Collapse(props) {
|
|
835
841
|
const { children, closedHeight = "0" } = props;
|
|
836
|
-
const [open, setOpen] = (0,
|
|
842
|
+
const [open, setOpen] = (0, import_react15.useState)(() => {
|
|
837
843
|
return props.open || props.defaultOpen || false;
|
|
838
844
|
});
|
|
839
|
-
(0,
|
|
845
|
+
(0, import_react15.useEffect)(() => {
|
|
840
846
|
if (props.open === void 0)
|
|
841
847
|
return;
|
|
842
848
|
setOpen(props.open);
|
|
843
849
|
}, [props.open]);
|
|
844
|
-
const ref = (0,
|
|
845
|
-
(0,
|
|
850
|
+
const ref = (0, import_react15.useRef)(null);
|
|
851
|
+
(0, import_react15.useEffect)(() => {
|
|
846
852
|
if (!ref.current)
|
|
847
853
|
return;
|
|
848
854
|
ref.current.style.maxHeight = open ? `${ref.current.scrollHeight}px` : closedHeight;
|
|
@@ -854,7 +860,7 @@ function Collapse(props) {
|
|
|
854
860
|
var import_themes49 = require("@radix-ui/themes");
|
|
855
861
|
|
|
856
862
|
// src/atoms/pagination.tsx
|
|
857
|
-
var
|
|
863
|
+
var import_react16 = require("react");
|
|
858
864
|
|
|
859
865
|
// src/icon.ts
|
|
860
866
|
var import_react_icons3 = require("@radix-ui/react-icons");
|
|
@@ -863,8 +869,8 @@ var import_react_icons3 = require("@radix-ui/react-icons");
|
|
|
863
869
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
864
870
|
function Pagination(props) {
|
|
865
871
|
const { onChange, count = 0, siblingCount = 2 } = props;
|
|
866
|
-
const [page, setPage] = (0,
|
|
867
|
-
const visibleItems = (0,
|
|
872
|
+
const [page, setPage] = (0, import_react16.useState)(() => props.page || props.defaultPage || 1);
|
|
873
|
+
const visibleItems = (0, import_react16.useMemo)(() => {
|
|
868
874
|
let start = Math.max(1, page - siblingCount);
|
|
869
875
|
let end = Math.min(count, page + siblingCount);
|
|
870
876
|
if (page - siblingCount <= 0 && end < count) {
|
|
@@ -874,37 +880,37 @@ function Pagination(props) {
|
|
|
874
880
|
}
|
|
875
881
|
return Array.from({ length: end - start + 1 }, (_, i) => i + start);
|
|
876
882
|
}, [count, page, siblingCount]);
|
|
877
|
-
(0,
|
|
883
|
+
(0, import_react16.useEffect)(() => {
|
|
878
884
|
onChange == null ? void 0 : onChange(page);
|
|
879
885
|
}, [onChange, page]);
|
|
880
|
-
(0,
|
|
886
|
+
(0, import_react16.useEffect)(() => {
|
|
881
887
|
if (props.page) {
|
|
882
888
|
setPage(props.page);
|
|
883
889
|
}
|
|
884
890
|
}, [props.page]);
|
|
885
|
-
const prev = (0,
|
|
891
|
+
const prev = (0, import_react16.useMemo)(() => {
|
|
886
892
|
const p = page - 1;
|
|
887
893
|
return p < 1 ? void 0 : p;
|
|
888
894
|
}, [page]);
|
|
889
|
-
const next = (0,
|
|
895
|
+
const next = (0, import_react16.useMemo)(() => {
|
|
890
896
|
const n = page + 1;
|
|
891
897
|
return n > count ? void 0 : n;
|
|
892
898
|
}, [count, page]);
|
|
893
|
-
const onClickPrev = (0,
|
|
899
|
+
const onClickPrev = (0, import_react16.useCallback)(() => {
|
|
894
900
|
prev && setPage(prev);
|
|
895
901
|
}, [prev]);
|
|
896
|
-
const onClickNext = (0,
|
|
902
|
+
const onClickNext = (0, import_react16.useCallback)(() => {
|
|
897
903
|
next && setPage(next);
|
|
898
904
|
}, [next]);
|
|
899
|
-
const doublePrev = (0,
|
|
905
|
+
const doublePrev = (0, import_react16.useMemo)(() => {
|
|
900
906
|
if (!visibleItems.length)
|
|
901
907
|
return;
|
|
902
908
|
return Math.max(0, visibleItems[0] - 1);
|
|
903
909
|
}, [visibleItems]);
|
|
904
|
-
const onClickDoublePrev = (0,
|
|
910
|
+
const onClickDoublePrev = (0, import_react16.useCallback)(() => {
|
|
905
911
|
doublePrev && setPage(doublePrev);
|
|
906
912
|
}, [doublePrev]);
|
|
907
|
-
const doubleNext = (0,
|
|
913
|
+
const doubleNext = (0, import_react16.useMemo)(() => {
|
|
908
914
|
if (!visibleItems.length)
|
|
909
915
|
return;
|
|
910
916
|
const n = visibleItems[visibleItems.length - 1] + 1;
|
|
@@ -912,7 +918,7 @@ function Pagination(props) {
|
|
|
912
918
|
return;
|
|
913
919
|
return Math.min(count, n);
|
|
914
920
|
}, [count, visibleItems]);
|
|
915
|
-
const onClickDoubleNext = (0,
|
|
921
|
+
const onClickDoubleNext = (0, import_react16.useCallback)(() => {
|
|
916
922
|
doubleNext && setPage(doubleNext);
|
|
917
923
|
}, [doubleNext]);
|
|
918
924
|
const iconSize = {
|
|
@@ -975,15 +981,15 @@ function FieldErrorWrapper({
|
|
|
975
981
|
}
|
|
976
982
|
|
|
977
983
|
// src/atoms/ellipsis-tooltip.tsx
|
|
978
|
-
var
|
|
984
|
+
var import_react17 = require("react");
|
|
979
985
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
980
986
|
function EllipsisTooltip(props) {
|
|
981
987
|
const _a = props, { children, style, lineClamp = 2 } = _a, rest = __objRest(_a, ["children", "style", "lineClamp"]);
|
|
982
|
-
const ref = (0,
|
|
983
|
-
const [tooltipDisplay, setTooltipDisplay] = (0,
|
|
988
|
+
const ref = (0, import_react17.useRef)(null);
|
|
989
|
+
const [tooltipDisplay, setTooltipDisplay] = (0, import_react17.useState)(
|
|
984
990
|
"none"
|
|
985
991
|
);
|
|
986
|
-
(0,
|
|
992
|
+
(0, import_react17.useEffect)(() => {
|
|
987
993
|
if (ref.current) {
|
|
988
994
|
const typo = ref.current;
|
|
989
995
|
const mouseOver = () => {
|
|
@@ -1017,7 +1023,7 @@ function EllipsisTooltip(props) {
|
|
|
1017
1023
|
}
|
|
1018
1024
|
|
|
1019
1025
|
// src/atoms/drawer.tsx
|
|
1020
|
-
var
|
|
1026
|
+
var import_react18 = require("react");
|
|
1021
1027
|
var Dialog2 = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
1022
1028
|
var import_themes50 = require("@radix-ui/themes");
|
|
1023
1029
|
|
|
@@ -1073,8 +1079,8 @@ var preventDefault2 = (e) => {
|
|
|
1073
1079
|
};
|
|
1074
1080
|
function Content6(props) {
|
|
1075
1081
|
const _a = props, { position = "right", className, children } = _a, rest = __objRest(_a, ["position", "className", "children"]);
|
|
1076
|
-
const containerRef = (0,
|
|
1077
|
-
(0,
|
|
1082
|
+
const containerRef = (0, import_react18.useRef)(null);
|
|
1083
|
+
(0, import_react18.useEffect)(() => {
|
|
1078
1084
|
containerRef.current = document.getElementsByClassName("radix-themes")[0];
|
|
1079
1085
|
}, []);
|
|
1080
1086
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Dialog2.Portal, { container: containerRef.current, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_themes50.Theme, { children: [
|
|
@@ -1116,9 +1122,9 @@ var Drawer = {
|
|
|
1116
1122
|
|
|
1117
1123
|
// src/molecules/form.tsx
|
|
1118
1124
|
var RadixForm = __toESM(require("@radix-ui/react-form"), 1);
|
|
1119
|
-
var
|
|
1125
|
+
var import_react19 = require("react");
|
|
1120
1126
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1121
|
-
var Root8 = (0,
|
|
1127
|
+
var Root8 = (0, import_react19.forwardRef)(
|
|
1122
1128
|
(_a, ref) => {
|
|
1123
1129
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
|
1124
1130
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
@@ -1132,10 +1138,10 @@ var Root8 = (0, import_react18.forwardRef)(
|
|
|
1132
1138
|
}
|
|
1133
1139
|
);
|
|
1134
1140
|
Root8.displayName = "FORM_ROOT";
|
|
1135
|
-
var FieldContext = (0,
|
|
1141
|
+
var FieldContext = (0, import_react19.createContext)({
|
|
1136
1142
|
name: ""
|
|
1137
1143
|
});
|
|
1138
|
-
var Field2 = (0,
|
|
1144
|
+
var Field2 = (0, import_react19.forwardRef)(
|
|
1139
1145
|
(_a, ref) => {
|
|
1140
1146
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
|
1141
1147
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
@@ -1155,10 +1161,10 @@ function HeadingLabel(props) {
|
|
|
1155
1161
|
function CaptionLabel(props) {
|
|
1156
1162
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Typo, __spreadProps(__spreadValues({ color: "gray", variant: "caption" }, props), { children: props.children }));
|
|
1157
1163
|
}
|
|
1158
|
-
var Label2 = (0,
|
|
1164
|
+
var Label2 = (0, import_react19.forwardRef)(
|
|
1159
1165
|
(_a, ref) => {
|
|
1160
1166
|
var _b = _a, { children, className, variant } = _b, rest = __objRest(_b, ["children", "className", "variant"]);
|
|
1161
|
-
const Comp = (0,
|
|
1167
|
+
const Comp = (0, import_react19.useMemo)(() => {
|
|
1162
1168
|
switch (variant) {
|
|
1163
1169
|
case "title":
|
|
1164
1170
|
return HeadingLabel;
|
|
@@ -1169,7 +1175,7 @@ var Label2 = (0, import_react18.forwardRef)(
|
|
|
1169
1175
|
return Typo;
|
|
1170
1176
|
}
|
|
1171
1177
|
}, [variant]);
|
|
1172
|
-
const fieldProps = (0,
|
|
1178
|
+
const fieldProps = (0, import_react19.useContext)(FieldContext);
|
|
1173
1179
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1174
1180
|
RadixForm.Label,
|
|
1175
1181
|
__spreadProps(__spreadValues({}, rest), {
|
|
@@ -1185,7 +1191,7 @@ var Label2 = (0, import_react18.forwardRef)(
|
|
|
1185
1191
|
}
|
|
1186
1192
|
);
|
|
1187
1193
|
Label2.displayName = "FORM_Label";
|
|
1188
|
-
var Message2 = (0,
|
|
1194
|
+
var Message2 = (0, import_react19.forwardRef)(
|
|
1189
1195
|
(_a, ref) => {
|
|
1190
1196
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
|
1191
1197
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
@@ -1200,10 +1206,10 @@ var Message2 = (0, import_react18.forwardRef)(
|
|
|
1200
1206
|
}
|
|
1201
1207
|
);
|
|
1202
1208
|
Message2.displayName = "FORM_Message";
|
|
1203
|
-
var Control2 = (0,
|
|
1209
|
+
var Control2 = (0, import_react19.forwardRef)(
|
|
1204
1210
|
(_a, ref) => {
|
|
1205
1211
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
|
1206
|
-
const fieldProps = (0,
|
|
1212
|
+
const fieldProps = (0, import_react19.useContext)(FieldContext);
|
|
1207
1213
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1208
1214
|
RadixForm.Control,
|
|
1209
1215
|
__spreadProps(__spreadValues({}, rest), {
|
|
@@ -1225,28 +1231,28 @@ var Form = {
|
|
|
1225
1231
|
};
|
|
1226
1232
|
|
|
1227
1233
|
// src/atoms/auto-sizing-input.tsx
|
|
1228
|
-
var
|
|
1234
|
+
var import_react20 = require("react");
|
|
1229
1235
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1230
|
-
var AutoSizingInput = (0,
|
|
1236
|
+
var AutoSizingInput = (0, import_react20.forwardRef)(
|
|
1231
1237
|
(_a, ref) => {
|
|
1232
1238
|
var _b = _a, { value: _value, onChangeValue, onChange } = _b, rest = __objRest(_b, ["value", "onChangeValue", "onChange"]);
|
|
1233
|
-
const [value, setValue] = (0,
|
|
1234
|
-
const [width, setWidth] = (0,
|
|
1235
|
-
const span = (0,
|
|
1236
|
-
(0,
|
|
1239
|
+
const [value, setValue] = (0, import_react20.useState)(_value);
|
|
1240
|
+
const [width, setWidth] = (0, import_react20.useState)(0);
|
|
1241
|
+
const span = (0, import_react20.useRef)(null);
|
|
1242
|
+
(0, import_react20.useEffect)(() => {
|
|
1237
1243
|
span.current && setWidth(span.current.offsetWidth);
|
|
1238
1244
|
}, [value]);
|
|
1239
|
-
const changeHandler = (0,
|
|
1245
|
+
const changeHandler = (0, import_react20.useCallback)(
|
|
1240
1246
|
(evt) => {
|
|
1241
1247
|
onChange == null ? void 0 : onChange(evt);
|
|
1242
1248
|
setValue(evt.target.value);
|
|
1243
1249
|
},
|
|
1244
1250
|
[onChange]
|
|
1245
1251
|
);
|
|
1246
|
-
(0,
|
|
1252
|
+
(0, import_react20.useEffect)(() => {
|
|
1247
1253
|
setValue(_value || "");
|
|
1248
1254
|
}, [_value]);
|
|
1249
|
-
(0,
|
|
1255
|
+
(0, import_react20.useEffect)(() => {
|
|
1250
1256
|
onChangeValue == null ? void 0 : onChangeValue(value || "");
|
|
1251
1257
|
}, [value, onChangeValue]);
|
|
1252
1258
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "auto-sizing-input wrapper", style: { width: width + 24 }, children: [
|
|
@@ -1273,7 +1279,7 @@ function BulletText(_a) {
|
|
|
1273
1279
|
|
|
1274
1280
|
// src/molecules/expand-table/index.tsx
|
|
1275
1281
|
var import_react_table2 = require("@tanstack/react-table");
|
|
1276
|
-
var
|
|
1282
|
+
var import_react22 = require("react");
|
|
1277
1283
|
|
|
1278
1284
|
// src/icons/down.tsx
|
|
1279
1285
|
var React10 = __toESM(require("react"), 1);
|
|
@@ -1335,17 +1341,17 @@ TriangleArrowUpIcon.displayName = "ArrowUpIcon";
|
|
|
1335
1341
|
|
|
1336
1342
|
// src/molecules/expand-table/row.tsx
|
|
1337
1343
|
var import_react_table = require("@tanstack/react-table");
|
|
1338
|
-
var
|
|
1344
|
+
var import_react21 = require("react");
|
|
1339
1345
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1340
1346
|
function Row(props) {
|
|
1341
1347
|
const { row, ExpandComp, gridTemplateColumns, getRowStyle, getCellStyle } = props;
|
|
1342
|
-
const [open, setOpen] = (0,
|
|
1343
|
-
const onClickRow = (0,
|
|
1348
|
+
const [open, setOpen] = (0, import_react21.useState)(false);
|
|
1349
|
+
const onClickRow = (0, import_react21.useCallback)(() => {
|
|
1344
1350
|
var _a;
|
|
1345
1351
|
(_a = props.onRowClick) == null ? void 0 : _a.call(props, row.original);
|
|
1346
1352
|
setOpen((prev) => !prev);
|
|
1347
1353
|
}, [props, row.original]);
|
|
1348
|
-
const rowClassName = (0,
|
|
1354
|
+
const rowClassName = (0, import_react21.useMemo)(() => {
|
|
1349
1355
|
const baseCls = ["tr-wrapper"];
|
|
1350
1356
|
if (ExpandComp) {
|
|
1351
1357
|
baseCls.push("expandable");
|
|
@@ -1419,11 +1425,11 @@ function ExpandTable(props) {
|
|
|
1419
1425
|
getCellStyle
|
|
1420
1426
|
} = props;
|
|
1421
1427
|
const defaultAlign = "left";
|
|
1422
|
-
const [pagination, setPagination] = (0,
|
|
1428
|
+
const [pagination, setPagination] = (0, import_react22.useState)({
|
|
1423
1429
|
pageIndex: pageIndex || 0,
|
|
1424
1430
|
pageSize: pageSize || 9999
|
|
1425
1431
|
});
|
|
1426
|
-
const [sorting, setSorting] = (0,
|
|
1432
|
+
const [sorting, setSorting] = (0, import_react22.useState)([]);
|
|
1427
1433
|
const { getRowModel, getHeaderGroups, setPageIndex } = (0, import_react_table2.useReactTable)({
|
|
1428
1434
|
data: data || [],
|
|
1429
1435
|
columns,
|
|
@@ -1437,7 +1443,7 @@ function ExpandTable(props) {
|
|
|
1437
1443
|
getPaginationRowModel: (0, import_react_table2.getPaginationRowModel)(),
|
|
1438
1444
|
onPaginationChange: setPagination
|
|
1439
1445
|
});
|
|
1440
|
-
const gridTemplateColumns = (0,
|
|
1446
|
+
const gridTemplateColumns = (0, import_react22.useMemo)(() => {
|
|
1441
1447
|
return columns.map((col) => {
|
|
1442
1448
|
var _a;
|
|
1443
1449
|
if ((_a = col.meta) == null ? void 0 : _a.autoSize)
|
|
@@ -1446,13 +1452,13 @@ function ExpandTable(props) {
|
|
|
1446
1452
|
}).join(" ");
|
|
1447
1453
|
}, [columns]);
|
|
1448
1454
|
const rowModels = getRowModel();
|
|
1449
|
-
const onChangePagination = (0,
|
|
1455
|
+
const onChangePagination = (0, import_react22.useCallback)(
|
|
1450
1456
|
(page) => {
|
|
1451
1457
|
setPageIndex(page - 1);
|
|
1452
1458
|
},
|
|
1453
1459
|
[setPageIndex]
|
|
1454
1460
|
);
|
|
1455
|
-
const helpCompRender = (0,
|
|
1461
|
+
const helpCompRender = (0, import_react22.useCallback)(
|
|
1456
1462
|
(rowLength) => {
|
|
1457
1463
|
if (isLoading) {
|
|
1458
1464
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
@@ -1474,7 +1480,7 @@ function ExpandTable(props) {
|
|
|
1474
1480
|
},
|
|
1475
1481
|
[isLoading, placeholder]
|
|
1476
1482
|
);
|
|
1477
|
-
const pageCount = (0,
|
|
1483
|
+
const pageCount = (0, import_react22.useMemo)(() => {
|
|
1478
1484
|
if (!data)
|
|
1479
1485
|
return 0;
|
|
1480
1486
|
return Math.ceil(data.length / pageSize);
|
|
@@ -1606,7 +1612,7 @@ function Navigation({
|
|
|
1606
1612
|
}
|
|
1607
1613
|
|
|
1608
1614
|
// src/molecules/date-picker/index.tsx
|
|
1609
|
-
var
|
|
1615
|
+
var import_react23 = require("react");
|
|
1610
1616
|
var RDP = __toESM(require("react-datepicker"), 1);
|
|
1611
1617
|
var import_react_datepicker = require("react-datepicker");
|
|
1612
1618
|
var import_locale = require("date-fns/locale");
|
|
@@ -1614,7 +1620,7 @@ var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
|
1614
1620
|
(0, import_react_datepicker.registerLocale)("ko", import_locale.ko);
|
|
1615
1621
|
(0, import_react_datepicker.setDefaultLocale)("ko");
|
|
1616
1622
|
var ReactDatePicker = RDP.default.default || RDP.default || RDP;
|
|
1617
|
-
var DatePicker = (0,
|
|
1623
|
+
var DatePicker = (0, import_react23.forwardRef)(
|
|
1618
1624
|
(props, ref) => {
|
|
1619
1625
|
const _a = props, { fullWidth } = _a, rest = __objRest(_a, ["fullWidth"]);
|
|
1620
1626
|
const fullWidthClassName = fullWidth ? "full-width" : "";
|
|
@@ -1684,18 +1690,18 @@ var renderCustomHeader = (props) => {
|
|
|
1684
1690
|
};
|
|
1685
1691
|
|
|
1686
1692
|
// src/molecules/dot-navigation.tsx
|
|
1687
|
-
var
|
|
1693
|
+
var import_react24 = require("react");
|
|
1688
1694
|
var import_react_icons4 = require("@radix-ui/react-icons");
|
|
1689
1695
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1690
1696
|
function DotNavigation(props) {
|
|
1691
1697
|
const { dotCount, onClick, dotIndex, defaultDotIndex, onChangeDotIndex } = props;
|
|
1692
|
-
const [currentDot, setCurrentDot] = (0,
|
|
1698
|
+
const [currentDot, setCurrentDot] = (0, import_react24.useState)(
|
|
1693
1699
|
() => {
|
|
1694
1700
|
var _a;
|
|
1695
1701
|
return (_a = defaultDotIndex != null ? defaultDotIndex : dotIndex) != null ? _a : 0;
|
|
1696
1702
|
}
|
|
1697
1703
|
);
|
|
1698
|
-
const onClickDot = (0,
|
|
1704
|
+
const onClickDot = (0, import_react24.useCallback)(
|
|
1699
1705
|
(i) => {
|
|
1700
1706
|
if (onClick) {
|
|
1701
1707
|
onClick(i);
|
|
@@ -1705,10 +1711,10 @@ function DotNavigation(props) {
|
|
|
1705
1711
|
},
|
|
1706
1712
|
[onClick]
|
|
1707
1713
|
);
|
|
1708
|
-
(0,
|
|
1714
|
+
(0, import_react24.useEffect)(() => {
|
|
1709
1715
|
onChangeDotIndex == null ? void 0 : onChangeDotIndex(currentDot);
|
|
1710
1716
|
}, [currentDot, onChangeDotIndex]);
|
|
1711
|
-
(0,
|
|
1717
|
+
(0, import_react24.useEffect)(() => {
|
|
1712
1718
|
if (typeof dotIndex === "undefined")
|
|
1713
1719
|
return;
|
|
1714
1720
|
setCurrentDot(dotIndex);
|
|
@@ -1734,10 +1740,10 @@ function DotNavigation(props) {
|
|
|
1734
1740
|
}
|
|
1735
1741
|
|
|
1736
1742
|
// src/molecules/stepper.tsx
|
|
1737
|
-
var
|
|
1743
|
+
var import_react25 = require("react");
|
|
1738
1744
|
var import_themes51 = require("@radix-ui/themes");
|
|
1739
1745
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1740
|
-
var StepContext = (0,
|
|
1746
|
+
var StepContext = (0, import_react25.createContext)({
|
|
1741
1747
|
active: false,
|
|
1742
1748
|
completed: false,
|
|
1743
1749
|
index: 0
|
|
@@ -1760,7 +1766,7 @@ function Root9(props) {
|
|
|
1760
1766
|
minWidth,
|
|
1761
1767
|
maxWidth
|
|
1762
1768
|
},
|
|
1763
|
-
children:
|
|
1769
|
+
children: import_react25.Children.map(children, (child, index) => {
|
|
1764
1770
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1765
1771
|
StepContext.Provider,
|
|
1766
1772
|
{
|
|
@@ -1784,7 +1790,7 @@ function Step(props) {
|
|
|
1784
1790
|
completed,
|
|
1785
1791
|
index,
|
|
1786
1792
|
direction = "vertical"
|
|
1787
|
-
} = (0,
|
|
1793
|
+
} = (0, import_react25.useContext)(StepContext);
|
|
1788
1794
|
const connector = index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1789
1795
|
import_themes51.Separator,
|
|
1790
1796
|
{
|
|
@@ -1796,7 +1802,7 @@ function Step(props) {
|
|
|
1796
1802
|
}
|
|
1797
1803
|
}
|
|
1798
1804
|
) : null;
|
|
1799
|
-
const InnerStep = (0,
|
|
1805
|
+
const InnerStep = (0, import_react25.useMemo)(() => {
|
|
1800
1806
|
if (active) {
|
|
1801
1807
|
return ActiveStep;
|
|
1802
1808
|
}
|
|
@@ -1822,7 +1828,7 @@ function Step(props) {
|
|
|
1822
1828
|
}
|
|
1823
1829
|
function CompleteStep(props) {
|
|
1824
1830
|
const { Icon, children } = props;
|
|
1825
|
-
const { completed, active } = (0,
|
|
1831
|
+
const { completed, active } = (0, import_react25.useContext)(StepContext);
|
|
1826
1832
|
const background = "var(--accent-a4)";
|
|
1827
1833
|
const border = "1px solid var(--accent-7)";
|
|
1828
1834
|
const color = "var(--accent-contrast)";
|
|
@@ -1844,7 +1850,7 @@ function CompleteStep(props) {
|
|
|
1844
1850
|
}
|
|
1845
1851
|
function IncompleteStep(props) {
|
|
1846
1852
|
const { Icon, children } = props;
|
|
1847
|
-
const { completed, active, index } = (0,
|
|
1853
|
+
const { completed, active, index } = (0, import_react25.useContext)(StepContext);
|
|
1848
1854
|
const background = "var(--gray-5)";
|
|
1849
1855
|
const color = "var(--gray-a11)";
|
|
1850
1856
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
@@ -1864,7 +1870,7 @@ function IncompleteStep(props) {
|
|
|
1864
1870
|
}
|
|
1865
1871
|
function ActiveStep(props) {
|
|
1866
1872
|
const { Icon, children } = props;
|
|
1867
|
-
const { completed, active, index } = (0,
|
|
1873
|
+
const { completed, active, index } = (0, import_react25.useContext)(StepContext);
|
|
1868
1874
|
const background = "var(--accent-10)";
|
|
1869
1875
|
const color = "var(--accent-contrast)";
|
|
1870
1876
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
@@ -1886,7 +1892,7 @@ var Stepper = {
|
|
|
1886
1892
|
};
|
|
1887
1893
|
|
|
1888
1894
|
// src/molecules/tag-selector.tsx
|
|
1889
|
-
var
|
|
1895
|
+
var import_react26 = require("react");
|
|
1890
1896
|
var import_react_icons5 = require("@radix-ui/react-icons");
|
|
1891
1897
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1892
1898
|
var OPTION_HEIGHT = 32;
|
|
@@ -1904,22 +1910,22 @@ function TagSelector(props) {
|
|
|
1904
1910
|
readOnly,
|
|
1905
1911
|
error
|
|
1906
1912
|
} = props;
|
|
1907
|
-
const [_selected, _setSelected] = (0,
|
|
1913
|
+
const [_selected, _setSelected] = (0, import_react26.useState)(props.selected || []);
|
|
1908
1914
|
const selected = props.selected || _selected;
|
|
1909
1915
|
const setSelected = props.onChange || _setSelected;
|
|
1910
|
-
const [value, setValue] = (0,
|
|
1911
|
-
const [focusIndex, setFocusIndex] = (0,
|
|
1912
|
-
const [open, setOpen] = (0,
|
|
1913
|
-
const [focus, setFocus] = (0,
|
|
1914
|
-
const fieldRef = (0,
|
|
1915
|
-
const scrollRef = (0,
|
|
1916
|
-
const closeRef = (0,
|
|
1917
|
-
const onFocus = (0,
|
|
1916
|
+
const [value, setValue] = (0, import_react26.useState)("");
|
|
1917
|
+
const [focusIndex, setFocusIndex] = (0, import_react26.useState)(null);
|
|
1918
|
+
const [open, setOpen] = (0, import_react26.useState)(false);
|
|
1919
|
+
const [focus, setFocus] = (0, import_react26.useState)(false);
|
|
1920
|
+
const fieldRef = (0, import_react26.useRef)(null);
|
|
1921
|
+
const scrollRef = (0, import_react26.useRef)(null);
|
|
1922
|
+
const closeRef = (0, import_react26.useRef)();
|
|
1923
|
+
const onFocus = (0, import_react26.useCallback)(() => {
|
|
1918
1924
|
clearTimeout(closeRef.current);
|
|
1919
1925
|
setFocus(true);
|
|
1920
1926
|
setOpen(true);
|
|
1921
1927
|
}, []);
|
|
1922
|
-
const onBlur = (0,
|
|
1928
|
+
const onBlur = (0, import_react26.useCallback)(() => {
|
|
1923
1929
|
closeRef.current = setTimeout(() => {
|
|
1924
1930
|
setFocus(false);
|
|
1925
1931
|
setOpen(false);
|
|
@@ -1928,18 +1934,18 @@ function TagSelector(props) {
|
|
|
1928
1934
|
}, 100);
|
|
1929
1935
|
}, 300);
|
|
1930
1936
|
}, []);
|
|
1931
|
-
const onChangeValue = (0,
|
|
1937
|
+
const onChangeValue = (0, import_react26.useCallback)(
|
|
1932
1938
|
(e) => {
|
|
1933
1939
|
setValue(e.target.value);
|
|
1934
1940
|
},
|
|
1935
1941
|
[]
|
|
1936
1942
|
);
|
|
1937
|
-
const filteredOptions = (0,
|
|
1943
|
+
const filteredOptions = (0, import_react26.useMemo)(() => {
|
|
1938
1944
|
return options.filter((option) => {
|
|
1939
1945
|
return option.name.includes(value);
|
|
1940
1946
|
});
|
|
1941
1947
|
}, [options, value]);
|
|
1942
|
-
const selectedItem = (0,
|
|
1948
|
+
const selectedItem = (0, import_react26.useMemo)(() => {
|
|
1943
1949
|
const result = [];
|
|
1944
1950
|
selected.forEach((id) => {
|
|
1945
1951
|
const maybeItem = options.find((option) => option.id === id);
|
|
@@ -1948,13 +1954,13 @@ function TagSelector(props) {
|
|
|
1948
1954
|
});
|
|
1949
1955
|
return result;
|
|
1950
1956
|
}, [options, selected]);
|
|
1951
|
-
const onDelete = (0,
|
|
1957
|
+
const onDelete = (0, import_react26.useCallback)(
|
|
1952
1958
|
(id) => {
|
|
1953
1959
|
setSelected(selected.filter((el) => el !== id));
|
|
1954
1960
|
},
|
|
1955
1961
|
[selected, setSelected]
|
|
1956
1962
|
);
|
|
1957
|
-
const onSelect = (0,
|
|
1963
|
+
const onSelect = (0, import_react26.useCallback)(
|
|
1958
1964
|
(id) => {
|
|
1959
1965
|
if (maxCount && selected.length + 1 > maxCount)
|
|
1960
1966
|
return;
|
|
@@ -1962,7 +1968,7 @@ function TagSelector(props) {
|
|
|
1962
1968
|
},
|
|
1963
1969
|
[maxCount, selected, setSelected]
|
|
1964
1970
|
);
|
|
1965
|
-
const toggleItem = (0,
|
|
1971
|
+
const toggleItem = (0, import_react26.useCallback)(
|
|
1966
1972
|
(id) => {
|
|
1967
1973
|
if (selected.includes(id)) {
|
|
1968
1974
|
onDelete(id);
|
|
@@ -1972,7 +1978,7 @@ function TagSelector(props) {
|
|
|
1972
1978
|
},
|
|
1973
1979
|
[onDelete, onSelect, selected]
|
|
1974
1980
|
);
|
|
1975
|
-
const setScroll = (0,
|
|
1981
|
+
const setScroll = (0, import_react26.useCallback)((index) => {
|
|
1976
1982
|
if (scrollRef.current) {
|
|
1977
1983
|
const scrollTop = scrollRef.current.scrollTop;
|
|
1978
1984
|
const clientHeight = scrollRef.current.clientHeight;
|
|
@@ -1984,7 +1990,7 @@ function TagSelector(props) {
|
|
|
1984
1990
|
}
|
|
1985
1991
|
}
|
|
1986
1992
|
}, []);
|
|
1987
|
-
const handleKeyDown = (0,
|
|
1993
|
+
const handleKeyDown = (0, import_react26.useCallback)(
|
|
1988
1994
|
(e) => {
|
|
1989
1995
|
var _a;
|
|
1990
1996
|
const key = e.key;
|
|
@@ -2036,7 +2042,7 @@ function TagSelector(props) {
|
|
|
2036
2042
|
selected
|
|
2037
2043
|
]
|
|
2038
2044
|
);
|
|
2039
|
-
const placeholderVisible = (0,
|
|
2045
|
+
const placeholderVisible = (0, import_react26.useMemo)(() => {
|
|
2040
2046
|
if (selectedItem.length)
|
|
2041
2047
|
return false;
|
|
2042
2048
|
if (value)
|
|
@@ -2045,13 +2051,13 @@ function TagSelector(props) {
|
|
|
2045
2051
|
return false;
|
|
2046
2052
|
return true;
|
|
2047
2053
|
}, [focus, selectedItem.length, value]);
|
|
2048
|
-
(0,
|
|
2054
|
+
(0, import_react26.useEffect)(() => {
|
|
2049
2055
|
setFocusIndex(null);
|
|
2050
2056
|
}, [open]);
|
|
2051
|
-
(0,
|
|
2057
|
+
(0, import_react26.useEffect)(() => {
|
|
2052
2058
|
setFocusIndex(0);
|
|
2053
2059
|
}, [filteredOptions]);
|
|
2054
|
-
const badgeSize = (0,
|
|
2060
|
+
const badgeSize = (0, import_react26.useMemo)(() => {
|
|
2055
2061
|
switch (size) {
|
|
2056
2062
|
case "large":
|
|
2057
2063
|
return "large";
|
|
@@ -2061,7 +2067,7 @@ function TagSelector(props) {
|
|
|
2061
2067
|
return "small";
|
|
2062
2068
|
}
|
|
2063
2069
|
}, [size]);
|
|
2064
|
-
const placeholderVariant = (0,
|
|
2070
|
+
const placeholderVariant = (0, import_react26.useMemo)(() => {
|
|
2065
2071
|
switch (size) {
|
|
2066
2072
|
case "large":
|
|
2067
2073
|
return "subtitle";
|
|
@@ -2396,7 +2402,7 @@ function ForceRefresh() {
|
|
|
2396
2402
|
}
|
|
2397
2403
|
|
|
2398
2404
|
// src/molecules/date-picker/date-picker-button.tsx
|
|
2399
|
-
var
|
|
2405
|
+
var import_react27 = require("react");
|
|
2400
2406
|
var import_date_fns = require("date-fns");
|
|
2401
2407
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2402
2408
|
function DatePickerButton(props) {
|
|
@@ -2408,7 +2414,7 @@ function DatePickerButton(props) {
|
|
|
2408
2414
|
width: "100%"
|
|
2409
2415
|
};
|
|
2410
2416
|
const buttonProps = { size, color, style, variant };
|
|
2411
|
-
const selectFormat = (0,
|
|
2417
|
+
const selectFormat = (0, import_react27.useMemo)(() => {
|
|
2412
2418
|
if (formatProps)
|
|
2413
2419
|
return formatProps;
|
|
2414
2420
|
return (date) => date ? (0, import_date_fns.format)(date, "yyyy\uB144 MM\uC6D4 dd\uC77C") : placeholder;
|
|
@@ -2428,7 +2434,7 @@ function DatePickerButton(props) {
|
|
|
2428
2434
|
}
|
|
2429
2435
|
|
|
2430
2436
|
// src/molecules/time-select.tsx
|
|
2431
|
-
var
|
|
2437
|
+
var import_react28 = require("react");
|
|
2432
2438
|
|
|
2433
2439
|
// src/utils/get-cell-align.ts
|
|
2434
2440
|
var getCellAlign = (type) => {
|
|
@@ -2507,7 +2513,7 @@ function TimeSelect(_a) {
|
|
|
2507
2513
|
} = _b, rest = __objRest(_b, [
|
|
2508
2514
|
"value"
|
|
2509
2515
|
]);
|
|
2510
|
-
const timeOptions = (0,
|
|
2516
|
+
const timeOptions = (0, import_react28.useMemo)(() => {
|
|
2511
2517
|
return getTimeOptions();
|
|
2512
2518
|
}, []);
|
|
2513
2519
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Select.Root, __spreadProps(__spreadValues({ value }, rest), { children: [
|
|
@@ -2517,12 +2523,12 @@ function TimeSelect(_a) {
|
|
|
2517
2523
|
}
|
|
2518
2524
|
|
|
2519
2525
|
// src/molecules/radio-button-card.tsx
|
|
2520
|
-
var
|
|
2526
|
+
var import_react29 = require("react");
|
|
2521
2527
|
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2522
|
-
var RadioCardContext = (0,
|
|
2528
|
+
var RadioCardContext = (0, import_react29.createContext)({});
|
|
2523
2529
|
function Root10(props) {
|
|
2524
|
-
const [value, setValue] = (0,
|
|
2525
|
-
const onValueChange = (0,
|
|
2530
|
+
const [value, setValue] = (0, import_react29.useState)(props.value || props.defaultValue);
|
|
2531
|
+
const onValueChange = (0, import_react29.useCallback)(
|
|
2526
2532
|
(v) => {
|
|
2527
2533
|
var _a;
|
|
2528
2534
|
setValue(v);
|
|
@@ -2545,10 +2551,10 @@ function Item(_a) {
|
|
|
2545
2551
|
} = _b, itemRest = __objRest(_b, [
|
|
2546
2552
|
"children"
|
|
2547
2553
|
]);
|
|
2548
|
-
const _a2 = (0,
|
|
2554
|
+
const _a2 = (0, import_react29.useContext)(RadioCardContext), {
|
|
2549
2555
|
value,
|
|
2550
2556
|
justify,
|
|
2551
|
-
RadioWrapper =
|
|
2557
|
+
RadioWrapper = import_react29.Fragment
|
|
2552
2558
|
} = _a2, rootRest = __objRest(_a2, [
|
|
2553
2559
|
"value",
|
|
2554
2560
|
"justify",
|
|
@@ -2612,12 +2618,12 @@ var import_themes53 = require("@radix-ui/themes");
|
|
|
2612
2618
|
|
|
2613
2619
|
// dist/chunk-52MVZ6AN.js
|
|
2614
2620
|
var import_themes54 = require("@radix-ui/themes");
|
|
2615
|
-
var
|
|
2621
|
+
var import_react30 = require("react");
|
|
2616
2622
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2617
|
-
var Typo2 = (0,
|
|
2623
|
+
var Typo2 = (0, import_react30.forwardRef)(
|
|
2618
2624
|
(props, ref) => {
|
|
2619
2625
|
const _a = props, { size, variant, children } = _a, rest = __objRest2(_a, ["size", "variant", "children"]);
|
|
2620
|
-
const radixSize = (0,
|
|
2626
|
+
const radixSize = (0, import_react30.useMemo)(() => {
|
|
2621
2627
|
if (size !== void 0)
|
|
2622
2628
|
return size;
|
|
2623
2629
|
switch (variant) {
|
|
@@ -2851,7 +2857,7 @@ var EchartDefaultProps = {
|
|
|
2851
2857
|
};
|
|
2852
2858
|
|
|
2853
2859
|
// src/app/platform/userInfos/coaching-customer-info/small.tsx
|
|
2854
|
-
var
|
|
2860
|
+
var import_react31 = require("react");
|
|
2855
2861
|
var import_biz_utils = require("@tipp/biz-utils");
|
|
2856
2862
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2857
2863
|
function CoachingCustomerInfoSmall({
|
|
@@ -2859,10 +2865,10 @@ function CoachingCustomerInfoSmall({
|
|
|
2859
2865
|
session,
|
|
2860
2866
|
children
|
|
2861
2867
|
}) {
|
|
2862
|
-
const badgeColor = (0,
|
|
2868
|
+
const badgeColor = (0, import_react31.useMemo)(() => {
|
|
2863
2869
|
return (0, import_biz_utils.getColorFromProjectState)(session == null ? void 0 : session.state);
|
|
2864
2870
|
}, [session == null ? void 0 : session.state]);
|
|
2865
|
-
const sessionText = (0,
|
|
2871
|
+
const sessionText = (0, import_react31.useMemo)(() => {
|
|
2866
2872
|
return (0, import_biz_utils.getTextFromProjectState)(session == null ? void 0 : session.state);
|
|
2867
2873
|
}, [session == null ? void 0 : session.state]);
|
|
2868
2874
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
@@ -2884,7 +2890,7 @@ function CoachingCustomerInfoSmall({
|
|
|
2884
2890
|
}
|
|
2885
2891
|
|
|
2886
2892
|
// src/app/platform/userInfos/coaching-customer-info/medium.tsx
|
|
2887
|
-
var
|
|
2893
|
+
var import_react32 = require("react");
|
|
2888
2894
|
var import_biz_utils2 = require("@tipp/biz-utils");
|
|
2889
2895
|
|
|
2890
2896
|
// src/app/platform/userInfos/utils.tsx
|
|
@@ -2962,10 +2968,10 @@ function CoachingCustomerInfoMedium({
|
|
|
2962
2968
|
session,
|
|
2963
2969
|
children
|
|
2964
2970
|
}) {
|
|
2965
|
-
const badgeColor = (0,
|
|
2971
|
+
const badgeColor = (0, import_react32.useMemo)(() => {
|
|
2966
2972
|
return (0, import_biz_utils2.getColorFromProjectState)(session == null ? void 0 : session.state);
|
|
2967
2973
|
}, [session == null ? void 0 : session.state]);
|
|
2968
|
-
const sessionText = (0,
|
|
2974
|
+
const sessionText = (0, import_react32.useMemo)(() => {
|
|
2969
2975
|
return (0, import_biz_utils2.getTextFromProjectState)(session == null ? void 0 : session.state);
|
|
2970
2976
|
}, [session == null ? void 0 : session.state]);
|
|
2971
2977
|
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_themes22.Flex, { direction: "column", gap: "5", children: [
|
|
@@ -2989,7 +2995,7 @@ function CoachingCustomerInfoMedium({
|
|
|
2989
2995
|
}
|
|
2990
2996
|
|
|
2991
2997
|
// src/app/platform/userInfos/coaching-customer-info/large.tsx
|
|
2992
|
-
var
|
|
2998
|
+
var import_react33 = require("react");
|
|
2993
2999
|
var import_biz_utils3 = require("@tipp/biz-utils");
|
|
2994
3000
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2995
3001
|
function CoachingCustomerInfoLarge({
|
|
@@ -2997,10 +3003,10 @@ function CoachingCustomerInfoLarge({
|
|
|
2997
3003
|
session,
|
|
2998
3004
|
children
|
|
2999
3005
|
}) {
|
|
3000
|
-
const badgeColor = (0,
|
|
3006
|
+
const badgeColor = (0, import_react33.useMemo)(() => {
|
|
3001
3007
|
return (0, import_biz_utils3.getColorFromProjectState)(session == null ? void 0 : session.state);
|
|
3002
3008
|
}, [session == null ? void 0 : session.state]);
|
|
3003
|
-
const sessionText = (0,
|
|
3009
|
+
const sessionText = (0, import_react33.useMemo)(() => {
|
|
3004
3010
|
return (0, import_biz_utils3.getTextFromProjectState)(session == null ? void 0 : session.state);
|
|
3005
3011
|
}, [session == null ? void 0 : session.state]);
|
|
3006
3012
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_themes22.Flex, { direction: "column", gap: "5", children: [
|
|
@@ -3029,7 +3035,7 @@ function CoachingCustomerInfo(props) {
|
|
|
3029
3035
|
}
|
|
3030
3036
|
|
|
3031
3037
|
// src/app/platform/goal-manage-card-read.tsx
|
|
3032
|
-
var
|
|
3038
|
+
var import_react34 = require("react");
|
|
3033
3039
|
var import_date_fns3 = require("date-fns");
|
|
3034
3040
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3035
3041
|
function GoalManageCardRead(props) {
|
|
@@ -3044,12 +3050,12 @@ function GoalManageCardRead(props) {
|
|
|
3044
3050
|
defaultOpen,
|
|
3045
3051
|
onCompleteChange
|
|
3046
3052
|
} = props;
|
|
3047
|
-
const [open, setOpen] = (0,
|
|
3048
|
-
const onClickOpen = (0,
|
|
3053
|
+
const [open, setOpen] = (0, import_react34.useState)(Boolean(defaultOpen));
|
|
3054
|
+
const onClickOpen = (0, import_react34.useCallback)(() => {
|
|
3049
3055
|
setOpen((p) => !p);
|
|
3050
3056
|
}, []);
|
|
3051
3057
|
const icon = open ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_icons3.ChevronUpIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_icons3.ChevronDownIcon, {});
|
|
3052
|
-
const status = (0,
|
|
3058
|
+
const status = (0, import_react34.useMemo)(() => {
|
|
3053
3059
|
if (completed)
|
|
3054
3060
|
return;
|
|
3055
3061
|
if (!dueDate)
|
|
@@ -3058,19 +3064,19 @@ function GoalManageCardRead(props) {
|
|
|
3058
3064
|
return "\uBBF8\uB2EC\uC131";
|
|
3059
3065
|
return "\uC9C4\uD589 \uC911";
|
|
3060
3066
|
}, [completed, dueDate]);
|
|
3061
|
-
const statusColor = (0,
|
|
3067
|
+
const statusColor = (0, import_react34.useMemo)(() => {
|
|
3062
3068
|
if (status === "\uC9C4\uD589 \uC911")
|
|
3063
3069
|
return "success";
|
|
3064
3070
|
if (status === "\uBBF8\uB2EC\uC131")
|
|
3065
3071
|
return "error";
|
|
3066
3072
|
}, [status]);
|
|
3067
|
-
const renderSubTitle = (0,
|
|
3073
|
+
const renderSubTitle = (0, import_react34.useCallback)((subTitle) => {
|
|
3068
3074
|
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Heading2, { mb: "2", variant: "heading5", children: subTitle });
|
|
3069
3075
|
}, []);
|
|
3070
|
-
const renderSubContent = (0,
|
|
3076
|
+
const renderSubContent = (0, import_react34.useCallback)((content) => {
|
|
3071
3077
|
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Typo, { as: "p", color: "gray", children: content });
|
|
3072
3078
|
}, []);
|
|
3073
|
-
const renderCompleteButton = (0,
|
|
3079
|
+
const renderCompleteButton = (0, import_react34.useCallback)(() => {
|
|
3074
3080
|
if (completed) {
|
|
3075
3081
|
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_themes29.Popover.Root, { children: [
|
|
3076
3082
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_themes29.Popover.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Button, { size: "small", children: [
|
|
@@ -3152,7 +3158,7 @@ function GoalManageCardRead(props) {
|
|
|
3152
3158
|
}
|
|
3153
3159
|
|
|
3154
3160
|
// src/app/platform/goal-manage-card-edit.tsx
|
|
3155
|
-
var
|
|
3161
|
+
var import_react35 = require("react");
|
|
3156
3162
|
var import_date_fns4 = require("date-fns");
|
|
3157
3163
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3158
3164
|
var initialValues = {
|
|
@@ -3165,8 +3171,8 @@ var dummyFn = () => {
|
|
|
3165
3171
|
};
|
|
3166
3172
|
function GoalManageCardEdit(props) {
|
|
3167
3173
|
const { defaultValues, errors } = props;
|
|
3168
|
-
const [values, setValues] = (0,
|
|
3169
|
-
const onChange = (0,
|
|
3174
|
+
const [values, setValues] = (0, import_react35.useState)(defaultValues || initialValues);
|
|
3175
|
+
const onChange = (0, import_react35.useCallback)(
|
|
3170
3176
|
(v) => {
|
|
3171
3177
|
var _a;
|
|
3172
3178
|
setValues((prev) => __spreadValues(__spreadValues({}, prev), v));
|
|
@@ -3174,12 +3180,12 @@ function GoalManageCardEdit(props) {
|
|
|
3174
3180
|
},
|
|
3175
3181
|
[props]
|
|
3176
3182
|
);
|
|
3177
|
-
const onClickInit = (0,
|
|
3183
|
+
const onClickInit = (0, import_react35.useCallback)(() => {
|
|
3178
3184
|
var _a;
|
|
3179
3185
|
setValues(initialValues);
|
|
3180
3186
|
(_a = props.onChange) == null ? void 0 : _a.call(props, defaultValues || initialValues);
|
|
3181
3187
|
}, [defaultValues, props]);
|
|
3182
|
-
const onClickSubmit = (0,
|
|
3188
|
+
const onClickSubmit = (0, import_react35.useCallback)(() => {
|
|
3183
3189
|
var _a;
|
|
3184
3190
|
(_a = props.onSubmit) == null ? void 0 : _a.call(props, values);
|
|
3185
3191
|
}, [props, values]);
|
|
@@ -3268,11 +3274,11 @@ function GoalManageCardEdit(props) {
|
|
|
3268
3274
|
}
|
|
3269
3275
|
|
|
3270
3276
|
// src/app/platform/session-card.tsx
|
|
3271
|
-
var
|
|
3277
|
+
var import_react38 = require("react");
|
|
3272
3278
|
var import_date_fns5 = require("date-fns");
|
|
3273
3279
|
|
|
3274
3280
|
// src/app/platform/edit-coaching-time.tsx
|
|
3275
|
-
var
|
|
3281
|
+
var import_react36 = require("react");
|
|
3276
3282
|
|
|
3277
3283
|
// src/layouts/response-display.tsx
|
|
3278
3284
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
@@ -3333,14 +3339,14 @@ var getDateFromValue = (date, time) => {
|
|
|
3333
3339
|
};
|
|
3334
3340
|
function EditCoachingTime(props) {
|
|
3335
3341
|
const { defaultEndAt, defaultStartAt, onClickCancel, sessionNumber } = props;
|
|
3336
|
-
const [values, setValues] = (0,
|
|
3342
|
+
const [values, setValues] = (0, import_react36.useState)(() => {
|
|
3337
3343
|
return getValueFromDefaultValue({
|
|
3338
3344
|
startAt: defaultStartAt,
|
|
3339
3345
|
endAt: defaultEndAt
|
|
3340
3346
|
});
|
|
3341
3347
|
});
|
|
3342
|
-
const [timeError, setTimeError] = (0,
|
|
3343
|
-
const checkTimeError = (0,
|
|
3348
|
+
const [timeError, setTimeError] = (0, import_react36.useState)("");
|
|
3349
|
+
const checkTimeError = (0, import_react36.useCallback)(
|
|
3344
3350
|
(startTime, endTime) => {
|
|
3345
3351
|
const error = startTime >= endTime ? "\uC2DC\uC791\uC2DC\uAC04\uC744 \uC885\uB8CC\uC2DC\uAC04\uBCF4\uB2E4 \uBE60\uB974\uAC8C \uC120\uD0DD\uD574\uC8FC\uC138\uC694." : "";
|
|
3346
3352
|
if (error) {
|
|
@@ -3351,7 +3357,7 @@ function EditCoachingTime(props) {
|
|
|
3351
3357
|
},
|
|
3352
3358
|
[]
|
|
3353
3359
|
);
|
|
3354
|
-
const onChangeStartTime = (0,
|
|
3360
|
+
const onChangeStartTime = (0, import_react36.useCallback)(
|
|
3355
3361
|
(v) => {
|
|
3356
3362
|
checkTimeError(v, values.endTime);
|
|
3357
3363
|
setValues((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
@@ -3360,7 +3366,7 @@ function EditCoachingTime(props) {
|
|
|
3360
3366
|
},
|
|
3361
3367
|
[checkTimeError, values.endTime]
|
|
3362
3368
|
);
|
|
3363
|
-
const onChangeEndTime = (0,
|
|
3369
|
+
const onChangeEndTime = (0, import_react36.useCallback)(
|
|
3364
3370
|
(v) => {
|
|
3365
3371
|
checkTimeError(values.startTime, v);
|
|
3366
3372
|
setValues((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
@@ -3369,12 +3375,12 @@ function EditCoachingTime(props) {
|
|
|
3369
3375
|
},
|
|
3370
3376
|
[checkTimeError, values.startTime]
|
|
3371
3377
|
);
|
|
3372
|
-
const onChangeDate = (0,
|
|
3378
|
+
const onChangeDate = (0, import_react36.useCallback)((date) => {
|
|
3373
3379
|
date && setValues((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
3374
3380
|
date
|
|
3375
3381
|
}));
|
|
3376
3382
|
}, []);
|
|
3377
|
-
const onClickSave = (0,
|
|
3383
|
+
const onClickSave = (0, import_react36.useCallback)(() => {
|
|
3378
3384
|
if (checkTimeError(values.startTime, values.endTime)) {
|
|
3379
3385
|
const startAt = getDateFromValue(values.date, values.startTime);
|
|
3380
3386
|
const endAt = getDateFromValue(values.date, values.endTime);
|
|
@@ -3469,7 +3475,7 @@ function EditCoachingTime(props) {
|
|
|
3469
3475
|
}
|
|
3470
3476
|
|
|
3471
3477
|
// src/app/platform/edit-service-type.tsx
|
|
3472
|
-
var
|
|
3478
|
+
var import_react37 = require("react");
|
|
3473
3479
|
|
|
3474
3480
|
// src/app/platform/on-offline-radio-card.tsx
|
|
3475
3481
|
var import_react_icons9 = require("@radix-ui/react-icons");
|
|
@@ -3512,10 +3518,10 @@ function OnOfflineRadioCard(props) {
|
|
|
3512
3518
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3513
3519
|
function EditServiceType(props) {
|
|
3514
3520
|
const { sessionNumber, defaultServiceType, onClickCancel } = props;
|
|
3515
|
-
const [sessionType, setSessionType] = (0,
|
|
3521
|
+
const [sessionType, setSessionType] = (0, import_react37.useState)(
|
|
3516
3522
|
defaultServiceType
|
|
3517
3523
|
);
|
|
3518
|
-
const onClickSave = (0,
|
|
3524
|
+
const onClickSave = (0, import_react37.useCallback)(() => {
|
|
3519
3525
|
var _a;
|
|
3520
3526
|
(_a = props.onClickSave) == null ? void 0 : _a.call(props, sessionType);
|
|
3521
3527
|
}, [props, sessionType]);
|
|
@@ -3586,10 +3592,10 @@ function SessionCard(props) {
|
|
|
3586
3592
|
"endAt",
|
|
3587
3593
|
"sessionType"
|
|
3588
3594
|
]);
|
|
3589
|
-
const renderEditButton = (0,
|
|
3595
|
+
const renderEditButton = (0, import_react38.useCallback)(() => {
|
|
3590
3596
|
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Button, { color: "gray", ml: "2", variant: "transparent", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react_icons3.Pencil1Icon, {}) });
|
|
3591
3597
|
}, []);
|
|
3592
|
-
const sessionTimeStr = (0,
|
|
3598
|
+
const sessionTimeStr = (0, import_react38.useMemo)(() => {
|
|
3593
3599
|
if (!startAt || !endAt)
|
|
3594
3600
|
return "\uC54C \uC218 \uC5C6\uC74C";
|
|
3595
3601
|
return `${(0, import_date_fns5.format)(startAt, "yyyy\uB144 MM\uC6D4 dd\uC77C HH\uC2DC mm\uBD84")} ~ ${(0, import_date_fns5.format)(endAt, "HH\uC2DC mm\uBD84")}`;
|
|
@@ -3665,7 +3671,7 @@ function CoachQuestionList({
|
|
|
3665
3671
|
}
|
|
3666
3672
|
|
|
3667
3673
|
// src/app/platform/reservation-card.tsx
|
|
3668
|
-
var
|
|
3674
|
+
var import_react39 = require("react");
|
|
3669
3675
|
var import_date_fns6 = require("date-fns");
|
|
3670
3676
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3671
3677
|
function ReservationCard(props) {
|
|
@@ -3680,30 +3686,30 @@ function ReservationCard(props) {
|
|
|
3680
3686
|
onClickCancel,
|
|
3681
3687
|
onClickCompleteSession
|
|
3682
3688
|
} = props;
|
|
3683
|
-
const [editValues, setEditValues] = (0,
|
|
3689
|
+
const [editValues, setEditValues] = (0, import_react39.useState)({
|
|
3684
3690
|
date: props.defaultTime,
|
|
3685
3691
|
type: props.defaultType
|
|
3686
3692
|
});
|
|
3687
3693
|
const date = readonly ? defaultTime : editValues.date;
|
|
3688
3694
|
const type = readonly ? defaultType : editValues.type;
|
|
3689
3695
|
const time = date && getTimeOption(date);
|
|
3690
|
-
const onClickSave = (0,
|
|
3696
|
+
const onClickSave = (0, import_react39.useCallback)(() => {
|
|
3691
3697
|
var _a;
|
|
3692
3698
|
(_a = props.onClickSave) == null ? void 0 : _a.call(props, editValues);
|
|
3693
3699
|
}, [editValues, props]);
|
|
3694
|
-
const onClickReset = (0,
|
|
3700
|
+
const onClickReset = (0, import_react39.useCallback)(() => {
|
|
3695
3701
|
setEditValues({
|
|
3696
3702
|
date: defaultTime,
|
|
3697
3703
|
type: defaultType
|
|
3698
3704
|
});
|
|
3699
3705
|
}, [defaultTime, defaultType]);
|
|
3700
|
-
const ActionButtons = (0,
|
|
3706
|
+
const ActionButtons = (0, import_react39.useMemo)(() => {
|
|
3701
3707
|
if (readonly) {
|
|
3702
3708
|
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Button, { onClick: onClickReserve, size: "small", variant: "surface", children: "\uC608\uC57D\uD558\uAE30" });
|
|
3703
3709
|
}
|
|
3704
3710
|
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Button, { color: "gray", onClick: onClickCancel, variant: "transparent", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react_icons3.Cross1Icon, {}) });
|
|
3705
3711
|
}, [onClickCancel, onClickReserve, readonly]);
|
|
3706
|
-
const onChangeDate = (0,
|
|
3712
|
+
const onChangeDate = (0, import_react39.useCallback)(
|
|
3707
3713
|
(newDate) => {
|
|
3708
3714
|
if (!newDate)
|
|
3709
3715
|
return;
|
|
@@ -3716,14 +3722,14 @@ function ReservationCard(props) {
|
|
|
3716
3722
|
},
|
|
3717
3723
|
[time]
|
|
3718
3724
|
);
|
|
3719
|
-
const onChangeType = (0,
|
|
3725
|
+
const onChangeType = (0, import_react39.useCallback)((newType) => {
|
|
3720
3726
|
setEditValues((prev) => {
|
|
3721
3727
|
return __spreadProps(__spreadValues({}, prev), {
|
|
3722
3728
|
type: newType
|
|
3723
3729
|
});
|
|
3724
3730
|
});
|
|
3725
3731
|
}, []);
|
|
3726
|
-
const onChangeTime = (0,
|
|
3732
|
+
const onChangeTime = (0, import_react39.useCallback)(
|
|
3727
3733
|
(v) => {
|
|
3728
3734
|
const { hour, minute } = parseTimeOption(v);
|
|
3729
3735
|
setEditValues((prev) => {
|
|
@@ -3849,7 +3855,7 @@ function ReservationCard(props) {
|
|
|
3849
3855
|
}
|
|
3850
3856
|
|
|
3851
3857
|
// src/app/platform/session-review-simple-read.tsx
|
|
3852
|
-
var
|
|
3858
|
+
var import_react40 = require("react");
|
|
3853
3859
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3854
3860
|
function SubTitleWrapper({
|
|
3855
3861
|
children,
|
|
@@ -3866,7 +3872,7 @@ function SessionReviewSimpleRead({
|
|
|
3866
3872
|
sessionNumber,
|
|
3867
3873
|
customerName
|
|
3868
3874
|
}) {
|
|
3869
|
-
const helpfulnessMeta = (0,
|
|
3875
|
+
const helpfulnessMeta = (0, import_react40.useMemo)(() => {
|
|
3870
3876
|
if (helpfulness) {
|
|
3871
3877
|
return {
|
|
3872
3878
|
text: "\uB124",
|