@rebilly/framepay-vue 8.37.0 → 8.39.0
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 +2 -2
- package/dist/framepay-vue.js +14 -14
- package/dist/framepay-vue.umd.cjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
## [8.
|
|
1
|
+
## [8.39.0](https://github.com/Rebilly/rebilly/compare/framepay-vue-v8.38.0...framepay-vue-v8.39.0) (2025-03-27)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Features
|
|
5
5
|
|
|
6
|
-
* **
|
|
6
|
+
* **dev env:** improve framepay dev environment in other apps ([#10841](https://github.com/Rebilly/rebilly/issues/10841)) ([2d49873](https://github.com/Rebilly/rebilly/commit/2d4987374c101be8a5c2a6abff562d592b727a68))
|
package/dist/framepay-vue.js
CHANGED
|
@@ -5,10 +5,10 @@ function h({ message: e = "Could not mount FramePay to element.", details: t = n
|
|
|
5
5
|
function p({ 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
|
|
8
|
+
function E({ message: e = "FramePay could not be loaded.", details: t = null } = {}) {
|
|
9
9
|
this.message = e, this.details = t, this.name = "FramePayLoadError";
|
|
10
10
|
}
|
|
11
|
-
const P = window.process?.env?.FRAMEPAY_SCRIPT_LINK
|
|
11
|
+
const P = window.process?.env?.FRAMEPAY_SCRIPT_LINK;
|
|
12
12
|
window.process?.env?.FRAMEPAY_STYLE_LINK;
|
|
13
13
|
const T = "https://framepay.rebilly.com/framepay.js", Y = "https://framepay.rebilly.com/framepay.css";
|
|
14
14
|
async function N({
|
|
@@ -31,19 +31,19 @@ async function N({
|
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
const $ = () => N({ scriptLink: P }).catch((e) => {
|
|
34
|
-
throw new
|
|
34
|
+
throw new E({ details: e });
|
|
35
35
|
});
|
|
36
|
-
let
|
|
36
|
+
let _;
|
|
37
37
|
const w = new Promise((e) => {
|
|
38
|
-
|
|
39
|
-
}), g =
|
|
38
|
+
_ = e;
|
|
39
|
+
}), g = _, b = w.then($);
|
|
40
40
|
function m(e = {}) {
|
|
41
|
-
return
|
|
41
|
+
return b.then(
|
|
42
42
|
(t) => new Promise((n) => {
|
|
43
43
|
t.on("ready", () => {
|
|
44
44
|
n(t);
|
|
45
45
|
}), t.on("error", (r) => {
|
|
46
|
-
throw new
|
|
46
|
+
throw new E({ details: r });
|
|
47
47
|
});
|
|
48
48
|
try {
|
|
49
49
|
!t.initialized && (e.publishableKey || e.jwt) && t.initialize(e);
|
|
@@ -67,7 +67,7 @@ const C = "card", x = "cardCvv", U = "cardNumber", k = "cardExpiration", O = "ac
|
|
|
67
67
|
REBILLY_PAYPAL: G
|
|
68
68
|
};
|
|
69
69
|
function z(e, t) {
|
|
70
|
-
return
|
|
70
|
+
return b.then((n) => {
|
|
71
71
|
if (!n.initialized)
|
|
72
72
|
throw new p({
|
|
73
73
|
message: "Please initialize Framepay before creating a token"
|
|
@@ -85,7 +85,7 @@ const L = (e, t) => {
|
|
|
85
85
|
for (const [r, a] of t)
|
|
86
86
|
n[r] = a;
|
|
87
87
|
return n;
|
|
88
|
-
},
|
|
88
|
+
}, K = {
|
|
89
89
|
name: "RebillyForm",
|
|
90
90
|
props: {
|
|
91
91
|
extraData: {
|
|
@@ -116,9 +116,9 @@ const L = (e, t) => {
|
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
},
|
|
120
|
-
function
|
|
121
|
-
return y(), u("div",
|
|
119
|
+
}, V = { id: "stop-wrapper" };
|
|
120
|
+
function j(e, t, n, r, a, o) {
|
|
121
|
+
return y(), u("div", V, [
|
|
122
122
|
I("form", {
|
|
123
123
|
id: "rebilly-form",
|
|
124
124
|
onSubmit: t[0] || (t[0] = B((...f) => o.handler && o.handler(...f), ["stop", "prevent"]))
|
|
@@ -127,7 +127,7 @@ function V(e, t, n, r, a, o) {
|
|
|
127
127
|
], 32)
|
|
128
128
|
]);
|
|
129
129
|
}
|
|
130
|
-
const Q = /* @__PURE__ */ L(
|
|
130
|
+
const Q = /* @__PURE__ */ L(K, [["render", j]]), X = {
|
|
131
131
|
name: "RebillyToken"
|
|
132
132
|
}, W = {
|
|
133
133
|
id: "rebilly-token",
|
|
@@ -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
|
|
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"}})});
|