@justifi/webcomponents 4.0.5 → 4.0.6

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 (265) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cjs/Api-11362403.js +111 -0
  3. package/dist/cjs/Api-11362403.js.map +1 -0
  4. package/dist/cjs/Payment-ac4dea02.js +2 -0
  5. package/dist/cjs/Payment-ac4dea02.js.map +1 -0
  6. package/dist/cjs/{index-051b6dd0.js → index-34312a38.js} +185 -21
  7. package/dist/cjs/index-34312a38.js.map +1 -0
  8. package/dist/cjs/index.cjs.js +2 -0
  9. package/dist/cjs/index.cjs.js.map +1 -0
  10. package/dist/cjs/{index.esm-8df4906e.js → index.esm-bcf90c56.js} +2 -244
  11. package/dist/cjs/index.esm-bcf90c56.js.map +1 -0
  12. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +3 -1
  13. package/dist/cjs/justifi-bank-account-form.cjs.entry.js.map +1 -0
  14. package/dist/cjs/justifi-billing-form_2.cjs.entry.js +8 -5
  15. package/dist/cjs/justifi-billing-form_2.cjs.entry.js.map +1 -0
  16. package/dist/cjs/justifi-business-address.cjs.entry.js +7 -4
  17. package/dist/cjs/justifi-business-address.cjs.entry.js.map +1 -0
  18. package/dist/cjs/justifi-business-info.cjs.entry.js +174 -0
  19. package/dist/cjs/justifi-business-info.cjs.entry.js.map +1 -0
  20. package/dist/cjs/justifi-card-form.cjs.entry.js +3 -1
  21. package/dist/cjs/justifi-card-form.cjs.entry.js.map +1 -0
  22. package/dist/cjs/justifi-payment-form.cjs.entry.js +10 -4
  23. package/dist/cjs/justifi-payment-form.cjs.entry.js.map +1 -0
  24. package/dist/cjs/justifi-payment-method-form.cjs.entry.js +12 -7
  25. package/dist/cjs/justifi-payment-method-form.cjs.entry.js.map +1 -0
  26. package/dist/cjs/justifi-payments-list.cjs.entry.js +5 -108
  27. package/dist/cjs/justifi-payments-list.cjs.entry.js.map +1 -0
  28. package/dist/cjs/loader.cjs.js +6 -3
  29. package/dist/cjs/loader.cjs.js.map +1 -0
  30. package/dist/cjs/select-input_2.cjs.entry.js +5 -3
  31. package/dist/cjs/select-input_2.cjs.entry.js.map +1 -0
  32. package/dist/cjs/state-options-efeaa587.js +248 -0
  33. package/dist/cjs/state-options-efeaa587.js.map +1 -0
  34. package/dist/cjs/webcomponents.cjs.js +12 -3
  35. package/dist/cjs/webcomponents.cjs.js.map +1 -0
  36. package/dist/collection/api/Api.js +2 -1
  37. package/dist/collection/api/Api.js.map +1 -0
  38. package/dist/collection/api/Pagination.js +1 -0
  39. package/dist/collection/api/Pagination.js.map +1 -0
  40. package/dist/collection/api/Payment.js +1 -0
  41. package/dist/collection/api/Payment.js.map +1 -0
  42. package/dist/collection/api/index.js +1 -0
  43. package/dist/collection/api/index.js.map +1 -0
  44. package/dist/collection/api/mockData/MockPayments.js +1 -0
  45. package/dist/collection/api/mockData/MockPayments.js.map +1 -0
  46. package/dist/collection/collection-manifest.json +4 -3
  47. package/dist/collection/components/bank-account-form/bank-account-form.js +1 -0
  48. package/dist/collection/components/bank-account-form/bank-account-form.js.map +1 -0
  49. package/dist/collection/components/bank-account-form/bank-account-form.stories.js +1 -0
  50. package/dist/collection/components/bank-account-form/bank-account-form.stories.js.map +1 -0
  51. package/dist/collection/components/bank-account-form/test/bank-account-form.e2e.js +14 -0
  52. package/dist/collection/components/bank-account-form/test/bank-account-form.e2e.js.map +1 -0
  53. package/dist/collection/components/bank-account-form/test/bank-account-form.spec.js +48 -0
  54. package/dist/collection/components/bank-account-form/test/bank-account-form.spec.js.map +1 -0
  55. package/dist/collection/components/billing-form/billing-form-schema.js +1 -0
  56. package/dist/collection/components/billing-form/billing-form-schema.js.map +1 -0
  57. package/dist/collection/components/billing-form/billing-form.css +337 -0
  58. package/dist/collection/components/billing-form/billing-form.js +1 -0
  59. package/dist/collection/components/billing-form/billing-form.js.map +1 -0
  60. package/dist/collection/components/billing-form/billing-form.stories.js +1 -0
  61. package/dist/collection/components/billing-form/billing-form.stories.js.map +1 -0
  62. package/dist/collection/components/billing-form/state-options.js +1 -0
  63. package/dist/collection/components/billing-form/state-options.js.map +1 -0
  64. package/dist/collection/components/billing-form/test/billing-form.spec.js +31 -0
  65. package/dist/collection/components/billing-form/test/billing-form.spec.js.map +1 -0
  66. package/dist/collection/components/business-address/business-address-schema.js +1 -0
  67. package/dist/collection/components/business-address/business-address-schema.js.map +1 -0
  68. package/dist/collection/components/business-address/business-address.css +337 -0
  69. package/dist/collection/components/business-address/business-address.js +1 -0
  70. package/dist/collection/components/business-address/business-address.js.map +1 -0
  71. package/dist/collection/components/business-address/test/business-address.e2e.js +10 -0
  72. package/dist/collection/components/business-address/test/business-address.e2e.js.map +1 -0
  73. package/dist/collection/components/business-address/test/business-address.spec.js +18 -0
  74. package/dist/collection/components/business-address/test/business-address.spec.js.map +1 -0
  75. package/dist/collection/components/business-info/business-info-schema.js +94 -0
  76. package/dist/collection/components/business-info/business-info-schema.js.map +1 -0
  77. package/dist/collection/components/business-info/business-info.css +2274 -0
  78. package/dist/collection/components/business-info/business-info.js +168 -0
  79. package/dist/collection/components/business-info/business-info.js.map +1 -0
  80. package/dist/collection/components/card-form/card-form.js +1 -0
  81. package/dist/collection/components/card-form/card-form.js.map +1 -0
  82. package/dist/collection/components/card-form/card-form.stories.js +1 -0
  83. package/dist/collection/components/card-form/card-form.stories.js.map +1 -0
  84. package/dist/collection/components/card-form/test/card-form.e2e.js +14 -0
  85. package/dist/collection/components/card-form/test/card-form.e2e.js.map +1 -0
  86. package/dist/collection/components/card-form/test/card-form.spec.js +56 -0
  87. package/dist/collection/components/card-form/test/card-form.spec.js.map +1 -0
  88. package/dist/collection/components/payment-form/payment-form.css +412 -0
  89. package/dist/collection/components/payment-form/payment-form.js +8 -2
  90. package/dist/collection/components/payment-form/payment-form.js.map +1 -0
  91. package/dist/collection/components/payment-form/payment-form.stories.js +1 -0
  92. package/dist/collection/components/payment-form/payment-form.stories.js.map +1 -0
  93. package/dist/collection/components/payment-form/payment-method-selector.css +337 -0
  94. package/dist/collection/components/payment-form/payment-method-selector.js +1 -0
  95. package/dist/collection/components/payment-form/payment-method-selector.js.map +1 -0
  96. package/dist/collection/components/payment-form/test/payment-form.e2e.js +23 -0
  97. package/dist/collection/components/payment-form/test/payment-form.e2e.js.map +1 -0
  98. package/dist/collection/components/payment-form/test/payment-form.spec.js +182 -0
  99. package/dist/collection/components/payment-form/test/payment-form.spec.js.map +1 -0
  100. package/dist/collection/components/payment-form/tokenize.js +1 -0
  101. package/dist/collection/components/payment-form/tokenize.js.map +1 -0
  102. package/dist/collection/components/payment-method-form/get-computed-theme.js +1 -0
  103. package/dist/collection/components/payment-method-form/get-computed-theme.js.map +1 -0
  104. package/dist/collection/components/payment-method-form/message-event-types.js +1 -0
  105. package/dist/collection/components/payment-method-form/message-event-types.js.map +1 -0
  106. package/dist/collection/components/payment-method-form/payment-method-form.js +2 -2
  107. package/dist/collection/components/payment-method-form/payment-method-form.js.map +1 -0
  108. package/dist/collection/components/payment-method-form/payment-method-responses.js +1 -0
  109. package/dist/collection/components/payment-method-form/payment-method-responses.js.map +1 -0
  110. package/dist/collection/components/payment-method-form/test/payment-method-form.e2e.js +22 -0
  111. package/dist/collection/components/payment-method-form/test/payment-method-form.e2e.js.map +1 -0
  112. package/dist/collection/components/payment-method-form/test/payment-method-form.spec.js +83 -0
  113. package/dist/collection/components/payment-method-form/test/payment-method-form.spec.js.map +1 -0
  114. package/dist/collection/components/payment-method-form/theme.js +1 -0
  115. package/dist/collection/components/payment-method-form/theme.js.map +1 -0
  116. package/dist/collection/components/payments-list/payments-list.js +1 -0
  117. package/dist/collection/components/payments-list/payments-list.js.map +1 -0
  118. package/dist/collection/components/payments-list/test/payments-list.spec.js +21 -0
  119. package/dist/collection/components/payments-list/test/payments-list.spec.js.map +1 -0
  120. package/dist/collection/components/select-input/select-input.css +337 -0
  121. package/dist/collection/components/select-input/select-input.js +1 -0
  122. package/dist/collection/components/select-input/select-input.js.map +1 -0
  123. package/dist/collection/components/select-input/test/select-input.spec.js +36 -0
  124. package/dist/collection/components/select-input/test/select-input.spec.js.map +1 -0
  125. package/dist/collection/components/text-input/test/text-input.spec.js +19 -0
  126. package/dist/collection/components/text-input/test/text-input.spec.js.map +1 -0
  127. package/dist/collection/components/text-input/text-input.css +337 -0
  128. package/dist/collection/components/text-input/text-input.js +1 -0
  129. package/dist/collection/components/text-input/text-input.js.map +1 -0
  130. package/dist/collection/index.js +1 -0
  131. package/dist/collection/index.js.map +1 -0
  132. package/dist/collection/utils/utils.js +1 -0
  133. package/dist/collection/utils/utils.js.map +1 -0
  134. package/dist/components/Api.js +109 -0
  135. package/dist/components/Api.js.map +1 -0
  136. package/dist/components/Payment.js +2 -0
  137. package/dist/components/Payment.js.map +1 -0
  138. package/dist/components/billing-form.js +6 -3
  139. package/dist/components/billing-form.js.map +1 -0
  140. package/dist/components/index.d.ts +9 -13
  141. package/dist/{esm/index.esm-c6a89005.js → components/index.esm.js} +3 -244
  142. package/dist/components/index.esm.js.map +1 -0
  143. package/dist/components/index.js +3 -11
  144. package/dist/components/index.js.map +1 -0
  145. package/dist/components/justifi-bank-account-form.js +3 -1
  146. package/dist/components/justifi-bank-account-form.js.map +1 -0
  147. package/dist/components/justifi-billing-form.js +2 -0
  148. package/dist/components/justifi-billing-form.js.map +1 -0
  149. package/dist/components/justifi-business-address.js +6 -3
  150. package/dist/components/justifi-business-address.js.map +1 -0
  151. package/dist/components/justifi-business-info.d.ts +11 -0
  152. package/dist/components/justifi-business-info.js +207 -0
  153. package/dist/components/justifi-business-info.js.map +1 -0
  154. package/dist/components/justifi-card-form.js +3 -1
  155. package/dist/components/justifi-card-form.js.map +1 -0
  156. package/dist/components/justifi-payment-form.js +11 -4
  157. package/dist/components/justifi-payment-form.js.map +1 -0
  158. package/dist/components/justifi-payment-method-form.js +2 -0
  159. package/dist/components/justifi-payment-method-form.js.map +1 -0
  160. package/dist/components/justifi-payment-method-selector.js +2 -0
  161. package/dist/components/justifi-payment-method-selector.js.map +1 -0
  162. package/dist/components/justifi-payments-list.js +4 -107
  163. package/dist/components/justifi-payments-list.js.map +1 -0
  164. package/dist/components/payment-method-form.js +12 -7
  165. package/dist/components/payment-method-form.js.map +1 -0
  166. package/dist/components/payment-method-selector.js +4 -2
  167. package/dist/components/payment-method-selector.js.map +1 -0
  168. package/dist/components/select-input.js +2 -0
  169. package/dist/components/select-input.js.map +1 -0
  170. package/dist/components/select-input2.js +4 -2
  171. package/dist/components/select-input2.js.map +1 -0
  172. package/dist/components/state-options.js +3 -1845
  173. package/dist/components/state-options.js.map +1 -0
  174. package/dist/components/text-input.js +2 -0
  175. package/dist/components/text-input.js.map +1 -0
  176. package/dist/components/text-input2.js +4 -2
  177. package/dist/components/text-input2.js.map +1 -0
  178. package/dist/esm/Api-a07f0057.js +109 -0
  179. package/dist/esm/Api-a07f0057.js.map +1 -0
  180. package/dist/esm/Payment-c86e1e84.js +2 -0
  181. package/dist/esm/Payment-c86e1e84.js.map +1 -0
  182. package/dist/esm/{index-605b421a.js → index-044f93fc.js} +185 -22
  183. package/dist/esm/index-044f93fc.js.map +1 -0
  184. package/dist/esm/index.esm-5624a5ed.js +1847 -0
  185. package/dist/esm/index.esm-5624a5ed.js.map +1 -0
  186. package/dist/esm/index.js +2 -0
  187. package/dist/esm/index.js.map +1 -0
  188. package/dist/esm/justifi-bank-account-form.entry.js +3 -1
  189. package/dist/esm/justifi-bank-account-form.entry.js.map +1 -0
  190. package/dist/esm/justifi-billing-form_2.entry.js +7 -4
  191. package/dist/esm/justifi-billing-form_2.entry.js.map +1 -0
  192. package/dist/esm/justifi-business-address.entry.js +6 -3
  193. package/dist/esm/justifi-business-address.entry.js.map +1 -0
  194. package/dist/esm/justifi-business-info.entry.js +170 -0
  195. package/dist/esm/justifi-business-info.entry.js.map +1 -0
  196. package/dist/esm/justifi-card-form.entry.js +3 -1
  197. package/dist/esm/justifi-card-form.entry.js.map +1 -0
  198. package/dist/esm/justifi-payment-form.entry.js +10 -4
  199. package/dist/esm/justifi-payment-form.entry.js.map +1 -0
  200. package/dist/esm/justifi-payment-method-form.entry.js +12 -7
  201. package/dist/esm/justifi-payment-method-form.entry.js.map +1 -0
  202. package/dist/esm/justifi-payments-list.entry.js +4 -107
  203. package/dist/esm/justifi-payments-list.entry.js.map +1 -0
  204. package/dist/esm/loader.js +6 -3
  205. package/dist/esm/loader.js.map +1 -0
  206. package/dist/esm/polyfills/css-shim.js +1 -1
  207. package/dist/esm/select-input_2.entry.js +5 -3
  208. package/dist/esm/select-input_2.entry.js.map +1 -0
  209. package/dist/esm/state-options-188acc34.js +246 -0
  210. package/dist/esm/state-options-188acc34.js.map +1 -0
  211. package/dist/esm/webcomponents.js +9 -3
  212. package/dist/esm/webcomponents.js.map +1 -0
  213. package/dist/types/api/Api.d.ts +1 -1
  214. package/dist/types/api/Payment.d.ts +1 -1
  215. package/dist/types/components/business-info/business-info-schema.d.ts +42 -0
  216. package/dist/types/components/business-info/business-info.d.ts +20 -0
  217. package/dist/types/components/payment-form/payment-form.d.ts +1 -0
  218. package/dist/types/components/payment-method-form/payment-method-responses.d.ts +1 -1
  219. package/dist/types/components.d.ts +63 -0
  220. package/dist/types/stencil-public-runtime.d.ts +72 -15
  221. package/dist/webcomponents/index.esm.js +2 -0
  222. package/dist/webcomponents/index.esm.js.map +1 -0
  223. package/dist/webcomponents/p-0ea23153.js +2 -0
  224. package/dist/webcomponents/p-0ea23153.js.map +1 -0
  225. package/dist/webcomponents/p-16b4e90a.entry.js +2 -0
  226. package/dist/webcomponents/p-16b4e90a.entry.js.map +1 -0
  227. package/dist/webcomponents/p-1ca0646b.js +2 -1
  228. package/dist/webcomponents/p-1ca0646b.js.map +1 -0
  229. package/dist/webcomponents/p-1f151d49.js +2 -0
  230. package/dist/webcomponents/p-1f151d49.js.map +1 -0
  231. package/dist/webcomponents/p-1f23b391.entry.js +2 -0
  232. package/dist/webcomponents/p-1f23b391.entry.js.map +1 -0
  233. package/dist/webcomponents/p-255b1284.entry.js +2 -0
  234. package/dist/webcomponents/p-255b1284.entry.js.map +1 -0
  235. package/dist/webcomponents/p-3aa91155.js +3 -0
  236. package/dist/webcomponents/p-3aa91155.js.map +1 -0
  237. package/dist/webcomponents/p-90c0d9e1.entry.js +2 -0
  238. package/dist/webcomponents/p-90c0d9e1.entry.js.map +1 -0
  239. package/dist/webcomponents/p-c903cc5a.entry.js +2 -0
  240. package/dist/webcomponents/p-c903cc5a.entry.js.map +1 -0
  241. package/dist/webcomponents/p-d87b0711.entry.js +2 -0
  242. package/dist/webcomponents/p-d87b0711.entry.js.map +1 -0
  243. package/dist/webcomponents/p-dbf7100f.entry.js +2 -0
  244. package/dist/webcomponents/p-dbf7100f.entry.js.map +1 -0
  245. package/dist/webcomponents/p-e0054bc3.js +2 -0
  246. package/dist/webcomponents/p-e0054bc3.js.map +1 -0
  247. package/dist/webcomponents/p-f30d1567.entry.js +2 -0
  248. package/dist/webcomponents/p-f30d1567.entry.js.map +1 -0
  249. package/dist/webcomponents/p-f66f024e.entry.js +2 -0
  250. package/dist/webcomponents/p-f66f024e.entry.js.map +1 -0
  251. package/dist/webcomponents/webcomponents.css +1 -1
  252. package/dist/webcomponents/webcomponents.esm.js +2 -1
  253. package/dist/webcomponents/webcomponents.esm.js.map +1 -0
  254. package/loader/index.d.ts +9 -0
  255. package/package.json +8 -4
  256. package/dist/webcomponents/p-039e3540.entry.js +0 -1
  257. package/dist/webcomponents/p-11e5bef9.entry.js +0 -1
  258. package/dist/webcomponents/p-20732337.js +0 -1
  259. package/dist/webcomponents/p-24409e8e.entry.js +0 -1
  260. package/dist/webcomponents/p-4a406704.js +0 -2
  261. package/dist/webcomponents/p-5774e36e.entry.js +0 -1
  262. package/dist/webcomponents/p-5b5e8351.entry.js +0 -1
  263. package/dist/webcomponents/p-5b68fa52.entry.js +0 -1
  264. package/dist/webcomponents/p-7747c086.entry.js +0 -1
  265. package/dist/webcomponents/p-bc35e124.entry.js +0 -1
