@paydock/client-sdk 1.106.1 → 1.107.0-beta

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 (490) hide show
  1. package/README.md +194 -162
  2. package/bundles/index.cjs +10483 -0
  3. package/bundles/index.cjs.d.ts +3206 -0
  4. package/bundles/index.cjs.map +1 -0
  5. package/bundles/index.mjs +10451 -0
  6. package/bundles/index.mjs.d.ts +3206 -0
  7. package/bundles/index.mjs.map +1 -0
  8. package/{lib → bundles/types}/api/api-base.d.ts +2 -1
  9. package/bundles/types/api/api-base.d.ts.map +1 -0
  10. package/{lib → bundles/types}/api/api-charge-internal.d.ts +1 -0
  11. package/bundles/types/api/api-charge-internal.d.ts.map +1 -0
  12. package/{lib → bundles/types}/api/api-charge.d.ts +1 -0
  13. package/bundles/types/api/api-charge.d.ts.map +1 -0
  14. package/{lib → bundles/types}/api/api-internal.d.ts +1 -0
  15. package/bundles/types/api/api-internal.d.ts.map +1 -0
  16. package/{lib → bundles/types}/api/api-service-internal.d.ts +2 -1
  17. package/bundles/types/api/api-service-internal.d.ts.map +1 -0
  18. package/{lib → bundles/types}/api/api.d.ts +1 -0
  19. package/bundles/types/api/api.d.ts.map +1 -0
  20. package/bundles/types/api/index.d.ts +2 -0
  21. package/bundles/types/api/index.d.ts.map +1 -0
  22. package/{lib → bundles/types}/canvas-3ds/canvas-3ds.d.ts +1 -0
  23. package/bundles/types/canvas-3ds/canvas-3ds.d.ts.map +1 -0
  24. package/{lib → bundles/types}/canvas-3ds/index.d.ts +1 -0
  25. package/bundles/types/canvas-3ds/index.d.ts.map +1 -0
  26. package/{lib → bundles/types}/canvas-3ds/services/gpayments-service.d.ts +1 -0
  27. package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +1 -0
  28. package/{lib → bundles/types}/canvas-3ds/services/index.d.ts +1 -0
  29. package/bundles/types/canvas-3ds/services/index.d.ts.map +1 -0
  30. package/{lib → bundles/types}/canvas-3ds/services/standalone3ds-service.d.ts +1 -0
  31. package/bundles/types/canvas-3ds/services/standalone3ds-service.d.ts.map +1 -0
  32. package/{lib → bundles/types}/checkout-button/afterpay/afterpay-checkout-button.d.ts +1 -0
  33. package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts.map +1 -0
  34. package/{lib → bundles/types}/checkout-button/afterpay/afterpay.runner.d.ts +1 -0
  35. package/bundles/types/checkout-button/afterpay/afterpay.runner.d.ts.map +1 -0
  36. package/{lib → bundles/types}/checkout-button/checkout-button.d.ts +1 -0
  37. package/bundles/types/checkout-button/checkout-button.d.ts.map +1 -0
  38. package/{lib → bundles/types}/checkout-button/checkout-button.interface.d.ts +1 -0
  39. package/bundles/types/checkout-button/checkout-button.interface.d.ts.map +1 -0
  40. package/{lib → bundles/types}/checkout-button/checkout-contextual-handler.d.ts +1 -0
  41. package/bundles/types/checkout-button/checkout-contextual-handler.d.ts.map +1 -0
  42. package/{lib → bundles/types}/checkout-button/index.d.ts +2 -1
  43. package/bundles/types/checkout-button/index.d.ts.map +1 -0
  44. package/{lib → bundles/types}/checkout-button/paypal/paypal-checkout-button.d.ts +1 -0
  45. package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts.map +1 -0
  46. package/{lib → bundles/types}/checkout-button/paypal/paypal.runner.d.ts +1 -0
  47. package/bundles/types/checkout-button/paypal/paypal.runner.d.ts.map +1 -0
  48. package/{lib → bundles/types}/checkout-button/runner/base.runner.d.ts +4 -3
  49. package/bundles/types/checkout-button/runner/base.runner.d.ts.map +1 -0
  50. package/{lib → bundles/types}/checkout-button/runner/contextual.runner.d.ts +2 -1
  51. package/bundles/types/checkout-button/runner/contextual.runner.d.ts.map +1 -0
  52. package/{lib → bundles/types}/checkout-button/runner/index.d.ts +1 -0
  53. package/bundles/types/checkout-button/runner/index.d.ts.map +1 -0
  54. package/{lib → bundles/types}/checkout-button/runner/popup.runner.d.ts +2 -1
  55. package/bundles/types/checkout-button/runner/popup.runner.d.ts.map +1 -0
  56. package/{lib → bundles/types}/checkout-button/runner/redirect.runner.d.ts +2 -1
  57. package/bundles/types/checkout-button/runner/redirect.runner.d.ts.map +1 -0
  58. package/bundles/types/checkout-button/zipmoney/index.d.ts +4 -0
  59. package/bundles/types/checkout-button/zipmoney/index.d.ts.map +1 -0
  60. package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney-checkout-button.d.ts +1 -0
  61. package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts.map +1 -0
  62. package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts +2 -1
  63. package/bundles/types/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts.map +1 -0
  64. package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts +2 -1
  65. package/bundles/types/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts.map +1 -0
  66. package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney.config.d.ts +1 -0
  67. package/bundles/types/checkout-button/zipmoney/zipmoney.config.d.ts.map +1 -0
  68. package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney.runner.d.ts +2 -1
  69. package/bundles/types/checkout-button/zipmoney/zipmoney.runner.d.ts.map +1 -0
  70. package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney.types.d.ts +1 -0
  71. package/bundles/types/checkout-button/zipmoney/zipmoney.types.d.ts.map +1 -0
  72. package/{lib → bundles/types}/components/ability-guard.d.ts +1 -0
  73. package/bundles/types/components/ability-guard.d.ts.map +1 -0
  74. package/{lib → bundles/types}/components/background.d.ts +1 -0
  75. package/bundles/types/components/background.d.ts.map +1 -0
  76. package/{lib → bundles/types}/components/container.d.ts +1 -0
  77. package/bundles/types/components/container.d.ts.map +1 -0
  78. package/{lib → bundles/types}/components/dispatcher.d.ts +2 -1
  79. package/bundles/types/components/dispatcher.d.ts.map +1 -0
  80. package/{lib → bundles/types}/components/element-style.d.ts +2 -1
  81. package/bundles/types/components/element-style.d.ts.map +1 -0
  82. package/{lib → bundles/types}/components/flypay-iframe-event.d.ts +1 -0
  83. package/bundles/types/components/flypay-iframe-event.d.ts.map +1 -0
  84. package/{lib/components/form-Interceptor.d.ts → bundles/types/components/form-interceptor.d.ts} +1 -0
  85. package/bundles/types/components/form-interceptor.d.ts.map +1 -0
  86. package/{lib → bundles/types}/components/http-core.d.ts +1 -0
  87. package/bundles/types/components/http-core.d.ts.map +1 -0
  88. package/{lib → bundles/types}/components/iframe-event.d.ts +2 -0
  89. package/bundles/types/components/iframe-event.d.ts.map +1 -0
  90. package/{lib → bundles/types}/components/iframe.d.ts +1 -0
  91. package/bundles/types/components/iframe.d.ts.map +1 -0
  92. package/{lib → bundles/types}/components/link.d.ts +2 -1
  93. package/bundles/types/components/link.d.ts.map +1 -0
  94. package/{lib → bundles/types}/components/loader.d.ts +1 -0
  95. package/bundles/types/components/loader.d.ts.map +1 -0
  96. package/{lib → bundles/types}/components/param.d.ts +8 -7
  97. package/bundles/types/components/param.d.ts.map +1 -0
  98. package/{lib → bundles/types}/components/popup.d.ts +1 -0
  99. package/bundles/types/components/popup.d.ts.map +1 -0
  100. package/{lib → bundles/types}/components/storage-dispatcher.d.ts +1 -0
  101. package/bundles/types/components/storage-dispatcher.d.ts.map +1 -0
  102. package/{lib → bundles/types}/components/trigger.d.ts +1 -0
  103. package/bundles/types/components/trigger.d.ts.map +1 -0
  104. package/{lib → bundles/types}/components/vault-display-iframe-event.d.ts +1 -0
  105. package/bundles/types/components/vault-display-iframe-event.d.ts.map +1 -0
  106. package/{lib → bundles/types}/components/wallet-background.d.ts +3 -1
  107. package/bundles/types/components/wallet-background.d.ts.map +1 -0
  108. package/{lib → bundles/types}/components/wallet-trigger.d.ts +1 -0
  109. package/bundles/types/components/wallet-trigger.d.ts.map +1 -0
  110. package/bundles/types/configs/env/environment.cba.d.ts +29 -0
  111. package/bundles/types/configs/env/environment.cba.d.ts.map +1 -0
  112. package/bundles/types/configs/env/environment.interface.d.ts +12 -0
  113. package/bundles/types/configs/env/environment.interface.d.ts.map +1 -0
  114. package/{lib/configs/env/env.d.ts → bundles/types/configs/env/environment.paydock.d.ts} +5 -8
  115. package/bundles/types/configs/env/environment.paydock.d.ts.map +1 -0
  116. package/bundles/types/configs/env/index.d.ts +3 -0
  117. package/bundles/types/configs/env/index.d.ts.map +1 -0
  118. package/{lib → bundles/types}/configs/sdk.d.ts +3 -2
  119. package/bundles/types/configs/sdk.d.ts.map +1 -0
  120. package/{lib → bundles/types}/constants/validators.d.ts +3 -2
  121. package/bundles/types/constants/validators.d.ts.map +1 -0
  122. package/{lib → bundles/types}/external-checkout/builder.d.ts +1 -0
  123. package/bundles/types/external-checkout/builder.d.ts.map +1 -0
  124. package/{lib → bundles/types}/external-checkout/checker.d.ts +1 -0
  125. package/bundles/types/external-checkout/checker.d.ts.map +1 -0
  126. package/bundles/types/external-checkout/index.d.ts +3 -0
  127. package/bundles/types/external-checkout/index.d.ts.map +1 -0
  128. package/{lib → bundles/types}/helper/access-token.d.ts +1 -0
  129. package/bundles/types/helper/access-token.d.ts.map +1 -0
  130. package/{lib → bundles/types}/helper/browser.d.ts +1 -0
  131. package/bundles/types/helper/browser.d.ts.map +1 -0
  132. package/bundles/types/helper/element-id.d.ts +5 -0
  133. package/bundles/types/helper/element-id.d.ts.map +1 -0
  134. package/{lib → bundles/types}/helper/event-emitter.d.ts +1 -0
  135. package/bundles/types/helper/event-emitter.d.ts.map +1 -0
  136. package/{lib → bundles/types}/helper/event.d.ts +1 -0
  137. package/bundles/types/helper/event.d.ts.map +1 -0
  138. package/{lib → bundles/types}/helper/ms.d.ts +1 -0
  139. package/bundles/types/helper/ms.d.ts.map +1 -0
  140. package/{lib → bundles/types}/helper/object.d.ts +1 -0
  141. package/bundles/types/helper/object.d.ts.map +1 -0
  142. package/{lib → bundles/types}/helper/url.d.ts +1 -0
  143. package/bundles/types/helper/url.d.ts.map +1 -0
  144. package/{lib → bundles/types}/helper/uuid.d.ts +1 -0
  145. package/bundles/types/helper/uuid.d.ts.map +1 -0
  146. package/bundles/types/index-cba.d.ts +13 -0
  147. package/bundles/types/index-cba.d.ts.map +1 -0
  148. package/bundles/types/index.d.ts +14 -0
  149. package/bundles/types/index.d.ts.map +1 -0
  150. package/{lib → bundles/types}/payment-source/builder.d.ts +1 -0
  151. package/bundles/types/payment-source/builder.d.ts.map +1 -0
  152. package/{lib → bundles/types}/payment-source/index.d.ts +1 -0
  153. package/bundles/types/payment-source/index.d.ts.map +1 -0
  154. package/{lib → bundles/types}/payment-source-widget/html-payment-source-widget.d.ts +1 -0
  155. package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts.map +1 -0
  156. package/{lib → bundles/types}/payment-source-widget/index.d.ts +1 -0
  157. package/bundles/types/payment-source-widget/index.d.ts.map +1 -0
  158. package/{lib → bundles/types}/payment-source-widget/interfaces.d.ts +1 -0
  159. package/bundles/types/payment-source-widget/interfaces.d.ts.map +1 -0
  160. package/{lib → bundles/types}/payment-source-widget/payment-source-widget.d.ts +1 -0
  161. package/bundles/types/payment-source-widget/payment-source-widget.d.ts.map +1 -0
  162. package/bundles/types/secure-remote-commerce/click-to-pay-secure-remote-commerce.d.ts +31 -0
  163. package/bundles/types/secure-remote-commerce/click-to-pay-secure-remote-commerce.d.ts.map +1 -0
  164. package/{lib → bundles/types}/secure-remote-commerce/index.d.ts +5 -4
  165. package/bundles/types/secure-remote-commerce/index.d.ts.map +1 -0
  166. package/{lib → bundles/types}/secure-remote-commerce/interfaces.d.ts +10 -9
  167. package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +1 -0
  168. package/bundles/types/secure-remote-commerce/providers/mastercard-src/index.d.ts +2 -0
  169. package/bundles/types/secure-remote-commerce/providers/mastercard-src/index.d.ts.map +1 -0
  170. package/{lib → bundles/types}/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts +5 -4
  171. package/bundles/types/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts.map +1 -0
  172. package/{lib → bundles/types}/secure-remote-commerce/providers/src-provider.d.ts +1 -0
  173. package/bundles/types/secure-remote-commerce/providers/src-provider.d.ts.map +1 -0
  174. package/{lib → bundles/types}/secure-remote-commerce/secure-remote-commerce.d.ts +4 -3
  175. package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +1 -0
  176. package/{lib → bundles/types}/vault-display-widget/index.d.ts +1 -0
  177. package/bundles/types/vault-display-widget/index.d.ts.map +1 -0
  178. package/{lib → bundles/types}/vault-display-widget/vault-display-widget.d.ts +1 -0
  179. package/bundles/types/vault-display-widget/vault-display-widget.d.ts.map +1 -0
  180. package/{lib → bundles/types}/wallet-buttons/afterpay.wallet-service.d.ts +1 -0
  181. package/bundles/types/wallet-buttons/afterpay.wallet-service.d.ts.map +1 -0
  182. package/{lib → bundles/types}/wallet-buttons/apple.wallet-service.d.ts +1 -0
  183. package/bundles/types/wallet-buttons/apple.wallet-service.d.ts.map +1 -0
  184. package/{lib → bundles/types}/wallet-buttons/flypay-v2.wallet-service.d.ts +2 -1
  185. package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts.map +1 -0
  186. package/{lib → bundles/types}/wallet-buttons/flypay.wallet-service.d.ts +1 -0
  187. package/bundles/types/wallet-buttons/flypay.wallet-service.d.ts.map +1 -0
  188. package/{lib → bundles/types}/wallet-buttons/google.wallet-service.d.ts +1 -0
  189. package/bundles/types/wallet-buttons/google.wallet-service.d.ts.map +1 -0
  190. package/bundles/types/wallet-buttons/helpers/flypay-v2.helper.d.ts +6 -0
  191. package/bundles/types/wallet-buttons/helpers/flypay-v2.helper.d.ts.map +1 -0
  192. package/bundles/types/wallet-buttons/index-cba.d.ts +2 -0
  193. package/bundles/types/wallet-buttons/index-cba.d.ts.map +1 -0
  194. package/{lib → bundles/types}/wallet-buttons/index.d.ts +1 -0
  195. package/bundles/types/wallet-buttons/index.d.ts.map +1 -0
  196. package/{lib → bundles/types}/wallet-buttons/interfaces.d.ts +1 -0
  197. package/bundles/types/wallet-buttons/interfaces.d.ts.map +1 -0
  198. package/{lib → bundles/types}/wallet-buttons/mastercard.wallet-service.d.ts +1 -0
  199. package/bundles/types/wallet-buttons/mastercard.wallet-service.d.ts.map +1 -0
  200. package/{lib → bundles/types}/wallet-buttons/paypal.wallet-service.d.ts +1 -0
  201. package/bundles/types/wallet-buttons/paypal.wallet-service.d.ts.map +1 -0
  202. package/{lib → bundles/types}/wallet-buttons/stripe.wallet-service.d.ts +1 -0
  203. package/bundles/types/wallet-buttons/stripe.wallet-service.d.ts.map +1 -0
  204. package/{lib → bundles/types}/wallet-buttons/wallet-buttons.d.ts +1 -0
  205. package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +1 -0
  206. package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts +330 -0
  207. package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts.map +1 -0
  208. package/{lib → bundles/types}/wallet-buttons/wallet-service.d.ts +1 -0
  209. package/bundles/types/wallet-buttons/wallet-service.d.ts.map +1 -0
  210. package/{lib → bundles/types}/widget/configuration.d.ts +2 -1
  211. package/bundles/types/widget/configuration.d.ts.map +1 -0
  212. package/{lib → bundles/types}/widget/html-multi-widget.d.ts +4 -3
  213. package/bundles/types/widget/html-multi-widget.d.ts.map +1 -0
  214. package/{lib → bundles/types}/widget/html-widget.d.ts +1 -0
  215. package/bundles/types/widget/html-widget.d.ts.map +1 -0
  216. package/{lib → bundles/types}/widget/index.d.ts +2 -1
  217. package/bundles/types/widget/index.d.ts.map +1 -0
  218. package/{lib → bundles/types}/widget/meta.d.ts +1 -0
  219. package/bundles/types/widget/meta.d.ts.map +1 -0
  220. package/{lib → bundles/types}/widget/multi-widget.d.ts +2 -1
  221. package/bundles/types/widget/multi-widget.d.ts.map +1 -0
  222. package/{lib → bundles/types}/widget/style.d.ts +1 -0
  223. package/bundles/types/widget/style.d.ts.map +1 -0
  224. package/bundles/widget.umd.js +6755 -6894
  225. package/bundles/widget.umd.js.d.ts +3206 -0
  226. package/bundles/widget.umd.js.map +1 -0
  227. package/bundles/widget.umd.js.min.d.ts +3206 -0
  228. package/bundles/widget.umd.min.js +2 -1
  229. package/bundles/widget.umd.min.js.map +1 -0
  230. package/docs/api-canvas3ds.md +158 -0
  231. package/docs/api-checkout-button.md +912 -0
  232. package/docs/api-examples.md +65 -0
  233. package/docs/api-ps-widget.md +585 -0
  234. package/docs/api-vault-display.md +94 -0
  235. package/docs/api-widget.md +2499 -0
  236. package/docs/api-wrapper.md +78 -0
  237. package/docs/canvas3ds-examples.md +242 -0
  238. package/docs/cba-header.md +13 -0
  239. package/docs/cba-license.md +2 -0
  240. package/docs/checkout-examples.md +248 -0
  241. package/docs/click-to-pay-examples.md +231 -0
  242. package/docs/click-to-pay.md +336 -0
  243. package/docs/header.md +15 -0
  244. package/docs/html/layout.html +78 -0
  245. package/docs/html/marked.js +23 -0
  246. package/docs/html/style.css +365 -0
  247. package/docs/install/npm.content.md +16 -0
  248. package/docs/install/npm.example.md +24 -0
  249. package/docs/install/umd.content.md +20 -0
  250. package/docs/install/umd.example.md +6 -0
  251. package/docs/install.md +43 -0
  252. package/docs/install.readme.t.md +17 -0
  253. package/docs/install.slate.t.md +17 -0
  254. package/docs/license.md +2 -0
  255. package/docs/partials/header.hbs +3 -0
  256. package/docs/ps-examples.md +129 -0
  257. package/docs/vault-display-example.md +132 -0
  258. package/docs/wallet-buttons-examples.md +609 -0
  259. package/docs/wallet-buttons.md +619 -0
  260. package/docs/wallet-cba-buttons-examples.md +388 -0
  261. package/docs/widget-examples.md +134 -0
  262. package/package.json +164 -42
  263. package/slate.md +141 -106
  264. package/.nvmrc +0 -1
  265. package/api.d.ts +0 -1
  266. package/api.js +0 -1
  267. package/canvas3ds.d.ts +0 -1
  268. package/canvas3ds.js +0 -1
  269. package/checkout-button.d.ts +0 -1
  270. package/checkout-button.js +0 -1
  271. package/inicialization-guide.md +0 -7
  272. package/lib/api/api-base.js +0 -101
  273. package/lib/api/api-base.js.map +0 -1
  274. package/lib/api/api-charge-internal.js +0 -30
  275. package/lib/api/api-charge-internal.js.map +0 -1
  276. package/lib/api/api-charge.js +0 -49
  277. package/lib/api/api-charge.js.map +0 -1
  278. package/lib/api/api-internal.js +0 -13
  279. package/lib/api/api-internal.js.map +0 -1
  280. package/lib/api/api-service-internal.js +0 -19
  281. package/lib/api/api-service-internal.js.map +0 -1
  282. package/lib/api/api.js +0 -62
  283. package/lib/api/api.js.map +0 -1
  284. package/lib/api/index.d.ts +0 -1
  285. package/lib/api/index.js +0 -2
  286. package/lib/api/index.js.map +0 -1
  287. package/lib/canvas-3ds/canvas-3ds.js +0 -157
  288. package/lib/canvas-3ds/canvas-3ds.js.map +0 -1
  289. package/lib/canvas-3ds/index.js +0 -2
  290. package/lib/canvas-3ds/index.js.map +0 -1
  291. package/lib/canvas-3ds/services/gpayments-service.js +0 -181
  292. package/lib/canvas-3ds/services/gpayments-service.js.map +0 -1
  293. package/lib/canvas-3ds/services/index.js +0 -2
  294. package/lib/canvas-3ds/services/index.js.map +0 -1
  295. package/lib/canvas-3ds/services/standalone3ds-service.js +0 -32
  296. package/lib/canvas-3ds/services/standalone3ds-service.js.map +0 -1
  297. package/lib/checkout-button/afterpay/afterpay-checkout-button.js +0 -50
  298. package/lib/checkout-button/afterpay/afterpay-checkout-button.js.map +0 -1
  299. package/lib/checkout-button/afterpay/afterpay.runner.js +0 -41
  300. package/lib/checkout-button/afterpay/afterpay.runner.js.map +0 -1
  301. package/lib/checkout-button/checkout-button.interface.js +0 -45
  302. package/lib/checkout-button/checkout-button.interface.js.map +0 -1
  303. package/lib/checkout-button/checkout-button.js +0 -266
  304. package/lib/checkout-button/checkout-button.js.map +0 -1
  305. package/lib/checkout-button/checkout-contextual-handler.js +0 -75
  306. package/lib/checkout-button/checkout-contextual-handler.js.map +0 -1
  307. package/lib/checkout-button/index.js +0 -85
  308. package/lib/checkout-button/index.js.map +0 -1
  309. package/lib/checkout-button/paypal/paypal-checkout-button.js +0 -25
  310. package/lib/checkout-button/paypal/paypal-checkout-button.js.map +0 -1
  311. package/lib/checkout-button/paypal/paypal.runner.js +0 -14
  312. package/lib/checkout-button/paypal/paypal.runner.js.map +0 -1
  313. package/lib/checkout-button/runner/base.runner.js +0 -13
  314. package/lib/checkout-button/runner/base.runner.js.map +0 -1
  315. package/lib/checkout-button/runner/contextual.runner.js +0 -40
  316. package/lib/checkout-button/runner/contextual.runner.js.map +0 -1
  317. package/lib/checkout-button/runner/index.js +0 -11
  318. package/lib/checkout-button/runner/index.js.map +0 -1
  319. package/lib/checkout-button/runner/popup.runner.js +0 -68
  320. package/lib/checkout-button/runner/popup.runner.js.map +0 -1
  321. package/lib/checkout-button/runner/redirect.runner.js +0 -15
  322. package/lib/checkout-button/runner/redirect.runner.js.map +0 -1
  323. package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js +0 -64
  324. package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js.map +0 -1
  325. package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js +0 -78
  326. package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js.map +0 -1
  327. package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js +0 -49
  328. package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js.map +0 -1
  329. package/lib/checkout-button/zipmoney/zipmoney.config.js +0 -4
  330. package/lib/checkout-button/zipmoney/zipmoney.config.js.map +0 -1
  331. package/lib/checkout-button/zipmoney/zipmoney.runner.js +0 -23
  332. package/lib/checkout-button/zipmoney/zipmoney.runner.js.map +0 -1
  333. package/lib/checkout-button/zipmoney/zipmoney.types.js +0 -1
  334. package/lib/checkout-button/zipmoney/zipmoney.types.js.map +0 -1
  335. package/lib/components/ability-guard.js +0 -44
  336. package/lib/components/ability-guard.js.map +0 -1
  337. package/lib/components/background.js +0 -193
  338. package/lib/components/background.js.map +0 -1
  339. package/lib/components/container.js +0 -63
  340. package/lib/components/container.js.map +0 -1
  341. package/lib/components/dispatcher.js +0 -39
  342. package/lib/components/dispatcher.js.map +0 -1
  343. package/lib/components/element-style.js +0 -52
  344. package/lib/components/element-style.js.map +0 -1
  345. package/lib/components/flypay-iframe-event.js +0 -28
  346. package/lib/components/flypay-iframe-event.js.map +0 -1
  347. package/lib/components/form-Interceptor.js +0 -38
  348. package/lib/components/form-Interceptor.js.map +0 -1
  349. package/lib/components/http-core.js +0 -57
  350. package/lib/components/http-core.js.map +0 -1
  351. package/lib/components/iframe-event.js +0 -77
  352. package/lib/components/iframe-event.js.map +0 -1
  353. package/lib/components/iframe.js +0 -62
  354. package/lib/components/iframe.js.map +0 -1
  355. package/lib/components/link.js +0 -60
  356. package/lib/components/link.js.map +0 -1
  357. package/lib/components/loader.js +0 -234
  358. package/lib/components/loader.js.map +0 -1
  359. package/lib/components/param.js +0 -147
  360. package/lib/components/param.js.map +0 -1
  361. package/lib/components/popup.js +0 -104
  362. package/lib/components/popup.js.map +0 -1
  363. package/lib/components/storage-dispatcher.js +0 -75
  364. package/lib/components/storage-dispatcher.js.map +0 -1
  365. package/lib/components/trigger.js +0 -49
  366. package/lib/components/trigger.js.map +0 -1
  367. package/lib/components/vault-display-iframe-event.js +0 -27
  368. package/lib/components/vault-display-iframe-event.js.map +0 -1
  369. package/lib/components/wallet-background.js +0 -75
  370. package/lib/components/wallet-background.js.map +0 -1
  371. package/lib/components/wallet-trigger.js +0 -27
  372. package/lib/components/wallet-trigger.js.map +0 -1
  373. package/lib/configs/env/env.js +0 -117
  374. package/lib/configs/env/env.js.map +0 -1
  375. package/lib/configs/sdk.js +0 -16
  376. package/lib/configs/sdk.js.map +0 -1
  377. package/lib/constants/validators.js +0 -42
  378. package/lib/constants/validators.js.map +0 -1
  379. package/lib/external-checkout/builder.js +0 -45
  380. package/lib/external-checkout/builder.js.map +0 -1
  381. package/lib/external-checkout/checker.js +0 -22
  382. package/lib/external-checkout/checker.js.map +0 -1
  383. package/lib/external-checkout/index.d.ts +0 -2
  384. package/lib/external-checkout/index.js +0 -3
  385. package/lib/external-checkout/index.js.map +0 -1
  386. package/lib/helper/access-token.js +0 -44
  387. package/lib/helper/access-token.js.map +0 -1
  388. package/lib/helper/browser.js +0 -79
  389. package/lib/helper/browser.js.map +0 -1
  390. package/lib/helper/event-emitter.js +0 -23
  391. package/lib/helper/event-emitter.js.map +0 -1
  392. package/lib/helper/event.js +0 -23
  393. package/lib/helper/event.js.map +0 -1
  394. package/lib/helper/ms.js +0 -32
  395. package/lib/helper/ms.js.map +0 -1
  396. package/lib/helper/object.js +0 -6
  397. package/lib/helper/object.js.map +0 -1
  398. package/lib/helper/url.js +0 -11
  399. package/lib/helper/url.js.map +0 -1
  400. package/lib/helper/uuid.js +0 -26
  401. package/lib/helper/uuid.js.map +0 -1
  402. package/lib/index.d.ts +0 -15
  403. package/lib/index.js +0 -15
  404. package/lib/index.js.map +0 -1
  405. package/lib/payment-source/builder.js +0 -49
  406. package/lib/payment-source/builder.js.map +0 -1
  407. package/lib/payment-source/index.js +0 -2
  408. package/lib/payment-source/index.js.map +0 -1
  409. package/lib/payment-source-widget/html-payment-source-widget.js +0 -172
  410. package/lib/payment-source-widget/html-payment-source-widget.js.map +0 -1
  411. package/lib/payment-source-widget/index.js +0 -35
  412. package/lib/payment-source-widget/index.js.map +0 -1
  413. package/lib/payment-source-widget/interfaces.js +0 -2
  414. package/lib/payment-source-widget/interfaces.js.map +0 -1
  415. package/lib/payment-source-widget/payment-source-widget.js +0 -142
  416. package/lib/payment-source-widget/payment-source-widget.js.map +0 -1
  417. package/lib/secure-remote-commerce/index.js +0 -103
  418. package/lib/secure-remote-commerce/index.js.map +0 -1
  419. package/lib/secure-remote-commerce/interfaces.js +0 -48
  420. package/lib/secure-remote-commerce/interfaces.js.map +0 -1
  421. package/lib/secure-remote-commerce/mastercard-secure-remote-commerce.d.ts +0 -30
  422. package/lib/secure-remote-commerce/mastercard-secure-remote-commerce.js +0 -40
  423. package/lib/secure-remote-commerce/mastercard-secure-remote-commerce.js.map +0 -1
  424. package/lib/secure-remote-commerce/providers/mastercard-src/index.d.ts +0 -1
  425. package/lib/secure-remote-commerce/providers/mastercard-src/index.js +0 -2
  426. package/lib/secure-remote-commerce/providers/mastercard-src/index.js.map +0 -1
  427. package/lib/secure-remote-commerce/providers/mastercard-src/mastercard-src.js +0 -89
  428. package/lib/secure-remote-commerce/providers/mastercard-src/mastercard-src.js.map +0 -1
  429. package/lib/secure-remote-commerce/providers/src-provider.js +0 -1
  430. package/lib/secure-remote-commerce/providers/src-provider.js.map +0 -1
  431. package/lib/secure-remote-commerce/secure-remote-commerce.js +0 -155
  432. package/lib/secure-remote-commerce/secure-remote-commerce.js.map +0 -1
  433. package/lib/vault-display-widget/index.js +0 -14
  434. package/lib/vault-display-widget/index.js.map +0 -1
  435. package/lib/vault-display-widget/vault-display-widget.js +0 -99
  436. package/lib/vault-display-widget/vault-display-widget.js.map +0 -1
  437. package/lib/wallet-buttons/afterpay.wallet-service.js +0 -152
  438. package/lib/wallet-buttons/afterpay.wallet-service.js.map +0 -1
  439. package/lib/wallet-buttons/apple.wallet-service.js +0 -324
  440. package/lib/wallet-buttons/apple.wallet-service.js.map +0 -1
  441. package/lib/wallet-buttons/flypay-v2.wallet-service.js +0 -163
  442. package/lib/wallet-buttons/flypay-v2.wallet-service.js.map +0 -1
  443. package/lib/wallet-buttons/flypay.wallet-service.js +0 -117
  444. package/lib/wallet-buttons/flypay.wallet-service.js.map +0 -1
  445. package/lib/wallet-buttons/google.wallet-service.js +0 -301
  446. package/lib/wallet-buttons/google.wallet-service.js.map +0 -1
  447. package/lib/wallet-buttons/helpers/flypay-v2.helper.d.ts +0 -3
  448. package/lib/wallet-buttons/helpers/flypay-v2.helper.js +0 -151
  449. package/lib/wallet-buttons/helpers/flypay-v2.helper.js.map +0 -1
  450. package/lib/wallet-buttons/index.js +0 -128
  451. package/lib/wallet-buttons/index.js.map +0 -1
  452. package/lib/wallet-buttons/interfaces.js +0 -1
  453. package/lib/wallet-buttons/interfaces.js.map +0 -1
  454. package/lib/wallet-buttons/mastercard.wallet-service.js +0 -27
  455. package/lib/wallet-buttons/mastercard.wallet-service.js.map +0 -1
  456. package/lib/wallet-buttons/paypal.wallet-service.js +0 -144
  457. package/lib/wallet-buttons/paypal.wallet-service.js.map +0 -1
  458. package/lib/wallet-buttons/stripe.wallet-service.js +0 -100
  459. package/lib/wallet-buttons/stripe.wallet-service.js.map +0 -1
  460. package/lib/wallet-buttons/wallet-buttons.js +0 -479
  461. package/lib/wallet-buttons/wallet-buttons.js.map +0 -1
  462. package/lib/wallet-buttons/wallet-service.js +0 -60
  463. package/lib/wallet-buttons/wallet-service.js.map +0 -1
  464. package/lib/widget/configuration.js +0 -260
  465. package/lib/widget/configuration.js.map +0 -1
  466. package/lib/widget/html-multi-widget.js +0 -422
  467. package/lib/widget/html-multi-widget.js.map +0 -1
  468. package/lib/widget/html-widget.js +0 -127
  469. package/lib/widget/html-widget.js.map +0 -1
  470. package/lib/widget/index.js +0 -132
  471. package/lib/widget/index.js.map +0 -1
  472. package/lib/widget/meta.js +0 -8
  473. package/lib/widget/meta.js.map +0 -1
  474. package/lib/widget/multi-widget.js +0 -437
  475. package/lib/widget/multi-widget.js.map +0 -1
  476. package/lib/widget/style.js +0 -204
  477. package/lib/widget/style.js.map +0 -1
  478. package/payment-source-widget.d.ts +0 -1
  479. package/payment-source-widget.js +0 -1
  480. package/tslint.json +0 -129
  481. package/typings/globals/jasmine/index.d.ts +0 -576
  482. package/typings/globals/jasmine-ajax/index.d.ts +0 -83
  483. package/typings/globals/jquery/index.d.ts +0 -3759
  484. package/typings/index.d.ts +0 -3
  485. package/vault-display-widget.d.ts +0 -1
  486. package/vault-display-widget.js +0 -1
  487. package/vendors/zipmoney.d.ts +0 -18
  488. package/vendors/zipmoney.js +0 -1
  489. package/widget.d.ts +0 -1
  490. package/widget.js +0 -1
