@justifi/webcomponents 4.4.0 → 4.5.1

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 (487) hide show
  1. package/dist/cjs/{Api-7303478d.js → Api-d2df6e84.js} +16 -4
  2. package/dist/cjs/Api-d2df6e84.js.map +1 -0
  3. package/dist/cjs/Payout-4906a445.js +116 -0
  4. package/dist/cjs/Payout-4906a445.js.map +1 -0
  5. package/dist/cjs/{business-form-schema-63b311b2.js → business-form-schema-725ec6f5.js} +40 -22
  6. package/dist/cjs/business-form-schema-725ec6f5.js.map +1 -0
  7. package/dist/cjs/form-control-datepart_2.cjs.entry.js +107 -0
  8. package/dist/cjs/form-control-datepart_2.cjs.entry.js.map +1 -0
  9. package/dist/cjs/form-control-monetary.cjs.entry.js +65 -0
  10. package/dist/cjs/form-control-monetary.cjs.entry.js.map +1 -0
  11. package/dist/cjs/{form-control-select_2.cjs.entry.js → form-control-number_3.cjs.entry.js} +99 -12
  12. package/dist/cjs/form-control-number_3.cjs.entry.js.map +1 -0
  13. package/dist/cjs/form-control-select.cjs.entry.js +47 -0
  14. package/dist/cjs/form-control-select.cjs.entry.js.map +1 -0
  15. package/dist/cjs/{index-83b2ec02.js → index-3533152c.js} +10 -6
  16. package/dist/cjs/index-3533152c.js.map +1 -0
  17. package/dist/cjs/index-5a880722.js +3233 -0
  18. package/dist/cjs/index-5a880722.js.map +1 -0
  19. package/dist/cjs/{index.esm-7e12ce07.js → index.esm-84a0a7a8.js} +1 -19
  20. package/dist/cjs/index.esm-84a0a7a8.js.map +1 -0
  21. package/dist/cjs/justifi-additional-questions_5.cjs.entry.js +396 -0
  22. package/dist/cjs/justifi-additional-questions_5.cjs.entry.js.map +1 -0
  23. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +3 -1
  24. package/dist/cjs/justifi-bank-account-form.cjs.entry.js.map +1 -1
  25. package/dist/cjs/justifi-billing-form_2.cjs.entry.js +2 -2
  26. package/dist/cjs/justifi-business-form.cjs.entry.js +98 -16
  27. package/dist/cjs/justifi-business-form.cjs.entry.js.map +1 -1
  28. package/dist/cjs/justifi-business-list.cjs.entry.js +189 -0
  29. package/dist/cjs/justifi-business-list.cjs.entry.js.map +1 -0
  30. package/dist/cjs/justifi-card-form.cjs.entry.js +3 -1
  31. package/dist/cjs/justifi-card-form.cjs.entry.js.map +1 -1
  32. package/dist/cjs/justifi-details.cjs.entry.js +30 -0
  33. package/dist/cjs/justifi-details.cjs.entry.js.map +1 -0
  34. package/dist/cjs/justifi-payment-details.cjs.entry.js +63 -0
  35. package/dist/cjs/justifi-payment-details.cjs.entry.js.map +1 -0
  36. package/dist/cjs/justifi-payment-form.cjs.entry.js +6 -5
  37. package/dist/cjs/justifi-payment-form.cjs.entry.js.map +1 -1
  38. package/dist/cjs/justifi-payment-method-form.cjs.entry.js +1487 -19
  39. package/dist/cjs/justifi-payment-method-form.cjs.entry.js.map +1 -1
  40. package/dist/cjs/justifi-payments-list.cjs.entry.js +49 -47
  41. package/dist/cjs/justifi-payments-list.cjs.entry.js.map +1 -1
  42. package/dist/cjs/justifi-payout-details.cjs.entry.js +61 -0
  43. package/dist/cjs/justifi-payout-details.cjs.entry.js.map +1 -0
  44. package/dist/cjs/justifi-payouts-list.cjs.entry.js +64 -54
  45. package/dist/cjs/justifi-payouts-list.cjs.entry.js.map +1 -1
  46. package/dist/cjs/justifi-proceeds-list.cjs.entry.js +156 -0
  47. package/dist/cjs/justifi-proceeds-list.cjs.entry.js.map +1 -0
  48. package/dist/cjs/justifi-table.cjs.entry.js +68 -0
  49. package/dist/cjs/justifi-table.cjs.entry.js.map +1 -0
  50. package/dist/cjs/loader.cjs.js +2 -2
  51. package/dist/cjs/select-input_2.cjs.entry.js +1 -1
  52. package/dist/cjs/table-utils-617126e5.js +13 -0
  53. package/dist/cjs/table-utils-617126e5.js.map +1 -0
  54. package/dist/cjs/{utils-4ee7e080.js → utils-0fd61dbd.js} +43 -104
  55. package/dist/cjs/utils-0fd61dbd.js.map +1 -0
  56. package/dist/cjs/utils-d95b09c2.js +35 -0
  57. package/dist/cjs/utils-d95b09c2.js.map +1 -0
  58. package/dist/cjs/webcomponents.cjs.js +3 -3
  59. package/dist/cjs/webcomponents.cjs.js.map +1 -1
  60. package/dist/collection/api/Api.js +15 -3
  61. package/dist/collection/api/Api.js.map +1 -1
  62. package/dist/collection/api/Business.js +50 -0
  63. package/dist/collection/api/Business.js.map +1 -0
  64. package/dist/collection/api/Payment.js.map +1 -1
  65. package/dist/collection/api/Payout.js +9 -0
  66. package/dist/collection/api/Payout.js.map +1 -1
  67. package/dist/collection/api/Proceed.js +42 -0
  68. package/dist/collection/api/Proceed.js.map +1 -0
  69. package/dist/collection/api/shared.js +2 -0
  70. package/dist/collection/api/shared.js.map +1 -0
  71. package/dist/collection/collection-manifest.json +13 -1
  72. package/dist/collection/components/bank-account-form/bank-account-form.js +6 -1
  73. package/dist/collection/components/bank-account-form/bank-account-form.js.map +1 -1
  74. package/dist/collection/components/bank-account-form/bank-account-form.stories.js +8 -0
  75. package/dist/collection/components/bank-account-form/bank-account-form.stories.js.map +1 -1
  76. package/dist/collection/components/business-form/additional-questions/additional-questions.js +59 -0
  77. package/dist/collection/components/business-form/additional-questions/additional-questions.js.map +1 -0
  78. package/dist/collection/components/business-form/business-address/business-address-form.js +1 -1
  79. package/dist/collection/components/business-form/business-address/business-address-form.js.map +1 -1
  80. package/dist/collection/components/business-form/business-address/test/business-address.spec.js +22 -18
  81. package/dist/collection/components/business-form/business-address/test/business-address.spec.js.map +1 -1
  82. package/dist/collection/components/business-form/business-form-schema.js +48 -37
  83. package/dist/collection/components/business-form/business-form-schema.js.map +1 -1
  84. package/dist/collection/components/business-form/business-form.css +5283 -43
  85. package/dist/collection/components/business-form/business-form.js +83 -6
  86. package/dist/collection/components/business-form/business-form.js.map +1 -1
  87. package/dist/collection/components/business-form/{businessForm.stories.js → business-form.stories.js} +8 -8
  88. package/dist/collection/components/business-form/business-form.stories.js.map +1 -0
  89. package/dist/collection/components/business-form/business-generic-info/business-generic-info.js +10 -17
  90. package/dist/collection/components/business-form/business-generic-info/business-generic-info.js.map +1 -1
  91. package/dist/collection/components/business-form/business-owners/business-owners.css +5283 -0
  92. package/dist/collection/components/business-form/business-owners/business-owners.js +48 -37
  93. package/dist/collection/components/business-form/business-owners/business-owners.js.map +1 -1
  94. package/dist/collection/components/business-form/business-representative/business-representative.js +12 -17
  95. package/dist/collection/components/business-form/business-representative/business-representative.js.map +1 -1
  96. package/dist/collection/components/business-form/test/business-form.spec.js +44 -0
  97. package/dist/collection/components/business-form/test/business-form.spec.js.map +1 -0
  98. package/dist/collection/components/business-list/business-list.css +576 -0
  99. package/dist/collection/components/business-list/business-list.js +209 -0
  100. package/dist/collection/components/business-list/business-list.js.map +1 -0
  101. package/dist/collection/components/business-list/business-list.stories.js +68 -0
  102. package/dist/collection/components/business-list/business-list.stories.js.map +1 -0
  103. package/dist/collection/components/business-list/example.js +12 -0
  104. package/dist/collection/components/card-form/card-form.js +6 -1
  105. package/dist/collection/components/card-form/card-form.js.map +1 -1
  106. package/dist/collection/components/card-form/card-form.stories.js +8 -0
  107. package/dist/collection/components/card-form/card-form.stories.js.map +1 -1
  108. package/dist/collection/components/details/details.css +7983 -0
  109. package/dist/collection/components/details/details.js +66 -0
  110. package/dist/collection/components/details/details.js.map +1 -0
  111. package/dist/collection/components/details/utils.js +10 -0
  112. package/dist/collection/components/details/utils.js.map +1 -0
  113. package/dist/collection/components/form/form-control-datepart.js +233 -0
  114. package/dist/collection/components/form/form-control-datepart.js.map +1 -0
  115. package/dist/collection/components/form/form-control-monetary.js +186 -0
  116. package/dist/collection/components/form/form-control-monetary.js.map +1 -0
  117. package/dist/collection/components/form/form-control-number-masked.js +217 -0
  118. package/dist/collection/components/form/form-control-number-masked.js.map +1 -0
  119. package/dist/collection/components/form/form-control-number.css +1818 -0
  120. package/dist/collection/components/form/form-control-number.js +194 -0
  121. package/dist/collection/components/form/form-control-number.js.map +1 -0
  122. package/dist/collection/components/form/form-control-select.css +6 -0
  123. package/dist/collection/components/form/form-control-select.js +36 -4
  124. package/dist/collection/components/form/form-control-select.js.map +1 -1
  125. package/dist/collection/components/form/form-control-text.css +7 -0
  126. package/dist/collection/components/form/form-control-text.js +45 -3
  127. package/dist/collection/components/form/form-control-text.js.map +1 -1
  128. package/dist/collection/components/form/form.js +16 -8
  129. package/dist/collection/components/form/form.js.map +1 -1
  130. package/dist/collection/components/legal-address-form/legal-address-form-schema.js +11 -0
  131. package/dist/collection/components/legal-address-form/legal-address-form-schema.js.map +1 -0
  132. package/dist/collection/components/legal-address-form/legal-address-form.css +2489 -0
  133. package/dist/collection/components/legal-address-form/legal-address-form.js +90 -0
  134. package/dist/collection/components/legal-address-form/legal-address-form.js.map +1 -0
  135. package/dist/collection/components/payment-details/example.js +12 -0
  136. package/dist/collection/components/payment-details/payment-details.css +7983 -0
  137. package/dist/collection/components/payment-details/payment-details.js +129 -0
  138. package/dist/collection/components/payment-details/payment-details.js.map +1 -0
  139. package/dist/collection/components/payment-details/payment-details.stories.js +47 -0
  140. package/dist/collection/components/payment-details/payment-details.stories.js.map +1 -0
  141. package/dist/collection/components/payment-method-form/payment-method-form.css +5 -0
  142. package/dist/collection/components/payment-method-form/payment-method-form.js +25 -35
  143. package/dist/collection/components/payment-method-form/payment-method-form.js.map +1 -1
  144. package/dist/collection/components/payment-method-form/test/payment-method-form.spec.js +7 -7
  145. package/dist/collection/components/payment-method-form/test/payment-method-form.spec.js.map +1 -1
  146. package/dist/collection/components/payments-list/payments-list.css +0 -7380
  147. package/dist/collection/components/payments-list/payments-list.js +69 -43
  148. package/dist/collection/components/payments-list/payments-list.js.map +1 -1
  149. package/dist/collection/components/payments-list/payments-list.stories.js +10 -10
  150. package/dist/collection/components/payments-list/payments-list.stories.js.map +1 -1
  151. package/dist/collection/components/payments-list/test/payments-list.spec.js +3 -54
  152. package/dist/collection/components/payments-list/test/payments-list.spec.js.map +1 -1
  153. package/dist/collection/components/payout-details/example.js +12 -0
  154. package/dist/collection/components/payout-details/payout-details.css +7983 -0
  155. package/dist/collection/components/payout-details/payout-details.js +126 -0
  156. package/dist/collection/components/payout-details/payout-details.js.map +1 -0
  157. package/dist/collection/components/payout-details/payout-details.stories.js +47 -0
  158. package/dist/collection/components/payout-details/payout-details.stories.js.map +1 -0
  159. package/dist/collection/components/payouts-list/example.js +12 -0
  160. package/dist/collection/components/payouts-list/payouts-list.css +0 -7407
  161. package/dist/collection/components/payouts-list/payouts-list.js +82 -48
  162. package/dist/collection/components/payouts-list/payouts-list.js.map +1 -1
  163. package/dist/collection/components/payouts-list/payouts-list.stories.js +10 -10
  164. package/dist/collection/components/payouts-list/payouts-list.stories.js.map +1 -1
  165. package/dist/collection/components/proceeds-list/example.js +12 -0
  166. package/dist/collection/components/proceeds-list/proceeds-list.css +576 -0
  167. package/dist/collection/components/proceeds-list/proceeds-list.js +207 -0
  168. package/dist/collection/components/proceeds-list/proceeds-list.js.map +1 -0
  169. package/dist/collection/components/proceeds-list/proceeds-list.stories.js +69 -0
  170. package/dist/collection/components/proceeds-list/proceeds-list.stories.js.map +1 -0
  171. package/dist/collection/components/table/table-utils.js +8 -0
  172. package/dist/collection/components/table/table-utils.js.map +1 -0
  173. package/dist/collection/components/table/table.css +8077 -0
  174. package/dist/collection/components/table/table.js +215 -0
  175. package/dist/collection/components/table/table.js.map +1 -0
  176. package/dist/collection/components/table/test/table.spec.js +59 -0
  177. package/dist/collection/components/table/test/table.spec.js.map +1 -0
  178. package/dist/collection/utils/country-options.js +202 -0
  179. package/dist/collection/utils/country-options.js.map +1 -0
  180. package/dist/collection/utils/phone-masks.js +4 -0
  181. package/dist/collection/utils/phone-masks.js.map +1 -0
  182. package/dist/collection/utils/utils.js +40 -0
  183. package/dist/collection/utils/utils.js.map +1 -1
  184. package/dist/components/Api.js +15 -3
  185. package/dist/components/Api.js.map +1 -1
  186. package/dist/components/Payout.js +113 -0
  187. package/dist/components/Payout.js.map +1 -0
  188. package/dist/components/additional-questions.js +51 -0
  189. package/dist/components/additional-questions.js.map +1 -0
  190. package/dist/components/business-address-form.js +8 -2
  191. package/dist/components/business-address-form.js.map +1 -1
  192. package/dist/components/business-generic-info.js +61 -35
  193. package/dist/components/business-generic-info.js.map +1 -1
  194. package/dist/components/business-owners.js +52 -36
  195. package/dist/components/business-owners.js.map +1 -1
  196. package/dist/components/business-representative.js +31 -15
  197. package/dist/components/business-representative.js.map +1 -1
  198. package/dist/components/details.js +66 -0
  199. package/dist/components/details.js.map +1 -0
  200. package/dist/components/form-control-datepart.d.ts +11 -0
  201. package/dist/components/form-control-datepart.js +8 -0
  202. package/dist/components/form-control-datepart.js.map +1 -0
  203. package/dist/components/form-control-datepart2.js +97 -0
  204. package/dist/components/form-control-datepart2.js.map +1 -0
  205. package/dist/components/form-control-monetary.d.ts +11 -0
  206. package/dist/components/form-control-monetary.js +8 -0
  207. package/dist/components/form-control-monetary.js.map +1 -0
  208. package/dist/components/form-control-monetary2.js +82 -0
  209. package/dist/components/form-control-monetary2.js.map +1 -0
  210. package/dist/components/form-control-number-masked.d.ts +11 -0
  211. package/dist/components/form-control-number-masked.js +8 -0
  212. package/dist/components/form-control-number-masked.js.map +1 -0
  213. package/dist/components/form-control-number-masked2.js +81 -0
  214. package/dist/components/form-control-number-masked2.js.map +1 -0
  215. package/dist/components/form-control-number.d.ts +11 -0
  216. package/dist/components/form-control-number.js +8 -0
  217. package/dist/components/form-control-number.js.map +1 -0
  218. package/dist/components/form-control-number2.js +70 -0
  219. package/dist/components/form-control-number2.js.map +1 -0
  220. package/dist/components/form-control-select.js +2 -2
  221. package/dist/components/form-control-select2.js +20 -7
  222. package/dist/components/form-control-select2.js.map +1 -1
  223. package/dist/components/form-control-text2.js +23 -4
  224. package/dist/components/form-control-text2.js.map +1 -1
  225. package/dist/components/index.d.ts +6 -0
  226. package/dist/components/index.esm.js +1 -18
  227. package/dist/components/index.esm.js.map +1 -1
  228. package/dist/components/index.js +1 -1
  229. package/dist/components/index2.js +3231 -0
  230. package/dist/components/index2.js.map +1 -0
  231. package/dist/components/justifi-additional-questions.d.ts +11 -0
  232. package/dist/components/justifi-additional-questions.js +8 -0
  233. package/dist/components/justifi-additional-questions.js.map +1 -0
  234. package/dist/components/justifi-bank-account-form.js +2 -0
  235. package/dist/components/justifi-bank-account-form.js.map +1 -1
  236. package/dist/components/justifi-business-form.js +146 -28
  237. package/dist/components/justifi-business-form.js.map +1 -1
  238. package/dist/components/justifi-business-generic-info.js +1 -1
  239. package/dist/components/justifi-business-list.d.ts +11 -0
  240. package/dist/components/justifi-business-list.js +215 -0
  241. package/dist/components/justifi-business-list.js.map +1 -0
  242. package/dist/components/justifi-card-form.js +2 -0
  243. package/dist/components/justifi-card-form.js.map +1 -1
  244. package/dist/components/justifi-details.d.ts +11 -0
  245. package/dist/components/justifi-details.js +8 -0
  246. package/dist/components/justifi-details.js.map +1 -0
  247. package/dist/components/justifi-legal-address-form.d.ts +11 -0
  248. package/dist/components/justifi-legal-address-form.js +8 -0
  249. package/dist/components/justifi-legal-address-form.js.map +1 -0
  250. package/dist/components/justifi-payment-details.d.ts +11 -0
  251. package/dist/components/justifi-payment-details.js +88 -0
  252. package/dist/components/justifi-payment-details.js.map +1 -0
  253. package/dist/components/justifi-payment-form.js +2 -1
  254. package/dist/components/justifi-payment-form.js.map +1 -1
  255. package/dist/components/justifi-payments-list.js +52 -45
  256. package/dist/components/justifi-payments-list.js.map +1 -1
  257. package/dist/components/justifi-payout-details.d.ts +11 -0
  258. package/dist/components/justifi-payout-details.js +86 -0
  259. package/dist/components/justifi-payout-details.js.map +1 -0
  260. package/dist/components/justifi-payouts-list.js +65 -50
  261. package/dist/components/justifi-payouts-list.js.map +1 -1
  262. package/dist/components/justifi-proceeds-list.d.ts +11 -0
  263. package/dist/components/justifi-proceeds-list.js +182 -0
  264. package/dist/components/justifi-proceeds-list.js.map +1 -0
  265. package/dist/components/justifi-table.d.ts +11 -0
  266. package/dist/components/justifi-table.js +8 -0
  267. package/dist/components/justifi-table.js.map +1 -0
  268. package/dist/components/legal-address-form.js +271 -0
  269. package/dist/components/legal-address-form.js.map +1 -0
  270. package/dist/components/payment-method-form.js +1488 -21
  271. package/dist/components/payment-method-form.js.map +1 -1
  272. package/dist/components/phone-masks.js +7 -0
  273. package/dist/components/phone-masks.js.map +1 -0
  274. package/dist/components/table.js +94 -0
  275. package/dist/components/table.js.map +1 -0
  276. package/dist/components/utils.js +41 -102
  277. package/dist/components/utils.js.map +1 -1
  278. package/dist/esm/{Api-436dfa09.js → Api-a95f17ac.js} +16 -4
  279. package/dist/esm/Api-a95f17ac.js.map +1 -0
  280. package/dist/esm/Payout-9a1f2859.js +113 -0
  281. package/dist/esm/Payout-9a1f2859.js.map +1 -0
  282. package/dist/esm/{business-form-schema-30c48693.js → business-form-schema-5885d3d6.js} +40 -22
  283. package/dist/esm/business-form-schema-5885d3d6.js.map +1 -0
  284. package/dist/esm/form-control-datepart_2.entry.js +102 -0
  285. package/dist/esm/form-control-datepart_2.entry.js.map +1 -0
  286. package/dist/esm/form-control-monetary.entry.js +61 -0
  287. package/dist/esm/form-control-monetary.entry.js.map +1 -0
  288. package/dist/esm/{form-control-select_2.entry.js → form-control-number_3.entry.js} +98 -12
  289. package/dist/esm/form-control-number_3.entry.js.map +1 -0
  290. package/dist/esm/form-control-select.entry.js +43 -0
  291. package/dist/esm/form-control-select.entry.js.map +1 -0
  292. package/dist/esm/index-5ed53c20.js +3231 -0
  293. package/dist/esm/index-5ed53c20.js.map +1 -0
  294. package/dist/esm/{index-c8f391de.js → index-fe877d03.js} +10 -7
  295. package/dist/esm/index-fe877d03.js.map +1 -0
  296. package/dist/esm/{index.esm-be2cd327.js → index.esm-89fe6af9.js} +2 -19
  297. package/dist/esm/index.esm-89fe6af9.js.map +1 -0
  298. package/dist/esm/justifi-additional-questions_5.entry.js +388 -0
  299. package/dist/esm/justifi-additional-questions_5.entry.js.map +1 -0
  300. package/dist/esm/justifi-bank-account-form.entry.js +3 -1
  301. package/dist/esm/justifi-bank-account-form.entry.js.map +1 -1
  302. package/dist/esm/justifi-billing-form_2.entry.js +2 -2
  303. package/dist/esm/justifi-business-form.entry.js +98 -16
  304. package/dist/esm/justifi-business-form.entry.js.map +1 -1
  305. package/dist/esm/justifi-business-list.entry.js +185 -0
  306. package/dist/esm/justifi-business-list.entry.js.map +1 -0
  307. package/dist/esm/justifi-card-form.entry.js +3 -1
  308. package/dist/esm/justifi-card-form.entry.js.map +1 -1
  309. package/dist/esm/justifi-details.entry.js +26 -0
  310. package/dist/esm/justifi-details.entry.js.map +1 -0
  311. package/dist/esm/justifi-payment-details.entry.js +59 -0
  312. package/dist/esm/justifi-payment-details.entry.js.map +1 -0
  313. package/dist/esm/justifi-payment-form.entry.js +3 -2
  314. package/dist/esm/justifi-payment-form.entry.js.map +1 -1
  315. package/dist/esm/justifi-payment-method-form.entry.js +1487 -19
  316. package/dist/esm/justifi-payment-method-form.entry.js.map +1 -1
  317. package/dist/esm/justifi-payments-list.entry.js +47 -45
  318. package/dist/esm/justifi-payments-list.entry.js.map +1 -1
  319. package/dist/esm/justifi-payout-details.entry.js +57 -0
  320. package/dist/esm/justifi-payout-details.entry.js.map +1 -0
  321. package/dist/esm/justifi-payouts-list.entry.js +60 -50
  322. package/dist/esm/justifi-payouts-list.entry.js.map +1 -1
  323. package/dist/esm/justifi-proceeds-list.entry.js +152 -0
  324. package/dist/esm/justifi-proceeds-list.entry.js.map +1 -0
  325. package/dist/esm/justifi-table.entry.js +64 -0
  326. package/dist/esm/justifi-table.entry.js.map +1 -0
  327. package/dist/esm/loader.js +3 -3
  328. package/dist/esm/select-input_2.entry.js +1 -1
  329. package/dist/esm/table-utils-6cdcaa8c.js +11 -0
  330. package/dist/esm/table-utils-6cdcaa8c.js.map +1 -0
  331. package/dist/esm/utils-1e7d6279.js +28 -0
  332. package/dist/esm/utils-1e7d6279.js.map +1 -0
  333. package/dist/esm/{utils-e7782126.js → utils-ad0bbe03.js} +42 -103
  334. package/dist/esm/utils-ad0bbe03.js.map +1 -0
  335. package/dist/esm/webcomponents.js +4 -4
  336. package/dist/esm/webcomponents.js.map +1 -1
  337. package/dist/types/api/Api.d.ts +1 -1
  338. package/dist/types/api/Business.d.ts +133 -0
  339. package/dist/types/api/Payment.d.ts +1 -0
  340. package/dist/types/api/Payout.d.ts +10 -12
  341. package/dist/types/api/Proceed.d.ts +60 -0
  342. package/dist/types/api/shared.d.ts +11 -0
  343. package/dist/types/components/bank-account-form/bank-account-form.stories.d.ts +6 -0
  344. package/dist/types/components/business-form/additional-questions/additional-questions.d.ts +15 -0
  345. package/dist/types/components/business-form/business-form-schema.d.ts +47 -21
  346. package/dist/types/components/business-form/business-form.d.ts +7 -2
  347. package/dist/types/components/business-form/business-generic-info/business-generic-info.d.ts +1 -2
  348. package/dist/types/components/business-form/business-owners/business-owners.d.ts +3 -2
  349. package/dist/types/components/business-form/business-representative/business-representative.d.ts +1 -2
  350. package/dist/types/components/business-list/business-list.d.ts +35 -0
  351. package/dist/types/components/business-list/business-list.stories.d.ts +9 -0
  352. package/dist/types/components/card-form/card-form.stories.d.ts +6 -0
  353. package/dist/types/components/details/details.d.ts +7 -0
  354. package/dist/types/components/details/utils.d.ts +19 -0
  355. package/dist/types/components/form/form-control-datepart.d.ts +19 -0
  356. package/dist/types/components/form/form-control-monetary.d.ts +17 -0
  357. package/dist/types/components/form/form-control-number-masked.d.ts +19 -0
  358. package/dist/types/components/form/form-control-number.d.ts +18 -0
  359. package/dist/types/components/form/form-control-select.d.ts +6 -1
  360. package/dist/types/components/form/form-control-text.d.ts +6 -0
  361. package/dist/types/components/form/form.d.ts +5 -4
  362. package/dist/types/components/legal-address-form/legal-address-form-schema.d.ts +17 -0
  363. package/dist/types/components/legal-address-form/legal-address-form.d.ts +16 -0
  364. package/dist/types/components/payment-details/payment-details.d.ts +28 -0
  365. package/dist/types/components/payment-details/payment-details.stories.d.ts +8 -0
  366. package/dist/types/components/payment-method-form/payment-method-form.d.ts +1 -3
  367. package/dist/types/components/payments-list/payments-list.d.ts +6 -14
  368. package/dist/types/components/payments-list/payments-list.stories.d.ts +1 -8
  369. package/dist/types/components/payout-details/payout-details.d.ts +28 -0
  370. package/dist/types/components/payout-details/payout-details.stories.d.ts +8 -0
  371. package/dist/types/components/payouts-list/payouts-list.d.ts +7 -15
  372. package/dist/types/components/payouts-list/payouts-list.stories.d.ts +1 -8
  373. package/dist/types/components/proceeds-list/proceeds-list.d.ts +37 -0
  374. package/dist/types/components/proceeds-list/proceeds-list.stories.d.ts +9 -0
  375. package/dist/types/components/table/table-utils.d.ts +14 -0
  376. package/dist/types/components/table/table.d.ts +28 -0
  377. package/dist/types/components.d.ts +637 -12
  378. package/dist/types/stencil-public-runtime.d.ts +2 -0
  379. package/dist/types/utils/country-options.d.ts +5 -0
  380. package/dist/types/utils/phone-masks.d.ts +3 -0
  381. package/dist/types/utils/utils.d.ts +2 -0
  382. package/dist/webcomponents/{p-1953797f.entry.js → p-1beaaba3.entry.js} +2 -2
  383. package/dist/webcomponents/{p-33d69eb5.entry.js → p-2b6f5e35.entry.js} +2 -2
  384. package/dist/webcomponents/p-2b6f5e35.entry.js.map +1 -0
  385. package/dist/webcomponents/p-2c2cde2d.js +2 -0
  386. package/dist/webcomponents/p-2c2cde2d.js.map +1 -0
  387. package/dist/webcomponents/p-2e66512d.entry.js +2 -0
  388. package/dist/webcomponents/p-2e66512d.entry.js.map +1 -0
  389. package/dist/webcomponents/p-640bfa9f.entry.js +2 -0
  390. package/dist/webcomponents/p-640bfa9f.entry.js.map +1 -0
  391. package/dist/webcomponents/p-641883b2.entry.js +2 -0
  392. package/dist/webcomponents/p-641883b2.entry.js.map +1 -0
  393. package/dist/webcomponents/p-6d549d84.entry.js +2 -0
  394. package/dist/webcomponents/p-6d549d84.entry.js.map +1 -0
  395. package/dist/webcomponents/p-75292cca.entry.js +2 -0
  396. package/dist/webcomponents/p-75292cca.entry.js.map +1 -0
  397. package/dist/webcomponents/p-7d6c309d.entry.js +2 -0
  398. package/dist/webcomponents/p-7d6c309d.entry.js.map +1 -0
  399. package/dist/webcomponents/p-8f421dc6.js +2 -0
  400. package/dist/webcomponents/p-8f421dc6.js.map +1 -0
  401. package/dist/webcomponents/p-9346ae33.js +2 -0
  402. package/dist/webcomponents/p-9346ae33.js.map +1 -0
  403. package/dist/webcomponents/p-a2aae7c9.entry.js +2 -0
  404. package/dist/webcomponents/p-a2aae7c9.entry.js.map +1 -0
  405. package/dist/webcomponents/{p-23e9c7d4.entry.js → p-a922b908.entry.js} +2 -2
  406. package/dist/webcomponents/p-ab0756ff.js +2 -0
  407. package/dist/webcomponents/p-ab0756ff.js.map +1 -0
  408. package/dist/webcomponents/{p-0fd4aae2.js → p-c46241ba.js} +2 -2
  409. package/dist/webcomponents/p-c46241ba.js.map +1 -0
  410. package/dist/webcomponents/p-ccb0e1c5.js +2 -0
  411. package/dist/webcomponents/p-ccb0e1c5.js.map +1 -0
  412. package/dist/webcomponents/{p-d5cadc78.entry.js → p-cd0eca25.entry.js} +2 -2
  413. package/dist/webcomponents/{p-d5cadc78.entry.js.map → p-cd0eca25.entry.js.map} +1 -1
  414. package/dist/webcomponents/{p-7041a637.entry.js → p-d92116e6.entry.js} +2 -2
  415. package/dist/webcomponents/{p-7041a637.entry.js.map → p-d92116e6.entry.js.map} +1 -1
  416. package/dist/webcomponents/p-da4e6389.entry.js +2 -0
  417. package/dist/webcomponents/p-da4e6389.entry.js.map +1 -0
  418. package/dist/webcomponents/p-db9945b1.entry.js +2 -0
  419. package/dist/webcomponents/p-db9945b1.entry.js.map +1 -0
  420. package/dist/webcomponents/p-e1f6c8ec.entry.js +2 -0
  421. package/dist/webcomponents/p-e1f6c8ec.entry.js.map +1 -0
  422. package/dist/webcomponents/p-e6695628.js +2 -0
  423. package/dist/webcomponents/p-e6695628.js.map +1 -0
  424. package/dist/webcomponents/p-e70b2a21.js +3 -0
  425. package/dist/webcomponents/p-e70b2a21.js.map +1 -0
  426. package/dist/webcomponents/p-ee32a236.entry.js +2 -0
  427. package/dist/webcomponents/p-ee32a236.entry.js.map +1 -0
  428. package/dist/webcomponents/p-f6cc37a6.entry.js +2 -0
  429. package/dist/webcomponents/{p-309a886f.entry.js.map → p-f6cc37a6.entry.js.map} +1 -1
  430. package/dist/webcomponents/p-f72c3084.entry.js +2 -0
  431. package/dist/webcomponents/p-f72c3084.entry.js.map +1 -0
  432. package/dist/webcomponents/p-f8067330.entry.js +2 -0
  433. package/dist/webcomponents/p-f8067330.entry.js.map +1 -0
  434. package/dist/webcomponents/p-f9e127a5.js +2 -0
  435. package/dist/webcomponents/p-f9e127a5.js.map +1 -0
  436. package/dist/webcomponents/p-fe2ec58b.entry.js +2 -0
  437. package/dist/webcomponents/p-fe2ec58b.entry.js.map +1 -0
  438. package/dist/webcomponents/webcomponents.esm.js +1 -1
  439. package/dist/webcomponents/webcomponents.esm.js.map +1 -1
  440. package/package.json +8 -5
  441. package/dist/cjs/Api-7303478d.js.map +0 -1
  442. package/dist/cjs/business-form-schema-63b311b2.js.map +0 -1
  443. package/dist/cjs/form-control-select_2.cjs.entry.js.map +0 -1
  444. package/dist/cjs/index-83b2ec02.js.map +0 -1
  445. package/dist/cjs/index.esm-7e12ce07.js.map +0 -1
  446. package/dist/cjs/justifi-business-address-form.cjs.entry.js +0 -37
  447. package/dist/cjs/justifi-business-address-form.cjs.entry.js.map +0 -1
  448. package/dist/cjs/justifi-business-generic-info_3.cjs.entry.js +0 -148
  449. package/dist/cjs/justifi-business-generic-info_3.cjs.entry.js.map +0 -1
  450. package/dist/cjs/utils-4ee7e080.js.map +0 -1
  451. package/dist/collection/components/business-form/businessForm.stories.js.map +0 -1
  452. package/dist/esm/Api-436dfa09.js.map +0 -1
  453. package/dist/esm/business-form-schema-30c48693.js.map +0 -1
  454. package/dist/esm/form-control-select_2.entry.js.map +0 -1
  455. package/dist/esm/index-c8f391de.js.map +0 -1
  456. package/dist/esm/index.esm-be2cd327.js.map +0 -1
  457. package/dist/esm/justifi-business-address-form.entry.js +0 -33
  458. package/dist/esm/justifi-business-address-form.entry.js.map +0 -1
  459. package/dist/esm/justifi-business-generic-info_3.entry.js +0 -142
  460. package/dist/esm/justifi-business-generic-info_3.entry.js.map +0 -1
  461. package/dist/esm/utils-e7782126.js.map +0 -1
  462. package/dist/webcomponents/p-0fd4aae2.js.map +0 -1
  463. package/dist/webcomponents/p-1a1f2196.js +0 -2
  464. package/dist/webcomponents/p-1a1f2196.js.map +0 -1
  465. package/dist/webcomponents/p-309a886f.entry.js +0 -2
  466. package/dist/webcomponents/p-33d69eb5.entry.js.map +0 -1
  467. package/dist/webcomponents/p-3a80a2ec.entry.js +0 -2
  468. package/dist/webcomponents/p-3a80a2ec.entry.js.map +0 -1
  469. package/dist/webcomponents/p-45fea6a8.entry.js +0 -2
  470. package/dist/webcomponents/p-45fea6a8.entry.js.map +0 -1
  471. package/dist/webcomponents/p-79456add.js +0 -2
  472. package/dist/webcomponents/p-79456add.js.map +0 -1
  473. package/dist/webcomponents/p-af080b21.js +0 -2
  474. package/dist/webcomponents/p-af080b21.js.map +0 -1
  475. package/dist/webcomponents/p-bc969904.js +0 -3
  476. package/dist/webcomponents/p-bc969904.js.map +0 -1
  477. package/dist/webcomponents/p-cd097ce9.entry.js +0 -2
  478. package/dist/webcomponents/p-cd097ce9.entry.js.map +0 -1
  479. package/dist/webcomponents/p-d5bc9f22.entry.js +0 -2
  480. package/dist/webcomponents/p-d5bc9f22.entry.js.map +0 -1
  481. package/dist/webcomponents/p-dd1ebc0b.entry.js +0 -2
  482. package/dist/webcomponents/p-dd1ebc0b.entry.js.map +0 -1
  483. package/dist/webcomponents/p-e05e0c6b.entry.js +0 -2
  484. package/dist/webcomponents/p-e05e0c6b.entry.js.map +0 -1
  485. /package/dist/types/components/business-form/{businessForm.stories.d.ts → business-form.stories.d.ts} +0 -0
  486. /package/dist/webcomponents/{p-1953797f.entry.js.map → p-1beaaba3.entry.js.map} +0 -0
  487. /package/dist/webcomponents/{p-23e9c7d4.entry.js.map → p-a922b908.entry.js.map} +0 -0
