@paypal/checkout-components 5.0.256 → 5.0.258

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 (185) hide show
  1. package/README.md +8 -0
  2. package/__sdk__.js +72 -76
  3. package/dist/button.js +1 -1
  4. package/globals.js +28 -30
  5. package/package.json +6 -4
  6. package/src/constants/button.js +37 -36
  7. package/src/constants/class.js +32 -30
  8. package/src/constants/index.js +3 -3
  9. package/src/constants/misc.js +14 -12
  10. package/src/declarations.js +19 -19
  11. package/src/funding/applepay/config.jsx +51 -50
  12. package/src/funding/applepay/index.js +1 -1
  13. package/src/funding/applepay/style.scoped.scss +1 -1
  14. package/src/funding/applepay/template.jsx +16 -11
  15. package/src/funding/bancontact/config.jsx +48 -37
  16. package/src/funding/bancontact/index.js +1 -2
  17. package/src/funding/blik/config.jsx +48 -37
  18. package/src/funding/blik/index.js +1 -2
  19. package/src/funding/boleto/config.jsx +50 -39
  20. package/src/funding/boleto/index.js +1 -2
  21. package/src/funding/card/amex/config.js +9 -8
  22. package/src/funding/card/amex/index.js +1 -2
  23. package/src/funding/card/config.jsx +246 -177
  24. package/src/funding/card/discover/config.js +9 -7
  25. package/src/funding/card/discover/index.js +1 -2
  26. package/src/funding/card/elo/config.js +6 -7
  27. package/src/funding/card/elo/index.js +1 -2
  28. package/src/funding/card/hiper/config.js +9 -7
  29. package/src/funding/card/hiper/index.js +1 -2
  30. package/src/funding/card/index.js +1 -1
  31. package/src/funding/card/jcb/config.js +6 -7
  32. package/src/funding/card/jcb/index.js +1 -2
  33. package/src/funding/card/mastercard/config.js +9 -7
  34. package/src/funding/card/mastercard/index.js +1 -2
  35. package/src/funding/card/visa/config.js +9 -7
  36. package/src/funding/card/visa/index.js +1 -2
  37. package/src/funding/common.jsx +242 -216
  38. package/src/funding/config.js +212 -65
  39. package/src/funding/content.jsx +1946 -337
  40. package/src/funding/credit/config.jsx +74 -57
  41. package/src/funding/credit/index.js +1 -2
  42. package/src/funding/eps/config.jsx +45 -37
  43. package/src/funding/eps/index.js +1 -2
  44. package/src/funding/funding.js +193 -100
  45. package/src/funding/giropay/config.jsx +48 -38
  46. package/src/funding/giropay/index.js +1 -2
  47. package/src/funding/ideal/config.jsx +48 -37
  48. package/src/funding/ideal/index.js +1 -2
  49. package/src/funding/index.js +2 -2
  50. package/src/funding/itau/config.jsx +41 -41
  51. package/src/funding/itau/index.js +1 -1
  52. package/src/funding/maxima/config.jsx +25 -19
  53. package/src/funding/maxima/index.js +1 -2
  54. package/src/funding/mercadopago/config.jsx +48 -37
  55. package/src/funding/mercadopago/index.js +1 -2
  56. package/src/funding/multibanco/config.jsx +50 -39
  57. package/src/funding/multibanco/index.js +1 -2
  58. package/src/funding/mybank/config.jsx +48 -37
  59. package/src/funding/mybank/index.js +1 -2
  60. package/src/funding/oxxo/config.jsx +50 -39
  61. package/src/funding/oxxo/index.js +1 -2
  62. package/src/funding/p24/config.jsx +45 -37
  63. package/src/funding/p24/index.js +1 -2
  64. package/src/funding/paidy/config.jsx +50 -39
  65. package/src/funding/paidy/index.js +1 -1
  66. package/src/funding/paylater/config.jsx +118 -111
  67. package/src/funding/paylater/index.js +1 -2
  68. package/src/funding/paypal/config.jsx +44 -46
  69. package/src/funding/paypal/index.js +1 -2
  70. package/src/funding/paypal/style.scoped.scss +80 -74
  71. package/src/funding/paypal/template.jsx +450 -354
  72. package/src/funding/payu/config.jsx +50 -39
  73. package/src/funding/payu/index.js +1 -1
  74. package/src/funding/satispay/config.jsx +50 -39
  75. package/src/funding/satispay/index.js +1 -1
  76. package/src/funding/sepa/config.jsx +19 -13
  77. package/src/funding/sepa/index.js +1 -2
  78. package/src/funding/sofort/config.jsx +48 -37
  79. package/src/funding/sofort/index.js +1 -2
  80. package/src/funding/trustly/config.jsx +50 -39
  81. package/src/funding/trustly/index.js +1 -2
  82. package/src/funding/venmo/config.jsx +80 -75
  83. package/src/funding/venmo/index.js +1 -2
  84. package/src/funding/venmo/style.scoped.scss +30 -32
  85. package/src/funding/venmo/template.jsx +56 -57
  86. package/src/funding/verkkopankki/config.jsx +50 -39
  87. package/src/funding/verkkopankki/index.js +1 -1
  88. package/src/funding/wechatpay/config.jsx +48 -37
  89. package/src/funding/wechatpay/index.js +1 -2
  90. package/src/funding/zimpler/config.jsx +19 -13
  91. package/src/funding/zimpler/index.js +1 -2
  92. package/src/interface/button.js +60 -44
  93. package/src/interface/card-fields.js +11 -8
  94. package/src/interface/fields.js +7 -4
  95. package/src/interface/marks.js +4 -4
  96. package/src/interface/payment-fields.js +7 -4
  97. package/src/interface/wallet.js +4 -4
  98. package/src/lib/errors.js +7 -7
  99. package/src/lib/index.js +5 -5
  100. package/src/lib/isRTLLanguage.js +3 -3
  101. package/src/lib/perceived-latency-instrumentation.js +54 -36
  102. package/src/lib/security.js +21 -17
  103. package/src/lib/session.js +39 -35
  104. package/src/marks/component.jsx +114 -65
  105. package/src/marks/index.js +1 -2
  106. package/src/marks/template.jsx +79 -65
  107. package/src/types.js +48 -48
  108. package/src/ui/buttons/button.jsx +311 -249
  109. package/src/ui/buttons/buttonDesigns/control.jsx +3 -5
  110. package/src/ui/buttons/buttonDesigns/divideLogoAnimation.jsx +127 -99
  111. package/src/ui/buttons/buttonDesigns/index.js +78 -75
  112. package/src/ui/buttons/buttonDesigns/inlineLogoTextDesign.jsx +102 -82
  113. package/src/ui/buttons/buttonDesigns/script.jsx +24 -18
  114. package/src/ui/buttons/buttonDesigns/types.js +6 -7
  115. package/src/ui/buttons/buttons.jsx +318 -212
  116. package/src/ui/buttons/config.js +62 -59
  117. package/src/ui/buttons/content.jsx +304 -119
  118. package/src/ui/buttons/index.js +1 -1
  119. package/src/ui/buttons/menu-button/index.js +1 -1
  120. package/src/ui/buttons/menu-button/menu-button.jsx +29 -22
  121. package/src/ui/buttons/menu-button/menu-button.scoped.scss +16 -17
  122. package/src/ui/buttons/poweredBy.jsx +23 -23
  123. package/src/ui/buttons/props.js +680 -529
  124. package/src/ui/buttons/script.jsx +182 -160
  125. package/src/ui/buttons/spinner.jsx +4 -6
  126. package/src/ui/buttons/style.jsx +15 -14
  127. package/src/ui/buttons/styles/base.js +24 -16
  128. package/src/ui/buttons/styles/button.js +24 -22
  129. package/src/ui/buttons/styles/color.js +118 -118
  130. package/src/ui/buttons/styles/custom.js +30 -24
  131. package/src/ui/buttons/styles/index.js +1 -1
  132. package/src/ui/buttons/styles/labels.js +17 -13
  133. package/src/ui/buttons/styles/page.js +3 -3
  134. package/src/ui/buttons/styles/responsive.js +226 -118
  135. package/src/ui/buttons/tagline.jsx +53 -54
  136. package/src/ui/chevron.jsx +27 -16
  137. package/src/ui/index.js +3 -3
  138. package/src/ui/loading.jsx +25 -18
  139. package/src/ui/text/index.js +1 -1
  140. package/src/ui/text/style.scoped.scss +25 -26
  141. package/src/ui/text/text.jsx +42 -20
  142. package/src/ui/tracking.jsx +18 -11
  143. package/src/zoid/buttons/component.jsx +836 -684
  144. package/src/zoid/buttons/container.jsx +140 -107
  145. package/src/zoid/buttons/index.js +1 -1
  146. package/src/zoid/buttons/prerender.jsx +84 -64
  147. package/src/zoid/buttons/util.js +355 -254
  148. package/src/zoid/card-fields/component.jsx +581 -549
  149. package/src/zoid/card-fields/index.js +1 -1
  150. package/src/zoid/card-fields/prerender.jsx +20 -17
  151. package/src/zoid/card-form/component.js +155 -141
  152. package/src/zoid/card-form/index.js +1 -1
  153. package/src/zoid/checkout/component.jsx +314 -282
  154. package/src/zoid/checkout/config.js +2 -2
  155. package/src/zoid/checkout/content.js +190 -154
  156. package/src/zoid/checkout/hacks.js +31 -28
  157. package/src/zoid/checkout/index.js +2 -2
  158. package/src/zoid/checkout/props.js +27 -33
  159. package/src/zoid/installments/component.jsx +83 -70
  160. package/src/zoid/installments/index.js +1 -1
  161. package/src/zoid/installments/props.js +1 -1
  162. package/src/zoid/menu/component.jsx +53 -48
  163. package/src/zoid/menu/index.js +1 -1
  164. package/src/zoid/menu/props.js +1 -3
  165. package/src/zoid/modal/component.jsx +119 -106
  166. package/src/zoid/modal/index.js +1 -1
  167. package/src/zoid/modal/props.js +1 -3
  168. package/src/zoid/payment-fields/component.jsx +215 -191
  169. package/src/zoid/payment-fields/container.jsx +73 -64
  170. package/src/zoid/payment-fields/index.js +1 -1
  171. package/src/zoid/payment-fields/prerender.jsx +16 -14
  172. package/src/zoid/payment-fields/props.js +6 -6
  173. package/src/zoid/qr-code/component.jsx +131 -115
  174. package/src/zoid/qr-code/container.jsx +74 -68
  175. package/src/zoid/qr-code/index.js +1 -1
  176. package/src/zoid/qr-code/prerender.jsx +17 -12
  177. package/src/zoid/qr-code/types.js +2 -2
  178. package/src/zoid/wallet/component.jsx +298 -260
  179. package/src/zoid/wallet/container.jsx +73 -64
  180. package/src/zoid/wallet/index.js +1 -1
  181. package/src/zoid/wallet/prerender.jsx +14 -14
  182. package/src/zoid/wallet/props.js +4 -4
  183. package/src/actions/save/index.js +0 -40
  184. package/src/interface/actions.js +0 -14
  185. package/src/lib/getLogoCDNExperiment.js +0 -25