@@ -67,6 +67,343 @@
67
67
  --bs-highlight-bg: #fff3cd;
68
68
  }
69
69
 
70
+ .spinner-grow,
71
+ .spinner-border {
72
+ display: inline-block;
73
+ width: var(--bs-spinner-width);
74
+ height: var(--bs-spinner-height);
75
+ vertical-align: var(--bs-spinner-vertical-align);
76
+ border-radius: 50%;
77
+ animation: var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name);
78
+ }
79
+
80
+ @keyframes spinner-border {
81
+ to {
82
+ transform: rotate(360deg) /* rtl:ignore */;
83
+ }
84
+ }
85
+ .spinner-border {
86
+ --bs-spinner-width: 2rem;
87
+ --bs-spinner-height: 2rem;
88
+ --bs-spinner-vertical-align: -0.125em;
89
+ --bs-spinner-border-width: 0.25em;
90
+ --bs-spinner-animation-speed: 0.75s;
91
+ --bs-spinner-animation-name: spinner-border;
92
+ border: var(--bs-spinner-border-width) solid currentcolor;
93
+ border-right-color: transparent;
94
+ }
95
+
96
+ .spinner-border-sm {
97
+ --bs-spinner-width: 1rem;
98
+ --bs-spinner-height: 1rem;
99
+ --bs-spinner-border-width: 0.2em;
100
+ }
101
+
102
+ @keyframes spinner-grow {
103
+ 0% {
104
+ transform: scale(0);
105
+ }
106
+ 50% {
107
+ opacity: 1;
108
+ transform: none;
109
+ }
110
+ }
111
+ .spinner-grow {
112
+ --bs-spinner-width: 2rem;
113
+ --bs-spinner-height: 2rem;
114
+ --bs-spinner-vertical-align: -0.125em;
115
+ --bs-spinner-animation-speed: 0.75s;
116
+ --bs-spinner-animation-name: spinner-grow;
117
+ background-color: currentcolor;
118
+ opacity: 0;
119
+ }
120
+
121
+ .spinner-grow-sm {
122
+ --bs-spinner-width: 1rem;
123
+ --bs-spinner-height: 1rem;
124
+ }
125
+
126
+ @media (prefers-reduced-motion: reduce) {
127
+ .spinner-border,
128
+ .spinner-grow {
129
+ --bs-spinner-animation-speed: 1.5s;
130
+ }
131
+ }
132
+ .clearfix::after {
133
+ display: block;
134
+ clear: both;
135
+ content: "";
136
+ }
137
+
138
+ .text-bg-primary {
139
+ color: #fff !important;
140
+ background-color: RGBA(13, 110, 253, var(--bs-bg-opacity, 1)) !important;
141
+ }
142
+
143
+ .text-bg-secondary {
144
+ color: #fff !important;
145
+ background-color: RGBA(108, 117, 125, var(--bs-bg-opacity, 1)) !important;
146
+ }
147
+
148
+ .text-bg-success {
149
+ color: #fff !important;
150
+ background-color: RGBA(25, 135, 84, var(--bs-bg-opacity, 1)) !important;
151
+ }
152
+
153
+ .text-bg-info {
154
+ color: #000 !important;
155
+ background-color: RGBA(13, 202, 240, var(--bs-bg-opacity, 1)) !important;
156
+ }
157
+
158
+ .text-bg-warning {
159
+ color: #000 !important;
160
+ background-color: RGBA(255, 193, 7, var(--bs-bg-opacity, 1)) !important;
161
+ }
162
+
163
+ .text-bg-danger {
164
+ color: #fff !important;
165
+ background-color: RGBA(220, 53, 69, var(--bs-bg-opacity, 1)) !important;
166
+ }
167
+
168
+ .text-bg-light {
169
+ color: #000 !important;
170
+ background-color: RGBA(248, 249, 250, var(--bs-bg-opacity, 1)) !important;
171
+ }
172
+
173
+ .text-bg-dark {
174
+ color: #fff !important;
175
+ background-color: RGBA(33, 37, 41, var(--bs-bg-opacity, 1)) !important;
176
+ }
177
+
178
+ .link-primary {
179
+ color: #0d6efd !important;
180
+ }
181
+ .link-primary:hover, .link-primary:focus {
182
+ color: #0a58ca !important;
183
+ }
184
+
185
+ .link-secondary {
186
+ color: #6c757d !important;
187
+ }
188
+ .link-secondary:hover, .link-secondary:focus {
189
+ color: #565e64 !important;
190
+ }
191
+
192
+ .link-success {
193
+ color: #198754 !important;
194
+ }
195
+ .link-success:hover, .link-success:focus {
196
+ color: #146c43 !important;
197
+ }
198
+
199
+ .link-info {
200
+ color: #0dcaf0 !important;
201
+ }
202
+ .link-info:hover, .link-info:focus {
203
+ color: #3dd5f3 !important;
204
+ }
205
+
206
+ .link-warning {
207
+ color: #ffc107 !important;
208
+ }
209
+ .link-warning:hover, .link-warning:focus {
210
+ color: #ffcd39 !important;
211
+ }
212
+
213
+ .link-danger {
214
+ color: #dc3545 !important;
215
+ }
216
+ .link-danger:hover, .link-danger:focus {
217
+ color: #b02a37 !important;
218
+ }
219
+
220
+ .link-light {
221
+ color: #f8f9fa !important;
222
+ }
223
+ .link-light:hover, .link-light:focus {
224
+ color: #f9fafb !important;
225
+ }
226
+
227
+ .link-dark {
228
+ color: #212529 !important;
229
+ }
230
+ .link-dark:hover, .link-dark:focus {
231
+ color: #1a1e21 !important;
232
+ }
233
+
234
+ .ratio {
235
+ position: relative;
236
+ width: 100%;
237
+ }
238
+ .ratio::before {
239
+ display: block;
240
+ padding-top: var(--bs-aspect-ratio);
241
+ content: "";
242
+ }
243
+ .ratio > * {
244
+ position: absolute;
245
+ top: 0;
246
+ left: 0;
247
+ width: 100%;
248
+ height: 100%;
249
+ }
250
+
251
+ .ratio-1x1 {
252
+ --bs-aspect-ratio: 100%;
253
+ }
254
+
255
+ .ratio-4x3 {
256
+ --bs-aspect-ratio: 75%;
257
+ }
258
+
259
+ .ratio-16x9 {
260
+ --bs-aspect-ratio: 56.25%;
261
+ }
262
+
263
+ .ratio-21x9 {
264
+ --bs-aspect-ratio: 42.8571428571%;
265
+ }
266
+
267
+ .fixed-top {
268
+ position: fixed;
269
+ top: 0;
270
+ right: 0;
271
+ left: 0;
272
+ z-index: 1030;
273
+ }
274
+
275
+ .fixed-bottom {
276
+ position: fixed;
277
+ right: 0;
278
+ bottom: 0;
279
+ left: 0;
280
+ z-index: 1030;
281
+ }
282
+
283
+ .sticky-top {
284
+ position: sticky;
285
+ top: 0;
286
+ z-index: 1020;
287
+ }
288
+
289
+ .sticky-bottom {
290
+ position: sticky;
291
+ bottom: 0;
292
+ z-index: 1020;
293
+ }
294
+
295
+ @media (min-width: 576px) {
296
+ .sticky-sm-top {
297
+ position: sticky;
298
+ top: 0;
299
+ z-index: 1020;
300
+ }
301
+ .sticky-sm-bottom {
302
+ position: sticky;
303
+ bottom: 0;
304
+ z-index: 1020;
305
+ }
306
+ }
307
+ @media (min-width: 768px) {
308
+ .sticky-md-top {
309
+ position: sticky;
310
+ top: 0;
311
+ z-index: 1020;
312
+ }
313
+ .sticky-md-bottom {
314
+ position: sticky;
315
+ bottom: 0;
316
+ z-index: 1020;
317
+ }
318
+ }
319
+ @media (min-width: 992px) {
320
+ .sticky-lg-top {
321
+ position: sticky;
322
+ top: 0;
323
+ z-index: 1020;
324
+ }
325
+ .sticky-lg-bottom {
326
+ position: sticky;
327
+ bottom: 0;
328
+ z-index: 1020;
329
+ }
330
+ }
331
+ @media (min-width: 1200px) {
332
+ .sticky-xl-top {
333
+ position: sticky;
334
+ top: 0;
335
+ z-index: 1020;
336
+ }
337
+ .sticky-xl-bottom {
338
+ position: sticky;
339
+ bottom: 0;
340
+ z-index: 1020;
341
+ }
342
+ }
343
+ @media (min-width: 1400px) {
344
+ .sticky-xxl-top {
345
+ position: sticky;
346
+ top: 0;
347
+ z-index: 1020;
348
+ }
349
+ .sticky-xxl-bottom {
350
+ position: sticky;
351
+ bottom: 0;
352
+ z-index: 1020;
353
+ }
354
+ }
355
+ .hstack {
356
+ display: flex;
357
+ flex-direction: row;
358
+ align-items: center;
359
+ align-self: stretch;
360
+ }
361
+
362
+ .vstack {
363
+ display: flex;
364
+ flex: 1 1 auto;
365
+ flex-direction: column;
366
+ align-self: stretch;
367
+ }
368
+
369
+ .visually-hidden,
370
+ .visually-hidden-focusable:not(:focus):not(:focus-within) {
371
+ position: absolute !important;
372
+ width: 1px !important;
373
+ height: 1px !important;
374
+ padding: 0 !important;
375
+ margin: -1px !important;
376
+ overflow: hidden !important;
377
+ clip: rect(0, 0, 0, 0) !important;
378
+ white-space: nowrap !important;
379
+ border: 0 !important;
380
+ }
381
+
382
+ .stretched-link::after {
383
+ position: absolute;
384
+ top: 0;
385
+ right: 0;
386
+ bottom: 0;
387
+ left: 0;
388
+ z-index: 1;
389
+ content: "";
390
+ }
391
+
392
+ .text-truncate {
393
+ overflow: hidden;
394
+ text-overflow: ellipsis;
395
+ white-space: nowrap;
396
+ }
397
+
398
+ .vr {
399
+ display: inline-block;
400
+ align-self: stretch;
401
+ width: 1px;
402
+ min-height: 1em;
403
+ background-color: currentcolor;
404
+ opacity: 0.25;
405
+ }
406
+
70
407
  .form-label {
71
408
  margin-bottom: 0.5rem;
72
409
  }
