@tipp/ui 2.3.22 → 2.3.24

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.
Files changed (589) hide show
  1. package/dist/app/index.cjs +217 -195
  2. package/dist/app/index.cjs.map +1 -1
  3. package/dist/app/index.js +78 -71
  4. package/dist/app/platform/coach-question-list.js +26 -26
  5. package/dist/app/platform/contents-card.js +26 -26
  6. package/dist/app/platform/curriculum-card.js +2 -2
  7. package/dist/app/platform/edit-coaching-time.cjs +47 -25
  8. package/dist/app/platform/edit-coaching-time.cjs.map +1 -1
  9. package/dist/app/platform/edit-coaching-time.js +66 -59
  10. package/dist/app/platform/edit-service-type.cjs +42 -20
  11. package/dist/app/platform/edit-service-type.cjs.map +1 -1
  12. package/dist/app/platform/edit-service-type.js +66 -59
  13. package/dist/app/platform/goal-manage-card-edit.cjs +50 -28
  14. package/dist/app/platform/goal-manage-card-edit.cjs.map +1 -1
  15. package/dist/app/platform/goal-manage-card-edit.js +67 -60
  16. package/dist/app/platform/goal-manage-card-read.js +26 -26
  17. package/dist/app/platform/on-offline-radio-card.cjs +77 -55
  18. package/dist/app/platform/on-offline-radio-card.cjs.map +1 -1
  19. package/dist/app/platform/on-offline-radio-card.js +66 -59
  20. package/dist/app/platform/report-card.js +26 -26
  21. package/dist/app/platform/reservation-card.cjs +66 -44
  22. package/dist/app/platform/reservation-card.cjs.map +1 -1
  23. package/dist/app/platform/reservation-card.js +67 -60
  24. package/dist/app/platform/session-card.cjs +92 -70
  25. package/dist/app/platform/session-card.cjs.map +1 -1
  26. package/dist/app/platform/session-card.js +67 -60
  27. package/dist/app/platform/session-review-simple-read.js +26 -26
  28. package/dist/app/platform/userInfos/coaching-customer-info/index.js +28 -28
  29. package/dist/app/platform/userInfos/coaching-customer-info/large.js +26 -26
  30. package/dist/app/platform/userInfos/coaching-customer-info/medium.js +26 -26
  31. package/dist/app/platform/userInfos/coaching-customer-info/small.js +25 -25
  32. package/dist/app/platform/userInfos/session-user-info-detail.js +25 -25
  33. package/dist/app/platform/userInfos/utils.js +25 -25
  34. package/dist/atoms/index.js +60 -60
  35. package/dist/chunk-2KOE33U7.js +245 -0
  36. package/dist/chunk-2KOE33U7.js.map +1 -0
  37. package/dist/chunk-2U5YD3BH.js +49 -0
  38. package/dist/chunk-2U5YD3BH.js.map +1 -0
  39. package/dist/chunk-2X3I7KDG.js +144 -0
  40. package/dist/chunk-2X3I7KDG.js.map +1 -0
  41. package/dist/chunk-2YSYS4AG.js +233 -0
  42. package/dist/chunk-2YSYS4AG.js.map +1 -0
  43. package/dist/chunk-35HQHUDU.js +228 -0
  44. package/dist/chunk-35HQHUDU.js.map +1 -0
  45. package/dist/chunk-3I55S6EP.js +89 -0
  46. package/dist/chunk-3I55S6EP.js.map +1 -0
  47. package/dist/chunk-3JADWKXT.js +230 -0
  48. package/dist/chunk-3JADWKXT.js.map +1 -0
  49. package/dist/chunk-3JDLAN5T.js +99 -0
  50. package/dist/chunk-3JDLAN5T.js.map +1 -0
  51. package/dist/chunk-3O2ARPTO.js +161 -0
  52. package/dist/chunk-3O2ARPTO.js.map +1 -0
  53. package/dist/chunk-3OO6ENQ4.js +228 -0
  54. package/dist/chunk-3OO6ENQ4.js.map +1 -0
  55. package/dist/chunk-45F3UCHR.js +222 -0
  56. package/dist/chunk-45F3UCHR.js.map +1 -0
  57. package/dist/chunk-4LUFF5LX.js +98 -0
  58. package/dist/chunk-4LUFF5LX.js.map +1 -0
  59. package/dist/chunk-4VV7VH5L.js +79 -0
  60. package/dist/chunk-4VV7VH5L.js.map +1 -0
  61. package/dist/chunk-5JCJ4QJO.js +245 -0
  62. package/dist/chunk-5JCJ4QJO.js.map +1 -0
  63. package/dist/chunk-5KZJMQCG.js +89 -0
  64. package/dist/chunk-5KZJMQCG.js.map +1 -0
  65. package/dist/chunk-5RAR3DG7.js +117 -0
  66. package/dist/chunk-5RAR3DG7.js.map +1 -0
  67. package/dist/chunk-5XOR7OPD.js +196 -0
  68. package/dist/chunk-5XOR7OPD.js.map +1 -0
  69. package/dist/chunk-5YESTYFF.js +79 -0
  70. package/dist/chunk-5YESTYFF.js.map +1 -0
  71. package/dist/chunk-64A2KJHN.js +276 -0
  72. package/dist/chunk-64A2KJHN.js.map +1 -0
  73. package/dist/chunk-6CSUU4L7.js +230 -0
  74. package/dist/chunk-6CSUU4L7.js.map +1 -0
  75. package/dist/chunk-6FKXUCHD.js +99 -0
  76. package/dist/chunk-6FKXUCHD.js.map +1 -0
  77. package/dist/chunk-6TQGX5ZU.js +98 -0
  78. package/dist/chunk-6TQGX5ZU.js.map +1 -0
  79. package/dist/chunk-6UXCNYVO.js +106 -0
  80. package/dist/chunk-6UXCNYVO.js.map +1 -0
  81. package/dist/chunk-6YZBHOXQ.js +226 -0
  82. package/dist/chunk-6YZBHOXQ.js.map +1 -0
  83. package/dist/chunk-7344ZPUM.js +117 -0
  84. package/dist/chunk-7344ZPUM.js.map +1 -0
  85. package/dist/chunk-77H5BUYO.js +55 -0
  86. package/dist/chunk-77H5BUYO.js.map +1 -0
  87. package/dist/chunk-7ABAJEJA.js +63 -0
  88. package/dist/chunk-7ABAJEJA.js.map +1 -0
  89. package/dist/chunk-7B5XAENQ.js +363 -0
  90. package/dist/chunk-7B5XAENQ.js.map +1 -0
  91. package/dist/chunk-7CQX7ELH.js +69 -0
  92. package/dist/chunk-7CQX7ELH.js.map +1 -0
  93. package/dist/chunk-7CRTGYJE.js +80 -0
  94. package/dist/chunk-7CRTGYJE.js.map +1 -0
  95. package/dist/chunk-7FIDFRJL.js +196 -0
  96. package/dist/chunk-7FIDFRJL.js.map +1 -0
  97. package/dist/chunk-7ITDAUWI.js +287 -0
  98. package/dist/chunk-7ITDAUWI.js.map +1 -0
  99. package/dist/chunk-7PQGETJT.js +69 -0
  100. package/dist/chunk-7PQGETJT.js.map +1 -0
  101. package/dist/chunk-7R65MUL6.js +106 -0
  102. package/dist/chunk-7R65MUL6.js.map +1 -0
  103. package/dist/chunk-7U5EZJOD.js +89 -0
  104. package/dist/chunk-7U5EZJOD.js.map +1 -0
  105. package/dist/chunk-7ZBZBOPI.js +63 -0
  106. package/dist/chunk-7ZBZBOPI.js.map +1 -0
  107. package/dist/chunk-A2FXUYSB.js +230 -0
  108. package/dist/chunk-A2FXUYSB.js.map +1 -0
  109. package/dist/chunk-A7CT5M2S.js +75 -0
  110. package/dist/chunk-A7CT5M2S.js.map +1 -0
  111. package/dist/chunk-A7JBBBBB.js +100 -0
  112. package/dist/chunk-A7JBBBBB.js.map +1 -0
  113. package/dist/chunk-AA6OYHCE.js +39 -0
  114. package/dist/chunk-AA6OYHCE.js.map +1 -0
  115. package/dist/chunk-ABMGYODX.js +196 -0
  116. package/dist/chunk-ABMGYODX.js.map +1 -0
  117. package/dist/chunk-ADLR7QZR.js +69 -0
  118. package/dist/chunk-ADLR7QZR.js.map +1 -0
  119. package/dist/chunk-ALETVN5F.js +245 -0
  120. package/dist/chunk-ALETVN5F.js.map +1 -0
  121. package/dist/chunk-ARJOCJVD.js +174 -0
  122. package/dist/chunk-ARJOCJVD.js.map +1 -0
  123. package/dist/chunk-ARVLB4CH.js +29 -0
  124. package/dist/chunk-ARVLB4CH.js.map +1 -0
  125. package/dist/chunk-B327EINU.js +43 -0
  126. package/dist/chunk-B327EINU.js.map +1 -0
  127. package/dist/chunk-B4TDMB52.js +226 -0
  128. package/dist/chunk-B4TDMB52.js.map +1 -0
  129. package/dist/chunk-BJZSGZ7H.js +63 -0
  130. package/dist/chunk-BJZSGZ7H.js.map +1 -0
  131. package/dist/chunk-BP5FU7EO.js +196 -0
  132. package/dist/chunk-BP5FU7EO.js.map +1 -0
  133. package/dist/chunk-BPMY3CDH.js +106 -0
  134. package/dist/chunk-BPMY3CDH.js.map +1 -0
  135. package/dist/chunk-C2ANXVMQ.js +221 -0
  136. package/dist/chunk-C2ANXVMQ.js.map +1 -0
  137. package/dist/chunk-C6BHVWJI.js +165 -0
  138. package/dist/chunk-C6BHVWJI.js.map +1 -0
  139. package/dist/chunk-CF3NAPUZ.js +196 -0
  140. package/dist/chunk-CF3NAPUZ.js.map +1 -0
  141. package/dist/chunk-CWRJOY56.js +245 -0
  142. package/dist/chunk-CWRJOY56.js.map +1 -0
  143. package/dist/chunk-D3H7YFTO.js +69 -0
  144. package/dist/chunk-D3H7YFTO.js.map +1 -0
  145. package/dist/chunk-DDAZ4IAG.js +689 -0
  146. package/dist/chunk-DDAZ4IAG.js.map +1 -0
  147. package/dist/chunk-DDVJMAYN.js +230 -0
  148. package/dist/chunk-DDVJMAYN.js.map +1 -0
  149. package/dist/chunk-DJ24574O.js +28 -0
  150. package/dist/chunk-DJ24574O.js.map +1 -0
  151. package/dist/chunk-DJCBLRLH.js +69 -0
  152. package/dist/chunk-DJCBLRLH.js.map +1 -0
  153. package/dist/chunk-DTHR4ABO.js +69 -0
  154. package/dist/chunk-DTHR4ABO.js.map +1 -0
  155. package/dist/chunk-DTK646M6.js +87 -0
  156. package/dist/chunk-DTK646M6.js.map +1 -0
  157. package/dist/chunk-DVZKRKWH.js +174 -0
  158. package/dist/chunk-DVZKRKWH.js.map +1 -0
  159. package/dist/chunk-E232GTT6.js +69 -0
  160. package/dist/chunk-E232GTT6.js.map +1 -0
  161. package/dist/chunk-E5W5TCRU.js +89 -0
  162. package/dist/chunk-E5W5TCRU.js.map +1 -0
  163. package/dist/chunk-EGTOU5MK.js +689 -0
  164. package/dist/chunk-EGTOU5MK.js.map +1 -0
  165. package/dist/chunk-EJAC46WB.js +39 -0
  166. package/dist/chunk-EJAC46WB.js.map +1 -0
  167. package/dist/chunk-F2I4LA63.js +51 -0
  168. package/dist/chunk-F2I4LA63.js.map +1 -0
  169. package/dist/chunk-F65P7KZI.js +98 -0
  170. package/dist/chunk-F65P7KZI.js.map +1 -0
  171. package/dist/chunk-F76YKHGP.js +245 -0
  172. package/dist/chunk-F76YKHGP.js.map +1 -0
  173. package/dist/chunk-FGX6IR4Q.js +68 -0
  174. package/dist/chunk-FGX6IR4Q.js.map +1 -0
  175. package/dist/chunk-FN2CUDUP.js +43 -0
  176. package/dist/chunk-FN2CUDUP.js.map +1 -0
  177. package/dist/chunk-FQUAFIUO.js +228 -0
  178. package/dist/chunk-FQUAFIUO.js.map +1 -0
  179. package/dist/chunk-FYHAKQGB.js +220 -0
  180. package/dist/chunk-FYHAKQGB.js.map +1 -0
  181. package/dist/chunk-FZ4F7FCO.js +63 -0
  182. package/dist/chunk-FZ4F7FCO.js.map +1 -0
  183. package/dist/chunk-G6UKOZPL.js +217 -0
  184. package/dist/chunk-G6UKOZPL.js.map +1 -0
  185. package/dist/chunk-GAFIOPGJ.js +54 -0
  186. package/dist/chunk-GAFIOPGJ.js.map +1 -0
  187. package/dist/chunk-GEMXFVWI.js +37 -0
  188. package/dist/chunk-GEMXFVWI.js.map +1 -0
  189. package/dist/chunk-GFBOT2PV.js +101 -0
  190. package/dist/chunk-GFBOT2PV.js.map +1 -0
  191. package/dist/chunk-GFURX6GB.js +76 -0
  192. package/dist/chunk-GFURX6GB.js.map +1 -0
  193. package/dist/chunk-GMHVMQTV.js +245 -0
  194. package/dist/chunk-GMHVMQTV.js.map +1 -0
  195. package/dist/chunk-GTO7GG2K.js +245 -0
  196. package/dist/chunk-GTO7GG2K.js.map +1 -0
  197. package/dist/chunk-GWNS3C3A.js +144 -0
  198. package/dist/chunk-GWNS3C3A.js.map +1 -0
  199. package/dist/chunk-HFVVQEOZ.js +1 -0
  200. package/dist/chunk-HFVVQEOZ.js.map +1 -0
  201. package/dist/chunk-HNS76MH2.js +69 -0
  202. package/dist/chunk-HNS76MH2.js.map +1 -0
  203. package/dist/chunk-HO462CJM.js +29 -0
  204. package/dist/chunk-HO462CJM.js.map +1 -0
  205. package/dist/chunk-HPW5EHJX.js +233 -0
  206. package/dist/chunk-HPW5EHJX.js.map +1 -0
  207. package/dist/chunk-HQ23GSZM.js +145 -0
  208. package/dist/chunk-HQ23GSZM.js.map +1 -0
  209. package/dist/chunk-HTNDVNLQ.js +287 -0
  210. package/dist/chunk-HTNDVNLQ.js.map +1 -0
  211. package/dist/chunk-HXOMTUED.js +222 -0
  212. package/dist/chunk-HXOMTUED.js.map +1 -0
  213. package/dist/chunk-I46BFZL6.js +69 -0
  214. package/dist/chunk-I46BFZL6.js.map +1 -0
  215. package/dist/chunk-INE4EFFO.js +70 -0
  216. package/dist/chunk-INE4EFFO.js.map +1 -0
  217. package/dist/chunk-IQUJPIZD.js +689 -0
  218. package/dist/chunk-IQUJPIZD.js.map +1 -0
  219. package/dist/chunk-ITKUKDDV.js +196 -0
  220. package/dist/chunk-ITKUKDDV.js.map +1 -0
  221. package/dist/chunk-J333WVWG.js +145 -0
  222. package/dist/chunk-J333WVWG.js.map +1 -0
  223. package/dist/chunk-JADEGHJI.js +101 -0
  224. package/dist/chunk-JADEGHJI.js.map +1 -0
  225. package/dist/chunk-JAS77BXB.js +245 -0
  226. package/dist/chunk-JAS77BXB.js.map +1 -0
  227. package/dist/chunk-JDBHOE34.js +51 -0
  228. package/dist/chunk-JDBHOE34.js.map +1 -0
  229. package/dist/chunk-JG4JIBBV.js +245 -0
  230. package/dist/chunk-JG4JIBBV.js.map +1 -0
  231. package/dist/chunk-JHJSR2UT.js +101 -0
  232. package/dist/chunk-JHJSR2UT.js.map +1 -0
  233. package/dist/chunk-JJDLCVZV.js +37 -0
  234. package/dist/chunk-JJDLCVZV.js.map +1 -0
  235. package/dist/chunk-JKAMW7OV.js +228 -0
  236. package/dist/chunk-JKAMW7OV.js.map +1 -0
  237. package/dist/chunk-JQH27TXL.js +89 -0
  238. package/dist/chunk-JQH27TXL.js.map +1 -0
  239. package/dist/chunk-JRSZNGFD.js +28 -0
  240. package/dist/chunk-JRSZNGFD.js.map +1 -0
  241. package/dist/chunk-JZVK4NDF.js +28 -0
  242. package/dist/chunk-JZVK4NDF.js.map +1 -0
  243. package/dist/chunk-K255663P.js +144 -0
  244. package/dist/chunk-K255663P.js.map +1 -0
  245. package/dist/chunk-K5TTAI44.js +89 -0
  246. package/dist/chunk-K5TTAI44.js.map +1 -0
  247. package/dist/chunk-K7LTEKQS.js +56 -0
  248. package/dist/chunk-K7LTEKQS.js.map +1 -0
  249. package/dist/chunk-KCAOUZCT.js +245 -0
  250. package/dist/chunk-KCAOUZCT.js.map +1 -0
  251. package/dist/chunk-KCCYHT23.js +39 -0
  252. package/dist/chunk-KCCYHT23.js.map +1 -0
  253. package/dist/chunk-KFUBWOCN.js +69 -0
  254. package/dist/chunk-KFUBWOCN.js.map +1 -0
  255. package/dist/chunk-KOKKR2GO.js +37 -0
  256. package/dist/chunk-KOKKR2GO.js.map +1 -0
  257. package/dist/chunk-KV432YFG.js +223 -0
  258. package/dist/chunk-KV432YFG.js.map +1 -0
  259. package/dist/chunk-L5SQIVFO.js +68 -0
  260. package/dist/chunk-L5SQIVFO.js.map +1 -0
  261. package/dist/chunk-LJDGAKG3.js +196 -0
  262. package/dist/chunk-LJDGAKG3.js.map +1 -0
  263. package/dist/chunk-LSUCPRXN.js +89 -0
  264. package/dist/chunk-LSUCPRXN.js.map +1 -0
  265. package/dist/chunk-MDSCN4PH.js +144 -0
  266. package/dist/chunk-MDSCN4PH.js.map +1 -0
  267. package/dist/chunk-MG2KX3KF.js +69 -0
  268. package/dist/chunk-MG2KX3KF.js.map +1 -0
  269. package/dist/chunk-MIATMZDP.js +39 -0
  270. package/dist/chunk-MIATMZDP.js.map +1 -0
  271. package/dist/chunk-MIVH7X2Q.js +245 -0
  272. package/dist/chunk-MIVH7X2Q.js.map +1 -0
  273. package/dist/chunk-MPZJH3PI.js +287 -0
  274. package/dist/chunk-MPZJH3PI.js.map +1 -0
  275. package/dist/chunk-MQ4ZZJXV.js +51 -0
  276. package/dist/chunk-MQ4ZZJXV.js.map +1 -0
  277. package/dist/chunk-MRTKFR7V.js +144 -0
  278. package/dist/chunk-MRTKFR7V.js.map +1 -0
  279. package/dist/chunk-MTSZUPDJ.js +151 -0
  280. package/dist/chunk-MTSZUPDJ.js.map +1 -0
  281. package/dist/chunk-MTU2IQUS.js +689 -0
  282. package/dist/chunk-MTU2IQUS.js.map +1 -0
  283. package/dist/chunk-MVA6X35R.js +165 -0
  284. package/dist/chunk-MVA6X35R.js.map +1 -0
  285. package/dist/chunk-ND5BRCYV.js +75 -0
  286. package/dist/chunk-ND5BRCYV.js.map +1 -0
  287. package/dist/chunk-NE5S2QWA.js +51 -0
  288. package/dist/chunk-NE5S2QWA.js.map +1 -0
  289. package/dist/chunk-NHK64BOP.js +69 -0
  290. package/dist/chunk-NHK64BOP.js.map +1 -0
  291. package/dist/chunk-NHMDJCXR.js +276 -0
  292. package/dist/chunk-NHMDJCXR.js.map +1 -0
  293. package/dist/chunk-NIBZSFZ6.js +196 -0
  294. package/dist/chunk-NIBZSFZ6.js.map +1 -0
  295. package/dist/chunk-NJ3LHGC6.js +169 -0
  296. package/dist/chunk-NJ3LHGC6.js.map +1 -0
  297. package/dist/chunk-NJKRLSH3.js +287 -0
  298. package/dist/chunk-NJKRLSH3.js.map +1 -0
  299. package/dist/chunk-NLTKDXLB.js +113 -0
  300. package/dist/chunk-NLTKDXLB.js.map +1 -0
  301. package/dist/chunk-NRWZ6JNA.js +69 -0
  302. package/dist/chunk-NRWZ6JNA.js.map +1 -0
  303. package/dist/chunk-NSBBMIXS.js +151 -0
  304. package/dist/chunk-NSBBMIXS.js.map +1 -0
  305. package/dist/chunk-O665PURC.js +63 -0
  306. package/dist/chunk-O665PURC.js.map +1 -0
  307. package/dist/chunk-O6LH7P6V.js +87 -0
  308. package/dist/chunk-O6LH7P6V.js.map +1 -0
  309. package/dist/chunk-OF4RHJCY.js +69 -0
  310. package/dist/chunk-OF4RHJCY.js.map +1 -0
  311. package/dist/chunk-ORBEMNBA.js +49 -0
  312. package/dist/chunk-ORBEMNBA.js.map +1 -0
  313. package/dist/chunk-OYCRE67S.js +87 -0
  314. package/dist/chunk-OYCRE67S.js.map +1 -0
  315. package/dist/chunk-P4KO43AP.js +245 -0
  316. package/dist/chunk-P4KO43AP.js.map +1 -0
  317. package/dist/chunk-PJHCOBSQ.js +163 -0
  318. package/dist/chunk-PJHCOBSQ.js.map +1 -0
  319. package/dist/chunk-PXPGCDNA.js +106 -0
  320. package/dist/chunk-PXPGCDNA.js.map +1 -0
  321. package/dist/chunk-QBVF4BCB.js +245 -0
  322. package/dist/chunk-QBVF4BCB.js.map +1 -0
  323. package/dist/chunk-QKP2KBZ5.js +219 -0
  324. package/dist/chunk-QKP2KBZ5.js.map +1 -0
  325. package/dist/chunk-QXBRA2T6.js +169 -0
  326. package/dist/chunk-QXBRA2T6.js.map +1 -0
  327. package/dist/chunk-RAMPMKQD.js +245 -0
  328. package/dist/chunk-RAMPMKQD.js.map +1 -0
  329. package/dist/chunk-REPTW53S.js +98 -0
  330. package/dist/chunk-REPTW53S.js.map +1 -0
  331. package/dist/chunk-RMFSOYRW.js +99 -0
  332. package/dist/chunk-RMFSOYRW.js.map +1 -0
  333. package/dist/chunk-RXQHKSIV.js +37 -0
  334. package/dist/chunk-RXQHKSIV.js.map +1 -0
  335. package/dist/chunk-RZGCNQWE.js +89 -0
  336. package/dist/chunk-RZGCNQWE.js.map +1 -0
  337. package/dist/chunk-S3W44IB3.js +151 -0
  338. package/dist/chunk-S3W44IB3.js.map +1 -0
  339. package/dist/chunk-SEKCH5XW.js +100 -0
  340. package/dist/chunk-SEKCH5XW.js.map +1 -0
  341. package/dist/chunk-SGS3LUQ3.js +196 -0
  342. package/dist/chunk-SGS3LUQ3.js.map +1 -0
  343. package/dist/chunk-SKA66SQI.js +144 -0
  344. package/dist/chunk-SKA66SQI.js.map +1 -0
  345. package/dist/chunk-SLHUNZIR.js +245 -0
  346. package/dist/chunk-SLHUNZIR.js.map +1 -0
  347. package/dist/chunk-STCVW5HT.js +49 -0
  348. package/dist/chunk-STCVW5HT.js.map +1 -0
  349. package/dist/chunk-SVGGVYY7.js +69 -0
  350. package/dist/chunk-SVGGVYY7.js.map +1 -0
  351. package/dist/chunk-T5I3DNHD.js +145 -0
  352. package/dist/chunk-T5I3DNHD.js.map +1 -0
  353. package/dist/chunk-TJDCSV5R.js +230 -0
  354. package/dist/chunk-TJDCSV5R.js.map +1 -0
  355. package/dist/chunk-TJWFURWT.js +43 -0
  356. package/dist/chunk-TJWFURWT.js.map +1 -0
  357. package/dist/chunk-TMO724ZN.js +63 -0
  358. package/dist/chunk-TMO724ZN.js.map +1 -0
  359. package/dist/chunk-TP7DOXLP.js +98 -0
  360. package/dist/chunk-TP7DOXLP.js.map +1 -0
  361. package/dist/chunk-TQJ3HQ7R.js +87 -0
  362. package/dist/chunk-TQJ3HQ7R.js.map +1 -0
  363. package/dist/chunk-TQMIIK56.js +230 -0
  364. package/dist/chunk-TQMIIK56.js.map +1 -0
  365. package/dist/chunk-TRNLQ7F3.js +245 -0
  366. package/dist/chunk-TRNLQ7F3.js.map +1 -0
  367. package/dist/chunk-U6UGFQIT.js +117 -0
  368. package/dist/chunk-U6UGFQIT.js.map +1 -0
  369. package/dist/chunk-U7OEYXJQ.js +165 -0
  370. package/dist/chunk-U7OEYXJQ.js.map +1 -0
  371. package/dist/chunk-UF6LFXBG.js +230 -0
  372. package/dist/chunk-UF6LFXBG.js.map +1 -0
  373. package/dist/chunk-ULZHPTB5.js +70 -0
  374. package/dist/chunk-ULZHPTB5.js.map +1 -0
  375. package/dist/chunk-UOCLNOC2.js +145 -0
  376. package/dist/chunk-UOCLNOC2.js.map +1 -0
  377. package/dist/chunk-V2RMMVGT.js +51 -0
  378. package/dist/chunk-V2RMMVGT.js.map +1 -0
  379. package/dist/chunk-V2UREEFT.js +89 -0
  380. package/dist/chunk-V2UREEFT.js.map +1 -0
  381. package/dist/chunk-V4WWIPTK.js +363 -0
  382. package/dist/chunk-V4WWIPTK.js.map +1 -0
  383. package/dist/chunk-VEHTXVLY.js +169 -0
  384. package/dist/chunk-VEHTXVLY.js.map +1 -0
  385. package/dist/chunk-VIVVHI7F.js +63 -0
  386. package/dist/chunk-VIVVHI7F.js.map +1 -0
  387. package/dist/chunk-VQMIOVFO.js +69 -0
  388. package/dist/chunk-VQMIOVFO.js.map +1 -0
  389. package/dist/chunk-VU3C3W4S.js +106 -0
  390. package/dist/chunk-VU3C3W4S.js.map +1 -0
  391. package/dist/chunk-VYPPQUB5.js +196 -0
  392. package/dist/chunk-VYPPQUB5.js.map +1 -0
  393. package/dist/chunk-W2TX267T.js +100 -0
  394. package/dist/chunk-W2TX267T.js.map +1 -0
  395. package/dist/chunk-W3EW7K6L.js +51 -0
  396. package/dist/chunk-W3EW7K6L.js.map +1 -0
  397. package/dist/chunk-WA5A2GB4.js +192 -0
  398. package/dist/chunk-WA5A2GB4.js.map +1 -0
  399. package/dist/chunk-WPAC4HEX.js +87 -0
  400. package/dist/chunk-WPAC4HEX.js.map +1 -0
  401. package/dist/chunk-X2OV53JW.js +196 -0
  402. package/dist/chunk-X2OV53JW.js.map +1 -0
  403. package/dist/chunk-X6K6AM4D.js +196 -0
  404. package/dist/chunk-X6K6AM4D.js.map +1 -0
  405. package/dist/chunk-XB2GOVFT.js +69 -0
  406. package/dist/chunk-XB2GOVFT.js.map +1 -0
  407. package/dist/chunk-XIKKYBHO.js +69 -0
  408. package/dist/chunk-XIKKYBHO.js.map +1 -0
  409. package/dist/chunk-Y2H4FXGU.js +68 -0
  410. package/dist/chunk-Y2H4FXGU.js.map +1 -0
  411. package/dist/chunk-Y7I4BEAO.js +69 -0
  412. package/dist/chunk-Y7I4BEAO.js.map +1 -0
  413. package/dist/chunk-YCRTFH4C.js +79 -0
  414. package/dist/chunk-YCRTFH4C.js.map +1 -0
  415. package/dist/chunk-YHGFJ7N6.js +63 -0
  416. package/dist/chunk-YHGFJ7N6.js.map +1 -0
  417. package/dist/chunk-YKDT2D43.js +98 -0
  418. package/dist/chunk-YKDT2D43.js.map +1 -0
  419. package/dist/chunk-YLTKQZ67.js +228 -0
  420. package/dist/chunk-YLTKQZ67.js.map +1 -0
  421. package/dist/chunk-YPGFPLWM.js +69 -0
  422. package/dist/chunk-YPGFPLWM.js.map +1 -0
  423. package/dist/chunk-YWYYPYBK.js +1 -0
  424. package/dist/chunk-YWYYPYBK.js.map +1 -0
  425. package/dist/chunk-Z7WNKARH.js +331 -0
  426. package/dist/chunk-Z7WNKARH.js.map +1 -0
  427. package/dist/chunk-ZA4NYPSW.js +28 -0
  428. package/dist/chunk-ZA4NYPSW.js.map +1 -0
  429. package/dist/chunk-ZDY2M7RX.js +113 -0
  430. package/dist/chunk-ZDY2M7RX.js.map +1 -0
  431. package/dist/chunk-ZFTQ2XBH.js +76 -0
  432. package/dist/chunk-ZFTQ2XBH.js.map +1 -0
  433. package/dist/chunk-ZI7PEVZG.js +89 -0
  434. package/dist/chunk-ZI7PEVZG.js.map +1 -0
  435. package/dist/chunk-ZKFNOCWD.js +125 -0
  436. package/dist/chunk-ZKFNOCWD.js.map +1 -0
  437. package/dist/chunk-ZOITFRX7.js +70 -0
  438. package/dist/chunk-ZOITFRX7.js.map +1 -0
  439. package/dist/chunk-ZPDLTZDJ.js +363 -0
  440. package/dist/chunk-ZPDLTZDJ.js.map +1 -0
  441. package/dist/chunk-ZR4G3PU3.js +89 -0
  442. package/dist/chunk-ZR4G3PU3.js.map +1 -0
  443. package/dist/context/index.js +1 -1
  444. package/dist/index.cjs +1832 -411
  445. package/dist/index.cjs.map +1 -1
  446. package/dist/index.d.cts +4 -2
  447. package/dist/index.d.ts +4 -2
  448. package/dist/index.js +152 -139
  449. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.js +7 -7
  450. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.js +6 -6
  451. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-radio.js +2 -2
  452. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-option.js +2 -2
  453. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-text.js +1 -1
  454. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-text.js +3 -3
  455. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.js +11 -11
  456. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.js +2 -2
  457. package/dist/molecules/curriculumV2/CurriculumContents/curriculum-ai-traning.cjs.map +1 -1
  458. package/dist/molecules/curriculumV2/CurriculumContents/curriculum-ai-traning.js +2 -2
  459. package/dist/molecules/curriculumV2/CurriculumContents/curriculum-file-download.cjs.map +1 -1
  460. package/dist/molecules/curriculumV2/CurriculumContents/curriculum-file-download.js +2 -2
  461. package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.cjs.map +1 -1
  462. package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.js +13 -13
  463. package/dist/molecules/curriculumV2/CurriculumContents/curriculum-video.cjs +4 -4
  464. package/dist/molecules/curriculumV2/CurriculumContents/curriculum-video.cjs.map +1 -1
  465. package/dist/molecules/curriculumV2/CurriculumContents/curriculum-video.js +1 -1
  466. package/dist/molecules/curriculumV2/CurriculumContents/index.cjs +4 -4
  467. package/dist/molecules/curriculumV2/CurriculumContents/index.cjs.map +1 -1
  468. package/dist/molecules/curriculumV2/CurriculumContents/index.js +17 -17
  469. package/dist/molecules/curriculumV2/CurriculumSidebar/index.cjs.map +1 -1
  470. package/dist/molecules/curriculumV2/CurriculumSidebar/index.js +4 -4
  471. package/dist/molecules/curriculumV2/CurriculumSidebar/sidebar-item.js +1 -1
  472. package/dist/molecules/curriculumV2/curriculum-context.cjs +0 -1
  473. package/dist/molecules/curriculumV2/curriculum-context.cjs.map +1 -1
  474. package/dist/molecules/curriculumV2/curriculum-context.js +1 -1
  475. package/dist/molecules/curriculumV2/curriculum-sub-nav.cjs.map +1 -1
  476. package/dist/molecules/curriculumV2/curriculum-sub-nav.js +2 -2
  477. package/dist/molecules/curriculumV2/index.cjs +4 -5
  478. package/dist/molecules/curriculumV2/index.cjs.map +1 -1
  479. package/dist/molecules/curriculumV2/index.js +27 -27
  480. package/dist/molecules/description-json-render.cjs +1 -1
  481. package/dist/molecules/description-json-render.cjs.map +1 -1
  482. package/dist/molecules/description-json-render.js +3 -3
  483. package/dist/molecules/dynamic-field.cjs +147 -5
  484. package/dist/molecules/dynamic-field.cjs.map +1 -1
  485. package/dist/molecules/dynamic-field.js +5 -2
  486. package/dist/molecules/dynamic-form-editor-field-editor-panel.cjs +1711 -0
  487. package/dist/molecules/dynamic-form-editor-field-editor-panel.cjs.map +1 -0
  488. package/dist/molecules/dynamic-form-editor-field-editor-panel.d.cts +19 -0
  489. package/dist/molecules/dynamic-form-editor-field-editor-panel.d.ts +19 -0
  490. package/dist/molecules/dynamic-form-editor-field-editor-panel.js +37 -0
  491. package/dist/molecules/dynamic-form-editor-field-editor-panel.js.map +1 -0
  492. package/dist/molecules/dynamic-form-editor-field-list-panel.cjs +298 -0
  493. package/dist/molecules/dynamic-form-editor-field-list-panel.cjs.map +1 -0
  494. package/dist/molecules/dynamic-form-editor-field-list-panel.d.cts +16 -0
  495. package/dist/molecules/dynamic-form-editor-field-list-panel.d.ts +16 -0
  496. package/dist/molecules/dynamic-form-editor-field-list-panel.js +14 -0
  497. package/dist/molecules/dynamic-form-editor-field-list-panel.js.map +1 -0
  498. package/dist/molecules/dynamic-form-editor-issues-panel.cjs +171 -0
  499. package/dist/molecules/dynamic-form-editor-issues-panel.cjs.map +1 -0
  500. package/dist/molecules/dynamic-form-editor-issues-panel.d.cts +10 -0
  501. package/dist/molecules/dynamic-form-editor-issues-panel.d.ts +10 -0
  502. package/dist/molecules/dynamic-form-editor-issues-panel.js +12 -0
  503. package/dist/molecules/dynamic-form-editor-issues-panel.js.map +1 -0
  504. package/dist/molecules/dynamic-form-editor-preview-panel.cjs +1021 -0
  505. package/dist/molecules/dynamic-form-editor-preview-panel.cjs.map +1 -0
  506. package/dist/molecules/dynamic-form-editor-preview-panel.d.cts +10 -0
  507. package/dist/molecules/dynamic-form-editor-preview-panel.d.ts +10 -0
  508. package/dist/molecules/dynamic-form-editor-preview-panel.js +26 -0
  509. package/dist/molecules/dynamic-form-editor-preview-panel.js.map +1 -0
  510. package/dist/molecules/dynamic-form-editor-utils.cjs +396 -0
  511. package/dist/molecules/dynamic-form-editor-utils.cjs.map +1 -0
  512. package/dist/molecules/dynamic-form-editor-utils.d.cts +43 -0
  513. package/dist/molecules/dynamic-form-editor-utils.d.ts +43 -0
  514. package/dist/molecules/dynamic-form-editor-utils.js +44 -0
  515. package/dist/molecules/dynamic-form-editor-utils.js.map +1 -0
  516. package/dist/molecules/dynamic-form-editor.cjs +2925 -0
  517. package/dist/molecules/dynamic-form-editor.cjs.map +1 -0
  518. package/dist/molecules/dynamic-form-editor.d.cts +15 -0
  519. package/dist/molecules/dynamic-form-editor.d.ts +15 -0
  520. package/dist/molecules/dynamic-form-editor.js +51 -0
  521. package/dist/molecules/dynamic-form-editor.js.map +1 -0
  522. package/dist/molecules/dynamic-form-response-item.cjs +63 -29
  523. package/dist/molecules/dynamic-form-response-item.cjs.map +1 -1
  524. package/dist/molecules/dynamic-form-response-item.js +2 -1
  525. package/dist/molecules/dynamic-form.cjs +149 -7
  526. package/dist/molecules/dynamic-form.cjs.map +1 -1
  527. package/dist/molecules/dynamic-form.js +6 -3
  528. package/dist/molecules/expand-table/index.js +1 -1
  529. package/dist/molecules/index.cjs +1464 -42
  530. package/dist/molecules/index.cjs.map +1 -1
  531. package/dist/molecules/index.d.cts +1 -0
  532. package/dist/molecules/index.d.ts +1 -0
  533. package/dist/molecules/index.js +74 -63
  534. package/dist/molecules/learning-post.js +2 -2
  535. package/dist/molecules/stepper.js +2 -2
  536. package/dist/molecules/tag-selector.js +3 -3
  537. package/dist/molecules/time-select.cjs +1 -1
  538. package/dist/molecules/time-select.cjs.map +1 -1
  539. package/dist/molecules/time-select.js +4 -3
  540. package/dist/types/dynamic-form-schema-generated.cjs.map +1 -1
  541. package/dist/types/dynamic-form-schema-generated.d.cts +30 -2
  542. package/dist/types/dynamic-form-schema-generated.d.ts +30 -2
  543. package/dist/types/index.d.cts +1 -1
  544. package/dist/types/index.d.ts +1 -1
  545. package/dist/types/index.js +1 -1
  546. package/dist/utils/get-callout-icon-component.cjs +624 -0
  547. package/dist/utils/get-callout-icon-component.cjs.map +1 -0
  548. package/dist/utils/get-callout-icon-component.d.cts +11 -0
  549. package/dist/utils/get-callout-icon-component.d.ts +11 -0
  550. package/dist/utils/get-callout-icon-component.js +26 -0
  551. package/dist/utils/get-callout-icon-component.js.map +1 -0
  552. package/dist/utils/get-dynamic-form-display-value.cjs +80 -0
  553. package/dist/utils/get-dynamic-form-display-value.cjs.map +1 -0
  554. package/dist/utils/get-dynamic-form-display-value.d.cts +5 -0
  555. package/dist/utils/get-dynamic-form-display-value.d.ts +5 -0
  556. package/dist/utils/get-dynamic-form-display-value.js +8 -0
  557. package/dist/utils/get-dynamic-form-display-value.js.map +1 -0
  558. package/dist/utils/get-dynamic-form-display-value.test.cjs +124 -0
  559. package/dist/utils/get-dynamic-form-display-value.test.cjs.map +1 -0
  560. package/dist/utils/get-dynamic-form-display-value.test.d.cts +2 -0
  561. package/dist/utils/get-dynamic-form-display-value.test.d.ts +2 -0
  562. package/dist/utils/get-dynamic-form-display-value.test.js +75 -0
  563. package/dist/utils/get-dynamic-form-display-value.test.js.map +1 -0
  564. package/dist/utils/index.cjs +55 -1
  565. package/dist/utils/index.cjs.map +1 -1
  566. package/dist/utils/index.d.cts +3 -1
  567. package/dist/utils/index.d.ts +3 -1
  568. package/dist/utils/index.js +10 -6
  569. package/package.json +1 -1
  570. package/src/app/platform/reservation-card.tsx +0 -1
  571. package/src/constrant/dynamic-form-schema.json +55 -0
  572. package/src/molecules/curriculumV2/CurriculumContents/curriculum-video.tsx +3 -3
  573. package/src/molecules/curriculumV2/curriculum-context.tsx +0 -1
  574. package/src/molecules/description-json-render.tsx +1 -1
  575. package/src/molecules/dynamic-field.tsx +183 -7
  576. package/src/molecules/dynamic-form-editor-field-editor-panel.tsx +688 -0
  577. package/src/molecules/dynamic-form-editor-field-list-panel.tsx +116 -0
  578. package/src/molecules/dynamic-form-editor-issues-panel.tsx +35 -0
  579. package/src/molecules/dynamic-form-editor-preview-panel.tsx +30 -0
  580. package/src/molecules/dynamic-form-editor-utils.ts +433 -0
  581. package/src/molecules/dynamic-form-editor.tsx +263 -0
  582. package/src/molecules/dynamic-form-response-item.tsx +13 -40
  583. package/src/molecules/dynamic-form.tsx +1 -1
  584. package/src/molecules/index.ts +2 -1
  585. package/src/types/dynamic-form-schema-generated.ts +33 -0
  586. package/src/utils/get-dynamic-form-display-value.test.ts +81 -0
  587. package/src/utils/get-dynamic-form-display-value.ts +74 -0
  588. package/src/utils/index.ts +2 -1
  589. package/src/utils/{getCalloutIconComponent.ts → get-callout-icon-component.ts} +3 -3
