@paypal/checkout-components 5.0.256-alpha.1 → 5.0.257

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 (184) hide show
  1. package/README.md +8 -0
  2. package/__sdk__.js +76 -76
  3. package/dist/button.js +1 -1
  4. package/globals.js +28 -30
  5. package/package.json +7 -5
  6. package/src/actions/save/index.js +17 -12
  7. package/src/constants/button.js +36 -36
  8. package/src/constants/class.js +32 -30
  9. package/src/constants/index.js +3 -3
  10. package/src/constants/misc.js +14 -12
  11. package/src/declarations.js +19 -19
  12. package/src/funding/applepay/config.jsx +51 -49
  13. package/src/funding/applepay/index.js +1 -1
  14. package/src/funding/applepay/style.scoped.scss +1 -1
  15. package/src/funding/applepay/template.jsx +16 -9
  16. package/src/funding/bancontact/config.jsx +48 -36
  17. package/src/funding/bancontact/index.js +1 -2
  18. package/src/funding/blik/config.jsx +48 -36
  19. package/src/funding/blik/index.js +1 -2
  20. package/src/funding/boleto/config.jsx +50 -38
  21. package/src/funding/boleto/index.js +1 -2
  22. package/src/funding/card/amex/config.js +9 -7
  23. package/src/funding/card/amex/index.js +1 -2
  24. package/src/funding/card/config.jsx +246 -178
  25. package/src/funding/card/discover/config.js +9 -6
  26. package/src/funding/card/discover/index.js +1 -2
  27. package/src/funding/card/elo/config.js +6 -6
  28. package/src/funding/card/elo/index.js +1 -2
  29. package/src/funding/card/hiper/config.js +9 -6
  30. package/src/funding/card/hiper/index.js +1 -2
  31. package/src/funding/card/index.js +1 -1
  32. package/src/funding/card/jcb/config.js +6 -6
  33. package/src/funding/card/jcb/index.js +1 -2
  34. package/src/funding/card/mastercard/config.js +9 -6
  35. package/src/funding/card/mastercard/index.js +1 -2
  36. package/src/funding/card/visa/config.js +9 -6
  37. package/src/funding/card/visa/index.js +1 -2
  38. package/src/funding/common.jsx +242 -216
  39. package/src/funding/config.js +212 -65
  40. package/src/funding/content.jsx +1946 -337
  41. package/src/funding/credit/config.jsx +74 -54
  42. package/src/funding/credit/index.js +1 -2
  43. package/src/funding/eps/config.jsx +45 -36
  44. package/src/funding/eps/index.js +1 -2
  45. package/src/funding/funding.js +193 -100
  46. package/src/funding/giropay/config.jsx +48 -37
  47. package/src/funding/giropay/index.js +1 -2
  48. package/src/funding/ideal/config.jsx +48 -36
  49. package/src/funding/ideal/index.js +1 -2
  50. package/src/funding/index.js +2 -2
  51. package/src/funding/itau/config.jsx +41 -40
  52. package/src/funding/itau/index.js +1 -1
  53. package/src/funding/maxima/config.jsx +25 -18
  54. package/src/funding/maxima/index.js +1 -2
  55. package/src/funding/mercadopago/config.jsx +48 -36
  56. package/src/funding/mercadopago/index.js +1 -2
  57. package/src/funding/multibanco/config.jsx +50 -38
  58. package/src/funding/multibanco/index.js +1 -2
  59. package/src/funding/mybank/config.jsx +48 -36
  60. package/src/funding/mybank/index.js +1 -2
  61. package/src/funding/oxxo/config.jsx +50 -38
  62. package/src/funding/oxxo/index.js +1 -2
  63. package/src/funding/p24/config.jsx +45 -36
  64. package/src/funding/p24/index.js +1 -2
  65. package/src/funding/paidy/config.jsx +50 -38
  66. package/src/funding/paidy/index.js +1 -1
  67. package/src/funding/paylater/config.jsx +118 -110
  68. package/src/funding/paylater/index.js +1 -2
  69. package/src/funding/paypal/config.jsx +43 -46
  70. package/src/funding/paypal/index.js +1 -2
  71. package/src/funding/paypal/style.scoped.scss +80 -74
  72. package/src/funding/paypal/template.jsx +450 -355
  73. package/src/funding/payu/config.jsx +50 -38
  74. package/src/funding/payu/index.js +1 -1
  75. package/src/funding/satispay/config.jsx +50 -38
  76. package/src/funding/satispay/index.js +1 -1
  77. package/src/funding/sepa/config.jsx +19 -12
  78. package/src/funding/sepa/index.js +1 -2
  79. package/src/funding/sofort/config.jsx +48 -36
  80. package/src/funding/sofort/index.js +1 -2
  81. package/src/funding/trustly/config.jsx +50 -38
  82. package/src/funding/trustly/index.js +1 -2
  83. package/src/funding/venmo/config.jsx +80 -74
  84. package/src/funding/venmo/index.js +1 -2
  85. package/src/funding/venmo/style.scoped.scss +30 -32
  86. package/src/funding/venmo/template.jsx +56 -56
  87. package/src/funding/verkkopankki/config.jsx +50 -38
  88. package/src/funding/verkkopankki/index.js +1 -1
  89. package/src/funding/wechatpay/config.jsx +48 -36
  90. package/src/funding/wechatpay/index.js +1 -2
  91. package/src/funding/zimpler/config.jsx +19 -12
  92. package/src/funding/zimpler/index.js +1 -2
  93. package/src/interface/actions.js +1 -1
  94. package/src/interface/button.js +60 -44
  95. package/src/interface/card-fields.js +11 -8
  96. package/src/interface/fields.js +7 -4
  97. package/src/interface/marks.js +4 -4
  98. package/src/interface/payment-fields.js +7 -4
  99. package/src/interface/wallet.js +4 -4
  100. package/src/lib/errors.js +7 -7
  101. package/src/lib/index.js +5 -5
  102. package/src/lib/isRTLLanguage.js +3 -3
  103. package/src/lib/perceived-latency-instrumentation.js +54 -36
  104. package/src/lib/security.js +21 -17
  105. package/src/lib/session.js +39 -35
  106. package/src/marks/component.jsx +114 -65
  107. package/src/marks/index.js +1 -2
  108. package/src/marks/template.jsx +79 -65
  109. package/src/types.js +48 -48
  110. package/src/ui/buttons/button.jsx +311 -249
  111. package/src/ui/buttons/buttonDesigns/control.jsx +3 -5
  112. package/src/ui/buttons/buttonDesigns/divideLogoAnimation.jsx +127 -99
  113. package/src/ui/buttons/buttonDesigns/index.js +78 -75
  114. package/src/ui/buttons/buttonDesigns/inlineLogoTextDesign.jsx +102 -82
  115. package/src/ui/buttons/buttonDesigns/script.jsx +24 -18
  116. package/src/ui/buttons/buttonDesigns/types.js +6 -7
  117. package/src/ui/buttons/buttons.jsx +318 -212
  118. package/src/ui/buttons/config.js +62 -59
  119. package/src/ui/buttons/content.jsx +304 -119
  120. package/src/ui/buttons/index.js +1 -1
  121. package/src/ui/buttons/menu-button/index.js +1 -1
  122. package/src/ui/buttons/menu-button/menu-button.jsx +29 -22
  123. package/src/ui/buttons/menu-button/menu-button.scoped.scss +16 -17
  124. package/src/ui/buttons/poweredBy.jsx +23 -23
  125. package/src/ui/buttons/props.js +677 -529
  126. package/src/ui/buttons/script.jsx +182 -160
  127. package/src/ui/buttons/spinner.jsx +4 -6
  128. package/src/ui/buttons/style.jsx +15 -14
  129. package/src/ui/buttons/styles/base.js +24 -16
  130. package/src/ui/buttons/styles/button.js +24 -22
  131. package/src/ui/buttons/styles/color.js +118 -118
  132. package/src/ui/buttons/styles/custom.js +30 -24
  133. package/src/ui/buttons/styles/index.js +1 -1
  134. package/src/ui/buttons/styles/labels.js +17 -13
  135. package/src/ui/buttons/styles/page.js +3 -3
  136. package/src/ui/buttons/styles/responsive.js +226 -118
  137. package/src/ui/buttons/tagline.jsx +53 -54
  138. package/src/ui/chevron.jsx +27 -16
  139. package/src/ui/index.js +3 -3
  140. package/src/ui/loading.jsx +25 -18
  141. package/src/ui/text/index.js +1 -1
  142. package/src/ui/text/style.scoped.scss +25 -26
  143. package/src/ui/text/text.jsx +42 -20
  144. package/src/ui/tracking.jsx +18 -11
  145. package/src/zoid/buttons/component.jsx +820 -677
  146. package/src/zoid/buttons/container.jsx +140 -107
  147. package/src/zoid/buttons/index.js +1 -1
  148. package/src/zoid/buttons/prerender.jsx +84 -64
  149. package/src/zoid/buttons/util.js +346 -254
  150. package/src/zoid/card-fields/component.jsx +581 -549
  151. package/src/zoid/card-fields/index.js +1 -1
  152. package/src/zoid/card-fields/prerender.jsx +20 -17
  153. package/src/zoid/card-form/component.js +155 -141
  154. package/src/zoid/card-form/index.js +1 -1
  155. package/src/zoid/checkout/component.jsx +314 -282
  156. package/src/zoid/checkout/config.js +2 -2
  157. package/src/zoid/checkout/content.js +190 -154
  158. package/src/zoid/checkout/hacks.js +31 -28
  159. package/src/zoid/checkout/index.js +2 -2
  160. package/src/zoid/checkout/props.js +27 -33
  161. package/src/zoid/installments/component.jsx +83 -70
  162. package/src/zoid/installments/index.js +1 -1
  163. package/src/zoid/installments/props.js +1 -1
  164. package/src/zoid/menu/component.jsx +53 -48
  165. package/src/zoid/menu/index.js +1 -1
  166. package/src/zoid/menu/props.js +1 -3
  167. package/src/zoid/modal/component.jsx +119 -106
  168. package/src/zoid/modal/index.js +1 -1
  169. package/src/zoid/modal/props.js +1 -3
  170. package/src/zoid/payment-fields/component.jsx +215 -191
  171. package/src/zoid/payment-fields/container.jsx +73 -64
  172. package/src/zoid/payment-fields/index.js +1 -1
  173. package/src/zoid/payment-fields/prerender.jsx +16 -14
  174. package/src/zoid/payment-fields/props.js +6 -6
  175. package/src/zoid/qr-code/component.jsx +131 -115
  176. package/src/zoid/qr-code/container.jsx +74 -68
  177. package/src/zoid/qr-code/index.js +1 -1
  178. package/src/zoid/qr-code/prerender.jsx +17 -12
  179. package/src/zoid/qr-code/types.js +2 -2
  180. package/src/zoid/wallet/component.jsx +298 -260
  181. package/src/zoid/wallet/container.jsx +73 -64
  182. package/src/zoid/wallet/index.js +1 -1
  183. package/src/zoid/wallet/prerender.jsx +14 -14
  184. package/src/zoid/wallet/props.js +4 -4
