adp-web-components 0.1.77 → 0.1.79

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 (299) hide show
  1. package/dist/cjs/dead-stock-lookup_3.cjs.entry.js +11 -11
  2. package/dist/cjs/decode-time-offset-CY6JVxX3.js +37 -0
  3. package/dist/cjs/flexible-container.cjs.entry.js +1 -1
  4. package/dist/cjs/form-checkbox.cjs.entry.js +4 -4
  5. package/dist/cjs/form-date-picker.cjs.entry.js +1 -1
  6. package/dist/cjs/form-dialog_13.cjs.entry.js +1351 -0
  7. package/dist/cjs/{form-input-C3gQ_Noj.js → form-input-DH-U4kEM.js} +8 -6
  8. package/dist/cjs/form-input_4.cjs.entry.js +15 -18
  9. package/dist/cjs/form-switch.cjs.entry.js +5 -5
  10. package/dist/cjs/form-time-picker.cjs.entry.js +6 -6
  11. package/dist/cjs/general-form.cjs.entry.js +83 -0
  12. package/dist/cjs/general-inquiry-form.cjs.entry.js +19 -19
  13. package/dist/cjs/{get-language-from-url-Bqqqxz28.js → get-language-from-url-Cr3n1fd0.js} +13 -4
  14. package/dist/cjs/{get-local-language-BAmoMEw4.js → get-local-language-Ch0JsFp-.js} +2 -2
  15. package/dist/cjs/information-table.cjs.entry.js +1 -1
  16. package/dist/{esm/index-BILW0yP6.js → cjs/loader-icon-j5dMQ4bN.js} +16 -1
  17. package/dist/cjs/loader.cjs.js +1 -1
  18. package/dist/cjs/manufacturer-part-lookup.cjs.entry.js +6 -6
  19. package/dist/cjs/part-lookup.cjs.entry.js +5 -5
  20. package/dist/cjs/{loader-icon-OQu1-3ya.js → phone-validator-BUa89UAk.js} +23 -22
  21. package/dist/cjs/service-booking-form.cjs.entry.js +19 -19
  22. package/dist/cjs/shift-checkbox.cjs.entry.js +1 -1
  23. package/dist/cjs/shift-components.cjs.js +1 -1
  24. package/dist/cjs/shift-switch.cjs.entry.js +1 -1
  25. package/dist/cjs/shift-tab-content.cjs.entry.js +1 -1
  26. package/dist/cjs/shift-tabs_2.cjs.entry.js +9 -9
  27. package/dist/cjs/ssc-lookup-form.cjs.entry.js +19 -19
  28. package/dist/cjs/{state-object-9UAuyk6N.js → state-object-DY2MVbpe.js} +21 -9
  29. package/dist/cjs/test-drive-form.cjs.entry.js +19 -19
  30. package/dist/cjs/{type-BSH0OxyO.js → type-BkehR16K.js} +1 -1
  31. package/dist/cjs/{type-BvWomz0N.js → type-CjTn3Uuy.js} +1 -1
  32. package/dist/cjs/{type-CFTS0FUJ.js → type-DhEJjKzj.js} +1 -1
  33. package/dist/cjs/{types-B3WMBBhs.js → types-DV_cOCRi.js} +18 -0
  34. package/dist/cjs/{validation-DEdJb-KL.js → validation-N-XMdEIM.js} +15 -2
  35. package/dist/cjs/vehicle-accessories_7.cjs.entry.js +17 -17
  36. package/dist/cjs/vehicle-lookup.cjs.entry.js +3 -3
  37. package/dist/cjs/vehicle-quotation-form.cjs.entry.js +17 -17
  38. package/dist/cjs/{white-loader-55klC_ZH.js → white-loader-kSznMo_u.js} +4 -0
  39. package/dist/collection/collection-manifest.json +2 -0
  40. package/dist/collection/components/components/empty.css +1 -1
  41. package/dist/collection/components/components/flexible-container.css +1 -1
  42. package/dist/collection/components/components/information-table.css +1 -1
  43. package/dist/collection/components/components/shift-tab-content.css +1 -1
  44. package/dist/collection/components/components/shift-tabs.css +1 -1
  45. package/dist/collection/components/form-elements/form-file.js +605 -0
  46. package/dist/collection/components/form-elements/form-input.js +2 -2
  47. package/dist/collection/components/form-elements/form-inputs.css +1 -1
  48. package/dist/collection/components/form-elements/form-phone-number.js +2 -2
  49. package/dist/collection/components/form-elements/form-picker-input.js +2 -2
  50. package/dist/collection/components/form-elements/form-select.js +1 -1
  51. package/dist/collection/components/form-elements/form-shadow-input.js +1 -1
  52. package/dist/collection/components/form-elements/form-stepper-control.js +2 -2
  53. package/dist/collection/components/form-elements/form-stepper-submit.js +2 -2
  54. package/dist/collection/components/form-elements/form-stepper.js +1 -1
  55. package/dist/collection/components/form-elements/form-structure-error.js +1 -1
  56. package/dist/collection/components/form-elements/form-submit.js +2 -2
  57. package/dist/collection/components/form-elements/form-switch.js +1 -1
  58. package/dist/collection/components/form-elements/form-text-area.js +2 -2
  59. package/dist/collection/components/form-elements/form-time-picker-legacy.js +5 -5
  60. package/dist/collection/components/form-elements/form-vin-input.js +2 -2
  61. package/dist/collection/components/forms/defaults/mappers.js +13 -1
  62. package/dist/collection/components/forms/defaults/validation.js +9 -1
  63. package/dist/collection/components/forms/general-form.js +490 -0
  64. package/dist/collection/components/forms/general-inquiry.js +2 -2
  65. package/dist/collection/components/forms/service-booking.js +2 -2
  66. package/dist/collection/components/forms/ssc-lookup.js +2 -2
  67. package/dist/collection/components/forms/test-drive.js +2 -2
  68. package/dist/collection/components/forms/vehicle-quotation.js +2 -2
  69. package/dist/collection/components/part-lookup/dead-stock-lookup.css +1 -1
  70. package/dist/collection/components/part-lookup/dead-stock-lookup.js +2 -2
  71. package/dist/collection/components/part-lookup/distributor-lookup.css +1 -1
  72. package/dist/collection/components/part-lookup/distributor-lookup.js +2 -2
  73. package/dist/collection/components/part-lookup/manufacturer-lookup.css +1 -1
  74. package/dist/collection/components/part-lookup/manufacturer-part-lookup.css +1 -1
  75. package/dist/collection/components/part-lookup/manufacturer-part-lookup.js +1 -1
  76. package/dist/collection/components/part-lookup/part-lookup.css +1 -1
  77. package/dist/collection/components/vehicle-lookup/vehicle-accessories.js +2 -2
  78. package/dist/collection/components/vehicle-lookup/vehicle-claimable-items.js +4 -4
  79. package/dist/collection/components/vehicle-lookup/vehicle-item-claim-form.js +8 -8
  80. package/dist/collection/components/vehicle-lookup/vehicle-sale-information.js +2 -2
  81. package/dist/collection/components/vehicle-lookup/vehicle-service-history.js +1 -1
  82. package/dist/collection/components/vehicle-lookup/vehicle-specification.js +1 -1
  83. package/dist/collection/components/vehicle-lookup/vehicle-warranty-details.js +4 -4
  84. package/dist/collection/components/vin-extractor/vin-extractor.js +1 -1
  85. package/dist/collection/features/form-hook/form-hook.js +13 -4
  86. package/dist/collection/features/form-hook/functions.js +17 -4
  87. package/dist/collection/features/form-hook/inputs/form-input.js +7 -5
  88. package/dist/components/dead-stock-lookup.js +1 -1
  89. package/dist/components/distributor-lookup.js +1 -1
  90. package/dist/components/flexible-container.js +1 -1
  91. package/dist/components/form-checkbox.js +1 -1
  92. package/dist/components/form-date-picker.js +1 -1
  93. package/dist/components/form-dialog.js +1 -1
  94. package/dist/components/form-file.d.ts +11 -0
  95. package/dist/components/form-file.js +5 -0
  96. package/dist/components/form-input-preview.js +1 -1
  97. package/dist/components/form-input.js +1 -1
  98. package/dist/components/form-phone-number.js +1 -1
  99. package/dist/components/form-picker-input.js +1 -1
  100. package/dist/components/form-select.js +1 -1
  101. package/dist/components/form-shadow-input.js +1 -1
  102. package/dist/components/form-stepper-control.js +1 -1
  103. package/dist/components/form-stepper-submit.js +1 -1
  104. package/dist/components/form-stepper.js +1 -1
  105. package/dist/components/form-structure-error.js +1 -1
  106. package/dist/components/form-structure.js +1 -1
  107. package/dist/components/form-submit.js +1 -1
  108. package/dist/components/form-switch.js +1 -1
  109. package/dist/components/form-text-area.js +1 -1
  110. package/dist/components/form-time-picker.js +1 -1
  111. package/dist/components/form-vin-input.js +1 -1
  112. package/dist/components/general-form.d.ts +11 -0
  113. package/dist/components/general-form.js +5 -0
  114. package/dist/components/general-inquiry-form.js +1 -1
  115. package/dist/components/information-table.js +1 -1
  116. package/dist/components/manufacturer-lookup.js +1 -1
  117. package/dist/components/manufacturer-part-lookup.js +1 -1
  118. package/dist/components/{p-7EgXGKIp.js → p-7Ml46qau.js} +1 -1
  119. package/dist/components/{p-B9DO0698.js → p-B-MZjoBg.js} +1 -1
  120. package/dist/components/{p-pM1_gpUu.js → p-B-XBWavF.js} +1 -1
  121. package/dist/components/p-B14TvlWp.js +5 -0
  122. package/dist/components/p-B1HbKT92.js +5 -0
  123. package/dist/components/p-B20yJV8N.js +5 -0
  124. package/dist/components/{p-CnU-FAvr.js → p-B74EVzB0.js} +1 -1
  125. package/dist/components/p-B882WrlQ.js +5 -0
  126. package/dist/components/{p-27kjA_Yu.js → p-BLhi8bD5.js} +1 -1
  127. package/dist/components/p-BN3IFAWI.js +5 -0
  128. package/dist/components/{p-C34ZMIUx.js → p-BWfCJC3Q.js} +1 -1
  129. package/dist/components/p-BeL46S5b.js +5 -0
  130. package/dist/components/p-Bsnu7u9K.js +5 -0
  131. package/dist/components/{p-CKmHT-QE.js → p-BxeKiQ5h.js} +1 -1
  132. package/dist/components/p-CEnsN9BF.js +5 -0
  133. package/dist/components/{p-CRhdQvF0.js → p-COS-bXsj.js} +1 -1
  134. package/dist/components/{p-Bbn0Tw-8.js → p-CQSAEcTB.js} +1 -1
  135. package/dist/components/{p-DLXbMIN9.js → p-Ch14UUZ8.js} +1 -1
  136. package/dist/components/{p-DAqyVen6.js → p-CjrMk4Te.js} +1 -1
  137. package/dist/components/{p-Bw_VvuFc.js → p-ClKZfnwN.js} +1 -1
  138. package/dist/components/p-D0oHH_yi.js +5 -0
  139. package/dist/components/{p-CYyIlZJC.js → p-D7IQ_tmq.js} +1 -1
  140. package/dist/components/{p-BmyNDE_E.js → p-DATl4ttx.js} +1 -1
  141. package/dist/components/{p-CWpqw5J1.js → p-DD8S-FqN.js} +1 -1
  142. package/dist/components/p-DIx4B8Yb.js +5 -0
  143. package/dist/components/p-DN4c_zdE.js +5 -0
  144. package/dist/components/p-DQqF8boi.js +5 -0
  145. package/dist/components/p-DSTKQdoW.js +5 -0
  146. package/dist/components/p-DT2OVZtH.js +5 -0
  147. package/dist/components/p-DY9gBU2J.js +5 -0
  148. package/dist/components/p-DldJIun-.js +5 -0
  149. package/dist/components/{p-H7Rx-uvh.js → p-DndpWsL0.js} +1 -1
  150. package/dist/components/p-DwyZCgYl.js +5 -0
  151. package/dist/components/p-JSG4fAIl.js +5 -0
  152. package/dist/components/{p-BG1Acvil.js → p-LsPt2IQQ.js} +1 -1
  153. package/dist/components/{p-DJaWpqrV.js → p-MJwr71KB.js} +1 -1
  154. package/dist/components/p-MdiEjk1X.js +5 -0
  155. package/dist/{shift-components/p-CWP4hZcw.js → components/p-YQJevg3-.js} +1 -1
  156. package/dist/components/p-aHqL2KKd.js +5 -0
  157. package/dist/components/{p--puhRiiY.js → p-aMPZ6-pL.js} +1 -1
  158. package/dist/components/{p-CIQ6QH_J.js → p-pckxVoM8.js} +1 -1
  159. package/dist/components/p-rvbbkr0i.js +5 -0
  160. package/dist/components/{p-BlA4goTb.js → p-uy_bFOsR.js} +1 -1
  161. package/dist/components/p-yQwcy8rT.js +5 -0
  162. package/dist/components/part-lookup.js +1 -1
  163. package/dist/components/service-booking-form.js +1 -1
  164. package/dist/components/shift-accordion.js +1 -1
  165. package/dist/components/shift-checkbox.js +1 -1
  166. package/dist/components/shift-slider.js +1 -1
  167. package/dist/components/shift-switch.js +1 -1
  168. package/dist/components/shift-tab-content.js +1 -1
  169. package/dist/components/shift-tabs.js +1 -1
  170. package/dist/components/ssc-lookup-form.js +1 -1
  171. package/dist/components/test-drive-form.js +1 -1
  172. package/dist/components/vehicle-accessories.js +1 -1
  173. package/dist/components/vehicle-claimable-items.js +1 -1
  174. package/dist/components/vehicle-item-claim-form.js +1 -1
  175. package/dist/components/vehicle-lookup.js +1 -1
  176. package/dist/components/vehicle-paint-thickness.js +1 -1
  177. package/dist/components/vehicle-quotation-form.js +1 -1
  178. package/dist/components/vehicle-sale-information.js +1 -1
  179. package/dist/components/vehicle-service-history.js +1 -1
  180. package/dist/components/vehicle-specification.js +1 -1
  181. package/dist/components/vehicle-warranty-details.js +1 -1
  182. package/dist/components/vin-extractor.js +1 -1
  183. package/dist/esm/dead-stock-lookup_3.entry.js +11 -11
  184. package/dist/esm/{decode-time-offset-Cfi43WoV.js → decode-time-offset-DFZOybyr.js} +1 -1
  185. package/dist/esm/flexible-container.entry.js +1 -1
  186. package/dist/esm/form-checkbox.entry.js +4 -4
  187. package/dist/esm/form-date-picker.entry.js +1 -1
  188. package/dist/esm/form-dialog_13.entry.js +1337 -0
  189. package/dist/esm/{form-input-C5O2h7ti.js → form-input-DKjuSVBS.js} +8 -6
  190. package/dist/esm/form-input_4.entry.js +14 -17
  191. package/dist/esm/form-switch.entry.js +5 -5
  192. package/dist/esm/form-time-picker.entry.js +6 -6
  193. package/dist/esm/general-form.entry.js +81 -0
  194. package/dist/esm/general-inquiry-form.entry.js +11 -11
  195. package/dist/esm/{get-language-from-url-Ba709Um1.js → get-language-from-url-OJporG8v.js} +13 -4
  196. package/dist/esm/{get-local-language-BOhWqeWJ.js → get-local-language-Ce9BLJNB.js} +2 -2
  197. package/dist/esm/information-table.entry.js +1 -1
  198. package/dist/{cjs/index-D5c513Xn.js → esm/loader-icon-DM4Vm5gX.js} +12 -2
  199. package/dist/esm/loader.js +1 -1
  200. package/dist/esm/manufacturer-part-lookup.entry.js +6 -6
  201. package/dist/esm/part-lookup.entry.js +5 -5
  202. package/dist/esm/{loader-icon-Dsip-ysn.js → phone-validator-DuWpgjxr.js} +22 -20
  203. package/dist/esm/service-booking-form.entry.js +10 -10
  204. package/dist/esm/shift-checkbox.entry.js +1 -1
  205. package/dist/esm/shift-components.js +1 -1
  206. package/dist/esm/shift-switch.entry.js +1 -1
  207. package/dist/esm/shift-tab-content.entry.js +1 -1
  208. package/dist/esm/shift-tabs_2.entry.js +9 -9
  209. package/dist/esm/ssc-lookup-form.entry.js +10 -10
  210. package/dist/esm/{state-object-DAThqvht.js → state-object-BYbNPk-P.js} +17 -5
  211. package/dist/esm/test-drive-form.entry.js +10 -10
  212. package/dist/esm/{type-DDlXvsYW.js → type-8o_W9bXK.js} +1 -1
  213. package/dist/esm/{type-Dw5qeiT3.js → type-C2SCytyp.js} +1 -1
  214. package/dist/esm/{type-DwvmWsdz.js → type-DCLi-Gh3.js} +1 -1
  215. package/dist/esm/{types-CWP4hZcw.js → types-BDhR4pDq.js} +18 -1
  216. package/dist/esm/{validation-iKTmTjB0.js → validation-CjIBF497.js} +11 -3
  217. package/dist/esm/vehicle-accessories_7.entry.js +17 -17
  218. package/dist/esm/vehicle-lookup.entry.js +3 -3
  219. package/dist/esm/vehicle-quotation-form.entry.js +7 -7
  220. package/dist/esm/{white-loader-BpnYQ3A6.js → white-loader-CG4JPVdv.js} +4 -1
  221. package/dist/shift-components/{p-76fe6d18.entry.js → p-0174f4a6.entry.js} +1 -1
  222. package/dist/shift-components/{p-2fe3538e.entry.js → p-0ea039a0.entry.js} +1 -1
  223. package/dist/shift-components/{p-ca99ff7e.entry.js → p-19b5c5da.entry.js} +1 -1
  224. package/dist/shift-components/{p-389fbad6.entry.js → p-30d616e8.entry.js} +1 -1
  225. package/dist/shift-components/p-37bbc653.entry.js +5 -0
  226. package/dist/shift-components/{p-6b9cc078.entry.js → p-39128baf.entry.js} +1 -1
  227. package/dist/shift-components/p-3c5f015c.entry.js +5 -0
  228. package/dist/shift-components/{p-0d80679a.entry.js → p-45232ee9.entry.js} +1 -1
  229. package/dist/shift-components/p-600141c0.entry.js +5 -0
  230. package/dist/shift-components/p-6b9c8723.entry.js +5 -0
  231. package/dist/shift-components/p-6fca3b48.entry.js +5 -0
  232. package/dist/shift-components/p-74392ec2.entry.js +5 -0
  233. package/dist/shift-components/p-7PtHUjhE.js +5 -0
  234. package/dist/shift-components/{p-398ca2dd.entry.js → p-7ce7efb2.entry.js} +1 -1
  235. package/dist/shift-components/{p-f4914abc.entry.js → p-8049016c.entry.js} +1 -1
  236. package/dist/shift-components/{p-ad9a34aa.entry.js → p-8c4579f1.entry.js} +1 -1
  237. package/dist/shift-components/{p-8281a1ba.entry.js → p-9270fdea.entry.js} +1 -1
  238. package/dist/shift-components/p-95496452.entry.js +5 -0
  239. package/dist/shift-components/{p-69e9751f.entry.js → p-971f2432.entry.js} +1 -1
  240. package/dist/{components/p-DkIqSrtn.js → shift-components/p-BDhR4pDq.js} +1 -1
  241. package/dist/shift-components/p-BffuX06w.js +5 -0
  242. package/dist/shift-components/{p-Birh6Z1w.js → p-BrJd1o0-.js} +1 -1
  243. package/dist/shift-components/{p-D6pA5cwZ.js → p-CCt3VwsZ.js} +1 -1
  244. package/dist/shift-components/{p-XyQhTm0V.js → p-Cv7m_MLQ.js} +1 -1
  245. package/dist/shift-components/p-D-IGTVAo.js +5 -0
  246. package/dist/shift-components/p-Dfy8LG6W.js +5 -0
  247. package/dist/shift-components/p-DgArUiaY.js +5 -0
  248. package/dist/shift-components/{p-DJSST74z.js → p-DyLtxN1c.js} +1 -1
  249. package/dist/shift-components/{p-72fb32e6.entry.js → p-b58252b3.entry.js} +1 -1
  250. package/dist/shift-components/{p-61725969.entry.js → p-b73dc0eb.entry.js} +1 -1
  251. package/dist/shift-components/{p-969047f1.entry.js → p-d9491f0a.entry.js} +1 -1
  252. package/dist/shift-components/{p-48622d1c.entry.js → p-ea04ef58.entry.js} +1 -1
  253. package/dist/shift-components/{p-055c46ae.entry.js → p-fd8cce34.entry.js} +1 -1
  254. package/dist/shift-components/{p-BVrQRz1r.js → p-nGZ6Nphz.js} +1 -1
  255. package/dist/shift-components/p-yjI-v4gh.js +5 -0
  256. package/dist/shift-components/p-zqc-VRCh.js +5 -0
  257. package/dist/shift-components/shift-components.esm.js +1 -1
  258. package/dist/types/components/form-elements/form-file.d.ts +51 -0
  259. package/dist/types/components/forms/defaults/mappers.d.ts +10 -0
  260. package/dist/types/components/forms/defaults/validation.d.ts +6 -0
  261. package/dist/types/components/forms/general-form.d.ts +40 -0
  262. package/dist/types/components.d.ts +136 -0
  263. package/dist/types/features/form-hook/form-hook.d.ts +2 -1
  264. package/package.json +1 -1
  265. package/dist/cjs/decode-time-offset-DqzP0mck.js +0 -37
  266. package/dist/cjs/form-dialog_12.cjs.entry.js +0 -1092
  267. package/dist/components/p-1rMNgTmN.js +0 -5
  268. package/dist/components/p-B4O925yv.js +0 -5
  269. package/dist/components/p-B7jki48I.js +0 -5
  270. package/dist/components/p-B9WVNn55.js +0 -5
  271. package/dist/components/p-BAXJUlT3.js +0 -5
  272. package/dist/components/p-BqEpcTHM.js +0 -5
  273. package/dist/components/p-BrYiFmwV.js +0 -5
  274. package/dist/components/p-Btio2HOp.js +0 -5
  275. package/dist/components/p-CGTnKwGx.js +0 -5
  276. package/dist/components/p-CHFEweyc.js +0 -5
  277. package/dist/components/p-CIpGuibo.js +0 -5
  278. package/dist/components/p-CsuuEdZV.js +0 -5
  279. package/dist/components/p-DBiatJcb.js +0 -5
  280. package/dist/components/p-DXTNpTRN.js +0 -5
  281. package/dist/components/p-RgH4pvBx.js +0 -5
  282. package/dist/components/p-aU8QeNSR.js +0 -5
  283. package/dist/components/p-bj5xjS7q.js +0 -5
  284. package/dist/components/p-oOwj68Rk.js +0 -5
  285. package/dist/components/p-rFExZsrl.js +0 -5
  286. package/dist/esm/form-dialog_12.entry.js +0 -1079
  287. package/dist/shift-components/p-56cb9747.entry.js +0 -5
  288. package/dist/shift-components/p-84b2e4ef.entry.js +0 -5
  289. package/dist/shift-components/p-9df9af1a.entry.js +0 -5
  290. package/dist/shift-components/p-BAltXAam.js +0 -5
  291. package/dist/shift-components/p-BILW0yP6.js +0 -5
  292. package/dist/shift-components/p-Bp-HDfJB.js +0 -5
  293. package/dist/shift-components/p-CK-8T86o.js +0 -5
  294. package/dist/shift-components/p-CfAzoJ2t.js +0 -5
  295. package/dist/shift-components/p-Cfs-79nK.js +0 -5
  296. package/dist/shift-components/p-CyHfimfF.js +0 -5
  297. package/dist/shift-components/p-ae6d8792.entry.js +0 -5
  298. package/dist/shift-components/p-c0db198d.entry.js +0 -5
  299. package/dist/shift-components/p-d5fed00e.entry.js +0 -5
