@tipp/ui 2.1.32 → 2.1.33
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 +154 -137
- package/dist/app/index.cjs.map +1 -1
- package/dist/app/index.js +6 -6
- package/dist/app/platform/coach-question-list.cjs +47 -46
- package/dist/app/platform/coach-question-list.cjs.map +1 -1
- package/dist/app/platform/coach-question-list.js +1 -1
- package/dist/app/platform/contents-card.cjs +43 -42
- package/dist/app/platform/contents-card.cjs.map +1 -1
- package/dist/app/platform/contents-card.js +1 -1
- package/dist/app/platform/edit-coaching-time.cjs +110 -93
- package/dist/app/platform/edit-coaching-time.cjs.map +1 -1
- package/dist/app/platform/edit-coaching-time.js +4 -4
- package/dist/app/platform/edit-service-type.cjs +105 -88
- package/dist/app/platform/edit-service-type.cjs.map +1 -1
- package/dist/app/platform/edit-service-type.js +4 -4
- package/dist/app/platform/goal-manage-card-edit.cjs +81 -80
- package/dist/app/platform/goal-manage-card-edit.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-edit.js +3 -3
- package/dist/app/platform/goal-manage-card-read.cjs +58 -57
- package/dist/app/platform/goal-manage-card-read.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-read.js +1 -1
- package/dist/app/platform/on-offline-radio-card.cjs +77 -76
- package/dist/app/platform/on-offline-radio-card.cjs.map +1 -1
- package/dist/app/platform/on-offline-radio-card.js +3 -3
- package/dist/app/platform/report-card.cjs +49 -48
- package/dist/app/platform/report-card.cjs.map +1 -1
- package/dist/app/platform/report-card.js +1 -1
- package/dist/app/platform/reservation-card.cjs +90 -89
- package/dist/app/platform/reservation-card.cjs.map +1 -1
- package/dist/app/platform/reservation-card.js +3 -3
- package/dist/app/platform/session-card.cjs +122 -105
- package/dist/app/platform/session-card.cjs.map +1 -1
- package/dist/app/platform/session-card.js +6 -6
- package/dist/app/platform/session-review-simple-read.cjs +49 -48
- package/dist/app/platform/session-review-simple-read.cjs.map +1 -1
- package/dist/app/platform/session-review-simple-read.js +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/index.cjs +47 -46
- package/dist/app/platform/userInfos/coaching-customer-info/index.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/index.js +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/large.cjs +47 -46
- package/dist/app/platform/userInfos/coaching-customer-info/large.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/large.js +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/medium.cjs +47 -46
- package/dist/app/platform/userInfos/coaching-customer-info/medium.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/medium.js +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/small.cjs +47 -46
- package/dist/app/platform/userInfos/coaching-customer-info/small.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/small.js +1 -1
- package/dist/app/platform/userInfos/session-user-info-detail.cjs +47 -46
- package/dist/app/platform/userInfos/session-user-info-detail.cjs.map +1 -1
- package/dist/app/platform/userInfos/session-user-info-detail.js +1 -1
- package/dist/app/platform/userInfos/utils.cjs +47 -46
- package/dist/app/platform/userInfos/utils.cjs.map +1 -1
- package/dist/app/platform/userInfos/utils.js +1 -1
- package/dist/atoms/dialog.cjs +18 -1
- package/dist/atoms/dialog.cjs.map +1 -1
- package/dist/atoms/dialog.d.cts +2 -1
- package/dist/atoms/dialog.d.ts +2 -1
- package/dist/atoms/dialog.js +1 -1
- package/dist/atoms/index.cjs +93 -76
- package/dist/atoms/index.cjs.map +1 -1
- package/dist/atoms/index.js +1 -1
- package/dist/chunk-622FYVC5.js +144 -0
- package/dist/chunk-622FYVC5.js.map +1 -0
- package/dist/chunk-6WLTWUH4.js +54 -0
- package/dist/chunk-6WLTWUH4.js.map +1 -0
- package/dist/chunk-DDRIETGE.js +123 -0
- package/dist/chunk-DDRIETGE.js.map +1 -0
- package/dist/chunk-RJGVWB6N.js +64 -0
- package/dist/chunk-RJGVWB6N.js.map +1 -0
- package/dist/chunk-TFIRB3XY.js +196 -0
- package/dist/chunk-TFIRB3XY.js.map +1 -0
- package/dist/chunk-XFL7MIQ3.js +174 -0
- package/dist/chunk-XFL7MIQ3.js.map +1 -0
- package/dist/index.cjs +260 -243
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -6
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.cjs +60 -59
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.js +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-comp.cjs +47 -46
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-comp.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-comp.js +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.cjs +57 -56
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.js +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-footer.cjs +47 -46
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-footer.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-footer.js +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-header.cjs +50 -49
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-header.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-header.js +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-layout.cjs +47 -46
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-layout.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-layout.js +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-radio.cjs +57 -56
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-radio.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-radio.js +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-option.cjs +47 -46
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-option.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-option.js +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-text.cjs +47 -46
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-text.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-text.js +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-text.cjs +47 -46
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-text.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-text.js +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/complete-review.cjs +50 -49
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/complete-review.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/complete-review.js +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.cjs +57 -56
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.js +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.cjs +50 -49
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.js +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-ai-traning.cjs +52 -51
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-ai-traning.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-ai-traning.js +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.cjs +112 -95
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-video.cjs +49 -48
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-video.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-video.js +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/index.cjs +116 -99
- package/dist/molecules/curriculumV2/CurriculumContents/index.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/index.js +3 -3
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/curriculum-item-title.cjs +47 -46
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/curriculum-item-title.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/curriculum-item-title.js +1 -1
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/curriculum-sidebar-item-wrapper.cjs +47 -46
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/curriculum-sidebar-item-wrapper.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/curriculum-sidebar-item-wrapper.js +1 -1
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/section-item.cjs +47 -46
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/section-item.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/section-item.js +1 -1
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/section-title.cjs +47 -46
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/section-title.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/section-title.js +1 -1
- package/dist/molecules/curriculumV2/CurriculumSidebar/index.cjs +50 -49
- package/dist/molecules/curriculumV2/CurriculumSidebar/index.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumSidebar/index.js +1 -1
- package/dist/molecules/curriculumV2/CurriculumSidebar/sidebar-item.cjs +47 -46
- package/dist/molecules/curriculumV2/CurriculumSidebar/sidebar-item.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumSidebar/sidebar-item.js +1 -1
- package/dist/molecules/curriculumV2/curriculum-sub-nav.cjs +53 -52
- package/dist/molecules/curriculumV2/curriculum-sub-nav.cjs.map +1 -1
- package/dist/molecules/curriculumV2/curriculum-sub-nav.js +1 -1
- package/dist/molecules/curriculumV2/curriculum-v2-layout.cjs +47 -46
- package/dist/molecules/curriculumV2/curriculum-v2-layout.cjs.map +1 -1
- package/dist/molecules/curriculumV2/curriculum-v2-layout.js +1 -1
- package/dist/molecules/curriculumV2/index.cjs +116 -99
- package/dist/molecules/curriculumV2/index.cjs.map +1 -1
- package/dist/molecules/curriculumV2/index.js +3 -3
- package/dist/molecules/date-picker/date-picker-button.cjs +58 -57
- package/dist/molecules/date-picker/date-picker-button.cjs.map +1 -1
- package/dist/molecules/date-picker/date-picker-button.js +1 -1
- package/dist/molecules/date-picker/index.cjs +54 -53
- package/dist/molecules/date-picker/index.cjs.map +1 -1
- package/dist/molecules/date-picker/index.js +1 -1
- package/dist/molecules/expand-table/index.cjs +74 -73
- package/dist/molecules/expand-table/index.cjs.map +1 -1
- package/dist/molecules/expand-table/index.js +1 -1
- package/dist/molecules/expand-table/row.cjs +55 -54
- package/dist/molecules/expand-table/row.cjs.map +1 -1
- package/dist/molecules/expand-table/row.js +1 -1
- package/dist/molecules/index.cjs +212 -195
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.js +3 -3
- package/dist/molecules/navigation.cjs +47 -46
- package/dist/molecules/navigation.cjs.map +1 -1
- package/dist/molecules/navigation.js +1 -1
- package/dist/molecules/radio-button-card.cjs +53 -52
- package/dist/molecules/radio-button-card.cjs.map +1 -1
- package/dist/molecules/radio-button-card.js +1 -1
- package/dist/molecules/tag-selector.cjs +71 -70
- package/dist/molecules/tag-selector.cjs.map +1 -1
- package/dist/molecules/tag-selector.js +1 -1
- package/dist/molecules/time-select.cjs +50 -49
- package/dist/molecules/time-select.cjs.map +1 -1
- package/dist/molecules/time-select.js +1 -1
- package/package.json +1 -1
- package/src/atoms/dialog.tsx +30 -3
package/dist/index.cjs
CHANGED
|
@@ -197,7 +197,7 @@ __export(index_exports, {
|
|
|
197
197
|
ReservationCard: () => ReservationCard,
|
|
198
198
|
ResetIcon: () => import_react_icons2.ResetIcon,
|
|
199
199
|
RocketIcon: () => import_react_icons2.RocketIcon,
|
|
200
|
-
Root: () =>
|
|
200
|
+
Root: () => Root7,
|
|
201
201
|
RowsIcon: () => import_react_icons2.RowsIcon,
|
|
202
202
|
ScrollArea: () => import_themes35.ScrollArea,
|
|
203
203
|
Section: () => import_themes36.Section,
|
|
@@ -505,6 +505,7 @@ var import_themes15 = require("@radix-ui/themes");
|
|
|
505
505
|
var RadixDialog = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
506
506
|
var import_react_icons = require("@radix-ui/react-icons");
|
|
507
507
|
var import_themes19 = require("@radix-ui/themes");
|
|
508
|
+
var import_react9 = require("react");
|
|
508
509
|
|
|
509
510
|
// src/theme/portal-provider.tsx
|
|
510
511
|
var import_react7 = require("react");
|
|
@@ -662,8 +663,24 @@ function Trigger2(_a) {
|
|
|
662
663
|
]);
|
|
663
664
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(RadixDialog.Trigger, __spreadProps(__spreadValues({ asChild: true }, rest), { children }));
|
|
664
665
|
}
|
|
666
|
+
function Root3(props) {
|
|
667
|
+
(0, import_react9.useEffect)(() => {
|
|
668
|
+
if (!props.open) {
|
|
669
|
+
const timer = setTimeout(() => {
|
|
670
|
+
var _a;
|
|
671
|
+
const activeElement = document.activeElement;
|
|
672
|
+
(_a = activeElement == null ? void 0 : activeElement.blur) == null ? void 0 : _a.call(activeElement);
|
|
673
|
+
document.body.style.pointerEvents = "";
|
|
674
|
+
}, 100);
|
|
675
|
+
return () => {
|
|
676
|
+
clearTimeout(timer);
|
|
677
|
+
};
|
|
678
|
+
}
|
|
679
|
+
}, [props.open]);
|
|
680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(RadixDialog.Root, __spreadValues({}, props));
|
|
681
|
+
}
|
|
665
682
|
var Dialog = {
|
|
666
|
-
Root:
|
|
683
|
+
Root: Root3,
|
|
667
684
|
Trigger: Trigger2,
|
|
668
685
|
Content: Content2,
|
|
669
686
|
Close: Close2,
|
|
@@ -673,11 +690,11 @@ var Dialog = {
|
|
|
673
690
|
|
|
674
691
|
// src/atoms/dropdown-menu.tsx
|
|
675
692
|
var import_themes20 = require("@radix-ui/themes");
|
|
676
|
-
var
|
|
693
|
+
var import_react10 = require("react");
|
|
677
694
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
678
|
-
var Content3 = (0,
|
|
695
|
+
var Content3 = (0, import_react10.forwardRef)((props, ref) => {
|
|
679
696
|
const _a = props, { isNavigation, className } = _a, rest = __objRest(_a, ["isNavigation", "className"]);
|
|
680
|
-
const contentClassName = (0,
|
|
697
|
+
const contentClassName = (0, import_react10.useMemo)(() => {
|
|
681
698
|
const cls = isNavigation ? "dropdown-navigation" : "";
|
|
682
699
|
return [cls, className].join(" ");
|
|
683
700
|
}, [isNavigation, className]);
|
|
@@ -715,12 +732,12 @@ var import_themes26 = require("@radix-ui/themes");
|
|
|
715
732
|
|
|
716
733
|
// src/atoms/link.tsx
|
|
717
734
|
var import_themes27 = require("@radix-ui/themes");
|
|
718
|
-
var
|
|
735
|
+
var import_react11 = require("react");
|
|
719
736
|
var import_themes28 = require("@radix-ui/themes");
|
|
720
737
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
721
738
|
function Link(props) {
|
|
722
739
|
const _a = props, { size, children, variant } = _a, rest = __objRest(_a, ["size", "children", "variant"]);
|
|
723
|
-
const radixSize = (0,
|
|
740
|
+
const radixSize = (0, import_react11.useMemo)(() => {
|
|
724
741
|
switch (variant) {
|
|
725
742
|
case "caption":
|
|
726
743
|
return "1";
|
|
@@ -764,15 +781,15 @@ var import_themes37 = require("@radix-ui/themes");
|
|
|
764
781
|
|
|
765
782
|
// src/atoms/select.tsx
|
|
766
783
|
var import_themes38 = require("@radix-ui/themes");
|
|
767
|
-
var
|
|
784
|
+
var import_react12 = require("react");
|
|
768
785
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
769
|
-
var SelectContext = (0,
|
|
786
|
+
var SelectContext = (0, import_react12.createContext)({
|
|
770
787
|
error: false
|
|
771
788
|
});
|
|
772
|
-
var Content4 = (0,
|
|
789
|
+
var Content4 = (0, import_react12.forwardRef)((props, ref) => {
|
|
773
790
|
const _a = props, { className, isNavigation } = _a, rest = __objRest(_a, ["className", "isNavigation"]);
|
|
774
|
-
const { error } = (0,
|
|
775
|
-
const cls = (0,
|
|
791
|
+
const { error } = (0, import_react12.useContext)(SelectContext);
|
|
792
|
+
const cls = (0, import_react12.useMemo)(() => {
|
|
776
793
|
const etc = isNavigation ? "nav-select" : "";
|
|
777
794
|
const errorCls = error ? "tipp-error" : "";
|
|
778
795
|
return [etc, errorCls, className].join(" ");
|
|
@@ -788,11 +805,11 @@ var Content4 = (0, import_react11.forwardRef)((props, ref) => {
|
|
|
788
805
|
);
|
|
789
806
|
});
|
|
790
807
|
Content4.displayName = "Select.Content";
|
|
791
|
-
var Trigger3 = (0,
|
|
808
|
+
var Trigger3 = (0, import_react12.forwardRef)(
|
|
792
809
|
(props, ref) => {
|
|
793
810
|
const _a = props, { className } = _a, rest = __objRest(_a, ["className"]);
|
|
794
|
-
const { error } = (0,
|
|
795
|
-
const cls = (0,
|
|
811
|
+
const { error } = (0, import_react12.useContext)(SelectContext);
|
|
812
|
+
const cls = (0, import_react12.useMemo)(() => {
|
|
796
813
|
const errorCls = error ? "error" : "";
|
|
797
814
|
return [errorCls, className].join(" ");
|
|
798
815
|
}, [className, error]);
|
|
@@ -800,13 +817,13 @@ var Trigger3 = (0, import_react11.forwardRef)(
|
|
|
800
817
|
}
|
|
801
818
|
);
|
|
802
819
|
Trigger3.displayName = "Select.Trigger";
|
|
803
|
-
function
|
|
820
|
+
function Root4(props) {
|
|
804
821
|
const _a = props, { error } = _a, rest = __objRest(_a, ["error"]);
|
|
805
822
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SelectContext.Provider, { value: { error }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_themes38.Select.Root, __spreadValues({}, rest)) });
|
|
806
823
|
}
|
|
807
|
-
|
|
824
|
+
Root4.displayName = "Select.Root";
|
|
808
825
|
var Select = __spreadProps(__spreadValues({}, import_themes38.Select), {
|
|
809
|
-
Root:
|
|
826
|
+
Root: Root4,
|
|
810
827
|
Trigger: Trigger3,
|
|
811
828
|
Content: Content4
|
|
812
829
|
});
|
|
@@ -831,12 +848,12 @@ var import_themes44 = require("@radix-ui/themes");
|
|
|
831
848
|
|
|
832
849
|
// src/atoms/text-area.tsx
|
|
833
850
|
var import_themes45 = require("@radix-ui/themes");
|
|
834
|
-
var
|
|
851
|
+
var import_react13 = require("react");
|
|
835
852
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
836
|
-
var TextArea = (0,
|
|
853
|
+
var TextArea = (0, import_react13.forwardRef)(
|
|
837
854
|
(props, ref) => {
|
|
838
855
|
const _a = props, { error, style, className } = _a, rest = __objRest(_a, ["error", "style", "className"]);
|
|
839
|
-
const fieldStyle = (0,
|
|
856
|
+
const fieldStyle = (0, import_react13.useMemo)(() => {
|
|
840
857
|
if (!error) return style;
|
|
841
858
|
const errorStyle = {
|
|
842
859
|
boxShadow: "inset 0 0 0 var(--text-area-border-width) var(--error-11)"
|
|
@@ -858,12 +875,12 @@ TextArea.displayName = "TextArea";
|
|
|
858
875
|
|
|
859
876
|
// src/atoms/typo.tsx
|
|
860
877
|
var import_themes46 = require("@radix-ui/themes");
|
|
861
|
-
var
|
|
878
|
+
var import_react14 = require("react");
|
|
862
879
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
863
|
-
var Typo = (0,
|
|
880
|
+
var Typo = (0, import_react14.forwardRef)(
|
|
864
881
|
(props, ref) => {
|
|
865
882
|
const _a = props, { size, variant, children } = _a, rest = __objRest(_a, ["size", "variant", "children"]);
|
|
866
|
-
const radixSize = (0,
|
|
883
|
+
const radixSize = (0, import_react14.useMemo)(() => {
|
|
867
884
|
if (size !== void 0) return size;
|
|
868
885
|
if (variant === void 0) return "2";
|
|
869
886
|
return mapWithResponsive({
|
|
@@ -888,11 +905,11 @@ Typo.displayName = "Typo";
|
|
|
888
905
|
|
|
889
906
|
// src/atoms/text-field.tsx
|
|
890
907
|
var import_themes47 = require("@radix-ui/themes");
|
|
891
|
-
var
|
|
908
|
+
var import_react15 = require("react");
|
|
892
909
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
893
|
-
var
|
|
910
|
+
var Root5 = (0, import_react15.forwardRef)((props, ref) => {
|
|
894
911
|
const _a = props, { error, style, className } = _a, rest = __objRest(_a, ["error", "style", "className"]);
|
|
895
|
-
const fieldStyle = (0,
|
|
912
|
+
const fieldStyle = (0, import_react15.useMemo)(() => {
|
|
896
913
|
if (!error) return style;
|
|
897
914
|
const errorStyle = {
|
|
898
915
|
boxShadow: "inset 0 0 0 var(--text-field-border-width) var(--error-11)"
|
|
@@ -909,26 +926,26 @@ var Root4 = (0, import_react14.forwardRef)((props, ref) => {
|
|
|
909
926
|
}, rest)
|
|
910
927
|
);
|
|
911
928
|
});
|
|
912
|
-
|
|
913
|
-
var TextField = { Root:
|
|
929
|
+
Root5.displayName = "TextField.Root";
|
|
930
|
+
var TextField = { Root: Root5, Slot: import_themes47.TextField.Slot };
|
|
914
931
|
|
|
915
932
|
// src/atoms/tooltip.tsx
|
|
916
933
|
var import_themes48 = require("@radix-ui/themes");
|
|
917
934
|
|
|
918
935
|
// src/atoms/collapse.tsx
|
|
919
|
-
var
|
|
936
|
+
var import_react16 = require("react");
|
|
920
937
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
921
938
|
function Collapse(props) {
|
|
922
939
|
const { children, closedHeight = "0" } = props;
|
|
923
|
-
const [open, setOpen] = (0,
|
|
940
|
+
const [open, setOpen] = (0, import_react16.useState)(() => {
|
|
924
941
|
return props.open || props.defaultOpen || false;
|
|
925
942
|
});
|
|
926
|
-
(0,
|
|
943
|
+
(0, import_react16.useEffect)(() => {
|
|
927
944
|
if (props.open === void 0) return;
|
|
928
945
|
setOpen(props.open);
|
|
929
946
|
}, [props.open]);
|
|
930
|
-
const ref = (0,
|
|
931
|
-
(0,
|
|
947
|
+
const ref = (0, import_react16.useRef)(null);
|
|
948
|
+
(0, import_react16.useEffect)(() => {
|
|
932
949
|
if (!ref.current) return;
|
|
933
950
|
ref.current.style.maxHeight = open ? `${ref.current.scrollHeight}px` : closedHeight;
|
|
934
951
|
}, [closedHeight, open]);
|
|
@@ -939,7 +956,7 @@ function Collapse(props) {
|
|
|
939
956
|
var import_themes49 = require("@radix-ui/themes");
|
|
940
957
|
|
|
941
958
|
// src/atoms/pagination.tsx
|
|
942
|
-
var
|
|
959
|
+
var import_react17 = require("react");
|
|
943
960
|
|
|
944
961
|
// src/icon.ts
|
|
945
962
|
var import_react_icons2 = require("@radix-ui/react-icons");
|
|
@@ -1429,8 +1446,8 @@ CircleChatIcon.displayName = "CircleChatIcon";
|
|
|
1429
1446
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1430
1447
|
function Pagination(props) {
|
|
1431
1448
|
const { onChange, count = 0, siblingCount = 2 } = props;
|
|
1432
|
-
const [page, setPage] = (0,
|
|
1433
|
-
const visibleItems = (0,
|
|
1449
|
+
const [page, setPage] = (0, import_react17.useState)(() => props.page || props.defaultPage || 1);
|
|
1450
|
+
const visibleItems = (0, import_react17.useMemo)(() => {
|
|
1434
1451
|
let start = Math.max(1, page - siblingCount);
|
|
1435
1452
|
let end = Math.min(count, page + siblingCount);
|
|
1436
1453
|
if (page - siblingCount <= 0 && end < count) {
|
|
@@ -1440,42 +1457,42 @@ function Pagination(props) {
|
|
|
1440
1457
|
}
|
|
1441
1458
|
return Array.from({ length: end - start + 1 }, (_, i) => i + start);
|
|
1442
1459
|
}, [count, page, siblingCount]);
|
|
1443
|
-
(0,
|
|
1460
|
+
(0, import_react17.useEffect)(() => {
|
|
1444
1461
|
onChange == null ? void 0 : onChange(page);
|
|
1445
1462
|
}, [onChange, page]);
|
|
1446
|
-
(0,
|
|
1463
|
+
(0, import_react17.useEffect)(() => {
|
|
1447
1464
|
if (props.page) {
|
|
1448
1465
|
setPage(props.page);
|
|
1449
1466
|
}
|
|
1450
1467
|
}, [props.page]);
|
|
1451
|
-
const prev = (0,
|
|
1468
|
+
const prev = (0, import_react17.useMemo)(() => {
|
|
1452
1469
|
const p = page - 1;
|
|
1453
1470
|
return p < 1 ? void 0 : p;
|
|
1454
1471
|
}, [page]);
|
|
1455
|
-
const next = (0,
|
|
1472
|
+
const next = (0, import_react17.useMemo)(() => {
|
|
1456
1473
|
const n = page + 1;
|
|
1457
1474
|
return n > count ? void 0 : n;
|
|
1458
1475
|
}, [count, page]);
|
|
1459
|
-
const onClickPrev = (0,
|
|
1476
|
+
const onClickPrev = (0, import_react17.useCallback)(() => {
|
|
1460
1477
|
prev && setPage(prev);
|
|
1461
1478
|
}, [prev]);
|
|
1462
|
-
const onClickNext = (0,
|
|
1479
|
+
const onClickNext = (0, import_react17.useCallback)(() => {
|
|
1463
1480
|
next && setPage(next);
|
|
1464
1481
|
}, [next]);
|
|
1465
|
-
const doublePrev = (0,
|
|
1482
|
+
const doublePrev = (0, import_react17.useMemo)(() => {
|
|
1466
1483
|
if (!visibleItems.length) return;
|
|
1467
1484
|
return Math.max(0, visibleItems[0] - 1);
|
|
1468
1485
|
}, [visibleItems]);
|
|
1469
|
-
const onClickDoublePrev = (0,
|
|
1486
|
+
const onClickDoublePrev = (0, import_react17.useCallback)(() => {
|
|
1470
1487
|
doublePrev && setPage(doublePrev);
|
|
1471
1488
|
}, [doublePrev]);
|
|
1472
|
-
const doubleNext = (0,
|
|
1489
|
+
const doubleNext = (0, import_react17.useMemo)(() => {
|
|
1473
1490
|
if (!visibleItems.length) return;
|
|
1474
1491
|
const n = visibleItems[visibleItems.length - 1] + 1;
|
|
1475
1492
|
if (n > count) return;
|
|
1476
1493
|
return Math.min(count, n);
|
|
1477
1494
|
}, [count, visibleItems]);
|
|
1478
|
-
const onClickDoubleNext = (0,
|
|
1495
|
+
const onClickDoubleNext = (0, import_react17.useCallback)(() => {
|
|
1479
1496
|
doubleNext && setPage(doubleNext);
|
|
1480
1497
|
}, [doubleNext]);
|
|
1481
1498
|
const iconSize = {
|
|
@@ -1538,15 +1555,15 @@ function FieldErrorWrapper({
|
|
|
1538
1555
|
}
|
|
1539
1556
|
|
|
1540
1557
|
// src/atoms/ellipsis-tooltip.tsx
|
|
1541
|
-
var
|
|
1558
|
+
var import_react18 = require("react");
|
|
1542
1559
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1543
1560
|
function EllipsisTooltip(props) {
|
|
1544
1561
|
const _a = props, { children, style, lineClamp = 2 } = _a, rest = __objRest(_a, ["children", "style", "lineClamp"]);
|
|
1545
|
-
const ref = (0,
|
|
1546
|
-
const [tooltipDisplay, setTooltipDisplay] = (0,
|
|
1562
|
+
const ref = (0, import_react18.useRef)(null);
|
|
1563
|
+
const [tooltipDisplay, setTooltipDisplay] = (0, import_react18.useState)(
|
|
1547
1564
|
"none"
|
|
1548
1565
|
);
|
|
1549
|
-
(0,
|
|
1566
|
+
(0, import_react18.useEffect)(() => {
|
|
1550
1567
|
if (ref.current) {
|
|
1551
1568
|
const typo = ref.current;
|
|
1552
1569
|
const mouseOver = () => {
|
|
@@ -1627,7 +1644,7 @@ ClosePanelArrowIcon.displayName = "ArrowDownIcon";
|
|
|
1627
1644
|
|
|
1628
1645
|
// src/atoms/drawer.tsx
|
|
1629
1646
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1630
|
-
function
|
|
1647
|
+
function Root7(props) {
|
|
1631
1648
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Dialog2.Root, __spreadValues({}, props));
|
|
1632
1649
|
}
|
|
1633
1650
|
var preventDefault2 = (e) => {
|
|
@@ -1726,9 +1743,9 @@ function ToastContainer(props) {
|
|
|
1726
1743
|
|
|
1727
1744
|
// src/molecules/form/form.tsx
|
|
1728
1745
|
var RadixForm = __toESM(require("@radix-ui/react-form"), 1);
|
|
1729
|
-
var
|
|
1746
|
+
var import_react19 = require("react");
|
|
1730
1747
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1731
|
-
var
|
|
1748
|
+
var Root9 = (0, import_react19.forwardRef)(
|
|
1732
1749
|
(_a, ref) => {
|
|
1733
1750
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
|
1734
1751
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
@@ -1741,11 +1758,11 @@ var Root8 = (0, import_react18.forwardRef)(
|
|
|
1741
1758
|
);
|
|
1742
1759
|
}
|
|
1743
1760
|
);
|
|
1744
|
-
|
|
1745
|
-
var FieldContext = (0,
|
|
1761
|
+
Root9.displayName = "FORM_ROOT";
|
|
1762
|
+
var FieldContext = (0, import_react19.createContext)({
|
|
1746
1763
|
name: ""
|
|
1747
1764
|
});
|
|
1748
|
-
var Field2 = (0,
|
|
1765
|
+
var Field2 = (0, import_react19.forwardRef)(
|
|
1749
1766
|
(_a, ref) => {
|
|
1750
1767
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
|
1751
1768
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
@@ -1765,10 +1782,10 @@ function HeadingLabel(props) {
|
|
|
1765
1782
|
function CaptionLabel(props) {
|
|
1766
1783
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Typo, __spreadProps(__spreadValues({ color: "gray", variant: "caption" }, props), { children: props.children }));
|
|
1767
1784
|
}
|
|
1768
|
-
var Label2 = (0,
|
|
1785
|
+
var Label2 = (0, import_react19.forwardRef)(
|
|
1769
1786
|
(_a, ref) => {
|
|
1770
1787
|
var _b = _a, { children, className, variant } = _b, rest = __objRest(_b, ["children", "className", "variant"]);
|
|
1771
|
-
const Comp = (0,
|
|
1788
|
+
const Comp = (0, import_react19.useMemo)(() => {
|
|
1772
1789
|
switch (variant) {
|
|
1773
1790
|
case "title":
|
|
1774
1791
|
return HeadingLabel;
|
|
@@ -1779,7 +1796,7 @@ var Label2 = (0, import_react18.forwardRef)(
|
|
|
1779
1796
|
return Typo;
|
|
1780
1797
|
}
|
|
1781
1798
|
}, [variant]);
|
|
1782
|
-
const fieldProps = (0,
|
|
1799
|
+
const fieldProps = (0, import_react19.useContext)(FieldContext);
|
|
1783
1800
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1784
1801
|
RadixForm.Label,
|
|
1785
1802
|
__spreadProps(__spreadValues({}, rest), {
|
|
@@ -1795,7 +1812,7 @@ var Label2 = (0, import_react18.forwardRef)(
|
|
|
1795
1812
|
}
|
|
1796
1813
|
);
|
|
1797
1814
|
Label2.displayName = "FORM_Label";
|
|
1798
|
-
var Message2 = (0,
|
|
1815
|
+
var Message2 = (0, import_react19.forwardRef)(
|
|
1799
1816
|
(_a, ref) => {
|
|
1800
1817
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
|
1801
1818
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
@@ -1810,10 +1827,10 @@ var Message2 = (0, import_react18.forwardRef)(
|
|
|
1810
1827
|
}
|
|
1811
1828
|
);
|
|
1812
1829
|
Message2.displayName = "FORM_Message";
|
|
1813
|
-
var Control2 = (0,
|
|
1830
|
+
var Control2 = (0, import_react19.forwardRef)(
|
|
1814
1831
|
(_a, ref) => {
|
|
1815
1832
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
|
1816
|
-
const fieldProps = (0,
|
|
1833
|
+
const fieldProps = (0, import_react19.useContext)(FieldContext);
|
|
1817
1834
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1818
1835
|
RadixForm.Control,
|
|
1819
1836
|
__spreadProps(__spreadValues({}, rest), {
|
|
@@ -1844,7 +1861,7 @@ function FormItem(_a) {
|
|
|
1844
1861
|
] }));
|
|
1845
1862
|
}
|
|
1846
1863
|
var Form = {
|
|
1847
|
-
Root:
|
|
1864
|
+
Root: Root9,
|
|
1848
1865
|
Field: Field2,
|
|
1849
1866
|
Label: Label2,
|
|
1850
1867
|
Message: Message2,
|
|
@@ -1854,39 +1871,39 @@ var Form = {
|
|
|
1854
1871
|
};
|
|
1855
1872
|
|
|
1856
1873
|
// src/atoms/auto-sizing-input.tsx
|
|
1857
|
-
var
|
|
1874
|
+
var import_react20 = require("react");
|
|
1858
1875
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1859
|
-
var AutoSizingInput = (0,
|
|
1876
|
+
var AutoSizingInput = (0, import_react20.forwardRef)(
|
|
1860
1877
|
(_a, ref) => {
|
|
1861
1878
|
var _b = _a, { value: _value, onChangeValue, onChange } = _b, rest = __objRest(_b, ["value", "onChangeValue", "onChange"]);
|
|
1862
|
-
const [value, setValue] = (0,
|
|
1863
|
-
const [width, setWidth] = (0,
|
|
1864
|
-
const span = (0,
|
|
1865
|
-
const defaultRef = (0,
|
|
1879
|
+
const [value, setValue] = (0, import_react20.useState)(_value);
|
|
1880
|
+
const [width, setWidth] = (0, import_react20.useState)(0);
|
|
1881
|
+
const span = (0, import_react20.useRef)(null);
|
|
1882
|
+
const defaultRef = (0, import_react20.useRef)(null);
|
|
1866
1883
|
const inputRef = ref || defaultRef;
|
|
1867
|
-
(0,
|
|
1884
|
+
(0, import_react20.useEffect)(() => {
|
|
1868
1885
|
span.current && setWidth(span.current.offsetWidth);
|
|
1869
1886
|
}, [value]);
|
|
1870
|
-
const changeHandler = (0,
|
|
1887
|
+
const changeHandler = (0, import_react20.useCallback)(
|
|
1871
1888
|
(evt) => {
|
|
1872
1889
|
onChange == null ? void 0 : onChange(evt);
|
|
1873
1890
|
setValue(evt.target.value);
|
|
1874
1891
|
},
|
|
1875
1892
|
[onChange]
|
|
1876
1893
|
);
|
|
1877
|
-
(0,
|
|
1894
|
+
(0, import_react20.useEffect)(() => {
|
|
1878
1895
|
setValue(_value || "");
|
|
1879
1896
|
}, [_value]);
|
|
1880
|
-
(0,
|
|
1897
|
+
(0, import_react20.useEffect)(() => {
|
|
1881
1898
|
onChangeValue == null ? void 0 : onChangeValue(value || "");
|
|
1882
1899
|
}, [value, onChangeValue]);
|
|
1883
|
-
const onClick = (0,
|
|
1900
|
+
const onClick = (0, import_react20.useCallback)(() => {
|
|
1884
1901
|
var _a2;
|
|
1885
1902
|
if ("current" in inputRef) {
|
|
1886
1903
|
(_a2 = inputRef.current) == null ? void 0 : _a2.focus();
|
|
1887
1904
|
}
|
|
1888
1905
|
}, [inputRef]);
|
|
1889
|
-
const onKeyDown = (0,
|
|
1906
|
+
const onKeyDown = (0, import_react20.useCallback)(
|
|
1890
1907
|
(evt) => {
|
|
1891
1908
|
if (evt.key === "Enter") {
|
|
1892
1909
|
onClick();
|
|
@@ -1936,21 +1953,21 @@ function BulletText(_a) {
|
|
|
1936
1953
|
|
|
1937
1954
|
// src/molecules/expand-table/index.tsx
|
|
1938
1955
|
var import_react_table2 = require("@tanstack/react-table");
|
|
1939
|
-
var
|
|
1956
|
+
var import_react22 = require("react");
|
|
1940
1957
|
|
|
1941
1958
|
// src/molecules/expand-table/row.tsx
|
|
1942
1959
|
var import_react_table = require("@tanstack/react-table");
|
|
1943
|
-
var
|
|
1960
|
+
var import_react21 = require("react");
|
|
1944
1961
|
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1945
1962
|
function Row(props) {
|
|
1946
1963
|
const { row, ExpandComp, gridTemplateColumns, getRowStyle, getCellStyle } = props;
|
|
1947
|
-
const [open, setOpen] = (0,
|
|
1948
|
-
const onClickRow = (0,
|
|
1964
|
+
const [open, setOpen] = (0, import_react21.useState)(false);
|
|
1965
|
+
const onClickRow = (0, import_react21.useCallback)(() => {
|
|
1949
1966
|
var _a;
|
|
1950
1967
|
(_a = props.onRowClick) == null ? void 0 : _a.call(props, row.original);
|
|
1951
1968
|
setOpen((prev) => !prev);
|
|
1952
1969
|
}, [props, row.original]);
|
|
1953
|
-
const rowClassName = (0,
|
|
1970
|
+
const rowClassName = (0, import_react21.useMemo)(() => {
|
|
1954
1971
|
const baseCls = ["tr-wrapper"];
|
|
1955
1972
|
if (ExpandComp) {
|
|
1956
1973
|
baseCls.push("expandable");
|
|
@@ -2024,11 +2041,11 @@ function ExpandTable(props) {
|
|
|
2024
2041
|
getCellStyle
|
|
2025
2042
|
} = props;
|
|
2026
2043
|
const defaultAlign = "left";
|
|
2027
|
-
const [pagination, setPagination] = (0,
|
|
2044
|
+
const [pagination, setPagination] = (0, import_react22.useState)({
|
|
2028
2045
|
pageIndex: pageIndex || 0,
|
|
2029
2046
|
pageSize: pageSize || 9999
|
|
2030
2047
|
});
|
|
2031
|
-
const [sorting, setSorting] = (0,
|
|
2048
|
+
const [sorting, setSorting] = (0, import_react22.useState)([]);
|
|
2032
2049
|
const { getRowModel, getHeaderGroups, setPageIndex } = (0, import_react_table2.useReactTable)({
|
|
2033
2050
|
data: data || [],
|
|
2034
2051
|
columns,
|
|
@@ -2042,7 +2059,7 @@ function ExpandTable(props) {
|
|
|
2042
2059
|
getPaginationRowModel: (0, import_react_table2.getPaginationRowModel)(),
|
|
2043
2060
|
onPaginationChange: setPagination
|
|
2044
2061
|
});
|
|
2045
|
-
const gridTemplateColumns = (0,
|
|
2062
|
+
const gridTemplateColumns = (0, import_react22.useMemo)(() => {
|
|
2046
2063
|
return columns.map((col) => {
|
|
2047
2064
|
var _a;
|
|
2048
2065
|
if ((_a = col.meta) == null ? void 0 : _a.autoSize) return `minmax(${col.size || 50}px, 1fr)`;
|
|
@@ -2050,13 +2067,13 @@ function ExpandTable(props) {
|
|
|
2050
2067
|
}).join(" ");
|
|
2051
2068
|
}, [columns]);
|
|
2052
2069
|
const rowModels = getRowModel();
|
|
2053
|
-
const onChangePagination = (0,
|
|
2070
|
+
const onChangePagination = (0, import_react22.useCallback)(
|
|
2054
2071
|
(page) => {
|
|
2055
2072
|
setPageIndex(page - 1);
|
|
2056
2073
|
},
|
|
2057
2074
|
[setPageIndex]
|
|
2058
2075
|
);
|
|
2059
|
-
const helpCompRender = (0,
|
|
2076
|
+
const helpCompRender = (0, import_react22.useCallback)(
|
|
2060
2077
|
(rowLength) => {
|
|
2061
2078
|
if (isLoading) {
|
|
2062
2079
|
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
@@ -2078,7 +2095,7 @@ function ExpandTable(props) {
|
|
|
2078
2095
|
},
|
|
2079
2096
|
[isLoading, placeholder]
|
|
2080
2097
|
);
|
|
2081
|
-
const pageCount = (0,
|
|
2098
|
+
const pageCount = (0, import_react22.useMemo)(() => {
|
|
2082
2099
|
if (!data) return 0;
|
|
2083
2100
|
return Math.ceil(data.length / pageSize);
|
|
2084
2101
|
}, [data, pageSize]);
|
|
@@ -2211,17 +2228,17 @@ function Navigation({
|
|
|
2211
2228
|
}
|
|
2212
2229
|
|
|
2213
2230
|
// src/molecules/date-picker/index.tsx
|
|
2214
|
-
var
|
|
2231
|
+
var import_react23 = require("react");
|
|
2215
2232
|
var import_react_datepicker = __toESM(require("react-datepicker"), 1);
|
|
2216
2233
|
var import_locale = require("date-fns/locale");
|
|
2217
2234
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2218
|
-
var DatePicker = (0,
|
|
2235
|
+
var DatePicker = (0, import_react23.forwardRef)(
|
|
2219
2236
|
(props, ref) => {
|
|
2220
2237
|
const _a = props, { fullWidth } = _a, rest = __objRest(_a, ["fullWidth"]);
|
|
2221
2238
|
const fullWidthClassName = fullWidth ? "full-width" : "";
|
|
2222
|
-
const [isYearDropdownOpen, setIsYearDropdownOpen] = (0,
|
|
2223
|
-
const [isMonthDropdownOpen, setIsMonthDropdownOpen] = (0,
|
|
2224
|
-
const renderCustomHeader = (0,
|
|
2239
|
+
const [isYearDropdownOpen, setIsYearDropdownOpen] = (0, import_react23.useState)(false);
|
|
2240
|
+
const [isMonthDropdownOpen, setIsMonthDropdownOpen] = (0, import_react23.useState)(false);
|
|
2241
|
+
const renderCustomHeader = (0, import_react23.useMemo)(() => {
|
|
2225
2242
|
const getYears = () => {
|
|
2226
2243
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
2227
2244
|
return Array.from(
|
|
@@ -2279,8 +2296,8 @@ function DropdownSelector({
|
|
|
2279
2296
|
selectedValue,
|
|
2280
2297
|
suffix
|
|
2281
2298
|
}) {
|
|
2282
|
-
const scrollContainerRef = (0,
|
|
2283
|
-
(0,
|
|
2299
|
+
const scrollContainerRef = (0, import_react23.useRef)(null);
|
|
2300
|
+
(0, import_react23.useEffect)(() => {
|
|
2284
2301
|
if (isOpen) {
|
|
2285
2302
|
queueMicrotask(() => {
|
|
2286
2303
|
var _a;
|
|
@@ -2407,18 +2424,18 @@ var getRenderCustomHeader = (props) => {
|
|
|
2407
2424
|
};
|
|
2408
2425
|
|
|
2409
2426
|
// src/molecules/dot-navigation.tsx
|
|
2410
|
-
var
|
|
2427
|
+
var import_react24 = require("react");
|
|
2411
2428
|
var import_react_icons4 = require("@radix-ui/react-icons");
|
|
2412
2429
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2413
2430
|
function DotNavigation(props) {
|
|
2414
2431
|
const { dotCount, onClick, dotIndex, defaultDotIndex, onChangeDotIndex } = props;
|
|
2415
|
-
const [currentDot, setCurrentDot] = (0,
|
|
2432
|
+
const [currentDot, setCurrentDot] = (0, import_react24.useState)(
|
|
2416
2433
|
() => {
|
|
2417
2434
|
var _a;
|
|
2418
2435
|
return (_a = defaultDotIndex != null ? defaultDotIndex : dotIndex) != null ? _a : 0;
|
|
2419
2436
|
}
|
|
2420
2437
|
);
|
|
2421
|
-
const onClickDot = (0,
|
|
2438
|
+
const onClickDot = (0, import_react24.useCallback)(
|
|
2422
2439
|
(i) => {
|
|
2423
2440
|
if (onClick) {
|
|
2424
2441
|
onClick(i);
|
|
@@ -2428,10 +2445,10 @@ function DotNavigation(props) {
|
|
|
2428
2445
|
},
|
|
2429
2446
|
[onClick]
|
|
2430
2447
|
);
|
|
2431
|
-
(0,
|
|
2448
|
+
(0, import_react24.useEffect)(() => {
|
|
2432
2449
|
onChangeDotIndex == null ? void 0 : onChangeDotIndex(currentDot);
|
|
2433
2450
|
}, [currentDot, onChangeDotIndex]);
|
|
2434
|
-
(0,
|
|
2451
|
+
(0, import_react24.useEffect)(() => {
|
|
2435
2452
|
if (typeof dotIndex === "undefined") return;
|
|
2436
2453
|
setCurrentDot(dotIndex);
|
|
2437
2454
|
}, [dotIndex]);
|
|
@@ -2456,15 +2473,15 @@ function DotNavigation(props) {
|
|
|
2456
2473
|
}
|
|
2457
2474
|
|
|
2458
2475
|
// src/molecules/stepper.tsx
|
|
2459
|
-
var
|
|
2476
|
+
var import_react25 = require("react");
|
|
2460
2477
|
var import_themes51 = require("@radix-ui/themes");
|
|
2461
2478
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2462
|
-
var StepContext = (0,
|
|
2479
|
+
var StepContext = (0, import_react25.createContext)({
|
|
2463
2480
|
active: false,
|
|
2464
2481
|
completed: false,
|
|
2465
2482
|
index: 0
|
|
2466
2483
|
});
|
|
2467
|
-
function
|
|
2484
|
+
function Root10(props) {
|
|
2468
2485
|
const {
|
|
2469
2486
|
activeStep = 0,
|
|
2470
2487
|
children,
|
|
@@ -2482,7 +2499,7 @@ function Root9(props) {
|
|
|
2482
2499
|
minWidth,
|
|
2483
2500
|
maxWidth
|
|
2484
2501
|
},
|
|
2485
|
-
children:
|
|
2502
|
+
children: import_react25.Children.map(children, (child, index) => {
|
|
2486
2503
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2487
2504
|
StepContext.Provider,
|
|
2488
2505
|
{
|
|
@@ -2506,7 +2523,7 @@ function Step(props) {
|
|
|
2506
2523
|
completed,
|
|
2507
2524
|
index,
|
|
2508
2525
|
direction = "vertical"
|
|
2509
|
-
} = (0,
|
|
2526
|
+
} = (0, import_react25.useContext)(StepContext);
|
|
2510
2527
|
const connector = index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2511
2528
|
import_themes51.Separator,
|
|
2512
2529
|
{
|
|
@@ -2518,7 +2535,7 @@ function Step(props) {
|
|
|
2518
2535
|
}
|
|
2519
2536
|
}
|
|
2520
2537
|
) : null;
|
|
2521
|
-
const InnerStep = (0,
|
|
2538
|
+
const InnerStep = (0, import_react25.useMemo)(() => {
|
|
2522
2539
|
if (active) {
|
|
2523
2540
|
return ActiveStep;
|
|
2524
2541
|
}
|
|
@@ -2544,7 +2561,7 @@ function Step(props) {
|
|
|
2544
2561
|
}
|
|
2545
2562
|
function CompleteStep(props) {
|
|
2546
2563
|
const { Icon, children } = props;
|
|
2547
|
-
const { completed, active } = (0,
|
|
2564
|
+
const { completed, active } = (0, import_react25.useContext)(StepContext);
|
|
2548
2565
|
const background = "var(--accent-a4)";
|
|
2549
2566
|
const border = "1px solid var(--accent-7)";
|
|
2550
2567
|
const color = "var(--accent-contrast)";
|
|
@@ -2566,7 +2583,7 @@ function CompleteStep(props) {
|
|
|
2566
2583
|
}
|
|
2567
2584
|
function IncompleteStep(props) {
|
|
2568
2585
|
const { Icon, children } = props;
|
|
2569
|
-
const { completed, active, index } = (0,
|
|
2586
|
+
const { completed, active, index } = (0, import_react25.useContext)(StepContext);
|
|
2570
2587
|
const background = "var(--gray-5)";
|
|
2571
2588
|
const color = "var(--gray-a11)";
|
|
2572
2589
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
|
|
@@ -2586,7 +2603,7 @@ function IncompleteStep(props) {
|
|
|
2586
2603
|
}
|
|
2587
2604
|
function ActiveStep(props) {
|
|
2588
2605
|
const { Icon, children } = props;
|
|
2589
|
-
const { completed, active, index } = (0,
|
|
2606
|
+
const { completed, active, index } = (0, import_react25.useContext)(StepContext);
|
|
2590
2607
|
const background = "var(--accent-10)";
|
|
2591
2608
|
const color = "var(--accent-contrast)";
|
|
2592
2609
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
|
|
@@ -2603,12 +2620,12 @@ function ActiveStep(props) {
|
|
|
2603
2620
|
] });
|
|
2604
2621
|
}
|
|
2605
2622
|
var Stepper = {
|
|
2606
|
-
Root:
|
|
2623
|
+
Root: Root10,
|
|
2607
2624
|
Step
|
|
2608
2625
|
};
|
|
2609
2626
|
|
|
2610
2627
|
// src/molecules/tag-selector.tsx
|
|
2611
|
-
var
|
|
2628
|
+
var import_react26 = require("react");
|
|
2612
2629
|
var import_react_icons5 = require("@radix-ui/react-icons");
|
|
2613
2630
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2614
2631
|
var OPTION_HEIGHT = 32;
|
|
@@ -2632,24 +2649,24 @@ function TagSelector(props) {
|
|
|
2632
2649
|
open: propsOpen,
|
|
2633
2650
|
dropdownItemRender
|
|
2634
2651
|
} = props;
|
|
2635
|
-
const [_selected, _setSelected] = (0,
|
|
2652
|
+
const [_selected, _setSelected] = (0, import_react26.useState)(props.selected || []);
|
|
2636
2653
|
const selected = props.selected || _selected;
|
|
2637
2654
|
const setSelected = props.onChange || _setSelected;
|
|
2638
|
-
const [value, setValue] = (0,
|
|
2639
|
-
const [focusIndex, setFocusIndex] = (0,
|
|
2640
|
-
const [open, setOpen] = (0,
|
|
2641
|
-
const [focus, setFocus] = (0,
|
|
2642
|
-
const fieldRef = (0,
|
|
2643
|
-
const scrollRef = (0,
|
|
2644
|
-
const closeRef = (0,
|
|
2645
|
-
const onFocus = (0,
|
|
2655
|
+
const [value, setValue] = (0, import_react26.useState)("");
|
|
2656
|
+
const [focusIndex, setFocusIndex] = (0, import_react26.useState)(null);
|
|
2657
|
+
const [open, setOpen] = (0, import_react26.useState)(false);
|
|
2658
|
+
const [focus, setFocus] = (0, import_react26.useState)(false);
|
|
2659
|
+
const fieldRef = (0, import_react26.useRef)(null);
|
|
2660
|
+
const scrollRef = (0, import_react26.useRef)(null);
|
|
2661
|
+
const closeRef = (0, import_react26.useRef)(null);
|
|
2662
|
+
const onFocus = (0, import_react26.useCallback)(() => {
|
|
2646
2663
|
if (closeRef.current) {
|
|
2647
2664
|
clearTimeout(closeRef.current);
|
|
2648
2665
|
}
|
|
2649
2666
|
setFocus(true);
|
|
2650
2667
|
setOpen(true);
|
|
2651
2668
|
}, []);
|
|
2652
|
-
const onBlur = (0,
|
|
2669
|
+
const onBlur = (0, import_react26.useCallback)(() => {
|
|
2653
2670
|
closeRef.current = setTimeout(() => {
|
|
2654
2671
|
setFocus(false);
|
|
2655
2672
|
setOpen(false);
|
|
@@ -2658,18 +2675,18 @@ function TagSelector(props) {
|
|
|
2658
2675
|
}, 100);
|
|
2659
2676
|
}, 300);
|
|
2660
2677
|
}, []);
|
|
2661
|
-
const onChangeValue = (0,
|
|
2678
|
+
const onChangeValue = (0, import_react26.useCallback)(
|
|
2662
2679
|
(e) => {
|
|
2663
2680
|
setValue(e.target.value);
|
|
2664
2681
|
},
|
|
2665
2682
|
[]
|
|
2666
2683
|
);
|
|
2667
|
-
const filteredOptions = (0,
|
|
2684
|
+
const filteredOptions = (0, import_react26.useMemo)(() => {
|
|
2668
2685
|
return options.filter((option) => {
|
|
2669
2686
|
return option.name.includes(value);
|
|
2670
2687
|
});
|
|
2671
2688
|
}, [options, value]);
|
|
2672
|
-
const selectedItem = (0,
|
|
2689
|
+
const selectedItem = (0, import_react26.useMemo)(() => {
|
|
2673
2690
|
const result = [];
|
|
2674
2691
|
selected.forEach((id) => {
|
|
2675
2692
|
const maybeItem = options.find((option) => option.id === id);
|
|
@@ -2677,20 +2694,20 @@ function TagSelector(props) {
|
|
|
2677
2694
|
});
|
|
2678
2695
|
return result;
|
|
2679
2696
|
}, [options, selected]);
|
|
2680
|
-
const onDelete = (0,
|
|
2697
|
+
const onDelete = (0, import_react26.useCallback)(
|
|
2681
2698
|
(id) => {
|
|
2682
2699
|
setSelected(selected.filter((el) => el !== id));
|
|
2683
2700
|
},
|
|
2684
2701
|
[selected, setSelected]
|
|
2685
2702
|
);
|
|
2686
|
-
const onSelect = (0,
|
|
2703
|
+
const onSelect = (0, import_react26.useCallback)(
|
|
2687
2704
|
(id) => {
|
|
2688
2705
|
if (maxCount && selected.length + 1 > maxCount) return;
|
|
2689
2706
|
setSelected([...selected, id]);
|
|
2690
2707
|
},
|
|
2691
2708
|
[maxCount, selected, setSelected]
|
|
2692
2709
|
);
|
|
2693
|
-
const toggleItem = (0,
|
|
2710
|
+
const toggleItem = (0, import_react26.useCallback)(
|
|
2694
2711
|
(id) => {
|
|
2695
2712
|
if (selected.includes(id)) {
|
|
2696
2713
|
onDelete(id);
|
|
@@ -2700,7 +2717,7 @@ function TagSelector(props) {
|
|
|
2700
2717
|
},
|
|
2701
2718
|
[onDelete, onSelect, selected]
|
|
2702
2719
|
);
|
|
2703
|
-
const setScroll = (0,
|
|
2720
|
+
const setScroll = (0, import_react26.useCallback)((index) => {
|
|
2704
2721
|
if (scrollRef.current) {
|
|
2705
2722
|
const scrollTop = scrollRef.current.scrollTop;
|
|
2706
2723
|
const clientHeight = scrollRef.current.clientHeight;
|
|
@@ -2712,7 +2729,7 @@ function TagSelector(props) {
|
|
|
2712
2729
|
}
|
|
2713
2730
|
}
|
|
2714
2731
|
}, []);
|
|
2715
|
-
const handleKeyDown = (0,
|
|
2732
|
+
const handleKeyDown = (0, import_react26.useCallback)(
|
|
2716
2733
|
(e) => {
|
|
2717
2734
|
var _a;
|
|
2718
2735
|
const key = e.key;
|
|
@@ -2766,19 +2783,19 @@ function TagSelector(props) {
|
|
|
2766
2783
|
selected
|
|
2767
2784
|
]
|
|
2768
2785
|
);
|
|
2769
|
-
const placeholderVisible = (0,
|
|
2786
|
+
const placeholderVisible = (0, import_react26.useMemo)(() => {
|
|
2770
2787
|
if (selectedItem.length) return false;
|
|
2771
2788
|
if (value) return false;
|
|
2772
2789
|
if (focus) return false;
|
|
2773
2790
|
return true;
|
|
2774
2791
|
}, [focus, selectedItem.length, value]);
|
|
2775
|
-
(0,
|
|
2792
|
+
(0, import_react26.useEffect)(() => {
|
|
2776
2793
|
setFocusIndex(null);
|
|
2777
2794
|
}, [open]);
|
|
2778
|
-
(0,
|
|
2795
|
+
(0, import_react26.useEffect)(() => {
|
|
2779
2796
|
setFocusIndex(0);
|
|
2780
2797
|
}, [filteredOptions]);
|
|
2781
|
-
const badgeSize = (0,
|
|
2798
|
+
const badgeSize = (0, import_react26.useMemo)(() => {
|
|
2782
2799
|
switch (size) {
|
|
2783
2800
|
case "large":
|
|
2784
2801
|
return "large";
|
|
@@ -2788,7 +2805,7 @@ function TagSelector(props) {
|
|
|
2788
2805
|
return "small";
|
|
2789
2806
|
}
|
|
2790
2807
|
}, [size]);
|
|
2791
|
-
const placeholderVariant = (0,
|
|
2808
|
+
const placeholderVariant = (0, import_react26.useMemo)(() => {
|
|
2792
2809
|
switch (size) {
|
|
2793
2810
|
case "large":
|
|
2794
2811
|
return "subtitle";
|
|
@@ -3130,24 +3147,24 @@ function ForceRefresh() {
|
|
|
3130
3147
|
}
|
|
3131
3148
|
|
|
3132
3149
|
// src/molecules/date-picker/date-picker-button.tsx
|
|
3133
|
-
var
|
|
3150
|
+
var import_react27 = require("react");
|
|
3134
3151
|
var import_date_fns = require("date-fns");
|
|
3135
3152
|
var import_clsx2 = require("clsx");
|
|
3136
3153
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3137
3154
|
function DatePickerButton(props) {
|
|
3138
3155
|
const _a = props, { size, placeholder, format: formatProps, disabled } = _a, rest = __objRest(_a, ["size", "placeholder", "format", "disabled"]);
|
|
3139
|
-
const buttonProps = (0,
|
|
3156
|
+
const buttonProps = (0, import_react27.useMemo)(() => {
|
|
3140
3157
|
const variant = "outline";
|
|
3141
3158
|
const color = "gray";
|
|
3142
3159
|
return { size, color, variant, disabled };
|
|
3143
3160
|
}, [disabled, size]);
|
|
3144
|
-
const selectFormat = (0,
|
|
3161
|
+
const selectFormat = (0, import_react27.useMemo)(() => {
|
|
3145
3162
|
if (formatProps) return formatProps;
|
|
3146
3163
|
return (date) => {
|
|
3147
3164
|
return date ? (0, import_date_fns.format)(date, "yyyy\uB144 MM\uC6D4 dd\uC77C") : placeholder;
|
|
3148
3165
|
};
|
|
3149
3166
|
}, [formatProps, placeholder]);
|
|
3150
|
-
const className = (0,
|
|
3167
|
+
const className = (0, import_react27.useMemo)(() => {
|
|
3151
3168
|
return (0, import_clsx2.clsx)(
|
|
3152
3169
|
"date-picker-button",
|
|
3153
3170
|
(disabled || props.readOnly) && "disabled"
|
|
@@ -3168,7 +3185,7 @@ function DatePickerButton(props) {
|
|
|
3168
3185
|
}
|
|
3169
3186
|
|
|
3170
3187
|
// src/molecules/time-select.tsx
|
|
3171
|
-
var
|
|
3188
|
+
var import_react28 = require("react");
|
|
3172
3189
|
var import_date_fns2 = require("date-fns");
|
|
3173
3190
|
|
|
3174
3191
|
// src/utils/get-cell-align.ts
|
|
@@ -3260,10 +3277,10 @@ function TimeSelect(_a) {
|
|
|
3260
3277
|
"minTime",
|
|
3261
3278
|
"time"
|
|
3262
3279
|
]);
|
|
3263
|
-
const timeOptions = (0,
|
|
3280
|
+
const timeOptions = (0, import_react28.useMemo)(() => {
|
|
3264
3281
|
return getTimeOptions();
|
|
3265
3282
|
}, []);
|
|
3266
|
-
const [minOption, maxOption] = (0,
|
|
3283
|
+
const [minOption, maxOption] = (0, import_react28.useMemo)(() => {
|
|
3267
3284
|
return [getOptionValue(minTime, time), getOptionValue(maxTime, time)];
|
|
3268
3285
|
}, [maxTime, minTime, time]);
|
|
3269
3286
|
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Select.Root, __spreadProps(__spreadValues({ value }, rest), { children: [
|
|
@@ -3279,12 +3296,12 @@ function TimeSelect(_a) {
|
|
|
3279
3296
|
}
|
|
3280
3297
|
|
|
3281
3298
|
// src/molecules/radio-button-card.tsx
|
|
3282
|
-
var
|
|
3299
|
+
var import_react29 = require("react");
|
|
3283
3300
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3284
|
-
var RadioCardContext = (0,
|
|
3285
|
-
function
|
|
3286
|
-
const [value, setValue] = (0,
|
|
3287
|
-
const onValueChange = (0,
|
|
3301
|
+
var RadioCardContext = (0, import_react29.createContext)({});
|
|
3302
|
+
function Root11(props) {
|
|
3303
|
+
const [value, setValue] = (0, import_react29.useState)(props.value || props.defaultValue);
|
|
3304
|
+
const onValueChange = (0, import_react29.useCallback)(
|
|
3288
3305
|
(v) => {
|
|
3289
3306
|
var _a;
|
|
3290
3307
|
setValue(v);
|
|
@@ -3300,10 +3317,10 @@ function Item(_a) {
|
|
|
3300
3317
|
} = _b, itemRest = __objRest(_b, [
|
|
3301
3318
|
"children"
|
|
3302
3319
|
]);
|
|
3303
|
-
const _a2 = (0,
|
|
3320
|
+
const _a2 = (0, import_react29.useContext)(RadioCardContext), {
|
|
3304
3321
|
value,
|
|
3305
3322
|
justify,
|
|
3306
|
-
RadioWrapper =
|
|
3323
|
+
RadioWrapper = import_react29.Fragment
|
|
3307
3324
|
} = _a2, rootRest = __objRest(_a2, [
|
|
3308
3325
|
"value",
|
|
3309
3326
|
"justify",
|
|
@@ -3322,7 +3339,7 @@ function Item(_a) {
|
|
|
3322
3339
|
] }) }));
|
|
3323
3340
|
}
|
|
3324
3341
|
var RadioButtonCard = {
|
|
3325
|
-
Root:
|
|
3342
|
+
Root: Root11,
|
|
3326
3343
|
Item
|
|
3327
3344
|
};
|
|
3328
3345
|
|
|
@@ -3409,9 +3426,9 @@ function GhostPost(props) {
|
|
|
3409
3426
|
}
|
|
3410
3427
|
|
|
3411
3428
|
// src/molecules/curriculumV2/curriculum-context.tsx
|
|
3412
|
-
var
|
|
3429
|
+
var import_react30 = require("react");
|
|
3413
3430
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
3414
|
-
var CurriculumContext = (0,
|
|
3431
|
+
var CurriculumContext = (0, import_react30.createContext)(
|
|
3415
3432
|
void 0
|
|
3416
3433
|
);
|
|
3417
3434
|
function CurriculumProvider(props) {
|
|
@@ -3427,8 +3444,8 @@ function CurriculumProvider(props) {
|
|
|
3427
3444
|
onActionButtonClick,
|
|
3428
3445
|
initialSelectedIndex
|
|
3429
3446
|
} = props;
|
|
3430
|
-
const sidebarRef = (0,
|
|
3431
|
-
const scrollNavItem = (0,
|
|
3447
|
+
const sidebarRef = (0, import_react30.useRef)(null);
|
|
3448
|
+
const scrollNavItem = (0, import_react30.useCallback)((index) => {
|
|
3432
3449
|
var _a;
|
|
3433
3450
|
const element = (_a = sidebarRef.current) == null ? void 0 : _a.querySelector(
|
|
3434
3451
|
`[data-curriculum-item-index="${index}"]`
|
|
@@ -3438,14 +3455,14 @@ function CurriculumProvider(props) {
|
|
|
3438
3455
|
}
|
|
3439
3456
|
}, []);
|
|
3440
3457
|
const list = curriculum.contents.list;
|
|
3441
|
-
const selectableIndexes = (0,
|
|
3458
|
+
const selectableIndexes = (0, import_react30.useMemo)(
|
|
3442
3459
|
() => list.map((item, i) => item.type !== "sectionTitle" ? i : null).filter((i) => i !== null),
|
|
3443
3460
|
[list]
|
|
3444
3461
|
);
|
|
3445
|
-
const [selectedIndexState, setSelectedIndexState] = (0,
|
|
3462
|
+
const [selectedIndexState, setSelectedIndexState] = (0, import_react30.useState)(
|
|
3446
3463
|
initialSelectedIndex != null ? initialSelectedIndex : selectableIndexes[0]
|
|
3447
3464
|
);
|
|
3448
|
-
const setSelectedIndex = (0,
|
|
3465
|
+
const setSelectedIndex = (0, import_react30.useCallback)(
|
|
3449
3466
|
(idx) => {
|
|
3450
3467
|
if (selectableIndexes.includes(idx)) {
|
|
3451
3468
|
setSelectedIndexState(idx);
|
|
@@ -3458,13 +3475,13 @@ function CurriculumProvider(props) {
|
|
|
3458
3475
|
},
|
|
3459
3476
|
[selectableIndexes]
|
|
3460
3477
|
);
|
|
3461
|
-
const selectablePos = (0,
|
|
3478
|
+
const selectablePos = (0, import_react30.useMemo)(
|
|
3462
3479
|
() => selectableIndexes.indexOf(selectedIndexState),
|
|
3463
3480
|
[selectableIndexes, selectedIndexState]
|
|
3464
3481
|
);
|
|
3465
3482
|
const hasPrev = selectablePos > 0;
|
|
3466
3483
|
const hasNext = selectablePos < selectableIndexes.length - 1;
|
|
3467
|
-
const selectPrev = (0,
|
|
3484
|
+
const selectPrev = (0, import_react30.useCallback)(
|
|
3468
3485
|
(cb) => {
|
|
3469
3486
|
setSelectedIndexState((cur) => {
|
|
3470
3487
|
let prevIndex = cur;
|
|
@@ -3478,7 +3495,7 @@ function CurriculumProvider(props) {
|
|
|
3478
3495
|
},
|
|
3479
3496
|
[selectableIndexes]
|
|
3480
3497
|
);
|
|
3481
|
-
const selectNext = (0,
|
|
3498
|
+
const selectNext = (0, import_react30.useCallback)(
|
|
3482
3499
|
(cb) => {
|
|
3483
3500
|
setSelectedIndexState((cur) => {
|
|
3484
3501
|
let nextIndex = cur;
|
|
@@ -3492,22 +3509,22 @@ function CurriculumProvider(props) {
|
|
|
3492
3509
|
},
|
|
3493
3510
|
[selectableIndexes]
|
|
3494
3511
|
);
|
|
3495
|
-
const selectedId = (0,
|
|
3512
|
+
const selectedId = (0, import_react30.useMemo)(
|
|
3496
3513
|
() => {
|
|
3497
3514
|
var _a, _b;
|
|
3498
3515
|
return (_b = (_a = list[selectedIndexState]) == null ? void 0 : _a.uuid) != null ? _b : "";
|
|
3499
3516
|
},
|
|
3500
3517
|
[list, selectedIndexState]
|
|
3501
3518
|
);
|
|
3502
|
-
const selectedItem = (0,
|
|
3519
|
+
const selectedItem = (0, import_react30.useMemo)(() => {
|
|
3503
3520
|
return list[selectedIndexState];
|
|
3504
3521
|
}, [list, selectedIndexState]);
|
|
3505
|
-
const selectedSectionTitle = (0,
|
|
3522
|
+
const selectedSectionTitle = (0, import_react30.useMemo)(() => {
|
|
3506
3523
|
var _a;
|
|
3507
3524
|
const prevItems = list.slice(0, selectedIndexState).reverse();
|
|
3508
3525
|
return (_a = prevItems.find((item) => item.type === "sectionTitle")) != null ? _a : null;
|
|
3509
3526
|
}, [list, selectedIndexState]);
|
|
3510
|
-
(0,
|
|
3527
|
+
(0, import_react30.useEffect)(() => {
|
|
3511
3528
|
onChangeSelectedContent == null ? void 0 : onChangeSelectedContent(selectedItem);
|
|
3512
3529
|
}, [selectedItem]);
|
|
3513
3530
|
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(CurriculumContext.Provider, { value: {
|
|
@@ -3532,7 +3549,7 @@ function CurriculumProvider(props) {
|
|
|
3532
3549
|
}, children });
|
|
3533
3550
|
}
|
|
3534
3551
|
function useCurriculumContext() {
|
|
3535
|
-
const ctx = (0,
|
|
3552
|
+
const ctx = (0, import_react30.useContext)(CurriculumContext);
|
|
3536
3553
|
if (!ctx)
|
|
3537
3554
|
throw new Error(
|
|
3538
3555
|
"useCurriculumContext must be used within CurriculumProvider"
|
|
@@ -3541,7 +3558,7 @@ function useCurriculumContext() {
|
|
|
3541
3558
|
}
|
|
3542
3559
|
|
|
3543
3560
|
// src/molecules/curriculumV2/curriculum-sub-nav.tsx
|
|
3544
|
-
var
|
|
3561
|
+
var import_react31 = require("react");
|
|
3545
3562
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3546
3563
|
function CurriculumSubNav() {
|
|
3547
3564
|
const {
|
|
@@ -3553,12 +3570,12 @@ function CurriculumSubNav() {
|
|
|
3553
3570
|
selectNext,
|
|
3554
3571
|
scrollNavItem
|
|
3555
3572
|
} = useCurriculumContext();
|
|
3556
|
-
const onClickPrev = (0,
|
|
3573
|
+
const onClickPrev = (0, import_react31.useCallback)(() => {
|
|
3557
3574
|
selectPrev((moveIndex) => {
|
|
3558
3575
|
scrollNavItem(moveIndex.toString());
|
|
3559
3576
|
});
|
|
3560
3577
|
}, [selectPrev, scrollNavItem]);
|
|
3561
|
-
const onClickNext = (0,
|
|
3578
|
+
const onClickNext = (0, import_react31.useCallback)(() => {
|
|
3562
3579
|
selectNext((moveIndex) => {
|
|
3563
3580
|
scrollNavItem(moveIndex.toString());
|
|
3564
3581
|
});
|
|
@@ -3604,12 +3621,12 @@ function CurriculumSubNav() {
|
|
|
3604
3621
|
}
|
|
3605
3622
|
|
|
3606
3623
|
// src/molecules/curriculumV2/CurriculumContents/curriculum-video.tsx
|
|
3607
|
-
var
|
|
3624
|
+
var import_react32 = require("react");
|
|
3608
3625
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3609
3626
|
function CurriculumVideo(props) {
|
|
3610
3627
|
const { item } = props;
|
|
3611
3628
|
const { url } = item;
|
|
3612
|
-
const [isLoading, setIsLoading] = (0,
|
|
3629
|
+
const [isLoading, setIsLoading] = (0, import_react32.useState)(true);
|
|
3613
3630
|
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
3614
3631
|
import_themes22.Flex,
|
|
3615
3632
|
{
|
|
@@ -3662,16 +3679,16 @@ function CurriculumVideo(props) {
|
|
|
3662
3679
|
var curriculum_video_default = CurriculumVideo;
|
|
3663
3680
|
|
|
3664
3681
|
// src/molecules/curriculumV2/CurriculumContents/curriculum-review.tsx
|
|
3665
|
-
var
|
|
3682
|
+
var import_react35 = require("react");
|
|
3666
3683
|
var import_react_icons8 = require("@radix-ui/react-icons");
|
|
3667
3684
|
|
|
3668
3685
|
// src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/curriculum-review-context.tsx
|
|
3669
|
-
var
|
|
3686
|
+
var import_react33 = require("react");
|
|
3670
3687
|
var import_formik = require("formik");
|
|
3671
3688
|
var import_lodash_es = require("lodash-es");
|
|
3672
3689
|
var Yup = __toESM(require("yup"), 1);
|
|
3673
3690
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3674
|
-
var CurriculumReviewContext = (0,
|
|
3691
|
+
var CurriculumReviewContext = (0, import_react33.createContext)(void 0);
|
|
3675
3692
|
function getInitialAnswers(defaultValues, questions) {
|
|
3676
3693
|
return questions.reduce((acc, q) => {
|
|
3677
3694
|
var _a;
|
|
@@ -3709,7 +3726,7 @@ function CurriculumReviewProvider({
|
|
|
3709
3726
|
onReviewValueChange,
|
|
3710
3727
|
done
|
|
3711
3728
|
}) {
|
|
3712
|
-
const fixedReviewContents = (0,
|
|
3729
|
+
const fixedReviewContents = (0, import_react33.useMemo)(() => {
|
|
3713
3730
|
const result = (0, import_lodash_es.cloneDeep)(_reviewContents);
|
|
3714
3731
|
result.questions = result.questions.map((question) => {
|
|
3715
3732
|
if (question.type === "question_satisfaction_option") {
|
|
@@ -3726,8 +3743,8 @@ function CurriculumReviewProvider({
|
|
|
3726
3743
|
curriculum.contents.satisfactionTextMeta,
|
|
3727
3744
|
_reviewContents
|
|
3728
3745
|
]);
|
|
3729
|
-
const [step, setStep] = (0,
|
|
3730
|
-
const answersYupSchema = (0,
|
|
3746
|
+
const [step, setStep] = (0, import_react33.useState)(0);
|
|
3747
|
+
const answersYupSchema = (0, import_react33.useMemo)(
|
|
3731
3748
|
() => createAnswersYupSchema(fixedReviewContents.questions),
|
|
3732
3749
|
[fixedReviewContents.questions]
|
|
3733
3750
|
);
|
|
@@ -3752,10 +3769,10 @@ function CurriculumReviewProvider({
|
|
|
3752
3769
|
validateOnChange: true
|
|
3753
3770
|
});
|
|
3754
3771
|
const questions = fixedReviewContents.questions;
|
|
3755
|
-
const handleStart = (0,
|
|
3772
|
+
const handleStart = (0, import_react33.useCallback)(() => {
|
|
3756
3773
|
setStep(1);
|
|
3757
3774
|
}, []);
|
|
3758
|
-
const handleNext = (0,
|
|
3775
|
+
const handleNext = (0, import_react33.useCallback)(() => {
|
|
3759
3776
|
if (step < questions.length) {
|
|
3760
3777
|
setStep(step + 1);
|
|
3761
3778
|
} else {
|
|
@@ -3763,27 +3780,27 @@ function CurriculumReviewProvider({
|
|
|
3763
3780
|
setStep(questions.length + 1);
|
|
3764
3781
|
}
|
|
3765
3782
|
}, [step, questions.length, formik]);
|
|
3766
|
-
const handlePrev = (0,
|
|
3783
|
+
const handlePrev = (0, import_react33.useCallback)(() => {
|
|
3767
3784
|
if (step > 1) {
|
|
3768
3785
|
setStep(step - 1);
|
|
3769
3786
|
}
|
|
3770
3787
|
}, [step]);
|
|
3771
|
-
const onClickReviewMyAnswer = (0,
|
|
3788
|
+
const onClickReviewMyAnswer = (0, import_react33.useCallback)(() => {
|
|
3772
3789
|
setStep(0);
|
|
3773
3790
|
}, []);
|
|
3774
|
-
const handleSubmit = (0,
|
|
3791
|
+
const handleSubmit = (0, import_react33.useCallback)(() => {
|
|
3775
3792
|
formik.handleSubmit();
|
|
3776
3793
|
}, [formik]);
|
|
3777
|
-
const currentQuestion = (0,
|
|
3794
|
+
const currentQuestion = (0, import_react33.useMemo)(() => {
|
|
3778
3795
|
return step > 0 && step <= questions.length ? questions[step - 1] : void 0;
|
|
3779
3796
|
}, [step, questions]);
|
|
3780
|
-
const currentAnswer = (0,
|
|
3797
|
+
const currentAnswer = (0, import_react33.useMemo)(() => {
|
|
3781
3798
|
return currentQuestion ? formik.values.answers[currentQuestion.uuid] : "";
|
|
3782
3799
|
}, [currentQuestion, formik.values.answers]);
|
|
3783
|
-
const currentError = (0,
|
|
3800
|
+
const currentError = (0, import_react33.useMemo)(() => {
|
|
3784
3801
|
return currentQuestion && formik.errors.answers && formik.errors.answers[currentQuestion.uuid];
|
|
3785
3802
|
}, [currentQuestion, formik.errors.answers]);
|
|
3786
|
-
const handleAnswerChange = (0,
|
|
3803
|
+
const handleAnswerChange = (0, import_react33.useCallback)(
|
|
3787
3804
|
(value) => {
|
|
3788
3805
|
if (currentQuestion) {
|
|
3789
3806
|
void formik.setFieldValue(`answers.${currentQuestion.uuid}`, value);
|
|
@@ -3791,7 +3808,7 @@ function CurriculumReviewProvider({
|
|
|
3791
3808
|
},
|
|
3792
3809
|
[currentQuestion, formik]
|
|
3793
3810
|
);
|
|
3794
|
-
(0,
|
|
3811
|
+
(0, import_react33.useEffect)(() => {
|
|
3795
3812
|
if (currentQuestion) {
|
|
3796
3813
|
onReviewValueChange({
|
|
3797
3814
|
reviewId: currentQuestion.uuid,
|
|
@@ -3826,7 +3843,7 @@ function CurriculumReviewProvider({
|
|
|
3826
3843
|
);
|
|
3827
3844
|
}
|
|
3828
3845
|
function useCurriculumReviewContext() {
|
|
3829
|
-
const context = (0,
|
|
3846
|
+
const context = (0, import_react33.useContext)(CurriculumReviewContext);
|
|
3830
3847
|
if (!context) {
|
|
3831
3848
|
throw new Error(
|
|
3832
3849
|
"useCurriculumReviewContext must be used within a CurriculumReviewProvider"
|
|
@@ -4194,7 +4211,7 @@ function ReviewQuestionFooter({
|
|
|
4194
4211
|
var review_question_footer_default = ReviewQuestionFooter;
|
|
4195
4212
|
|
|
4196
4213
|
// src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-radio.tsx
|
|
4197
|
-
var
|
|
4214
|
+
var import_react34 = require("react");
|
|
4198
4215
|
|
|
4199
4216
|
// src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-comp.tsx
|
|
4200
4217
|
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
@@ -4228,13 +4245,13 @@ var correctAnswerStyle = {
|
|
|
4228
4245
|
};
|
|
4229
4246
|
function ReviewQuestionRadio(props) {
|
|
4230
4247
|
const { question, answer, onChange } = props;
|
|
4231
|
-
const [isCheckAnswer, setIsCheckAnswer] = (0,
|
|
4232
|
-
const checkAnswer = (0,
|
|
4248
|
+
const [isCheckAnswer, setIsCheckAnswer] = (0, import_react34.useState)(false);
|
|
4249
|
+
const checkAnswer = (0, import_react34.useCallback)(() => {
|
|
4233
4250
|
setIsCheckAnswer(true);
|
|
4234
4251
|
}, []);
|
|
4235
4252
|
const isCorrect = isCheckAnswer && Number(answer) === question.correctAnswer;
|
|
4236
4253
|
const isWrong = isCheckAnswer && Number(answer) !== question.correctAnswer;
|
|
4237
|
-
const radioColor = (0,
|
|
4254
|
+
const radioColor = (0, import_react34.useMemo)(() => {
|
|
4238
4255
|
if (isCorrect) return "green";
|
|
4239
4256
|
if (isWrong) return "red";
|
|
4240
4257
|
return void 0;
|
|
@@ -4584,10 +4601,10 @@ function CurriculumReview(props) {
|
|
|
4584
4601
|
tempCurriculumReviewAnswers,
|
|
4585
4602
|
curriculumCompleteMap
|
|
4586
4603
|
} = useCurriculumContext();
|
|
4587
|
-
const [open, setOpen] = (0,
|
|
4588
|
-
const [isChanged, setIsChanged] = (0,
|
|
4589
|
-
const [closeDialogOpen, setCloseDialogOpen] = (0,
|
|
4590
|
-
const onReviewValueChange = (0,
|
|
4604
|
+
const [open, setOpen] = (0, import_react35.useState)(false);
|
|
4605
|
+
const [isChanged, setIsChanged] = (0, import_react35.useState)(false);
|
|
4606
|
+
const [closeDialogOpen, setCloseDialogOpen] = (0, import_react35.useState)(false);
|
|
4607
|
+
const onReviewValueChange = (0, import_react35.useCallback)(
|
|
4591
4608
|
({
|
|
4592
4609
|
reviewId,
|
|
4593
4610
|
answer
|
|
@@ -4600,7 +4617,7 @@ function CurriculumReview(props) {
|
|
|
4600
4617
|
},
|
|
4601
4618
|
[_onReviewValueChange, curriculumReviewAnswers]
|
|
4602
4619
|
);
|
|
4603
|
-
const onReviewSubmit = (0,
|
|
4620
|
+
const onReviewSubmit = (0, import_react35.useCallback)(
|
|
4604
4621
|
(values) => {
|
|
4605
4622
|
return _onReviewSubmit({ reviewId: item.uuid, answer: values }).then(
|
|
4606
4623
|
(result) => {
|
|
@@ -4611,29 +4628,29 @@ function CurriculumReview(props) {
|
|
|
4611
4628
|
},
|
|
4612
4629
|
[item.uuid, _onReviewSubmit]
|
|
4613
4630
|
);
|
|
4614
|
-
const onClickEndReview = (0,
|
|
4631
|
+
const onClickEndReview = (0, import_react35.useCallback)(() => {
|
|
4615
4632
|
setOpen(false);
|
|
4616
4633
|
}, []);
|
|
4617
|
-
const onClickCloseDrawer = (0,
|
|
4634
|
+
const onClickCloseDrawer = (0, import_react35.useCallback)(() => {
|
|
4618
4635
|
if (isChanged) {
|
|
4619
4636
|
setCloseDialogOpen(true);
|
|
4620
4637
|
} else {
|
|
4621
4638
|
setOpen(false);
|
|
4622
4639
|
}
|
|
4623
4640
|
}, [isChanged]);
|
|
4624
|
-
const mode = (0,
|
|
4641
|
+
const mode = (0, import_react35.useMemo)(() => {
|
|
4625
4642
|
return item.questions.every(
|
|
4626
4643
|
(question) => curriculumReviewAnswers[question.uuid] && curriculumReviewAnswers[question.uuid] !== ""
|
|
4627
4644
|
) ? "edit" : "create";
|
|
4628
4645
|
}, [curriculumReviewAnswers, item.questions]);
|
|
4629
|
-
const defaultValues = (0,
|
|
4646
|
+
const defaultValues = (0, import_react35.useMemo)(() => {
|
|
4630
4647
|
const allAnswers = __spreadValues(__spreadValues({}, tempCurriculumReviewAnswers), curriculumReviewAnswers);
|
|
4631
4648
|
return item.questions.reduce((acc, question) => {
|
|
4632
4649
|
acc[question.uuid] = allAnswers[question.uuid] || "";
|
|
4633
4650
|
return acc;
|
|
4634
4651
|
}, {});
|
|
4635
4652
|
}, [curriculumReviewAnswers, item.questions, tempCurriculumReviewAnswers]);
|
|
4636
|
-
const done = (0,
|
|
4653
|
+
const done = (0, import_react35.useMemo)(() => {
|
|
4637
4654
|
return Boolean(curriculumCompleteMap[item.uuid]);
|
|
4638
4655
|
}, [curriculumCompleteMap, item.uuid]);
|
|
4639
4656
|
const bgColor = done ? "var(--color-panel-solid)" : void 0;
|
|
@@ -4734,14 +4751,14 @@ function CurriculumReview(props) {
|
|
|
4734
4751
|
var curriculum_review_default = CurriculumReview;
|
|
4735
4752
|
|
|
4736
4753
|
// src/molecules/curriculumV2/CurriculumContents/curriculum-ai-traning.tsx
|
|
4737
|
-
var
|
|
4754
|
+
var import_react36 = require("react");
|
|
4738
4755
|
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
4739
4756
|
function CurriculumAiTraning({
|
|
4740
4757
|
item
|
|
4741
4758
|
}) {
|
|
4742
4759
|
const { title, description, buttonTitle } = item;
|
|
4743
4760
|
const { curriculumCompleteMap, onActionButtonClick } = useCurriculumContext();
|
|
4744
|
-
const done = (0,
|
|
4761
|
+
const done = (0, import_react36.useMemo)(() => {
|
|
4745
4762
|
return Boolean(curriculumCompleteMap[item.uuid]);
|
|
4746
4763
|
}, [curriculumCompleteMap, item.uuid]);
|
|
4747
4764
|
const bgColor = done ? "var(--color-panel-solid)" : void 0;
|
|
@@ -5404,7 +5421,7 @@ function CoachingCustomerInfo(props) {
|
|
|
5404
5421
|
}
|
|
5405
5422
|
|
|
5406
5423
|
// src/app/platform/goal-manage-card-read.tsx
|
|
5407
|
-
var
|
|
5424
|
+
var import_react37 = require("react");
|
|
5408
5425
|
var import_date_fns4 = require("date-fns");
|
|
5409
5426
|
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
5410
5427
|
function GoalManageCardRead(props) {
|
|
@@ -5420,12 +5437,12 @@ function GoalManageCardRead(props) {
|
|
|
5420
5437
|
onClickIncomplete,
|
|
5421
5438
|
onClickComplete
|
|
5422
5439
|
} = props;
|
|
5423
|
-
const [open, setOpen] = (0,
|
|
5424
|
-
const onClickOpen = (0,
|
|
5440
|
+
const [open, setOpen] = (0, import_react37.useState)(Boolean(defaultOpen));
|
|
5441
|
+
const onClickOpen = (0, import_react37.useCallback)(() => {
|
|
5425
5442
|
setOpen((p) => !p);
|
|
5426
5443
|
}, []);
|
|
5427
5444
|
const icon = open ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react_icons2.ChevronUpIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react_icons2.ChevronDownIcon, {});
|
|
5428
|
-
const badgeMeta = (0,
|
|
5445
|
+
const badgeMeta = (0, import_react37.useMemo)(() => {
|
|
5429
5446
|
if (!completed && dueDate) {
|
|
5430
5447
|
if (dueDate >= (0, import_date_fns4.startOfDay)(/* @__PURE__ */ new Date()))
|
|
5431
5448
|
return {
|
|
@@ -5436,13 +5453,13 @@ function GoalManageCardRead(props) {
|
|
|
5436
5453
|
}
|
|
5437
5454
|
return null;
|
|
5438
5455
|
}, [completed, dueDate]);
|
|
5439
|
-
const renderSubTitle = (0,
|
|
5456
|
+
const renderSubTitle = (0, import_react37.useCallback)((subTitle) => {
|
|
5440
5457
|
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Heading2, { mb: "2", variant: "heading5", children: subTitle });
|
|
5441
5458
|
}, []);
|
|
5442
|
-
const renderSubContent = (0,
|
|
5459
|
+
const renderSubContent = (0, import_react37.useCallback)((content) => {
|
|
5443
5460
|
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Typo, { as: "p", color: "gray", children: content });
|
|
5444
5461
|
}, []);
|
|
5445
|
-
const renderCompleteButton = (0,
|
|
5462
|
+
const renderCompleteButton = (0, import_react37.useCallback)(() => {
|
|
5446
5463
|
if (completed) {
|
|
5447
5464
|
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Button, { onClick: onClickIncomplete, size: "small", variant: "surface", children: "\uC9C4\uD589\uC911\uC778 \uACFC\uC81C\uB85C \uB3CC\uB824\uB193\uAE30" });
|
|
5448
5465
|
}
|
|
@@ -5518,7 +5535,7 @@ function GoalManageCardRead(props) {
|
|
|
5518
5535
|
}
|
|
5519
5536
|
|
|
5520
5537
|
// src/app/platform/goal-manage-card-edit.tsx
|
|
5521
|
-
var
|
|
5538
|
+
var import_react38 = require("react");
|
|
5522
5539
|
var import_date_fns5 = require("date-fns");
|
|
5523
5540
|
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
5524
5541
|
var initialValues = {
|
|
@@ -5531,8 +5548,8 @@ var dummyFn = () => {
|
|
|
5531
5548
|
};
|
|
5532
5549
|
function GoalManageCardEdit(props) {
|
|
5533
5550
|
const { defaultValues, errors } = props;
|
|
5534
|
-
const [values, setValues] = (0,
|
|
5535
|
-
const onChange = (0,
|
|
5551
|
+
const [values, setValues] = (0, import_react38.useState)(defaultValues || initialValues);
|
|
5552
|
+
const onChange = (0, import_react38.useCallback)(
|
|
5536
5553
|
(v) => {
|
|
5537
5554
|
var _a;
|
|
5538
5555
|
setValues((prev) => __spreadValues(__spreadValues({}, prev), v));
|
|
@@ -5540,12 +5557,12 @@ function GoalManageCardEdit(props) {
|
|
|
5540
5557
|
},
|
|
5541
5558
|
[props]
|
|
5542
5559
|
);
|
|
5543
|
-
const onClickInit = (0,
|
|
5560
|
+
const onClickInit = (0, import_react38.useCallback)(() => {
|
|
5544
5561
|
var _a;
|
|
5545
5562
|
setValues(initialValues);
|
|
5546
5563
|
(_a = props.onChange) == null ? void 0 : _a.call(props, defaultValues || initialValues);
|
|
5547
5564
|
}, [defaultValues, props]);
|
|
5548
|
-
const onClickSubmit = (0,
|
|
5565
|
+
const onClickSubmit = (0, import_react38.useCallback)(() => {
|
|
5549
5566
|
var _a;
|
|
5550
5567
|
(_a = props.onSubmit) == null ? void 0 : _a.call(props, values);
|
|
5551
5568
|
}, [props, values]);
|
|
@@ -5634,11 +5651,11 @@ function GoalManageCardEdit(props) {
|
|
|
5634
5651
|
}
|
|
5635
5652
|
|
|
5636
5653
|
// src/app/platform/session-card.tsx
|
|
5637
|
-
var
|
|
5654
|
+
var import_react41 = require("react");
|
|
5638
5655
|
var import_date_fns6 = require("date-fns");
|
|
5639
5656
|
|
|
5640
5657
|
// src/app/platform/edit-coaching-time.tsx
|
|
5641
|
-
var
|
|
5658
|
+
var import_react39 = require("react");
|
|
5642
5659
|
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
5643
5660
|
var getValueFromDefaultValue = (args) => {
|
|
5644
5661
|
return {
|
|
@@ -5659,14 +5676,14 @@ var getDateFromValue = (date, time) => {
|
|
|
5659
5676
|
};
|
|
5660
5677
|
function EditCoachingTime(props) {
|
|
5661
5678
|
const { defaultEndAt, defaultStartAt, onClickCancel } = props;
|
|
5662
|
-
const [values, setValues] = (0,
|
|
5679
|
+
const [values, setValues] = (0, import_react39.useState)(() => {
|
|
5663
5680
|
return getValueFromDefaultValue({
|
|
5664
5681
|
startAt: defaultStartAt,
|
|
5665
5682
|
endAt: defaultEndAt
|
|
5666
5683
|
});
|
|
5667
5684
|
});
|
|
5668
|
-
const [timeError, setTimeError] = (0,
|
|
5669
|
-
const checkTimeError = (0,
|
|
5685
|
+
const [timeError, setTimeError] = (0, import_react39.useState)("");
|
|
5686
|
+
const checkTimeError = (0, import_react39.useCallback)(
|
|
5670
5687
|
(startTime, endTime) => {
|
|
5671
5688
|
const error = startTime >= endTime ? "\uC2DC\uC791\uC2DC\uAC04\uC744 \uC885\uB8CC\uC2DC\uAC04\uBCF4\uB2E4 \uBE60\uB974\uAC8C \uC120\uD0DD\uD574\uC8FC\uC138\uC694." : "";
|
|
5672
5689
|
if (error) {
|
|
@@ -5677,7 +5694,7 @@ function EditCoachingTime(props) {
|
|
|
5677
5694
|
},
|
|
5678
5695
|
[]
|
|
5679
5696
|
);
|
|
5680
|
-
const onChangeStartTime = (0,
|
|
5697
|
+
const onChangeStartTime = (0, import_react39.useCallback)(
|
|
5681
5698
|
(v) => {
|
|
5682
5699
|
checkTimeError(v, values.endTime);
|
|
5683
5700
|
setValues((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
@@ -5686,7 +5703,7 @@ function EditCoachingTime(props) {
|
|
|
5686
5703
|
},
|
|
5687
5704
|
[checkTimeError, values.endTime]
|
|
5688
5705
|
);
|
|
5689
|
-
const onChangeEndTime = (0,
|
|
5706
|
+
const onChangeEndTime = (0, import_react39.useCallback)(
|
|
5690
5707
|
(v) => {
|
|
5691
5708
|
checkTimeError(values.startTime, v);
|
|
5692
5709
|
setValues((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
@@ -5695,12 +5712,12 @@ function EditCoachingTime(props) {
|
|
|
5695
5712
|
},
|
|
5696
5713
|
[checkTimeError, values.startTime]
|
|
5697
5714
|
);
|
|
5698
|
-
const onChangeDate = (0,
|
|
5715
|
+
const onChangeDate = (0, import_react39.useCallback)((date) => {
|
|
5699
5716
|
date && setValues((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
5700
5717
|
date
|
|
5701
5718
|
}));
|
|
5702
5719
|
}, []);
|
|
5703
|
-
const onClickSave = (0,
|
|
5720
|
+
const onClickSave = (0, import_react39.useCallback)(() => {
|
|
5704
5721
|
if (checkTimeError(values.startTime, values.endTime)) {
|
|
5705
5722
|
const startAt = getDateFromValue(values.date, values.startTime);
|
|
5706
5723
|
const endAt = getDateFromValue(values.date, values.endTime);
|
|
@@ -5769,7 +5786,7 @@ function EditCoachingTime(props) {
|
|
|
5769
5786
|
}
|
|
5770
5787
|
|
|
5771
5788
|
// src/app/platform/edit-service-type.tsx
|
|
5772
|
-
var
|
|
5789
|
+
var import_react40 = require("react");
|
|
5773
5790
|
|
|
5774
5791
|
// src/app/platform/on-offline-radio-card.tsx
|
|
5775
5792
|
var import_react_icons10 = require("@radix-ui/react-icons");
|
|
@@ -5812,10 +5829,10 @@ function OnOfflineRadioCard(props) {
|
|
|
5812
5829
|
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
5813
5830
|
function EditServiceType(props) {
|
|
5814
5831
|
const { defaultServiceType, onClickCancel } = props;
|
|
5815
|
-
const [sessionType, setSessionType] = (0,
|
|
5832
|
+
const [sessionType, setSessionType] = (0, import_react40.useState)(
|
|
5816
5833
|
defaultServiceType
|
|
5817
5834
|
);
|
|
5818
|
-
const onClickSave = (0,
|
|
5835
|
+
const onClickSave = (0, import_react40.useCallback)(() => {
|
|
5819
5836
|
var _a;
|
|
5820
5837
|
(_a = props.onClickSave) == null ? void 0 : _a.call(props, sessionType);
|
|
5821
5838
|
}, [props, sessionType]);
|
|
@@ -5869,10 +5886,10 @@ function SessionCard(props) {
|
|
|
5869
5886
|
"endAt",
|
|
5870
5887
|
"sessionType"
|
|
5871
5888
|
]);
|
|
5872
|
-
const renderEditButton = (0,
|
|
5889
|
+
const renderEditButton = (0, import_react41.useCallback)(() => {
|
|
5873
5890
|
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Button, { color: "gray", ml: "2", variant: "transparent", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_icons2.Pencil1Icon, {}) });
|
|
5874
5891
|
}, []);
|
|
5875
|
-
const sessionTimeStr = (0,
|
|
5892
|
+
const sessionTimeStr = (0, import_react41.useMemo)(() => {
|
|
5876
5893
|
if (!startAt || !endAt) return "\uC54C \uC218 \uC5C6\uC74C";
|
|
5877
5894
|
return `${(0, import_date_fns6.format)(startAt, "yyyy\uB144 MM\uC6D4 dd\uC77C HH\uC2DC mm\uBD84")} ~ ${(0, import_date_fns6.format)(endAt, "HH\uC2DC mm\uBD84")}`;
|
|
5878
5895
|
}, [startAt, endAt]);
|
|
@@ -5954,7 +5971,7 @@ function CoachQuestionList({
|
|
|
5954
5971
|
}
|
|
5955
5972
|
|
|
5956
5973
|
// src/app/platform/reservation-card.tsx
|
|
5957
|
-
var
|
|
5974
|
+
var import_react42 = require("react");
|
|
5958
5975
|
var import_date_fns7 = require("date-fns");
|
|
5959
5976
|
var import_locale2 = require("date-fns/locale");
|
|
5960
5977
|
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
@@ -5972,29 +5989,29 @@ function ReservationCard(props) {
|
|
|
5972
5989
|
onClickCancel,
|
|
5973
5990
|
onClickCompleteSession
|
|
5974
5991
|
} = props;
|
|
5975
|
-
const [editValues, setEditValues] = (0,
|
|
5992
|
+
const [editValues, setEditValues] = (0, import_react42.useState)({
|
|
5976
5993
|
date: props.defaultTime,
|
|
5977
5994
|
type: props.defaultType
|
|
5978
5995
|
});
|
|
5979
5996
|
const date = readonly ? defaultTime : editValues.date;
|
|
5980
5997
|
const type = readonly ? defaultType : editValues.type;
|
|
5981
|
-
const onClickSave = (0,
|
|
5998
|
+
const onClickSave = (0, import_react42.useCallback)(() => {
|
|
5982
5999
|
var _a;
|
|
5983
6000
|
(_a = props.onClickSave) == null ? void 0 : _a.call(props, editValues);
|
|
5984
6001
|
}, [editValues, props]);
|
|
5985
|
-
const onClickReset = (0,
|
|
6002
|
+
const onClickReset = (0, import_react42.useCallback)(() => {
|
|
5986
6003
|
setEditValues({
|
|
5987
6004
|
date: defaultTime,
|
|
5988
6005
|
type: defaultType
|
|
5989
6006
|
});
|
|
5990
6007
|
}, [defaultTime, defaultType]);
|
|
5991
|
-
const ActionButtons = (0,
|
|
6008
|
+
const ActionButtons = (0, import_react42.useMemo)(() => {
|
|
5992
6009
|
if (readonly) {
|
|
5993
6010
|
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Button, { onClick: onClickReserve, size: "small", variant: "surface", children: defaultTime && defaultType ? "\uC608\uC57D \uC218\uC815\uD558\uAE30" : "\uC608\uC57D\uD558\uAE30" });
|
|
5994
6011
|
}
|
|
5995
6012
|
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Button, { color: "gray", onClick: onClickCancel, variant: "transparent", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_icons2.Cross1Icon, {}) });
|
|
5996
6013
|
}, [defaultTime, defaultType, onClickCancel, onClickReserve, readonly]);
|
|
5997
|
-
const onChangeDate = (0,
|
|
6014
|
+
const onChangeDate = (0, import_react42.useCallback)((newDate) => {
|
|
5998
6015
|
if (!newDate) return;
|
|
5999
6016
|
setEditValues((prev) => {
|
|
6000
6017
|
return __spreadProps(__spreadValues({}, prev), {
|
|
@@ -6002,17 +6019,17 @@ function ReservationCard(props) {
|
|
|
6002
6019
|
});
|
|
6003
6020
|
});
|
|
6004
6021
|
}, []);
|
|
6005
|
-
const onChangeType = (0,
|
|
6022
|
+
const onChangeType = (0, import_react42.useCallback)((newType) => {
|
|
6006
6023
|
setEditValues((prev) => {
|
|
6007
6024
|
return __spreadProps(__spreadValues({}, prev), {
|
|
6008
6025
|
type: newType
|
|
6009
6026
|
});
|
|
6010
6027
|
});
|
|
6011
6028
|
}, []);
|
|
6012
|
-
const formatDate = (0,
|
|
6029
|
+
const formatDate = (0, import_react42.useCallback)((v) => {
|
|
6013
6030
|
return (0, import_date_fns7.format)(v, "yyyy\uB144 MM\uC6D4 dd\uC77C(EEE) aa h:mm", { locale: import_locale2.ko });
|
|
6014
6031
|
}, []);
|
|
6015
|
-
(0,
|
|
6032
|
+
(0, import_react42.useEffect)(() => {
|
|
6016
6033
|
if (!minTime || !editValues.date || readonly) return;
|
|
6017
6034
|
if (editValues.date < minTime) {
|
|
6018
6035
|
import_react_toastify2.toast.warn("\uC120\uD0DD \uAC00\uB2A5\uD55C \uC2DC\uAC04\uB300\uB85C \uBCC0\uACBD\uB418\uC5C8\uC2B5\uB2C8\uB2E4.");
|
|
@@ -6023,7 +6040,7 @@ function ReservationCard(props) {
|
|
|
6023
6040
|
});
|
|
6024
6041
|
}
|
|
6025
6042
|
}, [editValues, minTime, readonly]);
|
|
6026
|
-
(0,
|
|
6043
|
+
(0, import_react42.useEffect)(() => {
|
|
6027
6044
|
if (!maxTime || !editValues.date || readonly) return;
|
|
6028
6045
|
if (editValues.date > maxTime) {
|
|
6029
6046
|
import_react_toastify2.toast.warn("\uC120\uD0DD \uAC00\uB2A5\uD55C \uC2DC\uAC04\uB300\uB85C \uBCC0\uACBD\uB418\uC5C8\uC2B5\uB2C8\uB2E4.");
|
|
@@ -6130,7 +6147,7 @@ function ReservationCard(props) {
|
|
|
6130
6147
|
}
|
|
6131
6148
|
|
|
6132
6149
|
// src/app/platform/session-review-simple-read.tsx
|
|
6133
|
-
var
|
|
6150
|
+
var import_react43 = require("react");
|
|
6134
6151
|
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
6135
6152
|
function SubTitleWrapper({
|
|
6136
6153
|
children,
|
|
@@ -6145,7 +6162,7 @@ function SessionReviewSimpleRead({
|
|
|
6145
6162
|
helpfulness,
|
|
6146
6163
|
review
|
|
6147
6164
|
}) {
|
|
6148
|
-
const helpfulnessMeta = (0,
|
|
6165
|
+
const helpfulnessMeta = (0, import_react43.useMemo)(() => {
|
|
6149
6166
|
if (helpfulness) {
|
|
6150
6167
|
return {
|
|
6151
6168
|
text: "\uB124",
|
|
@@ -6199,11 +6216,11 @@ function SessionUserInfoDetail({
|
|
|
6199
6216
|
}
|
|
6200
6217
|
|
|
6201
6218
|
// src/app/platform/report-card.tsx
|
|
6202
|
-
var
|
|
6219
|
+
var import_react44 = require("react");
|
|
6203
6220
|
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
6204
6221
|
function ReportCard(props) {
|
|
6205
6222
|
const { title, file, status, subtitle } = props;
|
|
6206
|
-
const onClickDownload = (0,
|
|
6223
|
+
const onClickDownload = (0, import_react44.useCallback)(() => {
|
|
6207
6224
|
if (!file) return;
|
|
6208
6225
|
const { url, fileName } = file;
|
|
6209
6226
|
const link = document.createElement("a");
|
|
@@ -6241,9 +6258,9 @@ function ReportCard(props) {
|
|
|
6241
6258
|
}
|
|
6242
6259
|
|
|
6243
6260
|
// src/app/platform/contents-card.tsx
|
|
6244
|
-
var
|
|
6261
|
+
var import_react45 = require("react");
|
|
6245
6262
|
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
6246
|
-
var ContentsCard = (0,
|
|
6263
|
+
var ContentsCard = (0, import_react45.forwardRef)(
|
|
6247
6264
|
({
|
|
6248
6265
|
title,
|
|
6249
6266
|
description,
|