@paydock/client-sdk 1.104.3-beta → 1.105.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (490) hide show
  1. package/.nvmrc +1 -0
  2. package/README.md +572 -290
  3. package/api.d.ts +1 -0
  4. package/api.js +1 -0
  5. package/bundles/widget.umd.js +9130 -8655
  6. package/bundles/widget.umd.min.js +1 -2
  7. package/canvas3ds.d.ts +1 -0
  8. package/canvas3ds.js +1 -0
  9. package/checkout-button.d.ts +1 -0
  10. package/checkout-button.js +1 -0
  11. package/inicialization-guide.md +7 -0
  12. package/{bundles/types → lib}/api/api-base.d.ts +1 -2
  13. package/lib/api/api-base.js +101 -0
  14. package/lib/api/api-base.js.map +1 -0
  15. package/{bundles/types → lib}/api/api-charge-internal.d.ts +0 -1
  16. package/lib/api/api-charge-internal.js +30 -0
  17. package/lib/api/api-charge-internal.js.map +1 -0
  18. package/{bundles/types → lib}/api/api-charge.d.ts +0 -1
  19. package/lib/api/api-charge.js +49 -0
  20. package/lib/api/api-charge.js.map +1 -0
  21. package/{bundles/types → lib}/api/api-internal.d.ts +0 -1
  22. package/lib/api/api-internal.js +13 -0
  23. package/lib/api/api-internal.js.map +1 -0
  24. package/{bundles/types → lib}/api/api-service-internal.d.ts +0 -1
  25. package/lib/api/api-service-internal.js +18 -0
  26. package/lib/api/api-service-internal.js.map +1 -0
  27. package/{bundles/types → lib}/api/api.d.ts +1 -2
  28. package/lib/api/api.js +62 -0
  29. package/lib/api/api.js.map +1 -0
  30. package/lib/api/index.d.ts +1 -0
  31. package/lib/api/index.js +2 -0
  32. package/lib/api/index.js.map +1 -0
  33. package/{bundles/types → lib}/canvas-3ds/canvas-3ds.d.ts +1 -2
  34. package/lib/canvas-3ds/canvas-3ds.js +157 -0
  35. package/lib/canvas-3ds/canvas-3ds.js.map +1 -0
  36. package/{bundles/types → lib}/canvas-3ds/index.d.ts +0 -1
  37. package/lib/canvas-3ds/index.js +2 -0
  38. package/lib/canvas-3ds/index.js.map +1 -0
  39. package/{bundles/types → lib}/canvas-3ds/services/gpayments-service.d.ts +0 -1
  40. package/lib/canvas-3ds/services/gpayments-service.js +181 -0
  41. package/lib/canvas-3ds/services/gpayments-service.js.map +1 -0
  42. package/{bundles/types → lib}/canvas-3ds/services/index.d.ts +0 -1
  43. package/lib/canvas-3ds/services/index.js +2 -0
  44. package/lib/canvas-3ds/services/index.js.map +1 -0
  45. package/{bundles/types → lib}/canvas-3ds/services/standalone3ds-service.d.ts +0 -1
  46. package/lib/canvas-3ds/services/standalone3ds-service.js +32 -0
  47. package/lib/canvas-3ds/services/standalone3ds-service.js.map +1 -0
  48. package/{bundles/types → lib}/checkout-button/afterpay/afterpay-checkout-button.d.ts +1 -2
  49. package/lib/checkout-button/afterpay/afterpay-checkout-button.js +50 -0
  50. package/lib/checkout-button/afterpay/afterpay-checkout-button.js.map +1 -0
  51. package/{bundles/types → lib}/checkout-button/afterpay/afterpay.runner.d.ts +0 -1
  52. package/lib/checkout-button/afterpay/afterpay.runner.js +41 -0
  53. package/lib/checkout-button/afterpay/afterpay.runner.js.map +1 -0
  54. package/{bundles/types → lib}/checkout-button/checkout-button.d.ts +1 -2
  55. package/{bundles/types → lib}/checkout-button/checkout-button.interface.d.ts +0 -1
  56. package/lib/checkout-button/checkout-button.interface.js +45 -0
  57. package/lib/checkout-button/checkout-button.interface.js.map +1 -0
  58. package/lib/checkout-button/checkout-button.js +266 -0
  59. package/lib/checkout-button/checkout-button.js.map +1 -0
  60. package/{bundles/types → lib}/checkout-button/checkout-contextual-handler.d.ts +0 -1
  61. package/lib/checkout-button/checkout-contextual-handler.js +75 -0
  62. package/lib/checkout-button/checkout-contextual-handler.js.map +1 -0
  63. package/{bundles/types → lib}/checkout-button/index.d.ts +1 -2
  64. package/lib/checkout-button/index.js +85 -0
  65. package/lib/checkout-button/index.js.map +1 -0
  66. package/{bundles/types → lib}/checkout-button/paypal/paypal-checkout-button.d.ts +1 -2
  67. package/lib/checkout-button/paypal/paypal-checkout-button.js +25 -0
  68. package/lib/checkout-button/paypal/paypal-checkout-button.js.map +1 -0
  69. package/{bundles/types → lib}/checkout-button/paypal/paypal.runner.d.ts +0 -1
  70. package/lib/checkout-button/paypal/paypal.runner.js +14 -0
  71. package/lib/checkout-button/paypal/paypal.runner.js.map +1 -0
  72. package/{bundles/types → lib}/checkout-button/runner/base.runner.d.ts +3 -4
  73. package/lib/checkout-button/runner/base.runner.js +13 -0
  74. package/lib/checkout-button/runner/base.runner.js.map +1 -0
  75. package/{bundles/types → lib}/checkout-button/runner/contextual.runner.d.ts +1 -2
  76. package/lib/checkout-button/runner/contextual.runner.js +40 -0
  77. package/lib/checkout-button/runner/contextual.runner.js.map +1 -0
  78. package/{bundles/types → lib}/checkout-button/runner/index.d.ts +0 -1
  79. package/lib/checkout-button/runner/index.js +11 -0
  80. package/lib/checkout-button/runner/index.js.map +1 -0
  81. package/{bundles/types → lib}/checkout-button/runner/popup.runner.d.ts +1 -2
  82. package/lib/checkout-button/runner/popup.runner.js +68 -0
  83. package/lib/checkout-button/runner/popup.runner.js.map +1 -0
  84. package/{bundles/types → lib}/checkout-button/runner/redirect.runner.d.ts +1 -2
  85. package/lib/checkout-button/runner/redirect.runner.js +15 -0
  86. package/lib/checkout-button/runner/redirect.runner.js.map +1 -0
  87. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-checkout-button.d.ts +1 -2
  88. package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js +64 -0
  89. package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js.map +1 -0
  90. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts +1 -2
  91. package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js +78 -0
  92. package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js.map +1 -0
  93. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts +1 -2
  94. package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js +49 -0
  95. package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js.map +1 -0
  96. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.config.d.ts +0 -1
  97. package/lib/checkout-button/zipmoney/zipmoney.config.js +4 -0
  98. package/lib/checkout-button/zipmoney/zipmoney.config.js.map +1 -0
  99. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.runner.d.ts +1 -2
  100. package/lib/checkout-button/zipmoney/zipmoney.runner.js +23 -0
  101. package/lib/checkout-button/zipmoney/zipmoney.runner.js.map +1 -0
  102. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.types.d.ts +0 -1
  103. package/lib/checkout-button/zipmoney/zipmoney.types.js +1 -0
  104. package/lib/checkout-button/zipmoney/zipmoney.types.js.map +1 -0
  105. package/{bundles/types → lib}/components/ability-guard.d.ts +0 -1
  106. package/lib/components/ability-guard.js +44 -0
  107. package/lib/components/ability-guard.js.map +1 -0
  108. package/{bundles/types → lib}/components/background.d.ts +0 -1
  109. package/lib/components/background.js +193 -0
  110. package/lib/components/background.js.map +1 -0
  111. package/{bundles/types → lib}/components/container.d.ts +1 -1
  112. package/lib/components/container.js +63 -0
  113. package/lib/components/container.js.map +1 -0
  114. package/{bundles/types → lib}/components/dispatcher.d.ts +1 -2
  115. package/lib/components/dispatcher.js +39 -0
  116. package/lib/components/dispatcher.js.map +1 -0
  117. package/{bundles/types → lib}/components/element-style.d.ts +1 -2
  118. package/lib/components/element-style.js +52 -0
  119. package/lib/components/element-style.js.map +1 -0
  120. package/{bundles/types → lib}/components/flypay-iframe-event.d.ts +0 -1
  121. package/lib/components/flypay-iframe-event.js +28 -0
  122. package/lib/components/flypay-iframe-event.js.map +1 -0
  123. package/{bundles/types/components/form-interceptor.d.ts → lib/components/form-Interceptor.d.ts} +0 -1
  124. package/lib/components/form-Interceptor.js +38 -0
  125. package/lib/components/form-Interceptor.js.map +1 -0
  126. package/{bundles/types → lib}/components/http-core.d.ts +0 -1
  127. package/lib/components/http-core.js +57 -0
  128. package/lib/components/http-core.js.map +1 -0
  129. package/{bundles/types → lib}/components/iframe-event.d.ts +15 -13
  130. package/lib/components/iframe-event.js +75 -0
  131. package/lib/components/iframe-event.js.map +1 -0
  132. package/{bundles/types → lib}/components/iframe.d.ts +0 -1
  133. package/lib/components/iframe.js +62 -0
  134. package/lib/components/iframe.js.map +1 -0
  135. package/{bundles/types → lib}/components/link.d.ts +1 -2
  136. package/lib/components/link.js +59 -0
  137. package/lib/components/link.js.map +1 -0
  138. package/{bundles/types → lib}/components/loader.d.ts +0 -1
  139. package/lib/components/loader.js +234 -0
  140. package/lib/components/loader.js.map +1 -0
  141. package/{bundles/types → lib}/components/param.d.ts +9 -12
  142. package/lib/components/param.js +147 -0
  143. package/lib/components/param.js.map +1 -0
  144. package/{bundles/types → lib}/components/popup.d.ts +0 -1
  145. package/lib/components/popup.js +104 -0
  146. package/lib/components/popup.js.map +1 -0
  147. package/{bundles/types → lib}/components/storage-dispatcher.d.ts +0 -1
  148. package/lib/components/storage-dispatcher.js +75 -0
  149. package/lib/components/storage-dispatcher.js.map +1 -0
  150. package/{bundles/types → lib}/components/trigger.d.ts +0 -1
  151. package/lib/components/trigger.js +49 -0
  152. package/lib/components/trigger.js.map +1 -0
  153. package/{bundles/types → lib}/components/vault-display-iframe-event.d.ts +0 -1
  154. package/lib/components/vault-display-iframe-event.js +27 -0
  155. package/lib/components/vault-display-iframe-event.js.map +1 -0
  156. package/{bundles/types → lib}/components/wallet-background.d.ts +2 -2
  157. package/lib/components/wallet-background.js +63 -0
  158. package/lib/components/wallet-background.js.map +1 -0
  159. package/{bundles/types → lib}/components/wallet-trigger.d.ts +0 -1
  160. package/lib/components/wallet-trigger.js +27 -0
  161. package/lib/components/wallet-trigger.js.map +1 -0
  162. package/{bundles/types/configs/env/environment.paydock.d.ts → lib/configs/env/env.d.ts} +8 -5
  163. package/lib/configs/env/env.js +117 -0
  164. package/lib/configs/env/env.js.map +1 -0
  165. package/{bundles/types → lib}/configs/sdk.d.ts +2 -3
  166. package/lib/configs/sdk.js +16 -0
  167. package/lib/configs/sdk.js.map +1 -0
  168. package/lib/constants/validators.d.ts +44 -0
  169. package/lib/constants/validators.js +42 -0
  170. package/lib/constants/validators.js.map +1 -0
  171. package/{bundles/types → lib}/external-checkout/builder.d.ts +0 -1
  172. package/lib/external-checkout/builder.js +45 -0
  173. package/lib/external-checkout/builder.js.map +1 -0
  174. package/{bundles/types → lib}/external-checkout/checker.d.ts +0 -1
  175. package/lib/external-checkout/checker.js +22 -0
  176. package/lib/external-checkout/checker.js.map +1 -0
  177. package/lib/external-checkout/index.d.ts +2 -0
  178. package/lib/external-checkout/index.js +3 -0
  179. package/lib/external-checkout/index.js.map +1 -0
  180. package/{bundles/types → lib}/helper/access-token.d.ts +0 -1
  181. package/lib/helper/access-token.js +44 -0
  182. package/lib/helper/access-token.js.map +1 -0
  183. package/{bundles/types → lib}/helper/browser.d.ts +0 -1
  184. package/lib/helper/browser.js +79 -0
  185. package/lib/helper/browser.js.map +1 -0
  186. package/{bundles/types → lib}/helper/event-emitter.d.ts +0 -1
  187. package/lib/helper/event-emitter.js +23 -0
  188. package/lib/helper/event-emitter.js.map +1 -0
  189. package/{bundles/types → lib}/helper/event.d.ts +0 -1
  190. package/lib/helper/event.js +23 -0
  191. package/lib/helper/event.js.map +1 -0
  192. package/{bundles/types → lib}/helper/ms.d.ts +0 -1
  193. package/lib/helper/ms.js +32 -0
  194. package/lib/helper/ms.js.map +1 -0
  195. package/{bundles/types → lib}/helper/object.d.ts +0 -1
  196. package/lib/helper/object.js +6 -0
  197. package/lib/helper/object.js.map +1 -0
  198. package/{bundles/types → lib}/helper/url.d.ts +0 -1
  199. package/lib/helper/url.js +11 -0
  200. package/lib/helper/url.js.map +1 -0
  201. package/{bundles/types → lib}/helper/uuid.d.ts +0 -1
  202. package/lib/helper/uuid.js +26 -0
  203. package/lib/helper/uuid.js.map +1 -0
  204. package/lib/index.d.ts +15 -0
  205. package/lib/index.js +15 -0
  206. package/lib/index.js.map +1 -0
  207. package/{bundles/types → lib}/payment-source/builder.d.ts +0 -1
  208. package/lib/payment-source/builder.js +49 -0
  209. package/lib/payment-source/builder.js.map +1 -0
  210. package/{bundles/types → lib}/payment-source/index.d.ts +0 -1
  211. package/lib/payment-source/index.js +2 -0
  212. package/lib/payment-source/index.js.map +1 -0
  213. package/{bundles/types → lib}/payment-source-widget/html-payment-source-widget.d.ts +17 -14
  214. package/lib/payment-source-widget/html-payment-source-widget.js +172 -0
  215. package/lib/payment-source-widget/html-payment-source-widget.js.map +1 -0
  216. package/{bundles/types → lib}/payment-source-widget/index.d.ts +0 -1
  217. package/lib/payment-source-widget/index.js +35 -0
  218. package/lib/payment-source-widget/index.js.map +1 -0
  219. package/{bundles/types → lib}/payment-source-widget/interfaces.d.ts +0 -1
  220. package/lib/payment-source-widget/interfaces.js +2 -0
  221. package/lib/payment-source-widget/interfaces.js.map +1 -0
  222. package/{bundles/types → lib}/payment-source-widget/payment-source-widget.d.ts +1 -2
  223. package/lib/payment-source-widget/payment-source-widget.js +142 -0
  224. package/lib/payment-source-widget/payment-source-widget.js.map +1 -0
  225. package/{bundles/types → lib}/secure-remote-commerce/index.d.ts +0 -1
  226. package/lib/secure-remote-commerce/index.js +2 -0
  227. package/lib/secure-remote-commerce/index.js.map +1 -0
  228. package/{bundles/types → lib}/secure-remote-commerce/interfaces.d.ts +5 -6
  229. package/lib/secure-remote-commerce/interfaces.js +28 -0
  230. package/lib/secure-remote-commerce/interfaces.js.map +1 -0
  231. package/{bundles/types → lib}/secure-remote-commerce/providers/src-provider.d.ts +0 -1
  232. package/lib/secure-remote-commerce/providers/src-provider.js +1 -0
  233. package/lib/secure-remote-commerce/providers/src-provider.js.map +1 -0
  234. package/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/helper.d.ts +0 -1
  235. package/lib/secure-remote-commerce/providers/visa-src/helper.js +36 -0
  236. package/lib/secure-remote-commerce/providers/visa-src/helper.js.map +1 -0
  237. package/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/index.d.ts +0 -1
  238. package/lib/secure-remote-commerce/providers/visa-src/index.js +2 -0
  239. package/lib/secure-remote-commerce/providers/visa-src/index.js.map +1 -0
  240. package/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/visa-src.d.ts +0 -1
  241. package/lib/secure-remote-commerce/providers/visa-src/visa-src.js +113 -0
  242. package/lib/secure-remote-commerce/providers/visa-src/visa-src.js.map +1 -0
  243. package/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts +0 -1
  244. package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js +10 -0
  245. package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js.map +1 -0
  246. package/{bundles/types → lib}/secure-remote-commerce/secure-remote-commerce.d.ts +1 -2
  247. package/lib/secure-remote-commerce/secure-remote-commerce.js +239 -0
  248. package/lib/secure-remote-commerce/secure-remote-commerce.js.map +1 -0
  249. package/{bundles/types → lib}/vault-display-widget/index.d.ts +0 -1
  250. package/lib/vault-display-widget/index.js +14 -0
  251. package/lib/vault-display-widget/index.js.map +1 -0
  252. package/{bundles/types → lib}/vault-display-widget/vault-display-widget.d.ts +1 -2
  253. package/lib/vault-display-widget/vault-display-widget.js +99 -0
  254. package/lib/vault-display-widget/vault-display-widget.js.map +1 -0
  255. package/{bundles/types → lib}/wallet-buttons/afterpay.wallet-service.d.ts +0 -1
  256. package/lib/wallet-buttons/afterpay.wallet-service.js +152 -0
  257. package/lib/wallet-buttons/afterpay.wallet-service.js.map +1 -0
  258. package/{bundles/types → lib}/wallet-buttons/apple.wallet-service.d.ts +2 -1
  259. package/lib/wallet-buttons/apple.wallet-service.js +324 -0
  260. package/lib/wallet-buttons/apple.wallet-service.js.map +1 -0
  261. package/{bundles/types → lib}/wallet-buttons/flypay-v2.wallet-service.d.ts +9 -2
  262. package/lib/wallet-buttons/flypay-v2.wallet-service.js +165 -0
  263. package/lib/wallet-buttons/flypay-v2.wallet-service.js.map +1 -0
  264. package/{bundles/types → lib}/wallet-buttons/flypay.wallet-service.d.ts +0 -1
  265. package/lib/wallet-buttons/flypay.wallet-service.js +117 -0
  266. package/lib/wallet-buttons/flypay.wallet-service.js.map +1 -0
  267. package/{bundles/types → lib}/wallet-buttons/google.wallet-service.d.ts +3 -1
  268. package/lib/wallet-buttons/google.wallet-service.js +301 -0
  269. package/lib/wallet-buttons/google.wallet-service.js.map +1 -0
  270. package/lib/wallet-buttons/helpers/flypay-v2.helper.d.ts +3 -0
  271. package/lib/wallet-buttons/helpers/flypay-v2.helper.js +151 -0
  272. package/lib/wallet-buttons/helpers/flypay-v2.helper.js.map +1 -0
  273. package/lib/wallet-buttons/index.d.ts +127 -0
  274. package/lib/wallet-buttons/index.js +128 -0
  275. package/lib/wallet-buttons/index.js.map +1 -0
  276. package/{bundles/types → lib}/wallet-buttons/interfaces.d.ts +3 -1
  277. package/lib/wallet-buttons/interfaces.js +1 -0
  278. package/lib/wallet-buttons/interfaces.js.map +1 -0
  279. package/{bundles/types → lib}/wallet-buttons/mastercard.wallet-service.d.ts +0 -1
  280. package/lib/wallet-buttons/mastercard.wallet-service.js +27 -0
  281. package/lib/wallet-buttons/mastercard.wallet-service.js.map +1 -0
  282. package/{bundles/types → lib}/wallet-buttons/paypal.wallet-service.d.ts +0 -1
  283. package/lib/wallet-buttons/paypal.wallet-service.js +144 -0
  284. package/lib/wallet-buttons/paypal.wallet-service.js.map +1 -0
  285. package/{bundles/types → lib}/wallet-buttons/stripe.wallet-service.d.ts +0 -1
  286. package/lib/wallet-buttons/stripe.wallet-service.js +100 -0
  287. package/lib/wallet-buttons/stripe.wallet-service.js.map +1 -0
  288. package/{bundles/types/wallet-buttons/wallet-cba-buttons.d.ts → lib/wallet-buttons/wallet-buttons.d.ts} +92 -115
  289. package/lib/wallet-buttons/wallet-buttons.js +479 -0
  290. package/lib/wallet-buttons/wallet-buttons.js.map +1 -0
  291. package/{bundles/types → lib}/wallet-buttons/wallet-service.d.ts +7 -1
  292. package/lib/wallet-buttons/wallet-service.js +60 -0
  293. package/lib/wallet-buttons/wallet-service.js.map +1 -0
  294. package/{bundles/types → lib}/widget/configuration.d.ts +2 -3
  295. package/lib/widget/configuration.js +260 -0
  296. package/lib/widget/configuration.js.map +1 -0
  297. package/lib/widget/html-multi-widget.d.ts +336 -0
  298. package/lib/widget/html-multi-widget.js +422 -0
  299. package/lib/widget/html-multi-widget.js.map +1 -0
  300. package/{bundles/types → lib}/widget/html-widget.d.ts +1 -2
  301. package/lib/widget/html-widget.js +127 -0
  302. package/lib/widget/html-widget.js.map +1 -0
  303. package/{bundles/types → lib}/widget/index.d.ts +1 -2
  304. package/lib/widget/index.js +132 -0
  305. package/lib/widget/index.js.map +1 -0
  306. package/{bundles/types → lib}/widget/meta.d.ts +0 -1
  307. package/lib/widget/meta.js +8 -0
  308. package/lib/widget/meta.js.map +1 -0
  309. package/{bundles/types → lib}/widget/multi-widget.d.ts +1 -2
  310. package/lib/widget/multi-widget.js +437 -0
  311. package/lib/widget/multi-widget.js.map +1 -0
  312. package/{bundles/types → lib}/widget/style.d.ts +0 -1
  313. package/lib/widget/style.js +204 -0
  314. package/lib/widget/style.js.map +1 -0
  315. package/package.json +42 -164
  316. package/payment-source-widget.d.ts +1 -0
  317. package/payment-source-widget.js +1 -0
  318. package/slate.md +136 -107
  319. package/tslint.json +129 -0
  320. package/typings/globals/@auspayplus/open-payments-checkout/index.d.ts +43 -0
  321. package/typings/globals/jasmine/index.d.ts +576 -0
  322. package/typings/globals/jasmine-ajax/index.d.ts +83 -0
  323. package/typings/globals/jquery/index.d.ts +3759 -0
  324. package/typings/index.d.ts +4 -0
  325. package/vault-display-widget.d.ts +1 -0
  326. package/vault-display-widget.js +1 -0
  327. package/vendors/zipmoney.d.ts +18 -0
  328. package/vendors/zipmoney.js +2 -0
  329. package/widget.d.ts +1 -0
  330. package/widget.js +1 -0
  331. package/bundles/index.cjs +0 -10674
  332. package/bundles/index.cjs.d.ts +0 -3163
  333. package/bundles/index.cjs.map +0 -1
  334. package/bundles/index.mjs +0 -10642
  335. package/bundles/index.mjs.d.ts +0 -3163
  336. package/bundles/index.mjs.map +0 -1
  337. package/bundles/types/api/api-base.d.ts.map +0 -1
  338. package/bundles/types/api/api-charge-internal.d.ts.map +0 -1
  339. package/bundles/types/api/api-charge.d.ts.map +0 -1
  340. package/bundles/types/api/api-internal.d.ts.map +0 -1
  341. package/bundles/types/api/api-service-internal.d.ts.map +0 -1
  342. package/bundles/types/api/api.d.ts.map +0 -1
  343. package/bundles/types/api/index.d.ts +0 -2
  344. package/bundles/types/api/index.d.ts.map +0 -1
  345. package/bundles/types/canvas-3ds/canvas-3ds.d.ts.map +0 -1
  346. package/bundles/types/canvas-3ds/index.d.ts.map +0 -1
  347. package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +0 -1
  348. package/bundles/types/canvas-3ds/services/index.d.ts.map +0 -1
  349. package/bundles/types/canvas-3ds/services/standalone3ds-service.d.ts.map +0 -1
  350. package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts.map +0 -1
  351. package/bundles/types/checkout-button/afterpay/afterpay.runner.d.ts.map +0 -1
  352. package/bundles/types/checkout-button/checkout-button.d.ts.map +0 -1
  353. package/bundles/types/checkout-button/checkout-button.interface.d.ts.map +0 -1
  354. package/bundles/types/checkout-button/checkout-contextual-handler.d.ts.map +0 -1
  355. package/bundles/types/checkout-button/index.d.ts.map +0 -1
  356. package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts.map +0 -1
  357. package/bundles/types/checkout-button/paypal/paypal.runner.d.ts.map +0 -1
  358. package/bundles/types/checkout-button/runner/base.runner.d.ts.map +0 -1
  359. package/bundles/types/checkout-button/runner/contextual.runner.d.ts.map +0 -1
  360. package/bundles/types/checkout-button/runner/index.d.ts.map +0 -1
  361. package/bundles/types/checkout-button/runner/popup.runner.d.ts.map +0 -1
  362. package/bundles/types/checkout-button/runner/redirect.runner.d.ts.map +0 -1
  363. package/bundles/types/checkout-button/zipmoney/index.d.ts +0 -4
  364. package/bundles/types/checkout-button/zipmoney/index.d.ts.map +0 -1
  365. package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts.map +0 -1
  366. package/bundles/types/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts.map +0 -1
  367. package/bundles/types/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts.map +0 -1
  368. package/bundles/types/checkout-button/zipmoney/zipmoney.config.d.ts.map +0 -1
  369. package/bundles/types/checkout-button/zipmoney/zipmoney.runner.d.ts.map +0 -1
  370. package/bundles/types/checkout-button/zipmoney/zipmoney.types.d.ts.map +0 -1
  371. package/bundles/types/components/ability-guard.d.ts.map +0 -1
  372. package/bundles/types/components/background.d.ts.map +0 -1
  373. package/bundles/types/components/container.d.ts.map +0 -1
  374. package/bundles/types/components/dispatcher.d.ts.map +0 -1
  375. package/bundles/types/components/element-style.d.ts.map +0 -1
  376. package/bundles/types/components/flypay-iframe-event.d.ts.map +0 -1
  377. package/bundles/types/components/form-interceptor.d.ts.map +0 -1
  378. package/bundles/types/components/http-core.d.ts.map +0 -1
  379. package/bundles/types/components/iframe-event.d.ts.map +0 -1
  380. package/bundles/types/components/iframe.d.ts.map +0 -1
  381. package/bundles/types/components/link.d.ts.map +0 -1
  382. package/bundles/types/components/loader.d.ts.map +0 -1
  383. package/bundles/types/components/param.d.ts.map +0 -1
  384. package/bundles/types/components/popup.d.ts.map +0 -1
  385. package/bundles/types/components/storage-dispatcher.d.ts.map +0 -1
  386. package/bundles/types/components/trigger.d.ts.map +0 -1
  387. package/bundles/types/components/vault-display-iframe-event.d.ts.map +0 -1
  388. package/bundles/types/components/wallet-background.d.ts.map +0 -1
  389. package/bundles/types/components/wallet-trigger.d.ts.map +0 -1
  390. package/bundles/types/configs/env/environment.cba.d.ts +0 -29
  391. package/bundles/types/configs/env/environment.cba.d.ts.map +0 -1
  392. package/bundles/types/configs/env/environment.interface.d.ts +0 -12
  393. package/bundles/types/configs/env/environment.interface.d.ts.map +0 -1
  394. package/bundles/types/configs/env/environment.paydock.d.ts.map +0 -1
  395. package/bundles/types/configs/env/index.d.ts +0 -3
  396. package/bundles/types/configs/env/index.d.ts.map +0 -1
  397. package/bundles/types/configs/sdk.d.ts.map +0 -1
  398. package/bundles/types/external-checkout/builder.d.ts.map +0 -1
  399. package/bundles/types/external-checkout/checker.d.ts.map +0 -1
  400. package/bundles/types/external-checkout/index.d.ts +0 -3
  401. package/bundles/types/external-checkout/index.d.ts.map +0 -1
  402. package/bundles/types/helper/access-token.d.ts.map +0 -1
  403. package/bundles/types/helper/browser.d.ts.map +0 -1
  404. package/bundles/types/helper/event-emitter.d.ts.map +0 -1
  405. package/bundles/types/helper/event.d.ts.map +0 -1
  406. package/bundles/types/helper/ms.d.ts.map +0 -1
  407. package/bundles/types/helper/object.d.ts.map +0 -1
  408. package/bundles/types/helper/url.d.ts.map +0 -1
  409. package/bundles/types/helper/uuid.d.ts.map +0 -1
  410. package/bundles/types/index-cba.d.ts +0 -13
  411. package/bundles/types/index-cba.d.ts.map +0 -1
  412. package/bundles/types/index.d.ts +0 -14
  413. package/bundles/types/index.d.ts.map +0 -1
  414. package/bundles/types/payment-source/builder.d.ts.map +0 -1
  415. package/bundles/types/payment-source/index.d.ts.map +0 -1
  416. package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts.map +0 -1
  417. package/bundles/types/payment-source-widget/index.d.ts.map +0 -1
  418. package/bundles/types/payment-source-widget/interfaces.d.ts.map +0 -1
  419. package/bundles/types/payment-source-widget/payment-source-widget.d.ts.map +0 -1
  420. package/bundles/types/secure-remote-commerce/index.d.ts.map +0 -1
  421. package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +0 -1
  422. package/bundles/types/secure-remote-commerce/providers/src-provider.d.ts.map +0 -1
  423. package/bundles/types/secure-remote-commerce/providers/visa-src/helper.d.ts.map +0 -1
  424. package/bundles/types/secure-remote-commerce/providers/visa-src/index.d.ts.map +0 -1
  425. package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.d.ts.map +0 -1
  426. package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts.map +0 -1
  427. package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +0 -1
  428. package/bundles/types/vault-display-widget/index.d.ts.map +0 -1
  429. package/bundles/types/vault-display-widget/vault-display-widget.d.ts.map +0 -1
  430. package/bundles/types/wallet-buttons/afterpay.wallet-service.d.ts.map +0 -1
  431. package/bundles/types/wallet-buttons/apple.wallet-service.d.ts.map +0 -1
  432. package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts.map +0 -1
  433. package/bundles/types/wallet-buttons/flypay.wallet-service.d.ts.map +0 -1
  434. package/bundles/types/wallet-buttons/google.wallet-service.d.ts.map +0 -1
  435. package/bundles/types/wallet-buttons/index-cba.d.ts +0 -2
  436. package/bundles/types/wallet-buttons/index-cba.d.ts.map +0 -1
  437. package/bundles/types/wallet-buttons/index.d.ts +0 -2
  438. package/bundles/types/wallet-buttons/index.d.ts.map +0 -1
  439. package/bundles/types/wallet-buttons/interfaces.d.ts.map +0 -1
  440. package/bundles/types/wallet-buttons/mastercard.wallet-service.d.ts.map +0 -1
  441. package/bundles/types/wallet-buttons/paypal.wallet-service.d.ts.map +0 -1
  442. package/bundles/types/wallet-buttons/stripe.wallet-service.d.ts.map +0 -1
  443. package/bundles/types/wallet-buttons/wallet-buttons.d.ts +0 -366
  444. package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +0 -1
  445. package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts.map +0 -1
  446. package/bundles/types/wallet-buttons/wallet-service.d.ts.map +0 -1
  447. package/bundles/types/widget/configuration.d.ts.map +0 -1
  448. package/bundles/types/widget/html-multi-widget.d.ts +0 -266
  449. package/bundles/types/widget/html-multi-widget.d.ts.map +0 -1
  450. package/bundles/types/widget/html-widget.d.ts.map +0 -1
  451. package/bundles/types/widget/index.d.ts.map +0 -1
  452. package/bundles/types/widget/meta.d.ts.map +0 -1
  453. package/bundles/types/widget/multi-widget.d.ts.map +0 -1
  454. package/bundles/types/widget/style.d.ts.map +0 -1
  455. package/bundles/widget.umd.js.d.ts +0 -3163
  456. package/bundles/widget.umd.js.map +0 -1
  457. package/bundles/widget.umd.js.min.d.ts +0 -3163
  458. package/bundles/widget.umd.min.js.map +0 -1
  459. package/docs/api-canvas3ds.md +0 -158
  460. package/docs/api-checkout-button.md +0 -912
  461. package/docs/api-examples.md +0 -65
  462. package/docs/api-ps-widget.md +0 -585
  463. package/docs/api-vault-display.md +0 -94
  464. package/docs/api-widget.md +0 -2444
  465. package/docs/api-wrapper.md +0 -78
  466. package/docs/canvas3ds-examples.md +0 -242
  467. package/docs/cba-header.md +0 -13
  468. package/docs/cba-license.md +0 -2
  469. package/docs/checkout-examples.md +0 -248
  470. package/docs/header.md +0 -15
  471. package/docs/html/layout.html +0 -78
  472. package/docs/html/marked.js +0 -23
  473. package/docs/html/style.css +0 -365
  474. package/docs/install/npm.content.md +0 -16
  475. package/docs/install/npm.example.md +0 -24
  476. package/docs/install/umd.content.md +0 -20
  477. package/docs/install/umd.example.md +0 -6
  478. package/docs/install.md +0 -43
  479. package/docs/install.readme.t.md +0 -17
  480. package/docs/install.slate.t.md +0 -17
  481. package/docs/license.md +0 -2
  482. package/docs/partials/header.hbs +0 -3
  483. package/docs/ps-examples.md +0 -129
  484. package/docs/secure-remote-commerce-examples.md +0 -258
  485. package/docs/secure-remote-commerce.md +0 -265
  486. package/docs/vault-display-example.md +0 -132
  487. package/docs/wallet-buttons-examples.md +0 -580
  488. package/docs/wallet-buttons.md +0 -424
  489. package/docs/wallet-cba-buttons-examples.md +0 -388
  490. package/docs/widget-examples.md +0 -134