@@ -90,6 +90,7 @@ __export(molecules_exports, {
90
90
  DotNavigation: () => DotNavigation,
91
91
  DownloadCard: () => DownloadCard,
92
92
  DynamicForm: () => DynamicForm,
93
+ DynamicFormEditor: () => DynamicFormEditor,
93
94
  DynamicFormField: () => DynamicFormField,
94
95
  DynamicFormResponseItem: () => DynamicFormResponseItem,
95
96
  ExpandTable: () => ExpandTable,
@@ -2577,7 +2578,7 @@ var getTimeOptions = () => {
2577
2578
  return timeOptions;
2578
2579
  };
2579
2580
 
2580
- // src/utils/getCalloutIconComponent.ts
2581
+ // src/utils/get-callout-icon-component.ts
2581
2582
  var DEFAULT_ICON = import_react_icons.InfoCircledIcon;
2582
2583
  var AI_CALLOUT_ICON_OPTIONS = [
2583
2584
  { label: "Info", value: "InfoCircledIcon", Component: import_react_icons.InfoCircledIcon },
@@ -2602,6 +2603,58 @@ function getCalloutIconComponent(iconName) {
2602
2603
  return (_a = iconByName[iconName]) != null ? _a : DEFAULT_ICON;
2603
2604
  }
2604
2605
 
2606
+ // src/utils/get-dynamic-form-display-value.ts
2607
+ function isEmptyDisplayValue(value) {
2608
+ return value === void 0 || value === null || value === "";
2609
+ }
2610
+ function findOptionLabel(options, value) {
2611
+ const valueString = String(value);
2612
+ const found = options.find(
2613
+ (option) => String(option.value) === valueString
2614
+ );
2615
+ return found == null ? void 0 : found.label;
2616
+ }
2617
+ function joinLabelsOrValues(options, values) {
2618
+ const labels = values.map((v) => {
2619
+ const label = findOptionLabel(options, v);
2620
+ return label != null ? label : String(v);
2621
+ });
2622
+ return labels.join(", ");
2623
+ }
2624
+ function getDynamicFormDisplayValue(field, value) {
2625
+ if (isEmptyDisplayValue(value)) return "";
2626
+ switch (field.type) {
2627
+ case "dropdown":
2628
+ case "choice":
2629
+ case "radio_cards": {
2630
+ const label = findOptionLabel(field.options, value);
2631
+ return label != null ? label : String(value);
2632
+ }
2633
+ case "image_radio_card": {
2634
+ const label = findOptionLabel(field.options, value);
2635
+ return label != null ? label : String(value);
2636
+ }
2637
+ case "choices": {
2638
+ if (Array.isArray(value)) {
2639
+ return joinLabelsOrValues(field.options, value);
2640
+ }
2641
+ const label = findOptionLabel(field.options, value);
2642
+ return label != null ? label : String(value);
2643
+ }
2644
+ case "yes_no": {
2645
+ if (value === true || value === "true" || value === "yes") return "\uB3D9\uC758";
2646
+ if (value === false || value === "false" || value === "no") return "\uBE44\uB3D9\uC758";
2647
+ return String(value);
2648
+ }
2649
+ case "short_text":
2650
+ case "long_text":
2651
+ case "number":
2652
+ case "email":
2653
+ default:
2654
+ return String(value);
2655
+ }
2656
+ }
2657
+
2605
2658
  // src/molecules/time-select.tsx
2606
2659
  var import_jsx_runtime37 = require("react/jsx-runtime");
2607
2660
  var getOptionValue = (date, timeValue) => {
@@ -2941,7 +2994,6 @@ function CurriculumProvider(props) {
2941
2994
  const inBounds = selectedIndexState >= 0 && selectedIndexState < list.length;
2942
2995
  if (!inBounds) return;
2943
2996
  const item = list[selectedIndexState];
2944
- if (!item) return;
2945
2997
  if (item.type === "sectionTitle") return;
2946
2998
  onChangeSelectedContent == null ? void 0 : onChangeSelectedContent(item);
2947
2999
  }, [list, onChangeSelectedContent, selectedIndexState]);
@@ -3097,15 +3149,15 @@ function CurriculumVideo(props) {
3097
3149
  "iframe",
3098
3150
  {
3099
3151
  allowFullScreen: true,
3152
+ onError: () => {
3153
+ setIsLoading(false);
3154
+ },
3100
3155
  onLoad: () => {
3101
3156
  setIsLoading(false);
3102
3157
  },
3103
3158
  src: `${url}?theme=light`,
3104
3159
  style: { width: "100%", height: "100%", border: "none" },
3105
- title: "Curriculum Video",
3106
- onError: () => {
3107
- setIsLoading(false);
3108
- }
3160
+ title: "Curriculum Video"
3109
3161
  }
3110
3162
  )
3111
3163
  ]
@@ -4798,7 +4850,7 @@ function CurriculumV2Layout(props) {
4798
4850
  var import_react39 = require("react");
4799
4851
  var import_formik2 = require("formik");
4800
4852
  var Yup2 = __toESM(require("yup"), 1);
4801
- var import_themes37 = require("@radix-ui/themes");
4853
+ var import_themes38 = require("@radix-ui/themes");
4802
4854
 
4803
4855
  // src/context/dynamic-form-context.tsx
4804
4856
  var import_react36 = require("react");
@@ -5019,8 +5071,51 @@ var Checkbox = (0, import_react38.forwardRef)(
5019
5071
  );
5020
5072
  Checkbox.displayName = "Checkbox";
5021
5073
 
5074
+ // src/atoms/inset.tsx
5075
+ var import_themes37 = require("@radix-ui/themes");
5076
+
5022
5077
  // src/molecules/dynamic-field.tsx
5023
5078
  var import_jsx_runtime78 = require("react/jsx-runtime");
5079
+ function isRecord(value) {
5080
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
5081
+ }
5082
+ function isFieldOption(value) {
5083
+ if (!isRecord(value)) return false;
5084
+ const label = value.label;
5085
+ const optionValue = value.value;
5086
+ return typeof label === "string" && (typeof optionValue === "string" || typeof optionValue === "number");
5087
+ }
5088
+ function isImageFieldOption(value) {
5089
+ if (!isRecord(value)) return false;
5090
+ if (!isFieldOption(value)) return false;
5091
+ const imageSrc = value.imageSrc;
5092
+ const alt = value.alt;
5093
+ return typeof imageSrc === "string" && (alt === void 0 || typeof alt === "string");
5094
+ }
5095
+ function getStringProp(obj, key, fallback) {
5096
+ if (!isRecord(obj)) return fallback;
5097
+ const value = obj[key];
5098
+ return typeof value === "string" ? value : fallback;
5099
+ }
5100
+ function getNumberProp(obj, key, fallback) {
5101
+ if (!isRecord(obj)) return fallback;
5102
+ const value = obj[key];
5103
+ return typeof value === "number" ? value : fallback;
5104
+ }
5105
+ function getOptions(field) {
5106
+ if (!isRecord(field)) return null;
5107
+ const options = field.options;
5108
+ if (!Array.isArray(options)) return null;
5109
+ if (!options.every(isFieldOption)) return null;
5110
+ return options;
5111
+ }
5112
+ function getImageOptions(field) {
5113
+ if (!isRecord(field)) return null;
5114
+ const options = field.options;
5115
+ if (!Array.isArray(options)) return null;
5116
+ if (!options.every(isImageFieldOption)) return null;
5117
+ return options;
5118
+ }
5024
5119
  function DynamicFormField({
5025
5120
  field
5026
5121
  }) {
@@ -5033,7 +5128,7 @@ function DynamicFormField({
5033
5128
  handleBlur,
5034
5129
  readonly
5035
5130
  } = useDynamicForm();
5036
- const { name, type } = field;
5131
+ const name = field.name;
5037
5132
  const value = getFieldValue(name);
5038
5133
  const error = getFieldError(name);
5039
5134
  const touched = getFieldTouched(name);
@@ -5046,14 +5141,22 @@ function DynamicFormField({
5046
5141
  error: hasError,
5047
5142
  disabled: readonly
5048
5143
  };
5049
- switch (type) {
5144
+ const selectedValue = typeof value === "string" || typeof value === "number" ? String(value) : "";
5145
+ switch (field.type) {
5050
5146
  case "short_text":
5147
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
5148
+ TextField.Root,
5149
+ __spreadProps(__spreadValues({}, commonProps), {
5150
+ placeholder: field.placeholder,
5151
+ type: "text"
5152
+ })
5153
+ );
5051
5154
  case "email":
5052
5155
  return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
5053
5156
  TextField.Root,
5054
5157
  __spreadProps(__spreadValues({}, commonProps), {
5055
5158
  placeholder: field.placeholder,
5056
- type: type === "short_text" ? "text" : type
5159
+ type: "email"
5057
5160
  })
5058
5161
  );
5059
5162
  case "number":
@@ -5076,9 +5179,20 @@ function DynamicFormField({
5076
5179
  onValueChange: readonly ? void 0 : (newValue) => {
5077
5180
  void setFieldValue(name, newValue);
5078
5181
  },
5079
- value,
5182
+ value: selectedValue,
5080
5183
  children: [
5081
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Select.Trigger, { placeholder: field.placeholder }),
5184
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
5185
+ Select.Trigger,
5186
+ {
5187
+ placeholder: field.placeholder,
5188
+ style: {
5189
+ alignSelf: "flex-start",
5190
+ width: "fit-content",
5191
+ minWidth: "180px",
5192
+ maxWidth: "100%"
5193
+ }
5194
+ }
5195
+ ),
5082
5196
  /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Select.Content, { children: field.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Select.Item, { value: String(option.value), children: option.label }, option.value)) })
5083
5197
  ]
5084
5198
  }
@@ -5096,6 +5210,21 @@ function DynamicFormField({
5096
5210
  children: field.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_themes33.RadioGroup.Item, { value: String(option.value), children: option.label }, option.value))
5097
5211
  }
5098
5212
  );
