@flopay/vue 1.20.5 → 1.20.7
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/dist/flopay-runtime-checkout.d.ts +17 -0
- package/dist/index.cjs +6 -2
- package/dist/index.mjs +6 -2
- package/package.json +3 -3
|
@@ -22,11 +22,18 @@ export interface FloPayRuntimeCheckoutProps {
|
|
|
22
22
|
* "More payment options"; without them the checkout keeps the 1.x default layout.
|
|
23
23
|
*/
|
|
24
24
|
paymentMethodLayout?: PaymentMethodLayoutRules;
|
|
25
|
+
/**
|
|
26
|
+
* The checkout layout, as in 1.x: `default` (the card form in view) or `buttons`. The runtime
|
|
27
|
+
* lays out the payment methods for it; left out, the runtime keeps the 1.x default.
|
|
28
|
+
*/
|
|
29
|
+
layout?: CheckoutLayout;
|
|
25
30
|
/** The Flo-origin runtime script. */
|
|
26
31
|
runtimeUrl: string;
|
|
27
32
|
/** How long the runtime has to load before the `error` emit. Defaults to 10 seconds. */
|
|
28
33
|
runtimeTimeoutMs?: number;
|
|
29
34
|
}
|
|
35
|
+
/** The checkout layouts a merchant chooses from, as in 1.x. */
|
|
36
|
+
type CheckoutLayout = 'default' | 'buttons';
|
|
30
37
|
/**
|
|
31
38
|
* A card checkout that runs from the Flo-hosted runtime. The component holds no checkout
|
|
32
39
|
* logic: it loads the runtime, mounts it in a container, passes its props through, relays the
|
|
@@ -64,6 +71,10 @@ export declare const FloPayRuntimeCheckout: import("vue").DefineComponent<import
|
|
|
64
71
|
type: PropType<PaymentMethodLayoutRules>;
|
|
65
72
|
default: undefined;
|
|
66
73
|
};
|
|
74
|
+
layout: {
|
|
75
|
+
type: PropType<CheckoutLayout>;
|
|
76
|
+
default: undefined;
|
|
77
|
+
};
|
|
67
78
|
runtimeUrl: {
|
|
68
79
|
type: StringConstructor;
|
|
69
80
|
required: true;
|
|
@@ -106,6 +117,10 @@ export declare const FloPayRuntimeCheckout: import("vue").DefineComponent<import
|
|
|
106
117
|
type: PropType<PaymentMethodLayoutRules>;
|
|
107
118
|
default: undefined;
|
|
108
119
|
};
|
|
120
|
+
layout: {
|
|
121
|
+
type: PropType<CheckoutLayout>;
|
|
122
|
+
default: undefined;
|
|
123
|
+
};
|
|
109
124
|
runtimeUrl: {
|
|
110
125
|
type: StringConstructor;
|
|
111
126
|
required: true;
|
|
@@ -124,5 +139,7 @@ export declare const FloPayRuntimeCheckout: import("vue").DefineComponent<import
|
|
|
124
139
|
appearance: Record<string, unknown>;
|
|
125
140
|
strings: Record<string, string>;
|
|
126
141
|
paymentMethodLayout: PaymentMethodLayoutRules;
|
|
142
|
+
layout: CheckoutLayout;
|
|
127
143
|
runtimeTimeoutMs: number;
|
|
128
144
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
145
|
+
export {};
|
package/dist/index.cjs
CHANGED
|
@@ -5353,7 +5353,7 @@ function asFloPayError(caught) {
|
|
|
5353
5353
|
cause: caught
|
|
5354
5354
|
});
|
|
5355
5355
|
}
|
|
5356
|
-
var RUNTIME_CONTRACT_VERSION = "2.
|
|
5356
|
+
var RUNTIME_CONTRACT_VERSION = "2.2.0";
|
|
5357
5357
|
function rulesKey(rules) {
|
|
5358
5358
|
return rules === void 0 ? void 0 : JSON.stringify(rules);
|
|
5359
5359
|
}
|
|
@@ -5373,6 +5373,7 @@ var FloPayRuntimeCheckout = (0, import_vue14.defineComponent)({
|
|
|
5373
5373
|
type: Object,
|
|
5374
5374
|
default: void 0
|
|
5375
5375
|
},
|
|
5376
|
+
layout: { type: String, default: void 0 },
|
|
5376
5377
|
runtimeUrl: { type: String, required: true },
|
|
5377
5378
|
runtimeTimeoutMs: { type: Number, default: void 0 }
|
|
5378
5379
|
},
|
|
@@ -5406,6 +5407,7 @@ var FloPayRuntimeCheckout = (0, import_vue14.defineComponent)({
|
|
|
5406
5407
|
appearance: props.appearance,
|
|
5407
5408
|
strings: props.strings,
|
|
5408
5409
|
paymentMethodLayout: rulesFromKey(mountedLayoutRules),
|
|
5410
|
+
...props.layout ? { layout: props.layout } : {},
|
|
5409
5411
|
onEvent: (event) => emit("event", event)
|
|
5410
5412
|
});
|
|
5411
5413
|
},
|
|
@@ -5423,7 +5425,9 @@ var FloPayRuntimeCheckout = (0, import_vue14.defineComponent)({
|
|
|
5423
5425
|
// By value, so a new object with the same session does not mount again.
|
|
5424
5426
|
() => props.createSession === void 0 ? void 0 : JSON.stringify(props.createSession),
|
|
5425
5427
|
() => props.runtimeUrl,
|
|
5426
|
-
() => props.runtimeTimeoutMs
|
|
5428
|
+
() => props.runtimeTimeoutMs,
|
|
5429
|
+
// The runtime lays out its payment methods at mount, so a new layout mounts again.
|
|
5430
|
+
() => props.layout
|
|
5427
5431
|
],
|
|
5428
5432
|
() => start()
|
|
5429
5433
|
);
|
package/dist/index.mjs
CHANGED
|
@@ -3487,7 +3487,7 @@ function asFloPayError(caught) {
|
|
|
3487
3487
|
cause: caught
|
|
3488
3488
|
});
|
|
3489
3489
|
}
|
|
3490
|
-
var RUNTIME_CONTRACT_VERSION = "2.
|
|
3490
|
+
var RUNTIME_CONTRACT_VERSION = "2.2.0";
|
|
3491
3491
|
function rulesKey(rules) {
|
|
3492
3492
|
return rules === void 0 ? void 0 : JSON.stringify(rules);
|
|
3493
3493
|
}
|
|
@@ -3507,6 +3507,7 @@ var FloPayRuntimeCheckout = defineComponent6({
|
|
|
3507
3507
|
type: Object,
|
|
3508
3508
|
default: void 0
|
|
3509
3509
|
},
|
|
3510
|
+
layout: { type: String, default: void 0 },
|
|
3510
3511
|
runtimeUrl: { type: String, required: true },
|
|
3511
3512
|
runtimeTimeoutMs: { type: Number, default: void 0 }
|
|
3512
3513
|
},
|
|
@@ -3540,6 +3541,7 @@ var FloPayRuntimeCheckout = defineComponent6({
|
|
|
3540
3541
|
appearance: props.appearance,
|
|
3541
3542
|
strings: props.strings,
|
|
3542
3543
|
paymentMethodLayout: rulesFromKey(mountedLayoutRules),
|
|
3544
|
+
...props.layout ? { layout: props.layout } : {},
|
|
3543
3545
|
onEvent: (event) => emit("event", event)
|
|
3544
3546
|
});
|
|
3545
3547
|
},
|
|
@@ -3557,7 +3559,9 @@ var FloPayRuntimeCheckout = defineComponent6({
|
|
|
3557
3559
|
// By value, so a new object with the same session does not mount again.
|
|
3558
3560
|
() => props.createSession === void 0 ? void 0 : JSON.stringify(props.createSession),
|
|
3559
3561
|
() => props.runtimeUrl,
|
|
3560
|
-
() => props.runtimeTimeoutMs
|
|
3562
|
+
() => props.runtimeTimeoutMs,
|
|
3563
|
+
// The runtime lays out its payment methods at mount, so a new layout mounts again.
|
|
3564
|
+
() => props.layout
|
|
3561
3565
|
],
|
|
3562
3566
|
() => start()
|
|
3563
3567
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flopay/vue",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"dist"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@flopay/js": "1.20.
|
|
40
|
-
"@flopay/shared": "1.20.
|
|
39
|
+
"@flopay/js": "1.20.7",
|
|
40
|
+
"@flopay/shared": "1.20.7",
|
|
41
41
|
"@paypal/paypal-js": "^11.3.0",
|
|
42
42
|
"@stripe/stripe-js": "^10.3.0"
|
|
43
43
|
},
|