@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
|
@@ -0,0 +1,2925 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
+
var __spreadValues = (a, b) => {
|
|
14
|
+
for (var prop in b || (b = {}))
|
|
15
|
+
if (__hasOwnProp.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
if (__getOwnPropSymbols)
|
|
18
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
+
if (__propIsEnum.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
}
|
|
22
|
+
return a;
|
|
23
|
+
};
|
|
24
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
+
var __objRest = (source, exclude) => {
|
|
26
|
+
var target = {};
|
|
27
|
+
for (var prop in source)
|
|
28
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
if (source != null && __getOwnPropSymbols)
|
|
31
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
+
target[prop] = source[prop];
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
37
|
+
var __export = (target, all) => {
|
|
38
|
+
for (var name in all)
|
|
39
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
40
|
+
};
|
|
41
|
+
var __copyProps = (to, from, except, desc) => {
|
|
42
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
43
|
+
for (let key of __getOwnPropNames(from))
|
|
44
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
45
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
46
|
+
}
|
|
47
|
+
return to;
|
|
48
|
+
};
|
|
49
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
50
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
51
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
52
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
53
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
54
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
55
|
+
mod
|
|
56
|
+
));
|
|
57
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
58
|
+
var __async = (__this, __arguments, generator) => {
|
|
59
|
+
return new Promise((resolve, reject) => {
|
|
60
|
+
var fulfilled = (value) => {
|
|
61
|
+
try {
|
|
62
|
+
step(generator.next(value));
|
|
63
|
+
} catch (e) {
|
|
64
|
+
reject(e);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
var rejected = (value) => {
|
|
68
|
+
try {
|
|
69
|
+
step(generator.throw(value));
|
|
70
|
+
} catch (e) {
|
|
71
|
+
reject(e);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
75
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// src/molecules/dynamic-form-editor.tsx
|
|
80
|
+
var dynamic_form_editor_exports = {};
|
|
81
|
+
__export(dynamic_form_editor_exports, {
|
|
82
|
+
DynamicFormEditor: () => DynamicFormEditor
|
|
83
|
+
});
|
|
84
|
+
module.exports = __toCommonJS(dynamic_form_editor_exports);
|
|
85
|
+
var import_react16 = require("react");
|
|
86
|
+
|
|
87
|
+
// src/atoms/button.tsx
|
|
88
|
+
var import_react = require("react");
|
|
89
|
+
var import_themes = require("@radix-ui/themes");
|
|
90
|
+
var import_clsx = require("clsx");
|
|
91
|
+
|
|
92
|
+
// src/utils/convert-button-size.ts
|
|
93
|
+
var convertSizeStr = (size) => {
|
|
94
|
+
switch (size) {
|
|
95
|
+
case "small":
|
|
96
|
+
return "1";
|
|
97
|
+
case "medium":
|
|
98
|
+
return "2";
|
|
99
|
+
case "large":
|
|
100
|
+
return "3";
|
|
101
|
+
default:
|
|
102
|
+
return "2";
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
var convertSizeResponse = (size) => {
|
|
106
|
+
if (typeof size === "string" || typeof size === "undefined") {
|
|
107
|
+
return convertSizeStr(size);
|
|
108
|
+
}
|
|
109
|
+
const radixSize = {};
|
|
110
|
+
let key = "initial";
|
|
111
|
+
for (key in size) {
|
|
112
|
+
radixSize[key] = convertSizeStr(size[key]);
|
|
113
|
+
}
|
|
114
|
+
return radixSize;
|
|
115
|
+
};
|
|
116
|
+
var convertSize = (size) => {
|
|
117
|
+
if (typeof size === "string") {
|
|
118
|
+
return convertSizeStr(size);
|
|
119
|
+
}
|
|
120
|
+
return convertSizeResponse(size);
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
// src/atoms/button.tsx
|
|
124
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
125
|
+
var Button = (0, import_react.forwardRef)(
|
|
126
|
+
(props, ref) => {
|
|
127
|
+
const _a = props, { size, style, variant } = _a, restProps = __objRest(_a, ["size", "style", "variant"]);
|
|
128
|
+
const radixSize = (0, import_react.useMemo)(() => {
|
|
129
|
+
return convertSize(size);
|
|
130
|
+
}, [size]);
|
|
131
|
+
const radixVariant = (0, import_react.useMemo)(() => {
|
|
132
|
+
if (variant === "transparent") return "ghost";
|
|
133
|
+
return variant;
|
|
134
|
+
}, [variant]);
|
|
135
|
+
const className = (0, import_react.useMemo)(() => {
|
|
136
|
+
return (0, import_clsx.clsx)(props.className, { transparent: variant === "transparent" });
|
|
137
|
+
}, [props.className, variant]);
|
|
138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
139
|
+
import_themes.Button,
|
|
140
|
+
__spreadProps(__spreadValues({
|
|
141
|
+
style,
|
|
142
|
+
type: "button",
|
|
143
|
+
variant: radixVariant
|
|
144
|
+
}, restProps), {
|
|
145
|
+
className,
|
|
146
|
+
ref,
|
|
147
|
+
size: radixSize
|
|
148
|
+
})
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
Button.displayName = "Button";
|
|
153
|
+
|
|
154
|
+
// src/atoms/flex.tsx
|
|
155
|
+
var import_themes2 = require("@radix-ui/themes");
|
|
156
|
+
|
|
157
|
+
// src/molecules/dynamic-form-editor-utils.ts
|
|
158
|
+
function isRecord(value) {
|
|
159
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
160
|
+
}
|
|
161
|
+
function isNonEmptyTrimmedString(value) {
|
|
162
|
+
return typeof value === "string" && value.trim().length > 0;
|
|
163
|
+
}
|
|
164
|
+
function isFiniteNumber(value) {
|
|
165
|
+
return typeof value === "number" && Number.isFinite(value);
|
|
166
|
+
}
|
|
167
|
+
function canCompileRegExp(pattern) {
|
|
168
|
+
try {
|
|
169
|
+
new RegExp(pattern);
|
|
170
|
+
return true;
|
|
171
|
+
} catch (e) {
|
|
172
|
+
return false;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
function getFieldTypes() {
|
|
176
|
+
return [
|
|
177
|
+
"short_text",
|
|
178
|
+
"long_text",
|
|
179
|
+
"number",
|
|
180
|
+
"email",
|
|
181
|
+
"dropdown",
|
|
182
|
+
"choice",
|
|
183
|
+
"radio_cards",
|
|
184
|
+
"image_radio_card",
|
|
185
|
+
"choices",
|
|
186
|
+
"yes_no"
|
|
187
|
+
];
|
|
188
|
+
}
|
|
189
|
+
function getFieldTypeLabel(type) {
|
|
190
|
+
const map = {
|
|
191
|
+
short_text: "\uC9E7\uC740 \uD14D\uC2A4\uD2B8",
|
|
192
|
+
long_text: "\uAE34 \uD14D\uC2A4\uD2B8",
|
|
193
|
+
number: "\uC22B\uC790",
|
|
194
|
+
email: "\uC774\uBA54\uC77C",
|
|
195
|
+
dropdown: "\uB4DC\uB86D\uB2E4\uC6B4",
|
|
196
|
+
choice: "\uB2E8\uC77C \uC120\uD0DD(\uB77C\uB514\uC624)",
|
|
197
|
+
radio_cards: "\uB77C\uB514\uC624 \uCE74\uB4DC",
|
|
198
|
+
image_radio_card: "\uC774\uBBF8\uC9C0 \uB77C\uB514\uC624 \uCE74\uB4DC",
|
|
199
|
+
choices: "\uB2E4\uC911 \uC120\uD0DD(\uCCB4\uD06C)",
|
|
200
|
+
yes_no: "\uB3D9\uC758(\uCCB4\uD06C)"
|
|
201
|
+
};
|
|
202
|
+
return map[type];
|
|
203
|
+
}
|
|
204
|
+
function findFieldIndexByName(fields, fieldName) {
|
|
205
|
+
return fields.findIndex((field) => field.name === fieldName);
|
|
206
|
+
}
|
|
207
|
+
function toCamelFromSnake(value) {
|
|
208
|
+
const parts = value.split("_").filter(Boolean);
|
|
209
|
+
if (parts.length === 0) return "field";
|
|
210
|
+
const [first, ...rest] = parts;
|
|
211
|
+
const firstLower = first.toLowerCase();
|
|
212
|
+
const restCamel = rest.map((p) => p.length === 0 ? "" : p[0].toUpperCase() + p.slice(1)).join("");
|
|
213
|
+
return `${firstLower}${restCamel}`;
|
|
214
|
+
}
|
|
215
|
+
function createUniqueFieldName(fields, baseName) {
|
|
216
|
+
const used = new Set(fields.map((f) => f.name));
|
|
217
|
+
if (!used.has(baseName)) return baseName;
|
|
218
|
+
let i = 2;
|
|
219
|
+
while (used.has(`${baseName}${i}`)) i += 1;
|
|
220
|
+
return `${baseName}${i}`;
|
|
221
|
+
}
|
|
222
|
+
function createDefaultField(type, currentFields) {
|
|
223
|
+
const baseName = toCamelFromSnake(type);
|
|
224
|
+
const name = createUniqueFieldName(currentFields, baseName);
|
|
225
|
+
const label = getFieldTypeLabel(type);
|
|
226
|
+
if (type === "short_text") return { name, type, label, placeholder: "" };
|
|
227
|
+
if (type === "long_text") return { name, type, label, placeholder: "" };
|
|
228
|
+
if (type === "number") return { name, type, label, placeholder: "" };
|
|
229
|
+
if (type === "email") return { name, type, label, placeholder: "" };
|
|
230
|
+
if (type === "dropdown")
|
|
231
|
+
return {
|
|
232
|
+
name,
|
|
233
|
+
type,
|
|
234
|
+
label,
|
|
235
|
+
placeholder: "",
|
|
236
|
+
options: [{ label: "\uC635\uC158 1", value: "option1" }]
|
|
237
|
+
};
|
|
238
|
+
if (type === "choice")
|
|
239
|
+
return {
|
|
240
|
+
name,
|
|
241
|
+
type,
|
|
242
|
+
label,
|
|
243
|
+
orientation: "vertical",
|
|
244
|
+
options: [{ label: "\uC635\uC158 1", value: "option1" }]
|
|
245
|
+
};
|
|
246
|
+
if (type === "radio_cards")
|
|
247
|
+
return { name, type, label, options: [{ label: "\uC635\uC158 1", value: "option1" }] };
|
|
248
|
+
if (type === "choices")
|
|
249
|
+
return {
|
|
250
|
+
name,
|
|
251
|
+
type,
|
|
252
|
+
label,
|
|
253
|
+
orientation: "vertical",
|
|
254
|
+
options: [{ label: "\uC635\uC158 1", value: "option1" }]
|
|
255
|
+
};
|
|
256
|
+
if (type === "yes_no") return { name, type, label, description: "" };
|
|
257
|
+
return {
|
|
258
|
+
name,
|
|
259
|
+
type,
|
|
260
|
+
label,
|
|
261
|
+
gridColumnsCount: 4,
|
|
262
|
+
gridItemHeight: "160px",
|
|
263
|
+
gridGap: "2",
|
|
264
|
+
imageFit: "cover",
|
|
265
|
+
options: [
|
|
266
|
+
{
|
|
267
|
+
label: "\uC774\uBBF8\uC9C0 1",
|
|
268
|
+
value: "option1",
|
|
269
|
+
imageSrc: "https://placehold.co/300x300/png?text=1"
|
|
270
|
+
}
|
|
271
|
+
]
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
function normalizeSchema(value) {
|
|
275
|
+
const fallback = { fields: [] };
|
|
276
|
+
if (!value) return fallback;
|
|
277
|
+
if (!Array.isArray(value.fields)) return fallback;
|
|
278
|
+
return { fields: value.fields };
|
|
279
|
+
}
|
|
280
|
+
function validateDynamicFormSchema(schema) {
|
|
281
|
+
const issues = [];
|
|
282
|
+
const nameToCount = /* @__PURE__ */ new Map();
|
|
283
|
+
schema.fields.forEach((field) => {
|
|
284
|
+
const prev = nameToCount.get(field.name) || 0;
|
|
285
|
+
nameToCount.set(field.name, prev + 1);
|
|
286
|
+
});
|
|
287
|
+
schema.fields.forEach((field, index) => {
|
|
288
|
+
const fieldKey = `${index}:${field.name}`;
|
|
289
|
+
if (!isNonEmptyTrimmedString(field.name)) {
|
|
290
|
+
issues.push({
|
|
291
|
+
id: `field.name.required.${fieldKey}`,
|
|
292
|
+
level: "error",
|
|
293
|
+
message: "\uD544\uB4DC name\uC740 \uD544\uC218\uC785\uB2C8\uB2E4",
|
|
294
|
+
fieldName: field.name
|
|
295
|
+
});
|
|
296
|
+
} else if (field.name.trim() !== field.name) {
|
|
297
|
+
issues.push({
|
|
298
|
+
id: `field.name.trim.${fieldKey}`,
|
|
299
|
+
level: "warning",
|
|
300
|
+
message: "\uD544\uB4DC name \uC55E/\uB4A4 \uACF5\uBC31\uC740 \uC81C\uAC70\uD558\uB294 \uAC83\uC744 \uAD8C\uC7A5\uD569\uB2C8\uB2E4",
|
|
301
|
+
fieldName: field.name
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
if (isNonEmptyTrimmedString(field.name)) {
|
|
305
|
+
const count = nameToCount.get(field.name) || 0;
|
|
306
|
+
if (count > 1) {
|
|
307
|
+
issues.push({
|
|
308
|
+
id: `field.name.duplicate.${fieldKey}`,
|
|
309
|
+
level: "error",
|
|
310
|
+
message: `\uC911\uBCF5\uB41C name\uC785\uB2C8\uB2E4: ${field.name}`,
|
|
311
|
+
fieldName: field.name
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
if (!isNonEmptyTrimmedString(field.label)) {
|
|
316
|
+
issues.push({
|
|
317
|
+
id: `field.label.required.${fieldKey}`,
|
|
318
|
+
level: "error",
|
|
319
|
+
message: "\uD544\uB4DC label\uC740 \uD544\uC218\uC785\uB2C8\uB2E4",
|
|
320
|
+
fieldName: field.name
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
const type = field.type;
|
|
324
|
+
const isOptionType = type === "dropdown" || type === "choice" || type === "radio_cards" || type === "choices";
|
|
325
|
+
if (isOptionType) {
|
|
326
|
+
const optionsRaw = field.options;
|
|
327
|
+
if (!Array.isArray(optionsRaw) || optionsRaw.length === 0) {
|
|
328
|
+
issues.push({
|
|
329
|
+
id: `field.options.required.${fieldKey}`,
|
|
330
|
+
level: "error",
|
|
331
|
+
message: "options\uB294 1\uAC1C \uC774\uC0C1 \uD544\uC694\uD569\uB2C8\uB2E4",
|
|
332
|
+
fieldName: field.name
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
if (type === "image_radio_card") {
|
|
337
|
+
const optionsRaw = field.options;
|
|
338
|
+
if (!Array.isArray(optionsRaw) || optionsRaw.length === 0) {
|
|
339
|
+
issues.push({
|
|
340
|
+
id: `field.imageOptions.required.${fieldKey}`,
|
|
341
|
+
level: "error",
|
|
342
|
+
message: "options\uB294 1\uAC1C \uC774\uC0C1 \uD544\uC694\uD569\uB2C8\uB2E4",
|
|
343
|
+
fieldName: field.name
|
|
344
|
+
});
|
|
345
|
+
} else {
|
|
346
|
+
optionsRaw.forEach((opt, optIndex) => {
|
|
347
|
+
const imageSrc = isRecord(opt) ? opt.imageSrc : void 0;
|
|
348
|
+
if (!isNonEmptyTrimmedString(imageSrc)) {
|
|
349
|
+
issues.push({
|
|
350
|
+
id: `field.imageOptions.imageSrc.required.${fieldKey}.${optIndex}`,
|
|
351
|
+
level: "error",
|
|
352
|
+
message: "imageSrc\uB294 \uD544\uC218\uC785\uB2C8\uB2E4",
|
|
353
|
+
fieldName: field.name
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
const validation = field.validation;
|
|
360
|
+
if (validation) {
|
|
361
|
+
if (isFiniteNumber(validation.min) && isFiniteNumber(validation.max)) {
|
|
362
|
+
if (validation.min > validation.max) {
|
|
363
|
+
issues.push({
|
|
364
|
+
id: `field.validation.minmax.${fieldKey}`,
|
|
365
|
+
level: "error",
|
|
366
|
+
message: "validation.min\uC740 validation.max \uC774\uD558\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4",
|
|
367
|
+
fieldName: field.name
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
if (isNonEmptyTrimmedString(validation.pattern)) {
|
|
372
|
+
if (!canCompileRegExp(validation.pattern)) {
|
|
373
|
+
issues.push({
|
|
374
|
+
id: `field.validation.pattern.${fieldKey}`,
|
|
375
|
+
level: "error",
|
|
376
|
+
message: "validation.pattern\uC774 \uC62C\uBC14\uB978 \uC815\uADDC\uC2DD\uC774 \uC544\uB2D9\uB2C8\uB2E4",
|
|
377
|
+
fieldName: field.name
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
});
|
|
383
|
+
return issues;
|
|
384
|
+
}
|
|
385
|
+
function hasErrorIssues(issues) {
|
|
386
|
+
return issues.some((i) => i.level === "error");
|
|
387
|
+
}
|
|
388
|
+
function updateSchemaFields(schema, nextFields) {
|
|
389
|
+
return { fields: nextFields };
|
|
390
|
+
}
|
|
391
|
+
function moveField(fields, fromIndex, toIndex) {
|
|
392
|
+
if (fromIndex < 0 || fromIndex >= fields.length) return fields;
|
|
393
|
+
if (toIndex < 0 || toIndex >= fields.length) return fields;
|
|
394
|
+
if (fromIndex === toIndex) return fields;
|
|
395
|
+
const next = [...fields];
|
|
396
|
+
const [item] = next.splice(fromIndex, 1);
|
|
397
|
+
next.splice(toIndex, 0, item);
|
|
398
|
+
return next;
|
|
399
|
+
}
|
|
400
|
+
function duplicateField(fields, index) {
|
|
401
|
+
if (index < 0 || index >= fields.length) return fields;
|
|
402
|
+
const target = fields[index];
|
|
403
|
+
const nextName = createUniqueFieldName(fields, target.name);
|
|
404
|
+
const cloned = __spreadProps(__spreadValues({}, target), { name: nextName });
|
|
405
|
+
const next = [...fields];
|
|
406
|
+
next.splice(index + 1, 0, cloned);
|
|
407
|
+
return next;
|
|
408
|
+
}
|
|
409
|
+
function updateFieldCommonProps(field, next) {
|
|
410
|
+
const { name, label, description, required } = next;
|
|
411
|
+
return __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, field), name !== void 0 ? { name } : {}), label !== void 0 ? { label } : {}), description !== void 0 ? { description } : {}), required !== void 0 ? { required } : {});
|
|
412
|
+
}
|
|
413
|
+
function updateFieldValidation(field, next) {
|
|
414
|
+
if (!next) {
|
|
415
|
+
const _a = field, { validation: _validation } = _a, rest = __objRest(_a, ["validation"]);
|
|
416
|
+
return rest;
|
|
417
|
+
}
|
|
418
|
+
return __spreadProps(__spreadValues({}, field), { validation: next });
|
|
419
|
+
}
|
|
420
|
+
function updateTextPlaceholder(field, placeholder) {
|
|
421
|
+
const type = field.type;
|
|
422
|
+
if (type === "short_text" || type === "long_text" || type === "number" || type === "email" || type === "dropdown") {
|
|
423
|
+
return __spreadProps(__spreadValues({}, field), { placeholder });
|
|
424
|
+
}
|
|
425
|
+
return field;
|
|
426
|
+
}
|
|
427
|
+
function updateOrientation(field, orientation) {
|
|
428
|
+
const type = field.type;
|
|
429
|
+
if (type === "choice" || type === "choices") return __spreadProps(__spreadValues({}, field), { orientation });
|
|
430
|
+
return field;
|
|
431
|
+
}
|
|
432
|
+
function updateOptions(field, options) {
|
|
433
|
+
const type = field.type;
|
|
434
|
+
if (type === "dropdown" || type === "choice" || type === "radio_cards" || type === "choices") {
|
|
435
|
+
return __spreadProps(__spreadValues({}, field), { options });
|
|
436
|
+
}
|
|
437
|
+
return field;
|
|
438
|
+
}
|
|
439
|
+
function updateImageOptions(field, options) {
|
|
440
|
+
if (field.type === "image_radio_card") {
|
|
441
|
+
return __spreadProps(__spreadValues({}, field), { options });
|
|
442
|
+
}
|
|
443
|
+
return field;
|
|
444
|
+
}
|
|
445
|
+
function updateImageLayout(field, next) {
|
|
446
|
+
if (field.type !== "image_radio_card") return field;
|
|
447
|
+
return __spreadValues(__spreadValues({}, field), next);
|
|
448
|
+
}
|
|
449
|
+
function resetFieldType(field, nextType, allFields) {
|
|
450
|
+
const base = createDefaultField(nextType, allFields);
|
|
451
|
+
return __spreadProps(__spreadValues({}, base), {
|
|
452
|
+
name: field.name,
|
|
453
|
+
label: field.label,
|
|
454
|
+
description: field.description,
|
|
455
|
+
required: field.required,
|
|
456
|
+
validation: field.validation
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
// src/molecules/dynamic-form-editor-field-editor-panel.tsx
|
|
461
|
+
var import_react9 = require("react");
|
|
462
|
+
var import_themes10 = require("@radix-ui/themes");
|
|
463
|
+
|
|
464
|
+
// src/atoms/card.tsx
|
|
465
|
+
var import_react2 = require("react");
|
|
466
|
+
var import_themes3 = require("@radix-ui/themes");
|
|
467
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
468
|
+
var Card = (0, import_react2.forwardRef)(
|
|
469
|
+
(props, forwardedRef) => {
|
|
470
|
+
const _a = props, { borderDisable, borderRadius, error } = _a, rest = __objRest(_a, ["borderDisable", "borderRadius", "error"]);
|
|
471
|
+
const borderInsetClassName = (0, import_react2.useMemo)(() => {
|
|
472
|
+
if (!borderDisable) return "";
|
|
473
|
+
const { left, right, top, bottom } = borderDisable;
|
|
474
|
+
return [
|
|
475
|
+
left && "disable-inset-left",
|
|
476
|
+
right && "disable-inset-right",
|
|
477
|
+
top && "disable-inset-top",
|
|
478
|
+
bottom && "disable-inset-bottom"
|
|
479
|
+
].filter(Boolean).join(" ");
|
|
480
|
+
}, [borderDisable]);
|
|
481
|
+
const errorClsName = (0, import_react2.useMemo)(() => {
|
|
482
|
+
return error ? " error" : "";
|
|
483
|
+
}, [error]);
|
|
484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
485
|
+
import_themes3.Card,
|
|
486
|
+
__spreadProps(__spreadValues({
|
|
487
|
+
variant: "surface"
|
|
488
|
+
}, rest), {
|
|
489
|
+
className: `${borderInsetClassName}${errorClsName} ${rest.className || ""}`,
|
|
490
|
+
"data-radius": borderRadius,
|
|
491
|
+
ref: forwardedRef
|
|
492
|
+
})
|
|
493
|
+
);
|
|
494
|
+
}
|
|
495
|
+
);
|
|
496
|
+
Card.displayName = "Card";
|
|
497
|
+
|
|
498
|
+
// src/atoms/check-box.tsx
|
|
499
|
+
var import_themes4 = require("@radix-ui/themes");
|
|
500
|
+
var import_react3 = require("react");
|
|
501
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
502
|
+
var Checkbox = (0, import_react3.forwardRef)(
|
|
503
|
+
(props, ref) => {
|
|
504
|
+
const _a = props, { size = "medium" } = _a, rest = __objRest(_a, ["size"]);
|
|
505
|
+
const radixSize = (0, import_react3.useMemo)(() => {
|
|
506
|
+
switch (size) {
|
|
507
|
+
case "small":
|
|
508
|
+
return "1";
|
|
509
|
+
case "medium":
|
|
510
|
+
return "2";
|
|
511
|
+
case "large":
|
|
512
|
+
return "3";
|
|
513
|
+
}
|
|
514
|
+
}, [size]);
|
|
515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_themes4.Checkbox, __spreadProps(__spreadValues({}, rest), { ref, size: radixSize }));
|
|
516
|
+
}
|
|
517
|
+
);
|
|
518
|
+
Checkbox.displayName = "Checkbox";
|
|
519
|
+
|
|
520
|
+
// src/atoms/icon-button.tsx
|
|
521
|
+
var import_react4 = require("react");
|
|
522
|
+
var import_clsx2 = require("clsx");
|
|
523
|
+
var import_themes5 = require("@radix-ui/themes");
|
|
524
|
+
|
|
525
|
+
// src/utils/convert-icon-button-size.ts
|
|
526
|
+
var convertSizeStr2 = (size) => {
|
|
527
|
+
switch (size) {
|
|
528
|
+
case "small":
|
|
529
|
+
return "1";
|
|
530
|
+
case "medium":
|
|
531
|
+
return "2";
|
|
532
|
+
case "large":
|
|
533
|
+
return "4";
|
|
534
|
+
default:
|
|
535
|
+
return "2";
|
|
536
|
+
}
|
|
537
|
+
};
|
|
538
|
+
var convertSizeResponse2 = (size) => {
|
|
539
|
+
if (typeof size === "string" || typeof size === "undefined") {
|
|
540
|
+
return convertSizeStr2(size);
|
|
541
|
+
}
|
|
542
|
+
const radixSize = {};
|
|
543
|
+
let key = "initial";
|
|
544
|
+
for (key in size) {
|
|
545
|
+
radixSize[key] = convertSizeStr2(size[key]);
|
|
546
|
+
}
|
|
547
|
+
return radixSize;
|
|
548
|
+
};
|
|
549
|
+
var convertSize2 = (size) => {
|
|
550
|
+
if (typeof size === "string") {
|
|
551
|
+
return convertSizeStr2(size);
|
|
552
|
+
}
|
|
553
|
+
return convertSizeResponse2(size);
|
|
554
|
+
};
|
|
555
|
+
|
|
556
|
+
// src/atoms/icon-button.tsx
|
|
557
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
558
|
+
var IconButton = (0, import_react4.forwardRef)(
|
|
559
|
+
(props, ref) => {
|
|
560
|
+
const _a = props, { size, style, variant } = _a, restProps = __objRest(_a, ["size", "style", "variant"]);
|
|
561
|
+
const radixSize = (0, import_react4.useMemo)(() => {
|
|
562
|
+
return convertSize2(size);
|
|
563
|
+
}, [size]);
|
|
564
|
+
const radixVariant = (0, import_react4.useMemo)(() => {
|
|
565
|
+
if (variant === "transparent") return "ghost";
|
|
566
|
+
return variant;
|
|
567
|
+
}, [variant]);
|
|
568
|
+
const className = (0, import_react4.useMemo)(() => {
|
|
569
|
+
return (0, import_clsx2.clsx)(props.className, { transparent: variant === "transparent" });
|
|
570
|
+
}, [props.className, variant]);
|
|
571
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
572
|
+
import_themes5.IconButton,
|
|
573
|
+
__spreadProps(__spreadValues({
|
|
574
|
+
style,
|
|
575
|
+
type: "button",
|
|
576
|
+
variant: radixVariant
|
|
577
|
+
}, restProps), {
|
|
578
|
+
className,
|
|
579
|
+
ref,
|
|
580
|
+
size: radixSize
|
|
581
|
+
})
|
|
582
|
+
);
|
|
583
|
+
}
|
|
584
|
+
);
|
|
585
|
+
IconButton.displayName = "IconButton";
|
|
586
|
+
|
|
587
|
+
// src/atoms/select.tsx
|
|
588
|
+
var import_themes6 = require("@radix-ui/themes");
|
|
589
|
+
var import_react5 = require("react");
|
|
590
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
591
|
+
var SelectContext = (0, import_react5.createContext)({
|
|
592
|
+
error: false
|
|
593
|
+
});
|
|
594
|
+
var Content = (0, import_react5.forwardRef)((props, ref) => {
|
|
595
|
+
const _a = props, { className, isNavigation } = _a, rest = __objRest(_a, ["className", "isNavigation"]);
|
|
596
|
+
const { error } = (0, import_react5.useContext)(SelectContext);
|
|
597
|
+
const cls = (0, import_react5.useMemo)(() => {
|
|
598
|
+
const etc = isNavigation ? "nav-select" : "";
|
|
599
|
+
const errorCls = error ? "tipp-error" : "";
|
|
600
|
+
return [etc, errorCls, className].join(" ");
|
|
601
|
+
}, [className, error, isNavigation]);
|
|
602
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
603
|
+
import_themes6.Select.Content,
|
|
604
|
+
__spreadProps(__spreadValues({
|
|
605
|
+
position: "popper"
|
|
606
|
+
}, rest), {
|
|
607
|
+
className: cls,
|
|
608
|
+
ref
|
|
609
|
+
})
|
|
610
|
+
);
|
|
611
|
+
});
|
|
612
|
+
Content.displayName = "Select.Content";
|
|
613
|
+
var Trigger = (0, import_react5.forwardRef)(
|
|
614
|
+
(props, ref) => {
|
|
615
|
+
const _a = props, { className } = _a, rest = __objRest(_a, ["className"]);
|
|
616
|
+
const { error } = (0, import_react5.useContext)(SelectContext);
|
|
617
|
+
const cls = (0, import_react5.useMemo)(() => {
|
|
618
|
+
const errorCls = error ? "error" : "";
|
|
619
|
+
return [errorCls, className].join(" ");
|
|
620
|
+
}, [className, error]);
|
|
621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_themes6.Select.Trigger, __spreadProps(__spreadValues({}, rest), { className: cls, ref }));
|
|
622
|
+
}
|
|
623
|
+
);
|
|
624
|
+
Trigger.displayName = "Select.Trigger";
|
|
625
|
+
function Root(props) {
|
|
626
|
+
const _a = props, { error } = _a, rest = __objRest(_a, ["error"]);
|
|
627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SelectContext.Provider, { value: { error }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_themes6.Select.Root, __spreadValues({}, rest)) });
|
|
628
|
+
}
|
|
629
|
+
Root.displayName = "Select.Root";
|
|
630
|
+
var Select = __spreadProps(__spreadValues({}, import_themes6.Select), {
|
|
631
|
+
Root,
|
|
632
|
+
Trigger,
|
|
633
|
+
Content
|
|
634
|
+
});
|
|
635
|
+
|
|
636
|
+
// src/atoms/text-area.tsx
|
|
637
|
+
var import_themes7 = require("@radix-ui/themes");
|
|
638
|
+
var import_react6 = require("react");
|
|
639
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
640
|
+
var TextArea = (0, import_react6.forwardRef)(
|
|
641
|
+
(props, ref) => {
|
|
642
|
+
const _a = props, { error, style, className } = _a, rest = __objRest(_a, ["error", "style", "className"]);
|
|
643
|
+
const fieldStyle = (0, import_react6.useMemo)(() => {
|
|
644
|
+
if (!error) return style;
|
|
645
|
+
const errorStyle = {
|
|
646
|
+
boxShadow: "inset 0 0 0 var(--text-area-border-width) var(--error-11)"
|
|
647
|
+
};
|
|
648
|
+
return __spreadValues(__spreadValues({}, style || {}), errorStyle);
|
|
649
|
+
}, [error, style]);
|
|
650
|
+
const classNameStr = error ? `error ${className}` : className;
|
|
651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
652
|
+
import_themes7.TextArea,
|
|
653
|
+
__spreadProps(__spreadValues({}, rest), {
|
|
654
|
+
className: classNameStr,
|
|
655
|
+
ref,
|
|
656
|
+
style: fieldStyle
|
|
657
|
+
})
|
|
658
|
+
);
|
|
659
|
+
}
|
|
660
|
+
);
|
|
661
|
+
TextArea.displayName = "TextArea";
|
|
662
|
+
|
|
663
|
+
// src/atoms/text-field.tsx
|
|
664
|
+
var import_themes8 = require("@radix-ui/themes");
|
|
665
|
+
var import_react7 = require("react");
|
|
666
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
667
|
+
var Root2 = (0, import_react7.forwardRef)((props, ref) => {
|
|
668
|
+
const _a = props, { error, style, className } = _a, rest = __objRest(_a, ["error", "style", "className"]);
|
|
669
|
+
const fieldStyle = (0, import_react7.useMemo)(() => {
|
|
670
|
+
if (!error) return style;
|
|
671
|
+
const errorStyle = {
|
|
672
|
+
boxShadow: "inset 0 0 0 var(--text-field-border-width) var(--error-11)"
|
|
673
|
+
};
|
|
674
|
+
return __spreadValues(__spreadValues({}, style || {}), errorStyle);
|
|
675
|
+
}, [error, style]);
|
|
676
|
+
const classNameStr = error ? `error ${className}` : className;
|
|
677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
678
|
+
import_themes8.TextField.Root,
|
|
679
|
+
__spreadValues({
|
|
680
|
+
className: classNameStr,
|
|
681
|
+
ref,
|
|
682
|
+
style: fieldStyle
|
|
683
|
+
}, rest)
|
|
684
|
+
);
|
|
685
|
+
});
|
|
686
|
+
Root2.displayName = "TextField.Root";
|
|
687
|
+
var TextField = { Root: Root2, Slot: import_themes8.TextField.Slot };
|
|
688
|
+
|
|
689
|
+
// src/atoms/typo.tsx
|
|
690
|
+
var import_themes9 = require("@radix-ui/themes");
|
|
691
|
+
var import_react8 = require("react");
|
|
692
|
+
|
|
693
|
+
// src/utils/map-with-responsive.ts
|
|
694
|
+
var mapWithResponsive = (args) => {
|
|
695
|
+
const { value, mapFn } = args;
|
|
696
|
+
if (typeof value === "string") {
|
|
697
|
+
return mapFn(value);
|
|
698
|
+
}
|
|
699
|
+
;
|
|
700
|
+
if (typeof value === "object") {
|
|
701
|
+
const newObj = {};
|
|
702
|
+
let key;
|
|
703
|
+
for (key in value) {
|
|
704
|
+
newObj[key] = mapFn(value[key]);
|
|
705
|
+
}
|
|
706
|
+
return newObj;
|
|
707
|
+
}
|
|
708
|
+
return value;
|
|
709
|
+
};
|
|
710
|
+
|
|
711
|
+
// src/atoms/typo.tsx
|
|
712
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
713
|
+
var Typo = (0, import_react8.forwardRef)(
|
|
714
|
+
(props, ref) => {
|
|
715
|
+
const _a = props, { size, variant, children } = _a, rest = __objRest(_a, ["size", "variant", "children"]);
|
|
716
|
+
const radixSize = (0, import_react8.useMemo)(() => {
|
|
717
|
+
if (size !== void 0) return size;
|
|
718
|
+
if (variant === void 0) return "2";
|
|
719
|
+
return mapWithResponsive({
|
|
720
|
+
value: variant,
|
|
721
|
+
mapFn: (variantValue) => {
|
|
722
|
+
switch (variantValue) {
|
|
723
|
+
case "caption":
|
|
724
|
+
return "1";
|
|
725
|
+
case "subtitle":
|
|
726
|
+
return "3";
|
|
727
|
+
case "body":
|
|
728
|
+
default:
|
|
729
|
+
return "2";
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
});
|
|
733
|
+
}, [size, variant]);
|
|
734
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_themes9.Text, __spreadProps(__spreadValues({}, rest), { ref, size: radixSize, children }));
|
|
735
|
+
}
|
|
736
|
+
);
|
|
737
|
+
Typo.displayName = "Typo";
|
|
738
|
+
|
|
739
|
+
// src/icon.ts
|
|
740
|
+
var import_react_icons = require("@radix-ui/react-icons");
|
|
741
|
+
|
|
742
|
+
// src/icons/phone-ring.tsx
|
|
743
|
+
var React4 = __toESM(require("react"), 1);
|
|
744
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
745
|
+
var PhoneRingIcon = React4.forwardRef(
|
|
746
|
+
(_a, forwardedRef) => {
|
|
747
|
+
var _b = _a, { color = "currentColor" } = _b, props = __objRest(_b, ["color"]);
|
|
748
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
749
|
+
"svg",
|
|
750
|
+
__spreadProps(__spreadValues({
|
|
751
|
+
fill: "none",
|
|
752
|
+
height: "16",
|
|
753
|
+
viewBox: "0 0 16 16",
|
|
754
|
+
width: "16",
|
|
755
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
756
|
+
}, props), {
|
|
757
|
+
ref: forwardedRef,
|
|
758
|
+
children: [
|
|
759
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
760
|
+
"path",
|
|
761
|
+
{
|
|
762
|
+
d: "M7.7207 8.94603C6.98877 8.2141 6.41082 7.3865 5.98686 6.50348C5.95039 6.42753 5.93216 6.38955 5.91815 6.34149C5.86837 6.17072 5.90413 5.96102 6.00769 5.81639C6.03683 5.77569 6.07165 5.74087 6.14128 5.67124C6.35424 5.45828 6.46072 5.3518 6.53033 5.24473C6.79287 4.84094 6.79287 4.32038 6.53033 3.91658C6.46072 3.80951 6.35424 3.70303 6.14128 3.49007L6.02257 3.37137C5.69885 3.04764 5.53699 2.88578 5.36315 2.79786C5.01743 2.62299 4.60914 2.62299 4.26342 2.79786C4.08958 2.88578 3.92772 3.04764 3.604 3.37137L3.50798 3.46739C3.18536 3.79 3.02405 3.95131 2.90086 4.17062C2.76415 4.41398 2.66586 4.79194 2.66669 5.07106C2.66744 5.32261 2.71624 5.49452 2.81382 5.83835C3.33828 7.68611 4.32781 9.42969 5.78242 10.8843C7.23704 12.3389 8.98062 13.3285 10.8284 13.8529C11.1722 13.9505 11.3441 13.9993 11.5957 14C11.8748 14.0009 12.2528 13.9026 12.4961 13.7659C12.7154 13.6427 12.8767 13.4814 13.1993 13.1588L13.2954 13.0627C13.6191 12.739 13.7809 12.5771 13.8689 12.4033C14.0437 12.0576 14.0437 11.6493 13.8689 11.3036C13.7809 11.1297 13.6191 10.9679 13.2954 10.6442L13.1767 10.5255C12.9637 10.3125 12.8572 10.206 12.7501 10.1364C12.3464 9.87386 11.8258 9.87386 11.422 10.1364C11.3149 10.206 11.2084 10.3125 10.9955 10.5255C10.9259 10.5951 10.891 10.6299 10.8503 10.659C10.7057 10.7626 10.496 10.7984 10.3252 10.7486C10.2772 10.7346 10.2392 10.7163 10.1632 10.6799C9.28023 10.2559 8.45262 9.67796 7.7207 8.94603Z",
|
|
763
|
+
fill: color
|
|
764
|
+
}
|
|
765
|
+
),
|
|
766
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
767
|
+
"path",
|
|
768
|
+
{
|
|
769
|
+
d: "M9.33335 4.22765C10.4699 4.62936 11.3707 5.53016 11.7724 6.66671M9.97701 2.33337C11.7004 2.93456 13.0655 4.2997 13.6667 6.02305M7.7207 8.94603C6.98877 8.2141 6.41082 7.3865 5.98686 6.50348C5.95039 6.42753 5.93216 6.38955 5.91815 6.34149C5.86837 6.17072 5.90413 5.96102 6.00769 5.81639C6.03683 5.77569 6.07165 5.74087 6.14128 5.67124C6.35424 5.45828 6.46072 5.3518 6.53033 5.24473C6.79287 4.84094 6.79287 4.32038 6.53033 3.91658C6.46072 3.80951 6.35424 3.70303 6.14128 3.49007L6.02257 3.37137C5.69885 3.04764 5.53699 2.88578 5.36315 2.79786C5.01743 2.62299 4.60914 2.62299 4.26342 2.79786C4.08958 2.88578 3.92772 3.04764 3.604 3.37137L3.50798 3.46739C3.18536 3.79 3.02405 3.95131 2.90086 4.17062C2.76415 4.41398 2.66586 4.79194 2.66669 5.07106C2.66744 5.32261 2.71624 5.49452 2.81382 5.83835C3.33828 7.68611 4.32781 9.42969 5.78242 10.8843C7.23704 12.3389 8.98062 13.3285 10.8284 13.8529C11.1722 13.9505 11.3441 13.9993 11.5957 14C11.8748 14.0009 12.2528 13.9026 12.4961 13.7659C12.7154 13.6427 12.8767 13.4814 13.1993 13.1588L13.2954 13.0627C13.6191 12.739 13.7809 12.5771 13.8689 12.4033C14.0437 12.0576 14.0437 11.6493 13.8689 11.3036C13.7809 11.1297 13.6191 10.9679 13.2954 10.6442L13.1767 10.5255C12.9637 10.3125 12.8572 10.206 12.7501 10.1364C12.3464 9.87386 11.8258 9.87386 11.422 10.1364C11.3149 10.206 11.2084 10.3125 10.9955 10.5255C10.9259 10.5951 10.891 10.6299 10.8503 10.659C10.7057 10.7626 10.496 10.7984 10.3252 10.7486C10.2772 10.7346 10.2392 10.7163 10.1632 10.6799C9.28023 10.2559 8.45262 9.67796 7.7207 8.94603Z",
|
|
770
|
+
stroke: color,
|
|
771
|
+
strokeLinecap: "round",
|
|
772
|
+
strokeWidth: "1.5"
|
|
773
|
+
}
|
|
774
|
+
)
|
|
775
|
+
]
|
|
776
|
+
})
|
|
777
|
+
);
|
|
778
|
+
}
|
|
779
|
+
);
|
|
780
|
+
PhoneRingIcon.displayName = "ArrowUpIcon";
|
|
781
|
+
|
|
782
|
+
// src/icons/up.tsx
|
|
783
|
+
var React5 = __toESM(require("react"), 1);
|
|
784
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
785
|
+
var TriangleArrowUpIcon = React5.forwardRef(
|
|
786
|
+
(_a, forwardedRef) => {
|
|
787
|
+
var _b = _a, { color = "currentColor" } = _b, props = __objRest(_b, ["color"]);
|
|
788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
789
|
+
"svg",
|
|
790
|
+
__spreadProps(__spreadValues({
|
|
791
|
+
fill: "none",
|
|
792
|
+
height: "7",
|
|
793
|
+
viewBox: "0 0 8 7",
|
|
794
|
+
width: "8",
|
|
795
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
796
|
+
}, props), {
|
|
797
|
+
ref: forwardedRef,
|
|
798
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
799
|
+
"path",
|
|
800
|
+
{
|
|
801
|
+
d: "M0.891555 6.1875L7.10845 6.1875C7.80261 6.1875 8.1771 5.37328 7.72534 4.84623L4.6169 1.21971C4.29263 0.841403 3.70737 0.841403 3.3831 1.21971L0.274659 4.84623C-0.177095 5.37328 0.197393 6.1875 0.891555 6.1875Z",
|
|
802
|
+
fill: color
|
|
803
|
+
}
|
|
804
|
+
)
|
|
805
|
+
})
|
|
806
|
+
);
|
|
807
|
+
}
|
|
808
|
+
);
|
|
809
|
+
TriangleArrowUpIcon.displayName = "ArrowUpIcon";
|
|
810
|
+
|
|
811
|
+
// src/icons/down.tsx
|
|
812
|
+
var React6 = __toESM(require("react"), 1);
|
|
813
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
814
|
+
var TriangleArrowDownIcon = React6.forwardRef(
|
|
815
|
+
(_a, forwardedRef) => {
|
|
816
|
+
var _b = _a, { color = "currentColor" } = _b, props = __objRest(_b, ["color"]);
|
|
817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
818
|
+
"svg",
|
|
819
|
+
__spreadProps(__spreadValues({
|
|
820
|
+
fill: "none",
|
|
821
|
+
height: "7",
|
|
822
|
+
viewBox: "0 0 8 7",
|
|
823
|
+
width: "8",
|
|
824
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
825
|
+
}, props), {
|
|
826
|
+
ref: forwardedRef,
|
|
827
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
828
|
+
"path",
|
|
829
|
+
{
|
|
830
|
+
d: "M7.10844 0.8125H0.891554C0.197392 0.8125 -0.177096 1.62672 0.274659 2.15377L3.3831 5.78029C3.70737 6.1586 4.29263 6.1586 4.6169 5.78029L7.72534 2.15377C8.1771 1.62672 7.80261 0.8125 7.10844 0.8125Z",
|
|
831
|
+
fill: color
|
|
832
|
+
}
|
|
833
|
+
)
|
|
834
|
+
})
|
|
835
|
+
);
|
|
836
|
+
}
|
|
837
|
+
);
|
|
838
|
+
TriangleArrowDownIcon.displayName = "ArrowDownIcon";
|
|
839
|
+
|
|
840
|
+
// src/icons/mic.tsx
|
|
841
|
+
var React7 = __toESM(require("react"), 1);
|
|
842
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
843
|
+
var MicIcon = React7.forwardRef(
|
|
844
|
+
(_a, forwardedRef) => {
|
|
845
|
+
var _b = _a, { color = "currentColor" } = _b, props = __objRest(_b, ["color"]);
|
|
846
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
847
|
+
"svg",
|
|
848
|
+
__spreadProps(__spreadValues({
|
|
849
|
+
fill: "none",
|
|
850
|
+
height: "16",
|
|
851
|
+
viewBox: "0 0 12 16",
|
|
852
|
+
width: "12",
|
|
853
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
854
|
+
}, props), {
|
|
855
|
+
ref: forwardedRef,
|
|
856
|
+
children: [
|
|
857
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
858
|
+
"path",
|
|
859
|
+
{
|
|
860
|
+
clipRule: "evenodd",
|
|
861
|
+
d: "M9.15383 8.15726H9.17422V7.79011V3.71671H9.17378C9.14572 1.93538 7.69297 0.5 5.90497 0.5C4.11696 0.5 2.66421 1.93538 2.63616 3.71671H2.63577V3.75606C2.63575 3.76044 2.63574 3.76483 2.63574 3.76923C2.63574 3.77362 2.63575 3.77801 2.63577 3.78239V7.79011V8.15726H2.65615C2.83862 9.78997 4.22357 11.0593 5.90499 11.0593C7.58642 11.0593 8.97136 9.78997 9.15383 8.15726Z",
|
|
862
|
+
fill: color,
|
|
863
|
+
fillRule: "evenodd"
|
|
864
|
+
}
|
|
865
|
+
),
|
|
866
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
867
|
+
"path",
|
|
868
|
+
{
|
|
869
|
+
d: "M1.30707 7.51038C1.30707 8.87401 2.61826 12.2831 5.90497 12.2831M5.90497 12.2831V15.4999M5.90497 12.2831C8.8595 11.9148 10.0284 10.8351 10.5203 7.51038M5.90497 15.4999H4.05182M5.90497 15.4999H7.81056",
|
|
870
|
+
stroke: color,
|
|
871
|
+
strokeLinecap: "round",
|
|
872
|
+
strokeWidth: "1.2"
|
|
873
|
+
}
|
|
874
|
+
)
|
|
875
|
+
]
|
|
876
|
+
})
|
|
877
|
+
);
|
|
878
|
+
}
|
|
879
|
+
);
|
|
880
|
+
MicIcon.displayName = "MicIcon";
|
|
881
|
+
|
|
882
|
+
// src/icons/camera.tsx
|
|
883
|
+
var React8 = __toESM(require("react"), 1);
|
|
884
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
885
|
+
var CameraIcon = React8.forwardRef(
|
|
886
|
+
(_a, forwardedRef) => {
|
|
887
|
+
var _b = _a, { color = "currentColor" } = _b, props = __objRest(_b, ["color"]);
|
|
888
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
889
|
+
"svg",
|
|
890
|
+
__spreadProps(__spreadValues({
|
|
891
|
+
fill: "none",
|
|
892
|
+
height: "16",
|
|
893
|
+
ref: forwardedRef,
|
|
894
|
+
viewBox: "0 0 16 16",
|
|
895
|
+
width: "16",
|
|
896
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
897
|
+
}, props), {
|
|
898
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
899
|
+
"path",
|
|
900
|
+
{
|
|
901
|
+
d: "M1.41176 2C0.470588 2 0 2.46222 0 3.38667C0 4.31111 0 11.2444 0 12.1689C0 13.0933 0.470588 13.5556 0.941176 13.5556C1.41176 13.5556 9.88235 13.5556 10.8235 13.5556C11.7647 13.5556 11.7647 13.0933 11.7647 12.1689C11.7647 11.5595 11.7647 10.9502 11.7647 10.6056C11.7647 10.4478 11.8926 10.32 12.0504 10.32H12.1689C12.2126 10.32 12.2557 10.33 12.2949 10.3493L14.1176 11.2444L15.5883 11.9667C15.7782 12.06 16 11.9218 16 11.7103V3.86745C16 3.6507 15.768 3.51238 15.577 3.61479C14.6546 4.10924 12.5222 5.23556 12.2353 5.23556C12.1353 5.23556 12.0821 5.23556 12.0502 5.23556C11.8924 5.23556 11.7647 5.10789 11.7647 4.95009C11.7647 4.51892 11.7647 3.71688 11.7647 3.38667C11.7647 2.92444 11.2941 2 10.3529 2C9.41177 2 2.35294 2 1.41176 2Z",
|
|
902
|
+
fill: color
|
|
903
|
+
}
|
|
904
|
+
)
|
|
905
|
+
})
|
|
906
|
+
);
|
|
907
|
+
}
|
|
908
|
+
);
|
|
909
|
+
CameraIcon.displayName = "CameraIcon";
|
|
910
|
+
|
|
911
|
+
// src/icons/camera-disabled.tsx
|
|
912
|
+
var React9 = __toESM(require("react"), 1);
|
|
913
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
914
|
+
var CameraDisabledIcon = React9.forwardRef(
|
|
915
|
+
(_a, forwardedRef) => {
|
|
916
|
+
var _b = _a, { color = "currentColor" } = _b, props = __objRest(_b, ["color"]);
|
|
917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
918
|
+
"svg",
|
|
919
|
+
__spreadProps(__spreadValues({
|
|
920
|
+
fill: "none",
|
|
921
|
+
height: "16",
|
|
922
|
+
ref: forwardedRef,
|
|
923
|
+
viewBox: "0 0 16 16",
|
|
924
|
+
width: "16",
|
|
925
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
926
|
+
}, props), {
|
|
927
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
928
|
+
"path",
|
|
929
|
+
{
|
|
930
|
+
clipRule: "evenodd",
|
|
931
|
+
d: "M0 3.3872C0 2.4624 0.470588 2 1.41176 2H10.3529C11.2941 2 11.7647 2.9248 11.7647 3.3872V4.95122C11.7647 5.10908 11.8924 5.2368 12.0502 5.2368H12.2353C12.5222 5.2368 14.6546 4.11005 15.577 3.61542C15.768 3.51296 16 3.65133 16 3.86817V11.714C16 11.9256 15.7782 12.0638 15.5883 11.9706L12.2949 10.3525C12.2557 10.3332 12.2126 10.3232 12.1689 10.3232H12.0504C11.8926 10.3232 11.7647 10.451 11.7647 10.6089V12.1728C11.7647 13.0976 11.7647 13.56 10.8235 13.56H0.941176C0.470588 13.56 0 13.0976 0 12.1728V3.3872ZM8.67719 6.41215C8.8854 6.20379 8.8854 5.86598 8.67719 5.65762C8.46887 5.44925 8.13116 5.44925 7.92284 5.65762L6.16668 7.4145L4.41052 5.65762C4.2022 5.44925 3.8645 5.44925 3.65618 5.65762C3.44794 5.86598 3.44794 6.20379 3.65618 6.41215L5.41244 8.16904L3.65618 9.92593C3.44794 10.1343 3.44794 10.4721 3.65618 10.6805C3.8645 10.8888 4.2022 10.8888 4.41052 10.6805L6.16668 8.92358L7.92284 10.6805C8.13116 10.8888 8.46887 10.8888 8.67719 10.6805C8.8854 10.4721 8.8854 10.1343 8.67719 9.92593L6.92092 8.16904L8.67719 6.41215Z",
|
|
932
|
+
fill: color,
|
|
933
|
+
fillRule: "evenodd"
|
|
934
|
+
}
|
|
935
|
+
)
|
|
936
|
+
})
|
|
937
|
+
);
|
|
938
|
+
}
|
|
939
|
+
);
|
|
940
|
+
CameraDisabledIcon.displayName = "VideoDisabledIcon";
|
|
941
|
+
|
|
942
|
+
// src/icons/end-call.tsx
|
|
943
|
+
var React10 = __toESM(require("react"), 1);
|
|
944
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
945
|
+
var EndCallIcon = React10.forwardRef(
|
|
946
|
+
(_a, forwardedRef) => {
|
|
947
|
+
var _b = _a, { color = "currentColor" } = _b, props = __objRest(_b, ["color"]);
|
|
948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
949
|
+
"svg",
|
|
950
|
+
__spreadProps(__spreadValues({
|
|
951
|
+
fill: "none",
|
|
952
|
+
height: "16",
|
|
953
|
+
ref: forwardedRef,
|
|
954
|
+
viewBox: "0 0 16 16",
|
|
955
|
+
width: "16",
|
|
956
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
957
|
+
}, props), {
|
|
958
|
+
children: [
|
|
959
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
960
|
+
"path",
|
|
961
|
+
{
|
|
962
|
+
d: "M8 6.66667C8.90629 6.66667 9.77647 6.83841 10.5856 7.15419C10.6552 7.18136 10.69 7.19494 10.7285 7.21836C10.865 7.30159 10.9727 7.47044 10.9981 7.64117C11.0053 7.68921 11.0053 7.73711 11.0053 7.83291C11.0053 8.1259 11.0053 8.27239 11.0285 8.39394C11.1159 8.8523 11.4382 9.2104 11.8507 9.30757C11.9601 9.33333 12.092 9.33333 12.3557 9.33333H12.5026C12.9035 9.33333 13.1039 9.33333 13.266 9.27424C13.5883 9.1567 13.841 8.87584 13.9468 8.51773C14 8.33766 14 8.11498 14 7.6696V7.53749C14 7.09364 14 6.87172 13.9405 6.63611C13.8745 6.37466 13.7013 6.04705 13.528 5.85561C13.3718 5.68309 13.2352 5.5984 12.9619 5.42901C11.4932 4.51871 9.80113 4 8 4C6.19887 4 4.50678 4.51871 3.03812 5.42901C2.76484 5.5984 2.6282 5.68309 2.472 5.85561C2.29868 6.04705 2.12553 6.37466 2.0595 6.63611C2 6.87172 2 7.09364 2 7.53749V7.6696C2 8.11498 2 8.33766 2.05319 8.51773C2.15897 8.87584 2.41174 9.1567 2.73404 9.27424C2.8961 9.33333 3.09652 9.33333 3.49736 9.33333L3.64434 9.33333C3.90803 9.33333 4.03987 9.33333 4.14926 9.30757C4.56179 9.2104 4.88408 8.8523 4.97153 8.39394C4.99472 8.27239 4.99472 8.1259 4.99472 7.83291C4.99472 7.73711 4.99472 7.68921 5.00187 7.64117C5.0273 7.47044 5.13499 7.30159 5.27154 7.21836C5.30996 7.19494 5.34476 7.18136 5.41436 7.15419C6.22353 6.83841 7.09371 6.66667 8 6.66667Z",
|
|
963
|
+
fill: color
|
|
964
|
+
}
|
|
965
|
+
),
|
|
966
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
967
|
+
"path",
|
|
968
|
+
{
|
|
969
|
+
d: "M2 12H14M8 6.66667C8.90629 6.66667 9.77647 6.83841 10.5856 7.15419C10.6552 7.18136 10.69 7.19494 10.7285 7.21836C10.865 7.30159 10.9727 7.47044 10.9981 7.64117C11.0053 7.68921 11.0053 7.73711 11.0053 7.83291C11.0053 8.1259 11.0053 8.27239 11.0285 8.39394C11.1159 8.8523 11.4382 9.2104 11.8507 9.30757C11.9601 9.33333 12.092 9.33333 12.3557 9.33333H12.5026C12.9035 9.33333 13.1039 9.33333 13.266 9.27424C13.5883 9.1567 13.841 8.87584 13.9468 8.51773C14 8.33766 14 8.11498 14 7.6696V7.53749C14 7.09364 14 6.87172 13.9405 6.63611C13.8745 6.37466 13.7013 6.04705 13.528 5.85561C13.3718 5.68309 13.2352 5.5984 12.9619 5.42901C11.4932 4.51871 9.80113 4 8 4C6.19887 4 4.50678 4.51871 3.03812 5.42901C2.76484 5.5984 2.6282 5.68309 2.472 5.85561C2.29868 6.04705 2.12553 6.37466 2.0595 6.63611C2 6.87172 2 7.09364 2 7.53749V7.6696C2 8.11498 2 8.33766 2.05319 8.51773C2.15897 8.87584 2.41174 9.1567 2.73404 9.27424C2.8961 9.33333 3.09652 9.33333 3.49736 9.33333L3.64434 9.33333C3.90803 9.33333 4.03987 9.33333 4.14926 9.30757C4.56179 9.2104 4.88408 8.8523 4.97153 8.39394C4.99472 8.27239 4.99472 8.1259 4.99472 7.83291C4.99472 7.73711 4.99472 7.68921 5.00187 7.64117C5.0273 7.47044 5.13499 7.30159 5.27154 7.21836C5.30996 7.19494 5.34476 7.18136 5.41436 7.15419C6.22353 6.83841 7.09371 6.66667 8 6.66667Z",
|
|
970
|
+
stroke: color,
|
|
971
|
+
strokeLinecap: "round",
|
|
972
|
+
strokeWidth: "1.5"
|
|
973
|
+
}
|
|
974
|
+
)
|
|
975
|
+
]
|
|
976
|
+
})
|
|
977
|
+
);
|
|
978
|
+
}
|
|
979
|
+
);
|
|
980
|
+
EndCallIcon.displayName = "EndCallIcon";
|
|
981
|
+
|
|
982
|
+
// src/icons/circle-play.tsx
|
|
983
|
+
var React11 = __toESM(require("react"), 1);
|
|
984
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
985
|
+
var CirclePlayIcon = React11.forwardRef(
|
|
986
|
+
(_a, forwardedRef) => {
|
|
987
|
+
var _b = _a, { color = "#currentColor" } = _b, props = __objRest(_b, ["color"]);
|
|
988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
989
|
+
"svg",
|
|
990
|
+
__spreadProps(__spreadValues({
|
|
991
|
+
fill: "none",
|
|
992
|
+
height: "16",
|
|
993
|
+
viewBox: "0 0 16 16",
|
|
994
|
+
width: "16",
|
|
995
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
996
|
+
}, props), {
|
|
997
|
+
ref: forwardedRef,
|
|
998
|
+
children: [
|
|
999
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("circle", { cx: "8", cy: "8", fill: color, r: "8" }),
|
|
1000
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1001
|
+
"path",
|
|
1002
|
+
{
|
|
1003
|
+
d: "M13.25 7.56699C13.5833 7.75944 13.5833 8.24056 13.25 8.43301L5.75 12.7631C5.41667 12.9556 5 12.715 5 12.3301L5 3.66987C5 3.28497 5.41667 3.04441 5.75 3.23686L13.25 7.56699Z",
|
|
1004
|
+
fill: "white"
|
|
1005
|
+
}
|
|
1006
|
+
)
|
|
1007
|
+
]
|
|
1008
|
+
})
|
|
1009
|
+
);
|
|
1010
|
+
}
|
|
1011
|
+
);
|
|
1012
|
+
CirclePlayIcon.displayName = "CirclePlayIcon";
|
|
1013
|
+
|
|
1014
|
+
// src/icons/circle-pencil.tsx
|
|
1015
|
+
var React12 = __toESM(require("react"), 1);
|
|
1016
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1017
|
+
var CirclePencilIcon = React12.forwardRef(
|
|
1018
|
+
(_a, forwardedRef) => {
|
|
1019
|
+
var _b = _a, { color = "currentColor" } = _b, props = __objRest(_b, ["color"]);
|
|
1020
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1021
|
+
"svg",
|
|
1022
|
+
__spreadProps(__spreadValues({
|
|
1023
|
+
fill: "none",
|
|
1024
|
+
height: "16",
|
|
1025
|
+
viewBox: "0 0 16 16",
|
|
1026
|
+
width: "16",
|
|
1027
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1028
|
+
}, props), {
|
|
1029
|
+
ref: forwardedRef,
|
|
1030
|
+
children: [
|
|
1031
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("circle", { cx: "8", cy: "8", fill: color, r: "8" }),
|
|
1032
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1033
|
+
"rect",
|
|
1034
|
+
{
|
|
1035
|
+
fill: "white",
|
|
1036
|
+
fillOpacity: "0.01",
|
|
1037
|
+
height: "12",
|
|
1038
|
+
transform: "translate(2 2)",
|
|
1039
|
+
width: "12"
|
|
1040
|
+
}
|
|
1041
|
+
),
|
|
1042
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1043
|
+
"path",
|
|
1044
|
+
{
|
|
1045
|
+
clipRule: "evenodd",
|
|
1046
|
+
d: "M11.4829 2.91721C11.3266 2.761 11.0733 2.761 10.9172 2.91721L4.97162 8.86274C4.89965 8.9347 4.84208 9.01974 4.80199 9.11329L3.63233 11.8424C3.5679 11.9928 3.60149 12.1672 3.71715 12.2829C3.8328 12.3985 4.00722 12.4321 4.15755 12.3677L6.88675 11.198C6.9803 11.158 7.06534 11.1004 7.13731 11.0284L13.0829 5.08289C13.239 4.92668 13.239 4.67342 13.0829 4.51721L11.4829 2.91721ZM5.53731 9.42842L11.2 3.76574L12.2343 4.80005L6.57162 10.4628L5.37537 10.9754L5.02463 10.6247L5.53731 9.42842Z",
|
|
1047
|
+
fill: "white",
|
|
1048
|
+
fillRule: "evenodd"
|
|
1049
|
+
}
|
|
1050
|
+
)
|
|
1051
|
+
]
|
|
1052
|
+
})
|
|
1053
|
+
);
|
|
1054
|
+
}
|
|
1055
|
+
);
|
|
1056
|
+
CirclePencilIcon.displayName = "CirclePencilIcon";
|
|
1057
|
+
|
|
1058
|
+
// src/icons/circle-check.tsx
|
|
1059
|
+
var React13 = __toESM(require("react"), 1);
|
|
1060
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1061
|
+
var CircleCheckIcon = React13.forwardRef(
|
|
1062
|
+
(_a, forwardedRef) => {
|
|
1063
|
+
var _b = _a, { color = "currentColor" } = _b, props = __objRest(_b, ["color"]);
|
|
1064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1065
|
+
"svg",
|
|
1066
|
+
__spreadProps(__spreadValues({
|
|
1067
|
+
fill: "none",
|
|
1068
|
+
height: "16",
|
|
1069
|
+
viewBox: "0 0 16 16",
|
|
1070
|
+
width: "16",
|
|
1071
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1072
|
+
}, props), {
|
|
1073
|
+
ref: forwardedRef,
|
|
1074
|
+
children: [
|
|
1075
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("circle", { cx: "8", cy: "8", fill: "white", r: "7.5", stroke: color }),
|
|
1076
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("rect", { fill: "white", fillOpacity: "0.01", height: "16", width: "16" }),
|
|
1077
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1078
|
+
"path",
|
|
1079
|
+
{
|
|
1080
|
+
clipRule: "evenodd",
|
|
1081
|
+
d: "M12.2314 3.97533C12.5395 4.17683 12.626 4.58999 12.4245 4.89815L7.8912 11.8315C7.78436 11.9949 7.61128 12.1032 7.41763 12.1279C7.22398 12.1527 7.02923 12.0912 6.88477 11.9599L3.95144 9.29328C3.679 9.04561 3.65892 8.62397 3.90659 8.35154C4.15426 8.0791 4.57589 8.05901 4.84833 8.30669L7.20313 10.4474L11.3086 4.16849C11.5101 3.86033 11.9232 3.77385 12.2314 3.97533Z",
|
|
1082
|
+
fill: color,
|
|
1083
|
+
fillRule: "evenodd"
|
|
1084
|
+
}
|
|
1085
|
+
)
|
|
1086
|
+
]
|
|
1087
|
+
})
|
|
1088
|
+
);
|
|
1089
|
+
}
|
|
1090
|
+
);
|
|
1091
|
+
CircleCheckIcon.displayName = "CircleCheckIcon";
|
|
1092
|
+
|
|
1093
|
+
// src/icons/circle-satisfaction.tsx
|
|
1094
|
+
var React14 = __toESM(require("react"), 1);
|
|
1095
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1096
|
+
var CircleSatisfactionIcon = React14.forwardRef(
|
|
1097
|
+
(_a, forwardedRef) => {
|
|
1098
|
+
var _b = _a, { color = "currentColor" } = _b, props = __objRest(_b, ["color"]);
|
|
1099
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1100
|
+
"svg",
|
|
1101
|
+
__spreadProps(__spreadValues({
|
|
1102
|
+
fill: "none",
|
|
1103
|
+
height: "16",
|
|
1104
|
+
viewBox: "0 0 16 16",
|
|
1105
|
+
width: "16",
|
|
1106
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1107
|
+
}, props), {
|
|
1108
|
+
ref: forwardedRef,
|
|
1109
|
+
children: [
|
|
1110
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("circle", { cx: "8", cy: "8", fill: "white", r: "7.5", stroke: color }),
|
|
1111
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1112
|
+
"rect",
|
|
1113
|
+
{
|
|
1114
|
+
fill: "white",
|
|
1115
|
+
fillOpacity: "0.01",
|
|
1116
|
+
height: "12",
|
|
1117
|
+
transform: "translate(2 2)",
|
|
1118
|
+
width: "12"
|
|
1119
|
+
}
|
|
1120
|
+
),
|
|
1121
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1122
|
+
"path",
|
|
1123
|
+
{
|
|
1124
|
+
d: "M7.77842 2.53284C7.86041 2.33573 8.13963 2.33573 8.22162 2.53284L9.53074 5.68036C9.5653 5.76346 9.64346 5.82023 9.73316 5.82742L13.1312 6.09985C13.344 6.1169 13.4302 6.38246 13.2682 6.52134L10.6792 8.73904C10.6109 8.79758 10.581 8.88946 10.6019 8.97699L11.3929 12.2928C11.4424 12.5005 11.2165 12.6647 11.0343 12.5534L8.12512 10.7764C8.04832 10.7296 7.95172 10.7296 7.87492 10.7764L4.96574 12.5534C4.78356 12.6647 4.55766 12.5005 4.60719 12.2928L5.39815 8.97699C5.41904 8.88946 5.38918 8.79758 5.32084 8.73904L2.73191 6.52134C2.56978 6.38246 2.65607 6.1169 2.86886 6.09985L6.26688 5.82742C6.35658 5.82023 6.43474 5.76346 6.4693 5.68036L7.77842 2.53284Z",
|
|
1125
|
+
fill: color
|
|
1126
|
+
}
|
|
1127
|
+
)
|
|
1128
|
+
]
|
|
1129
|
+
})
|
|
1130
|
+
);
|
|
1131
|
+
}
|
|
1132
|
+
);
|
|
1133
|
+
CircleSatisfactionIcon.displayName = "CircleSatisfactionIcon";
|
|
1134
|
+
|
|
1135
|
+
// src/icons/circle-quote.tsx
|
|
1136
|
+
var React15 = __toESM(require("react"), 1);
|
|
1137
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1138
|
+
var CircleQuoteIcon = React15.forwardRef(
|
|
1139
|
+
(_a, forwardedRef) => {
|
|
1140
|
+
var _b = _a, { color = "currentColor" } = _b, props = __objRest(_b, ["color"]);
|
|
1141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1142
|
+
"svg",
|
|
1143
|
+
__spreadProps(__spreadValues({
|
|
1144
|
+
fill: "none",
|
|
1145
|
+
height: "16",
|
|
1146
|
+
viewBox: "0 0 16 16",
|
|
1147
|
+
width: "16",
|
|
1148
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1149
|
+
}, props), {
|
|
1150
|
+
ref: forwardedRef,
|
|
1151
|
+
children: [
|
|
1152
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("circle", { cx: "8", cy: "8", fill: "white", r: "7.5", stroke: color }),
|
|
1153
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1154
|
+
"rect",
|
|
1155
|
+
{
|
|
1156
|
+
fill: "white",
|
|
1157
|
+
fillOpacity: "0.01",
|
|
1158
|
+
height: "12",
|
|
1159
|
+
transform: "translate(2 2)",
|
|
1160
|
+
width: "12"
|
|
1161
|
+
}
|
|
1162
|
+
),
|
|
1163
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1164
|
+
"path",
|
|
1165
|
+
{
|
|
1166
|
+
clipRule: "evenodd",
|
|
1167
|
+
d: "M9.54 4.75306C10.0449 4.58921 10.6269 4.59213 11.1033 4.83696C12.2025 5.40177 12.6781 6.8575 12.2357 8.39997C12.0372 9.09189 11.6881 9.76375 10.9489 10.4419C10.2096 11.12 9.18425 11.52 8.70854 11.52C8.53813 11.52 8.39998 11.3857 8.39998 11.22C8.39998 11.0543 8.54113 10.92 8.70854 10.92C9.25195 10.92 9.73749 10.6243 10.3125 10.1888C10.7525 9.85541 11.0961 9.42904 11.2864 9.0575C11.6502 8.34691 11.6625 7.34537 11.0746 7.07918C10.7923 7.38761 10.4236 7.56754 9.98178 7.56754C9.02182 7.56754 8.45606 6.79527 8.48038 6.09605C8.50363 5.42777 8.92823 4.95161 9.54 4.75306ZM4.74 4.75306C5.24489 4.58921 5.8269 4.59213 6.30336 4.83696C7.40254 5.40177 7.8781 6.8575 7.43567 8.39997C7.23721 9.09189 6.88813 9.76375 6.14886 10.4419C5.40958 11.12 4.38425 11.52 3.90854 11.52C3.73813 11.52 3.59998 11.3857 3.59998 11.22C3.59998 11.0543 3.74113 10.92 3.90854 10.92C4.45195 10.92 4.93749 10.6243 5.51244 10.1888C5.9525 9.85541 6.29609 9.42904 6.48635 9.0575C6.85023 8.34691 6.86254 7.34537 6.27462 7.07918C5.99227 7.38761 5.62356 7.56754 5.18178 7.56754C4.22182 7.56754 3.65606 6.79527 3.68038 6.09605C3.70363 5.42777 4.12823 4.95161 4.74 4.75306Z",
|
|
1168
|
+
fill: color,
|
|
1169
|
+
fillRule: "evenodd"
|
|
1170
|
+
}
|
|
1171
|
+
)
|
|
1172
|
+
]
|
|
1173
|
+
})
|
|
1174
|
+
);
|
|
1175
|
+
}
|
|
1176
|
+
);
|
|
1177
|
+
CircleQuoteIcon.displayName = "CircleQuoteIcon";
|
|
1178
|
+
|
|
1179
|
+
// src/icons/circle-chat.tsx
|
|
1180
|
+
var React16 = __toESM(require("react"), 1);
|
|
1181
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1182
|
+
var CircleChatIcon = React16.forwardRef(
|
|
1183
|
+
(_a, forwardedRef) => {
|
|
1184
|
+
var _b = _a, { color = "currentColor" } = _b, props = __objRest(_b, ["color"]);
|
|
1185
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1186
|
+
"svg",
|
|
1187
|
+
__spreadProps(__spreadValues({
|
|
1188
|
+
fill: "none",
|
|
1189
|
+
height: "16",
|
|
1190
|
+
ref: forwardedRef,
|
|
1191
|
+
viewBox: "0 0 16 16",
|
|
1192
|
+
width: "16",
|
|
1193
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1194
|
+
}, props), {
|
|
1195
|
+
children: [
|
|
1196
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("rect", { fill: color, height: "16", rx: "8", width: "16" }),
|
|
1197
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1198
|
+
"rect",
|
|
1199
|
+
{
|
|
1200
|
+
fill: "white",
|
|
1201
|
+
fillOpacity: "0.01",
|
|
1202
|
+
height: "12",
|
|
1203
|
+
transform: "translate(2 2)",
|
|
1204
|
+
width: "12"
|
|
1205
|
+
}
|
|
1206
|
+
),
|
|
1207
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1208
|
+
"path",
|
|
1209
|
+
{
|
|
1210
|
+
clipRule: "evenodd",
|
|
1211
|
+
d: "M12 4.39998L4 4.39999C3.33726 4.39999 2.8 4.93726 2.8 5.59999V9.6C2.8 10.2628 3.33726 10.8 4 10.8H8.00002C8.10611 10.8 8.20786 10.8421 8.28286 10.9172L10 12.6343V11.2C10 10.9791 10.1791 10.8 10.4 10.8H12C12.6627 10.8 13.2 10.2628 13.2 9.6V5.59998C13.2 4.93723 12.6627 4.39998 12 4.39998ZM3.99999 3.59999L12 3.59998C13.1046 3.59998 14 4.49541 14 5.59998V9.6C14 10.7045 13.1046 11.6 12 11.6H10.8V13.6C10.8 13.7617 10.7026 13.9076 10.553 13.9695C10.4036 14.0314 10.2315 13.9972 10.1171 13.8829L7.83434 11.6H4C2.89543 11.6 2 10.7045 2 9.6V5.59999C2 4.49542 2.89542 3.6 3.99999 3.59999Z",
|
|
1212
|
+
fill: "white",
|
|
1213
|
+
fillRule: "evenodd"
|
|
1214
|
+
}
|
|
1215
|
+
)
|
|
1216
|
+
]
|
|
1217
|
+
})
|
|
1218
|
+
);
|
|
1219
|
+
}
|
|
1220
|
+
);
|
|
1221
|
+
CircleChatIcon.displayName = "CircleChatIcon";
|
|
1222
|
+
|
|
1223
|
+
// src/icons/circle-file.tsx
|
|
1224
|
+
var React17 = __toESM(require("react"), 1);
|
|
1225
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1226
|
+
var CircleFileIcon = React17.forwardRef(
|
|
1227
|
+
(_a, forwardedRef) => {
|
|
1228
|
+
var _b = _a, { color = "currentColor" } = _b, props = __objRest(_b, ["color"]);
|
|
1229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1230
|
+
"svg",
|
|
1231
|
+
__spreadProps(__spreadValues({
|
|
1232
|
+
fill: "none",
|
|
1233
|
+
height: "16",
|
|
1234
|
+
viewBox: "0 0 16 16",
|
|
1235
|
+
width: "16",
|
|
1236
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1237
|
+
}, props), {
|
|
1238
|
+
ref: forwardedRef,
|
|
1239
|
+
children: [
|
|
1240
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("rect", { fill: color, height: "16", rx: "8", width: "16" }),
|
|
1241
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1242
|
+
"rect",
|
|
1243
|
+
{
|
|
1244
|
+
fill: "white",
|
|
1245
|
+
fillOpacity: "0.01",
|
|
1246
|
+
height: "12",
|
|
1247
|
+
transform: "translate(2 2)",
|
|
1248
|
+
width: "12"
|
|
1249
|
+
}
|
|
1250
|
+
),
|
|
1251
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1252
|
+
"path",
|
|
1253
|
+
{
|
|
1254
|
+
clipRule: "evenodd",
|
|
1255
|
+
d: "M4.39998 4.00005C4.39998 3.77914 4.57906 3.60005 4.79998 3.60005H9.26861C9.37469 3.60005 9.47643 3.64219 9.55145 3.71721L11.4829 5.64858C11.5578 5.72359 11.6 5.82534 11.6 5.93142V12C11.6 12.2209 11.4209 12.4 11.2 12.4H4.79998C4.57906 12.4 4.39998 12.2209 4.39998 12V4.00005ZM4.79998 2.80005C4.13723 2.80005 3.59998 3.3373 3.59998 4.00005V12C3.59998 12.6628 4.13723 13.2 4.79998 13.2H11.2C11.8627 13.2 12.4 12.6628 12.4 12V5.93142C12.4 5.61316 12.2736 5.30794 12.0485 5.08289L10.1171 3.15152C9.89209 2.92648 9.58686 2.80005 9.26861 2.80005H4.79998ZM5.59998 5.20005C5.37906 5.20005 5.19998 5.37914 5.19998 5.60005C5.19998 5.82096 5.37906 6.00005 5.59998 6.00005H7.99998C8.22089 6.00005 8.39998 5.82096 8.39998 5.60005C8.39998 5.37914 8.22089 5.20005 7.99998 5.20005H5.59998ZM5.59998 7.60005C5.37906 7.60005 5.19998 7.77914 5.19998 8.00005C5.19998 8.22096 5.37906 8.40005 5.59998 8.40005H10.4C10.6209 8.40005 10.8 8.22096 10.8 8.00005C10.8 7.77914 10.6209 7.60005 10.4 7.60005H5.59998ZM5.59998 10C5.37906 10 5.19998 10.1792 5.19998 10.4C5.19998 10.6209 5.37906 10.8 5.59998 10.8H10.4C10.6209 10.8 10.8 10.6209 10.8 10.4C10.8 10.1792 10.6209 10 10.4 10H5.59998Z",
|
|
1256
|
+
fill: "white",
|
|
1257
|
+
fillRule: "evenodd"
|
|
1258
|
+
}
|
|
1259
|
+
)
|
|
1260
|
+
]
|
|
1261
|
+
})
|
|
1262
|
+
);
|
|
1263
|
+
}
|
|
1264
|
+
);
|
|
1265
|
+
CircleFileIcon.displayName = "CircleFileIcon";
|
|
1266
|
+
|
|
1267
|
+
// src/molecules/dynamic-form-editor-field-editor-panel.tsx
|
|
1268
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1269
|
+
function isRecord2(value) {
|
|
1270
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
1271
|
+
}
|
|
1272
|
+
function isFieldType(value, types) {
|
|
1273
|
+
return types.some((t) => t === value);
|
|
1274
|
+
}
|
|
1275
|
+
function parseOptionalNumber(value) {
|
|
1276
|
+
const trimmed = value.trim();
|
|
1277
|
+
if (trimmed.length === 0) return void 0;
|
|
1278
|
+
const num = Number(trimmed);
|
|
1279
|
+
return Number.isFinite(num) ? num : void 0;
|
|
1280
|
+
}
|
|
1281
|
+
function getValidation(field) {
|
|
1282
|
+
return field.validation ? field.validation : {};
|
|
1283
|
+
}
|
|
1284
|
+
function cleanValidation(next) {
|
|
1285
|
+
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;
|
|
1286
|
+
return hasAny ? next : void 0;
|
|
1287
|
+
}
|
|
1288
|
+
function moveItem(items, fromIndex, toIndex) {
|
|
1289
|
+
if (fromIndex < 0 || fromIndex >= items.length) return items;
|
|
1290
|
+
if (toIndex < 0 || toIndex >= items.length) return items;
|
|
1291
|
+
if (fromIndex === toIndex) return items;
|
|
1292
|
+
const next = [...items];
|
|
1293
|
+
const [item] = next.splice(fromIndex, 1);
|
|
1294
|
+
next.splice(toIndex, 0, item);
|
|
1295
|
+
return next;
|
|
1296
|
+
}
|
|
1297
|
+
function getOptionDrafts(field) {
|
|
1298
|
+
const raw = field.options;
|
|
1299
|
+
if (!Array.isArray(raw)) return [];
|
|
1300
|
+
return raw.map((o) => {
|
|
1301
|
+
if (!isRecord2(o)) return null;
|
|
1302
|
+
const label = typeof o.label === "string" ? o.label : "";
|
|
1303
|
+
const valueRaw = o.value;
|
|
1304
|
+
const value = typeof valueRaw === "string" || typeof valueRaw === "number" ? String(valueRaw) : "";
|
|
1305
|
+
return { label, value };
|
|
1306
|
+
}).filter((v) => v !== null);
|
|
1307
|
+
}
|
|
1308
|
+
function getImageOptionDrafts(field) {
|
|
1309
|
+
const raw = field.options;
|
|
1310
|
+
if (!Array.isArray(raw)) return [];
|
|
1311
|
+
return raw.map(
|
|
1312
|
+
(o) => {
|
|
1313
|
+
if (!isRecord2(o)) return null;
|
|
1314
|
+
const label = typeof o.label === "string" ? o.label : "";
|
|
1315
|
+
const valueRaw = o.value;
|
|
1316
|
+
const value = typeof valueRaw === "string" || typeof valueRaw === "number" ? String(valueRaw) : "";
|
|
1317
|
+
const imageSrc = typeof o.imageSrc === "string" ? o.imageSrc : "";
|
|
1318
|
+
const alt = typeof o.alt === "string" ? o.alt : void 0;
|
|
1319
|
+
return __spreadValues({ label, value, imageSrc }, alt ? { alt } : {});
|
|
1320
|
+
}
|
|
1321
|
+
).filter(
|
|
1322
|
+
(v) => v !== null
|
|
1323
|
+
);
|
|
1324
|
+
}
|
|
1325
|
+
function toFieldOptions(options) {
|
|
1326
|
+
return options.map((o) => ({ label: o.label, value: o.value }));
|
|
1327
|
+
}
|
|
1328
|
+
function toImageFieldOptions(options) {
|
|
1329
|
+
return options.map((o) => __spreadValues({
|
|
1330
|
+
label: o.label,
|
|
1331
|
+
value: o.value,
|
|
1332
|
+
imageSrc: o.imageSrc
|
|
1333
|
+
}, o.alt !== void 0 ? { alt: o.alt } : {}));
|
|
1334
|
+
}
|
|
1335
|
+
function DynamicFormEditorFieldEditorPanel(props) {
|
|
1336
|
+
const {
|
|
1337
|
+
field,
|
|
1338
|
+
fieldIndex,
|
|
1339
|
+
fields,
|
|
1340
|
+
readonly,
|
|
1341
|
+
fieldTypes,
|
|
1342
|
+
onRenameField,
|
|
1343
|
+
onUpdateField,
|
|
1344
|
+
onDeleteField,
|
|
1345
|
+
onMoveField,
|
|
1346
|
+
onDuplicateField
|
|
1347
|
+
} = props;
|
|
1348
|
+
const canMoveUp = fieldIndex > 0;
|
|
1349
|
+
const canMoveDown = fieldIndex >= 0 && fieldIndex < fields.length - 1;
|
|
1350
|
+
const placeholderValue = (0, import_react9.useMemo)(() => {
|
|
1351
|
+
if (!field) return "";
|
|
1352
|
+
return String(field.placeholder || "");
|
|
1353
|
+
}, [field]);
|
|
1354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Card, { style: { flex: 1, minWidth: 520, padding: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes2.Flex, { direction: "column", gap: "4", children: [
|
|
1355
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes2.Flex, { align: "center", justify: "between", children: [
|
|
1356
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typo, { variant: "body", children: "\uD544\uB4DC \uD3B8\uC9D1" }),
|
|
1357
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes2.Flex, { align: "center", gap: "1", children: [
|
|
1358
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1359
|
+
IconButton,
|
|
1360
|
+
{
|
|
1361
|
+
"aria-label": "\uD544\uB4DC \uC704\uB85C",
|
|
1362
|
+
disabled: readonly || !field || !canMoveUp,
|
|
1363
|
+
onClick: () => {
|
|
1364
|
+
onMoveField("up");
|
|
1365
|
+
},
|
|
1366
|
+
variant: "soft",
|
|
1367
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_icons.ChevronUpIcon, {})
|
|
1368
|
+
}
|
|
1369
|
+
),
|
|
1370
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1371
|
+
IconButton,
|
|
1372
|
+
{
|
|
1373
|
+
"aria-label": "\uD544\uB4DC \uC544\uB798\uB85C",
|
|
1374
|
+
disabled: readonly || !field || !canMoveDown,
|
|
1375
|
+
onClick: () => {
|
|
1376
|
+
onMoveField("down");
|
|
1377
|
+
},
|
|
1378
|
+
variant: "soft",
|
|
1379
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_icons.ChevronDownIcon, {})
|
|
1380
|
+
}
|
|
1381
|
+
),
|
|
1382
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1383
|
+
IconButton,
|
|
1384
|
+
{
|
|
1385
|
+
"aria-label": "\uD544\uB4DC \uBCF5\uC81C",
|
|
1386
|
+
disabled: readonly || !field,
|
|
1387
|
+
onClick: onDuplicateField,
|
|
1388
|
+
variant: "soft",
|
|
1389
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_icons.CopyIcon, {})
|
|
1390
|
+
}
|
|
1391
|
+
),
|
|
1392
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1393
|
+
IconButton,
|
|
1394
|
+
{
|
|
1395
|
+
"aria-label": "\uD544\uB4DC \uC0AD\uC81C",
|
|
1396
|
+
disabled: readonly || !field,
|
|
1397
|
+
onClick: onDeleteField,
|
|
1398
|
+
variant: "soft",
|
|
1399
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_icons.TrashIcon, {})
|
|
1400
|
+
}
|
|
1401
|
+
)
|
|
1402
|
+
] })
|
|
1403
|
+
] }),
|
|
1404
|
+
!field ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typo, { color: "gray", variant: "caption", children: "\uC67C\uCABD\uC5D0\uC11C \uD544\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694." }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes2.Flex, { direction: "column", gap: "3", children: [
|
|
1405
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes2.Flex, { align: "end", gap: "2", children: [
|
|
1406
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes10.Box, { style: { flex: 1 }, children: [
|
|
1407
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typo, { variant: "caption", children: "name" }),
|
|
1408
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1409
|
+
TextField.Root,
|
|
1410
|
+
{
|
|
1411
|
+
disabled: readonly,
|
|
1412
|
+
onChange: (e) => {
|
|
1413
|
+
onRenameField(e.target.value);
|
|
1414
|
+
},
|
|
1415
|
+
value: field.name
|
|
1416
|
+
}
|
|
1417
|
+
)
|
|
1418
|
+
] }),
|
|
1419
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes10.Box, { style: { flex: 1 }, children: [
|
|
1420
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typo, { variant: "caption", children: "label" }),
|
|
1421
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1422
|
+
TextField.Root,
|
|
1423
|
+
{
|
|
1424
|
+
disabled: readonly,
|
|
1425
|
+
onChange: (e) => {
|
|
1426
|
+
onUpdateField(updateFieldCommonProps(field, { label: e.target.value }));
|
|
1427
|
+
},
|
|
1428
|
+
value: field.label
|
|
1429
|
+
}
|
|
1430
|
+
)
|
|
1431
|
+
] })
|
|
1432
|
+
] }),
|
|
1433
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes2.Flex, { align: "center", gap: "2", children: [
|
|
1434
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1435
|
+
Select.Root,
|
|
1436
|
+
{
|
|
1437
|
+
disabled: readonly,
|
|
1438
|
+
onValueChange: (v) => {
|
|
1439
|
+
if (!isFieldType(v, fieldTypes)) return;
|
|
1440
|
+
onUpdateField(resetFieldType(field, v, fields));
|
|
1441
|
+
},
|
|
1442
|
+
value: field.type,
|
|
1443
|
+
children: [
|
|
1444
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Select.Trigger, { style: { minWidth: 220 } }),
|
|
1445
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Select.Content, { children: fieldTypes.map((t) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Select.Item, { value: t, children: getFieldTypeLabel(t) }, t)) })
|
|
1446
|
+
]
|
|
1447
|
+
}
|
|
1448
|
+
),
|
|
1449
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes2.Flex, { align: "center", gap: "2", children: [
|
|
1450
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1451
|
+
Checkbox,
|
|
1452
|
+
{
|
|
1453
|
+
checked: Boolean(field.required),
|
|
1454
|
+
disabled: readonly,
|
|
1455
|
+
onCheckedChange: (checked) => {
|
|
1456
|
+
onUpdateField(updateFieldCommonProps(field, { required: checked }));
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
),
|
|
1460
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typo, { variant: "caption", children: "\uD544\uC218" })
|
|
1461
|
+
] })
|
|
1462
|
+
] }),
|
|
1463
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes10.Box, { children: [
|
|
1464
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typo, { variant: "caption", children: "description" }),
|
|
1465
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1466
|
+
TextArea,
|
|
1467
|
+
{
|
|
1468
|
+
disabled: readonly,
|
|
1469
|
+
onChange: (e) => {
|
|
1470
|
+
onUpdateField(
|
|
1471
|
+
updateFieldCommonProps(field, { description: e.target.value })
|
|
1472
|
+
);
|
|
1473
|
+
},
|
|
1474
|
+
rows: 3,
|
|
1475
|
+
value: field.description || ""
|
|
1476
|
+
}
|
|
1477
|
+
)
|
|
1478
|
+
] }),
|
|
1479
|
+
field.type === "short_text" || field.type === "long_text" || field.type === "number" || field.type === "email" || field.type === "dropdown" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes10.Box, { children: [
|
|
1480
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typo, { variant: "caption", children: "placeholder" }),
|
|
1481
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1482
|
+
TextField.Root,
|
|
1483
|
+
{
|
|
1484
|
+
disabled: readonly,
|
|
1485
|
+
onChange: (e) => {
|
|
1486
|
+
onUpdateField(updateTextPlaceholder(field, e.target.value));
|
|
1487
|
+
},
|
|
1488
|
+
value: placeholderValue
|
|
1489
|
+
}
|
|
1490
|
+
)
|
|
1491
|
+
] }) : null,
|
|
1492
|
+
field.type === "choice" || field.type === "choices" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes10.Box, { children: [
|
|
1493
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typo, { variant: "caption", children: "orientation" }),
|
|
1494
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1495
|
+
Select.Root,
|
|
1496
|
+
{
|
|
1497
|
+
disabled: readonly,
|
|
1498
|
+
onValueChange: (v) => {
|
|
1499
|
+
const nextOrientation = v === "horizontal" ? "horizontal" : "vertical";
|
|
1500
|
+
onUpdateField(updateOrientation(field, nextOrientation));
|
|
1501
|
+
},
|
|
1502
|
+
value: field.orientation || "vertical",
|
|
1503
|
+
children: [
|
|
1504
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Select.Trigger, { style: { minWidth: 220 } }),
|
|
1505
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Select.Content, { children: [
|
|
1506
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Select.Item, { value: "vertical", children: "vertical" }),
|
|
1507
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Select.Item, { value: "horizontal", children: "horizontal" })
|
|
1508
|
+
] })
|
|
1509
|
+
]
|
|
1510
|
+
}
|
|
1511
|
+
)
|
|
1512
|
+
] }) : null,
|
|
1513
|
+
field.type === "dropdown" || field.type === "choice" || field.type === "radio_cards" || field.type === "choices" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Card, { style: { padding: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes2.Flex, { direction: "column", gap: "2", children: [
|
|
1514
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes2.Flex, { align: "center", justify: "between", children: [
|
|
1515
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typo, { variant: "caption", children: "options" }),
|
|
1516
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1517
|
+
Button,
|
|
1518
|
+
{
|
|
1519
|
+
disabled: readonly,
|
|
1520
|
+
onClick: () => {
|
|
1521
|
+
const drafts = getOptionDrafts(field);
|
|
1522
|
+
const nextDrafts = [
|
|
1523
|
+
...drafts,
|
|
1524
|
+
{
|
|
1525
|
+
label: `\uC635\uC158 ${drafts.length + 1}`,
|
|
1526
|
+
value: `option${drafts.length + 1}`
|
|
1527
|
+
}
|
|
1528
|
+
];
|
|
1529
|
+
onUpdateField(updateOptions(field, toFieldOptions(nextDrafts)));
|
|
1530
|
+
},
|
|
1531
|
+
size: "small",
|
|
1532
|
+
variant: "soft",
|
|
1533
|
+
children: [
|
|
1534
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_icons.PlusIcon, {}),
|
|
1535
|
+
" \uCD94\uAC00"
|
|
1536
|
+
]
|
|
1537
|
+
}
|
|
1538
|
+
)
|
|
1539
|
+
] }),
|
|
1540
|
+
getOptionDrafts(field).map((opt, i) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes2.Flex, { align: "end", gap: "2", children: [
|
|
1541
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes10.Box, { style: { flex: 1 }, children: [
|
|
1542
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typo, { variant: "caption", children: "label" }),
|
|
1543
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1544
|
+
TextField.Root,
|
|
1545
|
+
{
|
|
1546
|
+
disabled: readonly,
|
|
1547
|
+
onChange: (e) => {
|
|
1548
|
+
const drafts = getOptionDrafts(field);
|
|
1549
|
+
const nextDrafts = drafts.map(
|
|
1550
|
+
(d, idx) => idx === i ? __spreadProps(__spreadValues({}, d), { label: e.target.value }) : d
|
|
1551
|
+
);
|
|
1552
|
+
onUpdateField(updateOptions(field, toFieldOptions(nextDrafts)));
|
|
1553
|
+
},
|
|
1554
|
+
value: opt.label
|
|
1555
|
+
}
|
|
1556
|
+
)
|
|
1557
|
+
] }),
|
|
1558
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes10.Box, { style: { flex: 1 }, children: [
|
|
1559
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typo, { variant: "caption", children: "value" }),
|
|
1560
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1561
|
+
TextField.Root,
|
|
1562
|
+
{
|
|
1563
|
+
disabled: readonly,
|
|
1564
|
+
onChange: (e) => {
|
|
1565
|
+
const drafts = getOptionDrafts(field);
|
|
1566
|
+
const nextDrafts = drafts.map(
|
|
1567
|
+
(d, idx) => idx === i ? __spreadProps(__spreadValues({}, d), { value: e.target.value }) : d
|
|
1568
|
+
);
|
|
1569
|
+
onUpdateField(updateOptions(field, toFieldOptions(nextDrafts)));
|
|
1570
|
+
},
|
|
1571
|
+
value: opt.value
|
|
1572
|
+
}
|
|
1573
|
+
)
|
|
1574
|
+
] }),
|
|
1575
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes2.Flex, { gap: "1", children: [
|
|
1576
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1577
|
+
IconButton,
|
|
1578
|
+
{
|
|
1579
|
+
"aria-label": "\uC635\uC158 \uC704\uB85C",
|
|
1580
|
+
disabled: readonly || i === 0,
|
|
1581
|
+
onClick: () => {
|
|
1582
|
+
const drafts = getOptionDrafts(field);
|
|
1583
|
+
const nextDrafts = moveItem(drafts, i, i - 1);
|
|
1584
|
+
onUpdateField(updateOptions(field, toFieldOptions(nextDrafts)));
|
|
1585
|
+
},
|
|
1586
|
+
variant: "soft",
|
|
1587
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_icons.ChevronUpIcon, {})
|
|
1588
|
+
}
|
|
1589
|
+
),
|
|
1590
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1591
|
+
IconButton,
|
|
1592
|
+
{
|
|
1593
|
+
"aria-label": "\uC635\uC158 \uC544\uB798\uB85C",
|
|
1594
|
+
disabled: readonly || i === getOptionDrafts(field).length - 1,
|
|
1595
|
+
onClick: () => {
|
|
1596
|
+
const drafts = getOptionDrafts(field);
|
|
1597
|
+
const nextDrafts = moveItem(drafts, i, i + 1);
|
|
1598
|
+
onUpdateField(updateOptions(field, toFieldOptions(nextDrafts)));
|
|
1599
|
+
},
|
|
1600
|
+
variant: "soft",
|
|
1601
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_icons.ChevronDownIcon, {})
|
|
1602
|
+
}
|
|
1603
|
+
),
|
|
1604
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1605
|
+
IconButton,
|
|
1606
|
+
{
|
|
1607
|
+
"aria-label": "\uC635\uC158 \uC0AD\uC81C",
|
|
1608
|
+
disabled: readonly,
|
|
1609
|
+
onClick: () => {
|
|
1610
|
+
const drafts = getOptionDrafts(field);
|
|
1611
|
+
const nextDrafts = drafts.filter((_, idx) => idx !== i);
|
|
1612
|
+
onUpdateField(updateOptions(field, toFieldOptions(nextDrafts)));
|
|
1613
|
+
},
|
|
1614
|
+
variant: "soft",
|
|
1615
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_icons.TrashIcon, {})
|
|
1616
|
+
}
|
|
1617
|
+
)
|
|
1618
|
+
] })
|
|
1619
|
+
] }, `${opt.value}-${opt.label}`))
|
|
1620
|
+
] }) }) : null,
|
|
1621
|
+
field.type === "image_radio_card" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Card, { style: { padding: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes2.Flex, { direction: "column", gap: "3", children: [
|
|
1622
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes2.Flex, { align: "center", justify: "between", children: [
|
|
1623
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typo, { variant: "caption", children: "image options" }),
|
|
1624
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1625
|
+
Button,
|
|
1626
|
+
{
|
|
1627
|
+
disabled: readonly,
|
|
1628
|
+
onClick: () => {
|
|
1629
|
+
const drafts = getImageOptionDrafts(field);
|
|
1630
|
+
const nextDrafts = [
|
|
1631
|
+
...drafts,
|
|
1632
|
+
{
|
|
1633
|
+
label: `\uC774\uBBF8\uC9C0 ${drafts.length + 1}`,
|
|
1634
|
+
value: `option${drafts.length + 1}`,
|
|
1635
|
+
imageSrc: "https://placehold.co/300x300/png?text=new"
|
|
1636
|
+
}
|
|
1637
|
+
];
|
|
1638
|
+
onUpdateField(updateImageOptions(field, toImageFieldOptions(nextDrafts)));
|
|
1639
|
+
},
|
|
1640
|
+
size: "small",
|
|
1641
|
+
variant: "soft",
|
|
1642
|
+
children: [
|
|
1643
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_icons.PlusIcon, {}),
|
|
1644
|
+
" \uCD94\uAC00"
|
|
1645
|
+
]
|
|
1646
|
+
}
|
|
1647
|
+
)
|
|
1648
|
+
] }),
|
|
1649
|
+
getImageOptionDrafts(field).map((opt, i) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1650
|
+
Card,
|
|
1651
|
+
{
|
|
1652
|
+
style: { padding: 10 },
|
|
1653
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes2.Flex, { direction: "column", gap: "2", children: [
|
|
1654
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes2.Flex, { align: "end", gap: "2", children: [
|
|
1655
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes10.Box, { style: { flex: 1 }, children: [
|
|
1656
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typo, { variant: "caption", children: "label" }),
|
|
1657
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1658
|
+
TextField.Root,
|
|
1659
|
+
{
|
|
1660
|
+
disabled: readonly,
|
|
1661
|
+
onChange: (e) => {
|
|
1662
|
+
const drafts = getImageOptionDrafts(field);
|
|
1663
|
+
const nextDrafts = drafts.map(
|
|
1664
|
+
(d, idx) => idx === i ? __spreadProps(__spreadValues({}, d), { label: e.target.value }) : d
|
|
1665
|
+
);
|
|
1666
|
+
onUpdateField(
|
|
1667
|
+
updateImageOptions(field, toImageFieldOptions(nextDrafts))
|
|
1668
|
+
);
|
|
1669
|
+
},
|
|
1670
|
+
value: opt.label
|
|
1671
|
+
}
|
|
1672
|
+
)
|
|
1673
|
+
] }),
|
|
1674
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes10.Box, { style: { flex: 1 }, children: [
|
|
1675
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typo, { variant: "caption", children: "value" }),
|
|
1676
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1677
|
+
TextField.Root,
|
|
1678
|
+
{
|
|
1679
|
+
disabled: readonly,
|
|
1680
|
+
onChange: (e) => {
|
|
1681
|
+
const drafts = getImageOptionDrafts(field);
|
|
1682
|
+
const nextDrafts = drafts.map(
|
|
1683
|
+
(d, idx) => idx === i ? __spreadProps(__spreadValues({}, d), { value: e.target.value }) : d
|
|
1684
|
+
);
|
|
1685
|
+
onUpdateField(
|
|
1686
|
+
updateImageOptions(field, toImageFieldOptions(nextDrafts))
|
|
1687
|
+
);
|
|
1688
|
+
},
|
|
1689
|
+
value: opt.value
|
|
1690
|
+
}
|
|
1691
|
+
)
|
|
1692
|
+
] })
|
|
1693
|
+
] }),
|
|
1694
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes10.Box, { children: [
|
|
1695
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typo, { variant: "caption", children: "imageSrc" }),
|
|
1696
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1697
|
+
TextField.Root,
|
|
1698
|
+
{
|
|
1699
|
+
disabled: readonly,
|
|
1700
|
+
onChange: (e) => {
|
|
1701
|
+
const drafts = getImageOptionDrafts(field);
|
|
1702
|
+
const nextDrafts = drafts.map(
|
|
1703
|
+
(d, idx) => idx === i ? __spreadProps(__spreadValues({}, d), { imageSrc: e.target.value }) : d
|
|
1704
|
+
);
|
|
1705
|
+
onUpdateField(
|
|
1706
|
+
updateImageOptions(field, toImageFieldOptions(nextDrafts))
|
|
1707
|
+
);
|
|
1708
|
+
},
|
|
1709
|
+
value: opt.imageSrc
|
|
1710
|
+
}
|
|
1711
|
+
)
|
|
1712
|
+
] }),
|
|
1713
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes2.Flex, { align: "end", gap: "2", children: [
|
|
1714
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes10.Box, { style: { flex: 1 }, children: [
|
|
1715
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typo, { variant: "caption", children: "alt" }),
|
|
1716
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1717
|
+
TextField.Root,
|
|
1718
|
+
{
|
|
1719
|
+
disabled: readonly,
|
|
1720
|
+
onChange: (e) => {
|
|
1721
|
+
const drafts = getImageOptionDrafts(field);
|
|
1722
|
+
const nextAlt = e.target.value.trim().length === 0 ? void 0 : e.target.value;
|
|
1723
|
+
const nextDrafts = drafts.map(
|
|
1724
|
+
(d, idx) => idx === i ? __spreadProps(__spreadValues({}, d), { alt: nextAlt }) : d
|
|
1725
|
+
);
|
|
1726
|
+
onUpdateField(
|
|
1727
|
+
updateImageOptions(field, toImageFieldOptions(nextDrafts))
|
|
1728
|
+
);
|
|
1729
|
+
},
|
|
1730
|
+
value: opt.alt || ""
|
|
1731
|
+
}
|
|
1732
|
+
)
|
|
1733
|
+
] }),
|
|
1734
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1735
|
+
IconButton,
|
|
1736
|
+
{
|
|
1737
|
+
"aria-label": "\uC774\uBBF8\uC9C0 \uC635\uC158 \uC0AD\uC81C",
|
|
1738
|
+
disabled: readonly,
|
|
1739
|
+
onClick: () => {
|
|
1740
|
+
const drafts = getImageOptionDrafts(field);
|
|
1741
|
+
const nextDrafts = drafts.filter((_, idx) => idx !== i);
|
|
1742
|
+
onUpdateField(
|
|
1743
|
+
updateImageOptions(field, toImageFieldOptions(nextDrafts))
|
|
1744
|
+
);
|
|
1745
|
+
},
|
|
1746
|
+
variant: "soft",
|
|
1747
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_icons.TrashIcon, {})
|
|
1748
|
+
}
|
|
1749
|
+
)
|
|
1750
|
+
] })
|
|
1751
|
+
] })
|
|
1752
|
+
},
|
|
1753
|
+
`${opt.value}-${opt.label}-${opt.imageSrc}`
|
|
1754
|
+
)),
|
|
1755
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes2.Flex, { gap: "2", children: [
|
|
1756
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes10.Box, { style: { flex: 1 }, children: [
|
|
1757
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typo, { variant: "caption", children: "gridColumnsCount" }),
|
|
1758
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1759
|
+
TextField.Root,
|
|
1760
|
+
{
|
|
1761
|
+
disabled: readonly,
|
|
1762
|
+
inputMode: "numeric",
|
|
1763
|
+
onChange: (e) => {
|
|
1764
|
+
onUpdateField(
|
|
1765
|
+
updateImageLayout(field, {
|
|
1766
|
+
gridColumnsCount: parseOptionalNumber(e.target.value)
|
|
1767
|
+
})
|
|
1768
|
+
);
|
|
1769
|
+
},
|
|
1770
|
+
value: String(field.gridColumnsCount || "")
|
|
1771
|
+
}
|
|
1772
|
+
)
|
|
1773
|
+
] }),
|
|
1774
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes10.Box, { style: { flex: 1 }, children: [
|
|
1775
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typo, { variant: "caption", children: "gridItemHeight" }),
|
|
1776
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1777
|
+
TextField.Root,
|
|
1778
|
+
{
|
|
1779
|
+
disabled: readonly,
|
|
1780
|
+
onChange: (e) => {
|
|
1781
|
+
onUpdateField(
|
|
1782
|
+
updateImageLayout(field, { gridItemHeight: e.target.value })
|
|
1783
|
+
);
|
|
1784
|
+
},
|
|
1785
|
+
value: String(field.gridItemHeight || "")
|
|
1786
|
+
}
|
|
1787
|
+
)
|
|
1788
|
+
] }),
|
|
1789
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes10.Box, { style: { flex: 1 }, children: [
|
|
1790
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typo, { variant: "caption", children: "gridGap" }),
|
|
1791
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1792
|
+
TextField.Root,
|
|
1793
|
+
{
|
|
1794
|
+
disabled: readonly,
|
|
1795
|
+
onChange: (e) => {
|
|
1796
|
+
onUpdateField(updateImageLayout(field, { gridGap: e.target.value }));
|
|
1797
|
+
},
|
|
1798
|
+
value: String(field.gridGap || "")
|
|
1799
|
+
}
|
|
1800
|
+
)
|
|
1801
|
+
] })
|
|
1802
|
+
] }),
|
|
1803
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes10.Box, { children: [
|
|
1804
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typo, { variant: "caption", children: "imageFit" }),
|
|
1805
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1806
|
+
Select.Root,
|
|
1807
|
+
{
|
|
1808
|
+
disabled: readonly,
|
|
1809
|
+
onValueChange: (v) => {
|
|
1810
|
+
const nextFit = v === "contain" ? "contain" : "cover";
|
|
1811
|
+
onUpdateField(updateImageLayout(field, { imageFit: nextFit }));
|
|
1812
|
+
},
|
|
1813
|
+
value: field.imageFit || "cover",
|
|
1814
|
+
children: [
|
|
1815
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Select.Trigger, { style: { minWidth: 220 } }),
|
|
1816
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Select.Content, { children: [
|
|
1817
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Select.Item, { value: "cover", children: "cover" }),
|
|
1818
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Select.Item, { value: "contain", children: "contain" })
|
|
1819
|
+
] })
|
|
1820
|
+
]
|
|
1821
|
+
}
|
|
1822
|
+
)
|
|
1823
|
+
] })
|
|
1824
|
+
] }) }) : null,
|
|
1825
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Card, { style: { padding: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes2.Flex, { direction: "column", gap: "2", children: [
|
|
1826
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typo, { variant: "caption", children: "validation" }),
|
|
1827
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes2.Flex, { gap: "2", children: [
|
|
1828
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes10.Box, { style: { flex: 1 }, children: [
|
|
1829
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typo, { variant: "caption", children: "min" }),
|
|
1830
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1831
|
+
TextField.Root,
|
|
1832
|
+
{
|
|
1833
|
+
disabled: readonly,
|
|
1834
|
+
inputMode: "numeric",
|
|
1835
|
+
onChange: (e) => {
|
|
1836
|
+
const current = getValidation(field);
|
|
1837
|
+
const next = cleanValidation(__spreadProps(__spreadValues({}, current), {
|
|
1838
|
+
min: parseOptionalNumber(e.target.value)
|
|
1839
|
+
}));
|
|
1840
|
+
onUpdateField(updateFieldValidation(field, next));
|
|
1841
|
+
},
|
|
1842
|
+
value: getValidation(field).min !== void 0 ? String(getValidation(field).min) : ""
|
|
1843
|
+
}
|
|
1844
|
+
)
|
|
1845
|
+
] }),
|
|
1846
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes10.Box, { style: { flex: 1 }, children: [
|
|
1847
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typo, { variant: "caption", children: "max" }),
|
|
1848
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1849
|
+
TextField.Root,
|
|
1850
|
+
{
|
|
1851
|
+
disabled: readonly,
|
|
1852
|
+
inputMode: "numeric",
|
|
1853
|
+
onChange: (e) => {
|
|
1854
|
+
const current = getValidation(field);
|
|
1855
|
+
const next = cleanValidation(__spreadProps(__spreadValues({}, current), {
|
|
1856
|
+
max: parseOptionalNumber(e.target.value)
|
|
1857
|
+
}));
|
|
1858
|
+
onUpdateField(updateFieldValidation(field, next));
|
|
1859
|
+
},
|
|
1860
|
+
value: getValidation(field).max !== void 0 ? String(getValidation(field).max) : ""
|
|
1861
|
+
}
|
|
1862
|
+
)
|
|
1863
|
+
] })
|
|
1864
|
+
] }),
|
|
1865
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes10.Box, { children: [
|
|
1866
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typo, { variant: "caption", children: "pattern" }),
|
|
1867
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1868
|
+
TextField.Root,
|
|
1869
|
+
{
|
|
1870
|
+
disabled: readonly,
|
|
1871
|
+
onChange: (e) => {
|
|
1872
|
+
const current = getValidation(field);
|
|
1873
|
+
const next = cleanValidation(__spreadProps(__spreadValues({}, current), { pattern: e.target.value }));
|
|
1874
|
+
onUpdateField(updateFieldValidation(field, next));
|
|
1875
|
+
},
|
|
1876
|
+
value: String(getValidation(field).pattern || "")
|
|
1877
|
+
}
|
|
1878
|
+
)
|
|
1879
|
+
] }),
|
|
1880
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_themes10.Box, { children: [
|
|
1881
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typo, { variant: "caption", children: "message" }),
|
|
1882
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1883
|
+
TextField.Root,
|
|
1884
|
+
{
|
|
1885
|
+
disabled: readonly,
|
|
1886
|
+
onChange: (e) => {
|
|
1887
|
+
const current = getValidation(field);
|
|
1888
|
+
const next = cleanValidation(__spreadProps(__spreadValues({}, current), { message: e.target.value }));
|
|
1889
|
+
onUpdateField(updateFieldValidation(field, next));
|
|
1890
|
+
},
|
|
1891
|
+
value: String(getValidation(field).message || "")
|
|
1892
|
+
}
|
|
1893
|
+
)
|
|
1894
|
+
] })
|
|
1895
|
+
] }) })
|
|
1896
|
+
] })
|
|
1897
|
+
] }) });
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
// src/molecules/dynamic-form-editor-field-list-panel.tsx
|
|
1901
|
+
var import_react10 = require("react");
|
|
1902
|
+
var import_themes11 = require("@radix-ui/themes");
|
|
1903
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1904
|
+
function isFieldType2(value, types) {
|
|
1905
|
+
return types.some((t) => t === value);
|
|
1906
|
+
}
|
|
1907
|
+
function DynamicFormEditorFieldListPanel(props) {
|
|
1908
|
+
const {
|
|
1909
|
+
fields,
|
|
1910
|
+
selectedFieldName,
|
|
1911
|
+
readonly,
|
|
1912
|
+
fieldTypes,
|
|
1913
|
+
hasFieldError,
|
|
1914
|
+
onSelectFieldName,
|
|
1915
|
+
onAddField
|
|
1916
|
+
} = props;
|
|
1917
|
+
const isEmpty = fields.length === 0;
|
|
1918
|
+
const triggerPlaceholder = (0, import_react10.useMemo)(() => {
|
|
1919
|
+
return readonly ? "\uCD94\uAC00(\uC77D\uAE30 \uC804\uC6A9)" : "\uCD94\uAC00";
|
|
1920
|
+
}, [readonly]);
|
|
1921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Card, { style: { width: 340, padding: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_themes2.Flex, { direction: "column", gap: "3", children: [
|
|
1922
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_themes2.Flex, { align: "center", justify: "between", children: [
|
|
1923
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Typo, { variant: "body", children: "\uD544\uB4DC" }),
|
|
1924
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1925
|
+
Select.Root,
|
|
1926
|
+
{
|
|
1927
|
+
disabled: readonly,
|
|
1928
|
+
onValueChange: (v) => {
|
|
1929
|
+
if (!isFieldType2(v, fieldTypes)) return;
|
|
1930
|
+
onAddField(v);
|
|
1931
|
+
},
|
|
1932
|
+
value: "",
|
|
1933
|
+
children: [
|
|
1934
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Select.Trigger, { placeholder: triggerPlaceholder }),
|
|
1935
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Select.Content, { children: fieldTypes.map((t) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Select.Item, { value: t, children: getFieldTypeLabel(t) }, t)) })
|
|
1936
|
+
]
|
|
1937
|
+
}
|
|
1938
|
+
)
|
|
1939
|
+
] }),
|
|
1940
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_themes2.Flex, { direction: "column", gap: "2", children: [
|
|
1941
|
+
isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Typo, { color: "gray", variant: "caption", children: "\uC544\uC9C1 \uD544\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4." }) : null,
|
|
1942
|
+
fields.map((field) => {
|
|
1943
|
+
const isSelected = field.name === selectedFieldName;
|
|
1944
|
+
const hasError = hasFieldError(field.name);
|
|
1945
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1946
|
+
Card,
|
|
1947
|
+
{
|
|
1948
|
+
error: isSelected ? hasError : void 0,
|
|
1949
|
+
onClick: () => {
|
|
1950
|
+
onSelectFieldName(field.name);
|
|
1951
|
+
},
|
|
1952
|
+
style: {
|
|
1953
|
+
padding: 10,
|
|
1954
|
+
cursor: "pointer",
|
|
1955
|
+
opacity: readonly ? 0.8 : 1,
|
|
1956
|
+
border: isSelected ? "1px solid var(--accent-9)" : "1px solid transparent"
|
|
1957
|
+
},
|
|
1958
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_themes11.Box, { style: { minWidth: 0 }, children: [
|
|
1959
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1960
|
+
Typo,
|
|
1961
|
+
{
|
|
1962
|
+
style: {
|
|
1963
|
+
whiteSpace: "nowrap",
|
|
1964
|
+
overflow: "hidden",
|
|
1965
|
+
textOverflow: "ellipsis"
|
|
1966
|
+
},
|
|
1967
|
+
variant: "body",
|
|
1968
|
+
children: field.label
|
|
1969
|
+
}
|
|
1970
|
+
),
|
|
1971
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Typo, { color: "gray", variant: "caption", children: [
|
|
1972
|
+
field.name,
|
|
1973
|
+
" \xB7 ",
|
|
1974
|
+
field.type,
|
|
1975
|
+
field.required ? " \xB7 required" : ""
|
|
1976
|
+
] })
|
|
1977
|
+
] })
|
|
1978
|
+
},
|
|
1979
|
+
field.name
|
|
1980
|
+
);
|
|
1981
|
+
})
|
|
1982
|
+
] })
|
|
1983
|
+
] }) });
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
// src/molecules/dynamic-form-editor-issues-panel.tsx
|
|
1987
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1988
|
+
function DynamicFormEditorIssuesPanel(props) {
|
|
1989
|
+
const { issues } = props;
|
|
1990
|
+
if (issues.length === 0) return null;
|
|
1991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Card, { style: { padding: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_themes2.Flex, { direction: "column", gap: "2", children: [
|
|
1992
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Typo, { variant: "caption", children: "\uC2A4\uD0A4\uB9C8 \uC774\uC288" }),
|
|
1993
|
+
issues.map((i) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1994
|
+
Typo,
|
|
1995
|
+
{
|
|
1996
|
+
color: i.level === "error" ? "red" : "gray",
|
|
1997
|
+
variant: "caption",
|
|
1998
|
+
children: [
|
|
1999
|
+
"[",
|
|
2000
|
+
i.level,
|
|
2001
|
+
"] ",
|
|
2002
|
+
i.message,
|
|
2003
|
+
i.fieldName ? ` (field: ${i.fieldName})` : ""
|
|
2004
|
+
]
|
|
2005
|
+
},
|
|
2006
|
+
i.id
|
|
2007
|
+
))
|
|
2008
|
+
] }) });
|
|
2009
|
+
}
|
|
2010
|
+
|
|
2011
|
+
// src/molecules/dynamic-form.tsx
|
|
2012
|
+
var import_react15 = require("react");
|
|
2013
|
+
var import_formik = require("formik");
|
|
2014
|
+
var Yup = __toESM(require("yup"), 1);
|
|
2015
|
+
var import_themes19 = require("@radix-ui/themes");
|
|
2016
|
+
|
|
2017
|
+
// src/context/dynamic-form-context.tsx
|
|
2018
|
+
var import_react13 = require("react");
|
|
2019
|
+
|
|
2020
|
+
// src/molecules/form/form.tsx
|
|
2021
|
+
var RadixForm = __toESM(require("@radix-ui/react-form"), 1);
|
|
2022
|
+
var import_react12 = require("react");
|
|
2023
|
+
|
|
2024
|
+
// src/atoms/heading.tsx
|
|
2025
|
+
var import_themes12 = require("@radix-ui/themes");
|
|
2026
|
+
var import_react11 = require("react");
|
|
2027
|
+
var import_themes13 = require("@radix-ui/themes");
|
|
2028
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2029
|
+
var mapVariant = (variant) => {
|
|
2030
|
+
switch (variant) {
|
|
2031
|
+
case "heading1":
|
|
2032
|
+
return "7";
|
|
2033
|
+
case "heading2":
|
|
2034
|
+
return "6";
|
|
2035
|
+
case "heading3":
|
|
2036
|
+
return "5";
|
|
2037
|
+
case "heading4":
|
|
2038
|
+
return "4";
|
|
2039
|
+
case "heading5":
|
|
2040
|
+
return "3";
|
|
2041
|
+
default:
|
|
2042
|
+
return void 0;
|
|
2043
|
+
}
|
|
2044
|
+
};
|
|
2045
|
+
function Heading2(props) {
|
|
2046
|
+
const _a = props, { size, children, variant } = _a, rest = __objRest(_a, ["size", "children", "variant"]);
|
|
2047
|
+
const radixSize = (0, import_react11.useMemo)(() => {
|
|
2048
|
+
return variant ? mapWithResponsive({
|
|
2049
|
+
value: variant,
|
|
2050
|
+
mapFn: mapVariant
|
|
2051
|
+
}) : size;
|
|
2052
|
+
}, [size, variant]);
|
|
2053
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_themes12.Heading, __spreadProps(__spreadValues({}, rest), { size: radixSize, children }));
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2056
|
+
// src/molecules/form/form.tsx
|
|
2057
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2058
|
+
var Root4 = (0, import_react12.forwardRef)(
|
|
2059
|
+
(_a, ref) => {
|
|
2060
|
+
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
|
2061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2062
|
+
RadixForm.Root,
|
|
2063
|
+
__spreadProps(__spreadValues({}, rest), {
|
|
2064
|
+
className: `FormRoot ${className || ""}`,
|
|
2065
|
+
ref,
|
|
2066
|
+
children
|
|
2067
|
+
})
|
|
2068
|
+
);
|
|
2069
|
+
}
|
|
2070
|
+
);
|
|
2071
|
+
Root4.displayName = "FORM_ROOT";
|
|
2072
|
+
var FieldContext = (0, import_react12.createContext)({
|
|
2073
|
+
name: ""
|
|
2074
|
+
});
|
|
2075
|
+
var Field2 = (0, import_react12.forwardRef)(
|
|
2076
|
+
(_a, ref) => {
|
|
2077
|
+
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
|
2078
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2079
|
+
RadixForm.Field,
|
|
2080
|
+
__spreadProps(__spreadValues({}, rest), {
|
|
2081
|
+
className: `FormField ${className || ""}`,
|
|
2082
|
+
ref,
|
|
2083
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(FieldContext.Provider, { value: rest, children })
|
|
2084
|
+
})
|
|
2085
|
+
);
|
|
2086
|
+
}
|
|
2087
|
+
);
|
|
2088
|
+
Field2.displayName = "FORM_FIELD";
|
|
2089
|
+
function HeadingLabel(props) {
|
|
2090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Heading2, __spreadProps(__spreadValues({ variant: "heading5" }, props), { children: props.children }));
|
|
2091
|
+
}
|
|
2092
|
+
function CaptionLabel(props) {
|
|
2093
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Typo, __spreadProps(__spreadValues({ color: "gray", variant: "caption", weight: "bold" }, props), { children: props.children }));
|
|
2094
|
+
}
|
|
2095
|
+
function BodyLabel(props) {
|
|
2096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Typo, __spreadProps(__spreadValues({ variant: "body", weight: "bold" }, props), { children: props.children }));
|
|
2097
|
+
}
|
|
2098
|
+
var Label2 = (0, import_react12.forwardRef)(
|
|
2099
|
+
(_a, ref) => {
|
|
2100
|
+
var _b = _a, { children, className, variant } = _b, rest = __objRest(_b, ["children", "className", "variant"]);
|
|
2101
|
+
const Comp = (0, import_react12.useMemo)(() => {
|
|
2102
|
+
switch (variant) {
|
|
2103
|
+
case "title":
|
|
2104
|
+
return HeadingLabel;
|
|
2105
|
+
case "caption":
|
|
2106
|
+
return CaptionLabel;
|
|
2107
|
+
case "body":
|
|
2108
|
+
default:
|
|
2109
|
+
return BodyLabel;
|
|
2110
|
+
}
|
|
2111
|
+
}, [variant]);
|
|
2112
|
+
const fieldProps = (0, import_react12.useContext)(FieldContext);
|
|
2113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2114
|
+
RadixForm.Label,
|
|
2115
|
+
__spreadProps(__spreadValues({}, rest), {
|
|
2116
|
+
asChild: true,
|
|
2117
|
+
className: `FormLabel ${className || ""}`,
|
|
2118
|
+
ref,
|
|
2119
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Comp, { children: [
|
|
2120
|
+
children,
|
|
2121
|
+
fieldProps.required ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Typo, { as: "span", color: "tomato", children: ` *` }) : null
|
|
2122
|
+
] })
|
|
2123
|
+
})
|
|
2124
|
+
);
|
|
2125
|
+
}
|
|
2126
|
+
);
|
|
2127
|
+
Label2.displayName = "FORM_Label";
|
|
2128
|
+
var Message2 = (0, import_react12.forwardRef)(
|
|
2129
|
+
(_a, ref) => {
|
|
2130
|
+
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
|
2131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2132
|
+
RadixForm.Message,
|
|
2133
|
+
__spreadProps(__spreadValues({}, rest), {
|
|
2134
|
+
asChild: true,
|
|
2135
|
+
className: `FormMessage ${className || ""}`,
|
|
2136
|
+
ref,
|
|
2137
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Typo, { color: "red", children })
|
|
2138
|
+
})
|
|
2139
|
+
);
|
|
2140
|
+
}
|
|
2141
|
+
);
|
|
2142
|
+
Message2.displayName = "FORM_Message";
|
|
2143
|
+
var Control2 = (0, import_react12.forwardRef)(
|
|
2144
|
+
(_a, ref) => {
|
|
2145
|
+
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
|
2146
|
+
const fieldProps = (0, import_react12.useContext)(FieldContext);
|
|
2147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2148
|
+
RadixForm.Control,
|
|
2149
|
+
__spreadProps(__spreadValues({}, rest), {
|
|
2150
|
+
className: `FormControl ${className || ""}`,
|
|
2151
|
+
ref,
|
|
2152
|
+
required: fieldProps.required
|
|
2153
|
+
})
|
|
2154
|
+
);
|
|
2155
|
+
}
|
|
2156
|
+
);
|
|
2157
|
+
Control2.displayName = "FORM_Control";
|
|
2158
|
+
function FormItem(_a) {
|
|
2159
|
+
var _b = _a, {
|
|
2160
|
+
label,
|
|
2161
|
+
labelVariant,
|
|
2162
|
+
children,
|
|
2163
|
+
errorMessage
|
|
2164
|
+
} = _b, fieldProps = __objRest(_b, [
|
|
2165
|
+
"label",
|
|
2166
|
+
"labelVariant",
|
|
2167
|
+
"children",
|
|
2168
|
+
"errorMessage"
|
|
2169
|
+
]);
|
|
2170
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Form.Field, __spreadProps(__spreadValues({}, fieldProps), { children: [
|
|
2171
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Form.Label, { variant: labelVariant, children: label }),
|
|
2172
|
+
children,
|
|
2173
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Form.Message, { forceMatch: Boolean(errorMessage), children: errorMessage })
|
|
2174
|
+
] }));
|
|
2175
|
+
}
|
|
2176
|
+
var Form = {
|
|
2177
|
+
Root: Root4,
|
|
2178
|
+
Field: Field2,
|
|
2179
|
+
Label: Label2,
|
|
2180
|
+
Message: Message2,
|
|
2181
|
+
Control: RadixForm.Control,
|
|
2182
|
+
Submit: RadixForm.Submit,
|
|
2183
|
+
FormItem
|
|
2184
|
+
};
|
|
2185
|
+
|
|
2186
|
+
// src/context/dynamic-form-context.tsx
|
|
2187
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2188
|
+
var DynamicFormContext = (0, import_react13.createContext)(null);
|
|
2189
|
+
function DynamicFormProvider({
|
|
2190
|
+
children,
|
|
2191
|
+
fields,
|
|
2192
|
+
formik,
|
|
2193
|
+
readonly = false,
|
|
2194
|
+
formStyle
|
|
2195
|
+
}) {
|
|
2196
|
+
const contextValue = {
|
|
2197
|
+
formik,
|
|
2198
|
+
fields,
|
|
2199
|
+
readonly,
|
|
2200
|
+
getFieldValue: (name) => formik.values[name],
|
|
2201
|
+
getFieldError: (name) => {
|
|
2202
|
+
const error = formik.errors[name];
|
|
2203
|
+
const touched = formik.touched[name];
|
|
2204
|
+
return touched && error ? String(error) : void 0;
|
|
2205
|
+
},
|
|
2206
|
+
getFieldTouched: (name) => Boolean(formik.touched[name]),
|
|
2207
|
+
setFieldValue: (field, value) => __async(null, null, function* () {
|
|
2208
|
+
yield formik.setFieldValue(field, value);
|
|
2209
|
+
}),
|
|
2210
|
+
handleChange: formik.handleChange,
|
|
2211
|
+
handleBlur: formik.handleBlur
|
|
2212
|
+
};
|
|
2213
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DynamicFormContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Form.Root, { onSubmit: formik.handleSubmit, style: formStyle, children }) });
|
|
2214
|
+
}
|
|
2215
|
+
function useDynamicForm() {
|
|
2216
|
+
const context = (0, import_react13.useContext)(DynamicFormContext);
|
|
2217
|
+
if (!context) {
|
|
2218
|
+
throw new Error("useDynamicForm must be used within a DynamicFormProvider");
|
|
2219
|
+
}
|
|
2220
|
+
return context;
|
|
2221
|
+
}
|
|
2222
|
+
|
|
2223
|
+
// src/atoms/check-box-group.tsx
|
|
2224
|
+
var import_themes14 = require("@radix-ui/themes");
|
|
2225
|
+
var import_react14 = require("react");
|
|
2226
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2227
|
+
var Root5 = (0, import_react14.forwardRef)((props, ref) => {
|
|
2228
|
+
const _a = props, { children, size = "medium" } = _a, rest = __objRest(_a, ["children", "size"]);
|
|
2229
|
+
const groupSize = (0, import_react14.useMemo)(() => {
|
|
2230
|
+
switch (size) {
|
|
2231
|
+
case "small":
|
|
2232
|
+
return "1";
|
|
2233
|
+
case "large":
|
|
2234
|
+
return "3";
|
|
2235
|
+
case "medium":
|
|
2236
|
+
default:
|
|
2237
|
+
return "2";
|
|
2238
|
+
}
|
|
2239
|
+
}, [size]);
|
|
2240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_themes14.CheckboxGroup.Root, __spreadProps(__spreadValues({}, rest), { ref, size: groupSize, children }));
|
|
2241
|
+
});
|
|
2242
|
+
Root5.displayName = "CheckboxGroup.Root";
|
|
2243
|
+
var CheckboxGroup = {
|
|
2244
|
+
Root: Root5,
|
|
2245
|
+
Item: import_themes14.CheckboxGroup.Item
|
|
2246
|
+
};
|
|
2247
|
+
|
|
2248
|
+
// src/atoms/radio-group.tsx
|
|
2249
|
+
var import_themes15 = require("@radix-ui/themes");
|
|
2250
|
+
|
|
2251
|
+
// src/atoms/radio-cards.tsx
|
|
2252
|
+
var import_themes16 = require("@radix-ui/themes");
|
|
2253
|
+
|
|
2254
|
+
// src/atoms/grid.tsx
|
|
2255
|
+
var import_themes17 = require("@radix-ui/themes");
|
|
2256
|
+
|
|
2257
|
+
// src/atoms/inset.tsx
|
|
2258
|
+
var import_themes18 = require("@radix-ui/themes");
|
|
2259
|
+
|
|
2260
|
+
// src/molecules/dynamic-field.tsx
|
|
2261
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2262
|
+
function isRecord3(value) {
|
|
2263
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
2264
|
+
}
|
|
2265
|
+
function isFieldOption(value) {
|
|
2266
|
+
if (!isRecord3(value)) return false;
|
|
2267
|
+
const label = value.label;
|
|
2268
|
+
const optionValue = value.value;
|
|
2269
|
+
return typeof label === "string" && (typeof optionValue === "string" || typeof optionValue === "number");
|
|
2270
|
+
}
|
|
2271
|
+
function isImageFieldOption(value) {
|
|
2272
|
+
if (!isRecord3(value)) return false;
|
|
2273
|
+
if (!isFieldOption(value)) return false;
|
|
2274
|
+
const imageSrc = value.imageSrc;
|
|
2275
|
+
const alt = value.alt;
|
|
2276
|
+
return typeof imageSrc === "string" && (alt === void 0 || typeof alt === "string");
|
|
2277
|
+
}
|
|
2278
|
+
function getStringProp(obj, key, fallback) {
|
|
2279
|
+
if (!isRecord3(obj)) return fallback;
|
|
2280
|
+
const value = obj[key];
|
|
2281
|
+
return typeof value === "string" ? value : fallback;
|
|
2282
|
+
}
|
|
2283
|
+
function getNumberProp(obj, key, fallback) {
|
|
2284
|
+
if (!isRecord3(obj)) return fallback;
|
|
2285
|
+
const value = obj[key];
|
|
2286
|
+
return typeof value === "number" ? value : fallback;
|
|
2287
|
+
}
|
|
2288
|
+
function getOptions(field) {
|
|
2289
|
+
if (!isRecord3(field)) return null;
|
|
2290
|
+
const options = field.options;
|
|
2291
|
+
if (!Array.isArray(options)) return null;
|
|
2292
|
+
if (!options.every(isFieldOption)) return null;
|
|
2293
|
+
return options;
|
|
2294
|
+
}
|
|
2295
|
+
function getImageOptions(field) {
|
|
2296
|
+
if (!isRecord3(field)) return null;
|
|
2297
|
+
const options = field.options;
|
|
2298
|
+
if (!Array.isArray(options)) return null;
|
|
2299
|
+
if (!options.every(isImageFieldOption)) return null;
|
|
2300
|
+
return options;
|
|
2301
|
+
}
|
|
2302
|
+
function DynamicFormField({
|
|
2303
|
+
field
|
|
2304
|
+
}) {
|
|
2305
|
+
const {
|
|
2306
|
+
getFieldValue,
|
|
2307
|
+
getFieldError,
|
|
2308
|
+
getFieldTouched,
|
|
2309
|
+
setFieldValue,
|
|
2310
|
+
handleChange,
|
|
2311
|
+
handleBlur,
|
|
2312
|
+
readonly
|
|
2313
|
+
} = useDynamicForm();
|
|
2314
|
+
const name = field.name;
|
|
2315
|
+
const value = getFieldValue(name);
|
|
2316
|
+
const error = getFieldError(name);
|
|
2317
|
+
const touched = getFieldTouched(name);
|
|
2318
|
+
const hasError = Boolean(error && touched);
|
|
2319
|
+
const commonProps = {
|
|
2320
|
+
name,
|
|
2321
|
+
value: String(value || ""),
|
|
2322
|
+
onChange: readonly ? void 0 : handleChange,
|
|
2323
|
+
onBlur: readonly ? void 0 : handleBlur,
|
|
2324
|
+
error: hasError,
|
|
2325
|
+
disabled: readonly
|
|
2326
|
+
};
|
|
2327
|
+
const selectedValue = typeof value === "string" || typeof value === "number" ? String(value) : "";
|
|
2328
|
+
switch (field.type) {
|
|
2329
|
+
case "short_text":
|
|
2330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2331
|
+
TextField.Root,
|
|
2332
|
+
__spreadProps(__spreadValues({}, commonProps), {
|
|
2333
|
+
placeholder: field.placeholder,
|
|
2334
|
+
type: "text"
|
|
2335
|
+
})
|
|
2336
|
+
);
|
|
2337
|
+
case "email":
|
|
2338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2339
|
+
TextField.Root,
|
|
2340
|
+
__spreadProps(__spreadValues({}, commonProps), {
|
|
2341
|
+
placeholder: field.placeholder,
|
|
2342
|
+
type: "email"
|
|
2343
|
+
})
|
|
2344
|
+
);
|
|
2345
|
+
case "number":
|
|
2346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2347
|
+
TextField.Root,
|
|
2348
|
+
__spreadProps(__spreadValues({}, commonProps), {
|
|
2349
|
+
inputMode: "numeric",
|
|
2350
|
+
pattern: "[0-9]*",
|
|
2351
|
+
placeholder: field.placeholder,
|
|
2352
|
+
type: "number"
|
|
2353
|
+
})
|
|
2354
|
+
);
|
|
2355
|
+
case "long_text":
|
|
2356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TextArea, __spreadProps(__spreadValues({ rows: 4 }, commonProps), { placeholder: field.placeholder }));
|
|
2357
|
+
case "dropdown":
|
|
2358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
2359
|
+
Select.Root,
|
|
2360
|
+
{
|
|
2361
|
+
disabled: readonly,
|
|
2362
|
+
onValueChange: readonly ? void 0 : (newValue) => {
|
|
2363
|
+
void setFieldValue(name, newValue);
|
|
2364
|
+
},
|
|
2365
|
+
value: selectedValue,
|
|
2366
|
+
children: [
|
|
2367
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2368
|
+
Select.Trigger,
|
|
2369
|
+
{
|
|
2370
|
+
placeholder: field.placeholder,
|
|
2371
|
+
style: {
|
|
2372
|
+
alignSelf: "flex-start",
|
|
2373
|
+
width: "fit-content",
|
|
2374
|
+
minWidth: "180px",
|
|
2375
|
+
maxWidth: "100%"
|
|
2376
|
+
}
|
|
2377
|
+
}
|
|
2378
|
+
),
|
|
2379
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Select.Content, { children: field.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Select.Item, { value: String(option.value), children: option.label }, option.value)) })
|
|
2380
|
+
]
|
|
2381
|
+
}
|
|
2382
|
+
);
|
|
2383
|
+
case "choice":
|
|
2384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2385
|
+
import_themes15.RadioGroup.Root,
|
|
2386
|
+
{
|
|
2387
|
+
disabled: readonly,
|
|
2388
|
+
onValueChange: readonly ? void 0 : (newValue) => {
|
|
2389
|
+
void setFieldValue(name, newValue);
|
|
2390
|
+
},
|
|
2391
|
+
orientation: field.orientation,
|
|
2392
|
+
value: String(value || ""),
|
|
2393
|
+
children: field.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_themes15.RadioGroup.Item, { value: String(option.value), children: option.label }, option.value))
|
|
2394
|
+
}
|
|
2395
|
+
);
|
|
2396
|
+
case "radio_cards": {
|
|
2397
|
+
const options = getOptions(field);
|
|
2398
|
+
if (!options) return null;
|
|
2399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2400
|
+
import_themes16.RadioCards.Root,
|
|
2401
|
+
{
|
|
2402
|
+
disabled: readonly,
|
|
2403
|
+
onValueChange: readonly ? void 0 : (newValue) => {
|
|
2404
|
+
void setFieldValue(name, newValue);
|
|
2405
|
+
},
|
|
2406
|
+
value: selectedValue,
|
|
2407
|
+
children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_themes16.RadioCards.Item, { value: String(option.value), children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Typo, { children: option.label }) }, option.value))
|
|
2408
|
+
}
|
|
2409
|
+
);
|
|
2410
|
+
}
|
|
2411
|
+
case "choices":
|
|
2412
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2413
|
+
CheckboxGroup.Root,
|
|
2414
|
+
{
|
|
2415
|
+
disabled: readonly,
|
|
2416
|
+
onValueChange: readonly ? void 0 : (newValue) => {
|
|
2417
|
+
void setFieldValue(name, newValue);
|
|
2418
|
+
},
|
|
2419
|
+
orientation: field.orientation,
|
|
2420
|
+
value: Array.isArray(value) ? value.map(String) : [],
|
|
2421
|
+
children: field.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(CheckboxGroup.Item, { value: String(option.value), children: option.label }, option.value))
|
|
2422
|
+
}
|
|
2423
|
+
);
|
|
2424
|
+
case "yes_no":
|
|
2425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_themes2.Flex, { gap: "2", children: [
|
|
2426
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2427
|
+
Checkbox,
|
|
2428
|
+
{
|
|
2429
|
+
checked: Boolean(value),
|
|
2430
|
+
disabled: readonly,
|
|
2431
|
+
onCheckedChange: readonly ? void 0 : (checked) => {
|
|
2432
|
+
void setFieldValue(name, checked);
|
|
2433
|
+
}
|
|
2434
|
+
}
|
|
2435
|
+
),
|
|
2436
|
+
field.description ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Typo, { color: "gray", variant: "caption", children: field.description }) : null
|
|
2437
|
+
] });
|
|
2438
|
+
case "image_radio_card": {
|
|
2439
|
+
const options = getImageOptions(field);
|
|
2440
|
+
if (!options) return null;
|
|
2441
|
+
const gridColumnsCount = Math.max(1, getNumberProp(field, "gridColumnsCount", 4));
|
|
2442
|
+
const gridColumns = getStringProp(
|
|
2443
|
+
field,
|
|
2444
|
+
"gridColumns",
|
|
2445
|
+
`repeat(${gridColumnsCount}, 1fr)`
|
|
2446
|
+
);
|
|
2447
|
+
const gridItemHeight = getStringProp(field, "gridItemHeight", "100px");
|
|
2448
|
+
const gridRows = getStringProp(field, "gridRows", gridItemHeight);
|
|
2449
|
+
const gridGap = getStringProp(field, "gridGap", "2");
|
|
2450
|
+
const imageFitRaw = getStringProp(field, "imageFit", "cover");
|
|
2451
|
+
const imageFit = imageFitRaw === "contain" ? "contain" : "cover";
|
|
2452
|
+
const handleValueChange = (newValue) => {
|
|
2453
|
+
if (readonly) return;
|
|
2454
|
+
const selectedOption = options.find(
|
|
2455
|
+
(option) => String(option.value) === newValue
|
|
2456
|
+
);
|
|
2457
|
+
if (!selectedOption) return;
|
|
2458
|
+
void setFieldValue(name, selectedOption.value);
|
|
2459
|
+
};
|
|
2460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2461
|
+
import_themes16.RadioCards.Root,
|
|
2462
|
+
{
|
|
2463
|
+
disabled: readonly,
|
|
2464
|
+
onValueChange: readonly ? void 0 : handleValueChange,
|
|
2465
|
+
value: selectedValue,
|
|
2466
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_themes17.Grid, { columns: gridColumns, gap: gridGap, rows: gridRows, children: options.map((option) => {
|
|
2467
|
+
const optionValue = String(option.value);
|
|
2468
|
+
const altText = option.alt || option.label;
|
|
2469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2470
|
+
import_themes16.RadioCards.Item,
|
|
2471
|
+
{
|
|
2472
|
+
style: {
|
|
2473
|
+
padding: 0
|
|
2474
|
+
},
|
|
2475
|
+
value: optionValue,
|
|
2476
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_themes18.Inset, { style: { width: "100%", height: "100%", padding: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2477
|
+
"img",
|
|
2478
|
+
{
|
|
2479
|
+
alt: altText,
|
|
2480
|
+
src: option.imageSrc,
|
|
2481
|
+
style: {
|
|
2482
|
+
width: "100%",
|
|
2483
|
+
height: "100%",
|
|
2484
|
+
display: "block",
|
|
2485
|
+
objectFit: imageFit,
|
|
2486
|
+
opacity: readonly ? 0.7 : 1
|
|
2487
|
+
}
|
|
2488
|
+
}
|
|
2489
|
+
) })
|
|
2490
|
+
},
|
|
2491
|
+
optionValue
|
|
2492
|
+
);
|
|
2493
|
+
}) })
|
|
2494
|
+
}
|
|
2495
|
+
);
|
|
2496
|
+
}
|
|
2497
|
+
default:
|
|
2498
|
+
return null;
|
|
2499
|
+
}
|
|
2500
|
+
}
|
|
2501
|
+
|
|
2502
|
+
// src/molecules/dynamic-form.tsx
|
|
2503
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2504
|
+
function scrollToFirstError(errors, _fields) {
|
|
2505
|
+
const firstErrorFieldName = Object.keys(errors)[0];
|
|
2506
|
+
if (!firstErrorFieldName) return;
|
|
2507
|
+
let fieldElement = document.querySelector(`[name="${firstErrorFieldName}"]`);
|
|
2508
|
+
if (!fieldElement) {
|
|
2509
|
+
fieldElement = document.querySelector(
|
|
2510
|
+
`[data-field-name="${firstErrorFieldName}"]`
|
|
2511
|
+
);
|
|
2512
|
+
}
|
|
2513
|
+
if (!fieldElement) {
|
|
2514
|
+
fieldElement = document.querySelector(
|
|
2515
|
+
`[data-error-field="${firstErrorFieldName}"]`
|
|
2516
|
+
);
|
|
2517
|
+
}
|
|
2518
|
+
if (fieldElement) {
|
|
2519
|
+
fieldElement.scrollIntoView({
|
|
2520
|
+
behavior: "smooth",
|
|
2521
|
+
block: "nearest"
|
|
2522
|
+
});
|
|
2523
|
+
}
|
|
2524
|
+
}
|
|
2525
|
+
function DynamicFormRoot({
|
|
2526
|
+
fields,
|
|
2527
|
+
initialValues = {},
|
|
2528
|
+
onSubmit,
|
|
2529
|
+
children,
|
|
2530
|
+
readonly = false,
|
|
2531
|
+
formStyle
|
|
2532
|
+
}) {
|
|
2533
|
+
const validationSchema = (0, import_react15.useMemo)(() => {
|
|
2534
|
+
const schema = {};
|
|
2535
|
+
fields.forEach((field) => {
|
|
2536
|
+
if (field.validation) {
|
|
2537
|
+
const validation = createYupValidation(field, field.validation);
|
|
2538
|
+
if (validation) {
|
|
2539
|
+
schema[field.name] = validation;
|
|
2540
|
+
}
|
|
2541
|
+
} else if (field.required) {
|
|
2542
|
+
if (field.type === "choices") {
|
|
2543
|
+
schema[field.name] = Yup.array().min(1, `${field.label}\uC744(\uB97C) \uD558\uB098 \uC774\uC0C1 \uC120\uD0DD\uD574\uC8FC\uC138\uC694`).required(`${field.label}\uC740(\uB294) \uD544\uC218\uC785\uB2C8\uB2E4`);
|
|
2544
|
+
} else if (field.type === "yes_no") {
|
|
2545
|
+
schema[field.name] = Yup.boolean().oneOf(
|
|
2546
|
+
[true],
|
|
2547
|
+
`${field.label}\uC5D0 \uB3D9\uC758\uD574\uC8FC\uC138\uC694`
|
|
2548
|
+
);
|
|
2549
|
+
} else {
|
|
2550
|
+
schema[field.name] = Yup.string().required(
|
|
2551
|
+
`${field.label}\uC740(\uB294) \uD544\uC218\uC785\uB2C8\uB2E4`
|
|
2552
|
+
);
|
|
2553
|
+
}
|
|
2554
|
+
}
|
|
2555
|
+
});
|
|
2556
|
+
return Object.keys(schema).length > 0 ? Yup.object(schema) : void 0;
|
|
2557
|
+
}, [fields]);
|
|
2558
|
+
const handleSubmit = (0, import_react15.useCallback)(
|
|
2559
|
+
(values) => __async(null, null, function* () {
|
|
2560
|
+
yield onSubmit(values);
|
|
2561
|
+
}),
|
|
2562
|
+
[onSubmit]
|
|
2563
|
+
);
|
|
2564
|
+
const formik = (0, import_formik.useFormik)({
|
|
2565
|
+
initialValues: fields.reduce((acc, field) => {
|
|
2566
|
+
if (field.type === "choices") {
|
|
2567
|
+
acc[field.name] = initialValues[field.name] || [];
|
|
2568
|
+
} else if (field.type === "yes_no") {
|
|
2569
|
+
acc[field.name] = initialValues[field.name] || false;
|
|
2570
|
+
} else {
|
|
2571
|
+
acc[field.name] = initialValues[field.name] || "";
|
|
2572
|
+
}
|
|
2573
|
+
return acc;
|
|
2574
|
+
}, {}),
|
|
2575
|
+
validationSchema,
|
|
2576
|
+
validateOnBlur: true,
|
|
2577
|
+
validateOnChange: true,
|
|
2578
|
+
onSubmit: handleSubmit
|
|
2579
|
+
});
|
|
2580
|
+
(0, import_react15.useEffect)(() => {
|
|
2581
|
+
if (formik.submitCount > 0 && Object.keys(formik.errors).length > 0) {
|
|
2582
|
+
const timeoutId = setTimeout(() => {
|
|
2583
|
+
scrollToFirstError(formik.errors, fields);
|
|
2584
|
+
}, 100);
|
|
2585
|
+
return () => {
|
|
2586
|
+
clearTimeout(timeoutId);
|
|
2587
|
+
};
|
|
2588
|
+
}
|
|
2589
|
+
}, [formik.submitCount, formik.errors, fields]);
|
|
2590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2591
|
+
DynamicFormProvider,
|
|
2592
|
+
{
|
|
2593
|
+
fields,
|
|
2594
|
+
formStyle,
|
|
2595
|
+
formik,
|
|
2596
|
+
readonly,
|
|
2597
|
+
children
|
|
2598
|
+
}
|
|
2599
|
+
);
|
|
2600
|
+
}
|
|
2601
|
+
function DynamicFormFieldList({
|
|
2602
|
+
fields: fieldsProp,
|
|
2603
|
+
labelVariant
|
|
2604
|
+
}) {
|
|
2605
|
+
const { formik, fields: fieldsFromContext, readonly } = useDynamicForm();
|
|
2606
|
+
const fields = fieldsProp || fieldsFromContext;
|
|
2607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_jsx_runtime31.Fragment, { children: fields.map((field) => {
|
|
2608
|
+
const errorMessage = !readonly && formik.touched[field.name] && formik.errors[field.name] ? String(formik.errors[field.name]) : void 0;
|
|
2609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2610
|
+
import_themes19.Box,
|
|
2611
|
+
{
|
|
2612
|
+
"data-error-field": errorMessage ? field.name : void 0,
|
|
2613
|
+
"data-field-name": field.name,
|
|
2614
|
+
mb: "2",
|
|
2615
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2616
|
+
Form.FormItem,
|
|
2617
|
+
{
|
|
2618
|
+
errorMessage,
|
|
2619
|
+
label: field.label,
|
|
2620
|
+
labelVariant,
|
|
2621
|
+
name: field.name,
|
|
2622
|
+
required: field.required,
|
|
2623
|
+
children: [
|
|
2624
|
+
field.description && field.type !== "yes_no" ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Typo, { variant: "caption", children: field.description }) : null,
|
|
2625
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DynamicFormField, { field })
|
|
2626
|
+
]
|
|
2627
|
+
}
|
|
2628
|
+
)
|
|
2629
|
+
},
|
|
2630
|
+
field.name
|
|
2631
|
+
);
|
|
2632
|
+
}) });
|
|
2633
|
+
}
|
|
2634
|
+
var DynamicForm = {
|
|
2635
|
+
Root: DynamicFormRoot,
|
|
2636
|
+
FieldList: DynamicFormFieldList
|
|
2637
|
+
};
|
|
2638
|
+
function createYupValidation(field, validation) {
|
|
2639
|
+
if (!validation) return void 0;
|
|
2640
|
+
let schema;
|
|
2641
|
+
if (field.type === "number") {
|
|
2642
|
+
schema = Yup.number();
|
|
2643
|
+
} else if (field.type === "email") {
|
|
2644
|
+
schema = Yup.string().email(
|
|
2645
|
+
validation.message || "\uC62C\uBC14\uB978 \uC774\uBA54\uC77C \uD615\uC2DD\uC774 \uC544\uB2D9\uB2C8\uB2E4"
|
|
2646
|
+
);
|
|
2647
|
+
} else if (field.type === "choices") {
|
|
2648
|
+
schema = Yup.array();
|
|
2649
|
+
} else if (field.type === "yes_no") {
|
|
2650
|
+
schema = Yup.boolean();
|
|
2651
|
+
} else {
|
|
2652
|
+
schema = Yup.string();
|
|
2653
|
+
}
|
|
2654
|
+
if (validation.min !== void 0) {
|
|
2655
|
+
if (field.type === "number") {
|
|
2656
|
+
schema = schema.min(
|
|
2657
|
+
validation.min,
|
|
2658
|
+
validation.message || `\uCD5C\uC18C ${validation.min}\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`
|
|
2659
|
+
);
|
|
2660
|
+
} else if (field.type === "choices") {
|
|
2661
|
+
schema = schema.min(
|
|
2662
|
+
validation.min,
|
|
2663
|
+
validation.message || `\uCD5C\uC18C ${validation.min}\uAC1C \uC774\uC0C1 \uC120\uD0DD\uD574\uC8FC\uC138\uC694`
|
|
2664
|
+
);
|
|
2665
|
+
} else if (field.type === "yes_no") {
|
|
2666
|
+
} else {
|
|
2667
|
+
schema = schema.min(
|
|
2668
|
+
validation.min,
|
|
2669
|
+
validation.message || `\uCD5C\uC18C ${validation.min}\uC790 \uC774\uC0C1\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`
|
|
2670
|
+
);
|
|
2671
|
+
}
|
|
2672
|
+
}
|
|
2673
|
+
if (validation.max !== void 0) {
|
|
2674
|
+
if (field.type === "number") {
|
|
2675
|
+
schema = schema.max(
|
|
2676
|
+
validation.max,
|
|
2677
|
+
validation.message || `\uCD5C\uB300 ${validation.max}\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`
|
|
2678
|
+
);
|
|
2679
|
+
} else if (field.type === "choices") {
|
|
2680
|
+
schema = schema.max(
|
|
2681
|
+
validation.max,
|
|
2682
|
+
validation.message || `\uCD5C\uB300 ${validation.max}\uAC1C\uAE4C\uC9C0 \uC120\uD0DD \uAC00\uB2A5\uD569\uB2C8\uB2E4`
|
|
2683
|
+
);
|
|
2684
|
+
} else if (field.type === "yes_no") {
|
|
2685
|
+
} else {
|
|
2686
|
+
schema = schema.max(
|
|
2687
|
+
validation.max,
|
|
2688
|
+
validation.message || `\uCD5C\uB300 ${validation.max}\uC790 \uC774\uD558\uC5EC\uC57C \uD569\uB2C8\uB2E4`
|
|
2689
|
+
);
|
|
2690
|
+
}
|
|
2691
|
+
}
|
|
2692
|
+
if (validation.pattern) {
|
|
2693
|
+
if (field.type === "yes_no") {
|
|
2694
|
+
} else {
|
|
2695
|
+
schema = schema.matches(
|
|
2696
|
+
new RegExp(validation.pattern),
|
|
2697
|
+
validation.message || "\uC62C\uBC14\uB978 \uD615\uC2DD\uC774 \uC544\uB2D9\uB2C8\uB2E4"
|
|
2698
|
+
);
|
|
2699
|
+
}
|
|
2700
|
+
}
|
|
2701
|
+
if (field.required) {
|
|
2702
|
+
if (field.type === "yes_no") {
|
|
2703
|
+
schema = schema.oneOf(
|
|
2704
|
+
[true],
|
|
2705
|
+
validation.message || `${field.label}\uC5D0 \uB3D9\uC758\uD574\uC8FC\uC138\uC694`
|
|
2706
|
+
);
|
|
2707
|
+
} else if (field.type === "choices") {
|
|
2708
|
+
schema = schema.min(
|
|
2709
|
+
1,
|
|
2710
|
+
validation.message || `${field.label}\uC744(\uB97C) \uD558\uB098 \uC774\uC0C1 \uC120\uD0DD\uD574\uC8FC\uC138\uC694`
|
|
2711
|
+
);
|
|
2712
|
+
} else {
|
|
2713
|
+
schema = schema.required(
|
|
2714
|
+
validation.message || `${field.label}\uC740(\uB294) \uD544\uC218\uC785\uB2C8\uB2E4`
|
|
2715
|
+
);
|
|
2716
|
+
}
|
|
2717
|
+
}
|
|
2718
|
+
return schema;
|
|
2719
|
+
}
|
|
2720
|
+
|
|
2721
|
+
// src/molecules/dynamic-form-editor-preview-panel.tsx
|
|
2722
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2723
|
+
function DynamicFormEditorPreviewPanel(props) {
|
|
2724
|
+
const { show, fields } = props;
|
|
2725
|
+
if (!show) return null;
|
|
2726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Card, { style: { width: 420, padding: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_themes2.Flex, { direction: "column", gap: "3", children: [
|
|
2727
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Typo, { variant: "body", children: "\uD504\uB9AC\uBDF0" }),
|
|
2728
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DynamicForm.Root, { fields, onSubmit: () => void 0, readonly: true, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DynamicForm.FieldList, { labelVariant: "body" }) })
|
|
2729
|
+
] }) });
|
|
2730
|
+
}
|
|
2731
|
+
|
|
2732
|
+
// src/molecules/dynamic-form-editor.tsx
|
|
2733
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2734
|
+
function getInitialSchema(value, defaultValue) {
|
|
2735
|
+
if (value !== void 0) return normalizeSchema(value);
|
|
2736
|
+
return normalizeSchema(defaultValue);
|
|
2737
|
+
}
|
|
2738
|
+
function getSelectedField(schema, selectedFieldName) {
|
|
2739
|
+
if (!selectedFieldName) return { field: null, index: -1 };
|
|
2740
|
+
const index = findFieldIndexByName(schema.fields, selectedFieldName);
|
|
2741
|
+
if (index < 0) return { field: null, index: -1 };
|
|
2742
|
+
return { field: schema.fields[index], index };
|
|
2743
|
+
}
|
|
2744
|
+
function DynamicFormEditor(props) {
|
|
2745
|
+
const {
|
|
2746
|
+
value,
|
|
2747
|
+
defaultValue,
|
|
2748
|
+
onChange,
|
|
2749
|
+
onSave,
|
|
2750
|
+
onCancel,
|
|
2751
|
+
readonly = false,
|
|
2752
|
+
showPreview = false
|
|
2753
|
+
} = props;
|
|
2754
|
+
const isControlled = value !== void 0;
|
|
2755
|
+
const [uncontrolledSchema, setUncontrolledSchema] = (0, import_react16.useState)(
|
|
2756
|
+
() => getInitialSchema(void 0, defaultValue)
|
|
2757
|
+
);
|
|
2758
|
+
const effectiveSchema = (0, import_react16.useMemo)(() => {
|
|
2759
|
+
if (isControlled) return normalizeSchema(value);
|
|
2760
|
+
return uncontrolledSchema;
|
|
2761
|
+
}, [isControlled, uncontrolledSchema, value]);
|
|
2762
|
+
const [selectedFieldName, setSelectedFieldName] = (0, import_react16.useState)(() => {
|
|
2763
|
+
var _a, _b;
|
|
2764
|
+
const initialSchema = getInitialSchema(value, defaultValue);
|
|
2765
|
+
return (_b = (_a = initialSchema.fields[0]) == null ? void 0 : _a.name) != null ? _b : null;
|
|
2766
|
+
});
|
|
2767
|
+
const selected = (0, import_react16.useMemo)(() => {
|
|
2768
|
+
return getSelectedField(effectiveSchema, selectedFieldName);
|
|
2769
|
+
}, [effectiveSchema, selectedFieldName]);
|
|
2770
|
+
const issues = (0, import_react16.useMemo)(() => {
|
|
2771
|
+
return validateDynamicFormSchema(effectiveSchema);
|
|
2772
|
+
}, [effectiveSchema]);
|
|
2773
|
+
const errorFieldNameSet = (0, import_react16.useMemo)(() => {
|
|
2774
|
+
const set = /* @__PURE__ */ new Set();
|
|
2775
|
+
issues.forEach((i) => {
|
|
2776
|
+
if (i.level === "error" && i.fieldName) set.add(i.fieldName);
|
|
2777
|
+
});
|
|
2778
|
+
return set;
|
|
2779
|
+
}, [issues]);
|
|
2780
|
+
const hasFieldError = (0, import_react16.useCallback)(
|
|
2781
|
+
(fieldName) => {
|
|
2782
|
+
return errorFieldNameSet.has(fieldName);
|
|
2783
|
+
},
|
|
2784
|
+
[errorFieldNameSet]
|
|
2785
|
+
);
|
|
2786
|
+
const fieldTypes = (0, import_react16.useMemo)(() => getFieldTypes(), []);
|
|
2787
|
+
(0, import_react16.useEffect)(() => {
|
|
2788
|
+
var _a, _b;
|
|
2789
|
+
if (selectedFieldName && selected.field) return;
|
|
2790
|
+
setSelectedFieldName((_b = (_a = effectiveSchema.fields[0]) == null ? void 0 : _a.name) != null ? _b : null);
|
|
2791
|
+
}, [effectiveSchema.fields, selected.field, selectedFieldName]);
|
|
2792
|
+
(0, import_react16.useEffect)(() => {
|
|
2793
|
+
if (isControlled) return;
|
|
2794
|
+
setUncontrolledSchema(getInitialSchema(void 0, defaultValue));
|
|
2795
|
+
}, [defaultValue, isControlled]);
|
|
2796
|
+
const applySchema = (0, import_react16.useCallback)(
|
|
2797
|
+
(next) => {
|
|
2798
|
+
onChange == null ? void 0 : onChange(next);
|
|
2799
|
+
if (!isControlled) setUncontrolledSchema(next);
|
|
2800
|
+
},
|
|
2801
|
+
[isControlled, onChange]
|
|
2802
|
+
);
|
|
2803
|
+
const handleAddField = (0, import_react16.useCallback)(
|
|
2804
|
+
(type) => {
|
|
2805
|
+
if (readonly) return;
|
|
2806
|
+
const nextField = createDefaultField(type, effectiveSchema.fields);
|
|
2807
|
+
const nextFields = [...effectiveSchema.fields, nextField];
|
|
2808
|
+
applySchema(updateSchemaFields(effectiveSchema, nextFields));
|
|
2809
|
+
setSelectedFieldName(nextField.name);
|
|
2810
|
+
},
|
|
2811
|
+
[applySchema, effectiveSchema, readonly]
|
|
2812
|
+
);
|
|
2813
|
+
const handleUpdateSelectedField = (0, import_react16.useCallback)(
|
|
2814
|
+
(nextField) => {
|
|
2815
|
+
if (readonly) return;
|
|
2816
|
+
if (!selected.field || selected.index < 0) return;
|
|
2817
|
+
const nextFields = effectiveSchema.fields.map(
|
|
2818
|
+
(f, i) => i === selected.index ? nextField : f
|
|
2819
|
+
);
|
|
2820
|
+
applySchema(updateSchemaFields(effectiveSchema, nextFields));
|
|
2821
|
+
},
|
|
2822
|
+
[applySchema, effectiveSchema, readonly, selected.field, selected.index]
|
|
2823
|
+
);
|
|
2824
|
+
const handleRenameSelected = (0, import_react16.useCallback)(
|
|
2825
|
+
(nextName) => {
|
|
2826
|
+
if (readonly) return;
|
|
2827
|
+
const currentField = selected.field;
|
|
2828
|
+
if (!currentField) return;
|
|
2829
|
+
const others = effectiveSchema.fields.filter(
|
|
2830
|
+
(f) => f.name !== currentField.name
|
|
2831
|
+
);
|
|
2832
|
+
const uniqueName = createUniqueFieldName(others, nextName);
|
|
2833
|
+
const nextField = __spreadProps(__spreadValues({}, currentField), { name: uniqueName });
|
|
2834
|
+
handleUpdateSelectedField(nextField);
|
|
2835
|
+
setSelectedFieldName(uniqueName);
|
|
2836
|
+
},
|
|
2837
|
+
[effectiveSchema.fields, handleUpdateSelectedField, readonly, selected.field]
|
|
2838
|
+
);
|
|
2839
|
+
const handleDeleteSelected = (0, import_react16.useCallback)(() => {
|
|
2840
|
+
if (readonly) return;
|
|
2841
|
+
if (!selected.field || selected.index < 0) return;
|
|
2842
|
+
const nextFields = effectiveSchema.fields.filter(
|
|
2843
|
+
(_, i) => i !== selected.index
|
|
2844
|
+
);
|
|
2845
|
+
applySchema(updateSchemaFields(effectiveSchema, nextFields));
|
|
2846
|
+
let nextSelected = null;
|
|
2847
|
+
if (nextFields.length > selected.index) nextSelected = nextFields[selected.index].name;
|
|
2848
|
+
else if (nextFields.length > 0) nextSelected = nextFields[0].name;
|
|
2849
|
+
setSelectedFieldName(nextSelected);
|
|
2850
|
+
}, [applySchema, effectiveSchema, readonly, selected.field, selected.index]);
|
|
2851
|
+
const handleMoveSelected = (0, import_react16.useCallback)(
|
|
2852
|
+
(direction) => {
|
|
2853
|
+
if (readonly) return;
|
|
2854
|
+
if (!selected.field || selected.index < 0) return;
|
|
2855
|
+
const toIndex = direction === "up" ? selected.index - 1 : selected.index + 1;
|
|
2856
|
+
const nextFields = moveField(
|
|
2857
|
+
effectiveSchema.fields,
|
|
2858
|
+
selected.index,
|
|
2859
|
+
toIndex
|
|
2860
|
+
);
|
|
2861
|
+
applySchema(updateSchemaFields(effectiveSchema, nextFields));
|
|
2862
|
+
},
|
|
2863
|
+
[applySchema, effectiveSchema, readonly, selected.field, selected.index]
|
|
2864
|
+
);
|
|
2865
|
+
const handleDuplicateSelected = (0, import_react16.useCallback)(() => {
|
|
2866
|
+
if (readonly) return;
|
|
2867
|
+
if (!selected.field || selected.index < 0) return;
|
|
2868
|
+
const nextFields = duplicateField(
|
|
2869
|
+
effectiveSchema.fields,
|
|
2870
|
+
selected.index
|
|
2871
|
+
);
|
|
2872
|
+
applySchema(updateSchemaFields(effectiveSchema, nextFields));
|
|
2873
|
+
const duplicatedIndex = selected.index + 1;
|
|
2874
|
+
const nextSelected = nextFields.length > duplicatedIndex ? nextFields[duplicatedIndex].name : selected.field.name;
|
|
2875
|
+
setSelectedFieldName(nextSelected);
|
|
2876
|
+
}, [applySchema, effectiveSchema, readonly, selected.field, selected.index]);
|
|
2877
|
+
const handleSave = (0, import_react16.useCallback)(() => {
|
|
2878
|
+
if (!onSave) return;
|
|
2879
|
+
const result = onSave(effectiveSchema);
|
|
2880
|
+
void result;
|
|
2881
|
+
}, [effectiveSchema, onSave]);
|
|
2882
|
+
const disableSave = readonly || !onSave || hasErrorIssues(issues);
|
|
2883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_themes2.Flex, { align: "start", gap: "4", style: { width: "100%" }, children: [
|
|
2884
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2885
|
+
DynamicFormEditorFieldListPanel,
|
|
2886
|
+
{
|
|
2887
|
+
fieldTypes,
|
|
2888
|
+
fields: effectiveSchema.fields,
|
|
2889
|
+
hasFieldError,
|
|
2890
|
+
onAddField: handleAddField,
|
|
2891
|
+
onSelectFieldName: setSelectedFieldName,
|
|
2892
|
+
readonly,
|
|
2893
|
+
selectedFieldName
|
|
2894
|
+
}
|
|
2895
|
+
),
|
|
2896
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_themes2.Flex, { direction: "column", gap: "3", style: { flex: 1, minWidth: 520 }, children: [
|
|
2897
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2898
|
+
DynamicFormEditorFieldEditorPanel,
|
|
2899
|
+
{
|
|
2900
|
+
field: selected.field,
|
|
2901
|
+
fieldIndex: selected.index,
|
|
2902
|
+
fieldTypes,
|
|
2903
|
+
fields: effectiveSchema.fields,
|
|
2904
|
+
onDeleteField: handleDeleteSelected,
|
|
2905
|
+
onDuplicateField: handleDuplicateSelected,
|
|
2906
|
+
onMoveField: handleMoveSelected,
|
|
2907
|
+
onRenameField: handleRenameSelected,
|
|
2908
|
+
onUpdateField: handleUpdateSelectedField,
|
|
2909
|
+
readonly
|
|
2910
|
+
}
|
|
2911
|
+
),
|
|
2912
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DynamicFormEditorIssuesPanel, { issues }),
|
|
2913
|
+
onSave || onCancel ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_themes2.Flex, { gap: "2", justify: "end", children: [
|
|
2914
|
+
onCancel ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Button, { disabled: readonly, onClick: onCancel, variant: "soft", children: "\uCDE8\uC18C" }) : null,
|
|
2915
|
+
onSave ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Button, { disabled: disableSave, onClick: handleSave, children: "\uC800\uC7A5" }) : null
|
|
2916
|
+
] }) : null
|
|
2917
|
+
] }),
|
|
2918
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DynamicFormEditorPreviewPanel, { fields: effectiveSchema.fields, show: showPreview })
|
|
2919
|
+
] });
|
|
2920
|
+
}
|
|
2921
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
2922
|
+
0 && (module.exports = {
|
|
2923
|
+
DynamicFormEditor
|
|
2924
|
+
});
|
|
2925
|
+
//# sourceMappingURL=dynamic-form-editor.cjs.map
|