5213
+ case "radio_cards": {
5214
+ const options = getOptions(field);
5215
+ if (!options) return null;
5216
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
5217
+ import_themes23.RadioCards.Root,
5218
+ {
5219
+ disabled: readonly,
5220
+ onValueChange: readonly ? void 0 : (newValue) => {
5221
+ void setFieldValue(name, newValue);
5222
+ },
5223
+ value: selectedValue,
5224
+ children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_themes23.RadioCards.Item, { value: String(option.value), children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Typo, { children: option.label }) }, option.value))
5225
+ }
5226
+ );
5227
+ }
5099
5228
  case "choices":
5100
5229
  return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
5101
5230
  CheckboxGroup.Root,
@@ -5123,6 +5252,65 @@ function DynamicFormField({
5123
5252
  ),
5124
5253
  field.description ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Typo, { color: "gray", variant: "caption", children: field.description }) : null
5125
5254
  ] });
5255
+ case "image_radio_card": {
5256
+ const options = getImageOptions(field);
5257
+ if (!options) return null;
5258
+ const gridColumnsCount = Math.max(1, getNumberProp(field, "gridColumnsCount", 4));
5259
+ const gridColumns = getStringProp(
5260
+ field,
5261
+ "gridColumns",
5262
+ `repeat(${gridColumnsCount}, 1fr)`
5263
+ );
5264
+ const gridItemHeight = getStringProp(field, "gridItemHeight", "100px");
5265
+ const gridRows = getStringProp(field, "gridRows", gridItemHeight);
5266
+ const gridGap = getStringProp(field, "gridGap", "2");
5267
+ const imageFitRaw = getStringProp(field, "imageFit", "cover");
5268
+ const imageFit = imageFitRaw === "contain" ? "contain" : "cover";
5269
+ const handleValueChange = (newValue) => {
5270
+ if (readonly) return;
5271
+ const selectedOption = options.find(
5272
+ (option) => String(option.value) === newValue
5273
+ );
5274
+ if (!selectedOption) return;
5275
+ void setFieldValue(name, selectedOption.value);
5276
+ };
5277
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
5278
+ import_themes23.RadioCards.Root,
5279
+ {
5280
+ disabled: readonly,
5281
+ onValueChange: readonly ? void 0 : handleValueChange,
5282
+ value: selectedValue,
5283
+ children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_themes16.Grid, { columns: gridColumns, gap: gridGap, rows: gridRows, children: options.map((option) => {
5284
+ const optionValue = String(option.value);
5285
+ const altText = option.alt || option.label;
5286
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
5287
+ import_themes23.RadioCards.Item,
5288
+ {
5289
+ style: {
5290
+ padding: 0
5291
+ },
5292
+ value: optionValue,
5293
+ children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_themes37.Inset, { style: { width: "100%", height: "100%", padding: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
5294
+ "img",
5295
+ {
5296
+ alt: altText,
5297
+ src: option.imageSrc,
5298
+ style: {
5299
+ width: "100%",
5300
+ height: "100%",
5301
+ display: "block",
5302
+ objectFit: imageFit,
5303
+ opacity: readonly ? 0.7 : 1
5304
+ }
5305
+ }
5306
+ ) })
5307
+ },
5308
+ optionValue
5309
+ );
5310
+ }) })
5311
+ }
5312
+ );
5313
+ }
5126
5314
  default:
