@justifi/webcomponents 4.7.0-rc.0 → 4.7.0-rc.2

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 (338) hide show
  1. package/dist/cjs/{SubAccount-5d77adbf.js → SubAccount-f47c8522.js} +2 -2
  2. package/dist/cjs/{SubAccount-5d77adbf.js.map → SubAccount-f47c8522.js.map} +1 -1
  3. package/dist/cjs/additional-questions-details_5.cjs.entry.js +3 -3
  4. package/dist/cjs/config-70f62990.js +19 -0
  5. package/dist/cjs/config-70f62990.js.map +1 -0
  6. package/dist/cjs/form-control-datepart_2.cjs.entry.js +1 -1
  7. package/dist/cjs/form-control-monetary.cjs.entry.js +1 -1
  8. package/dist/cjs/form-control-number_3.cjs.entry.js +1 -1
  9. package/dist/cjs/{index-ce7d512e.js → index-c5ace247.js} +4 -1
  10. package/dist/cjs/index-c5ace247.js.map +1 -0
  11. package/dist/cjs/justifi-additional-questions_6.cjs.entry.js +1 -1
  12. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +1 -1
  13. package/dist/cjs/justifi-billing-form_2.cjs.entry.js +1 -1
  14. package/dist/cjs/justifi-business-details.cjs.entry.js +4 -3
  15. package/dist/cjs/justifi-business-details.cjs.entry.js.map +1 -1
  16. package/dist/cjs/justifi-business-form-stepped.cjs.entry.js +3 -2
  17. package/dist/cjs/justifi-business-form-stepped.cjs.entry.js.map +1 -1
  18. package/dist/cjs/justifi-business-form.cjs.entry.js +3 -2
  19. package/dist/cjs/justifi-business-form.cjs.entry.js.map +1 -1
  20. package/dist/cjs/justifi-business-list.cjs.entry.js +5 -3
  21. package/dist/cjs/justifi-business-list.cjs.entry.js.map +1 -1
  22. package/dist/cjs/justifi-card-form.cjs.entry.js +1 -1
  23. package/dist/cjs/justifi-details.cjs.entry.js +2 -2
  24. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +11030 -0
  25. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js.map +1 -0
  26. package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js +2 -2
  27. package/dist/cjs/justifi-payment-details.cjs.entry.js +5 -4
  28. package/dist/cjs/justifi-payment-details.cjs.entry.js.map +1 -1
  29. package/dist/cjs/justifi-payment-form.cjs.entry.js +2 -2
  30. package/dist/cjs/justifi-payment-method-form.cjs.entry.js +11 -9
  31. package/dist/cjs/justifi-payment-method-form.cjs.entry.js.map +1 -1
  32. package/dist/cjs/justifi-payments-list.cjs.entry.js +4 -3
  33. package/dist/cjs/justifi-payments-list.cjs.entry.js.map +1 -1
  34. package/dist/cjs/justifi-payout-details.cjs.entry.js +5 -4
  35. package/dist/cjs/justifi-payout-details.cjs.entry.js.map +1 -1
  36. package/dist/cjs/justifi-payouts-list.cjs.entry.js +4 -3
  37. package/dist/cjs/justifi-payouts-list.cjs.entry.js.map +1 -1
  38. package/dist/cjs/justifi-proceeds-list.cjs.entry.js +4 -3
  39. package/dist/cjs/justifi-proceeds-list.cjs.entry.js.map +1 -1
  40. package/dist/cjs/justifi-refund-form.cjs.entry.js +3 -2
  41. package/dist/cjs/justifi-refund-form.cjs.entry.js.map +1 -1
  42. package/dist/cjs/justifi-subaccount-details.cjs.entry.js +7 -6
  43. package/dist/cjs/justifi-subaccount-details.cjs.entry.js.map +1 -1
  44. package/dist/cjs/justifi-subaccounts-list.cjs.entry.js +5 -4
  45. package/dist/cjs/justifi-subaccounts-list.cjs.entry.js.map +1 -1
  46. package/dist/cjs/justifi-table_2.cjs.entry.js +1 -1
  47. package/dist/cjs/loader.cjs.js +2 -2
  48. package/dist/cjs/select-input_2.cjs.entry.js +1 -1
  49. package/dist/cjs/subaccount-account-details_4.cjs.entry.js +3 -3
  50. package/dist/cjs/subaccount-bank-details.cjs.entry.js +2 -2
  51. package/dist/cjs/subaccount-terms-details.cjs.entry.js +2 -2
  52. package/dist/cjs/{utils-d9cbe26f.js → utils-13d069be.js} +6 -1
  53. package/dist/cjs/utils-13d069be.js.map +1 -0
  54. package/dist/cjs/{utils-aaa6ab8b.js → utils-4622829d.js} +2 -2
  55. package/dist/cjs/{utils-aaa6ab8b.js.map → utils-4622829d.js.map} +1 -1
  56. package/dist/cjs/webcomponents.cjs.js +2 -2
  57. package/dist/collection/api/GrossVolume.js +2 -0
  58. package/dist/collection/api/GrossVolume.js.map +1 -0
  59. package/dist/collection/api/mockData/mockGrossVolumeReport.js +126 -0
  60. package/dist/collection/api/mockData/mockGrossVolumeReport.js.map +1 -0
  61. package/dist/collection/collection-manifest.json +1 -0
  62. package/dist/collection/components/bank-account-form/bank-account-form.stories.js +2 -1
  63. package/dist/collection/components/bank-account-form/bank-account-form.stories.js.map +1 -1
  64. package/dist/collection/components/billing-form/billing-form.stories.js +1 -1
  65. package/dist/collection/components/billing-form/billing-form.stories.js.map +1 -1
  66. package/dist/collection/components/business-details/business-details.js +2 -1
  67. package/dist/collection/components/business-details/business-details.js.map +1 -1
  68. package/dist/collection/components/business-details/business-details.stories.js +3 -2
  69. package/dist/collection/components/business-details/business-details.stories.js.map +1 -1
  70. package/dist/collection/components/business-form/business-form-stepped.js +2 -1
  71. package/dist/collection/components/business-form/business-form-stepped.js.map +1 -1
  72. package/dist/collection/components/business-form/business-form-stepped.stories.js +3 -2
  73. package/dist/collection/components/business-form/business-form-stepped.stories.js.map +1 -1
  74. package/dist/collection/components/business-form/business-form.js +2 -1
  75. package/dist/collection/components/business-form/business-form.js.map +1 -1
  76. package/dist/collection/components/business-form/business-form.stories.js +2 -1
  77. package/dist/collection/components/business-form/business-form.stories.js.map +1 -1
  78. package/dist/collection/components/business-list/business-list.js +3 -1
  79. package/dist/collection/components/business-list/business-list.js.map +1 -1
  80. package/dist/collection/components/business-list/business-list.stories.js +3 -2
  81. package/dist/collection/components/business-list/business-list.stories.js.map +1 -1
  82. package/dist/collection/components/card-form/card-form.stories.js +2 -1
  83. package/dist/collection/components/card-form/card-form.stories.js.map +1 -1
  84. package/dist/collection/components/gross-payment-chart/chart-utils.js +59 -0
  85. package/dist/collection/components/gross-payment-chart/chart-utils.js.map +1 -0
  86. package/dist/collection/components/gross-payment-chart/gross-payment-chart.css +572 -0
  87. package/dist/collection/components/gross-payment-chart/gross-payment-chart.js +128 -0
  88. package/dist/collection/components/gross-payment-chart/gross-payment-chart.js.map +1 -0
  89. package/dist/collection/components/gross-payment-chart/gross-payment-chart.stories.js +22 -0
  90. package/dist/collection/components/gross-payment-chart/gross-payment-chart.stories.js.map +1 -0
  91. package/dist/collection/components/gross-payment-chart/test/gross-payment-chart.spec.js +15 -0
  92. package/dist/collection/components/gross-payment-chart/test/gross-payment-chart.spec.js.map +1 -0
  93. package/dist/collection/components/payment-details/payment-details.js +2 -1
  94. package/dist/collection/components/payment-details/payment-details.js.map +1 -1
  95. package/dist/collection/components/payment-details/payment-details.stories.js +3 -2
  96. package/dist/collection/components/payment-details/payment-details.stories.js.map +1 -1
  97. package/dist/collection/components/payment-form/payment-form.stories.js +2 -1
  98. package/dist/collection/components/payment-form/payment-form.stories.js.map +1 -1
  99. package/dist/collection/components/payment-method-form/payment-method-form.js +3 -2
  100. package/dist/collection/components/payment-method-form/payment-method-form.js.map +1 -1
  101. package/dist/collection/components/payment-method-form/test/payment-method-form.spec.js +9 -8
  102. package/dist/collection/components/payment-method-form/test/payment-method-form.spec.js.map +1 -1
  103. package/dist/collection/components/payments-list/payments-list.js +2 -1
  104. package/dist/collection/components/payments-list/payments-list.js.map +1 -1
  105. package/dist/collection/components/payments-list/payments-list.stories.js +3 -2
  106. package/dist/collection/components/payments-list/payments-list.stories.js.map +1 -1
  107. package/dist/collection/components/payout-details/payout-details.js +2 -1
  108. package/dist/collection/components/payout-details/payout-details.js.map +1 -1
  109. package/dist/collection/components/payout-details/payout-details.stories.js +3 -2
  110. package/dist/collection/components/payout-details/payout-details.stories.js.map +1 -1
  111. package/dist/collection/components/payouts-list/payouts-list.js +2 -1
  112. package/dist/collection/components/payouts-list/payouts-list.js.map +1 -1
  113. package/dist/collection/components/payouts-list/payouts-list.stories.js +3 -2
  114. package/dist/collection/components/payouts-list/payouts-list.stories.js.map +1 -1
  115. package/dist/collection/components/proceeds-list/proceeds-list.js +2 -1
  116. package/dist/collection/components/proceeds-list/proceeds-list.js.map +1 -1
  117. package/dist/collection/components/proceeds-list/proceeds-list.stories.js +3 -2
  118. package/dist/collection/components/proceeds-list/proceeds-list.stories.js.map +1 -1
  119. package/dist/collection/components/refund-form/refund-form.js +2 -1
  120. package/dist/collection/components/refund-form/refund-form.js.map +1 -1
  121. package/dist/collection/components/refund-form/refund-form.stories.js +1 -1
  122. package/dist/collection/components/refund-form/refund-form.stories.js.map +1 -1
  123. package/dist/collection/components/subaccount-details/subaccount-details.js +3 -2
  124. package/dist/collection/components/subaccount-details/subaccount-details.js.map +1 -1
  125. package/dist/collection/components/subaccount-details/subaccount-details.stories.js +4 -3
  126. package/dist/collection/components/subaccount-details/subaccount-details.stories.js.map +1 -1
  127. package/dist/collection/components/subaccounts-list/subaccounts-list.js +2 -1
  128. package/dist/collection/components/subaccounts-list/subaccounts-list.js.map +1 -1
  129. package/dist/collection/components/subaccounts-list/subaccounts-list.stories.js +3 -2
  130. package/dist/collection/components/subaccounts-list/subaccounts-list.stories.js.map +1 -1
  131. package/dist/collection/utils/utils.js +4 -0
  132. package/dist/collection/utils/utils.js.map +1 -1
  133. package/dist/components/SubAccount.js +1 -1
  134. package/dist/components/config.js +17 -0
  135. package/dist/components/config.js.map +1 -0
  136. package/dist/components/justifi-business-details.js +2 -1
  137. package/dist/components/justifi-business-details.js.map +1 -1
  138. package/dist/components/justifi-business-form-stepped.js +2 -1
  139. package/dist/components/justifi-business-form-stepped.js.map +1 -1
  140. package/dist/components/justifi-business-form.js +2 -1
  141. package/dist/components/justifi-business-form.js.map +1 -1
  142. package/dist/components/justifi-business-list.js +3 -1
  143. package/dist/components/justifi-business-list.js.map +1 -1
  144. package/dist/components/justifi-gross-payment-chart.d.ts +11 -0
  145. package/dist/components/justifi-gross-payment-chart.js +11053 -0
  146. package/dist/components/justifi-gross-payment-chart.js.map +1 -0
  147. package/dist/components/justifi-payment-balance-transactions.js +1 -1
  148. package/dist/components/justifi-payment-details.js +3 -2
  149. package/dist/components/justifi-payment-details.js.map +1 -1
  150. package/dist/components/justifi-payments-list.js +3 -2
  151. package/dist/components/justifi-payments-list.js.map +1 -1
  152. package/dist/components/justifi-payout-details.js +3 -2
  153. package/dist/components/justifi-payout-details.js.map +1 -1
  154. package/dist/components/justifi-payouts-list.js +3 -2
  155. package/dist/components/justifi-payouts-list.js.map +1 -1
  156. package/dist/components/justifi-proceeds-list.js +3 -2
  157. package/dist/components/justifi-proceeds-list.js.map +1 -1
  158. package/dist/components/justifi-refund-form.js +2 -1
  159. package/dist/components/justifi-refund-form.js.map +1 -1
  160. package/dist/components/justifi-subaccount-details.js +4 -3
  161. package/dist/components/justifi-subaccount-details.js.map +1 -1
  162. package/dist/components/justifi-subaccounts-list.js +3 -2
  163. package/dist/components/justifi-subaccounts-list.js.map +1 -1
  164. package/dist/components/payment-method-form.js +10 -8
  165. package/dist/components/payment-method-form.js.map +1 -1
  166. package/dist/components/subaccount-merchant-details2.js +1 -1
  167. package/dist/components/utils2.js +5 -1
  168. package/dist/components/utils2.js.map +1 -1
  169. package/dist/config.js +14 -0
  170. package/dist/config.js.map +1 -0
  171. package/dist/esm/{SubAccount-cf29d050.js → SubAccount-128190e9.js} +2 -2
  172. package/dist/esm/{SubAccount-cf29d050.js.map → SubAccount-128190e9.js.map} +1 -1
  173. package/dist/esm/additional-questions-details_5.entry.js +3 -3
  174. package/dist/esm/config-b1976dbd.js +17 -0
  175. package/dist/esm/config-b1976dbd.js.map +1 -0
  176. package/dist/esm/form-control-datepart_2.entry.js +1 -1
  177. package/dist/esm/form-control-monetary.entry.js +1 -1
  178. package/dist/esm/form-control-number_3.entry.js +1 -1
  179. package/dist/esm/{index-b02f9a6e.js → index-7471ed60.js} +4 -1
  180. package/dist/esm/index-7471ed60.js.map +1 -0
  181. package/dist/esm/justifi-additional-questions_6.entry.js +1 -1
  182. package/dist/esm/justifi-bank-account-form.entry.js +1 -1
  183. package/dist/esm/justifi-billing-form_2.entry.js +1 -1
  184. package/dist/esm/justifi-business-details.entry.js +4 -3
  185. package/dist/esm/justifi-business-details.entry.js.map +1 -1
  186. package/dist/esm/justifi-business-form-stepped.entry.js +3 -2
  187. package/dist/esm/justifi-business-form-stepped.entry.js.map +1 -1
  188. package/dist/esm/justifi-business-form.entry.js +3 -2
  189. package/dist/esm/justifi-business-form.entry.js.map +1 -1
  190. package/dist/esm/justifi-business-list.entry.js +5 -3
  191. package/dist/esm/justifi-business-list.entry.js.map +1 -1
  192. package/dist/esm/justifi-card-form.entry.js +1 -1
  193. package/dist/esm/justifi-details.entry.js +2 -2
  194. package/dist/esm/justifi-gross-payment-chart.entry.js +11026 -0
  195. package/dist/esm/justifi-gross-payment-chart.entry.js.map +1 -0
  196. package/dist/esm/justifi-payment-balance-transactions.entry.js +2 -2
  197. package/dist/esm/justifi-payment-details.entry.js +5 -4
  198. package/dist/esm/justifi-payment-details.entry.js.map +1 -1
  199. package/dist/esm/justifi-payment-form.entry.js +2 -2
  200. package/dist/esm/justifi-payment-method-form.entry.js +11 -9
  201. package/dist/esm/justifi-payment-method-form.entry.js.map +1 -1
  202. package/dist/esm/justifi-payments-list.entry.js +4 -3
  203. package/dist/esm/justifi-payments-list.entry.js.map +1 -1
  204. package/dist/esm/justifi-payout-details.entry.js +5 -4
  205. package/dist/esm/justifi-payout-details.entry.js.map +1 -1
  206. package/dist/esm/justifi-payouts-list.entry.js +4 -3
  207. package/dist/esm/justifi-payouts-list.entry.js.map +1 -1
  208. package/dist/esm/justifi-proceeds-list.entry.js +4 -3
  209. package/dist/esm/justifi-proceeds-list.entry.js.map +1 -1
  210. package/dist/esm/justifi-refund-form.entry.js +3 -2
  211. package/dist/esm/justifi-refund-form.entry.js.map +1 -1
  212. package/dist/esm/justifi-subaccount-details.entry.js +7 -6
  213. package/dist/esm/justifi-subaccount-details.entry.js.map +1 -1
  214. package/dist/esm/justifi-subaccounts-list.entry.js +5 -4
  215. package/dist/esm/justifi-subaccounts-list.entry.js.map +1 -1
  216. package/dist/esm/justifi-table_2.entry.js +1 -1
  217. package/dist/esm/loader.js +3 -3
  218. package/dist/esm/select-input_2.entry.js +1 -1
  219. package/dist/esm/subaccount-account-details_4.entry.js +3 -3
  220. package/dist/esm/subaccount-bank-details.entry.js +2 -2
  221. package/dist/esm/subaccount-terms-details.entry.js +2 -2
  222. package/dist/esm/{utils-fcf19fd5.js → utils-40b7002c.js} +6 -2
  223. package/dist/esm/utils-40b7002c.js.map +1 -0
  224. package/dist/esm/{utils-d647dd96.js → utils-6352c002.js} +2 -2
  225. package/dist/esm/{utils-d647dd96.js.map → utils-6352c002.js.map} +1 -1
  226. package/dist/esm/webcomponents.js +3 -3
  227. package/dist/types/api/GrossVolume.d.ts +8 -0
  228. package/dist/types/api/mockData/mockGrossVolumeReport.d.ts +7 -0
  229. package/dist/types/components/gross-payment-chart/chart-utils.d.ts +45 -0
  230. package/dist/types/components/gross-payment-chart/gross-payment-chart.d.ts +20 -0
  231. package/dist/types/components/gross-payment-chart/gross-payment-chart.stories.d.ts +7 -0
  232. package/dist/types/components.d.ts +17 -0
  233. package/dist/types/home/runner/work/web-component-library/web-component-library/stencil-library/.stencil/config.d.ts +13 -0
  234. package/dist/types/utils/utils.d.ts +1 -0
  235. package/dist/webcomponents/p-0e9a7fa7.entry.js +2 -0
  236. package/dist/webcomponents/p-0e9a7fa7.entry.js.map +1 -0
  237. package/dist/webcomponents/p-1920e118.entry.js +2 -0
  238. package/dist/webcomponents/p-1920e118.entry.js.map +1 -0
  239. package/dist/webcomponents/{p-99b3925f.entry.js → p-215b4c87.entry.js} +2 -2
  240. package/dist/webcomponents/{p-08311783.entry.js → p-2cd29187.entry.js} +2 -2
  241. package/dist/webcomponents/p-301a23aa.js +2 -0
  242. package/dist/webcomponents/p-301a23aa.js.map +1 -0
  243. package/dist/webcomponents/{p-14391341.entry.js → p-355eabff.entry.js} +2 -2
  244. package/dist/webcomponents/{p-2ac4e73d.entry.js → p-356cf20d.entry.js} +2 -2
  245. package/dist/webcomponents/{p-a1a94012.entry.js → p-397e0d5a.entry.js} +2 -2
  246. package/dist/webcomponents/p-491d5c69.entry.js +2 -0
  247. package/dist/webcomponents/p-491d5c69.entry.js.map +1 -0
  248. package/dist/webcomponents/{p-8471740f.entry.js → p-62872b87.entry.js} +2 -2
  249. package/dist/webcomponents/{p-e83f93cd.entry.js → p-635a3b3e.entry.js} +2 -2
  250. package/dist/webcomponents/p-64184a0c.entry.js +2 -0
  251. package/dist/webcomponents/p-64184a0c.entry.js.map +1 -0
  252. package/dist/webcomponents/p-6c3236e8.entry.js +2 -0
  253. package/dist/webcomponents/p-6c3236e8.entry.js.map +1 -0
  254. package/dist/webcomponents/{p-2806a2d6.js → p-76dffeec.js} +2 -2
  255. package/dist/webcomponents/{p-5dd71882.entry.js → p-77e732b2.entry.js} +2 -2
  256. package/dist/webcomponents/{p-756629e9.entry.js → p-798483dd.entry.js} +2 -2
  257. package/dist/webcomponents/{p-05cc444a.entry.js → p-7a24ab66.entry.js} +2 -2
  258. package/dist/webcomponents/p-8367b46c.entry.js +2 -0
  259. package/dist/webcomponents/p-8367b46c.entry.js.map +1 -0
  260. package/dist/webcomponents/{p-6642d95b.entry.js → p-88fa33c1.entry.js} +2 -2
  261. package/dist/webcomponents/p-8c4c3d60.entry.js +20 -0
  262. package/dist/webcomponents/p-8c4c3d60.entry.js.map +1 -0
  263. package/dist/webcomponents/{p-37b8106d.entry.js → p-931989e6.entry.js} +2 -2
  264. package/dist/webcomponents/{p-1d42e416.entry.js → p-96eecdff.entry.js} +2 -2
  265. package/dist/webcomponents/{p-a3211bb2.js → p-988191bf.js} +2 -2
  266. package/dist/webcomponents/p-a4c78757.entry.js +2 -0
  267. package/dist/webcomponents/p-a4c78757.entry.js.map +1 -0
  268. package/dist/webcomponents/p-b08a9520.entry.js +2 -0
  269. package/dist/webcomponents/p-b08a9520.entry.js.map +1 -0
  270. package/dist/webcomponents/p-b45453ea.entry.js +2 -0
  271. package/dist/webcomponents/p-b45453ea.entry.js.map +1 -0
  272. package/dist/webcomponents/p-c2845c5d.entry.js +2 -0
  273. package/dist/webcomponents/p-c2845c5d.entry.js.map +1 -0
  274. package/dist/webcomponents/{p-92872bbe.entry.js → p-c4289027.entry.js} +2 -2
  275. package/dist/webcomponents/{p-d18c0273.entry.js → p-c43e9572.entry.js} +2 -2
  276. package/dist/webcomponents/{p-0c5afcbc.js → p-cbb60191.js} +3 -3
  277. package/dist/webcomponents/p-cbb60191.js.map +1 -0
  278. package/dist/webcomponents/p-d40718da.entry.js +2 -0
  279. package/dist/webcomponents/p-d40718da.entry.js.map +1 -0
  280. package/dist/webcomponents/{p-4d37473a.js → p-d6b5793d.js} +2 -2
  281. package/dist/webcomponents/p-d6b5793d.js.map +1 -0
  282. package/dist/webcomponents/p-d7630f46.entry.js +2 -0
  283. package/dist/webcomponents/{p-5f434e8b.entry.js.map → p-d7630f46.entry.js.map} +1 -1
  284. package/dist/webcomponents/{p-b4f185c5.entry.js → p-ec1890fc.entry.js} +2 -2
  285. package/dist/webcomponents/p-ffcbf779.entry.js +2 -0
  286. package/dist/webcomponents/p-ffcbf779.entry.js.map +1 -0
  287. package/dist/webcomponents/webcomponents.esm.js +1 -1
  288. package/dist/webcomponents/webcomponents.esm.js.map +1 -1
  289. package/package.json +8 -7
  290. package/dist/cjs/index-ce7d512e.js.map +0 -1
  291. package/dist/cjs/utils-d9cbe26f.js.map +0 -1
  292. package/dist/esm/index-b02f9a6e.js.map +0 -1
  293. package/dist/esm/utils-fcf19fd5.js.map +0 -1
  294. package/dist/webcomponents/p-014b2f3a.entry.js +0 -2
  295. package/dist/webcomponents/p-014b2f3a.entry.js.map +0 -1
  296. package/dist/webcomponents/p-07059336.entry.js +0 -2
  297. package/dist/webcomponents/p-07059336.entry.js.map +0 -1
  298. package/dist/webcomponents/p-0c5afcbc.js.map +0 -1
  299. package/dist/webcomponents/p-1b5bd8f8.entry.js +0 -2
  300. package/dist/webcomponents/p-1b5bd8f8.entry.js.map +0 -1
  301. package/dist/webcomponents/p-23f600d3.entry.js +0 -2
  302. package/dist/webcomponents/p-23f600d3.entry.js.map +0 -1
  303. package/dist/webcomponents/p-26b1a61d.entry.js +0 -2
  304. package/dist/webcomponents/p-26b1a61d.entry.js.map +0 -1
  305. package/dist/webcomponents/p-2f741cd2.entry.js +0 -2
  306. package/dist/webcomponents/p-2f741cd2.entry.js.map +0 -1
  307. package/dist/webcomponents/p-3e0f6758.entry.js +0 -2
  308. package/dist/webcomponents/p-3e0f6758.entry.js.map +0 -1
  309. package/dist/webcomponents/p-43c04b00.entry.js +0 -2
  310. package/dist/webcomponents/p-43c04b00.entry.js.map +0 -1
  311. package/dist/webcomponents/p-4d37473a.js.map +0 -1
  312. package/dist/webcomponents/p-5b378f8d.entry.js +0 -2
  313. package/dist/webcomponents/p-5b378f8d.entry.js.map +0 -1
  314. package/dist/webcomponents/p-5f434e8b.entry.js +0 -2
  315. package/dist/webcomponents/p-6b5fcbff.entry.js +0 -2
  316. package/dist/webcomponents/p-6b5fcbff.entry.js.map +0 -1
  317. package/dist/webcomponents/p-c52d63b1.entry.js +0 -2
  318. package/dist/webcomponents/p-c52d63b1.entry.js.map +0 -1
  319. package/dist/webcomponents/p-c9373e73.entry.js +0 -2
  320. package/dist/webcomponents/p-c9373e73.entry.js.map +0 -1
  321. /package/dist/webcomponents/{p-99b3925f.entry.js.map → p-215b4c87.entry.js.map} +0 -0
  322. /package/dist/webcomponents/{p-08311783.entry.js.map → p-2cd29187.entry.js.map} +0 -0
  323. /package/dist/webcomponents/{p-14391341.entry.js.map → p-355eabff.entry.js.map} +0 -0
  324. /package/dist/webcomponents/{p-2ac4e73d.entry.js.map → p-356cf20d.entry.js.map} +0 -0
  325. /package/dist/webcomponents/{p-a1a94012.entry.js.map → p-397e0d5a.entry.js.map} +0 -0
  326. /package/dist/webcomponents/{p-8471740f.entry.js.map → p-62872b87.entry.js.map} +0 -0
  327. /package/dist/webcomponents/{p-e83f93cd.entry.js.map → p-635a3b3e.entry.js.map} +0 -0
  328. /package/dist/webcomponents/{p-2806a2d6.js.map → p-76dffeec.js.map} +0 -0
  329. /package/dist/webcomponents/{p-5dd71882.entry.js.map → p-77e732b2.entry.js.map} +0 -0
  330. /package/dist/webcomponents/{p-756629e9.entry.js.map → p-798483dd.entry.js.map} +0 -0
  331. /package/dist/webcomponents/{p-05cc444a.entry.js.map → p-7a24ab66.entry.js.map} +0 -0
  332. /package/dist/webcomponents/{p-6642d95b.entry.js.map → p-88fa33c1.entry.js.map} +0 -0
  333. /package/dist/webcomponents/{p-37b8106d.entry.js.map → p-931989e6.entry.js.map} +0 -0
  334. /package/dist/webcomponents/{p-1d42e416.entry.js.map → p-96eecdff.entry.js.map} +0 -0
  335. /package/dist/webcomponents/{p-a3211bb2.js.map → p-988191bf.js.map} +0 -0
  336. /package/dist/webcomponents/{p-92872bbe.entry.js.map → p-c4289027.entry.js.map} +0 -0
  337. /package/dist/webcomponents/{p-d18c0273.entry.js.map → p-c43e9572.entry.js.map} +0 -0
  338. /package/dist/webcomponents/{p-b4f185c5.entry.js.map → p-ec1890fc.entry.js.map} +0 -0
