@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 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/training-info-guideline.tsx"],"sourcesContent":["import React, { useState } 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 const [isLoading, setIsLoading] = useState(true);\n \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='500px' maxWidth='800px' title={value.videoTitle} width=\"100%\">\n <AspectRatio ratio={16 / 9} style={{ width: '100%' }}>\n \n <iframe\n allowFullScreen\n onLoad={() => {\n setIsLoading(false);\n }}\n src={`${url}?theme=light`}\n style={{ width: '100%', height: '100%', border: 'none' }}\n title=\"Curriculum Video\"\n onError={() => {\n setIsLoading(false);\n }} // 필요시 에러 메시지로 대체\n /> \n </AspectRatio>\n </Dialog.Content>\n </Dialog.Root>\n );\n }\n return null;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAgB,gBAAgB;AAChC,SAAS,cAAc,iBAAiB;AAmBhC,cA8BF,YA9BE;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,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,IAAI;AAE/C,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,GAEvD;AAAA,QAAC;AAAA;AAAA,UACC,iBAAe;AAAA,UACf,QAAQ,MAAM;AACZ,yBAAa,KAAK;AAAA,UACpB;AAAA,UACA,KAAK,GAAG,GAAG;AAAA,UACX,OAAO,EAAE,OAAO,QAAQ,QAAQ,QAAQ,QAAQ,OAAO;AAAA,UACvD,OAAM;AAAA,UACN,SAAS,MAAM;AACb,yBAAa,KAAK;AAAA,UACpB;AAAA;AAAA,MACF,GACI,GACF;AAAA,OACF;AAAA,EAEJ;AACA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import {
|
|
2
|
+
review_question_text_default
|
|
3
|
+
} from "./chunk-PF3LVPOZ.js";
|
|
4
|
+
import {
|
|
5
|
+
review_question_radio_default
|
|
6
|
+
} from "./chunk-OILH5J7Q.js";
|
|
7
|
+
import {
|
|
8
|
+
review_question_satisfaction_option_default
|
|
9
|
+
} from "./chunk-NTJLECYY.js";
|
|
10
|
+
import {
|
|
11
|
+
ReviewQuestionSatisfisText
|
|
12
|
+
} from "./chunk-W7TBPRHG.js";
|
|
13
|
+
|
|
14
|
+
// src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.tsx
|
|
15
|
+
import { jsx } from "react/jsx-runtime";
|
|
16
|
+
function ReviewQuestionBody(props) {
|
|
17
|
+
const { question, answer, error, onChange } = props;
|
|
18
|
+
if (question.type === "question_radio") {
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
20
|
+
review_question_radio_default,
|
|
21
|
+
{
|
|
22
|
+
answer,
|
|
23
|
+
error,
|
|
24
|
+
onChange,
|
|
25
|
+
question
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
if (question.type === "question_text") {
|
|
30
|
+
return /* @__PURE__ */ jsx(
|
|
31
|
+
review_question_text_default,
|
|
32
|
+
{
|
|
33
|
+
answer,
|
|
34
|
+
error,
|
|
35
|
+
onChange,
|
|
36
|
+
question
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
if (question.type === "question_satisfaction_option") {
|
|
41
|
+
return /* @__PURE__ */ jsx(
|
|
42
|
+
review_question_satisfaction_option_default,
|
|
43
|
+
{
|
|
44
|
+
answer,
|
|
45
|
+
error,
|
|
46
|
+
onChange,
|
|
47
|
+
question
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
if (question.type === "question_satisfaction_text") {
|
|
52
|
+
return /* @__PURE__ */ jsx(
|
|
53
|
+
ReviewQuestionSatisfisText,
|
|
54
|
+
{
|
|
55
|
+
answer,
|
|
56
|
+
error,
|
|
57
|
+
onChange,
|
|
58
|
+
question
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
var review_question_body_default = ReviewQuestionBody;
|
|
65
|
+
|
|
66
|
+
export {
|
|
67
|
+
review_question_body_default
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=chunk-V4GNPLLT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.tsx"],"sourcesContent":["import React from 'react'; \nimport type { ReviewQuestionElement } from '@/types/curriculum.type';\nimport ReviewQuestionRadio from './review-question-radio';\nimport ReviewQuestionText from './review-question-text';\nimport ReviewQuestionSatisfactionOption from './review-question-satisfaction-option';\nimport ReviewQuestionSatisfactionText from './review-question-satisfaction-text';\n\ninterface ReviewQuestionBodyProps {\n question: ReviewQuestionElement;\n answer: string;\n error?: string;\n onChange: (value: string) => void;\n}\n\nfunction ReviewQuestionBody(props: ReviewQuestionBodyProps): React.ReactNode {\n const { question, answer, error, onChange } = props;\n \n if (question.type === 'question_radio') {\n return (\n <ReviewQuestionRadio\n answer={answer}\n error={error}\n onChange={onChange}\n question={question}\n />\n );\n }\n if (question.type === 'question_text') {\n return (\n <ReviewQuestionText\n answer={answer}\n error={error}\n onChange={onChange}\n question={question}\n />\n );\n }\n if (question.type === 'question_satisfaction_option') {\n return (\n <ReviewQuestionSatisfactionOption\n answer={answer}\n error={error}\n onChange={onChange}\n question={question}\n />\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- 그 외의 타입이 있을 경우 있음\n if (question.type === 'question_satisfaction_text') {\n return (\n <ReviewQuestionSatisfactionText\n answer={answer}\n error={error}\n onChange={onChange}\n question={question}\n />\n );\n }\n\n return null;\n}\nexport default ReviewQuestionBody;\n"],"mappings":";;;;;;;;;;;;;;AAmBM;AALN,SAAS,mBAAmB,OAAiD;AAC3E,QAAM,EAAE,UAAU,QAAQ,OAAO,SAAS,IAAI;AAE9C,MAAI,SAAS,SAAS,kBAAkB;AACtC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,EAEJ;AACA,MAAI,SAAS,SAAS,iBAAiB;AACrC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,EAEJ;AACA,MAAI,SAAS,SAAS,gCAAgC;AACpD,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,EAEJ;AAGA,MAAI,SAAS,SAAS,8BAA8B;AAClD,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,EAEJ;AAEA,SAAO;AACT;AACA,IAAO,+BAAQ;","names":[]}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EditServiceType
|
|
3
|
+
} from "./chunk-K2ATYWTQ.js";
|
|
4
|
+
import {
|
|
5
|
+
EditCoachingTime
|
|
6
|
+
} from "./chunk-2HNIO3ZS.js";
|
|
7
|
+
import {
|
|
8
|
+
Grid
|
|
9
|
+
} from "./chunk-EGEQY3KT.js";
|
|
10
|
+
import {
|
|
11
|
+
DataList
|
|
12
|
+
} from "./chunk-VTJZMOSP.js";
|
|
13
|
+
import {
|
|
14
|
+
Dialog
|
|
15
|
+
} from "./chunk-AH4A53SZ.js";
|
|
16
|
+
import {
|
|
17
|
+
Heading
|
|
18
|
+
} from "./chunk-BESTU2AY.js";
|
|
19
|
+
import {
|
|
20
|
+
Card
|
|
21
|
+
} from "./chunk-RP2RGCAW.js";
|
|
22
|
+
import {
|
|
23
|
+
BulletText
|
|
24
|
+
} from "./chunk-Z34HR7RE.js";
|
|
25
|
+
import {
|
|
26
|
+
Flex
|
|
27
|
+
} from "./chunk-25HMMI7R.js";
|
|
28
|
+
import {
|
|
29
|
+
Button
|
|
30
|
+
} from "./chunk-ZVDAEY5Q.js";
|
|
31
|
+
import {
|
|
32
|
+
Pencil1Icon
|
|
33
|
+
} from "./chunk-W5TPOFOO.js";
|
|
34
|
+
import {
|
|
35
|
+
__objRest,
|
|
36
|
+
__spreadProps,
|
|
37
|
+
__spreadValues
|
|
38
|
+
} from "./chunk-CRTRMMJ7.js";
|
|
39
|
+
|
|
40
|
+
// src/app/platform/session-card.tsx
|
|
41
|
+
import { useCallback, useMemo } from "react";
|
|
42
|
+
import { format } from "date-fns";
|
|
43
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
44
|
+
var preventDefault = (e) => {
|
|
45
|
+
e.preventDefault();
|
|
46
|
+
};
|
|
47
|
+
function SessionCard(props) {
|
|
48
|
+
const _a = props, {
|
|
49
|
+
sessionNumber,
|
|
50
|
+
userName,
|
|
51
|
+
error,
|
|
52
|
+
ExtraButtons,
|
|
53
|
+
TitleExtra,
|
|
54
|
+
editable,
|
|
55
|
+
onSaveDate,
|
|
56
|
+
onSaveSessionType,
|
|
57
|
+
startAt,
|
|
58
|
+
endAt,
|
|
59
|
+
sessionType
|
|
60
|
+
} = _a, rest = __objRest(_a, [
|
|
61
|
+
"sessionNumber",
|
|
62
|
+
"userName",
|
|
63
|
+
"error",
|
|
64
|
+
"ExtraButtons",
|
|
65
|
+
"TitleExtra",
|
|
66
|
+
"editable",
|
|
67
|
+
"onSaveDate",
|
|
68
|
+
"onSaveSessionType",
|
|
69
|
+
"startAt",
|
|
70
|
+
"endAt",
|
|
71
|
+
"sessionType"
|
|
72
|
+
]);
|
|
73
|
+
const renderEditButton = useCallback(() => {
|
|
74
|
+
return /* @__PURE__ */ jsx(Button, { color: "gray", ml: "2", variant: "transparent", children: /* @__PURE__ */ jsx(Pencil1Icon, {}) });
|
|
75
|
+
}, []);
|
|
76
|
+
const sessionTimeStr = useMemo(() => {
|
|
77
|
+
if (!startAt || !endAt) return "\uC54C \uC218 \uC5C6\uC74C";
|
|
78
|
+
return `${format(startAt, "yyyy\uB144 MM\uC6D4 dd\uC77C HH\uC2DC mm\uBD84")} ~ ${format(endAt, "HH\uC2DC mm\uBD84")}`;
|
|
79
|
+
}, [startAt, endAt]);
|
|
80
|
+
return /* @__PURE__ */ jsx(Card, __spreadProps(__spreadValues({ error: Boolean(error) }, rest), { children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "3", children: [
|
|
81
|
+
/* @__PURE__ */ jsxs(Flex, { align: "center", width: "100%", children: [
|
|
82
|
+
/* @__PURE__ */ jsx(Heading, { variant: "heading4", children: `${userName || "\uC54C \uC218 \uC5C6\uC74C"}\uB2D8 ${sessionNumber || "-"}\uD68C\uCC28` }),
|
|
83
|
+
TitleExtra,
|
|
84
|
+
error ? /* @__PURE__ */ jsx(BulletText, { as: "p", color: "red", variant: "caption", children: error }) : null
|
|
85
|
+
] }),
|
|
86
|
+
/* @__PURE__ */ jsxs(DataList.Root, { children: [
|
|
87
|
+
/* @__PURE__ */ jsxs(DataList.Item, { children: [
|
|
88
|
+
/* @__PURE__ */ jsx(DataList.Label, { children: "\uCF54\uCE6D \uC77C\uC2DC" }),
|
|
89
|
+
/* @__PURE__ */ jsxs(DataList.Value, { children: [
|
|
90
|
+
sessionTimeStr,
|
|
91
|
+
editable ? /* @__PURE__ */ jsxs(Dialog.Root, { children: [
|
|
92
|
+
/* @__PURE__ */ jsx(Dialog.Trigger, { children: renderEditButton() }),
|
|
93
|
+
/* @__PURE__ */ jsx(
|
|
94
|
+
Dialog.Content,
|
|
95
|
+
{
|
|
96
|
+
onOpenAutoFocus: preventDefault,
|
|
97
|
+
style: { overflow: "visible" },
|
|
98
|
+
title: `${sessionNumber}\uD68C\uCC28 \uC138\uC158 \uC77C\uC2DC \uBCC0\uACBD\uD558\uAE30`,
|
|
99
|
+
children: /* @__PURE__ */ jsx(
|
|
100
|
+
EditCoachingTime,
|
|
101
|
+
{
|
|
102
|
+
defaultEndAt: endAt,
|
|
103
|
+
defaultStartAt: startAt,
|
|
104
|
+
onClickSave: onSaveDate
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
}
|
|
108
|
+
)
|
|
109
|
+
] }) : null
|
|
110
|
+
] })
|
|
111
|
+
] }),
|
|
112
|
+
/* @__PURE__ */ jsxs(Grid, { columns: { initial: "1", xs: "2" }, style: { gap: "inherit" }, children: [
|
|
113
|
+
/* @__PURE__ */ jsxs(DataList.Item, { children: [
|
|
114
|
+
/* @__PURE__ */ jsx(DataList.Label, { children: "\uC138\uC158 \uCC38\uC5EC \uBC29\uC2DD" }),
|
|
115
|
+
/* @__PURE__ */ jsxs(DataList.Value, { children: [
|
|
116
|
+
sessionType === "offlineCoaching" ? "\uC624\uD504\uB77C\uC778" : "\uC628\uB77C\uC778",
|
|
117
|
+
editable ? /* @__PURE__ */ jsxs(Dialog.Root, { children: [
|
|
118
|
+
/* @__PURE__ */ jsx(Dialog.Trigger, { children: renderEditButton() }),
|
|
119
|
+
/* @__PURE__ */ jsx(
|
|
120
|
+
Dialog.Content,
|
|
121
|
+
{
|
|
122
|
+
title: `${sessionNumber}\uD68C\uCC28 \uC138\uC158 \uC9C4\uD589 \uBC29\uC2DD \uBCC0\uACBD\uD558\uAE30`,
|
|
123
|
+
children: /* @__PURE__ */ jsx(
|
|
124
|
+
EditServiceType,
|
|
125
|
+
{
|
|
126
|
+
defaultServiceType: sessionType,
|
|
127
|
+
onClickSave: onSaveSessionType
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
}
|
|
131
|
+
)
|
|
132
|
+
] }) : null
|
|
133
|
+
] })
|
|
134
|
+
] }),
|
|
135
|
+
/* @__PURE__ */ jsx(Flex, { gap: "2", justify: "end", children: ExtraButtons })
|
|
136
|
+
] })
|
|
137
|
+
] })
|
|
138
|
+
] }) }));
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export {
|
|
142
|
+
SessionCard
|
|
143
|
+
};
|
|
144
|
+
//# sourceMappingURL=chunk-VKMRA55P.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/app/platform/session-card.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from 'react';\nimport { format } from 'date-fns';\nimport type { ServiceType } from '@/types/biz.type';\nimport type { CardProps } from '../../atoms';\nimport {\n BulletText,\n Button,\n Card,\n DataList,\n Dialog,\n Flex,\n Grid,\n Heading,\n} from '../../atoms';\nimport { Pencil1Icon } from '../../icon';\nimport { EditCoachingTime } from './edit-coaching-time';\nimport { EditServiceType } from './edit-service-type';\n\nconst preventDefault = (e: Event): void => {\n e.preventDefault();\n};\nexport type SessionCardProps = Omit<CardProps, 'error'> & {\n error?: string;\n startAt?: Date;\n endAt?: Date;\n sessionType?: ServiceType;\n userName?: string;\n sessionNumber?: number;\n ExtraButtons?: React.ReactNode;\n editable?: boolean;\n TitleExtra?: React.ReactNode;\n onSaveDate?: (startTime: Date, endTime: Date) => void;\n onSaveSessionType?: (sessionType: string) => void;\n};\n\nexport function SessionCard(props: SessionCardProps): React.ReactNode {\n const {\n sessionNumber,\n userName,\n error,\n ExtraButtons,\n TitleExtra,\n editable,\n onSaveDate,\n onSaveSessionType,\n startAt,\n endAt,\n sessionType,\n ...rest\n } = props;\n\n const renderEditButton = useCallback((): React.ReactNode => {\n return (\n <Button color=\"gray\" ml=\"2\" variant=\"transparent\">\n <Pencil1Icon />\n </Button>\n );\n }, []);\n\n const sessionTimeStr = useMemo(() => {\n if (!startAt || !endAt) return '알 수 없음';\n\n return `${format(startAt, 'yyyy년 MM월 dd일 HH시 mm분')} ~ ${format(endAt, 'HH시 mm분')}`;\n }, [startAt, endAt]);\n\n return (\n <Card error={Boolean(error)} {...rest}>\n <Flex direction=\"column\" gap=\"3\">\n <Flex align=\"center\" width=\"100%\">\n <Heading variant=\"heading4\">\n {`${userName || '알 수 없음'}님 ${sessionNumber || '-'}회차`}\n </Heading>\n {TitleExtra}\n {error ? (\n <BulletText as=\"p\" color=\"red\" variant=\"caption\">\n {error}\n </BulletText>\n ) : null}\n </Flex>\n <DataList.Root>\n <DataList.Item>\n <DataList.Label>코칭 일시</DataList.Label>\n <DataList.Value>\n {sessionTimeStr}\n {editable ? (\n <Dialog.Root>\n <Dialog.Trigger>{renderEditButton()}</Dialog.Trigger>\n <Dialog.Content\n onOpenAutoFocus={preventDefault}\n style={{ overflow: 'visible' }}\n title={`${sessionNumber}회차 세션 일시 변경하기`}\n >\n <EditCoachingTime\n defaultEndAt={endAt}\n defaultStartAt={startAt}\n onClickSave={onSaveDate}\n />\n </Dialog.Content>\n </Dialog.Root>\n ) : null}\n </DataList.Value>\n </DataList.Item>\n <Grid columns={{ initial: '1', xs: '2' }} style={{ gap: 'inherit' }}>\n <DataList.Item>\n <DataList.Label>세션 참여 방식</DataList.Label>\n <DataList.Value>\n {sessionType === 'offlineCoaching' ? '오프라인' : '온라인'}\n {editable ? (\n <Dialog.Root>\n <Dialog.Trigger>{renderEditButton()}</Dialog.Trigger>\n <Dialog.Content\n title={`${sessionNumber}회차 세션 진행 방식 변경하기`}\n >\n <EditServiceType\n defaultServiceType={sessionType}\n onClickSave={onSaveSessionType}\n />\n </Dialog.Content>\n </Dialog.Root>\n ) : null}\n </DataList.Value>\n </DataList.Item>\n\n <Flex gap=\"2\" justify=\"end\">\n {ExtraButtons}\n </Flex>\n </Grid>\n </DataList.Root>\n </Flex>\n </Card>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,aAAa,eAAe;AAC5C,SAAS,cAAc;AAqDf,cAcA,YAdA;AApCR,IAAM,iBAAiB,CAAC,MAAmB;AACzC,IAAE,eAAe;AACnB;AAeO,SAAS,YAAY,OAA0C;AACpE,QAaI,YAZF;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EA/CJ,IAiDM,IADC,iBACD,IADC;AAAA,IAXH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAIF,QAAM,mBAAmB,YAAY,MAAuB;AAC1D,WACE,oBAAC,UAAO,OAAM,QAAO,IAAG,KAAI,SAAQ,eAClC,8BAAC,eAAY,GACf;AAAA,EAEJ,GAAG,CAAC,CAAC;AAEL,QAAM,iBAAiB,QAAQ,MAAM;AACnC,QAAI,CAAC,WAAW,CAAC,MAAO,QAAO;AAE/B,WAAO,GAAG,OAAO,SAAS,gDAAuB,CAAC,MAAM,OAAO,OAAO,mBAAS,CAAC;AAAA,EAClF,GAAG,CAAC,SAAS,KAAK,CAAC;AAEnB,SACE,oBAAC,qCAAK,OAAO,QAAQ,KAAK,KAAO,OAAhC,EACC,+BAAC,QAAK,WAAU,UAAS,KAAI,KAC3B;AAAA,yBAAC,QAAK,OAAM,UAAS,OAAM,QACzB;AAAA,0BAAC,WAAQ,SAAQ,YACd,aAAG,YAAY,4BAAQ,UAAK,iBAAiB,GAAG,gBACnD;AAAA,MACC;AAAA,MACA,QACC,oBAAC,cAAW,IAAG,KAAI,OAAM,OAAM,SAAQ,WACpC,iBACH,IACE;AAAA,OACN;AAAA,IACA,qBAAC,SAAS,MAAT,EACC;AAAA,2BAAC,SAAS,MAAT,EACC;AAAA,4BAAC,SAAS,OAAT,EAAe,uCAAK;AAAA,QACrB,qBAAC,SAAS,OAAT,EACE;AAAA;AAAA,UACA,WACC,qBAAC,OAAO,MAAP,EACC;AAAA,gCAAC,OAAO,SAAP,EAAgB,2BAAiB,GAAE;AAAA,YACpC;AAAA,cAAC,OAAO;AAAA,cAAP;AAAA,gBACC,iBAAiB;AAAA,gBACjB,OAAO,EAAE,UAAU,UAAU;AAAA,gBAC7B,OAAO,GAAG,aAAa;AAAA,gBAEvB;AAAA,kBAAC;AAAA;AAAA,oBACC,cAAc;AAAA,oBACd,gBAAgB;AAAA,oBAChB,aAAa;AAAA;AAAA,gBACf;AAAA;AAAA,YACF;AAAA,aACF,IACE;AAAA,WACN;AAAA,SACF;AAAA,MACA,qBAAC,QAAK,SAAS,EAAE,SAAS,KAAK,IAAI,IAAI,GAAG,OAAO,EAAE,KAAK,UAAU,GAChE;AAAA,6BAAC,SAAS,MAAT,EACC;AAAA,8BAAC,SAAS,OAAT,EAAe,oDAAQ;AAAA,UACxB,qBAAC,SAAS,OAAT,EACE;AAAA,4BAAgB,oBAAoB,6BAAS;AAAA,YAC7C,WACC,qBAAC,OAAO,MAAP,EACC;AAAA,kCAAC,OAAO,SAAP,EAAgB,2BAAiB,GAAE;AAAA,cACpC;AAAA,gBAAC,OAAO;AAAA,gBAAP;AAAA,kBACC,OAAO,GAAG,aAAa;AAAA,kBAEvB;AAAA,oBAAC;AAAA;AAAA,sBACC,oBAAoB;AAAA,sBACpB,aAAa;AAAA;AAAA,kBACf;AAAA;AAAA,cACF;AAAA,eACF,IACE;AAAA,aACN;AAAA,WACF;AAAA,QAEA,oBAAC,QAAK,KAAI,KAAI,SAAQ,OACnB,wBACH;AAAA,SACF;AAAA,OACF;AAAA,KACF,IACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-VLGR5PZX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -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, { variant: "surface", children: [
|
|
38
|
+
/* @__PURE__ */ jsx(VideoIcon, {}),
|
|
39
|
+
value.videoTitle
|
|
40
|
+
] }) }),
|
|
41
|
+
/* @__PURE__ */ jsx(Dialog.Content, { title: value.videoTitle, children: /* @__PURE__ */ jsx("video", { controls: true, src: value.url, children: /* @__PURE__ */ jsx("track", { kind: "captions", label: "Korean captions", srcLang: "ko" }) }) })
|
|
42
|
+
] });
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export {
|
|
48
|
+
TrainingInfoGuideline
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=chunk-VQGBP3JY.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 variant=\"surface\">\n <VideoIcon />\n {value.videoTitle}\n </Button>\n </Dialog.Trigger>\n <Dialog.Content title={value.videoTitle}>\n <video controls src={value.url}>\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,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,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,KACzB,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-AZ2ZKABM.js";
|
|
4
|
+
import {
|
|
5
|
+
curriculum_file_download_default
|
|
6
|
+
} from "./chunk-PEFP2QUH.js";
|
|
7
|
+
import {
|
|
8
|
+
curriculum_review_default
|
|
9
|
+
} from "./chunk-ODHH7CFR.js";
|
|
10
|
+
import {
|
|
11
|
+
curriculum_video_default
|
|
12
|
+
} from "./chunk-QGKQ3IX7.js";
|
|
13
|
+
import {
|
|
14
|
+
useCurriculumContext
|
|
15
|
+
} from "./chunk-Y7SJF3Y3.js";
|
|
16
|
+
import {
|
|
17
|
+
Flex
|
|
18
|
+
} from "./chunk-25HMMI7R.js";
|
|
19
|
+
import {
|
|
20
|
+
InfoCircledIcon
|
|
21
|
+
} from "./chunk-W5TPOFOO.js";
|
|
22
|
+
import {
|
|
23
|
+
Typo
|
|
24
|
+
} from "./chunk-PMJIFLDT.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-WV4WWBKN.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,69 @@
|
|
|
1
|
+
import {
|
|
2
|
+
review_question_text_default
|
|
3
|
+
} from "./chunk-QBX3N5H3.js";
|
|
4
|
+
import {
|
|
5
|
+
review_question_radio_default
|
|
6
|
+
} from "./chunk-GXG26SHU.js";
|
|
7
|
+
import {
|
|
8
|
+
review_question_satisfaction_option_default
|
|
9
|
+
} from "./chunk-JFJ3N4V5.js";
|
|
10
|
+
import {
|
|
11
|
+
ReviewQuestionSatisfisText
|
|
12
|
+
} from "./chunk-W7TBPRHG.js";
|
|
13
|
+
|
|
14
|
+
// src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.tsx
|
|
15
|
+
import { jsx } from "react/jsx-runtime";
|
|
16
|
+
function ReviewQuestionBody(props) {
|
|
17
|
+
const { question, answer, error, onChange } = props;
|
|
18
|
+
if (question.type === "question_radio") {
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
20
|
+
review_question_radio_default,
|
|
21
|
+
{
|
|
22
|
+
answer,
|
|
23
|
+
error,
|
|
24
|
+
onChange,
|
|
25
|
+
question
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
if (question.type === "question_text") {
|
|
30
|
+
return /* @__PURE__ */ jsx(
|
|
31
|
+
review_question_text_default,
|
|
32
|
+
{
|
|
33
|
+
answer,
|
|
34
|
+
error,
|
|
35
|
+
onChange,
|
|
36
|
+
question
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
if (question.type === "question_satisfaction_option") {
|
|
41
|
+
return /* @__PURE__ */ jsx(
|
|
42
|
+
review_question_satisfaction_option_default,
|
|
43
|
+
{
|
|
44
|
+
answer,
|
|
45
|
+
error,
|
|
46
|
+
onChange,
|
|
47
|
+
question
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
if (question.type === "question_satisfaction_text") {
|
|
52
|
+
return /* @__PURE__ */ jsx(
|
|
53
|
+
ReviewQuestionSatisfisText,
|
|
54
|
+
{
|
|
55
|
+
answer,
|
|
56
|
+
error,
|
|
57
|
+
onChange,
|
|
58
|
+
question
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
var review_question_body_default = ReviewQuestionBody;
|
|
65
|
+
|
|
66
|
+
export {
|
|
67
|
+
review_question_body_default
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=chunk-X3J2UNWS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.tsx"],"sourcesContent":["import React from 'react'; \nimport type { ReviewQuestionElement } from '@/types/curriculum.type';\nimport ReviewQuestionRadio from './review-question-radio';\nimport ReviewQuestionText from './review-question-text';\nimport ReviewQuestionSatisfactionOption from './review-question-satisfaction-option';\nimport ReviewQuestionSatisfactionText from './review-question-satisfaction-text';\n\ninterface ReviewQuestionBodyProps {\n question: ReviewQuestionElement;\n answer: string;\n error?: string;\n onChange: (value: string) => void;\n}\n\nfunction ReviewQuestionBody(props: ReviewQuestionBodyProps): React.ReactNode {\n const { question, answer, error, onChange } = props;\n \n if (question.type === 'question_radio') {\n return (\n <ReviewQuestionRadio\n answer={answer}\n error={error}\n onChange={onChange}\n question={question}\n />\n );\n }\n if (question.type === 'question_text') {\n return (\n <ReviewQuestionText\n answer={answer}\n error={error}\n onChange={onChange}\n question={question}\n />\n );\n }\n if (question.type === 'question_satisfaction_option') {\n return (\n <ReviewQuestionSatisfactionOption\n answer={answer}\n error={error}\n onChange={onChange}\n question={question}\n />\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- 그 외의 타입이 있을 경우 있음\n if (question.type === 'question_satisfaction_text') {\n return (\n <ReviewQuestionSatisfactionText\n answer={answer}\n error={error}\n onChange={onChange}\n question={question}\n />\n );\n }\n\n return null;\n}\nexport default ReviewQuestionBody;\n"],"mappings":";;;;;;;;;;;;;;AAmBM;AALN,SAAS,mBAAmB,OAAiD;AAC3E,QAAM,EAAE,UAAU,QAAQ,OAAO,SAAS,IAAI;AAE9C,MAAI,SAAS,SAAS,kBAAkB;AACtC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,EAEJ;AACA,MAAI,SAAS,SAAS,iBAAiB;AACrC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,EAEJ;AACA,MAAI,SAAS,SAAS,gCAAgC;AACpD,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,EAEJ;AAGA,MAAI,SAAS,SAAS,8BAA8B;AAClD,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,EAEJ;AAEA,SAAO;AACT;AACA,IAAO,+BAAQ;","names":[]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import {
|
|
2
|
+
review_question_text_default
|
|
3
|
+
} from "./chunk-NAPAD66S.js";
|
|
4
|
+
import {
|
|
5
|
+
review_question_radio_default
|
|
6
|
+
} from "./chunk-KMVSJT6Y.js";
|
|
7
|
+
import {
|
|
8
|
+
review_question_satisfaction_option_default
|
|
9
|
+
} from "./chunk-7I7PZF5L.js";
|
|
10
|
+
import {
|
|
11
|
+
ReviewQuestionSatisfisText
|
|
12
|
+
} from "./chunk-5V6MQUTB.js";
|
|
13
|
+
|
|
14
|
+
// src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.tsx
|
|
15
|
+
import { jsx } from "react/jsx-runtime";
|
|
16
|
+
function ReviewQuestionBody(props) {
|
|
17
|
+
const { question, answer, error, onChange } = props;
|
|
18
|
+
if (question.type === "question_radio") {
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
20
|
+
review_question_radio_default,
|
|
21
|
+
{
|
|
22
|
+
answer,
|
|
23
|
+
error,
|
|
24
|
+
onChange,
|
|
25
|
+
question
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
if (question.type === "question_text") {
|
|
30
|
+
return /* @__PURE__ */ jsx(
|
|
31
|
+
review_question_text_default,
|
|
32
|
+
{
|
|
33
|
+
answer,
|
|
34
|
+
error,
|
|
35
|
+
onChange,
|
|
36
|
+
question
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
if (question.type === "question_satisfaction_option") {
|
|
41
|
+
return /* @__PURE__ */ jsx(
|
|
42
|
+
review_question_satisfaction_option_default,
|
|
43
|
+
{
|
|
44
|
+
answer,
|
|
45
|
+
error,
|
|
46
|
+
onChange,
|
|
47
|
+
question
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
if (question.type === "question_satisfaction_text") {
|
|
52
|
+
return /* @__PURE__ */ jsx(
|
|
53
|
+
ReviewQuestionSatisfisText,
|
|
54
|
+
{
|
|
55
|
+
answer,
|
|
56
|
+
error,
|
|
57
|
+
onChange,
|
|
58
|
+
question
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
var review_question_body_default = ReviewQuestionBody;
|
|
65
|
+
|
|
66
|
+
export {
|
|
67
|
+
review_question_body_default
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=chunk-X67ER3JU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.tsx"],"sourcesContent":["import React from 'react'; \nimport type { ReviewQuestionElement } from '@/types/curriculum.type';\nimport ReviewQuestionRadio from './review-question-radio';\nimport ReviewQuestionText from './review-question-text';\nimport ReviewQuestionSatisfactionOption from './review-question-satisfaction-option';\nimport ReviewQuestionSatisfactionText from './review-question-satisfaction-text';\n\ninterface ReviewQuestionBodyProps {\n question: ReviewQuestionElement;\n answer: string;\n error?: string;\n onChange: (value: string) => void;\n}\n\nfunction ReviewQuestionBody(props: ReviewQuestionBodyProps): React.ReactNode {\n const { question, answer, error, onChange } = props;\n \n if (question.type === 'question_radio') {\n return (\n <ReviewQuestionRadio\n answer={answer}\n error={error}\n onChange={onChange}\n question={question}\n />\n );\n }\n if (question.type === 'question_text') {\n return (\n <ReviewQuestionText\n answer={answer}\n error={error}\n onChange={onChange}\n question={question}\n />\n );\n }\n if (question.type === 'question_satisfaction_option') {\n return (\n <ReviewQuestionSatisfactionOption\n answer={answer}\n error={error}\n onChange={onChange}\n question={question}\n />\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- 그 외의 타입이 있을 경우 있음\n if (question.type === 'question_satisfaction_text') {\n return (\n <ReviewQuestionSatisfactionText\n answer={answer}\n error={error}\n onChange={onChange}\n question={question}\n />\n );\n }\n\n return null;\n}\nexport default ReviewQuestionBody;\n"],"mappings":";;;;;;;;;;;;;;AAmBM;AALN,SAAS,mBAAmB,OAAiD;AAC3E,QAAM,EAAE,UAAU,QAAQ,OAAO,SAAS,IAAI;AAE9C,MAAI,SAAS,SAAS,kBAAkB;AACtC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,EAEJ;AACA,MAAI,SAAS,SAAS,iBAAiB;AACrC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,EAEJ;AACA,MAAI,SAAS,SAAS,gCAAgC;AACpD,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,EAEJ;AAGA,MAAI,SAAS,SAAS,8BAA8B;AAClD,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,EAEJ;AAEA,SAAO;AACT;AACA,IAAO,+BAAQ;","names":[]}
|
|
@@ -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", { controls: true, src: value.url, children: /* @__PURE__ */ jsx("track", { kind: "captions", label: "Korean captions", srcLang: "ko" }) }) })
|
|
42
|
+
] });
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export {
|
|
48
|
+
TrainingInfoGuideline
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=chunk-X732NUWY.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 controls src={value.url}>\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,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,UAAQ,MAAC,KAAK,MAAM,KACzB,8BAAC,WAAM,MAAK,YAAW,OAAM,mBAAkB,SAAQ,MAAK,GAC9D,GACF;AAAA,OACF;AAAA,EAEJ;AACA,SAAO;AACT;","names":[]}
|