@@ -1,437 +0,0 @@
1
- import { AccessToken } from './../helper/access-token';
2
- import { SDK } from '../configs/sdk';
3
- import { Link, WIDGET_LINK } from '../components/link';
4
- import { Configuration } from './configuration';
5
- import { STYLE, TEXT, ELEMENT, SUPPORTED_CARD_TYPES, FORM_FIELD, } from '../components/param';
6
- import { ObjectHelper } from '../helper/object';
7
- import { stylableElements, } from "./style";
8
- import { ElementStyle } from "../components/element-style";
9
- /**
10
- *
11
- * Class MultiWidget include method for for creating iframe url
12
- * @constructor
13
- *
14
- * @param {string} accessToken - PayDock users access token or public key
15
- * @param {(Configuration | string | Configuration[] | string[])} conf - exemplar[s] Configuration class OR configuration token
16
- *
17
- * @example
18
- * var widget = new MultiWidget('accessToken','configurationToken'); // With a pre-created configuration token
19
- *
20
- * var widget = new MultiWidget('accessToken',['configurationToken', 'configurationToken2']); // With pre-created configuration tokens
21
- *
22
- * var widget = new MultiWidget('accessToken', new Configuration('gatewayId')); With Configuration
23
- *
24
- * var widget = new MultiWidget('accessToken',[ With Configurations
25
- * Configuration('gatewayId'),
26
- * Configuration('gatewayId', 'bank_account')
27
- * ]);
28
- */
29
- class MultiWidget {
30
- /** @constructs */ // constructs added for correct parse classes jsdoc2md
31
- constructor(accessToken, conf) {
32
- this.configs = [];
33
- this.configTokens = [];
34
- this.link = new Link(WIDGET_LINK);
35
- if (SDK.version) {
36
- this.link.setParams({
37
- sdk_version: SDK.version,
38
- sdk_type: SDK.type,
39
- });
40
- }
41
- if (!!AccessToken.validateJWT(accessToken)) {
42
- this.link.setParams({ token: accessToken });
43
- }
44
- else {
45
- this.link.setParams({ public_key: accessToken });
46
- }
47
- this.accessToken = accessToken;
48
- if (!conf || (Array.isArray(conf) && !conf.length))
49
- throw Error('configuration token is required');
50
- if (typeof conf === 'string')
51
- this.configTokens.push(conf);
52
- else if (conf instanceof Configuration)
53
- this.configs.push(conf);
54
- else if (Array.isArray(conf) && typeof conf[0] === 'string')
55
- this.configTokens = conf;
56
- else if (Array.isArray(conf) && conf[0] instanceof Configuration)
57
- this.configs = conf;
58
- else
59
- throw Error('Unsupported type of configuration token');
60
- }
61
- /**
62
- * Object contain styles for widget
63
- *
64
- * @example
65
- * widget.setStyles({
66
- * background_color: 'rgb(0, 0, 0)',
67
- * border_color: 'yellow',
68
- * text_color: '#FFFFAA',
69
- * button_color: 'rgba(255, 255, 255, 0.9)',
70
- * font_size: '20px'
71
- * fort_family: 'fantasy'
72
- * });
73
- * @param {IStyles} fields - name of styles which can be shown in widget [STYLE]{@link STYLE}
74
- */
75
- setStyles(styles) {
76
- for (let index in styles) {
77
- if (styles.hasOwnProperty(index))
78
- this.setStyle(index, styles[index]);
79
- }
80
- }
81
- /**
82
- * Method to set a country code mask for the phone input.
83
- *
84
- * @example
85
- * widget.usePhoneCountryMask();
86
- *
87
- * @example
88
- * widget.usePhoneCountryMask({
89
- * default_country: 'au',
90
- * preferred_countries: ['au', 'gb'],
91
- * only_countries: ['au', 'gb', 'us', 'ua']
92
- * });
93
- *
94
- * @param {object} [options] - Options for configure the phone mask.
95
- * @param {string} [options.default_country] - Set a default country for the mask.
96
- * @param {Array.<string>} [options.preferred_countries] - Set list of preferred countries for the top of the select box .
97
- * @param {Array.<string>} [options.only_countries] - Set list of countries to show in the select box.
98
- */
99
- usePhoneCountryMask(options) {
100
- if (!options)
101
- return this.link.setParams({ use_country_phone_mask: true });
102
- if (options.only_countries && (!/^[a-z]+$/.test(options.only_countries.join('')) || options.only_countries.length * 2 !== options.only_countries.join('').length))
103
- return console.warn(`Widget::usePhoneCountryMask[s: only_countries - unsupported symbols or incorrect length of value`);
104
- if (options.preferred_countries && (!/^[a-z]+$/.test(options.preferred_countries.join('')) || options.preferred_countries.length * 2 !== options.preferred_countries.join('').length))
105
- return console.warn(`Widget::usePhoneCountryMask[s: preferred_countries - unsupported symbols or incorrect length of value`);
106
- if (options.default_country && options.default_country.length !== 2)
107
- return console.warn(`Widget::usePhoneCountryMask[s: default_country - incorrect value length`);
108
- this.link.setParams({ use_country_phone_mask: true });
109
- if (options.only_countries)
110
- this.link.setParams({ phone_mask_only_countries: options.only_countries.join(',') });
111
- if (options.preferred_countries)
112
- this.link.setParams({ phone_mask_preferred_countries: options.preferred_countries.join(',') });
113
- if (options.default_country)
114
- this.link.setParams({ phone_mask_default_country: options.default_country });
115
- }
116
- setStyle(param, value) {
117
- if (ObjectHelper.values(STYLE).indexOf(param) !== -1)
118
- this.link.setParams({ [param]: value });
119
- else
120
- console.warn(`Widget::setStyle[s: unsupported style param ${param}`);
121
- }
122
- /**
123
- * Method for set different texts inside the widget
124
- *
125
- * @example
126
- * widget.setTexts({
127
- * title: 'Your card',
128
- * finish_text: 'Payment resource was successfully accepted',
129
- * title_description: '* indicates required field',
130
- * submit_button: 'Save',
131
- * submit_button_processing: 'Load...',
132
- * });
133
- *
134
- * @param {ITexts} fields - name of text items which can be shown in widget [TEXT]{@link TEXT}
135
- */
136
- setTexts(texts) {
137
- for (let index in texts) {
138
- if (texts.hasOwnProperty(index))
139
- this.setText(index, texts[index]);
140
- }
141
- }
142
- setText(param, value) {
143
- if (ObjectHelper.values(TEXT).indexOf(param) !== -1)
144
- this.link.setParams({ [param]: value });
145
- else
146
- console.warn(`Widget::setText[s: unsupported text param ${param}`);
147
- }
148
- /**
149
- * Method for set styles for different elements and states
150
- *
151
- * @example
152
- * widget.setElementStyle('input', {
153
- * border: 'green solid 1px'
154
- * });
155
- *
156
- * widget.setElementStyle('input', 'focus', {
157
- * border: 'blue solid 1px'
158
- * });
159
- *
160
- * widget.setElementStyle('input', 'error', {
161
- * border: 'red solid 1px'
162
- * });
163
- *
164
- * @param {string} element - type of element for styling. These elements are available [STYLABLE_ELEMENT]{@link STYLABLE_ELEMENT}
165
- * @param {string} [state] - state of element for styling. These states are available [STYLABLE_ELEMENT_STATE]{@link STYLABLE_ELEMENT_STATE}
166
- * @param {IElementStyleInput | IElementStyleSubmitButton | IElementStyleLabel | IElementStyleTitle | IElementStyleTitleDescription} styles - styles list
167
- */
168
- setElementStyle(element, a2, a3) {
169
- let state = (arguments.length === 3)
170
- ? a2
171
- : null;
172
- let styles = (arguments.length === 3)
173
- ? a3
174
- : a2;
175
- if (!ElementStyle.check(stylableElements, element, state, styles))
176
- return console.warn(`Styles for "${element}" element with "${state || 'default'}" state was ignored because some of the arguments are unacceptable`);
177
- this.link.concatParams({ element_styles: ElementStyle.encode(element, state, styles) });
178
- }
179
- /**
180
- * The method to set the predefined values for the form fields inside the widget
181
- *
182
- * @example
183
- * widget.setFormValues({
184
- * email: 'predefined@email.com',
185
- * card_name: 'Houston'
186
- * });
187
- *
188
- * @param { Object } fieldValues - Key of object is one of [FORM_FIELD]{@link FORM_FIELD}, The object value is what we are expecting
189
- */
190
- setFormValues(fieldValues) {
191
- for (let key in fieldValues) {
192
- if (fieldValues.hasOwnProperty(key))
193
- this.setFormValue(key, fieldValues[key]);
194
- }
195
- }
196
- setFormValue(key, value) {
197
- if (ObjectHelper.values(FORM_FIELD).indexOf(key) === -1)
198
- return console.warn(`Widget::setFormValues[s: unsupported field ${key}`);
199
- if (/\,/.test(value) || /\:/.test(value))
200
- return console.warn(`Widget::setFormValues[s: ${key} - unsupported symbols (: or ,) in value`);
201
- if (typeof this.link.getParams().form_values === 'string' && this.link.getParams().form_values.length)
202
- this.link.setParams({ form_values: `${this.link.getParams().form_values},${key}:${value}` });
203
- else
204
- this.link.setParams({ form_values: `${key}:${value}` });
205
- }
206
- /**
207
- * The method to set custom form field labels
208
- *
209
- * @example
210
- * widget.setFormPlaceholders({
211
- * card_name: 'Card Holder Name',
212
- * email: 'Email For Receipt'
213
- * })
214
- *
215
- * @param { Object } fieldLabels - Key of object is one of [FORM_FIELD]{@link FORM_FIELD}, The object value is what we are expecting
216
- */
217
- setFormLabels(fieldLabels) {
218
- for (let key in fieldLabels) {
219
- if (fieldLabels.hasOwnProperty(key))
220
- this.setFormLabel(key, fieldLabels[key]);
221
- }
222
- }
223
- setFormLabel(key, label) {
224
- if (ObjectHelper.values(FORM_FIELD).indexOf(key) === -1)
225
- return console.warn(`Widget::setFormLabel[s: unsupported field ${key}`);
226
- const modifiedLabel = (label === null || label === '')
227
- ? ' '
228
- : label;
229
- if (/\,/.test(modifiedLabel) || /\:/.test(modifiedLabel))
230
- return console.warn(`Widget::setFormLabel[s: ${key} - unsupported symbols (: or ,) in value`);
231
- this.link.concatParams({ form_labels: `${key}:${modifiedLabel}` });
232
- }
233
- /**
234
- * The method to set custom form fields placeholders
235
- *
236
- * @example
237
- * widget.setFormPlaceholders({
238
- * card_name: 'Input your card holder name...',
239
- * email: 'Input your email, like test@example.com'
240
- * })
241
- *
242
- * @param { Object } fieldPlaceholders - Key of object is one of [FORM_FIELD]{@link FORM_FIELD}, Value of object is expected placeholder
243
- */
244
- setFormPlaceholders(fieldPlaceholders) {
245
- for (let key in fieldPlaceholders) {
246
- if (fieldPlaceholders.hasOwnProperty(key))
247
- this.setFormPlaceholder(key, fieldPlaceholders[key]);
248
- }
249
- }
250
- setFormPlaceholder(key, placeholder) {
251
- if (ObjectHelper.values(FORM_FIELD).indexOf(key) === -1)
252
- return console.warn(`Widget::setFormPlaceholder[s: unsupported field ${key}`);
253
- const modifiedPlaceholder = (placeholder === null || placeholder === '')
254
- ? ' '
255
- : placeholder;
256
- if (/\,/.test(modifiedPlaceholder) || /\:/.test(modifiedPlaceholder))
257
- return console.warn(`Widget::setFormPlaceholder[s: ${key} - unsupported symbols (: or ,) in value`);
258
- this.link.concatParams({ form_placeholders: `${key}:${modifiedPlaceholder}` });
259
- }
260
- /**
261
- * The method to set the full configuration for the all specific form elements (label, placeholder, value)
262
- * You can also use the other method for the partial configuration like: setFormValues, setFormPlaceholder, setFormLabel
263
- *
264
- * @example
265
- * widget.setFormElements([
266
- * {
267
- * field: 'card_name',
268
- * placeholder: 'Input your card holder name...',
269
- * label: 'Card Holder Name',
270
- * value: 'Houston',
271
- * },
272
- * {
273
- * field: 'email',
274
- * placeholder: 'Input your email, like test@example.com',
275
- * label: 'Email For Receipt',
276
- * value: 'predefined@email.com',
277
- * },
278
- * ])
279
- *
280
- * @param { string } elements - The list of elements
281
- * @param { string } elements[].field - Field name of the element [FORM_FIELD]{@link FORM_FIELD}
282
- * @param { string } elements[].placeholder - Set custom form field placeholder
283
- * @param { string } elements[].label - Set custom labels near form field
284
- * @param { string } elements[].value - Set predefined values for the form field
285
- */
286
- setFormElements(elements) {
287
- elements.forEach((element) => this.setFormElement(element));
288
- }
289
- setFormElement(element) {
290
- if (element.value)
291
- this.setFormValue(element.field, element.value);
292
- if (element.label)
293
- this.setFormLabel(element.field, element.label);
294
- if (element.placeholder)
295
- this.setFormPlaceholder(element.field, element.placeholder);
296
- }
297
- /**
298
- * The method to change the widget icons
299
- *
300
- * @TODO DEPRECATED
301
- */
302
- setIcons(icons) {
303
- for (let key in icons) {
304
- if (icons.hasOwnProperty(key))
305
- this.setIcon(key, icons[key]);
306
- }
307
- }
308
- setIcon(key, value) {
309
- if (/\,/.test(value) || /\:/.test(value))
310
- return console.warn(`Widget::setIcon[s: ${key} - unsupported symbols (: or ,) in value`);
311
- if (typeof this.link.getParams().icons === 'string' && this.link.getParams().icons.length)
312
- this.link.setParams({ icons: `${this.link.getParams().icons},${key}:${value}` });
313
- else
314
- this.link.setParams({ icons: `${key}:${value}` });
315
- }
316
- /**
317
- * Using this method you can set hidden elements inside widget
318
- *
319
- * @example
320
- * widget.setHiddenElements(['submit_button', 'email']);
321
- *
322
- * @param {string[]} elements - list of element which can be hidden [ELEMENT]{@link ELEMENT} || [FORM_FIELD]{@link FORM_FIELD}
323
- */
324
- setHiddenElements(elements) {
325
- let filteredElements = [];
326
- let supportedElements = ObjectHelper.values(ELEMENT).concat(ObjectHelper.values(FORM_FIELD));
327
- for (let index in elements) {
328
- if (!elements.hasOwnProperty(index))
329
- continue;
330
- if (supportedElements.indexOf(elements[index]) !== -1)
331
- filteredElements.push(elements[index]);
332
- else
333
- console.warn(`Widget::setHiddenElements: unsupported element ${elements[index]}`);
334
- }
335
- if (filteredElements.length)
336
- this.link.concatParams({ hidden_elements: filteredElements.join(',') });
337
- }
338
- /**
339
- * Current method can set custom ID to identify the data in the future
340
- *
341
- * @example
342
- * widget.setRefId('id');
343
- *
344
- * @param {string} refId - custom id
345
- */
346
- setRefId(refId) {
347
- this.link.setParams({ ref_id: refId });
348
- }
349
- /**
350
- * Current method can add visual validation from gateway to widget's form fields
351
- *
352
- * @example
353
- * widget.useGatewayFieldValidation();
354
- */
355
- useGatewayFieldValidation() {
356
- this.link.setParams({ fields_validation: true });
357
- }
358
- /**
359
- * Current method can set icons of supported card types
360
- *
361
- * @example
362
- *
363
- * widget.setSupportedCardIcons(['mastercard', 'visa'], validateCardNumberInput);
364
- *
365
- * @param {string[]} elements - [SUPPORTED_CARD_TYPES]{@link SUPPORTED_CARD_TYPES}
366
- * @param {boolean} validateCardNumberInput - [validateCardNumberInput=false] - using this param you allow validation for card number input on supported card types
367
- */
368
- setSupportedCardIcons(elements, validateCardNumberInput) {
369
- let supportedCards = [];
370
- for (let index in elements) {
371
- if (!elements.hasOwnProperty(index))
372
- continue;
373
- if (ObjectHelper.values(SUPPORTED_CARD_TYPES).indexOf(elements[index]) !== -1)
374
- supportedCards.push(elements[index]);
375
- else
376
- console.warn(`Widget::cardTypes: unsupported type of cards ${elements[index]}`);
377
- }
378
- if (supportedCards.length)
379
- this.link.concatParams({ supported_card_types: supportedCards.join(',') });
380
- if (validateCardNumberInput)
381
- this.link.setParams({ validate_card_types: validateCardNumberInput });
382
- }
383
- /**
384
- * Current method can change environment. By default environment = sandbox.
385
- * Also we can change domain alias for this environment. By default domain_alias = paydock.com
386
- *
387
- * @example
388
- * widget.setEnv('production', 'paydock.com');
389
- * @param {string} env - sandbox, production
390
- * @param {string} [alias] - Own domain alias
391
- */
392
- setEnv(env, alias) {
393
- this.link.setEnv(env, alias);
394
- for (let index in this.configs) {
395
- if (this.configs.hasOwnProperty(index))
396
- this.configs[index].setEnv(env, alias);
397
- }
398
- }
399
- getEnv() {
400
- this.link.getEnv();
401
- }
402
- /**
403
- * Method for creating iframe url
404
- *
405
- * @example
406
- * widget.loadIFrameUrl(function (url) {
407
- * console.log(url);
408
- * }, function (errors) {
409
- * console.log(errors);
410
- * });
411
- */
412
- loadIFrameUrl(cb, errorCb = (errors) => { }) {
413
- this.link.setParams({ configuration_tokens: '' });
414
- if (this.configTokens.length) {
415
- this.link.setParams({ configuration_tokens: this.configTokens.join(',') });
416
- return cb(this.link.getUrl());
417
- }
418
- Configuration.createEachToken(this.accessToken, this.configs, (tokens) => {
419
- this.link.concatParams({ configuration_tokens: tokens.join(',') });
420
- return cb(this.link.getUrl());
421
- }, (errors) => {
422
- errorCb(errors);
423
- });
424
- }
425
- /**
426
- * Method for setting a custom language code
427
- *
428
- * @example
429
- * config.setLanguage('en');
430
- * @param {string} code - ISO 639-1
431
- */
432
- setLanguage(code) {
433
- this.link.setParams({ language: code });
434
- }
435
- }
436
- export { MultiWidget };
437
- //# sourceMappingURL=../../src/lib/widget/multi-widget.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"multi-widget.js","sourceRoot":"","sources":["../../widget/multi-widget.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAIL,KAAK,EACL,IAAI,EACJ,OAAO,EACP,oBAAoB,EAEpB,UAAU,GAGX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAMH,gBAAgB,GACnB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAC,YAAY,EAAC,MAAM,6BAA6B,CAAC;AAGzD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW;IAWb,kBAAkB,CAAC,sDAAsD;IACzE,YAAY,WAAmB,EAAE,IAAS;QAThC,YAAO,GAAoB,EAAE,CAAC;QAC9B,iBAAY,GAAa,EAAE,CAAC;QASlC,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC;QAElC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C,IAAI,CAAC,GAAG,CAAC,EAAC,CAAC,CAAC;YACzE,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;SACjC;QAED,aAAa,CAAC,eAAe,CACzB,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,OAAO,EACZ,CAAC,MAAgB,EAAE,EAAE;YACjB,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,EAAC,oBAAoB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAC,CAAC,CAAC;YACjE,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QAClC,CAAC,EACD,CAAC,MAAgB,EAAE,EAAE;YACjB,OAAO,CAAC,MAAM,CAAC,CAAC;QACpB,CAAC,CAAC,CAAC;IACX,CAAC;IAED;;;;;;OAMG;IACI,WAAW,CAAC,IAAI;QACnB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAA;IACzC,CAAC;CACJ;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -1,204 +0,0 @@
1
- /**
2
- * Current constant include available type of element for styling
3
- * @const STYLABLE_ELEMENT
4
- * @type {object}
5
- * @param {string} INPUT=input.
6
- * These states are available: [STYLABLE_ELEMENT_STATE.ERROR]{@link STYLABLE_ELEMENT_STATE}, [STYLABLE_ELEMENT_STATE.FOCUS]{@link STYLABLE_ELEMENT_STATE}.
7
- * These styles are available [IElementStyleInput]{@link IElementStyleInput}
8
- * @param {string} SUBMIT_BUTTON=submit_button
9
- * These states are available: [STYLABLE_ELEMENT_STATE.HOVER]{@link STYLABLE_ELEMENT_STATE}.
10
- * These styles are available [IElementStyleSubmitButton]{@link IElementStyleSubmitButton}
11
- * @param {string} LABEL=label.
12
- * These styles are available [IElementStyleLabel]{@link IElementStyleLabel}
13
- * @param {string} TITLE=title.
14
- * These styles are available [IElementStyleTitle]{@link IElementStyleTitle}
15
- * @param {string} TITLE_DESCRIPTION=title_description.
16
- * These styles are available [IElementStyleTitleDescription]{@link IElementStyleTitleDescription}
17
- * */
18
- export const STYLABLE_ELEMENT = {
19
- INPUT: 'input',
20
- SUBMIT_BUTTON: 'submit_button',
21
- LABEL: 'label',
22
- TITLE: 'title',
23
- TITLE_DESCRIPTION: 'title_description',
24
- };
25
- /**
26
- * Current constant include available states of element for styling
27
- * @const STYLABLE_ELEMENT_STATE
28
- * @type {object}
29
- * @param {string} ERROR=error client|server validation. This state applies to: input
30
- * @param {string} FOCUS=focus focus. This state applies to: input
31
- * @param {string} HOVER=hover focus. This state applies to: submit_button
32
- * */
33
- export const STYLABLE_ELEMENT_STATE = {
34
- ERROR: 'error',
35
- FOCUS: 'focus',
36
- HOVER: 'hover',
37
- };
38
- export const stylableElements = [
39
- {
40
- element: STYLABLE_ELEMENT.INPUT,
41
- states: [
42
- STYLABLE_ELEMENT_STATE.FOCUS,
43
- STYLABLE_ELEMENT_STATE.ERROR,
44
- ],
45
- styles: [
46
- 'color',
47
- 'border',
48
- 'border_radius',
49
- 'background_color',
50
- 'height',
51
- 'text_decoration',
52
- 'font_size',
53
- 'font_family',
54
- 'line_height',
55
- 'font_weight',
56
- 'padding',
57
- 'margin',
58
- 'transition',
59
- ],
60
- },
61
- {
62
- element: STYLABLE_ELEMENT.SUBMIT_BUTTON,
63
- states: [
64
- STYLABLE_ELEMENT_STATE.HOVER,
65
- ],
66
- styles: [
67
- 'color',
68
- 'border',
69
- 'border_radius',
70
- 'background_color',
71
- 'text_decoration',
72
- 'font_size',
73
- 'font_family',
74
- 'line_height',
75
- 'font_weight',
76
- 'padding',
77
- 'margin',
78
- 'transition',
79
- 'opacity',
80
- ],
81
- },
82
- {
83
- element: STYLABLE_ELEMENT.LABEL,
84
- states: [],
85
- styles: [
86
- 'color',
87
- 'text_decoration',
88
- 'font_size',
89
- 'font_family',
90
- 'line_height',
91
- 'font_weight',
92
- 'padding',
93
- 'margin',
94
- ],
95
- },
96
- {
97
- element: STYLABLE_ELEMENT.TITLE,
98
- states: [],
99
- styles: [
100
- 'color',
101
- 'text_decoration',
102
- 'font_size',
103
- 'font_family',
104
- 'line_height',
105
- 'font_weight',
106
- 'padding',
107
- 'margin',
108
- 'text_align',
109
- ],
110
- },
111
- {
112
- element: STYLABLE_ELEMENT.TITLE_DESCRIPTION,
113
- states: [],
114
- styles: [
115
- 'color',
116
- 'text_decoration',
117
- 'font_size',
118
- 'font_family',
119
- 'line_height',
120
- 'font_weight',
121
- 'padding',
122
- 'margin',
123
- 'text_align',
124
- ],
125
- },
126
- ];
127
- /**
128
- * Interface for styling input element.
129
- * @interface IElementStyleInput
130
- *
131
- * @param {string} [color] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/color}
132
- * @param {string} [border] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/border}
133
- * @param {string} [border_radius] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius}
134
- * @param {string} [background_color] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/background-color}
135
- * @param {string} [height] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/height}
136
- * @param {string} [text_decoration] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration}
137
- * @param {string} [font_size] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}
138
- * @param {string} [font_family] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/font-family}
139
- * @param {string} [transition] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/transition}
140
- * @param {string} [line_height] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/line-height}
141
- * @param {string} [font_weight] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}
142
- * @param {string} [padding] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/padding}
143
- * @param {string} [margin] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/margin}
144
- */
145
- /**
146
- * Interface for styling submit_button element.
147
- * @interface IElementStyleSubmitButton
148
- *
149
- * @param {string} [color] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/color}
150
- * @param {string} [border] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/border}
151
- * @param {string} [border_radius] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius}
152
- * @param {string} [background_color] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/background-color}
153
- * @param {string} [text_decoration] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration}
154
- * @param {string} [font_size] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}
155
- * @param {string} [font_family] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/font-family}
156
- * @param {string} [padding] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/padding}
157
- * @param {string} [margin] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/margin}
158
- * @param {string} [transition] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/transition}
159
- * @param {string} [line_height] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/line-height}
160
- * @param {string} [font_weight] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}
161
- * @param {string} [opacity] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/opacity}
162
- */
163
- /**
164
- * Interface for styling label element.
165
- * @interface IElementStyleLabel
166
- *
167
- * @param {string} [color] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/color}
168
- * @param {string} [text_decoration] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration}
169
- * @param {string} [font_size] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}
170
- * @param {string} [font_family] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/font-family}
171
- * @param {string} [line_height] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/line-height}
172
- * @param {string} [font_weight] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}
173
- * @param {string} [padding] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/padding}
174
- * @param {string} [margin] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/margin}
175
- */
176
- /**
177
- * Interface for styling title element.
178
- * @interface IElementStyleTitle
179
- *
180
- * @param {string} [color] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/color}
181
- * @param {string} [text_decoration] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration}
182
- * @param {string} [font_size] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}
183
- * @param {string} [font_family] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/font-family}
184
- * @param {string} [line_height] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/line-height}
185
- * @param {string} [font_weight] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}
186
- * @param {string} [padding] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/padding}
187
- * @param {string} [margin] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/margin}
188
- * @param {string} ['text-align',] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/text-align}
189
- */
190
- /**
191
- * Interface for styling title_description element.
192
- * @interface IElementStyleTitleDescription
193
- *
194
- * @param {string} [color] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/color}
195
- * @param {string} [text_decoration] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration}
196
- * @param {string} [font_size] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}
197
- * @param {string} [font_family] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/font-family}
198
- * @param {string} [line_height] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/line-height}
199
- * @param {string} [font_weight] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}
200
- * @param {string} [padding] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/padding}
201
- * @param {string} [margin] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/margin}
202
- * @param {string} ['text-align',] Look more [mozilla.org/color]{@link https://developer.mozilla.org/en-US/docs/Web/CSS/text-align}
203
- */
204
- //# sourceMappingURL=../../src/lib/widget/style.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"style.js","sourceRoot":"","sources":["../../widget/style.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;KAgBK;AACL,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,KAAK,EAAE,OAAO;IACd,aAAa,EAAE,eAAe;IAC9B,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,iBAAiB,EAAE,mBAAmB;CACzC,CAAA;AAGD;;;;;;;KAOK;AACL,MAAM,CAAC,MAAM,sBAAsB,GAAG;IAClC,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;CACjB,CAAA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