@qikdev/vue-ui 0.3.26 → 0.3.31
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/dist/lib.es.js +29 -10
- package/dist/lib.es.js.map +1 -1
- package/dist/lib.umd.js +2 -2
- package/dist/lib.umd.js.map +1 -1
- package/dist/vue-ui.css +1 -1
- package/package.json +1 -1
package/dist/lib.es.js
CHANGED
|
@@ -4,7 +4,7 @@ var Uh = (e, t, n) => t in e ? Rh(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
4
4
|
var ie = (e, t, n) => Uh(e, typeof t != "symbol" ? t + "" : t, n);
|
|
5
5
|
import { reactive as Gt, defineComponent as Fl, ref as vt, toRefs as of, onMounted as Al, onBeforeUnmount as jh, watch as cr, computed as Fn, createElementBlock as h, openBlock as o, createCommentVNode as _, renderSlot as z, normalizeClass as $, useSlots as qh, provide as Mr, resolveComponent as y, createVNode as c, Fragment as D, createBlock as k, unref as gt, withCtx as f, renderList as A, toDisplayString as b, createTextVNode as O, withDirectives as Z, vShow as ci, withModifiers as B, createElementVNode as T, h as dl, mergeProps as mt, toHandlers as kt, normalizeStyle as Ge, resolveDirective as uf, resolveDynamicComponent as Vt, vModelSelect as Dt, pushScopeId as je, popScopeId as qe, getCurrentScope as Bh, onScopeDispose as zh, getCurrentInstance as Wh, Teleport as df, Transition as Hh, withKeys as we, vModelText as be, TransitionGroup as Gh, nextTick as cf, vModelDynamic as Sn, normalizeProps as ff, guardReactiveProps as Yh } from "vue";
|
|
6
6
|
import { EventDispatcher as mf } from "@qikdev/sdk";
|
|
7
|
-
const Jh = "0.3.
|
|
7
|
+
const Jh = "0.3.31";
|
|
8
8
|
class yn extends Error {
|
|
9
9
|
}
|
|
10
10
|
class Kh extends yn {
|
|
@@ -31650,7 +31650,9 @@ const Ch = /* @__PURE__ */ M(BA, [["render", zA], ["__scopeId", "data-v-e6afec75
|
|
|
31650
31650
|
},
|
|
31651
31651
|
async preSubmit(e) {
|
|
31652
31652
|
var i, a;
|
|
31653
|
-
const t = this, n = JSON.parse(JSON.stringify(e)), r = (i = n._payment) == null ? void 0 : i.total
|
|
31653
|
+
const t = this, n = JSON.parse(JSON.stringify(e)), r = (i = n._payment) == null ? void 0 : i.total;
|
|
31654
|
+
r && (n._payment.gateway || this.selectedGateway && (n._payment.gateway = this.selectedGateway));
|
|
31655
|
+
const s = (a = n._payment) == null ? void 0 : a.gateway;
|
|
31654
31656
|
if (t.form.hasGeographicRequirements) {
|
|
31655
31657
|
const { coords: l } = await t.$sdk.geo.getPosition().catch(function(u) {
|
|
31656
31658
|
return console.log("Error", u), {
|
|
@@ -31770,14 +31772,14 @@ const Ch = /* @__PURE__ */ M(BA, [["render", zA], ["__scopeId", "data-v-e6afec75
|
|
|
31770
31772
|
},
|
|
31771
31773
|
canAdvance(e) {
|
|
31772
31774
|
if (!this.movedBackwards && e && this.autoadvance) {
|
|
31773
|
-
const t = this.$refs.form[this.currentPage], n = (t == null ? void 0 : t.fields) || []
|
|
31775
|
+
const t = this.$refs.form[this.currentPage], n = (t == null ? void 0 : t.fields) || [];
|
|
31776
|
+
this.$sdk.utils.mapFields(n).filter(function({ type: s }) {
|
|
31774
31777
|
switch (s) {
|
|
31775
31778
|
case "void":
|
|
31776
31779
|
return !1;
|
|
31777
31780
|
}
|
|
31778
31781
|
return !0;
|
|
31779
|
-
});
|
|
31780
|
-
console.log("Lets autoadvance!!!"), r.length == 1 && this.nextPageAttempt();
|
|
31782
|
+
}).length == 1 && this.nextPageAttempt();
|
|
31781
31783
|
}
|
|
31782
31784
|
},
|
|
31783
31785
|
modelValue(e, t) {
|
|
@@ -31810,6 +31812,14 @@ const Ch = /* @__PURE__ */ M(BA, [["render", zA], ["__scopeId", "data-v-e6afec75
|
|
|
31810
31812
|
this.mounted = !1;
|
|
31811
31813
|
},
|
|
31812
31814
|
computed: {
|
|
31815
|
+
selectedGateway() {
|
|
31816
|
+
var t, n, r, s;
|
|
31817
|
+
if ((n = (t = this.model) == null ? void 0 : t._payment) != null && n.gateway)
|
|
31818
|
+
return (s = (r = this.model) == null ? void 0 : r._payment) == null ? void 0 : s.gateway;
|
|
31819
|
+
const e = this.gateways.filter(Boolean);
|
|
31820
|
+
if (e.length === 1)
|
|
31821
|
+
return e[0];
|
|
31822
|
+
},
|
|
31813
31823
|
invalidFields() {
|
|
31814
31824
|
var e;
|
|
31815
31825
|
return !this.showBlockers || !this.submitAttempted ? [] : this.buttonDisabled ? ((e = this.formState) == null ? void 0 : e.invalidFields) || [] : [];
|
|
@@ -31822,6 +31832,10 @@ const Ch = /* @__PURE__ */ M(BA, [["render", zA], ["__scopeId", "data-v-e6afec75
|
|
|
31822
31832
|
var e;
|
|
31823
31833
|
return !!((e = this.paymentConfiguration) != null && e.enabled);
|
|
31824
31834
|
},
|
|
31835
|
+
gateways() {
|
|
31836
|
+
var e;
|
|
31837
|
+
return ((e = this.paymentConfiguration) == null ? void 0 : e.gateways) || [];
|
|
31838
|
+
},
|
|
31825
31839
|
requiresPayment() {
|
|
31826
31840
|
var e;
|
|
31827
31841
|
return this.paymentEnabled ? parseInt((e = this.model._payment) == null ? void 0 : e.total) > 0 : !1;
|
|
@@ -31923,12 +31937,17 @@ const Ch = /* @__PURE__ */ M(BA, [["render", zA], ["__scopeId", "data-v-e6afec75
|
|
|
31923
31937
|
return this.buttonDisabled ? "Please check the errors in your form" : void 0;
|
|
31924
31938
|
},
|
|
31925
31939
|
buttonDisabled() {
|
|
31926
|
-
return this.preview ? !0 : this.noGatewaySelectedButPaymentIsRequired ? (console.
|
|
31927
|
-
"
|
|
31940
|
+
return this.preview ? !0 : this.noGatewaySelectedButPaymentIsRequired ? (console.log(
|
|
31941
|
+
"NO GATEWAY SELECTED",
|
|
31942
|
+
this.total,
|
|
31943
|
+
this.gateways,
|
|
31944
|
+
this.selectedGateway
|
|
31945
|
+
), console.error(
|
|
31946
|
+
"Error: There is no payment gateway selected but payment is required"
|
|
31928
31947
|
), !0) : this.submitAttempted && this.invalid;
|
|
31929
31948
|
},
|
|
31930
31949
|
noGatewaySelectedButPaymentIsRequired() {
|
|
31931
|
-
return this.total
|
|
31950
|
+
return !(!this.total || this.selectedGateway);
|
|
31932
31951
|
},
|
|
31933
31952
|
invalid() {
|
|
31934
31953
|
var t;
|
|
@@ -31947,7 +31966,7 @@ const Ch = /* @__PURE__ */ M(BA, [["render", zA], ["__scopeId", "data-v-e6afec75
|
|
|
31947
31966
|
return ((e = this.form) == null ? void 0 : e.fields) || [];
|
|
31948
31967
|
}
|
|
31949
31968
|
}
|
|
31950
|
-
}, Eh = (e) => (je("data-v-
|
|
31969
|
+
}, Eh = (e) => (je("data-v-2d75efd5"), e = e(), qe(), e), YA = /* @__PURE__ */ Eh(() => /* @__PURE__ */ T("h3", null, "An error occurred", -1)), JA = { key: 0 }, KA = { key: 1 }, ZA = { key: 2 }, XA = { class: "intent-submit" }, QA = {
|
|
31951
31970
|
key: 0,
|
|
31952
31971
|
class: "multistep-form"
|
|
31953
31972
|
}, eN = { class: "multistep-form-sections" }, tN = { class: "multistep-fields" }, nN = { class: "multistep-controls" }, iN = ["tooltip"], rN = ["tooltip"], sN = { class: "multistep-progress" }, aN = {
|
|
@@ -32177,7 +32196,7 @@ function uN(e, t, n, r, s, i) {
|
|
|
32177
32196
|
], 64))
|
|
32178
32197
|
], 2);
|
|
32179
32198
|
}
|
|
32180
|
-
const dN = /* @__PURE__ */ M(GA, [["render", uN], ["__scopeId", "data-v-
|
|
32199
|
+
const dN = /* @__PURE__ */ M(GA, [["render", uN], ["__scopeId", "data-v-2d75efd5"]]), cN = "init", zc = "ready", fN = "processing", mN = "success", hN = "error", pN = {
|
|
32181
32200
|
name: "PaymentMethodForm",
|
|
32182
32201
|
components: {
|
|
32183
32202
|
StripeElements: mm,
|