@@ -0,0 +1,605 @@
1
+ /*!
2
+ * Built by ShiftSoftware
3
+ * Copyright (c)
4
+ */
5
+ import { Host, h } from "@stencil/core";
6
+ import cn from "../../global/lib/cn";
7
+ import { getInputLocalization } from "../../features/form-hook/index";
8
+ import { FormInputLabel } from "./components/form-input-label";
9
+ import { FormErrorMessage } from "./components/form-error-message";
10
+ import { LoaderIcon } from "../../global/assets/loader-icon";
11
+ import { TickIcon } from "../../global/assets/tick-icon";
12
+ import { mixed } from "yup";
13
+ import { meta, format, size, require, max } from "../forms/defaults/validation";
14
+ const partKeyPrefix = 'form-file-';
15
+ export class FormFile {
16
+ constructor() {
17
+ this.maxUpload = 1;
18
+ this.signMethod = 'POST';
19
+ this.localization = {};
20
+ this.fileName = '';
21
+ this.uploadState = 'idle';
22
+ this.failedText = '';
23
+ this.controlsFormLoading = false;
24
+ this.wasFormLoading = false;
25
+ this.openFilePicker = () => {
26
+ if (!this.fileInput)
27
+ return;
28
+ this.reset(); // clears old file + state
29
+ this.fileInput.click();
30
+ };
31
+ this.handleFileChange = async (event) => {
32
+ const target = event.target;
33
+ const fileList = Array.from((target === null || target === void 0 ? void 0 : target.files) || []);
34
+ if (!fileList.length)
35
+ return;
36
+ const limited = typeof this.maxUpload === 'number' && this.maxUpload > 0 ? fileList.slice(0, this.maxUpload) : fileList;
37
+ this.fileName = limited.map(f => f.name).join(', ');
38
+ this.failedText = '';
39
+ this.uploadState = 'uploading';
40
+ this.startGlobalLoading();
41
+ const dataTransfer = new DataTransfer();
42
+ try {
43
+ if (this.signUrl) {
44
+ const signedFiles = await this.requestSignedUpload(limited);
45
+ this.form.pendingRequests[this.name] = async () => await this.uploadToSignedUrl(limited, signedFiles);
46
+ }
47
+ this.uploadState = 'success';
48
+ this.syncValue([...limited]);
49
+ limited.forEach(file => dataTransfer.items.add(file));
50
+ target.files = dataTransfer.files;
51
+ }
52
+ catch (error) {
53
+ console.error(error);
54
+ target.files = dataTransfer.files;
55
+ const [locale, language] = this.form.getFormLocale();
56
+ this.uploadState = 'error';
57
+ this.failedText = this.getFailureText(locale, language);
58
+ this.syncValue();
59
+ // @ts-ignore
60
+ if (this.fileInput)
61
+ this.fileInput.value = [];
62
+ }
63
+ finally {
64
+ this.stopGlobalLoading();
65
+ }
66
+ };
67
+ this.validate = () => {
68
+ let validation = mixed().meta(meta(this.name));
69
+ if (this.required) {
70
+ validation = validation.test(require(this.name), require(this.name), (value) => {
71
+ if (!Array.isArray(value))
72
+ return false;
73
+ const count = value.length;
74
+ return count > 0;
75
+ });
76
+ }
77
+ else {
78
+ validation = validation.optional();
79
+ }
80
+ if (this.maxUpload && this.maxUpload > 0) {
81
+ validation = validation.test(max(this.name), max(this.name), (value) => {
82
+ if (!Array.isArray(value))
83
+ return true;
84
+ const count = value.length;
85
+ return count <= this.maxUpload;
86
+ });
87
+ }
88
+ if (this.maxSize) {
89
+ validation = validation.test(size(this.name), size(this.name), (value) => {
90
+ if (!Array.isArray(value))
91
+ return true;
92
+ if (!value.length)
93
+ return true;
94
+ const maxSizeInBytes = this.maxSize * 1024 * 1024;
95
+ return value.every(f => f.size <= maxSizeInBytes);
96
+ });
97
+ }
98
+ if (this.accept) {
99
+ validation = validation.test(format(this.name), format(this.name), (value) => {
100
+ if (!Array.isArray(value))
101
+ return true;
102
+ if (!value.length)
103
+ return true;
104
+ return value.every(f => this.matchesAccept(f));
105
+ });
106
+ }
107
+ return validation;
108
+ };
109
+ }
110
+ async componentWillLoad() {
111
+ this.form.subscribe(this.name, this);
112
+ }
113
+ componentDidLoad() {
114
+ this.fileInput = this.el.querySelector(`.${partKeyPrefix}${this.name}-input`);
115
+ }
116
+ async disconnectedCallback() {
117
+ this.stopGlobalLoading();
118
+ this.form.unsubscribe(this.name);
119
+ }
120
+ reset() {
121
+ this.stopGlobalLoading();
122
+ if (this.fileInput)
123
+ this.fileInput.value = '';
124
+ this.fileName = '';
125
+ this.uploadState = 'idle';
126
+ }
127
+ startGlobalLoading() {
128
+ var _a, _b, _c, _d;
129
+ if (!((_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.setIsLoading) || this.controlsFormLoading)
130
+ return;
131
+ this.wasFormLoading = !!((_d = (_c = this.form) === null || _c === void 0 ? void 0 : _c.context) === null || _d === void 0 ? void 0 : _d.isLoading);
132
+ this.controlsFormLoading = true;
133
+ this.form.context.setIsLoading(true);
134
+ }
135
+ stopGlobalLoading() {
136
+ var _a, _b;
137
+ if (!this.controlsFormLoading || !((_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.setIsLoading))
138
+ return;
139
+ this.form.context.setIsLoading(this.wasFormLoading);
140
+ this.controlsFormLoading = false;
141
+ }
142
+ getLoadingText(locale, language) {
143
+ var _a, _b, _c;
144
+ return ((_b = (_a = this.localization) === null || _a === void 0 ? void 0 : _a[language]) === null || _b === void 0 ? void 0 : _b.uploading) || ((_c = locale === null || locale === void 0 ? void 0 : locale.sharedFormLocales) === null || _c === void 0 ? void 0 : _c.loading) || 'Uploading...';
145
+ }
146
+ getUploadText(locale, language, placeholder) {
147
+ var _a, _b, _c;
148
+ return ((_b = (_a = this.localization) === null || _a === void 0 ? void 0 : _a[language]) === null || _b === void 0 ? void 0 : _b.upload) || placeholder || ((_c = locale === null || locale === void 0 ? void 0 : locale.sharedFormLocales) === null || _c === void 0 ? void 0 : _c.uploadLabel) || 'Upload file';
149
+ }
150
+ getFailureText(locale, language) {
151
+ var _a, _b, _c, _d;
152
+ return ((_b = (_a = this.localization) === null || _a === void 0 ? void 0 : _a[language]) === null || _b === void 0 ? void 0 : _b.failure) || ((_d = (_c = locale === null || locale === void 0 ? void 0 : locale.sharedFormLocales) === null || _c === void 0 ? void 0 : _c.errors) === null || _d === void 0 ? void 0 : _d.wildCard) || 'Upload failed. Please try again.';
153
+ }
154
+ matchesAccept(value) {
155
+ var _a;
156
+ if (!this.accept)
157
+ return true;
158
+ const rules = this.accept
159
+ .split(',')
160
+ .map(rule => rule.trim())
161
+ .filter(Boolean)
162
+ .map(rule => rule.toLowerCase());
163
+ if (!rules.length)
164
+ return true;
165
+ const fileName = typeof value === 'string' ? value : (value === null || value === void 0 ? void 0 : value.name) || '';
166
+ const mime = typeof value === 'string' ? '' : ((_a = value === null || value === void 0 ? void 0 : value.type) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '';
167
+ const ext = fileName.includes('.') ? fileName.slice(fileName.lastIndexOf('.')).toLowerCase() : '';
168
+ return rules.some(rule => {
169
+ if (rule === '*/*')
170
+ return true;
171
+ if (rule.endsWith('/*'))
172
+ return mime ? mime.startsWith(rule.replace('/*', '/')) : false;
173
+ if (rule.startsWith('.'))
174
+ return ext === rule;
175
+ if (rule.includes('/'))
176
+ return mime ? mime === rule : false;
177
+ return true;
178
+ });
179
+ }
180
+ syncValue(value) {
181
+ var _a, _b;
182
+ const resolved = (value === null || value === void 0 ? void 0 : value[0]) || '';
183
+ this.fileName = typeof resolved === 'string' ? resolved : resolved === null || resolved === void 0 ? void 0 : resolved.name;
184
+ // @ts-ignore
185
+ (_a = this.form) === null || _a === void 0 ? void 0 : _a.validateForm(this.name, !!value ? value : [], false);
186
+ (_b = this.form) === null || _b === void 0 ? void 0 : _b.rerender({ inputName: this.name, rerenderForm: true });
187
+ }
188
+ async requestSignedUpload(files) {
189
+ var _a, _b, _c;
190
+ const formHeaders = { 'Content-Type': 'application/json' };
191
+ const recaptchaKey = (_c = (_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.context.structure) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.recaptchaKey;
192
+ if (grecaptcha && recaptchaKey) {
193
+ const token = await grecaptcha.execute(recaptchaKey, { action: 'submit' });
194
+ formHeaders['Recaptcha-Token'] = token;
195
+ }
196
+ const payload = files === null || files === void 0 ? void 0 : files.map(file => ({
197
+ name: file.name,
198
+ blob: this.signPrefix ? `${this.signPrefix}${file.name}` : file.name,
199
+ accountName: this.accountName,
200
+ containerName: this.containerName,
201
+ contentType: null,
202
+ size: file === null || file === void 0 ? void 0 : file.size,
203
+ width: null,
204
+ height: null,
205
+ }));
206
+ const response = await fetch(this.signUrl, {
207
+ headers: formHeaders,
208
+ body: JSON.stringify(payload),
209
+ method: this.signMethod || 'POST',
210
+ });
211
+ if (!response.ok)
212
+ throw new Error('Failed to get signed upload URL');
213
+ const json = await response.json();
214
+ const list = (json === null || json === void 0 ? void 0 : json.entity) || (json === null || json === void 0 ? void 0 : json.Entity) || json;
215
+ const arr = Array.isArray(list) ? list : Array.isArray(json) ? json : [];
216
+ const signedFiles = arr.map((file, idx) => {
217
+ var _a;
218
+ // @ts-ignore
219
+ files[idx].blob = (file === null || file === void 0 ? void 0 : file.Blob) || (file === null || file === void 0 ? void 0 : file.blob);
220
+ // @ts-ignore
221
+ files[idx].contentType = (_a = files[idx]) === null || _a === void 0 ? void 0 : _a.type;
222
+ // @ts-ignore
223
+ files[idx].url = file.Url || file.url;
224
+ return {
225
+ uploadUrl: file.url || file.Url || file.uploadUrl || file.UploadUrl,
226
+ headers: file.headers || file.Headers || {},
227
+ key: file.blob || file.Blob || file.path || file.Path || file.key || file.Key || (file === null || file === void 0 ? void 0 : file.name),
228
+ };
229
+ });
230
+ return signedFiles;
231
+ }
232
+ async uploadToSignedUrl(files, signedFiles) {
233
+ files === null || files === void 0 ? void 0 : files.forEach(async (file, idx) => {
234
+ var _a, _b;
235
+ try {
236
+ const response = await fetch((_a = signedFiles === null || signedFiles === void 0 ? void 0 : signedFiles[idx]) === null || _a === void 0 ? void 0 : _a.uploadUrl, {
237
+ method: 'PUT',
238
+ headers: Object.assign({ 'Content-Type': file.type || 'application/octet-stream', 'x-ms-blob-type': 'BlockBlob' }, (_b = signedFiles === null || signedFiles === void 0 ? void 0 : signedFiles[idx]) === null || _b === void 0 ? void 0 : _b.headers),
239
+ body: file,
240
+ });
241
+ if (!response.ok)
242
+ console.error(response);
243
+ }
244
+ catch (error) {
245
+ console.error(error);
246
+ }
247
+ });
248
+ }
249
+ render() {
250
+ const { disabled, isRequired, meta, isError, errorMessage } = this.form.getInputState(this.name);
251
+ const [locale, language] = this.form.getFormLocale();
252
+ const { label, placeholder, errorTextMessage } = getInputLocalization(this, meta, errorMessage);
253
+ const disableInput = disabled || this.isLoading || this.uploadState === 'uploading' || this.isDisabled;
254
+ const showSpinner = this.uploadState === 'uploading';
255
+ const displayText = this.uploadState === 'success' && this.fileName ? this.fileName : this.getUploadText(locale, language, placeholder || (meta === null || meta === void 0 ? void 0 : meta.placeholder));
256
+ const isErrorState = this.uploadState !== 'uploading' && (!!this.failedText || isError);
257
+ // @ts-ignore
258
+ window === null || window === void 0 ? void 0 : window.s = this.form;
259
+ return (h(Host, { key: '9facada9d0ed7dbf6a0ec415cad4705fa17e1465' }, h("label", { key: '51fe19cd81e9564082186288c641325c79db4456', part: `form-file ${this.name}`, id: this.wrapperId, class: cn('form-input-label-container', this.wrapperClass, { disabled: disableInput }) }, h(FormInputLabel, { key: 'ef628d0f50e967c41ecee5777ce591d47daa17ee', name: this.name, isRequired: isRequired, label: label }), h("div", { key: '525ef112c381abeaff35cde8d65115779ad2c076', part: `${this.name}-container form-input-container`, class: cn('form-input-container') }, h("input", { key: '9a2a13a18be3c951cafcbf0492df7886d6802d55', type: "file", name: this.name, accept: this.accept, disabled: disableInput, multiple: this.maxUpload > 1, onChange: this.handleFileChange, part: `${this.name}-file-input form-file-input`, class: cn('form-file-input', `${partKeyPrefix}${this.name}-input`) }), h("button", { key: 'c25e8ba7d45e4b21de18937d42fcbaf72a7bd66c', type: "button", disabled: disableInput, onClick: this.openFilePicker, part: `${this.name}-file-trigger form-file-trigger form-input`, title: showSpinner ? this.getLoadingText(locale, language) : displayText, class: cn('form-file-trigger form-input-style', {
260
+ 'form-input-error-style': isErrorState,
261
+ 'form-file-trigger-loading': showSpinner,
262
+ 'form-file-trigger-success': this.uploadState === 'success',
263
+ }) }, h("span", { key: 'aefb886efec1d8d875bda5cc639ffbe6d54852de', part: `${this.name}-file-text form-file-text`, class: "form-file-text" }, showSpinner ? this.getLoadingText(locale, language) : displayText), h("span", { key: '226d609d0cd33caae475a3fdce7802e616139023', part: `${this.name}-file-icon form-file-icon`, class: "form-file-icon" }, showSpinner && h(LoaderIcon, { key: 'c93b6d9471f5554d039f5e9e7d5d1b7bbbe6c2ce', class: "form-file-spinner" }), !showSpinner && this.uploadState === 'success' && h(TickIcon, { key: 'e948d24bfe6fdc4d70d72ffde022ee7e328b5a01', class: "form-file-success-icon" })))), h(FormErrorMessage, { key: 'a0e61561f2c272b6ef0b49ee2b29f6905b2325a4', name: this.name, isError: isErrorState, errorMessage: this.failedText || errorTextMessage }))));
264
+ }
265
+ static get is() { return "form-file"; }
266
+ static get originalStyleUrls() {
267
+ return {
268
+ "$": ["form-inputs.css"]
269
+ };
270
+ }
271
+ static get styleUrls() {
272
+ return {
273
+ "$": ["form-inputs.css"]
274
+ };
275
+ }
276
+ static get properties() {
277
+ return {
278
+ "name": {
279
+ "type": "string",
280
+ "attribute": "name",
281
+ "mutable": false,
282
+ "complexType": {
283
+ "original": "string",
284
+ "resolved": "string",
285
+ "references": {}
286
+ },
287
+ "required": false,
288
+ "optional": false,
289
+ "docs": {
290
+ "tags": [],
291
+ "text": ""
292
+ },
293
+ "getter": false,
294
+ "setter": false,
295
+ "reflect": false
296
+ },
297
+ "wrapperId": {
298
+ "type": "string",
299
+ "attribute": "wrapper-id",
300
+ "mutable": false,
301
+ "complexType": {
302
+ "original": "string",
303
+ "resolved": "string",
304
+ "references": {}
305
+ },
306
+ "required": false,
307
+ "optional": false,
308
+ "docs": {
309
+ "tags": [],
310
+ "text": ""
311
+ },
312
+ "getter": false,
313
+ "setter": false,
314
+ "reflect": false
315
+ },
316
+ "form": {
317
+ "type": "unknown",
318
+ "attribute": "form",
319
+ "mutable": false,
320
+ "complexType": {
321
+ "original": "FormHook<any>",
322
+ "resolved": "FormHook<any>",
323
+ "references": {
324
+ "FormHook": {
325
+ "location": "import",
326
+ "path": "~features/form-hook",
327
+ "id": "src/features/form-hook/index.ts::FormHook"
328
+ }
329
+ }
330
+ },
331
+ "required": false,
332
+ "optional": false,
333
+ "docs": {
334
+ "tags": [],
335
+ "text": ""
336
+ },
337
+ "getter": false,
338
+ "setter": false
339
+ },
340
+ "isLoading": {
341
+ "type": "boolean",
342
+ "attribute": "is-loading",
343
+ "mutable": false,
344
+ "complexType": {
345
+ "original": "boolean",
346
+ "resolved": "boolean",
347
+ "references": {}
348
+ },
349
+ "required": false,
350
+ "optional": true,
351
+ "docs": {
352
+ "tags": [],
353
+ "text": ""
354
+ },
355
+ "getter": false,
356
+ "setter": false,
357
+ "reflect": false
358
+ },
359
+ "wrapperClass": {
360
+ "type": "string",
361
+ "attribute": "wrapper-class",
362
+ "mutable": false,
363
+ "complexType": {
364
+ "original": "string",
365
+ "resolved": "string",
366
+ "references": {}
367
+ },
368
+ "required": false,
369
+ "optional": false,
370
+ "docs": {
371
+ "tags": [],
372
+ "text": ""
373
+ },
374
+ "getter": false,
375
+ "setter": false,
376
+ "reflect": false
377
+ },
378
+ "isDisabled": {
379
+ "type": "boolean",
380
+ "attribute": "is-disabled",
381
+ "mutable": false,
382
+ "complexType": {
383
+ "original": "boolean",
384
+ "resolved": "boolean",
385
+ "references": {}
386
+ },
387
+ "required": false,
388
+ "optional": true,
389
+ "docs": {
390
+ "tags": [],
391
+ "text": ""
392
+ },
393
+ "getter": false,
394
+ "setter": false,
395
+ "reflect": false
396
+ },
397
+ "accept": {
398
+ "type": "string",
399
+ "attribute": "accept",
400
+ "mutable": false,
401
+ "complexType": {
402
+ "original": "string",
403
+ "resolved": "string",
404
+ "references": {}
405
+ },
406
+ "required": false,
407
+ "optional": true,
408
+ "docs": {
409
+ "tags": [],
410
+ "text": ""
411
+ },
412
+ "getter": false,
413
+ "setter": false,
414
+ "reflect": false
415
+ },
416
+ "maxSize": {
417
+ "type": "number",
418
+ "attribute": "max-size",
419
+ "mutable": false,
420
+ "complexType": {
421
+ "original": "number",
422
+ "resolved": "number",
423
+ "references": {}
424
+ },
425
+ "required": false,
426
+ "optional": true,
427
+ "docs": {
428
+ "tags": [],
429
+ "text": ""
430
+ },
431
+ "getter": false,
432
+ "setter": false,
433
+ "reflect": false
434
+ },
435
+ "required": {
436
+ "type": "boolean",
437
+ "attribute": "required",
438
+ "mutable": false,
439
+ "complexType": {
440
+ "original": "boolean",
441
+ "resolved": "boolean",
442
+ "references": {}
443
+ },
444
+ "required": false,
445
+ "optional": true,
446
+ "docs": {
447
+ "tags": [],
448
+ "text": ""
449
+ },
450
+ "getter": false,
451
+ "setter": false,
452
+ "reflect": false
453
+ },
454
+ "signUrl": {
455
+ "type": "string",
456
+ "attribute": "sign-url",
457
+ "mutable": false,
458
+ "complexType": {
459
+ "original": "string",
460
+ "resolved": "string",
461
+ "references": {}
462
+ },
463
+ "required": false,
464
+ "optional": true,
465
+ "docs": {
466
+ "tags": [],
467
+ "text": ""
468
+ },
469
+ "getter": false,
470
+ "setter": false,
471
+ "reflect": false
472
+ },
473
+ "maxUpload": {
474
+ "type": "number",
475
+ "attribute": "max-upload",
476
+ "mutable": false,
477
+ "complexType": {
478
+ "original": "number",
479
+ "resolved": "number",
480
+ "references": {}
481
+ },
482
+ "required": false,
483
+ "optional": false,
484
+ "docs": {
485
+ "tags": [],
486
+ "text": ""
487
+ },
488
+ "getter": false,
489
+ "setter": false,
490
+ "reflect": false,
491
+ "defaultValue": "1"
492
+ },
493
+ "signMethod": {
494
+ "type": "string",
495
+ "attribute": "sign-method",
496
+ "mutable": false,
497
+ "complexType": {
498
+ "original": "'POST' | 'PUT'",
499
+ "resolved": "\"POST\" | \"PUT\"",
500
+ "references": {}
501
+ },
502
+ "required": false,
503
+ "optional": false,
504
+ "docs": {
505
+ "tags": [],
506
+ "text": ""
507
+ },
508
+ "getter": false,
509
+ "setter": false,
510
+ "reflect": false,
511
+ "defaultValue": "'POST'"
512
+ },
513
+ "signPrefix": {
514
+ "type": "string",
515
+ "attribute": "sign-prefix",
516
+ "mutable": false,
517
+ "complexType": {
518
+ "original": "string",
519
+ "resolved": "string",
520
+ "references": {}
521
+ },
522
+ "required": false,
523
+ "optional": true,
524
+ "docs": {
525
+ "tags": [],
526
+ "text": ""
527
+ },
528
+ "getter": false,
529
+ "setter": false,
530
+ "reflect": false
531
+ },
532
+ "accountName": {
533
+ "type": "string",
534
+ "attribute": "account-name",
535
+ "mutable": false,
536
+ "complexType": {
537
+ "original": "string",
538
+ "resolved": "string",
539
+ "references": {}
540
+ },
541
+ "required": false,
542
+ "optional": true,
543
+ "docs": {
544
+ "tags": [],
545
+ "text": ""
546
+ },
547
+ "getter": false,
548
+ "setter": false,
549
+ "reflect": false
550
+ },
551
+ "containerName": {
552
+ "type": "string",
553
+ "attribute": "container-name",
554
+ "mutable": false,
555
+ "complexType": {
556
+ "original": "string",
557
+ "resolved": "string",
558
+ "references": {}
559
+ },
560
+ "required": false,
561
+ "optional": true,
562
+ "docs": {
563
+ "tags": [],
564
+ "text": ""
565
+ },
566
+ "getter": false,
567
+ "setter": false,
568
+ "reflect": false
569
+ },
570
+ "localization": {
571
+ "type": "unknown",
572
+ "attribute": "localization",
573
+ "mutable": false,
574
+ "complexType": {
575
+ "original": "FormInputLocalization<{\n uploading?: string;\n upload?: string;\n failure?: string;\n success?: string;\n }>",
576
+ "resolved": "{ [lang: string]: { label?: string; placeholder?: string; require?: string; format?: string; minMessage: string; maxMessage: string; betweenMessage: string; } & { uploading?: string; upload?: string; failure?: string; success?: string; }; }",
577
+ "references": {
578
+ "FormInputLocalization": {
579
+ "location": "import",
580
+ "path": "~features/form-hook",
581
+ "id": "src/features/form-hook/index.ts::FormInputLocalization"
582
+ }
583
+ }
584
+ },
585
+ "required": false,
586
+ "optional": true,
587
+ "docs": {
588
+ "tags": [],
589
+ "text": ""
590
+ },
591
+ "getter": false,
592
+ "setter": false,
593
+ "defaultValue": "{}"
594
+ }
595
+ };
596
+ }
597
+ static get states() {
598
+ return {
599
+ "fileName": {},
600
+ "uploadState": {},
601
+ "failedText": {}
602
+ };
603
+ }
604
+ static get elementRef() { return "el"; }
605
+ }
@@ -63,9 +63,9 @@ export class FormInput {
63
63
  });
64
64
  const renderIcon = () => this.iconAction ? (h("button", { type: "button", disabled: isDisabled, onClick: this.iconAction, part: `${this.name}-icon form-input-icon`, class: iconClass }, this.icon)) : (h("span", { part: `${this.name}-icon form-input-icon`, class: iconClass }, this.icon));
65
65
  const { label, placeholder, errorTextMessage } = getInputLocalization(this, meta, errorMessage);
66
- return (h(Host, { key: 'bdd901d6078d22558a068985a828c5eea73c0ad0' }, h("label", { key: 'a38e8745c82acc96fa078dcdf06812207f3b045f', part: this.name, id: this.wrapperId, class: cn('form-input-label-container', this.wrapperClass, { disabled: isDisabled }) }, h(FormInputLabel, { key: 'a433f6ea6bde71a3c6815e430546edf7874ecf30', isRequired: isRequired, label: label }), h("div", { key: '4c9735e9ec79e024a5945f62989de3ce92b36240', part: `${this.name}-container form-input-container`, class: "form-input-container" }, h(FormInputPrefix, { key: '27ff52f8f0a1be15ef7b97a40c528fad13ed38cb', name: this.name, direction: (_b = locale === null || locale === void 0 ? void 0 : locale.sharedFormLocales) === null || _b === void 0 ? void 0 : _b.direction, prefix: this.inputPrefix }), h("input", Object.assign({ key: 'bef9b9ffa1279af3ec516cb7cd699688bfc16c89', name: this.name, type: this === null || this === void 0 ? void 0 : this.type, disabled: isDisabled, onInput: this.onInputChange, defaultValue: this.formatter ? this.formatter(this.defaultValue || '') : this.defaultValue, part: `${this.name}-input form-input`, placeholder: placeholder || (meta === null || meta === void 0 ? void 0 : meta.placeholder), style: Object.assign(Object.assign({}, (this.prefixWidth ? { [isRtl ? 'paddingRight' : 'paddingLeft']: `${this.prefixWidth}px` } : {})), (this.icon ? { [iconPaddingSide]: '40px' } : {})), class: cn('form-input-style', part, {
66
+ return (h(Host, { key: 'ed5d2212454eab457f361396290da6e8a143027f' }, h("label", { key: '94c82a2b9b0d4c0d1381206a23bf79106325b13e', part: this.name, id: this.wrapperId, class: cn('form-input-label-container', this.wrapperClass, { disabled: isDisabled }) }, h(FormInputLabel, { key: 'fcb1f35c27c7a9211192a38941ec9b843f971fdd', isRequired: isRequired, label: label }), h("div", { key: '112ab028d512964ce17c57f7e05859ded81193f1', part: `${this.name}-container form-input-container`, class: "form-input-container" }, h(FormInputPrefix, { key: 'cffe4099ee953c24793d66300fcd0e21a739ddff', name: this.name, direction: (_b = locale === null || locale === void 0 ? void 0 : locale.sharedFormLocales) === null || _b === void 0 ? void 0 : _b.direction, prefix: this.inputPrefix }), h("input", Object.assign({ key: '5593ef339d4bf5e8bfa63b2e11edf2f0b5ebf8ab', name: this.name, type: this === null || this === void 0 ? void 0 : this.type, disabled: isDisabled, onInput: this.onInputChange, defaultValue: this.formatter ? this.formatter(this.defaultValue || '') : this.defaultValue, part: `${this.name}-input form-input`, placeholder: placeholder || (meta === null || meta === void 0 ? void 0 : meta.placeholder), style: Object.assign(Object.assign({}, (this.prefixWidth ? { [isRtl ? 'paddingRight' : 'paddingLeft']: `${this.prefixWidth}px` } : {})), (this.icon ? { [iconPaddingSide]: '40px' } : {})), class: cn('form-input-style', part, {
67
67
  'form-input-error-style': isError,
68
- }) }, this.inputProps)), this.icon && renderIcon()), h(FormErrorMessage, { key: '7a943f939ea7181ee77d82183584aa3a0c9e3994', name: this.name, isError: isError, errorMessage: errorTextMessage }))));
68
+ }) }, this.inputProps)), this.icon && renderIcon()), h(FormErrorMessage, { key: 'a6d678840a1b9d89a746915e2d025c7d9297a2be', name: this.name, isError: isError, errorMessage: errorTextMessage }))));
69
69
  }
70
70
  static get is() { return "form-input"; }
71
71
  static get originalStyleUrls() {