@@ -92,3 +92,4 @@ export class PaymentMethodSelector {
92
92
  }];
93
93
  }
94
94
  }
95
+ //# sourceMappingURL=payment-method-selector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payment-method-selector.js","sourceRoot":"","sources":["../../../../src/components/payment-form/payment-method-selector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAGlF,MAAM,mBAAmB,GAAG;EAC1B,WAAW,EAAE,cAAc;EAC3B,IAAI,EAAE,MAAM;CACb,CAAC;AAOF,MAAM,OAAO,qBAAqB;;8BACmB,EAAE;;;EAMrD,eAAe,CAAC,KAAU;IACxB,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;EACtD,CAAC;EAED,MAAM;IACJ,OAAO,CACL,WAAK,KAAK,EAAC,+BAA+B,EAAC,IAAI,EAAC,OAAO,gBAAY,uCAAuC,IACvG,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,iBAAqC,EAAE,EAAE,CAAC,CACtE,EAAC,QAAQ;MACP,aACE,EAAE,EAAE,iBAAiB,EACrB,IAAI,EAAC,OAAO,EACZ,IAAI,EAAC,mBAAmB,EACxB,KAAK,EAAE,iBAAiB,EACxB,QAAQ,EAAE,CAAC,KAAU,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EACrD,OAAO,EAAE,IAAI,CAAC,yBAAyB,KAAK,iBAAiB,EAC7D,KAAK,EAAC,yBAAyB,GAC/B;MACF,aAAO,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAC,6CAA6C,IACnF,mBAAmB,CAAC,iBAAiB,CAAC,CACjC,CACC,CACZ,CAAC,CACE,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, Fragment, h, Prop } from '@stencil/core';\nimport { PaymentMethodTypes } from '../../api';\n\nconst PaymentMethodLabels = {\n bankAccount: 'Bank Account',\n card: 'Card',\n};\n\n@Component({\n tag: 'justifi-payment-method-selector',\n styleUrl: 'payment-method-selector.scss',\n shadow: true,\n})\nexport class PaymentMethodSelector {\n @Prop() paymentMethodTypes: PaymentMethodTypes[] = [];\n @Prop() selectedPaymentMethodType: PaymentMethodTypes;\n @Event({ bubbles: true }) paymentMethodSelected: EventEmitter;\n\n defaultRadioButtonOption!: HTMLInputElement;\n\n onChangeHandler(event: any) {\n this.paymentMethodSelected.emit(event.target.value);\n }\n\n render() {\n return (\n <div class=\"btn-group jfi-btn-radio-group\" role=\"group\" aria-label=\"Radio toggle group for payment method\">\n {this.paymentMethodTypes.map((paymentMethodType: PaymentMethodTypes) => (\n <Fragment>\n <input\n id={paymentMethodType}\n type=\"radio\"\n name=\"paymentMethodType\"\n value={paymentMethodType}\n onChange={(event: any) => this.onChangeHandler(event)}\n checked={this.selectedPaymentMethodType === paymentMethodType}\n class=\"btn-check jfi-btn-radio\"\n />\n <label htmlFor={paymentMethodType} class=\"btn btn-outline-primary jfi-btn-radio-label\">\n {PaymentMethodLabels[paymentMethodType]}\n </label>\n </Fragment>\n ))}\n </div>\n );\n }\n}\n"]}
@@ -0,0 +1,23 @@
1
+ import { newE2EPage } from '@stencil/core/testing';
2
+ describe('justifi-payment-form', () => {
3
+ it('should correctly render submit button with correct text', async () => {
4
+ // Create new testing page and add our component to it
5
+ const page = await newE2EPage();
6
+ await page.setContent(`
7
+ <justifi-payment-form
8
+ bank-account="true"
9
+ card="true"
10
+ email="test@example.com"
11
+ iframe-origin="https://iframe.example.com"
12
+ client-id="testId"
13
+ account-id="accountId"
14
+ submit-button-text="Pay Now"
15
+ />
16
+ `);
17
+ // Find the submit button on the page
18
+ const submitButton = await page.find('justifi-payment-form >>> button');
19
+ // Assert that the submit button's text is set correctly
20
+ expect(await submitButton.textContent).toBe('Pay Now');
21
+ });
22
+ });
23
+ //# sourceMappingURL=payment-form.e2e.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payment-form.e2e.js","sourceRoot":"","sources":["../../../../../src/components/payment-form/test/payment-form.e2e.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;EACpC,EAAE,CAAC,yDAAyD,EAAE,KAAK,IAAI,EAAE;IACvE,sDAAsD;IACtD,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;IAChC,MAAM,IAAI,CAAC,UAAU,CACnB;;;;;;;;;;OAUC,CACF,CAAC;IAEF,qCAAqC;IACrC,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;IAExE,wDAAwD;IACxD,MAAM,CAAC,MAAM,YAAY,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;EACzD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newE2EPage } from '@stencil/core/testing';\n\ndescribe('justifi-payment-form', () => {\n it('should correctly render submit button with correct text', async () => {\n // Create new testing page and add our component to it\n const page = await newE2EPage();\n await page.setContent(\n `\n <justifi-payment-form\n bank-account=\"true\"\n card=\"true\"\n email=\"test@example.com\"\n iframe-origin=\"https://iframe.example.com\"\n client-id=\"testId\"\n account-id=\"accountId\"\n submit-button-text=\"Pay Now\"\n />\n `,\n );\n\n // Find the submit button on the page\n const submitButton = await page.find('justifi-payment-form >>> button');\n\n // Assert that the submit button's text is set correctly\n expect(await submitButton.textContent).toBe('Pay Now');\n });\n});\n"]}
@@ -0,0 +1,182 @@
1
+ import { newSpecPage } from '@stencil/core/testing';
2
+ import { PaymentForm } from '../payment-form';
3
+ import { PaymentMethodTypes } from '../../../api';
4
+ describe('justifi-payment-form', () => {
5
+ // State Testing
6
+ it('should update allowedPaymentMethodTypes and selectedPaymentMethodType state correctly when connectedCallback is invoked', async () => {
7
+ // Mock properties
8
+ const mockComponent = new PaymentForm();
9
+ mockComponent.bankAccount = true;
10
+ mockComponent.card = true;
11
+ // Invoke the lifecycle method
12
+ mockComponent.connectedCallback();
13
+ // Assertions
14
+ expect(mockComponent.allowedPaymentMethodTypes).toEqual([PaymentMethodTypes.card, PaymentMethodTypes.bankAccount]);
15
+ expect(mockComponent.selectedPaymentMethodType).toBe(PaymentMethodTypes.card);
16
+ });
17
+ it('should update submitButtonEnabled state when enableSubmitButton method is called', async () => {
18
+ // Mock component
19
+ const mockComponent = new PaymentForm();
20
+ mockComponent.submitButtonEnabled = false;
21
+ // Call the method
22
+ await mockComponent.enableSubmitButton();
23
+ // Assertion
24
+ expect(mockComponent.submitButtonEnabled).toBe(true);
25
+ });
26
+ it('should update selectedPaymentMethodType when paymentMethodSelected event is fired', async () => {
27
+ // Mock component
28
+ const mockComponent = new PaymentForm();
29
+ mockComponent.selectedPaymentMethodType = PaymentMethodTypes.card;
30
+ // Define the event details
31
+ const detail = PaymentMethodTypes.bankAccount;
32
+ const event = new CustomEvent('paymentMethodSelected', { detail });
33
+ // Simulate the event
34
+ mockComponent.paymentMethodSelectedHandler(event);
35
+ // Assertion
36
+ expect(mockComponent.selectedPaymentMethodType).toBe(PaymentMethodTypes.bankAccount);
37
+ });
38
+ // Props Testing
39
+ it('should have the expected default properties', () => {
40
+ const paymentForm = new PaymentForm();
41
+ // Assert that the properties exist and have the expected default values
42
+ expect(paymentForm).toHaveProperty('bankAccount', undefined);
43
+ expect(paymentForm).toHaveProperty('card', undefined);
44
+ expect(paymentForm).toHaveProperty('email', undefined);
45
+ expect(paymentForm).toHaveProperty('iframeOrigin', undefined);
46
+ expect(paymentForm).toHaveProperty('clientId', undefined);
47
+ expect(paymentForm).toHaveProperty('accountId', undefined);
48
+ expect(paymentForm).toHaveProperty('submitButtonText', undefined);
49
+ });
50
+ // Method Testing
51
+ it('should correctly fill billing form when fillBillingForm method is called', async () => {
52
+ // Mock child component
53
+ const mockBillingFormRef = {
54
+ fill: jest.fn(),
55
+ };
56
+ // Mock component
57
+ const mockComponent = new PaymentForm();
58
+ // Cast to any to bypass type checker and directly set private property
59
+ mockComponent.billingFormRef = mockBillingFormRef;
60
+ // Define the fields to fill the billing form
61
+ const fields = {
62
+ name: 'John Doe',
63
+ address_line1: '123 Main St',
64
+ address_line2: 'Apt 4B',
65
+ address_city: 'Townsville',
66
+ address_state: 'TS',
67
+ address_postal_code: '12345',
68
+ };
69
+ // Call the method
70
+ await mockComponent.fillBillingForm(fields);
71
+ // Check that the child component's fill method was called with the correct arguments
72
+ expect(mockBillingFormRef.fill).toHaveBeenCalledWith(fields);
73
+ });
74
+ it('should submit the form correctly and trigger the "submitted" event with the correct payload when submit method is called', async () => {
75
+ // Mock billingFormRef and paymentMethodFormRef
76
+ const mockBillingFormRef = {
77
+ validate: jest.fn().mockResolvedValue({ isValid: true }),
78
+ getValues: jest.fn().mockResolvedValue({ name: 'John Doe' }),
79
+ };
80
+ const mockPaymentMethodFormRef = {
81
+ validate: jest.fn().mockResolvedValue({ isValid: true }),
82
+ tokenize: jest.fn().mockResolvedValue({ token: 'abc123' }),
83
+ };
84
+ // Mock component
85
+ const mockComponent = new PaymentForm();
86
+ // Cast to any to bypass type checker and directly set private properties
87
+ mockComponent.billingFormRef = mockBillingFormRef;
88
+ mockComponent.paymentMethodFormRef = mockPaymentMethodFormRef;
89
+ // Mock event
90
+ const mockEvent = { preventDefault: jest.fn() };
91
+ // Mock event emitter
92
+ const mockEmitter = { emit: jest.fn() };
93
+ mockComponent.submitted = mockEmitter;
94
+ // Call submit method
95
+ await mockComponent.submit(mockEvent);
96
+ // Expectations
97
+ expect(mockEvent.preventDefault).toHaveBeenCalled();
98
+ expect(mockBillingFormRef.validate).toHaveBeenCalled();
99
+ expect(mockPaymentMethodFormRef.validate).toHaveBeenCalled();
100
+ expect(mockBillingFormRef.getValues).toHaveBeenCalled();
101
+ expect(mockPaymentMethodFormRef.tokenize).toHaveBeenCalledWith(mockComponent.clientId, { email: mockComponent.email, name: 'John Doe' }, mockComponent.accountId);
102
+ expect(mockEmitter.emit).toHaveBeenCalledWith({ token: 'abc123' });
103
+ });
104
+ // Event Testing
105
+ it('should fire the "submitted" event with correct data when the form is submitted', async () => {
106
+ // Mock billingFormRef and paymentMethodFormRef
107
+ const mockBillingFormRef = {
108
+ validate: jest.fn().mockResolvedValue({ isValid: true }),
109
+ getValues: jest.fn().mockResolvedValue({
110
+ name: 'John Doe',
111
+ address_line1: 'Address 1',
112
+ address_line2: 'Address 2',
113
+ address_city: 'City',
114
+ address_state: 'State',
115
+ address_postal_code: 'Postal Code',
116
+ }),
117
+ };
118
+ const mockPaymentMethodFormRef = {
119
+ validate: jest.fn().mockResolvedValue({ isValid: true }),
120
+ tokenize: jest.fn().mockResolvedValue({ token: 'abc123' }),
121
+ };
122
+ // Mock component
123
+ const mockComponent = new PaymentForm();
124
+ mockComponent.email = 'john@example.com'; // set email prop
125
+ // Cast to any to bypass type checker and directly set private properties
126
+ mockComponent.billingFormRef = mockBillingFormRef;
127
+ mockComponent.paymentMethodFormRef = mockPaymentMethodFormRef;
128
+ // Mock event
129
+ const mockEvent = { preventDefault: jest.fn() };
130
+ // Mock event emitter
131
+ const mockEmitter = { emit: jest.fn() };
132
+ mockComponent.submitted = mockEmitter;
133
+ // Call submit method
134
+ await mockComponent.submit(mockEvent);
135
+ // Define expected payload
136
+ const expectedPayload = { token: 'abc123' };
137
+ // Expectations
138
+ expect(mockEmitter.emit).toHaveBeenCalledWith(expectedPayload);
139
+ });
140
+ // Render Testing
141
+ it('should correctly render the child components based on the given props and state', async () => {
142
+ // Set up new PaymentForm with specific props and state
143
+ const component = new PaymentForm();
144
+ component.bankAccount = true;
145
+ component.card = true;
146
+ component.email = 'test@test.com';
147
+ component.iframeOrigin = 'https://example.com';
148
+ component.clientId = 'abc123';
149
+ component.accountId = 'def456';
150
+ component.submitButtonText = 'Submit';
151
+ // Cast to any to bypass type checker and directly set private properties
152
+ component.submitButtonEnabled = true;
153
+ component.selectedPaymentMethodType = PaymentMethodTypes.card;
154
+ component.allowedPaymentMethodTypes = [PaymentMethodTypes.card, PaymentMethodTypes.bankAccount];
155
+ // Render the component
156
+ const { root } = await newSpecPage({
157
+ components: [PaymentForm],
158
+ html: '<justifi-payment-form payment-method-form-type="card" iframe-origin="https://example.com"></justifi-payment-form>',
159
+ });
160
+ // Assert that the rendered output is correct
161
+ expect(root).toEqualHtml(`
162
+ <justifi-payment-form iframe-origin="https://example.com" payment-method-form-type="card">
163
+ <mock:shadow-root>
164
+ <form class="gy-3 row">
165
+ <div class="col-12">
166
+ <justifi-payment-method-form iframe-origin="https://example.com" payment-method-form-type="card"></justifi-payment-method-form>
167
+ </div>
168
+ <div class="col-12">
169
+ <justifi-billing-form legend="Billing Info"></justifi-billing-form>
170
+ </div>
171
+ <div class="col-12">
172
+ <button class="btn btn-primary jfi-submit-button" type="submit">
173
+ Submit
174
+ </button>
175
+ </div>
176
+ </form>
177
+ </mock:shadow-root>
178
+ </justifi-payment-form>
179
+ `);
180
+ });
181
+ });
182
+ //# sourceMappingURL=payment-form.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payment-form.spec.js","sourceRoot":"","sources":["../../../../../src/components/payment-form/test/payment-form.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGlD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AC/C,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC9B,SAAS,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC/B,SAAS,CAAC,gBAAgB,GAAG,QAAQ,CAAC;IAEtC,yEAAyE;IACxE,SAAiB,CAAC,mBAAmB,GAAG,IAAI,CAAC;IAC7C,SAAiB,CAAC,yBAAyB,GAAG,kBAAkB,CAAC,IAAI,CAAC;IACtE,SAAiB,CAAC,yBAAyB,GAAG,CAAC,kBAAkB,CAAC,IAAI,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAEzG,uBAAuB;IACvB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,WAAW,CAAC;MACjC,UAAU,EAAE,CAAC,WAAW,CAAC;MACzB,IAAI,EAAE,mHAAmH;KAC1H,CAAC,CAAC;IAEH,6CAA6C;IAC7C,MAAM,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;KAkBxB,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { PaymentForm } from '../payment-form';\nimport { PaymentMethodTypes } from '../../../api';\nimport { BillingFormFields } from '../../billing-form/billing-form-schema';\n\ndescribe('justifi-payment-form', () => {\n // State Testing\n it('should update allowedPaymentMethodTypes and selectedPaymentMethodType state correctly when connectedCallback is invoked', async () => {\n // Mock properties\n const mockComponent = new PaymentForm();\n mockComponent.bankAccount = true;\n mockComponent.card = true;\n\n // Invoke the lifecycle method\n mockComponent.connectedCallback();\n\n // Assertions\n expect(mockComponent.allowedPaymentMethodTypes).toEqual([PaymentMethodTypes.card, PaymentMethodTypes.bankAccount]);\n expect(mockComponent.selectedPaymentMethodType).toBe(PaymentMethodTypes.card);\n });\n\n it('should update submitButtonEnabled state when enableSubmitButton method is called', async () => {\n // Mock component\n const mockComponent = new PaymentForm();\n mockComponent.submitButtonEnabled = false;\n\n // Call the method\n await mockComponent.enableSubmitButton();\n\n // Assertion\n expect(mockComponent.submitButtonEnabled).toBe(true);\n });\n\n it('should update selectedPaymentMethodType when paymentMethodSelected event is fired', async () => {\n // Mock component\n const mockComponent = new PaymentForm();\n mockComponent.selectedPaymentMethodType = PaymentMethodTypes.card;\n\n // Define the event details\n const detail = PaymentMethodTypes.bankAccount;\n const event = new CustomEvent('paymentMethodSelected', { detail });\n\n // Simulate the event\n mockComponent.paymentMethodSelectedHandler(event);\n\n // Assertion\n expect(mockComponent.selectedPaymentMethodType).toBe(PaymentMethodTypes.bankAccount);\n });\n\n // Props Testing\n it('should have the expected default properties', () => {\n const paymentForm = new PaymentForm();\n\n // Assert that the properties exist and have the expected default values\n expect(paymentForm).toHaveProperty('bankAccount', undefined);\n expect(paymentForm).toHaveProperty('card', undefined);\n expect(paymentForm).toHaveProperty('email', undefined);\n expect(paymentForm).toHaveProperty('iframeOrigin', undefined);\n expect(paymentForm).toHaveProperty('clientId', undefined);\n expect(paymentForm).toHaveProperty('accountId', undefined);\n expect(paymentForm).toHaveProperty('submitButtonText', undefined);\n });\n\n // Method Testing\n it('should correctly fill billing form when fillBillingForm method is called', async () => {\n // Mock child component\n const mockBillingFormRef = {\n fill: jest.fn(),\n };\n\n // Mock component\n const mockComponent = new PaymentForm();\n\n // Cast to any to bypass type checker and directly set private property\n (mockComponent as any).billingFormRef = mockBillingFormRef;\n\n // Define the fields to fill the billing form\n const fields: BillingFormFields = {\n name: 'John Doe',\n address_line1: '123 Main St',\n address_line2: 'Apt 4B',\n address_city: 'Townsville',\n address_state: 'TS',\n address_postal_code: '12345',\n };\n\n // Call the method\n await mockComponent.fillBillingForm(fields);\n\n // Check that the child component's fill method was called with the correct arguments\n expect(mockBillingFormRef.fill).toHaveBeenCalledWith(fields);\n });\n\n it('should submit the form correctly and trigger the \"submitted\" event with the correct payload when submit method is called', async () => {\n // Mock billingFormRef and paymentMethodFormRef\n const mockBillingFormRef = {\n validate: jest.fn().mockResolvedValue({ isValid: true }),\n getValues: jest.fn().mockResolvedValue({ name: 'John Doe' }),\n };\n\n const mockPaymentMethodFormRef = {\n validate: jest.fn().mockResolvedValue({ isValid: true }),\n tokenize: jest.fn().mockResolvedValue({ token: 'abc123' }),\n };\n\n // Mock component\n const mockComponent = new PaymentForm();\n\n // Cast to any to bypass type checker and directly set private properties\n (mockComponent as any).billingFormRef = mockBillingFormRef;\n (mockComponent as any).paymentMethodFormRef = mockPaymentMethodFormRef;\n\n // Mock event\n const mockEvent = { preventDefault: jest.fn() };\n\n // Mock event emitter\n const mockEmitter = { emit: jest.fn() };\n mockComponent.submitted = mockEmitter as any;\n\n // Call submit method\n await mockComponent.submit(mockEvent);\n\n // Expectations\n expect(mockEvent.preventDefault).toHaveBeenCalled();\n expect(mockBillingFormRef.validate).toHaveBeenCalled();\n expect(mockPaymentMethodFormRef.validate).toHaveBeenCalled();\n expect(mockBillingFormRef.getValues).toHaveBeenCalled();\n expect(mockPaymentMethodFormRef.tokenize).toHaveBeenCalledWith(mockComponent.clientId, { email: mockComponent.email, name: 'John Doe' }, mockComponent.accountId);\n expect(mockEmitter.emit).toHaveBeenCalledWith({ token: 'abc123' });\n });\n\n // Event Testing\n it('should fire the \"submitted\" event with correct data when the form is submitted', async () => {\n // Mock billingFormRef and paymentMethodFormRef\n const mockBillingFormRef = {\n validate: jest.fn().mockResolvedValue({ isValid: true }),\n getValues: jest.fn().mockResolvedValue({\n name: 'John Doe',\n address_line1: 'Address 1',\n address_line2: 'Address 2',\n address_city: 'City',\n address_state: 'State',\n address_postal_code: 'Postal Code',\n }),\n };\n\n const mockPaymentMethodFormRef = {\n validate: jest.fn().mockResolvedValue({ isValid: true }),\n tokenize: jest.fn().mockResolvedValue({ token: 'abc123' }),\n };\n\n // Mock component\n const mockComponent = new PaymentForm();\n mockComponent.email = 'john@example.com'; // set email prop\n\n // Cast to any to bypass type checker and directly set private properties\n (mockComponent as any).billingFormRef = mockBillingFormRef;\n (mockComponent as any).paymentMethodFormRef = mockPaymentMethodFormRef;\n\n // Mock event\n const mockEvent = { preventDefault: jest.fn() };\n\n // Mock event emitter\n const mockEmitter = { emit: jest.fn() };\n mockComponent.submitted = mockEmitter as any;\n\n // Call submit method\n await mockComponent.submit(mockEvent);\n\n // Define expected payload\n const expectedPayload = { token: 'abc123' };\n\n // Expectations\n expect(mockEmitter.emit).toHaveBeenCalledWith(expectedPayload);\n });\n\n // Render Testing\n it('should correctly render the child components based on the given props and state', async () => {\n // Set up new PaymentForm with specific props and state\n const component = new PaymentForm();\n component.bankAccount = true;\n component.card = true;\n component.email = 'test@test.com';\n component.iframeOrigin = 'https://example.com';\n component.clientId = 'abc123';\n component.accountId = 'def456';\n component.submitButtonText = 'Submit';\n\n // Cast to any to bypass type checker and directly set private properties\n (component as any).submitButtonEnabled = true;\n (component as any).selectedPaymentMethodType = PaymentMethodTypes.card;\n (component as any).allowedPaymentMethodTypes = [PaymentMethodTypes.card, PaymentMethodTypes.bankAccount];\n\n // Render the component\n const { root } = await newSpecPage({\n components: [PaymentForm],\n html: '<justifi-payment-form payment-method-form-type=\"card\" iframe-origin=\"https://example.com\"></justifi-payment-form>',\n });\n\n // Assert that the rendered output is correct\n expect(root).toEqualHtml(`\n <justifi-payment-form iframe-origin=\"https://example.com\" payment-method-form-type=\"card\">\n <mock:shadow-root>\n <form class=\"gy-3 row\">\n <div class=\"col-12\">\n <justifi-payment-method-form iframe-origin=\"https://example.com\" payment-method-form-type=\"card\"></justifi-payment-method-form>\n </div>\n <div class=\"col-12\">\n <justifi-billing-form legend=\"Billing Info\"></justifi-billing-form>\n </div>\n <div class=\"col-12\">\n <button class=\"btn btn-primary jfi-submit-button\" type=\"submit\">\n Submit\n </button>\n </div>\n </form>\n </mock:shadow-root>\n </justifi-payment-form>\n `);\n });\n});\n"]}
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=tokenize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokenize.js","sourceRoot":"","sources":["../../../../src/components/payment-form/tokenize.ts"],"names":[],"mappings":"","sourcesContent":["export interface TokenizeArguments {\n clientId: string;\n paymentMethodData: any;\n accountId?: string;\n}\n"]}
@@ -46,3 +46,4 @@ const getComputedTheme = () => {
46
46
  return computedTheme;
47
47
  };