@@ -1,45 +1,43 @@
1
-
2
1
  .app-label {
3
- margin-left: 0.25rem;
2
+ margin-left: 0.25rem;
4
3
  }
5
4
 
6
5
  .wallet-label-venmo {
6
+ height: 100%;
7
+ width: 100%;
8
+ text-align: center;
9
+
10
+ .divider {
11
+ margin: 0 5px;
12
+ opacity: 0.2;
13
+ }
14
+
15
+ * {
16
+ display: inline-block;
17
+ vertical-align: top;
7
18
  height: 100%;
8
- width: 100%;
9
- text-align: center;
19
+ }
10
20
 
11
- .divider {
12
- margin: 0 5px;
13
- opacity: 0.2;
14
- }
21
+ .logo {
22
+ margin-left: auto;
23
+ }
15
24
 
16
- * {
17
- display: inline-block;
18
- vertical-align: top;
19
- height: 100%;
20
- }
25
+ .label {
26
+ max-width: 40%;
21
27
 
22
- .logo {
23
- margin-left: auto;
28
+ .limit {
29
+ display: block;
30
+ overflow: hidden;
31
+ text-overflow: ellipsis;
24
32
  }
33
+ }
25
34
 
26
- .label {
27
- max-width: 40%;
28
-
29
- .limit {
30
- display: block;
31
- overflow: hidden;
32
- text-overflow: ellipsis;
33
- }
34
- }
35
-
36
- @media only screen and (max-width: 150px) {
37
- text-align: center;
38
- display: inline-block;
35
+ @media only screen and (max-width: 150px) {
36
+ text-align: center;
37
+ display: inline-block;
39
38
 
40
- .logo {
41
- display: none;
42
- }
39
+ .logo {
40
+ display: none;
43
41
  }
42
+ }
44
43
  }
45
-
@@ -1,71 +1,70 @@
1
1
  /* @flow */
2
2
  /** @jsx node */
3
- import { node, Style, type ChildType } from '@krakenjs/jsx-pragmatic/src';
4
- import { VenmoLogo } from '@paypal/sdk-logos/src';
3
+ import { node, Style, type ChildType } from "@krakenjs/jsx-pragmatic/src";
4
+ import {
5
+ VenmoLogoExternalImage,
6
+ VenmoLogoInlineSVG,
7
+ } from "@paypal/sdk-logos/src";
5
8
 
6
9
  import {
7
- type WalletLabelOptions,
8
- type LabelOptions,
9
- BasicLabel
10
- } from '../common';
11
- import { Text, Space } from '../../ui/text';
12
- import { enableLogoCDNExperiment } from '../../lib/getLogoCDNExperiment';
10
+ type WalletLabelOptions,
11
+ type LabelOptions,
12
+ BasicLabel,
13
+ } from "../common";
14
+ import { Text, Space } from "../../ui/text";
15
+
16
+ import css from "./style.scoped.scss";
13
17
 
14
- import css from './style.scoped.scss';
15
-
16
- export function AppLabel(opts : LabelOptions) : ChildType {
17
- const { logoColor } = opts;
18
+ export function AppLabel(opts: LabelOptions): ChildType {
19
+ const { logoColor } = opts;
18
20
 
19
- const AppLogo : ChildType = (
20
- <Style css={ css }>
21
- {enableLogoCDNExperiment(VenmoLogo, { logoColor })}
22
- <Text className={ [ 'app-label' ] }>
23
- App
24
- </Text>
25
- </Style>
26
- );
21
+ const AppLogo: ChildType = (
22
+ <Style css={css}>
23
+ {__WEB__ ? (
24
+ <VenmoLogoExternalImage logoColor={logoColor} />
25
+ ) : (
26
+ <VenmoLogoInlineSVG logoColor={logoColor} />
27
+ )}
28
+ <Text className={["app-label"]}>App</Text>
29
+ </Style>
30
+ );
27
31
 
28
- return (
29
- <BasicLabel { ...opts } logo={ AppLogo } />
30
- );
32
+ return <BasicLabel {...opts} logo={AppLogo} />;
31
33
  }
32
34
 
33
- export function Label(opts : LabelOptions) : ChildType {
34
- return (
35
- <BasicLabel { ...opts } />
36
- );
35
+ export function Label(opts: LabelOptions): ChildType {
36
+ return <BasicLabel {...opts} />;
37
37
  }
38
38
 
39
- export function WalletLabel({ ...props } : WalletLabelOptions) : ChildType {
40
- const { instrument, logoColor } = props;
41
- let label;
42
- const logo = enableLogoCDNExperiment(VenmoLogo, { logoColor });
39
+ export function WalletLabel({ ...props }: WalletLabelOptions): ChildType {
40
+ const { instrument, logoColor } = props;
41
+ let label;
42
+ const logo = __WEB__ ? (
43
+ <VenmoLogoExternalImage logoColor={logoColor} />
44
+ ) : (
45
+ <VenmoLogoInlineSVG logoColor={logoColor} />
46
+ );
43
47
 
44
- if (instrument && instrument.label) {
45
- label = instrument.label;
46
- }
47
-
48
+ if (instrument && instrument.label) {
49
+ label = instrument.label;
50
+ }
48
51
 
49
- return (
50
- <Style css={ css }>
51
- <div class='wallet-label-venmo'>
52
- <div class='divider'>|</div>
53
- {
54
- logo &&
55
- <div class='logo' optional>
56
- { logo }
57
- <Space />
58
- </div>
59
- }
60
- {
61
- label &&
62
- <div class='label'>
63
- <Text className={ [ 'limit' ] }>
64
- { label }
65
- </Text>
66
- </div>
67
- }
68
- </div>
69
- </Style>
70
- );
52
+ return (
53
+ <Style css={css}>
54
+ <div class="wallet-label-venmo">
55
+ <div class="divider">|</div>
56
+ {logo && (
57
+ <div class="logo" optional>
58
+ {logo}
59
+ <Space />
60
+ </div>
61
+ )}
62
+ {label && (
63
+ <div class="label">
64
+ <Text className={["limit"]}>{label}</Text>
65
+ </div>
66
+ )}
67
+ </div>
68
+ </Style>
69
+ );
71
70
  }
@@ -1,43 +1,54 @@
1
1
  /* @flow */
2
2
  /** @jsx node */
3
3
 
4
- import { VerkkopankkiLogo } from '@paypal/sdk-logos/src';
5
- import { Fragment, node } from '@krakenjs/jsx-pragmatic/src';
6
-
7
- import { BUTTON_LAYOUT } from '../../constants';
8
- import { DEFAULT_APM_FUNDING_CONFIG, type FundingSourceConfig, BasicLabel } from '../common';
9
- import { Text, Space } from '../../ui/text';
10
- import { enableLogoCDNExperiment } from '../../lib/getLogoCDNExperiment';
11
-
12
- export function getVerkkopankkiConfig() : FundingSourceConfig {
13
- return {
14
- ...DEFAULT_APM_FUNDING_CONFIG,
15
-
16
- automatic: false,
17
-
18
- layouts: [
19
- BUTTON_LAYOUT.VERTICAL
20
- ],
21
-
22
- shippingChange: false,
23
-
24
- Logo: ({ logoColor, optional }) => enableLogoCDNExperiment(VerkkopankkiLogo, { logoColor, optional }),
25
-
26
- Label: ({ logo, ...opts }) => {
27
- if (__WEB__) {
28
- return logo;
29
- }
30
-
31
- const apmLogo = (
32
- <Fragment>
33
- { logo }<Space /><Text animate optional>Verkkopankki</Text>
34
- </Fragment>
35
- );
36
-
37
- return (<BasicLabel
38
- { ...opts }
39
- logo={ apmLogo }
40
- />);
41
- }
42
- };
4
+ import {
5
+ VerkkopankkiLogoInlineSVG,
6
+ VerkkopankkiLogoExternalImage,
7
+ } from "@paypal/sdk-logos/src";
8
+ import { Fragment, node } from "@krakenjs/jsx-pragmatic/src";
9
+
10
+ import { BUTTON_LAYOUT } from "../../constants";
11
+ import {
12
+ DEFAULT_APM_FUNDING_CONFIG,
13
+ type FundingSourceConfig,
14
+ BasicLabel,
15
+ } from "../common";
16
+ import { Text, Space } from "../../ui/text";
17
+
18
+ export function getVerkkopankkiConfig(): FundingSourceConfig {
19
+ return {
20
+ ...DEFAULT_APM_FUNDING_CONFIG,
21
+
22
+ automatic: false,
23
+
24
+ layouts: [BUTTON_LAYOUT.VERTICAL],
25
+
26
+ shippingChange: false,
27
+
28
+ Logo: ({ logoColor, optional }) => {
29
+ if (__WEB__) {
30
+ return VerkkopankkiLogoExternalImage({ logoColor, optional });
31
+ }
32
+
33
+ return VerkkopankkiLogoInlineSVG({ logoColor, optional });
34
+ },
35
+
36
+ Label: ({ logo, ...opts }) => {
37
+ if (__WEB__) {
38
+ return logo;
39
+ }
40
+
41
+ const apmLogo = (
42
+ <Fragment>
43
+ {logo}
44
+ <Space />
45
+ <Text animate optional>
46
+ Verkkopankki
47
+ </Text>
48
+ </Fragment>
49
+ );
50
+
51
+ return <BasicLabel {...opts} logo={apmLogo} />;
52
+ },
53
+ };
43
54
  }
@@ -1,3 +1,3 @@
1
1
  /* @flow */
2
2
 
3
- export * from './config';
3
+ export * from "./config";
@@ -1,41 +1,52 @@
1
1
  /* @flow */
2
2
  /** @jsx node */
3
3
 
4
- import { WechatpayLogo } from '@paypal/sdk-logos/src';
5
- import { Fragment, node } from '@krakenjs/jsx-pragmatic/src';
6
-
7
- import { BUTTON_LAYOUT } from '../../constants';
8
- import { DEFAULT_APM_FUNDING_CONFIG, type FundingSourceConfig, BasicLabel } from '../common';
9
- import { Text, Space } from '../../ui/text';
10
- import { enableLogoCDNExperiment } from '../../lib/getLogoCDNExperiment';
11
-
12
- export function getWechatpayConfig() : FundingSourceConfig {
13
- return {
14
- ...DEFAULT_APM_FUNDING_CONFIG,
15
-
16
- shippingChange: false,
17
-
18
- layouts: [
19
- BUTTON_LAYOUT.VERTICAL
20
- ],
21
-
22
- Logo: ({ logoColor, optional }) => enableLogoCDNExperiment(WechatpayLogo, { logoColor, optional }),
23
-
24
- Label: ({ logo, ...opts }) => {
25
- if (__WEB__) {
26
- return logo;
27
- }
28
-
29
- const apmLogo = (
30
- <Fragment>
31
- { logo }<Space /><Text animate optional>WeChat Pay</Text>
32
- </Fragment>
33
- );
34
-
35
- return (<BasicLabel
36
- { ...opts }
37
- logo={ apmLogo }
38
- />);
39
- }
40
- };
4
+ import {
5
+ WechatpayLogoInlineSVG,
6
+ WechatpayLogoExternalImage,
7
+ } from "@paypal/sdk-logos/src";
8
+ import { Fragment, node } from "@krakenjs/jsx-pragmatic/src";
9
+
10
+ import { BUTTON_LAYOUT } from "../../constants";
11
+ import {
12
+ DEFAULT_APM_FUNDING_CONFIG,
13
+ type FundingSourceConfig,
14
+ BasicLabel,
15
+ } from "../common";
16
+ import { Text, Space } from "../../ui/text";
17
+
18
+ export function getWechatpayConfig(): FundingSourceConfig {
19
+ return {
20
+ ...DEFAULT_APM_FUNDING_CONFIG,
21
+
22
+ shippingChange: false,
23
+
24
+ layouts: [BUTTON_LAYOUT.VERTICAL],
25
+
26
+ Logo: ({ logoColor, optional }) => {
27
+ if (__WEB__) {
28
+ return WechatpayLogoExternalImage({ logoColor, optional });
29
+ }
30
+
31
+ return WechatpayLogoInlineSVG({ logoColor, optional });
32
+ },
33
+
34
+ Label: ({ logo, ...opts }) => {
35
+ if (__WEB__) {
36
+ return logo;
37
+ }
38
+
39
+ const apmLogo = (
40
+ <Fragment>
41
+ {logo}
42
+ <Space />
43
+ <Text animate optional>
44
+ WeChat Pay
45
+ </Text>
46
+ </Fragment>
47
+ );
48
+
49
+ return <BasicLabel {...opts} logo={apmLogo} />;
50
+ },
51
+ };
41
52
  }
@@ -1,4 +1,3 @@
1
1
  /* @flow */
2
2
 
3
- export * from './config';
4
-
3
+ export * from "./config";
@@ -1,22 +1,28 @@
1
1
  /* @flow */
2
2
  /** @jsx node */
3
3
 
4
- import { ZimplerLogo } from '@paypal/sdk-logos/src';
4
+ import {
5
+ ZimplerLogoInlineSVG,
6
+ ZimplerLogoExternalImage,
7
+ } from "@paypal/sdk-logos/src";
5
8
 
6
- import { BUTTON_LAYOUT } from '../../constants';
7
- import { enableLogoCDNExperiment } from '../../lib/getLogoCDNExperiment';
8
- import { DEFAULT_FUNDING_CONFIG, type FundingSourceConfig } from '../common';
9
+ import { BUTTON_LAYOUT } from "../../constants";
10
+ import { DEFAULT_FUNDING_CONFIG, type FundingSourceConfig } from "../common";
9
11
 
10
- export function getZimplerConfig() : FundingSourceConfig {
11
- return {
12
- ...DEFAULT_FUNDING_CONFIG,
12
+ export function getZimplerConfig(): FundingSourceConfig {
13
+ return {
14
+ ...DEFAULT_FUNDING_CONFIG,
13
15
 
14
- shippingChange: false,
16
+ shippingChange: false,
15
17
 
16
- layouts: [
17
- BUTTON_LAYOUT.VERTICAL
18
- ],
18
+ layouts: [BUTTON_LAYOUT.VERTICAL],
19
19
 
20
- Logo: ({ logoColor, optional }) => enableLogoCDNExperiment(ZimplerLogo, { logoColor, optional })
21
- };
20
+ Logo: ({ logoColor, optional }) => {
21
+ if (__WEB__) {
22
+ return ZimplerLogoExternalImage({ logoColor, optional });
23
+ }
24
+
25
+ return ZimplerLogoInlineSVG({ logoColor, optional });
26
+ },
27
+ };
22
28
  }
@@ -1,4 +1,3 @@
1
1
  /* @flow */
2
2
 
3
- export * from './config';
4
-
3
+ export * from "./config";
@@ -1,76 +1,92 @@
1
1
  /* @flow */
2
2
 
3
- import { PopupOpenError as _PopupOpenError, destroy as zoidDestroy, destroyComponents } from '@krakenjs/zoid/src';
4
-
5
- import type { LazyExport, LazyProtectedExport } from '../types';
6
- import { allowIframe as _allowIframe, protectedExport } from '../lib';
7
- import { getCheckoutComponent, type CheckoutComponent } from '../zoid/checkout';
8
- import { getButtonsComponent, type ButtonsComponent } from '../zoid/buttons';
9
- import { getCardFormComponent, type CardFormComponent } from '../zoid/card-form';
10
- import { getPaymentFieldsComponent, type PaymentFieldsComponent } from '../zoid/payment-fields';
11
- import { getMenuComponent, type MenuComponent } from '../zoid/menu';
12
- import { getInstallmentsComponent, type InstallmentsComponent } from '../zoid/installments';
13
- import { Buttons as _ButtonsTemplate } from '../ui/buttons';
14
- import { getQRCodeComponent, type QRCodeComponent } from '../zoid/qr-code';
15
- import { getModalComponent, type ModalComponent } from '../zoid/modal/component';
16
-
17
- export const Buttons : LazyExport<ButtonsComponent> = {
18
- __get__: () => getButtonsComponent()
3
+ import {
4
+ PopupOpenError as _PopupOpenError,
5
+ destroy as zoidDestroy,
6
+ destroyComponents,
7
+ } from "@krakenjs/zoid/src";
8
+
9
+ import type { LazyExport, LazyProtectedExport } from "../types";
10
+ import { allowIframe as _allowIframe, protectedExport } from "../lib";
11
+ import { getCheckoutComponent, type CheckoutComponent } from "../zoid/checkout";
12
+ import { getButtonsComponent, type ButtonsComponent } from "../zoid/buttons";
13
+ import {
14
+ getCardFormComponent,
15
+ type CardFormComponent,
16
+ } from "../zoid/card-form";
17
+ import {
18
+ getPaymentFieldsComponent,
19
+ type PaymentFieldsComponent,
20
+ } from "../zoid/payment-fields";
21
+ import { getMenuComponent, type MenuComponent } from "../zoid/menu";
22
+ import {
23
+ getInstallmentsComponent,
24
+ type InstallmentsComponent,
25
+ } from "../zoid/installments";
26
+ import { Buttons as _ButtonsTemplate } from "../ui/buttons";
27
+ import { getQRCodeComponent, type QRCodeComponent } from "../zoid/qr-code";
28
+ import {
29
+ getModalComponent,
30
+ type ModalComponent,
31
+ } from "../zoid/modal/component";
32
+
33
+ export const Buttons: LazyExport<ButtonsComponent> = {
34
+ __get__: () => getButtonsComponent(),
19
35
  };
20
36
 
21
- export const Checkout : LazyProtectedExport<CheckoutComponent> = {
22
- __get__: () => protectedExport(getCheckoutComponent())
37
+ export const Checkout: LazyProtectedExport<CheckoutComponent> = {
38
+ __get__: () => protectedExport(getCheckoutComponent()),
23
39
  };
24
40
 
25
- export const CardForm : LazyProtectedExport<CardFormComponent> = {
26
- __get__: () => protectedExport(getCardFormComponent())
41
+ export const CardForm: LazyProtectedExport<CardFormComponent> = {
42
+ __get__: () => protectedExport(getCardFormComponent()),
27
43
  };
28
44
 
29
- export const PaymentFields : LazyProtectedExport<PaymentFieldsComponent> = {
30
- __get__: () => protectedExport(getPaymentFieldsComponent())
45
+ export const PaymentFields: LazyProtectedExport<PaymentFieldsComponent> = {
46
+ __get__: () => protectedExport(getPaymentFieldsComponent()),
31
47
  };
32
48
 
33
- export const Menu : LazyProtectedExport<MenuComponent> = {
34
- __get__: () => protectedExport(getMenuComponent())
49
+ export const Menu: LazyProtectedExport<MenuComponent> = {
50
+ __get__: () => protectedExport(getMenuComponent()),
35
51
  };
36
52
 
37
- export const Modal : LazyProtectedExport<ModalComponent> = {
38
- __get__: () => protectedExport(getModalComponent())
53
+ export const Modal: LazyProtectedExport<ModalComponent> = {
54
+ __get__: () => protectedExport(getModalComponent()),
39
55
  };
40
56
 
41
- export const Installments : LazyProtectedExport<InstallmentsComponent> = {
42
- __get__: () => protectedExport(getInstallmentsComponent())
57
+ export const Installments: LazyProtectedExport<InstallmentsComponent> = {
58
+ __get__: () => protectedExport(getInstallmentsComponent()),
43
59
  };
44
60
 
45
- export const QRCode : LazyProtectedExport<QRCodeComponent> = {
46
- __get__: () => protectedExport(getQRCodeComponent())
61
+ export const QRCode: LazyProtectedExport<QRCodeComponent> = {
62
+ __get__: () => protectedExport(getQRCodeComponent()),
47
63
  };
48
64
 
49
- export const ButtonsTemplate : LazyProtectedExport<typeof _ButtonsTemplate> = {
50
- __get__: () => protectedExport(_ButtonsTemplate)
65
+ export const ButtonsTemplate: LazyProtectedExport<typeof _ButtonsTemplate> = {
66
+ __get__: () => protectedExport(_ButtonsTemplate),
51
67
  };
52
68
 
53
- export const PopupOpenError : LazyProtectedExport<typeof _PopupOpenError> = {
54
- __get__: () => protectedExport(_PopupOpenError)
69
+ export const PopupOpenError: LazyProtectedExport<typeof _PopupOpenError> = {
70
+ __get__: () => protectedExport(_PopupOpenError),
55
71
  };
56
72
 
57
- export const allowIframe : LazyProtectedExport<typeof _allowIframe> = {
58
- __get__: () => protectedExport(_allowIframe)
73
+ export const allowIframe: LazyProtectedExport<typeof _allowIframe> = {
74
+ __get__: () => protectedExport(_allowIframe),
59
75
  };
60
76
 
61
- export const forceIframe : LazyProtectedExport<typeof _allowIframe> = {
62
- __get__: () => protectedExport(_allowIframe)
77
+ export const forceIframe: LazyProtectedExport<typeof _allowIframe> = {
78
+ __get__: () => protectedExport(_allowIframe),
63
79
  };
64
80
 
65
- export const destroyAll : LazyProtectedExport<typeof destroyComponents> = {
66
- __get__: () => protectedExport(destroyComponents)
81
+ export const destroyAll: LazyProtectedExport<typeof destroyComponents> = {
82
+ __get__: () => protectedExport(destroyComponents),
67
83
  };
68
84
 
69
85
  export function setup() {
70
- getButtonsComponent();
71
- getCheckoutComponent();
86
+ getButtonsComponent();
87
+ getCheckoutComponent();
72
88
  }
73
89
 
74
- export function destroy(err? : mixed) {
75
- zoidDestroy(err);
90
+ export function destroy(err?: mixed) {
91
+ zoidDestroy(err);
76
92
  }
@@ -1,15 +1,18 @@
1
1
  /* @flow */
2
2
 
3
- import { destroy as zoidDestroy } from '@krakenjs/zoid/src';
3
+ import { destroy as zoidDestroy } from "@krakenjs/zoid/src";
4
4
 
5
- import type { LazyExport } from '../types';
6
- import { getCardFieldsComponent, type CardFieldsComponent } from '../zoid/card-fields/component';
7
- import { protectedExport } from '../lib';
5
+ import type { LazyExport } from "../types";
6
+ import {
7
+ getCardFieldsComponent,
8
+ type CardFieldsComponent,
9
+ } from "../zoid/card-fields/component";
10
+ import { protectedExport } from "../lib";
8
11
 
9
- export const CardFields : LazyExport<CardFieldsComponent> = {
10
- __get__: () => protectedExport(getCardFieldsComponent())
12
+ export const CardFields: LazyExport<CardFieldsComponent> = {
13
+ __get__: () => protectedExport(getCardFieldsComponent()),
11
14
  };
12
15
 
13
- export function destroy(err? : mixed) {
14
- zoidDestroy(err);
16
+ export function destroy(err?: mixed) {
17
+ zoidDestroy(err);
15
18
  }
@@ -1,9 +1,12 @@
1
1
  /* @flow */
2
2
  /* eslint import/no-deprecated: 0 */
3
3
 
4
- import type { LazyExport } from '../types';
5
- import { getPaymentFieldsComponent, type PaymentFieldsComponent } from '../zoid/payment-fields/component';
4
+ import type { LazyExport } from "../types";
5
+ import {
6
+ getPaymentFieldsComponent,
7
+ type PaymentFieldsComponent,
8
+ } from "../zoid/payment-fields/component";
6
9
 
7
- export const Fields : LazyExport<PaymentFieldsComponent> = {
8
- __get__: () => getPaymentFieldsComponent()
10
+ export const Fields: LazyExport<PaymentFieldsComponent> = {
11
+ __get__: () => getPaymentFieldsComponent(),
9
12
  };
@@ -1,8 +1,8 @@
1
1
  /* @flow */
2
2
 
3
- import type { LazyExport } from '../types';
4
- import { getMarksComponent, type MarksComponent } from '../marks/component';
3
+ import type { LazyExport } from "../types";
4
+ import { getMarksComponent, type MarksComponent } from "../marks/component";
5
5
 
6
- export const Marks : LazyExport<MarksComponent> = {
7
- __get__: () => getMarksComponent()
6
+ export const Marks: LazyExport<MarksComponent> = {
7
+ __get__: () => getMarksComponent(),
8
8
  };