@@ -0,0 +1,117 @@
1
+ export const ENV = {
2
+ SANDBOX: 'sandbox',
3
+ SANDBOX_KOVENA: 'sandbox-kovena',
4
+ SANDBOX_DEMO: 'sandbox-demo',
5
+ SANDBOX_DEMO_KOVENA: 'sandbox-demo-kovena',
6
+ PROD: 'production',
7
+ STAGING: 'staging',
8
+ STAGING_1: 'staging_1',
9
+ STAGING_2: 'staging_2',
10
+ STAGING_3: 'staging_3',
11
+ STAGING_4: 'staging_4',
12
+ STAGING_5: 'staging_5',
13
+ STAGING_6: 'staging_6',
14
+ STAGING_7: 'staging_7',
15
+ STAGING_8: 'staging_8',
16
+ STAGING_9: 'staging_9',
17
+ STAGING_10: 'staging_10',
18
+ STAGING_11: 'staging_11',
19
+ STAGING_12: 'staging_12',
20
+ STAGING_13: 'staging_13',
21
+ STAGING_14: 'staging_14',
22
+ STAGING_15: 'staging_15',
23
+ };
24
+ export const WIDGET_URL = [
25
+ { env: ENV.SANDBOX, url: 'https://widget-sandbox.' },
26
+ { env: ENV.SANDBOX_KOVENA, url: 'https://widget-sandbox.' },
27
+ { env: ENV.SANDBOX_DEMO, url: 'https://widget-sandbox-demo.' },
28
+ { env: ENV.SANDBOX_DEMO_KOVENA, url: 'https://widget-sandbox-demo.' },
29
+ { env: ENV.PROD, url: 'https://widget.' },
30
+ { env: ENV.STAGING, url: 'https://widsta.' },
31
+ { env: ENV.STAGING_1, url: 'https://widsta-1.' },
32
+ { env: ENV.STAGING_2, url: 'https://widsta-2.' },
33
+ { env: ENV.STAGING_3, url: 'https://widsta-3.' },
34
+ { env: ENV.STAGING_4, url: 'https://widsta-4.' },
35
+ { env: ENV.STAGING_5, url: 'https://widsta-5.' },
36
+ { env: ENV.STAGING_6, url: 'https://widsta-6.' },
37
+ { env: ENV.STAGING_7, url: 'https://widsta-7.' },
38
+ { env: ENV.STAGING_8, url: 'https://widsta-8.' },
39
+ { env: ENV.STAGING_9, url: 'https://widsta-9.' },
40
+ { env: ENV.STAGING_10, url: 'https://widsta-10.' },
41
+ { env: ENV.STAGING_11, url: 'https://widsta-11.' },
42
+ { env: ENV.STAGING_12, url: 'https://widsta-12.' },
43
+ { env: ENV.STAGING_13, url: 'https://widsta-13.' },
44
+ { env: ENV.STAGING_14, url: 'https://widsta-14.' },
45
+ { env: ENV.STAGING_15, url: 'https://widsta-15.' },
46
+ ];
47
+ export const API_URL = [
48
+ { env: ENV.SANDBOX, url: 'https://api-sandbox.' },
49
+ { env: ENV.PROD, url: 'https://api.' },
50
+ { env: ENV.STAGING, url: 'https://apista.' },
51
+ { env: ENV.STAGING_1, url: 'https://apista-1.' },
52
+ { env: ENV.STAGING_2, url: 'https://apista-2.' },
53
+ { env: ENV.STAGING_3, url: 'https://apista-3.' },
54
+ { env: ENV.STAGING_4, url: 'https://apista-4.' },
55
+ { env: ENV.STAGING_5, url: 'https://apista-5.' },
56
+ { env: ENV.STAGING_6, url: 'https://apista-6.' },
57
+ { env: ENV.STAGING_7, url: 'https://apista-7.' },
58
+ { env: ENV.STAGING_8, url: 'https://apista-8.' },
59
+ { env: ENV.STAGING_9, url: 'https://apista-9.' },
60
+ { env: ENV.STAGING_10, url: 'https://apista-10.' },
61
+ { env: ENV.STAGING_11, url: 'https://apista-11.' },
62
+ { env: ENV.STAGING_12, url: 'https://apista-12.' },
63
+ { env: ENV.STAGING_13, url: 'https://apista-13.' },
64
+ { env: ENV.STAGING_14, url: 'https://apista-14.' },
65
+ { env: ENV.STAGING_15, url: 'https://apista-15.' },
66
+ ];
67
+ const ADDITIONAL_ENV = [ENV.SANDBOX_KOVENA, ENV.SANDBOX_DEMO_KOVENA];
68
+ const REGEX_ALIAS = '^([a-zA-Z0-9](?:(?:[a-zA-Z0-9-.]*(?!-)\\.(?![-.]))*[a-zA-Z0-9]+)?)$';
69
+ export const DEFAULT_ENV = ENV.SANDBOX;
70
+ export const DEFAULT_ALIAS = {
71
+ PAYDOCK: 'paydock.com',
72
+ KOVENA: 'kovena.com',
73
+ };
74
+ export class Env {
75
+ constructor(configs, defaultEnv = DEFAULT_ENV) {
76
+ this.configs = configs;
77
+ this.setEnv(defaultEnv);
78
+ }
79
+ setEnv(env, alias) {
80
+ if (!this.isValidMode(this.configs, env))
81
+ throw new Error('unknown env: ' + env);
82
+ this.env = env;
83
+ if (alias && !alias.match(REGEX_ALIAS))
84
+ throw new Error('invalid: ' + alias);
85
+ if (alias)
86
+ this.alias = alias;
87
+ else if (ADDITIONAL_ENV.indexOf(this.env) !== -1)
88
+ this.alias = DEFAULT_ALIAS.KOVENA;
89
+ else
90
+ this.alias = DEFAULT_ALIAS.PAYDOCK;
91
+ }
92
+ getEnv() {
93
+ return this.env;
94
+ }
95
+ getConf() {
96
+ for (let index in this.configs) {
97
+ if (!this.configs.hasOwnProperty(index))
98
+ continue;
99
+ if (this.configs[index].env === this.getEnv())
100
+ return {
101
+ url: (this.configs[index].url.indexOf('localhost') !== -1) ? this.configs[index].url : this.configs[index].url + this.alias,
102
+ env: this.configs[index].env,
103
+ };
104
+ }
105
+ throw new Error('invalid env');
106
+ }
107
+ isValidMode(configs, env) {
108
+ for (let index in configs) {
109
+ if (!configs.hasOwnProperty(index))
110
+ continue;
111
+ if (configs[index].env === env)
112
+ return true;
113
+ }
114
+ return false;
115
+ }
116
+ }
117
+ //# sourceMappingURL=../../../src/lib/configs/env/env.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.js","sourceRoot":"","sources":["../../../configs/env/env.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,GAAG,GAAG;IACf,OAAO,EAAE,SAAS;IAClB,cAAc,EAAE,gBAAgB;IAChC,YAAY,EAAE,cAAc;IAC5B,mBAAmB,EAAE,qBAAqB;IAC1C,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,YAAY;IACxB,UAA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AE;YACvB,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC;gBAC9B,SAAS;YAEb,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,KAAK,GAAG;gBAC1B,OAAO,IAAI,CAAC;SACnB;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ"}
@@ -1,10 +1,9 @@
1
1
  export declare class SDK {
2
2
  static readonly type = "client";
3
3
  static readonly headerKeys: Readonly<{
4
- version: "x-sdk-version";
5
- type: "x-sdk-type";
4
+ version: string;
5
+ type: string;
6
6
  }>;
7
7
  static get version(): string | null;
8
8
  private static readonly _version;
9
9
  }
