@rebilly/framepay-vue 12.185.0 → 12.186.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/CHANGELOG.md CHANGED
@@ -1,5 +1,5 @@
1
- ## 12.185.0 (2026-09-25)
1
+ ## 12.186.1 (2026-09-25)
2
2
 
3
- ### 🧱 Updated Dependencies
3
+ ### Bug Fixes
4
4
 
5
- - Updated framepay-npm to 5.186.0
5
+ - **framepay-vue:** stop throwing from the FramePay error listener ([#27093](https://github.com/Rebilly/rebilly/pull/27093))
@@ -1,11 +1,11 @@
1
- import { openBlock as u, createElementBlock as y, createElementVNode as I, withModifiers as B, renderSlot as A, markRaw as l, h as c } from "vue";
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
2
  function h({ message: e = "Could not mount FramePay to element.", details: t = null } = {}) {
3
3
  this.message = e, this.details = t, this.name = "FramePayMountError";
4
4
  }
5
- function p({ message: e = "FramePay could not be initialized.", details: t = null } = {}) {
5
+ function d({ message: e = "FramePay could not be initialized.", details: t = null } = {}) {
6
6
  this.message = e, this.details = t, this.name = "FramePayInitializeError";
7
7
  }
8
- function E({ message: e = "FramePay could not be loaded.", details: t = null } = {}) {
8
+ function A({ message: e = "FramePay could not be loaded.", details: t = null } = {}) {
9
9
  this.message = e, this.details = t, this.name = "FramePayLoadError";
10
10
  }
11
11
  const P = window.process?.env?.FRAMEPAY_SCRIPT_LINK;
@@ -15,40 +15,43 @@ async function N({
15
15
  scriptLink: e,
16
16
  styleLink: t
17
17
  } = {}) {
18
- return new Promise((n, r) => {
18
+ return new Promise((n, o) => {
19
19
  if (window.Framepay)
20
20
  n(window.Framepay);
21
21
  else {
22
- const a = document.createElement("link");
23
- a.setAttribute("href", t || Y), a.setAttribute("rel", "stylesheet"), document.head.prepend(a);
24
- const o = document.createElement("script");
25
- o.setAttribute("src", e || T), o.onload = () => n(window.Framepay), o.onerror = () => r(
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
26
  new Error(
27
27
  "@rebilly/framepay npm package: Failed to load FramePay script"
28
28
  )
29
- ), document.head.append(o);
29
+ ), document.head.append(r);
30
30
  }
31
31
  });
32
32
  }
33
33
  const $ = () => N({ scriptLink: P }).catch((e) => {
34
- throw new E({ details: e });
34
+ throw new A({ details: e });
35
35
  });
36
- let _;
36
+ let E;
37
37
  const w = new Promise((e) => {
38
- _ = e;
39
- }), g = _, b = w.then($);
38
+ E = e;
39
+ }), g = E, _ = w.then($);
40
40
  function m(e = {}) {
41
- return b.then(
42
- (t) => new Promise((n) => {
41
+ return _.then(
42
+ (t) => new Promise((n, o) => {
43
+ let s = !1;
43
44
  t.on("ready", () => {
44
45
  n(t);
45
46
  }), t.on("error", (r) => {
46
- throw new E({ details: r });
47
+ s = !0, o(new d({ details: r }));
47
48
  });
48
49
  try {
49
- !t.initialized && (e.publishableKey || e.jwt) && t.initialize(e);
50
+ !s && !t.initialized && (e.publishableKey || e.jwt) && t.initialize(e).catch((r) => {
51
+ o(new d({ details: r }));
52
+ });
50
53
  } catch (r) {
51
- throw new p({ details: r });
54
+ throw new d({ details: r });
52
55
  }
53
56
  })
54
57
  );
@@ -67,23 +70,23 @@ const C = "card", x = "cardCvv", U = "cardNumber", k = "cardExpiration", O = "ac
67
70
  REBILLY_PAYPAL: G
68
71
  };
69
72
  function z(e, t) {
70
- return b.then((n) => {
73
+ return _.then((n) => {
71
74
  if (!n.initialized)
72
- throw new p({
75
+ throw new d({
73
76
  message: "Please initialize Framepay before creating a token"
74
77
  });
75
78
  return n.createToken(e, t);
76
79
  });
77
80
  }
78
- function d(e) {
81
+ function c(e) {
79
82
  return m(e).then((t) => {
80
83
  t.update({ ...e });
81
84
  });
82
85
  }
83
- const L = (e, t) => {
86
+ const b = (e, t) => {
84
87
  const n = e.__vccOpts || e;
85
- for (const [r, a] of t)
86
- n[r] = a;
88
+ for (const [o, s] of t)
89
+ n[o] = s;
87
90
  return n;
88
91
  }, K = {
89
92
  name: "RebillyForm",
@@ -100,11 +103,11 @@ const L = (e, t) => {
100
103
  emits: ["submit", "error"],
101
104
  watch: {
102
105
  configuration(e) {
103
- e && d(e);
106
+ e && c(e);
104
107
  }
105
108
  },
106
109
  mounted() {
107
- d(this.configuration);
110
+ c(this.configuration);
108
111
  },
109
112
  methods: {
110
113
  handler(e) {
@@ -117,29 +120,29 @@ const L = (e, t) => {
117
120
  }
118
121
  }
119
122
  }, V = { id: "stop-wrapper" };
120
- function j(e, t, n, r, a, o) {
121
- return u(), y("div", V, [
122
- I("form", {
123
+ function j(e, t, n, o, s, r) {
124
+ return y(), p("div", V, [
125
+ f("form", {
123
126
  id: "rebilly-form",
124
- onSubmit: t[0] || (t[0] = B((...f) => o.handler && o.handler(...f), ["stop", "prevent"]))
127
+ onSubmit: t[0] || (t[0] = I((...R) => r.handler && r.handler(...R), ["stop", "prevent"]))
125
128
  }, [
126
- A(e.$slots, "default")
129
+ B(e.$slots, "default")
127
130
  ], 32)
128
131
  ]);
129
132
  }
130
- const Q = /* @__PURE__ */ L(K, [["render", j]]), X = {
133
+ const Q = /* @__PURE__ */ b(K, [["render", j]]), X = {
131
134
  name: "RebillyToken"
132
135
  }, W = {
133
136
  id: "rebilly-token",
134
137
  "data-rebilly": "token",
135
138
  type: "hidden"
136
139
  };
137
- function q(e, t, n, r, a, o) {
138
- return u(), y("input", W);
140
+ function q(e, t, n, o, s, r) {
141
+ return y(), p("input", W);
139
142
  }
140
- const Z = /* @__PURE__ */ L(X, [["render", q]]), s = {
143
+ const Z = /* @__PURE__ */ b(X, [["render", q]]), a = {
141
144
  render() {
142
- return c("div", {
145
+ return u("div", {
143
146
  id: this.mountId,
144
147
  domProps: { id: this.mountId }
145
148
  });
@@ -188,7 +191,7 @@ const Z = /* @__PURE__ */ L(X, [["render", q]]), s = {
188
191
  }
189
192
  }, H = {
190
193
  render() {
191
- return c("div", {
194
+ return u("div", {
192
195
  id: this.mountId,
193
196
  domProps: { id: this.mountId }
194
197
  });
@@ -223,7 +226,7 @@ const Z = /* @__PURE__ */ L(X, [["render", q]]), s = {
223
226
  },
224
227
  watch: {
225
228
  configuration(e) {
226
- e && d(e);
229
+ e && c(e);
227
230
  }
228
231
  },
229
232
  created() {
@@ -238,9 +241,9 @@ const Z = /* @__PURE__ */ L(X, [["render", q]]), s = {
238
241
  beforeUnmount() {
239
242
  this.destroyElement();
240
243
  }
241
- }, R = {
244
+ }, L = {
242
245
  render() {
243
- return c("div", {
246
+ return u("div", {
244
247
  id: this.mountId,
245
248
  domProps: { id: this.mountId }
246
249
  });
@@ -262,8 +265,8 @@ const Z = /* @__PURE__ */ L(X, [["render", q]]), s = {
262
265
  m(this.configuration).then((t) => {
263
266
  try {
264
267
  let n = null;
265
- 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", (r) => {
266
- this.$emit("token-ready", r), this.$parent.$emit("token-ready", r);
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);
267
270
  });
268
271
  } catch (n) {
269
272
  throw new h({ details: n });
@@ -276,7 +279,7 @@ const Z = /* @__PURE__ */ L(X, [["render", q]]), s = {
276
279
  },
277
280
  watch: {
278
281
  configuration(e) {
279
- e && d(e);
282
+ e && c(e);
280
283
  }
281
284
  },
282
285
  created() {
@@ -296,49 +299,49 @@ const Z = /* @__PURE__ */ L(X, [["render", q]]), s = {
296
299
  data() {
297
300
  return { elementType: i.REBILLY_CARD };
298
301
  },
299
- mixins: [s]
302
+ mixins: [a]
300
303
  }, te = {
301
304
  name: "rebilly-card-cvv",
302
305
  data() {
303
306
  return { elementType: i.REBILLY_CARD_CVV };
304
307
  },
305
- mixins: [s]
308
+ mixins: [a]
306
309
  }, ne = {
307
310
  name: "rebilly-card-expiration",
308
311
  data() {
309
312
  return { elementType: i.REBILLY_CARD_EXPIRATION };
310
313
  },
311
- mixins: [s]
314
+ mixins: [a]
312
315
  }, ie = {
313
316
  name: "rebilly-card-number",
314
317
  data() {
315
318
  return { elementType: i.REBILLY_CARD_NUMBER };
316
319
  },
317
- mixins: [s]
320
+ mixins: [a]
318
321
  }, re = {
319
322
  name: "rebilly-bban-account-type",
320
323
  data() {
321
324
  return { elementType: i.REBILLY_BBAN_ACCOUNT_TYPE };
322
325
  },
323
- mixins: [s]
326
+ mixins: [a]
324
327
  }, oe = {
325
328
  name: "rebilly-bban-routing-number",
326
329
  data() {
327
330
  return { elementType: i.REBILLY_BBAN_ROUTING_NUMBER };
328
331
  },
329
- mixins: [s]
332
+ mixins: [a]
330
333
  }, se = {
331
334
  name: "rebilly-bban-account-number",
332
335
  data() {
333
336
  return { elementType: i.REBILLY_BBAN_ACCOUNT_NUMBER };
334
337
  },
335
- mixins: [s]
338
+ mixins: [a]
336
339
  }, ae = {
337
340
  name: "rebilly-iban",
338
341
  data() {
339
342
  return { elementType: i.REBILLY_IBAN };
340
343
  },
341
- mixins: [s]
344
+ mixins: [a]
342
345
  }, le = {
343
346
  name: "rebilly-google-pay",
344
347
  data() {
@@ -350,13 +353,13 @@ const Z = /* @__PURE__ */ L(X, [["render", q]]), s = {
350
353
  data() {
351
354
  return { elementType: i.REBILLY_APPLE_PAY };
352
355
  },
353
- mixins: [R]
356
+ mixins: [L]
354
357
  }, de = {
355
358
  name: "rebilly-paypal",
356
359
  data() {
357
360
  return { elementType: i.REBILLY_PAYPAL };
358
361
  },
359
- mixins: [R]
362
+ mixins: [L]
360
363
  }, ce = {
361
364
  install(e, t = {}) {
362
365
  g(), m(t);
@@ -379,5 +382,5 @@ export {
379
382
  Z as RebillyToken,
380
383
  z as createToken,
381
384
  ce as default,
382
- d as updateConfig
385
+ c as updateConfig
383
386
  };
@@ -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 u({message:e="Could not mount FramePay to element.",details:t=null}={}){this.message=e,this.details=t,this.name="FramePayMountError"}function y({message:e="FramePay could not be initialized.",details:t=null}={}){this.message=e,this.details=t,this.name="FramePayInitializeError"}function h({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,a)=>{if(window.Framepay)n(window.Framepay);else{const m=document.createElement("link");m.setAttribute("href",t||f),m.setAttribute("rel","stylesheet"),document.head.prepend(m);const s=document.createElement("script");s.setAttribute("src",e||B),s.onload=()=>n(window.Framepay),s.onerror=()=>a(new Error("@rebilly/framepay npm package: Failed to load FramePay script")),document.head.append(s)}})}const A=()=>I({scriptLink:L}).catch(e=>{throw new h({details:e})});let R;const P=new Promise(e=>{R=e}),Y=R,_=P.then(A);function d(e={}){return _.then(t=>new Promise(n=>{t.on("ready",()=>{n(t)}),t.on("error",a=>{throw new h({details:a})});try{!t.initialized&&(e.publishableKey||e.jwt)&&t.initialize(e)}catch(a){throw new y({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 b(e,t){return _.then(n=>{if(!n.initialized)throw new y({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 E=(e,t)=>{const n=e.__vccOpts||e;for(const[a,m]of t)n[a]=m;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;b(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,a,m,s){return r.openBlock(),r.createElementBlock("div",N,[r.createElementVNode("form",{id:"rebilly-form",onSubmit:t[0]||(t[0]=r.withModifiers((...q)=>s.handler&&s.handler(...q),["stop","prevent"]))},[r.renderSlot(e.$slots,"default")],32)])}const w=E(T,[["render",C]]),g={name:"RebillyToken"},$={id:"rebilly-token","data-rebilly":"token",type:"hidden"};function U(e,t,n,a,m,s){return r.openBlock(),r.createElementBlock("input",$)}const k=E(g,[["render",U]]),l={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 u}})},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 u({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()}},p={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",a=>{this.$emit("token-ready",a),this.$parent.$emit("token-ready",a)})}catch(n){throw new u({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:[l]},D={name:"rebilly-card-cvv",data(){return{elementType:o.REBILLY_CARD_CVV}},mixins:[l]},S={name:"rebilly-card-expiration",data(){return{elementType:o.REBILLY_CARD_EXPIRATION}},mixins:[l]},F={name:"rebilly-card-number",data(){return{elementType:o.REBILLY_CARD_NUMBER}},mixins:[l]},G={name:"rebilly-bban-account-type",data(){return{elementType:o.REBILLY_BBAN_ACCOUNT_TYPE}},mixins:[l]},V={name:"rebilly-bban-routing-number",data(){return{elementType:o.REBILLY_BBAN_ROUTING_NUMBER}},mixins:[l]},x={name:"rebilly-bban-account-number",data(){return{elementType:o.REBILLY_BBAN_ACCOUNT_NUMBER}},mixins:[l]},z={name:"rebilly-iban",data(){return{elementType:o.REBILLY_IBAN}},mixins:[l]},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:[p]},v={name:"rebilly-paypal",data(){return{elementType:o.REBILLY_PAYPAL}},mixins:[p]},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=b,i.default=X,i.updateConfig=c,Object.defineProperties(i,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
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"}})}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rebilly/framepay-vue",
3
3
  "type": "module",
4
- "version": "12.185.0",
4
+ "version": "12.186.1",
5
5
  "description": "Official Vue wrapper for Rebilly FramePay",
6
6
  "author": "Rebilly",
7
7
  "repository": {
@@ -50,6 +50,7 @@
50
50
  "scripts": {
51
51
  "dev": "vite",
52
52
  "build": "vite build",
53
+ "type:check": "tsc --noEmit -p tsconfig.json",
53
54
  "type:check:e2e": "tsc --noEmit -p tsconfig.e2e.json",
54
55
  "test:unit": "vitest run",
55
56
  "test:unit:watch": "vitest",