@amwaljs/checkout-button 0.3.1 → 0.3.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 (888) hide show
  1. package/README.md +1 -1
  2. package/dist/checkout/checkout.esm.js +1 -1
  3. package/dist/checkout/{p-c03b6161.entry.js → p-00045a8c.entry.js} +1 -1
  4. package/dist/checkout/p-01bbe74f.entry.js +1 -0
  5. package/dist/checkout/p-051412fa.entry.js +1 -0
  6. package/dist/checkout/p-09cbe586.entry.js +4 -0
  7. package/dist/checkout/{p-439ad699.entry.js → p-0a85a01f.entry.js} +2 -2
  8. package/dist/checkout/{p-d5652cd4.entry.js → p-0bbfeb3c.entry.js} +1 -1
  9. package/dist/checkout/{p-4ae1a390.entry.js → p-0d96b482.entry.js} +1 -1
  10. package/dist/checkout/{p-DUa_5Mmb.js → p-0f03cd28.js} +2 -2
  11. package/dist/checkout/p-104d7733.entry.js +1 -0
  12. package/dist/checkout/{p-8036cf49.entry.js → p-10ad151a.entry.js} +5 -5
  13. package/dist/checkout/p-112455b1.js +1 -0
  14. package/dist/checkout/p-11beffea.entry.js +1 -0
  15. package/dist/checkout/p-13245fd4.js +1 -0
  16. package/dist/checkout/p-13741a94.entry.js +1 -0
  17. package/dist/checkout/p-14ea2c82.entry.js +1 -0
  18. package/dist/checkout/p-167dc7a7.entry.js +4 -0
  19. package/dist/checkout/p-1a749b59.entry.js +1 -0
  20. package/dist/checkout/p-1c718939.entry.js +1 -0
  21. package/dist/checkout/{p-11205aeb.entry.js → p-1cbb13f2.entry.js} +1 -1
  22. package/dist/checkout/{p-46ff73b3.entry.js → p-20df5234.entry.js} +1 -1
  23. package/dist/checkout/p-24068b1c.entry.js +1 -0
  24. package/dist/checkout/{p-7006753a.entry.js → p-28ccecc7.entry.js} +2 -2
  25. package/dist/checkout/p-361649c3.js +4 -0
  26. package/dist/{components/p-DoR35tr_.js → checkout/p-39ad94cf.js} +2 -2
  27. package/dist/checkout/p-3b75b22a.js +5 -0
  28. package/dist/checkout/p-3b80783d.js +8 -0
  29. package/dist/checkout/p-3d3eefc3.js +4 -0
  30. package/dist/checkout/p-3e1e3453.js +4 -0
  31. package/dist/checkout/p-3e681e57.js +4 -0
  32. package/dist/checkout/{p-bf933eb6.entry.js → p-3e8da476.entry.js} +1 -1
  33. package/dist/checkout/{p-1dc08181.entry.js → p-4028c0d2.entry.js} +1 -1
  34. package/dist/checkout/p-44c91c42.entry.js +1 -0
  35. package/dist/checkout/p-464f5a60.entry.js +1 -0
  36. package/dist/checkout/p-46b7ee7f.entry.js +1 -0
  37. package/dist/checkout/p-48784250.entry.js +1 -0
  38. package/dist/{components/p-wiOwkFtc.js → checkout/p-4be20bf2.js} +1 -1
  39. package/dist/{components/p-Dl_WhQZu.js → checkout/p-4f78d3a0.js} +2 -2
  40. package/dist/checkout/{p-4da4ecc4.entry.js → p-529bce3f.entry.js} +1 -1
  41. package/dist/checkout/p-536a0294.js +4 -0
  42. package/dist/checkout/{p-eae2d3f2.entry.js → p-5eecd5ef.entry.js} +1 -1
  43. package/dist/checkout/p-64257c8d.entry.js +1 -0
  44. package/dist/checkout/{p-5903b3af.entry.js → p-64bd1dd3.entry.js} +1 -1
  45. package/dist/checkout/{p-9b7d7231.entry.js → p-68a4caba.entry.js} +1 -1
  46. package/dist/checkout/{p-978b3762.entry.js → p-69242ed6.entry.js} +1 -1
  47. package/dist/checkout/{p-62b7c8b0.entry.js → p-6d886d7e.entry.js} +1 -1
  48. package/dist/checkout/{p-ofaUly0p.js → p-6fa979e3.js} +2 -2
  49. package/dist/checkout/p-6fb474f3.entry.js +1 -0
  50. package/dist/checkout/p-77104220.js +7 -0
  51. package/dist/checkout/{p-aba43d04.entry.js → p-79ec3e4b.entry.js} +1 -1
  52. package/dist/checkout/{p-cd2c344b.entry.js → p-7b51bf67.entry.js} +2 -2
  53. package/dist/checkout/p-7f0004c9.js +4 -0
  54. package/dist/checkout/p-7fe50ab4.entry.js +1 -0
  55. package/dist/checkout/p-880b451c.entry.js +4 -0
  56. package/dist/checkout/p-886dad62.entry.js +1 -0
  57. package/dist/checkout/p-886e8746.entry.js +1 -0
  58. package/dist/checkout/p-88abdf59.js +4 -0
  59. package/dist/checkout/{p-f845e91b.entry.js → p-8a97a411.entry.js} +1 -1
  60. package/dist/checkout/p-8af3c6cc.entry.js +1 -0
  61. package/dist/checkout/{p-8b015c21.entry.js → p-8c022f5d.entry.js} +1 -1
  62. package/dist/checkout/{p-56e307eb.entry.js → p-91855eae.entry.js} +1 -1
  63. package/dist/checkout/{p-ca257d45.entry.js → p-9185e55b.entry.js} +1 -1
  64. package/dist/checkout/{p-4b34896c.entry.js → p-926eda98.entry.js} +1 -1
  65. package/dist/checkout/p-93e5b313.entry.js +4 -0
  66. package/dist/checkout/{p-4a86b731.entry.js → p-97024acb.entry.js} +1 -1
  67. package/dist/checkout/p-99e447f9.js +1 -0
  68. package/dist/{components/p-BgOwfqIY.js → checkout/p-9b519de5.js} +2 -2
  69. package/dist/checkout/{p-b8245f6a.entry.js → p-9b65a6e5.entry.js} +1 -1
  70. package/dist/checkout/{p-53ae9dd0.entry.js → p-9cc1fdfb.entry.js} +1 -1
  71. package/dist/checkout/{p-8fc1287a.entry.js → p-9f26fb71.entry.js} +1 -1
  72. package/dist/checkout/p-9f41a631.entry.js +1 -0
  73. package/dist/checkout/{p-5f005b5e.entry.js → p-a2ce8858.entry.js} +1 -1
  74. package/dist/checkout/{p-e4d0702d.entry.js → p-a3fca65c.entry.js} +1 -1
  75. package/dist/checkout/{p-d370e756.entry.js → p-a6056eb1.entry.js} +2 -2
  76. package/dist/checkout/{p-c929d6ea.entry.js → p-a7b2cbb9.entry.js} +1 -1
  77. package/dist/{components/p-Dwo-QLgs.js → checkout/p-ab16e6ce.js} +1 -1
  78. package/dist/checkout/{p-63db3363.entry.js → p-ab9a18c4.entry.js} +1 -1
  79. package/dist/checkout/p-b038db20.js +4 -0
  80. package/dist/checkout/p-b4ad8642.entry.js +1 -0
  81. package/dist/checkout/p-b4cf78ad.entry.js +1 -0
  82. package/dist/checkout/p-b7be2ec0.js +4 -0
  83. package/dist/checkout/p-b84d9e44.js +4 -0
  84. package/dist/{components/p-CwRU9ccI.js → checkout/p-b8fdd517.js} +1 -1
  85. package/dist/checkout/{p-d799009b.entry.js → p-b9d8ab12.entry.js} +1 -1
  86. package/dist/checkout/p-bb1f698e.js +4 -0
  87. package/dist/checkout/p-bd17be25.js +4 -0
  88. package/dist/checkout/p-bd4df0bc.entry.js +1 -0
  89. package/dist/checkout/p-c152bdea.js +4 -0
  90. package/dist/checkout/{p-f22v7XAM.js → p-c30e2b28.js} +2 -2
  91. package/dist/checkout/{p-c2296aa1.entry.js → p-c61a3d5d.entry.js} +1 -1
  92. package/dist/checkout/p-c6ee4bb6.entry.js +1 -0
  93. package/dist/checkout/p-c771a565.entry.js +1 -0
  94. package/dist/checkout/{p-3c9a8bee.entry.js → p-c82b2823.entry.js} +1 -1
  95. package/dist/checkout/p-c8f7d1b5.entry.js +1 -0
  96. package/dist/checkout/p-ceef30cd.entry.js +1 -0
  97. package/dist/checkout/p-d5733333.entry.js +1 -0
  98. package/dist/checkout/p-d5bba69c.entry.js +1 -0
  99. package/dist/checkout/p-d60b2328.js +4 -0
  100. package/dist/checkout/p-d60e05e2.entry.js +1 -0
  101. package/dist/checkout/p-d6b04157.entry.js +1 -0
  102. package/dist/checkout/p-d7a430bf.js +2 -0
  103. package/dist/checkout/{p-B3WORC1a.js → p-d839c693.js} +1 -1
  104. package/dist/checkout/{p-141f2eab.entry.js → p-d9dfb3ae.entry.js} +3 -3
  105. package/dist/checkout/p-dc51d318.js +5 -0
  106. package/dist/checkout/p-ddbe30b8.entry.js +1 -0
  107. package/dist/checkout/p-de418dd1.entry.js +1 -0
  108. package/dist/checkout/{p-b4000357.entry.js → p-defa5f72.entry.js} +2 -2
  109. package/dist/checkout/{p-b90c064e.entry.js → p-df0fa5e1.entry.js} +2 -2
  110. package/dist/checkout/{p-c8740acc.entry.js → p-e0f073f1.entry.js} +3 -3
  111. package/dist/checkout/p-e237d611.entry.js +1 -0
  112. package/dist/checkout/p-ea71fb8d.entry.js +1 -0
  113. package/dist/checkout/{p-95563c4c.entry.js → p-eda93a0b.entry.js} +1 -1
  114. package/dist/checkout/p-eee05053.entry.js +1 -0
  115. package/dist/checkout/{p-95431a73.entry.js → p-f8460dc4.entry.js} +1 -1
  116. package/dist/checkout/p-f875507d.entry.js +1 -0
  117. package/dist/checkout/p-faf06441.js +4 -0
  118. package/dist/checkout/p-fb147065.entry.js +1 -0
  119. package/dist/checkout/{p-af32124b.entry.js → p-fb45cdd1.entry.js} +1 -1
  120. package/dist/cjs/_commonjsHelpers-537d719a.js +20 -0
  121. package/dist/cjs/amwal-checkout-button_5.cjs.entry.js +1298 -2881
  122. package/dist/cjs/amwal-installments-guide.cjs.entry.js +42 -43
  123. package/dist/cjs/amwal-pos.cjs.entry.js +3180 -3452
  124. package/dist/cjs/amwal-widget-modal.cjs.entry.js +162 -175
  125. package/dist/cjs/amwal-widget.cjs.entry.js +314 -343
  126. package/dist/cjs/{animation-BhN-MT4J.js → animation-26241cb2.js} +2 -2
  127. package/dist/cjs/{app-globals-NtXImkuk.js → app-globals-42a13029.js} +1 -1
  128. package/dist/cjs/{ar-CbT6TM-Q.js → ar-3a6829a4.js} +10 -4
  129. package/dist/cjs/{capacitor-CqhugS19.js → capacitor-a9365f60.js} +1 -1
  130. package/dist/cjs/checkout.cjs.js +19 -16
  131. package/dist/cjs/{data-UgkxeXMB.js → data-19081291.js} +1 -1
  132. package/dist/cjs/{form-controller-DRf0gBOg.js → form-controller-3ffb27b1.js} +1 -1
  133. package/dist/cjs/{framework-delegate-D-6PUvOi.js → framework-delegate-ab2cc190.js} +1 -1
  134. package/dist/cjs/{gesture-controller-IMq9Cgi2.js → gesture-controller-b1c0efac.js} +1 -1
  135. package/dist/cjs/{haptic-CC9tl6g8.js → haptic-80174512.js} +1 -1
  136. package/dist/cjs/{hardware-back-button-C2D2eOk8.js → hardware-back-button-ddfefd22.js} +3 -3
  137. package/dist/cjs/{helpers-B4vhh9gt.js → helpers-72ba682d.js} +4 -1
  138. package/dist/cjs/i18n-18ad02d5.js +13 -0
  139. package/dist/cjs/{index-CKcQE8Zg.js → index-0d0b84fb.js} +4 -3
  140. package/dist/cjs/{index-6eOg4xTk.js → index-2602a653.js} +0 -1
  141. package/dist/cjs/{index-DZA7ogU0.js → index-2cd1a895.js} +4 -4
  142. package/dist/cjs/index-7522b3a9.js +2256 -0
  143. package/dist/cjs/{index-bc_r9XRf.js → index-9b7d2c31.js} +9 -9
  144. package/dist/cjs/{index-q1ImtF5k.js → index-ce06e6a3.js} +3 -3
  145. package/dist/cjs/{index-XMjUjboS.js → index-da554121.js} +3 -3
  146. package/dist/cjs/{input-shims-CCRbO2DB.js → input-shims-1a8ed779.js} +6 -6
  147. package/dist/cjs/{input.utils-CyVgmmWQ.js → input.utils-67143876.js} +3 -3
  148. package/dist/cjs/ion-accordion-group.cjs.entry.js +199 -203
  149. package/dist/cjs/ion-accordion.cjs.entry.js +305 -305
  150. package/dist/cjs/ion-action-sheet_3.cjs.entry.js +695 -705
  151. package/dist/cjs/ion-app.cjs.entry.js +95 -93
  152. package/dist/cjs/ion-avatar.cjs.entry.js +14 -12
  153. package/dist/cjs/ion-back-button.cjs.entry.js +78 -76
  154. package/dist/cjs/ion-backdrop.cjs.entry.js +44 -42
  155. package/dist/cjs/ion-badge.cjs.entry.js +19 -17
  156. package/dist/cjs/ion-breadcrumb.cjs.entry.js +86 -84
  157. package/dist/cjs/ion-breadcrumbs.cjs.entry.js +120 -124
  158. package/dist/cjs/ion-buttons_3.cjs.entry.js +822 -822
  159. package/dist/cjs/ion-card-content.cjs.entry.js +19 -17
  160. package/dist/cjs/ion-card-header.cjs.entry.js +22 -20
  161. package/dist/cjs/ion-card-subtitle.cjs.entry.js +20 -18
  162. package/dist/cjs/ion-card-title.cjs.entry.js +20 -18
  163. package/dist/cjs/ion-card.cjs.entry.js +55 -53
  164. package/dist/cjs/ion-checkbox_7.cjs.entry.js +862 -882
  165. package/dist/cjs/ion-chip.cjs.entry.js +24 -22
  166. package/dist/cjs/ion-col.cjs.entry.js +110 -108
  167. package/dist/cjs/ion-content.cjs.entry.js +376 -374
  168. package/dist/cjs/ion-datetime-button.cjs.entry.js +330 -328
  169. package/dist/cjs/ion-datetime.cjs.entry.js +1547 -1567
  170. package/dist/cjs/ion-fab-button.cjs.entry.js +78 -76
  171. package/dist/cjs/ion-fab-list.cjs.entry.js +31 -31
  172. package/dist/cjs/ion-fab.cjs.entry.js +58 -58
  173. package/dist/cjs/ion-footer.cjs.entry.js +94 -92
  174. package/dist/cjs/ion-grid.cjs.entry.js +17 -15
  175. package/dist/cjs/ion-header.cjs.entry.js +143 -141
  176. package/dist/cjs/ion-icon.cjs.entry.js +104 -112
  177. package/dist/cjs/ion-img.cjs.entry.js +83 -83
  178. package/dist/cjs/ion-infinite-scroll-content.cjs.entry.js +34 -32
  179. package/dist/cjs/ion-infinite-scroll.cjs.entry.js +174 -176
  180. package/dist/cjs/ion-input.cjs.entry.js +447 -453
  181. package/dist/cjs/ion-item-divider.cjs.entry.js +23 -21
  182. package/dist/cjs/ion-item-group.cjs.entry.js +20 -18
  183. package/dist/cjs/ion-item-option.cjs.entry.js +45 -43
  184. package/dist/cjs/ion-item-options.cjs.entry.js +40 -38
  185. package/dist/cjs/ion-item-sliding.cjs.entry.js +391 -391
  186. package/dist/cjs/ion-loading.cjs.entry.js +162 -164
  187. package/dist/cjs/ion-menu-button.cjs.entry.js +60 -58
  188. package/dist/cjs/ion-menu-toggle.cjs.entry.js +36 -34
  189. package/dist/cjs/ion-menu.cjs.entry.js +606 -612
  190. package/dist/cjs/ion-modal.cjs.entry.js +551 -553
  191. package/dist/cjs/ion-nav-link.cjs.entry.js +17 -15
  192. package/dist/cjs/ion-nav.cjs.entry.js +823 -825
  193. package/dist/cjs/ion-note.cjs.entry.js +19 -17
  194. package/dist/cjs/ion-picker-column.cjs.entry.js +327 -327
  195. package/dist/cjs/ion-picker.cjs.entry.js +198 -200
  196. package/dist/cjs/ion-popover.cjs.entry.js +326 -330
  197. package/dist/cjs/ion-progress-bar.cjs.entry.js +44 -42
  198. package/dist/cjs/ion-range.cjs.entry.js +644 -654
  199. package/dist/cjs/ion-refresher-content.cjs.entry.js +53 -51
  200. package/dist/cjs/ion-refresher.cjs.entry.js +586 -586
  201. package/dist/cjs/ion-reorder-group.cjs.entry.js +252 -252
  202. package/dist/cjs/ion-reorder.cjs.entry.js +26 -24
  203. package/dist/cjs/ion-route-redirect.cjs.entry.js +19 -21
  204. package/dist/cjs/ion-route.cjs.entry.js +37 -41
  205. package/dist/cjs/ion-router-link.cjs.entry.js +31 -29
  206. package/dist/cjs/ion-router-outlet.cjs.entry.js +178 -178
  207. package/dist/cjs/ion-router.cjs.entry.js +266 -264
  208. package/dist/cjs/ion-row.cjs.entry.js +12 -10
  209. package/dist/cjs/ion-searchbar.cjs.entry.js +388 -396
  210. package/dist/cjs/ion-segment-button.cjs.entry.js +96 -96
  211. package/dist/cjs/ion-segment.cjs.entry.js +414 -420
  212. package/dist/cjs/ion-select-option.cjs.entry.js +16 -14
  213. package/dist/cjs/ion-select.cjs.entry.js +693 -699
  214. package/dist/cjs/ion-skeleton-text.cjs.entry.js +35 -33
  215. package/dist/cjs/ion-spinner.cjs.entry.js +50 -48
  216. package/dist/cjs/ion-split-pane.cjs.entry.js +120 -124
  217. package/dist/cjs/ion-tab-bar.cjs.entry.js +66 -66
  218. package/dist/cjs/ion-tab-button.cjs.entry.js +82 -80
  219. package/dist/cjs/ion-tab.cjs.entry.js +50 -50
  220. package/dist/cjs/ion-tabs.cjs.entry.js +134 -132
  221. package/dist/cjs/ion-textarea.cjs.entry.js +396 -400
  222. package/dist/cjs/ion-thumbnail.cjs.entry.js +12 -10
  223. package/dist/cjs/ion-title.cjs.entry.js +43 -43
  224. package/dist/cjs/ion-toast.cjs.entry.js +371 -375
  225. package/dist/cjs/ion-toggle.cjs.entry.js +230 -230
  226. package/dist/cjs/ion-toolbar.cjs.entry.js +61 -59
  227. package/dist/cjs/{ionic-global-DRLi5Iq3.js → ionic-global-3915f1f1.js} +55 -58
  228. package/dist/cjs/{ios.transition-D4vyO_a_.js → ios.transition-b9c0b967.js} +5 -5
  229. package/dist/cjs/{keyboard-iyHR2ZF4.js → keyboard-5d4b83b3.js} +3 -3
  230. package/dist/cjs/{keyboard-DuKzsHsS.js → keyboard-bc8ebbf7.js} +1 -1
  231. package/dist/cjs/{keyboard-controller-rH21qC_2.js → keyboard-controller-c6633754.js} +2 -2
  232. package/dist/cjs/loader.cjs.js +19 -8
  233. package/dist/cjs/{md.transition-Dkxy3kpE.js → md.transition-830acbb7.js} +5 -5
  234. package/dist/cjs/{menu-toggle-util-CmPuayU0.js → menu-toggle-util-315c26b3.js} +1 -1
  235. package/dist/cjs/{notch-controller-Dtpow1eD.js → notch-controller-dcf09601.js} +2 -2
  236. package/dist/cjs/{overlays-Bc8tk6t5.js → overlays-08819e3f.js} +6 -6
  237. package/dist/cjs/{refresher.utils-CPl6gciv.js → refresher.utils-e41509f7.js} +3 -3
  238. package/dist/cjs/{status-tap-XtIhF72O.js → status-tap-ec021cb4.js} +4 -4
  239. package/dist/cjs/{swipe-back-C9j0kufI.js → swipe-back-3d3a5129.js} +4 -4
  240. package/dist/collection/collection-manifest.json +8 -8
  241. package/dist/collection/components/amwal-checkout-button/amwal-checkout-button.js +1714 -1888
  242. package/dist/collection/components/amwal-checkout-button/amwal-checkout-button.stories.js +84 -84
  243. package/dist/collection/components/amwal-installments-guide/amwal-installments-guide.js +75 -80
  244. package/dist/collection/components/amwal-installments-guide/amwal-installments-guide.stories.js +25 -25
  245. package/dist/collection/components/amwal-installments-timeline/amwal-installments-timeline.js +506 -569
  246. package/dist/collection/components/amwal-installments-timeline/amwal-installments-timeline.stories.js +80 -80
  247. package/dist/collection/components/amwal-pos/amwal-pos.js +1022 -1094
  248. package/dist/collection/components/amwal-pos/amwal-pos.stories.js +209 -209
  249. package/dist/collection/components/amwal-widget/amwal-widget-modal.js +326 -350
  250. package/dist/collection/components/amwal-widget/amwal-widget.js +673 -736
  251. package/dist/collection/components/amwal-widget/amwal-widget.stories.js +184 -184
  252. package/dist/collection/lang/i18n.js +7 -7
  253. package/dist/components/amwal-checkout-button.d.ts +2 -2
  254. package/dist/components/amwal-checkout-button.js +3811 -1
  255. package/dist/components/amwal-installments-guide.d.ts +2 -2
  256. package/dist/components/amwal-installments-guide.js +75 -1
  257. package/dist/components/amwal-installments-timeline.d.ts +2 -2
  258. package/dist/components/amwal-installments-timeline.js +6 -1
  259. package/dist/components/amwal-pos.d.ts +2 -2
  260. package/dist/components/amwal-pos.js +3391 -1
  261. package/dist/components/amwal-widget-modal.d.ts +2 -2
  262. package/dist/components/amwal-widget-modal.js +6 -1
  263. package/dist/components/amwal-widget.d.ts +2 -2
  264. package/dist/components/amwal-widget.js +389 -1
  265. package/dist/components/index.d.ts +0 -6
  266. package/dist/components/index.js +6 -1
  267. package/dist/components/ion-accordion-group.js +248 -1
  268. package/dist/components/ion-accordion.js +353 -1
  269. package/dist/components/ion-action-sheet.js +6 -1
  270. package/dist/components/ion-alert.js +6 -1
  271. package/dist/components/ion-app.js +125 -1
  272. package/dist/components/ion-avatar.js +39 -1
  273. package/dist/components/ion-back-button.js +127 -1
  274. package/dist/components/ion-backdrop.js +6 -1
  275. package/dist/components/ion-badge.js +46 -1
  276. package/dist/components/ion-breadcrumb.js +131 -1
  277. package/dist/components/ion-breadcrumbs.js +152 -1
  278. package/dist/components/ion-button.js +6 -1
  279. package/dist/components/ion-buttons.js +6 -1
  280. package/dist/components/ion-card-content.js +43 -1
  281. package/dist/components/ion-card-header.js +50 -1
  282. package/dist/components/ion-card-subtitle.js +47 -1
  283. package/dist/components/ion-card-title.js +47 -1
  284. package/dist/components/ion-card.js +98 -1
  285. package/dist/components/ion-checkbox.js +6 -1
  286. package/dist/components/ion-chip.js +59 -1
  287. package/dist/components/ion-col.js +186 -2
  288. package/dist/components/ion-content.js +440 -1
  289. package/dist/components/ion-datetime-button.js +378 -1
  290. package/dist/components/ion-datetime.js +1961 -2
  291. package/dist/components/ion-fab-button.js +130 -1
  292. package/dist/components/ion-fab-list.js +56 -1
  293. package/dist/components/ion-fab.js +90 -1
  294. package/dist/components/ion-footer.js +152 -2
  295. package/dist/components/ion-grid.js +41 -1
  296. package/dist/components/ion-header.js +356 -2
  297. package/dist/components/ion-icon.js +6 -1
  298. package/dist/components/ion-img.js +124 -1
  299. package/dist/components/ion-infinite-scroll-content.js +69 -1
  300. package/dist/components/ion-infinite-scroll.js +209 -1
  301. package/dist/components/ion-input.js +564 -1
  302. package/dist/components/ion-item-divider.js +51 -1
  303. package/dist/components/ion-item-group.js +44 -1
  304. package/dist/components/ion-item-option.js +85 -1
  305. package/dist/components/ion-item-options.js +67 -1
  306. package/dist/components/ion-item-sliding.js +449 -1
  307. package/dist/components/ion-item.js +6 -1
  308. package/dist/components/ion-label.js +6 -1
  309. package/dist/components/ion-list-header.js +6 -1
  310. package/dist/components/ion-list.js +6 -1
  311. package/dist/components/ion-loading.js +325 -3
  312. package/dist/components/ion-menu-button.js +100 -1
  313. package/dist/components/ion-menu-toggle.js +57 -1
  314. package/dist/components/ion-menu.js +679 -1
  315. package/dist/components/ion-modal.js +1775 -3
  316. package/dist/components/ion-nav-link.js +63 -2
  317. package/dist/components/ion-nav.js +945 -2
  318. package/dist/components/ion-note.js +6 -1
  319. package/dist/components/ion-picker-column-internal.js +6 -1
  320. package/dist/components/ion-picker-column.js +6 -1
  321. package/dist/components/ion-picker-internal.js +6 -1
  322. package/dist/components/ion-picker.js +317 -3
  323. package/dist/components/ion-popover.js +6 -1
  324. package/dist/components/ion-progress-bar.js +79 -1
  325. package/dist/components/ion-radio-group.js +6 -1
  326. package/dist/components/ion-radio.js +6 -1
  327. package/dist/components/ion-range.js +778 -2
  328. package/dist/components/ion-refresher-content.js +90 -1
  329. package/dist/components/ion-refresher.js +652 -1
  330. package/dist/components/ion-reorder-group.js +300 -1
  331. package/dist/components/ion-reorder.js +58 -1
  332. package/dist/components/ion-ripple-effect.js +6 -1
  333. package/dist/components/ion-route-redirect.js +42 -1
  334. package/dist/components/ion-route.js +66 -1
  335. package/dist/components/ion-router-link.js +60 -1
  336. package/dist/components/ion-router-outlet.js +219 -1
  337. package/dist/components/ion-router.js +833 -3
  338. package/dist/components/ion-row.js +34 -1
  339. package/dist/components/ion-searchbar.js +472 -1
  340. package/dist/components/ion-segment-button.js +139 -1
  341. package/dist/components/ion-segment.js +472 -1
  342. package/dist/components/ion-select-option.js +42 -1
  343. package/dist/components/ion-select-popover.js +6 -1
  344. package/dist/components/ion-select.js +864 -1
  345. package/dist/components/ion-skeleton-text.js +59 -1
  346. package/dist/components/ion-spinner.js +6 -1
  347. package/dist/components/ion-split-pane.js +166 -1
  348. package/dist/components/ion-tab-bar.js +95 -1
  349. package/dist/components/ion-tab-button.js +125 -1
  350. package/dist/components/ion-tab.js +80 -1
  351. package/dist/components/ion-tabs.js +176 -1
  352. package/dist/components/ion-text.js +6 -1
  353. package/dist/components/ion-textarea.js +496 -1
  354. package/dist/components/ion-thumbnail.js +34 -1
  355. package/dist/components/ion-title.js +71 -1
  356. package/dist/components/ion-toast.js +914 -3
  357. package/dist/components/ion-toggle.js +282 -1
  358. package/dist/components/ion-toolbar.js +91 -1
  359. package/dist/components/p-01b49f83.js +269 -0
  360. package/dist/{esm/ios.transition-DMsViooj.js → components/p-02b77441.js} +2 -5
  361. package/dist/components/p-02bc6b21.js +203 -0
  362. package/dist/components/p-031ed92d.js +389 -0
  363. package/dist/components/p-03803c7d.js +369 -0
  364. package/dist/components/p-089e034e.js +234 -0
  365. package/dist/components/p-0dc7a5ff.js +512 -0
  366. package/dist/components/p-110f8490.js +566 -0
  367. package/dist/components/p-112455b1.js +17 -0
  368. package/dist/{esm/index-BMJhFU53.js → components/p-1596e301.js} +4 -4
  369. package/dist/components/p-1785e30a.js +318 -0
  370. package/dist/{esm/helpers-C6kqtbmV.js → components/p-2bb89b46.js} +5 -2
  371. package/dist/components/p-2d7d745d.js +224 -0
  372. package/dist/components/p-2fc99fef.js +262 -0
  373. package/dist/{esm/input-shims-DSFPFhb7.js → components/p-3296ebd9.js} +4 -6
  374. package/dist/{esm/data-Cl-_yBA0.js → components/p-39ad94cf.js} +2 -2
  375. package/dist/{esm/capacitor-CG3xQUND.js → components/p-3d3eefc3.js} +1 -1
  376. package/dist/{esm/form-controller-xetTxjL6.js → components/p-3e1d2896.js} +1 -1
  377. package/dist/{esm/keyboard-controller-CqGCg8tB.js → components/p-3e1e3453.js} +2 -2
  378. package/dist/{esm/md.transition-BQT2r4ED.js → components/p-503328f2.js} +2 -5
  379. package/dist/components/p-51c44f42.js +98 -0
  380. package/dist/components/p-5280b372.js +42 -0
  381. package/dist/{esm/index-DuUXGZp2.js → components/p-53e2dbe4.js} +3 -3
  382. package/dist/components/p-5441c730.js +851 -0
  383. package/dist/{esm/refresher.utils-D4tPnZsM.js → components/p-74e68924.js} +4 -4
  384. package/dist/{esm/framework-delegate-D_uGiYYw.js → components/p-76525f0f.js} +1 -1
  385. package/dist/{esm/index-CcopIPA0.js → components/p-77104220.js} +6 -4
  386. package/dist/components/p-77ccb793.js +185 -0
  387. package/dist/components/p-83e529db.js +380 -0
  388. package/dist/{esm/animation-DRf3dwMu.js → components/p-89c4c5cb.js} +2 -2
  389. package/dist/components/p-8b3d1e06.js +67 -0
  390. package/dist/components/p-901c16c5.js +210 -0
  391. package/dist/components/p-93e2a608.js +374 -0
  392. package/dist/components/p-95c79593.js +43 -0
  393. package/dist/components/p-96073863.js +82 -0
  394. package/dist/components/p-99e447f9.js +13 -0
  395. package/dist/{esm/keyboard-DgiyREKb.js → components/p-9b519de5.js} +1 -1
  396. package/dist/{esm/input.utils-BuIvhxo3.js → components/p-9d350d61.js} +3 -3
  397. package/dist/{esm/notch-controller-CQeDnZLe.js → components/p-9df67c24.js} +2 -2
  398. package/dist/components/p-a0e691dd.js +39 -0
  399. package/dist/components/p-ab10d1ae.js +47 -0
  400. package/dist/components/p-abc01c5d.js +194 -0
  401. package/dist/components/p-abd248d1.js +196 -0
  402. package/dist/{esm/haptic-D5jGzBs8.js → components/p-af073aaf.js} +2 -2
  403. package/dist/{esm/swipe-back-DE05lWQD.js → components/p-b32529b9.js} +3 -4
  404. package/dist/{esm/index-C75BfBAE.js → components/p-b8fdd517.js} +1 -2
  405. package/dist/components/p-cebc113f.js +38 -0
  406. package/dist/components/p-d25fd077.js +331 -0
  407. package/dist/{esm/menu-toggle-util-wdO31cdC.js → components/p-d3596f64.js} +1 -1
  408. package/dist/{esm/keyboard-DcbqYXj5.js → components/p-d60b2328.js} +1 -3
  409. package/dist/components/p-d69dc32f.js +97 -0
  410. package/dist/{esm/hardware-back-button-CzxcJiYO.js → components/p-d72e8d7b.js} +2 -3
  411. package/dist/{esm/ar-B3WORC1a.js → components/p-d839c693.js} +12 -5
  412. package/dist/{esm/index-D8d_89Nl.js → components/p-e187a77c.js} +1 -1
  413. package/dist/components/p-e65ea9fb.js +1379 -0
  414. package/dist/components/p-ec0e3f3f.js +2040 -0
  415. package/dist/components/p-ecb4db1c.js +64 -0
  416. package/dist/{esm/gesture-controller-CukVBo5-.js → components/p-f728a68f.js} +1 -1
  417. package/dist/components/p-f7e3c502.js +73 -0
  418. package/dist/components/p-fe463a42.js +272 -0
  419. package/dist/esm/_commonjsHelpers-9943807e.js +17 -0
  420. package/dist/esm/amwal-checkout-button_5.entry.js +1296 -2881
  421. package/dist/esm/amwal-installments-guide.entry.js +40 -43
  422. package/dist/esm/amwal-pos.entry.js +3178 -3452
  423. package/dist/esm/amwal-widget-modal.entry.js +160 -175
  424. package/dist/esm/amwal-widget.entry.js +312 -343
  425. package/dist/esm/animation-a6d5c3b1.js +1063 -0
  426. package/dist/esm/{app-globals-BHnkZZiH.js → app-globals-c817b28b.js} +1 -1
  427. package/dist/esm/ar-7d2629bf.js +51 -0
  428. package/dist/esm/capacitor-ba4337da.js +13 -0
  429. package/dist/esm/checkout.js +18 -16
  430. package/dist/esm/config-8e06237c.js +171 -0
  431. package/dist/esm/cubic-bezier-874f336d.js +90 -0
  432. package/dist/esm/data-8916315d.js +1628 -0
  433. package/dist/esm/dir-1d4aa386.js +18 -0
  434. package/dist/esm/focus-visible-32968d3d.js +75 -0
  435. package/dist/esm/form-controller-b1aa7393.js +64 -0
  436. package/dist/esm/framework-delegate-de1aa369.js +140 -0
  437. package/dist/esm/gesture-controller-58ffa500.js +195 -0
  438. package/dist/esm/haptic-4d4d8eb1.js +206 -0
  439. package/dist/esm/hardware-back-button-f93acff0.js +116 -0
  440. package/dist/esm/helpers-f0dcbd72.js +418 -0
  441. package/dist/esm/i18n-53f85411.js +13 -0
  442. package/dist/esm/{index-CNcx43L8.js → index-0b560278.js} +4 -4
  443. package/dist/esm/index-5894dd63.js +196 -0
  444. package/dist/esm/{index-DUF6JAQL.js → index-5a126e54.js} +6 -6
  445. package/dist/esm/index-5e663431.js +128 -0
  446. package/dist/esm/index-8cc94b11.js +2219 -0
  447. package/dist/esm/index-afdf867c.js +26 -0
  448. package/dist/esm/index-d9b41a43.js +34 -0
  449. package/dist/esm/index-f6dce931.js +466 -0
  450. package/dist/esm/index-fb97e55c.js +7 -0
  451. package/dist/esm/input-shims-75d4750d.js +617 -0
  452. package/dist/esm/input.utils-79bde07f.js +138 -0
  453. package/dist/esm/ion-accordion-group.entry.js +197 -203
  454. package/dist/esm/ion-accordion.entry.js +303 -305
  455. package/dist/esm/ion-action-sheet_3.entry.js +693 -705
  456. package/dist/esm/ion-app.entry.js +93 -93
  457. package/dist/esm/ion-avatar.entry.js +12 -12
  458. package/dist/esm/ion-back-button.entry.js +76 -76
  459. package/dist/esm/ion-backdrop.entry.js +42 -42
  460. package/dist/esm/ion-badge.entry.js +17 -17
  461. package/dist/esm/ion-breadcrumb.entry.js +84 -84
  462. package/dist/esm/ion-breadcrumbs.entry.js +118 -124
  463. package/dist/esm/ion-buttons_3.entry.js +820 -822
  464. package/dist/esm/ion-card-content.entry.js +17 -17
  465. package/dist/esm/ion-card-header.entry.js +20 -20
  466. package/dist/esm/ion-card-subtitle.entry.js +18 -18
  467. package/dist/esm/ion-card-title.entry.js +18 -18
  468. package/dist/esm/ion-card.entry.js +53 -53
  469. package/dist/esm/ion-checkbox_7.entry.js +860 -882
  470. package/dist/esm/ion-chip.entry.js +22 -22
  471. package/dist/esm/ion-col.entry.js +108 -108
  472. package/dist/esm/ion-content.entry.js +374 -374
  473. package/dist/esm/ion-datetime-button.entry.js +328 -328
  474. package/dist/esm/ion-datetime.entry.js +1545 -1567
  475. package/dist/esm/ion-fab-button.entry.js +76 -76
  476. package/dist/esm/ion-fab-list.entry.js +29 -31
  477. package/dist/esm/ion-fab.entry.js +56 -58
  478. package/dist/esm/ion-footer.entry.js +92 -92
  479. package/dist/esm/ion-grid.entry.js +15 -15
  480. package/dist/esm/ion-header.entry.js +141 -141
  481. package/dist/esm/ion-icon.entry.js +102 -112
  482. package/dist/esm/ion-img.entry.js +81 -83
  483. package/dist/esm/ion-infinite-scroll-content.entry.js +32 -32
  484. package/dist/esm/ion-infinite-scroll.entry.js +172 -176
  485. package/dist/esm/ion-input.entry.js +445 -453
  486. package/dist/esm/ion-item-divider.entry.js +21 -21
  487. package/dist/esm/ion-item-group.entry.js +18 -18
  488. package/dist/esm/ion-item-option.entry.js +43 -43
  489. package/dist/esm/ion-item-options.entry.js +38 -38
  490. package/dist/esm/ion-item-sliding.entry.js +389 -391
  491. package/dist/esm/ion-loading.entry.js +160 -164
  492. package/dist/esm/ion-menu-button.entry.js +58 -58
  493. package/dist/esm/ion-menu-toggle.entry.js +34 -34
  494. package/dist/esm/ion-menu.entry.js +604 -612
  495. package/dist/esm/ion-modal.entry.js +549 -553
  496. package/dist/esm/ion-nav-link.entry.js +15 -15
  497. package/dist/esm/ion-nav.entry.js +821 -825
  498. package/dist/esm/ion-note.entry.js +17 -17
  499. package/dist/esm/ion-picker-column.entry.js +325 -327
  500. package/dist/esm/ion-picker.entry.js +196 -200
  501. package/dist/esm/ion-popover.entry.js +324 -330
  502. package/dist/esm/ion-progress-bar.entry.js +42 -42
  503. package/dist/esm/ion-range.entry.js +642 -654
  504. package/dist/esm/ion-refresher-content.entry.js +51 -51
  505. package/dist/esm/ion-refresher.entry.js +584 -586
  506. package/dist/esm/ion-reorder-group.entry.js +250 -252
  507. package/dist/esm/ion-reorder.entry.js +24 -24
  508. package/dist/esm/ion-route-redirect.entry.js +17 -21
  509. package/dist/esm/ion-route.entry.js +35 -41
  510. package/dist/esm/ion-router-link.entry.js +29 -29
  511. package/dist/esm/ion-router-outlet.entry.js +176 -178
  512. package/dist/esm/ion-router.entry.js +264 -264
  513. package/dist/esm/ion-row.entry.js +10 -10
  514. package/dist/esm/ion-searchbar.entry.js +386 -396
  515. package/dist/esm/ion-segment-button.entry.js +94 -96
  516. package/dist/esm/ion-segment.entry.js +412 -420
  517. package/dist/esm/ion-select-option.entry.js +14 -14
  518. package/dist/esm/ion-select.entry.js +691 -699
  519. package/dist/esm/ion-skeleton-text.entry.js +33 -33
  520. package/dist/esm/ion-spinner.entry.js +48 -48
  521. package/dist/esm/ion-split-pane.entry.js +118 -124
  522. package/dist/esm/ion-tab-bar.entry.js +64 -66
  523. package/dist/esm/ion-tab-button.entry.js +80 -80
  524. package/dist/esm/ion-tab.entry.js +48 -50
  525. package/dist/esm/ion-tabs.entry.js +132 -132
  526. package/dist/esm/ion-textarea.entry.js +394 -400
  527. package/dist/esm/ion-thumbnail.entry.js +10 -10
  528. package/dist/esm/ion-title.entry.js +41 -43
  529. package/dist/esm/ion-toast.entry.js +369 -375
  530. package/dist/esm/ion-toggle.entry.js +228 -230
  531. package/dist/esm/ion-toolbar.entry.js +59 -59
  532. package/dist/esm/{ionic-global-DXXzPLPc.js → ionic-global-0b7766cb.js} +55 -58
  533. package/dist/esm/ios.transition-22fb53bc.js +651 -0
  534. package/dist/esm/keyboard-1f073554.js +82 -0
  535. package/dist/esm/keyboard-96b6e80b.js +146 -0
  536. package/dist/esm/keyboard-controller-5a2f625f.js +165 -0
  537. package/dist/esm/loader.js +17 -8
  538. package/dist/esm/lock-controller-632e3c10.js +38 -0
  539. package/dist/esm/md.transition-f6ff9834.js +57 -0
  540. package/dist/esm/menu-toggle-util-594849ff.js +12 -0
  541. package/dist/esm/notch-controller-d511b3b3.js +153 -0
  542. package/dist/esm/{overlays-SBLrmFy6.js → overlays-642a91df.js} +7 -7
  543. package/dist/esm/polyfills/core-js.js +11 -0
  544. package/dist/esm/polyfills/css-shim.js +1 -0
  545. package/dist/esm/polyfills/dom.js +79 -0
  546. package/dist/esm/polyfills/es5-html-element.js +1 -0
  547. package/dist/esm/polyfills/index.js +34 -0
  548. package/dist/esm/polyfills/system.js +6 -0
  549. package/dist/esm/refresher.utils-19137568.js +196 -0
  550. package/dist/esm/{status-tap-CjxQA4Bj.js → status-tap-bb6959a8.js} +4 -4
  551. package/dist/esm/swipe-back-6cec4c33.js +79 -0
  552. package/dist/esm/theme-35c700b7.js +43 -0
  553. package/dist/esm/watch-options-7bf43687.js +47 -0
  554. package/dist/node_modules/@ionic/core/dist/collection/components/accordion/accordion.ios.css +193 -0
  555. package/dist/node_modules/@ionic/core/dist/collection/components/accordion/accordion.md.css +135 -0
  556. package/dist/node_modules/@ionic/core/dist/collection/components/accordion-group/accordion-group.ios.css +127 -0
  557. package/dist/node_modules/@ionic/core/dist/collection/components/accordion-group/accordion-group.md.css +229 -0
  558. package/dist/node_modules/@ionic/core/dist/collection/components/action-sheet/action-sheet.ios.css +456 -0
  559. package/dist/node_modules/@ionic/core/dist/collection/components/action-sheet/action-sheet.md.css +384 -0
  560. package/dist/node_modules/@ionic/core/dist/collection/components/alert/alert.ios.css +755 -0
  561. package/dist/node_modules/@ionic/core/dist/collection/components/alert/alert.md.css +770 -0
  562. package/dist/node_modules/@ionic/core/dist/collection/components/app/app.css +17 -0
  563. package/dist/node_modules/@ionic/core/dist/collection/components/avatar/avatar.ios.css +132 -0
  564. package/dist/node_modules/@ionic/core/dist/collection/components/avatar/avatar.md.css +132 -0
  565. package/dist/node_modules/@ionic/core/dist/collection/components/back-button/back-button.ios.css +372 -0
  566. package/dist/node_modules/@ionic/core/dist/collection/components/back-button/back-button.md.css +385 -0
  567. package/dist/node_modules/@ionic/core/dist/collection/components/backdrop/backdrop.ios.css +136 -0
  568. package/dist/node_modules/@ionic/core/dist/collection/components/backdrop/backdrop.md.css +136 -0
  569. package/dist/node_modules/@ionic/core/dist/collection/components/badge/badge.ios.css +168 -0
  570. package/dist/node_modules/@ionic/core/dist/collection/components/badge/badge.md.css +164 -0
  571. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumb/breadcrumb.ios.css +326 -0
  572. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumb/breadcrumb.md.css +310 -0
  573. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumbs/breadcrumbs.ios.css +81 -0
  574. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumbs/breadcrumbs.md.css +80 -0
  575. package/dist/node_modules/@ionic/core/dist/collection/components/button/button.ios.css +596 -0
  576. package/dist/node_modules/@ionic/core/dist/collection/components/button/button.md.css +517 -0
  577. package/dist/node_modules/@ionic/core/dist/collection/components/buttons/buttons.ios.css +279 -0
  578. package/dist/node_modules/@ionic/core/dist/collection/components/buttons/buttons.md.css +299 -0
  579. package/dist/node_modules/@ionic/core/dist/collection/components/card/card.ios.css +203 -0
  580. package/dist/node_modules/@ionic/core/dist/collection/components/card/card.md.css +198 -0
  581. package/dist/node_modules/@ionic/core/dist/collection/components/card-content/card-content.ios.css +163 -0
  582. package/dist/node_modules/@ionic/core/dist/collection/components/card-content/card-content.md.css +165 -0
  583. package/dist/node_modules/@ionic/core/dist/collection/components/card-header/card-header.ios.css +141 -0
  584. package/dist/node_modules/@ionic/core/dist/collection/components/card-header/card-header.md.css +138 -0
  585. package/dist/node_modules/@ionic/core/dist/collection/components/card-subtitle/card-subtitle.ios.css +138 -0
  586. package/dist/node_modules/@ionic/core/dist/collection/components/card-subtitle/card-subtitle.md.css +136 -0
  587. package/dist/node_modules/@ionic/core/dist/collection/components/card-title/card-title.ios.css +137 -0
  588. package/dist/node_modules/@ionic/core/dist/collection/components/card-title/card-title.md.css +137 -0
  589. package/dist/node_modules/@ionic/core/dist/collection/components/checkbox/checkbox.ios.css +536 -0
  590. package/dist/node_modules/@ionic/core/dist/collection/components/checkbox/checkbox.md.css +552 -0
  591. package/dist/node_modules/@ionic/core/dist/collection/components/chip/chip.ios.css +212 -0
  592. package/dist/node_modules/@ionic/core/dist/collection/components/chip/chip.md.css +207 -0
  593. package/dist/node_modules/@ionic/core/dist/collection/components/col/col.css +200 -0
  594. package/dist/node_modules/@ionic/core/dist/collection/components/content/content.css +282 -0
  595. package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.ios.css +850 -0
  596. package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.md.css +706 -0
  597. package/dist/node_modules/@ionic/core/dist/collection/components/datetime-button/datetime-button.css +100 -0
  598. package/dist/node_modules/@ionic/core/dist/collection/components/fab/fab.css +366 -0
  599. package/dist/node_modules/@ionic/core/dist/collection/components/fab-button/fab-button.ios.css +422 -0
  600. package/dist/node_modules/@ionic/core/dist/collection/components/fab-button/fab-button.md.css +393 -0
  601. package/dist/node_modules/@ionic/core/dist/collection/components/fab-list/fab-list.css +240 -0
  602. package/dist/node_modules/@ionic/core/dist/collection/components/footer/footer.ios.css +146 -0
  603. package/dist/node_modules/@ionic/core/dist/collection/components/footer/footer.md.css +129 -0
  604. package/dist/node_modules/@ionic/core/dist/collection/components/grid/grid.css +235 -0
  605. package/dist/node_modules/@ionic/core/dist/collection/components/header/header.ios.css +250 -0
  606. package/dist/node_modules/@ionic/core/dist/collection/components/header/header.md.css +133 -0
  607. package/dist/node_modules/@ionic/core/dist/collection/components/img/img.css +12 -0
  608. package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll/infinite-scroll.css +8 -0
  609. package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll-content/infinite-scroll-content.ios.css +156 -0
  610. package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll-content/infinite-scroll-content.md.css +156 -0
  611. package/dist/node_modules/@ionic/core/dist/collection/components/input/input.ios.css +833 -0
  612. package/dist/node_modules/@ionic/core/dist/collection/components/input/input.md.css +1446 -0
  613. package/dist/node_modules/@ionic/core/dist/collection/components/item/item.ios.css +815 -0
  614. package/dist/node_modules/@ionic/core/dist/collection/components/item/item.md.css +1187 -0
  615. package/dist/node_modules/@ionic/core/dist/collection/components/item-divider/item-divider.ios.css +351 -0
  616. package/dist/node_modules/@ionic/core/dist/collection/components/item-divider/item-divider.md.css +417 -0
  617. package/dist/node_modules/@ionic/core/dist/collection/components/item-group/item-group.ios.css +114 -0
  618. package/dist/node_modules/@ionic/core/dist/collection/components/item-group/item-group.md.css +114 -0
  619. package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.ios.css +242 -0
  620. package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.md.css +236 -0
  621. package/dist/node_modules/@ionic/core/dist/collection/components/item-options/item-options.ios.css +287 -0
  622. package/dist/node_modules/@ionic/core/dist/collection/components/item-options/item-options.md.css +284 -0
  623. package/dist/node_modules/@ionic/core/dist/collection/components/item-sliding/item-sliding.css +121 -0
  624. package/dist/node_modules/@ionic/core/dist/collection/components/label/label.ios.css +334 -0
  625. package/dist/node_modules/@ionic/core/dist/collection/components/label/label.md.css +421 -0
  626. package/dist/node_modules/@ionic/core/dist/collection/components/list/list.ios.css +242 -0
  627. package/dist/node_modules/@ionic/core/dist/collection/components/list/list.md.css +287 -0
  628. package/dist/node_modules/@ionic/core/dist/collection/components/list-header/list-header.ios.css +285 -0
  629. package/dist/node_modules/@ionic/core/dist/collection/components/list-header/list-header.md.css +266 -0
  630. package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.ios.css +205 -0
  631. package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.md.css +196 -0
  632. package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.ios.css +378 -0
  633. package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.md.css +374 -0
  634. package/dist/node_modules/@ionic/core/dist/collection/components/menu-button/menu-button.ios.css +279 -0
  635. package/dist/node_modules/@ionic/core/dist/collection/components/menu-button/menu-button.md.css +282 -0
  636. package/dist/node_modules/@ionic/core/dist/collection/components/menu-toggle/menu-toggle.css +3 -0
  637. package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.ios.css +357 -0
  638. package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.md.css +272 -0
  639. package/dist/node_modules/@ionic/core/dist/collection/components/nav/nav.css +64 -0
  640. package/dist/node_modules/@ionic/core/dist/collection/components/note/note.ios.css +127 -0
  641. package/dist/node_modules/@ionic/core/dist/collection/components/note/note.md.css +127 -0
  642. package/dist/node_modules/@ionic/core/dist/collection/components/picker/picker.ios.css +367 -0
  643. package/dist/node_modules/@ionic/core/dist/collection/components/picker/picker.md.css +354 -0
  644. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column/picker-column.ios.css +255 -0
  645. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column/picker-column.md.css +246 -0
  646. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column-internal/picker-column-internal.ios.css +138 -0
  647. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column-internal/picker-column-internal.md.css +196 -0
  648. package/dist/node_modules/@ionic/core/dist/collection/components/picker-internal/picker-internal.ios.css +262 -0
  649. package/dist/node_modules/@ionic/core/dist/collection/components/picker-internal/picker-internal.md.css +258 -0
  650. package/dist/node_modules/@ionic/core/dist/collection/components/popover/popover.ios.css +366 -0
  651. package/dist/node_modules/@ionic/core/dist/collection/components/popover/popover.md.css +266 -0
  652. package/dist/node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.ios.css +261 -0
  653. package/dist/node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.md.css +261 -0
  654. package/dist/node_modules/@ionic/core/dist/collection/components/radio/radio.ios.css +557 -0
  655. package/dist/node_modules/@ionic/core/dist/collection/components/radio/radio.md.css +580 -0
  656. package/dist/node_modules/@ionic/core/dist/collection/components/range/range.ios.css +660 -0
  657. package/dist/node_modules/@ionic/core/dist/collection/components/range/range.md.css +819 -0
  658. package/dist/node_modules/@ionic/core/dist/collection/components/refresher/refresher.ios.css +321 -0
  659. package/dist/node_modules/@ionic/core/dist/collection/components/refresher/refresher.md.css +316 -0
  660. package/dist/node_modules/@ionic/core/dist/collection/components/reorder/reorder.ios.css +77 -0
  661. package/dist/node_modules/@ionic/core/dist/collection/components/reorder/reorder.md.css +77 -0
  662. package/dist/node_modules/@ionic/core/dist/collection/components/reorder-group/reorder-group.css +89 -0
  663. package/dist/node_modules/@ionic/core/dist/collection/components/ripple-effect/ripple-effect.css +113 -0
  664. package/dist/node_modules/@ionic/core/dist/collection/components/router-link/router-link.css +84 -0
  665. package/dist/node_modules/@ionic/core/dist/collection/components/router-outlet/router-outlet.css +64 -0
  666. package/dist/node_modules/@ionic/core/dist/collection/components/row/row.css +136 -0
  667. package/dist/node_modules/@ionic/core/dist/collection/components/searchbar/searchbar.ios.css +477 -0
  668. package/dist/node_modules/@ionic/core/dist/collection/components/searchbar/searchbar.md.css +456 -0
  669. package/dist/node_modules/@ionic/core/dist/collection/components/segment/segment.ios.css +224 -0
  670. package/dist/node_modules/@ionic/core/dist/collection/components/segment/segment.md.css +214 -0
  671. package/dist/node_modules/@ionic/core/dist/collection/components/segment-button/segment-button.ios.css +520 -0
  672. package/dist/node_modules/@ionic/core/dist/collection/components/segment-button/segment-button.md.css +506 -0
  673. package/dist/node_modules/@ionic/core/dist/collection/components/select/select.ios.css +787 -0
  674. package/dist/node_modules/@ionic/core/dist/collection/components/select/select.md.css +1374 -0
  675. package/dist/node_modules/@ionic/core/dist/collection/components/select-option/select-option.css +3 -0
  676. package/dist/node_modules/@ionic/core/dist/collection/components/select-popover/select-popover.ios.css +190 -0
  677. package/dist/node_modules/@ionic/core/dist/collection/components/select-popover/select-popover.md.css +212 -0
  678. package/dist/node_modules/@ionic/core/dist/collection/components/skeleton-text/skeleton-text.css +108 -0
  679. package/dist/node_modules/@ionic/core/dist/collection/components/spinner/spinner.css +232 -0
  680. package/dist/node_modules/@ionic/core/dist/collection/components/split-pane/split-pane.ios.css +265 -0
  681. package/dist/node_modules/@ionic/core/dist/collection/components/split-pane/split-pane.md.css +265 -0
  682. package/dist/node_modules/@ionic/core/dist/collection/components/tab/tab.css +4 -0
  683. package/dist/node_modules/@ionic/core/dist/collection/components/tab-bar/tab-bar.ios.css +252 -0
  684. package/dist/node_modules/@ionic/core/dist/collection/components/tab-bar/tab-bar.md.css +239 -0
  685. package/dist/node_modules/@ionic/core/dist/collection/components/tab-button/tab-button.ios.css +477 -0
  686. package/dist/node_modules/@ionic/core/dist/collection/components/tab-button/tab-button.md.css +501 -0
  687. package/dist/node_modules/@ionic/core/dist/collection/components/tabs/tabs.css +74 -0
  688. package/dist/node_modules/@ionic/core/dist/collection/components/text/text.css +58 -0
  689. package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.ios.css +987 -0
  690. package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.md.css +1553 -0
  691. package/dist/node_modules/@ionic/core/dist/collection/components/thumbnail/thumbnail.css +76 -0
  692. package/dist/node_modules/@ionic/core/dist/collection/components/title/title.ios.css +183 -0
  693. package/dist/node_modules/@ionic/core/dist/collection/components/title/title.md.css +102 -0
  694. package/dist/node_modules/@ionic/core/dist/collection/components/toast/toast.ios.css +399 -0
  695. package/dist/node_modules/@ionic/core/dist/collection/components/toast/toast.md.css +429 -0
  696. package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.ios.css +680 -0
  697. package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.md.css +625 -0
  698. package/dist/node_modules/@ionic/core/dist/collection/components/toolbar/toolbar.ios.css +265 -0
  699. package/dist/node_modules/@ionic/core/dist/collection/components/toolbar/toolbar.md.css +244 -0
  700. package/dist/node_modules/ionicons/dist/collection/components/icon/icon.css +144 -0
  701. package/dist/types/components/amwal-checkout-button/amwal-checkout-button.d.ts +327 -327
  702. package/dist/types/components/amwal-checkout-button/amwal-checkout-button.stories.d.ts +34 -34
  703. package/dist/types/components/amwal-installments-guide/amwal-installments-guide.d.ts +14 -14
  704. package/dist/types/components/amwal-installments-guide/amwal-installments-guide.stories.d.ts +17 -17
  705. package/dist/types/components/amwal-installments-timeline/amwal-installments-timeline.d.ts +106 -106
  706. package/dist/types/components/amwal-installments-timeline/amwal-installments-timeline.stories.d.ts +67 -67
  707. package/dist/types/components/amwal-pos/amwal-pos.d.ts +228 -228
  708. package/dist/types/components/amwal-pos/amwal-pos.stories.d.ts +185 -185
  709. package/dist/types/components/amwal-widget/amwal-widget-modal.d.ts +56 -56
  710. package/dist/types/components/amwal-widget/amwal-widget.d.ts +165 -165
  711. package/dist/types/components/amwal-widget/amwal-widget.stories.d.ts +101 -101
  712. package/dist/types/components.d.ts +0 -206
  713. package/dist/types/lang/i18n.d.ts +1 -1
  714. package/dist/types/stencil-public-runtime.d.ts +21 -191
  715. package/loader/cdn.js +3 -1
  716. package/loader/index.cjs.js +3 -1
  717. package/loader/index.d.ts +1 -4
  718. package/loader/index.es2017.js +3 -1
  719. package/loader/index.js +3 -1
  720. package/loader/package.json +11 -0
  721. package/package.json +28 -34
  722. package/dist/checkout/p-0161d109.entry.js +0 -1
  723. package/dist/checkout/p-0a8ef1ec.entry.js +0 -1
  724. package/dist/checkout/p-10a72fbe.entry.js +0 -1
  725. package/dist/checkout/p-12ed4081.entry.js +0 -1
  726. package/dist/checkout/p-13c36adc.entry.js +0 -1
  727. package/dist/checkout/p-194b17d8.entry.js +0 -1
  728. package/dist/checkout/p-272a1ffd.entry.js +0 -1
  729. package/dist/checkout/p-307af48b.entry.js +0 -1
  730. package/dist/checkout/p-3207674d.entry.js +0 -1
  731. package/dist/checkout/p-3208e56f.entry.js +0 -1
  732. package/dist/checkout/p-4426eb3b.entry.js +0 -1
  733. package/dist/checkout/p-458da59f.entry.js +0 -1
  734. package/dist/checkout/p-46e69508.entry.js +0 -1
  735. package/dist/checkout/p-49046c16.entry.js +0 -4
  736. package/dist/checkout/p-53dc0e86.entry.js +0 -1
  737. package/dist/checkout/p-5a6fc9fd.entry.js +0 -1
  738. package/dist/checkout/p-5e65653a.entry.js +0 -1
  739. package/dist/checkout/p-5f124c24.entry.js +0 -1
  740. package/dist/checkout/p-6a8ad104.entry.js +0 -1
  741. package/dist/checkout/p-76fb4325.entry.js +0 -1
  742. package/dist/checkout/p-78db60fb.entry.js +0 -1
  743. package/dist/checkout/p-8e34a1bb.entry.js +0 -1
  744. package/dist/checkout/p-91474b10.entry.js +0 -1
  745. package/dist/checkout/p-93OyAGoo.js +0 -2
  746. package/dist/checkout/p-94a57258.entry.js +0 -1
  747. package/dist/checkout/p-BEVStXwd.js +0 -7
  748. package/dist/checkout/p-BQu7QPd5.js +0 -4
  749. package/dist/checkout/p-BR7SJd-v.js +0 -4
  750. package/dist/checkout/p-BcFRJSFv.js +0 -4
  751. package/dist/checkout/p-BcUxrseY.js +0 -1
  752. package/dist/checkout/p-BdG893XR.js +0 -4
  753. package/dist/checkout/p-BgOwfqIY.js +0 -4
  754. package/dist/checkout/p-Bm9bMvCb.js +0 -4
  755. package/dist/checkout/p-C03M5ZSM.js +0 -1
  756. package/dist/checkout/p-C6kqtbmV.js +0 -4
  757. package/dist/checkout/p-C75BfBAE.js +0 -1
  758. package/dist/checkout/p-CVrvo9Qz.js +0 -4
  759. package/dist/checkout/p-ChixdDt6.js +0 -4
  760. package/dist/checkout/p-Cjnmql4G.js +0 -8
  761. package/dist/checkout/p-D0I0TqZU.js +0 -4
  762. package/dist/checkout/p-D2NxOvQ8.js +0 -4
  763. package/dist/checkout/p-D8d_89Nl.js +0 -4
  764. package/dist/checkout/p-DAhcxcAh.js +0 -4
  765. package/dist/checkout/p-DDtPO7yO.js +0 -4
  766. package/dist/checkout/p-DKg_dYcq.js +0 -4
  767. package/dist/checkout/p-DMAPbDyG.js +0 -4
  768. package/dist/checkout/p-DihS-5gH.js +0 -4
  769. package/dist/checkout/p-DkrNcwKK.js +0 -5
  770. package/dist/checkout/p-Dzj_jqIY.js +0 -4
  771. package/dist/checkout/p-E8AXUhZ3.js +0 -7
  772. package/dist/checkout/p-Ufaww5Lq.js +0 -4
  773. package/dist/checkout/p-a90efa79.entry.js +0 -1
  774. package/dist/checkout/p-abd12b84.entry.js +0 -1
  775. package/dist/checkout/p-abe1becc.entry.js +0 -1
  776. package/dist/checkout/p-b2f66c60.entry.js +0 -4
  777. package/dist/checkout/p-b45f5952.entry.js +0 -1
  778. package/dist/checkout/p-c2240d19.entry.js +0 -1
  779. package/dist/checkout/p-c28b4374.entry.js +0 -1
  780. package/dist/checkout/p-cb2db223.entry.js +0 -1
  781. package/dist/checkout/p-cb3967fc.entry.js +0 -1
  782. package/dist/checkout/p-cef16f11.entry.js +0 -1
  783. package/dist/checkout/p-df1b4347.entry.js +0 -4
  784. package/dist/checkout/p-e4bc42fb.entry.js +0 -1
  785. package/dist/checkout/p-e785fb8a.entry.js +0 -1
  786. package/dist/checkout/p-e8bd206a.entry.js +0 -1
  787. package/dist/checkout/p-ef749875.entry.js +0 -1
  788. package/dist/checkout/p-f157b6b2.entry.js +0 -4
  789. package/dist/checkout/p-f351a19a.entry.js +0 -1
  790. package/dist/checkout/p-ff2e59e3.entry.js +0 -1
  791. package/dist/checkout/p-hAETByzF.js +0 -5
  792. package/dist/checkout/p-vn1iXXUO.js +0 -9
  793. package/dist/cjs/i18n-uGNv9SLK.js +0 -13
  794. package/dist/cjs/index-DncWzXDA.js +0 -3738
  795. package/dist/components/p-55BwDerf.js +0 -8
  796. package/dist/components/p-B-M4K7iJ.js +0 -7
  797. package/dist/components/p-B-hirT0v.js +0 -4
  798. package/dist/components/p-B3WORC1a.js +0 -1
  799. package/dist/components/p-B5XH2zAk.js +0 -1
  800. package/dist/components/p-B5ZghgSh.js +0 -4
  801. package/dist/components/p-BEVStXwd.js +0 -7
  802. package/dist/components/p-BH0TCnxk.js +0 -4
  803. package/dist/components/p-BIA8A9ZO.js +0 -1
  804. package/dist/components/p-BOkYKP6F.js +0 -1
  805. package/dist/components/p-BOm0KT2x.js +0 -1
  806. package/dist/components/p-Bb_Zji0h.js +0 -4
  807. package/dist/components/p-BmVRXR1y.js +0 -4
  808. package/dist/components/p-BnQDByf2.js +0 -1
  809. package/dist/components/p-BoxjYI-Q.js +0 -4
  810. package/dist/components/p-BriBxgcM.js +0 -1
  811. package/dist/components/p-BwKjt_Dc.js +0 -4
  812. package/dist/components/p-Bx78uXfc.js +0 -5
  813. package/dist/components/p-C-20JWsp.js +0 -4
  814. package/dist/components/p-C03M5ZSM.js +0 -1
  815. package/dist/components/p-C53feagD.js +0 -4
  816. package/dist/components/p-CLrB3zV0.js +0 -4
  817. package/dist/components/p-CN34uOrj.js +0 -9
  818. package/dist/components/p-CQmcNwZM.js +0 -4
  819. package/dist/components/p-CYd0Smt1.js +0 -1
  820. package/dist/components/p-CgPXSjzI.js +0 -4
  821. package/dist/components/p-Cho32MPa.js +0 -4
  822. package/dist/components/p-ClE6rMJs.js +0 -4
  823. package/dist/components/p-Cm9b7fIl.js +0 -1
  824. package/dist/components/p-CukVBo5-.js +0 -4
  825. package/dist/components/p-D2NxOvQ8.js +0 -4
  826. package/dist/components/p-D4DqwBlW.js +0 -4
  827. package/dist/components/p-D7YY0NXg.js +0 -4
  828. package/dist/components/p-D8OVJo1v.js +0 -7
  829. package/dist/components/p-DKg_dYcq.js +0 -4
  830. package/dist/components/p-DLVYPrYs.js +0 -1
  831. package/dist/components/p-DMmSL7_l.js +0 -1
  832. package/dist/components/p-DOPF2QRF.js +0 -1
  833. package/dist/components/p-DTgJTJD6.js +0 -1
  834. package/dist/components/p-DiVJyqlX.js +0 -4
  835. package/dist/components/p-DrS88eFz.js +0 -1
  836. package/dist/components/p-Dtdm8lKC.js +0 -4
  837. package/dist/components/p-DuZ7hY1a.js +0 -4
  838. package/dist/components/p-Dx-C8Ob_.js +0 -7
  839. package/dist/components/p-DxEgz9x_.js +0 -1
  840. package/dist/components/p-DxSo4SXG.js +0 -1
  841. package/dist/components/p-HSPzo8it.js +0 -1
  842. package/dist/components/p-OrwCUtWu.js +0 -4
  843. package/dist/components/p-UgkI2Wa4.js +0 -1
  844. package/dist/components/p-VeNdmYSo.js +0 -1
  845. package/dist/components/p-YbpebnFS.js +0 -4
  846. package/dist/components/p-ZjP4CjeZ.js +0 -4
  847. package/dist/components/p-_VuKPdkD.js +0 -4
  848. package/dist/components/p-aWL6BxTN.js +0 -4
  849. package/dist/components/p-hHmYLOfE.js +0 -4
  850. package/dist/components/p-qoI-S7yk.js +0 -4
  851. package/dist/components/p-uXV7tzS3.js +0 -1
  852. package/dist/components/p-yu3xCFhr.js +0 -7
  853. package/dist/components/p-zp5f483d.js +0 -1
  854. package/dist/esm/i18n-C_AfxZ5D.js +0 -13
  855. package/dist/esm/index-93OyAGoo.js +0 -3721
  856. /package/dist/checkout/{p-B-hirT0v.js → p-01ad898f.js} +0 -0
  857. /package/dist/checkout/{p-DiVJyqlX.js → p-350e7423.js} +0 -0
  858. /package/dist/checkout/{p-sObYyvOy.js → p-52b4c112.js} +0 -0
  859. /package/dist/checkout/{p-BmVRXR1y.js → p-620fa0ec.js} +0 -0
  860. /package/dist/checkout/{p-hHmYLOfE.js → p-94286cc3.js} +0 -0
  861. /package/dist/checkout/{p-D4RIp70E.js → p-9efbca93.js} +0 -0
  862. /package/dist/checkout/{p-Dtdm8lKC.js → p-9f4ac833.js} +0 -0
  863. /package/dist/checkout/{p-yu3xCFhr.js → p-b2289937.js} +0 -0
  864. /package/dist/checkout/{p-C53feagD.js → p-d5862637.js} +0 -0
  865. /package/dist/checkout/{p-ZjP4CjeZ.js → p-d7fe59ee.js} +0 -0
  866. /package/dist/{components/p-CYPPT3AE.js → checkout/p-e187a77c.js} +0 -0
  867. /package/dist/checkout/{p-CukVBo5-.js → p-f728a68f.js} +0 -0
  868. /package/dist/cjs/{compare-with-utils-JlLIkecm.js → compare-with-utils-adbe64a6.js} +0 -0
  869. /package/dist/cjs/{config-ptk2Lf4l.js → config-e2a8c0c7.js} +0 -0
  870. /package/dist/cjs/{cubic-bezier-Bv3PvaRI.js → cubic-bezier-5ff9b04e.js} +0 -0
  871. /package/dist/cjs/{dir-Br-7_bel.js → dir-374f13f2.js} +0 -0
  872. /package/dist/cjs/{focus-visible-Da2o6bTP.js → focus-visible-b7381162.js} +0 -0
  873. /package/dist/cjs/{index-CH3IFTaK.js → index-071786b4.js} +0 -0
  874. /package/dist/cjs/{index-D3mJ1Cix.js → index-a281cac3.js} +0 -0
  875. /package/dist/cjs/{lock-controller-58TZFRHC.js → lock-controller-e2dfece6.js} +0 -0
  876. /package/dist/cjs/{spinner-configs-BN41iw42.js → spinner-configs-036ebfd8.js} +0 -0
  877. /package/dist/cjs/{theme-DbHdw1Nx.js → theme-12dec869.js} +0 -0
  878. /package/dist/cjs/{watch-options-DOFUPyuf.js → watch-options-1cccbe6a.js} +0 -0
  879. /package/dist/{esm/lock-controller-B-hirT0v.js → components/p-01ad898f.js} +0 -0
  880. /package/dist/{esm/theme-DiVJyqlX.js → components/p-350e7423.js} +0 -0
  881. /package/dist/{esm/focus-visible-BmVRXR1y.js → components/p-620fa0ec.js} +0 -0
  882. /package/dist/{esm/cubic-bezier-hHmYLOfE.js → components/p-94286cc3.js} +0 -0
  883. /package/dist/{esm/watch-options-Dtdm8lKC.js → components/p-9f4ac833.js} +0 -0
  884. /package/dist/{esm/config-yu3xCFhr.js → components/p-b2289937.js} +0 -0
  885. /package/dist/{esm/dir-C53feagD.js → components/p-d5862637.js} +0 -0
  886. /package/dist/{esm/index-ZjP4CjeZ.js → components/p-d7fe59ee.js} +0 -0
  887. /package/dist/esm/{compare-with-utils-sObYyvOy.js → compare-with-utils-d58be312.js} +0 -0
  888. /package/dist/esm/{spinner-configs-D4RIp70E.js → spinner-configs-c9fb0813.js} +0 -0