10
- //# sourceMappingURL=sdk.d.ts.map
@@ -0,0 +1,16 @@
1
+ export class SDK {
2
+ static get version() {
3
+ return SDK._version.trim() || null;
4
+ }
5
+ }
6
+ SDK.type = 'client';
7
+ SDK.headerKeys = Object.freeze({
8
+ version: 'x-sdk-version',
9
+ type: 'x-sdk-type',
10
+ });
11
+ // This variable is injected through the grunt build command,
12
+ // the empty string is set in case if version not provided.
13
+ //
14
+ // e.g: grunt build --sdk-version=v1.0.0
15
+ SDK._version = 'v1.105.1';
16
+ //# sourceMappingURL=../../src/lib/configs/sdk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sdk.js","sourceRoot":"","sources":["../../configs/sdk.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,GAAG;IAOL,MAAM,KAAK,OAAO;QACrB,OAAO,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,IAAI,CAAC;IACvC,CAAC;;AARsB,QAAI,GAAG,QAAQ,CAAC;AAChB,cAAU,GAAG,MAAM,CAAC,MAAM,CAAC;IAC9C,OAAO,EAAE,eAAe;IACxB,IAAI,EAAE,YAAY;CACrB,CAAC,CAAC;AAMH,6DAA6D;AAC7D,2DAA2D;AAC3D,EAAE;AACF,wCAAwC;AAChB,YAAQ,GAAG,gCAAgC,CAAC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * List of available form field validators dedicated to cards and their definition
3
+ *
4
+ * @const CARD_VALIDATORS
5
+ *
6
+ * @type {Record<string, string>}
7
+ *
8
+ * @param {string} CVV=cardCvvValidation
9
+ * Asserts that CVV contains zero or more digits and is a number
10
+ * @param {string} EXPIRY_DATE=expireDateValidation
11
+ * Asserts value is a date in the future with format MM/YY
12
+ * @param {string} HOLDER_NAME=cardHoldernameValidation
13
+ * Asserts value is a name that respects the
14
+ ITU-T T.50 standard (@see https://www.itu.int/rec/T-REC-T.50/en)
15
+ * @param {string} NUMBER=cardNumberValidation
16
+ Asserts the value matches a known card scheme and as a the correct length.
17
+ E.g., matches a 13, 16 or 19 digit bank card, **or**, a 13 to 25 digit Vii Gift card
18
+ * @param {string} PIN=cardPinValidation
19
+ Asserts the value is a number with exactly 4 digits
20
+ */
21
+ declare const CARD_VALIDATORS: {
22
+ readonly CVV: "cardCvvValidator";
23
+ readonly EXPIRY_DATE: "expireDateValidation";
24
+ readonly HOLDER_NAME: "cardHoldernameValidator";
25
+ readonly NUMBER: "cardNumberValidator";
26
+ readonly PIN: "cardPinValidator";
27
+ };
28
+ declare type CardValidatorValue = typeof CARD_VALIDATORS[keyof typeof CARD_VALIDATORS];
29
+ /**
30
+ * List of available generic form field validators and their definition
31
+ *
32
+ * @const GENERIC_VALIDATORS
33
+ *
34
+ * @type {Record<string, string>}
35
+ *
36
+ * @param {string} REQUIRED=required
37
+ * Asserts the input or form field has a value defined truthy value
38
+ */
39
+ declare const GENERIC_VALIDATORS: {
40
+ readonly REQUIRED: "required";
41
+ };
42
+ declare type GenericValidatorValue = typeof GENERIC_VALIDATORS[keyof typeof GENERIC_VALIDATORS];
43
+ export type { CardValidatorValue, GenericValidatorValue };
44
+ export { CARD_VALIDATORS, GENERIC_VALIDATORS };
@@ -0,0 +1,42 @@
1
+ /**
2
+ * List of available form field validators dedicated to cards and their definition
3
+ *
4
+ * @const CARD_VALIDATORS
5
+ *
6
+ * @type {Record<string, string>}
7
+ *
8
+ * @param {string} CVV=cardCvvValidation
9
+ * Asserts that CVV contains zero or more digits and is a number
10
+ * @param {string} EXPIRY_DATE=expireDateValidation
11
+ * Asserts value is a date in the future with format MM/YY
12
+ * @param {string} HOLDER_NAME=cardHoldernameValidation
13
+ * Asserts value is a name that respects the
14
+ ITU-T T.50 standard (@see https://www.itu.int/rec/T-REC-T.50/en)
15
+ * @param {string} NUMBER=cardNumberValidation
16
+ Asserts the value matches a known card scheme and as a the correct length.
17
+ E.g., matches a 13, 16 or 19 digit bank card, **or**, a 13 to 25 digit Vii Gift card
18
+ * @param {string} PIN=cardPinValidation
19
+ Asserts the value is a number with exactly 4 digits
20
+ */
21
+ const CARD_VALIDATORS = {
22
+ CVV: "cardCvvValidator",
23
+ EXPIRY_DATE: "expireDateValidation",
24
+ HOLDER_NAME: "cardHoldernameValidator",
25
+ NUMBER: "cardNumberValidator",
26
+ PIN: "cardPinValidator",
27
+ };
28
+ /**
29
+ * List of available generic form field validators and their definition
30
+ *
31
+ * @const GENERIC_VALIDATORS
32
+ *
33
+ * @type {Record<string, string>}
34
+ *
35
+ * @param {string} REQUIRED=required
36
+ * Asserts the input or form field has a value defined truthy value
37
+ */
38
+ const GENERIC_VALIDATORS = {
39
+ REQUIRED: "required",
40
+ };
41
+ export { CARD_VALIDATORS, GENERIC_VALIDATORS };
42
+ //# sourceMappingURL=../../src/lib/constants/validators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validators.js","sourceRoot":"","sources":["../../constants/validators.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,eAAe,GAAG;IACpB,GAAG,EAAE,kBAAkB;IACvB,WAAW,EAAE,sBAAsB;IACnC,WAAW,EAAE,yBAAyB;IACtC,MAAM,EAAE,qBAAqB;IAC7B,GAAG,EAAE,kBAAkB;CACjB,CAAA;AAIV;;;;;;;;;GASG;AACH,MAAM,kBAAkB,GAAG;IACvB,QAAQ,EAAE,UAAU;CACd,CAAA;AAKV,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,CAAA"}
@@ -26,4 +26,3 @@ export declare class Builder extends HttpCore {
26
26
  getConfigs(): IBody;
27
27
  send(publicKey: string, cb: (checkout: ICheckout) => void, errorCb?: (error: any, code: string) => void): void;
28
28
  }
29
- //# sourceMappingURL=builder.d.ts.map
@@ -0,0 +1,45 @@
1
+ import { SUPPORTED_CHECKOUT_META_COLLECTION } from '../components/param';
2
+ import { HttpCore } from '../components/http-core';
3
+ const EXTERNAL_CHECKOUT_LINK = '/v1/payment_sources/external_checkout';
4
+ export class Builder extends HttpCore {
5
+ constructor(gatewayID, successRedirectUrl, errorRedirectUrl) {
6
+ super();
7
+ this.body = {
8
+ gateway_id: gatewayID,
9
+ meta: {},
10
+ success_redirect_url: successRedirectUrl,
11
+ error_redirect_url: errorRedirectUrl,
12
+ redirect_url: successRedirectUrl,
13
+ };
14
+ }
15
+ getLink() {
16
+ return EXTERNAL_CHECKOUT_LINK;
17
+ }
18
+ setDescriptions(text) {
19
+ this.body.description = text;
20
+ }
21
+ setMeta(meta) {
22
+ for (let key in meta) {
23
+ if (!meta.hasOwnProperty(key))
24
+ continue;
25
+ if (SUPPORTED_CHECKOUT_META_COLLECTION.indexOf(key) !== -1)
26
+ this.body.meta[key] = meta[key];
27
+ else
28
+ console.warn(`ExternalCheckout::setMeta: unsupported meta key ${key}`);
29
+ }
30
+ }
31
+ getConfigs() {
32
+ return this.body;
33
+ }
34
+ send(publicKey, cb, errorCb = (err, code) => { }) {
35
+ this.create(publicKey, this.getConfigs(), (data, status) => {
36
+ cb(data);
37
+ }, (err, status) => {
38
+ if (typeof err.message === 'undefined')
39
+ errorCb(`${status}: unknown error`, 'unknown_error');
40
+ else
41
+ errorCb(err.message, err.code);
42
+ });
43
+ }
44
+ }
45
+ //# sourceMappingURL=../../src/lib/external-checkout/builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builder.js","sourceRoot":"","sources":["../../external-checkout/builder.ts"],"names":[],"m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E;YAC1B,EAAE,CAAC,IAAI,CAAC,CAAC;QACb,CAAC,EACD,CAAC,GAAQ,EAAE,MAAc,EAAE,EAAE;YACzB,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,WAAW;gBAClC,OAAO,CAAC,GAAG,MAAM,iBAAiB,EAAE,eAAe,CAAC,CAAC;;gBAErD,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;QACvC,CAAC,CACJ,CAAC;IACN,CAAC;CACJ"}
@@ -11,4 +11,3 @@ export declare class Checker extends HttpCore {
11
11
  protected getLink(): string;
12
12
  send(accessToken: string, cb: (details: IDetails) => void, errorCb?: (error: any) => void): void;
13
13
  }
14
- //# sourceMappingURL=checker.d.ts.map
@@ -0,0 +1,22 @@
1
+ import { HttpCore } from '../components/http-core';
2
+ const LINK = '/v1/payment_sources/external_checkout/:token';
3
+ export class Checker extends HttpCore {
4
+ constructor(token) {
5
+ super();
6
+ this.token = token;
7
+ }
8
+ getLink() {
9
+ return LINK.replace(':token', this.token);
10
+ }
11
+ send(accessToken, cb, errorCb = (err) => { }) {
12
+ this.get(accessToken, (data, status) => {
13
+ cb(data);
14
+ }, (err, status) => {
15
+ if (typeof err.message === 'undefined')
16
+ errorCb(`${status}: unknown error`);
17
+ else
18
+ errorCb(err.message);
19
+ });
20
+ }
21
+ }
22
+ //# sourceMappingURL=../../src/lib/external-checkout/checker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checker.js","sourceRoot":"","sources":["../../external-checkout/checker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAEnD,MAAM,IAAI,GAAG,8CAA8C,CAAC;AAS5D,MAAM,OAAO,OAAQ,SAAQ,QAAQ;IACjC,YAAmB,KAAa;QAC5B,KAAK,EAAE,CAAC;QADO,UAAK,GAAL,KAAK,CAAQ;IAEhC,CAAC;IAES,OAAO;QACb,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9C,CAAC;IAEM,IAAI,CAAC,WAAmB,EAAE,EAA+B,EAAE,UAAgC,CAAC,GAAW,EAAE,EAAE,GAAE,CAAC;QACjH,IAAI,CAAC,GAAG,CACJ,WAAW,EACX,CAAC,IAAS,EAAE,MAAc,EAAE,EAAE;YAC1B,EAAE,CAAC,IAAI,CAAC,CAAC;QACb,CAAC,EACD,CAAC,GAAQ,EAAE,MAAc,EAAE,EAAE;YACzB,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,WAAW;gBAClC,OAAO,CAAC,GAAG,MAAM,iBAAiB,CAAC,CAAC;;gBAEpC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC7B,CAAC,CACJ,CAAC;IACN,CAAC;CACJ"}
@@ -0,0 +1,2 @@
1
+ export { ICheckout, Builder as ExternalCheckoutBuilder } from "./builder";
2
+ export { IDetails, Checker as ExternalCheckoutChecker } from "./checker";
@@ -0,0 +1,3 @@
1
+ export { Builder as ExternalCheckoutBuilder } from "./builder";
2
+ export { Checker as ExternalCheckoutChecker } from "./checker";
3
+ //# sourceMappingURL=../../src/lib/external-checkout/index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../external-checkout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,OAAO,IAAI,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAC1E,OAAO,EAAa,OAAO,IAAI,uBAAuB,EAAE,MAAM,WAAW,CAAC"}
@@ -20,4 +20,3 @@ export declare class AccessToken {
20
20
  static extractMeta<T>(body: IAccessToken['body']): T;
21
21
  static getAccessHeaderNameByToken(token: string): string;
22
22
  }
23
- //# sourceMappingURL=access-token.d.ts.map
@@ -0,0 +1,44 @@
1
+ export const ACCESS_HEADER_NAME = {
2
+ accessToken: 'x-access-token',
3
+ publicKey: 'x-user-public-key',
4
+ };
5
+ export class AccessToken {
6
+ static validateJWT(jwt) {
7
+ if (!jwt)
8
+ return null;
9
+ const [rawHead, rawBody, signature] = jwt.split(".");
10
+ if (!rawHead || !rawBody || !signature)
11
+ return null;
12
+ if (2 + rawHead.length + rawBody.length + signature.length !== jwt.length)
13
+ return null;
14
+ try {
15
+ const head = JSON.parse(atob(rawHead));
16
+ const body = JSON.parse(atob(rawBody));
17
+ return { head, body, signature };
18
+ }
19
+ catch (_a) {
20
+ return null;
21
+ }
22
+ }
23
+ static extractData(body) {
24
+ try {
25
+ return JSON.parse(atob(body.meta));
26
+ }
27
+ catch (_a) {
28
+ return null;
29
+ }
30
+ }
31
+ static extractMeta(body) {
32
+ try {
33
+ const { meta } = JSON.parse(atob(body.meta));
34
+ return meta;
35
+ }
36
+ catch (_a) {
37
+ return null;
38
+ }
39
+ }
40
+ static getAccessHeaderNameByToken(token) {
41
+ return !!AccessToken.validateJWT(token) ? ACCESS_HEADER_NAME.accessToken : ACCESS_HEADER_NAME.publicKey;
42
+ }
43
+ }
44
+ //# sourceMappingURL=../../src/lib/helper/access-token.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"access-token.js","sourceRoot":"","sources":["../../helper/access-token.ts"],"names":[],"mappings":"AAaA,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAC9B,WAAW,EAAE,gBAAgB;IAC7B,SAAS,EAAE,mBAAmB;CACjC,CAAA;AAED,MAAM,OAAO,WAAW;IACb,MAAM,CAAC,WAAW,CAAC,GAAW;QACjC,IAAI,CAAC,GAAG;YACJ,OAAO,IAAI,CAAC;QAEhB,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACrD,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,IAAI,CAAC,SAAS;YAAE,OAAO,IAAI,CAAC;QACpD,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,KAAK,GAAG,CAAC,MAAM;YACrE,OAAO,IAAI,CAAC;QAEhB,IAAI;YACA,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YACvC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YACvC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;SACpC;QAAC,WAAM;YACJ,OAAO,IAAI,CAAC;SACf;IACL,CAAC;IAEM,MAAM,CAAC,WAAW,CAAI,IAAyB;QAClD,IAAI;YACA,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;SACtC;QAAC,WAAM;YACJ,OAAO,IAAI,CAAC;SACf;IACL,CAAC;IAEM,MAAM,CAAC,WAAW,CAAI,IAA0B;QACnD,IAAI;YACA,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YAC7C,OAAO,IAAI,CAAC;SACf;QAAC,WAAM;YACJ,OAAO,IAAI,CAAC;SACf;IACL,CAAC;IAEM,MAAM,CAAC,0BAA0B,CAAC,KAAa;QAClD,OAAO,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAC,kBAAkB,CAAC,SAAS,CAAA;IAC3G,CAAC;CACJ"}
@@ -14,4 +14,3 @@ export declare class Browser {
14
14
  version: string;
15
15
  };
16
16
  }
