@tipp/ui 2.3.21 → 2.3.23
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 +217 -195
- package/dist/app/index.cjs.map +1 -1
- package/dist/app/index.js +108 -102
- package/dist/app/platform/coach-question-list.cjs.map +1 -1
- package/dist/app/platform/coach-question-list.js +32 -32
- package/dist/app/platform/contents-card.cjs.map +1 -1
- package/dist/app/platform/contents-card.js +32 -32
- package/dist/app/platform/curriculum-card.cjs.map +1 -1
- package/dist/app/platform/curriculum-card.js +6 -6
- package/dist/app/platform/edit-coaching-time.cjs +47 -25
- package/dist/app/platform/edit-coaching-time.cjs.map +1 -1
- package/dist/app/platform/edit-coaching-time.js +83 -77
- package/dist/app/platform/edit-service-type.cjs +42 -20
- package/dist/app/platform/edit-service-type.cjs.map +1 -1
- package/dist/app/platform/edit-service-type.js +84 -78
- package/dist/app/platform/goal-manage-card-edit.cjs +50 -28
- package/dist/app/platform/goal-manage-card-edit.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-edit.js +83 -77
- package/dist/app/platform/goal-manage-card-read.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-read.js +32 -32
- package/dist/app/platform/on-offline-radio-card.cjs +77 -55
- package/dist/app/platform/on-offline-radio-card.cjs.map +1 -1
- package/dist/app/platform/on-offline-radio-card.js +83 -77
- package/dist/app/platform/report-card.cjs.map +1 -1
- package/dist/app/platform/report-card.js +32 -32
- package/dist/app/platform/reservation-card.cjs +66 -44
- package/dist/app/platform/reservation-card.cjs.map +1 -1
- package/dist/app/platform/reservation-card.js +84 -78
- package/dist/app/platform/session-card.cjs +92 -70
- package/dist/app/platform/session-card.cjs.map +1 -1
- package/dist/app/platform/session-card.js +86 -80
- package/dist/app/platform/session-review-simple-read.cjs.map +1 -1
- package/dist/app/platform/session-review-simple-read.js +32 -32
- package/dist/app/platform/userInfos/coaching-customer-info/index.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/index.js +37 -37
- package/dist/app/platform/userInfos/coaching-customer-info/large.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/large.js +32 -32
- package/dist/app/platform/userInfos/coaching-customer-info/medium.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/medium.js +32 -32
- package/dist/app/platform/userInfos/coaching-customer-info/small.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/small.js +32 -32
- package/dist/app/platform/userInfos/session-user-info-detail.cjs.map +1 -1
- package/dist/app/platform/userInfos/session-user-info-detail.js +32 -32
- package/dist/app/platform/userInfos/utils.cjs.map +1 -1
- package/dist/app/platform/userInfos/utils.js +31 -31
- 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.cjs.map +1 -1
- package/dist/atoms/index.js +63 -63
- package/dist/atoms/list.js +2 -2
- package/dist/atoms/pagination.cjs.map +1 -1
- package/dist/atoms/pagination.js +4 -4
- package/dist/chunk-2KOE33U7.js +245 -0
- package/dist/chunk-2KOE33U7.js.map +1 -0
- package/dist/chunk-2U5YD3BH.js +49 -0
- package/dist/chunk-2U5YD3BH.js.map +1 -0
- package/dist/chunk-2X3I7KDG.js +144 -0
- package/dist/chunk-2X3I7KDG.js.map +1 -0
- package/dist/chunk-2YSYS4AG.js +233 -0
- package/dist/chunk-2YSYS4AG.js.map +1 -0
- package/dist/chunk-35HQHUDU.js +228 -0
- package/dist/chunk-35HQHUDU.js.map +1 -0
- package/dist/chunk-3I55S6EP.js +89 -0
- package/dist/chunk-3I55S6EP.js.map +1 -0
- package/dist/chunk-3JDLAN5T.js +99 -0
- package/dist/chunk-3JDLAN5T.js.map +1 -0
- package/dist/chunk-3O2ARPTO.js +161 -0
- package/dist/chunk-3O2ARPTO.js.map +1 -0
- package/dist/chunk-3OO6ENQ4.js +228 -0
- package/dist/chunk-3OO6ENQ4.js.map +1 -0
- package/dist/chunk-45F3UCHR.js +222 -0
- package/dist/chunk-45F3UCHR.js.map +1 -0
- package/dist/chunk-45VET5EX.js +63 -0
- package/dist/chunk-45VET5EX.js.map +1 -0
- package/dist/chunk-4LUFF5LX.js +98 -0
- package/dist/chunk-4LUFF5LX.js.map +1 -0
- package/dist/chunk-4MA4T2XQ.js +222 -0
- package/dist/chunk-4MA4T2XQ.js.map +1 -0
- package/dist/chunk-4VV7VH5L.js +79 -0
- package/dist/chunk-4VV7VH5L.js.map +1 -0
- package/dist/chunk-5JCJ4QJO.js +245 -0
- package/dist/chunk-5JCJ4QJO.js.map +1 -0
- package/dist/chunk-5KZJMQCG.js +89 -0
- package/dist/chunk-5KZJMQCG.js.map +1 -0
- package/dist/chunk-5RAR3DG7.js +117 -0
- package/dist/chunk-5RAR3DG7.js.map +1 -0
- package/dist/chunk-5XOR7OPD.js +196 -0
- package/dist/chunk-5XOR7OPD.js.map +1 -0
- package/dist/chunk-5YESTYFF.js +79 -0
- package/dist/chunk-5YESTYFF.js.map +1 -0
- package/dist/chunk-62AHHT47.js +89 -0
- package/dist/chunk-62AHHT47.js.map +1 -0
- package/dist/chunk-64A2KJHN.js +276 -0
- package/dist/chunk-64A2KJHN.js.map +1 -0
- package/dist/chunk-6CSUU4L7.js +230 -0
- package/dist/chunk-6CSUU4L7.js.map +1 -0
- package/dist/chunk-6FKXUCHD.js +99 -0
- package/dist/chunk-6FKXUCHD.js.map +1 -0
- package/dist/chunk-6Q73GRZT.js +145 -0
- package/dist/chunk-6Q73GRZT.js.map +1 -0
- package/dist/chunk-6TQGX5ZU.js +98 -0
- package/dist/chunk-6TQGX5ZU.js.map +1 -0
- package/dist/chunk-6WGBQSQT.js +228 -0
- package/dist/chunk-6WGBQSQT.js.map +1 -0
- package/dist/chunk-6YZBHOXQ.js +226 -0
- package/dist/chunk-6YZBHOXQ.js.map +1 -0
- package/dist/chunk-7344ZPUM.js +117 -0
- package/dist/chunk-7344ZPUM.js.map +1 -0
- package/dist/chunk-7ABAJEJA.js +63 -0
- package/dist/chunk-7ABAJEJA.js.map +1 -0
- package/dist/chunk-7B5XAENQ.js +363 -0
- package/dist/chunk-7B5XAENQ.js.map +1 -0
- package/dist/chunk-7CQX7ELH.js +69 -0
- package/dist/chunk-7CQX7ELH.js.map +1 -0
- package/dist/chunk-7CRTGYJE.js +80 -0
- package/dist/chunk-7CRTGYJE.js.map +1 -0
- package/dist/chunk-7ITDAUWI.js +287 -0
- package/dist/chunk-7ITDAUWI.js.map +1 -0
- package/dist/chunk-7PQGETJT.js +69 -0
- package/dist/chunk-7PQGETJT.js.map +1 -0
- package/dist/chunk-7R65MUL6.js +106 -0
- package/dist/chunk-7R65MUL6.js.map +1 -0
- package/dist/chunk-7U5EZJOD.js +89 -0
- package/dist/chunk-7U5EZJOD.js.map +1 -0
- package/dist/chunk-7ZBZBOPI.js +63 -0
- package/dist/chunk-7ZBZBOPI.js.map +1 -0
- package/dist/chunk-A2FXUYSB.js +230 -0
- package/dist/chunk-A2FXUYSB.js.map +1 -0
- package/dist/chunk-A7CT5M2S.js +75 -0
- package/dist/chunk-A7CT5M2S.js.map +1 -0
- package/dist/chunk-A7JBBBBB.js +100 -0
- package/dist/chunk-A7JBBBBB.js.map +1 -0
- package/dist/chunk-AA6OYHCE.js +39 -0
- package/dist/chunk-AA6OYHCE.js.map +1 -0
- package/dist/chunk-ALETVN5F.js +245 -0
- package/dist/chunk-ALETVN5F.js.map +1 -0
- package/dist/chunk-ARJOCJVD.js +174 -0
- package/dist/chunk-ARJOCJVD.js.map +1 -0
- package/dist/chunk-ARVLB4CH.js +29 -0
- package/dist/chunk-ARVLB4CH.js.map +1 -0
- package/dist/chunk-B327EINU.js +43 -0
- package/dist/chunk-B327EINU.js.map +1 -0
- package/dist/chunk-B4NH4LIJ.js +99 -0
- package/dist/chunk-B4NH4LIJ.js.map +1 -0
- package/dist/chunk-B4TDMB52.js +226 -0
- package/dist/chunk-B4TDMB52.js.map +1 -0
- package/dist/chunk-BJZSGZ7H.js +63 -0
- package/dist/chunk-BJZSGZ7H.js.map +1 -0
- package/dist/chunk-BPMY3CDH.js +106 -0
- package/dist/chunk-BPMY3CDH.js.map +1 -0
- package/dist/chunk-C2ANXVMQ.js +221 -0
- package/dist/chunk-C2ANXVMQ.js.map +1 -0
- package/dist/chunk-C6BHVWJI.js +165 -0
- package/dist/chunk-C6BHVWJI.js.map +1 -0
- package/dist/chunk-CCLZRSGW.js +87 -0
- package/dist/chunk-CCLZRSGW.js.map +1 -0
- package/dist/chunk-CF3NAPUZ.js +196 -0
- package/dist/chunk-CF3NAPUZ.js.map +1 -0
- package/dist/chunk-CWRJOY56.js +245 -0
- package/dist/chunk-CWRJOY56.js.map +1 -0
- package/dist/chunk-D3H7YFTO.js +69 -0
- package/dist/chunk-D3H7YFTO.js.map +1 -0
- package/dist/chunk-DDAZ4IAG.js +689 -0
- package/dist/chunk-DDAZ4IAG.js.map +1 -0
- package/dist/chunk-DDVJMAYN.js +230 -0
- package/dist/chunk-DDVJMAYN.js.map +1 -0
- package/dist/chunk-DJ24574O.js +28 -0
- package/dist/chunk-DJ24574O.js.map +1 -0
- package/dist/chunk-DJCBLRLH.js +69 -0
- package/dist/chunk-DJCBLRLH.js.map +1 -0
- package/dist/chunk-DTHR4ABO.js +69 -0
- package/dist/chunk-DTHR4ABO.js.map +1 -0
- package/dist/chunk-DTK646M6.js +87 -0
- package/dist/chunk-DTK646M6.js.map +1 -0
- package/dist/chunk-DVZKRKWH.js +174 -0
- package/dist/chunk-DVZKRKWH.js.map +1 -0
- package/dist/chunk-E232GTT6.js +69 -0
- package/dist/chunk-E232GTT6.js.map +1 -0
- package/dist/chunk-EGTOU5MK.js +689 -0
- package/dist/chunk-EGTOU5MK.js.map +1 -0
- package/dist/chunk-EJAC46WB.js +39 -0
- package/dist/chunk-EJAC46WB.js.map +1 -0
- package/dist/chunk-ENFFYCHI.js +63 -0
- package/dist/chunk-ENFFYCHI.js.map +1 -0
- package/dist/chunk-EUUNWKHL.js +69 -0
- package/dist/chunk-EUUNWKHL.js.map +1 -0
- package/dist/chunk-F2I4LA63.js +51 -0
- package/dist/chunk-F2I4LA63.js.map +1 -0
- package/dist/chunk-F65P7KZI.js +98 -0
- package/dist/chunk-F65P7KZI.js.map +1 -0
- package/dist/chunk-F76YKHGP.js +245 -0
- package/dist/chunk-F76YKHGP.js.map +1 -0
- package/dist/chunk-FC4J5OA4.js +144 -0
- package/dist/chunk-FC4J5OA4.js.map +1 -0
- package/dist/chunk-FGX6IR4Q.js +68 -0
- package/dist/chunk-FGX6IR4Q.js.map +1 -0
- package/dist/chunk-FN2CUDUP.js +43 -0
- package/dist/chunk-FN2CUDUP.js.map +1 -0
- package/dist/chunk-FQUAFIUO.js +228 -0
- package/dist/chunk-FQUAFIUO.js.map +1 -0
- package/dist/chunk-FYHAKQGB.js +220 -0
- package/dist/chunk-FYHAKQGB.js.map +1 -0
- package/dist/chunk-G6UKOZPL.js +217 -0
- package/dist/chunk-G6UKOZPL.js.map +1 -0
- package/dist/chunk-GAFIOPGJ.js +54 -0
- package/dist/chunk-GAFIOPGJ.js.map +1 -0
- package/dist/chunk-GEMXFVWI.js +37 -0
- package/dist/chunk-GEMXFVWI.js.map +1 -0
- package/dist/chunk-GFBOT2PV.js +101 -0
- package/dist/chunk-GFBOT2PV.js.map +1 -0
- package/dist/chunk-GFURX6GB.js +76 -0
- package/dist/chunk-GFURX6GB.js.map +1 -0
- package/dist/chunk-GMHVMQTV.js +245 -0
- package/dist/chunk-GMHVMQTV.js.map +1 -0
- package/dist/chunk-GQFO7RV5.js +145 -0
- package/dist/chunk-GQFO7RV5.js.map +1 -0
- package/dist/chunk-GTO7GG2K.js +245 -0
- package/dist/chunk-GTO7GG2K.js.map +1 -0
- package/dist/chunk-GWNS3C3A.js +144 -0
- package/dist/chunk-GWNS3C3A.js.map +1 -0
- package/dist/chunk-HNS76MH2.js +69 -0
- package/dist/chunk-HNS76MH2.js.map +1 -0
- package/dist/chunk-HO462CJM.js +29 -0
- package/dist/chunk-HO462CJM.js.map +1 -0
- package/dist/chunk-HPW5EHJX.js +233 -0
- package/dist/chunk-HPW5EHJX.js.map +1 -0
- package/dist/chunk-HQ23GSZM.js +145 -0
- package/dist/chunk-HQ23GSZM.js.map +1 -0
- package/dist/chunk-HQAX6GAD.js +89 -0
- package/dist/chunk-HQAX6GAD.js.map +1 -0
- package/dist/chunk-HTNDVNLQ.js +287 -0
- package/dist/chunk-HTNDVNLQ.js.map +1 -0
- package/dist/chunk-HXOMTUED.js +222 -0
- package/dist/chunk-HXOMTUED.js.map +1 -0
- package/dist/chunk-INE4EFFO.js +70 -0
- package/dist/chunk-INE4EFFO.js.map +1 -0
- package/dist/chunk-IQUJPIZD.js +689 -0
- package/dist/chunk-IQUJPIZD.js.map +1 -0
- package/dist/chunk-ITKUKDDV.js +196 -0
- package/dist/chunk-ITKUKDDV.js.map +1 -0
- package/dist/chunk-J333WVWG.js +145 -0
- package/dist/chunk-J333WVWG.js.map +1 -0
- package/dist/chunk-JADEGHJI.js +101 -0
- package/dist/chunk-JADEGHJI.js.map +1 -0
- package/dist/chunk-JAS77BXB.js +245 -0
- package/dist/chunk-JAS77BXB.js.map +1 -0
- package/dist/chunk-JDBHOE34.js +51 -0
- package/dist/chunk-JDBHOE34.js.map +1 -0
- package/dist/chunk-JG4JIBBV.js +245 -0
- package/dist/chunk-JG4JIBBV.js.map +1 -0
- package/dist/chunk-JHJSR2UT.js +101 -0
- package/dist/chunk-JHJSR2UT.js.map +1 -0
- package/dist/chunk-JHKIEQKC.js +69 -0
- package/dist/chunk-JHKIEQKC.js.map +1 -0
- package/dist/chunk-JJDLCVZV.js +37 -0
- package/dist/chunk-JJDLCVZV.js.map +1 -0
- package/dist/chunk-JJSZK6KF.js +169 -0
- package/dist/chunk-JJSZK6KF.js.map +1 -0
- package/dist/chunk-JKAMW7OV.js +228 -0
- package/dist/chunk-JKAMW7OV.js.map +1 -0
- package/dist/chunk-JKWO3SGU.js +79 -0
- package/dist/chunk-JKWO3SGU.js.map +1 -0
- package/dist/chunk-JRSZNGFD.js +28 -0
- package/dist/chunk-JRSZNGFD.js.map +1 -0
- package/dist/chunk-JWDXPHJ3.js +117 -0
- package/dist/chunk-JWDXPHJ3.js.map +1 -0
- package/dist/chunk-JZVK4NDF.js +28 -0
- package/dist/chunk-JZVK4NDF.js.map +1 -0
- package/dist/chunk-K255663P.js +144 -0
- package/dist/chunk-K255663P.js.map +1 -0
- package/dist/chunk-K5TTAI44.js +89 -0
- package/dist/chunk-K5TTAI44.js.map +1 -0
- package/dist/chunk-KCAOUZCT.js +245 -0
- package/dist/chunk-KCAOUZCT.js.map +1 -0
- package/dist/chunk-KCCYHT23.js +39 -0
- package/dist/chunk-KCCYHT23.js.map +1 -0
- package/dist/chunk-KFUBWOCN.js +69 -0
- package/dist/chunk-KFUBWOCN.js.map +1 -0
- package/dist/chunk-KHQ3C5HB.js +125 -0
- package/dist/chunk-KHQ3C5HB.js.map +1 -0
- package/dist/chunk-KOKKR2GO.js +37 -0
- package/dist/chunk-KOKKR2GO.js.map +1 -0
- package/dist/chunk-KUKHQCFS.js +233 -0
- package/dist/chunk-KUKHQCFS.js.map +1 -0
- package/dist/chunk-KV432YFG.js +223 -0
- package/dist/chunk-KV432YFG.js.map +1 -0
- package/dist/chunk-L5SQIVFO.js +68 -0
- package/dist/chunk-L5SQIVFO.js.map +1 -0
- package/dist/chunk-LGDFJ7W6.js +174 -0
- package/dist/chunk-LGDFJ7W6.js.map +1 -0
- package/dist/chunk-LIHMBEQT.js +144 -0
- package/dist/chunk-LIHMBEQT.js.map +1 -0
- package/dist/chunk-LJDGAKG3.js +196 -0
- package/dist/chunk-LJDGAKG3.js.map +1 -0
- package/dist/chunk-LSUCPRXN.js +89 -0
- package/dist/chunk-LSUCPRXN.js.map +1 -0
- package/dist/chunk-LTEJYJUM.js +143 -0
- package/dist/chunk-LTEJYJUM.js.map +1 -0
- package/dist/chunk-M5RM57U5.js +69 -0
- package/dist/chunk-M5RM57U5.js.map +1 -0
- package/dist/chunk-MDSCN4PH.js +144 -0
- package/dist/chunk-MDSCN4PH.js.map +1 -0
- package/dist/chunk-MG2KX3KF.js +69 -0
- package/dist/chunk-MG2KX3KF.js.map +1 -0
- package/dist/chunk-MIATMZDP.js +39 -0
- package/dist/chunk-MIATMZDP.js.map +1 -0
- package/dist/chunk-MIVH7X2Q.js +245 -0
- package/dist/chunk-MIVH7X2Q.js.map +1 -0
- package/dist/chunk-MPZJH3PI.js +287 -0
- package/dist/chunk-MPZJH3PI.js.map +1 -0
- package/dist/chunk-MQ4ZZJXV.js +51 -0
- package/dist/chunk-MQ4ZZJXV.js.map +1 -0
- package/dist/chunk-MRTKFR7V.js +144 -0
- package/dist/chunk-MRTKFR7V.js.map +1 -0
- package/dist/chunk-MTSZUPDJ.js +151 -0
- package/dist/chunk-MTSZUPDJ.js.map +1 -0
- package/dist/chunk-MTU2IQUS.js +689 -0
- package/dist/chunk-MTU2IQUS.js.map +1 -0
- package/dist/chunk-MVA6X35R.js +165 -0
- package/dist/chunk-MVA6X35R.js.map +1 -0
- package/dist/chunk-ND5BRCYV.js +75 -0
- package/dist/chunk-ND5BRCYV.js.map +1 -0
- package/dist/chunk-NE5S2QWA.js +51 -0
- package/dist/chunk-NE5S2QWA.js.map +1 -0
- package/dist/chunk-NHK64BOP.js +69 -0
- package/dist/chunk-NHK64BOP.js.map +1 -0
- package/dist/chunk-NHMDJCXR.js +276 -0
- package/dist/chunk-NHMDJCXR.js.map +1 -0
- package/dist/chunk-NIBZSFZ6.js +196 -0
- package/dist/chunk-NIBZSFZ6.js.map +1 -0
- package/dist/chunk-NJ3LHGC6.js +169 -0
- package/dist/chunk-NJ3LHGC6.js.map +1 -0
- package/dist/chunk-NJKRLSH3.js +287 -0
- package/dist/chunk-NJKRLSH3.js.map +1 -0
- package/dist/chunk-NLTKDXLB.js +113 -0
- package/dist/chunk-NLTKDXLB.js.map +1 -0
- package/dist/chunk-NRWZ6JNA.js +69 -0
- package/dist/chunk-NRWZ6JNA.js.map +1 -0
- package/dist/chunk-NSBBMIXS.js +151 -0
- package/dist/chunk-NSBBMIXS.js.map +1 -0
- package/dist/chunk-O665PURC.js +63 -0
- package/dist/chunk-O665PURC.js.map +1 -0
- package/dist/chunk-O6LH7P6V.js +87 -0
- package/dist/chunk-O6LH7P6V.js.map +1 -0
- package/dist/chunk-OF4RHJCY.js +69 -0
- package/dist/chunk-OF4RHJCY.js.map +1 -0
- package/dist/chunk-OL4XCMRU.js +363 -0
- package/dist/chunk-OL4XCMRU.js.map +1 -0
- package/dist/chunk-ORBEMNBA.js +49 -0
- package/dist/chunk-ORBEMNBA.js.map +1 -0
- package/dist/chunk-OYCRE67S.js +87 -0
- package/dist/chunk-OYCRE67S.js.map +1 -0
- package/dist/chunk-P4KO43AP.js +245 -0
- package/dist/chunk-P4KO43AP.js.map +1 -0
- package/dist/chunk-PJHCOBSQ.js +163 -0
- package/dist/chunk-PJHCOBSQ.js.map +1 -0
- package/dist/chunk-PXPGCDNA.js +106 -0
- package/dist/chunk-PXPGCDNA.js.map +1 -0
- package/dist/chunk-QBVF4BCB.js +245 -0
- package/dist/chunk-QBVF4BCB.js.map +1 -0
- package/dist/chunk-QEGDJ4ZD.js +165 -0
- package/dist/chunk-QEGDJ4ZD.js.map +1 -0
- package/dist/chunk-QKP2KBZ5.js +219 -0
- package/dist/chunk-QKP2KBZ5.js.map +1 -0
- package/dist/chunk-QVHA4ANB.js +196 -0
- package/dist/chunk-QVHA4ANB.js.map +1 -0
- package/dist/chunk-QXBRA2T6.js +169 -0
- package/dist/chunk-QXBRA2T6.js.map +1 -0
- package/dist/chunk-RAMPMKQD.js +245 -0
- package/dist/chunk-RAMPMKQD.js.map +1 -0
- package/dist/chunk-REPTW53S.js +98 -0
- package/dist/chunk-REPTW53S.js.map +1 -0
- package/dist/chunk-RFJ5NMY4.js +54 -0
- package/dist/chunk-RFJ5NMY4.js.map +1 -0
- package/dist/chunk-RMFSOYRW.js +99 -0
- package/dist/chunk-RMFSOYRW.js.map +1 -0
- package/dist/chunk-RXQHKSIV.js +37 -0
- package/dist/chunk-RXQHKSIV.js.map +1 -0
- package/dist/chunk-RY7DDHZO.js +51 -0
- package/dist/chunk-RY7DDHZO.js.map +1 -0
- package/dist/chunk-RZGCNQWE.js +89 -0
- package/dist/chunk-RZGCNQWE.js.map +1 -0
- package/dist/chunk-S3W44IB3.js +151 -0
- package/dist/chunk-S3W44IB3.js.map +1 -0
- package/dist/chunk-SEKCH5XW.js +100 -0
- package/dist/chunk-SEKCH5XW.js.map +1 -0
- package/dist/chunk-SFBPPATA.js +37 -0
- package/dist/chunk-SFBPPATA.js.map +1 -0
- package/dist/chunk-SGS3LUQ3.js +196 -0
- package/dist/chunk-SGS3LUQ3.js.map +1 -0
- package/dist/chunk-SLHUNZIR.js +245 -0
- package/dist/chunk-SLHUNZIR.js.map +1 -0
- package/dist/chunk-STCVW5HT.js +49 -0
- package/dist/chunk-STCVW5HT.js.map +1 -0
- package/dist/chunk-SVGGVYY7.js +69 -0
- package/dist/chunk-SVGGVYY7.js.map +1 -0
- package/dist/chunk-T5I3DNHD.js +145 -0
- package/dist/chunk-T5I3DNHD.js.map +1 -0
- package/dist/chunk-TJDCSV5R.js +230 -0
- package/dist/chunk-TJDCSV5R.js.map +1 -0
- package/dist/chunk-TJWFURWT.js +43 -0
- package/dist/chunk-TJWFURWT.js.map +1 -0
- package/dist/chunk-TMO724ZN.js +63 -0
- package/dist/chunk-TMO724ZN.js.map +1 -0
- package/dist/chunk-TP7DOXLP.js +98 -0
- package/dist/chunk-TP7DOXLP.js.map +1 -0
- package/dist/chunk-TQJ3HQ7R.js +87 -0
- package/dist/chunk-TQJ3HQ7R.js.map +1 -0
- package/dist/chunk-TRNLQ7F3.js +245 -0
- package/dist/chunk-TRNLQ7F3.js.map +1 -0
- package/dist/chunk-U6UGFQIT.js +117 -0
- package/dist/chunk-U6UGFQIT.js.map +1 -0
- package/dist/chunk-U7OEYXJQ.js +165 -0
- package/dist/chunk-U7OEYXJQ.js.map +1 -0
- package/dist/chunk-UF6LFXBG.js +230 -0
- package/dist/chunk-UF6LFXBG.js.map +1 -0
- package/dist/chunk-ULZHPTB5.js +70 -0
- package/dist/chunk-ULZHPTB5.js.map +1 -0
- package/dist/chunk-UOCLNOC2.js +145 -0
- package/dist/chunk-UOCLNOC2.js.map +1 -0
- package/dist/chunk-UZ7AGDRK.js +98 -0
- package/dist/chunk-UZ7AGDRK.js.map +1 -0
- package/dist/chunk-V2RMMVGT.js +51 -0
- package/dist/chunk-V2RMMVGT.js.map +1 -0
- package/dist/chunk-V2UREEFT.js +89 -0
- package/dist/chunk-V2UREEFT.js.map +1 -0
- package/dist/chunk-V4WWIPTK.js +363 -0
- package/dist/chunk-V4WWIPTK.js.map +1 -0
- package/dist/chunk-V7IC4EAC.js +51 -0
- package/dist/chunk-V7IC4EAC.js.map +1 -0
- package/dist/chunk-VEHTXVLY.js +169 -0
- package/dist/chunk-VEHTXVLY.js.map +1 -0
- package/dist/chunk-VIVVHI7F.js +63 -0
- package/dist/chunk-VIVVHI7F.js.map +1 -0
- package/dist/chunk-VQMIOVFO.js +69 -0
- package/dist/chunk-VQMIOVFO.js.map +1 -0
- package/dist/chunk-VU3C3W4S.js +106 -0
- package/dist/chunk-VU3C3W4S.js.map +1 -0
- package/dist/chunk-VYPPQUB5.js +196 -0
- package/dist/chunk-VYPPQUB5.js.map +1 -0
- package/dist/chunk-W2TX267T.js +100 -0
- package/dist/chunk-W2TX267T.js.map +1 -0
- package/dist/chunk-W3EW7K6L.js +51 -0
- package/dist/chunk-W3EW7K6L.js.map +1 -0
- package/dist/chunk-W7NQ5NW6.js +100 -0
- package/dist/chunk-W7NQ5NW6.js.map +1 -0
- package/dist/chunk-WA5A2GB4.js +192 -0
- package/dist/chunk-WA5A2GB4.js.map +1 -0
- package/dist/chunk-WPAC4HEX.js +87 -0
- package/dist/chunk-WPAC4HEX.js.map +1 -0
- package/dist/chunk-X2OV53JW.js +196 -0
- package/dist/chunk-X2OV53JW.js.map +1 -0
- package/dist/chunk-X47BEKKF.js +68 -0
- package/dist/chunk-X47BEKKF.js.map +1 -0
- package/dist/chunk-X6K6AM4D.js +196 -0
- package/dist/chunk-X6K6AM4D.js.map +1 -0
- package/dist/chunk-XIKKYBHO.js +69 -0
- package/dist/chunk-XIKKYBHO.js.map +1 -0
- package/dist/chunk-XYDK5OWF.js +75 -0
- package/dist/chunk-XYDK5OWF.js.map +1 -0
- package/dist/chunk-Y2H4FXGU.js +68 -0
- package/dist/chunk-Y2H4FXGU.js.map +1 -0
- package/dist/chunk-YCRTFH4C.js +79 -0
- package/dist/chunk-YCRTFH4C.js.map +1 -0
- package/dist/chunk-YHGFJ7N6.js +63 -0
- package/dist/chunk-YHGFJ7N6.js.map +1 -0
- package/dist/chunk-YKDT2D43.js +98 -0
- package/dist/chunk-YKDT2D43.js.map +1 -0
- package/dist/chunk-YLTKQZ67.js +228 -0
- package/dist/chunk-YLTKQZ67.js.map +1 -0
- package/dist/chunk-YPGFPLWM.js +69 -0
- package/dist/chunk-YPGFPLWM.js.map +1 -0
- package/dist/chunk-YWYYPYBK.js +1 -0
- package/dist/chunk-YWYYPYBK.js.map +1 -0
- package/dist/chunk-Z4NCEYC6.js +70 -0
- package/dist/chunk-Z4NCEYC6.js.map +1 -0
- package/dist/chunk-Z7WNKARH.js +331 -0
- package/dist/chunk-Z7WNKARH.js.map +1 -0
- package/dist/chunk-ZA4NYPSW.js +28 -0
- package/dist/chunk-ZA4NYPSW.js.map +1 -0
- package/dist/chunk-ZDY2M7RX.js +113 -0
- package/dist/chunk-ZDY2M7RX.js.map +1 -0
- package/dist/chunk-ZFTQ2XBH.js +76 -0
- package/dist/chunk-ZFTQ2XBH.js.map +1 -0
- package/dist/chunk-ZI3TYUTO.js +196 -0
- package/dist/chunk-ZI3TYUTO.js.map +1 -0
- package/dist/chunk-ZI7PEVZG.js +89 -0
- package/dist/chunk-ZI7PEVZG.js.map +1 -0
- package/dist/chunk-ZKFNOCWD.js +125 -0
- package/dist/chunk-ZKFNOCWD.js.map +1 -0
- package/dist/chunk-ZOITFRX7.js +70 -0
- package/dist/chunk-ZOITFRX7.js.map +1 -0
- package/dist/chunk-ZPDLTZDJ.js +363 -0
- package/dist/chunk-ZPDLTZDJ.js.map +1 -0
- package/dist/chunk-ZR4G3PU3.js +89 -0
- package/dist/chunk-ZR4G3PU3.js.map +1 -0
- package/dist/context/index.js +5 -5
- package/dist/icon.cjs +2 -0
- package/dist/icon.cjs.map +1 -1
- package/dist/icon.d.cts +1 -1
- package/dist/icon.d.ts +1 -1
- package/dist/icon.js +3 -1
- package/dist/index.cjs +1706 -308
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +176 -165
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.js +19 -19
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-comp.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-comp.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.js +12 -12
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-footer.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-footer.js +3 -3
- 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.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-radio.js +7 -7
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-option.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-option.js +6 -6
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-text.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-text.js +6 -6
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-text.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-text.js +6 -6
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/complete-review.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/complete-review.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.js +22 -22
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.js +7 -7
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-ai-traning.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-ai-traning.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-file-download.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-file-download.js +4 -4
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-video.cjs +4 -4
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-video.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-video.js +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/index.cjs +4 -4
- package/dist/molecules/curriculumV2/CurriculumContents/index.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/index.js +30 -30
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/curriculum-item-title.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/section-item.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/section-item.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumSidebar/index.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumSidebar/index.js +9 -9
- package/dist/molecules/curriculumV2/CurriculumSidebar/sidebar-item.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumSidebar/sidebar-item.js +6 -6
- package/dist/molecules/curriculumV2/curriculum-context.cjs +0 -1
- package/dist/molecules/curriculumV2/curriculum-context.cjs.map +1 -1
- package/dist/molecules/curriculumV2/curriculum-context.js +1 -1
- package/dist/molecules/curriculumV2/curriculum-sub-nav.cjs.map +1 -1
- package/dist/molecules/curriculumV2/curriculum-sub-nav.js +6 -6
- package/dist/molecules/curriculumV2/curriculum-v2-layout.js +2 -2
- package/dist/molecules/curriculumV2/index.cjs +4 -5
- package/dist/molecules/curriculumV2/index.cjs.map +1 -1
- package/dist/molecules/curriculumV2/index.js +39 -39
- package/dist/molecules/date-picker/date-picker-button.cjs.map +1 -1
- package/dist/molecules/date-picker/date-picker-button.js +7 -7
- package/dist/molecules/date-picker/index.cjs.map +1 -1
- package/dist/molecules/date-picker/index.js +6 -6
- package/dist/molecules/description-json-render.cjs +1 -1
- package/dist/molecules/description-json-render.cjs.map +1 -1
- package/dist/molecules/description-json-render.js +7 -7
- package/dist/molecules/download-card.js +2 -2
- package/dist/molecules/dynamic-field.cjs +147 -5
- package/dist/molecules/dynamic-field.cjs.map +1 -1
- package/dist/molecules/dynamic-field.js +9 -6
- package/dist/molecules/dynamic-form-editor-field-editor-panel.cjs +1711 -0
- package/dist/molecules/dynamic-form-editor-field-editor-panel.cjs.map +1 -0
- package/dist/molecules/dynamic-form-editor-field-editor-panel.d.cts +19 -0
- package/dist/molecules/dynamic-form-editor-field-editor-panel.d.ts +19 -0
- package/dist/molecules/dynamic-form-editor-field-editor-panel.js +37 -0
- package/dist/molecules/dynamic-form-editor-field-editor-panel.js.map +1 -0
- package/dist/molecules/dynamic-form-editor-field-list-panel.cjs +298 -0
- package/dist/molecules/dynamic-form-editor-field-list-panel.cjs.map +1 -0
- package/dist/molecules/dynamic-form-editor-field-list-panel.d.cts +16 -0
- package/dist/molecules/dynamic-form-editor-field-list-panel.d.ts +16 -0
- package/dist/molecules/dynamic-form-editor-field-list-panel.js +14 -0
- package/dist/molecules/dynamic-form-editor-field-list-panel.js.map +1 -0
- package/dist/molecules/dynamic-form-editor-issues-panel.cjs +171 -0
- package/dist/molecules/dynamic-form-editor-issues-panel.cjs.map +1 -0
- package/dist/molecules/dynamic-form-editor-issues-panel.d.cts +10 -0
- package/dist/molecules/dynamic-form-editor-issues-panel.d.ts +10 -0
- package/dist/molecules/dynamic-form-editor-issues-panel.js +12 -0
- package/dist/molecules/dynamic-form-editor-issues-panel.js.map +1 -0
- package/dist/molecules/dynamic-form-editor-preview-panel.cjs +1021 -0
- package/dist/molecules/dynamic-form-editor-preview-panel.cjs.map +1 -0
- package/dist/molecules/dynamic-form-editor-preview-panel.d.cts +10 -0
- package/dist/molecules/dynamic-form-editor-preview-panel.d.ts +10 -0
- package/dist/molecules/dynamic-form-editor-preview-panel.js +26 -0
- package/dist/molecules/dynamic-form-editor-preview-panel.js.map +1 -0
- package/dist/molecules/dynamic-form-editor-utils.cjs +396 -0
- package/dist/molecules/dynamic-form-editor-utils.cjs.map +1 -0
- package/dist/molecules/dynamic-form-editor-utils.d.cts +43 -0
- package/dist/molecules/dynamic-form-editor-utils.d.ts +43 -0
- package/dist/molecules/dynamic-form-editor-utils.js +44 -0
- package/dist/molecules/dynamic-form-editor-utils.js.map +1 -0
- package/dist/molecules/dynamic-form-editor.cjs +2925 -0
- package/dist/molecules/dynamic-form-editor.cjs.map +1 -0
- package/dist/molecules/dynamic-form-editor.d.cts +15 -0
- package/dist/molecules/dynamic-form-editor.d.ts +15 -0
- package/dist/molecules/dynamic-form-editor.js +51 -0
- package/dist/molecules/dynamic-form-editor.js.map +1 -0
- package/dist/molecules/dynamic-form-response-item.cjs +21 -12
- package/dist/molecules/dynamic-form-response-item.cjs.map +1 -1
- package/dist/molecules/dynamic-form-response-item.js +1 -1
- package/dist/molecules/dynamic-form.cjs +149 -7
- package/dist/molecules/dynamic-form.cjs.map +1 -1
- package/dist/molecules/dynamic-form.js +10 -7
- package/dist/molecules/expand-table/index.cjs.map +1 -1
- package/dist/molecules/expand-table/index.js +6 -6
- package/dist/molecules/force-refresh.js +2 -2
- package/dist/molecules/ghost-post.js +4 -4
- package/dist/molecules/index.cjs +1426 -27
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.d.cts +1 -0
- package/dist/molecules/index.d.ts +1 -0
- package/dist/molecules/index.js +94 -84
- package/dist/molecules/learning-post.js +6 -6
- package/dist/molecules/navigation.js +3 -3
- package/dist/molecules/one-on-one-guide-list.js +3 -3
- package/dist/molecules/stepper.cjs.map +1 -1
- package/dist/molecules/stepper.js +5 -5
- package/dist/molecules/tag-selector.cjs.map +1 -1
- package/dist/molecules/tag-selector.js +6 -6
- package/dist/molecules/time-select.cjs +1 -1
- package/dist/molecules/time-select.cjs.map +1 -1
- package/dist/molecules/time-select.js +2 -2
- package/dist/molecules/training-info-guideline.js +7 -7
- package/dist/types/dynamic-form-schema-generated.cjs.map +1 -1
- package/dist/types/dynamic-form-schema-generated.d.cts +30 -2
- package/dist/types/dynamic-form-schema-generated.d.ts +30 -2
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +1 -1
- package/dist/utils/curriculum.utils.cjs.map +1 -1
- package/dist/utils/curriculum.utils.js +1 -1
- package/dist/utils/get-callout-icon-component.cjs +624 -0
- package/dist/utils/get-callout-icon-component.cjs.map +1 -0
- package/dist/utils/get-callout-icon-component.d.cts +11 -0
- package/dist/utils/get-callout-icon-component.d.ts +11 -0
- package/dist/utils/get-callout-icon-component.js +26 -0
- package/dist/utils/get-callout-icon-component.js.map +1 -0
- package/dist/utils/getCalloutIconComponent.cjs.map +1 -1
- package/dist/utils/getCalloutIconComponent.js +2 -2
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +2 -2
- package/package.json +1 -1
- package/src/app/platform/reservation-card.tsx +0 -1
- package/src/constrant/dynamic-form-schema.json +55 -0
- package/src/icon.ts +2 -1
- package/src/molecules/curriculumV2/CurriculumContents/curriculum-video.tsx +3 -3
- package/src/molecules/curriculumV2/curriculum-context.tsx +0 -1
- package/src/molecules/description-json-render.tsx +1 -1
- package/src/molecules/dynamic-field.tsx +183 -7
- package/src/molecules/dynamic-form-editor-field-editor-panel.tsx +688 -0
- package/src/molecules/dynamic-form-editor-field-list-panel.tsx +116 -0
- package/src/molecules/dynamic-form-editor-issues-panel.tsx +35 -0
- package/src/molecules/dynamic-form-editor-preview-panel.tsx +30 -0
- package/src/molecules/dynamic-form-editor-utils.ts +433 -0
- package/src/molecules/dynamic-form-editor.tsx +263 -0
- package/src/molecules/dynamic-form-response-item.tsx +28 -17
- package/src/molecules/dynamic-form.tsx +1 -1
- package/src/molecules/index.ts +2 -1
- package/src/types/dynamic-form-schema-generated.ts +33 -0
- package/src/utils/index.ts +1 -1
- package/src/utils/{getCalloutIconComponent.ts → get-callout-icon-component.ts} +3 -3
package/dist/molecules/index.cjs
CHANGED
|
@@ -90,6 +90,7 @@ __export(molecules_exports, {
|
|
|
90
90
|
DotNavigation: () => DotNavigation,
|
|
91
91
|
DownloadCard: () => DownloadCard,
|
|
92
92
|
DynamicForm: () => DynamicForm,
|
|
93
|
+
DynamicFormEditor: () => DynamicFormEditor,
|
|
93
94
|
DynamicFormField: () => DynamicFormField,
|
|
94
95
|
DynamicFormResponseItem: () => DynamicFormResponseItem,
|
|
95
96
|
ExpandTable: () => ExpandTable,
|
|
@@ -2577,7 +2578,7 @@ var getTimeOptions = () => {
|
|
|
2577
2578
|
return timeOptions;
|
|
2578
2579
|
};
|
|
2579
2580
|
|
|
2580
|
-
// src/utils/
|
|
2581
|
+
// src/utils/get-callout-icon-component.ts
|
|
2581
2582
|
var DEFAULT_ICON = import_react_icons.InfoCircledIcon;
|
|
2582
2583
|
var AI_CALLOUT_ICON_OPTIONS = [
|
|
2583
2584
|
{ label: "Info", value: "InfoCircledIcon", Component: import_react_icons.InfoCircledIcon },
|
|
@@ -2941,7 +2942,6 @@ function CurriculumProvider(props) {
|
|
|
2941
2942
|
const inBounds = selectedIndexState >= 0 && selectedIndexState < list.length;
|
|
2942
2943
|
if (!inBounds) return;
|
|
2943
2944
|
const item = list[selectedIndexState];
|
|
2944
|
-
if (!item) return;
|
|
2945
2945
|
if (item.type === "sectionTitle") return;
|
|
2946
2946
|
onChangeSelectedContent == null ? void 0 : onChangeSelectedContent(item);
|
|
2947
2947
|
}, [list, onChangeSelectedContent, selectedIndexState]);
|
|
@@ -3097,15 +3097,15 @@ function CurriculumVideo(props) {
|
|
|
3097
3097
|
"iframe",
|
|
3098
3098
|
{
|
|
3099
3099
|
allowFullScreen: true,
|
|
3100
|
+
onError: () => {
|
|
3101
|
+
setIsLoading(false);
|
|
3102
|
+
},
|
|
3100
3103
|
onLoad: () => {
|
|
3101
3104
|
setIsLoading(false);
|
|
3102
3105
|
},
|
|
3103
3106
|
src: `${url}?theme=light`,
|
|
3104
3107
|
style: { width: "100%", height: "100%", border: "none" },
|
|
3105
|
-
title: "Curriculum Video"
|
|
3106
|
-
onError: () => {
|
|
3107
|
-
setIsLoading(false);
|
|
3108
|
-
}
|
|
3108
|
+
title: "Curriculum Video"
|
|
3109
3109
|
}
|
|
3110
3110
|
)
|
|
3111
3111
|
]
|
|
@@ -4798,7 +4798,7 @@ function CurriculumV2Layout(props) {
|
|
|
4798
4798
|
var import_react39 = require("react");
|
|
4799
4799
|
var import_formik2 = require("formik");
|
|
4800
4800
|
var Yup2 = __toESM(require("yup"), 1);
|
|
4801
|
-
var
|
|
4801
|
+
var import_themes38 = require("@radix-ui/themes");
|
|
4802
4802
|
|
|
4803
4803
|
// src/context/dynamic-form-context.tsx
|
|
4804
4804
|
var import_react36 = require("react");
|
|
@@ -5019,8 +5019,51 @@ var Checkbox = (0, import_react38.forwardRef)(
|
|
|
5019
5019
|
);
|
|
5020
5020
|
Checkbox.displayName = "Checkbox";
|
|
5021
5021
|
|
|
5022
|
+
// src/atoms/inset.tsx
|
|
5023
|
+
var import_themes37 = require("@radix-ui/themes");
|
|
5024
|
+
|
|
5022
5025
|
// src/molecules/dynamic-field.tsx
|
|
5023
5026
|
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
5027
|
+
function isRecord(value) {
|
|
5028
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
5029
|
+
}
|
|
5030
|
+
function isFieldOption(value) {
|
|
5031
|
+
if (!isRecord(value)) return false;
|
|
5032
|
+
const label = value.label;
|
|
5033
|
+
const optionValue = value.value;
|
|
5034
|
+
return typeof label === "string" && (typeof optionValue === "string" || typeof optionValue === "number");
|
|
5035
|
+
}
|
|
5036
|
+
function isImageFieldOption(value) {
|
|
5037
|
+
if (!isRecord(value)) return false;
|
|
5038
|
+
if (!isFieldOption(value)) return false;
|
|
5039
|
+
const imageSrc = value.imageSrc;
|
|
5040
|
+
const alt = value.alt;
|
|
5041
|
+
return typeof imageSrc === "string" && (alt === void 0 || typeof alt === "string");
|
|
5042
|
+
}
|
|
5043
|
+
function getStringProp(obj, key, fallback) {
|
|
5044
|
+
if (!isRecord(obj)) return fallback;
|
|
5045
|
+
const value = obj[key];
|
|
5046
|
+
return typeof value === "string" ? value : fallback;
|
|
5047
|
+
}
|
|
5048
|
+
function getNumberProp(obj, key, fallback) {
|
|
5049
|
+
if (!isRecord(obj)) return fallback;
|
|
5050
|
+
const value = obj[key];
|
|
5051
|
+
return typeof value === "number" ? value : fallback;
|
|
5052
|
+
}
|
|
5053
|
+
function getOptions(field) {
|
|
5054
|
+
if (!isRecord(field)) return null;
|
|
5055
|
+
const options = field.options;
|
|
5056
|
+
if (!Array.isArray(options)) return null;
|
|
5057
|
+
if (!options.every(isFieldOption)) return null;
|
|
5058
|
+
return options;
|
|
5059
|
+
}
|
|
5060
|
+
function getImageOptions(field) {
|
|
5061
|
+
if (!isRecord(field)) return null;
|
|
5062
|
+
const options = field.options;
|
|
5063
|
+
if (!Array.isArray(options)) return null;
|
|
5064
|
+
if (!options.every(isImageFieldOption)) return null;
|
|
5065
|
+
return options;
|
|
5066
|
+
}
|
|
5024
5067
|
function DynamicFormField({
|
|
5025
5068
|
field
|
|
5026
5069
|
}) {
|
|
@@ -5033,7 +5076,7 @@ function DynamicFormField({
|
|
|
5033
5076
|
handleBlur,
|
|
5034
5077
|
readonly
|
|
5035
5078
|
} = useDynamicForm();
|
|
5036
|
-
const
|
|
5079
|
+
const name = field.name;
|
|
5037
5080
|
const value = getFieldValue(name);
|
|
5038
5081
|
const error = getFieldError(name);
|
|
5039
5082
|
const touched = getFieldTouched(name);
|
|
@@ -5046,14 +5089,22 @@ function DynamicFormField({
|
|
|
5046
5089
|
error: hasError,
|
|
5047
5090
|
disabled: readonly
|
|
5048
5091
|
};
|
|
5049
|
-
|
|
5092
|
+
const selectedValue = typeof value === "string" || typeof value === "number" ? String(value) : "";
|
|
5093
|
+
switch (field.type) {
|
|
5050
5094
|
case "short_text":
|
|
5095
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
5096
|
+
TextField.Root,
|
|
5097
|
+
__spreadProps(__spreadValues({}, commonProps), {
|
|
5098
|
+
placeholder: field.placeholder,
|
|
5099
|
+
type: "text"
|
|
5100
|
+
})
|
|
5101
|
+
);
|
|
5051
5102
|
case "email":
|
|
5052
5103
|
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
5053
5104
|
TextField.Root,
|
|
5054
5105
|
__spreadProps(__spreadValues({}, commonProps), {
|
|
5055
5106
|
placeholder: field.placeholder,
|
|
5056
|
-
type:
|
|
5107
|
+
type: "email"
|
|
5057
5108
|
})
|
|
5058
5109
|
);
|
|
5059
5110
|
case "number":
|
|
@@ -5076,9 +5127,20 @@ function DynamicFormField({
|
|
|
5076
5127
|
onValueChange: readonly ? void 0 : (newValue) => {
|
|
5077
5128
|
void setFieldValue(name, newValue);
|
|
5078
5129
|
},
|
|
5079
|
-
value,
|
|
5130
|
+
value: selectedValue,
|
|
5080
5131
|
children: [
|
|
5081
|
-
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
5132
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
5133
|
+
Select.Trigger,
|
|
5134
|
+
{
|
|
5135
|
+
placeholder: field.placeholder,
|
|
5136
|
+
style: {
|
|
5137
|
+
alignSelf: "flex-start",
|
|
5138
|
+
width: "fit-content",
|
|
5139
|
+
minWidth: "180px",
|
|
5140
|
+
maxWidth: "100%"
|
|
5141
|
+
}
|
|
5142
|
+
}
|
|
5143
|
+
),
|
|
5082
5144
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Select.Content, { children: field.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Select.Item, { value: String(option.value), children: option.label }, option.value)) })
|
|
5083
5145
|
]
|
|
5084
5146
|
}
|
|
@@ -5096,6 +5158,21 @@ function DynamicFormField({
|
|
|
5096
5158
|
children: field.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_themes33.RadioGroup.Item, { value: String(option.value), children: option.label }, option.value))
|
|
5097
5159
|
}
|
|
5098
5160
|
);
|
|
5161
|
+
case "radio_cards": {
|
|
5162
|
+
const options = getOptions(field);
|
|
5163
|
+
if (!options) return null;
|
|
5164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
5165
|
+
import_themes23.RadioCards.Root,
|
|
5166
|
+
{
|
|
5167
|
+
disabled: readonly,
|
|
5168
|
+
onValueChange: readonly ? void 0 : (newValue) => {
|
|
5169
|
+
void setFieldValue(name, newValue);
|
|
5170
|
+
},
|
|
5171
|
+
value: selectedValue,
|
|
5172
|
+
children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_themes23.RadioCards.Item, { value: String(option.value), children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Typo, { children: option.label }) }, option.value))
|
|
5173
|
+
}
|
|
5174
|
+
);
|
|
5175
|
+
}
|
|
5099
5176
|
case "choices":
|
|
5100
5177
|
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
5101
5178
|
CheckboxGroup.Root,
|
|
@@ -5123,6 +5200,65 @@ function DynamicFormField({
|
|
|
5123
5200
|
),
|
|
5124
5201
|
field.description ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Typo, { color: "gray", variant: "caption", children: field.description }) : null
|
|
5125
5202
|
] });
|
|
5203
|
+
case "image_radio_card": {
|
|
5204
|
+
const options = getImageOptions(field);
|
|
5205
|
+
if (!options) return null;
|
|
5206
|
+
const gridColumnsCount = Math.max(1, getNumberProp(field, "gridColumnsCount", 4));
|
|
5207
|
+
const gridColumns = getStringProp(
|
|
5208
|
+
field,
|
|
5209
|
+
"gridColumns",
|
|
5210
|
+
`repeat(${gridColumnsCount}, 1fr)`
|
|
5211
|
+
);
|
|
5212
|
+
const gridItemHeight = getStringProp(field, "gridItemHeight", "100px");
|
|
5213
|
+
const gridRows = getStringProp(field, "gridRows", gridItemHeight);
|
|
5214
|
+
const gridGap = getStringProp(field, "gridGap", "2");
|
|
5215
|
+
const imageFitRaw = getStringProp(field, "imageFit", "cover");
|
|
5216
|
+
const imageFit = imageFitRaw === "contain" ? "contain" : "cover";
|
|
5217
|
+
const handleValueChange = (newValue) => {
|
|
5218
|
+
if (readonly) return;
|
|
5219
|
+
const selectedOption = options.find(
|
|
5220
|
+
(option) => String(option.value) === newValue
|
|
5221
|
+
);
|
|
5222
|
+
if (!selectedOption) return;
|
|
5223
|
+
void setFieldValue(name, selectedOption.value);
|
|
5224
|
+
};
|
|
5225
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
5226
|
+
import_themes23.RadioCards.Root,
|
|
5227
|
+
{
|
|
5228
|
+
disabled: readonly,
|
|
5229
|
+
onValueChange: readonly ? void 0 : handleValueChange,
|
|
5230
|
+
value: selectedValue,
|
|
5231
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_themes16.Grid, { columns: gridColumns, gap: gridGap, rows: gridRows, children: options.map((option) => {
|
|
5232
|
+
const optionValue = String(option.value);
|
|
5233
|
+
const altText = option.alt || option.label;
|
|
5234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
5235
|
+
import_themes23.RadioCards.Item,
|
|
5236
|
+
{
|
|
5237
|
+
style: {
|
|
5238
|
+
padding: 0
|
|
5239
|
+
},
|
|
5240
|
+
value: optionValue,
|
|
5241
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_themes37.Inset, { style: { width: "100%", height: "100%", padding: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
5242
|
+
"img",
|
|
5243
|
+
{
|
|
5244
|
+
alt: altText,
|
|
5245
|
+
src: option.imageSrc,
|
|
5246
|
+
style: {
|
|
5247
|
+
width: "100%",
|
|
5248
|
+
height: "100%",
|
|
5249
|
+
display: "block",
|
|
5250
|
+
objectFit: imageFit,
|
|
5251
|
+
opacity: readonly ? 0.7 : 1
|
|
5252
|
+
}
|
|
5253
|
+
}
|
|
5254
|
+
) })
|
|
5255
|
+
},
|
|
5256
|
+
optionValue
|
|
5257
|
+
);
|
|
5258
|
+
}) })
|
|
5259
|
+
}
|
|
5260
|
+
);
|
|
5261
|
+
}
|
|
5126
5262
|
default:
|
|
5127
5263
|
return null;
|
|
5128
5264
|
}
|
|
@@ -5236,7 +5372,7 @@ function DynamicFormFieldList({
|
|
|
5236
5372
|
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_jsx_runtime79.Fragment, { children: fields.map((field) => {
|
|
5237
5373
|
const errorMessage = !readonly && formik.touched[field.name] && formik.errors[field.name] ? String(formik.errors[field.name]) : void 0;
|
|
5238
5374
|
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
5239
|
-
|
|
5375
|
+
import_themes38.Box,
|
|
5240
5376
|
{
|
|
5241
5377
|
"data-error-field": errorMessage ? field.name : void 0,
|
|
5242
5378
|
"data-field-name": field.name,
|
|
@@ -5348,27 +5484,32 @@ function createYupValidation(field, validation) {
|
|
|
5348
5484
|
}
|
|
5349
5485
|
|
|
5350
5486
|
// src/molecules/dynamic-form-response-item.tsx
|
|
5487
|
+
function isRecord2(value) {
|
|
5488
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
5489
|
+
}
|
|
5490
|
+
function isFieldOption2(value) {
|
|
5491
|
+
if (!isRecord2(value)) return false;
|
|
5492
|
+
const label = value.label;
|
|
5493
|
+
const optionValue = value.value;
|
|
5494
|
+
return typeof label === "string" && (typeof optionValue === "string" || typeof optionValue === "number");
|
|
5495
|
+
}
|
|
5351
5496
|
function DynamicFormResponseItem({
|
|
5352
5497
|
payload,
|
|
5353
5498
|
questionType,
|
|
5354
5499
|
config
|
|
5355
5500
|
}) {
|
|
5356
|
-
|
|
5357
|
-
return String(payload || "\uC751\uB2F5 \uC5C6\uC74C");
|
|
5358
|
-
}
|
|
5359
|
-
const payloadObj = payload;
|
|
5360
|
-
const value = payloadObj.value;
|
|
5501
|
+
const value = isRecord2(payload) && "value" in payload ? payload.value : payload;
|
|
5361
5502
|
if (value === void 0 || value === null || value === "") {
|
|
5362
5503
|
return "\uC751\uB2F5 \uC5C6\uC74C";
|
|
5363
5504
|
}
|
|
5364
|
-
const
|
|
5365
|
-
if (!fieldConfig
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
return
|
|
5505
|
+
const getOptions2 = (fieldConfig) => {
|
|
5506
|
+
if (!isRecord2(fieldConfig)) return void 0;
|
|
5507
|
+
const options2 = fieldConfig.options;
|
|
5508
|
+
if (!Array.isArray(options2)) return void 0;
|
|
5509
|
+
if (!options2.every(isFieldOption2)) return void 0;
|
|
5510
|
+
return options2;
|
|
5370
5511
|
};
|
|
5371
|
-
const options =
|
|
5512
|
+
const options = getOptions2(config);
|
|
5372
5513
|
switch (questionType) {
|
|
5373
5514
|
case "text":
|
|
5374
5515
|
case "textarea":
|
|
@@ -5376,8 +5517,10 @@ function DynamicFormResponseItem({
|
|
|
5376
5517
|
case "radio":
|
|
5377
5518
|
case "select":
|
|
5378
5519
|
case "choice":
|
|
5520
|
+
case "radio_cards":
|
|
5521
|
+
case "image_radio_card":
|
|
5379
5522
|
if (options) {
|
|
5380
|
-
const option = options.find((opt) => opt.value === value);
|
|
5523
|
+
const option = options.find((opt) => String(opt.value) === String(value));
|
|
5381
5524
|
return option ? option.label : String(value);
|
|
5382
5525
|
}
|
|
5383
5526
|
return String(value);
|
|
@@ -5386,7 +5529,9 @@ function DynamicFormResponseItem({
|
|
|
5386
5529
|
if (Array.isArray(value)) {
|
|
5387
5530
|
if (options) {
|
|
5388
5531
|
return value.map((val) => {
|
|
5389
|
-
const option = options.find(
|
|
5532
|
+
const option = options.find(
|
|
5533
|
+
(opt) => String(opt.value) === String(val)
|
|
5534
|
+
);
|
|
5390
5535
|
return option ? option.label : String(val);
|
|
5391
5536
|
}).join(", ");
|
|
5392
5537
|
}
|
|
@@ -5703,6 +5848,1259 @@ function TrainingInfoGuidelineButton({
|
|
|
5703
5848
|
}
|
|
5704
5849
|
);
|
|
5705
5850
|
}
|
|
5851
|
+
|
|
5852
|
+
// src/molecules/dynamic-form-editor.tsx
|
|
5853
|
+
var import_react45 = require("react");
|
|
5854
|
+
|
|
5855
|
+
// src/molecules/dynamic-form-editor-utils.ts
|
|
5856
|
+
function isRecord3(value) {
|
|
5857
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
5858
|
+
}
|
|
5859
|
+
function isNonEmptyTrimmedString(value) {
|
|
5860
|
+
return typeof value === "string" && value.trim().length > 0;
|
|
5861
|
+
}
|
|
5862
|
+
function isFiniteNumber(value) {
|
|
5863
|
+
return typeof value === "number" && Number.isFinite(value);
|
|
5864
|
+
}
|
|
5865
|
+
function canCompileRegExp(pattern) {
|
|
5866
|
+
try {
|
|
5867
|
+
new RegExp(pattern);
|
|
5868
|
+
return true;
|
|
5869
|
+
} catch (e) {
|
|
5870
|
+
return false;
|
|
5871
|
+
}
|
|
5872
|
+
}
|
|
5873
|
+
function getFieldTypes() {
|
|
5874
|
+
return [
|
|
5875
|
+
"short_text",
|
|
5876
|
+
"long_text",
|
|
5877
|
+
"number",
|
|
5878
|
+
"email",
|
|
5879
|
+
"dropdown",
|
|
5880
|
+
"choice",
|
|
5881
|
+
"radio_cards",
|
|
5882
|
+
"image_radio_card",
|
|
5883
|
+
"choices",
|
|
5884
|
+
"yes_no"
|
|
5885
|
+
];
|
|
5886
|
+
}
|
|
5887
|
+
function getFieldTypeLabel(type) {
|
|
5888
|
+
const map = {
|
|
5889
|
+
short_text: "\uC9E7\uC740 \uD14D\uC2A4\uD2B8",
|
|
5890
|
+
long_text: "\uAE34 \uD14D\uC2A4\uD2B8",
|
|
5891
|
+
number: "\uC22B\uC790",
|
|
5892
|
+
email: "\uC774\uBA54\uC77C",
|
|
5893
|
+
dropdown: "\uB4DC\uB86D\uB2E4\uC6B4",
|
|
5894
|
+
choice: "\uB2E8\uC77C \uC120\uD0DD(\uB77C\uB514\uC624)",
|
|
5895
|
+
radio_cards: "\uB77C\uB514\uC624 \uCE74\uB4DC",
|
|
5896
|
+
image_radio_card: "\uC774\uBBF8\uC9C0 \uB77C\uB514\uC624 \uCE74\uB4DC",
|
|
5897
|
+
choices: "\uB2E4\uC911 \uC120\uD0DD(\uCCB4\uD06C)",
|
|
5898
|
+
yes_no: "\uB3D9\uC758(\uCCB4\uD06C)"
|
|
5899
|
+
};
|
|
5900
|
+
return map[type];
|
|
5901
|
+
}
|
|
5902
|
+
function findFieldIndexByName(fields, fieldName) {
|
|
5903
|
+
return fields.findIndex((field) => field.name === fieldName);
|
|
5904
|
+
}
|
|
5905
|
+
function toCamelFromSnake(value) {
|
|
5906
|
+
const parts = value.split("_").filter(Boolean);
|
|
5907
|
+
if (parts.length === 0) return "field";
|
|
5908
|
+
const [first, ...rest] = parts;
|
|
5909
|
+
const firstLower = first.toLowerCase();
|
|
5910
|
+
const restCamel = rest.map((p) => p.length === 0 ? "" : p[0].toUpperCase() + p.slice(1)).join("");
|
|
5911
|
+
return `${firstLower}${restCamel}`;
|
|
5912
|
+
}
|
|
5913
|
+
function createUniqueFieldName(fields, baseName) {
|
|
5914
|
+
const used = new Set(fields.map((f) => f.name));
|
|
5915
|
+
if (!used.has(baseName)) return baseName;
|
|
5916
|
+
let i = 2;
|
|
5917
|
+
while (used.has(`${baseName}${i}`)) i += 1;
|
|
5918
|
+
return `${baseName}${i}`;
|
|
5919
|
+
}
|
|
5920
|
+
function createDefaultField(type, currentFields) {
|
|
5921
|
+
const baseName = toCamelFromSnake(type);
|
|
5922
|
+
const name = createUniqueFieldName(currentFields, baseName);
|
|
5923
|
+
const label = getFieldTypeLabel(type);
|
|
5924
|
+
if (type === "short_text") return { name, type, label, placeholder: "" };
|
|
5925
|
+
if (type === "long_text") return { name, type, label, placeholder: "" };
|
|
5926
|
+
if (type === "number") return { name, type, label, placeholder: "" };
|
|
5927
|
+
if (type === "email") return { name, type, label, placeholder: "" };
|
|
5928
|
+
if (type === "dropdown")
|
|
5929
|
+
return {
|
|
5930
|
+
name,
|
|
5931
|
+
type,
|
|
5932
|
+
label,
|
|
5933
|
+
placeholder: "",
|
|
5934
|
+
options: [{ label: "\uC635\uC158 1", value: "option1" }]
|
|
5935
|
+
};
|
|
5936
|
+
if (type === "choice")
|
|
5937
|
+
return {
|
|
5938
|
+
name,
|
|
5939
|
+
type,
|
|
5940
|
+
label,
|
|
5941
|
+
orientation: "vertical",
|
|
5942
|
+
options: [{ label: "\uC635\uC158 1", value: "option1" }]
|
|
5943
|
+
};
|
|
5944
|
+
if (type === "radio_cards")
|
|
5945
|
+
return { name, type, label, options: [{ label: "\uC635\uC158 1", value: "option1" }] };
|
|
5946
|
+
if (type === "choices")
|
|
5947
|
+
return {
|
|
5948
|
+
name,
|
|
5949
|
+
type,
|
|
5950
|
+
label,
|
|
5951
|
+
orientation: "vertical",
|
|
5952
|
+
options: [{ label: "\uC635\uC158 1", value: "option1" }]
|
|
5953
|
+
};
|
|
5954
|
+
if (type === "yes_no") return { name, type, label, description: "" };
|
|
5955
|
+
return {
|
|
5956
|
+
name,
|
|
5957
|
+
type,
|
|
5958
|
+
label,
|
|
5959
|
+
gridColumnsCount: 4,
|
|
5960
|
+
gridItemHeight: "160px",
|
|
5961
|
+
gridGap: "2",
|
|
5962
|
+
imageFit: "cover",
|
|
5963
|
+
options: [
|
|
5964
|
+
{
|
|
5965
|
+
label: "\uC774\uBBF8\uC9C0 1",
|
|
5966
|
+
value: "option1",
|
|
5967
|
+
imageSrc: "https://placehold.co/300x300/png?text=1"
|
|
5968
|
+
}
|
|
5969
|
+
]
|
|
5970
|
+
};
|
|
5971
|
+
}
|
|
5972
|
+
function normalizeSchema(value) {
|
|
5973
|
+
const fallback = { fields: [] };
|
|
5974
|
+
if (!value) return fallback;
|
|
5975
|
+
if (!Array.isArray(value.fields)) return fallback;
|
|
5976
|
+
return { fields: value.fields };
|
|
5977
|
+
}
|
|
5978
|
+
function validateDynamicFormSchema(schema) {
|
|
5979
|
+
const issues = [];
|
|
5980
|
+
const nameToCount = /* @__PURE__ */ new Map();
|
|
5981
|
+
schema.fields.forEach((field) => {
|
|
5982
|
+
const prev = nameToCount.get(field.name) || 0;
|
|
5983
|
+
nameToCount.set(field.name, prev + 1);
|
|
5984
|
+
});
|
|
5985
|
+
schema.fields.forEach((field, index) => {
|
|
5986
|
+
const fieldKey = `${index}:${field.name}`;
|
|
5987
|
+
if (!isNonEmptyTrimmedString(field.name)) {
|
|
5988
|
+
issues.push({
|
|
5989
|
+
id: `field.name.required.${fieldKey}`,
|
|
5990
|
+
level: "error",
|
|
5991
|
+
message: "\uD544\uB4DC name\uC740 \uD544\uC218\uC785\uB2C8\uB2E4",
|
|
5992
|
+
fieldName: field.name
|
|
5993
|
+
});
|
|
5994
|
+
} else if (field.name.trim() !== field.name) {
|
|
5995
|
+
issues.push({
|
|
5996
|
+
id: `field.name.trim.${fieldKey}`,
|
|
5997
|
+
level: "warning",
|
|
5998
|
+
message: "\uD544\uB4DC name \uC55E/\uB4A4 \uACF5\uBC31\uC740 \uC81C\uAC70\uD558\uB294 \uAC83\uC744 \uAD8C\uC7A5\uD569\uB2C8\uB2E4",
|
|
5999
|
+
fieldName: field.name
|
|
6000
|
+
});
|
|
6001
|
+
}
|
|
6002
|
+
if (isNonEmptyTrimmedString(field.name)) {
|
|
6003
|
+
const count = nameToCount.get(field.name) || 0;
|
|
6004
|
+
if (count > 1) {
|
|
6005
|
+
issues.push({
|
|
6006
|
+
id: `field.name.duplicate.${fieldKey}`,
|
|
6007
|
+
level: "error",
|
|
6008
|
+
message: `\uC911\uBCF5\uB41C name\uC785\uB2C8\uB2E4: ${field.name}`,
|
|
6009
|
+
fieldName: field.name
|
|
6010
|
+
});
|
|
6011
|
+
}
|
|
6012
|
+
}
|
|
6013
|
+
if (!isNonEmptyTrimmedString(field.label)) {
|
|
6014
|
+
issues.push({
|
|
6015
|
+
id: `field.label.required.${fieldKey}`,
|
|
6016
|
+
level: "error",
|
|
6017
|
+
message: "\uD544\uB4DC label\uC740 \uD544\uC218\uC785\uB2C8\uB2E4",
|
|
6018
|
+
fieldName: field.name
|
|
6019
|
+
});
|
|
6020
|
+
}
|
|
6021
|
+
const type = field.type;
|
|
6022
|
+
const isOptionType = type === "dropdown" || type === "choice" || type === "radio_cards" || type === "choices";
|
|
6023
|
+
if (isOptionType) {
|
|
6024
|
+
const optionsRaw = field.options;
|
|
6025
|
+
if (!Array.isArray(optionsRaw) || optionsRaw.length === 0) {
|
|
6026
|
+
issues.push({
|
|
6027
|
+
id: `field.options.required.${fieldKey}`,
|
|
6028
|
+
level: "error",
|
|
6029
|
+
message: "options\uB294 1\uAC1C \uC774\uC0C1 \uD544\uC694\uD569\uB2C8\uB2E4",
|
|
6030
|
+
fieldName: field.name
|
|
6031
|
+
});
|
|
6032
|
+
}
|
|
6033
|
+
}
|
|
6034
|
+
if (type === "image_radio_card") {
|
|
6035
|
+
const optionsRaw = field.options;
|
|
6036
|
+
if (!Array.isArray(optionsRaw) || optionsRaw.length === 0) {
|
|
6037
|
+
issues.push({
|
|
6038
|
+
id: `field.imageOptions.required.${fieldKey}`,
|
|
6039
|
+
level: "error",
|
|
6040
|
+
message: "options\uB294 1\uAC1C \uC774\uC0C1 \uD544\uC694\uD569\uB2C8\uB2E4",
|
|
6041
|
+
fieldName: field.name
|
|
6042
|
+
});
|
|
6043
|
+
} else {
|
|
6044
|
+
optionsRaw.forEach((opt, optIndex) => {
|
|
6045
|
+
const imageSrc = isRecord3(opt) ? opt.imageSrc : void 0;
|
|
6046
|
+
if (!isNonEmptyTrimmedString(imageSrc)) {
|
|
6047
|
+
issues.push({
|
|
6048
|
+
id: `field.imageOptions.imageSrc.required.${fieldKey}.${optIndex}`,
|
|
6049
|
+
level: "error",
|
|
6050
|
+
message: "imageSrc\uB294 \uD544\uC218\uC785\uB2C8\uB2E4",
|
|
6051
|
+
fieldName: field.name
|
|
6052
|
+
});
|
|
6053
|
+
}
|
|
6054
|
+
});
|
|
6055
|
+
}
|
|
6056
|
+
}
|
|
6057
|
+
const validation = field.validation;
|
|
6058
|
+
if (validation) {
|
|
6059
|
+
if (isFiniteNumber(validation.min) && isFiniteNumber(validation.max)) {
|
|
6060
|
+
if (validation.min > validation.max) {
|
|
6061
|
+
issues.push({
|
|
6062
|
+
id: `field.validation.minmax.${fieldKey}`,
|
|
6063
|
+
level: "error",
|
|
6064
|
+
message: "validation.min\uC740 validation.max \uC774\uD558\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4",
|
|
6065
|
+
fieldName: field.name
|
|
6066
|
+
});
|
|
6067
|
+
}
|
|
6068
|
+
}
|
|
6069
|
+
if (isNonEmptyTrimmedString(validation.pattern)) {
|
|
6070
|
+
if (!canCompileRegExp(validation.pattern)) {
|
|
6071
|
+
issues.push({
|
|
6072
|
+
id: `field.validation.pattern.${fieldKey}`,
|
|
6073
|
+
level: "error",
|
|
6074
|
+
message: "validation.pattern\uC774 \uC62C\uBC14\uB978 \uC815\uADDC\uC2DD\uC774 \uC544\uB2D9\uB2C8\uB2E4",
|
|
6075
|
+
fieldName: field.name
|
|
6076
|
+
});
|
|
6077
|
+
}
|
|
6078
|
+
}
|
|
6079
|
+
}
|
|
6080
|
+
});
|
|
6081
|
+
return issues;
|
|
6082
|
+
}
|
|
6083
|
+
function hasErrorIssues(issues) {
|
|
6084
|
+
return issues.some((i) => i.level === "error");
|
|
6085
|
+
}
|
|
6086
|
+
function updateSchemaFields(schema, nextFields) {
|
|
6087
|
+
return { fields: nextFields };
|
|
6088
|
+
}
|
|
6089
|
+
function moveField(fields, fromIndex, toIndex) {
|
|
6090
|
+
if (fromIndex < 0 || fromIndex >= fields.length) return fields;
|
|
6091
|
+
if (toIndex < 0 || toIndex >= fields.length) return fields;
|
|
6092
|
+
if (fromIndex === toIndex) return fields;
|
|
6093
|
+
const next = [...fields];
|
|
6094
|
+
const [item] = next.splice(fromIndex, 1);
|
|
6095
|
+
next.splice(toIndex, 0, item);
|
|
6096
|
+
return next;
|
|
6097
|
+
}
|
|
6098
|
+
function duplicateField(fields, index) {
|
|
6099
|
+
if (index < 0 || index >= fields.length) return fields;
|
|
6100
|
+
const target = fields[index];
|
|
6101
|
+
const nextName = createUniqueFieldName(fields, target.name);
|
|
6102
|
+
const cloned = __spreadProps(__spreadValues({}, target), { name: nextName });
|
|
6103
|
+
const next = [...fields];
|
|
6104
|
+
next.splice(index + 1, 0, cloned);
|
|
6105
|
+
return next;
|
|
6106
|
+
}
|
|
6107
|
+
function updateFieldCommonProps(field, next) {
|
|
6108
|
+
const { name, label, description, required } = next;
|
|
6109
|
+
return __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, field), name !== void 0 ? { name } : {}), label !== void 0 ? { label } : {}), description !== void 0 ? { description } : {}), required !== void 0 ? { required } : {});
|
|
6110
|
+
}
|
|
6111
|
+
function updateFieldValidation(field, next) {
|
|
6112
|
+
if (!next) {
|
|
6113
|
+
const _a = field, { validation: _validation } = _a, rest = __objRest(_a, ["validation"]);
|
|
6114
|
+
return rest;
|
|
6115
|
+
}
|
|
6116
|
+
return __spreadProps(__spreadValues({}, field), { validation: next });
|
|
6117
|
+
}
|
|
6118
|
+
function updateTextPlaceholder(field, placeholder) {
|
|
6119
|
+
const type = field.type;
|
|
6120
|
+
if (type === "short_text" || type === "long_text" || type === "number" || type === "email" || type === "dropdown") {
|
|
6121
|
+
return __spreadProps(__spreadValues({}, field), { placeholder });
|
|
6122
|
+
}
|
|
6123
|
+
return field;
|
|
6124
|
+
}
|
|
6125
|
+
function updateOrientation(field, orientation) {
|
|
6126
|
+
const type = field.type;
|
|
6127
|
+
if (type === "choice" || type === "choices") return __spreadProps(__spreadValues({}, field), { orientation });
|
|
6128
|
+
return field;
|
|
6129
|
+
}
|
|
6130
|
+
function updateOptions(field, options) {
|
|
6131
|
+
const type = field.type;
|
|
6132
|
+
if (type === "dropdown" || type === "choice" || type === "radio_cards" || type === "choices") {
|
|
6133
|
+
return __spreadProps(__spreadValues({}, field), { options });
|
|
6134
|
+
}
|
|
6135
|
+
return field;
|
|
6136
|
+
}
|
|
6137
|
+
function updateImageOptions(field, options) {
|
|
6138
|
+
if (field.type === "image_radio_card") {
|
|
6139
|
+
return __spreadProps(__spreadValues({}, field), { options });
|
|
6140
|
+
}
|
|
6141
|
+
return field;
|
|
6142
|
+
}
|
|
6143
|
+
function updateImageLayout(field, next) {
|
|
6144
|
+
if (field.type !== "image_radio_card") return field;
|
|
6145
|
+
return __spreadValues(__spreadValues({}, field), next);
|
|
6146
|
+
}
|
|
6147
|
+
function resetFieldType(field, nextType, allFields) {
|
|
6148
|
+
const base = createDefaultField(nextType, allFields);
|
|
6149
|
+
return __spreadProps(__spreadValues({}, base), {
|
|
6150
|
+
name: field.name,
|
|
6151
|
+
label: field.label,
|
|
6152
|
+
description: field.description,
|
|
6153
|
+
required: field.required,
|
|
6154
|
+
validation: field.validation
|
|
6155
|
+
});
|
|
6156
|
+
}
|
|
6157
|
+
|
|
6158
|
+
// src/molecules/dynamic-form-editor-field-editor-panel.tsx
|
|
6159
|
+
var import_react43 = require("react");
|
|
6160
|
+
var import_themes39 = require("@radix-ui/themes");
|
|
6161
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
6162
|
+
function isRecord4(value) {
|
|
6163
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
6164
|
+
}
|
|
6165
|
+
function isFieldType(value, types) {
|
|
6166
|
+
return types.some((t) => t === value);
|
|
6167
|
+
}
|
|
6168
|
+
function parseOptionalNumber(value) {
|
|
6169
|
+
const trimmed = value.trim();
|
|
6170
|
+
if (trimmed.length === 0) return void 0;
|
|
6171
|
+
const num = Number(trimmed);
|
|
6172
|
+
return Number.isFinite(num) ? num : void 0;
|
|
6173
|
+
}
|
|
6174
|
+
function getValidation(field) {
|
|
6175
|
+
return field.validation ? field.validation : {};
|
|
6176
|
+
}
|
|
6177
|
+
function cleanValidation(next) {
|
|
6178
|
+
const hasAny = next.min !== void 0 || next.max !== void 0 || typeof next.pattern === "string" && next.pattern.trim().length > 0 || typeof next.message === "string" && next.message.trim().length > 0;
|
|
6179
|
+
return hasAny ? next : void 0;
|
|
6180
|
+
}
|
|
6181
|
+
function moveItem(items, fromIndex, toIndex) {
|
|
6182
|
+
if (fromIndex < 0 || fromIndex >= items.length) return items;
|
|
6183
|
+
if (toIndex < 0 || toIndex >= items.length) return items;
|
|
6184
|
+
if (fromIndex === toIndex) return items;
|
|
6185
|
+
const next = [...items];
|
|
6186
|
+
const [item] = next.splice(fromIndex, 1);
|
|
6187
|
+
next.splice(toIndex, 0, item);
|
|
6188
|
+
return next;
|
|
6189
|
+
}
|
|
6190
|
+
function getOptionDrafts(field) {
|
|
6191
|
+
const raw = field.options;
|
|
6192
|
+
if (!Array.isArray(raw)) return [];
|
|
6193
|
+
return raw.map((o) => {
|
|
6194
|
+
if (!isRecord4(o)) return null;
|
|
6195
|
+
const label = typeof o.label === "string" ? o.label : "";
|
|
6196
|
+
const valueRaw = o.value;
|
|
6197
|
+
const value = typeof valueRaw === "string" || typeof valueRaw === "number" ? String(valueRaw) : "";
|
|
6198
|
+
return { label, value };
|
|
6199
|
+
}).filter((v) => v !== null);
|
|
6200
|
+
}
|
|
6201
|
+
function getImageOptionDrafts(field) {
|
|
6202
|
+
const raw = field.options;
|
|
6203
|
+
if (!Array.isArray(raw)) return [];
|
|
6204
|
+
return raw.map(
|
|
6205
|
+
(o) => {
|
|
6206
|
+
if (!isRecord4(o)) return null;
|
|
6207
|
+
const label = typeof o.label === "string" ? o.label : "";
|
|
6208
|
+
const valueRaw = o.value;
|
|
6209
|
+
const value = typeof valueRaw === "string" || typeof valueRaw === "number" ? String(valueRaw) : "";
|
|
6210
|
+
const imageSrc = typeof o.imageSrc === "string" ? o.imageSrc : "";
|
|
6211
|
+
const alt = typeof o.alt === "string" ? o.alt : void 0;
|
|
6212
|
+
return __spreadValues({ label, value, imageSrc }, alt ? { alt } : {});
|
|
6213
|
+
}
|
|
6214
|
+
).filter(
|
|
6215
|
+
(v) => v !== null
|
|
6216
|
+
);
|
|
6217
|
+
}
|
|
6218
|
+
function toFieldOptions(options) {
|
|
6219
|
+
return options.map((o) => ({ label: o.label, value: o.value }));
|
|
6220
|
+
}
|
|
6221
|
+
function toImageFieldOptions(options) {
|
|
6222
|
+
return options.map((o) => __spreadValues({
|
|
6223
|
+
label: o.label,
|
|
6224
|
+
value: o.value,
|
|
6225
|
+
imageSrc: o.imageSrc
|
|
6226
|
+
}, o.alt !== void 0 ? { alt: o.alt } : {}));
|
|
6227
|
+
}
|
|
6228
|
+
function DynamicFormEditorFieldEditorPanel(props) {
|
|
6229
|
+
const {
|
|
6230
|
+
field,
|
|
6231
|
+
fieldIndex,
|
|
6232
|
+
fields,
|
|
6233
|
+
readonly,
|
|
6234
|
+
fieldTypes,
|
|
6235
|
+
onRenameField,
|
|
6236
|
+
onUpdateField,
|
|
6237
|
+
onDeleteField,
|
|
6238
|
+
onMoveField,
|
|
6239
|
+
onDuplicateField
|
|
6240
|
+
} = props;
|
|
6241
|
+
const canMoveUp = fieldIndex > 0;
|
|
6242
|
+
const canMoveDown = fieldIndex >= 0 && fieldIndex < fields.length - 1;
|
|
6243
|
+
const placeholderValue = (0, import_react43.useMemo)(() => {
|
|
6244
|
+
if (!field) return "";
|
|
6245
|
+
return String(field.placeholder || "");
|
|
6246
|
+
}, [field]);
|
|
6247
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Card, { style: { flex: 1, minWidth: 520, padding: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { direction: "column", gap: "4", children: [
|
|
6248
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { align: "center", justify: "between", children: [
|
|
6249
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "body", children: "\uD544\uB4DC \uD3B8\uC9D1" }),
|
|
6250
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { align: "center", gap: "1", children: [
|
|
6251
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6252
|
+
IconButton,
|
|
6253
|
+
{
|
|
6254
|
+
"aria-label": "\uD544\uB4DC \uC704\uB85C",
|
|
6255
|
+
disabled: readonly || !field || !canMoveUp,
|
|
6256
|
+
onClick: () => {
|
|
6257
|
+
onMoveField("up");
|
|
6258
|
+
},
|
|
6259
|
+
variant: "soft",
|
|
6260
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_icons.ChevronUpIcon, {})
|
|
6261
|
+
}
|
|
6262
|
+
),
|
|
6263
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6264
|
+
IconButton,
|
|
6265
|
+
{
|
|
6266
|
+
"aria-label": "\uD544\uB4DC \uC544\uB798\uB85C",
|
|
6267
|
+
disabled: readonly || !field || !canMoveDown,
|
|
6268
|
+
onClick: () => {
|
|
6269
|
+
onMoveField("down");
|
|
6270
|
+
},
|
|
6271
|
+
variant: "soft",
|
|
6272
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_icons.ChevronDownIcon, {})
|
|
6273
|
+
}
|
|
6274
|
+
),
|
|
6275
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6276
|
+
IconButton,
|
|
6277
|
+
{
|
|
6278
|
+
"aria-label": "\uD544\uB4DC \uBCF5\uC81C",
|
|
6279
|
+
disabled: readonly || !field,
|
|
6280
|
+
onClick: onDuplicateField,
|
|
6281
|
+
variant: "soft",
|
|
6282
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_icons.CopyIcon, {})
|
|
6283
|
+
}
|
|
6284
|
+
),
|
|
6285
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6286
|
+
IconButton,
|
|
6287
|
+
{
|
|
6288
|
+
"aria-label": "\uD544\uB4DC \uC0AD\uC81C",
|
|
6289
|
+
disabled: readonly || !field,
|
|
6290
|
+
onClick: onDeleteField,
|
|
6291
|
+
variant: "soft",
|
|
6292
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_icons.TrashIcon, {})
|
|
6293
|
+
}
|
|
6294
|
+
)
|
|
6295
|
+
] })
|
|
6296
|
+
] }),
|
|
6297
|
+
!field ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { color: "gray", variant: "caption", children: "\uC67C\uCABD\uC5D0\uC11C \uD544\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694." }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { direction: "column", gap: "3", children: [
|
|
6298
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { align: "end", gap: "2", children: [
|
|
6299
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { style: { flex: 1 }, children: [
|
|
6300
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "name" }),
|
|
6301
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6302
|
+
TextField.Root,
|
|
6303
|
+
{
|
|
6304
|
+
disabled: readonly,
|
|
6305
|
+
onChange: (e) => {
|
|
6306
|
+
onRenameField(e.target.value);
|
|
6307
|
+
},
|
|
6308
|
+
value: field.name
|
|
6309
|
+
}
|
|
6310
|
+
)
|
|
6311
|
+
] }),
|
|
6312
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { style: { flex: 1 }, children: [
|
|
6313
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "label" }),
|
|
6314
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6315
|
+
TextField.Root,
|
|
6316
|
+
{
|
|
6317
|
+
disabled: readonly,
|
|
6318
|
+
onChange: (e) => {
|
|
6319
|
+
onUpdateField(updateFieldCommonProps(field, { label: e.target.value }));
|
|
6320
|
+
},
|
|
6321
|
+
value: field.label
|
|
6322
|
+
}
|
|
6323
|
+
)
|
|
6324
|
+
] })
|
|
6325
|
+
] }),
|
|
6326
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { align: "center", gap: "2", children: [
|
|
6327
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
6328
|
+
Select.Root,
|
|
6329
|
+
{
|
|
6330
|
+
disabled: readonly,
|
|
6331
|
+
onValueChange: (v) => {
|
|
6332
|
+
if (!isFieldType(v, fieldTypes)) return;
|
|
6333
|
+
onUpdateField(resetFieldType(field, v, fields));
|
|
6334
|
+
},
|
|
6335
|
+
value: field.type,
|
|
6336
|
+
children: [
|
|
6337
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Select.Trigger, { style: { minWidth: 220 } }),
|
|
6338
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Select.Content, { children: fieldTypes.map((t) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Select.Item, { value: t, children: getFieldTypeLabel(t) }, t)) })
|
|
6339
|
+
]
|
|
6340
|
+
}
|
|
6341
|
+
),
|
|
6342
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { align: "center", gap: "2", children: [
|
|
6343
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6344
|
+
Checkbox,
|
|
6345
|
+
{
|
|
6346
|
+
checked: Boolean(field.required),
|
|
6347
|
+
disabled: readonly,
|
|
6348
|
+
onCheckedChange: (checked) => {
|
|
6349
|
+
onUpdateField(updateFieldCommonProps(field, { required: checked }));
|
|
6350
|
+
}
|
|
6351
|
+
}
|
|
6352
|
+
),
|
|
6353
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "\uD544\uC218" })
|
|
6354
|
+
] })
|
|
6355
|
+
] }),
|
|
6356
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { children: [
|
|
6357
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "description" }),
|
|
6358
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6359
|
+
TextArea,
|
|
6360
|
+
{
|
|
6361
|
+
disabled: readonly,
|
|
6362
|
+
onChange: (e) => {
|
|
6363
|
+
onUpdateField(
|
|
6364
|
+
updateFieldCommonProps(field, { description: e.target.value })
|
|
6365
|
+
);
|
|
6366
|
+
},
|
|
6367
|
+
rows: 3,
|
|
6368
|
+
value: field.description || ""
|
|
6369
|
+
}
|
|
6370
|
+
)
|
|
6371
|
+
] }),
|
|
6372
|
+
field.type === "short_text" || field.type === "long_text" || field.type === "number" || field.type === "email" || field.type === "dropdown" ? /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { children: [
|
|
6373
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "placeholder" }),
|
|
6374
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6375
|
+
TextField.Root,
|
|
6376
|
+
{
|
|
6377
|
+
disabled: readonly,
|
|
6378
|
+
onChange: (e) => {
|
|
6379
|
+
onUpdateField(updateTextPlaceholder(field, e.target.value));
|
|
6380
|
+
},
|
|
6381
|
+
value: placeholderValue
|
|
6382
|
+
}
|
|
6383
|
+
)
|
|
6384
|
+
] }) : null,
|
|
6385
|
+
field.type === "choice" || field.type === "choices" ? /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { children: [
|
|
6386
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "orientation" }),
|
|
6387
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
6388
|
+
Select.Root,
|
|
6389
|
+
{
|
|
6390
|
+
disabled: readonly,
|
|
6391
|
+
onValueChange: (v) => {
|
|
6392
|
+
const nextOrientation = v === "horizontal" ? "horizontal" : "vertical";
|
|
6393
|
+
onUpdateField(updateOrientation(field, nextOrientation));
|
|
6394
|
+
},
|
|
6395
|
+
value: field.orientation || "vertical",
|
|
6396
|
+
children: [
|
|
6397
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Select.Trigger, { style: { minWidth: 220 } }),
|
|
6398
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(Select.Content, { children: [
|
|
6399
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Select.Item, { value: "vertical", children: "vertical" }),
|
|
6400
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Select.Item, { value: "horizontal", children: "horizontal" })
|
|
6401
|
+
] })
|
|
6402
|
+
]
|
|
6403
|
+
}
|
|
6404
|
+
)
|
|
6405
|
+
] }) : null,
|
|
6406
|
+
field.type === "dropdown" || field.type === "choice" || field.type === "radio_cards" || field.type === "choices" ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Card, { style: { padding: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { direction: "column", gap: "2", children: [
|
|
6407
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { align: "center", justify: "between", children: [
|
|
6408
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "options" }),
|
|
6409
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
6410
|
+
Button,
|
|
6411
|
+
{
|
|
6412
|
+
disabled: readonly,
|
|
6413
|
+
onClick: () => {
|
|
6414
|
+
const drafts = getOptionDrafts(field);
|
|
6415
|
+
const nextDrafts = [
|
|
6416
|
+
...drafts,
|
|
6417
|
+
{
|
|
6418
|
+
label: `\uC635\uC158 ${drafts.length + 1}`,
|
|
6419
|
+
value: `option${drafts.length + 1}`
|
|
6420
|
+
}
|
|
6421
|
+
];
|
|
6422
|
+
onUpdateField(updateOptions(field, toFieldOptions(nextDrafts)));
|
|
6423
|
+
},
|
|
6424
|
+
size: "small",
|
|
6425
|
+
variant: "soft",
|
|
6426
|
+
children: [
|
|
6427
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_icons.PlusIcon, {}),
|
|
6428
|
+
" \uCD94\uAC00"
|
|
6429
|
+
]
|
|
6430
|
+
}
|
|
6431
|
+
)
|
|
6432
|
+
] }),
|
|
6433
|
+
getOptionDrafts(field).map((opt, i) => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { align: "end", gap: "2", children: [
|
|
6434
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { style: { flex: 1 }, children: [
|
|
6435
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "label" }),
|
|
6436
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6437
|
+
TextField.Root,
|
|
6438
|
+
{
|
|
6439
|
+
disabled: readonly,
|
|
6440
|
+
onChange: (e) => {
|
|
6441
|
+
const drafts = getOptionDrafts(field);
|
|
6442
|
+
const nextDrafts = drafts.map(
|
|
6443
|
+
(d, idx) => idx === i ? __spreadProps(__spreadValues({}, d), { label: e.target.value }) : d
|
|
6444
|
+
);
|
|
6445
|
+
onUpdateField(updateOptions(field, toFieldOptions(nextDrafts)));
|
|
6446
|
+
},
|
|
6447
|
+
value: opt.label
|
|
6448
|
+
}
|
|
6449
|
+
)
|
|
6450
|
+
] }),
|
|
6451
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { style: { flex: 1 }, children: [
|
|
6452
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "value" }),
|
|
6453
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6454
|
+
TextField.Root,
|
|
6455
|
+
{
|
|
6456
|
+
disabled: readonly,
|
|
6457
|
+
onChange: (e) => {
|
|
6458
|
+
const drafts = getOptionDrafts(field);
|
|
6459
|
+
const nextDrafts = drafts.map(
|
|
6460
|
+
(d, idx) => idx === i ? __spreadProps(__spreadValues({}, d), { value: e.target.value }) : d
|
|
6461
|
+
);
|
|
6462
|
+
onUpdateField(updateOptions(field, toFieldOptions(nextDrafts)));
|
|
6463
|
+
},
|
|
6464
|
+
value: opt.value
|
|
6465
|
+
}
|
|
6466
|
+
)
|
|
6467
|
+
] }),
|
|
6468
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { gap: "1", children: [
|
|
6469
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6470
|
+
IconButton,
|
|
6471
|
+
{
|
|
6472
|
+
"aria-label": "\uC635\uC158 \uC704\uB85C",
|
|
6473
|
+
disabled: readonly || i === 0,
|
|
6474
|
+
onClick: () => {
|
|
6475
|
+
const drafts = getOptionDrafts(field);
|
|
6476
|
+
const nextDrafts = moveItem(drafts, i, i - 1);
|
|
6477
|
+
onUpdateField(updateOptions(field, toFieldOptions(nextDrafts)));
|
|
6478
|
+
},
|
|
6479
|
+
variant: "soft",
|
|
6480
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_icons.ChevronUpIcon, {})
|
|
6481
|
+
}
|
|
6482
|
+
),
|
|
6483
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6484
|
+
IconButton,
|
|
6485
|
+
{
|
|
6486
|
+
"aria-label": "\uC635\uC158 \uC544\uB798\uB85C",
|
|
6487
|
+
disabled: readonly || i === getOptionDrafts(field).length - 1,
|
|
6488
|
+
onClick: () => {
|
|
6489
|
+
const drafts = getOptionDrafts(field);
|
|
6490
|
+
const nextDrafts = moveItem(drafts, i, i + 1);
|
|
6491
|
+
onUpdateField(updateOptions(field, toFieldOptions(nextDrafts)));
|
|
6492
|
+
},
|
|
6493
|
+
variant: "soft",
|
|
6494
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_icons.ChevronDownIcon, {})
|
|
6495
|
+
}
|
|
6496
|
+
),
|
|
6497
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6498
|
+
IconButton,
|
|
6499
|
+
{
|
|
6500
|
+
"aria-label": "\uC635\uC158 \uC0AD\uC81C",
|
|
6501
|
+
disabled: readonly,
|
|
6502
|
+
onClick: () => {
|
|
6503
|
+
const drafts = getOptionDrafts(field);
|
|
6504
|
+
const nextDrafts = drafts.filter((_, idx) => idx !== i);
|
|
6505
|
+
onUpdateField(updateOptions(field, toFieldOptions(nextDrafts)));
|
|
6506
|
+
},
|
|
6507
|
+
variant: "soft",
|
|
6508
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_icons.TrashIcon, {})
|
|
6509
|
+
}
|
|
6510
|
+
)
|
|
6511
|
+
] })
|
|
6512
|
+
] }, `${opt.value}-${opt.label}`))
|
|
6513
|
+
] }) }) : null,
|
|
6514
|
+
field.type === "image_radio_card" ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Card, { style: { padding: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { direction: "column", gap: "3", children: [
|
|
6515
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { align: "center", justify: "between", children: [
|
|
6516
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "image options" }),
|
|
6517
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
6518
|
+
Button,
|
|
6519
|
+
{
|
|
6520
|
+
disabled: readonly,
|
|
6521
|
+
onClick: () => {
|
|
6522
|
+
const drafts = getImageOptionDrafts(field);
|
|
6523
|
+
const nextDrafts = [
|
|
6524
|
+
...drafts,
|
|
6525
|
+
{
|
|
6526
|
+
label: `\uC774\uBBF8\uC9C0 ${drafts.length + 1}`,
|
|
6527
|
+
value: `option${drafts.length + 1}`,
|
|
6528
|
+
imageSrc: "https://placehold.co/300x300/png?text=new"
|
|
6529
|
+
}
|
|
6530
|
+
];
|
|
6531
|
+
onUpdateField(updateImageOptions(field, toImageFieldOptions(nextDrafts)));
|
|
6532
|
+
},
|
|
6533
|
+
size: "small",
|
|
6534
|
+
variant: "soft",
|
|
6535
|
+
children: [
|
|
6536
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_icons.PlusIcon, {}),
|
|
6537
|
+
" \uCD94\uAC00"
|
|
6538
|
+
]
|
|
6539
|
+
}
|
|
6540
|
+
)
|
|
6541
|
+
] }),
|
|
6542
|
+
getImageOptionDrafts(field).map((opt, i) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6543
|
+
Card,
|
|
6544
|
+
{
|
|
6545
|
+
style: { padding: 10 },
|
|
6546
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { direction: "column", gap: "2", children: [
|
|
6547
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { align: "end", gap: "2", children: [
|
|
6548
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { style: { flex: 1 }, children: [
|
|
6549
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "label" }),
|
|
6550
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6551
|
+
TextField.Root,
|
|
6552
|
+
{
|
|
6553
|
+
disabled: readonly,
|
|
6554
|
+
onChange: (e) => {
|
|
6555
|
+
const drafts = getImageOptionDrafts(field);
|
|
6556
|
+
const nextDrafts = drafts.map(
|
|
6557
|
+
(d, idx) => idx === i ? __spreadProps(__spreadValues({}, d), { label: e.target.value }) : d
|
|
6558
|
+
);
|
|
6559
|
+
onUpdateField(
|
|
6560
|
+
updateImageOptions(field, toImageFieldOptions(nextDrafts))
|
|
6561
|
+
);
|
|
6562
|
+
},
|
|
6563
|
+
value: opt.label
|
|
6564
|
+
}
|
|
6565
|
+
)
|
|
6566
|
+
] }),
|
|
6567
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { style: { flex: 1 }, children: [
|
|
6568
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "value" }),
|
|
6569
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6570
|
+
TextField.Root,
|
|
6571
|
+
{
|
|
6572
|
+
disabled: readonly,
|
|
6573
|
+
onChange: (e) => {
|
|
6574
|
+
const drafts = getImageOptionDrafts(field);
|
|
6575
|
+
const nextDrafts = drafts.map(
|
|
6576
|
+
(d, idx) => idx === i ? __spreadProps(__spreadValues({}, d), { value: e.target.value }) : d
|
|
6577
|
+
);
|
|
6578
|
+
onUpdateField(
|
|
6579
|
+
updateImageOptions(field, toImageFieldOptions(nextDrafts))
|
|
6580
|
+
);
|
|
6581
|
+
},
|
|
6582
|
+
value: opt.value
|
|
6583
|
+
}
|
|
6584
|
+
)
|
|
6585
|
+
] })
|
|
6586
|
+
] }),
|
|
6587
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { children: [
|
|
6588
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "imageSrc" }),
|
|
6589
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6590
|
+
TextField.Root,
|
|
6591
|
+
{
|
|
6592
|
+
disabled: readonly,
|
|
6593
|
+
onChange: (e) => {
|
|
6594
|
+
const drafts = getImageOptionDrafts(field);
|
|
6595
|
+
const nextDrafts = drafts.map(
|
|
6596
|
+
(d, idx) => idx === i ? __spreadProps(__spreadValues({}, d), { imageSrc: e.target.value }) : d
|
|
6597
|
+
);
|
|
6598
|
+
onUpdateField(
|
|
6599
|
+
updateImageOptions(field, toImageFieldOptions(nextDrafts))
|
|
6600
|
+
);
|
|
6601
|
+
},
|
|
6602
|
+
value: opt.imageSrc
|
|
6603
|
+
}
|
|
6604
|
+
)
|
|
6605
|
+
] }),
|
|
6606
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { align: "end", gap: "2", children: [
|
|
6607
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { style: { flex: 1 }, children: [
|
|
6608
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "alt" }),
|
|
6609
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6610
|
+
TextField.Root,
|
|
6611
|
+
{
|
|
6612
|
+
disabled: readonly,
|
|
6613
|
+
onChange: (e) => {
|
|
6614
|
+
const drafts = getImageOptionDrafts(field);
|
|
6615
|
+
const nextAlt = e.target.value.trim().length === 0 ? void 0 : e.target.value;
|
|
6616
|
+
const nextDrafts = drafts.map(
|
|
6617
|
+
(d, idx) => idx === i ? __spreadProps(__spreadValues({}, d), { alt: nextAlt }) : d
|
|
6618
|
+
);
|
|
6619
|
+
onUpdateField(
|
|
6620
|
+
updateImageOptions(field, toImageFieldOptions(nextDrafts))
|
|
6621
|
+
);
|
|
6622
|
+
},
|
|
6623
|
+
value: opt.alt || ""
|
|
6624
|
+
}
|
|
6625
|
+
)
|
|
6626
|
+
] }),
|
|
6627
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6628
|
+
IconButton,
|
|
6629
|
+
{
|
|
6630
|
+
"aria-label": "\uC774\uBBF8\uC9C0 \uC635\uC158 \uC0AD\uC81C",
|
|
6631
|
+
disabled: readonly,
|
|
6632
|
+
onClick: () => {
|
|
6633
|
+
const drafts = getImageOptionDrafts(field);
|
|
6634
|
+
const nextDrafts = drafts.filter((_, idx) => idx !== i);
|
|
6635
|
+
onUpdateField(
|
|
6636
|
+
updateImageOptions(field, toImageFieldOptions(nextDrafts))
|
|
6637
|
+
);
|
|
6638
|
+
},
|
|
6639
|
+
variant: "soft",
|
|
6640
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_icons.TrashIcon, {})
|
|
6641
|
+
}
|
|
6642
|
+
)
|
|
6643
|
+
] })
|
|
6644
|
+
] })
|
|
6645
|
+
},
|
|
6646
|
+
`${opt.value}-${opt.label}-${opt.imageSrc}`
|
|
6647
|
+
)),
|
|
6648
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { gap: "2", children: [
|
|
6649
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { style: { flex: 1 }, children: [
|
|
6650
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "gridColumnsCount" }),
|
|
6651
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6652
|
+
TextField.Root,
|
|
6653
|
+
{
|
|
6654
|
+
disabled: readonly,
|
|
6655
|
+
inputMode: "numeric",
|
|
6656
|
+
onChange: (e) => {
|
|
6657
|
+
onUpdateField(
|
|
6658
|
+
updateImageLayout(field, {
|
|
6659
|
+
gridColumnsCount: parseOptionalNumber(e.target.value)
|
|
6660
|
+
})
|
|
6661
|
+
);
|
|
6662
|
+
},
|
|
6663
|
+
value: String(field.gridColumnsCount || "")
|
|
6664
|
+
}
|
|
6665
|
+
)
|
|
6666
|
+
] }),
|
|
6667
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { style: { flex: 1 }, children: [
|
|
6668
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "gridItemHeight" }),
|
|
6669
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6670
|
+
TextField.Root,
|
|
6671
|
+
{
|
|
6672
|
+
disabled: readonly,
|
|
6673
|
+
onChange: (e) => {
|
|
6674
|
+
onUpdateField(
|
|
6675
|
+
updateImageLayout(field, { gridItemHeight: e.target.value })
|
|
6676
|
+
);
|
|
6677
|
+
},
|
|
6678
|
+
value: String(field.gridItemHeight || "")
|
|
6679
|
+
}
|
|
6680
|
+
)
|
|
6681
|
+
] }),
|
|
6682
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { style: { flex: 1 }, children: [
|
|
6683
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "gridGap" }),
|
|
6684
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6685
|
+
TextField.Root,
|
|
6686
|
+
{
|
|
6687
|
+
disabled: readonly,
|
|
6688
|
+
onChange: (e) => {
|
|
6689
|
+
onUpdateField(updateImageLayout(field, { gridGap: e.target.value }));
|
|
6690
|
+
},
|
|
6691
|
+
value: String(field.gridGap || "")
|
|
6692
|
+
}
|
|
6693
|
+
)
|
|
6694
|
+
] })
|
|
6695
|
+
] }),
|
|
6696
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { children: [
|
|
6697
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "imageFit" }),
|
|
6698
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
6699
|
+
Select.Root,
|
|
6700
|
+
{
|
|
6701
|
+
disabled: readonly,
|
|
6702
|
+
onValueChange: (v) => {
|
|
6703
|
+
const nextFit = v === "contain" ? "contain" : "cover";
|
|
6704
|
+
onUpdateField(updateImageLayout(field, { imageFit: nextFit }));
|
|
6705
|
+
},
|
|
6706
|
+
value: field.imageFit || "cover",
|
|
6707
|
+
children: [
|
|
6708
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Select.Trigger, { style: { minWidth: 220 } }),
|
|
6709
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(Select.Content, { children: [
|
|
6710
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Select.Item, { value: "cover", children: "cover" }),
|
|
6711
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Select.Item, { value: "contain", children: "contain" })
|
|
6712
|
+
] })
|
|
6713
|
+
]
|
|
6714
|
+
}
|
|
6715
|
+
)
|
|
6716
|
+
] })
|
|
6717
|
+
] }) }) : null,
|
|
6718
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Card, { style: { padding: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { direction: "column", gap: "2", children: [
|
|
6719
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "validation" }),
|
|
6720
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { gap: "2", children: [
|
|
6721
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { style: { flex: 1 }, children: [
|
|
6722
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "min" }),
|
|
6723
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6724
|
+
TextField.Root,
|
|
6725
|
+
{
|
|
6726
|
+
disabled: readonly,
|
|
6727
|
+
inputMode: "numeric",
|
|
6728
|
+
onChange: (e) => {
|
|
6729
|
+
const current = getValidation(field);
|
|
6730
|
+
const next = cleanValidation(__spreadProps(__spreadValues({}, current), {
|
|
6731
|
+
min: parseOptionalNumber(e.target.value)
|
|
6732
|
+
}));
|
|
6733
|
+
onUpdateField(updateFieldValidation(field, next));
|
|
6734
|
+
},
|
|
6735
|
+
value: getValidation(field).min !== void 0 ? String(getValidation(field).min) : ""
|
|
6736
|
+
}
|
|
6737
|
+
)
|
|
6738
|
+
] }),
|
|
6739
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { style: { flex: 1 }, children: [
|
|
6740
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "max" }),
|
|
6741
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6742
|
+
TextField.Root,
|
|
6743
|
+
{
|
|
6744
|
+
disabled: readonly,
|
|
6745
|
+
inputMode: "numeric",
|
|
6746
|
+
onChange: (e) => {
|
|
6747
|
+
const current = getValidation(field);
|
|
6748
|
+
const next = cleanValidation(__spreadProps(__spreadValues({}, current), {
|
|
6749
|
+
max: parseOptionalNumber(e.target.value)
|
|
6750
|
+
}));
|
|
6751
|
+
onUpdateField(updateFieldValidation(field, next));
|
|
6752
|
+
},
|
|
6753
|
+
value: getValidation(field).max !== void 0 ? String(getValidation(field).max) : ""
|
|
6754
|
+
}
|
|
6755
|
+
)
|
|
6756
|
+
] })
|
|
6757
|
+
] }),
|
|
6758
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { children: [
|
|
6759
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "pattern" }),
|
|
6760
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6761
|
+
TextField.Root,
|
|
6762
|
+
{
|
|
6763
|
+
disabled: readonly,
|
|
6764
|
+
onChange: (e) => {
|
|
6765
|
+
const current = getValidation(field);
|
|
6766
|
+
const next = cleanValidation(__spreadProps(__spreadValues({}, current), { pattern: e.target.value }));
|
|
6767
|
+
onUpdateField(updateFieldValidation(field, next));
|
|
6768
|
+
},
|
|
6769
|
+
value: String(getValidation(field).pattern || "")
|
|
6770
|
+
}
|
|
6771
|
+
)
|
|
6772
|
+
] }),
|
|
6773
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { children: [
|
|
6774
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "message" }),
|
|
6775
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6776
|
+
TextField.Root,
|
|
6777
|
+
{
|
|
6778
|
+
disabled: readonly,
|
|
6779
|
+
onChange: (e) => {
|
|
6780
|
+
const current = getValidation(field);
|
|
6781
|
+
const next = cleanValidation(__spreadProps(__spreadValues({}, current), { message: e.target.value }));
|
|
6782
|
+
onUpdateField(updateFieldValidation(field, next));
|
|
6783
|
+
},
|
|
6784
|
+
value: String(getValidation(field).message || "")
|
|
6785
|
+
}
|
|
6786
|
+
)
|
|
6787
|
+
] })
|
|
6788
|
+
] }) })
|
|
6789
|
+
] })
|
|
6790
|
+
] }) });
|
|
6791
|
+
}
|
|
6792
|
+
|
|
6793
|
+
// src/molecules/dynamic-form-editor-field-list-panel.tsx
|
|
6794
|
+
var import_react44 = require("react");
|
|
6795
|
+
var import_themes40 = require("@radix-ui/themes");
|
|
6796
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
6797
|
+
function isFieldType2(value, types) {
|
|
6798
|
+
return types.some((t) => t === value);
|
|
6799
|
+
}
|
|
6800
|
+
function DynamicFormEditorFieldListPanel(props) {
|
|
6801
|
+
const {
|
|
6802
|
+
fields,
|
|
6803
|
+
selectedFieldName,
|
|
6804
|
+
readonly,
|
|
6805
|
+
fieldTypes,
|
|
6806
|
+
hasFieldError,
|
|
6807
|
+
onSelectFieldName,
|
|
6808
|
+
onAddField
|
|
6809
|
+
} = props;
|
|
6810
|
+
const isEmpty = fields.length === 0;
|
|
6811
|
+
const triggerPlaceholder = (0, import_react44.useMemo)(() => {
|
|
6812
|
+
return readonly ? "\uCD94\uAC00(\uC77D\uAE30 \uC804\uC6A9)" : "\uCD94\uAC00";
|
|
6813
|
+
}, [readonly]);
|
|
6814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Card, { style: { width: 340, padding: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_themes.Flex, { direction: "column", gap: "3", children: [
|
|
6815
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_themes.Flex, { align: "center", justify: "between", children: [
|
|
6816
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Typo, { variant: "body", children: "\uD544\uB4DC" }),
|
|
6817
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
6818
|
+
Select.Root,
|
|
6819
|
+
{
|
|
6820
|
+
disabled: readonly,
|
|
6821
|
+
onValueChange: (v) => {
|
|
6822
|
+
if (!isFieldType2(v, fieldTypes)) return;
|
|
6823
|
+
onAddField(v);
|
|
6824
|
+
},
|
|
6825
|
+
value: "",
|
|
6826
|
+
children: [
|
|
6827
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Select.Trigger, { placeholder: triggerPlaceholder }),
|
|
6828
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Select.Content, { children: fieldTypes.map((t) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Select.Item, { value: t, children: getFieldTypeLabel(t) }, t)) })
|
|
6829
|
+
]
|
|
6830
|
+
}
|
|
6831
|
+
)
|
|
6832
|
+
] }),
|
|
6833
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_themes.Flex, { direction: "column", gap: "2", children: [
|
|
6834
|
+
isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Typo, { color: "gray", variant: "caption", children: "\uC544\uC9C1 \uD544\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4." }) : null,
|
|
6835
|
+
fields.map((field) => {
|
|
6836
|
+
const isSelected = field.name === selectedFieldName;
|
|
6837
|
+
const hasError = hasFieldError(field.name);
|
|
6838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
6839
|
+
Card,
|
|
6840
|
+
{
|
|
6841
|
+
error: isSelected ? hasError : void 0,
|
|
6842
|
+
onClick: () => {
|
|
6843
|
+
onSelectFieldName(field.name);
|
|
6844
|
+
},
|
|
6845
|
+
style: {
|
|
6846
|
+
padding: 10,
|
|
6847
|
+
cursor: "pointer",
|
|
6848
|
+
opacity: readonly ? 0.8 : 1,
|
|
6849
|
+
border: isSelected ? "1px solid var(--accent-9)" : "1px solid transparent"
|
|
6850
|
+
},
|
|
6851
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_themes40.Box, { style: { minWidth: 0 }, children: [
|
|
6852
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
6853
|
+
Typo,
|
|
6854
|
+
{
|
|
6855
|
+
style: {
|
|
6856
|
+
whiteSpace: "nowrap",
|
|
6857
|
+
overflow: "hidden",
|
|
6858
|
+
textOverflow: "ellipsis"
|
|
6859
|
+
},
|
|
6860
|
+
variant: "body",
|
|
6861
|
+
children: field.label
|
|
6862
|
+
}
|
|
6863
|
+
),
|
|
6864
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(Typo, { color: "gray", variant: "caption", children: [
|
|
6865
|
+
field.name,
|
|
6866
|
+
" \xB7 ",
|
|
6867
|
+
field.type,
|
|
6868
|
+
field.required ? " \xB7 required" : ""
|
|
6869
|
+
] })
|
|
6870
|
+
] })
|
|
6871
|
+
},
|
|
6872
|
+
field.name
|
|
6873
|
+
);
|
|
6874
|
+
})
|
|
6875
|
+
] })
|
|
6876
|
+
] }) });
|
|
6877
|
+
}
|
|
6878
|
+
|
|
6879
|
+
// src/molecules/dynamic-form-editor-issues-panel.tsx
|
|
6880
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
6881
|
+
function DynamicFormEditorIssuesPanel(props) {
|
|
6882
|
+
const { issues } = props;
|
|
6883
|
+
if (issues.length === 0) return null;
|
|
6884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Card, { style: { padding: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_themes.Flex, { direction: "column", gap: "2", children: [
|
|
6885
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Typo, { variant: "caption", children: "\uC2A4\uD0A4\uB9C8 \uC774\uC288" }),
|
|
6886
|
+
issues.map((i) => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
6887
|
+
Typo,
|
|
6888
|
+
{
|
|
6889
|
+
color: i.level === "error" ? "red" : "gray",
|
|
6890
|
+
variant: "caption",
|
|
6891
|
+
children: [
|
|
6892
|
+
"[",
|
|
6893
|
+
i.level,
|
|
6894
|
+
"] ",
|
|
6895
|
+
i.message,
|
|
6896
|
+
i.fieldName ? ` (field: ${i.fieldName})` : ""
|
|
6897
|
+
]
|
|
6898
|
+
},
|
|
6899
|
+
i.id
|
|
6900
|
+
))
|
|
6901
|
+
] }) });
|
|
6902
|
+
}
|
|
6903
|
+
|
|
6904
|
+
// src/molecules/dynamic-form-editor-preview-panel.tsx
|
|
6905
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
6906
|
+
function DynamicFormEditorPreviewPanel(props) {
|
|
6907
|
+
const { show, fields } = props;
|
|
6908
|
+
if (!show) return null;
|
|
6909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Card, { style: { width: 420, padding: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_themes.Flex, { direction: "column", gap: "3", children: [
|
|
6910
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Typo, { variant: "body", children: "\uD504\uB9AC\uBDF0" }),
|
|
6911
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(DynamicForm.Root, { fields, onSubmit: () => void 0, readonly: true, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(DynamicForm.FieldList, { labelVariant: "body" }) })
|
|
6912
|
+
] }) });
|
|
6913
|
+
}
|
|
6914
|
+
|
|
6915
|
+
// src/molecules/dynamic-form-editor.tsx
|
|
6916
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
6917
|
+
function getInitialSchema(value, defaultValue) {
|
|
6918
|
+
if (value !== void 0) return normalizeSchema(value);
|
|
6919
|
+
return normalizeSchema(defaultValue);
|
|
6920
|
+
}
|
|
6921
|
+
function getSelectedField(schema, selectedFieldName) {
|
|
6922
|
+
if (!selectedFieldName) return { field: null, index: -1 };
|
|
6923
|
+
const index = findFieldIndexByName(schema.fields, selectedFieldName);
|
|
6924
|
+
if (index < 0) return { field: null, index: -1 };
|
|
6925
|
+
return { field: schema.fields[index], index };
|
|
6926
|
+
}
|
|
6927
|
+
function DynamicFormEditor(props) {
|
|
6928
|
+
const {
|
|
6929
|
+
value,
|
|
6930
|
+
defaultValue,
|
|
6931
|
+
onChange,
|
|
6932
|
+
onSave,
|
|
6933
|
+
onCancel,
|
|
6934
|
+
readonly = false,
|
|
6935
|
+
showPreview = false
|
|
6936
|
+
} = props;
|
|
6937
|
+
const isControlled = value !== void 0;
|
|
6938
|
+
const [uncontrolledSchema, setUncontrolledSchema] = (0, import_react45.useState)(
|
|
6939
|
+
() => getInitialSchema(void 0, defaultValue)
|
|
6940
|
+
);
|
|
6941
|
+
const effectiveSchema = (0, import_react45.useMemo)(() => {
|
|
6942
|
+
if (isControlled) return normalizeSchema(value);
|
|
6943
|
+
return uncontrolledSchema;
|
|
6944
|
+
}, [isControlled, uncontrolledSchema, value]);
|
|
6945
|
+
const [selectedFieldName, setSelectedFieldName] = (0, import_react45.useState)(() => {
|
|
6946
|
+
var _a, _b;
|
|
6947
|
+
const initialSchema = getInitialSchema(value, defaultValue);
|
|
6948
|
+
return (_b = (_a = initialSchema.fields[0]) == null ? void 0 : _a.name) != null ? _b : null;
|
|
6949
|
+
});
|
|
6950
|
+
const selected = (0, import_react45.useMemo)(() => {
|
|
6951
|
+
return getSelectedField(effectiveSchema, selectedFieldName);
|
|
6952
|
+
}, [effectiveSchema, selectedFieldName]);
|
|
6953
|
+
const issues = (0, import_react45.useMemo)(() => {
|
|
6954
|
+
return validateDynamicFormSchema(effectiveSchema);
|
|
6955
|
+
}, [effectiveSchema]);
|
|
6956
|
+
const errorFieldNameSet = (0, import_react45.useMemo)(() => {
|
|
6957
|
+
const set = /* @__PURE__ */ new Set();
|
|
6958
|
+
issues.forEach((i) => {
|
|
6959
|
+
if (i.level === "error" && i.fieldName) set.add(i.fieldName);
|
|
6960
|
+
});
|
|
6961
|
+
return set;
|
|
6962
|
+
}, [issues]);
|
|
6963
|
+
const hasFieldError = (0, import_react45.useCallback)(
|
|
6964
|
+
(fieldName) => {
|
|
6965
|
+
return errorFieldNameSet.has(fieldName);
|
|
6966
|
+
},
|
|
6967
|
+
[errorFieldNameSet]
|
|
6968
|
+
);
|
|
6969
|
+
const fieldTypes = (0, import_react45.useMemo)(() => getFieldTypes(), []);
|
|
6970
|
+
(0, import_react45.useEffect)(() => {
|
|
6971
|
+
var _a, _b;
|
|
6972
|
+
if (selectedFieldName && selected.field) return;
|
|
6973
|
+
setSelectedFieldName((_b = (_a = effectiveSchema.fields[0]) == null ? void 0 : _a.name) != null ? _b : null);
|
|
6974
|
+
}, [effectiveSchema.fields, selected.field, selectedFieldName]);
|
|
6975
|
+
(0, import_react45.useEffect)(() => {
|
|
6976
|
+
if (isControlled) return;
|
|
6977
|
+
setUncontrolledSchema(getInitialSchema(void 0, defaultValue));
|
|
6978
|
+
}, [defaultValue, isControlled]);
|
|
6979
|
+
const applySchema = (0, import_react45.useCallback)(
|
|
6980
|
+
(next) => {
|
|
6981
|
+
onChange == null ? void 0 : onChange(next);
|
|
6982
|
+
if (!isControlled) setUncontrolledSchema(next);
|
|
6983
|
+
},
|
|
6984
|
+
[isControlled, onChange]
|
|
6985
|
+
);
|
|
6986
|
+
const handleAddField = (0, import_react45.useCallback)(
|
|
6987
|
+
(type) => {
|
|
6988
|
+
if (readonly) return;
|
|
6989
|
+
const nextField = createDefaultField(type, effectiveSchema.fields);
|
|
6990
|
+
const nextFields = [...effectiveSchema.fields, nextField];
|
|
6991
|
+
applySchema(updateSchemaFields(effectiveSchema, nextFields));
|
|
6992
|
+
setSelectedFieldName(nextField.name);
|
|
6993
|
+
},
|
|
6994
|
+
[applySchema, effectiveSchema, readonly]
|
|
6995
|
+
);
|
|
6996
|
+
const handleUpdateSelectedField = (0, import_react45.useCallback)(
|
|
6997
|
+
(nextField) => {
|
|
6998
|
+
if (readonly) return;
|
|
6999
|
+
if (!selected.field || selected.index < 0) return;
|
|
7000
|
+
const nextFields = effectiveSchema.fields.map(
|
|
7001
|
+
(f, i) => i === selected.index ? nextField : f
|
|
7002
|
+
);
|
|
7003
|
+
applySchema(updateSchemaFields(effectiveSchema, nextFields));
|
|
7004
|
+
},
|
|
7005
|
+
[applySchema, effectiveSchema, readonly, selected.field, selected.index]
|
|
7006
|
+
);
|
|
7007
|
+
const handleRenameSelected = (0, import_react45.useCallback)(
|
|
7008
|
+
(nextName) => {
|
|
7009
|
+
if (readonly) return;
|
|
7010
|
+
const currentField = selected.field;
|
|
7011
|
+
if (!currentField) return;
|
|
7012
|
+
const others = effectiveSchema.fields.filter(
|
|
7013
|
+
(f) => f.name !== currentField.name
|
|
7014
|
+
);
|
|
7015
|
+
const uniqueName = createUniqueFieldName(others, nextName);
|
|
7016
|
+
const nextField = __spreadProps(__spreadValues({}, currentField), { name: uniqueName });
|
|
7017
|
+
handleUpdateSelectedField(nextField);
|
|
7018
|
+
setSelectedFieldName(uniqueName);
|
|
7019
|
+
},
|
|
7020
|
+
[effectiveSchema.fields, handleUpdateSelectedField, readonly, selected.field]
|
|
7021
|
+
);
|
|
7022
|
+
const handleDeleteSelected = (0, import_react45.useCallback)(() => {
|
|
7023
|
+
if (readonly) return;
|
|
7024
|
+
if (!selected.field || selected.index < 0) return;
|
|
7025
|
+
const nextFields = effectiveSchema.fields.filter(
|
|
7026
|
+
(_, i) => i !== selected.index
|
|
7027
|
+
);
|
|
7028
|
+
applySchema(updateSchemaFields(effectiveSchema, nextFields));
|
|
7029
|
+
let nextSelected = null;
|
|
7030
|
+
if (nextFields.length > selected.index) nextSelected = nextFields[selected.index].name;
|
|
7031
|
+
else if (nextFields.length > 0) nextSelected = nextFields[0].name;
|
|
7032
|
+
setSelectedFieldName(nextSelected);
|
|
7033
|
+
}, [applySchema, effectiveSchema, readonly, selected.field, selected.index]);
|
|
7034
|
+
const handleMoveSelected = (0, import_react45.useCallback)(
|
|
7035
|
+
(direction) => {
|
|
7036
|
+
if (readonly) return;
|
|
7037
|
+
if (!selected.field || selected.index < 0) return;
|
|
7038
|
+
const toIndex = direction === "up" ? selected.index - 1 : selected.index + 1;
|
|
7039
|
+
const nextFields = moveField(
|
|
7040
|
+
effectiveSchema.fields,
|
|
7041
|
+
selected.index,
|
|
7042
|
+
toIndex
|
|
7043
|
+
);
|
|
7044
|
+
applySchema(updateSchemaFields(effectiveSchema, nextFields));
|
|
7045
|
+
},
|
|
7046
|
+
[applySchema, effectiveSchema, readonly, selected.field, selected.index]
|
|
7047
|
+
);
|
|
7048
|
+
const handleDuplicateSelected = (0, import_react45.useCallback)(() => {
|
|
7049
|
+
if (readonly) return;
|
|
7050
|
+
if (!selected.field || selected.index < 0) return;
|
|
7051
|
+
const nextFields = duplicateField(
|
|
7052
|
+
effectiveSchema.fields,
|
|
7053
|
+
selected.index
|
|
7054
|
+
);
|
|
7055
|
+
applySchema(updateSchemaFields(effectiveSchema, nextFields));
|
|
7056
|
+
const duplicatedIndex = selected.index + 1;
|
|
7057
|
+
const nextSelected = nextFields.length > duplicatedIndex ? nextFields[duplicatedIndex].name : selected.field.name;
|
|
7058
|
+
setSelectedFieldName(nextSelected);
|
|
7059
|
+
}, [applySchema, effectiveSchema, readonly, selected.field, selected.index]);
|
|
7060
|
+
const handleSave = (0, import_react45.useCallback)(() => {
|
|
7061
|
+
if (!onSave) return;
|
|
7062
|
+
const result = onSave(effectiveSchema);
|
|
7063
|
+
void result;
|
|
7064
|
+
}, [effectiveSchema, onSave]);
|
|
7065
|
+
const disableSave = readonly || !onSave || hasErrorIssues(issues);
|
|
7066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_themes.Flex, { align: "start", gap: "4", style: { width: "100%" }, children: [
|
|
7067
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
7068
|
+
DynamicFormEditorFieldListPanel,
|
|
7069
|
+
{
|
|
7070
|
+
fieldTypes,
|
|
7071
|
+
fields: effectiveSchema.fields,
|
|
7072
|
+
hasFieldError,
|
|
7073
|
+
onAddField: handleAddField,
|
|
7074
|
+
onSelectFieldName: setSelectedFieldName,
|
|
7075
|
+
readonly,
|
|
7076
|
+
selectedFieldName
|
|
7077
|
+
}
|
|
7078
|
+
),
|
|
7079
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_themes.Flex, { direction: "column", gap: "3", style: { flex: 1, minWidth: 520 }, children: [
|
|
7080
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
7081
|
+
DynamicFormEditorFieldEditorPanel,
|
|
7082
|
+
{
|
|
7083
|
+
field: selected.field,
|
|
7084
|
+
fieldIndex: selected.index,
|
|
7085
|
+
fieldTypes,
|
|
7086
|
+
fields: effectiveSchema.fields,
|
|
7087
|
+
onDeleteField: handleDeleteSelected,
|
|
7088
|
+
onDuplicateField: handleDuplicateSelected,
|
|
7089
|
+
onMoveField: handleMoveSelected,
|
|
7090
|
+
onRenameField: handleRenameSelected,
|
|
7091
|
+
onUpdateField: handleUpdateSelectedField,
|
|
7092
|
+
readonly
|
|
7093
|
+
}
|
|
7094
|
+
),
|
|
7095
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(DynamicFormEditorIssuesPanel, { issues }),
|
|
7096
|
+
onSave || onCancel ? /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_themes.Flex, { gap: "2", justify: "end", children: [
|
|
7097
|
+
onCancel ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Button, { disabled: readonly, onClick: onCancel, variant: "soft", children: "\uCDE8\uC18C" }) : null,
|
|
7098
|
+
onSave ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Button, { disabled: disableSave, onClick: handleSave, children: "\uC800\uC7A5" }) : null
|
|
7099
|
+
] }) : null
|
|
7100
|
+
] }),
|
|
7101
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(DynamicFormEditorPreviewPanel, { fields: effectiveSchema.fields, show: showPreview })
|
|
7102
|
+
] });
|
|
7103
|
+
}
|
|
5706
7104
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5707
7105
|
0 && (module.exports = {
|
|
5708
7106
|
CurriculumBody,
|
|
@@ -5716,6 +7114,7 @@ function TrainingInfoGuidelineButton({
|
|
|
5716
7114
|
DotNavigation,
|
|
5717
7115
|
DownloadCard,
|
|
5718
7116
|
DynamicForm,
|
|
7117
|
+
DynamicFormEditor,
|
|
5719
7118
|
DynamicFormField,
|
|
5720
7119
|
DynamicFormResponseItem,
|
|
5721
7120
|
ExpandTable,
|