@@ -0,0 +1,66 @@
1
+ import { Host, h } from "@stencil/core";
2
+ import { ErrorState } from "./utils";
3
+ export class Details {
4
+ constructor() {
5
+ this.errorMessage = undefined;
6
+ this.entity = undefined;
7
+ }
8
+ render() {
9
+ var _a, _b;
10
+ return (h(Host, { exportParts: 'detail-loading-spinner,detail-loading-state,detail-empty-state,\n detail-head,detail-title,detail-head-info,detail-head-info-item,\n detail-head-info-item-title,detail-head-info-item-data,detail-metadata,detail-metadata-title,\n detail-section,detail-section-title,detail-section-item-title,detail-section-item-data' }, this.errorMessage ?
11
+ ErrorState(this.errorMessage)
12
+ :
13
+ h("main", { class: "p-2" }, h("slot", { name: "head-info" }), h("slot", { name: 'detail-sections' }), ((_a = this.entity) === null || _a === void 0 ? void 0 : _a.metadata) && Object.keys((_b = this.entity) === null || _b === void 0 ? void 0 : _b.metadata).length ?
14
+ h("div", { class: "mt-4" }, h("h2", { part: "detail-metadata-title", class: "fs-3" }, "Metadata"), h("hr", null), h("pre", { part: "detail-metadata", class: "p-2", "aria-label": "metadata content" }, h("code", null, JSON.stringify(this.entity.metadata, null, 2))))
15
+ : null)));
16
+ }
17
+ static get is() { return "justifi-details"; }
18
+ static get encapsulation() { return "shadow"; }
19
+ static get originalStyleUrls() {
20
+ return {
21
+ "$": ["./details.scss"]
22
+ };
23
+ }
24
+ static get styleUrls() {
25
+ return {
26
+ "$": ["details.css"]
27
+ };
28
+ }
29
+ static get properties() {
30
+ return {
31
+ "errorMessage": {
32
+ "type": "string",
33
+ "mutable": false,
34
+ "complexType": {
35
+ "original": "string",
36
+ "resolved": "string",
37
+ "references": {}
38
+ },
39
+ "required": false,
40
+ "optional": false,
41
+ "docs": {
42
+ "tags": [],
43
+ "text": ""
44
+ },
45
+ "attribute": "error-message",
46
+ "reflect": false
47
+ },
48
+ "entity": {
49
+ "type": "unknown",
50
+ "mutable": false,
51
+ "complexType": {
52
+ "original": "{ metadata: any }",
53
+ "resolved": "{ metadata: any; }",
54
+ "references": {}
55
+ },
56
+ "required": false,
57
+ "optional": false,
58
+ "docs": {
59
+ "tags": [],
60
+ "text": ""
61
+ }
62
+ }
63
+ };
64
+ }
65
+ }
66
+ //# sourceMappingURL=details.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"details.js","sourceRoot":"","sources":["../../../../src/components/details/details.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAQrC,MAAM,OAAO,OAAO;;;;;EAIlB,MAAM;;IACJ,OAAO,CACL,EAAC,IAAI,IACH,WAAW,EAAC,kVAG2E,IAGrF,IAAI,CAAC,YAAY,CAAC,CAAC;MACjB,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC;MAC7B,CAAC;QACD,YAAM,KAAK,EAAC,KAAK;UACf,YAAM,IAAI,EAAC,WAAW,GAAG;UACzB,YAAM,IAAI,EAAC,iBAAiB,GAAG;UAC9B,CAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,QAAQ,KAAI,MAAM,CAAC,IAAI,CAAC,MAAA,IAAI,CAAC,MAAM,0CAAE,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;YACnE,WAAK,KAAK,EAAC,MAAM;cACf,UAAI,IAAI,EAAC,uBAAuB,EAAC,KAAK,EAAC,MAAM,eAAc;cAC3D,aAAM;cACN,WAAK,IAAI,EAAC,iBAAiB,EAAC,KAAK,EAAC,KAAK,gBAAY,kBAAkB;gBACnE,gBACG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CACzC,CACH,CACF;YACN,CAAC,CAAC,IAAI,CAEH,CAEN,CACR,CAAA;EACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop } from '@stencil/core';\nimport { ErrorState } from './utils';\n\n@Component({\n tag: 'justifi-details',\n styleUrl: './details.scss',\n shadow: true,\n})\n\nexport class Details {\n @Prop() errorMessage: string;\n @Prop() entity: { metadata: any };\n\n render() {\n return (\n <Host\n exportParts='detail-loading-spinner,detail-loading-state,detail-empty-state,\n detail-head,detail-title,detail-head-info,detail-head-info-item,\n detail-head-info-item-title,detail-head-info-item-data,detail-metadata,detail-metadata-title,\n detail-section,detail-section-title,detail-section-item-title,detail-section-item-data'\n >\n {\n this.errorMessage ?\n ErrorState(this.errorMessage)\n :\n <main class=\"p-2\">\n <slot name=\"head-info\" />\n <slot name='detail-sections' />\n {this.entity?.metadata && Object.keys(this.entity?.metadata).length ?\n <div class=\"mt-4\">\n <h2 part=\"detail-metadata-title\" class=\"fs-3\">Metadata</h2>\n <hr />\n <pre part=\"detail-metadata\" class=\"p-2\" aria-label=\"metadata content\">\n <code>\n {JSON.stringify(this.entity.metadata, null, 2)}\n </code>\n </pre>\n </div>\n : null\n }\n </main>\n }\n </Host>\n )\n }\n}\n"]}
@@ -0,0 +1,10 @@
1
+ import { h } from "@stencil/core";
2
+ export const LoadingState = h("main", { part: 'detail-loading-state', class: "p-2 d-flex justify-content-center" }, h("div", { part: 'detail-loading-spinner', class: "spinner-border spinner-border-sm", role: "status" }, h("span", { class: "visually-hidden" }, "Loading...")));
3
+ export const ErrorState = (errorMessage) => h("main", { part: 'detail-empty-state', class: "p-2 d-flex justify-content-center" }, h("div", null, errorMessage));
4
+ export const DetailSection = ({ sectionTitle }, children) => h("div", { part: "detail-section", class: "p-2 mt-4" }, h("h5", { part: "detail-section-title" }, sectionTitle), h("hr", null), h("div", { class: "d-flex flex-column justify-content-center gap-2 text-nowrap" }, children));
5
+ export const DetailItem = ({ title, value }) => (title && value) ?
6
+ h("div", { class: "d-flex gap-2" }, h("span", { part: "detail-section-item-title", class: "fw-bold col-3" }, title), h("span", { part: "detail-section-item-data", innerHTML: value }))
7
+ : null;
8
+ export const EntityHeadInfoItem = ({ title, value, classes }) => h("div", { part: "detail-head-info-item", class: `d-flex flex-column ${classes}` }, h("span", { part: "detail-head-info-item-title", class: "fw-bold border-1 border-bottom ps-2 pe-2" }, title), h("span", { part: "detail-head-info-item-data", class: "pt-2 ps-2 pe-2" }, value));
9
+ export const EntityHeadInfo = ({ title, slot, badge }, children) => h("div", { slot: slot, part: 'detail-head', class: "p-2" }, h("div", { class: "d-flex flex-row align-items-center gap-2 mb-2" }, h("h1", { class: "m-0", part: 'detail-title' }, title), badge), h("div", { part: "detail-head-info", class: "d-flex flex-row align-items-top" }, children));
10
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/components/details/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC,MAAM,CAAC,MAAM,YAAY,GACvB,YAAM,IAAI,EAAC,sBAAsB,EAAC,KAAK,EAAC,mCAAmC;EACzE,WAAK,IAAI,EAAC,wBAAwB,EAAC,KAAK,EAAC,kCAAkC,EAAC,IAAI,EAAC,QAAQ;IACvF,YAAM,KAAK,EAAC,iBAAiB,iBAAkB,CAC3C,CACD,CAAA;AAET,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,YAAoB,EAAE,EAAE,CACjD,YAAM,IAAI,EAAC,oBAAoB,EAAC,KAAK,EAAC,mCAAmC;EACvE,eAAM,YAAY,CAAO,CACpB,CAAA;AAET,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAE,YAAY,EAA4B,EAAE,QAAQ,EAAE,EAAE,CACpF,WAAK,IAAI,EAAC,gBAAgB,EAAC,KAAK,EAAC,UAAU;EACzC,UAAI,IAAI,EAAC,sBAAsB,IAAE,YAAY,CAAM;EACnD,aAAK;EACL,WAAK,KAAK,EAAC,6DAA6D,IACrE,QAAQ,CACL,CACF,CAAA;AAER,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,EAAoC,EAAE,EAAE,CAC/E,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;EAChB,WAAK,KAAK,EAAC,cAAc;IACvB,YAAM,IAAI,EAAC,2BAA2B,EAAC,KAAK,EAAC,eAAe,IAAE,KAAK,CAAQ;IAC3E,YAAM,IAAI,EAAC,0BAA0B,EAAC,SAAS,EAAE,KAAK,GAAS,CAC3D;EACR,CAAC,CAAC,IAAI,CAAA;AAGR,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAgD,EAAE,EAAE,CAC3G,WAAK,IAAI,EAAC,uBAAuB,EAAC,KAAK,EAAE,sBAAsB,OAAO,EAAE;EACtE,YAAM,IAAI,EAAC,6BAA6B,EAAC,KAAK,EAAC,0CAA0C,IAAE,KAAK,CAAQ;EACxG,YAAM,IAAI,EAAC,4BAA4B,EAAC,KAAK,EAAC,gBAAgB,IAAE,KAAK,CAAQ,CACzE,CAAA;AAER,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAC,EAAE,QAAQ,EAAE,EAAE,CAC/D,WAAK,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,aAAa,EAAC,KAAK,EAAC,KAAK;EAC7C,WAAK,KAAK,EAAC,+CAA+C;IACxD,UAAI,KAAK,EAAC,KAAK,EAAC,IAAI,EAAC,cAAc,IAAE,KAAK,CAAM;IAC/C,KAAK,CACF;EACN,WAAK,IAAI,EAAC,kBAAkB,EAAC,KAAK,EAAC,iCAAiC,IACjE,QAAQ,CACL,CACF,CAAA","sourcesContent":["import { h } from \"@stencil/core\";\n\nexport const LoadingState =\n <main part='detail-loading-state' class=\"p-2 d-flex justify-content-center\">\n <div part='detail-loading-spinner' class=\"spinner-border spinner-border-sm\" role=\"status\">\n <span class=\"visually-hidden\">Loading...</span>\n </div>\n </main>\n\nexport const ErrorState = (errorMessage: string) =>\n <main part='detail-empty-state' class=\"p-2 d-flex justify-content-center\">\n <div>{errorMessage}</div>\n </main>\n\nexport const DetailSection = ({ sectionTitle }: { sectionTitle: string }, children) =>\n <div part=\"detail-section\" class=\"p-2 mt-4\">\n <h5 part=\"detail-section-title\">{sectionTitle}</h5>\n <hr/>\n <div class=\"d-flex flex-column justify-content-center gap-2 text-nowrap\">\n {children}\n </div>\n </div>\n\nexport const DetailItem = ({ title, value }: { title: string, value: string }) =>\n (title && value) ?\n <div class=\"d-flex gap-2\">\n <span part=\"detail-section-item-title\" class=\"fw-bold col-3\">{title}</span>\n <span part=\"detail-section-item-data\" innerHTML={value}></span>\n </div>\n : null\n\n\nexport const EntityHeadInfoItem = ({title, value, classes}: {title: string, value: any, classes?: string}) =>\n <div part=\"detail-head-info-item\" class={`d-flex flex-column ${classes}`}>\n <span part=\"detail-head-info-item-title\" class=\"fw-bold border-1 border-bottom ps-2 pe-2\">{title}</span>\n <span part=\"detail-head-info-item-data\" class=\"pt-2 ps-2 pe-2\">{value}</span>\n </div>\n\nexport const EntityHeadInfo = ({title, slot, badge}, children) =>\n <div slot={slot} part='detail-head' class=\"p-2\">\n <div class=\"d-flex flex-row align-items-center gap-2 mb-2\">\n <h1 class=\"m-0\" part='detail-title'>{title}</h1>\n {badge}\n </div>\n <div part=\"detail-head-info\" class=\"d-flex flex-row align-items-top\">\n {children}\n </div>\n </div>\n"]}
@@ -0,0 +1,233 @@
1
+ import { Host, h, } from "@stencil/core";
2
+ import IMask from "imask";
3
+ export class DatePartInput {
4
+ constructor() {
5
+ this.imask = null;
6
+ this.label = undefined;
7
+ this.name = undefined;
8
+ this.error = undefined;
9
+ this.defaultValue = undefined;
10
+ this.type = undefined;
11
+ this.inputHandler = undefined;
12
+ this.disabled = undefined;
13
+ }
14
+ handleDefaultValueChange(newValue) {
15
+ this.updateInput(newValue);
16
+ }
17
+ componentDidLoad() {
18
+ if (this.textInput) {
19
+ let maskOptions;
20
+ switch (this.type) {
21
+ case 'day':
22
+ maskOptions = { mask: Number, min: 1, max: 31 };
23
+ break;
24
+ case 'month':
25
+ maskOptions = { mask: Number, min: 1, max: 12 };
26
+ break;
27
+ case 'year':
28
+ maskOptions = {
29
+ mask: Number,
30
+ min: 1900,
31
+ max: new Date().getFullYear(),
32
+ };
33
+ break;
34
+ default:
35
+ throw new Error('Invalid type prop');
36
+ }
37
+ this.imask = IMask(this.textInput, maskOptions);
38
+ this.imask.on('accept', () => {
39
+ const rawValue = this.imask.unmaskedValue;
40
+ this.inputHandler(this.name, rawValue);
41
+ });
42
+ this.textInput.addEventListener('blur', () => {
43
+ this.formControlBlur.emit();
44
+ });
45
+ this.updateInput(this.defaultValue);
46
+ }
47
+ }
48
+ updateInput(newValue) {
49
+ if (this.imask) {
50
+ this.imask.value = newValue;
51
+ }
52
+ }
53
+ disconnectedCallback() {
54
+ var _a;
55
+ (_a = this.imask) === null || _a === void 0 ? void 0 : _a.destroy();
56
+ }
57
+ render() {
58
+ return (h(Host, { exportparts: "label,input,input-invalid" }, h("label", { part: "label", class: "form-label", htmlFor: this.name }, this.label), h("input", { ref: el => (this.textInput = el), id: this.name, name: this.name, onBlur: () => this.formControlBlur.emit(), part: `input ${this.error && 'input-invalid'}`, class: this.error ? 'form-control is-invalid' : 'form-control', type: "text", disabled: this.disabled }), this.error && h("div", { class: "invalid-feedback" }, this.error)));
59
+ }
60
+ static get is() { return "form-control-datepart"; }
61
+ static get encapsulation() { return "shadow"; }
62
+ static get originalStyleUrls() {
63
+ return {
64
+ "$": ["form-control-number.scss"]
65
+ };
66
+ }
67
+ static get styleUrls() {
68
+ return {
69
+ "$": ["form-control-number.css"]
70
+ };
71
+ }
72
+ static get properties() {
73
+ return {
74
+ "label": {
75
+ "type": "string",
76
+ "mutable": false,
77
+ "complexType": {
78
+ "original": "string",
79
+ "resolved": "string",
80
+ "references": {}
81
+ },
82
+ "required": false,
83
+ "optional": false,
84
+ "docs": {
85
+ "tags": [],
86
+ "text": ""
87
+ },
88
+ "attribute": "label",
89
+ "reflect": false
90
+ },
91
+ "name": {
92
+ "type": "string",
93
+ "mutable": false,
94
+ "complexType": {
95
+ "original": "string",
96
+ "resolved": "string",
97
+ "references": {}
98
+ },
99
+ "required": false,
100
+ "optional": false,
101
+ "docs": {
102
+ "tags": [],
103
+ "text": ""
104
+ },
105
+ "attribute": "name",
106
+ "reflect": false
107
+ },
108
+ "error": {
109
+ "type": "string",
110
+ "mutable": false,
111
+ "complexType": {
112
+ "original": "string",
113
+ "resolved": "string",
114
+ "references": {}
115
+ },
116
+ "required": false,
117
+ "optional": false,
118
+ "docs": {
119
+ "tags": [],
120
+ "text": ""
121
+ },
122
+ "attribute": "error",
123
+ "reflect": false
124
+ },
125
+ "defaultValue": {
126
+ "type": "string",
127
+ "mutable": false,
128
+ "complexType": {
129
+ "original": "string",
130
+ "resolved": "string",
131
+ "references": {}
132
+ },
133
+ "required": false,
134
+ "optional": false,
135
+ "docs": {
136
+ "tags": [],
137
+ "text": ""
138
+ },
139
+ "attribute": "default-value",
140
+ "reflect": false
141
+ },
142
+ "type": {
143
+ "type": "string",
144
+ "mutable": false,
145
+ "complexType": {
146
+ "original": "'day' | 'month' | 'year'",
147
+ "resolved": "\"day\" | \"month\" | \"year\"",
148
+ "references": {}
149
+ },
150
+ "required": false,
151
+ "optional": false,
152
+ "docs": {
153
+ "tags": [],
154
+ "text": ""
155
+ },
156
+ "attribute": "type",
157
+ "reflect": false
158
+ },
159
+ "inputHandler": {
160
+ "type": "unknown",
161
+ "mutable": false,
162
+ "complexType": {
163
+ "original": "(name: string, value: string) => void",
164
+ "resolved": "(name: string, value: string) => void",
165
+ "references": {}
166
+ },
167
+ "required": false,
168
+ "optional": false,
169
+ "docs": {
170
+ "tags": [],
171
+ "text": ""
172
+ }
173
+ },
174
+ "disabled": {
175
+ "type": "boolean",
176
+ "mutable": false,
177
+ "complexType": {
178
+ "original": "boolean",
179
+ "resolved": "boolean",
180
+ "references": {}
181
+ },
182
+ "required": false,
183
+ "optional": false,
184
+ "docs": {
185
+ "tags": [],
186
+ "text": ""
187
+ },
188
+ "attribute": "disabled",
189
+ "reflect": false
190
+ }
191
+ };
192
+ }
193
+ static get events() {
194
+ return [{
195
+ "method": "formControlInput",
196
+ "name": "formControlInput",
197
+ "bubbles": true,
198
+ "cancelable": true,
199
+ "composed": true,
200
+ "docs": {
201
+ "tags": [],
202
+ "text": ""
203
+ },
204
+ "complexType": {
205
+ "original": "any",
206
+ "resolved": "any",
207
+ "references": {}
208
+ }
209
+ }, {
210
+ "method": "formControlBlur",
211
+ "name": "formControlBlur",
212
+ "bubbles": true,
213
+ "cancelable": true,
214
+ "composed": true,
215
+ "docs": {
216
+ "tags": [],
217
+ "text": ""
218
+ },
219
+ "complexType": {
220
+ "original": "any",
221
+ "resolved": "any",
222
+ "references": {}
223
+ }
224
+ }];
225
+ }
226
+ static get watchers() {
227
+ return [{
228
+ "propName": "defaultValue",
229
+ "methodName": "handleDefaultValueChange"
230
+ }];
231
+ }
232
+ }
233
+ //# sourceMappingURL=form-control-datepart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-control-datepart.js","sourceRoot":"","sources":["../../../../src/components/form/form-control-datepart.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,KAAoB,MAAM,OAAO,CAAC;AAOzC,MAAM,OAAO,aAAa;;IAShB,UAAK,GAA0B,IAAI,CAAC;;;;;;;;;EAQ5C,wBAAwB,CAAC,QAAgB;IACvC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;EAC7B,CAAC;EAED,gBAAgB;IACd,IAAI,IAAI,CAAC,SAAS,EAAE;MAClB,IAAI,WAAW,CAAC;MAEhB,QAAQ,IAAI,CAAC,IAAI,EAAE;QACjB,KAAK,KAAK;UACR,WAAW,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;UAChD,MAAM;QACR,KAAK,OAAO;UACV,WAAW,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;UAChD,MAAM;QACR,KAAK,MAAM;UACT,WAAW,GAAG;YACZ,IAAI,EAAE,MAAM;YACZ,GAAG,EAAE,IAAI;YACT,GAAG,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;WAC9B,CAAC;UACF,MAAM;QACR;UACE,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;OACxC;MAED,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;MAEhD,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;QAC3B,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;QAC1C,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;MACzC,CAAC,CAAC,CAAC;MAEH,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE;QAC3C,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;MAC9B,CAAC,CAAC,CAAC;MAEH,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;KACrC;EACH,CAAC;EAED,WAAW,CAAC,QAAa;IACvB,IAAI,IAAI,CAAC,KAAK,EAAE;MACd,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,QAAQ,CAAC;KAC7B;EACH,CAAC;EAED,oBAAoB;;IAClB,MAAA,IAAI,CAAC,KAAK,0CAAE,OAAO,EAAE,CAAC;EACxB,CAAC;EAED,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,IAAC,WAAW,EAAC,2BAA2B;MAC3C,aAAO,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,YAAY,EAAC,OAAO,EAAE,IAAI,CAAC,IAAI,IACtD,IAAI,CAAC,KAAK,CACL;MACR,aACE,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,EAAsB,CAAC,EACpD,EAAE,EAAE,IAAI,CAAC,IAAI,EACb,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,EACzC,IAAI,EAAE,SAAS,IAAI,CAAC,KAAK,IAAI,eAAe,EAAE,EAC9C,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,cAAc,EAC9D,IAAI,EAAC,MAAM,EACX,QAAQ,EAAE,IAAI,CAAC,QAAQ,GACvB;MACD,IAAI,CAAC,KAAK,IAAI,WAAK,KAAK,EAAC,kBAAkB,IAAE,IAAI,CAAC,KAAK,CAAO,CAC1D,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Watch,\n} from '@stencil/core';\nimport IMask, { InputMask } from 'imask';\n\n@Component({\n tag: 'form-control-datepart',\n styleUrl: 'form-control-number.scss',\n shadow: true,\n})\nexport class DatePartInput {\n @Prop() label: string;\n @Prop() name: string;\n @Prop() error: string;\n @Prop() defaultValue: string;\n @Prop() type: 'day' | 'month' | 'year';\n @Prop() inputHandler: (name: string, value: string) => void;\n @Prop() disabled: boolean;\n\n private imask: InputMask<any> | null = null;\n\n textInput!: HTMLInputElement;\n\n @Event() formControlInput: EventEmitter<any>;\n @Event() formControlBlur: EventEmitter<any>;\n\n @Watch('defaultValue')\n handleDefaultValueChange(newValue: string) {\n this.updateInput(newValue);\n }\n\n componentDidLoad() {\n if (this.textInput) {\n let maskOptions;\n\n switch (this.type) {\n case 'day':\n maskOptions = { mask: Number, min: 1, max: 31 };\n break;\n case 'month':\n maskOptions = { mask: Number, min: 1, max: 12 };\n break;\n case 'year':\n maskOptions = {\n mask: Number,\n min: 1900,\n max: new Date().getFullYear(),\n };\n break;\n default:\n throw new Error('Invalid type prop');\n }\n\n this.imask = IMask(this.textInput, maskOptions);\n\n this.imask.on('accept', () => {\n const rawValue = this.imask.unmaskedValue;\n this.inputHandler(this.name, rawValue);\n });\n\n this.textInput.addEventListener('blur', () => {\n this.formControlBlur.emit();\n });\n\n this.updateInput(this.defaultValue);\n }\n }\n\n updateInput(newValue: any) {\n if (this.imask) {\n this.imask.value = newValue;\n }\n }\n\n disconnectedCallback() {\n this.imask?.destroy();\n }\n\n render() {\n return (\n <Host exportparts=\"label,input,input-invalid\">\n <label part=\"label\" class=\"form-label\" htmlFor={this.name}>\n {this.label}\n </label>\n <input\n ref={el => (this.textInput = el as HTMLInputElement)}\n id={this.name}\n name={this.name}\n onBlur={() => this.formControlBlur.emit()}\n part={`input ${this.error && 'input-invalid'}`}\n class={this.error ? 'form-control is-invalid' : 'form-control'}\n type=\"text\"\n disabled={this.disabled}\n />\n {this.error && <div class=\"invalid-feedback\">{this.error}</div>}\n </Host>\n );\n }\n}\n"]}
@@ -0,0 +1,186 @@
1
+ import { Host, h, } from "@stencil/core";
2
+ import IMask from "imask";
3
+ export class MonetaryInput {
4
+ constructor() {
5
+ this.imask = null;
6
+ this.label = undefined;
7
+ this.name = undefined;
8
+ this.error = undefined;
9
+ this.defaultValue = undefined;
10
+ this.inputHandler = undefined;
11
+ }
12
+ handleDefaultValueChange(newValue) {
13
+ this.updateInput(newValue);
14
+ }
15
+ componentDidLoad() {
16
+ if (this.textInput) {
17
+ this.imask = IMask(this.textInput, {
18
+ mask: Number,
19
+ scale: 2,
20
+ thousandsSeparator: ',',
21
+ padFractionalZeros: true,
22
+ normalizeZeros: true,
23
+ radix: '.',
24
+ });
25
+ this.imask.on('accept', () => {
26
+ const rawValue = this.imask.unmaskedValue;
27
+ this.inputHandler(this.name, rawValue);
28
+ });
29
+ this.textInput.addEventListener('blur', () => {
30
+ this.formControlBlur.emit();
31
+ });
32
+ }
33
+ this.updateInput(this.defaultValue);
34
+ }
35
+ disconnectedCallback() {
36
+ var _a;
37
+ (_a = this.imask) === null || _a === void 0 ? void 0 : _a.destroy();
38
+ }
39
+ updateInput(newValue) {
40
+ if (this.imask) {
41
+ this.imask.value = String(newValue);
42
+ }
43
+ }
44
+ render() {
45
+ return (h(Host, { exportparts: "label,input,input-invalid" }, h("label", { part: "label", class: "form-label", htmlFor: this.name }, this.label), h("input", { ref: el => (this.textInput = el), id: this.name, name: this.name, onBlur: () => this.formControlBlur.emit(), part: `input ${this.error && 'input-invalid'}`, class: this.error ? 'form-control is-invalid' : 'form-control', type: "text" }), this.error && h("div", { class: "invalid-feedback" }, this.error)));
46
+ }
47
+ static get is() { return "form-control-monetary"; }
48
+ static get encapsulation() { return "shadow"; }
49
+ static get originalStyleUrls() {
50
+ return {
51
+ "$": ["form-control-number.scss"]
52
+ };
53
+ }
54
+ static get styleUrls() {
55
+ return {
56
+ "$": ["form-control-number.css"]
57
+ };
58
+ }
59
+ static get properties() {
60
+ return {
61
+ "label": {
62
+ "type": "string",
63
+ "mutable": false,
64
+ "complexType": {
65
+ "original": "string",
66
+ "resolved": "string",
67
+ "references": {}
68
+ },
69
+ "required": false,
70
+ "optional": false,
71
+ "docs": {
72
+ "tags": [],
73
+ "text": ""
74
+ },
75
+ "attribute": "label",
76
+ "reflect": false
77
+ },
78
+ "name": {
79
+ "type": "any",
80
+ "mutable": false,
81
+ "complexType": {
82
+ "original": "any",
83
+ "resolved": "any",
84
+ "references": {}
85
+ },
86
+ "required": false,
87
+ "optional": false,
88
+ "docs": {
89
+ "tags": [],
90
+ "text": ""
91
+ },
92
+ "attribute": "name",
93
+ "reflect": false
94
+ },
95
+ "error": {
96
+ "type": "string",
97
+ "mutable": false,
98
+ "complexType": {
99
+ "original": "string",
100
+ "resolved": "string",
101
+ "references": {}
102
+ },
103
+ "required": false,
104
+ "optional": false,
105
+ "docs": {
106
+ "tags": [],
107
+ "text": ""
108
+ },
109
+ "attribute": "error",
110
+ "reflect": false
111
+ },
112
+ "defaultValue": {
113
+ "type": "string",
114
+ "mutable": false,
115
+ "complexType": {
116
+ "original": "string",
117
+ "resolved": "string",
118
+ "references": {}
119
+ },
120
+ "required": false,
121
+ "optional": false,
122
+ "docs": {
123
+ "tags": [],
124
+ "text": ""
125
+ },
126
+ "attribute": "default-value",
127
+ "reflect": false
128
+ },
129
+ "inputHandler": {
130
+ "type": "unknown",
131
+ "mutable": false,
132
+ "complexType": {
133
+ "original": "(name: string, value: string) => void",
134
+ "resolved": "(name: string, value: string) => void",
135
+ "references": {}
136
+ },
137
+ "required": false,
138
+ "optional": false,
139
+ "docs": {
140
+ "tags": [],
141
+ "text": ""
142
+ }
143
+ }
144
+ };
145
+ }
146
+ static get events() {
147
+ return [{
148
+ "method": "formControlInput",
149
+ "name": "formControlInput",
150
+ "bubbles": true,
151
+ "cancelable": true,
152
+ "composed": true,
153
+ "docs": {
154
+ "tags": [],
155
+ "text": ""
156
+ },
157
+ "complexType": {
158
+ "original": "any",
159
+ "resolved": "any",
160
+ "references": {}
161
+ }
162
+ }, {
163
+ "method": "formControlBlur",
164
+ "name": "formControlBlur",
165
+ "bubbles": true,
166
+ "cancelable": true,
167
+ "composed": true,
168
+ "docs": {
169
+ "tags": [],
170
+ "text": ""
171
+ },
172
+ "complexType": {
173
+ "original": "any",
174
+ "resolved": "any",
175
+ "references": {}
176
+ }
177
+ }];
178
+ }
179
+ static get watchers() {
180
+ return [{
181
+ "propName": "defaultValue",
182
+ "methodName": "handleDefaultValueChange"
183
+ }];
184
+ }
185
+ }
186
+ //# sourceMappingURL=form-control-monetary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-control-monetary.js","sourceRoot":"","sources":["../../../../src/components/form/form-control-monetary.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,KAAoB,MAAM,OAAO,CAAC;AAOzC,MAAM,OAAO,aAAa;;IAOhB,UAAK,GAA0B,IAAI,CAAC;;;;;;;EAQ5C,wBAAwB,CAAC,QAAgB;IACvC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;EAC7B,CAAC;EAED,gBAAgB;IACd,IAAI,IAAI,CAAC,SAAS,EAAE;MAClB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE;QACjC,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,CAAC;QACR,kBAAkB,EAAE,GAAG;QACvB,kBAAkB,EAAE,IAAI;QACxB,cAAc,EAAE,IAAI;QACpB,KAAK,EAAE,GAAG;OACX,CAAC,CAAC;MAEH,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;QAC3B,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;QAC1C,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;MACzC,CAAC,CAAC,CAAC;MAEH,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE;QAC3C,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;MAC9B,CAAC,CAAC,CAAC;KACJ;IACD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;EACtC,CAAC;EAED,oBAAoB;;IAClB,MAAA,IAAI,CAAC,KAAK,0CAAE,OAAO,EAAE,CAAC;EACxB,CAAC;EAED,WAAW,CAAC,QAAa;IACvB,IAAI,IAAI,CAAC,KAAK,EAAE;MACd,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;KACrC;EACH,CAAC;EAED,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,IAAC,WAAW,EAAC,2BAA2B;MAC3C,aAAO,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,YAAY,EAAC,OAAO,EAAE,IAAI,CAAC,IAAI,IACtD,IAAI,CAAC,KAAK,CACL;MACR,aACE,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,EAAsB,CAAC,EACpD,EAAE,EAAE,IAAI,CAAC,IAAI,EACb,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,EACzC,IAAI,EAAE,SAAS,IAAI,CAAC,KAAK,IAAI,eAAe,EAAE,EAC9C,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,cAAc,EAC9D,IAAI,EAAC,MAAM,GACX;MACD,IAAI,CAAC,KAAK,IAAI,WAAK,KAAK,EAAC,kBAAkB,IAAE,IAAI,CAAC,KAAK,CAAO,CAC1D,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Watch,\n} from '@stencil/core';\nimport IMask, { InputMask } from 'imask';\n\n@Component({\n tag: 'form-control-monetary',\n styleUrl: 'form-control-number.scss',\n shadow: true,\n})\nexport class MonetaryInput {\n @Prop() label: string;\n @Prop() name: any;\n @Prop() error: string;\n @Prop() defaultValue: string;\n @Prop() inputHandler: (name: string, value: string) => void;\n\n private imask: InputMask<any> | null = null;\n\n textInput!: HTMLInputElement;\n\n @Event() formControlInput: EventEmitter<any>;\n @Event() formControlBlur: EventEmitter<any>;\n\n @Watch('defaultValue')\n handleDefaultValueChange(newValue: string) {\n this.updateInput(newValue);\n }\n\n componentDidLoad() {\n if (this.textInput) {\n this.imask = IMask(this.textInput, {\n mask: Number,\n scale: 2,\n thousandsSeparator: ',',\n padFractionalZeros: true,\n normalizeZeros: true,\n radix: '.',\n });\n\n this.imask.on('accept', () => {\n const rawValue = this.imask.unmaskedValue;\n this.inputHandler(this.name, rawValue);\n });\n\n this.textInput.addEventListener('blur', () => {\n this.formControlBlur.emit();\n });\n }\n this.updateInput(this.defaultValue);\n }\n\n disconnectedCallback() {\n this.imask?.destroy();\n }\n\n updateInput(newValue: any) {\n if (this.imask) {\n this.imask.value = String(newValue);\n }\n }\n\n render() {\n return (\n <Host exportparts=\"label,input,input-invalid\">\n <label part=\"label\" class=\"form-label\" htmlFor={this.name}>\n {this.label}\n </label>\n <input\n ref={el => (this.textInput = el as HTMLInputElement)}\n id={this.name}\n name={this.name}\n onBlur={() => this.formControlBlur.emit()}\n part={`input ${this.error && 'input-invalid'}`}\n class={this.error ? 'form-control is-invalid' : 'form-control'}\n type=\"text\"\n />\n {this.error && <div class=\"invalid-feedback\">{this.error}</div>}\n </Host>\n );\n }\n}\n"]}