@@ -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,70 +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';
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";
12
17
 
13
- import css from './style.scoped.scss';
14
-
15
- export function AppLabel(opts : LabelOptions) : ChildType {
16
- const { logoColor } = opts;
18
+ export function AppLabel(opts: LabelOptions): ChildType {
19
+ const { logoColor } = opts;
17
20
 
18
- const AppLogo : ChildType = (
19
- <Style css={ css }>
20
- <VenmoLogo logoColor={ logoColor } loadFromCDN={ __WEB__ } />
21
- <Text className={ [ 'app-label' ] }>
22
- App
23
- </Text>
24
- </Style>
25
- );
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
+ );
26
31
 
27
- return (
28
- <BasicLabel { ...opts } logo={ AppLogo } />
29
- );
32
+ return <BasicLabel {...opts} logo={AppLogo} />;
30
33
  }
31
34
 
32
- export function Label(opts : LabelOptions) : ChildType {
33
- return (
34
- <BasicLabel { ...opts } />
35
- );
35
+ export function Label(opts: LabelOptions): ChildType {
36
+ return <BasicLabel {...opts} />;
36
37
  }
37
38
 
38
- export function WalletLabel({ ...props } : WalletLabelOptions) : ChildType {
39
- const { instrument, logoColor } = props;
40
- let label;
41
- const logo = <VenmoLogo logoColor={ logoColor } loadFromCDN={ __WEB__ } />;
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
+ );
42
47
 
43
- if (instrument && instrument.label) {
44
- label = instrument.label;
45
- }
46
-
48
+ if (instrument && instrument.label) {
49
+ label = instrument.label;
50
+ }
47
51
 
48
- return (
49
- <Style css={ css }>
50
- <div class='wallet-label-venmo'>
51
- <div class='divider'>|</div>
52
- {
53
- logo &&
54
- <div class='logo' optional>
55
- { logo }
56
- <Space />
57
- </div>
58
- }
59
- {
60
- label &&
61
- <div class='label'>
62
- <Text className={ [ 'limit' ] }>
63
- { label }
64
- </Text>
65
- </div>
66
- }
67
- </div>
68
- </Style>
69
- );
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
+ );
70
70
  }
