@rebilly/framepay-vue 5.13.0 → 5.14.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 +14 -0
- package/dist/framepay-vue.js +31 -25
- package/dist/framepay-vue.umd.cjs +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [5.14.0](https://github.com/Rebilly/rebilly/compare/framepay-vue-v5.13.1...framepay-vue-v5.14.0) (2024-02-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **deps:** bump vite to v5 ([#3741](https://github.com/Rebilly/rebilly/issues/3741)) ([184db2e](https://github.com/Rebilly/rebilly/commit/184db2ee9b5dac4742421208ac2e4fd92a71c2cc))
|
|
7
|
+
|
|
8
|
+
## [5.13.1](https://github.com/Rebilly/rebilly/compare/framepay-vue-v5.13.0...framepay-vue-v5.13.1) (2024-02-19)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **risk-data-collector:** Updated FingerprintJS PRO implementation ([#3607](https://github.com/Rebilly/rebilly/issues/3607)) ([204df09](https://github.com/Rebilly/rebilly/commit/204df096195ad7df5770b6cf8547359938e9128c))
|
|
14
|
+
|
|
1
15
|
## [5.13.0](https://github.com/Rebilly/rebilly/compare/framepay-vue-v5.12.0...framepay-vue-v5.13.0) (2024-02-19)
|
|
2
16
|
|
|
3
17
|
|
package/dist/framepay-vue.js
CHANGED
|
@@ -42,20 +42,20 @@ function a(e = {}) {
|
|
|
42
42
|
})
|
|
43
43
|
);
|
|
44
44
|
}
|
|
45
|
-
const g = "card", w = "cardCvv", x = "cardNumber", U = "cardExpiration", S = "accountType", M = "routingNumber",
|
|
45
|
+
const g = "card", w = "cardCvv", x = "cardNumber", U = "cardExpiration", S = "accountType", M = "routingNumber", O = "accountNumber", k = "iban", D = "googlePay", v = "applePay", F = "paypal", i = {
|
|
46
46
|
REBILLY_CARD: g,
|
|
47
47
|
REBILLY_CARD_CVV: w,
|
|
48
48
|
REBILLY_CARD_NUMBER: x,
|
|
49
49
|
REBILLY_CARD_EXPIRATION: U,
|
|
50
50
|
REBILLY_BBAN_ACCOUNT_TYPE: S,
|
|
51
51
|
REBILLY_BBAN_ROUTING_NUMBER: M,
|
|
52
|
-
REBILLY_BBAN_ACCOUNT_NUMBER:
|
|
53
|
-
REBILLY_IBAN:
|
|
52
|
+
REBILLY_BBAN_ACCOUNT_NUMBER: O,
|
|
53
|
+
REBILLY_IBAN: k,
|
|
54
54
|
REBILLY_GOOGLE_PAY: D,
|
|
55
55
|
REBILLY_APPLE_PAY: v,
|
|
56
|
-
REBILLY_PAYPAL:
|
|
56
|
+
REBILLY_PAYPAL: F
|
|
57
57
|
};
|
|
58
|
-
function
|
|
58
|
+
function G(e, t) {
|
|
59
59
|
return _.then((n) => {
|
|
60
60
|
if (!n.initialized)
|
|
61
61
|
throw new b({
|
|
@@ -69,28 +69,24 @@ function l(e) {
|
|
|
69
69
|
t.update({ ...e });
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
-
const
|
|
72
|
+
const R = (e, t) => {
|
|
73
73
|
const n = e.__vccOpts || e;
|
|
74
74
|
for (const [r, m] of t)
|
|
75
75
|
n[r] = m;
|
|
76
76
|
return n;
|
|
77
|
-
},
|
|
78
|
-
name: "
|
|
79
|
-
emits: ["submit", "error"],
|
|
77
|
+
}, z = {
|
|
78
|
+
name: "RebillyForm",
|
|
80
79
|
props: {
|
|
81
|
-
extraData: {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
this.$attrs.onSubmit ? this.$emit("submit", n, t) : t.submit();
|
|
89
|
-
}).catch((n) => {
|
|
90
|
-
this.$emit("error", n);
|
|
91
|
-
});
|
|
80
|
+
extraData: {
|
|
81
|
+
type: Object,
|
|
82
|
+
default: () => ({})
|
|
83
|
+
},
|
|
84
|
+
configuration: {
|
|
85
|
+
type: Object,
|
|
86
|
+
default: () => ({})
|
|
92
87
|
}
|
|
93
88
|
},
|
|
89
|
+
emits: ["submit", "error"],
|
|
94
90
|
watch: {
|
|
95
91
|
configuration(e) {
|
|
96
92
|
e && l(e);
|
|
@@ -98,20 +94,30 @@ const f = (e, t) => {
|
|
|
98
94
|
},
|
|
99
95
|
mounted() {
|
|
100
96
|
l(this.configuration);
|
|
97
|
+
},
|
|
98
|
+
methods: {
|
|
99
|
+
handler(e) {
|
|
100
|
+
const t = e.target;
|
|
101
|
+
G(t, this.extraData).then((n) => {
|
|
102
|
+
this.$attrs.onSubmit ? this.$emit("submit", n, t) : t.submit();
|
|
103
|
+
}).catch((n) => {
|
|
104
|
+
this.$emit("error", n);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
101
107
|
}
|
|
102
108
|
}, j = { id: "stop-wrapper" };
|
|
103
109
|
function V(e, t, n, r, m, d) {
|
|
104
110
|
return y(), p("div", j, [
|
|
105
111
|
B("form", {
|
|
106
112
|
id: "rebilly-form",
|
|
107
|
-
onSubmit: t[0] || (t[0] = I((...
|
|
113
|
+
onSubmit: t[0] || (t[0] = I((...f) => d.handler && d.handler(...f), ["stop", "prevent"]))
|
|
108
114
|
}, [
|
|
109
115
|
A(e.$slots, "default")
|
|
110
116
|
], 32)
|
|
111
117
|
]);
|
|
112
118
|
}
|
|
113
|
-
const J = /* @__PURE__ */
|
|
114
|
-
name: "
|
|
119
|
+
const J = /* @__PURE__ */ R(z, [["render", V]]), K = {
|
|
120
|
+
name: "RebillyToken"
|
|
115
121
|
}, q = {
|
|
116
122
|
id: "rebilly-token",
|
|
117
123
|
"data-rebilly": "token",
|
|
@@ -120,7 +126,7 @@ const J = /* @__PURE__ */ f(F, [["render", V]]), K = {
|
|
|
120
126
|
function X(e, t, n, r, m, d) {
|
|
121
127
|
return y(), p("input", q);
|
|
122
128
|
}
|
|
123
|
-
const Q = /* @__PURE__ */
|
|
129
|
+
const Q = /* @__PURE__ */ R(K, [["render", X]]), o = {
|
|
124
130
|
render() {
|
|
125
131
|
return c("div", {
|
|
126
132
|
id: this.mountId,
|
|
@@ -360,7 +366,7 @@ export {
|
|
|
360
366
|
se as RebillyIban,
|
|
361
367
|
me as RebillyPaypal,
|
|
362
368
|
Q as RebillyToken,
|
|
363
|
-
|
|
369
|
+
G as createToken,
|
|
364
370
|
de as default,
|
|
365
371
|
l as updateConfig
|
|
366
372
|
};
|
|
@@ -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 d({message:e="Could not mount FramePay to element.",details:t=null}={}){this.message=e,this.details=t,this.name="FramePayMountError"}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 d({message:e="Could not mount FramePay to element.",details:t=null}={}){this.message=e,this.details=t,this.name="FramePayMountError"}function h({message:e="FramePay could not be initialized.",details:t=null}={}){this.message=e,this.details=t,this.name="FramePayInitializeError"}function c({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||"https://framepay.rebilly.com/framepay.js",B=window.process?.env?.FRAMEPAY_STYLE_LINK||"https://framepay.rebilly.com/framepay.css",f=()=>new Promise((e,t)=>{const n=document.createElement("script");n.src=L,n.id="rebilly-framepay-js",n.onload=()=>e(Framepay),n.onerror=()=>t(),document.querySelector("head").appendChild(n)}).catch(e=>{throw new c({details:e})});let R;const I=new Promise(e=>{R=e}),A=R,_=I.then(f);function P(){if(document.querySelector("link#rebilly-framepay-css"))return;const e=document.createElement("link");e.href=B,e.id="rebilly-framepay-css",e.type="text/css",e.rel="stylesheet",e.onerror=t=>{throw new c({details:t})},document.querySelector("head").appendChild(e)}function s(e={}){return _.then(t=>new Promise(n=>{t.on("ready",()=>{n(t)}),t.on("error",l=>{throw new c({details:l})});try{e.injectStyle&&P(),!t.initialized&&(e.publishableKey||e.jwt)&&t.initialize(e)}catch(l){throw new h({details:l})}}))}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 h({message:"Please initialize Framepay before creating a token"});return n.createToken(e,t)})}function m(e){return s(e).then(t=>{t.update({...e})})}const E=(e,t)=>{const n=e.__vccOpts||e;for(const[l,y]of t)n[l]=y;return n},Y={name:"RebillyForm",props:{extraData:{type:Object,default:()=>({})},configuration:{type:Object,default:()=>({})}},emits:["submit","error"],watch:{configuration(e){e&&m(e)}},mounted(){m(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 T(e,t,n,l,y,u){return r.openBlock(),r.createElementBlock("div",N,[r.createElementVNode("form",{id:"rebilly-form",onSubmit:t[0]||(t[0]=r.withModifiers((...q)=>u.handler&&u.handler(...q),["stop","prevent"]))},[r.renderSlot(e.$slots,"default")],32)])}const C=E(Y,[["render",T]]),g={name:"RebillyToken"},$={id:"rebilly-token","data-rebilly":"token",type:"hidden"};function w(e,t,n,l,y,u){return r.openBlock(),r.createElementBlock("input",$)}const U=E(g,[["render",w]]),a={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){s(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 d}})},destroyElement(){this.element&&this.element.destroy()}},created(){this.mountElement(`#${this.mountId}`)},beforeDestroy(){this.destroyElement()},beforeUnmount(){this.destroyElement()}},k={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){s(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 d({details:n})}})},destroyElement(){this.element&&this.element.destroy()}},watch:{configuration(e){e&&m(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){s(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 d({details:n})}})},destroyElement(){this.element&&this.element.destroy()}},watch:{configuration(e){e&&m(e)}},created(){this.mountElement(`#${this.mountId}`)},beforeDestroy(){this.destroyElement()},beforeUnmount(){this.destroyElement()}},O={name:"rebilly-card",data(){return{elementType:o.REBILLY_CARD}},mixins:[a]},M={name:"rebilly-card-cvv",data(){return{elementType:o.REBILLY_CARD_CVV}},mixins:[a]},S={name:"rebilly-card-expiration",data(){return{elementType:o.REBILLY_CARD_EXPIRATION}},mixins:[a]},D={name:"rebilly-card-number",data(){return{elementType:o.REBILLY_CARD_NUMBER}},mixins:[a]},G={name:"rebilly-bban-account-type",data(){return{elementType:o.REBILLY_BBAN_ACCOUNT_TYPE}},mixins:[a]},F={name:"rebilly-bban-routing-number",data(){return{elementType:o.REBILLY_BBAN_ROUTING_NUMBER}},mixins:[a]},V={name:"rebilly-bban-account-number",data(){return{elementType:o.REBILLY_BBAN_ACCOUNT_NUMBER}},mixins:[a]},j={name:"rebilly-iban",data(){return{elementType:o.REBILLY_IBAN}},mixins:[a]},x={name:"rebilly-google-pay",data(){return{elementType:o.REBILLY_GOOGLE_PAY}},mixins:[k]},z={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]},K={install(e,t={}){A(),s(t)}};i.RebillyApplePay=z,i.RebillyBbanAccountNumber=V,i.RebillyBbanAccountType=G,i.RebillyBbanRoutingNumber=F,i.RebillyCard=O,i.RebillyCardCvv=M,i.RebillyCardExpiration=S,i.RebillyCardNumber=D,i.RebillyFieldTypes=o,i.RebillyForm=C,i.RebillyGooglePay=x,i.RebillyIban=j,i.RebillyPaypal=v,i.RebillyToken=U,i.createToken=b,i.default=K,i.updateConfig=m,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": "5.
|
|
4
|
+
"version": "5.14.0",
|
|
5
5
|
"description": "Official Vue wrapper for Rebilly FramePay",
|
|
6
6
|
"author": "Rebilly",
|
|
7
7
|
"repository": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"test:e2e:pr": "start-server-and-test 'vite dev --port 4173' localhost:4173 'cypress run --e2e'",
|
|
38
38
|
"test:e2e:gui": "start-server-and-test 'vite dev --port 4173' localhost:4173 'cypress open --e2e'",
|
|
39
39
|
"lint": "yarn lint:no-fix --fix",
|
|
40
|
-
"lint:no-fix": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --ignore-path .gitignore"
|
|
40
|
+
"lint:no-fix": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --ignore-path .gitignore --max-warnings 0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"vue": "^3.0.0"
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@rebilly/eslint-config": "*",
|
|
47
47
|
"@testing-library/cypress": "^10.0.1",
|
|
48
|
-
"@vitejs/plugin-vue": "^
|
|
48
|
+
"@vitejs/plugin-vue": "^5.0.4",
|
|
49
49
|
"@vue/test-utils": "^2.4.4",
|
|
50
50
|
"cypress": "^12.17.4",
|
|
51
51
|
"cypress-iframe": "^1.0.1",
|
|
52
52
|
"jsdom": "^21.1.1",
|
|
53
53
|
"start-server-and-test": "^2.0.3",
|
|
54
|
-
"vite": "^
|
|
55
|
-
"vite-plugin-mkcert": "^1.
|
|
54
|
+
"vite": "^5.1.4",
|
|
55
|
+
"vite-plugin-mkcert": "^1.17.4",
|
|
56
56
|
"vitest": "^0.29.7",
|
|
57
57
|
"vue": "3.2.47"
|
|
58
58
|
}
|