@tipp/ui 2.3.17 → 2.3.18
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 +200 -195
- package/dist/app/index.cjs.map +1 -1
- package/dist/app/index.js +94 -93
- package/dist/app/platform/coach-question-list.js +29 -29
- package/dist/app/platform/contents-card.js +29 -29
- package/dist/app/platform/curriculum-card.js +6 -6
- package/dist/app/platform/edit-coaching-time.cjs +29 -24
- package/dist/app/platform/edit-coaching-time.cjs.map +1 -1
- package/dist/app/platform/edit-coaching-time.js +72 -71
- package/dist/app/platform/edit-service-type.cjs +25 -20
- package/dist/app/platform/edit-service-type.cjs.map +1 -1
- package/dist/app/platform/edit-service-type.js +73 -72
- package/dist/app/platform/goal-manage-card-edit.cjs +32 -27
- package/dist/app/platform/goal-manage-card-edit.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-edit.js +72 -71
- package/dist/app/platform/goal-manage-card-read.js +29 -29
- package/dist/app/platform/on-offline-radio-card.cjs +38 -33
- package/dist/app/platform/on-offline-radio-card.cjs.map +1 -1
- package/dist/app/platform/on-offline-radio-card.js +72 -71
- package/dist/app/platform/report-card.js +29 -29
- package/dist/app/platform/reservation-card.cjs +48 -43
- package/dist/app/platform/reservation-card.cjs.map +1 -1
- package/dist/app/platform/reservation-card.js +73 -72
- package/dist/app/platform/session-card.cjs +75 -70
- package/dist/app/platform/session-card.cjs.map +1 -1
- package/dist/app/platform/session-card.js +75 -74
- package/dist/app/platform/session-review-simple-read.js +29 -29
- package/dist/app/platform/userInfos/coaching-customer-info/index.js +32 -32
- package/dist/app/platform/userInfos/coaching-customer-info/large.js +29 -29
- package/dist/app/platform/userInfos/coaching-customer-info/medium.js +29 -29
- package/dist/app/platform/userInfos/coaching-customer-info/small.js +29 -29
- package/dist/app/platform/userInfos/session-user-info-detail.js +29 -29
- package/dist/app/platform/userInfos/utils.js +28 -28
- package/dist/atoms/bullet-text.js +2 -2
- package/dist/atoms/dialog.js +2 -2
- package/dist/atoms/field-error-wrapper.js +2 -2
- package/dist/atoms/index.js +62 -62
- package/dist/atoms/list.js +2 -2
- package/dist/atoms/pagination.js +3 -3
- package/dist/chunk-2O2CKXEZ.js +69 -0
- package/dist/chunk-2O2CKXEZ.js.map +1 -0
- package/dist/chunk-2VFMVVWT.js +63 -0
- package/dist/chunk-2VFMVVWT.js.map +1 -0
- package/dist/chunk-2XNMU67K.js +69 -0
- package/dist/chunk-2XNMU67K.js.map +1 -0
- package/dist/chunk-2YBJBKBB.js +82 -0
- package/dist/chunk-2YBJBKBB.js.map +1 -0
- package/dist/chunk-367ZYIOP.js +89 -0
- package/dist/chunk-367ZYIOP.js.map +1 -0
- package/dist/chunk-3A45CD76.js +196 -0
- package/dist/chunk-3A45CD76.js.map +1 -0
- package/dist/chunk-4JYSUW7I.js +151 -0
- package/dist/chunk-4JYSUW7I.js.map +1 -0
- package/dist/chunk-5TPNUG3Y.js +63 -0
- package/dist/chunk-5TPNUG3Y.js.map +1 -0
- package/dist/chunk-64JB2NO2.js +51 -0
- package/dist/chunk-64JB2NO2.js.map +1 -0
- package/dist/chunk-6F63WEDJ.js +63 -0
- package/dist/chunk-6F63WEDJ.js.map +1 -0
- package/dist/chunk-6UCGUA3B.js +30 -0
- package/dist/chunk-6UCGUA3B.js.map +1 -0
- package/dist/chunk-7IFK5DP5.js +69 -0
- package/dist/chunk-7IFK5DP5.js.map +1 -0
- package/dist/chunk-7QDV6YRH.js +196 -0
- package/dist/chunk-7QDV6YRH.js.map +1 -0
- package/dist/chunk-7XG4CK7Y.js +89 -0
- package/dist/chunk-7XG4CK7Y.js.map +1 -0
- package/dist/chunk-A5VFSD3T.js +129 -0
- package/dist/chunk-A5VFSD3T.js.map +1 -0
- package/dist/chunk-B5U2JBLX.js +87 -0
- package/dist/chunk-B5U2JBLX.js.map +1 -0
- package/dist/chunk-BDJUL3JV.js +50 -0
- package/dist/chunk-BDJUL3JV.js.map +1 -0
- package/dist/chunk-BI5GANUG.js +75 -0
- package/dist/chunk-BI5GANUG.js.map +1 -0
- package/dist/chunk-BV3ZL4VC.js +196 -0
- package/dist/chunk-BV3ZL4VC.js.map +1 -0
- package/dist/chunk-BWWSZLTV.js +43 -0
- package/dist/chunk-BWWSZLTV.js.map +1 -0
- package/dist/chunk-C5MM3PUD.js +89 -0
- package/dist/chunk-C5MM3PUD.js.map +1 -0
- package/dist/chunk-C5YDIFWN.js +129 -0
- package/dist/chunk-C5YDIFWN.js.map +1 -0
- package/dist/chunk-CC4LSJRN.js +144 -0
- package/dist/chunk-CC4LSJRN.js.map +1 -0
- package/dist/chunk-CIQ7ELE6.js +151 -0
- package/dist/chunk-CIQ7ELE6.js.map +1 -0
- package/dist/chunk-CSLHE7O6.js +196 -0
- package/dist/chunk-CSLHE7O6.js.map +1 -0
- package/dist/chunk-CTCLKPUM.js +50 -0
- package/dist/chunk-CTCLKPUM.js.map +1 -0
- package/dist/chunk-DEAVEZQM.js +1 -0
- package/dist/chunk-DEAVEZQM.js.map +1 -0
- package/dist/chunk-ENVZEWF6.js +98 -0
- package/dist/chunk-ENVZEWF6.js.map +1 -0
- package/dist/chunk-FSJP6HQY.js +49 -0
- package/dist/chunk-FSJP6HQY.js.map +1 -0
- package/dist/chunk-FVAZZ46M.js +69 -0
- package/dist/chunk-FVAZZ46M.js.map +1 -0
- package/dist/chunk-H6UISOMV.js +50 -0
- package/dist/chunk-H6UISOMV.js.map +1 -0
- package/dist/chunk-HZ5LNRVL.js +101 -0
- package/dist/chunk-HZ5LNRVL.js.map +1 -0
- package/dist/chunk-I25D6CHU.js +50 -0
- package/dist/chunk-I25D6CHU.js.map +1 -0
- package/dist/chunk-IF4Q5NV4.js +129 -0
- package/dist/chunk-IF4Q5NV4.js.map +1 -0
- package/dist/chunk-IYVNZW3B.js +196 -0
- package/dist/chunk-IYVNZW3B.js.map +1 -0
- package/dist/chunk-J6D5FMYR.js +75 -0
- package/dist/chunk-J6D5FMYR.js.map +1 -0
- package/dist/chunk-JGM5HN2L.js +69 -0
- package/dist/chunk-JGM5HN2L.js.map +1 -0
- package/dist/chunk-KJC6WEFI.js +75 -0
- package/dist/chunk-KJC6WEFI.js.map +1 -0
- package/dist/chunk-LEIPUJCQ.js +75 -0
- package/dist/chunk-LEIPUJCQ.js.map +1 -0
- package/dist/chunk-LJO2266G.js +64 -0
- package/dist/chunk-LJO2266G.js.map +1 -0
- package/dist/chunk-LPOX4NKE.js +29 -0
- package/dist/chunk-LPOX4NKE.js.map +1 -0
- package/dist/chunk-M2DLW32Z.js +77 -0
- package/dist/chunk-M2DLW32Z.js.map +1 -0
- package/dist/chunk-N662YJXY.js +69 -0
- package/dist/chunk-N662YJXY.js.map +1 -0
- package/dist/chunk-N6LOS7L5.js +89 -0
- package/dist/chunk-N6LOS7L5.js.map +1 -0
- package/dist/chunk-NCCAFJJR.js +83 -0
- package/dist/chunk-NCCAFJJR.js.map +1 -0
- package/dist/chunk-NFI7WDJS.js +50 -0
- package/dist/chunk-NFI7WDJS.js.map +1 -0
- package/dist/chunk-NTJLECYY.js +37 -0
- package/dist/chunk-NTJLECYY.js.map +1 -0
- package/dist/chunk-NTWHDYJV.js +89 -0
- package/dist/chunk-NTWHDYJV.js.map +1 -0
- package/dist/chunk-NVQSH733.js +51 -0
- package/dist/chunk-NVQSH733.js.map +1 -0
- package/dist/chunk-ODHH7CFR.js +196 -0
- package/dist/chunk-ODHH7CFR.js.map +1 -0
- package/dist/chunk-OILH5J7Q.js +101 -0
- package/dist/chunk-OILH5J7Q.js.map +1 -0
- package/dist/chunk-OX5XYAZM.js +37 -0
- package/dist/chunk-OX5XYAZM.js.map +1 -0
- package/dist/chunk-P76FTCUF.js +64 -0
- package/dist/chunk-P76FTCUF.js.map +1 -0
- package/dist/chunk-PF3LVPOZ.js +87 -0
- package/dist/chunk-PF3LVPOZ.js.map +1 -0
- package/dist/chunk-PWF22OOK.js +64 -0
- package/dist/chunk-PWF22OOK.js.map +1 -0
- package/dist/chunk-QU5M7KZM.js +50 -0
- package/dist/chunk-QU5M7KZM.js.map +1 -0
- package/dist/chunk-RWK6HLWM.js +75 -0
- package/dist/chunk-RWK6HLWM.js.map +1 -0
- package/dist/chunk-RYEEDHML.js +64 -0
- package/dist/chunk-RYEEDHML.js.map +1 -0
- package/dist/chunk-SQIJY72J.js +69 -0
- package/dist/chunk-SQIJY72J.js.map +1 -0
- package/dist/chunk-SZ73GYOE.js +98 -0
- package/dist/chunk-SZ73GYOE.js.map +1 -0
- package/dist/chunk-TQ5AJKUH.js +64 -0
- package/dist/chunk-TQ5AJKUH.js.map +1 -0
- package/dist/chunk-UGCYMUQ4.js +89 -0
- package/dist/chunk-UGCYMUQ4.js.map +1 -0
- package/dist/chunk-UK7J2BOO.js +83 -0
- package/dist/chunk-UK7J2BOO.js.map +1 -0
- package/dist/chunk-V4GNPLLT.js +69 -0
- package/dist/chunk-V4GNPLLT.js.map +1 -0
- package/dist/chunk-VKMRA55P.js +144 -0
- package/dist/chunk-VKMRA55P.js.map +1 -0
- package/dist/chunk-VLGR5PZX.js +1 -0
- package/dist/chunk-VLGR5PZX.js.map +1 -0
- package/dist/chunk-VQGBP3JY.js +50 -0
- package/dist/chunk-VQGBP3JY.js.map +1 -0
- package/dist/chunk-WV4WWBKN.js +69 -0
- package/dist/chunk-WV4WWBKN.js.map +1 -0
- package/dist/chunk-X3J2UNWS.js +69 -0
- package/dist/chunk-X3J2UNWS.js.map +1 -0
- package/dist/chunk-X67ER3JU.js +69 -0
- package/dist/chunk-X67ER3JU.js.map +1 -0
- package/dist/chunk-X732NUWY.js +50 -0
- package/dist/chunk-X732NUWY.js.map +1 -0
- package/dist/chunk-X7QZ46BZ.js +63 -0
- package/dist/chunk-X7QZ46BZ.js.map +1 -0
- package/dist/chunk-XDPD6IWK.js +89 -0
- package/dist/chunk-XDPD6IWK.js.map +1 -0
- package/dist/chunk-XKWY6ZQM.js +196 -0
- package/dist/chunk-XKWY6ZQM.js.map +1 -0
- package/dist/chunk-XW3D3GLY.js +113 -0
- package/dist/chunk-XW3D3GLY.js.map +1 -0
- package/dist/chunk-Y6BK7ABB.js +1 -0
- package/dist/chunk-Y6BK7ABB.js.map +1 -0
- package/dist/chunk-Z2XF3EO2.js +75 -0
- package/dist/chunk-Z2XF3EO2.js.map +1 -0
- package/dist/chunk-ZFEXH655.js +144 -0
- package/dist/chunk-ZFEXH655.js.map +1 -0
- package/dist/context/index.js +5 -5
- package/dist/index.cjs +394 -283
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +156 -151
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.js +16 -16
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-comp.js +4 -4
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.js +9 -9
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-footer.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-header.js +3 -3
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-layout.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-radio.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-option.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-text.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-text.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/complete-review.js +4 -4
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.js +20 -20
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.js +6 -6
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-ai-traning.js +3 -3
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-file-download.js +3 -3
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.js +22 -22
- package/dist/molecules/curriculumV2/CurriculumContents/index.js +26 -26
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/curriculum-item-title.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/section-item.js +4 -4
- package/dist/molecules/curriculumV2/CurriculumSidebar/index.js +8 -8
- package/dist/molecules/curriculumV2/CurriculumSidebar/sidebar-item.js +5 -5
- package/dist/molecules/curriculumV2/curriculum-sub-nav.js +4 -4
- package/dist/molecules/curriculumV2/curriculum-v2-layout.js +2 -2
- package/dist/molecules/curriculumV2/index.js +37 -37
- package/dist/molecules/date-picker/date-picker-button.js +6 -6
- package/dist/molecules/date-picker/index.js +5 -5
- package/dist/molecules/description-json-render.js +5 -5
- package/dist/molecules/download-card.js +2 -2
- package/dist/molecules/dynamic-field.js +5 -5
- package/dist/molecules/dynamic-form.js +6 -6
- package/dist/molecules/expand-table/index.js +4 -4
- package/dist/molecules/force-refresh.js +2 -2
- package/dist/molecules/ghost-post.js +4 -4
- package/dist/molecules/index.cjs +111 -0
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.d.cts +2 -0
- package/dist/molecules/index.d.ts +2 -0
- package/dist/molecules/index.js +73 -69
- package/dist/molecules/learning-post.js +5 -5
- package/dist/molecules/navigation.js +3 -3
- package/dist/molecules/one-on-one-guide-list.js +3 -3
- package/dist/molecules/stepper.js +4 -4
- package/dist/molecules/tag-selector.js +5 -5
- package/dist/molecules/training-info-guideline.cjs +508 -0
- package/dist/molecules/training-info-guideline.cjs.map +1 -0
- package/dist/molecules/training-info-guideline.d.cts +13 -0
- package/dist/molecules/training-info-guideline.d.ts +13 -0
- package/dist/molecules/training-info-guideline.js +19 -0
- package/dist/molecules/training-info-guideline.js.map +1 -0
- package/dist/types/curriculumContents.type.cjs.map +1 -1
- package/dist/types/dynamic-form-schema-generated.cjs.map +1 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +2 -1
- package/dist/types/training-info-guideline-schema-generated.cjs +19 -0
- package/dist/types/training-info-guideline-schema-generated.cjs.map +1 -0
- package/dist/types/training-info-guideline-schema-generated.d.cts +22 -0
- package/dist/types/training-info-guideline-schema-generated.d.ts +22 -0
- package/dist/types/training-info-guideline-schema-generated.js +2 -0
- package/dist/types/training-info-guideline-schema-generated.js.map +1 -0
- package/package.json +2 -2
- package/src/constrant/training-info-guideline.schema.json +45 -0
- package/src/molecules/index.ts +2 -1
- package/src/molecules/training-info-guideline.tsx +130 -0
- package/src/types/curriculumContents.type.ts +1 -0
- package/src/types/dynamic-form-schema-generated.ts +1 -0
- package/src/types/index.ts +1 -0
- package/src/types/training-info-guideline-schema-generated.ts +23 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Dialog
|
|
3
|
+
} from "./chunk-AH4A53SZ.js";
|
|
4
|
+
import {
|
|
5
|
+
Flex
|
|
6
|
+
} from "./chunk-25HMMI7R.js";
|
|
7
|
+
import {
|
|
8
|
+
Button
|
|
9
|
+
} from "./chunk-ZVDAEY5Q.js";
|
|
10
|
+
|
|
11
|
+
// src/molecules/training-info-guideline.tsx
|
|
12
|
+
import { FileTextIcon, VideoIcon } from "@radix-ui/react-icons";
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
function TrainingInfoGuideline({
|
|
15
|
+
values,
|
|
16
|
+
onClickFileDownload
|
|
17
|
+
}) {
|
|
18
|
+
return /* @__PURE__ */ jsx(Flex, { direction: "column", gap: "4", children: values.map((value) => /* @__PURE__ */ jsx(TrainingInfoGuidelineItem, { onClickFileDownload, value }, getItemKey(value))) });
|
|
19
|
+
}
|
|
20
|
+
function getItemKey(value) {
|
|
21
|
+
return value.url;
|
|
22
|
+
}
|
|
23
|
+
function TrainingInfoGuidelineItem({
|
|
24
|
+
value,
|
|
25
|
+
onClickFileDownload
|
|
26
|
+
}) {
|
|
27
|
+
if (value.type === "file") {
|
|
28
|
+
return /* @__PURE__ */ jsxs(Button, { onClick: () => {
|
|
29
|
+
onClickFileDownload({ url: value.url, filename: value.filename });
|
|
30
|
+
}, children: [
|
|
31
|
+
/* @__PURE__ */ jsx(FileTextIcon, {}),
|
|
32
|
+
value.downloadButtonName
|
|
33
|
+
] });
|
|
34
|
+
}
|
|
35
|
+
if (value.type === "video") {
|
|
36
|
+
return /* @__PURE__ */ jsxs(Dialog.Root, { children: [
|
|
37
|
+
/* @__PURE__ */ jsx(Dialog.Trigger, { children: /* @__PURE__ */ jsxs(Button, { children: [
|
|
38
|
+
/* @__PURE__ */ jsx(VideoIcon, {}),
|
|
39
|
+
value.videoTitle
|
|
40
|
+
] }) }),
|
|
41
|
+
/* @__PURE__ */ jsx(Dialog.Content, { title: value.videoTitle, children: /* @__PURE__ */ jsx("video", { src: value.url, controls: true, children: /* @__PURE__ */ jsx("track", { kind: "captions", srcLang: "ko", label: "Korean captions" }) }) })
|
|
42
|
+
] });
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export {
|
|
48
|
+
TrainingInfoGuideline
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=chunk-QU5M7KZM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/training-info-guideline.tsx"],"sourcesContent":["import React from 'react';\nimport { FileTextIcon, VideoIcon } from '@radix-ui/react-icons';\nimport { Button } from '@/atoms/button';\nimport type { TrainingInfoGuidelineContents } from '@/types/training-info-guideline-schema-generated';\nimport { Dialog } from '@/atoms/dialog';\nimport { Flex } from '../atoms/flex';\n\nexport interface TrainingInfoGuidelineProps {\n values: TrainingInfoGuidelineContents['values'];\n onClickFileDownload: (args: { url: string; filename: string }) => void;\n}\n\nexport function TrainingInfoGuideline({\n values,\n onClickFileDownload,\n}: TrainingInfoGuidelineProps): React.ReactElement {\n return (\n <Flex direction=\"column\" gap=\"4\">\n {values.map((value) => (\n <TrainingInfoGuidelineItem key={getItemKey(value)} onClickFileDownload={onClickFileDownload} value={value} />\n ))}\n </Flex>\n );\n}\n\ntype TrainingInfoGuidelineValue =\n TrainingInfoGuidelineContents['values'][number];\n\nfunction getItemKey(value: TrainingInfoGuidelineValue): string {\n return value.url;\n}\n\ninterface TrainingInfoGuidelineItemProps {\n value: TrainingInfoGuidelineValue;\n onClickFileDownload: TrainingInfoGuidelineProps['onClickFileDownload'];\n}\n\nfunction TrainingInfoGuidelineItem({\n value,\n onClickFileDownload,\n}: TrainingInfoGuidelineItemProps): React.ReactElement | null {\n if (value.type === 'file') {\n return (\n <Button onClick={() => { onClickFileDownload({ url: value.url, filename: value.filename }); }}>\n <FileTextIcon />\n {value.downloadButtonName}\n </Button>\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- 차후 다른 타입 추가 시 사용\n if (value.type === 'video') {\n return (\n <Dialog.Root>\n <Dialog.Trigger>\n <Button>\n <VideoIcon />\n {value.videoTitle}\n </Button>\n </Dialog.Trigger>\n <Dialog.Content title={value.videoTitle}>\n <video src={value.url} controls>\n <track kind=\"captions\" srcLang=\"ko\" label=\"Korean captions\" />\n </video>\n </Dialog.Content>\n </Dialog.Root>\n );\n }\n return null;\n}\n"],"mappings":";;;;;;;;;;;AACA,SAAS,cAAc,iBAAiB;AAkBhC,cAwBF,YAxBE;AAPD,SAAS,sBAAsB;AAAA,EACpC;AAAA,EACA;AACF,GAAmD;AACjD,SACE,oBAAC,QAAK,WAAU,UAAS,KAAI,KAC1B,iBAAO,IAAI,CAAC,UACX,oBAAC,6BAAkD,qBAA0C,SAA7D,WAAW,KAAK,CAA2D,CAC5G,GACH;AAEJ;AAKA,SAAS,WAAW,OAA2C;AAC7D,SAAO,MAAM;AACf;AAOA,SAAS,0BAA0B;AAAA,EACjC;AAAA,EACA;AACF,GAA8D;AAC5D,MAAI,MAAM,SAAS,QAAQ;AACzB,WACE,qBAAC,UAAO,SAAS,MAAM;AAAE,0BAAoB,EAAE,KAAK,MAAM,KAAK,UAAU,MAAM,SAAS,CAAC;AAAA,IAAG,GAC1F;AAAA,0BAAC,gBAAa;AAAA,MACb,MAAM;AAAA,OACT;AAAA,EAEJ;AAGA,MAAI,MAAM,SAAS,SAAS;AAC1B,WACE,qBAAC,OAAO,MAAP,EACC;AAAA,0BAAC,OAAO,SAAP,EACC,+BAAC,UACC;AAAA,4BAAC,aAAU;AAAA,QACV,MAAM;AAAA,SACT,GACF;AAAA,MACA,oBAAC,OAAO,SAAP,EAAe,OAAO,MAAM,YAC3B,8BAAC,WAAM,KAAK,MAAM,KAAK,UAAQ,MAC7B,8BAAC,WAAM,MAAK,YAAW,SAAQ,MAAK,OAAM,mBAAkB,GAC9D,GACF;AAAA,OACF;AAAA,EAEJ;AACA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Dialog
|
|
3
|
+
} from "./chunk-AH4A53SZ.js";
|
|
4
|
+
import {
|
|
5
|
+
Flex
|
|
6
|
+
} from "./chunk-25HMMI7R.js";
|
|
7
|
+
import {
|
|
8
|
+
Button
|
|
9
|
+
} from "./chunk-ZVDAEY5Q.js";
|
|
10
|
+
import {
|
|
11
|
+
AspectRatio
|
|
12
|
+
} from "./chunk-EAXUQEO5.js";
|
|
13
|
+
|
|
14
|
+
// src/molecules/training-info-guideline.tsx
|
|
15
|
+
import { FileTextIcon, VideoIcon } from "@radix-ui/react-icons";
|
|
16
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
function TrainingInfoGuideline({
|
|
18
|
+
values,
|
|
19
|
+
onClickFileDownload
|
|
20
|
+
}) {
|
|
21
|
+
return /* @__PURE__ */ jsx(Flex, { direction: "column", gap: "4", children: values.map((value) => /* @__PURE__ */ jsx(
|
|
22
|
+
TrainingInfoGuidelineItem,
|
|
23
|
+
{
|
|
24
|
+
onClickFileDownload,
|
|
25
|
+
value
|
|
26
|
+
},
|
|
27
|
+
getItemKey(value)
|
|
28
|
+
)) });
|
|
29
|
+
}
|
|
30
|
+
function getItemKey(value) {
|
|
31
|
+
return value.url;
|
|
32
|
+
}
|
|
33
|
+
function TrainingInfoGuidelineItem({
|
|
34
|
+
value,
|
|
35
|
+
onClickFileDownload
|
|
36
|
+
}) {
|
|
37
|
+
if (value.type === "file") {
|
|
38
|
+
return /* @__PURE__ */ jsxs(
|
|
39
|
+
Button,
|
|
40
|
+
{
|
|
41
|
+
onClick: () => {
|
|
42
|
+
onClickFileDownload({ url: value.url, filename: value.filename });
|
|
43
|
+
},
|
|
44
|
+
variant: "surface",
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ jsx(FileTextIcon, {}),
|
|
47
|
+
value.downloadButtonName
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
if (value.type === "video") {
|
|
53
|
+
return /* @__PURE__ */ jsxs(Dialog.Root, { children: [
|
|
54
|
+
/* @__PURE__ */ jsx(Dialog.Trigger, { children: /* @__PURE__ */ jsxs(Button, { variant: "surface", children: [
|
|
55
|
+
/* @__PURE__ */ jsx(VideoIcon, {}),
|
|
56
|
+
value.videoTitle
|
|
57
|
+
] }) }),
|
|
58
|
+
/* @__PURE__ */ jsx(Dialog.Content, { height: "100%", maxHeight: "600px", maxWidth: "800px", title: value.videoTitle, width: "100%", children: /* @__PURE__ */ jsx(AspectRatio, { ratio: 16 / 9, style: { width: "100%" }, children: /* @__PURE__ */ jsx(
|
|
59
|
+
"video",
|
|
60
|
+
{
|
|
61
|
+
controls: true,
|
|
62
|
+
src: value.url,
|
|
63
|
+
style: { height: "100%", width: "100%" },
|
|
64
|
+
children: /* @__PURE__ */ jsx("track", { kind: "captions", label: "Korean captions", srcLang: "ko" })
|
|
65
|
+
}
|
|
66
|
+
) }) })
|
|
67
|
+
] });
|
|
68
|
+
}
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export {
|
|
73
|
+
TrainingInfoGuideline
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=chunk-RWK6HLWM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/training-info-guideline.tsx"],"sourcesContent":["import React from 'react';\nimport { FileTextIcon, VideoIcon } from '@radix-ui/react-icons';\nimport { AspectRatio } from '@/atoms/aspect-ratio';\nimport { Button } from '@/atoms/button';\nimport type { TrainingInfoGuidelineContents } from '@/types/training-info-guideline-schema-generated';\nimport { Dialog } from '@/atoms/dialog';\nimport { Flex } from '../atoms/flex';\n\nexport interface TrainingInfoGuidelineProps {\n values: TrainingInfoGuidelineContents['values'];\n onClickFileDownload: (args: { url: string; filename: string }) => void;\n}\n\nexport function TrainingInfoGuideline({\n values,\n onClickFileDownload,\n}: TrainingInfoGuidelineProps): React.ReactElement {\n return (\n <Flex direction=\"column\" gap=\"4\">\n {values.map((value) => (\n <TrainingInfoGuidelineItem\n key={getItemKey(value)}\n onClickFileDownload={onClickFileDownload}\n value={value}\n />\n ))}\n </Flex>\n );\n}\n\ntype TrainingInfoGuidelineValue =\n TrainingInfoGuidelineContents['values'][number];\n\nfunction getItemKey(value: TrainingInfoGuidelineValue): string {\n return value.url;\n}\n\ninterface TrainingInfoGuidelineItemProps {\n value: TrainingInfoGuidelineValue;\n onClickFileDownload: TrainingInfoGuidelineProps['onClickFileDownload'];\n}\n\nfunction TrainingInfoGuidelineItem({\n value,\n onClickFileDownload,\n}: TrainingInfoGuidelineItemProps): React.ReactElement | null {\n if (value.type === 'file') {\n return (\n <Button\n onClick={() => {\n onClickFileDownload({ url: value.url, filename: value.filename });\n }}\n variant=\"surface\"\n >\n <FileTextIcon />\n {value.downloadButtonName}\n </Button>\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- 차후 다른 타입 추가 시 사용\n if (value.type === 'video') {\n return (\n <Dialog.Root>\n <Dialog.Trigger>\n <Button variant=\"surface\">\n <VideoIcon />\n {value.videoTitle}\n </Button>\n </Dialog.Trigger>\n <Dialog.Content height=\"100%\" maxHeight='600px' maxWidth='800px' title={value.videoTitle} width=\"100%\">\n <AspectRatio ratio={16 / 9} style={{ width: '100%' }}>\n <video\n controls\n src={value.url}\n style={{ height: '100%', width: '100%' }}\n >\n <track kind=\"captions\" label=\"Korean captions\" srcLang=\"ko\" />\n </video>\n </AspectRatio>\n </Dialog.Content>\n </Dialog.Root>\n );\n }\n return null;\n}\n"],"mappings":";;;;;;;;;;;;;;AACA,SAAS,cAAc,iBAAiB;AAmBhC,cA4BF,YA5BE;AAPD,SAAS,sBAAsB;AAAA,EACpC;AAAA,EACA;AACF,GAAmD;AACjD,SACE,oBAAC,QAAK,WAAU,UAAS,KAAI,KAC1B,iBAAO,IAAI,CAAC,UACX;AAAA,IAAC;AAAA;AAAA,MAEC;AAAA,MACA;AAAA;AAAA,IAFK,WAAW,KAAK;AAAA,EAGvB,CACD,GACH;AAEJ;AAKA,SAAS,WAAW,OAA2C;AAC7D,SAAO,MAAM;AACf;AAOA,SAAS,0BAA0B;AAAA,EACjC;AAAA,EACA;AACF,GAA8D;AAC5D,MAAI,MAAM,SAAS,QAAQ;AACzB,WACE;AAAA,MAAC;AAAA;AAAA,QACC,SAAS,MAAM;AACb,8BAAoB,EAAE,KAAK,MAAM,KAAK,UAAU,MAAM,SAAS,CAAC;AAAA,QAClE;AAAA,QACA,SAAQ;AAAA,QAER;AAAA,8BAAC,gBAAa;AAAA,UACb,MAAM;AAAA;AAAA;AAAA,IACT;AAAA,EAEJ;AAGA,MAAI,MAAM,SAAS,SAAS;AAC1B,WACE,qBAAC,OAAO,MAAP,EACC;AAAA,0BAAC,OAAO,SAAP,EACC,+BAAC,UAAO,SAAQ,WACd;AAAA,4BAAC,aAAU;AAAA,QACV,MAAM;AAAA,SACT,GACF;AAAA,MACA,oBAAC,OAAO,SAAP,EAAe,QAAO,QAAO,WAAU,SAAQ,UAAS,SAAQ,OAAO,MAAM,YAAY,OAAM,QAC9F,8BAAC,eAAY,OAAO,KAAK,GAAG,OAAO,EAAE,OAAO,OAAO,GACjD;AAAA,QAAC;AAAA;AAAA,UACC,UAAQ;AAAA,UACR,KAAK,MAAM;AAAA,UACX,OAAO,EAAE,QAAQ,QAAQ,OAAO,OAAO;AAAA,UAEvC,8BAAC,WAAM,MAAK,YAAW,OAAM,mBAAkB,SAAQ,MAAK;AAAA;AAAA,MAC9D,GACF,GACF;AAAA,OACF;AAAA,EAEJ;AACA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Dialog
|
|
3
|
+
} from "./chunk-AH4A53SZ.js";
|
|
4
|
+
import {
|
|
5
|
+
Flex
|
|
6
|
+
} from "./chunk-25HMMI7R.js";
|
|
7
|
+
import {
|
|
8
|
+
Button
|
|
9
|
+
} from "./chunk-ZVDAEY5Q.js";
|
|
10
|
+
|
|
11
|
+
// src/molecules/training-info-guideline.tsx
|
|
12
|
+
import { FileTextIcon, VideoIcon } from "@radix-ui/react-icons";
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
function TrainingInfoGuideline({
|
|
15
|
+
values,
|
|
16
|
+
onClickFileDownload
|
|
17
|
+
}) {
|
|
18
|
+
return /* @__PURE__ */ jsx(Flex, { direction: "column", gap: "4", children: values.map((value) => /* @__PURE__ */ jsx(
|
|
19
|
+
TrainingInfoGuidelineItem,
|
|
20
|
+
{
|
|
21
|
+
onClickFileDownload,
|
|
22
|
+
value
|
|
23
|
+
},
|
|
24
|
+
getItemKey(value)
|
|
25
|
+
)) });
|
|
26
|
+
}
|
|
27
|
+
function getItemKey(value) {
|
|
28
|
+
return value.url;
|
|
29
|
+
}
|
|
30
|
+
function TrainingInfoGuidelineItem({
|
|
31
|
+
value,
|
|
32
|
+
onClickFileDownload
|
|
33
|
+
}) {
|
|
34
|
+
if (value.type === "file") {
|
|
35
|
+
return /* @__PURE__ */ jsxs(
|
|
36
|
+
Button,
|
|
37
|
+
{
|
|
38
|
+
onClick: () => {
|
|
39
|
+
onClickFileDownload({ url: value.url, filename: value.filename });
|
|
40
|
+
},
|
|
41
|
+
variant: "surface",
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ jsx(FileTextIcon, {}),
|
|
44
|
+
value.downloadButtonName
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
if (value.type === "video") {
|
|
50
|
+
return /* @__PURE__ */ jsxs(Dialog.Root, { children: [
|
|
51
|
+
/* @__PURE__ */ jsx(Dialog.Trigger, { children: /* @__PURE__ */ jsxs(Button, { variant: "surface", children: [
|
|
52
|
+
/* @__PURE__ */ jsx(VideoIcon, {}),
|
|
53
|
+
value.videoTitle
|
|
54
|
+
] }) }),
|
|
55
|
+
/* @__PURE__ */ jsx(Dialog.Content, { title: value.videoTitle, children: /* @__PURE__ */ jsx("video", { controls: true, src: value.url, width: "500px", height: "100%", children: /* @__PURE__ */ jsx("track", { kind: "captions", label: "Korean captions", srcLang: "ko" }) }) })
|
|
56
|
+
] });
|
|
57
|
+
}
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export {
|
|
62
|
+
TrainingInfoGuideline
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=chunk-RYEEDHML.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/training-info-guideline.tsx"],"sourcesContent":["import React from 'react';\nimport { FileTextIcon, VideoIcon } from '@radix-ui/react-icons';\nimport { Button } from '@/atoms/button';\nimport type { TrainingInfoGuidelineContents } from '@/types/training-info-guideline-schema-generated';\nimport { Dialog } from '@/atoms/dialog';\nimport { Flex } from '../atoms/flex';\n\nexport interface TrainingInfoGuidelineProps {\n values: TrainingInfoGuidelineContents['values'];\n onClickFileDownload: (args: { url: string; filename: string }) => void;\n}\n\nexport function TrainingInfoGuideline({\n values,\n onClickFileDownload,\n}: TrainingInfoGuidelineProps): React.ReactElement {\n return (\n <Flex direction=\"column\" gap=\"4\">\n {values.map((value) => (\n <TrainingInfoGuidelineItem\n key={getItemKey(value)}\n onClickFileDownload={onClickFileDownload}\n value={value}\n />\n ))}\n </Flex>\n );\n}\n\ntype TrainingInfoGuidelineValue =\n TrainingInfoGuidelineContents['values'][number];\n\nfunction getItemKey(value: TrainingInfoGuidelineValue): string {\n return value.url;\n}\n\ninterface TrainingInfoGuidelineItemProps {\n value: TrainingInfoGuidelineValue;\n onClickFileDownload: TrainingInfoGuidelineProps['onClickFileDownload'];\n}\n\nfunction TrainingInfoGuidelineItem({\n value,\n onClickFileDownload,\n}: TrainingInfoGuidelineItemProps): React.ReactElement | null {\n if (value.type === 'file') {\n return (\n <Button\n onClick={() => {\n onClickFileDownload({ url: value.url, filename: value.filename });\n }}\n variant=\"surface\"\n >\n <FileTextIcon />\n {value.downloadButtonName}\n </Button>\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- 차후 다른 타입 추가 시 사용\n if (value.type === 'video') {\n return (\n <Dialog.Root>\n <Dialog.Trigger>\n <Button variant=\"surface\">\n <VideoIcon />\n {value.videoTitle}\n </Button>\n </Dialog.Trigger>\n <Dialog.Content title={value.videoTitle}>\n <video controls src={value.url} width=\"500px\" height=\"100%\">\n <track kind=\"captions\" label=\"Korean captions\" srcLang=\"ko\" />\n </video>\n </Dialog.Content>\n </Dialog.Root>\n );\n }\n return null;\n}\n"],"mappings":";;;;;;;;;;;AACA,SAAS,cAAc,iBAAiB;AAkBhC,cA4BF,YA5BE;AAPD,SAAS,sBAAsB;AAAA,EACpC;AAAA,EACA;AACF,GAAmD;AACjD,SACE,oBAAC,QAAK,WAAU,UAAS,KAAI,KAC1B,iBAAO,IAAI,CAAC,UACX;AAAA,IAAC;AAAA;AAAA,MAEC;AAAA,MACA;AAAA;AAAA,IAFK,WAAW,KAAK;AAAA,EAGvB,CACD,GACH;AAEJ;AAKA,SAAS,WAAW,OAA2C;AAC7D,SAAO,MAAM;AACf;AAOA,SAAS,0BAA0B;AAAA,EACjC;AAAA,EACA;AACF,GAA8D;AAC5D,MAAI,MAAM,SAAS,QAAQ;AACzB,WACE;AAAA,MAAC;AAAA;AAAA,QACC,SAAS,MAAM;AACb,8BAAoB,EAAE,KAAK,MAAM,KAAK,UAAU,MAAM,SAAS,CAAC;AAAA,QAClE;AAAA,QACA,SAAQ;AAAA,QAER;AAAA,8BAAC,gBAAa;AAAA,UACb,MAAM;AAAA;AAAA;AAAA,IACT;AAAA,EAEJ;AAGA,MAAI,MAAM,SAAS,SAAS;AAC1B,WACE,qBAAC,OAAO,MAAP,EACC;AAAA,0BAAC,OAAO,SAAP,EACC,+BAAC,UAAO,SAAQ,WACd;AAAA,4BAAC,aAAU;AAAA,QACV,MAAM;AAAA,SACT,GACF;AAAA,MACA,oBAAC,OAAO,SAAP,EAAe,OAAO,MAAM,YAC3B,8BAAC,WAAM,UAAQ,MAAC,KAAK,MAAM,KAAK,OAAM,SAAQ,QAAO,QACnD,8BAAC,WAAM,MAAK,YAAW,OAAM,mBAAkB,SAAQ,MAAK,GAC9D,GACF;AAAA,OACF;AAAA,EAEJ;AACA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import {
|
|
2
|
+
curriculum_ai_traning_default
|
|
3
|
+
} from "./chunk-Q7AMZ7ES.js";
|
|
4
|
+
import {
|
|
5
|
+
curriculum_file_download_default
|
|
6
|
+
} from "./chunk-5ZA5HGOV.js";
|
|
7
|
+
import {
|
|
8
|
+
curriculum_review_default
|
|
9
|
+
} from "./chunk-CSLHE7O6.js";
|
|
10
|
+
import {
|
|
11
|
+
curriculum_video_default
|
|
12
|
+
} from "./chunk-QGKQ3IX7.js";
|
|
13
|
+
import {
|
|
14
|
+
useCurriculumContext
|
|
15
|
+
} from "./chunk-Y7SJF3Y3.js";
|
|
16
|
+
import {
|
|
17
|
+
Typo
|
|
18
|
+
} from "./chunk-PMJIFLDT.js";
|
|
19
|
+
import {
|
|
20
|
+
Flex
|
|
21
|
+
} from "./chunk-25HMMI7R.js";
|
|
22
|
+
import {
|
|
23
|
+
InfoCircledIcon
|
|
24
|
+
} from "./chunk-W5TPOFOO.js";
|
|
25
|
+
|
|
26
|
+
// src/molecules/curriculumV2/CurriculumContents/index.tsx
|
|
27
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
28
|
+
function CurriculumBody() {
|
|
29
|
+
const { selectedItem, selectedSectionTitle } = useCurriculumContext();
|
|
30
|
+
switch (selectedItem.type) {
|
|
31
|
+
case "video":
|
|
32
|
+
return /* @__PURE__ */ jsx(curriculum_video_default, { item: selectedItem });
|
|
33
|
+
case "review":
|
|
34
|
+
return /* @__PURE__ */ jsx(
|
|
35
|
+
curriculum_review_default,
|
|
36
|
+
{
|
|
37
|
+
item: selectedItem,
|
|
38
|
+
sectionTitle: selectedSectionTitle == null ? void 0 : selectedSectionTitle.title
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
case "aiTraining":
|
|
42
|
+
return /* @__PURE__ */ jsx(curriculum_ai_traning_default, { item: selectedItem });
|
|
43
|
+
case "fileDownload":
|
|
44
|
+
return /* @__PURE__ */ jsx(curriculum_file_download_default, { item: selectedItem });
|
|
45
|
+
default:
|
|
46
|
+
return /* @__PURE__ */ jsxs(
|
|
47
|
+
Flex,
|
|
48
|
+
{
|
|
49
|
+
align: "center",
|
|
50
|
+
direction: "column",
|
|
51
|
+
gap: "2",
|
|
52
|
+
height: "100%",
|
|
53
|
+
justify: "center",
|
|
54
|
+
width: "100%",
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ jsx(InfoCircledIcon, { height: 24, width: 24 }),
|
|
57
|
+
/* @__PURE__ */ jsx(Typo, { children: "\uCEE8\uD150\uCE20\uB97C \uB85C\uB529 \uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4" }),
|
|
58
|
+
/* @__PURE__ */ jsx(Typo, { align: "center", color: "gray", variant: "caption", children: `[debug info]
|
|
59
|
+
${JSON.stringify(selectedItem)}` })
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export {
|
|
67
|
+
CurriculumBody
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=chunk-SQIJY72J.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/index.tsx"],"sourcesContent":["import React from 'react';\nimport { Flex } from '@/atoms/flex';\nimport { Typo } from '@/atoms/typo';\nimport { InfoCircledIcon } from '@/icon';\nimport { useCurriculumContext } from '../curriculum-context';\nimport CurriculumVideo from './curriculum-video';\nimport CurriculumReview from './curriculum-review';\nimport CurriculumAiTraning from './curriculum-ai-traning';\nimport CurriculumFileDownload from './curriculum-file-download';\n\nexport function CurriculumBody(): React.ReactNode {\n const { selectedItem, selectedSectionTitle } = useCurriculumContext();\n\n switch (selectedItem.type) {\n case 'video':\n return <CurriculumVideo item={selectedItem} />;\n case 'review':\n return (\n <CurriculumReview\n item={selectedItem}\n sectionTitle={selectedSectionTitle?.title}\n />\n );\n case 'aiTraining':\n return <CurriculumAiTraning item={selectedItem} />;\n case 'fileDownload':\n return <CurriculumFileDownload item={selectedItem} />;\n default:\n return (\n <Flex\n align=\"center\"\n direction=\"column\"\n gap=\"2\"\n height=\"100%\"\n justify=\"center\"\n width=\"100%\"\n >\n <InfoCircledIcon height={24} width={24} />\n <Typo>컨텐츠를 로딩 할 수 없습니다</Typo>\n <Typo align=\"center\" color=\"gray\" variant=\"caption\">\n {`[debug info]\n ${JSON.stringify(selectedItem)}`}\n </Typo>\n </Flex>\n );\n }\n} "],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAea,cAcL,YAdK;AALN,SAAS,iBAAkC;AAChD,QAAM,EAAE,cAAc,qBAAqB,IAAI,qBAAqB;AAEpE,UAAQ,aAAa,MAAM;AAAA,IACzB,KAAK;AACH,aAAO,oBAAC,4BAAgB,MAAM,cAAc;AAAA,IAC9C,KAAK;AACH,aACE;AAAA,QAAC;AAAA;AAAA,UACC,MAAM;AAAA,UACN,cAAc,6DAAsB;AAAA;AAAA,MACtC;AAAA,IAEJ,KAAK;AACH,aAAO,oBAAC,iCAAoB,MAAM,cAAc;AAAA,IAClD,KAAK;AACH,aAAO,oBAAC,oCAAuB,MAAM,cAAc;AAAA,IACrD;AACE,aACE;AAAA,QAAC;AAAA;AAAA,UACC,OAAM;AAAA,UACN,WAAU;AAAA,UACV,KAAI;AAAA,UACJ,QAAO;AAAA,UACP,SAAQ;AAAA,UACR,OAAM;AAAA,UAEN;AAAA,gCAAC,mBAAgB,QAAQ,IAAI,OAAO,IAAI;AAAA,YACxC,oBAAC,QAAK,0FAAgB;AAAA,YACtB,oBAAC,QAAK,OAAM,UAAS,OAAM,QAAO,SAAQ,WACvC;AAAA,cACC,KAAK,UAAU,YAAY,CAAC,IAChC;AAAA;AAAA;AAAA,MACF;AAAA,EAEN;AACF;","names":[]}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import {
|
|
2
|
+
sidebar_item_default
|
|
3
|
+
} from "./chunk-NVQSH733.js";
|
|
4
|
+
import {
|
|
5
|
+
useCurriculumContext
|
|
6
|
+
} from "./chunk-Y7SJF3Y3.js";
|
|
7
|
+
import {
|
|
8
|
+
Tabs
|
|
9
|
+
} from "./chunk-5ZITU5L7.js";
|
|
10
|
+
import {
|
|
11
|
+
Grid
|
|
12
|
+
} from "./chunk-EGEQY3KT.js";
|
|
13
|
+
import {
|
|
14
|
+
Box
|
|
15
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
16
|
+
|
|
17
|
+
// src/molecules/curriculumV2/CurriculumSidebar/index.tsx
|
|
18
|
+
import { useMemo } from "react";
|
|
19
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
20
|
+
var TAB_LIST = [
|
|
21
|
+
{
|
|
22
|
+
label: "\uAC15\uC758 \uBAA9\uCC28",
|
|
23
|
+
value: "curriculum"
|
|
24
|
+
}
|
|
25
|
+
];
|
|
26
|
+
var TABS_LIST_STYLE = {
|
|
27
|
+
padding: "0 var(--space-3)"
|
|
28
|
+
};
|
|
29
|
+
var TABS_CONTENT_STYLE = {
|
|
30
|
+
position: "absolute",
|
|
31
|
+
height: "100%",
|
|
32
|
+
width: "100%"
|
|
33
|
+
};
|
|
34
|
+
function CurriculumSidebar() {
|
|
35
|
+
const {
|
|
36
|
+
curriculum,
|
|
37
|
+
selectedIndex,
|
|
38
|
+
setSelectedIndex,
|
|
39
|
+
scrollAreaRef,
|
|
40
|
+
curriculumCompleteMap,
|
|
41
|
+
customTabs
|
|
42
|
+
} = useCurriculumContext();
|
|
43
|
+
const list = curriculum.contents.list;
|
|
44
|
+
const tabList = useMemo(() => {
|
|
45
|
+
return [...TAB_LIST, ...customTabs != null ? customTabs : []];
|
|
46
|
+
}, [customTabs]);
|
|
47
|
+
return /* @__PURE__ */ jsx(Tabs.Root, { asChild: true, defaultValue: TAB_LIST[0].value, children: /* @__PURE__ */ jsxs(Grid, { height: "100%", overflowY: "auto", rows: "auto 1fr ", width: "100%", children: [
|
|
48
|
+
/* @__PURE__ */ jsx(Tabs.List, { style: TABS_LIST_STYLE, children: tabList.map((tab) => /* @__PURE__ */ jsx(Tabs.Trigger, { value: tab.value, children: tab.label }, tab.value)) }),
|
|
49
|
+
/* @__PURE__ */ jsxs(
|
|
50
|
+
Box,
|
|
51
|
+
{
|
|
52
|
+
height: "100%",
|
|
53
|
+
overflowY: "auto",
|
|
54
|
+
position: "relative",
|
|
55
|
+
ref: scrollAreaRef,
|
|
56
|
+
width: "100%",
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ jsxs(
|
|
59
|
+
Tabs.Content,
|
|
60
|
+
{
|
|
61
|
+
style: TABS_CONTENT_STYLE,
|
|
62
|
+
value: TAB_LIST[0].value,
|
|
63
|
+
children: [
|
|
64
|
+
list.map((item, index) => /* @__PURE__ */ jsx(
|
|
65
|
+
sidebar_item_default,
|
|
66
|
+
{
|
|
67
|
+
done: curriculumCompleteMap[item.uuid],
|
|
68
|
+
index,
|
|
69
|
+
item,
|
|
70
|
+
selectedIndex,
|
|
71
|
+
setSelectedIndex
|
|
72
|
+
},
|
|
73
|
+
item.uuid
|
|
74
|
+
)),
|
|
75
|
+
/* @__PURE__ */ jsx(Box, { height: "150px" })
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
TAB_LIST[0].value
|
|
79
|
+
),
|
|
80
|
+
customTabs == null ? void 0 : customTabs.map((tab) => /* @__PURE__ */ jsx(
|
|
81
|
+
Tabs.Content,
|
|
82
|
+
{
|
|
83
|
+
style: TABS_CONTENT_STYLE,
|
|
84
|
+
value: tab.value,
|
|
85
|
+
children: tab.content
|
|
86
|
+
},
|
|
87
|
+
tab.value
|
|
88
|
+
))
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
] }) });
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export {
|
|
96
|
+
CurriculumSidebar
|
|
97
|
+
};
|
|
98
|
+
//# sourceMappingURL=chunk-SZ73GYOE.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumSidebar/index.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { Box } from '@/atoms/box';\nimport { Grid } from '@/atoms/grid';\nimport { Tabs } from '@/atoms/tabs';\nimport { useCurriculumContext } from '../curriculum-context';\nimport SidebarItem from './sidebar-item';\n\nconst TAB_LIST = [\n {\n label: '강의 목차',\n value: 'curriculum',\n },\n];\n\nconst TABS_LIST_STYLE: React.CSSProperties = {\n padding: '0 var(--space-3)',\n};\n\nconst TABS_CONTENT_STYLE: React.CSSProperties = {\n position: 'absolute',\n height: '100%',\n width: '100%',\n};\n\n\nexport function CurriculumSidebar(): React.ReactNode {\n const {\n curriculum,\n selectedIndex,\n setSelectedIndex,\n scrollAreaRef,\n curriculumCompleteMap,\n customTabs,\n } = useCurriculumContext();\n const list = curriculum.contents.list;\n\n const tabList = useMemo(() => {\n return [...TAB_LIST, ...(customTabs ?? [])];\n }, [customTabs]);\n\n return (\n <Tabs.Root asChild defaultValue={TAB_LIST[0].value}>\n <Grid height=\"100%\" overflowY=\"auto\" rows=\"auto 1fr \" width=\"100%\">\n <Tabs.List style={TABS_LIST_STYLE}>\n {tabList.map((tab) => (\n <Tabs.Trigger key={tab.value} value={tab.value}>\n {tab.label}\n </Tabs.Trigger>\n ))}\n </Tabs.List>\n <Box\n height=\"100%\"\n overflowY=\"auto\"\n position=\"relative\"\n ref={scrollAreaRef}\n width=\"100%\"\n >\n <Tabs.Content\n key={TAB_LIST[0].value}\n style={TABS_CONTENT_STYLE}\n value={TAB_LIST[0].value}\n >\n {list.map((item, index) => (\n <SidebarItem\n done={curriculumCompleteMap[item.uuid]}\n index={index}\n item={item}\n key={item.uuid}\n selectedIndex={selectedIndex}\n setSelectedIndex={setSelectedIndex}\n />\n ))}\n <Box height=\"150px\" />\n </Tabs.Content>\n {customTabs?.map((tab) => (\n <Tabs.Content\n key={tab.value}\n style={TABS_CONTENT_STYLE}\n value={tab.value}\n >\n {tab.content}\n </Tabs.Content>\n ))}\n </Box>\n </Grid>\n </Tabs.Root>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAgB,eAAe;AA6CnB,cAYF,YAZE;AAtCZ,IAAM,WAAW;AAAA,EACf;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AACF;AAEA,IAAM,kBAAuC;AAAA,EAC3C,SAAS;AACX;AAEA,IAAM,qBAA0C;AAAA,EAC9C,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,OAAO;AACT;AAGO,SAAS,oBAAqC;AACnD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,qBAAqB;AACzB,QAAM,OAAO,WAAW,SAAS;AAEjC,QAAM,UAAU,QAAQ,MAAM;AAC5B,WAAO,CAAC,GAAG,UAAU,GAAI,kCAAc,CAAC,CAAE;AAAA,EAC5C,GAAG,CAAC,UAAU,CAAC;AAEf,SACE,oBAAC,KAAK,MAAL,EAAU,SAAO,MAAC,cAAc,SAAS,CAAC,EAAE,OAC3C,+BAAC,QAAK,QAAO,QAAO,WAAU,QAAO,MAAK,aAAY,OAAM,QAC1D;AAAA,wBAAC,KAAK,MAAL,EAAU,OAAO,iBACf,kBAAQ,IAAI,CAAC,QACZ,oBAAC,KAAK,SAAL,EAA6B,OAAO,IAAI,OACtC,cAAI,SADY,IAAI,KAEvB,CACD,GACH;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,QAAO;AAAA,QACP,WAAU;AAAA,QACV,UAAS;AAAA,QACT,KAAK;AAAA,QACL,OAAM;AAAA,QAEN;AAAA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cAEC,OAAO;AAAA,cACP,OAAO,SAAS,CAAC,EAAE;AAAA,cAElB;AAAA,qBAAK,IAAI,CAAC,MAAM,UACf;AAAA,kBAAC;AAAA;AAAA,oBACC,MAAM,sBAAsB,KAAK,IAAI;AAAA,oBACrC;AAAA,oBACA;AAAA,oBAEA;AAAA,oBACA;AAAA;AAAA,kBAFK,KAAK;AAAA,gBAGZ,CACD;AAAA,gBACD,oBAAC,OAAI,QAAO,SAAQ;AAAA;AAAA;AAAA,YAdf,SAAS,CAAC,EAAE;AAAA,UAenB;AAAA,UACC,yCAAY,IAAI,CAAC,QAChB;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cAEC,OAAO;AAAA,cACP,OAAO,IAAI;AAAA,cAEV,cAAI;AAAA;AAAA,YAJA,IAAI;AAAA,UAKX;AAAA;AAAA;AAAA,IAEJ;AAAA,KACF,GACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Dialog
|
|
3
|
+
} from "./chunk-AH4A53SZ.js";
|
|
4
|
+
import {
|
|
5
|
+
Flex
|
|
6
|
+
} from "./chunk-25HMMI7R.js";
|
|
7
|
+
import {
|
|
8
|
+
Button
|
|
9
|
+
} from "./chunk-ZVDAEY5Q.js";
|
|
10
|
+
|
|
11
|
+
// src/molecules/training-info-guideline.tsx
|
|
12
|
+
import { FileTextIcon, VideoIcon } from "@radix-ui/react-icons";
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
function TrainingInfoGuideline({
|
|
15
|
+
values,
|
|
16
|
+
onClickFileDownload
|
|
17
|
+
}) {
|
|
18
|
+
return /* @__PURE__ */ jsx(Flex, { direction: "column", gap: "4", children: values.map((value) => /* @__PURE__ */ jsx(
|
|
19
|
+
TrainingInfoGuidelineItem,
|
|
20
|
+
{
|
|
21
|
+
onClickFileDownload,
|
|
22
|
+
value
|
|
23
|
+
},
|
|
24
|
+
getItemKey(value)
|
|
25
|
+
)) });
|
|
26
|
+
}
|
|
27
|
+
function getItemKey(value) {
|
|
28
|
+
return value.url;
|
|
29
|
+
}
|
|
30
|
+
function TrainingInfoGuidelineItem({
|
|
31
|
+
value,
|
|
32
|
+
onClickFileDownload
|
|
33
|
+
}) {
|
|
34
|
+
if (value.type === "file") {
|
|
35
|
+
return /* @__PURE__ */ jsxs(
|
|
36
|
+
Button,
|
|
37
|
+
{
|
|
38
|
+
onClick: () => {
|
|
39
|
+
onClickFileDownload({ url: value.url, filename: value.filename });
|
|
40
|
+
},
|
|
41
|
+
variant: "surface",
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ jsx(FileTextIcon, {}),
|
|
44
|
+
value.downloadButtonName
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
if (value.type === "video") {
|
|
50
|
+
return /* @__PURE__ */ jsxs(Dialog.Root, { children: [
|
|
51
|
+
/* @__PURE__ */ jsx(Dialog.Trigger, { children: /* @__PURE__ */ jsxs(Button, { variant: "surface", children: [
|
|
52
|
+
/* @__PURE__ */ jsx(VideoIcon, {}),
|
|
53
|
+
value.videoTitle
|
|
54
|
+
] }) }),
|
|
55
|
+
/* @__PURE__ */ jsx(Dialog.Content, { title: value.videoTitle, children: /* @__PURE__ */ jsx("video", { controls: true, src: value.url, width: "100%", height: "100%", children: /* @__PURE__ */ jsx("track", { kind: "captions", label: "Korean captions", srcLang: "ko" }) }) })
|
|
56
|
+
] });
|
|
57
|
+
}
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export {
|
|
62
|
+
TrainingInfoGuideline
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=chunk-TQ5AJKUH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/training-info-guideline.tsx"],"sourcesContent":["import React from 'react';\nimport { FileTextIcon, VideoIcon } from '@radix-ui/react-icons';\nimport { Button } from '@/atoms/button';\nimport type { TrainingInfoGuidelineContents } from '@/types/training-info-guideline-schema-generated';\nimport { Dialog } from '@/atoms/dialog';\nimport { Flex } from '../atoms/flex';\n\nexport interface TrainingInfoGuidelineProps {\n values: TrainingInfoGuidelineContents['values'];\n onClickFileDownload: (args: { url: string; filename: string }) => void;\n}\n\nexport function TrainingInfoGuideline({\n values,\n onClickFileDownload,\n}: TrainingInfoGuidelineProps): React.ReactElement {\n return (\n <Flex direction=\"column\" gap=\"4\">\n {values.map((value) => (\n <TrainingInfoGuidelineItem\n key={getItemKey(value)}\n onClickFileDownload={onClickFileDownload}\n value={value}\n />\n ))}\n </Flex>\n );\n}\n\ntype TrainingInfoGuidelineValue =\n TrainingInfoGuidelineContents['values'][number];\n\nfunction getItemKey(value: TrainingInfoGuidelineValue): string {\n return value.url;\n}\n\ninterface TrainingInfoGuidelineItemProps {\n value: TrainingInfoGuidelineValue;\n onClickFileDownload: TrainingInfoGuidelineProps['onClickFileDownload'];\n}\n\nfunction TrainingInfoGuidelineItem({\n value,\n onClickFileDownload,\n}: TrainingInfoGuidelineItemProps): React.ReactElement | null {\n if (value.type === 'file') {\n return (\n <Button\n onClick={() => {\n onClickFileDownload({ url: value.url, filename: value.filename });\n }}\n variant=\"surface\"\n >\n <FileTextIcon />\n {value.downloadButtonName}\n </Button>\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- 차후 다른 타입 추가 시 사용\n if (value.type === 'video') {\n return (\n <Dialog.Root>\n <Dialog.Trigger>\n <Button variant=\"surface\">\n <VideoIcon />\n {value.videoTitle}\n </Button>\n </Dialog.Trigger>\n <Dialog.Content title={value.videoTitle}>\n <video controls src={value.url} width=\"100%\" height=\"100%\">\n <track kind=\"captions\" label=\"Korean captions\" srcLang=\"ko\" />\n </video>\n </Dialog.Content>\n </Dialog.Root>\n );\n }\n return null;\n}\n"],"mappings":";;;;;;;;;;;AACA,SAAS,cAAc,iBAAiB;AAkBhC,cA4BF,YA5BE;AAPD,SAAS,sBAAsB;AAAA,EACpC;AAAA,EACA;AACF,GAAmD;AACjD,SACE,oBAAC,QAAK,WAAU,UAAS,KAAI,KAC1B,iBAAO,IAAI,CAAC,UACX;AAAA,IAAC;AAAA;AAAA,MAEC;AAAA,MACA;AAAA;AAAA,IAFK,WAAW,KAAK;AAAA,EAGvB,CACD,GACH;AAEJ;AAKA,SAAS,WAAW,OAA2C;AAC7D,SAAO,MAAM;AACf;AAOA,SAAS,0BAA0B;AAAA,EACjC;AAAA,EACA;AACF,GAA8D;AAC5D,MAAI,MAAM,SAAS,QAAQ;AACzB,WACE;AAAA,MAAC;AAAA;AAAA,QACC,SAAS,MAAM;AACb,8BAAoB,EAAE,KAAK,MAAM,KAAK,UAAU,MAAM,SAAS,CAAC;AAAA,QAClE;AAAA,QACA,SAAQ;AAAA,QAER;AAAA,8BAAC,gBAAa;AAAA,UACb,MAAM;AAAA;AAAA;AAAA,IACT;AAAA,EAEJ;AAGA,MAAI,MAAM,SAAS,SAAS;AAC1B,WACE,qBAAC,OAAO,MAAP,EACC;AAAA,0BAAC,OAAO,SAAP,EACC,+BAAC,UAAO,SAAQ,WACd;AAAA,4BAAC,aAAU;AAAA,QACV,MAAM;AAAA,SACT,GACF;AAAA,MACA,oBAAC,OAAO,SAAP,EAAe,OAAO,MAAM,YAC3B,8BAAC,WAAM,UAAQ,MAAC,KAAK,MAAM,KAAK,OAAM,QAAO,QAAO,QAClD,8BAAC,WAAM,MAAK,YAAW,OAAM,mBAAkB,SAAQ,MAAK,GAC9D,GACF;AAAA,OACF;AAAA,EAEJ;AACA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ReviewQuestion_default
|
|
3
|
+
} from "./chunk-6F63WEDJ.js";
|
|
4
|
+
import {
|
|
5
|
+
complete_review_default
|
|
6
|
+
} from "./chunk-W747CDDK.js";
|
|
7
|
+
import {
|
|
8
|
+
start_review_default
|
|
9
|
+
} from "./chunk-CIQ7ELE6.js";
|
|
10
|
+
import {
|
|
11
|
+
CurriculumReviewProvider,
|
|
12
|
+
useCurriculumReviewContext
|
|
13
|
+
} from "./chunk-GMKRNFH5.js";
|
|
14
|
+
|
|
15
|
+
// src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.tsx
|
|
16
|
+
import { jsx } from "react/jsx-runtime";
|
|
17
|
+
function CurriculumReviewStepsInner() {
|
|
18
|
+
const {
|
|
19
|
+
formik,
|
|
20
|
+
step,
|
|
21
|
+
handleStart,
|
|
22
|
+
handleNext,
|
|
23
|
+
handlePrev,
|
|
24
|
+
onClickReviewMyAnswer,
|
|
25
|
+
handleSubmit,
|
|
26
|
+
currentQuestion,
|
|
27
|
+
currentAnswer,
|
|
28
|
+
currentError,
|
|
29
|
+
reviewContents,
|
|
30
|
+
handleAnswerChange
|
|
31
|
+
} = useCurriculumReviewContext();
|
|
32
|
+
const { questions } = reviewContents;
|
|
33
|
+
if (step === 0) {
|
|
34
|
+
return /* @__PURE__ */ jsx(start_review_default, { onStart: handleStart });
|
|
35
|
+
}
|
|
36
|
+
if (step > 0 && step <= questions.length && currentQuestion) {
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
38
|
+
ReviewQuestion_default,
|
|
39
|
+
{
|
|
40
|
+
answer: currentAnswer,
|
|
41
|
+
error: currentError,
|
|
42
|
+
index: step - 1,
|
|
43
|
+
isLast: step === questions.length,
|
|
44
|
+
isLoading: formik.isSubmitting,
|
|
45
|
+
isNextDisabled: currentError !== void 0,
|
|
46
|
+
onChange: handleAnswerChange,
|
|
47
|
+
onNext: handleNext,
|
|
48
|
+
onPrev: handlePrev,
|
|
49
|
+
onSubmit: handleSubmit,
|
|
50
|
+
question: currentQuestion,
|
|
51
|
+
total: questions.length
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
return /* @__PURE__ */ jsx(complete_review_default, { onClickReviewMyAnswer });
|
|
56
|
+
}
|
|
57
|
+
function CurriculumReviewSteps({
|
|
58
|
+
contents,
|
|
59
|
+
title,
|
|
60
|
+
onClickEndReview,
|
|
61
|
+
onSubmit,
|
|
62
|
+
defaultValues,
|
|
63
|
+
curriculum,
|
|
64
|
+
onReviewValueChange,
|
|
65
|
+
mode,
|
|
66
|
+
done
|
|
67
|
+
}) {
|
|
68
|
+
return /* @__PURE__ */ jsx(
|
|
69
|
+
CurriculumReviewProvider,
|
|
70
|
+
{
|
|
71
|
+
curriculum,
|
|
72
|
+
defaultValues,
|
|
73
|
+
done,
|
|
74
|
+
mode,
|
|
75
|
+
onClickEndReview,
|
|
76
|
+
onReviewValueChange,
|
|
77
|
+
onSubmit,
|
|
78
|
+
reviewContents: contents,
|
|
79
|
+
sectionTitle: title,
|
|
80
|
+
children: /* @__PURE__ */ jsx(CurriculumReviewStepsInner, {})
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
var CurriculumReviewSteps_default = CurriculumReviewSteps;
|
|
85
|
+
|
|
86
|
+
export {
|
|
87
|
+
CurriculumReviewSteps_default
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=chunk-UGCYMUQ4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.tsx"],"sourcesContent":["import React from 'react';\nimport { type CurriculumReviewContents } from '@/types/curriculumContents.type';\nimport type { Curriculum } from '@/types'; \nimport {\n CurriculumReviewProvider,\n useCurriculumReviewContext,\n} from './curriculum-review-context';\nimport StartReview from './start-review';\nimport CompleteReview from './complete-review';\nimport ReviewQuestion from './ReviewQuestion';\n \nfunction CurriculumReviewStepsInner(): React.ReactNode {\n const {\n formik,\n step,\n handleStart,\n handleNext,\n handlePrev,\n onClickReviewMyAnswer,\n handleSubmit,\n currentQuestion,\n currentAnswer,\n currentError,\n reviewContents,\n handleAnswerChange,\n } = useCurriculumReviewContext();\n const { questions } = reviewContents;\n\n if (step === 0) {\n return <StartReview onStart={handleStart} />;\n }\n if (step > 0 && step <= questions.length && currentQuestion) {\n return (\n <ReviewQuestion\n answer={currentAnswer}\n error={currentError}\n index={step - 1}\n isLast={step === questions.length}\n isLoading={formik.isSubmitting}\n isNextDisabled={currentError !== undefined}\n onChange={handleAnswerChange}\n onNext={handleNext}\n onPrev={handlePrev}\n onSubmit={handleSubmit}\n question={currentQuestion}\n total={questions.length}\n />\n );\n }\n return <CompleteReview onClickReviewMyAnswer={onClickReviewMyAnswer} />;\n}\n\ninterface CurriculumReviewStepsProps {\n contents: CurriculumReviewContents;\n title: string | undefined;\n onClickEndReview: () => void;\n onSubmit: (values: Record<string, string>) => Promise<boolean>;\n defaultValues?: Record<string, string>;\n curriculum: Curriculum;\n onReviewValueChange: ({\n reviewId,\n answer,\n }: {\n reviewId: string;\n answer: Record<string, string>;\n }) => void;\n mode: 'edit' | 'create';\n done: boolean; \n}\n\nfunction CurriculumReviewSteps({\n contents,\n title,\n onClickEndReview,\n onSubmit,\n defaultValues,\n curriculum,\n onReviewValueChange,\n mode,\n done,\n}: CurriculumReviewStepsProps): React.ReactNode { \n\n return (\n <CurriculumReviewProvider\n curriculum={curriculum}\n defaultValues={defaultValues}\n done={done}\n mode={mode}\n onClickEndReview={onClickEndReview}\n onReviewValueChange={onReviewValueChange}\n onSubmit={onSubmit}\n reviewContents={contents}\n sectionTitle={title}\n >\n <CurriculumReviewStepsInner />\n </CurriculumReviewProvider>\n );\n}\n\nexport default CurriculumReviewSteps;\n"],"mappings":";;;;;;;;;;;;;;;AA6BW;AAlBX,SAAS,6BAA8C;AACrD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,2BAA2B;AAC/B,QAAM,EAAE,UAAU,IAAI;AAEtB,MAAI,SAAS,GAAG;AACd,WAAO,oBAAC,wBAAY,SAAS,aAAa;AAAA,EAC5C;AACA,MAAI,OAAO,KAAK,QAAQ,UAAU,UAAU,iBAAiB;AAC3D,WACE;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,OAAO,OAAO;AAAA,QACd,QAAQ,SAAS,UAAU;AAAA,QAC3B,WAAW,OAAO;AAAA,QAClB,gBAAgB,iBAAiB;AAAA,QACjC,UAAU;AAAA,QACV,QAAQ;AAAA,QACR,QAAQ;AAAA,QACR,UAAU;AAAA,QACV,UAAU;AAAA,QACV,OAAO,UAAU;AAAA;AAAA,IACnB;AAAA,EAEJ;AACA,SAAO,oBAAC,2BAAe,uBAA8C;AACvE;AAoBA,SAAS,sBAAsB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAgD;AAE9C,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,gBAAgB;AAAA,MAChB,cAAc;AAAA,MAEd,8BAAC,8BAA2B;AAAA;AAAA,EAC9B;AAEJ;AAEA,IAAO,gCAAQ;","names":[]}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Dialog
|
|
3
|
+
} from "./chunk-AH4A53SZ.js";
|
|
4
|
+
import {
|
|
5
|
+
Flex
|
|
6
|
+
} from "./chunk-25HMMI7R.js";
|
|
7
|
+
import {
|
|
8
|
+
Button
|
|
9
|
+
} from "./chunk-ZVDAEY5Q.js";
|
|
10
|
+
import {
|
|
11
|
+
AspectRatio
|
|
12
|
+
} from "./chunk-EAXUQEO5.js";
|
|
13
|
+
|
|
14
|
+
// src/molecules/training-info-guideline.tsx
|
|
15
|
+
import { useState } from "react";
|
|
16
|
+
import { FileTextIcon, VideoIcon } from "@radix-ui/react-icons";
|
|
17
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
18
|
+
function TrainingInfoGuideline({
|
|
19
|
+
values,
|
|
20
|
+
onClickFileDownload
|
|
21
|
+
}) {
|
|
22
|
+
return /* @__PURE__ */ jsx(Flex, { direction: "column", gap: "4", children: values.map((value) => /* @__PURE__ */ jsx(
|
|
23
|
+
TrainingInfoGuidelineItem,
|
|
24
|
+
{
|
|
25
|
+
onClickFileDownload,
|
|
26
|
+
value
|
|
27
|
+
},
|
|
28
|
+
getItemKey(value)
|
|
29
|
+
)) });
|
|
30
|
+
}
|
|
31
|
+
function getItemKey(value) {
|
|
32
|
+
return value.url;
|
|
33
|
+
}
|
|
34
|
+
function TrainingInfoGuidelineItem({
|
|
35
|
+
value,
|
|
36
|
+
onClickFileDownload
|
|
37
|
+
}) {
|
|
38
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
39
|
+
if (value.type === "file") {
|
|
40
|
+
return /* @__PURE__ */ jsxs(
|
|
41
|
+
Button,
|
|
42
|
+
{
|
|
43
|
+
onClick: () => {
|
|
44
|
+
onClickFileDownload({ url: value.url, filename: value.filename });
|
|
45
|
+
},
|
|
46
|
+
variant: "surface",
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ jsx(FileTextIcon, {}),
|
|
49
|
+
value.downloadButtonName
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
if (value.type === "video") {
|
|
55
|
+
return /* @__PURE__ */ jsxs(Dialog.Root, { children: [
|
|
56
|
+
/* @__PURE__ */ jsx(Dialog.Trigger, { children: /* @__PURE__ */ jsxs(Button, { variant: "surface", children: [
|
|
57
|
+
/* @__PURE__ */ jsx(VideoIcon, {}),
|
|
58
|
+
value.videoTitle
|
|
59
|
+
] }) }),
|
|
60
|
+
/* @__PURE__ */ jsx(Dialog.Content, { height: "100%", maxHeight: "500px", maxWidth: "800px", title: value.videoTitle, width: "100%", children: /* @__PURE__ */ jsx(AspectRatio, { ratio: 16 / 9, style: { width: "100%" }, children: /* @__PURE__ */ jsx(
|
|
61
|
+
"iframe",
|
|
62
|
+
{
|
|
63
|
+
allowFullScreen: true,
|
|
64
|
+
onLoad: () => {
|
|
65
|
+
setIsLoading(false);
|
|
66
|
+
},
|
|
67
|
+
src: `${url}?theme=light`,
|
|
68
|
+
style: { width: "100%", height: "100%", border: "none" },
|
|
69
|
+
title: "Curriculum Video",
|
|
70
|
+
onError: () => {
|
|
71
|
+
setIsLoading(false);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
) }) })
|
|
75
|
+
] });
|
|
76
|
+
}
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export {
|
|
81
|
+
TrainingInfoGuideline
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=chunk-UK7J2BOO.js.map
|