@@ -1,42 +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
-
11
- export function getVerkkopankkiConfig() : FundingSourceConfig {
12
- return {
13
- ...DEFAULT_APM_FUNDING_CONFIG,
14
-
15
- automatic: false,
16
-
17
- layouts: [
18
- BUTTON_LAYOUT.VERTICAL
19
- ],
20
-
21
- shippingChange: false,
22
-
23
- Logo: ({ logoColor, optional }) => VerkkopankkiLogo({ logoColor, optional, loadFromCDN: __WEB__ }),
24
-
25
- Label: ({ logo, ...opts }) => {
26
- if (__WEB__) {
27
- return logo;
28
- }
29
-
30
- const apmLogo = (
31
- <Fragment>
32
- { logo }<Space /><Text animate optional>Verkkopankki</Text>
33
- </Fragment>
34
- );
35
-
36
- return (<BasicLabel
37
- { ...opts }
38
- logo={ apmLogo }
39
- />);
40
- }
41
- };
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
+ };
42
54
  }
@@ -1,3 +1,3 @@
1
1
  /* @flow */
2
2
 
3
- export * from './config';
3
+ export * from "./config";
@@ -1,40 +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
-
11
- export function getWechatpayConfig() : FundingSourceConfig {
12
- return {
13
- ...DEFAULT_APM_FUNDING_CONFIG,
14
-
15
- shippingChange: false,
16
-
17
- layouts: [
18
- BUTTON_LAYOUT.VERTICAL
19
- ],
20
-
21
- Logo: ({ logoColor, optional }) => WechatpayLogo({ logoColor, optional, loadFromCDN: __WEB__ }),
22
-
23
- Label: ({ logo, ...opts }) => {
24
- if (__WEB__) {
25
- return logo;
26
- }
27
-
28
- const apmLogo = (
29
- <Fragment>
30
- { logo }<Space /><Text animate optional>WeChat Pay</Text>
31
- </Fragment>
32
- );
33
-
34
- return (<BasicLabel
35
- { ...opts }
36
- logo={ apmLogo }
37
- />);
38
- }
39
- };
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
+ };
40
52
  }
