@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.
- package/README.md +8 -0
- package/__sdk__.js +72 -76
- package/dist/button.js +1 -1
- package/globals.js +28 -30
- package/package.json +6 -4
- package/src/constants/button.js +37 -36
- package/src/constants/class.js +32 -30
- package/src/constants/index.js +3 -3
- package/src/constants/misc.js +14 -12
- package/src/declarations.js +19 -19
- package/src/funding/applepay/config.jsx +51 -50
- package/src/funding/applepay/index.js +1 -1
- package/src/funding/applepay/style.scoped.scss +1 -1
- package/src/funding/applepay/template.jsx +16 -11
- package/src/funding/bancontact/config.jsx +48 -37
- package/src/funding/bancontact/index.js +1 -2
- package/src/funding/blik/config.jsx +48 -37
- package/src/funding/blik/index.js +1 -2
- package/src/funding/boleto/config.jsx +50 -39
- package/src/funding/boleto/index.js +1 -2
- package/src/funding/card/amex/config.js +9 -8
- package/src/funding/card/amex/index.js +1 -2
- package/src/funding/card/config.jsx +246 -177
- package/src/funding/card/discover/config.js +9 -7
- package/src/funding/card/discover/index.js +1 -2
- package/src/funding/card/elo/config.js +6 -7
- package/src/funding/card/elo/index.js +1 -2
- package/src/funding/card/hiper/config.js +9 -7
- package/src/funding/card/hiper/index.js +1 -2
- package/src/funding/card/index.js +1 -1
- package/src/funding/card/jcb/config.js +6 -7
- package/src/funding/card/jcb/index.js +1 -2
- package/src/funding/card/mastercard/config.js +9 -7
- package/src/funding/card/mastercard/index.js +1 -2
- package/src/funding/card/visa/config.js +9 -7
- package/src/funding/card/visa/index.js +1 -2
- package/src/funding/common.jsx +242 -216
- package/src/funding/config.js +212 -65
- package/src/funding/content.jsx +1946 -337
- package/src/funding/credit/config.jsx +74 -57
- package/src/funding/credit/index.js +1 -2
- package/src/funding/eps/config.jsx +45 -37
- package/src/funding/eps/index.js +1 -2
- package/src/funding/funding.js +193 -100
- package/src/funding/giropay/config.jsx +48 -38
- package/src/funding/giropay/index.js +1 -2
- package/src/funding/ideal/config.jsx +48 -37
- package/src/funding/ideal/index.js +1 -2
- package/src/funding/index.js +2 -2
- package/src/funding/itau/config.jsx +41 -41
- package/src/funding/itau/index.js +1 -1
- package/src/funding/maxima/config.jsx +25 -19
- package/src/funding/maxima/index.js +1 -2
- package/src/funding/mercadopago/config.jsx +48 -37
- package/src/funding/mercadopago/index.js +1 -2
- package/src/funding/multibanco/config.jsx +50 -39
- package/src/funding/multibanco/index.js +1 -2
- package/src/funding/mybank/config.jsx +48 -37
- package/src/funding/mybank/index.js +1 -2
- package/src/funding/oxxo/config.jsx +50 -39
- package/src/funding/oxxo/index.js +1 -2
- package/src/funding/p24/config.jsx +45 -37
- package/src/funding/p24/index.js +1 -2
- package/src/funding/paidy/config.jsx +50 -39
- package/src/funding/paidy/index.js +1 -1
- package/src/funding/paylater/config.jsx +118 -111
- package/src/funding/paylater/index.js +1 -2
- package/src/funding/paypal/config.jsx +44 -46
- package/src/funding/paypal/index.js +1 -2
- package/src/funding/paypal/style.scoped.scss +80 -74
- package/src/funding/paypal/template.jsx +450 -354
- package/src/funding/payu/config.jsx +50 -39
- package/src/funding/payu/index.js +1 -1
- package/src/funding/satispay/config.jsx +50 -39
- package/src/funding/satispay/index.js +1 -1
- package/src/funding/sepa/config.jsx +19 -13
- package/src/funding/sepa/index.js +1 -2
- package/src/funding/sofort/config.jsx +48 -37
- package/src/funding/sofort/index.js +1 -2
- package/src/funding/trustly/config.jsx +50 -39
- package/src/funding/trustly/index.js +1 -2
- package/src/funding/venmo/config.jsx +80 -75
- package/src/funding/venmo/index.js +1 -2
- package/src/funding/venmo/style.scoped.scss +30 -32
- package/src/funding/venmo/template.jsx +56 -57
- package/src/funding/verkkopankki/config.jsx +50 -39
- package/src/funding/verkkopankki/index.js +1 -1
- package/src/funding/wechatpay/config.jsx +48 -37
- package/src/funding/wechatpay/index.js +1 -2
- package/src/funding/zimpler/config.jsx +19 -13
- package/src/funding/zimpler/index.js +1 -2
- package/src/interface/button.js +60 -44
- package/src/interface/card-fields.js +11 -8
- package/src/interface/fields.js +7 -4
- package/src/interface/marks.js +4 -4
- package/src/interface/payment-fields.js +7 -4
- package/src/interface/wallet.js +4 -4
- package/src/lib/errors.js +7 -7
- package/src/lib/index.js +5 -5
- package/src/lib/isRTLLanguage.js +3 -3
- package/src/lib/perceived-latency-instrumentation.js +54 -36
- package/src/lib/security.js +21 -17
- package/src/lib/session.js +39 -35
- package/src/marks/component.jsx +114 -65
- package/src/marks/index.js +1 -2
- package/src/marks/template.jsx +79 -65
- package/src/types.js +48 -48
- package/src/ui/buttons/button.jsx +311 -249
- package/src/ui/buttons/buttonDesigns/control.jsx +3 -5
- package/src/ui/buttons/buttonDesigns/divideLogoAnimation.jsx +127 -99
- package/src/ui/buttons/buttonDesigns/index.js +78 -75
- package/src/ui/buttons/buttonDesigns/inlineLogoTextDesign.jsx +102 -82
- package/src/ui/buttons/buttonDesigns/script.jsx +24 -18
- package/src/ui/buttons/buttonDesigns/types.js +6 -7
- package/src/ui/buttons/buttons.jsx +318 -212
- package/src/ui/buttons/config.js +62 -59
- package/src/ui/buttons/content.jsx +304 -119
- package/src/ui/buttons/index.js +1 -1
- package/src/ui/buttons/menu-button/index.js +1 -1
- package/src/ui/buttons/menu-button/menu-button.jsx +29 -22
- package/src/ui/buttons/menu-button/menu-button.scoped.scss +16 -17
- package/src/ui/buttons/poweredBy.jsx +23 -23
- package/src/ui/buttons/props.js +680 -529
- package/src/ui/buttons/script.jsx +182 -160
- package/src/ui/buttons/spinner.jsx +4 -6
- package/src/ui/buttons/style.jsx +15 -14
- package/src/ui/buttons/styles/base.js +24 -16
- package/src/ui/buttons/styles/button.js +24 -22
- package/src/ui/buttons/styles/color.js +118 -118
- package/src/ui/buttons/styles/custom.js +30 -24
- package/src/ui/buttons/styles/index.js +1 -1
- package/src/ui/buttons/styles/labels.js +17 -13
- package/src/ui/buttons/styles/page.js +3 -3
- package/src/ui/buttons/styles/responsive.js +226 -118
- package/src/ui/buttons/tagline.jsx +53 -54
- package/src/ui/chevron.jsx +27 -16
- package/src/ui/index.js +3 -3
- package/src/ui/loading.jsx +25 -18
- package/src/ui/text/index.js +1 -1
- package/src/ui/text/style.scoped.scss +25 -26
- package/src/ui/text/text.jsx +42 -20
- package/src/ui/tracking.jsx +18 -11
- package/src/zoid/buttons/component.jsx +836 -684
- package/src/zoid/buttons/container.jsx +140 -107
- package/src/zoid/buttons/index.js +1 -1
- package/src/zoid/buttons/prerender.jsx +84 -64
- package/src/zoid/buttons/util.js +355 -254
- package/src/zoid/card-fields/component.jsx +581 -549
- package/src/zoid/card-fields/index.js +1 -1
- package/src/zoid/card-fields/prerender.jsx +20 -17
- package/src/zoid/card-form/component.js +155 -141
- package/src/zoid/card-form/index.js +1 -1
- package/src/zoid/checkout/component.jsx +314 -282
- package/src/zoid/checkout/config.js +2 -2
- package/src/zoid/checkout/content.js +190 -154
- package/src/zoid/checkout/hacks.js +31 -28
- package/src/zoid/checkout/index.js +2 -2
- package/src/zoid/checkout/props.js +27 -33
- package/src/zoid/installments/component.jsx +83 -70
- package/src/zoid/installments/index.js +1 -1
- package/src/zoid/installments/props.js +1 -1
- package/src/zoid/menu/component.jsx +53 -48
- package/src/zoid/menu/index.js +1 -1
- package/src/zoid/menu/props.js +1 -3
- package/src/zoid/modal/component.jsx +119 -106
- package/src/zoid/modal/index.js +1 -1
- package/src/zoid/modal/props.js +1 -3
- package/src/zoid/payment-fields/component.jsx +215 -191
- package/src/zoid/payment-fields/container.jsx +73 -64
- package/src/zoid/payment-fields/index.js +1 -1
- package/src/zoid/payment-fields/prerender.jsx +16 -14
- package/src/zoid/payment-fields/props.js +6 -6
- package/src/zoid/qr-code/component.jsx +131 -115
- package/src/zoid/qr-code/container.jsx +74 -68
- package/src/zoid/qr-code/index.js +1 -1
- package/src/zoid/qr-code/prerender.jsx +17 -12
- package/src/zoid/qr-code/types.js +2 -2
- package/src/zoid/wallet/component.jsx +298 -260
- package/src/zoid/wallet/container.jsx +73 -64
- package/src/zoid/wallet/index.js +1 -1
- package/src/zoid/wallet/prerender.jsx +14 -14
- package/src/zoid/wallet/props.js +4 -4
- package/src/actions/save/index.js +0 -40
- package/src/interface/actions.js +0 -14
- package/src/lib/getLogoCDNExperiment.js +0 -25
|
@@ -1,45 +1,43 @@
|
|
|
1
|
-
|
|
2
1
|
.app-label {
|
|
3
|
-
|
|
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
|
-
|
|
9
|
-
text-align: center;
|
|
19
|
+
}
|
|
10
20
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
21
|
+
.logo {
|
|
22
|
+
margin-left: auto;
|
|
23
|
+
}
|
|
15
24
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
vertical-align: top;
|
|
19
|
-
height: 100%;
|
|
20
|
-
}
|
|
25
|
+
.label {
|
|
26
|
+
max-width: 40%;
|
|
21
27
|
|
|
22
|
-
.
|
|
23
|
-
|
|
28
|
+
.limit {
|
|
29
|
+
display: block;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
text-overflow: ellipsis;
|
|
24
32
|
}
|
|
33
|
+
}
|
|
25
34
|
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
41
|
-
|
|
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
|
|
4
|
-
import {
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} from
|
|
11
|
-
import { Text, Space } from
|
|
12
|
-
|
|
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
|
-
|
|
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
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
29
|
-
<BasicLabel { ...opts } logo={ AppLogo } />
|
|
30
|
-
);
|
|
32
|
+
return <BasicLabel {...opts} logo={AppLogo} />;
|
|
31
33
|
}
|
|
32
34
|
|
|
33
|
-
export function Label(opts
|
|
34
|
-
|
|
35
|
-
<BasicLabel { ...opts } />
|
|
36
|
-
);
|
|
35
|
+
export function Label(opts: LabelOptions): ChildType {
|
|
36
|
+
return <BasicLabel {...opts} />;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
export function
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
if (instrument && instrument.label) {
|
|
49
|
+
label = instrument.label;
|
|
50
|
+
}
|
|
48
51
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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 {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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,41 +1,52 @@
|
|
|
1
1
|
/* @flow */
|
|
2
2
|
/** @jsx node */
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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,22 +1,28 @@
|
|
|
1
1
|
/* @flow */
|
|
2
2
|
/** @jsx node */
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
ZimplerLogoInlineSVG,
|
|
6
|
+
ZimplerLogoExternalImage,
|
|
7
|
+
} from "@paypal/sdk-logos/src";
|
|
5
8
|
|
|
6
|
-
import { BUTTON_LAYOUT } from
|
|
7
|
-
import {
|
|
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()
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
export function getZimplerConfig(): FundingSourceConfig {
|
|
13
|
+
return {
|
|
14
|
+
...DEFAULT_FUNDING_CONFIG,
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
shippingChange: false,
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
BUTTON_LAYOUT.VERTICAL
|
|
18
|
-
],
|
|
18
|
+
layouts: [BUTTON_LAYOUT.VERTICAL],
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
Logo: ({ logoColor, optional }) => {
|
|
21
|
+
if (__WEB__) {
|
|
22
|
+
return ZimplerLogoExternalImage({ logoColor, optional });
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return ZimplerLogoInlineSVG({ logoColor, optional });
|
|
26
|
+
},
|
|
27
|
+
};
|
|
22
28
|
}
|
package/src/interface/button.js
CHANGED
|
@@ -1,76 +1,92 @@
|
|
|
1
1
|
/* @flow */
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
|
22
|
-
|
|
37
|
+
export const Checkout: LazyProtectedExport<CheckoutComponent> = {
|
|
38
|
+
__get__: () => protectedExport(getCheckoutComponent()),
|
|
23
39
|
};
|
|
24
40
|
|
|
25
|
-
export const CardForm
|
|
26
|
-
|
|
41
|
+
export const CardForm: LazyProtectedExport<CardFormComponent> = {
|
|
42
|
+
__get__: () => protectedExport(getCardFormComponent()),
|
|
27
43
|
};
|
|
28
44
|
|
|
29
|
-
export const PaymentFields
|
|
30
|
-
|
|
45
|
+
export const PaymentFields: LazyProtectedExport<PaymentFieldsComponent> = {
|
|
46
|
+
__get__: () => protectedExport(getPaymentFieldsComponent()),
|
|
31
47
|
};
|
|
32
48
|
|
|
33
|
-
export const Menu
|
|
34
|
-
|
|
49
|
+
export const Menu: LazyProtectedExport<MenuComponent> = {
|
|
50
|
+
__get__: () => protectedExport(getMenuComponent()),
|
|
35
51
|
};
|
|
36
52
|
|
|
37
|
-
export const Modal
|
|
38
|
-
|
|
53
|
+
export const Modal: LazyProtectedExport<ModalComponent> = {
|
|
54
|
+
__get__: () => protectedExport(getModalComponent()),
|
|
39
55
|
};
|
|
40
56
|
|
|
41
|
-
export const Installments
|
|
42
|
-
|
|
57
|
+
export const Installments: LazyProtectedExport<InstallmentsComponent> = {
|
|
58
|
+
__get__: () => protectedExport(getInstallmentsComponent()),
|
|
43
59
|
};
|
|
44
60
|
|
|
45
|
-
export const QRCode
|
|
46
|
-
|
|
61
|
+
export const QRCode: LazyProtectedExport<QRCodeComponent> = {
|
|
62
|
+
__get__: () => protectedExport(getQRCodeComponent()),
|
|
47
63
|
};
|
|
48
64
|
|
|
49
|
-
export const ButtonsTemplate
|
|
50
|
-
|
|
65
|
+
export const ButtonsTemplate: LazyProtectedExport<typeof _ButtonsTemplate> = {
|
|
66
|
+
__get__: () => protectedExport(_ButtonsTemplate),
|
|
51
67
|
};
|
|
52
68
|
|
|
53
|
-
export const PopupOpenError
|
|
54
|
-
|
|
69
|
+
export const PopupOpenError: LazyProtectedExport<typeof _PopupOpenError> = {
|
|
70
|
+
__get__: () => protectedExport(_PopupOpenError),
|
|
55
71
|
};
|
|
56
72
|
|
|
57
|
-
export const allowIframe
|
|
58
|
-
|
|
73
|
+
export const allowIframe: LazyProtectedExport<typeof _allowIframe> = {
|
|
74
|
+
__get__: () => protectedExport(_allowIframe),
|
|
59
75
|
};
|
|
60
76
|
|
|
61
|
-
export const forceIframe
|
|
62
|
-
|
|
77
|
+
export const forceIframe: LazyProtectedExport<typeof _allowIframe> = {
|
|
78
|
+
__get__: () => protectedExport(_allowIframe),
|
|
63
79
|
};
|
|
64
80
|
|
|
65
|
-
export const destroyAll
|
|
66
|
-
|
|
81
|
+
export const destroyAll: LazyProtectedExport<typeof destroyComponents> = {
|
|
82
|
+
__get__: () => protectedExport(destroyComponents),
|
|
67
83
|
};
|
|
68
84
|
|
|
69
85
|
export function setup() {
|
|
70
|
-
|
|
71
|
-
|
|
86
|
+
getButtonsComponent();
|
|
87
|
+
getCheckoutComponent();
|
|
72
88
|
}
|
|
73
89
|
|
|
74
|
-
export function destroy(err
|
|
75
|
-
|
|
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
|
|
3
|
+
import { destroy as zoidDestroy } from "@krakenjs/zoid/src";
|
|
4
4
|
|
|
5
|
-
import type { LazyExport } from
|
|
6
|
-
import {
|
|
7
|
-
|
|
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
|
|
10
|
-
|
|
12
|
+
export const CardFields: LazyExport<CardFieldsComponent> = {
|
|
13
|
+
__get__: () => protectedExport(getCardFieldsComponent()),
|
|
11
14
|
};
|
|
12
15
|
|
|
13
|
-
export function destroy(err
|
|
14
|
-
|
|
16
|
+
export function destroy(err?: mixed) {
|
|
17
|
+
zoidDestroy(err);
|
|
15
18
|
}
|
package/src/interface/fields.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/* @flow */
|
|
2
2
|
/* eslint import/no-deprecated: 0 */
|
|
3
3
|
|
|
4
|
-
import type { LazyExport } from
|
|
5
|
-
import {
|
|
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
|
|
8
|
-
|
|
10
|
+
export const Fields: LazyExport<PaymentFieldsComponent> = {
|
|
11
|
+
__get__: () => getPaymentFieldsComponent(),
|
|
9
12
|
};
|
package/src/interface/marks.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* @flow */
|
|
2
2
|
|
|
3
|
-
import type { LazyExport } from
|
|
4
|
-
import { getMarksComponent, type MarksComponent } from
|
|
3
|
+
import type { LazyExport } from "../types";
|
|
4
|
+
import { getMarksComponent, type MarksComponent } from "../marks/component";
|
|
5
5
|
|
|
6
|
-
export const Marks
|
|
7
|
-
|
|
6
|
+
export const Marks: LazyExport<MarksComponent> = {
|
|
7
|
+
__get__: () => getMarksComponent(),
|
|
8
8
|
};
|