@@ -1,1954 +1,1780 @@
1
- import { h } from "@stencil/core";
2
- import "@ionic/core";
3
- import { TranslationUtils } from "../../lang/i18n";
4
- import { UAParser } from "ua-parser-js";
5
- import { modalController } from "@ionic/core";
1
+ import { h } from '@stencil/core';
2
+ import '@ionic/core';
3
+ import { TranslationUtils } from '../../lang/i18n';
4
+ import UAParser from "ua-parser-js";
5
+ import { modalController } from '@ionic/core';
6
6
  // import amwalLogo from './assets/logo-white.svg';
7
7
  // import madaLogo from './assets/mada-light-2.svg';
8
- import applePayLogo from "./assets/Apple_Pay_logo.svg";
8
+ import applePayLogo from './assets/Apple_Pay_logo.svg';
9
9
  // import visaLogo from './assets/Visa_Inc._logo.svg';
10
- import cardLogo from "./assets/card-logo.svg";
10
+ import cardLogo from './assets/card-logo.svg';
11
11
  // import masterLogo from './assets/Mastercard-logo.svg';
12
- import parsePhoneNumber from "libphonenumber-js";
12
+ import parsePhoneNumber from 'libphonenumber-js';
13
13
  const showBrandingCache = {};
14
14
  export class AmwalCheckoutButton {
15
- constructor() {
16
- var _a;
17
- // private showBranding = false;
18
- this.requirePopup = false;
19
- this.showButton = this.debug;
20
- this.hideIcons = true;
21
- /**
22
- * The country code of the merchant (e.g. SA)
23
- */
24
- this.countryCode = "SA";
25
- /**
26
- * the language of the plugin. supported languages are Arabic ("ar") and English ("en")
27
- */
28
- this.locale = "en";
29
- /**
30
- * the label of the button. Either checkout for final checkout or quicky-buy for per product buy
31
- */
32
- this.label = "Quick Checkout";
33
- /**
34
- * Dark Mode:
35
- * - on: turns on dark mode
36
- * - off: turns on light mode
37
- * - auto: use customer preference for dark mode
38
- */
39
- this.darkMode = "off";
40
- /**
41
- * disables the checkout button
42
- */
43
- this.disabled = false;
44
- /**
45
- * addressRequired specifies if shipping address is required or not ("true" or "false")
46
- */
47
- this.addressRequired = true;
48
- /**
49
- * showPaymentBrands to show supporeted brands under button values are ("true" or "false")
50
- */
51
- this.showPaymentBrands = false;
52
- /**
53
- * showDiscountRibbon to show discount ribbon values are ("true" or "false")
54
- */
55
- this.showDiscountRibbon = false;
56
- /**
57
- * street2Required specifies if street 2 is required or not ("true" or "false"). Can only be true if addressRequired is true.
58
- */
59
- this.street2Required = false;
60
- /**
61
- * emailRequired specifies if email address is required or not ("true" or "false"). Can only be true if addressRequired is true.
62
- */
63
- this.emailRequired = true;
64
- /**
65
- * addressHandshake specifies if address event and ack is activated ("true" or "false")
66
- */
67
- this.addressHandshake = false;
68
- /**
69
- * enableDynamicShippingDetails specifies if shipping countries, states and cities will load dynamically or prefilled in the parameters
70
- */
71
- this.enableDynamicShippingDetails = false;
72
- /**
73
- * sendExtraAddressFields specifies if extra address fields are sent in amwalAddressUpdate event
74
- */
75
- this.sendExtraAddressFields = false;
76
- /**
77
- * shippingMethods an array of shipping methods
78
- */
79
- this.shippingMethods = [];
80
- /**
81
- * taxes specifies any additional taxes
82
- */
83
- this.taxes = 0;
84
- /**
85
- * discount specifies any discount to be applied
86
- */
87
- this.discount = 0;
88
- /**
89
- * fees specifies any fees to be applied
90
- */
91
- this.fees = 0;
92
- /**
93
- * uniqueRef a boolean to enforce the uniqueness of refId
94
- */
95
- this.uniqueRef = false;
96
- /**
97
- * onlyShowBankInstallment specifies if only bank installments should be shown
98
- */
99
- this.onlyShowBankInstallment = false;
100
- /**
101
- * enableAppleCheckout specifies if Apple Checkout is enabled
102
- */
103
- this.enableAppleCheckout = false;
104
- /**
105
- * debug flag for verbose printing of debug messages
106
- */
107
- this.debug = false;
108
- /**
109
- * debug flag for verbose printing of debug messages
110
- */
111
- this.showContinueShoppingButton = false;
112
- /**
113
- * enable triggering a pre pay event to do final task such as order creation
114
- */
115
- this.enablePrePayTrigger = false;
116
- /**
117
- * enable triggering a pre checkout click event to do initial tasks such as adding items to carts
118
- */
119
- this.enablePreCheckoutTrigger = false;
120
- /**
121
- * Number of installments
122
- */
123
- this.installmentsCount = 6;
124
- /**
125
- * * timelineStyle specifies the style of the timeline in the checkout modal.
126
- */
127
- this.timelineStyle = 'default';
128
- /**
129
- * * timelineFooterText specifies the text to be displayed in the footer of the timeline in the checkout modal.
130
- *
131
- */
132
- this.footerMessage = '';
133
- this.waitingForPreCheckoutTriggerAck = false;
134
- this.waitingForPrePayTriggerAck = false;
135
- this.agent = new UAParser(((_a = window === null || window === void 0 ? void 0 : window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) || '').getResult();
136
- this.paymentSuccessful = false;
137
- this.orderId = "";
138
- this.internallyDisabled = false;
139
- this.prefersDark = window.matchMedia('(prefers-color-scheme: dark)');
140
- this.waitingForAddressAck = false;
141
- this.waitingForAddressCountryAck = false;
142
- this.waitingForAddressStateAck = false;
15
+ constructor() {
16
+ // private showBranding = false;
17
+ this.requirePopup = false;
18
+ this.showButton = this.debug;
19
+ this.waitingForPreCheckoutTriggerAck = false;
20
+ this.waitingForPrePayTriggerAck = false;
21
+ this.agent = new UAParser(window.navigator.userAgent).getResult();
22
+ this.prefersDark = window.matchMedia('(prefers-color-scheme: dark)');
23
+ this.waitingForAddressAck = false;
24
+ this.waitingForAddressCountryAck = false;
25
+ this.waitingForAddressStateAck = false;
26
+ this.hideIcons = true;
27
+ this.merchantId = undefined;
28
+ this.installmentOptionsUrl = undefined;
29
+ this.amount = undefined;
30
+ this.countryCode = "SA";
31
+ this.locale = "en";
32
+ this.label = "Quick Checkout";
33
+ this.darkMode = "off";
34
+ this.disabled = false;
35
+ this.addressRequired = true;
36
+ this.showPaymentBrands = false;
37
+ this.showDiscountRibbon = false;
38
+ this.initialAddress = undefined;
39
+ this.allowedAddressCountries = undefined;
40
+ this.allowedAddressStates = undefined;
41
+ this.allowedAddressCities = undefined;
42
+ this.street2Required = false;
43
+ this.emailRequired = true;
44
+ this.initialEmail = undefined;
45
+ this.initialFirstName = undefined;
46
+ this.initialLastName = undefined;
47
+ this.initialPhoneNumber = undefined;
48
+ this.addressHandshake = false;
49
+ this.enableDynamicShippingDetails = false;
50
+ this.sendExtraAddressFields = false;
51
+ this.shippingMethods = [];
52
+ this.taxes = 0;
53
+ this.discount = 0;
54
+ this.discountDescription = undefined;
55
+ this.fees = 0;
56
+ this.feesDescription = undefined;
57
+ this.refId = undefined;
58
+ this.uniqueRef = false;
59
+ this.onlyShowBankInstallment = false;
60
+ this.enableAppleCheckout = false;
61
+ this.apiUrl = undefined;
62
+ this.payUrl = undefined;
63
+ this.debug = false;
64
+ this.showContinueShoppingButton = false;
65
+ this.enablePrePayTrigger = false;
66
+ this.enablePreCheckoutTrigger = false;
67
+ this.postcodeOptionalCountries = undefined;
68
+ this.installmentsCount = 6;
69
+ this.timelineStyle = 'default';
70
+ this.footerMessage = '';
71
+ this.result = undefined;
72
+ this.paymentSuccessful = false;
73
+ this.orderId = "";
74
+ this.dark = undefined;
75
+ this.internallyDisabled = false;
76
+ }
77
+ /**
78
+ * Get the backend URL - uses custom apiUrl prop if provided, otherwise falls back to process.env.BACKEND_URL
79
+ */
80
+ getApiUrl() {
81
+ return this.apiUrl || (typeof process !== 'undefined' ? process.env.BACKEND_URL : null) || 'https://backend.sa.amwal.tech';
82
+ }
83
+ /**
84
+ * Get the payment page URL - uses custom payUrl prop if provided, otherwise falls back to process.env.PAY_URL
85
+ */
86
+ getPayUrl() {
87
+ return this.payUrl || (typeof process !== 'undefined' ? process.env.PAY_URL : null) || 'https://pay.sa.amwal.tech';
88
+ }
89
+ prePayCheckoutAckHandler(event) {
90
+ this.debugMsg("Pre Checkout Trigger Ack Received");
91
+ this.debugMsg("Current Amount: ", this.amount);
92
+ this.debugMsg("Current Taxes: ", this.taxes);
93
+ this.debugMsg("Current Discount: ", this.discount);
94
+ this.debugMsg("Current Fees: ", this.fees);
95
+ this.debugMsg("Order Details: ", event.detail);
96
+ event.detail.locale = this.locale;
97
+ if (this.waitingForPreCheckoutTriggerAck) {
98
+ this.waitingForPreCheckoutTriggerAck = false;
99
+ this.createTransaction(Object.assign({}, event.detail));
143
100
  }
144
- /**
145
- * Get the backend URL - uses custom apiUrl prop if provided, otherwise falls back to process.env.BACKEND_URL
146
- */
147
- getApiUrl() {
148
- return this.apiUrl || (typeof process !== 'undefined' ? process.env.BACKEND_URL : null) || 'https://backend.sa.amwal.tech';
101
+ else {
102
+ this.debugMsg("Error: Unexpected or repeated amwalPreCheckoutTriggerAck");
149
103
  }
150
- /**
151
- * Get the payment page URL - uses custom payUrl prop if provided, otherwise falls back to process.env.PAY_URL
152
- */
153
- getPayUrl() {
154
- return this.payUrl || (typeof process !== 'undefined' ? process.env.PAY_URL : null) || 'https://pay.sa.amwal.tech';
104
+ }
105
+ prePayCheckoutErrorHandler(event) {
106
+ this.debugMsg(`Pre Checkout Trigger Error Received: ${event.detail}`);
107
+ if (this.waitingForPreCheckoutTriggerAck) {
108
+ this.waitingForPreCheckoutTriggerAck = false;
109
+ this.orderError = event.detail;
110
+ this.sendOrderDetails();
155
111
  }
156
- prePayCheckoutAckHandler(event) {
157
- this.debugMsg("Pre Checkout Trigger Ack Received");
158
- this.debugMsg("Current Amount: ", this.amount);
159
- this.debugMsg("Current Taxes: ", this.taxes);
160
- this.debugMsg("Current Discount: ", this.discount);
161
- this.debugMsg("Current Fees: ", this.fees);
162
- this.debugMsg("Order Details: ", event.detail);
163
- event.detail.locale = this.locale;
164
- if (this.waitingForPreCheckoutTriggerAck) {
165
- this.waitingForPreCheckoutTriggerAck = false;
166
- this.createTransaction(Object.assign({}, event.detail));
167
- }
168
- else {
169
- this.debugMsg("Error: Unexpected or repeated amwalPreCheckoutTriggerAck");
170
- }
112
+ else {
113
+ this.debugMsg("Error: Unexpected or repeated amwalPreCheckoutTriggerError");
171
114
  }
172
- prePayCheckoutErrorHandler(event) {
173
- this.debugMsg(`Pre Checkout Trigger Error Received: ${event.detail}`);
174
- if (this.waitingForPreCheckoutTriggerAck) {
175
- this.waitingForPreCheckoutTriggerAck = false;
176
- this.orderError = event.detail;
177
- this.sendOrderDetails();
178
- }
179
- else {
180
- this.debugMsg("Error: Unexpected or repeated amwalPreCheckoutTriggerError");
181
- }
115
+ }
116
+ prePayTriggerAckHandler(event) {
117
+ var _a;
118
+ this.debugMsg("Pre Pay Trigger Ack Received");
119
+ this.debugMsg("Current Shipping Methods: ", this.shippingMethods);
120
+ this.debugMsg("Current Taxes: ", this.taxes);
121
+ this.debugMsg("Current Discount: ", this.discount);
122
+ this.debugMsg("Current Fees: ", this.fees);
123
+ if (this.waitingForPrePayTriggerAck) {
124
+ this.waitingForPrePayTriggerAck = false;
125
+ (_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.postMessage(Object.assign({ type: 'pre-pay-trigger-ack', shippingMethods: this.shippingMethods, taxes: this.taxes, discount: this.discount, discountDescription: this.discountDescription, fees: this.fees, feesDescription: this.feesDescription, amount: this.amount }, event.detail), '*');
182
126
  }
183
- prePayTriggerAckHandler(event) {
184
- var _a;
185
- this.debugMsg("Pre Pay Trigger Ack Received");
186
- this.debugMsg("Current Shipping Methods: ", this.shippingMethods);
187
- this.debugMsg("Current Taxes: ", this.taxes);
188
- this.debugMsg("Current Discount: ", this.discount);
189
- this.debugMsg("Current Fees: ", this.fees);
190
- if (this.waitingForPrePayTriggerAck) {
191
- this.waitingForPrePayTriggerAck = false;
192
- (_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.postMessage(Object.assign({ type: 'pre-pay-trigger-ack', shippingMethods: this.shippingMethods, taxes: this.taxes, discount: this.discount, discountDescription: this.discountDescription, fees: this.fees, feesDescription: this.feesDescription, amount: this.amount }, event.detail), '*');
193
- }
194
- else {
195
- this.debugMsg("Error: Unexpected or repeated amwalPrePayTriggerAck");
196
- }
127
+ else {
128
+ this.debugMsg("Error: Unexpected or repeated amwalPrePayTriggerAck");
197
129
  }
198
- prePayTriggerErrorHandler(event) {
199
- var _a;
200
- this.debugMsg("Pre Pay Trigger Error Received");
201
- if (this.waitingForPrePayTriggerAck) {
202
- this.waitingForPrePayTriggerAck = false;
203
- (_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.postMessage(Object.assign({ type: 'pre-pay-trigger-error' }, event.detail), '*');
204
- }
205
- else {
206
- this.debugMsg("Error: Unexpected or repeated amwalPrePayTriggerError");
207
- }
130
+ }
131
+ prePayTriggerErrorHandler(event) {
132
+ var _a;
133
+ this.debugMsg("Pre Pay Trigger Error Received");
134
+ if (this.waitingForPrePayTriggerAck) {
135
+ this.waitingForPrePayTriggerAck = false;
136
+ (_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.postMessage(Object.assign({ type: 'pre-pay-trigger-error' }, event.detail), '*');
208
137
  }
209
- parseMyArrayProp(newValue, _oldValue) {
210
- const newVal = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;
211
- if (Array.isArray(newVal)) {
212
- this.debugMsg("Setting shippingMethods to:", newVal);
213
- this.shippingMethods = newVal;
214
- }
215
- else {
216
- this.debugMsg("Failed to set shippingMethods to:", newVal);
217
- }
138
+ else {
139
+ this.debugMsg("Error: Unexpected or repeated amwalPrePayTriggerError");
218
140
  }
219
- parseInitiaalAddressProp(newValue, _oldValue) {
220
- this.initialAddress = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;
141
+ }
142
+ parseMyArrayProp(newValue, _oldValue) {
143
+ const newVal = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;
144
+ if (Array.isArray(newVal)) {
145
+ this.debugMsg("Setting shippingMethods to:", newVal);
146
+ this.shippingMethods = newVal;
221
147
  }
222
- parseAllowedAddressCountries(newValue, _oldValue) {
223
- const newVal = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;
224
- if (Array.isArray(newVal)) {
225
- this.debugMsg("Setting allowedAddressCountries to:", newVal);
226
- this.allowedAddressCountries = newVal;
227
- }
228
- else {
229
- this.debugMsg("Failed to set allowedAddressCountries to:", newValue);
230
- }
148
+ else {
149
+ this.debugMsg("Failed to set shippingMethods to:", newVal);
231
150
  }
232
- parsepostcodeOptionalCountries(newValue, _oldValue) {
233
- const newVal = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;
234
- if (Array.isArray(newVal)) {
235
- this.debugMsg("Setting postcodeOptionalCountries to:", newVal);
236
- this.postcodeOptionalCountries = newVal;
237
- }
238
- else {
239
- this.debugMsg("Failed to set postcodeOptionalCountries to:", newValue);
240
- }
151
+ }
152
+ parseInitiaalAddressProp(newValue, _oldValue) {
153
+ this.initialAddress = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;
154
+ }
155
+ parseAllowedAddressCountries(newValue, _oldValue) {
156
+ const newVal = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;
157
+ if (Array.isArray(newVal)) {
158
+ this.debugMsg("Setting allowedAddressCountries to:", newVal);
159
+ this.allowedAddressCountries = newVal;
241
160
  }
242
- parseAllowedAddressStates(newValue, _oldValue) {
243
- const newVal = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;
244
- if (newVal) {
245
- this.debugMsg("Setting allowedAddressStates to:", newVal);
246
- this.allowedAddressStates = newVal;
247
- }
248
- else {
249
- this.debugMsg("Failed to set allowedAddressStates to:", newValue);
250
- }
161
+ else {
162
+ this.debugMsg("Failed to set allowedAddressCountries to:", newValue);
251
163
  }
252
- parseAllowedAddressCities(newValue, _oldValue) {
253
- const newVal = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;
254
- if (newVal) {
255
- this.debugMsg("Setting allowedAddressCities to:", newVal);
256
- this.allowedAddressCities = newVal;
257
- }
258
- else {
259
- this.debugMsg("Failed to set allowedAddressCities to:", newValue);
260
- }
164
+ }
165
+ parsepostcodeOptionalCountries(newValue, _oldValue) {
166
+ const newVal = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;
167
+ if (Array.isArray(newVal)) {
168
+ this.debugMsg("Setting postcodeOptionalCountries to:", newVal);
169
+ this.postcodeOptionalCountries = newVal;
261
170
  }
262
- async updateLocale(newValue) {
263
- this.locale = newValue;
264
- this.t = await TranslationUtils.useTranslation(this.locale);
171
+ else {
172
+ this.debugMsg("Failed to set postcodeOptionalCountries to:", newValue);
265
173
  }
266
- validateDiscount(newValue, _oldValue) {
267
- const isNumber = typeof newValue === 'number';
268
- if (isNumber) {
269
- if (newValue >= this.amount) {
270
- throw new Error('Discount must be less than amount field');
271
- }
272
- }
273
- else {
274
- throw new Error('Discount has to be a number');
275
- }
174
+ }
175
+ parseAllowedAddressStates(newValue, _oldValue) {
176
+ const newVal = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;
177
+ if (newVal) {
178
+ this.debugMsg("Setting allowedAddressStates to:", newVal);
179
+ this.allowedAddressStates = newVal;
276
180
  }
277
- validateFees(newValue, _oldValue) {
278
- const isNumber = typeof newValue === 'number';
279
- if (!isNumber) {
280
- throw new Error('Fees has to be a number');
281
- }
181
+ else {
182
+ this.debugMsg("Failed to set allowedAddressStates to:", newValue);
282
183
  }
283
- toggleDark(matches) {
284
- this.dark = this.darkMode == 'on' || (this.darkMode == 'auto' && matches);
184
+ }
185
+ parseAllowedAddressCities(newValue, _oldValue) {
186
+ const newVal = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;
187
+ if (newVal) {
188
+ this.debugMsg("Setting allowedAddressCities to:", newVal);
189
+ this.allowedAddressCities = newVal;
285
190
  }
286
- debugMsg(...args) {
287
- if (this.debug) {
288
- console.log(...args);
289
- }
191
+ else {
192
+ this.debugMsg("Failed to set allowedAddressCities to:", newValue);
290
193
  }
291
- async componentWillLoad() {
292
- var _a, _b, _c, _d;
293
- // https://w3c.github.io/webauthn/#dom-publickeycredential-isconditionalmediationavailable
294
- const cacheKey = `${this.merchantId}-${this.countryCode}`;
295
- let config = showBrandingCache[cacheKey];
296
- if (!config) {
297
- try {
298
- const fromSession = sessionStorage.getItem('amwal-showbrand-' + cacheKey);
299
- if (fromSession) {
300
- config = JSON.parse(fromSession);
301
- }
302
- }
303
- catch (e) {
304
- console.log(e);
305
- }
306
- }
307
- if (!config) {
308
- try {
309
- const response = await fetch(`${this.getApiUrl()}/showbrand/`, {
310
- headers: {
311
- 'Content-Type': 'application/json',
312
- 'Amwal': this.merchantId,
313
- }
314
- });
315
- if (response.ok) {
316
- config = await response.json();
317
- showBrandingCache[cacheKey] = config;
318
- try {
319
- sessionStorage.setItem('amwal-showbrand-' + cacheKey, JSON.stringify(config));
320
- }
321
- catch (e) {
322
- console.log(e);
323
- }
324
- }
325
- }
326
- catch (e) {
327
- console.log(e);
328
- }
329
- }
330
- if (config) {
331
- // this.showBranding = config.SHOW_BRANDING;
332
- this.requirePopup = config.REQUIRE_POPUP && (window.top !== window.self);
333
- this.showButton = true;
334
- }
335
- const publickeycredential = window === null || window === void 0 ? void 0 : window.PublicKeyCredential;
336
- const isConditionalMediationAvailable = publickeycredential === null || publickeycredential === void 0 ? void 0 : publickeycredential.isConditionalMediationAvailable;
337
- const browserSupportsWebauthnAutofill = isConditionalMediationAvailable ? await isConditionalMediationAvailable() : false;
338
- const browserName = (_b = (_a = this.agent) === null || _a === void 0 ? void 0 : _a.browser) === null || _b === void 0 ? void 0 : _b.name;
339
- const osName = (_d = (_c = this.agent) === null || _c === void 0 ? void 0 : _c.os) === null || _d === void 0 ? void 0 : _d.name;
340
- const firefoxOnMac = browserName === "Firefox" && osName == "Mac OS";
341
- const chromeOnNonIOS = ((browserName === "Chrome" || browserName === "Edge") && osName !== "iOS");
342
- const supportedBrowsers = ["Chrome", "Edge", "Firefox", "Safari"];
343
- const mobileOnSocialMediaBrowsers = (osName === "iOS" || osName === "Android") && !supportedBrowsers.includes(browserName);
344
- //const useAppleCheckout = this.enableAppleCheckout && this.isApplePaySupported()
345
- this.useModal = !this.requirePopup && !this.isApplePaySupported() &&
346
- (browserSupportsWebauthnAutofill
347
- || chromeOnNonIOS
348
- || firefoxOnMac
349
- || mobileOnSocialMediaBrowsers);
350
- this.toggleDark(this.prefersDark.matches);
351
- this.prefersDark.addEventListener('change', (e) => this.toggleDark(e.matches));
352
- this.t = await TranslationUtils.useTranslation(this.locale);
353
- this.shippingMethods = JSON.parse(this.el.getAttribute('shipping-methods'));
354
- this.initialAddress = JSON.parse(this.el.getAttribute('initial-address'));
355
- this.allowedAddressCountries = JSON.parse(this.el.getAttribute('allowed-address-countries'));
356
- this.postcodeOptionalCountries = JSON.parse(this.el.getAttribute('postcode-optional-countries'));
357
- this.allowedAddressStates = JSON.parse(this.el.getAttribute('allowed-address-states'));
358
- this.allowedAddressCities = JSON.parse(this.el.getAttribute('allowed-address-cities'));
194
+ }
195
+ async updateLocale(newValue) {
196
+ this.locale = newValue;
197
+ this.t = await TranslationUtils.useTranslation(this.locale);
198
+ }
199
+ validateDiscount(newValue, _oldValue) {
200
+ const isNumber = typeof newValue === 'number';
201
+ if (isNumber) {
202
+ if (newValue >= this.amount) {
203
+ throw new Error('Discount must be less than amount field');
204
+ }
359
205
  }
360
- componentDidLoad() {
361
- this.computeHideIcons(this.el.offsetWidth);
362
- if (this.resizeObserver) {
363
- this.resizeObserver.disconnect();
364
- }
365
- this.resizeObserver = new ResizeObserver(entries => entries.forEach(entry => {
366
- this.computeHideIcons(entry.contentRect.width);
367
- }));
368
- this.resizeObserver.observe(this.el.querySelector('ion-button').shadowRoot.querySelector('button'));
206
+ else {
207
+ throw new Error('Discount has to be a number');
369
208
  }
370
- disconnectedCallback() {
371
- if (this.resizeObserver) {
372
- this.resizeObserver.disconnect();
373
- }
209
+ }
210
+ validateFees(newValue, _oldValue) {
211
+ const isNumber = typeof newValue === 'number';
212
+ if (!isNumber) {
213
+ throw new Error('Fees has to be a number');
374
214
  }
375
- sendOrderDetails() {
376
- if (this.payWindow && !this.paymentSuccessful) {
377
- if (this.orderError) {
378
- this.payWindow.postMessage(Object.assign({ type: 'amwal-order-error' }, this.orderError), '*');
379
- }
380
- else if (this.orderId) {
381
- const orderDetails = {
382
- type: 'amwal-order-id',
383
- id: this.orderId,
384
- darkMode: this.darkMode,
385
- lang: this.locale,
386
- addressRequired: this.addressRequired,
387
- street2Required: this.street2Required,
388
- emailRequired: this.emailRequired,
389
- addressHandshake: this.addressHandshake,
390
- sendExtraAddressFields: this.sendExtraAddressFields,
391
- enableDynamicShippingDetails: this.enableDynamicShippingDetails,
392
- enablePrePayTrigger: this.enablePrePayTrigger,
393
- shippingMethods: this.shippingMethods,
394
- taxes: this.taxes,
395
- discount: this.discount,
396
- discountDescription: this.discountDescription,
397
- fees: this.fees,
398
- feesDescription: this.feesDescription,
399
- initialEmail: this.initialEmail,
400
- initialFirstName: this.initialFirstName,
401
- initialLastName: this.initialLastName,
402
- initialPhoneNumber: this.initialPhoneNumber,
403
- initialAddress: this.initialAddress,
404
- allowedAddressCountries: this.allowedAddressCountries,
405
- allowedAddressStates: this.allowedAddressStates,
406
- allowedAddressCities: this.allowedAddressCities,
407
- installmentOptionsUrl: this.installmentOptionsUrl,
408
- postcodeOptionalCountries: this.postcodeOptionalCountries,
409
- onlyShowBankInstallment: this.onlyShowBankInstallment,
410
- enableAppleCheckout: this.enableAppleCheckout
411
- };
412
- this.payWindow.postMessage(orderDetails, '*');
413
- this.debugMsg("Sent Order details: ", orderDetails);
414
- }
415
- }
215
+ }
216
+ toggleDark(matches) {
217
+ this.dark = this.darkMode == 'on' || (this.darkMode == 'auto' && matches);
218
+ }
219
+ debugMsg(...args) {
220
+ if (this.debug) {
221
+ console.log(...args);
416
222
  }
417
- async createTransaction(orderDetails = undefined) {
418
- var _a, _b, _c, _d;
419
- try {
420
- let client_phone_number = undefined;
421
- try {
422
- const parsedNumber = parsePhoneNumber(this.initialPhoneNumber, this.countryCode);
423
- if (parsedNumber && parsedNumber.isValid()) {
424
- client_phone_number = parsedNumber.number;
425
- }
426
- }
427
- catch (err) {
428
- console.log(err);
429
- }
430
- const modalLang = (_b = (_a = orderDetails === null || orderDetails === void 0 ? void 0 : orderDetails.locale) !== null && _a !== void 0 ? _a : this.locale) !== null && _b !== void 0 ? _b : 'en';
431
- const payload = Object.assign(Object.assign(Object.assign({ merchantID: this.merchantId, amount: this.amount, taxes: this.taxes, discount: this.discount, fees: this.fees, installmentOptionsUrl: this.installmentOptionsUrl, client_email: this.initialEmail, client_first_name: this.initialFirstName, client_last_name: this.initialLastName, client_phone_number, trx_lang: modalLang, address_details: this.initialAddress }, (orderDetails ? {
432
- order_details: orderDetails
433
- } : undefined)), (((_c = this.shippingMethods) === null || _c === void 0 ? void 0 : _c.length) == 1 ? {
434
- shipping: this.shippingMethods[0].price,
435
- shipping_details: this.shippingMethods[0]
436
- } : undefined)), (this.refId ? { refId: this.refId, uniqueRef: this.uniqueRef } : undefined));
437
- const response = await fetch(`${this.getApiUrl()}/transactions/`, {
438
- method: 'POST',
439
- headers: {
440
- 'Content-Type': 'application/json',
441
- 'Amwal': this.merchantId,
442
- },
443
- body: JSON.stringify(Object.assign({}, payload))
444
- });
445
- this.result = await response.json();
446
- if (!response.ok) {
447
- throw (_d = this.result.detail) !== null && _d !== void 0 ? _d : response.statusText;
448
- }
449
- this.orderId = this.result.id;
223
+ }
224
+ async componentWillLoad() {
225
+ // https://w3c.github.io/webauthn/#dom-publickeycredential-isconditionalmediationavailable
226
+ const cacheKey = `${this.merchantId}-${this.countryCode}`;
227
+ let config = showBrandingCache[cacheKey];
228
+ if (!config) {
229
+ try {
230
+ const fromSession = sessionStorage.getItem('amwal-showbrand-' + cacheKey);
231
+ if (fromSession) {
232
+ config = JSON.parse(fromSession);
450
233
  }
451
- catch (e) {
234
+ }
235
+ catch (e) {
236
+ console.log(e);
237
+ }
238
+ }
239
+ if (!config) {
240
+ try {
241
+ const response = await fetch(`${this.getApiUrl()}/showbrand/`, {
242
+ headers: {
243
+ 'Content-Type': 'application/json',
244
+ 'Amwal': this.merchantId,
245
+ }
246
+ });
247
+ if (response.ok) {
248
+ config = await response.json();
249
+ showBrandingCache[cacheKey] = config;
250
+ try {
251
+ sessionStorage.setItem('amwal-showbrand-' + cacheKey, JSON.stringify(config));
252
+ }
253
+ catch (e) {
452
254
  console.log(e);
453
- this.orderError = {
454
- description: e.toString(),
455
- };
255
+ }
456
256
  }
457
- this.sendOrderDetails();
257
+ }
258
+ catch (e) {
259
+ console.log(e);
260
+ }
458
261
  }
459
- async handleCheckout() {
460
- var _a;
461
- this.orderId = undefined;
462
- this.orderError = undefined;
463
- this.internallyDisabled = true;
464
- if (this.useModal) {
465
- await this.presentModal();
466
- }
467
- else {
468
- this.openPopup();
469
- document.body.classList.add("amwal-overlay-active");
470
- const overlayElement = this.el.querySelector('#amwal-overlay-id');
471
- if (overlayElement && overlayElement.nodeType === Node.ELEMENT_NODE) {
472
- document.body.appendChild(overlayElement);
473
- }
474
- const timer = setInterval(() => {
475
- var _a;
476
- // all popup urls shouldn't have "Cross-Origin-Opener-Policy" header set otherwise window.closed will be true
477
- // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy
478
- if ((_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.closed) {
479
- try {
480
- document.body.classList.remove("amwal-overlay-active");
481
- const overlayElementInBody = document.querySelector('body > #amwal-overlay-id');
482
- const templateContainer = this.el.querySelector('#amwal-overlay-template');
483
- if (overlayElementInBody && templateContainer) {
484
- const overlayElement = document.body.removeChild(overlayElementInBody);
485
- if (overlayElement && overlayElement.nodeType === Node.ELEMENT_NODE) {
486
- templateContainer.appendChild(overlayElement);
487
- }
488
- }
489
- this.sendDismissEvent();
490
- }
491
- catch (err) {
492
- console.log(err);
493
- }
494
- finally {
495
- clearInterval(timer);
496
- }
497
- }
498
- }, 200);
499
- }
500
- (_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.postMessage({ type: "amwal-lang", lang: this.locale }, '*');
501
- if (this.enablePreCheckoutTrigger) {
502
- this.waitingForPreCheckoutTriggerAck = true;
503
- this.amwalPreCheckoutTrigger.emit();
262
+ if (config) {
263
+ // this.showBranding = config.SHOW_BRANDING;
264
+ this.requirePopup = config.REQUIRE_POPUP && (window.top !== window.self);
265
+ this.showButton = true;
266
+ }
267
+ try {
268
+ this.t = await TranslationUtils.useTranslation(this.locale);
269
+ }
270
+ catch (e) {
271
+ console.error('Failed to initialize translation:', e);
272
+ }
273
+ const publickeycredential = window === null || window === void 0 ? void 0 : window.PublicKeyCredential;
274
+ const isConditionalMediationAvailable = publickeycredential === null || publickeycredential === void 0 ? void 0 : publickeycredential.isConditionalMediationAvailable;
275
+ const browserSupportsWebauthnAutofill = isConditionalMediationAvailable ? await isConditionalMediationAvailable() : false;
276
+ const browserName = this.agent.browser.name;
277
+ const osName = this.agent.os.name;
278
+ const firefoxOnMac = browserName === "Firefox" && osName == "Mac OS";
279
+ const chromeOnNonIOS = ((browserName === "Chrome" || browserName === "Edge") && osName !== "iOS");
280
+ const supportedBrowsers = ["Chrome", "Edge", "Firefox", "Safari"];
281
+ const mobileOnSocialMediaBrowsers = (osName === "iOS" || osName === "Android") && !supportedBrowsers.includes(browserName);
282
+ //const useAppleCheckout = this.enableAppleCheckout && this.isApplePaySupported()
283
+ this.useModal = !this.requirePopup && !this.isApplePaySupported() &&
284
+ (browserSupportsWebauthnAutofill
285
+ || chromeOnNonIOS
286
+ || firefoxOnMac
287
+ || mobileOnSocialMediaBrowsers);
288
+ this.toggleDark(this.prefersDark.matches);
289
+ this.prefersDark.addEventListener('change', (e) => this.toggleDark(e.matches));
290
+ this.t = await TranslationUtils.useTranslation(this.locale);
291
+ this.shippingMethods = JSON.parse(this.el.getAttribute('shipping-methods'));
292
+ this.initialAddress = JSON.parse(this.el.getAttribute('initial-address'));
293
+ this.allowedAddressCountries = JSON.parse(this.el.getAttribute('allowed-address-countries'));
294
+ this.postcodeOptionalCountries = JSON.parse(this.el.getAttribute('postcode-optional-countries'));
295
+ this.allowedAddressStates = JSON.parse(this.el.getAttribute('allowed-address-states'));
296
+ this.allowedAddressCities = JSON.parse(this.el.getAttribute('allowed-address-cities'));
297
+ }
298
+ componentDidLoad() {
299
+ this.computeHideIcons(this.el.offsetWidth);
300
+ if (this.resizeObserver) {
301
+ this.resizeObserver.disconnect();
302
+ }
303
+ this.resizeObserver = new ResizeObserver(entries => entries.forEach(entry => {
304
+ this.computeHideIcons(entry.contentRect.width);
305
+ }));
306
+ this.resizeObserver.observe(this.el.querySelector('ion-button').shadowRoot.querySelector('button'));
307
+ }
308
+ disconnectedCallback() {
309
+ if (this.resizeObserver) {
310
+ this.resizeObserver.disconnect();
311
+ }
312
+ }
313
+ sendOrderDetails() {
314
+ if (this.payWindow && !this.paymentSuccessful) {
315
+ if (this.orderError) {
316
+ this.payWindow.postMessage(Object.assign({ type: 'amwal-order-error' }, this.orderError), '*');
317
+ }
318
+ else if (this.orderId) {
319
+ const orderDetails = {
320
+ type: 'amwal-order-id',
321
+ id: this.orderId,
322
+ darkMode: this.darkMode,
323
+ lang: this.locale,
324
+ addressRequired: this.addressRequired,
325
+ street2Required: this.street2Required,
326
+ emailRequired: this.emailRequired,
327
+ addressHandshake: this.addressHandshake,
328
+ sendExtraAddressFields: this.sendExtraAddressFields,
329
+ enableDynamicShippingDetails: this.enableDynamicShippingDetails,
330
+ enablePrePayTrigger: this.enablePrePayTrigger,
331
+ shippingMethods: this.shippingMethods,
332
+ taxes: this.taxes,
333
+ discount: this.discount,
334
+ discountDescription: this.discountDescription,
335
+ fees: this.fees,
336
+ feesDescription: this.feesDescription,
337
+ initialEmail: this.initialEmail,
338
+ initialFirstName: this.initialFirstName,
339
+ initialLastName: this.initialLastName,
340
+ initialPhoneNumber: this.initialPhoneNumber,
341
+ initialAddress: this.initialAddress,
342
+ allowedAddressCountries: this.allowedAddressCountries,
343
+ allowedAddressStates: this.allowedAddressStates,
344
+ allowedAddressCities: this.allowedAddressCities,
345
+ installmentOptionsUrl: this.installmentOptionsUrl,
346
+ postcodeOptionalCountries: this.postcodeOptionalCountries,
347
+ onlyShowBankInstallment: this.onlyShowBankInstallment,
348
+ enableAppleCheckout: this.enableAppleCheckout
349
+ };
350
+ this.payWindow.postMessage(orderDetails, '*');
351
+ this.debugMsg("Sent Order details: ", orderDetails);
352
+ }
353
+ }
354
+ }
355
+ async createTransaction(orderDetails = undefined) {
356
+ var _a, _b, _c, _d;
357
+ try {
358
+ let client_phone_number = undefined;
359
+ try {
360
+ const parsedNumber = parsePhoneNumber(this.initialPhoneNumber, this.countryCode);
361
+ if (parsedNumber && parsedNumber.isValid()) {
362
+ client_phone_number = parsedNumber.number;
504
363
  }
505
- else {
506
- this.createTransaction();
364
+ }
365
+ catch (err) {
366
+ console.log(err);
367
+ }
368
+ const modalLang = (_b = (_a = orderDetails === null || orderDetails === void 0 ? void 0 : orderDetails.locale) !== null && _a !== void 0 ? _a : this.locale) !== null && _b !== void 0 ? _b : 'en';
369
+ const payload = Object.assign(Object.assign(Object.assign({ merchantID: this.merchantId, amount: this.amount, taxes: this.taxes, discount: this.discount, fees: this.fees, installmentOptionsUrl: this.installmentOptionsUrl, client_email: this.initialEmail, client_first_name: this.initialFirstName, client_last_name: this.initialLastName, client_phone_number, trx_lang: modalLang, address_details: this.initialAddress }, (orderDetails ? {
370
+ order_details: orderDetails
371
+ } : undefined)), (((_c = this.shippingMethods) === null || _c === void 0 ? void 0 : _c.length) == 1 ? {
372
+ shipping: this.shippingMethods[0].price,
373
+ shipping_details: this.shippingMethods[0]
374
+ } : undefined)), (this.refId ? { refId: this.refId, uniqueRef: this.uniqueRef } : undefined));
375
+ const response = await fetch(`${this.getApiUrl()}/transactions/`, {
376
+ method: 'POST',
377
+ headers: {
378
+ 'Content-Type': 'application/json',
379
+ 'Amwal': this.merchantId,
380
+ },
381
+ body: JSON.stringify(Object.assign({}, payload))
382
+ });
383
+ this.result = await response.json();
384
+ if (!response.ok) {
385
+ throw (_d = this.result.detail) !== null && _d !== void 0 ? _d : response.statusText;
386
+ }
387
+ this.orderId = this.result.id;
388
+ }
389
+ catch (e) {
390
+ console.log(e);
391
+ this.orderError = {
392
+ description: e.toString(),
393
+ };
394
+ }
395
+ this.sendOrderDetails();
396
+ }
397
+ async handleCheckout() {
398
+ var _a;
399
+ this.orderId = undefined;
400
+ this.orderError = undefined;
401
+ this.internallyDisabled = true;
402
+ if (this.useModal) {
403
+ await this.presentModal();
404
+ }
405
+ else {
406
+ this.openPopup();
407
+ document.body.classList.add("amwal-overlay-active");
408
+ document.body.appendChild(this.el.querySelector('#amwal-overlay-id'));
409
+ const timer = setInterval(() => {
410
+ var _a;
411
+ // all popup urls shouldn't have "Cross-Origin-Opener-Policy" header set otherwise window.closed will be true
412
+ // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy
413
+ if ((_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.closed) {
414
+ try {
415
+ document.body.classList.remove("amwal-overlay-active");
416
+ const overlayElement = document.body.removeChild(document.querySelector('body > #amwal-overlay-id'));
417
+ this.el.querySelector('#amwal-overlay-template').appendChild(overlayElement);
418
+ this.sendDismissEvent();
419
+ }
420
+ catch (err) {
421
+ console.log(err);
422
+ }
423
+ finally {
424
+ clearInterval(timer);
425
+ }
507
426
  }
427
+ }, 200);
428
+ }
429
+ (_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.postMessage({ type: "amwal-lang", lang: this.locale }, '*');
430
+ if (this.enablePreCheckoutTrigger) {
431
+ this.waitingForPreCheckoutTriggerAck = true;
432
+ this.amwalPreCheckoutTrigger.emit();
508
433
  }
509
- async presentModal() {
510
- const div = document.createElement('div');
511
- div.innerHTML = `
434
+ else {
435
+ this.createTransaction();
436
+ }
437
+ }
438
+ async presentModal() {
439
+ const div = document.createElement('div');
440
+ div.innerHTML = `
512
441
  <iframe
513
442
  name="amwal-pay" allow="publickey-credentials-get; geolocation; payment"
514
443
  style="flex: 1; border: none;"
515
444
  src=${this.getPayUrl()}
516
445
  />
517
446
  `;
518
- this.checkoutModalEl = await modalController.create({
519
- component: div,
520
- canDismiss: false,
521
- });
522
- await this.checkoutModalEl.present();
523
- const iframeEl = document.getElementsByTagName("iframe").namedItem("amwal-pay");
524
- this.payWindow = iframeEl === null || iframeEl === void 0 ? void 0 : iframeEl.contentWindow;
447
+ this.checkoutModalEl = await modalController.create({
448
+ component: div,
449
+ canDismiss: false,
450
+ });
451
+ await this.checkoutModalEl.present();
452
+ const iframeEl = document.getElementsByTagName("iframe").namedItem("amwal-pay");
453
+ this.payWindow = iframeEl === null || iframeEl === void 0 ? void 0 : iframeEl.contentWindow;
454
+ }
455
+ setSuccess(success) {
456
+ this.paymentSuccessful = success;
457
+ if (this.paymentSuccessful) {
458
+ this.amwalCheckoutSuccess.emit({
459
+ orderId: this.orderId,
460
+ });
525
461
  }
526
- setSuccess(success) {
527
- this.paymentSuccessful = success;
528
- if (this.paymentSuccessful) {
529
- this.amwalCheckoutSuccess.emit({
530
- orderId: this.orderId,
531
- });
532
- }
533
- }
534
- async dismissModal() {
535
- if (this.checkoutModalEl) {
536
- this.checkoutModalEl.canDismiss = true;
537
- await modalController.dismiss();
538
- this.checkoutModalEl = undefined;
539
- }
540
- this.sendDismissEvent();
462
+ }
463
+ async dismissModal() {
464
+ if (this.checkoutModalEl) {
465
+ this.checkoutModalEl.canDismiss = true;
466
+ await modalController.dismiss();
467
+ this.checkoutModalEl = undefined;
541
468
  }
542
- async sendDismissEvent() {
543
- if (this.orderId && !this.paymentSuccessful) {
544
- try {
545
- const response = await fetch(`${this.getApiUrl()}/transactions/${this.orderId}`);
546
- const order = await response.json();
547
- this.setSuccess(order.status === 'success');
548
- }
549
- catch (error) {
550
- console.error(error);
551
- }
552
- ;
553
- }
554
- this.internallyDisabled = false;
555
- this.amwalDismissed.emit({
556
- orderId: this.orderId,
557
- paymentSuccessful: this.paymentSuccessful
558
- });
559
- this.orderId = "";
560
- this.paymentSuccessful = false;
469
+ this.sendDismissEvent();
470
+ }
471
+ async sendDismissEvent() {
472
+ if (this.orderId && !this.paymentSuccessful) {
473
+ try {
474
+ const response = await fetch(`${this.getApiUrl()}/transactions/${this.orderId}`);
475
+ const order = await response.json();
476
+ this.setSuccess(order.status === 'success');
477
+ }
478
+ catch (error) {
479
+ console.error(error);
480
+ }
481
+ ;
561
482
  }
562
- payWindowMessageHandler(ev) {
563
- var _a, _b;
564
- let match = true;
565
- try {
566
- const message = JSON.parse(ev.data);
567
- if (message.sender === "MF-3DSecure") {
568
- const url = message.url;
569
- if (url) {
570
- this.payWindow.location.href = url;
571
- return;
572
- }
573
- }
574
- }
575
- catch (error) {
576
- //console.log(error);
577
- }
578
- if (ev.data == 'query-dark-mode') {
579
- (_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.postMessage({
580
- type: 'dark-mode',
581
- darkMode: this.darkMode,
582
- }, '*');
583
- }
584
- else if (ev.data == 'query-lang') {
585
- (_b = this.payWindow) === null || _b === void 0 ? void 0 : _b.postMessage({
586
- type: 'lang',
587
- lang: this.locale,
588
- showContinueShoppingButton: this.showContinueShoppingButton,
589
- }, '*');
590
- }
591
- else if (ev.data == 'query-amwal-order-id') {
592
- this.sendOrderDetails();
593
- }
594
- else if (ev.data === 'dismiss') {
595
- this.dismissModal();
596
- }
597
- else if (this.orderId) {
598
- //following messages result in emitted events. to avoid duplicate event firing, only button with orderId is triggered
599
- if (ev.data === 'paymentSuccessful') {
600
- this.setSuccess(true);
601
- }
602
- else if (ev.data === 'updateOrderOnPaymentsuccess') {
603
- this.updateOrderOnPaymentsuccess.emit({
604
- orderId: this.orderId,
605
- });
606
- }
607
- else if (ev.data.type === 'address-country-update') {
608
- this.waitingForAddressCountryAck = true;
609
- this.amwalAddressCountryUpdate.emit(Object.assign({}, ev.data));
610
- }
611
- else if (ev.data.type === 'address-state-update') {
612
- this.waitingForAddressStateAck = true;
613
- this.amwalAddressStateUpdate.emit(Object.assign({}, ev.data));
614
- }
615
- else if (ev.data.type == 'amwal-address-update') {
616
- this.waitingForAddressAck = true;
617
- this.amwalAddressUpdate.emit(Object.assign(Object.assign({}, ev.data.address), { orderId: this.orderId }));
618
- }
619
- else if (ev.data.type == 'amwal-pre-pay-trigger') {
620
- this.waitingForPrePayTriggerAck = true;
621
- this.amwalPrePayTrigger.emit(ev.data.transactionDetails);
622
- }
623
- else {
624
- match = false;
625
- }
626
- }
627
- else {
628
- match = false;
629
- }
630
- if (match) {
631
- this.debugMsg(ev);
483
+ this.internallyDisabled = false;
484
+ this.amwalDismissed.emit({
485
+ orderId: this.orderId,
486
+ paymentSuccessful: this.paymentSuccessful
487
+ });
488
+ this.orderId = "";
489
+ this.paymentSuccessful = false;
490
+ }
491
+ payWindowMessageHandler(ev) {
492
+ var _a, _b;
493
+ let match = true;
494
+ try {
495
+ const message = JSON.parse(ev.data);
496
+ if (message.sender === "MF-3DSecure") {
497
+ const url = message.url;
498
+ if (url) {
499
+ this.payWindow.location.href = url;
500
+ return;
632
501
  }
502
+ }
633
503
  }
634
- addressAckHandler() {
635
- var _a;
636
- this.debugMsg("Address Ack Received");
637
- this.debugMsg("Current Shipping Methods: ", this.shippingMethods);
638
- this.debugMsg("Current Taxes: ", this.taxes);
639
- this.debugMsg("Current Discount: ", this.discount);
640
- this.debugMsg("Current Fees: ", this.fees);
641
- if (this.waitingForAddressAck) {
642
- this.waitingForAddressAck = false;
643
- (_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.postMessage({
644
- type: 'amwal-address-ack',
645
- shippingMethods: this.shippingMethods,
646
- taxes: this.taxes,
647
- discount: this.discount,
648
- discountDescription: this.discountDescription,
649
- fees: this.fees,
650
- feesDescription: this.feesDescription,
651
- amount: this.amount,
652
- }, '*');
653
- }
654
- else {
655
- this.debugMsg("Error: Unexpected or repeated amwalAddressAck");
656
- }
504
+ catch (error) {
505
+ //console.log(error);
657
506
  }
658
- addressTriggerErrorHandler(event) {
659
- var _a;
660
- this.debugMsg("Address Trigger Error Received");
661
- if (this.waitingForAddressAck) {
662
- this.waitingForAddressAck = false;
663
- (_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.postMessage(Object.assign({ type: 'amwal-address-trigger-error' }, event.detail), '*');
664
- }
665
- else {
666
- this.debugMsg("Error: Unexpected or repeated amwalAddressTriggerError");
667
- }
507
+ if (ev.data == 'query-dark-mode') {
508
+ (_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.postMessage({
509
+ type: 'dark-mode',
510
+ darkMode: this.darkMode,
511
+ }, '*');
668
512
  }
669
- addressCountryAckHandler() {
670
- var _a;
671
- if (this.waitingForAddressCountryAck) {
672
- this.waitingForAddressCountryAck = false;
673
- (_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.postMessage({
674
- type: 'amwal-address-country-ack',
675
- allowedAddressStates: this.allowedAddressStates,
676
- }, '*');
677
- }
678
- else {
679
- this.debugMsg("Error: Unexpected or repeated amwalAddressCountryAck");
680
- }
513
+ else if (ev.data == 'query-lang') {
514
+ (_b = this.payWindow) === null || _b === void 0 ? void 0 : _b.postMessage({
515
+ type: 'lang',
516
+ lang: this.locale,
517
+ showContinueShoppingButton: this.showContinueShoppingButton,
518
+ }, '*');
681
519
  }
682
- addressStateAckHandler() {
683
- var _a;
684
- if (this.waitingForAddressStateAck) {
685
- this.waitingForAddressStateAck = false;
686
- (_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.postMessage({
687
- type: 'amwal-address-state-ack',
688
- allowedAddressCities: this.allowedAddressCities,
689
- }, '*');
690
- }
691
- else {
692
- this.debugMsg("Error: Unexpected or repeated amwalAddressStateAck");
693
- }
520
+ else if (ev.data == 'query-amwal-order-id') {
521
+ this.sendOrderDetails();
694
522
  }
695
- openPopup() {
696
- var _a;
697
- (_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.close();
698
- const popupWidth = 500;
699
- const popupHeight = 860;
700
- const popupLeft = window.screenLeft + (screen.width - popupWidth) / 2;
701
- const popupTop = window.screenTop + (screen.height - popupHeight) / 4;
702
- const strWindowFeatures = `modal=yes, width=${popupWidth}, height=${popupHeight}, top=${popupTop}, left=${popupLeft}`;
703
- this.payWindow = window.open(this.getPayUrl(), 'amwal-pay', strWindowFeatures);
704
- this.payWindow.focus();
523
+ else if (ev.data === 'dismiss') {
524
+ this.dismissModal();
705
525
  }
706
- checkBrowserType() {
707
- var _a, _b;
708
- return ((_b = (_a = this.agent) === null || _a === void 0 ? void 0 : _a.browser) === null || _b === void 0 ? void 0 : _b.name) || 'Unknown';
526
+ else if (this.orderId) {
527
+ //following messages result in emitted events. to avoid duplicate event firing, only button with orderId is triggered
528
+ if (ev.data === 'paymentSuccessful') {
529
+ this.setSuccess(true);
530
+ }
531
+ else if (ev.data === 'updateOrderOnPaymentsuccess') {
532
+ this.updateOrderOnPaymentsuccess.emit({
533
+ orderId: this.orderId,
534
+ });
535
+ }
536
+ else if (ev.data.type === 'address-country-update') {
537
+ this.waitingForAddressCountryAck = true;
538
+ this.amwalAddressCountryUpdate.emit(Object.assign({}, ev.data));
539
+ }
540
+ else if (ev.data.type === 'address-state-update') {
541
+ this.waitingForAddressStateAck = true;
542
+ this.amwalAddressStateUpdate.emit(Object.assign({}, ev.data));
543
+ }
544
+ else if (ev.data.type == 'amwal-address-update') {
545
+ this.waitingForAddressAck = true;
546
+ this.amwalAddressUpdate.emit(Object.assign(Object.assign({}, ev.data.address), { orderId: this.orderId }));
547
+ }
548
+ else if (ev.data.type == 'amwal-pre-pay-trigger') {
549
+ this.waitingForPrePayTriggerAck = true;
550
+ this.amwalPrePayTrigger.emit(ev.data.transactionDetails);
551
+ }
552
+ else {
553
+ match = false;
554
+ }
709
555
  }
710
- isApplePaySupported() {
711
- var _a;
712
- // const osName = this.agent.os.name;
713
- // const browserName = this.agent.browser.name;
714
- // console.log('browserName ', browserName, ' / osName ', osName)
715
- // return osName && browserName && (osName === 'iOS' || osName === 'Mac OS' || osName === 'iPadOS') && (browserName === 'Safari' || browserName === 'Chrome');
716
- try {
717
- return (_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.canMakePayments();
718
- }
719
- catch (e) {
720
- console.error(e);
721
- }
722
- return false;
556
+ else {
557
+ match = false;
723
558
  }
724
- computeHideIcons(buttonWidth) {
725
- if (buttonWidth) {
726
- const ribbonShown = this.showDiscountRibbon && this.discount > 0 && this.amount > 0;
727
- const appleMaxWidth = ribbonShown ? 270 : 220;
728
- const nonAppleMaxWidth = ribbonShown ? 220 : 170;
729
- const newHideIcons = buttonWidth < (this.isApplePaySupported() ? appleMaxWidth : nonAppleMaxWidth);
730
- if (this.hideIcons !== newHideIcons) {
731
- this.hideIcons = newHideIcons;
732
- }
733
- }
559
+ if (match) {
560
+ this.debugMsg(ev);
734
561
  }
735
- formatNumber(value) {
736
- return Number(value.toFixed(2));
562
+ }
563
+ addressAckHandler() {
564
+ var _a;
565
+ this.debugMsg("Address Ack Received");
566
+ this.debugMsg("Current Shipping Methods: ", this.shippingMethods);
567
+ this.debugMsg("Current Taxes: ", this.taxes);
568
+ this.debugMsg("Current Discount: ", this.discount);
569
+ this.debugMsg("Current Fees: ", this.fees);
570
+ if (this.waitingForAddressAck) {
571
+ this.waitingForAddressAck = false;
572
+ (_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.postMessage({
573
+ type: 'amwal-address-ack',
574
+ shippingMethods: this.shippingMethods,
575
+ taxes: this.taxes,
576
+ discount: this.discount,
577
+ discountDescription: this.discountDescription,
578
+ fees: this.fees,
579
+ feesDescription: this.feesDescription,
580
+ amount: this.amount,
581
+ }, '*');
737
582
  }
738
- getNetAmount() {
739
- var _a, _b, _c;
740
- const netAmount = this.amount + ((_a = this.taxes) !== null && _a !== void 0 ? _a : 0) + ((_b = this.fees) !== null && _b !== void 0 ? _b : 0) - ((_c = this.discount) !== null && _c !== void 0 ? _c : 0);
741
- return this.formatNumber(netAmount);
583
+ else {
584
+ this.debugMsg("Error: Unexpected or repeated amwalAddressAck");
742
585
  }
743
- render() {
744
- var _a, _b;
745
- return [
746
- h("div", { key: 'b76ac6db910ab50712e99980b6eac68fb878b0ac' }, h("link", { key: 'a12ae0412721f6fe7a1dca35b8ce984379c4120b', href: 'https://fonts.googleapis.com/css?family=Cairo', rel: 'stylesheet' }), this.paymentSuccessful ?
747
- h("center", null, h("ion-text", null, this.t("Your Payment has been processed successfully!")), ",", h("div", { style: { width: '40px', height: '40px', margin: '10px' }, class: this.paymentSuccessful ? undefined : 'hidden' }, h("svg", { version: "1.1", id: "Capa_1", xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", viewBox: "0 0 50 50", style: { "enable-background": "new 0 0 50 50;" } }, h("circle", { style: { fill: "#25AE88" }, cx: "25", cy: "25", r: "25" }), h("polyline", { style: {
748
- fill: 'none',
749
- stroke: '#FFFFFF',
750
- 'stroke-width': '2',
751
- 'stroke-linecap': 'round',
752
- 'stroke-linejoin': 'round',
753
- 'stroke-miterlimit': '10'
754
- }, points: "38,15 22,33 12,25" }))))
755
- :
756
- h("center", { hidden: !this.showButton }, h("amwal-installments-timeline", { "enable-installments": this.onlyShowBankInstallment, "installments-count": this.installmentsCount, locale: this.locale, amount: this.getNetAmount(), "timeline-style": this.timelineStyle, "footer-message": this.footerMessage }), h("ion-button", { class: `amwal-checkout-button`, color: "dark", onClick: () => this.handleCheckout(), disabled: this.disabled || this.internallyDisabled }, !this.hideIcons && this.showDiscountRibbon && this.discount > 0 && this.amount > 0 &&
757
- h("div", { class: 'ribbon' }, h("span", { class: 'ribbon-text' }, this.t("OFF"), " ", h("br", null), this.formatNumber((this.discount / (this.amount + ((_a = this.taxes) !== null && _a !== void 0 ? _a : 0) + ((_b = this.fees) !== null && _b !== void 0 ? _b : 0))) * 100) + '%')), h("div", { class: 'payment-brand-class', slot: this.locale === 'ar' ? "start" : "end" }, h("div", null, this.isApplePaySupported() && h("img", { width: 63, src: applePayLogo }), h("img", { width: 60, src: cardLogo }))), this.locale === 'ar' && h("div", { class: "vl" }), h("div", { class: 'button-text' }, this.t(this.label), " "), this.locale === 'en' && h("div", { class: "vl" })))),
758
- h("template", { key: 'fe6b3cffd28c8c2a9695ad2387103a9b660f00a5', id: "amwal-overlay-template" }, h("div", { key: 'f31222335364ea7575f04a91c33e16bc06e2e7fb', class: "amwal-overlay", id: "amwal-overlay-id" }, h("div", { key: 'f4c5c1d989b2cea17b6a944ab0c9a9f5958943c5', class: "amwal-overlay-container" }, h("span", { key: 'dc6bf122ed72c8593d77b24554ed42d519bc911f', class: "amwal-overlay-close", onClick: () => { var _a; return (_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.close(); } }, "\u2715"), h("p", { key: '99ad5d36b214d269f8ed1cd95d58bfdcb2f83d10' }, this.t("Don't see your checkout window?")), h("a", { key: '261cfe1e083c451e01ee0a3cd4d2529c80582e2d', role: "button", class: "amwal-overlay-button", onClick: () => {
759
- if (this.checkBrowserType() === 'Safari' || !this.payWindow) {
760
- this.openPopup();
761
- }
762
- else {
763
- this.payWindow.focus();
764
- }
765
- } }, this.t("Click here")))))
766
- ];
586
+ }
587
+ addressTriggerErrorHandler(event) {
588
+ var _a;
589
+ this.debugMsg("Address Trigger Error Received");
590
+ if (this.waitingForAddressAck) {
591
+ this.waitingForAddressAck = false;
592
+ (_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.postMessage(Object.assign({ type: 'amwal-address-trigger-error' }, event.detail), '*');
767
593
  }
768
- static get is() { return "amwal-checkout-button"; }
769
- static get originalStyleUrls() {
770
- return {
771
- "$": ["amwal-checkout-button.css"]
772
- };
594
+ else {
595
+ this.debugMsg("Error: Unexpected or repeated amwalAddressTriggerError");
773
596
  }
774
- static get styleUrls() {
775
- return {
776
- "$": ["amwal-checkout-button.css"]
777
- };
597
+ }
598
+ addressCountryAckHandler() {
599
+ var _a;
600
+ if (this.waitingForAddressCountryAck) {
601
+ this.waitingForAddressCountryAck = false;
602
+ (_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.postMessage({
603
+ type: 'amwal-address-country-ack',
604
+ allowedAddressStates: this.allowedAddressStates,
605
+ }, '*');
778
606
  }
779
- static get properties() {
780
- return {
781
- "merchantId": {
782
- "type": "string",
783
- "mutable": false,
784
- "complexType": {
785
- "original": "string",
786
- "resolved": "string",
787
- "references": {}
788
- },
789
- "required": false,
790
- "optional": false,
791
- "docs": {
792
- "tags": [],
793
- "text": "merchantId is the key to use obtained from https://merchant.sa.amwal.tech"
794
- },
795
- "getter": false,
796
- "setter": false,
797
- "reflect": false,
798
- "attribute": "merchant-id"
799
- },
800
- "installmentOptionsUrl": {
801
- "type": "string",
802
- "mutable": false,
803
- "complexType": {
804
- "original": "string",
805
- "resolved": "string",
806
- "references": {}
807
- },
808
- "required": false,
809
- "optional": false,
810
- "docs": {
811
- "tags": [],
812
- "text": "The installment options url is URL for the checkout page in the merchant website"
813
- },
814
- "getter": false,
815
- "setter": false,
816
- "reflect": false,
817
- "attribute": "installment-options-url"
818
- },
819
- "amount": {
820
- "type": "number",
821
- "mutable": false,
822
- "complexType": {
823
- "original": "number",
824
- "resolved": "number",
825
- "references": {}
826
- },
827
- "required": false,
828
- "optional": false,
829
- "docs": {
830
- "tags": [],
831
- "text": "The amount of money to charge the customer"
832
- },
833
- "getter": false,
834
- "setter": false,
835
- "reflect": false,
836
- "attribute": "amount"
837
- },
838
- "countryCode": {
839
- "type": "string",
840
- "mutable": false,
841
- "complexType": {
842
- "original": "CountryCode",
843
- "resolved": "\"AC\" | \"AD\" | \"AE\" | \"AF\" | \"AG\" | \"AI\" | \"AL\" | \"AM\" | \"AO\" | \"AR\" | \"AS\" | \"AT\" | \"AU\" | \"AW\" | \"AX\" | \"AZ\" | \"BA\" | \"BB\" | \"BD\" | \"BE\" | \"BF\" | \"BG\" | \"BH\" | \"BI\" | \"BJ\" | \"BL\" | \"BM\" | \"BN\" | \"BO\" | \"BQ\" | \"BR\" | \"BS\" | \"BT\" | \"BW\" | \"BY\" | \"BZ\" | \"CA\" | \"CC\" | \"CD\" | \"CF\" | \"CG\" | \"CH\" | \"CI\" | \"CK\" | \"CL\" | \"CM\" | \"CN\" | \"CO\" | \"CR\" | \"CU\" | \"CV\" | \"CW\" | \"CX\" | \"CY\" | \"CZ\" | \"DE\" | \"DJ\" | \"DK\" | \"DM\" | \"DO\" | \"DZ\" | \"EC\" | \"EE\" | \"EG\" | \"EH\" | \"ER\" | \"ES\" | \"ET\" | \"FI\" | \"FJ\" | \"FK\" | \"FM\" | \"FO\" | \"FR\" | \"GA\" | \"GB\" | \"GD\" | \"GE\" | \"GF\" | \"GG\" | \"GH\" | \"GI\" | \"GL\" | \"GM\" | \"GN\" | \"GP\" | \"GQ\" | \"GR\" | \"GT\" | \"GU\" | \"GW\" | \"GY\" | \"HK\" | \"HN\" | \"HR\" | \"HT\" | \"HU\" | \"ID\" | \"IE\" | \"IL\" | \"IM\" | \"IN\" | \"IO\" | \"IQ\" | \"IR\" | \"IS\" | \"IT\" | \"JE\" | \"JM\" | \"JO\" | \"JP\" | \"KE\" | \"KG\" | \"KH\" | \"KI\" | \"KM\" | \"KN\" | \"KP\" | \"KR\" | \"KW\" | \"KY\" | \"KZ\" | \"LA\" | \"LB\" | \"LC\" | \"LI\" | \"LK\" | \"LR\" | \"LS\" | \"LT\" | \"LU\" | \"LV\" | \"LY\" | \"MA\" | \"MC\" | \"MD\" | \"ME\" | \"MF\" | \"MG\" | \"MH\" | \"MK\" | \"ML\" | \"MM\" | \"MN\" | \"MO\" | \"MP\" | \"MQ\" | \"MR\" | \"MS\" | \"MT\" | \"MU\" | \"MV\" | \"MW\" | \"MX\" | \"MY\" | \"MZ\" | \"NA\" | \"NC\" | \"NE\" | \"NF\" | \"NG\" | \"NI\" | \"NL\" | \"NO\" | \"NP\" | \"NR\" | \"NU\" | \"NZ\" | \"OM\" | \"PA\" | \"PE\" | \"PF\" | \"PG\" | \"PH\" | \"PK\" | \"PL\" | \"PM\" | \"PR\" | \"PS\" | \"PT\" | \"PW\" | \"PY\" | \"QA\" | \"RE\" | \"RO\" | \"RS\" | \"RU\" | \"RW\" | \"SA\" | \"SB\" | \"SC\" | \"SD\" | \"SE\" | \"SG\" | \"SH\" | \"SI\" | \"SJ\" | \"SK\" | \"SL\" | \"SM\" | \"SN\" | \"SO\" | \"SR\" | \"SS\" | \"ST\" | \"SV\" | \"SX\" | \"SY\" | \"SZ\" | \"TA\" | \"TC\" | \"TD\" | \"TG\" | \"TH\" | \"TJ\" | \"TK\" | \"TL\" | \"TM\" | \"TN\" | \"TO\" | \"TR\" | \"TT\" | \"TV\" | \"TW\" | \"TZ\" | \"UA\" | \"UG\" | \"US\" | \"UY\" | \"UZ\" | \"VA\" | \"VC\" | \"VE\" | \"VG\" | \"VI\" | \"VN\" | \"VU\" | \"WF\" | \"WS\" | \"XK\" | \"YE\" | \"YT\" | \"ZA\" | \"ZM\" | \"ZW\"",
844
- "references": {
845
- "CountryCode": {
846
- "location": "import",
847
- "path": "libphonenumber-js",
848
- "id": "node_modules::CountryCode"
849
- }
850
- }
851
- },
852
- "required": false,
853
- "optional": false,
854
- "docs": {
855
- "tags": [],
856
- "text": "The country code of the merchant (e.g. SA)"
857
- },
858
- "getter": false,
859
- "setter": false,
860
- "reflect": false,
861
- "attribute": "country-code",
862
- "defaultValue": "\"SA\""
863
- },
864
- "locale": {
865
- "type": "string",
866
- "mutable": false,
867
- "complexType": {
868
- "original": "string",
869
- "resolved": "string",
870
- "references": {}
871
- },
872
- "required": false,
873
- "optional": true,
874
- "docs": {
875
- "tags": [],
876
- "text": "the language of the plugin. supported languages are Arabic (\"ar\") and English (\"en\")"
877
- },
878
- "getter": false,
879
- "setter": false,
880
- "reflect": false,
881
- "attribute": "locale",
882
- "defaultValue": "\"en\""
883
- },
884
- "label": {
885
- "type": "string",
886
- "mutable": false,
887
- "complexType": {
888
- "original": "\"Quick Checkout\" | \"Bank Installments\" | \"Pay with Apple Pay\"",
889
- "resolved": "\"Bank Installments\" | \"Pay with Apple Pay\" | \"Quick Checkout\"",
890
- "references": {}
891
- },
892
- "required": false,
893
- "optional": true,
894
- "docs": {
895
- "tags": [],
896
- "text": "the label of the button. Either checkout for final checkout or quicky-buy for per product buy"
897
- },
898
- "getter": false,
899
- "setter": false,
900
- "reflect": false,
901
- "attribute": "label",
902
- "defaultValue": "\"Quick Checkout\""
903
- },
904
- "darkMode": {
905
- "type": "string",
906
- "mutable": false,
907
- "complexType": {
908
- "original": "\"on\" | \"off\" | \"auto\"",
909
- "resolved": "\"auto\" | \"off\" | \"on\"",
910
- "references": {}
911
- },
912
- "required": false,
913
- "optional": true,
914
- "docs": {
915
- "tags": [],
916
- "text": "Dark Mode:\n - on: turns on dark mode\n - off: turns on light mode\n - auto: use customer preference for dark mode"
917
- },
918
- "getter": false,
919
- "setter": false,
920
- "reflect": false,
921
- "attribute": "dark-mode",
922
- "defaultValue": "\"off\""
923
- },
924
- "disabled": {
925
- "type": "boolean",
926
- "mutable": false,
927
- "complexType": {
928
- "original": "boolean",
929
- "resolved": "boolean",
930
- "references": {}
931
- },
932
- "required": false,
933
- "optional": true,
934
- "docs": {
935
- "tags": [],
936
- "text": "disables the checkout button"
937
- },
938
- "getter": false,
939
- "setter": false,
940
- "reflect": false,
941
- "attribute": "disabled",
942
- "defaultValue": "false"
943
- },
944
- "addressRequired": {
945
- "type": "boolean",
946
- "mutable": false,
947
- "complexType": {
948
- "original": "boolean",
949
- "resolved": "boolean",
950
- "references": {}
951
- },
952
- "required": false,
953
- "optional": true,
954
- "docs": {
955
- "tags": [],
956
- "text": "addressRequired specifies if shipping address is required or not (\"true\" or \"false\")"
957
- },
958
- "getter": false,
959
- "setter": false,
960
- "reflect": false,
961
- "attribute": "address-required",
962
- "defaultValue": "true"
963
- },
964
- "showPaymentBrands": {
965
- "type": "boolean",
966
- "mutable": false,
967
- "complexType": {
968
- "original": "boolean",
969
- "resolved": "boolean",
970
- "references": {}
971
- },
972
- "required": false,
973
- "optional": true,
974
- "docs": {
975
- "tags": [],
976
- "text": "showPaymentBrands to show supporeted brands under button values are (\"true\" or \"false\")"
977
- },
978
- "getter": false,
979
- "setter": false,
980
- "reflect": false,
981
- "attribute": "show-payment-brands",
982
- "defaultValue": "false"
983
- },
984
- "showDiscountRibbon": {
985
- "type": "boolean",
986
- "mutable": false,
987
- "complexType": {
988
- "original": "boolean",
989
- "resolved": "boolean",
990
- "references": {}
991
- },
992
- "required": false,
993
- "optional": true,
994
- "docs": {
995
- "tags": [],
996
- "text": "showDiscountRibbon to show discount ribbon values are (\"true\" or \"false\")"
997
- },
998
- "getter": false,
999
- "setter": false,
1000
- "reflect": false,
1001
- "attribute": "show-discount-ribbon",
1002
- "defaultValue": "false"
1003
- },
1004
- "initialAddress": {
1005
- "type": "unknown",
1006
- "mutable": false,
1007
- "complexType": {
1008
- "original": "IAddress",
1009
- "resolved": "IAddress",
1010
- "references": {
1011
- "IAddress": {
1012
- "location": "local",
1013
- "path": "/Users/fr3on/Downloads/amwal-checkout-qa/stencil-library/src/components/amwal-checkout-button/amwal-checkout-button.tsx",
1014
- "id": "src/components/amwal-checkout-button/amwal-checkout-button.tsx::IAddress"
1015
- }
1016
- }
1017
- },
1018
- "required": false,
1019
- "optional": true,
1020
- "docs": {
1021
- "tags": [],
1022
- "text": "initialAddress specifies a default address, Country field is country code (two letter ISO country code)"
1023
- },
1024
- "getter": false,
1025
- "setter": false
1026
- },
1027
- "allowedAddressCountries": {
1028
- "type": "unknown",
1029
- "mutable": false,
1030
- "complexType": {
1031
- "original": "string[]",
1032
- "resolved": "string[]",
1033
- "references": {}
1034
- },
1035
- "required": false,
1036
- "optional": true,
1037
- "docs": {
1038
- "tags": [],
1039
- "text": "allowedAddressCountries specifies an array of allowed countries for the address"
1040
- },
1041
- "getter": false,
1042
- "setter": false
1043
- },
1044
- "allowedAddressStates": {
1045
- "type": "unknown",
1046
- "mutable": false,
1047
- "complexType": {
1048
- "original": "{ [index: string]: StateSpecs }",
1049
- "resolved": "{ [index: string]: StateSpecs; }",
1050
- "references": {
1051
- "StateSpecs": {
1052
- "location": "local",
1053
- "path": "/Users/fr3on/Downloads/amwal-checkout-qa/stencil-library/src/components/amwal-checkout-button/amwal-checkout-button.tsx",
1054
- "id": "src/components/amwal-checkout-button/amwal-checkout-button.tsx::StateSpecs"
1055
- }
1056
- }
1057
- },
1058
- "required": false,
1059
- "optional": true,
1060
- "docs": {
1061
- "tags": [],
1062
- "text": "allowedAddressStates specifies an array of allowed states for the address example {\"SA\":{\"XX1\":\"State 1\",\"XX2\":\"State 2\"},\"US\":{\"US1\":\"State 1\",\"US2\":\"State 2\"}}"
1063
- },
1064
- "getter": false,
1065
- "setter": false
1066
- },
1067
- "allowedAddressCities": {
1068
- "type": "unknown",
1069
- "mutable": false,
1070
- "complexType": {
1071
- "original": "{ [index: string]: CitySpecs }",
1072
- "resolved": "{ [index: string]: CitySpecs; }",
1073
- "references": {
1074
- "CitySpecs": {
1075
- "location": "local",
1076
- "path": "/Users/fr3on/Downloads/amwal-checkout-qa/stencil-library/src/components/amwal-checkout-button/amwal-checkout-button.tsx",
1077
- "id": "src/components/amwal-checkout-button/amwal-checkout-button.tsx::CitySpecs"
1078
- }
1079
- }
1080
- },
1081
- "required": false,
1082
- "optional": true,
1083
- "docs": {
1084
- "tags": [],
1085
- "text": "allowedAddressCities specifies an array of allowed states for the address example {\"SA\":{\"XX1\":[\"Riady\",\"Afif\"],\"XX2\":[\"Jeddah\",\"Makkah\"]},\"US\":{\"US1\":[\"San Jose\",\"San Francisco\"],\"US2\":[\"New york\"]}}"
1086
- },
1087
- "getter": false,
1088
- "setter": false
1089
- },
1090
- "street2Required": {
1091
- "type": "boolean",
1092
- "mutable": false,
1093
- "complexType": {
1094
- "original": "boolean",
1095
- "resolved": "boolean",
1096
- "references": {}
1097
- },
1098
- "required": false,
1099
- "optional": true,
1100
- "docs": {
1101
- "tags": [],
1102
- "text": "street2Required specifies if street 2 is required or not (\"true\" or \"false\"). Can only be true if addressRequired is true."
1103
- },
1104
- "getter": false,
1105
- "setter": false,
1106
- "reflect": false,
1107
- "attribute": "street2-required",
1108
- "defaultValue": "false"
1109
- },
1110
- "emailRequired": {
1111
- "type": "boolean",
1112
- "mutable": false,
1113
- "complexType": {
1114
- "original": "boolean",
1115
- "resolved": "boolean",
1116
- "references": {}
1117
- },
1118
- "required": false,
1119
- "optional": true,
1120
- "docs": {
1121
- "tags": [],
1122
- "text": "emailRequired specifies if email address is required or not (\"true\" or \"false\"). Can only be true if addressRequired is true."
1123
- },
1124
- "getter": false,
1125
- "setter": false,
1126
- "reflect": false,
1127
- "attribute": "email-required",
1128
- "defaultValue": "true"
1129
- },
1130
- "initialEmail": {
1131
- "type": "string",
1132
- "mutable": false,
1133
- "complexType": {
1134
- "original": "string",
1135
- "resolved": "string",
1136
- "references": {}
1137
- },
1138
- "required": false,
1139
- "optional": true,
1140
- "docs": {
1141
- "tags": [],
1142
- "text": "initialEmail specifies a default email"
1143
- },
1144
- "getter": false,
1145
- "setter": false,
1146
- "reflect": false,
1147
- "attribute": "initial-email"
1148
- },
1149
- "initialFirstName": {
1150
- "type": "string",
1151
- "mutable": false,
1152
- "complexType": {
1153
- "original": "string",
1154
- "resolved": "string",
1155
- "references": {}
1156
- },
1157
- "required": false,
1158
- "optional": true,
1159
- "docs": {
1160
- "tags": [],
1161
- "text": "initialFirstName specifies a default first name"
1162
- },
1163
- "getter": false,
1164
- "setter": false,
1165
- "reflect": false,
1166
- "attribute": "initial-first-name"
1167
- },
1168
- "initialLastName": {
1169
- "type": "string",
1170
- "mutable": false,
1171
- "complexType": {
1172
- "original": "string",
1173
- "resolved": "string",
1174
- "references": {}
1175
- },
1176
- "required": false,
1177
- "optional": true,
1178
- "docs": {
1179
- "tags": [],
1180
- "text": "initialLastName specifies a default last name"
1181
- },
1182
- "getter": false,
1183
- "setter": false,
1184
- "reflect": false,
1185
- "attribute": "initial-last-name"
1186
- },
1187
- "initialPhoneNumber": {
1188
- "type": "string",
1189
- "mutable": false,
1190
- "complexType": {
1191
- "original": "string",
1192
- "resolved": "string",
1193
- "references": {}
1194
- },
1195
- "required": false,
1196
- "optional": true,
1197
- "docs": {
1198
- "tags": [],
1199
- "text": "initialPhone specifies a default phone number"
1200
- },
1201
- "getter": false,
1202
- "setter": false,
1203
- "reflect": false,
1204
- "attribute": "initial-phone-number"
1205
- },
1206
- "addressHandshake": {
1207
- "type": "boolean",
1208
- "mutable": false,
1209
- "complexType": {
1210
- "original": "boolean",
1211
- "resolved": "boolean",
1212
- "references": {}
1213
- },
1214
- "required": false,
1215
- "optional": true,
1216
- "docs": {
1217
- "tags": [],
1218
- "text": "addressHandshake specifies if address event and ack is activated (\"true\" or \"false\")"
1219
- },
1220
- "getter": false,
1221
- "setter": false,
1222
- "reflect": false,
1223
- "attribute": "address-handshake",
1224
- "defaultValue": "false"
1225
- },
1226
- "enableDynamicShippingDetails": {
1227
- "type": "boolean",
1228
- "mutable": false,
1229
- "complexType": {
1230
- "original": "boolean",
1231
- "resolved": "boolean",
1232
- "references": {}
1233
- },
1234
- "required": false,
1235
- "optional": true,
1236
- "docs": {
1237
- "tags": [],
1238
- "text": "enableDynamicShippingDetails specifies if shipping countries, states and cities will load dynamically or prefilled in the parameters"
1239
- },
1240
- "getter": false,
1241
- "setter": false,
1242
- "reflect": false,
1243
- "attribute": "enable-dynamic-shipping-details",
1244
- "defaultValue": "false"
1245
- },
1246
- "sendExtraAddressFields": {
1247
- "type": "boolean",
1248
- "mutable": false,
1249
- "complexType": {
1250
- "original": "boolean",
1251
- "resolved": "boolean",
1252
- "references": {}
1253
- },
1254
- "required": false,
1255
- "optional": true,
1256
- "docs": {
1257
- "tags": [],
1258
- "text": "sendExtraAddressFields specifies if extra address fields are sent in amwalAddressUpdate event"
1259
- },
1260
- "getter": false,
1261
- "setter": false,
1262
- "reflect": false,
1263
- "attribute": "send-extra-address-fields",
1264
- "defaultValue": "false"
1265
- },
1266
- "shippingMethods": {
1267
- "type": "unknown",
1268
- "mutable": false,
1269
- "complexType": {
1270
- "original": "IShippingMethod[]",
1271
- "resolved": "IShippingMethod[]",
1272
- "references": {
1273
- "IShippingMethod": {
1274
- "location": "local",
1275
- "path": "/Users/fr3on/Downloads/amwal-checkout-qa/stencil-library/src/components/amwal-checkout-button/amwal-checkout-button.tsx",
1276
- "id": "src/components/amwal-checkout-button/amwal-checkout-button.tsx::IShippingMethod"
1277
- }
1278
- }
1279
- },
1280
- "required": false,
1281
- "optional": true,
1282
- "docs": {
1283
- "tags": [],
1284
- "text": "shippingMethods an array of shipping methods"
1285
- },
1286
- "getter": false,
1287
- "setter": false,
1288
- "defaultValue": "[]"
1289
- },
1290
- "taxes": {
1291
- "type": "number",
1292
- "mutable": false,
1293
- "complexType": {
1294
- "original": "number",
1295
- "resolved": "number",
1296
- "references": {}
1297
- },
1298
- "required": false,
1299
- "optional": true,
1300
- "docs": {
1301
- "tags": [],
1302
- "text": "taxes specifies any additional taxes"
1303
- },
1304
- "getter": false,
1305
- "setter": false,
1306
- "reflect": false,
1307
- "attribute": "taxes",
1308
- "defaultValue": "0"
1309
- },
1310
- "discount": {
1311
- "type": "number",
1312
- "mutable": false,
1313
- "complexType": {
1314
- "original": "number",
1315
- "resolved": "number",
1316
- "references": {}
1317
- },
1318
- "required": false,
1319
- "optional": true,
1320
- "docs": {
1321
- "tags": [],
1322
- "text": "discount specifies any discount to be applied"
1323
- },
1324
- "getter": false,
1325
- "setter": false,
1326
- "reflect": false,
1327
- "attribute": "discount",
1328
- "defaultValue": "0"
1329
- },
1330
- "discountDescription": {
1331
- "type": "string",
1332
- "mutable": false,
1333
- "complexType": {
1334
- "original": "string",
1335
- "resolved": "string",
1336
- "references": {}
1337
- },
1338
- "required": false,
1339
- "optional": true,
1340
- "docs": {
1341
- "tags": [],
1342
- "text": "discountDescription provides description for the discount"
1343
- },
1344
- "getter": false,
1345
- "setter": false,
1346
- "reflect": false,
1347
- "attribute": "discount-description"
1348
- },
1349
- "fees": {
1350
- "type": "number",
1351
- "mutable": false,
1352
- "complexType": {
1353
- "original": "number",
1354
- "resolved": "number",
1355
- "references": {}
1356
- },
1357
- "required": false,
1358
- "optional": true,
1359
- "docs": {
1360
- "tags": [],
1361
- "text": "fees specifies any fees to be applied"
1362
- },
1363
- "getter": false,
1364
- "setter": false,
1365
- "reflect": false,
1366
- "attribute": "fees",
1367
- "defaultValue": "0"
1368
- },
1369
- "feesDescription": {
1370
- "type": "string",
1371
- "mutable": false,
1372
- "complexType": {
1373
- "original": "string",
1374
- "resolved": "string",
1375
- "references": {}
1376
- },
1377
- "required": false,
1378
- "optional": true,
1379
- "docs": {
1380
- "tags": [],
1381
- "text": "feesDescription provides description for the fees"
1382
- },
1383
- "getter": false,
1384
- "setter": false,
1385
- "reflect": false,
1386
- "attribute": "fees-description"
1387
- },
1388
- "refId": {
1389
- "type": "string",
1390
- "mutable": false,
1391
- "complexType": {
1392
- "original": "string",
1393
- "resolved": "string",
1394
- "references": {}
1395
- },
1396
- "required": false,
1397
- "optional": true,
1398
- "docs": {
1399
- "tags": [],
1400
- "text": "refId an identifier to be included in the payment transaction"
1401
- },
1402
- "getter": false,
1403
- "setter": false,
1404
- "reflect": false,
1405
- "attribute": "ref-id"
1406
- },
1407
- "uniqueRef": {
1408
- "type": "boolean",
1409
- "mutable": false,
1410
- "complexType": {
1411
- "original": "boolean",
1412
- "resolved": "boolean",
1413
- "references": {}
1414
- },
1415
- "required": false,
1416
- "optional": true,
1417
- "docs": {
1418
- "tags": [],
1419
- "text": "uniqueRef a boolean to enforce the uniqueness of refId"
1420
- },
1421
- "getter": false,
1422
- "setter": false,
1423
- "reflect": false,
1424
- "attribute": "unique-ref",
1425
- "defaultValue": "false"
1426
- },
1427
- "onlyShowBankInstallment": {
1428
- "type": "boolean",
1429
- "mutable": false,
1430
- "complexType": {
1431
- "original": "boolean",
1432
- "resolved": "boolean",
1433
- "references": {}
1434
- },
1435
- "required": false,
1436
- "optional": true,
1437
- "docs": {
1438
- "tags": [],
1439
- "text": "onlyShowBankInstallment specifies if only bank installments should be shown"
1440
- },
1441
- "getter": false,
1442
- "setter": false,
1443
- "reflect": false,
1444
- "attribute": "only-show-bank-installment",
1445
- "defaultValue": "false"
1446
- },
1447
- "enableAppleCheckout": {
1448
- "type": "boolean",
1449
- "mutable": false,
1450
- "complexType": {
1451
- "original": "boolean",
1452
- "resolved": "boolean",
1453
- "references": {}
1454
- },
1455
- "required": false,
1456
- "optional": true,
1457
- "docs": {
1458
- "tags": [],
1459
- "text": "enableAppleCheckout specifies if Apple Checkout is enabled"
1460
- },
1461
- "getter": false,
1462
- "setter": false,
1463
- "reflect": false,
1464
- "attribute": "enable-apple-checkout",
1465
- "defaultValue": "false"
1466
- },
1467
- "apiUrl": {
1468
- "type": "string",
1469
- "mutable": false,
1470
- "complexType": {
1471
- "original": "string",
1472
- "resolved": "string",
1473
- "references": {}
1474
- },
1475
- "required": false,
1476
- "optional": true,
1477
- "docs": {
1478
- "tags": [],
1479
- "text": "Custom api URL (optional). If not provided, uses process.env.BACKEND_URL\nExample: 'https://qa.amwal.dev'"
1480
- },
1481
- "getter": false,
1482
- "setter": false,
1483
- "reflect": false,
1484
- "attribute": "api-url"
1485
- },
1486
- "payUrl": {
1487
- "type": "string",
1488
- "mutable": false,
1489
- "complexType": {
1490
- "original": "string",
1491
- "resolved": "string",
1492
- "references": {}
1493
- },
1494
- "required": false,
1495
- "optional": true,
1496
- "docs": {
1497
- "tags": [],
1498
- "text": "Custom payment page URL (optional). If not provided, uses process.env.PAY_URL\nExample: 'https://pay.amwal.dev'"
1499
- },
1500
- "getter": false,
1501
- "setter": false,
1502
- "reflect": false,
1503
- "attribute": "pay-url"
1504
- },
1505
- "debug": {
1506
- "type": "boolean",
1507
- "mutable": false,
1508
- "complexType": {
1509
- "original": "boolean",
1510
- "resolved": "boolean",
1511
- "references": {}
1512
- },
1513
- "required": false,
1514
- "optional": true,
1515
- "docs": {
1516
- "tags": [],
1517
- "text": "debug flag for verbose printing of debug messages"
1518
- },
1519
- "getter": false,
1520
- "setter": false,
1521
- "reflect": false,
1522
- "attribute": "debug",
1523
- "defaultValue": "false"
1524
- },
1525
- "showContinueShoppingButton": {
1526
- "type": "boolean",
1527
- "mutable": false,
1528
- "complexType": {
1529
- "original": "boolean",
1530
- "resolved": "boolean",
1531
- "references": {}
1532
- },
1533
- "required": false,
1534
- "optional": true,
1535
- "docs": {
1536
- "tags": [],
1537
- "text": "debug flag for verbose printing of debug messages"
1538
- },
1539
- "getter": false,
1540
- "setter": false,
1541
- "reflect": false,
1542
- "attribute": "show-continue-shopping-button",
1543
- "defaultValue": "false"
1544
- },
1545
- "enablePrePayTrigger": {
1546
- "type": "boolean",
1547
- "mutable": false,
1548
- "complexType": {
1549
- "original": "boolean",
1550
- "resolved": "boolean",
1551
- "references": {}
1552
- },
1553
- "required": false,
1554
- "optional": true,
1555
- "docs": {
1556
- "tags": [],
1557
- "text": "enable triggering a pre pay event to do final task such as order creation"
1558
- },
1559
- "getter": false,
1560
- "setter": false,
1561
- "reflect": false,
1562
- "attribute": "enable-pre-pay-trigger",
1563
- "defaultValue": "false"
1564
- },
1565
- "enablePreCheckoutTrigger": {
1566
- "type": "boolean",
1567
- "mutable": false,
1568
- "complexType": {
1569
- "original": "boolean",
1570
- "resolved": "boolean",
1571
- "references": {}
1572
- },
1573
- "required": false,
1574
- "optional": true,
1575
- "docs": {
1576
- "tags": [],
1577
- "text": "enable triggering a pre checkout click event to do initial tasks such as adding items to carts"
1578
- },
1579
- "getter": false,
1580
- "setter": false,
1581
- "reflect": false,
1582
- "attribute": "enable-pre-checkout-trigger",
1583
- "defaultValue": "false"
1584
- },
1585
- "postcodeOptionalCountries": {
1586
- "type": "unknown",
1587
- "mutable": false,
1588
- "complexType": {
1589
- "original": "string[]",
1590
- "resolved": "string[]",
1591
- "references": {}
1592
- },
1593
- "required": false,
1594
- "optional": true,
1595
- "docs": {
1596
- "tags": [],
1597
- "text": "enable postal code required option"
1598
- },
1599
- "getter": false,
1600
- "setter": false
1601
- },
1602
- "installmentsCount": {
1603
- "type": "number",
1604
- "mutable": false,
1605
- "complexType": {
1606
- "original": "number",
1607
- "resolved": "number",
1608
- "references": {}
1609
- },
1610
- "required": false,
1611
- "optional": false,
1612
- "docs": {
1613
- "tags": [],
1614
- "text": "Number of installments"
1615
- },
1616
- "getter": false,
1617
- "setter": false,
1618
- "reflect": false,
1619
- "attribute": "installments-count",
1620
- "defaultValue": "6"
1621
- },
1622
- "timelineStyle": {
1623
- "type": "string",
1624
- "mutable": false,
1625
- "complexType": {
1626
- "original": "'default' | 'simple'",
1627
- "resolved": "\"default\" | \"simple\"",
1628
- "references": {}
1629
- },
1630
- "required": false,
1631
- "optional": false,
1632
- "docs": {
1633
- "tags": [],
1634
- "text": "* timelineStyle specifies the style of the timeline in the checkout modal."
1635
- },
1636
- "getter": false,
1637
- "setter": false,
1638
- "reflect": false,
1639
- "attribute": "timeline-style",
1640
- "defaultValue": "'default'"
1641
- },
1642
- "footerMessage": {
1643
- "type": "string",
1644
- "mutable": false,
1645
- "complexType": {
1646
- "original": "string",
1647
- "resolved": "string",
1648
- "references": {}
1649
- },
1650
- "required": false,
1651
- "optional": false,
1652
- "docs": {
1653
- "tags": [],
1654
- "text": "* timelineFooterText specifies the text to be displayed in the footer of the timeline in the checkout modal."
1655
- },
1656
- "getter": false,
1657
- "setter": false,
1658
- "reflect": false,
1659
- "attribute": "footer-message",
1660
- "defaultValue": "''"
1661
- }
1662
- };
607
+ else {
608
+ this.debugMsg("Error: Unexpected or repeated amwalAddressCountryAck");
1663
609
  }
1664
- static get states() {
1665
- return {
1666
- "hideIcons": {},
1667
- "result": {},
1668
- "paymentSuccessful": {},
1669
- "orderId": {},
1670
- "dark": {},
1671
- "internallyDisabled": {}
1672
- };
610
+ }
611
+ addressStateAckHandler() {
612
+ var _a;
613
+ if (this.waitingForAddressStateAck) {
614
+ this.waitingForAddressStateAck = false;
615
+ (_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.postMessage({
616
+ type: 'amwal-address-state-ack',
617
+ allowedAddressCities: this.allowedAddressCities,
618
+ }, '*');
1673
619
  }
1674
- static get events() {
1675
- return [{
1676
- "method": "amwalCheckoutSuccess",
1677
- "name": "amwalCheckoutSuccess",
1678
- "bubbles": true,
1679
- "cancelable": true,
1680
- "composed": true,
1681
- "docs": {
1682
- "tags": [],
1683
- "text": "amwalCheckoutSuccess is a dom event fired on success of payment. the event has orderId field which can be used\nto lookup transaction status at https://backend.sa.amwal.tech"
1684
- },
1685
- "complexType": {
1686
- "original": "AmwalCheckoutStatus",
1687
- "resolved": "AmwalCheckoutStatus",
1688
- "references": {
1689
- "AmwalCheckoutStatus": {
1690
- "location": "local",
1691
- "path": "/Users/fr3on/Downloads/amwal-checkout-qa/stencil-library/src/components/amwal-checkout-button/amwal-checkout-button.tsx",
1692
- "id": "src/components/amwal-checkout-button/amwal-checkout-button.tsx::AmwalCheckoutStatus"
1693
- }
1694
- }
1695
- }
1696
- }, {
1697
- "method": "updateOrderOnPaymentsuccess",
1698
- "name": "updateOrderOnPaymentsuccess",
1699
- "bubbles": true,
1700
- "cancelable": true,
1701
- "composed": true,
1702
- "docs": {
1703
- "tags": [],
1704
- "text": "updateOrderOnPaymentsuccess is a dom event fired on success of payment. the event has orderId field which can be used\nto lookup transaction status at https://backend.sa.amwal.tech"
1705
- },
1706
- "complexType": {
1707
- "original": "AmwalCheckoutStatus",
1708
- "resolved": "AmwalCheckoutStatus",
1709
- "references": {
1710
- "AmwalCheckoutStatus": {
1711
- "location": "local",
1712
- "path": "/Users/fr3on/Downloads/amwal-checkout-qa/stencil-library/src/components/amwal-checkout-button/amwal-checkout-button.tsx",
1713
- "id": "src/components/amwal-checkout-button/amwal-checkout-button.tsx::AmwalCheckoutStatus"
1714
- }
1715
- }
1716
- }
1717
- }, {
1718
- "method": "amwalDismissed",
1719
- "name": "amwalDismissed",
1720
- "bubbles": true,
1721
- "cancelable": true,
1722
- "composed": true,
1723
- "docs": {
1724
- "tags": [],
1725
- "text": "amwalDismissed is a dom event fired when the amwal modal or popup window is dismissed, event.detail indicates if it's successfull or not (boolean)"
1726
- },
1727
- "complexType": {
1728
- "original": "AmwalDismissalStatus",
1729
- "resolved": "AmwalDismissalStatus",
1730
- "references": {
1731
- "AmwalDismissalStatus": {
1732
- "location": "local",
1733
- "path": "/Users/fr3on/Downloads/amwal-checkout-qa/stencil-library/src/components/amwal-checkout-button/amwal-checkout-button.tsx",
1734
- "id": "src/components/amwal-checkout-button/amwal-checkout-button.tsx::AmwalDismissalStatus"
1735
- }
1736
- }
1737
- }
1738
- }, {
1739
- "method": "amwalAddressUpdate",
1740
- "name": "amwalAddressUpdate",
1741
- "bubbles": true,
1742
- "cancelable": true,
1743
- "composed": true,
1744
- "docs": {
1745
- "tags": [],
1746
- "text": "amwalAddressUpdate is a dom event fired on address selection."
1747
- },
1748
- "complexType": {
1749
- "original": "IAddress",
1750
- "resolved": "IAddress",
1751
- "references": {
1752
- "IAddress": {
1753
- "location": "local",
1754
- "path": "/Users/fr3on/Downloads/amwal-checkout-qa/stencil-library/src/components/amwal-checkout-button/amwal-checkout-button.tsx",
1755
- "id": "src/components/amwal-checkout-button/amwal-checkout-button.tsx::IAddress"
1756
- }
1757
- }
1758
- }
1759
- }, {
1760
- "method": "amwalAddressCountryUpdate",
1761
- "name": "amwalAddressCountryUpdate",
1762
- "bubbles": true,
1763
- "cancelable": true,
1764
- "composed": true,
1765
- "docs": {
1766
- "tags": [],
1767
- "text": "amwalAddressCountryUpdate is a dom event fired on address country selection."
1768
- },
1769
- "complexType": {
1770
- "original": "ICountry",
1771
- "resolved": "ICountry",
1772
- "references": {
1773
- "ICountry": {
1774
- "location": "local",
1775
- "path": "/Users/fr3on/Downloads/amwal-checkout-qa/stencil-library/src/components/amwal-checkout-button/amwal-checkout-button.tsx",
1776
- "id": "src/components/amwal-checkout-button/amwal-checkout-button.tsx::ICountry"
1777
- }
1778
- }
1779
- }
1780
- }, {
1781
- "method": "amwalAddressStateUpdate",
1782
- "name": "amwalAddressStateUpdate",
1783
- "bubbles": true,
1784
- "cancelable": true,
1785
- "composed": true,
1786
- "docs": {
1787
- "tags": [],
1788
- "text": "amwalAddressStateUpdate is a dom event fired on address country selection."
1789
- },
1790
- "complexType": {
1791
- "original": "IState",
1792
- "resolved": "IState",
1793
- "references": {
1794
- "IState": {
1795
- "location": "local",
1796
- "path": "/Users/fr3on/Downloads/amwal-checkout-qa/stencil-library/src/components/amwal-checkout-button/amwal-checkout-button.tsx",
1797
- "id": "src/components/amwal-checkout-button/amwal-checkout-button.tsx::IState"
1798
- }
1799
- }
1800
- }
1801
- }, {
1802
- "method": "amwalPrePayTrigger",
1803
- "name": "amwalPrePayTrigger",
1804
- "bubbles": true,
1805
- "cancelable": true,
1806
- "composed": true,
1807
- "docs": {
1808
- "tags": [],
1809
- "text": "amwalPrePayTrigger is a dom event fired once payment button is clicked before payment is processed. It is\nenabled if enablePrePayTrigger is set. It waits for either amwalPrePayTriggerAck or amwalPrePayTriggerError\nevents to be sent back before proceeding to payment or aborting respectively."
1810
- },
1811
- "complexType": {
1812
- "original": "ITransactionDetails",
1813
- "resolved": "ITransactionDetails",
1814
- "references": {
1815
- "ITransactionDetails": {
1816
- "location": "local",
1817
- "path": "/Users/fr3on/Downloads/amwal-checkout-qa/stencil-library/src/components/amwal-checkout-button/amwal-checkout-button.tsx",
1818
- "id": "src/components/amwal-checkout-button/amwal-checkout-button.tsx::ITransactionDetails"
1819
- }
1820
- }
1821
- }
1822
- }, {
1823
- "method": "amwalPreCheckoutTrigger",
1824
- "name": "amwalPreCheckoutTrigger",
1825
- "bubbles": true,
1826
- "cancelable": true,
1827
- "composed": true,
1828
- "docs": {
1829
- "tags": [],
1830
- "text": "amwalPreCheckoutTrigger is a dom event fired once amwal checkout button is clicked before a transaction is created. It is\nenabled if enablePreCheckoutTrigger is set. It waits for either amwalPreCheckoutTriggerAck or amwalPreCheckoutTriggerError\nevents to be sent back before proceeding with the normal checkout flow."
1831
- },
1832
- "complexType": {
1833
- "original": "ITransactionDetails",
1834
- "resolved": "ITransactionDetails",
1835
- "references": {
1836
- "ITransactionDetails": {
1837
- "location": "local",
1838
- "path": "/Users/fr3on/Downloads/amwal-checkout-qa/stencil-library/src/components/amwal-checkout-button/amwal-checkout-button.tsx",
1839
- "id": "src/components/amwal-checkout-button/amwal-checkout-button.tsx::ITransactionDetails"
1840
- }
1841
- }
1842
- }
1843
- }];
620
+ else {
621
+ this.debugMsg("Error: Unexpected or repeated amwalAddressStateAck");
1844
622
  }
1845
- static get methods() {
1846
- return {
1847
- "dismissModal": {
1848
- "complexType": {
1849
- "signature": "() => Promise<void>",
1850
- "parameters": [],
1851
- "references": {
1852
- "Promise": {
1853
- "location": "global",
1854
- "id": "global::Promise"
1855
- }
1856
- },
1857
- "return": "Promise<void>"
1858
- },
1859
- "docs": {
1860
- "text": "",
1861
- "tags": []
1862
- }
1863
- }
1864
- };
623
+ }
624
+ openPopup() {
625
+ var _a;
626
+ (_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.close();
627
+ const popupWidth = 500;
628
+ const popupHeight = 860;
629
+ const popupLeft = window.screenLeft + (screen.width - popupWidth) / 2;
630
+ const popupTop = window.screenTop + (screen.height - popupHeight) / 4;
631
+ const strWindowFeatures = `modal=yes, width=${popupWidth}, height=${popupHeight}, top=${popupTop}, left=${popupLeft}`;
632
+ this.payWindow = window.open(this.getPayUrl(), 'amwal-pay', strWindowFeatures);
633
+ this.payWindow.focus();
634
+ }
635
+ checkBrowserType() {
636
+ return this.agent.browser.name;
637
+ }
638
+ isApplePaySupported() {
639
+ var _a;
640
+ // const osName = this.agent.os.name;
641
+ // const browserName = this.agent.browser.name;
642
+ // console.log('browserName ', browserName, ' / osName ', osName)
643
+ // return osName && browserName && (osName === 'iOS' || osName === 'Mac OS' || osName === 'iPadOS') && (browserName === 'Safari' || browserName === 'Chrome');
644
+ try {
645
+ return (_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.canMakePayments();
1865
646
  }
1866
- static get elementRef() { return "el"; }
1867
- static get watchers() {
1868
- return [{
1869
- "propName": "shippingMethods",
1870
- "methodName": "parseMyArrayProp"
1871
- }, {
1872
- "propName": "initialAddress",
1873
- "methodName": "parseInitiaalAddressProp"
1874
- }, {
1875
- "propName": "allowedAddressCountries",
1876
- "methodName": "parseAllowedAddressCountries"
1877
- }, {
1878
- "propName": "postcodeOptionalCountries",
1879
- "methodName": "parsepostcodeOptionalCountries"
1880
- }, {
1881
- "propName": "allowedAddressStates",
1882
- "methodName": "parseAllowedAddressStates"
1883
- }, {
1884
- "propName": "allowedAddressCities",
1885
- "methodName": "parseAllowedAddressCities"
1886
- }, {
1887
- "propName": "locale",
1888
- "methodName": "updateLocale"
1889
- }, {
1890
- "propName": "discount",
1891
- "methodName": "validateDiscount"
1892
- }, {
1893
- "propName": "fees",
1894
- "methodName": "validateFees"
1895
- }];
647
+ catch (e) {
648
+ console.error(e);
1896
649
  }
1897
- static get listeners() {
1898
- return [{
1899
- "name": "amwalPreCheckoutTriggerAck",
1900
- "method": "prePayCheckoutAckHandler",
1901
- "target": undefined,
1902
- "capture": false,
1903
- "passive": false
1904
- }, {
1905
- "name": "amwalPreCheckoutTriggerError",
1906
- "method": "prePayCheckoutErrorHandler",
1907
- "target": undefined,
1908
- "capture": false,
1909
- "passive": false
1910
- }, {
1911
- "name": "amwalPrePayTriggerAck",
1912
- "method": "prePayTriggerAckHandler",
1913
- "target": undefined,
1914
- "capture": false,
1915
- "passive": false
1916
- }, {
1917
- "name": "amwalPrePayTriggerError",
1918
- "method": "prePayTriggerErrorHandler",
1919
- "target": undefined,
1920
- "capture": false,
1921
- "passive": false
1922
- }, {
1923
- "name": "message",
1924
- "method": "payWindowMessageHandler",
1925
- "target": "window",
1926
- "capture": false,
1927
- "passive": false
1928
- }, {
1929
- "name": "amwalAddressAck",
1930
- "method": "addressAckHandler",
1931
- "target": undefined,
1932
- "capture": false,
1933
- "passive": false
1934
- }, {
1935
- "name": "amwalAddressTriggerError",
1936
- "method": "addressTriggerErrorHandler",
1937
- "target": undefined,
1938
- "capture": false,
1939
- "passive": false
1940
- }, {
1941
- "name": "amwalAddressCountryAck",
1942
- "method": "addressCountryAckHandler",
1943
- "target": undefined,
1944
- "capture": false,
1945
- "passive": false
1946
- }, {
1947
- "name": "amwalAddressStateAck",
1948
- "method": "addressStateAckHandler",
1949
- "target": undefined,
1950
- "capture": false,
1951
- "passive": false
1952
- }];
650
+ return false;
651
+ }
652
+ computeHideIcons(buttonWidth) {
653
+ if (buttonWidth) {
654
+ const ribbonShown = this.showDiscountRibbon && this.discount > 0 && this.amount > 0;
655
+ const appleMaxWidth = ribbonShown ? 270 : 220;
656
+ const nonAppleMaxWidth = ribbonShown ? 220 : 170;
657
+ const newHideIcons = buttonWidth < (this.isApplePaySupported() ? appleMaxWidth : nonAppleMaxWidth);
658
+ if (this.hideIcons !== newHideIcons) {
659
+ this.hideIcons = newHideIcons;
660
+ }
1953
661
  }
662
+ }
663
+ formatNumber(value) {
664
+ return Number(value.toFixed(2));
665
+ }
666
+ getNetAmount() {
667
+ var _a, _b, _c;
668
+ const netAmount = this.amount + ((_a = this.taxes) !== null && _a !== void 0 ? _a : 0) + ((_b = this.fees) !== null && _b !== void 0 ? _b : 0) - ((_c = this.discount) !== null && _c !== void 0 ? _c : 0);
669
+ return this.formatNumber(netAmount);
670
+ }
671
+ render() {
672
+ var _a, _b;
673
+ return [
674
+ h("div", null, h("link", { href: 'https://fonts.googleapis.com/css?family=Cairo', rel: 'stylesheet' }), this.paymentSuccessful ?
675
+ h("center", null, h("ion-text", null, this.t("Your Payment has been processed successfully!")), ",", h("div", { style: { width: '40px', height: '40px', margin: '10px' }, class: this.paymentSuccessful ? undefined : 'hidden' }, h("svg", { version: "1.1", id: "Capa_1", xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", viewBox: "0 0 50 50", style: { "enable-background": "new 0 0 50 50;" } }, h("circle", { style: { fill: "#25AE88" }, cx: "25", cy: "25", r: "25" }), h("polyline", { style: {
676
+ fill: 'none',
677
+ stroke: '#FFFFFF',
678
+ 'stroke-width': '2',
679
+ 'stroke-linecap': 'round',
680
+ 'stroke-linejoin': 'round',
681
+ 'stroke-miterlimit': '10'
682
+ }, points: "38,15 22,33 12,25" }))))
683
+ :
684
+ h("center", { hidden: !this.showButton }, h("amwal-installments-timeline", { "enable-installments": this.onlyShowBankInstallment, "installments-count": this.installmentsCount, locale: this.locale, amount: this.getNetAmount(), "timeline-style": this.timelineStyle, "footer-message": this.footerMessage }), h("ion-button", { class: `amwal-checkout-button`, color: "dark", onClick: () => this.handleCheckout(), disabled: this.disabled || this.internallyDisabled }, !this.hideIcons && this.showDiscountRibbon && this.discount > 0 && this.amount > 0 &&
685
+ h("div", { class: 'ribbon' }, h("span", { class: 'ribbon-text' }, this.t("OFF"), " ", h("br", null), this.formatNumber((this.discount / (this.amount + ((_a = this.taxes) !== null && _a !== void 0 ? _a : 0) + ((_b = this.fees) !== null && _b !== void 0 ? _b : 0))) * 100) + '%')), h("div", { class: 'payment-brand-class', slot: this.locale === 'ar' ? "start" : "end" }, h("div", null, this.isApplePaySupported() && h("img", { width: 63, src: applePayLogo }), h("img", { width: 60, src: cardLogo }))), this.locale === 'ar' && h("div", { class: "vl" }), h("div", { class: 'button-text' }, this.t(this.label), " "), this.locale === 'en' && h("div", { class: "vl" })))),
686
+ h("template", { id: "amwal-overlay-template" }, h("div", { class: "amwal-overlay", id: "amwal-overlay-id" }, h("div", { class: "amwal-overlay-container" }, h("span", { class: "amwal-overlay-close", onClick: () => { var _a; return (_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.close(); } }, "\u2715"), h("p", null, this.t("Don't see your checkout window?")), h("a", { role: "button", class: "amwal-overlay-button", onClick: () => {
687
+ if (this.checkBrowserType() === 'Safari' || !this.payWindow) {
688
+ this.openPopup();
689
+ }
690
+ else {
691
+ this.payWindow.focus();
692
+ }
693
+ } }, this.t("Click here")))))
694
+ ];
695
+ }
696
+ static get is() { return "amwal-checkout-button"; }
697
+ static get originalStyleUrls() {
698
+ return {
699
+ "$": ["amwal-checkout-button.css"]
700
+ };
701
+ }
702
+ static get styleUrls() {
703
+ return {
704
+ "$": ["amwal-checkout-button.css"]
705
+ };
706
+ }
707
+ static get properties() {
708
+ return {
709
+ "merchantId": {
710
+ "type": "string",
711
+ "mutable": false,
712
+ "complexType": {
713
+ "original": "string",
714
+ "resolved": "string",
715
+ "references": {}
716
+ },
717
+ "required": false,
718
+ "optional": false,
719
+ "docs": {
720
+ "tags": [],
721
+ "text": "merchantId is the key to use obtained from https://merchant.sa.amwal.tech"
722
+ },
723
+ "attribute": "merchant-id",
724
+ "reflect": false
725
+ },
726
+ "installmentOptionsUrl": {
727
+ "type": "string",
728
+ "mutable": false,
729
+ "complexType": {
730
+ "original": "string",
731
+ "resolved": "string",
732
+ "references": {}
733
+ },
734
+ "required": false,
735
+ "optional": false,
736
+ "docs": {
737
+ "tags": [],
738
+ "text": "The installment options url is URL for the checkout page in the merchant website"
739
+ },
740
+ "attribute": "installment-options-url",
741
+ "reflect": false
742
+ },
743
+ "amount": {
744
+ "type": "number",
745
+ "mutable": false,
746
+ "complexType": {
747
+ "original": "number",
748
+ "resolved": "number",
749
+ "references": {}
750
+ },
751
+ "required": false,
752
+ "optional": false,
753
+ "docs": {
754
+ "tags": [],
755
+ "text": "The amount of money to charge the customer"
756
+ },
757
+ "attribute": "amount",
758
+ "reflect": false
759
+ },
760
+ "countryCode": {
761
+ "type": "string",
762
+ "mutable": false,
763
+ "complexType": {
764
+ "original": "CountryCode",
765
+ "resolved": "\"AC\" | \"AD\" | \"AE\" | \"AF\" | \"AG\" | \"AI\" | \"AL\" | \"AM\" | \"AO\" | \"AR\" | \"AS\" | \"AT\" | \"AU\" | \"AW\" | \"AX\" | \"AZ\" | \"BA\" | \"BB\" | \"BD\" | \"BE\" | \"BF\" | \"BG\" | \"BH\" | \"BI\" | \"BJ\" | \"BL\" | \"BM\" | \"BN\" | \"BO\" | \"BQ\" | \"BR\" | \"BS\" | \"BT\" | \"BW\" | \"BY\" | \"BZ\" | \"CA\" | \"CC\" | \"CD\" | \"CF\" | \"CG\" | \"CH\" | \"CI\" | \"CK\" | \"CL\" | \"CM\" | \"CN\" | \"CO\" | \"CR\" | \"CU\" | \"CV\" | \"CW\" | \"CX\" | \"CY\" | \"CZ\" | \"DE\" | \"DJ\" | \"DK\" | \"DM\" | \"DO\" | \"DZ\" | \"EC\" | \"EE\" | \"EG\" | \"EH\" | \"ER\" | \"ES\" | \"ET\" | \"FI\" | \"FJ\" | \"FK\" | \"FM\" | \"FO\" | \"FR\" | \"GA\" | \"GB\" | \"GD\" | \"GE\" | \"GF\" | \"GG\" | \"GH\" | \"GI\" | \"GL\" | \"GM\" | \"GN\" | \"GP\" | \"GQ\" | \"GR\" | \"GT\" | \"GU\" | \"GW\" | \"GY\" | \"HK\" | \"HN\" | \"HR\" | \"HT\" | \"HU\" | \"ID\" | \"IE\" | \"IL\" | \"IM\" | \"IN\" | \"IO\" | \"IQ\" | \"IR\" | \"IS\" | \"IT\" | \"JE\" | \"JM\" | \"JO\" | \"JP\" | \"KE\" | \"KG\" | \"KH\" | \"KI\" | \"KM\" | \"KN\" | \"KP\" | \"KR\" | \"KW\" | \"KY\" | \"KZ\" | \"LA\" | \"LB\" | \"LC\" | \"LI\" | \"LK\" | \"LR\" | \"LS\" | \"LT\" | \"LU\" | \"LV\" | \"LY\" | \"MA\" | \"MC\" | \"MD\" | \"ME\" | \"MF\" | \"MG\" | \"MH\" | \"MK\" | \"ML\" | \"MM\" | \"MN\" | \"MO\" | \"MP\" | \"MQ\" | \"MR\" | \"MS\" | \"MT\" | \"MU\" | \"MV\" | \"MW\" | \"MX\" | \"MY\" | \"MZ\" | \"NA\" | \"NC\" | \"NE\" | \"NF\" | \"NG\" | \"NI\" | \"NL\" | \"NO\" | \"NP\" | \"NR\" | \"NU\" | \"NZ\" | \"OM\" | \"PA\" | \"PE\" | \"PF\" | \"PG\" | \"PH\" | \"PK\" | \"PL\" | \"PM\" | \"PR\" | \"PS\" | \"PT\" | \"PW\" | \"PY\" | \"QA\" | \"RE\" | \"RO\" | \"RS\" | \"RU\" | \"RW\" | \"SA\" | \"SB\" | \"SC\" | \"SD\" | \"SE\" | \"SG\" | \"SH\" | \"SI\" | \"SJ\" | \"SK\" | \"SL\" | \"SM\" | \"SN\" | \"SO\" | \"SR\" | \"SS\" | \"ST\" | \"SV\" | \"SX\" | \"SY\" | \"SZ\" | \"TA\" | \"TC\" | \"TD\" | \"TG\" | \"TH\" | \"TJ\" | \"TK\" | \"TL\" | \"TM\" | \"TN\" | \"TO\" | \"TR\" | \"TT\" | \"TV\" | \"TW\" | \"TZ\" | \"UA\" | \"UG\" | \"US\" | \"UY\" | \"UZ\" | \"VA\" | \"VC\" | \"VE\" | \"VG\" | \"VI\" | \"VN\" | \"VU\" | \"WF\" | \"WS\" | \"XK\" | \"YE\" | \"YT\" | \"ZA\" | \"ZM\" | \"ZW\"",
766
+ "references": {
767
+ "CountryCode": {
768
+ "location": "import",
769
+ "path": "libphonenumber-js"
770
+ }
771
+ }
772
+ },
773
+ "required": false,
774
+ "optional": false,
775
+ "docs": {
776
+ "tags": [],
777
+ "text": "The country code of the merchant (e.g. SA)"
778
+ },
779
+ "attribute": "country-code",
780
+ "reflect": false,
781
+ "defaultValue": "\"SA\""
782
+ },
783
+ "locale": {
784
+ "type": "string",
785
+ "mutable": false,
786
+ "complexType": {
787
+ "original": "string",
788
+ "resolved": "string",
789
+ "references": {}
790
+ },
791
+ "required": false,
792
+ "optional": true,
793
+ "docs": {
794
+ "tags": [],
795
+ "text": "the language of the plugin. supported languages are Arabic (\"ar\") and English (\"en\")"
796
+ },
797
+ "attribute": "locale",
798
+ "reflect": false,
799
+ "defaultValue": "\"en\""
800
+ },
801
+ "label": {
802
+ "type": "string",
803
+ "mutable": false,
804
+ "complexType": {
805
+ "original": "\"Quick Checkout\" | \"Bank Installments\" | \"Pay with Apple Pay\"",
806
+ "resolved": "\"Bank Installments\" | \"Pay with Apple Pay\" | \"Quick Checkout\"",
807
+ "references": {}
808
+ },
809
+ "required": false,
810
+ "optional": true,
811
+ "docs": {
812
+ "tags": [],
813
+ "text": "the label of the button. Either checkout for final checkout or quicky-buy for per product buy"
814
+ },
815
+ "attribute": "label",
816
+ "reflect": false,
817
+ "defaultValue": "\"Quick Checkout\""
818
+ },
819
+ "darkMode": {
820
+ "type": "string",
821
+ "mutable": false,
822
+ "complexType": {
823
+ "original": "\"on\" | \"off\" | \"auto\"",
824
+ "resolved": "\"auto\" | \"off\" | \"on\"",
825
+ "references": {}
826
+ },
827
+ "required": false,
828
+ "optional": true,
829
+ "docs": {
830
+ "tags": [],
831
+ "text": "Dark Mode:\n - on: turns on dark mode\n - off: turns on light mode\n - auto: use customer preference for dark mode"
832
+ },
833
+ "attribute": "dark-mode",
834
+ "reflect": false,
835
+ "defaultValue": "\"off\""
836
+ },
837
+ "disabled": {
838
+ "type": "boolean",
839
+ "mutable": false,
840
+ "complexType": {
841
+ "original": "boolean",
842
+ "resolved": "boolean",
843
+ "references": {}
844
+ },
845
+ "required": false,
846
+ "optional": true,
847
+ "docs": {
848
+ "tags": [],
849
+ "text": "disables the checkout button"
850
+ },
851
+ "attribute": "disabled",
852
+ "reflect": false,
853
+ "defaultValue": "false"
854
+ },
855
+ "addressRequired": {
856
+ "type": "boolean",
857
+ "mutable": false,
858
+ "complexType": {
859
+ "original": "boolean",
860
+ "resolved": "boolean",
861
+ "references": {}
862
+ },
863
+ "required": false,
864
+ "optional": true,
865
+ "docs": {
866
+ "tags": [],
867
+ "text": "addressRequired specifies if shipping address is required or not (\"true\" or \"false\")"
868
+ },
869
+ "attribute": "address-required",
870
+ "reflect": false,
871
+ "defaultValue": "true"
872
+ },
873
+ "showPaymentBrands": {
874
+ "type": "boolean",
875
+ "mutable": false,
876
+ "complexType": {
877
+ "original": "boolean",
878
+ "resolved": "boolean",
879
+ "references": {}
880
+ },
881
+ "required": false,
882
+ "optional": true,
883
+ "docs": {
884
+ "tags": [],
885
+ "text": "showPaymentBrands to show supporeted brands under button values are (\"true\" or \"false\")"
886
+ },
887
+ "attribute": "show-payment-brands",
888
+ "reflect": false,
889
+ "defaultValue": "false"
890
+ },
891
+ "showDiscountRibbon": {
892
+ "type": "boolean",
893
+ "mutable": false,
894
+ "complexType": {
895
+ "original": "boolean",
896
+ "resolved": "boolean",
897
+ "references": {}
898
+ },
899
+ "required": false,
900
+ "optional": true,
901
+ "docs": {
902
+ "tags": [],
903
+ "text": "showDiscountRibbon to show discount ribbon values are (\"true\" or \"false\")"
904
+ },
905
+ "attribute": "show-discount-ribbon",
906
+ "reflect": false,
907
+ "defaultValue": "false"
908
+ },
909
+ "initialAddress": {
910
+ "type": "unknown",
911
+ "mutable": false,
912
+ "complexType": {
913
+ "original": "IAddress",
914
+ "resolved": "IAddress",
915
+ "references": {
916
+ "IAddress": {
917
+ "location": "local",
918
+ "path": "/Users/fr3on/Downloads/amwal-checkout-qa/stencil-library/src/components/amwal-checkout-button/amwal-checkout-button.tsx"
919
+ }
920
+ }
921
+ },
922
+ "required": false,
923
+ "optional": true,
924
+ "docs": {
925
+ "tags": [],
926
+ "text": "initialAddress specifies a default address, Country field is country code (two letter ISO country code)"
927
+ }
928
+ },
929
+ "allowedAddressCountries": {
930
+ "type": "unknown",
931
+ "mutable": false,
932
+ "complexType": {
933
+ "original": "string[]",
934
+ "resolved": "string[]",
935
+ "references": {}
936
+ },
937
+ "required": false,
938
+ "optional": true,
939
+ "docs": {
940
+ "tags": [],
941
+ "text": "allowedAddressCountries specifies an array of allowed countries for the address"
942
+ }
943
+ },
944
+ "allowedAddressStates": {
945
+ "type": "unknown",
946
+ "mutable": false,
947
+ "complexType": {
948
+ "original": "{ [index: string]: StateSpecs }",
949
+ "resolved": "{ [index: string]: StateSpecs; }",
950
+ "references": {
951
+ "StateSpecs": {
952
+ "location": "local",
953
+ "path": "/Users/fr3on/Downloads/amwal-checkout-qa/stencil-library/src/components/amwal-checkout-button/amwal-checkout-button.tsx"
954
+ }
955
+ }
956
+ },
957
+ "required": false,
958
+ "optional": true,
959
+ "docs": {
960
+ "tags": [],
961
+ "text": "allowedAddressStates specifies an array of allowed states for the address example {\"SA\":{\"XX1\":\"State 1\",\"XX2\":\"State 2\"},\"US\":{\"US1\":\"State 1\",\"US2\":\"State 2\"}}"
962
+ }
963
+ },
964
+ "allowedAddressCities": {
965
+ "type": "unknown",
966
+ "mutable": false,
967
+ "complexType": {
968
+ "original": "{ [index: string]: CitySpecs }",
969
+ "resolved": "{ [index: string]: CitySpecs; }",
970
+ "references": {
971
+ "CitySpecs": {
972
+ "location": "local",
973
+ "path": "/Users/fr3on/Downloads/amwal-checkout-qa/stencil-library/src/components/amwal-checkout-button/amwal-checkout-button.tsx"
974
+ }
975
+ }
976
+ },
977
+ "required": false,
978
+ "optional": true,
979
+ "docs": {
980
+ "tags": [],
981
+ "text": "allowedAddressCities specifies an array of allowed states for the address example {\"SA\":{\"XX1\":[\"Riady\",\"Afif\"],\"XX2\":[\"Jeddah\",\"Makkah\"]},\"US\":{\"US1\":[\"San Jose\",\"San Francisco\"],\"US2\":[\"New york\"]}}"
982
+ }
983
+ },
984
+ "street2Required": {
985
+ "type": "boolean",
986
+ "mutable": false,
987
+ "complexType": {
988
+ "original": "boolean",
989
+ "resolved": "boolean",
990
+ "references": {}
991
+ },
992
+ "required": false,
993
+ "optional": true,
994
+ "docs": {
995
+ "tags": [],
996
+ "text": "street2Required specifies if street 2 is required or not (\"true\" or \"false\"). Can only be true if addressRequired is true."
997
+ },
998
+ "attribute": "street2-required",
999
+ "reflect": false,
1000
+ "defaultValue": "false"
1001
+ },
1002
+ "emailRequired": {
1003
+ "type": "boolean",
1004
+ "mutable": false,
1005
+ "complexType": {
1006
+ "original": "boolean",
1007
+ "resolved": "boolean",
1008
+ "references": {}
1009
+ },
1010
+ "required": false,
1011
+ "optional": true,
1012
+ "docs": {
1013
+ "tags": [],
1014
+ "text": "emailRequired specifies if email address is required or not (\"true\" or \"false\"). Can only be true if addressRequired is true."
1015
+ },
1016
+ "attribute": "email-required",
1017
+ "reflect": false,
1018
+ "defaultValue": "true"
1019
+ },
1020
+ "initialEmail": {
1021
+ "type": "string",
1022
+ "mutable": false,
1023
+ "complexType": {
1024
+ "original": "string",
1025
+ "resolved": "string",
1026
+ "references": {}
1027
+ },
1028
+ "required": false,
1029
+ "optional": true,
1030
+ "docs": {
1031
+ "tags": [],
1032
+ "text": "initialEmail specifies a default email"
1033
+ },
1034
+ "attribute": "initial-email",
1035
+ "reflect": false
1036
+ },
1037
+ "initialFirstName": {
1038
+ "type": "string",
1039
+ "mutable": false,
1040
+ "complexType": {
1041
+ "original": "string",
1042
+ "resolved": "string",
1043
+ "references": {}
1044
+ },
1045
+ "required": false,
1046
+ "optional": true,
1047
+ "docs": {
1048
+ "tags": [],
1049
+ "text": "initialFirstName specifies a default first name"
1050
+ },
1051
+ "attribute": "initial-first-name",
1052
+ "reflect": false
1053
+ },
1054
+ "initialLastName": {
1055
+ "type": "string",
1056
+ "mutable": false,
1057
+ "complexType": {
1058
+ "original": "string",
1059
+ "resolved": "string",
1060
+ "references": {}
1061
+ },
1062
+ "required": false,
1063
+ "optional": true,
1064
+ "docs": {
1065
+ "tags": [],
1066
+ "text": "initialLastName specifies a default last name"
1067
+ },
1068
+ "attribute": "initial-last-name",
1069
+ "reflect": false
1070
+ },
1071
+ "initialPhoneNumber": {
1072
+ "type": "string",
1073
+ "mutable": false,
1074
+ "complexType": {
1075
+ "original": "string",
1076
+ "resolved": "string",
1077
+ "references": {}
1078
+ },
1079
+ "required": false,
1080
+ "optional": true,
1081
+ "docs": {
1082
+ "tags": [],
1083
+ "text": "initialPhone specifies a default phone number"
1084
+ },
1085
+ "attribute": "initial-phone-number",
1086
+ "reflect": false
1087
+ },
1088
+ "addressHandshake": {
1089
+ "type": "boolean",
1090
+ "mutable": false,
1091
+ "complexType": {
1092
+ "original": "boolean",
1093
+ "resolved": "boolean",
1094
+ "references": {}
1095
+ },
1096
+ "required": false,
1097
+ "optional": true,
1098
+ "docs": {
1099
+ "tags": [],
1100
+ "text": "addressHandshake specifies if address event and ack is activated (\"true\" or \"false\")"
1101
+ },
1102
+ "attribute": "address-handshake",
1103
+ "reflect": false,
1104
+ "defaultValue": "false"
1105
+ },
1106
+ "enableDynamicShippingDetails": {
1107
+ "type": "boolean",
1108
+ "mutable": false,
1109
+ "complexType": {
1110
+ "original": "boolean",
1111
+ "resolved": "boolean",
1112
+ "references": {}
1113
+ },
1114
+ "required": false,
1115
+ "optional": true,
1116
+ "docs": {
1117
+ "tags": [],
1118
+ "text": "enableDynamicShippingDetails specifies if shipping countries, states and cities will load dynamically or prefilled in the parameters"
1119
+ },
1120
+ "attribute": "enable-dynamic-shipping-details",
1121
+ "reflect": false,
1122
+ "defaultValue": "false"
1123
+ },
1124
+ "sendExtraAddressFields": {
1125
+ "type": "boolean",
1126
+ "mutable": false,
1127
+ "complexType": {
1128
+ "original": "boolean",
1129
+ "resolved": "boolean",
1130
+ "references": {}
1131
+ },
1132
+ "required": false,
1133
+ "optional": true,
1134
+ "docs": {
1135
+ "tags": [],
1136
+ "text": "sendExtraAddressFields specifies if extra address fields are sent in amwalAddressUpdate event"
1137
+ },
1138
+ "attribute": "send-extra-address-fields",
1139
+ "reflect": false,
1140
+ "defaultValue": "false"
1141
+ },
1142
+ "shippingMethods": {
1143
+ "type": "unknown",
1144
+ "mutable": false,
1145
+ "complexType": {
1146
+ "original": "IShippingMethod[]",
1147
+ "resolved": "IShippingMethod[]",
1148
+ "references": {
1149
+ "IShippingMethod": {
1150
+ "location": "local",
1151
+ "path": "/Users/fr3on/Downloads/amwal-checkout-qa/stencil-library/src/components/amwal-checkout-button/amwal-checkout-button.tsx"
1152
+ }
1153
+ }
1154
+ },
1155
+ "required": false,
1156
+ "optional": true,
1157
+ "docs": {
1158
+ "tags": [],
1159
+ "text": "shippingMethods an array of shipping methods"
1160
+ },
1161
+ "defaultValue": "[]"
1162
+ },
1163
+ "taxes": {
1164
+ "type": "number",
1165
+ "mutable": false,
1166
+ "complexType": {
1167
+ "original": "number",
1168
+ "resolved": "number",
1169
+ "references": {}
1170
+ },
1171
+ "required": false,
1172
+ "optional": true,
1173
+ "docs": {
1174
+ "tags": [],
1175
+ "text": "taxes specifies any additional taxes"
1176
+ },
1177
+ "attribute": "taxes",
1178
+ "reflect": false,
1179
+ "defaultValue": "0"
1180
+ },
1181
+ "discount": {
1182
+ "type": "number",
1183
+ "mutable": false,
1184
+ "complexType": {
1185
+ "original": "number",
1186
+ "resolved": "number",
1187
+ "references": {}
1188
+ },
1189
+ "required": false,
1190
+ "optional": true,
1191
+ "docs": {
1192
+ "tags": [],
1193
+ "text": "discount specifies any discount to be applied"
1194
+ },
1195
+ "attribute": "discount",
1196
+ "reflect": false,
1197
+ "defaultValue": "0"
1198
+ },
1199
+ "discountDescription": {
1200
+ "type": "string",
1201
+ "mutable": false,
1202
+ "complexType": {
1203
+ "original": "string",
1204
+ "resolved": "string",
1205
+ "references": {}
1206
+ },
1207
+ "required": false,
1208
+ "optional": true,
1209
+ "docs": {
1210
+ "tags": [],
1211
+ "text": "discountDescription provides description for the discount"
1212
+ },
1213
+ "attribute": "discount-description",
1214
+ "reflect": false
1215
+ },
1216
+ "fees": {
1217
+ "type": "number",
1218
+ "mutable": false,
1219
+ "complexType": {
1220
+ "original": "number",
1221
+ "resolved": "number",
1222
+ "references": {}
1223
+ },
1224
+ "required": false,
1225
+ "optional": true,
1226
+ "docs": {
1227
+ "tags": [],
1228
+ "text": "fees specifies any fees to be applied"
1229
+ },
1230
+ "attribute": "fees",
1231
+ "reflect": false,
1232
+ "defaultValue": "0"
1233
+ },
1234
+ "feesDescription": {
1235
+ "type": "string",
1236
+ "mutable": false,
1237
+ "complexType": {
1238
+ "original": "string",
1239
+ "resolved": "string",
1240
+ "references": {}
1241
+ },
1242
+ "required": false,
1243
+ "optional": true,
1244
+ "docs": {
1245
+ "tags": [],
1246
+ "text": "feesDescription provides description for the fees"
1247
+ },
1248
+ "attribute": "fees-description",
1249
+ "reflect": false
1250
+ },
1251
+ "refId": {
1252
+ "type": "string",
1253
+ "mutable": false,
1254
+ "complexType": {
1255
+ "original": "string",
1256
+ "resolved": "string",
1257
+ "references": {}
1258
+ },
1259
+ "required": false,
1260
+ "optional": true,
1261
+ "docs": {
1262
+ "tags": [],
1263
+ "text": "refId an identifier to be included in the payment transaction"
1264
+ },
1265
+ "attribute": "ref-id",
1266
+ "reflect": false
1267
+ },
1268
+ "uniqueRef": {
1269
+ "type": "boolean",
1270
+ "mutable": false,
1271
+ "complexType": {
1272
+ "original": "boolean",
1273
+ "resolved": "boolean",
1274
+ "references": {}
1275
+ },
1276
+ "required": false,
1277
+ "optional": true,
1278
+ "docs": {
1279
+ "tags": [],
1280
+ "text": "uniqueRef a boolean to enforce the uniqueness of refId"
1281
+ },
1282
+ "attribute": "unique-ref",
1283
+ "reflect": false,
1284
+ "defaultValue": "false"
1285
+ },
1286
+ "onlyShowBankInstallment": {
1287
+ "type": "boolean",
1288
+ "mutable": false,
1289
+ "complexType": {
1290
+ "original": "boolean",
1291
+ "resolved": "boolean",
1292
+ "references": {}
1293
+ },
1294
+ "required": false,
1295
+ "optional": true,
1296
+ "docs": {
1297
+ "tags": [],
1298
+ "text": "onlyShowBankInstallment specifies if only bank installments should be shown"
1299
+ },
1300
+ "attribute": "only-show-bank-installment",
1301
+ "reflect": false,
1302
+ "defaultValue": "false"
1303
+ },
1304
+ "enableAppleCheckout": {
1305
+ "type": "boolean",
1306
+ "mutable": false,
1307
+ "complexType": {
1308
+ "original": "boolean",
1309
+ "resolved": "boolean",
1310
+ "references": {}
1311
+ },
1312
+ "required": false,
1313
+ "optional": true,
1314
+ "docs": {
1315
+ "tags": [],
1316
+ "text": "enableAppleCheckout specifies if Apple Checkout is enabled"
1317
+ },
1318
+ "attribute": "enable-apple-checkout",
1319
+ "reflect": false,
1320
+ "defaultValue": "false"
1321
+ },
1322
+ "apiUrl": {
1323
+ "type": "string",
1324
+ "mutable": false,
1325
+ "complexType": {
1326
+ "original": "string",
1327
+ "resolved": "string",
1328
+ "references": {}
1329
+ },
1330
+ "required": false,
1331
+ "optional": true,
1332
+ "docs": {
1333
+ "tags": [],
1334
+ "text": "Custom api URL (optional). If not provided, uses process.env.BACKEND_URL\nExample: 'https://qa.amwal.dev'"
1335
+ },
1336
+ "attribute": "api-url",
1337
+ "reflect": false
1338
+ },
1339
+ "payUrl": {
1340
+ "type": "string",
1341
+ "mutable": false,
1342
+ "complexType": {
1343
+ "original": "string",
1344
+ "resolved": "string",
1345
+ "references": {}
1346
+ },
1347
+ "required": false,
1348
+ "optional": true,
1349
+ "docs": {
1350
+ "tags": [],
1351
+ "text": "Custom payment page URL (optional). If not provided, uses process.env.PAY_URL\nExample: 'https://pay.amwal.dev'"
1352
+ },
1353
+ "attribute": "pay-url",
1354
+ "reflect": false
1355
+ },
1356
+ "debug": {
1357
+ "type": "boolean",
1358
+ "mutable": false,
1359
+ "complexType": {
1360
+ "original": "boolean",
1361
+ "resolved": "boolean",
1362
+ "references": {}
1363
+ },
1364
+ "required": false,
1365
+ "optional": true,
1366
+ "docs": {
1367
+ "tags": [],
1368
+ "text": "debug flag for verbose printing of debug messages"
1369
+ },
1370
+ "attribute": "debug",
1371
+ "reflect": false,
1372
+ "defaultValue": "false"
1373
+ },
1374
+ "showContinueShoppingButton": {
1375
+ "type": "boolean",
1376
+ "mutable": false,
1377
+ "complexType": {
1378
+ "original": "boolean",
1379
+ "resolved": "boolean",
1380
+ "references": {}
1381
+ },
1382
+ "required": false,
1383
+ "optional": true,
1384
+ "docs": {
1385
+ "tags": [],
1386
+ "text": "debug flag for verbose printing of debug messages"
1387
+ },
1388
+ "attribute": "show-continue-shopping-button",
1389
+ "reflect": false,
1390
+ "defaultValue": "false"
1391
+ },
1392
+ "enablePrePayTrigger": {
1393
+ "type": "boolean",
1394
+ "mutable": false,
1395
+ "complexType": {
1396
+ "original": "boolean",
1397
+ "resolved": "boolean",
1398
+ "references": {}
1399
+ },
1400
+ "required": false,
1401
+ "optional": true,
1402
+ "docs": {
1403
+ "tags": [],
1404
+ "text": "enable triggering a pre pay event to do final task such as order creation"
1405
+ },
1406
+ "attribute": "enable-pre-pay-trigger",
1407
+ "reflect": false,
1408
+ "defaultValue": "false"
1409
+ },
1410
+ "enablePreCheckoutTrigger": {
1411
+ "type": "boolean",
1412
+ "mutable": false,
1413
+ "complexType": {
1414
+ "original": "boolean",
1415
+ "resolved": "boolean",
1416
+ "references": {}
1417
+ },
1418
+ "required": false,
1419
+ "optional": true,
1420
+ "docs": {
1421
+ "tags": [],
1422
+ "text": "enable triggering a pre checkout click event to do initial tasks such as adding items to carts"
1423
+ },
1424
+ "attribute": "enable-pre-checkout-trigger",
1425
+ "reflect": false,
1426
+ "defaultValue": "false"
1427
+ },
1428
+ "postcodeOptionalCountries": {
1429
+ "type": "unknown",
1430
+ "mutable": false,
1431
+ "complexType": {
1432
+ "original": "string[]",
1433
+ "resolved": "string[]",
1434
+ "references": {}
1435
+ },
1436
+ "required": false,
1437
+ "optional": true,
1438
+ "docs": {
1439
+ "tags": [],
1440
+ "text": "enable postal code required option"
1441
+ }
1442
+ },
1443
+ "installmentsCount": {
1444
+ "type": "number",
1445
+ "mutable": false,
1446
+ "complexType": {
1447
+ "original": "number",
1448
+ "resolved": "number",
1449
+ "references": {}
1450
+ },
1451
+ "required": false,
1452
+ "optional": false,
1453
+ "docs": {
1454
+ "tags": [],
1455
+ "text": "Number of installments"
1456
+ },
1457
+ "attribute": "installments-count",
1458
+ "reflect": false,
1459
+ "defaultValue": "6"
1460
+ },
1461
+ "timelineStyle": {
1462
+ "type": "string",
1463
+ "mutable": false,
1464
+ "complexType": {
1465
+ "original": "'default' | 'simple'",
1466
+ "resolved": "\"default\" | \"simple\"",
1467
+ "references": {}
1468
+ },
1469
+ "required": false,
1470
+ "optional": false,
1471
+ "docs": {
1472
+ "tags": [],
1473
+ "text": "* timelineStyle specifies the style of the timeline in the checkout modal."
1474
+ },
1475
+ "attribute": "timeline-style",
1476
+ "reflect": false,
1477
+ "defaultValue": "'default'"
1478
+ },
1479
+ "footerMessage": {
1480
+ "type": "string",
1481
+ "mutable": false,
1482
+ "complexType": {
1483
+ "original": "string",
1484
+ "resolved": "string",
1485
+ "references": {}
1486
+ },
1487
+ "required": false,
1488
+ "optional": false,
1489
+ "docs": {
1490
+ "tags": [],
1491
+ "text": "* timelineFooterText specifies the text to be displayed in the footer of the timeline in the checkout modal."
1492
+ },
1493
+ "attribute": "footer-message",
1494
+ "reflect": false,
1495
+ "defaultValue": "''"
1496
+ }
1497
+ };
1498
+ }
1499
+ static get states() {
1500
+ return {
1501
+ "hideIcons": {},
1502
+ "result": {},
1503
+ "paymentSuccessful": {},
1504
+ "orderId": {},
1505
+ "dark": {},
1506
+ "internallyDisabled": {}
1507
+ };
1508
+ }
1509
+ static get events() {
1510
+ return [{
1511
+ "method": "amwalCheckoutSuccess",
1512
+ "name": "amwalCheckoutSuccess",
1513
+ "bubbles": true,
1514
+ "cancelable": true,
1515
+ "composed": true,
1516
+ "docs": {
1517
+ "tags": [],
1518
+ "text": "amwalCheckoutSuccess is a dom event fired on success of payment. the event has orderId field which can be used\nto lookup transaction status at https://backend.sa.amwal.tech"
1519
+ },
1520
+ "complexType": {
1521
+ "original": "AmwalCheckoutStatus",
1522
+ "resolved": "AmwalCheckoutStatus",
1523
+ "references": {
1524
+ "AmwalCheckoutStatus": {
1525
+ "location": "local",
1526
+ "path": "/Users/fr3on/Downloads/amwal-checkout-qa/stencil-library/src/components/amwal-checkout-button/amwal-checkout-button.tsx"
1527
+ }
1528
+ }
1529
+ }
1530
+ }, {
1531
+ "method": "updateOrderOnPaymentsuccess",
1532
+ "name": "updateOrderOnPaymentsuccess",
1533
+ "bubbles": true,
1534
+ "cancelable": true,
1535
+ "composed": true,
1536
+ "docs": {
1537
+ "tags": [],
1538
+ "text": "updateOrderOnPaymentsuccess is a dom event fired on success of payment. the event has orderId field which can be used\nto lookup transaction status at https://backend.sa.amwal.tech"
1539
+ },
1540
+ "complexType": {
1541
+ "original": "AmwalCheckoutStatus",
1542
+ "resolved": "AmwalCheckoutStatus",
1543
+ "references": {
1544
+ "AmwalCheckoutStatus": {
1545
+ "location": "local",
1546
+ "path": "/Users/fr3on/Downloads/amwal-checkout-qa/stencil-library/src/components/amwal-checkout-button/amwal-checkout-button.tsx"
1547
+ }
1548
+ }
1549
+ }
1550
+ }, {
1551
+ "method": "amwalDismissed",
1552
+ "name": "amwalDismissed",
1553
+ "bubbles": true,
1554
+ "cancelable": true,
1555
+ "composed": true,
1556
+ "docs": {
1557
+ "tags": [],
1558
+ "text": "amwalDismissed is a dom event fired when the amwal modal or popup window is dismissed, event.detail indicates if it's successfull or not (boolean)"
1559
+ },
1560
+ "complexType": {
1561
+ "original": "AmwalDismissalStatus",
1562
+ "resolved": "AmwalDismissalStatus",
1563
+ "references": {
1564
+ "AmwalDismissalStatus": {
1565
+ "location": "local",
1566
+ "path": "/Users/fr3on/Downloads/amwal-checkout-qa/stencil-library/src/components/amwal-checkout-button/amwal-checkout-button.tsx"
1567
+ }
1568
+ }
1569
+ }
1570
+ }, {
1571
+ "method": "amwalAddressUpdate",
1572
+ "name": "amwalAddressUpdate",
1573
+ "bubbles": true,
1574
+ "cancelable": true,
1575
+ "composed": true,
1576
+ "docs": {
1577
+ "tags": [],
1578
+ "text": "amwalAddressUpdate is a dom event fired on address selection."
1579
+ },
1580
+ "complexType": {
1581
+ "original": "IAddress",
1582
+ "resolved": "IAddress",
1583
+ "references": {
1584
+ "IAddress": {
1585
+ "location": "local",
1586
+ "path": "/Users/fr3on/Downloads/amwal-checkout-qa/stencil-library/src/components/amwal-checkout-button/amwal-checkout-button.tsx"
1587
+ }
1588
+ }
1589
+ }
1590
+ }, {
1591
+ "method": "amwalAddressCountryUpdate",
1592
+ "name": "amwalAddressCountryUpdate",
1593
+ "bubbles": true,
1594
+ "cancelable": true,
1595
+ "composed": true,
1596
+ "docs": {
1597
+ "tags": [],
1598
+ "text": "amwalAddressCountryUpdate is a dom event fired on address country selection."
1599
+ },
1600
+ "complexType": {
1601
+ "original": "ICountry",
1602
+ "resolved": "ICountry",
1603
+ "references": {
1604
+ "ICountry": {
1605
+ "location": "local",
1606
+ "path": "/Users/fr3on/Downloads/amwal-checkout-qa/stencil-library/src/components/amwal-checkout-button/amwal-checkout-button.tsx"
1607
+ }
1608
+ }
1609
+ }
1610
+ }, {
1611
+ "method": "amwalAddressStateUpdate",
1612
+ "name": "amwalAddressStateUpdate",
1613
+ "bubbles": true,
1614
+ "cancelable": true,
1615
+ "composed": true,
1616
+ "docs": {
1617
+ "tags": [],
1618
+ "text": "amwalAddressStateUpdate is a dom event fired on address country selection."
1619
+ },
1620
+ "complexType": {
1621
+ "original": "IState",
1622
+ "resolved": "IState",
1623
+ "references": {
1624
+ "IState": {
1625
+ "location": "local",
1626
+ "path": "/Users/fr3on/Downloads/amwal-checkout-qa/stencil-library/src/components/amwal-checkout-button/amwal-checkout-button.tsx"
1627
+ }
1628
+ }
1629
+ }
1630
+ }, {
1631
+ "method": "amwalPrePayTrigger",
1632
+ "name": "amwalPrePayTrigger",
1633
+ "bubbles": true,
1634
+ "cancelable": true,
1635
+ "composed": true,
1636
+ "docs": {
1637
+ "tags": [],
1638
+ "text": "amwalPrePayTrigger is a dom event fired once payment button is clicked before payment is processed. It is\nenabled if enablePrePayTrigger is set. It waits for either amwalPrePayTriggerAck or amwalPrePayTriggerError\nevents to be sent back before proceeding to payment or aborting respectively."
1639
+ },
1640
+ "complexType": {
1641
+ "original": "ITransactionDetails",
1642
+ "resolved": "ITransactionDetails",
1643
+ "references": {
1644
+ "ITransactionDetails": {
1645
+ "location": "local",
1646
+ "path": "/Users/fr3on/Downloads/amwal-checkout-qa/stencil-library/src/components/amwal-checkout-button/amwal-checkout-button.tsx"
1647
+ }
1648
+ }
1649
+ }
1650
+ }, {
1651
+ "method": "amwalPreCheckoutTrigger",
1652
+ "name": "amwalPreCheckoutTrigger",
1653
+ "bubbles": true,
1654
+ "cancelable": true,
1655
+ "composed": true,
1656
+ "docs": {
1657
+ "tags": [],
1658
+ "text": "amwalPreCheckoutTrigger is a dom event fired once amwal checkout button is clicked before a transaction is created. It is\nenabled if enablePreCheckoutTrigger is set. It waits for either amwalPreCheckoutTriggerAck or amwalPreCheckoutTriggerError\nevents to be sent back before proceeding with the normal checkout flow."
1659
+ },
1660
+ "complexType": {
1661
+ "original": "ITransactionDetails",
1662
+ "resolved": "ITransactionDetails",
1663
+ "references": {
1664
+ "ITransactionDetails": {
1665
+ "location": "local",
1666
+ "path": "/Users/fr3on/Downloads/amwal-checkout-qa/stencil-library/src/components/amwal-checkout-button/amwal-checkout-button.tsx"
1667
+ }
1668
+ }
1669
+ }
1670
+ }];
1671
+ }
1672
+ static get methods() {
1673
+ return {
1674
+ "dismissModal": {
1675
+ "complexType": {
1676
+ "signature": "() => Promise<void>",
1677
+ "parameters": [],
1678
+ "references": {
1679
+ "Promise": {
1680
+ "location": "global"
1681
+ }
1682
+ },
1683
+ "return": "Promise<void>"
1684
+ },
1685
+ "docs": {
1686
+ "text": "",
1687
+ "tags": []
1688
+ }
1689
+ }
1690
+ };
1691
+ }
1692
+ static get elementRef() { return "el"; }
1693
+ static get watchers() {
1694
+ return [{
1695
+ "propName": "shippingMethods",
1696
+ "methodName": "parseMyArrayProp"
1697
+ }, {
1698
+ "propName": "initialAddress",
1699
+ "methodName": "parseInitiaalAddressProp"
1700
+ }, {
1701
+ "propName": "allowedAddressCountries",
1702
+ "methodName": "parseAllowedAddressCountries"
1703
+ }, {
1704
+ "propName": "postcodeOptionalCountries",
1705
+ "methodName": "parsepostcodeOptionalCountries"
1706
+ }, {
1707
+ "propName": "allowedAddressStates",
1708
+ "methodName": "parseAllowedAddressStates"
1709
+ }, {
1710
+ "propName": "allowedAddressCities",
1711
+ "methodName": "parseAllowedAddressCities"
1712
+ }, {
1713
+ "propName": "locale",
1714
+ "methodName": "updateLocale"
1715
+ }, {
1716
+ "propName": "discount",
1717
+ "methodName": "validateDiscount"
1718
+ }, {
1719
+ "propName": "fees",
1720
+ "methodName": "validateFees"
1721
+ }];
1722
+ }
1723
+ static get listeners() {
1724
+ return [{
1725
+ "name": "amwalPreCheckoutTriggerAck",
1726
+ "method": "prePayCheckoutAckHandler",
1727
+ "target": undefined,
1728
+ "capture": false,
1729
+ "passive": false
1730
+ }, {
1731
+ "name": "amwalPreCheckoutTriggerError",
1732
+ "method": "prePayCheckoutErrorHandler",
1733
+ "target": undefined,
1734
+ "capture": false,
1735
+ "passive": false
1736
+ }, {
1737
+ "name": "amwalPrePayTriggerAck",
1738
+ "method": "prePayTriggerAckHandler",
1739
+ "target": undefined,
1740
+ "capture": false,
1741
+ "passive": false
1742
+ }, {
1743
+ "name": "amwalPrePayTriggerError",
1744
+ "method": "prePayTriggerErrorHandler",
1745
+ "target": undefined,
1746
+ "capture": false,
1747
+ "passive": false
1748
+ }, {
1749
+ "name": "message",
1750
+ "method": "payWindowMessageHandler",
1751
+ "target": "window",
1752
+ "capture": false,
1753
+ "passive": false
1754
+ }, {
1755
+ "name": "amwalAddressAck",
1756
+ "method": "addressAckHandler",
1757
+ "target": undefined,
1758
+ "capture": false,
1759
+ "passive": false
1760
+ }, {
1761
+ "name": "amwalAddressTriggerError",
1762
+ "method": "addressTriggerErrorHandler",
1763
+ "target": undefined,
1764
+ "capture": false,
1765
+ "passive": false
1766
+ }, {
1767
+ "name": "amwalAddressCountryAck",
1768
+ "method": "addressCountryAckHandler",
1769
+ "target": undefined,
1770
+ "capture": false,
1771
+ "passive": false
1772
+ }, {
1773
+ "name": "amwalAddressStateAck",
1774
+ "method": "addressStateAckHandler",
1775
+ "target": undefined,
1776
+ "capture": false,
1777
+ "passive": false
1778
+ }];
1779
+ }
1954
1780
  }