@@ -1,4 +1,3 @@
1
1
  /* @flow */
2
2
 
3
- export * from './config';
4
-
3
+ export * from "./config";
@@ -1,21 +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 { DEFAULT_FUNDING_CONFIG, type FundingSourceConfig } from '../common';
9
+ import { BUTTON_LAYOUT } from "../../constants";
10
+ import { DEFAULT_FUNDING_CONFIG, type FundingSourceConfig } from "../common";
8
11
 
9
- export function getZimplerConfig() : FundingSourceConfig {
10
- return {
11
- ...DEFAULT_FUNDING_CONFIG,
12
+ export function getZimplerConfig(): FundingSourceConfig {
13
+ return {
14
+ ...DEFAULT_FUNDING_CONFIG,
12
15
 
13
- shippingChange: false,
16
+ shippingChange: false,
14
17
 
15
- layouts: [
16
- BUTTON_LAYOUT.VERTICAL
17
- ],
18
+ layouts: [BUTTON_LAYOUT.VERTICAL],
18
19
 
19
- Logo: ({ logoColor, optional }) => ZimplerLogo({ logoColor, optional, loadFromCDN: __WEB__ })
20
- };
20
+ Logo: ({ logoColor, optional }) => {
21
+ if (__WEB__) {
22
+ return ZimplerLogoExternalImage({ logoColor, optional });
23
+ }
24
+
25
+ return ZimplerLogoInlineSVG({ logoColor, optional });
26
+ },
27
+ };
21
28
  }
@@ -1,4 +1,3 @@
1
1
  /* @flow */
2
2
 
3
- export * from './config';
4
-
3
+ export * from "./config";
@@ -2,7 +2,7 @@
2
2
 
3
3
  import type { LazyProtectedExport } from "../types";
4
4
  import { createSaveAction, type CreateSaveAction } from "../actions/save";
5
- import {protectedExport} from '../lib'
5
+ import { protectedExport } from "../lib";
6
6
 
7
7
  export const actions: LazyProtectedExport<{|
8
8
  Save: CreateSaveAction,
@@ -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
  };