17
- //# sourceMappingURL=browser.d.ts.map
@@ -0,0 +1,79 @@
1
+ export class Browser {
2
+ static isFacebook() {
3
+ return (navigator.userAgent.indexOf('FBSN/iOS') !== -1
4
+ && navigator.userAgent.indexOf('AppleWebKit') !== -1
5
+ && navigator.userAgent.indexOf('(KHTML, like Gecko)') !== -1);
6
+ }
7
+ static isInstagram() {
8
+ return (navigator.userAgent.indexOf('iOS') !== -1
9
+ && navigator.userAgent.indexOf('Instagram') !== -1
10
+ && navigator.userAgent.indexOf('(KHTML, like Gecko)') !== -1);
11
+ }
12
+ static isSupportPopUp() {
13
+ return !this.isFacebook() && !this.isInstagram();
14
+ }
15
+ static getLanguage() {
16
+ return window.navigator.language || '';
17
+ }
18
+ static getTimezoneOffset() {
19
+ return new Date().getTimezoneOffset();
20
+ }
21
+ static getBrowserName() {
22
+ const sUsrAg = navigator.userAgent;
23
+ // "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
24
+ if (sUsrAg.indexOf('Firefox') > -1)
25
+ return 'Mozilla Firefox';
26
+ if (sUsrAg.indexOf('Opera') > -1)
27
+ return 'Opera';
28
+ // "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; Zoom 3.6.0; wbx 1.0.0; rv:11.0) like Gecko"
29
+ if (sUsrAg.indexOf('Trident') > -1)
30
+ return 'Microsoft Internet Explorer';
31
+ // "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299"
32
+ if (sUsrAg.indexOf('Edge') > -1)
33
+ return 'Microsoft Edge';
34
+ // "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/66.0.3359.181 Chrome/66.0.3359.181 Safari/537.36"
35
+ if (sUsrAg.indexOf('Chrome') > -1)
36
+ return 'Google Chrome or Chromium';
37
+ // "Mozilla/5.0 (iPhone; CPU iPhone OS 11_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 Mobile/15E148 Safari/604.1 980x1306"
38
+ if (sUsrAg.indexOf('Safari') > -1)
39
+ return 'Apple Safari';
40
+ return 'unknown';
41
+ }
42
+ static isJavaEnabled() {
43
+ return navigator.javaEnabled();
44
+ }
45
+ static getColorDepth() {
46
+ return screen.colorDepth;
47
+ }
48
+ static getScreenHeight() {
49
+ return screen.height;
50
+ }
51
+ static getScreenWidth() {
52
+ return screen.width;
53
+ }
54
+ static getBrowserInfo() {
55
+ const ua = navigator.userAgent;
56
+ let M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
57
+ let tem;
58
+ if (/trident/i.test(M[1])) {
59
+ tem = /\brv[ :]+(\d+)/g.exec(ua) || [];
60
+ return { name: 'IE', version: (tem[1] || '') };
61
+ }
62
+ if (M[1] === 'Chrome') {
63
+ tem = ua.match(/\bOPR|Edge\/(\d+)/);
64
+ if (tem != null) {
65
+ return { name: 'Opera', version: tem[1] };
66
+ }
67
+ }
68
+ M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?'];
69
+ // tslint:disable-next-line:no-conditional-assignment
70
+ if ((tem = ua.match(/version\/(\d+)/i)) != null) {
71
+ M.splice(1, 1, tem[1]);
72
+ }
73
+ return {
74
+ name: M[0],
75
+ version: M[1],
76
+ };
77
+ }
78
+ }
79
+ //# sourceMappingURL=../../src/lib/helper/browser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.js","sourceRoot":"","sources":["../../helper/browser.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,OAAO;IAET,MAAM,CAAC,UAAU;QACpB,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;eAC/C,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;eACjD,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACtE,CAAC;IAEM,MAAM,CAAC,WAAW;QACrB,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC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1E,qDAAqD;QACrD,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,IAAI,IAAI,EAAE;YAC7C,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;SAC1B;QACD,OAAO;YACH,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YACV,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;SAChB,CAAC;IACN,CAAC;CACJ"}
@@ -3,4 +3,3 @@ export declare class EventEmitter {
3
3
  emit<T>(eventName: string, data?: T): void;
4
4
  subscribe<T>(eventName: string, handler: (data: T) => void): () => void;
5
5
  }
