@flopay/vue 1.14.0 → 1.14.1
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/{chunk-VXYNYMHI.mjs → chunk-GDB2HY7D.mjs} +13 -1
- package/dist/{chunk-2PLBNCM6.mjs → chunk-SWZFYEFE.mjs} +1 -1
- package/dist/index.cjs +12 -1
- package/dist/index.mjs +2 -2
- package/dist/payment-method-setup-entry.cjs +12 -1
- package/dist/payment-method-setup-entry.mjs +1 -1
- package/dist/{stripe-elements-QGT45VIE.mjs → stripe-elements-B55YXBZK.mjs} +1 -1
- package/package.json +3 -3
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
resolveSetupFutureUsage,
|
|
13
13
|
resolveWalletModeOptions,
|
|
14
14
|
shouldPreferWalletPopup,
|
|
15
|
+
stripeExpressMethodToOptionKey,
|
|
15
16
|
toStripeAppearance,
|
|
16
17
|
WALLET_SHEET_WINDOW_TOO_SMALL_CODE
|
|
17
18
|
} from "@flopay/shared";
|
|
@@ -218,6 +219,15 @@ function consumeStripePayPalReturn() {
|
|
|
218
219
|
|
|
219
220
|
// src/stripe-elements.ts
|
|
220
221
|
var WALLET_METHODS = /* @__PURE__ */ new Set(["apple_pay", "google_pay", "link", "paypal", "amazon_pay"]);
|
|
222
|
+
function buildExpressMethodMap(wallets) {
|
|
223
|
+
const enabledKeys = new Set(wallets.map(stripeExpressMethodToOptionKey));
|
|
224
|
+
return Object.fromEntries(
|
|
225
|
+
["applePay", "googlePay", "paypal", "link", "amazonPay", "klarna"].map((key) => [
|
|
226
|
+
key,
|
|
227
|
+
enabledKeys.has(key) ? "auto" : "never"
|
|
228
|
+
])
|
|
229
|
+
);
|
|
230
|
+
}
|
|
221
231
|
var EXPRESS_CHECKOUT_CLICK_BUDGET_MS = 900;
|
|
222
232
|
function checkoutButtonMethodFromProviderMethod(method) {
|
|
223
233
|
if (method === "paypal") return "paypal";
|
|
@@ -728,7 +738,9 @@ var StripePaymentMethods = defineComponent2({
|
|
|
728
738
|
if (wallets.length > 0 && walletContainer.value) {
|
|
729
739
|
if (shouldPreferWalletPopup()) cleanups.push(denyPaymentPermissionToNewFrames(document));
|
|
730
740
|
const elements = stripe.elements(walletElementsOptions(wallets));
|
|
731
|
-
const express = elements.create("expressCheckout"
|
|
741
|
+
const express = elements.create("expressCheckout", {
|
|
742
|
+
paymentMethods: buildExpressMethodMap(wallets)
|
|
743
|
+
});
|
|
732
744
|
express.on("click", (event) => gateWalletClick(event));
|
|
733
745
|
express.on("confirm", (event) => {
|
|
734
746
|
const attempt = walletAttempt;
|
|
@@ -38,7 +38,7 @@ function delay(ms) {
|
|
|
38
38
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
39
39
|
}
|
|
40
40
|
var StripeSetupMethods = defineAsyncComponent(
|
|
41
|
-
() => import("./stripe-elements-
|
|
41
|
+
() => import("./stripe-elements-B55YXBZK.mjs").then((module) => module.StripePaymentMethods)
|
|
42
42
|
);
|
|
43
43
|
var PayPalSetupMethods = defineAsyncComponent(
|
|
44
44
|
() => import("./payment-method-setup-paypal-XPSU4CHA.mjs").then((module) => module.PayPalSetupMethod)
|
package/dist/index.cjs
CHANGED
|
@@ -240,6 +240,15 @@ var stripe_elements_exports = {};
|
|
|
240
240
|
__export(stripe_elements_exports, {
|
|
241
241
|
StripePaymentMethods: () => StripePaymentMethods
|
|
242
242
|
});
|
|
243
|
+
function buildExpressMethodMap(wallets) {
|
|
244
|
+
const enabledKeys = new Set(wallets.map(import_shared6.stripeExpressMethodToOptionKey));
|
|
245
|
+
return Object.fromEntries(
|
|
246
|
+
["applePay", "googlePay", "paypal", "link", "amazonPay", "klarna"].map((key) => [
|
|
247
|
+
key,
|
|
248
|
+
enabledKeys.has(key) ? "auto" : "never"
|
|
249
|
+
])
|
|
250
|
+
);
|
|
251
|
+
}
|
|
243
252
|
function checkoutButtonMethodFromProviderMethod(method) {
|
|
244
253
|
if (method === "paypal") return "paypal";
|
|
245
254
|
if (method === "apple_pay") return "apple_pay";
|
|
@@ -761,7 +770,9 @@ var init_stripe_elements = __esm({
|
|
|
761
770
|
if (wallets.length > 0 && walletContainer.value) {
|
|
762
771
|
if ((0, import_shared6.shouldPreferWalletPopup)()) cleanups.push((0, import_shared6.denyPaymentPermissionToNewFrames)(document));
|
|
763
772
|
const elements = stripe.elements(walletElementsOptions(wallets));
|
|
764
|
-
const express = elements.create("expressCheckout"
|
|
773
|
+
const express = elements.create("expressCheckout", {
|
|
774
|
+
paymentMethods: buildExpressMethodMap(wallets)
|
|
775
|
+
});
|
|
765
776
|
express.on("click", (event) => gateWalletClick(event));
|
|
766
777
|
express.on("confirm", (event) => {
|
|
767
778
|
const attempt = walletAttempt;
|
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-DUU6SMKP.mjs";
|
|
4
4
|
import {
|
|
5
5
|
FloPayPaymentMethodSetup
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SWZFYEFE.mjs";
|
|
7
7
|
import {
|
|
8
8
|
FloPayCardSetupError,
|
|
9
9
|
VaultCardFields
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
FloPayProvider,
|
|
16
16
|
StripePaymentMethods,
|
|
17
17
|
hasStripePayPalReturn
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-GDB2HY7D.mjs";
|
|
19
19
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
import { dropThirdPartyOnlyError } from "@flopay/shared";
|
|
@@ -233,6 +233,15 @@ var stripe_elements_exports = {};
|
|
|
233
233
|
__export(stripe_elements_exports, {
|
|
234
234
|
StripePaymentMethods: () => StripePaymentMethods
|
|
235
235
|
});
|
|
236
|
+
function buildExpressMethodMap(wallets) {
|
|
237
|
+
const enabledKeys = new Set(wallets.map(import_shared5.stripeExpressMethodToOptionKey));
|
|
238
|
+
return Object.fromEntries(
|
|
239
|
+
["applePay", "googlePay", "paypal", "link", "amazonPay", "klarna"].map((key) => [
|
|
240
|
+
key,
|
|
241
|
+
enabledKeys.has(key) ? "auto" : "never"
|
|
242
|
+
])
|
|
243
|
+
);
|
|
244
|
+
}
|
|
236
245
|
function checkoutButtonMethodFromProviderMethod(method) {
|
|
237
246
|
if (method === "paypal") return "paypal";
|
|
238
247
|
if (method === "apple_pay") return "apple_pay";
|
|
@@ -754,7 +763,9 @@ var init_stripe_elements = __esm({
|
|
|
754
763
|
if (wallets.length > 0 && walletContainer.value) {
|
|
755
764
|
if ((0, import_shared5.shouldPreferWalletPopup)()) cleanups.push((0, import_shared5.denyPaymentPermissionToNewFrames)(document));
|
|
756
765
|
const elements = stripe.elements(walletElementsOptions(wallets));
|
|
757
|
-
const express = elements.create("expressCheckout"
|
|
766
|
+
const express = elements.create("expressCheckout", {
|
|
767
|
+
paymentMethods: buildExpressMethodMap(wallets)
|
|
768
|
+
});
|
|
758
769
|
express.on("click", (event) => gateWalletClick(event));
|
|
759
770
|
express.on("confirm", (event) => {
|
|
760
771
|
const attempt = walletAttempt;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flopay/vue",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.1",
|
|
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.14.
|
|
40
|
-
"@flopay/shared": "1.14.
|
|
39
|
+
"@flopay/js": "1.14.1",
|
|
40
|
+
"@flopay/shared": "1.14.1",
|
|
41
41
|
"@paypal/paypal-js": "^10.1.0",
|
|
42
42
|
"@stripe/stripe-js": "^9.17.0"
|
|
43
43
|
},
|