@@ -1,8 +1,9 @@
1
+ import { config } from "../../../config";
1
2
  class BusinessFormStoryArgs {
2
3
  constructor(args) {
3
4
  this['auth-token'] = args['auth-token'] || '';
4
5
  this['business-id'] = args['business-id'] || '';
5
- this['account-id'] = args['account-id'] || process.env.EXAMPLE_BUSINESS_ACCOUNT_ID;
6
+ this['account-id'] = args['account-id'] || config.exampleBusinessAccountId;
6
7
  this['cssVariables'] = args['cssVariables'] || '';
7
8
  }
8
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"business-form.stories.js","sourceRoot":"","sources":["../../../../src/components/business-form/business-form.stories.tsx"],"names":[],"mappings":"AACA,MAAM,qBAAqB;EAMzB,YAAY,IAAI;IACd,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,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AAE;EACjB,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEb;CACF,CAAC,CAAC","sourcesContent":["\nclass BusinessFormStoryArgs {\n 'auth-token': string;\n 'account-id': string;\n 'bussiness-id': string;\n 'cssVariables': string;\n\n constructor(args) {\n this['auth-token'] = args['auth-token'] || '';\n this['business-id'] = args['business-id'] || '';\n this['account-id'] = args['account-id'] || process.env.EXAMPLE_BUSINESS_ACCOUNT_ID;\n this['cssVariables'] = args['cssVariables'] || '';\n }\n}\n\nexport default {\n title: 'Components/BusinessForm',\n component: 'justifi-business-form',\n argTypes: {\n 'auth-token': {\n control: 'text',\n table: {\n category: 'props',\n },\n },\n 'account-id': {\n control: 'text',\n table: {\n category: 'props',\n },\n },\n 'business-id': {\n control: 'text',\n table: {\n category: 'props',\n },\n },\n },\n};\n\nconst Template = (args: BusinessFormStoryArgs) => {\n // The <div> here should be replaced by a `display` property in the cardForm potentially\n return `\n <div>\n <justifi-business-form\n auth-token=\"${args['auth-token']}\"\n account-id=\"${args['account-id']}\"\n business-id=\"${args['business-id']}\"\n />\n </div>\n <style>\n :root {\n ${args.cssVariables}\n }\n </style>\n `;\n};\n\nexport const Basic = Template.bind({});\nBasic.args = new BusinessFormStoryArgs({});\n\nexport const Styled = Template.bind({});\nBasic.args = new BusinessFormStoryArgs({\n 'auth-token': '',\n 'business-id': '',\n cssVariables: `\n --jfi-primary-color: #212529;\n --jfi-load-google-font: 'Roboto Mono:wght@200;400;700;900';\n --jfi-layout-font-family: Roboto Mono, Calibri, sans-serif;\n --jfi-layout-padding: 4px;\n --jfi-layout-form-control-spacing-x: .5rem;\n --jfi-layout-form-control-spacing-y: 1rem;\n --jfi-form-label-font-weight: 700;\n --jfi-form-label-font-family: Calibri, sans-serif;\n --jfi-form-label-margin: 0 0 .5rem 0;\n --jfi-form-control-background-color: #F4F4F6;\n --jfi-form-control-background-color-hover: #EEEEF5;\n --jfi-form-control-border-color: rgba(0, 0, 0, 0.42);\n --jfi-form-control-border-color-hover: rgba(0, 0, 0, 0.62);\n --jfi-form-control-border-color-focus: #fccc32;\n --jfi-form-control-border-color-error: #C12727;\n --jfi-form-control-border-top-width: 0;\n --jfi-form-control-border-left-width: 0;\n --jfi-form-control-border-bottom-width: 1px;\n --jfi-form-control-border-right-width: 0;\n --jfi-form-control-border-radius: 4px 4px 0 0;\n --jfi-form-control-border-style: solid;\n --jfi-form-control-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n --jfi-form-control-box-shadow-focus: none;\n --jfi-form-control-box-shadow-error-focus: none;\n --jfi-form-control-border-style: solid;\n --jfi-form-control-color: #212529;\n --jfi-form-control-font-size: 1rem;\n --jfi-form-control-font-weight: 400;\n --jfi-form-control-line-height: 2;\n --jfi-form-control-margin: 0;\n --jfi-form-control-padding: .5rem .875rem;\n --jfi-error-message-color: #C12727;\n --jfi-error-message-margin: .25rem 0 0 0;\n --jfi-error-message-font-size: .875rem;\n\n --jfi-submit-button-color: white;\n --jfi-submit-button-background-color: #3F3F47;\n --jfi-submit-button-border-color: var(--jfi-primary-color);\n --jfi-submit-button-padding: 0.375rem 0.75rem;\n --jfi-submit-button-font-size: 1rem;\n --jfi-submit-button-border-radius: 1px;\n --jfi-submit-button-color-hover: white;\n --jfi-submit-button-background-color-hover: var(--jfi-primary-color);\n --jfi-submit-button-border-color-hover: var(--jfi-primary-color);\n --jfi-submit-button-color-focus: white;\n --jfi-submit-button-background-color-focus: var(--jfi-primary-color);\n --jfi-submit-button-border-color-focus: var(--jfi-primary-color);\n --jfi-submit-button-color-active: white;\n --jfi-submit-button-background-color-active: var(--jfi-primary-color);\n --jfi-submit-button-border-color-active: var(--jfi-primary-color);\n --jfi-submit-button-width: 100%;\n --jfi-submit-button-box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 1px -2px, rgba(0, 0, 0, 0.14) 0px 2px 2px 0px, rgba(0, 0, 0, 0.12) 0px 1px 5px 0px;\n\n --jfi-radio-button-color: var(--jfi-primary-color);\n --jfi-radio-button-background-color: transparent;\n --jfi-radio-button-color-selected: white;\n --jfi-radio-button-background-color-selected: var(--jfi-primary-color);\n --jfi-radio-button-border-color: var(--jfi-primary-color);\n --jfi-radio-button-border-color-selected: var(--jfi-primary-color);\n --jfi-radio-button-padding: 0.375rem 0.75rem;\n --jfi-radio-button-font-size: 1rem;\n --jfi-radio-button-color-hover: var(--jfi-primary-color);\n --jfi-radio-button-color-selected-hover: white;\n --jfi-radio-button-background-color-hover: transparent;\n --jfi-radio-button-background-color-selected-hover: var(--jfi-primary-color);\n --jfi-radio-button-border-color-selected-hover: var(--jfi-primary-color);\n --jfi-radio-button-border-color-hover: var(--jfi-primary-color);\n --jfi-radio-button-group-width: 100%;\n `,\n});\n"]}
1
+ {"version":3,"file":"business-form.stories.js","sourceRoot":"","sources":["../../../../src/components/business-form/business-form.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,MAAM,qBAAqB;EAMzB,YAAY,IAAI;IACd,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;IAC9C,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;IAChD,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,MAAM,CAAC,wBAAwB,CAAC;IAC3E,IAAI,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;EACpD,CAAC;CACF;AAED,eAAe;EACb,KAAK,EAAE,yBAAyB;EAChC,SAAS,EAAE,uBAAuB;EAClC,QAAQ,EAAE;IACR,YAAY,EAAE;MACZ,OAAO,EAAE,MAAM;MACf,KAAK,EAAE;QACL,QAAQ,EAAE,OAAO;OAClB;KACF;IACD,YAAY,EAAE;MACZ,OAAO,EAAE,MAAM;MACf,KAAK,EAAE;QACL,QAAQ,EAAE,OAAO;OAClB;KACF;IACD,aAAa,EAAE;MACb,OAAO,EAAE,MAAM;MACf,KAAK,EAAE;QACL,QAAQ,EAAE,OAAO;OAClB;KACF;GACF;CACF,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,IAA2B,EAAE,EAAE;EAC/C,wFAAwF;EACxF,OAAO;;;sBAGa,IAAI,CAAC,YAAY,CAAC;sBAClB,IAAI,CAAC,YAAY,CAAC;uBACjB,IAAI,CAAC,aAAa,CAAC;;;;;UAKhC,IAAI,CAAC,YAAY;;;GAGxB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG,IAAI,qBAAqB,CAAC,EAAE,CAAC,CAAC;AAE3C,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,KAAK,CAAC,IAAI,GAAG,IAAI,qBAAqB,CAAC;EACrC,YAAY,EAAE,EAAE;EAChB,aAAa,EAAE,EAAE;EACjB,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEb;CACF,CAAC,CAAC","sourcesContent":["import { config } from '../../../config';\n\nclass BusinessFormStoryArgs {\n 'auth-token': string;\n 'account-id': string;\n 'bussiness-id': string;\n 'cssVariables': string;\n\n constructor(args) {\n this['auth-token'] = args['auth-token'] || '';\n this['business-id'] = args['business-id'] || '';\n this['account-id'] = args['account-id'] || config.exampleBusinessAccountId;\n this['cssVariables'] = args['cssVariables'] || '';\n }\n}\n\nexport default {\n title: 'Components/BusinessForm',\n component: 'justifi-business-form',\n argTypes: {\n 'auth-token': {\n control: 'text',\n table: {\n category: 'props',\n },\n },\n 'account-id': {\n control: 'text',\n table: {\n category: 'props',\n },\n },\n 'business-id': {\n control: 'text',\n table: {\n category: 'props',\n },\n },\n },\n};\n\nconst Template = (args: BusinessFormStoryArgs) => {\n // The <div> here should be replaced by a `display` property in the cardForm potentially\n return `\n <div>\n <justifi-business-form\n auth-token=\"${args['auth-token']}\"\n account-id=\"${args['account-id']}\"\n business-id=\"${args['business-id']}\"\n />\n </div>\n <style>\n :root {\n ${args.cssVariables}\n }\n </style>\n `;\n};\n\nexport const Basic = Template.bind({});\nBasic.args = new BusinessFormStoryArgs({});\n\nexport const Styled = Template.bind({});\nBasic.args = new BusinessFormStoryArgs({\n 'auth-token': '',\n 'business-id': '',\n cssVariables: `\n --jfi-primary-color: #212529;\n --jfi-load-google-font: 'Roboto Mono:wght@200;400;700;900';\n --jfi-layout-font-family: Roboto Mono, Calibri, sans-serif;\n --jfi-layout-padding: 4px;\n --jfi-layout-form-control-spacing-x: .5rem;\n --jfi-layout-form-control-spacing-y: 1rem;\n --jfi-form-label-font-weight: 700;\n --jfi-form-label-font-family: Calibri, sans-serif;\n --jfi-form-label-margin: 0 0 .5rem 0;\n --jfi-form-control-background-color: #F4F4F6;\n --jfi-form-control-background-color-hover: #EEEEF5;\n --jfi-form-control-border-color: rgba(0, 0, 0, 0.42);\n --jfi-form-control-border-color-hover: rgba(0, 0, 0, 0.62);\n --jfi-form-control-border-color-focus: #fccc32;\n --jfi-form-control-border-color-error: #C12727;\n --jfi-form-control-border-top-width: 0;\n --jfi-form-control-border-left-width: 0;\n --jfi-form-control-border-bottom-width: 1px;\n --jfi-form-control-border-right-width: 0;\n --jfi-form-control-border-radius: 4px 4px 0 0;\n --jfi-form-control-border-style: solid;\n --jfi-form-control-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n --jfi-form-control-box-shadow-focus: none;\n --jfi-form-control-box-shadow-error-focus: none;\n --jfi-form-control-border-style: solid;\n --jfi-form-control-color: #212529;\n --jfi-form-control-font-size: 1rem;\n --jfi-form-control-font-weight: 400;\n --jfi-form-control-line-height: 2;\n --jfi-form-control-margin: 0;\n --jfi-form-control-padding: .5rem .875rem;\n --jfi-error-message-color: #C12727;\n --jfi-error-message-margin: .25rem 0 0 0;\n --jfi-error-message-font-size: .875rem;\n\n --jfi-submit-button-color: white;\n --jfi-submit-button-background-color: #3F3F47;\n --jfi-submit-button-border-color: var(--jfi-primary-color);\n --jfi-submit-button-padding: 0.375rem 0.75rem;\n --jfi-submit-button-font-size: 1rem;\n --jfi-submit-button-border-radius: 1px;\n --jfi-submit-button-color-hover: white;\n --jfi-submit-button-background-color-hover: var(--jfi-primary-color);\n --jfi-submit-button-border-color-hover: var(--jfi-primary-color);\n --jfi-submit-button-color-focus: white;\n --jfi-submit-button-background-color-focus: var(--jfi-primary-color);\n --jfi-submit-button-border-color-focus: var(--jfi-primary-color);\n --jfi-submit-button-color-active: white;\n --jfi-submit-button-background-color-active: var(--jfi-primary-color);\n --jfi-submit-button-border-color-active: var(--jfi-primary-color);\n --jfi-submit-button-width: 100%;\n --jfi-submit-button-box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 1px -2px, rgba(0, 0, 0, 0.14) 0px 2px 2px 0px, rgba(0, 0, 0, 0.12) 0px 1px 5px 0px;\n\n --jfi-radio-button-color: var(--jfi-primary-color);\n --jfi-radio-button-background-color: transparent;\n --jfi-radio-button-color-selected: white;\n --jfi-radio-button-background-color-selected: var(--jfi-primary-color);\n --jfi-radio-button-border-color: var(--jfi-primary-color);\n --jfi-radio-button-border-color-selected: var(--jfi-primary-color);\n --jfi-radio-button-padding: 0.375rem 0.75rem;\n --jfi-radio-button-font-size: 1rem;\n --jfi-radio-button-color-hover: var(--jfi-primary-color);\n --jfi-radio-button-color-selected-hover: white;\n --jfi-radio-button-background-color-hover: transparent;\n --jfi-radio-button-background-color-selected-hover: var(--jfi-primary-color);\n --jfi-radio-button-border-color-selected-hover: var(--jfi-primary-color);\n --jfi-radio-button-border-color-hover: var(--jfi-primary-color);\n --jfi-radio-button-group-width: 100%;\n `,\n});\n"]}
@@ -2,6 +2,7 @@ import { Host, h } from "@stencil/core";
2
2
  import { Api, pagingDefaults } from "../../api";
3
3
  import { Business } from "../../api/Business";
4
4
  import { formatDate, snakeCaseToHumanReadable } from "../../utils/utils";
5
+ import { config } from "../../../config";
5
6
  /**
6
7
  * @exportedPart table-head: Table head
7
8
  * @exportedPart table-head-row: Head row
@@ -59,7 +60,8 @@ export class BusinessList {
59
60
  this.loading = true;
60
61
  const endpoint = `entities/business`;
61
62
  let accountIDParam = { account_id: this.accountId };
62
- const response = await Api(this.authToken, process.env.ENTITIES_API_ORIGIN).get(endpoint, Object.assign(Object.assign({}, accountIDParam), this.params));
63
+ const response = await Api(this.authToken, config.proxyApiOrigin)
64
+ .get(endpoint, Object.assign(Object.assign({}, accountIDParam), this.params));
63
65
  if (!response.error) {
64
66
  this.paging = Object.assign(Object.assign({}, this.paging), response.page_info);
65
67
  const data = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.map(dataItem => new Business(dataItem));
@@ -1 +1 @@
1
- {"version":3,"file":"business-list.js","sourceRoot":"","sources":["../../../../src/components/business-list/business-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,GAAG,EAAsC,cAAc,EAAE,MAAM,WAAW,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAa,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAEzE;;;;;;;;;;;;;;;;GAgBG;AAMH,MAAM,OAAO,YAAY;;IAiCvB,4BAAuB,GAAG,CAAC,MAAe,EAAE,EAAE;MAC5C,OAAO,CAAC,MAAM,IAAI,YAAY,CAAC,IAAI,cAAc,CAAC;IACpD,CAAC,CAAC;IAEF,wBAAmB,GAAG,CAAC,YAAoB,EAAE,EAAE;M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kBAAkB,CAAC,SAAS,CACtC;2CACoB,IAAI,CAAC,uBAAuB,CAC/C,QAAQ,CAAC,kBAAkB,CAAC,OAAO,CACpC;2CACoB,IAAI,CAAC,uBAAuB,CAC/C,QAAQ,CAAC,kBAAkB,CAAC,OAAO,CACpC;;mBAEJ;WACN;UACD,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC;SAChC,CAAC,EACF,OAAO,EAAE,IAAI,CAAC,OAAO,mBACN,IAAI,CAAC,YAAY,EAChC,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,MAAM,kCACD,IAAI,CAAC,MAAM,KACd,eAAe,EAAE,IAAI,CAAC,eAAe,EACrC,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,MAE/C,CACG,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State, Watch } from '@stencil/core';\nimport { Api, IApiResponseCollection, PagingInfo, pagingDefaults } from '../../api';\nimport { Business, IBusiness } from '../../api/Business';\nimport { formatDate, snakeCaseToHumanReadable } from '../../utils/utils';\n\n/**\n * @exportedPart table-head: Table head\n * @exportedPart table-head-row: Head row\n * @exportedPart table-head-cell: Individual head cell\n * @exportedPart table-body: Body of the table\n * @exportedPart table-row: Row of the table\n * @exportedPart table-cell: Individual cell of the table\n * @exportedPart loading-state-cell: Row for loading state\n * @exportedPart loading-state-spinner: Spinner element for loading state\n * @exportedPart error-state: Row for Error state\n * @exportedPart empty-state: Row for Emtpy state\n * @exportedPart pagination-bar: Pagination bar\n * @exportedPart arrow: Both paging buttons\n * @exportedPart arrow-left: Previous page button\n * @exportedPart arrow-right: Next page button\n * @exportedPart arrow-disabled: Disabled state for paging buttons\n */\n@Component({\n tag: 'justifi-business-list',\n styleUrl: 'business-list.scss',\n shadow: true,\n})\nexport class BusinessList {\n /**\n * The Account ID to fetch payments.\n * This is required to fetch any data.\n * @required\n * @type {string}\n * @memberof PaymentsList\n */\n @Prop() accountId: string;\n /**\n * The Auth Token to fetch payments.\n * This is required to fetch any data.\n * @required\n * @type {string}\n */\n @Prop() authToken: string;\n @State() businesses: Business[] = [];\n @State() loading: boolean = true;\n @State() errorMessage: string;\n @State() paging: PagingInfo = pagingDefaults;\n @State() params: any\n\n @Watch('accountId')\n @Watch('authToken')\n @Watch('params')\n updateOnPropChange() {\n this.fetchData();\n }\n\n connectedCallback() {\n this.fetchData();\n }\n\n mapProductStatusToBadge = (status: boolean) => {\n return (status && 'bg-success') || 'bg-secondary';\n };\n\n handleClickPrevious = (beforeCursor: string) => {\n const newParams: any = { ...this.params };\n delete newParams.after_cursor;\n this.params = ({ ...newParams, before_cursor: beforeCursor });\n };\n\n handleClickNext = (afterCursor: string) => {\n const newParams: any = { ...this.params };\n delete newParams.before_cursor;\n this.params = ({ ...newParams, after_cursor: afterCursor });\n }; \n\n async fetchData(): Promise<void> {\n if (!this.accountId || !this.authToken) {\n this.errorMessage =\n 'Can not fetch any data without an AccountID and an AuthToken';\n this.loading = false;\n return;\n }\n this.loading = true;\n const endpoint = `entities/business`;\n let accountIDParam = { account_id: this.accountId };\n\n const response: IApiResponseCollection<Business[]> = await Api(\n this.authToken,\n process.env.ENTITIES_API_ORIGIN,\n ).get(endpoint, { ...accountIDParam, ...this.params });\n if (!response.error) {\n this.paging = {\n ...this.paging,\n ...response.page_info,\n };\n\n const data = response?.data?.map(dataItem => new Business(dataItem));\n this.businesses = data;\n } else {\n this.errorMessage =\n typeof response.error === 'string'\n ? response.error\n : response.error.message;\n }\n\n this.loading = false;\n }\n\n render() {\n return (\n <Host>\n <justifi-table\n columnData={[\n ['Legal Name', 'The name associated with this Business'],\n ['Business Type', 'The business type'],\n ['Business Structure', 'The business structure'],\n ['Tax ID', 'The tax ID associated with this business'],\n ['Industry', 'The industry this business participates in'],\n [\n 'Product Ready',\n 'List of our products that are used by this business',\n ],\n ['Created at', 'Date this business was created'],\n ]}\n rowData={this.businesses.map((business: IBusiness) => [\n business.legal_name,\n snakeCaseToHumanReadable(business.business_type),\n snakeCaseToHumanReadable(business.business_structure),\n business.tax_id,\n business.industry,\n {\n type: 'inner',\n value: `\n <div class=\"d-flex flex-nowrap gap-1\">\n <span class=\"badge ${this.mapProductStatusToBadge(\n business.product_categories.credit,\n )}\">Credit</span>\n <span class=\"badge ${this.mapProductStatusToBadge(\n business.product_categories.insurance,\n )}\">Insurance</span>\n <span class=\"badge ${this.mapProductStatusToBadge(\n business.product_categories.lending,\n )}\">Lending</span>\n <span class=\"badge ${this.mapProductStatusToBadge(\n business.product_categories.payment,\n )}\">Payment</span>\n </div>\n `,\n },\n formatDate(business.created_at),\n ])}\n loading={this.loading}\n error-message={this.errorMessage}\n params={this.params}\n paging={{\n ...this.paging,\n handleClickNext: this.handleClickNext,\n handleClickPrevious: this.handleClickPrevious\n }}\n />\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"business-list.js","sourceRoot":"","sources":["../../../../src/components/business-list/business-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,GAAG,EAAsC,cAAc,EAAE,MAAM,WAAW,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAa,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAGzC;;;;;;;;;;;;;;;;GAgBG;AAMH,MAAM,OAAO,YAAY;;IAiCvB,4BAAuB,GAAG,CAAC,MAAe,EAAE,EAAE;MAC5C,OAAO,CAAC,MAAM,IAAI,YAAY,CAAC,IAAI,cAAc,CAAC;IACpD,CAAC,CAAC;IAEF,wBAAmB,GAAG,CAAC,YAAoB,EAAE,EA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AC,SAAS,CACtC;2CAC4B,IAAI,CAAC,uBAAuB,CACvD,QAAQ,CAAC,kBAAkB,CAAC,OAAO,CACpC;2CAC4B,IAAI,CAAC,uBAAuB,CACvD,QAAQ,CAAC,kBAAkB,CAAC,OAAO,CACpC;;mBAEI;WACN;UACD,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC;SAChC,CAAC,EACF,OAAO,EAAE,IAAI,CAAC,OAAO,mBACN,IAAI,CAAC,YAAY,EAChC,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,MAAM,kCACD,IAAI,CAAC,MAAM,KACd,eAAe,EAAE,IAAI,CAAC,eAAe,EACrC,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,MAE/C,CACG,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State, Watch } from '@stencil/core';\nimport { Api, IApiResponseCollection, PagingInfo, pagingDefaults } from '../../api';\nimport { Business, IBusiness } from '../../api/Business';\nimport { formatDate, snakeCaseToHumanReadable } from '../../utils/utils';\nimport { config } from '../../../config';\n\n\n/**\n * @exportedPart table-head: Table head\n * @exportedPart table-head-row: Head row\n * @exportedPart table-head-cell: Individual head cell\n * @exportedPart table-body: Body of the table\n * @exportedPart table-row: Row of the table\n * @exportedPart table-cell: Individual cell of the table\n * @exportedPart loading-state-cell: Row for loading state\n * @exportedPart loading-state-spinner: Spinner element for loading state\n * @exportedPart error-state: Row for Error state\n * @exportedPart empty-state: Row for Emtpy state\n * @exportedPart pagination-bar: Pagination bar\n * @exportedPart arrow: Both paging buttons\n * @exportedPart arrow-left: Previous page button\n * @exportedPart arrow-right: Next page button\n * @exportedPart arrow-disabled: Disabled state for paging buttons\n */\n@Component({\n tag: 'justifi-business-list',\n styleUrl: 'business-list.scss',\n shadow: true,\n})\nexport class BusinessList {\n /**\n * The Account ID to fetch payments.\n * This is required to fetch any data.\n * @required\n * @type {string}\n * @memberof PaymentsList\n */\n @Prop() accountId: string;\n /**\n * The Auth Token to fetch payments.\n * This is required to fetch any data.\n * @required\n * @type {string}\n */\n @Prop() authToken: string;\n @State() businesses: Business[] = [];\n @State() loading: boolean = true;\n @State() errorMessage: string;\n @State() paging: PagingInfo = pagingDefaults;\n @State() params: any\n\n @Watch('accountId')\n @Watch('authToken')\n @Watch('params')\n updateOnPropChange() {\n this.fetchData();\n }\n\n connectedCallback() {\n this.fetchData();\n }\n\n mapProductStatusToBadge = (status: boolean) => {\n return (status && 'bg-success') || 'bg-secondary';\n };\n\n handleClickPrevious = (beforeCursor: string) => {\n const newParams: any = { ...this.params };\n delete newParams.after_cursor;\n this.params = ({ ...newParams, before_cursor: beforeCursor });\n };\n\n handleClickNext = (afterCursor: string) => {\n const newParams: any = { ...this.params };\n delete newParams.before_cursor;\n this.params = ({ ...newParams, after_cursor: afterCursor });\n };\n\n async fetchData(): Promise<void> {\n if (!this.accountId || !this.authToken) {\n this.errorMessage =\n 'Can not fetch any data without an AccountID and an AuthToken';\n this.loading = false;\n return;\n }\n this.loading = true;\n const endpoint = `entities/business`;\n let accountIDParam = { account_id: this.accountId };\n\n const response: IApiResponseCollection<Business[]> = await Api(this.authToken, config.proxyApiOrigin,)\n .get(endpoint, { ...accountIDParam, ...this.params });\n\n if (!response.error) {\n this.paging = {\n ...this.paging,\n ...response.page_info,\n };\n\n const data = response?.data?.map(dataItem => new Business(dataItem));\n this.businesses = data;\n } else {\n this.errorMessage =\n typeof response.error === 'string'\n ? response.error\n : response.error.message;\n }\n\n this.loading = false;\n }\n\n render() {\n return (\n <Host>\n <justifi-table\n columnData={[\n ['Legal Name', 'The name associated with this Business'],\n ['Business Type', 'The business type'],\n ['Business Structure', 'The business structure'],\n ['Tax ID', 'The tax ID associated with this business'],\n ['Industry', 'The industry this business participates in'],\n [\n 'Product Ready',\n 'List of our products that are used by this business',\n ],\n ['Created at', 'Date this business was created'],\n ]}\n rowData={this.businesses.map((business: IBusiness) => [\n business.legal_name,\n snakeCaseToHumanReadable(business.business_type),\n snakeCaseToHumanReadable(business.business_structure),\n business.tax_id,\n business.industry,\n {\n type: 'inner',\n value: `\n <div class=\"d-flex flex-nowrap gap-1\">\n <span class=\"badge ${this.mapProductStatusToBadge(\n business.product_categories.credit,\n )}\">Credit</span>\n <span class=\"badge ${this.mapProductStatusToBadge(\n business.product_categories.insurance,\n )}\">Insurance</span>\n <span class=\"badge ${this.mapProductStatusToBadge(\n business.product_categories.lending,\n )}\">Lending</span>\n <span class=\"badge ${this.mapProductStatusToBadge(\n business.product_categories.payment,\n )}\">Payment</span>\n </div>\n `,\n },\n formatDate(business.created_at),\n ])}\n loading={this.loading}\n error-message={this.errorMessage}\n params={this.params}\n paging={{\n ...this.paging,\n handleClickNext: this.handleClickNext,\n handleClickPrevious: this.handleClickPrevious\n }}\n />\n </Host>\n );\n }\n}\n"]}
@@ -1,3 +1,4 @@
1
+ import { config } from "../../../config";
1
2
  export default {
2
3
  title: 'dev/Components/BusinessList',
3
4
  component: 'justifi-business-list',
@@ -5,8 +6,8 @@ export default {
5
6
  };
6
7
  class BusinessListArgs {
7
8
  constructor(args) {
8
- this['auth-token'] = args['auth-token'] || 'tbd';
9
- this['account-id'] = args['account-id'] || process.env.EXAMPLE_BUSINESS_ACCOUNT_ID;
9
+ this['auth-token'] = args['auth-token'] || config.proxyAuthToken;
10
+ this['account-id'] = args['account-id'] || config.exampleBusinessAccountId;
10
11
  }
11
12
  }
12
13
  const Template = (args) => {
@@ -1 +1 @@
1
- {"version":3,"file":"business-list.stories.js","sourceRoot":"","sources":["../../../../src/components/business-list/business-list.stories.ts"],"names":[],"mappings":"AAAA,eAAe;EACb,KAAK,EAAE,6BAA6B;EACpC,SAAS,EAAE,uBAAuB;EAClC,UAAU,EAAE,EAAE;CACf,CAAC;AAEF,MAAM,gBAAgB;EAIpB,YAAY,IAAI;IACd,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,KAAK,CAAC;IACjD,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC;EACrF,CAAC;CACF;AAED,MAAM,QAAQ,GAAG,CAAC,IAAsB,EAAE,EAAE;EAC1C,OAAO,CAAC;;;oBAGU,IAAI,CAAC,YAAY,CAAC;oBAClB,IAAI,CAAC,YAAY,CAAC;;GAEnC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG,IAAI,gBAAgB,CAAC,EAAE,CAAC,CAAC;AAEtC,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,IAAI,GAAG,IAAI,gBAAgB,CAAC,EAAE,CAAC,CAAC;AACvC,MAAM,CAAC,UAAU,GAAG;EAClB,CAAC,KAAK,EAAE,EAAE,CAAC;MACP,KAAK,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BV;CACF,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,SAAS,CAAC,UAAU,GAAG;EACrB,CAAC,KAAK,EAAE,EAAE,CAAC;;QAEL,KAAK,EAAE;;GAEZ;CACF,CAAA;AACD,SAAS,CAAC,IAAI,GAAG,IAAI,gBAAgB,CAAC,EAAE,CAAC,CAAC","sourcesContent":["export default {\n title: 'dev/Components/BusinessList',\n component: 'justifi-business-list',\n parameters: {}\n};\n\nclass BusinessListArgs {\n 'auth-token': string;\n 'account-id': string;\n\n constructor(args) {\n this['auth-token'] = args['auth-token'] || 'tbd';\n this['account-id'] = args['account-id'] || process.env.EXAMPLE_BUSINESS_ACCOUNT_ID;\n }\n}\n\nconst Template = (args: BusinessListArgs) => {\n return (`\n <justifi-business-list\n data-testid=\"justifi-business-list\"\n auth-token=\"${args['auth-token']}\"\n account-id=\"${args['account-id']}\"\n />\n `);\n};\n\nexport const Basic = Template.bind({});\nBasic.args = new BusinessListArgs({});\n\nexport const Styled = Template.bind({});\nStyled.args = new BusinessListArgs({});\nStyled.decorators = [\n (Story) => `\n ${Story()}\n <style>\n justifi-business-list::part(table-head-cell) {\n background-color: #F4F4F6;\n }\n justifi-business-list::part(pagination-bar) {\n background-color: #F4F4F6;\n }\n justifi-business-list::part(arrow) {\n --bs-btn-disabled-bg: #212529;\n --bs-btn-disabled-border-color: #212529;\n --bs-btn-bg: #212529;\n --bs-btn-border-color: #212529;\n --bs-btn-hover-bg: #fccc32;\n --bs-btn-hover-border-color: #fccc32;\n }\n justifi-business-list::part(error-state) {\n color: red;\n background-color: #EEEEF5;\n }\n justifi-business-list::part(loading-state-cell) {\n background-color: #EEEEF5;\n }\n justifi-business-list::part(table-row) {\n background-color: #EEEEF5;\n }\n justifi-business-list::part(table-row-even) {\n background-color: #F4F4F6;\n }\n </style>\n `\n]\n\nexport const Contained = Template.bind({});\nContained.decorators = [\n (Story) => `\n <div style=\"position: relative; width: 900px; height: 300px; overflow-x: hidden;\">\n ${Story()}\n </div>\n `\n]\nContained.args = new BusinessListArgs({});\n"]}
1
+ {"version":3,"file":"business-list.stories.js","sourceRoot":"","sources":["../../../../src/components/business-list/business-list.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,eAAe;EACb,KAAK,EAAE,6BAA6B;EACpC,SAAS,EAAE,uBAAuB;EAClC,UAAU,EAAE,EAAE;CACf,CAAC;AAEF,MAAM,gBAAgB;EAIpB,YAAY,IAAI;IACd,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,MAAM,CAAC,cAAc,CAAC;IACjE,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,MAAM,CAAC,wBAAwB,CAAC;EAC7E,CAAC;CACF;AAED,MAAM,QAAQ,GAAG,CAAC,IAAsB,EAAE,EAAE;EAC1C,OAAO,CAAC;;;oBAGU,IAAI,CAAC,YAAY,CAAC;oBAClB,IAAI,CAAC,YAAY,CAAC;;GAEnC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG,IAAI,gBAAgB,CAAC,EAAE,CAAC,CAAC;AAEtC,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,IAAI,GAAG,IAAI,gBAAgB,CAAC,EAAE,CAAC,CAAC;AACvC,MAAM,CAAC,UAAU,GAAG;EAClB,CAAC,KAAK,EAAE,EAAE,CAAC;MACP,KAAK,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BV;CACF,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,SAAS,CAAC,UAAU,GAAG;EACrB,CAAC,KAAK,EAAE,EAAE,CAAC;;QAEL,KAAK,EAAE;;GAEZ;CACF,CAAA;AACD,SAAS,CAAC,IAAI,GAAG,IAAI,gBAAgB,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { config } from '../../../config';\n\nexport default {\n title: 'dev/Components/BusinessList',\n component: 'justifi-business-list',\n parameters: {}\n};\n\nclass BusinessListArgs {\n 'auth-token': string;\n 'account-id': string;\n\n constructor(args) {\n this['auth-token'] = args['auth-token'] || config.proxyAuthToken;\n this['account-id'] = args['account-id'] || config.exampleBusinessAccountId;\n }\n}\n\nconst Template = (args: BusinessListArgs) => {\n return (`\n <justifi-business-list\n data-testid=\"justifi-business-list\"\n auth-token=\"${args['auth-token']}\"\n account-id=\"${args['account-id']}\"\n />\n `);\n};\n\nexport const Basic = Template.bind({});\nBasic.args = new BusinessListArgs({});\n\nexport const Styled = Template.bind({});\nStyled.args = new BusinessListArgs({});\nStyled.decorators = [\n (Story) => `\n ${Story()}\n <style>\n justifi-business-list::part(table-head-cell) {\n background-color: #F4F4F6;\n }\n justifi-business-list::part(pagination-bar) {\n background-color: #F4F4F6;\n }\n justifi-business-list::part(arrow) {\n --bs-btn-disabled-bg: #212529;\n --bs-btn-disabled-border-color: #212529;\n --bs-btn-bg: #212529;\n --bs-btn-border-color: #212529;\n --bs-btn-hover-bg: #fccc32;\n --bs-btn-hover-border-color: #fccc32;\n }\n justifi-business-list::part(error-state) {\n color: red;\n background-color: #EEEEF5;\n }\n justifi-business-list::part(loading-state-cell) {\n background-color: #EEEEF5;\n }\n justifi-business-list::part(table-row) {\n background-color: #EEEEF5;\n }\n justifi-business-list::part(table-row-even) {\n background-color: #F4F4F6;\n }\n </style>\n `\n]\n\nexport const Contained = Template.bind({});\nContained.decorators = [\n (Story) => `\n <div style=\"position: relative; width: 900px; height: 300px; overflow-x: hidden;\">\n ${Story()}\n </div>\n `\n]\nContained.args = new BusinessListArgs({});\n"]}
@@ -1,3 +1,4 @@
1
+ import { config } from "../../../config";
1
2
  export default {
2
3
  title: 'Components/CardForm',
3
4
  component: 'justifi-card-form',
@@ -78,7 +79,7 @@ const Template = (args) => {
78
79
  <justifi-card-form
79
80
  data-testid="card-form-iframe"
80
81
  validation-mode='${args['validation-mode'] || 'onSubmit'}'
81
- iframe-origin='${process.env.IFRAME_ORIGIN}'
82
+ iframe-origin='${config.iframeOrigin}'
82
83
  single-line='${args['single-line']}'
83
84
  />
84
85
  </div>
@@ -1 +1 @@
1
- {"version":3,"file":"card-form.stories.js","sourceRoot":"","sources":["../../../../src/components/card-form/card-form.stories.ts"],"names":[],"mappings":"AAOA,eAAe;EACb,KAAK,EAAE,qBAAqB;EAC5B,SAAS,EAAE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,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCvB,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,IAAI,GAAG;EACZ,aAAa,EAAE,KAAK;EACpB,eAAe,EAAE,eAAe;CACjC,CAAC","sourcesContent":["interface CardFormStoryArgs {\n 'iframe-origin': string;\n 'single-line': boolean;\n 'validation-mode': string;\n 'css-variables': string;\n}\n\nexport default {\n title: 'Components/CardForm',\n component: 'justifi-card-form',\n argTypes: {\n 'resize': {\n description: 'Deprecated: This method will be removed in future releases.',\n table: {\n category: 'methods',\n },\n },\n },\n decorators: [\n story => `\n <!-- Deprecated Notice -->\n <p style=\"color: red; font-family: 'Roboto Mono', monospace;\">Note: The 'resize' method is deprecated and will be removed in future releases.</p>\n ${story()}\n <script>${addEvents()}</script>\n `,\n ],\n};\n\nconst handleValidateClick = async (cardForm: HTMLJustifiCardFormElement) => {\n const valid = await cardForm.validate();\n console.log(valid);\n};\nconst handleTokenizeClick = async (cardForm: HTMLJustifiCardFormElement, paymentMethodData) => {\n const tokenizeResponse = await cardForm.tokenize('CLIENT_ID', paymentMethodData);\n console.log(tokenizeResponse);\n};\nconst handleResizeClick = async (cardForm: HTMLJustifiCardFormElement) => {\n await cardForm.resize();\n};\nconst handleReady = () => {\n console.log('card form is ready');\n const cardForm = document.querySelector('justifi-card-form') as HTMLJustifiCardFormElement;\n const validateBtn = document.querySelector('#validate-btn');\n const tokenizeBtn = document.querySelector('#tokenize-btn');\n const resizeBtn = document.querySelector('#resize-btn');\n validateBtn?.addEventListener('click', () => {\n handleValidateClick(cardForm);\n });\n tokenizeBtn?.addEventListener('click', () => {\n handleTokenizeClick(cardForm, {});\n });\n resizeBtn?.addEventListener('click', () => {\n handleResizeClick(cardForm);\n });\n};\n\nconst addEvents = () => {\n addEventListener('cardFormReady', handleReady);\n};\n\nconst FormButtons = `\n <style>\n .button-bar {\n display: flex;\n aligin-items: center;\n padding: 10px;\n }\n .button-bar button {\n margin-right: 10px;\n border-radius: 3px;\n border: 1px solid black;\n }\n </style>\n <div class=\"button-bar\">\n <button id=\"validate-btn\">Validate</button>\n <button id=\"tokenize-btn\">Tokenize</button>\n <button id=\"resize-btn\">Resize</button>\n </div>`;\n\nconst Template = (args: CardFormStoryArgs) => {\n const includeButtons = true;\n\n return `\n <div>\n <style>\n :root {\n ${args['css-variables'] || ''}\n }\n </style>\n <justifi-card-form\n data-testid=\"card-form-iframe\"\n validation-mode='${args['validation-mode'] || 'onSubmit'}'\n iframe-origin='${process.env.IFRAME_ORIGIN}'\n single-line='${args['single-line']}'\n />\n </div>\n ${includeButtons ? FormButtons : ''}\n `;\n};\n\nexport const Basic = Template.bind({});\nBasic.args = {\n 'validation-mode': 'onSubmit',\n 'single-line': false,\n};\n\nexport const SingleLine = Template.bind({});\nSingleLine.args = {\n 'single-line': true,\n};\n\nconst styledVariables = `\n --jfi-load-google-font: 'Inter:wght@200;400;700;900&family=Agdasima';\n --jfi-layout-font-family: Agdasima;\n --jfi-layout-padding: 4px;\n --jfi-layout-form-control-spacing-x: .5rem;\n --jfi-layout-form-control-spacing-y: 1rem;\n --jfi-form-label-font-weight: 100;\n --jfi-form-label-font-family: Inter;\n --jfi-form-label-margin: 0 0 .5rem 0;\n --jfi-form-control-background-color: #F4F4F6;\n --jfi-form-control-background-color-hover: #EEEEF5;\n --jfi-form-control-border-color: rgba(0, 0, 0, 0.42);\n --jfi-form-control-border-color-hover: rgba(0, 0, 0, 0.62);\n --jfi-form-control-border-color-focus: #fccc32;\n --jfi-form-control-border-color-error: #C12727;\n --jfi-form-control-border-top-width: 0;\n --jfi-form-control-border-left-width: 0;\n --jfi-form-control-border-bottom-width: 1px;\n --jfi-form-control-border-right-width: 0;\n --jfi-form-control-border-radius: 4px 4px 0 0;\n --jfi-form-control-border-style: solid;\n --jfi-form-control-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n --jfi-form-control-box-shadow-focus: none;\n --jfi-form-control-box-shadow-error-focus: none;\n --jfi-form-control-border-style: solid;\n --jfi-form-control-color: #212529;\n --jfi-form-control-font-size: 1rem;\n --jfi-form-control-font-weight: 400;\n --jfi-form-control-line-height: 2;\n --jfi-form-control-margin: 0;\n --jfi-form-control-padding: .5rem .875rem;\n --jfi-error-message-color: #C12727;\n --jfi-error-message-margin: .25rem 0 0 0;\n --jfi-error-message-font-size: .875rem;\n`;\n\nexport const Styled = Template.bind({});\nStyled.args = {\n 'single-line': false,\n 'css-variables': styledVariables,\n};\n"]}
1
+ {"version":3,"file":"card-form.stories.js","sourceRoot":"","sources":["../../../../src/components/card-form/card-form.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AASzC,eAAe;EACb,KAAK,EAAE,qBAAqB;EAC5B,SAAS,EAAE,mBAAmB;EAC9B,QAAQ,EAAE;IACR,QAAQ,EAAE;MACR,WAAW,EAAE,6DAA6D;MAC1E,KAAK,EAAE;QACL,QAAQ,EAAE,SAAS;OACpB;KACF;GACF;EACD,UAAU,EAAE;IACV,KAAK,CAAC,EAAE,CAAC;;;QAGL,KAAK,EAAE;gBACC,SAAS,EAAE;KACtB;GACF;CACF,CAAC;AAEF,MAAM,mBAAmB,GAAG,KAAK,EAAE,QAAoC,EAAE,EAAE;EACzE,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC,QAAQ,EAAE,CAAC;EACxC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACrB,CAAC,CAAC;AACF,MAAM,mBAAmB,GAAG,KAAK,EAAE,QAAoC,EAAE,iBAAiB,EAAE,EAAE;EAC5F,MAAM,gBAAgB,GAAG,MAAM,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC;EACjF,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;AAChC,CAAC,CAAC;AACF,MAAM,iBAAi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I,EAAE;;;;;2BAKV,IAAI,CAAC,iBAAiB,CAAC,IAAI,UAAU;yBACvC,MAAM,CAAC,YAAY;uBACrB,IAAI,CAAC,aAAa,CAAC;;;MAGpC,cAAc,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE;GACpC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;EACX,iBAAiB,EAAE,UAAU;EAC7B,aAAa,EAAE,KAAK;CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5C,UAAU,CAAC,IAAI,GAAG;EAChB,aAAa,EAAE,IAAI;CACpB,CAAC;AAEF,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCvB,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,IAAI,GAAG;EACZ,aAAa,EAAE,KAAK;EACpB,eAAe,EAAE,eAAe;CACjC,CAAC","sourcesContent":["import { config } from '../../../config';\n\ninterface CardFormStoryArgs {\n 'iframe-origin': string;\n 'single-line': boolean;\n 'validation-mode': string;\n 'css-variables': string;\n}\n\nexport default {\n title: 'Components/CardForm',\n component: 'justifi-card-form',\n argTypes: {\n 'resize': {\n description: 'Deprecated: This method will be removed in future releases.',\n table: {\n category: 'methods',\n },\n },\n },\n decorators: [\n story => `\n <!-- Deprecated Notice -->\n <p style=\"color: red; font-family: 'Roboto Mono', monospace;\">Note: The 'resize' method is deprecated and will be removed in future releases.</p>\n ${story()}\n <script>${addEvents()}</script>\n `,\n ],\n};\n\nconst handleValidateClick = async (cardForm: HTMLJustifiCardFormElement) => {\n const valid = await cardForm.validate();\n console.log(valid);\n};\nconst handleTokenizeClick = async (cardForm: HTMLJustifiCardFormElement, paymentMethodData) => {\n const tokenizeResponse = await cardForm.tokenize('CLIENT_ID', paymentMethodData);\n console.log(tokenizeResponse);\n};\nconst handleResizeClick = async (cardForm: HTMLJustifiCardFormElement) => {\n await cardForm.resize();\n};\nconst handleReady = () => {\n console.log('card form is ready');\n const cardForm = document.querySelector('justifi-card-form') as HTMLJustifiCardFormElement;\n const validateBtn = document.querySelector('#validate-btn');\n const tokenizeBtn = document.querySelector('#tokenize-btn');\n const resizeBtn = document.querySelector('#resize-btn');\n validateBtn?.addEventListener('click', () => {\n handleValidateClick(cardForm);\n });\n tokenizeBtn?.addEventListener('click', () => {\n handleTokenizeClick(cardForm, {});\n });\n resizeBtn?.addEventListener('click', () => {\n handleResizeClick(cardForm);\n });\n};\n\nconst addEvents = () => {\n addEventListener('cardFormReady', handleReady);\n};\n\nconst FormButtons = `\n <style>\n .button-bar {\n display: flex;\n aligin-items: center;\n padding: 10px;\n }\n .button-bar button {\n margin-right: 10px;\n border-radius: 3px;\n border: 1px solid black;\n }\n </style>\n <div class=\"button-bar\">\n <button id=\"validate-btn\">Validate</button>\n <button id=\"tokenize-btn\">Tokenize</button>\n <button id=\"resize-btn\">Resize</button>\n </div>`;\n\nconst Template = (args: CardFormStoryArgs) => {\n const includeButtons = true;\n\n return `\n <div>\n <style>\n :root {\n ${args['css-variables'] || ''}\n }\n </style>\n <justifi-card-form\n data-testid=\"card-form-iframe\"\n validation-mode='${args['validation-mode'] || 'onSubmit'}'\n iframe-origin='${config.iframeOrigin}'\n single-line='${args['single-line']}'\n />\n </div>\n ${includeButtons ? FormButtons : ''}\n `;\n};\n\nexport const Basic = Template.bind({});\nBasic.args = {\n 'validation-mode': 'onSubmit',\n 'single-line': false,\n};\n\nexport const SingleLine = Template.bind({});\nSingleLine.args = {\n 'single-line': true,\n};\n\nconst styledVariables = `\n --jfi-load-google-font: 'Inter:wght@200;400;700;900&family=Agdasima';\n --jfi-layout-font-family: Agdasima;\n --jfi-layout-padding: 4px;\n --jfi-layout-form-control-spacing-x: .5rem;\n --jfi-layout-form-control-spacing-y: 1rem;\n --jfi-form-label-font-weight: 100;\n --jfi-form-label-font-family: Inter;\n --jfi-form-label-margin: 0 0 .5rem 0;\n --jfi-form-control-background-color: #F4F4F6;\n --jfi-form-control-background-color-hover: #EEEEF5;\n --jfi-form-control-border-color: rgba(0, 0, 0, 0.42);\n --jfi-form-control-border-color-hover: rgba(0, 0, 0, 0.62);\n --jfi-form-control-border-color-focus: #fccc32;\n --jfi-form-control-border-color-error: #C12727;\n --jfi-form-control-border-top-width: 0;\n --jfi-form-control-border-left-width: 0;\n --jfi-form-control-border-bottom-width: 1px;\n --jfi-form-control-border-right-width: 0;\n --jfi-form-control-border-radius: 4px 4px 0 0;\n --jfi-form-control-border-style: solid;\n --jfi-form-control-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n --jfi-form-control-box-shadow-focus: none;\n --jfi-form-control-box-shadow-error-focus: none;\n --jfi-form-control-border-style: solid;\n --jfi-form-control-color: #212529;\n --jfi-form-control-font-size: 1rem;\n --jfi-form-control-font-weight: 400;\n --jfi-form-control-line-height: 2;\n --jfi-form-control-margin: 0;\n --jfi-form-control-padding: .5rem .875rem;\n --jfi-error-message-color: #C12727;\n --jfi-error-message-margin: .25rem 0 0 0;\n --jfi-error-message-font-size: .875rem;\n`;\n\nexport const Styled = Template.bind({});\nStyled.args = {\n 'single-line': false,\n 'css-variables': styledVariables,\n};\n"]}
@@ -0,0 +1,59 @@
1
+ import { formatCurrency, formatDisplayDate } from "../../utils/utils";
2
+ export const generateChartOptions = (total, dates, endDate) => {
3
+ return ({
4
+ type: 'bar',
5
+ options: {
6
+ plugins: {
7
+ legend: {
8
+ display: false
9
+ },
10
+ title: {
11
+ display: true,
12
+ text: ['Trailing 30 Days', 'Gross Payments', formatCurrency(total)],
13
+ position: 'top',
14
+ align: 'start'
15
+ },
16
+ tooltip: {
17
+ displayColors: false,
18
+ intersect: false,
19
+ callbacks: {
20
+ label: (context) => {
21
+ let index = context.dataIndex;
22
+ let date = formatDisplayDate(dates[index].date, endDate);
23
+ let value = formatCurrency(dates[index].value);
24
+ return [date, value];
25
+ },
26
+ }
27
+ }
28
+ },
29
+ scales: {
30
+ x: {
31
+ grid: {
32
+ drawOnChartArea: false,
33
+ drawTicks: false
34
+ },
35
+ ticks: {
36
+ callback: (index) => {
37
+ if (index === 0 || index === dates.length - 1) {
38
+ return formatDisplayDate(dates[index].date, endDate);
39
+ }
40
+ }
41
+ }
42
+ },
43
+ y: {
44
+ display: false
45
+ }
46
+ }
47
+ },
48
+ data: {
49
+ labels: dates.map(() => ''),
50
+ datasets: [
51
+ {
52
+ label: 'Gross Volume by Date',
53
+ data: dates.map((date) => date.value)
54
+ }
55
+ ]
56
+ },
57
+ });
58
+ };
59
+ //# sourceMappingURL=chart-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart-utils.js","sourceRoot":"","sources":["../../../../src/components/gross-payment-chart/chart-utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,KAAa,EACb,KAA8B,EAC9B,OAAe,EACf,EAAE;EACF,OAAO,CAAC;IACN,IAAI,EAAE,KAAK;IACX,OAAO,EAAE;MACP,OAAO,EAAE;QACP,MAAM,EAAE;UACN,OAAO,EAAE,KAAK;SACf;QACD,KAAK,EAAE;UACL,OAAO,EAAE,IAAI;UACb,IAAI,EAAE,CAAC,kBAAkB,EAAE,gBAAgB,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC;UACnE,QAAQ,EAAE,KAAK;UACf,KAAK,EAAE,OAAO;SACf;QACD,OAAO,EAAE;UACP,aAAa,EAAE,KAAK;UACpB,SAAS,EAAE,KAAK;UAChB,SAAS,EAAE;YACT,KAAK,EAAE,CAAC,OAAO,EAAE,EAAE;cACjB,IAAI,KAAK,GAAG,OAAO,CAAC,SAAS,CAAC;cAC9B,IAAI,IAAI,GAAG,iBAAiB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;cACzD,IAAI,KAAK,GAAG,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAA;cAC9C,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;YACtB,CAAC;WACF;SACF;OACF;MACD,MAAM,EAAE;QACN,CAAC,EAAE;UACD,IAAI,EAAE;YACJ,eAAe,EAAE,KAAK;YACtB,SAAS,EAAE,KAAK;WACjB;UACD,KAAK,EAAE;YACL,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;cAClB,IAAI,KAAK,KAAK,CAAC,IAAI,KAAK,KAAK,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC7C,OAAO,iBAAiB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;eACtD;YACH,CAAC;WACF;SACF;QACD,CAAC,EAAE;UACD,OAAO,EAAE,KAAK;SACf;OACF;KACF;IACD,IAAI,EAAE;MACJ,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC;MAC3B,QAAQ,EAAE;QACR;UACE,KAAK,EAAE,sBAAsB;UAC7B,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC;SACtC;OAAC;KACL;GACF,CAAC,CAAC;AACL,CAAC,CAAA","sourcesContent":["import { GrossVolumeReportDate } from \"../../api/GrossVolume\";\nimport { formatCurrency, formatDisplayDate } from \"../../utils/utils\";\n\nexport const generateChartOptions = (\n total: number,\n dates: GrossVolumeReportDate[],\n endDate: string\n) => {\n return ({\n type: 'bar',\n options: {\n plugins: {\n legend: {\n display: false\n },\n title: {\n display: true,\n text: ['Trailing 30 Days', 'Gross Payments', formatCurrency(total)],\n position: 'top',\n align: 'start'\n },\n tooltip: {\n displayColors: false,\n intersect: false,\n callbacks: {\n label: (context) => {\n let index = context.dataIndex;\n let date = formatDisplayDate(dates[index].date, endDate);\n let value = formatCurrency(dates[index].value)\n return [date, value]\n },\n }\n }\n },\n scales: {\n x: {\n grid: {\n drawOnChartArea: false,\n drawTicks: false\n },\n ticks: {\n callback: (index) => {\n if (index === 0 || index === dates.length - 1) {\n return formatDisplayDate(dates[index].date, endDate);\n }\n }\n }\n },\n y: {\n display: false\n }\n }\n },\n data: {\n labels: dates.map(() => ''),\n datasets: [\n {\n label: 'Gross Volume by Date',\n data: dates.map((date) => date.value)\n }]\n },\n });\n}"]}