5127
5315
  return null;
5128
5316
  }
@@ -5236,7 +5424,7 @@ function DynamicFormFieldList({
5236
5424
  return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_jsx_runtime79.Fragment, { children: fields.map((field) => {
5237
5425
  const errorMessage = !readonly && formik.touched[field.name] && formik.errors[field.name] ? String(formik.errors[field.name]) : void 0;
5238
5426
  return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
5239
- import_themes37.Box,
5427
+ import_themes38.Box,
5240
5428
  {
5241
5429
  "data-error-field": errorMessage ? field.name : void 0,
5242
5430
  "data-field-name": field.name,
@@ -5348,56 +5536,36 @@ function createYupValidation(field, validation) {
5348
5536
  }
5349
5537
 
5350
5538
  // src/molecules/dynamic-form-response-item.tsx
5539
+ function isRecord2(value) {
5540
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
5541
+ }
5351
5542
  function DynamicFormResponseItem({
5352
5543
  payload,
5353
5544
  questionType,
5354
5545
  config
5355
5546
  }) {
5356
- if (!payload || typeof payload !== "object") {
5357
- return String(payload || "\uC751\uB2F5 \uC5C6\uC74C");
5358
- }
5359
- const payloadObj = payload;
5360
- const value = payloadObj.value;
5547
+ const value = isRecord2(payload) && "value" in payload ? payload.value : payload;
5361
5548
  if (value === void 0 || value === null || value === "") {
5362
5549
  return "\uC751\uB2F5 \uC5C6\uC74C";
5363
5550
  }
5364
- const getOptions = (fieldConfig) => {
5365
- if (!fieldConfig || typeof fieldConfig !== "object") return void 0;
5366
- if ("options" in fieldConfig && Array.isArray(fieldConfig.options)) {
5367
- return fieldConfig.options;
5368
- }
5369
- return void 0;
5370
- };
5371
- const options = getOptions(config);
5551
+ if (config) {
5552
+ const displayValue = getDynamicFormDisplayValue(config, value);
5553
+ return displayValue === "" ? "\uC751\uB2F5 \uC5C6\uC74C" : displayValue;
5554
+ }
5372
5555
  switch (questionType) {
5373
5556
  case "text":
5374
5557
  case "textarea":
5375
5558
  return String(value);
5376
5559
  case "radio":
5377
5560
  case "select":
5378
- case "choice":
5379
- if (options) {
5380
- const option = options.find((opt) => opt.value === value);
5381
- return option ? option.label : String(value);
5382
- }
5383
5561
  return String(value);
5384
5562
  case "checkbox":
5385
5563
  case "choices":
5386
5564
  if (Array.isArray(value)) {
5387
- if (options) {
5388
- return value.map((val) => {
5389
- const option = options.find((opt) => opt.value === val);
5390
- return option ? option.label : String(val);
5391
- }).join(", ");
5392
- }
5393
- return value.join(", ");
5565
+ return value.map((v) => String(v)).join(", ");
5394
5566
  }
5395
5567
  return String(value);
5396
5568
  case "rating":
5397
- if (options) {
5398
- const option = options.find((opt) => opt.value === value);
5399
- return option ? option.label : String(value);
5400
- }
5401
5569
  return String(value);
5402
5570
  case "number":
5403
5571
  return String(value);
@@ -5703,6 +5871,1259 @@ function TrainingInfoGuidelineButton({
5703
5871
  }
5704
5872
  );
5705
5873
  }
5874
+
5875
+ // src/molecules/dynamic-form-editor.tsx
5876
+ var import_react45 = require("react");
5877
+
5878
+ // src/molecules/dynamic-form-editor-utils.ts
5879
+ function isRecord3(value) {
5880
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
5881
+ }
5882
+ function isNonEmptyTrimmedString(value) {
5883
+ return typeof value === "string" && value.trim().length > 0;
5884
+ }
5885
+ function isFiniteNumber(value) {
5886
+ return typeof value === "number" && Number.isFinite(value);
5887
+ }
5888
+ function canCompileRegExp(pattern) {
5889
+ try {
5890
+ new RegExp(pattern);
5891
+ return true;
5892
+ } catch (e) {
5893
+ return false;
5894
+ }
5895
+ }
5896
+ function getFieldTypes() {
5897
+ return [
5898
+ "short_text",
5899
+ "long_text",
5900
+ "number",
5901
+ "email",
5902
+ "dropdown",
5903
+ "choice",
5904
+ "radio_cards",
5905
+ "image_radio_card",
5906
+ "choices",
5907
+ "yes_no"
5908
+ ];
5909
+ }
5910
+ function getFieldTypeLabel(type) {
5911
+ const map = {
5912
+ short_text: "\uC9E7\uC740 \uD14D\uC2A4\uD2B8",
5913
+ long_text: "\uAE34 \uD14D\uC2A4\uD2B8",
5914
+ number: "\uC22B\uC790",
5915
+ email: "\uC774\uBA54\uC77C",
5916
+ dropdown: "\uB4DC\uB86D\uB2E4\uC6B4",
5917
+ choice: "\uB2E8\uC77C \uC120\uD0DD(\uB77C\uB514\uC624)",
5918
+ radio_cards: "\uB77C\uB514\uC624 \uCE74\uB4DC",
5919
+ image_radio_card: "\uC774\uBBF8\uC9C0 \uB77C\uB514\uC624 \uCE74\uB4DC",
5920
+ choices: "\uB2E4\uC911 \uC120\uD0DD(\uCCB4\uD06C)",
5921
+ yes_no: "\uB3D9\uC758(\uCCB4\uD06C)"
5922
+ };
5923
+ return map[type];
5924
+ }
5925
+ function findFieldIndexByName(fields, fieldName) {
5926
+ return fields.findIndex((field) => field.name === fieldName);
5927
+ }
5928
+ function toCamelFromSnake(value) {
5929
+ const parts = value.split("_").filter(Boolean);
5930
+ if (parts.length === 0) return "field";
5931
+ const [first, ...rest] = parts;
5932
+ const firstLower = first.toLowerCase();
5933
+ const restCamel = rest.map((p) => p.length === 0 ? "" : p[0].toUpperCase() + p.slice(1)).join("");
5934
+ return `${firstLower}${restCamel}`;
5935
+ }
5936
+ function createUniqueFieldName(fields, baseName) {
5937
+ const used = new Set(fields.map((f) => f.name));
5938
+ if (!used.has(baseName)) return baseName;
5939
+ let i = 2;
5940
+ while (used.has(`${baseName}${i}`)) i += 1;
5941
+ return `${baseName}${i}`;
5942
+ }
5943
+ function createDefaultField(type, currentFields) {
5944
+ const baseName = toCamelFromSnake(type);
5945
+ const name = createUniqueFieldName(currentFields, baseName);
5946
+ const label = getFieldTypeLabel(type);
5947
+ if (type === "short_text") return { name, type, label, placeholder: "" };
5948
+ if (type === "long_text") return { name, type, label, placeholder: "" };
5949
+ if (type === "number") return { name, type, label, placeholder: "" };
5950
+ if (type === "email") return { name, type, label, placeholder: "" };
5951
+ if (type === "dropdown")
5952
+ return {
5953
+ name,
5954
+ type,
5955
+ label,
5956
+ placeholder: "",
5957
+ options: [{ label: "\uC635\uC158 1", value: "option1" }]
5958
+ };
5959
+ if (type === "choice")
5960
+ return {
5961
+ name,
5962
+ type,
5963
+ label,
5964
+ orientation: "vertical",
5965
+ options: [{ label: "\uC635\uC158 1", value: "option1" }]
5966
+ };
5967
+ if (type === "radio_cards")
5968
+ return { name, type, label, options: [{ label: "\uC635\uC158 1", value: "option1" }] };
5969
+ if (type === "choices")
5970
+ return {
5971
+ name,
5972
+ type,
5973
+ label,
5974
+ orientation: "vertical",
5975
+ options: [{ label: "\uC635\uC158 1", value: "option1" }]
5976
+ };
5977
+ if (type === "yes_no") return { name, type, label, description: "" };
5978
+ return {
5979
+ name,
5980
+ type,
5981
+ label,
5982
+ gridColumnsCount: 4,
5983
+ gridItemHeight: "160px",
5984
+ gridGap: "2",
5985
+ imageFit: "cover",
5986
+ options: [
5987
+ {
5988
+ label: "\uC774\uBBF8\uC9C0 1",
5989
+ value: "option1",
5990
+ imageSrc: "https://placehold.co/300x300/png?text=1"
5991
+ }
5992
+ ]
5993
+ };
5994
+ }
5995
+ function normalizeSchema(value) {
5996
+ const fallback = { fields: [] };
5997
+ if (!value) return fallback;
5998
+ if (!Array.isArray(value.fields)) return fallback;
5999
+ return { fields: value.fields };
6000
+ }
6001
+ function validateDynamicFormSchema(schema) {
6002
+ const issues = [];
6003
+ const nameToCount = /* @__PURE__ */ new Map();
6004
+ schema.fields.forEach((field) => {
6005
+ const prev = nameToCount.get(field.name) || 0;
6006
+ nameToCount.set(field.name, prev + 1);
6007
+ });
6008
+ schema.fields.forEach((field, index) => {
6009
+ const fieldKey = `${index}:${field.name}`;
6010
+ if (!isNonEmptyTrimmedString(field.name)) {
6011
+ issues.push({
6012
+ id: `field.name.required.${fieldKey}`,
6013
+ level: "error",
6014
+ message: "\uD544\uB4DC name\uC740 \uD544\uC218\uC785\uB2C8\uB2E4",
6015
+ fieldName: field.name
6016
+ });
6017
+ } else if (field.name.trim() !== field.name) {
6018
+ issues.push({
6019
+ id: `field.name.trim.${fieldKey}`,
6020
+ level: "warning",
6021
+ message: "\uD544\uB4DC name \uC55E/\uB4A4 \uACF5\uBC31\uC740 \uC81C\uAC70\uD558\uB294 \uAC83\uC744 \uAD8C\uC7A5\uD569\uB2C8\uB2E4",
6022
+ fieldName: field.name
6023
+ });
6024
+ }
6025
+ if (isNonEmptyTrimmedString(field.name)) {
6026
+ const count = nameToCount.get(field.name) || 0;
6027
+ if (count > 1) {
6028
+ issues.push({
6029
+ id: `field.name.duplicate.${fieldKey}`,
6030
+ level: "error",
6031
+ message: `\uC911\uBCF5\uB41C name\uC785\uB2C8\uB2E4: ${field.name}`,
6032
+ fieldName: field.name
6033
+ });
6034
+ }
6035
+ }
6036
+ if (!isNonEmptyTrimmedString(field.label)) {
6037
+ issues.push({
6038
+ id: `field.label.required.${fieldKey}`,
6039
+ level: "error",
6040
+ message: "\uD544\uB4DC label\uC740 \uD544\uC218\uC785\uB2C8\uB2E4",
6041
+ fieldName: field.name
6042
+ });
6043
+ }
6044
+ const type = field.type;
6045
+ const isOptionType = type === "dropdown" || type === "choice" || type === "radio_cards" || type === "choices";
6046
+ if (isOptionType) {
6047
+ const optionsRaw = field.options;
6048
+ if (!Array.isArray(optionsRaw) || optionsRaw.length === 0) {
6049
+ issues.push({
6050
+ id: `field.options.required.${fieldKey}`,
6051
+ level: "error",
6052
+ message: "options\uB294 1\uAC1C \uC774\uC0C1 \uD544\uC694\uD569\uB2C8\uB2E4",
6053
+ fieldName: field.name
6054
+ });
6055
+ }
6056
+ }
6057
+ if (type === "image_radio_card") {
6058
+ const optionsRaw = field.options;
6059
+ if (!Array.isArray(optionsRaw) || optionsRaw.length === 0) {
6060
+ issues.push({
6061
+ id: `field.imageOptions.required.${fieldKey}`,
6062
+ level: "error",
6063
+ message: "options\uB294 1\uAC1C \uC774\uC0C1 \uD544\uC694\uD569\uB2C8\uB2E4",
6064
+ fieldName: field.name
6065
+ });
6066
+ } else {
6067
+ optionsRaw.forEach((opt, optIndex) => {
6068
+ const imageSrc = isRecord3(opt) ? opt.imageSrc : void 0;
6069
+ if (!isNonEmptyTrimmedString(imageSrc)) {
6070
+ issues.push({
6071
+ id: `field.imageOptions.imageSrc.required.${fieldKey}.${optIndex}`,
6072
+ level: "error",
6073
+ message: "imageSrc\uB294 \uD544\uC218\uC785\uB2C8\uB2E4",
6074
+ fieldName: field.name
6075
+ });
6076
+ }
6077
+ });
6078
+ }
6079
+ }
6080
+ const validation = field.validation;
6081
+ if (validation) {
6082
+ if (isFiniteNumber(validation.min) && isFiniteNumber(validation.max)) {
6083
+ if (validation.min > validation.max) {
6084
+ issues.push({
6085
+ id: `field.validation.minmax.${fieldKey}`,
6086
+ level: "error",
6087
+ message: "validation.min\uC740 validation.max \uC774\uD558\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4",
6088
+ fieldName: field.name
6089
+ });
6090
+ }
6091
+ }
6092
+ if (isNonEmptyTrimmedString(validation.pattern)) {
6093
+ if (!canCompileRegExp(validation.pattern)) {
6094
+ issues.push({
6095
+ id: `field.validation.pattern.${fieldKey}`,
6096
+ level: "error",
6097
+ message: "validation.pattern\uC774 \uC62C\uBC14\uB978 \uC815\uADDC\uC2DD\uC774 \uC544\uB2D9\uB2C8\uB2E4",
6098
+ fieldName: field.name
6099
+ });
6100
+ }
6101
+ }
6102
+ }
6103
+ });
6104
+ return issues;
6105
+ }
6106
+ function hasErrorIssues(issues) {
6107
+ return issues.some((i) => i.level === "error");
6108
+ }
6109
+ function updateSchemaFields(schema, nextFields) {
6110
+ return { fields: nextFields };
6111
+ }
6112
+ function moveField(fields, fromIndex, toIndex) {
6113
+ if (fromIndex < 0 || fromIndex >= fields.length) return fields;
6114
+ if (toIndex < 0 || toIndex >= fields.length) return fields;
6115
+ if (fromIndex === toIndex) return fields;
6116
+ const next = [...fields];
6117
+ const [item] = next.splice(fromIndex, 1);
6118
+ next.splice(toIndex, 0, item);
6119
+ return next;
6120
+ }
6121
+ function duplicateField(fields, index) {
6122
+ if (index < 0 || index >= fields.length) return fields;
6123
+ const target = fields[index];
6124
+ const nextName = createUniqueFieldName(fields, target.name);
6125
+ const cloned = __spreadProps(__spreadValues({}, target), { name: nextName });
6126
+ const next = [...fields];
6127
+ next.splice(index + 1, 0, cloned);
6128
+ return next;
6129
+ }
6130
+ function updateFieldCommonProps(field, next) {
6131
+ const { name, label, description, required } = next;
6132
+ return __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, field), name !== void 0 ? { name } : {}), label !== void 0 ? { label } : {}), description !== void 0 ? { description } : {}), required !== void 0 ? { required } : {});
6133
+ }
6134
+ function updateFieldValidation(field, next) {
6135
+ if (!next) {
6136
+ const _a = field, { validation: _validation } = _a, rest = __objRest(_a, ["validation"]);
6137
+ return rest;
6138
+ }
6139
+ return __spreadProps(__spreadValues({}, field), { validation: next });
6140
+ }
6141
+ function updateTextPlaceholder(field, placeholder) {
6142
+ const type = field.type;
6143
+ if (type === "short_text" || type === "long_text" || type === "number" || type === "email" || type === "dropdown") {
6144
+ return __spreadProps(__spreadValues({}, field), { placeholder });
6145
+ }
6146
+ return field;
6147
+ }
6148
+ function updateOrientation(field, orientation) {
6149
+ const type = field.type;
6150
+ if (type === "choice" || type === "choices") return __spreadProps(__spreadValues({}, field), { orientation });
6151
+ return field;
6152
+ }
6153
+ function updateOptions(field, options) {
6154
+ const type = field.type;
6155
+ if (type === "dropdown" || type === "choice" || type === "radio_cards" || type === "choices") {
6156
+ return __spreadProps(__spreadValues({}, field), { options });
6157
+ }
6158
+ return field;
6159
+ }
6160
+ function updateImageOptions(field, options) {
6161
+ if (field.type === "image_radio_card") {
6162
+ return __spreadProps(__spreadValues({}, field), { options });
6163
+ }
6164
+ return field;
6165
+ }
6166
+ function updateImageLayout(field, next) {
6167
+ if (field.type !== "image_radio_card") return field;
6168
+ return __spreadValues(__spreadValues({}, field), next);
6169
+ }
6170
+ function resetFieldType(field, nextType, allFields) {
6171
+ const base = createDefaultField(nextType, allFields);
6172
+ return __spreadProps(__spreadValues({}, base), {
6173
+ name: field.name,
6174
+ label: field.label,
6175
+ description: field.description,
6176
+ required: field.required,
6177
+ validation: field.validation
6178
+ });
6179
+ }
6180
+
6181
+ // src/molecules/dynamic-form-editor-field-editor-panel.tsx
6182
+ var import_react43 = require("react");
6183
+ var import_themes39 = require("@radix-ui/themes");
6184
+ var import_jsx_runtime84 = require("react/jsx-runtime");
6185
+ function isRecord4(value) {
6186
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
6187
+ }
6188
+ function isFieldType(value, types) {
6189
+ return types.some((t) => t === value);
6190
+ }
6191
+ function parseOptionalNumber(value) {
6192
+ const trimmed = value.trim();
6193
+ if (trimmed.length === 0) return void 0;
6194
+ const num = Number(trimmed);
6195
+ return Number.isFinite(num) ? num : void 0;
6196
+ }
6197
+ function getValidation(field) {
6198
+ return field.validation ? field.validation : {};
6199
+ }
6200
+ function cleanValidation(next) {
6201
+ 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;
6202
+ return hasAny ? next : void 0;
6203
+ }
6204
+ function moveItem(items, fromIndex, toIndex) {
6205
+ if (fromIndex < 0 || fromIndex >= items.length) return items;
6206
+ if (toIndex < 0 || toIndex >= items.length) return items;
6207
+ if (fromIndex === toIndex) return items;
6208
+ const next = [...items];
6209
+ const [item] = next.splice(fromIndex, 1);
6210
+ next.splice(toIndex, 0, item);
6211
+ return next;
6212
+ }
6213
+ function getOptionDrafts(field) {
6214
+ const raw = field.options;
6215
+ if (!Array.isArray(raw)) return [];
6216
+ return raw.map((o) => {
6217
+ if (!isRecord4(o)) return null;
6218
+ const label = typeof o.label === "string" ? o.label : "";
6219
+ const valueRaw = o.value;
6220
+ const value = typeof valueRaw === "string" || typeof valueRaw === "number" ? String(valueRaw) : "";
6221
+ return { label, value };
6222
+ }).filter((v) => v !== null);
6223
+ }
6224
+ function getImageOptionDrafts(field) {
6225
+ const raw = field.options;
6226
+ if (!Array.isArray(raw)) return [];
6227
+ return raw.map(
6228
+ (o) => {
6229
+ if (!isRecord4(o)) return null;
6230
+ const label = typeof o.label === "string" ? o.label : "";
6231
+ const valueRaw = o.value;
6232
+ const value = typeof valueRaw === "string" || typeof valueRaw === "number" ? String(valueRaw) : "";
6233
+ const imageSrc = typeof o.imageSrc === "string" ? o.imageSrc : "";
6234
+ const alt = typeof o.alt === "string" ? o.alt : void 0;
6235
+ return __spreadValues({ label, value, imageSrc }, alt ? { alt } : {});
6236
+ }
6237
+ ).filter(
6238
+ (v) => v !== null
6239
+ );
6240
+ }
6241
+ function toFieldOptions(options) {
6242
+ return options.map((o) => ({ label: o.label, value: o.value }));
6243
+ }
6244
+ function toImageFieldOptions(options) {
6245
+ return options.map((o) => __spreadValues({
6246
+ label: o.label,
6247
+ value: o.value,
6248
+ imageSrc: o.imageSrc
6249
+ }, o.alt !== void 0 ? { alt: o.alt } : {}));
6250
+ }
6251
+ function DynamicFormEditorFieldEditorPanel(props) {
6252
+ const {
6253
+ field,
6254
+ fieldIndex,
6255
+ fields,
6256
+ readonly,
6257
+ fieldTypes,
6258
+ onRenameField,
6259
+ onUpdateField,
6260
+ onDeleteField,
6261
+ onMoveField,
6262
+ onDuplicateField
6263
+ } = props;
6264
+ const canMoveUp = fieldIndex > 0;
6265
+ const canMoveDown = fieldIndex >= 0 && fieldIndex < fields.length - 1;
6266
+ const placeholderValue = (0, import_react43.useMemo)(() => {
6267
+ if (!field) return "";
6268
+ return String(field.placeholder || "");
6269
+ }, [field]);
6270
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Card, { style: { flex: 1, minWidth: 520, padding: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { direction: "column", gap: "4", children: [
6271
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { align: "center", justify: "between", children: [
6272
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "body", children: "\uD544\uB4DC \uD3B8\uC9D1" }),
6273
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { align: "center", gap: "1", children: [
6274
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6275
+ IconButton,
6276
+ {
6277
+ "aria-label": "\uD544\uB4DC \uC704\uB85C",
6278
+ disabled: readonly || !field || !canMoveUp,
6279
+ onClick: () => {
6280
+ onMoveField("up");
6281
+ },
6282
+ variant: "soft",
6283
+ children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_icons.ChevronUpIcon, {})
6284
+ }
6285
+ ),
6286
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6287
+ IconButton,
6288
+ {
6289
+ "aria-label": "\uD544\uB4DC \uC544\uB798\uB85C",
6290
+ disabled: readonly || !field || !canMoveDown,
6291
+ onClick: () => {
6292
+ onMoveField("down");
6293
+ },
6294
+ variant: "soft",
6295
+ children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_icons.ChevronDownIcon, {})
6296
+ }
6297
+ ),
6298
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6299
+ IconButton,
6300
+ {
6301
+ "aria-label": "\uD544\uB4DC \uBCF5\uC81C",
6302
+ disabled: readonly || !field,
6303
+ onClick: onDuplicateField,
6304
+ variant: "soft",
6305
+ children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_icons.CopyIcon, {})
6306
+ }
6307
+ ),
6308
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6309
+ IconButton,
6310
+ {
6311
+ "aria-label": "\uD544\uB4DC \uC0AD\uC81C",
6312
+ disabled: readonly || !field,
6313
+ onClick: onDeleteField,
6314
+ variant: "soft",
6315
+ children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_icons.TrashIcon, {})
6316
+ }
6317
+ )
6318
+ ] })
6319
+ ] }),
6320
+ !field ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { color: "gray", variant: "caption", children: "\uC67C\uCABD\uC5D0\uC11C \uD544\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694." }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { direction: "column", gap: "3", children: [
6321
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { align: "end", gap: "2", children: [
6322
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { style: { flex: 1 }, children: [
6323
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "name" }),
6324
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6325
+ TextField.Root,
6326
+ {
6327
+ disabled: readonly,
6328
+ onChange: (e) => {
6329
+ onRenameField(e.target.value);
6330
+ },
6331
+ value: field.name
6332
+ }
6333
+ )
6334
+ ] }),
6335
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { style: { flex: 1 }, children: [
6336
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "label" }),
6337
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6338
+ TextField.Root,
6339
+ {
6340
+ disabled: readonly,
6341
+ onChange: (e) => {
6342
+ onUpdateField(updateFieldCommonProps(field, { label: e.target.value }));
6343
+ },
6344
+ value: field.label
6345
+ }
6346
+ )
6347
+ ] })
6348
+ ] }),
6349
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { align: "center", gap: "2", children: [
6350
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
6351
+ Select.Root,
6352
+ {
6353
+ disabled: readonly,
6354
+ onValueChange: (v) => {
6355
+ if (!isFieldType(v, fieldTypes)) return;
6356
+ onUpdateField(resetFieldType(field, v, fields));
6357
+ },
6358
+ value: field.type,
6359
+ children: [
6360
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Select.Trigger, { style: { minWidth: 220 } }),
6361
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Select.Content, { children: fieldTypes.map((t) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Select.Item, { value: t, children: getFieldTypeLabel(t) }, t)) })
6362
+ ]
6363
+ }
6364
+ ),
6365
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { align: "center", gap: "2", children: [
6366
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6367
+ Checkbox,
6368
+ {
6369
+ checked: Boolean(field.required),
6370
+ disabled: readonly,
6371
+ onCheckedChange: (checked) => {
6372
+ onUpdateField(updateFieldCommonProps(field, { required: checked }));
6373
+ }
6374
+ }
6375
+ ),
6376
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "\uD544\uC218" })
6377
+ ] })
6378
+ ] }),
6379
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { children: [
6380
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "description" }),
6381
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6382
+ TextArea,
6383
+ {
6384
+ disabled: readonly,
6385
+ onChange: (e) => {
6386
+ onUpdateField(
6387
+ updateFieldCommonProps(field, { description: e.target.value })
6388
+ );
6389
+ },
6390
+ rows: 3,
6391
+ value: field.description || ""
6392
+ }
6393
+ )
6394
+ ] }),
6395
+ field.type === "short_text" || field.type === "long_text" || field.type === "number" || field.type === "email" || field.type === "dropdown" ? /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { children: [
6396
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "placeholder" }),
6397
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6398
+ TextField.Root,
6399
+ {
6400
+ disabled: readonly,
6401
+ onChange: (e) => {
6402
+ onUpdateField(updateTextPlaceholder(field, e.target.value));
6403
+ },
6404
+ value: placeholderValue
6405
+ }
6406
+ )
6407
+ ] }) : null,
6408
+ field.type === "choice" || field.type === "choices" ? /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { children: [
6409
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "orientation" }),
6410
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
6411
+ Select.Root,
6412
+ {
6413
+ disabled: readonly,
6414
+ onValueChange: (v) => {
6415
+ const nextOrientation = v === "horizontal" ? "horizontal" : "vertical";
6416
+ onUpdateField(updateOrientation(field, nextOrientation));
6417
+ },
6418
+ value: field.orientation || "vertical",
6419
+ children: [
6420
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Select.Trigger, { style: { minWidth: 220 } }),
6421
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(Select.Content, { children: [
6422
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Select.Item, { value: "vertical", children: "vertical" }),
6423
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Select.Item, { value: "horizontal", children: "horizontal" })
6424
+ ] })
6425
+ ]
6426
+ }
6427
+ )
6428
+ ] }) : null,
6429
+ field.type === "dropdown" || field.type === "choice" || field.type === "radio_cards" || field.type === "choices" ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Card, { style: { padding: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { direction: "column", gap: "2", children: [
6430
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { align: "center", justify: "between", children: [
6431
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "options" }),
6432
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
6433
+ Button,
6434
+ {
6435
+ disabled: readonly,
6436
+ onClick: () => {
6437
+ const drafts = getOptionDrafts(field);
6438
+ const nextDrafts = [
6439
+ ...drafts,
6440
+ {
6441
+ label: `\uC635\uC158 ${drafts.length + 1}`,
6442
+ value: `option${drafts.length + 1}`
6443
+ }
6444
+ ];
6445
+ onUpdateField(updateOptions(field, toFieldOptions(nextDrafts)));
6446
+ },
6447
+ size: "small",
6448
+ variant: "soft",
6449
+ children: [
6450
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_icons.PlusIcon, {}),
6451
+ " \uCD94\uAC00"
6452
+ ]
6453
+ }
6454
+ )
6455
+ ] }),
6456
+ getOptionDrafts(field).map((opt, i) => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { align: "end", gap: "2", children: [
6457
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { style: { flex: 1 }, children: [
6458
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "label" }),
6459
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6460
+ TextField.Root,
6461
+ {
6462
+ disabled: readonly,
6463
+ onChange: (e) => {
6464
+ const drafts = getOptionDrafts(field);
6465
+ const nextDrafts = drafts.map(
6466
+ (d, idx) => idx === i ? __spreadProps(__spreadValues({}, d), { label: e.target.value }) : d
6467
+ );
6468
+ onUpdateField(updateOptions(field, toFieldOptions(nextDrafts)));
6469
+ },
6470
+ value: opt.label
6471
+ }
6472
+ )
6473
+ ] }),
6474
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { style: { flex: 1 }, children: [
6475
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "value" }),
6476
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6477
+ TextField.Root,
6478
+ {
6479
+ disabled: readonly,
6480
+ onChange: (e) => {
6481
+ const drafts = getOptionDrafts(field);
6482
+ const nextDrafts = drafts.map(
6483
+ (d, idx) => idx === i ? __spreadProps(__spreadValues({}, d), { value: e.target.value }) : d
6484
+ );
6485
+ onUpdateField(updateOptions(field, toFieldOptions(nextDrafts)));
6486
+ },
6487
+ value: opt.value
6488
+ }
6489
+ )
6490
+ ] }),
6491
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { gap: "1", children: [
6492
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6493
+ IconButton,
6494
+ {
6495
+ "aria-label": "\uC635\uC158 \uC704\uB85C",
6496
+ disabled: readonly || i === 0,
6497
+ onClick: () => {
6498
+ const drafts = getOptionDrafts(field);
6499
+ const nextDrafts = moveItem(drafts, i, i - 1);
6500
+ onUpdateField(updateOptions(field, toFieldOptions(nextDrafts)));
6501
+ },
6502
+ variant: "soft",
6503
+ children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_icons.ChevronUpIcon, {})
6504
+ }
6505
+ ),
6506
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6507
+ IconButton,
6508
+ {
6509
+ "aria-label": "\uC635\uC158 \uC544\uB798\uB85C",
6510
+ disabled: readonly || i === getOptionDrafts(field).length - 1,
6511
+ onClick: () => {
6512
+ const drafts = getOptionDrafts(field);
6513
+ const nextDrafts = moveItem(drafts, i, i + 1);
6514
+ onUpdateField(updateOptions(field, toFieldOptions(nextDrafts)));
6515
+ },
6516
+ variant: "soft",
6517
+ children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_icons.ChevronDownIcon, {})
6518
+ }
6519
+ ),
6520
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6521
+ IconButton,
6522
+ {
6523
+ "aria-label": "\uC635\uC158 \uC0AD\uC81C",
6524
+ disabled: readonly,
6525
+ onClick: () => {
6526
+ const drafts = getOptionDrafts(field);
6527
+ const nextDrafts = drafts.filter((_, idx) => idx !== i);
6528
+ onUpdateField(updateOptions(field, toFieldOptions(nextDrafts)));
6529
+ },
6530
+ variant: "soft",
6531
+ children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_icons.TrashIcon, {})
6532
+ }
6533
+ )
6534
+ ] })
6535
+ ] }, `${opt.value}-${opt.label}`))
6536
+ ] }) }) : null,
6537
+ field.type === "image_radio_card" ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Card, { style: { padding: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { direction: "column", gap: "3", children: [
6538
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { align: "center", justify: "between", children: [
6539
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "image options" }),
6540
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
6541
+ Button,
6542
+ {
6543
+ disabled: readonly,
6544
+ onClick: () => {
6545
+ const drafts = getImageOptionDrafts(field);
6546
+ const nextDrafts = [
6547
+ ...drafts,
6548
+ {
6549
+ label: `\uC774\uBBF8\uC9C0 ${drafts.length + 1}`,
6550
+ value: `option${drafts.length + 1}`,
6551
+ imageSrc: "https://placehold.co/300x300/png?text=new"
6552
+ }
6553
+ ];
6554
+ onUpdateField(updateImageOptions(field, toImageFieldOptions(nextDrafts)));
6555
+ },
6556
+ size: "small",
6557
+ variant: "soft",
6558
+ children: [
6559
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_icons.PlusIcon, {}),
6560
+ " \uCD94\uAC00"
6561
+ ]
6562
+ }
6563
+ )
6564
+ ] }),
6565
+ getImageOptionDrafts(field).map((opt, i) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6566
+ Card,
6567
+ {
6568
+ style: { padding: 10 },
6569
+ children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { direction: "column", gap: "2", children: [
6570
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { align: "end", gap: "2", children: [
6571
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { style: { flex: 1 }, children: [
6572
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "label" }),
6573
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6574
+ TextField.Root,
6575
+ {
6576
+ disabled: readonly,
6577
+ onChange: (e) => {
6578
+ const drafts = getImageOptionDrafts(field);
6579
+ const nextDrafts = drafts.map(
6580
+ (d, idx) => idx === i ? __spreadProps(__spreadValues({}, d), { label: e.target.value }) : d
6581
+ );
6582
+ onUpdateField(
6583
+ updateImageOptions(field, toImageFieldOptions(nextDrafts))
6584
+ );
6585
+ },
6586
+ value: opt.label
6587
+ }
6588
+ )
6589
+ ] }),
6590
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { style: { flex: 1 }, children: [
6591
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "value" }),
6592
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6593
+ TextField.Root,
6594
+ {
6595
+ disabled: readonly,
6596
+ onChange: (e) => {
6597
+ const drafts = getImageOptionDrafts(field);
6598
+ const nextDrafts = drafts.map(
6599
+ (d, idx) => idx === i ? __spreadProps(__spreadValues({}, d), { value: e.target.value }) : d
6600
+ );
6601
+ onUpdateField(
6602
+ updateImageOptions(field, toImageFieldOptions(nextDrafts))
6603
+ );
6604
+ },
6605
+ value: opt.value
6606
+ }
6607
+ )
6608
+ ] })
6609
+ ] }),
6610
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { children: [
6611
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "imageSrc" }),
6612
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6613
+ TextField.Root,
6614
+ {
6615
+ disabled: readonly,
6616
+ onChange: (e) => {
6617
+ const drafts = getImageOptionDrafts(field);
6618
+ const nextDrafts = drafts.map(
6619
+ (d, idx) => idx === i ? __spreadProps(__spreadValues({}, d), { imageSrc: e.target.value }) : d
6620
+ );
6621
+ onUpdateField(
6622
+ updateImageOptions(field, toImageFieldOptions(nextDrafts))
6623
+ );
6624
+ },
6625
+ value: opt.imageSrc
6626
+ }
6627
+ )
6628
+ ] }),
6629
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { align: "end", gap: "2", children: [
6630
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { style: { flex: 1 }, children: [
6631
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "alt" }),
6632
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6633
+ TextField.Root,
6634
+ {
6635
+ disabled: readonly,
6636
+ onChange: (e) => {
6637
+ const drafts = getImageOptionDrafts(field);
6638
+ const nextAlt = e.target.value.trim().length === 0 ? void 0 : e.target.value;
6639
+ const nextDrafts = drafts.map(
6640
+ (d, idx) => idx === i ? __spreadProps(__spreadValues({}, d), { alt: nextAlt }) : d
6641
+ );
6642
+ onUpdateField(
6643
+ updateImageOptions(field, toImageFieldOptions(nextDrafts))
6644
+ );
6645
+ },
6646
+ value: opt.alt || ""
6647
+ }
6648
+ )
6649
+ ] }),
6650
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6651
+ IconButton,
6652
+ {
6653
+ "aria-label": "\uC774\uBBF8\uC9C0 \uC635\uC158 \uC0AD\uC81C",
6654
+ disabled: readonly,
6655
+ onClick: () => {
6656
+ const drafts = getImageOptionDrafts(field);
6657
+ const nextDrafts = drafts.filter((_, idx) => idx !== i);
6658
+ onUpdateField(
6659
+ updateImageOptions(field, toImageFieldOptions(nextDrafts))
6660
+ );
6661
+ },
6662
+ variant: "soft",
6663
+ children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_icons.TrashIcon, {})
6664
+ }
6665
+ )
6666
+ ] })
6667
+ ] })
6668
+ },
6669
+ `${opt.value}-${opt.label}-${opt.imageSrc}`
6670
+ )),
6671
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { gap: "2", children: [
6672
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { style: { flex: 1 }, children: [
6673
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "gridColumnsCount" }),
6674
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6675
+ TextField.Root,
6676
+ {
6677
+ disabled: readonly,
6678
+ inputMode: "numeric",
6679
+ onChange: (e) => {
6680
+ onUpdateField(
6681
+ updateImageLayout(field, {
6682
+ gridColumnsCount: parseOptionalNumber(e.target.value)
6683
+ })
6684
+ );
6685
+ },
6686
+ value: String(field.gridColumnsCount || "")
6687
+ }
6688
+ )
6689
+ ] }),
6690
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { style: { flex: 1 }, children: [
6691
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "gridItemHeight" }),
6692
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6693
+ TextField.Root,
6694
+ {
6695
+ disabled: readonly,
6696
+ onChange: (e) => {
6697
+ onUpdateField(
6698
+ updateImageLayout(field, { gridItemHeight: e.target.value })
6699
+ );
6700
+ },
6701
+ value: String(field.gridItemHeight || "")
6702
+ }
6703
+ )
6704
+ ] }),
6705
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { style: { flex: 1 }, children: [
6706
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "gridGap" }),
6707
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6708
+ TextField.Root,
6709
+ {
6710
+ disabled: readonly,
6711
+ onChange: (e) => {
6712
+ onUpdateField(updateImageLayout(field, { gridGap: e.target.value }));
6713
+ },
6714
+ value: String(field.gridGap || "")
6715
+ }
6716
+ )
6717
+ ] })
6718
+ ] }),
6719
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { children: [
6720
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "imageFit" }),
6721
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
6722
+ Select.Root,
6723
+ {
6724
+ disabled: readonly,
6725
+ onValueChange: (v) => {
6726
+ const nextFit = v === "contain" ? "contain" : "cover";
6727
+ onUpdateField(updateImageLayout(field, { imageFit: nextFit }));
6728
+ },
6729
+ value: field.imageFit || "cover",
6730
+ children: [
6731
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Select.Trigger, { style: { minWidth: 220 } }),
6732
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(Select.Content, { children: [
6733
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Select.Item, { value: "cover", children: "cover" }),
6734
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Select.Item, { value: "contain", children: "contain" })
6735
+ ] })
6736
+ ]
6737
+ }
6738
+ )
6739
+ ] })
6740
+ ] }) }) : null,
6741
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Card, { style: { padding: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { direction: "column", gap: "2", children: [
6742
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "validation" }),
6743
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes.Flex, { gap: "2", children: [
6744
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { style: { flex: 1 }, children: [
6745
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "min" }),
6746
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6747
+ TextField.Root,
6748
+ {
6749
+ disabled: readonly,
6750
+ inputMode: "numeric",
6751
+ onChange: (e) => {
6752
+ const current = getValidation(field);
6753
+ const next = cleanValidation(__spreadProps(__spreadValues({}, current), {
6754
+ min: parseOptionalNumber(e.target.value)
6755
+ }));
6756
+ onUpdateField(updateFieldValidation(field, next));
6757
+ },
6758
+ value: getValidation(field).min !== void 0 ? String(getValidation(field).min) : ""
6759
+ }
6760
+ )
6761
+ ] }),
6762
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { style: { flex: 1 }, children: [
6763
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "max" }),
6764
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6765
+ TextField.Root,
6766
+ {
6767
+ disabled: readonly,
6768
+ inputMode: "numeric",
6769
+ onChange: (e) => {
6770
+ const current = getValidation(field);
6771
+ const next = cleanValidation(__spreadProps(__spreadValues({}, current), {
6772
+ max: parseOptionalNumber(e.target.value)
6773
+ }));
6774
+ onUpdateField(updateFieldValidation(field, next));
6775
+ },
6776
+ value: getValidation(field).max !== void 0 ? String(getValidation(field).max) : ""
6777
+ }
6778
+ )
6779
+ ] })
6780
+ ] }),
6781
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { children: [
6782
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "pattern" }),
6783
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6784
+ TextField.Root,
6785
+ {
6786
+ disabled: readonly,
6787
+ onChange: (e) => {
6788
+ const current = getValidation(field);
6789
+ const next = cleanValidation(__spreadProps(__spreadValues({}, current), { pattern: e.target.value }));
6790
+ onUpdateField(updateFieldValidation(field, next));
6791
+ },
6792
+ value: String(getValidation(field).pattern || "")
6793
+ }
6794
+ )
6795
+ ] }),
6796
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_themes39.Box, { children: [
6797
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Typo, { variant: "caption", children: "message" }),
6798
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6799
+ TextField.Root,
6800
+ {
6801
+ disabled: readonly,
6802
+ onChange: (e) => {
6803
+ const current = getValidation(field);
6804
+ const next = cleanValidation(__spreadProps(__spreadValues({}, current), { message: e.target.value }));
6805
+ onUpdateField(updateFieldValidation(field, next));
6806
+ },
6807
+ value: String(getValidation(field).message || "")
6808
+ }
6809
+ )
6810
+ ] })
6811
+ ] }) })
6812
+ ] })
6813
+ ] }) });
6814
+ }
6815
+
6816
+ // src/molecules/dynamic-form-editor-field-list-panel.tsx
6817
+ var import_react44 = require("react");
6818
+ var import_themes40 = require("@radix-ui/themes");
6819
+ var import_jsx_runtime85 = require("react/jsx-runtime");
6820
+ function isFieldType2(value, types) {
6821
+ return types.some((t) => t === value);
6822
+ }
6823
+ function DynamicFormEditorFieldListPanel(props) {
6824
+ const {
6825
+ fields,
6826
+ selectedFieldName,
6827
+ readonly,
6828
+ fieldTypes,
6829
+ hasFieldError,
6830
+ onSelectFieldName,
6831
+ onAddField
6832
+ } = props;
6833
+ const isEmpty = fields.length === 0;
6834
+ const triggerPlaceholder = (0, import_react44.useMemo)(() => {
6835
+ return readonly ? "\uCD94\uAC00(\uC77D\uAE30 \uC804\uC6A9)" : "\uCD94\uAC00";
6836
+ }, [readonly]);
6837
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Card, { style: { width: 340, padding: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_themes.Flex, { direction: "column", gap: "3", children: [
6838
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_themes.Flex, { align: "center", justify: "between", children: [
6839
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Typo, { variant: "body", children: "\uD544\uB4DC" }),
6840
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
6841
+ Select.Root,
6842
+ {
6843
+ disabled: readonly,
6844
+ onValueChange: (v) => {
6845
+ if (!isFieldType2(v, fieldTypes)) return;
6846
+ onAddField(v);
6847
+ },
6848
+ value: "",
6849
+ children: [
6850
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Select.Trigger, { placeholder: triggerPlaceholder }),
6851
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Select.Content, { children: fieldTypes.map((t) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Select.Item, { value: t, children: getFieldTypeLabel(t) }, t)) })
6852
+ ]
6853
+ }
6854
+ )
6855
+ ] }),
6856
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_themes.Flex, { direction: "column", gap: "2", children: [
6857
+ isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Typo, { color: "gray", variant: "caption", children: "\uC544\uC9C1 \uD544\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4." }) : null,
6858
+ fields.map((field) => {
6859
+ const isSelected = field.name === selectedFieldName;
6860
+ const hasError = hasFieldError(field.name);
6861
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
6862
+ Card,
6863
+ {
6864
+ error: isSelected ? hasError : void 0,
6865
+ onClick: () => {
6866
+ onSelectFieldName(field.name);
6867
+ },
6868
+ style: {
6869
+ padding: 10,
6870
+ cursor: "pointer",
6871
+ opacity: readonly ? 0.8 : 1,
6872
+ border: isSelected ? "1px solid var(--accent-9)" : "1px solid transparent"
6873
+ },
6874
+ children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_themes40.Box, { style: { minWidth: 0 }, children: [
6875
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
6876
+ Typo,
6877
+ {
6878
+ style: {
6879
+ whiteSpace: "nowrap",
6880
+ overflow: "hidden",
6881
+ textOverflow: "ellipsis"
6882
+ },
6883
+ variant: "body",
6884
+ children: field.label
6885
+ }
6886
+ ),
6887
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(Typo, { color: "gray", variant: "caption", children: [
6888
+ field.name,
6889
+ " \xB7 ",
6890
+ field.type,
6891
+ field.required ? " \xB7 required" : ""
6892
+ ] })
6893
+ ] })
6894
+ },
6895
+ field.name
6896
+ );
6897
+ })
6898
+ ] })
6899
+ ] }) });
6900
+ }
6901
+
6902
+ // src/molecules/dynamic-form-editor-issues-panel.tsx
6903
+ var import_jsx_runtime86 = require("react/jsx-runtime");
6904
+ function DynamicFormEditorIssuesPanel(props) {
6905
+ const { issues } = props;
6906
+ if (issues.length === 0) return null;
6907
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Card, { style: { padding: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_themes.Flex, { direction: "column", gap: "2", children: [
6908
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Typo, { variant: "caption", children: "\uC2A4\uD0A4\uB9C8 \uC774\uC288" }),
6909
+ issues.map((i) => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
6910
+ Typo,
6911
+ {
6912
+ color: i.level === "error" ? "red" : "gray",
6913
+ variant: "caption",
6914
+ children: [
6915
+ "[",
6916
+ i.level,
6917
+ "] ",
6918
+ i.message,
6919
+ i.fieldName ? ` (field: ${i.fieldName})` : ""
6920
+ ]
6921
+ },
6922
+ i.id
6923
+ ))
6924
+ ] }) });
6925
+ }
6926
+
6927
+ // src/molecules/dynamic-form-editor-preview-panel.tsx
6928
+ var import_jsx_runtime87 = require("react/jsx-runtime");
6929
+ function DynamicFormEditorPreviewPanel(props) {
6930
+ const { show, fields } = props;
6931
+ if (!show) return null;
6932
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Card, { style: { width: 420, padding: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_themes.Flex, { direction: "column", gap: "3", children: [
6933
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Typo, { variant: "body", children: "\uD504\uB9AC\uBDF0" }),
6934
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(DynamicForm.Root, { fields, onSubmit: () => void 0, readonly: true, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(DynamicForm.FieldList, { labelVariant: "body" }) })
6935
+ ] }) });
6936
+ }
6937
+
6938
+ // src/molecules/dynamic-form-editor.tsx
6939
+ var import_jsx_runtime88 = require("react/jsx-runtime");
6940
+ function getInitialSchema(value, defaultValue) {
6941
+ if (value !== void 0) return normalizeSchema(value);
6942
+ return normalizeSchema(defaultValue);
6943
+ }
6944
+ function getSelectedField(schema, selectedFieldName) {
6945
+ if (!selectedFieldName) return { field: null, index: -1 };
6946
+ const index = findFieldIndexByName(schema.fields, selectedFieldName);
6947
+ if (index < 0) return { field: null, index: -1 };
6948
+ return { field: schema.fields[index], index };
6949
+ }
6950
+ function DynamicFormEditor(props) {
6951
+ const {
6952
+ value,
6953
+ defaultValue,
6954
+ onChange,
6955
+ onSave,
6956
+ onCancel,
6957
+ readonly = false,
6958
+ showPreview = false
6959
+ } = props;
6960
+ const isControlled = value !== void 0;
6961
+ const [uncontrolledSchema, setUncontrolledSchema] = (0, import_react45.useState)(
6962
+ () => getInitialSchema(void 0, defaultValue)
6963
+ );
6964
+ const effectiveSchema = (0, import_react45.useMemo)(() => {
6965
+ if (isControlled) return normalizeSchema(value);
6966
+ return uncontrolledSchema;
6967
+ }, [isControlled, uncontrolledSchema, value]);
6968
+ const [selectedFieldName, setSelectedFieldName] = (0, import_react45.useState)(() => {
6969
+ var _a, _b;
6970
+ const initialSchema = getInitialSchema(value, defaultValue);
6971
+ return (_b = (_a = initialSchema.fields[0]) == null ? void 0 : _a.name) != null ? _b : null;
6972
+ });
6973
+ const selected = (0, import_react45.useMemo)(() => {
6974
+ return getSelectedField(effectiveSchema, selectedFieldName);
6975
+ }, [effectiveSchema, selectedFieldName]);
6976
+ const issues = (0, import_react45.useMemo)(() => {
6977
+ return validateDynamicFormSchema(effectiveSchema);
6978
+ }, [effectiveSchema]);
6979
+ const errorFieldNameSet = (0, import_react45.useMemo)(() => {
6980
+ const set = /* @__PURE__ */ new Set();
6981
+ issues.forEach((i) => {
6982
+ if (i.level === "error" && i.fieldName) set.add(i.fieldName);
6983
+ });
6984
+ return set;
6985
+ }, [issues]);
6986
+ const hasFieldError = (0, import_react45.useCallback)(
6987
+ (fieldName) => {
6988
+ return errorFieldNameSet.has(fieldName);
6989
+ },
6990
+ [errorFieldNameSet]
6991
+ );
6992
+ const fieldTypes = (0, import_react45.useMemo)(() => getFieldTypes(), []);
6993
+ (0, import_react45.useEffect)(() => {
6994
+ var _a, _b;
6995
+ if (selectedFieldName && selected.field) return;
6996
+ setSelectedFieldName((_b = (_a = effectiveSchema.fields[0]) == null ? void 0 : _a.name) != null ? _b : null);
6997
+ }, [effectiveSchema.fields, selected.field, selectedFieldName]);
6998
+ (0, import_react45.useEffect)(() => {
6999
+ if (isControlled) return;
7000
+ setUncontrolledSchema(getInitialSchema(void 0, defaultValue));
7001
+ }, [defaultValue, isControlled]);
7002
+ const applySchema = (0, import_react45.useCallback)(
7003
+ (next) => {
7004
+ onChange == null ? void 0 : onChange(next);
7005
+ if (!isControlled) setUncontrolledSchema(next);
7006
+ },
7007
+ [isControlled, onChange]
7008
+ );
7009
+ const handleAddField = (0, import_react45.useCallback)(
7010
+ (type) => {
7011
+ if (readonly) return;
7012
+ const nextField = createDefaultField(type, effectiveSchema.fields);
7013
+ const nextFields = [...effectiveSchema.fields, nextField];
7014
+ applySchema(updateSchemaFields(effectiveSchema, nextFields));
7015
+ setSelectedFieldName(nextField.name);
7016
+ },
7017
+ [applySchema, effectiveSchema, readonly]
7018
+ );
7019
+ const handleUpdateSelectedField = (0, import_react45.useCallback)(
7020
+ (nextField) => {
7021
+ if (readonly) return;
7022
+ if (!selected.field || selected.index < 0) return;
7023
+ const nextFields = effectiveSchema.fields.map(
7024
+ (f, i) => i === selected.index ? nextField : f
7025
+ );
7026
+ applySchema(updateSchemaFields(effectiveSchema, nextFields));
7027
+ },
7028
+ [applySchema, effectiveSchema, readonly, selected.field, selected.index]
7029
+ );
7030
+ const handleRenameSelected = (0, import_react45.useCallback)(
7031
+ (nextName) => {
7032
+ if (readonly) return;
7033
+ const currentField = selected.field;
7034
+ if (!currentField) return;
7035
+ const others = effectiveSchema.fields.filter(
7036
+ (f) => f.name !== currentField.name
7037
+ );
7038
+ const uniqueName = createUniqueFieldName(others, nextName);
7039
+ const nextField = __spreadProps(__spreadValues({}, currentField), { name: uniqueName });
7040
+ handleUpdateSelectedField(nextField);
7041
+ setSelectedFieldName(uniqueName);
7042
+ },
7043
+ [effectiveSchema.fields, handleUpdateSelectedField, readonly, selected.field]
7044
+ );
7045
+ const handleDeleteSelected = (0, import_react45.useCallback)(() => {
7046
+ if (readonly) return;
7047
+ if (!selected.field || selected.index < 0) return;
7048
+ const nextFields = effectiveSchema.fields.filter(
7049
+ (_, i) => i !== selected.index
7050
+ );
7051
+ applySchema(updateSchemaFields(effectiveSchema, nextFields));
7052
+ let nextSelected = null;
7053
+ if (nextFields.length > selected.index) nextSelected = nextFields[selected.index].name;
7054
+ else if (nextFields.length > 0) nextSelected = nextFields[0].name;
7055
+ setSelectedFieldName(nextSelected);
7056
+ }, [applySchema, effectiveSchema, readonly, selected.field, selected.index]);
7057
+ const handleMoveSelected = (0, import_react45.useCallback)(
7058
+ (direction) => {
7059
+ if (readonly) return;
7060
+ if (!selected.field || selected.index < 0) return;
7061
+ const toIndex = direction === "up" ? selected.index - 1 : selected.index + 1;
7062
+ const nextFields = moveField(
7063
+ effectiveSchema.fields,
7064
+ selected.index,
7065
+ toIndex
7066
+ );
7067
+ applySchema(updateSchemaFields(effectiveSchema, nextFields));
7068
+ },
7069
+ [applySchema, effectiveSchema, readonly, selected.field, selected.index]
7070
+ );
7071
+ const handleDuplicateSelected = (0, import_react45.useCallback)(() => {
7072
+ if (readonly) return;
7073
+ if (!selected.field || selected.index < 0) return;
7074
+ const nextFields = duplicateField(
7075
+ effectiveSchema.fields,
7076
+ selected.index
7077
+ );
7078
+ applySchema(updateSchemaFields(effectiveSchema, nextFields));
7079
+ const duplicatedIndex = selected.index + 1;
7080
+ const nextSelected = nextFields.length > duplicatedIndex ? nextFields[duplicatedIndex].name : selected.field.name;
7081
+ setSelectedFieldName(nextSelected);
7082
+ }, [applySchema, effectiveSchema, readonly, selected.field, selected.index]);
7083
+ const handleSave = (0, import_react45.useCallback)(() => {
7084
+ if (!onSave) return;
7085
+ const result = onSave(effectiveSchema);
7086
+ void result;
7087
+ }, [effectiveSchema, onSave]);
7088
+ const disableSave = readonly || !onSave || hasErrorIssues(issues);
7089
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_themes.Flex, { align: "start", gap: "4", style: { width: "100%" }, children: [
7090
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
7091
+ DynamicFormEditorFieldListPanel,
7092
+ {
7093
+ fieldTypes,
7094
+ fields: effectiveSchema.fields,
7095
+ hasFieldError,
7096
+ onAddField: handleAddField,
7097
+ onSelectFieldName: setSelectedFieldName,
7098
+ readonly,
7099
+ selectedFieldName
7100
+ }
7101
+ ),
7102
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_themes.Flex, { direction: "column", gap: "3", style: { flex: 1, minWidth: 520 }, children: [
7103
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
7104
+ DynamicFormEditorFieldEditorPanel,
7105
+ {
7106
+ field: selected.field,
7107
+ fieldIndex: selected.index,
7108
+ fieldTypes,
7109
+ fields: effectiveSchema.fields,
7110
+ onDeleteField: handleDeleteSelected,
7111
+ onDuplicateField: handleDuplicateSelected,
7112
+ onMoveField: handleMoveSelected,
7113
+ onRenameField: handleRenameSelected,
7114
+ onUpdateField: handleUpdateSelectedField,
7115
+ readonly
7116
+ }
7117
+ ),
7118
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(DynamicFormEditorIssuesPanel, { issues }),
7119
+ onSave || onCancel ? /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_themes.Flex, { gap: "2", justify: "end", children: [
7120
+ onCancel ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Button, { disabled: readonly, onClick: onCancel, variant: "soft", children: "\uCDE8\uC18C" }) : null,
7121
+ onSave ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Button, { disabled: disableSave, onClick: handleSave, children: "\uC800\uC7A5" }) : null
7122
+ ] }) : null
7123
+ ] }),
7124
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(DynamicFormEditorPreviewPanel, { fields: effectiveSchema.fields, show: showPreview })
7125
+ ] });
7126
+ }
5706
7127
  // Annotate the CommonJS export names for ESM import in node:
5707
7128
  0 && (module.exports = {
5708
7129
  CurriculumBody,
@@ -5716,6 +7137,7 @@ function TrainingInfoGuidelineButton({
5716
7137
  DotNavigation,
5717
7138
  DownloadCard,
5718
7139
  DynamicForm,
7140
+ DynamicFormEditor,
5719
7141
  DynamicFormField,
5720
7142
  DynamicFormResponseItem,
5721
7143
  ExpandTable,