6
- //# sourceMappingURL=event-emitter.d.ts.map
@@ -0,0 +1,23 @@
1
+ export class EventEmitter {
2
+ constructor() {
3
+ this.events = {};
4
+ }
5
+ emit(eventName, data) {
6
+ let event = this.events[eventName];
7
+ if (event) {
8
+ event.forEach((fn) => {
9
+ fn.call(null, data);
10
+ });
11
+ }
12
+ }
13
+ subscribe(eventName, handler) {
14
+ if (!this.events[eventName]) {
15
+ this.events[eventName] = [];
16
+ }
17
+ this.events[eventName].push(handler);
18
+ return () => {
19
+ this.events[eventName] = this.events[eventName].filter((storedHandler) => handler !== storedHandler);
20
+ };
21
+ }
22
+ }
23
+ //# sourceMappingURL=../../src/lib/helper/event-emitter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-emitter.js","sourceRoot":"","sources":["../../helper/event-emitter.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,YAAY;IAAzB;QAEY,WAAM,GAAc,EAAE,CAAC;IAqBnC,CAAC;IAnBU,IAAI,CAAI,SAAiB,EAAE,IAAQ;QACtC,IAAI,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACnC,IAAI,KAAK,EAAG;YACR,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE;gBACjB,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACxB,CAAC,CAAC,CAAC;SACN;IACL,CAAC;IAEM,SAAS,CAAI,SAAiB,EAAE,OAA0B;QAC7D,IAAG,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE;YACxB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;SAC/B;QAED,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACrC,OAAO,GAAS,EAAE;YACd,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,aAAa,EAAE,EAAE,CAAC,OAAO,KAAK,aAAa,CAAC,CAAC;QACzG,CAAC,CAAA;IACL,CAAC;CACJ"}
@@ -7,4 +7,3 @@ export declare class Event {
7
7
  static subscribe(name: string, subject: Element, listener: (event: Event) => void): any;
8
8
  static subscribe(name: string, subject: Window, listener: (event: Event) => void): any;
9
9
  }