48
48
  export default getComputedTheme;
49
+ //# sourceMappingURL=get-computed-theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-computed-theme.js","sourceRoot":"","sources":["../../../../src/components/payment-method-form/get-computed-theme.ts"],"names":[],"mappings":"AAEA,MAAM,gBAAgB,GAAG,GAAG,EAAE;EAC5B,MAAM,cAAc,GAAG,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;EAEvD,MAAM,aAAa,GAAU;IAC3B,MAAM,EAAE;MACN,OAAO,EAAE,cAAc,CAAC,gBAAgB,CAAC,sBAAsB,CAAC;MAChE,4BAA4B,EAAE,cAAc,CAAC,gBAAgB,CAAC,qCAAqC,CAAC;MACpG,0BAA0B,EAAE,cAAc,CAAC,gBAAgB,CAAC,qCAAqC,CAAC;KACnG;IACD,WAAW,EAAE;MACX,eAAe,EAAE,cAAc,CAAC,gBAAgB,CAAC,qCAAqC,CAAC;MACvF,WAAW,EAAE,cAAc,CAAC,gBAAgB,CAAC,iCAAiC,CAAC;MAC/E,gBAAgB,EAAE,cAAc,CAAC,gBAAgB,CAAC,uCAAuC,CAAC;MAC1F,gBAAgB,EAAE,cAAc,CAAC,gBAAgB,CAAC,uCAAuC,CAAC;MAC1F,WAAW,EAAE,cAAc,CAAC,gBAAgB,CAAC,iCAAiC,CAAC;MAC/E,iBAAiB,EAAE,cAAc,CAAC,gBAAgB,CAAC,wCAAwC,CAAC;MAC5F,eAAe,EAAE,cAAc,CAAC,gBAAgB,CAAC,sCAAsC,CAAC;MACxF,gBAAgB,EAAE,cAAc,CAAC,gBAAgB,CAAC,uCAAuC,CAAC;MAC1F,cAAc,EAAE,cAAc,CAAC,gBAAgB,CAAC,qCAAqC,CAAC;MACtF,YAAY,EAAE,cAAc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,cAAc,CAAC,gBAAgB,CAAC,+BAA+B,CAAC;KAC3E;GACF,CAAC;EAEF,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["import { Theme } from './theme';\n\nconst getComputedTheme = () => {\n const computedStyles = getComputedStyle(document.body);\n\n const computedTheme: Theme = {\n layout: {\n padding: computedStyles.getPropertyValue('--jfi-layout-padding'),\n formControlSpacingHorizontal: computedStyles.getPropertyValue('--jfi-layout-form-control-spacing-x'),\n formControlSpacingVertical: computedStyles.getPropertyValue('--jfi-layout-form-control-spacing-y'),\n },\n formControl: {\n backgroundColor: computedStyles.getPropertyValue('--jfi-form-control-background-color'),\n borderColor: computedStyles.getPropertyValue('--jfi-form-control-border-color'),\n borderColorFocus: computedStyles.getPropertyValue('--jfi-form-control-border-color-focus'),\n borderColorError: computedStyles.getPropertyValue('--jfi-form-control-border-color-error'),\n borderWidth: computedStyles.getPropertyValue('--jfi-form-control-border-width'),\n borderBottomWidth: computedStyles.getPropertyValue('--jfi-form-control-border-bottom-width'),\n borderLeftWidth: computedStyles.getPropertyValue('--jfi-form-control-border-left-width'),\n borderRightWidth: computedStyles.getPropertyValue('--jfi-form-control-border-right-width'),\n borderTopWidth: computedStyles.getPropertyValue('--jfi-form-control-border-top-width'),\n borderRadius: computedStyles.getPropertyValue('--jfi-form-control-border-radius'),\n borderStyle: computedStyles.getPropertyValue('--jfi-form-control-border-style'),\n boxShadow: computedStyles.getPropertyValue('--jfi-form-control-box-shadow'),\n boxShadowError: computedStyles.getPropertyValue('--jfi-form-control-box-shadow-error'),\n boxShadowErrorFocus: computedStyles.getPropertyValue('--jfi-form-control-box-shadow-error-focus'),\n boxShadowFocus: computedStyles.getPropertyValue('--jfi-form-control-box-shadow-focus'),\n color: computedStyles.getPropertyValue('--jfi-form-control-color'),\n colorFocus: computedStyles.getPropertyValue('--jfi-form-control-color-focus'),\n fontSize: computedStyles.getPropertyValue('--jfi-form-control-font-size'),\n fontWeight: computedStyles.getPropertyValue('--jfi-form-control-font-weight'),\n lineHeight: computedStyles.getPropertyValue('--jfi-form-control-line-height'),\n margin: computedStyles.getPropertyValue('--jfi-form-control-margin'),\n padding: computedStyles.getPropertyValue('--jfi-form-control-padding'),\n },\n formLabel: {\n color: computedStyles.getPropertyValue('--jfi-form-label-color'),\n fontFamily: computedStyles.getPropertyValue('--jfi-form-label-font-family'),\n fontSize: computedStyles.getPropertyValue('--jfi-form-label-font-size'),\n fontWeight: computedStyles.getPropertyValue('--jfi-form-label-font-weight'),\n margin: computedStyles.getPropertyValue('--jfi-form-label-margin'),\n },\n errorMessage: {\n color: computedStyles.getPropertyValue('--jfi-error-message-color'),\n margin: computedStyles.getPropertyValue('--jfi-error-message-margin'),\n fontSize: computedStyles.getPropertyValue('--jfi-error-message-font-size'),\n },\n };\n\n return computedTheme;\n};\n\nexport default getComputedTheme;\n"]}
@@ -14,3 +14,4 @@ export const MessageEventType = {
14
14
  styleOverrides: 'justifi.bankAccount.styleOverrides',
15
15
  },
