@paypal/checkout-components 5.0.202 → 5.0.203
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/package.json
CHANGED
package/src/ui/buttons/props.js
CHANGED
|
@@ -262,7 +262,7 @@ export type RenderButtonProps = {|
|
|
|
262
262
|
applePaySupport : boolean,
|
|
263
263
|
supportsPopups : boolean,
|
|
264
264
|
supportedNativeBrowser : boolean,
|
|
265
|
-
|
|
265
|
+
inline : boolean | void
|
|
266
266
|
|};
|
|
267
267
|
|
|
268
268
|
export type PrerenderDetails = {|
|
|
@@ -311,7 +311,7 @@ export type ButtonProps = {|
|
|
|
311
311
|
applePay : ApplePaySessionConfigRequest,
|
|
312
312
|
meta : {||},
|
|
313
313
|
renderedButtons : $ReadOnlyArray<$Values<typeof FUNDING>>,
|
|
314
|
-
|
|
314
|
+
inline : boolean | void
|
|
315
315
|
|};
|
|
316
316
|
|
|
317
317
|
// eslint-disable-next-line flowtype/require-exact-type
|
|
@@ -349,7 +349,7 @@ export type ButtonPropsInputs = {
|
|
|
349
349
|
applePaySupport : boolean,
|
|
350
350
|
supportsPopups : boolean,
|
|
351
351
|
supportedNativeBrowser : boolean,
|
|
352
|
-
|
|
352
|
+
inline : boolean | void
|
|
353
353
|
};
|
|
354
354
|
|
|
355
355
|
export const DEFAULT_STYLE = {
|
|
@@ -494,7 +494,7 @@ export function normalizeButtonProps(props : ?ButtonPropsInputs) : RenderButtonP
|
|
|
494
494
|
applePaySupport = false,
|
|
495
495
|
supportsPopups = false,
|
|
496
496
|
supportedNativeBrowser = false,
|
|
497
|
-
|
|
497
|
+
inline = false
|
|
498
498
|
} = props;
|
|
499
499
|
|
|
500
500
|
const { country, lang } = locale;
|
|
@@ -537,5 +537,5 @@ export function normalizeButtonProps(props : ?ButtonPropsInputs) : RenderButtonP
|
|
|
537
537
|
|
|
538
538
|
return { clientID, fundingSource, style, locale, remembered, env, fundingEligibility, platform, clientAccessToken,
|
|
539
539
|
buttonSessionID, commit, sessionID, nonce, components, onShippingChange, personalization, content, wallet, flow,
|
|
540
|
-
experiment, vault, userIDToken, applePay, applePaySupport, supportsPopups, supportedNativeBrowser,
|
|
540
|
+
experiment, vault, userIDToken, applePay, applePaySupport, supportsPopups, supportedNativeBrowser, inline };
|
|
541
541
|
}
|
|
@@ -50,7 +50,7 @@ export function getCheckoutComponent() : CheckoutComponent {
|
|
|
50
50
|
},
|
|
51
51
|
|
|
52
52
|
containerTemplate: ({ context, close, focus, doc, event, frame, prerenderFrame, props }) => {
|
|
53
|
-
const { nonce, locale: { lang } } = props;
|
|
53
|
+
const { nonce, locale: { lang }, inline } = props;
|
|
54
54
|
const content = containerContent[lang];
|
|
55
55
|
return (
|
|
56
56
|
<Overlay
|
|
@@ -62,6 +62,7 @@ export function getCheckoutComponent() : CheckoutComponent {
|
|
|
62
62
|
prerenderFrame={ prerenderFrame }
|
|
63
63
|
content={ content }
|
|
64
64
|
nonce={ nonce }
|
|
65
|
+
fullScreen={ inline === true }
|
|
65
66
|
/>
|
|
66
67
|
).render(dom({ doc }));
|
|
67
68
|
},
|
|
@@ -230,10 +231,12 @@ export function getCheckoutComponent() : CheckoutComponent {
|
|
|
230
231
|
type: 'object',
|
|
231
232
|
default: () => (window.__test__ || { action: 'checkout' })
|
|
232
233
|
},
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
234
|
+
|
|
235
|
+
inline: {
|
|
236
|
+
type: 'boolean',
|
|
237
|
+
required: false,
|
|
238
|
+
queryParam: true,
|
|
239
|
+
allowDelegate: true
|
|
237
240
|
}
|
|
238
241
|
},
|
|
239
242
|
|