10
- //# sourceMappingURL=event.d.ts.map
@@ -0,0 +1,23 @@
1
+ export const DATE_TYPE = {
2
+ PAYMENT_SOURCE: 'payment_source',
3
+ REF_ID: 'ref_id',
4
+ };
5
+ export class Event {
6
+ static insertToInput(selector, dataType, eventData) {
7
+ if (typeof eventData[dataType] === "undefined")
8
+ return;
9
+ let input = document.querySelector(selector);
10
+ if (!input)
11
+ return;
12
+ input.value = eventData[dataType];
13
+ }
14
+ static subscribe(name, subject, listener) {
15
+ if (subject.addEventListener) {
16
+ subject.addEventListener(name, listener);
17
+ }
18
+ else {
19
+ subject.attachEvent(`on${name}`, listener);
20
+ }
21
+ }
22
+ }
23
+ //# sourceMappingURL=../../src/lib/helper/event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.js","sourceRoot":"","sources":["../../helper/event.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG;IACrB,cAAc,EAAE,gBAAgB;IAChC,MAAM,EAAE,QAAQ;CACnB,CAAC;AAEF,MAAM,OAAO,KAAK;IACP,MAAM,CAAC,aAAa,CAAI,QAAQ,EAAE,QAAQ,EAAE,SAAY;QAC3D,IAAI,OAAO,SAAS,CAAC,QAAQ,CAAC,KAAK,WAAW;YAC1C,OAAO;QAEX,IAAI,KAAK,GAAuC,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QACjF,IAAI,CAAC,KAAK;YACN,OAAO;QAEX,KAAK,CAAC,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;IAIM,MAAM,CAAC,SAAS,CAAC,IAAY,EAAE,OAAY,EAAE,QAAgC;QAChF,IAAI,OAAO,CAAC,gBAAgB,EAAE;YAC1B,OAAO,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;SAC5C;aAAM;YACG,OAAQ,CAAC,WAAW,CAAC,KAAK,IAAI,EAAE,EAAE,QAAQ,CAAC,CAAC;SACrD;IACL,CAAC;CACJ"}
@@ -3,4 +3,3 @@ export declare class MS {
3
3
  static isOtherBrowser(): boolean;
4
4
  static inRange(toVersion: number, fromVersion?: number): boolean;
5
5
  }