16
16
  };
17
+ //# sourceMappingURL=message-event-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-event-types.js","sourceRoot":"","sources":["../../../../src/components/payment-method-form/message-event-types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG;EAC9B,IAAI,EAAE;IACJ,KAAK,EAAE,oBAAoB;IAC3B,QAAQ,EAAE,uBAAuB;IACjC,QAAQ,EAAE,uBAAuB;IACjC,MAAM,EAAE,qBAAqB;IAC7B,cAAc,EAAE,6BAA6B;GAC9C;EACD,WAAW,EAAE;IACX,KAAK,EAAE,2BAA2B;IAClC,QAAQ,EAAE,8BAA8B;IACxC,QAAQ,EAAE,8BAA8B;IACxC,MAAM,EAAE,4BAA4B;IACpC,cAAc,EAAE,oCAAoC;GACrD;CACF,CAAC","sourcesContent":["export const MessageEventType = {\n card: {\n ready: 'justifi.card.ready',\n tokenize: 'justifi.card.tokenize',\n validate: 'justifi.card.validate',\n resize: 'justifi.card.resize',\n styleOverrides: 'justifi.card.styleOverrides',\n },\n bankAccount: {\n ready: 'justifi.bankAccount.ready',\n tokenize: 'justifi.bankAccount.tokenize',\n validate: 'justifi.bankAccount.validate',\n resize: 'justifi.bankAccount.resize',\n styleOverrides: 'justifi.bankAccount.styleOverrides',\n },\n};\n"]}
@@ -77,8 +77,7 @@ export class PaymentMethodForm {
77
77
  return queryParams.join('');
78
78
  }
79
79
  getIframeSrc() {
80
- const productionIframeOrigin = 'https://js.justifi.ai/v2';
81
- const iframeOrigin = this.iframeOrigin || productionIframeOrigin;
80
+ const iframeOrigin = process.env.IFRAME_ORIGIN;
82
81
  let iframeSrc = `${iframeOrigin}/${this.paymentMethodFormType}`;
83
82
  let paramsList = [];
84
83
  if (this.paymentMethodFormValidationMode) {
@@ -263,3 +262,4 @@ export class PaymentMethodForm {
263
262
  };
264
263
  }
265
264
  }
265
+ //# sourceMappingURL=payment-method-form.js.map