adp-web-components 0.1.78 → 0.1.80

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 (321) 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 +5 -5
  5. package/dist/cjs/form-date-picker.cjs.entry.js +5 -5
  6. package/dist/cjs/form-dialog_13.cjs.entry.js +1354 -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-D5rCyA1u.js} +18 -4
  14. package/dist/cjs/{get-local-language-PewhmlEg.js → get-local-language-D02WksZl.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/loading-spinner.cjs.entry.js +1 -1
  19. package/dist/cjs/manufacturer-part-lookup.cjs.entry.js +6 -6
  20. package/dist/cjs/part-lookup.cjs.entry.js +5 -5
  21. package/dist/cjs/{loader-icon-ToaEwO9B.js → phone-validator-D6nzYTs8.js} +14 -18
  22. package/dist/cjs/service-booking-form.cjs.entry.js +19 -19
  23. package/dist/cjs/shift-components.cjs.js +1 -1
  24. package/dist/cjs/shift-tab-content.cjs.entry.js +1 -1
  25. package/dist/cjs/shift-tabs_2.cjs.entry.js +10 -10
  26. package/dist/cjs/ssc-lookup-form.cjs.entry.js +19 -19
  27. package/dist/cjs/{state-object-C1tgQfnz.js → state-object-B2D8PkT8.js} +21 -9
  28. package/dist/cjs/test-drive-form.cjs.entry.js +19 -19
  29. package/dist/cjs/{type-BSH0OxyO.js → type-BkehR16K.js} +1 -1
  30. package/dist/cjs/{type-BvWomz0N.js → type-CjTn3Uuy.js} +1 -1
  31. package/dist/cjs/{type-CFTS0FUJ.js → type-DhEJjKzj.js} +1 -1
  32. package/dist/cjs/{types-B3WMBBhs.js → types-DV_cOCRi.js} +18 -0
  33. package/dist/cjs/{validation-DEdJb-KL.js → validation-N-XMdEIM.js} +15 -2
  34. package/dist/cjs/vehicle-accessories_7.cjs.entry.js +24 -24
  35. package/dist/cjs/vehicle-lookup.cjs.entry.js +4 -4
  36. package/dist/cjs/vehicle-quotation-form.cjs.entry.js +17 -17
  37. package/dist/cjs/{white-loader-55klC_ZH.js → white-loader-kSznMo_u.js} +4 -0
  38. package/dist/collection/collection-manifest.json +2 -0
  39. package/dist/collection/components/components/flexible-container.css +1 -1
  40. package/dist/collection/components/components/information-table.css +1 -1
  41. package/dist/collection/components/components/loading-spinner.css +1 -1
  42. package/dist/collection/components/components/shift-tab-content.css +1 -1
  43. package/dist/collection/components/components/shift-tabs.css +1 -1
  44. package/dist/collection/components/form-elements/form-checkbox.js +1 -1
  45. package/dist/collection/components/form-elements/form-date-picker-legacy.js +4 -4
  46. package/dist/collection/components/form-elements/form-dialog.js +3 -3
  47. package/dist/collection/components/form-elements/form-file.js +608 -0
  48. package/dist/collection/components/form-elements/form-input.js +2 -2
  49. package/dist/collection/components/form-elements/form-inputs.css +1 -1
  50. package/dist/collection/components/form-elements/form-phone-number.js +2 -2
  51. package/dist/collection/components/form-elements/form-picker-input.js +2 -2
  52. package/dist/collection/components/form-elements/form-select.js +1 -1
  53. package/dist/collection/components/form-elements/form-shadow-input.js +1 -1
  54. package/dist/collection/components/form-elements/form-stepper-control.js +2 -2
  55. package/dist/collection/components/form-elements/form-stepper-submit.js +2 -2
  56. package/dist/collection/components/form-elements/form-stepper.js +1 -1
  57. package/dist/collection/components/form-elements/form-structure-error.js +1 -1
  58. package/dist/collection/components/form-elements/form-submit.js +2 -2
  59. package/dist/collection/components/form-elements/form-switch.js +1 -1
  60. package/dist/collection/components/form-elements/form-text-area.js +2 -2
  61. package/dist/collection/components/form-elements/form-time-picker-legacy.js +5 -5
  62. package/dist/collection/components/form-elements/form-vin-input.js +2 -2
  63. package/dist/collection/components/forms/defaults/mappers.js +13 -1
  64. package/dist/collection/components/forms/defaults/validation.js +9 -1
  65. package/dist/collection/components/forms/general-form.js +490 -0
  66. package/dist/collection/components/forms/general-inquiry.js +2 -2
  67. package/dist/collection/components/forms/service-booking.js +2 -2
  68. package/dist/collection/components/forms/ssc-lookup.js +2 -2
  69. package/dist/collection/components/forms/test-drive.js +2 -2
  70. package/dist/collection/components/forms/vehicle-quotation.js +2 -2
  71. package/dist/collection/components/part-lookup/dead-stock-lookup.css +1 -1
  72. package/dist/collection/components/part-lookup/dead-stock-lookup.js +2 -2
  73. package/dist/collection/components/part-lookup/distributor-lookup.css +1 -1
  74. package/dist/collection/components/part-lookup/distributor-lookup.js +2 -2
  75. package/dist/collection/components/part-lookup/manufacturer-lookup.css +1 -1
  76. package/dist/collection/components/part-lookup/manufacturer-part-lookup.css +1 -1
  77. package/dist/collection/components/part-lookup/manufacturer-part-lookup.js +1 -1
  78. package/dist/collection/components/part-lookup/part-lookup.css +1 -1
  79. package/dist/collection/components/vehicle-lookup/vehicle-accessories.css +1 -1
  80. package/dist/collection/components/vehicle-lookup/vehicle-accessories.js +2 -2
  81. package/dist/collection/components/vehicle-lookup/vehicle-claimable-items.css +1 -1
  82. package/dist/collection/components/vehicle-lookup/vehicle-claimable-items.js +4 -4
  83. package/dist/collection/components/vehicle-lookup/vehicle-item-claim-form.css +1 -1
  84. package/dist/collection/components/vehicle-lookup/vehicle-item-claim-form.js +8 -8
  85. package/dist/collection/components/vehicle-lookup/vehicle-lookup.css +1 -1
  86. package/dist/collection/components/vehicle-lookup/vehicle-paint-thickness.css +1 -1
  87. package/dist/collection/components/vehicle-lookup/vehicle-sale-information.css +1 -1
  88. package/dist/collection/components/vehicle-lookup/vehicle-sale-information.js +2 -2
  89. package/dist/collection/components/vehicle-lookup/vehicle-service-history.css +1 -1
  90. package/dist/collection/components/vehicle-lookup/vehicle-service-history.js +1 -1
  91. package/dist/collection/components/vehicle-lookup/vehicle-specification.css +1 -1
  92. package/dist/collection/components/vehicle-lookup/vehicle-specification.js +1 -1
  93. package/dist/collection/components/vehicle-lookup/vehicle-warranty-details.css +1 -1
  94. package/dist/collection/components/vehicle-lookup/vehicle-warranty-details.js +4 -4
  95. package/dist/collection/components/vin-extractor/vin-extractor.js +1 -1
  96. package/dist/collection/features/form-hook/form-hook.js +18 -4
  97. package/dist/collection/features/form-hook/functions.js +8 -0
  98. package/dist/collection/features/form-hook/inputs/form-input.js +7 -5
  99. package/dist/components/dead-stock-lookup.js +1 -1
  100. package/dist/components/distributor-lookup.js +1 -1
  101. package/dist/components/flexible-container.js +1 -1
  102. package/dist/components/form-checkbox.js +1 -1
  103. package/dist/components/form-date-picker.js +1 -1
  104. package/dist/components/form-dialog.js +1 -1
  105. package/dist/components/form-file.d.ts +11 -0
  106. package/dist/components/form-file.js +5 -0
  107. package/dist/components/form-input-preview.js +1 -1
  108. package/dist/components/form-input.js +1 -1
  109. package/dist/components/form-phone-number.js +1 -1
  110. package/dist/components/form-picker-input.js +1 -1
  111. package/dist/components/form-select.js +1 -1
  112. package/dist/components/form-shadow-input.js +1 -1
  113. package/dist/components/form-stepper-control.js +1 -1
  114. package/dist/components/form-stepper-submit.js +1 -1
  115. package/dist/components/form-stepper.js +1 -1
  116. package/dist/components/form-structure-error.js +1 -1
  117. package/dist/components/form-structure.js +1 -1
  118. package/dist/components/form-submit.js +1 -1
  119. package/dist/components/form-switch.js +1 -1
  120. package/dist/components/form-text-area.js +1 -1
  121. package/dist/components/form-time-picker.js +1 -1
  122. package/dist/components/form-vin-input.js +1 -1
  123. package/dist/components/general-form.d.ts +11 -0
  124. package/dist/components/general-form.js +5 -0
  125. package/dist/components/general-inquiry-form.js +1 -1
  126. package/dist/components/information-table.js +1 -1
  127. package/dist/components/loading-spinner.js +1 -1
  128. package/dist/components/manufacturer-lookup.js +1 -1
  129. package/dist/components/manufacturer-part-lookup.js +1 -1
  130. package/dist/components/{p-DLsR20_B.js → p-8IdtkeX1.js} +1 -1
  131. package/dist/components/p-B14TvlWp.js +5 -0
  132. package/dist/components/{p-B4IN85i9.js → p-B68P3DtP.js} +1 -1
  133. package/dist/components/p-B807sG0U.js +5 -0
  134. package/dist/components/p-B882WrlQ.js +5 -0
  135. package/dist/components/p-B9Kquvk4.js +5 -0
  136. package/dist/components/p-BFaCcwNv.js +5 -0
  137. package/dist/components/p-BN3IFAWI.js +5 -0
  138. package/dist/components/p-BeL46S5b.js +5 -0
  139. package/dist/components/p-BiRjebkj.js +5 -0
  140. package/dist/components/p-Bsnu7u9K.js +5 -0
  141. package/dist/components/{p-CKmHT-QE.js → p-BxeKiQ5h.js} +1 -1
  142. package/dist/components/p-CPGswmtd.js +5 -0
  143. package/dist/components/p-CXoG03EM.js +5 -0
  144. package/dist/components/{p-R7ARfZoC.js → p-CXzb5oyt.js} +1 -1
  145. package/dist/components/{p-CRsaHzS7.js → p-CZ_bF39p.js} +1 -1
  146. package/dist/components/p-CeUdMJED.js +5 -0
  147. package/dist/components/{p-ChRCBwh-.js → p-CjZxWPIE.js} +1 -1
  148. package/dist/components/{p-FGM9oY6C.js → p-CqTxdwgo.js} +1 -1
  149. package/dist/components/{p-C_89017x.js → p-CvoSPdhp.js} +1 -1
  150. package/dist/components/p-D0oHH_yi.js +5 -0
  151. package/dist/components/p-D7ZYsC-o.js +5 -0
  152. package/dist/components/p-DKzEP2g4.js +5 -0
  153. package/dist/components/p-DN4c_zdE.js +5 -0
  154. package/dist/components/{p-BzUPQ6H3.js → p-DOS_lP0E.js} +1 -1
  155. package/dist/components/p-DSTKQdoW.js +5 -0
  156. package/dist/components/p-DT2OVZtH.js +5 -0
  157. package/dist/components/p-DY9gBU2J.js +5 -0
  158. package/dist/components/p-D_bnut2e.js +5 -0
  159. package/dist/components/p-DhQjm81u.js +5 -0
  160. package/dist/components/p-Dj3_tuTX.js +5 -0
  161. package/dist/components/p-DtCTkfsR.js +5 -0
  162. package/dist/components/p-DwyZCgYl.js +5 -0
  163. package/dist/components/p-JSG4fAIl.js +5 -0
  164. package/dist/components/p-MdiEjk1X.js +5 -0
  165. package/dist/components/p-QsYqPaPW.js +5 -0
  166. package/dist/components/p-VufjPJkT.js +5 -0
  167. package/dist/{shift-components/p-CWP4hZcw.js → components/p-YQJevg3-.js} +1 -1
  168. package/dist/components/p-aHqL2KKd.js +5 -0
  169. package/dist/components/p-dM4PJkDk.js +5 -0
  170. package/dist/components/{p-BD-FgNDo.js → p-gEeo-RSf.js} +1 -1
  171. package/dist/components/p-rvbbkr0i.js +5 -0
  172. package/dist/components/{p-TSe2YuoV.js → p-zyFVlTck.js} +1 -1
  173. package/dist/components/part-lookup.js +1 -1
  174. package/dist/components/service-booking-form.js +1 -1
  175. package/dist/components/shift-accordion.js +1 -1
  176. package/dist/components/shift-slider.js +1 -1
  177. package/dist/components/shift-tab-content.js +1 -1
  178. package/dist/components/shift-tabs.js +1 -1
  179. package/dist/components/ssc-lookup-form.js +1 -1
  180. package/dist/components/test-drive-form.js +1 -1
  181. package/dist/components/vehicle-accessories.js +1 -1
  182. package/dist/components/vehicle-claimable-items.js +1 -1
  183. package/dist/components/vehicle-item-claim-form.js +1 -1
  184. package/dist/components/vehicle-lookup.js +1 -1
  185. package/dist/components/vehicle-paint-thickness.js +1 -1
  186. package/dist/components/vehicle-quotation-form.js +1 -1
  187. package/dist/components/vehicle-sale-information.js +1 -1
  188. package/dist/components/vehicle-service-history.js +1 -1
  189. package/dist/components/vehicle-specification.js +1 -1
  190. package/dist/components/vehicle-warranty-details.js +1 -1
  191. package/dist/components/vin-extractor.js +1 -1
  192. package/dist/esm/dead-stock-lookup_3.entry.js +11 -11
  193. package/dist/esm/{decode-time-offset-Cfi43WoV.js → decode-time-offset-DFZOybyr.js} +1 -1
  194. package/dist/esm/flexible-container.entry.js +1 -1
  195. package/dist/esm/form-checkbox.entry.js +5 -5
  196. package/dist/esm/form-date-picker.entry.js +5 -5
  197. package/dist/esm/form-dialog_13.entry.js +1340 -0
  198. package/dist/esm/{form-input-C5O2h7ti.js → form-input-DKjuSVBS.js} +8 -6
  199. package/dist/esm/form-input_4.entry.js +14 -17
  200. package/dist/esm/form-switch.entry.js +5 -5
  201. package/dist/esm/form-time-picker.entry.js +6 -6
  202. package/dist/esm/general-form.entry.js +81 -0
  203. package/dist/esm/general-inquiry-form.entry.js +11 -11
  204. package/dist/esm/{get-language-from-url-Ba709Um1.js → get-language-from-url-fGWv4JfI.js} +18 -4
  205. package/dist/esm/{get-local-language-DFjoRspr.js → get-local-language-DtdpsfQH.js} +2 -2
  206. package/dist/esm/information-table.entry.js +1 -1
  207. package/dist/{cjs/index-D5c513Xn.js → esm/loader-icon-DM4Vm5gX.js} +12 -2
  208. package/dist/esm/loader.js +1 -1
  209. package/dist/esm/loading-spinner.entry.js +1 -1
  210. package/dist/esm/manufacturer-part-lookup.entry.js +6 -6
  211. package/dist/esm/part-lookup.entry.js +5 -5
  212. package/dist/esm/{loader-icon-BUXaFxSO.js → phone-validator-CW0vHN1w.js} +13 -16
  213. package/dist/esm/service-booking-form.entry.js +10 -10
  214. package/dist/esm/shift-components.js +1 -1
  215. package/dist/esm/shift-tab-content.entry.js +1 -1
  216. package/dist/esm/shift-tabs_2.entry.js +10 -10
  217. package/dist/esm/ssc-lookup-form.entry.js +10 -10
  218. package/dist/esm/{state-object-BA8Hnuoh.js → state-object-D__N3A52.js} +17 -5
  219. package/dist/esm/test-drive-form.entry.js +10 -10
  220. package/dist/esm/{type-DDlXvsYW.js → type-8o_W9bXK.js} +1 -1
  221. package/dist/esm/{type-Dw5qeiT3.js → type-C2SCytyp.js} +1 -1
  222. package/dist/esm/{type-DwvmWsdz.js → type-DCLi-Gh3.js} +1 -1
  223. package/dist/esm/{types-CWP4hZcw.js → types-BDhR4pDq.js} +18 -1
  224. package/dist/esm/{validation-iKTmTjB0.js → validation-CjIBF497.js} +11 -3
  225. package/dist/esm/vehicle-accessories_7.entry.js +24 -24
  226. package/dist/esm/vehicle-lookup.entry.js +4 -4
  227. package/dist/esm/vehicle-quotation-form.entry.js +7 -7
  228. package/dist/esm/{white-loader-BpnYQ3A6.js → white-loader-CG4JPVdv.js} +4 -1
  229. package/dist/shift-components/{p-c6959721.entry.js → p-00514dfd.entry.js} +1 -1
  230. package/dist/shift-components/{p-0faa9bc7.entry.js → p-136ce48d.entry.js} +1 -1
  231. package/dist/shift-components/p-16eb4c57.entry.js +5 -0
  232. package/dist/shift-components/p-2cb2cf2c.entry.js +5 -0
  233. package/dist/shift-components/{p-027cb758.entry.js → p-31193ab5.entry.js} +1 -1
  234. package/dist/shift-components/p-37bbc653.entry.js +5 -0
  235. package/dist/shift-components/p-3c5f015c.entry.js +5 -0
  236. package/dist/shift-components/p-3eb1890a.entry.js +5 -0
  237. package/dist/shift-components/{p-70017eaf.entry.js → p-49803ea5.entry.js} +1 -1
  238. package/dist/shift-components/p-6f563241.entry.js +5 -0
  239. package/dist/shift-components/p-6fca3b48.entry.js +5 -0
  240. package/dist/shift-components/p-7PtHUjhE.js +5 -0
  241. package/dist/shift-components/{p-e0ce0597.entry.js → p-9b910889.entry.js} +1 -1
  242. package/dist/shift-components/{p-c75631eb.entry.js → p-9d25df8c.entry.js} +1 -1
  243. package/dist/{components/p-DkIqSrtn.js → shift-components/p-BDhR4pDq.js} +1 -1
  244. package/dist/shift-components/p-BffuX06w.js +5 -0
  245. package/dist/shift-components/{p-Birh6Z1w.js → p-BrJd1o0-.js} +1 -1
  246. package/dist/shift-components/{p-XyQhTm0V.js → p-Cv7m_MLQ.js} +1 -1
  247. package/dist/shift-components/p-D-IGTVAo.js +5 -0
  248. package/dist/shift-components/p-DCHyQw_L.js +5 -0
  249. package/dist/shift-components/{p-ZgT-eNvW.js → p-DFsecEMm.js} +1 -1
  250. package/dist/shift-components/p-DOaMIJLj.js +5 -0
  251. package/dist/shift-components/p-D_IVXzoK.js +5 -0
  252. package/dist/shift-components/{p-DJSST74z.js → p-DyLtxN1c.js} +1 -1
  253. package/dist/shift-components/p-a6ad0fdf.entry.js +5 -0
  254. package/dist/shift-components/{p-9b895f00.entry.js → p-b1f9f6e3.entry.js} +1 -1
  255. package/dist/shift-components/p-baa868f8.entry.js +5 -0
  256. package/dist/shift-components/p-d26ff83d.entry.js +5 -0
  257. package/dist/shift-components/p-d915cd1c.entry.js +5 -0
  258. package/dist/shift-components/{p-074e4e31.entry.js → p-dcde6026.entry.js} +1 -1
  259. package/dist/shift-components/p-e2d72fb9.entry.js +5 -0
  260. package/dist/shift-components/{p-074d156e.entry.js → p-fa57b412.entry.js} +1 -1
  261. package/dist/shift-components/p-fd8ec358.entry.js +5 -0
  262. package/dist/shift-components/{p-BVrQRz1r.js → p-nGZ6Nphz.js} +1 -1
  263. package/dist/shift-components/p-zqc-VRCh.js +5 -0
  264. package/dist/shift-components/shift-components.esm.js +1 -1
  265. package/dist/types/components/form-elements/form-file.d.ts +52 -0
  266. package/dist/types/components/forms/defaults/mappers.d.ts +10 -0
  267. package/dist/types/components/forms/defaults/validation.d.ts +6 -0
  268. package/dist/types/components/forms/general-form.d.ts +40 -0
  269. package/dist/types/components.d.ts +136 -0
  270. package/dist/types/features/form-hook/form-hook.d.ts +2 -1
  271. package/package.json +1 -1
  272. package/dist/cjs/decode-time-offset-DqzP0mck.js +0 -37
  273. package/dist/cjs/form-dialog_12.cjs.entry.js +0 -1092
  274. package/dist/components/p-1rMNgTmN.js +0 -5
  275. package/dist/components/p-5y4OeEh5.js +0 -5
  276. package/dist/components/p-B7jki48I.js +0 -5
  277. package/dist/components/p-BDorSYsl.js +0 -5
  278. package/dist/components/p-BI-RaMUW.js +0 -5
  279. package/dist/components/p-BdHM2JNo.js +0 -5
  280. package/dist/components/p-BfYWRQqS.js +0 -5
  281. package/dist/components/p-Bx3oB_px.js +0 -5
  282. package/dist/components/p-BzD7w6vv.js +0 -5
  283. package/dist/components/p-CA80NnNb.js +0 -5
  284. package/dist/components/p-CW9-cijc.js +0 -5
  285. package/dist/components/p-CulaExZZ.js +0 -5
  286. package/dist/components/p-CvR5UOI8.js +0 -5
  287. package/dist/components/p-D5oaVEZk.js +0 -5
  288. package/dist/components/p-DArD2CFn.js +0 -5
  289. package/dist/components/p-DETXwIlB.js +0 -5
  290. package/dist/components/p-DGirJnhP.js +0 -5
  291. package/dist/components/p-DHSj0x8N.js +0 -5
  292. package/dist/components/p-DfcSO_Lp.js +0 -5
  293. package/dist/components/p-Dxb6_It9.js +0 -5
  294. package/dist/components/p-OzpzJAse.js +0 -5
  295. package/dist/components/p-SffSBcMo.js +0 -5
  296. package/dist/components/p-fNVz39Xz.js +0 -5
  297. package/dist/components/p-h4hnAK_n.js +0 -5
  298. package/dist/components/p-kcv3fNWl.js +0 -5
  299. package/dist/components/p-mpwCz5yf.js +0 -5
  300. package/dist/components/p-rb0wr9GD.js +0 -5
  301. package/dist/components/p-tFW3Rzil.js +0 -5
  302. package/dist/esm/form-dialog_12.entry.js +0 -1079
  303. package/dist/shift-components/p-472951d3.entry.js +0 -5
  304. package/dist/shift-components/p-7987323f.entry.js +0 -5
  305. package/dist/shift-components/p-89f00e9b.entry.js +0 -5
  306. package/dist/shift-components/p-916ece0b.entry.js +0 -5
  307. package/dist/shift-components/p-9ec92261.entry.js +0 -5
  308. package/dist/shift-components/p-BAltXAam.js +0 -5
  309. package/dist/shift-components/p-BILW0yP6.js +0 -5
  310. package/dist/shift-components/p-Bp-HDfJB.js +0 -5
  311. package/dist/shift-components/p-CK-8T86o.js +0 -5
  312. package/dist/shift-components/p-CjY50XS3.js +0 -5
  313. package/dist/shift-components/p-CyHfimfF.js +0 -5
  314. package/dist/shift-components/p-DqkWfr2C.js +0 -5
  315. package/dist/shift-components/p-b1bace88.entry.js +0 -5
  316. package/dist/shift-components/p-b3d50c22.entry.js +0 -5
  317. package/dist/shift-components/p-b6d44745.entry.js +0 -5
  318. package/dist/shift-components/p-c19b26bb.entry.js +0 -5
  319. package/dist/shift-components/p-d36de486.entry.js +0 -5
  320. package/dist/shift-components/p-e665d41c.entry.js +0 -5
  321. package/dist/shift-components/p-fd8a5f5d.entry.js +0 -5
@@ -0,0 +1,608 @@
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.sasFiles = [];
24
+ this.controlsFormLoading = false;
25
+ this.wasFormLoading = false;
26
+ this.openFilePicker = () => {
27
+ if (!this.fileInput)
28
+ return;
29
+ this.reset(); // clears old file + state
30
+ this.fileInput.click();
31
+ };
32
+ this.handleFileChange = async (event) => {
33
+ const target = event.target;
34
+ const fileList = Array.from((target === null || target === void 0 ? void 0 : target.files) || []);
35
+ if (!fileList.length)
36
+ return;
37
+ const limited = typeof this.maxUpload === 'number' && this.maxUpload > 0 ? fileList.slice(0, this.maxUpload) : fileList;
38
+ this.fileName = limited.map(f => f.name).join(', ');
39
+ this.failedText = '';
40
+ this.uploadState = 'uploading';
41
+ this.startGlobalLoading();
42
+ const dataTransfer = new DataTransfer();
43
+ try {
44
+ if (this.signUrl) {
45
+ const signedFiles = await this.requestSignedUpload(limited);
46
+ this.form.pendingRequests[this.name] = async () => await this.uploadToSignedUrl(limited, signedFiles);
47
+ }
48
+ this.uploadState = 'success';
49
+ this.syncValue([...limited]);
50
+ limited.forEach(file => dataTransfer.items.add(file));
51
+ target.files = dataTransfer.files;
52
+ }
53
+ catch (error) {
54
+ this.sasFiles = [];
55
+ console.error(error);
56
+ target.files = dataTransfer.files;
57
+ const [locale, language] = this.form.getFormLocale();
58
+ this.uploadState = 'error';
59
+ this.failedText = this.getFailureText(locale, language);
60
+ this.syncValue();
61
+ // @ts-ignore
62
+ if (this.fileInput)
63
+ this.fileInput.value = [];
64
+ }
65
+ finally {
66
+ this.stopGlobalLoading();
67
+ }
68
+ };
69
+ this.validate = () => {
70
+ let validation = mixed().meta(meta(this.name));
71
+ if (this.required) {
72
+ validation = validation.test(require(this.name), require(this.name), (value) => {
73
+ if (!Array.isArray(value))
74
+ return false;
75
+ const count = value.length;
76
+ return count > 0;
77
+ });
78
+ }
79
+ else {
80
+ validation = validation.optional();
81
+ }
82
+ if (this.maxUpload && this.maxUpload > 0) {
83
+ validation = validation.test(max(this.name), max(this.name), (value) => {
84
+ if (!Array.isArray(value))
85
+ return true;
86
+ const count = value.length;
87
+ return count <= this.maxUpload;
88
+ });
89
+ }
90
+ if (this.maxSize) {
91
+ validation = validation.test(size(this.name), size(this.name), (value) => {
92
+ if (!Array.isArray(value))
93
+ return true;
94
+ if (!value.length)
95
+ return true;
96
+ const maxSizeInBytes = this.maxSize * 1024 * 1024;
97
+ return value.every(f => f.size <= maxSizeInBytes);
98
+ });
99
+ }
100
+ if (this.accept) {
101
+ validation = validation.test(format(this.name), format(this.name), (value) => {
102
+ if (!Array.isArray(value))
103
+ return true;
104
+ if (!value.length)
105
+ return true;
106
+ return value.every(f => this.matchesAccept(f));
107
+ });
108
+ }
109
+ return validation;
110
+ };
111
+ }
112
+ async componentWillLoad() {
113
+ this.form.subscribe(this.name, this);
114
+ }
115
+ componentDidLoad() {
116
+ this.fileInput = this.el.querySelector(`.${partKeyPrefix}${this.name}-input`);
117
+ }
118
+ async disconnectedCallback() {
119
+ this.stopGlobalLoading();
120
+ this.form.unsubscribe(this.name);
121
+ }
122
+ reset() {
123
+ this.stopGlobalLoading();
124
+ if (this.fileInput)
125
+ this.fileInput.value = '';
126
+ this.fileName = '';
127
+ this.uploadState = 'idle';
128
+ }
129
+ startGlobalLoading() {
130
+ var _a, _b, _c, _d;
131
+ if (!((_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.setIsLoading) || this.controlsFormLoading)
132
+ return;
133
+ this.wasFormLoading = !!((_d = (_c = this.form) === null || _c === void 0 ? void 0 : _c.context) === null || _d === void 0 ? void 0 : _d.isLoading);
134
+ this.controlsFormLoading = true;
135
+ this.form.context.setIsLoading(true);
136
+ }
137
+ stopGlobalLoading() {
138
+ var _a, _b;
139
+ if (!this.controlsFormLoading || !((_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.setIsLoading))
140
+ return;
141
+ this.form.context.setIsLoading(this.wasFormLoading);
142
+ this.controlsFormLoading = false;
143
+ }
144
+ getLoadingText(locale, language) {
145
+ var _a, _b, _c;
146
+ 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...';
147
+ }
148
+ getUploadText(locale, language, placeholder) {
149
+ var _a, _b, _c;
150
+ 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';
151
+ }
152
+ getFailureText(locale, language) {
153
+ var _a, _b, _c, _d;
154
+ 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.';
155
+ }
156
+ matchesAccept(value) {
157
+ var _a;
158
+ if (!this.accept)
159
+ return true;
160
+ const rules = this.accept
161
+ .split(',')
162
+ .map(rule => rule.trim())
163
+ .filter(Boolean)
164
+ .map(rule => rule.toLowerCase());
165
+ if (!rules.length)
166
+ return true;
167
+ const fileName = typeof value === 'string' ? value : (value === null || value === void 0 ? void 0 : value.name) || '';
168
+ const mime = typeof value === 'string' ? '' : ((_a = value === null || value === void 0 ? void 0 : value.type) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '';
169
+ const ext = fileName.includes('.') ? fileName.slice(fileName.lastIndexOf('.')).toLowerCase() : '';
170
+ return rules.some(rule => {
171
+ if (rule === '*/*')
172
+ return true;
173
+ if (rule.endsWith('/*'))
174
+ return mime ? mime.startsWith(rule.replace('/*', '/')) : false;
175
+ if (rule.startsWith('.'))
176
+ return ext === rule;
177
+ if (rule.includes('/'))
178
+ return mime ? mime === rule : false;
179
+ return true;
180
+ });
181
+ }
182
+ syncValue(value) {
183
+ var _a, _b;
184
+ const resolved = (value === null || value === void 0 ? void 0 : value[0]) || '';
185
+ this.fileName = typeof resolved === 'string' ? resolved : resolved === null || resolved === void 0 ? void 0 : resolved.name;
186
+ // @ts-ignore
187
+ (_a = this.form) === null || _a === void 0 ? void 0 : _a.validateForm(this.name, !!value ? value : [], false);
188
+ (_b = this.form) === null || _b === void 0 ? void 0 : _b.rerender({ inputName: this.name, rerenderForm: true });
189
+ }
190
+ async requestSignedUpload(files) {
191
+ var _a, _b, _c;
192
+ const formHeaders = { 'Content-Type': 'application/json' };
193
+ 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;
194
+ if (grecaptcha && recaptchaKey) {
195
+ const token = await grecaptcha.execute(recaptchaKey, { action: 'submit' });
196
+ formHeaders['Recaptcha-Token'] = token;
197
+ }
198
+ const payload = files === null || files === void 0 ? void 0 : files.map(file => ({
199
+ name: file.name,
200
+ blob: this.signPrefix ? `${this.signPrefix}${file.name}` : file.name,
201
+ accountName: this.accountName,
202
+ containerName: this.containerName,
203
+ contentType: null,
204
+ size: file === null || file === void 0 ? void 0 : file.size,
205
+ width: null,
206
+ height: null,
207
+ }));
208
+ const response = await fetch(this.signUrl, {
209
+ headers: formHeaders,
210
+ body: JSON.stringify(payload),
211
+ method: this.signMethod || 'POST',
212
+ });
213
+ if (!response.ok)
214
+ throw new Error('Failed to get signed upload URL');
215
+ const json = await response.json();
216
+ const list = (json === null || json === void 0 ? void 0 : json.entity) || (json === null || json === void 0 ? void 0 : json.Entity) || json;
217
+ const arr = Array.isArray(list) ? list : Array.isArray(json) ? json : [];
218
+ const signedFiles = arr.map((file, idx) => {
219
+ var _a;
220
+ // @ts-ignore
221
+ files[idx].blob = (file === null || file === void 0 ? void 0 : file.Blob) || (file === null || file === void 0 ? void 0 : file.blob);
222
+ // @ts-ignore
223
+ files[idx].contentType = (_a = files[idx]) === null || _a === void 0 ? void 0 : _a.type;
224
+ // @ts-ignore
225
+ files[idx].url = file.Url || file.url;
226
+ return {
227
+ uploadUrl: file.url || file.Url || file.uploadUrl || file.UploadUrl,
228
+ headers: file.headers || file.Headers || {},
229
+ key: file.blob || file.Blob || file.path || file.Path || file.key || file.Key || (file === null || file === void 0 ? void 0 : file.name),
230
+ };
231
+ });
232
+ this.sasFiles = arr;
233
+ return signedFiles;
234
+ }
235
+ async uploadToSignedUrl(files, signedFiles) {
236
+ files === null || files === void 0 ? void 0 : files.forEach(async (file, idx) => {
237
+ var _a, _b;
238
+ try {
239
+ const response = await fetch((_a = signedFiles === null || signedFiles === void 0 ? void 0 : signedFiles[idx]) === null || _a === void 0 ? void 0 : _a.uploadUrl, {
240
+ method: 'PUT',
241
+ 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),
242
+ body: file,
243
+ });
244
+ if (!response.ok)
245
+ console.error(response);
246
+ }
247
+ catch (error) {
248
+ console.error(error);
249
+ }
250
+ });
251
+ }
252
+ render() {
253
+ const { disabled, isRequired, meta, isError, errorMessage } = this.form.getInputState(this.name);
254
+ const [locale, language] = this.form.getFormLocale();
255
+ const { label, placeholder, errorTextMessage } = getInputLocalization(this, meta, errorMessage);
256
+ const disableInput = disabled || this.isLoading || this.uploadState === 'uploading' || this.isDisabled;
257
+ const showSpinner = this.uploadState === 'uploading';
258
+ const displayText = this.uploadState === 'success' && this.fileName ? this.fileName : this.getUploadText(locale, language, placeholder || (meta === null || meta === void 0 ? void 0 : meta.placeholder));
259
+ const isErrorState = this.uploadState !== 'uploading' && (!!this.failedText || isError);
260
+ // @ts-ignore
261
+ window === null || window === void 0 ? void 0 : window.s = this.form;
262
+ return (h(Host, { key: '1ac018408496850180cff70c25d07874519b5347' }, h("label", { key: '7c0c6c6ec4bb61842a821c0f1488077319585525', part: `form-file ${this.name}`, id: this.wrapperId, class: cn('form-input-label-container', this.wrapperClass, { disabled: disableInput }) }, h(FormInputLabel, { key: '96a77917e918acec9a300cebd037992d7db46ae5', name: this.name, isRequired: isRequired, label: label }), h("div", { key: 'ea1c84d37ba1443f3ab79abf1f67d1be62997238', part: `${this.name}-container form-input-container`, class: cn('form-input-container') }, h("input", { key: '1d7978c8001a3e4c4de6329de318fc9760a77288', 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: '4c6eae45ee23b104c67c3de178ee668e5d30547d', 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', {
263
+ 'form-input-error-style': isErrorState,
264
+ 'form-file-trigger-loading': showSpinner,
265
+ 'form-file-trigger-success': this.uploadState === 'success',
266
+ }) }, h("span", { key: '382b6596dd75f5e6671e94567ebf62f4cd38cecc', part: `${this.name}-file-text form-file-text`, class: "form-file-text" }, showSpinner ? this.getLoadingText(locale, language) : displayText), h("span", { key: 'aedc912707556399969dc5009a1d82664db9a9a9', part: `${this.name}-file-icon form-file-icon`, class: "form-file-icon" }, showSpinner && h(LoaderIcon, { key: 'e1b05e66c53223983ab56271903c265c8f54bd68', class: "form-file-spinner" }), !showSpinner && this.uploadState === 'success' && h(TickIcon, { key: '7ea689db8e63a34dd69308165b4054474975f080', class: "form-file-success-icon" })))), h(FormErrorMessage, { key: '455434e25f6f422dbf805af2d05dd3757d8eace8', name: this.name, isError: isErrorState, errorMessage: this.failedText || errorTextMessage }))));
267
+ }
268
+ static get is() { return "form-file"; }
269
+ static get originalStyleUrls() {
270
+ return {
271
+ "$": ["form-inputs.css"]
272
+ };
273
+ }
274
+ static get styleUrls() {
275
+ return {
276
+ "$": ["form-inputs.css"]
277
+ };
278
+ }
279
+ static get properties() {
280
+ return {
281
+ "name": {
282
+ "type": "string",
283
+ "attribute": "name",
284
+ "mutable": false,
285
+ "complexType": {
286
+ "original": "string",
287
+ "resolved": "string",
288
+ "references": {}
289
+ },
290
+ "required": false,
291
+ "optional": false,
292
+ "docs": {
293
+ "tags": [],
294
+ "text": ""
295
+ },
296
+ "getter": false,
297
+ "setter": false,
298
+ "reflect": false
299
+ },
300
+ "wrapperId": {
301
+ "type": "string",
302
+ "attribute": "wrapper-id",
303
+ "mutable": false,
304
+ "complexType": {
305
+ "original": "string",
306
+ "resolved": "string",
307
+ "references": {}
308
+ },
309
+ "required": false,
310
+ "optional": false,
311
+ "docs": {
312
+ "tags": [],
313
+ "text": ""
314
+ },
315
+ "getter": false,
316
+ "setter": false,
317
+ "reflect": false
318
+ },
319
+ "form": {
320
+ "type": "unknown",
321
+ "attribute": "form",
322
+ "mutable": false,
323
+ "complexType": {
324
+ "original": "FormHook<any>",
325
+ "resolved": "FormHook<any>",
326
+ "references": {
327
+ "FormHook": {
328
+ "location": "import",
329
+ "path": "~features/form-hook",
330
+ "id": "src/features/form-hook/index.ts::FormHook"
331
+ }
332
+ }
333
+ },
334
+ "required": false,
335
+ "optional": false,
336
+ "docs": {
337
+ "tags": [],
338
+ "text": ""
339
+ },
340
+ "getter": false,
341
+ "setter": false
342
+ },
343
+ "isLoading": {
344
+ "type": "boolean",
345
+ "attribute": "is-loading",
346
+ "mutable": false,
347
+ "complexType": {
348
+ "original": "boolean",
349
+ "resolved": "boolean",
350
+ "references": {}
351
+ },
352
+ "required": false,
353
+ "optional": true,
354
+ "docs": {
355
+ "tags": [],
356
+ "text": ""
357
+ },
358
+ "getter": false,
359
+ "setter": false,
360
+ "reflect": false
361
+ },
362
+ "wrapperClass": {
363
+ "type": "string",
364
+ "attribute": "wrapper-class",
365
+ "mutable": false,
366
+ "complexType": {
367
+ "original": "string",
368
+ "resolved": "string",
369
+ "references": {}
370
+ },
371
+ "required": false,
372
+ "optional": false,
373
+ "docs": {
374
+ "tags": [],
375
+ "text": ""
376
+ },
377
+ "getter": false,
378
+ "setter": false,
379
+ "reflect": false
380
+ },
381
+ "isDisabled": {
382
+ "type": "boolean",
383
+ "attribute": "is-disabled",
384
+ "mutable": false,
385
+ "complexType": {
386
+ "original": "boolean",
387
+ "resolved": "boolean",
388
+ "references": {}
389
+ },
390
+ "required": false,
391
+ "optional": true,
392
+ "docs": {
393
+ "tags": [],
394
+ "text": ""
395
+ },
396
+ "getter": false,
397
+ "setter": false,
398
+ "reflect": false
399
+ },
400
+ "accept": {
401
+ "type": "string",
402
+ "attribute": "accept",
403
+ "mutable": false,
404
+ "complexType": {
405
+ "original": "string",
406
+ "resolved": "string",
407
+ "references": {}
408
+ },
409
+ "required": false,
410
+ "optional": true,
411
+ "docs": {
412
+ "tags": [],
413
+ "text": ""
414
+ },
415
+ "getter": false,
416
+ "setter": false,
417
+ "reflect": false
418
+ },
419
+ "maxSize": {
420
+ "type": "number",
421
+ "attribute": "max-size",
422
+ "mutable": false,
423
+ "complexType": {
424
+ "original": "number",
425
+ "resolved": "number",
426
+ "references": {}
427
+ },
428
+ "required": false,
429
+ "optional": true,
430
+ "docs": {
431
+ "tags": [],
432
+ "text": ""
433
+ },
434
+ "getter": false,
435
+ "setter": false,
436
+ "reflect": false
437
+ },
438
+ "required": {
439
+ "type": "boolean",
440
+ "attribute": "required",
441
+ "mutable": false,
442
+ "complexType": {
443
+ "original": "boolean",
444
+ "resolved": "boolean",
445
+ "references": {}
446
+ },
447
+ "required": false,
448
+ "optional": true,
449
+ "docs": {
450
+ "tags": [],
451
+ "text": ""
452
+ },
453
+ "getter": false,
454
+ "setter": false,
455
+ "reflect": false
456
+ },
457
+ "signUrl": {
458
+ "type": "string",
459
+ "attribute": "sign-url",
460
+ "mutable": false,
461
+ "complexType": {
462
+ "original": "string",
463
+ "resolved": "string",
464
+ "references": {}
465
+ },
466
+ "required": false,
467
+ "optional": true,
468
+ "docs": {
469
+ "tags": [],
470
+ "text": ""
471
+ },
472
+ "getter": false,
473
+ "setter": false,
474
+ "reflect": false
475
+ },
476
+ "maxUpload": {
477
+ "type": "number",
478
+ "attribute": "max-upload",
479
+ "mutable": false,
480
+ "complexType": {
481
+ "original": "number",
482
+ "resolved": "number",
483
+ "references": {}
484
+ },
485
+ "required": false,
486
+ "optional": false,
487
+ "docs": {
488
+ "tags": [],
489
+ "text": ""
490
+ },
491
+ "getter": false,
492
+ "setter": false,
493
+ "reflect": false,
494
+ "defaultValue": "1"
495
+ },
496
+ "signMethod": {
497
+ "type": "string",
498
+ "attribute": "sign-method",
499
+ "mutable": false,
500
+ "complexType": {
501
+ "original": "'POST' | 'PUT'",
502
+ "resolved": "\"POST\" | \"PUT\"",
503
+ "references": {}
504
+ },
505
+ "required": false,
506
+ "optional": false,
507
+ "docs": {
508
+ "tags": [],
509
+ "text": ""
510
+ },
511
+ "getter": false,
512
+ "setter": false,
513
+ "reflect": false,
514
+ "defaultValue": "'POST'"
515
+ },
516
+ "signPrefix": {
517
+ "type": "string",
518
+ "attribute": "sign-prefix",
519
+ "mutable": false,
520
+ "complexType": {
521
+ "original": "string",
522
+ "resolved": "string",
523
+ "references": {}
524
+ },
525
+ "required": false,
526
+ "optional": true,
527
+ "docs": {
528
+ "tags": [],
529
+ "text": ""
530
+ },
531
+ "getter": false,
532
+ "setter": false,
533
+ "reflect": false
534
+ },
535
+ "accountName": {
536
+ "type": "string",
537
+ "attribute": "account-name",
538
+ "mutable": false,
539
+ "complexType": {
540
+ "original": "string",
541
+ "resolved": "string",
542
+ "references": {}
543
+ },
544
+ "required": false,
545
+ "optional": true,
546
+ "docs": {
547
+ "tags": [],
548
+ "text": ""
549
+ },
550
+ "getter": false,
551
+ "setter": false,
552
+ "reflect": false
553
+ },
554
+ "containerName": {
555
+ "type": "string",
556
+ "attribute": "container-name",
557
+ "mutable": false,
558
+ "complexType": {
559
+ "original": "string",
560
+ "resolved": "string",
561
+ "references": {}
562
+ },
563
+ "required": false,
564
+ "optional": true,
565
+ "docs": {
566
+ "tags": [],
567
+ "text": ""
568
+ },
569
+ "getter": false,
570
+ "setter": false,
571
+ "reflect": false
572
+ },
573
+ "localization": {
574
+ "type": "unknown",
575
+ "attribute": "localization",
576
+ "mutable": false,
577
+ "complexType": {
578
+ "original": "FormInputLocalization<{\n uploading?: string;\n upload?: string;\n failure?: string;\n success?: string;\n }>",
579
+ "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; }; }",
580
+ "references": {
581
+ "FormInputLocalization": {
582
+ "location": "import",
583
+ "path": "~features/form-hook",
584
+ "id": "src/features/form-hook/index.ts::FormInputLocalization"
585
+ }
586
+ }
587
+ },
588
+ "required": false,
589
+ "optional": true,
590
+ "docs": {
591
+ "tags": [],
592
+ "text": ""
593
+ },
594
+ "getter": false,
595
+ "setter": false,
596
+ "defaultValue": "{}"
597
+ }
598
+ };
599
+ }
600
+ static get states() {
601
+ return {
602
+ "fileName": {},
603
+ "uploadState": {},
604
+ "failedText": {}
605
+ };
606
+ }
607
+ static get elementRef() { return "el"; }
608
+ }
@@ -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() {