@rebilly/framepay-vue 12.217.1 → 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 CHANGED
@@ -1,5 +1,6 @@
1
- ## 12.217.1 (2026-10-06)
1
+ ## 12.217.3 (2026-10-07)
2
2
 
3
3
  ### 🧱 Updated Dependencies
4
4
 
5
- - Updated framepay-npm to 5.218.1
5
+ - Updated eslint-config to 4.31.5
6
+ - Updated framepay-npm to 5.218.3
@@ -1,386 +1,337 @@
1
- import { openBlock as y, createElementBlock as p, createElementVNode as f, withModifiers as I, renderSlot as B, markRaw as l, h as u } from "vue";
2
- function h({ message: e = "Could not mount FramePay to element.", details: t = null } = {}) {
3
- this.message = e, this.details = t, this.name = "FramePayMountError";
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 d({ message: e = "FramePay could not be initialized.", details: t = null } = {}) {
6
- this.message = e, this.details = t, this.name = "FramePayInitializeError";
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 A({ message: e = "FramePay could not be loaded.", details: t = null } = {}) {
9
- this.message = e, this.details = t, this.name = "FramePayLoadError";
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
- const P = window.process?.env?.FRAMEPAY_SCRIPT_LINK;
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
- const T = "https://framepay.rebilly.com/framepay.js", Y = "https://framepay.rebilly.com/framepay.css";
14
- async function N({
15
- scriptLink: e,
16
- styleLink: t
17
- } = {}) {
18
- return new Promise((n, o) => {
19
- if (window.Framepay)
20
- n(window.Framepay);
21
- else {
22
- const s = document.createElement("link");
23
- s.setAttribute("href", t || Y), s.setAttribute("rel", "stylesheet"), document.head.prepend(s);
24
- const r = document.createElement("script");
25
- r.setAttribute("src", e || T), r.onload = () => n(window.Framepay), r.onerror = () => o(
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
- const $ = () => N({ scriptLink: P }).catch((e) => {
34
- throw new A({ details: e });
35
- });
36
- let E;
37
- const w = new Promise((e) => {
38
- E = e;
39
- }), g = E, _ = w.then($);
40
- function m(e = {}) {
41
- return _.then(
42
- (t) => new Promise((n, o) => {
43
- let s = !1;
44
- t.on("ready", () => {
45
- n(t);
46
- }), t.on("error", (r) => {
47
- s = !0, o(new d({ details: r }));
48
- });
49
- try {
50
- !s && !t.initialized && (e.publishableKey || e.jwt) && t.initialize(e).catch((r) => {
51
- o(new d({ details: r }));
52
- });
53
- } catch (r) {
54
- throw new d({ details: r });
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
- const C = "card", x = "cardCvv", U = "cardNumber", k = "cardExpiration", O = "accountType", M = "routingNumber", S = "accountNumber", D = "iban", F = "googlePay", v = "applePay", G = "paypal", i = {
60
- REBILLY_CARD: C,
61
- REBILLY_CARD_CVV: x,
62
- REBILLY_CARD_NUMBER: U,
63
- REBILLY_CARD_EXPIRATION: k,
64
- REBILLY_BBAN_ACCOUNT_TYPE: O,
65
- REBILLY_BBAN_ROUTING_NUMBER: M,
66
- REBILLY_BBAN_ACCOUNT_NUMBER: S,
67
- REBILLY_IBAN: D,
68
- REBILLY_GOOGLE_PAY: F,
69
- REBILLY_APPLE_PAY: v,
70
- REBILLY_PAYPAL: G
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
- function z(e, t) {
73
- return _.then((n) => {
74
- if (!n.initialized)
75
- throw new d({
76
- message: "Please initialize Framepay before creating a token"
77
- });
78
- return n.createToken(e, t);
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
- function c(e) {
82
- return m(e).then((t) => {
83
- t.update({ ...e });
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
- const b = (e, t) => {
87
- const n = e.__vccOpts || e;
88
- for (const [o, s] of t)
89
- n[o] = s;
90
- return n;
91
- }, K = {
92
- name: "RebillyForm",
93
- props: {
94
- extraData: {
95
- type: Object,
96
- default: () => ({})
97
- },
98
- configuration: {
99
- type: Object,
100
- default: () => ({})
101
- }
102
- },
103
- emits: ["submit", "error"],
104
- watch: {
105
- configuration(e) {
106
- e && c(e);
107
- }
108
- },
109
- mounted() {
110
- c(this.configuration);
111
- },
112
- methods: {
113
- handler(e) {
114
- const t = e.target;
115
- z(t, this.extraData).then((n) => {
116
- this.$attrs.onSubmit ? this.$emit("submit", n, t) : t.submit();
117
- }).catch((n) => {
118
- this.$emit("error", n);
119
- });
120
- }
121
- }
122
- }, V = { id: "stop-wrapper" };
123
- function j(e, t, n, o, s, r) {
124
- return y(), p("div", V, [
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
- const Q = /* @__PURE__ */ b(K, [["render", j]]), X = {
134
- name: "RebillyToken"
135
- }, W = {
136
- id: "rebilly-token",
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 q(e, t, n, o, s, r) {
141
- return y(), p("input", W);
129
+ function A(t, n, r, a, o, s) {
130
+ return i(), e("input", k);
142
131
  }
143
- const Z = /* @__PURE__ */ b(X, [["render", q]]), a = {
144
- render() {
145
- return u("div", {
146
- id: this.mountId,
147
- domProps: { id: this.mountId }
148
- });
149
- },
150
- props: {
151
- id: {
152
- type: String
153
- },
154
- configuration: {}
155
- },
156
- data() {
157
- return {
158
- element: null,
159
- mountId: this.id ? this.id : `${this.$options.name}-mount`
160
- };
161
- },
162
- methods: {
163
- mountElement(e) {
164
- m(this.configuration).then((t) => {
165
- try {
166
- this.elementType.startsWith("card") ? this.element = l(t.card.mount(e, this.elementType)) : this.elementType === "iban" ? this.element = l(t.iban.mount(e)) : [
167
- i.REBILLY_BBAN_ACCOUNT_TYPE,
168
- i.REBILLY_BBAN_ACCOUNT_NUMBER,
169
- i.REBILLY_BBAN_ROUTING_NUMBER
170
- ].includes(this.elementType) && (this.element = l(t.bban.mount(e, this.elementType))), this.element.on("ready", () => this.$emit("ready")), this.element.on("change", (n) => this.$emit("change", n)), this.element.on("focus", () => this.$emit("focus")), this.element.on("blur", () => this.$emit("blur"));
171
- } catch {
172
- throw new h();
173
- }
174
- });
175
- },
176
- destroyElement() {
177
- this.element && this.element.destroy();
178
- }
179
- },
180
- created() {
181
- this.mountElement(`#${this.mountId}`);
182
- },
183
- // in vue 2 beforeDestroy is emitted but not in vue 3
184
- beforeDestroy() {
185
- this.destroyElement();
186
- },
187
- // in vue 3 beforeDestroy hook is replaced with beforeUnmount,
188
- // we should keep both of them for compatibility purpose
189
- beforeUnmount() {
190
- this.destroyElement();
191
- }
192
- }, H = {
193
- render() {
194
- return u("div", {
195
- id: this.mountId,
196
- domProps: { id: this.mountId }
197
- });
198
- },
199
- props: {
200
- id: {
201
- type: String
202
- },
203
- configuration: {}
204
- },
205
- data() {
206
- return {
207
- element: null,
208
- mountId: this.id ? this.id : `${this.$options.name}-mount`
209
- };
210
- },
211
- methods: {
212
- mountElement(e) {
213
- m(this.configuration).then((t) => {
214
- try {
215
- this.element = l(t.googlePay.mount(e)), this.element.on("ready", () => this.$emit("ready")), this.element.on("change", (n) => this.$emit("change", n)), 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", (n) => {
216
- this.$emit("token-ready", n), this.$parent.$emit("token-ready", n);
217
- });
218
- } catch (n) {
219
- throw new h({ details: n });
220
- }
221
- });
222
- },
223
- destroyElement() {
224
- this.element && this.element.destroy();
225
- }
226
- },
227
- watch: {
228
- configuration(e) {
229
- e && c(e);
230
- }
231
- },
232
- created() {
233
- this.mountElement(`#${this.mountId}`);
234
- },
235
- // in vue 2 beforeDestroy is emitted but not in vue 3
236
- beforeDestroy() {
237
- this.destroyElement();
238
- },
239
- // in vue 3 beforeDestroy hook is replaced with beforeUnmount,
240
- // we should keep both of them for compatibility purpose
241
- beforeUnmount() {
242
- this.destroyElement();
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
- render() {
246
- return u("div", {
247
- id: this.mountId,
248
- domProps: { id: this.mountId }
249
- });
250
- },
251
- props: {
252
- id: {
253
- type: String
254
- },
255
- configuration: {}
256
- },
257
- data() {
258
- return {
259
- element: null,
260
- mountId: this.id ? this.id : `${this.$options.name}-mount`
261
- };
262
- },
263
- methods: {
264
- mountElement(e) {
265
- m(this.configuration).then((t) => {
266
- try {
267
- let n = null;
268
- this.elementType === i.REBILLY_APPLE_PAY ? n = t.applePay : this.elementType === i.REBILLY_PAYPAL && (n = t.paypal), this.element = l(n.mount(e)), t.on("token-ready", (o) => {
269
- this.$emit("token-ready", o), this.$parent.$emit("token-ready", o);
270
- });
271
- } catch (n) {
272
- throw new h({ details: n });
273
- }
274
- });
275
- },
276
- destroyElement() {
277
- this.element && this.element.destroy();
278
- }
279
- },
280
- watch: {
281
- configuration(e) {
282
- e && c(e);
283
- }
284
- },
285
- created() {
286
- this.mountElement(`#${this.mountId}`);
287
- },
288
- // in vue 2 beforeDestroy is emitted but not in vue 3
289
- beforeDestroy() {
290
- this.destroyElement();
291
- },
292
- // in vue 3 beforeDestroy hook is replaced with beforeUnmount,
293
- // we should keep both of them for compatibility purpose
294
- beforeUnmount() {
295
- this.destroyElement();
296
- }
297
- }, ee = {
298
- name: "rebilly-card",
299
- data() {
300
- return { elementType: i.REBILLY_CARD };
301
- },
302
- mixins: [a]
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(i,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],r):(i=typeof globalThis<"u"?globalThis:i||self,r(i.FramePayVue={},i.Vue))})(this,(function(i,r){"use strict";function y({message:e="Could not mount FramePay to element.",details:t=null}={}){this.message=e,this.details=t,this.name="FramePayMountError"}function u({message:e="FramePay could not be initialized.",details:t=null}={}){this.message=e,this.details=t,this.name="FramePayInitializeError"}function p({message:e="FramePay could not be loaded.",details:t=null}={}){this.message=e,this.details=t,this.name="FramePayLoadError"}const L=window.process?.env?.FRAMEPAY_SCRIPT_LINK;window.process?.env?.FRAMEPAY_STYLE_LINK;const B="https://framepay.rebilly.com/framepay.js",f="https://framepay.rebilly.com/framepay.css";async function I({scriptLink:e,styleLink:t}={}){return new Promise((n,l)=>{if(window.Framepay)n(window.Framepay);else{const s=document.createElement("link");s.setAttribute("href",t||f),s.setAttribute("rel","stylesheet"),document.head.prepend(s);const a=document.createElement("script");a.setAttribute("src",e||B),a.onload=()=>n(window.Framepay),a.onerror=()=>l(new Error("@rebilly/framepay npm package: Failed to load FramePay script")),document.head.append(a)}})}const A=()=>I({scriptLink:L}).catch(e=>{throw new p({details:e})});let h;const P=new Promise(e=>{h=e}),Y=h,R=P.then(A);function d(e={}){return R.then(t=>new Promise((n,l)=>{let s=!1;t.on("ready",()=>{n(t)}),t.on("error",a=>{s=!0,l(new u({details:a}))});try{!s&&!t.initialized&&(e.publishableKey||e.jwt)&&t.initialize(e).catch(a=>{l(new u({details:a}))})}catch(a){throw new u({details:a})}}))}const o={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 _(e,t){return R.then(n=>{if(!n.initialized)throw new u({message:"Please initialize Framepay before creating a token"});return n.createToken(e,t)})}function c(e){return d(e).then(t=>{t.update({...e})})}const b=(e,t)=>{const n=e.__vccOpts||e;for(const[l,s]of t)n[l]=s;return n},T={name:"RebillyForm",props:{extraData:{type:Object,default:()=>({})},configuration:{type:Object,default:()=>({})}},emits:["submit","error"],watch:{configuration(e){e&&c(e)}},mounted(){c(this.configuration)},methods:{handler(e){const t=e.target;_(t,this.extraData).then(n=>{this.$attrs.onSubmit?this.$emit("submit",n,t):t.submit()}).catch(n=>{this.$emit("error",n)})}}},N={id:"stop-wrapper"};function C(e,t,n,l,s,a){return r.openBlock(),r.createElementBlock("div",N,[r.createElementVNode("form",{id:"rebilly-form",onSubmit:t[0]||(t[0]=r.withModifiers((...q)=>a.handler&&a.handler(...q),["stop","prevent"]))},[r.renderSlot(e.$slots,"default")],32)])}const w=b(T,[["render",C]]),g={name:"RebillyToken"},$={id:"rebilly-token","data-rebilly":"token",type:"hidden"};function U(e,t,n,l,s,a){return r.openBlock(),r.createElementBlock("input",$)}const k=b(g,[["render",U]]),m={render(){return r.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){d(this.configuration).then(t=>{try{this.elementType.startsWith("card")?this.element=r.markRaw(t.card.mount(e,this.elementType)):this.elementType==="iban"?this.element=r.markRaw(t.iban.mount(e)):[o.REBILLY_BBAN_ACCOUNT_TYPE,o.REBILLY_BBAN_ACCOUNT_NUMBER,o.REBILLY_BBAN_ROUTING_NUMBER].includes(this.elementType)&&(this.element=r.markRaw(t.bban.mount(e,this.elementType))),this.element.on("ready",()=>this.$emit("ready")),this.element.on("change",n=>this.$emit("change",n)),this.element.on("focus",()=>this.$emit("focus")),this.element.on("blur",()=>this.$emit("blur"))}catch{throw new y}})},destroyElement(){this.element&&this.element.destroy()}},created(){this.mountElement(`#${this.mountId}`)},beforeDestroy(){this.destroyElement()},beforeUnmount(){this.destroyElement()}},O={render(){return r.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){d(this.configuration).then(t=>{try{this.element=r.markRaw(t.googlePay.mount(e)),this.element.on("ready",()=>this.$emit("ready")),this.element.on("change",n=>this.$emit("change",n)),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",n=>{this.$emit("token-ready",n),this.$parent.$emit("token-ready",n)})}catch(n){throw new y({details:n})}})},destroyElement(){this.element&&this.element.destroy()}},watch:{configuration(e){e&&c(e)}},created(){this.mountElement(`#${this.mountId}`)},beforeDestroy(){this.destroyElement()},beforeUnmount(){this.destroyElement()}},E={render(){return r.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){d(this.configuration).then(t=>{try{let n=null;this.elementType===o.REBILLY_APPLE_PAY?n=t.applePay:this.elementType===o.REBILLY_PAYPAL&&(n=t.paypal),this.element=r.markRaw(n.mount(e)),t.on("token-ready",l=>{this.$emit("token-ready",l),this.$parent.$emit("token-ready",l)})}catch(n){throw new y({details:n})}})},destroyElement(){this.element&&this.element.destroy()}},watch:{configuration(e){e&&c(e)}},created(){this.mountElement(`#${this.mountId}`)},beforeDestroy(){this.destroyElement()},beforeUnmount(){this.destroyElement()}},M={name:"rebilly-card",data(){return{elementType:o.REBILLY_CARD}},mixins:[m]},D={name:"rebilly-card-cvv",data(){return{elementType:o.REBILLY_CARD_CVV}},mixins:[m]},S={name:"rebilly-card-expiration",data(){return{elementType:o.REBILLY_CARD_EXPIRATION}},mixins:[m]},F={name:"rebilly-card-number",data(){return{elementType:o.REBILLY_CARD_NUMBER}},mixins:[m]},G={name:"rebilly-bban-account-type",data(){return{elementType:o.REBILLY_BBAN_ACCOUNT_TYPE}},mixins:[m]},V={name:"rebilly-bban-routing-number",data(){return{elementType:o.REBILLY_BBAN_ROUTING_NUMBER}},mixins:[m]},x={name:"rebilly-bban-account-number",data(){return{elementType:o.REBILLY_BBAN_ACCOUNT_NUMBER}},mixins:[m]},z={name:"rebilly-iban",data(){return{elementType:o.REBILLY_IBAN}},mixins:[m]},j={name:"rebilly-google-pay",data(){return{elementType:o.REBILLY_GOOGLE_PAY}},mixins:[O]},K={name:"rebilly-apple-pay",data(){return{elementType:o.REBILLY_APPLE_PAY}},mixins:[E]},v={name:"rebilly-paypal",data(){return{elementType:o.REBILLY_PAYPAL}},mixins:[E]},X={install(e,t={}){Y(),d(t)}};i.RebillyApplePay=K,i.RebillyBbanAccountNumber=x,i.RebillyBbanAccountType=G,i.RebillyBbanRoutingNumber=V,i.RebillyCard=M,i.RebillyCardCvv=D,i.RebillyCardExpiration=S,i.RebillyCardNumber=F,i.RebillyFieldTypes=o,i.RebillyForm=w,i.RebillyGooglePay=j,i.RebillyIban=z,i.RebillyPaypal=v,i.RebillyToken=k,i.createToken=_,i.default=X,i.updateConfig=c,Object.defineProperties(i,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
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.1",
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.1.3",
41
- "@vitejs/plugin-vue": "^5.2.3",
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": "^21.1.1",
43
+ "jsdom": "^24.0.0",
44
44
  "typescript": "^6.0.3",
45
- "vite": "^6.4.3",
45
+ "vite": "^8.3.0",
46
46
  "vite-plugin-mkcert": "^1.17.8",
47
- "vitest": "^4.1.0",
47
+ "vitest": "^5.0.2",
48
48
  "vue": "3.5.43"
49
49
  },
50
50
  "scripts": {