@rebilly/framepay-vue 12.217.2 → 12.217.3
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/CHANGELOG.md +3 -2
- package/dist/framepay-vue.js +324 -373
- package/dist/framepay-vue.umd.cjs +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
package/dist/framepay-vue.js
CHANGED
|
@@ -1,386 +1,337 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { createElementBlock as e, createElementVNode as t, h as n, markRaw as r, openBlock as i, renderSlot as a, withModifiers as o } from "vue";
|
|
2
|
+
//#region src/errors.js
|
|
3
|
+
function s({ message: e = "Could not mount FramePay to element.", details: t = null } = {}) {
|
|
4
|
+
this.message = e, this.details = t, this.name = "FramePayMountError";
|
|
4
5
|
}
|
|
5
|
-
function
|
|
6
|
-
|
|
6
|
+
function c({ message: e = "FramePay could not be initialized.", details: t = null } = {}) {
|
|
7
|
+
this.message = e, this.details = t, this.name = "FramePayInitializeError";
|
|
7
8
|
}
|
|
8
|
-
function
|
|
9
|
-
|
|
9
|
+
function l({ message: e = "FramePay could not be loaded.", details: t = null } = {}) {
|
|
10
|
+
this.message = e, this.details = t, this.name = "FramePayLoadError";
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/constants/links.js
|
|
14
|
+
var u = window.process?.env?.FRAMEPAY_SCRIPT_LINK;
|
|
12
15
|
window.process?.env?.FRAMEPAY_STYLE_LINK;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
new Error(
|
|
27
|
-
"@rebilly/framepay npm package: Failed to load FramePay script"
|
|
28
|
-
)
|
|
29
|
-
), document.head.append(r);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region ../framepay-npm/dist/index.es.js
|
|
18
|
+
var d = "https://framepay.rebilly.com/framepay.js", f = "https://framepay.rebilly.com/framepay.css";
|
|
19
|
+
async function p({ scriptLink: e, styleLink: t } = {}) {
|
|
20
|
+
return new Promise((n, r) => {
|
|
21
|
+
if (window.Framepay) n(window.Framepay);
|
|
22
|
+
else {
|
|
23
|
+
let i = document.createElement("link");
|
|
24
|
+
i.setAttribute("href", t || f), i.setAttribute("rel", "stylesheet"), document.head.prepend(i);
|
|
25
|
+
let a = document.createElement("script");
|
|
26
|
+
a.setAttribute("src", e || d), a.onload = () => n(window.Framepay), a.onerror = () => r(/* @__PURE__ */ Error("@rebilly/framepay npm package: Failed to load FramePay script")), document.head.append(a);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
32
29
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}),
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/install/load-script.js
|
|
32
|
+
var m = () => p({ scriptLink: u }).catch((e) => {
|
|
33
|
+
throw new l({ details: e });
|
|
34
|
+
}), h, g = new Promise((e) => {
|
|
35
|
+
h = e;
|
|
36
|
+
}), _ = h, v = g.then(m);
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region src/helpers/initialize-framepay.js
|
|
39
|
+
function y(e = {}) {
|
|
40
|
+
return v.then((t) => new Promise((n, r) => {
|
|
41
|
+
let i = !1;
|
|
42
|
+
t.on("ready", () => {
|
|
43
|
+
n(t);
|
|
44
|
+
}), t.on("error", (e) => {
|
|
45
|
+
i = !0, r(new c({ details: e }));
|
|
46
|
+
});
|
|
47
|
+
try {
|
|
48
|
+
!i && !t.initialized && (e.publishableKey || e.jwt) && t.initialize(e).catch((e) => {
|
|
49
|
+
r(new c({ details: e }));
|
|
50
|
+
});
|
|
51
|
+
} catch (e) {
|
|
52
|
+
throw new c({ details: e });
|
|
53
|
+
}
|
|
54
|
+
}));
|
|
58
55
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
56
|
+
var b = {
|
|
57
|
+
REBILLY_CARD: "card",
|
|
58
|
+
REBILLY_CARD_CVV: "cardCvv",
|
|
59
|
+
REBILLY_CARD_NUMBER: "cardNumber",
|
|
60
|
+
REBILLY_CARD_EXPIRATION: "cardExpiration",
|
|
61
|
+
REBILLY_BBAN_ACCOUNT_TYPE: "accountType",
|
|
62
|
+
REBILLY_BBAN_ROUTING_NUMBER: "routingNumber",
|
|
63
|
+
REBILLY_BBAN_ACCOUNT_NUMBER: "accountNumber",
|
|
64
|
+
REBILLY_IBAN: "iban",
|
|
65
|
+
REBILLY_GOOGLE_PAY: "googlePay",
|
|
66
|
+
REBILLY_APPLE_PAY: "applePay",
|
|
67
|
+
REBILLY_PAYPAL: "paypal"
|
|
71
68
|
};
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
});
|
|
69
|
+
//#endregion
|
|
70
|
+
//#region src/helpers/create-token.js
|
|
71
|
+
function x(e, t) {
|
|
72
|
+
return v.then((n) => {
|
|
73
|
+
if (!n.initialized) throw new c({ message: "Please initialize Framepay before creating a token" });
|
|
74
|
+
return n.createToken(e, t);
|
|
75
|
+
});
|
|
80
76
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/helpers/update-config.js
|
|
79
|
+
function S(e) {
|
|
80
|
+
return y(e).then((t) => {
|
|
81
|
+
t.update({ ...e });
|
|
82
|
+
});
|
|
85
83
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
f("form", {
|
|
126
|
-
id: "rebilly-form",
|
|
127
|
-
onSubmit: t[0] || (t[0] = I((...R) => r.handler && r.handler(...R), ["stop", "prevent"]))
|
|
128
|
-
}, [
|
|
129
|
-
B(e.$slots, "default")
|
|
130
|
-
], 32)
|
|
131
|
-
]);
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region \0plugin-vue:export-helper
|
|
86
|
+
var C = (e, t) => {
|
|
87
|
+
let n = e.__vccOpts || e;
|
|
88
|
+
for (let [e, r] of t) n[e] = r;
|
|
89
|
+
return n;
|
|
90
|
+
}, w = {
|
|
91
|
+
name: "RebillyForm",
|
|
92
|
+
props: {
|
|
93
|
+
extraData: {
|
|
94
|
+
type: Object,
|
|
95
|
+
default: () => ({})
|
|
96
|
+
},
|
|
97
|
+
configuration: {
|
|
98
|
+
type: Object,
|
|
99
|
+
default: () => ({})
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
emits: ["submit", "error"],
|
|
103
|
+
watch: { configuration(e) {
|
|
104
|
+
e && S(e);
|
|
105
|
+
} },
|
|
106
|
+
mounted() {
|
|
107
|
+
S(this.configuration);
|
|
108
|
+
},
|
|
109
|
+
methods: { handler(e) {
|
|
110
|
+
let t = e.target;
|
|
111
|
+
x(t, this.extraData).then((e) => {
|
|
112
|
+
this.$attrs.onSubmit ? this.$emit("submit", e, t) : t.submit();
|
|
113
|
+
}).catch((e) => {
|
|
114
|
+
this.$emit("error", e);
|
|
115
|
+
});
|
|
116
|
+
} }
|
|
117
|
+
}, T = { id: "stop-wrapper" };
|
|
118
|
+
function E(n, r, s, c, l, u) {
|
|
119
|
+
return i(), e("div", T, [t("form", {
|
|
120
|
+
id: "rebilly-form",
|
|
121
|
+
onSubmit: r[0] ||= o((...e) => u.handler && u.handler(...e), ["stop", "prevent"])
|
|
122
|
+
}, [a(n.$slots, "default")], 32)]);
|
|
132
123
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
"data-rebilly": "token",
|
|
138
|
-
type: "hidden"
|
|
124
|
+
var D = /*#__PURE__*/ C(w, [["render", E]]), O = { name: "RebillyToken" }, k = {
|
|
125
|
+
id: "rebilly-token",
|
|
126
|
+
"data-rebilly": "token",
|
|
127
|
+
type: "hidden"
|
|
139
128
|
};
|
|
140
|
-
function
|
|
141
|
-
|
|
129
|
+
function A(t, n, r, a, o, s) {
|
|
130
|
+
return i(), e("input", k);
|
|
142
131
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
132
|
+
var j = /*#__PURE__*/ C(O, [["render", A]]), M = {
|
|
133
|
+
render() {
|
|
134
|
+
return n("div", {
|
|
135
|
+
id: this.mountId,
|
|
136
|
+
domProps: { id: this.mountId }
|
|
137
|
+
});
|
|
138
|
+
},
|
|
139
|
+
props: {
|
|
140
|
+
id: { type: String },
|
|
141
|
+
configuration: {}
|
|
142
|
+
},
|
|
143
|
+
data() {
|
|
144
|
+
return {
|
|
145
|
+
element: null,
|
|
146
|
+
mountId: this.id ? this.id : `${this.$options.name}-mount`
|
|
147
|
+
};
|
|
148
|
+
},
|
|
149
|
+
methods: {
|
|
150
|
+
mountElement(e) {
|
|
151
|
+
y(this.configuration).then((t) => {
|
|
152
|
+
try {
|
|
153
|
+
this.elementType.startsWith("card") ? this.element = r(t.card.mount(e, this.elementType)) : this.elementType === "iban" ? this.element = r(t.iban.mount(e)) : [
|
|
154
|
+
b.REBILLY_BBAN_ACCOUNT_TYPE,
|
|
155
|
+
b.REBILLY_BBAN_ACCOUNT_NUMBER,
|
|
156
|
+
b.REBILLY_BBAN_ROUTING_NUMBER
|
|
157
|
+
].includes(this.elementType) && (this.element = r(t.bban.mount(e, this.elementType))), this.element.on("ready", () => this.$emit("ready")), this.element.on("change", (e) => this.$emit("change", e)), this.element.on("focus", () => this.$emit("focus")), this.element.on("blur", () => this.$emit("blur"));
|
|
158
|
+
} catch {
|
|
159
|
+
throw new s();
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
},
|
|
163
|
+
destroyElement() {
|
|
164
|
+
this.element && this.element.destroy();
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
created() {
|
|
168
|
+
this.mountElement(`#${this.mountId}`);
|
|
169
|
+
},
|
|
170
|
+
beforeDestroy() {
|
|
171
|
+
this.destroyElement();
|
|
172
|
+
},
|
|
173
|
+
beforeUnmount() {
|
|
174
|
+
this.destroyElement();
|
|
175
|
+
}
|
|
176
|
+
}, N = {
|
|
177
|
+
render() {
|
|
178
|
+
return n("div", {
|
|
179
|
+
id: this.mountId,
|
|
180
|
+
domProps: { id: this.mountId }
|
|
181
|
+
});
|
|
182
|
+
},
|
|
183
|
+
props: {
|
|
184
|
+
id: { type: String },
|
|
185
|
+
configuration: {}
|
|
186
|
+
},
|
|
187
|
+
data() {
|
|
188
|
+
return {
|
|
189
|
+
element: null,
|
|
190
|
+
mountId: this.id ? this.id : `${this.$options.name}-mount`
|
|
191
|
+
};
|
|
192
|
+
},
|
|
193
|
+
methods: {
|
|
194
|
+
mountElement(e) {
|
|
195
|
+
y(this.configuration).then((t) => {
|
|
196
|
+
try {
|
|
197
|
+
this.element = r(t.googlePay.mount(e)), this.element.on("ready", () => this.$emit("ready")), this.element.on("change", (e) => this.$emit("change", e)), this.element.on("focus", () => this.$emit("focus")), this.element.on("blur", () => this.$emit("blur")), this.element.on("error", () => this.$emit("error")), t.on("token-ready", (e) => {
|
|
198
|
+
this.$emit("token-ready", e), this.$parent.$emit("token-ready", e);
|
|
199
|
+
});
|
|
200
|
+
} catch (e) {
|
|
201
|
+
throw new s({ details: e });
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
},
|
|
205
|
+
destroyElement() {
|
|
206
|
+
this.element && this.element.destroy();
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
watch: { configuration(e) {
|
|
210
|
+
e && S(e);
|
|
211
|
+
} },
|
|
212
|
+
created() {
|
|
213
|
+
this.mountElement(`#${this.mountId}`);
|
|
214
|
+
},
|
|
215
|
+
beforeDestroy() {
|
|
216
|
+
this.destroyElement();
|
|
217
|
+
},
|
|
218
|
+
beforeUnmount() {
|
|
219
|
+
this.destroyElement();
|
|
220
|
+
}
|
|
221
|
+
}, P = {
|
|
222
|
+
render() {
|
|
223
|
+
return n("div", {
|
|
224
|
+
id: this.mountId,
|
|
225
|
+
domProps: { id: this.mountId }
|
|
226
|
+
});
|
|
227
|
+
},
|
|
228
|
+
props: {
|
|
229
|
+
id: { type: String },
|
|
230
|
+
configuration: {}
|
|
231
|
+
},
|
|
232
|
+
data() {
|
|
233
|
+
return {
|
|
234
|
+
element: null,
|
|
235
|
+
mountId: this.id ? this.id : `${this.$options.name}-mount`
|
|
236
|
+
};
|
|
237
|
+
},
|
|
238
|
+
methods: {
|
|
239
|
+
mountElement(e) {
|
|
240
|
+
y(this.configuration).then((t) => {
|
|
241
|
+
try {
|
|
242
|
+
let n = null;
|
|
243
|
+
this.elementType === b.REBILLY_APPLE_PAY ? n = t.applePay : this.elementType === b.REBILLY_PAYPAL && (n = t.paypal), this.element = r(n.mount(e)), t.on("token-ready", (e) => {
|
|
244
|
+
this.$emit("token-ready", e), this.$parent.$emit("token-ready", e);
|
|
245
|
+
});
|
|
246
|
+
} catch (e) {
|
|
247
|
+
throw new s({ details: e });
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
},
|
|
251
|
+
destroyElement() {
|
|
252
|
+
this.element && this.element.destroy();
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
watch: { configuration(e) {
|
|
256
|
+
e && S(e);
|
|
257
|
+
} },
|
|
258
|
+
created() {
|
|
259
|
+
this.mountElement(`#${this.mountId}`);
|
|
260
|
+
},
|
|
261
|
+
beforeDestroy() {
|
|
262
|
+
this.destroyElement();
|
|
263
|
+
},
|
|
264
|
+
beforeUnmount() {
|
|
265
|
+
this.destroyElement();
|
|
266
|
+
}
|
|
267
|
+
}, F = {
|
|
268
|
+
name: "rebilly-card",
|
|
269
|
+
data() {
|
|
270
|
+
return { elementType: b.REBILLY_CARD };
|
|
271
|
+
},
|
|
272
|
+
mixins: [M]
|
|
273
|
+
}, I = {
|
|
274
|
+
name: "rebilly-card-cvv",
|
|
275
|
+
data() {
|
|
276
|
+
return { elementType: b.REBILLY_CARD_CVV };
|
|
277
|
+
},
|
|
278
|
+
mixins: [M]
|
|
244
279
|
}, L = {
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
}, te = {
|
|
304
|
-
name: "rebilly-card-cvv",
|
|
305
|
-
data() {
|
|
306
|
-
return { elementType: i.REBILLY_CARD_CVV };
|
|
307
|
-
},
|
|
308
|
-
mixins: [a]
|
|
309
|
-
}, ne = {
|
|
310
|
-
name: "rebilly-card-expiration",
|
|
311
|
-
data() {
|
|
312
|
-
return { elementType: i.REBILLY_CARD_EXPIRATION };
|
|
313
|
-
},
|
|
314
|
-
mixins: [a]
|
|
315
|
-
}, ie = {
|
|
316
|
-
name: "rebilly-card-number",
|
|
317
|
-
data() {
|
|
318
|
-
return { elementType: i.REBILLY_CARD_NUMBER };
|
|
319
|
-
},
|
|
320
|
-
mixins: [a]
|
|
321
|
-
}, re = {
|
|
322
|
-
name: "rebilly-bban-account-type",
|
|
323
|
-
data() {
|
|
324
|
-
return { elementType: i.REBILLY_BBAN_ACCOUNT_TYPE };
|
|
325
|
-
},
|
|
326
|
-
mixins: [a]
|
|
327
|
-
}, oe = {
|
|
328
|
-
name: "rebilly-bban-routing-number",
|
|
329
|
-
data() {
|
|
330
|
-
return { elementType: i.REBILLY_BBAN_ROUTING_NUMBER };
|
|
331
|
-
},
|
|
332
|
-
mixins: [a]
|
|
333
|
-
}, se = {
|
|
334
|
-
name: "rebilly-bban-account-number",
|
|
335
|
-
data() {
|
|
336
|
-
return { elementType: i.REBILLY_BBAN_ACCOUNT_NUMBER };
|
|
337
|
-
},
|
|
338
|
-
mixins: [a]
|
|
339
|
-
}, ae = {
|
|
340
|
-
name: "rebilly-iban",
|
|
341
|
-
data() {
|
|
342
|
-
return { elementType: i.REBILLY_IBAN };
|
|
343
|
-
},
|
|
344
|
-
mixins: [a]
|
|
345
|
-
}, le = {
|
|
346
|
-
name: "rebilly-google-pay",
|
|
347
|
-
data() {
|
|
348
|
-
return { elementType: i.REBILLY_GOOGLE_PAY };
|
|
349
|
-
},
|
|
350
|
-
mixins: [H]
|
|
351
|
-
}, me = {
|
|
352
|
-
name: "rebilly-apple-pay",
|
|
353
|
-
data() {
|
|
354
|
-
return { elementType: i.REBILLY_APPLE_PAY };
|
|
355
|
-
},
|
|
356
|
-
mixins: [L]
|
|
357
|
-
}, de = {
|
|
358
|
-
name: "rebilly-paypal",
|
|
359
|
-
data() {
|
|
360
|
-
return { elementType: i.REBILLY_PAYPAL };
|
|
361
|
-
},
|
|
362
|
-
mixins: [L]
|
|
363
|
-
}, ce = {
|
|
364
|
-
install(e, t = {}) {
|
|
365
|
-
g(), m(t);
|
|
366
|
-
}
|
|
367
|
-
};
|
|
368
|
-
export {
|
|
369
|
-
me as RebillyApplePay,
|
|
370
|
-
se as RebillyBbanAccountNumber,
|
|
371
|
-
re as RebillyBbanAccountType,
|
|
372
|
-
oe as RebillyBbanRoutingNumber,
|
|
373
|
-
ee as RebillyCard,
|
|
374
|
-
te as RebillyCardCvv,
|
|
375
|
-
ne as RebillyCardExpiration,
|
|
376
|
-
ie as RebillyCardNumber,
|
|
377
|
-
i as RebillyFieldTypes,
|
|
378
|
-
Q as RebillyForm,
|
|
379
|
-
le as RebillyGooglePay,
|
|
380
|
-
ae as RebillyIban,
|
|
381
|
-
de as RebillyPaypal,
|
|
382
|
-
Z as RebillyToken,
|
|
383
|
-
z as createToken,
|
|
384
|
-
ce as default,
|
|
385
|
-
c as updateConfig
|
|
386
|
-
};
|
|
280
|
+
name: "rebilly-card-expiration",
|
|
281
|
+
data() {
|
|
282
|
+
return { elementType: b.REBILLY_CARD_EXPIRATION };
|
|
283
|
+
},
|
|
284
|
+
mixins: [M]
|
|
285
|
+
}, R = {
|
|
286
|
+
name: "rebilly-card-number",
|
|
287
|
+
data() {
|
|
288
|
+
return { elementType: b.REBILLY_CARD_NUMBER };
|
|
289
|
+
},
|
|
290
|
+
mixins: [M]
|
|
291
|
+
}, z = {
|
|
292
|
+
name: "rebilly-bban-account-type",
|
|
293
|
+
data() {
|
|
294
|
+
return { elementType: b.REBILLY_BBAN_ACCOUNT_TYPE };
|
|
295
|
+
},
|
|
296
|
+
mixins: [M]
|
|
297
|
+
}, B = {
|
|
298
|
+
name: "rebilly-bban-routing-number",
|
|
299
|
+
data() {
|
|
300
|
+
return { elementType: b.REBILLY_BBAN_ROUTING_NUMBER };
|
|
301
|
+
},
|
|
302
|
+
mixins: [M]
|
|
303
|
+
}, V = {
|
|
304
|
+
name: "rebilly-bban-account-number",
|
|
305
|
+
data() {
|
|
306
|
+
return { elementType: b.REBILLY_BBAN_ACCOUNT_NUMBER };
|
|
307
|
+
},
|
|
308
|
+
mixins: [M]
|
|
309
|
+
}, H = {
|
|
310
|
+
name: "rebilly-iban",
|
|
311
|
+
data() {
|
|
312
|
+
return { elementType: b.REBILLY_IBAN };
|
|
313
|
+
},
|
|
314
|
+
mixins: [M]
|
|
315
|
+
}, U = {
|
|
316
|
+
name: "rebilly-google-pay",
|
|
317
|
+
data() {
|
|
318
|
+
return { elementType: b.REBILLY_GOOGLE_PAY };
|
|
319
|
+
},
|
|
320
|
+
mixins: [N]
|
|
321
|
+
}, W = {
|
|
322
|
+
name: "rebilly-apple-pay",
|
|
323
|
+
data() {
|
|
324
|
+
return { elementType: b.REBILLY_APPLE_PAY };
|
|
325
|
+
},
|
|
326
|
+
mixins: [P]
|
|
327
|
+
}, G = {
|
|
328
|
+
name: "rebilly-paypal",
|
|
329
|
+
data() {
|
|
330
|
+
return { elementType: b.REBILLY_PAYPAL };
|
|
331
|
+
},
|
|
332
|
+
mixins: [P]
|
|
333
|
+
}, K = { install(e, t = {}) {
|
|
334
|
+
_(), y(t);
|
|
335
|
+
} };
|
|
336
|
+
//#endregion
|
|
337
|
+
export { W as RebillyApplePay, V as RebillyBbanAccountNumber, z as RebillyBbanAccountType, B as RebillyBbanRoutingNumber, F as RebillyCard, I as RebillyCardCvv, L as RebillyCardExpiration, R as RebillyCardNumber, b as RebillyFieldTypes, D as RebillyForm, U as RebillyGooglePay, H as RebillyIban, G as RebillyPaypal, j as RebillyToken, x as createToken, K as default, S as updateConfig };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("vue")):typeof define==`function`&&define.amd?define([`exports`,`vue`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.FramePayVue={},e.Vue))})(this,function(e,t){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});function n({message:e=`Could not mount FramePay to element.`,details:t=null}={}){this.message=e,this.details=t,this.name=`FramePayMountError`}function r({message:e=`FramePay could not be initialized.`,details:t=null}={}){this.message=e,this.details=t,this.name=`FramePayInitializeError`}function i({message:e=`FramePay could not be loaded.`,details:t=null}={}){this.message=e,this.details=t,this.name=`FramePayLoadError`}var a=window.process?.env?.FRAMEPAY_SCRIPT_LINK;window.process?.env?.FRAMEPAY_STYLE_LINK;var o=`https://framepay.rebilly.com/framepay.js`,s=`https://framepay.rebilly.com/framepay.css`;async function c({scriptLink:e,styleLink:t}={}){return new Promise((n,r)=>{if(window.Framepay)n(window.Framepay);else{let i=document.createElement(`link`);i.setAttribute(`href`,t||s),i.setAttribute(`rel`,`stylesheet`),document.head.prepend(i);let a=document.createElement(`script`);a.setAttribute(`src`,e||o),a.onload=()=>n(window.Framepay),a.onerror=()=>r(Error(`@rebilly/framepay npm package: Failed to load FramePay script`)),document.head.append(a)}})}var l=()=>c({scriptLink:a}).catch(e=>{throw new i({details:e})}),u,d=new Promise(e=>{u=e}),f=u,p=d.then(l);function m(e={}){return p.then(t=>new Promise((n,i)=>{let a=!1;t.on(`ready`,()=>{n(t)}),t.on(`error`,e=>{a=!0,i(new r({details:e}))});try{!a&&!t.initialized&&(e.publishableKey||e.jwt)&&t.initialize(e).catch(e=>{i(new r({details:e}))})}catch(e){throw new r({details:e})}}))}var h={REBILLY_CARD:`card`,REBILLY_CARD_CVV:`cardCvv`,REBILLY_CARD_NUMBER:`cardNumber`,REBILLY_CARD_EXPIRATION:`cardExpiration`,REBILLY_BBAN_ACCOUNT_TYPE:`accountType`,REBILLY_BBAN_ROUTING_NUMBER:`routingNumber`,REBILLY_BBAN_ACCOUNT_NUMBER:`accountNumber`,REBILLY_IBAN:`iban`,REBILLY_GOOGLE_PAY:`googlePay`,REBILLY_APPLE_PAY:`applePay`,REBILLY_PAYPAL:`paypal`};function g(e,t){return p.then(n=>{if(!n.initialized)throw new r({message:`Please initialize Framepay before creating a token`});return n.createToken(e,t)})}function _(e){return m(e).then(t=>{t.update({...e})})}var v=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},y={name:`RebillyForm`,props:{extraData:{type:Object,default:()=>({})},configuration:{type:Object,default:()=>({})}},emits:[`submit`,`error`],watch:{configuration(e){e&&_(e)}},mounted(){_(this.configuration)},methods:{handler(e){let t=e.target;g(t,this.extraData).then(e=>{this.$attrs.onSubmit?this.$emit(`submit`,e,t):t.submit()}).catch(e=>{this.$emit(`error`,e)})}}},b={id:`stop-wrapper`};function x(e,n,r,i,a,o){return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,b,[(0,t.createElementVNode)(`form`,{id:`rebilly-form`,onSubmit:n[0]||=(0,t.withModifiers)((...e)=>o.handler&&o.handler(...e),[`stop`,`prevent`])},[(0,t.renderSlot)(e.$slots,`default`)],32)])}var S=v(y,[[`render`,x]]),C={name:`RebillyToken`},w={id:`rebilly-token`,"data-rebilly":`token`,type:`hidden`};function T(e,n,r,i,a,o){return(0,t.openBlock)(),(0,t.createElementBlock)(`input`,w)}var E=v(C,[[`render`,T]]),D={render(){return(0,t.h)(`div`,{id:this.mountId,domProps:{id:this.mountId}})},props:{id:{type:String},configuration:{}},data(){return{element:null,mountId:this.id?this.id:`${this.$options.name}-mount`}},methods:{mountElement(e){m(this.configuration).then(r=>{try{this.elementType.startsWith(`card`)?this.element=(0,t.markRaw)(r.card.mount(e,this.elementType)):this.elementType===`iban`?this.element=(0,t.markRaw)(r.iban.mount(e)):[h.REBILLY_BBAN_ACCOUNT_TYPE,h.REBILLY_BBAN_ACCOUNT_NUMBER,h.REBILLY_BBAN_ROUTING_NUMBER].includes(this.elementType)&&(this.element=(0,t.markRaw)(r.bban.mount(e,this.elementType))),this.element.on(`ready`,()=>this.$emit(`ready`)),this.element.on(`change`,e=>this.$emit(`change`,e)),this.element.on(`focus`,()=>this.$emit(`focus`)),this.element.on(`blur`,()=>this.$emit(`blur`))}catch{throw new n}})},destroyElement(){this.element&&this.element.destroy()}},created(){this.mountElement(`#${this.mountId}`)},beforeDestroy(){this.destroyElement()},beforeUnmount(){this.destroyElement()}},O={render(){return(0,t.h)(`div`,{id:this.mountId,domProps:{id:this.mountId}})},props:{id:{type:String},configuration:{}},data(){return{element:null,mountId:this.id?this.id:`${this.$options.name}-mount`}},methods:{mountElement(e){m(this.configuration).then(r=>{try{this.element=(0,t.markRaw)(r.googlePay.mount(e)),this.element.on(`ready`,()=>this.$emit(`ready`)),this.element.on(`change`,e=>this.$emit(`change`,e)),this.element.on(`focus`,()=>this.$emit(`focus`)),this.element.on(`blur`,()=>this.$emit(`blur`)),this.element.on(`error`,()=>this.$emit(`error`)),r.on(`token-ready`,e=>{this.$emit(`token-ready`,e),this.$parent.$emit(`token-ready`,e)})}catch(e){throw new n({details:e})}})},destroyElement(){this.element&&this.element.destroy()}},watch:{configuration(e){e&&_(e)}},created(){this.mountElement(`#${this.mountId}`)},beforeDestroy(){this.destroyElement()},beforeUnmount(){this.destroyElement()}},k={render(){return(0,t.h)(`div`,{id:this.mountId,domProps:{id:this.mountId}})},props:{id:{type:String},configuration:{}},data(){return{element:null,mountId:this.id?this.id:`${this.$options.name}-mount`}},methods:{mountElement(e){m(this.configuration).then(r=>{try{let n=null;this.elementType===h.REBILLY_APPLE_PAY?n=r.applePay:this.elementType===h.REBILLY_PAYPAL&&(n=r.paypal),this.element=(0,t.markRaw)(n.mount(e)),r.on(`token-ready`,e=>{this.$emit(`token-ready`,e),this.$parent.$emit(`token-ready`,e)})}catch(e){throw new n({details:e})}})},destroyElement(){this.element&&this.element.destroy()}},watch:{configuration(e){e&&_(e)}},created(){this.mountElement(`#${this.mountId}`)},beforeDestroy(){this.destroyElement()},beforeUnmount(){this.destroyElement()}},A={name:`rebilly-card`,data(){return{elementType:h.REBILLY_CARD}},mixins:[D]},j={name:`rebilly-card-cvv`,data(){return{elementType:h.REBILLY_CARD_CVV}},mixins:[D]},M={name:`rebilly-card-expiration`,data(){return{elementType:h.REBILLY_CARD_EXPIRATION}},mixins:[D]},N={name:`rebilly-card-number`,data(){return{elementType:h.REBILLY_CARD_NUMBER}},mixins:[D]},P={name:`rebilly-bban-account-type`,data(){return{elementType:h.REBILLY_BBAN_ACCOUNT_TYPE}},mixins:[D]},F={name:`rebilly-bban-routing-number`,data(){return{elementType:h.REBILLY_BBAN_ROUTING_NUMBER}},mixins:[D]},I={name:`rebilly-bban-account-number`,data(){return{elementType:h.REBILLY_BBAN_ACCOUNT_NUMBER}},mixins:[D]},L={name:`rebilly-iban`,data(){return{elementType:h.REBILLY_IBAN}},mixins:[D]},R={name:`rebilly-google-pay`,data(){return{elementType:h.REBILLY_GOOGLE_PAY}},mixins:[O]},z={name:`rebilly-apple-pay`,data(){return{elementType:h.REBILLY_APPLE_PAY}},mixins:[k]},B={name:`rebilly-paypal`,data(){return{elementType:h.REBILLY_PAYPAL}},mixins:[k]};e.RebillyApplePay=z,e.RebillyBbanAccountNumber=I,e.RebillyBbanAccountType=P,e.RebillyBbanRoutingNumber=F,e.RebillyCard=A,e.RebillyCardCvv=j,e.RebillyCardExpiration=M,e.RebillyCardNumber=N,e.RebillyFieldTypes=h,e.RebillyForm=S,e.RebillyGooglePay=R,e.RebillyIban=L,e.RebillyPaypal=B,e.RebillyToken=E,e.createToken=g,e.default={install(e,t={}){f(),m(t)}},e.updateConfig=_});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rebilly/framepay-vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "12.217.
|
|
4
|
+
"version": "12.217.3",
|
|
5
5
|
"description": "Official Vue wrapper for Rebilly FramePay",
|
|
6
6
|
"author": "Rebilly",
|
|
7
7
|
"repository": {
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
"@rebilly/eslint-config": "*",
|
|
38
38
|
"@rebilly/framepay": "*",
|
|
39
39
|
"@types/node": "^24.13.3",
|
|
40
|
-
"@vitejs/plugin-basic-ssl": "^2.
|
|
41
|
-
"@vitejs/plugin-vue": "^
|
|
40
|
+
"@vitejs/plugin-basic-ssl": "^2.3.0",
|
|
41
|
+
"@vitejs/plugin-vue": "^6.0.0",
|
|
42
42
|
"@vue/test-utils": "^2.4.6",
|
|
43
|
-
"jsdom": "^
|
|
43
|
+
"jsdom": "^24.0.0",
|
|
44
44
|
"typescript": "^6.0.3",
|
|
45
|
-
"vite": "^
|
|
45
|
+
"vite": "^8.3.0",
|
|
46
46
|
"vite-plugin-mkcert": "^1.17.8",
|
|
47
|
-
"vitest": "^
|
|
47
|
+
"vitest": "^5.0.2",
|
|
48
48
|
"vue": "3.5.43"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|