6
- //# sourceMappingURL=ms.d.ts.map
@@ -0,0 +1,32 @@
1
+ export class MS {
2
+ static getVersion() {
3
+ let userAgent = window.navigator.userAgent;
4
+ let msie = userAgent.indexOf('MSIE ');
5
+ if (msie > 0) {
6
+ // IE 10 or older => return version number
7
+ return parseInt(userAgent.substring(msie + 5, userAgent.indexOf('.', msie)), 10);
8
+ }
9
+ let trident = userAgent.indexOf('Trident/');
10
+ if (trident > 0) {
11
+ // IE 11 => return version number
12
+ let rv = userAgent.indexOf('rv:');
13
+ return parseInt(userAgent.substring(rv + 3, userAgent.indexOf('.', rv)), 10);
14
+ }
15
+ let edge = userAgent.indexOf('Edge/');
16
+ if (edge > 0) {
17
+ // Edge (IE 12+) => return version number
18
+ return parseInt(userAgent.substring(edge + 5, userAgent.indexOf('.', edge)), 10);
19
+ }
20
+ return -1;
21
+ }
22
+ static isOtherBrowser() {
23
+ return this.getVersion() === -1;
24
+ }
25
+ static inRange(toVersion, fromVersion = 0) {
26
+ if (this.isOtherBrowser())
27
+ return false;
28
+ let version = this.getVersion();
29
+ return !!(version >= fromVersion && version <= toVersion);
30
+ }
31
+ }
32
+ //# sourceMappingURL=../../src/lib/helper/ms.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ms.js","sourceRoot":"","sources":["../../helper/ms.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,EAAE;IAEJ,MAAM,CAAC,UAAU;QACpB,IAAI,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC;QAE3C,IAAI,IAAI,GAAG,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACtC,IAAI,IAAI,GAAG,CAAC,EAAE;YACV,0CAA0C;YAC1C,OAAO,QAAQ,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,GAAG,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;SACpF;QAED,IAAI,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAC5C,IAAI,OAAO,GAAG,CAAC,EAAE;YACb,iCAAiC;YACjC,IAAI,EAAE,GAAG,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YAClC,OAAO,QAAQ,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;SAChF;QAED,IAAI,IAAI,GAAG,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACtC,IAAI,IAAI,GAAG,CAAC,EAAE;YACV,yCAAyC;YACzC,OAAO,QAAQ,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,GAAG,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;SACpF;QAED,OAAO,CAAC,CAAC,CAAC;IACd,CAAC;IAEM,MAAM,CAAC,cAAc;QACxB,OAAO,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC;IACpC,CAAC;IAGM,MAAM,CAAC,OAAO,CAAC,SAAiB,EAAE,cAAsB,CAAC;QAC5D,IAAI,IAAI,CAAC,cAAc,EAAE;YACrB,OAAO,KAAK,CAAC;QAEjB,IAAI,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAChC,OAAO,CAAC,CAAC,CAAC,OAAO,IAAK,WAAW,IAAI,OAAO,IAAI,SAAS,CAAC,CAAA;IAC9D,CAAC;CACJ"}
@@ -1,4 +1,3 @@
1
1
  export declare class ObjectHelper {
2
2
  static values(object: Object): any[];
3
3
  }
4
- //# sourceMappingURL=object.d.ts.map
@@ -0,0 +1,6 @@
1
+ export class ObjectHelper {
2
+ static values(object) {
3
+ return Object.keys(object).map((key) => { return object[key]; });
4
+ }
5
+ }
6
+ //# sourceMappingURL=../../src/lib/helper/object.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object.js","sourceRoot":"","sources":["../../helper/object.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,YAAY;IACd,MAAM,CAAC,MAAM,CAAC,MAAc;QAC/B,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,GAAG,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACrE,CAAC;CACJ"}