@qikdev/vue-ui 0.2.176 → 0.2.177
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 +30 -29
- 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/style.css +1 -1
- package/package.json +1 -1
package/dist/lib.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './style.css';
|
|
2
2
|
import { defineComponent as Vi, ref as Jt, toRefs as xa, onMounted as wa, onBeforeUnmount as Ho, watch as Ei, computed as fi, openBlock as o, createElementBlock as d, renderSlot as H, createCommentVNode as _, normalizeClass as L, useSlots as qo, reactive as Tr, provide as Lr, resolveComponent as y, Fragment as S, unref as zn, createBlock as k, withCtx as h, createVNode as m, renderList as F, toDisplayString as b, withDirectives as K, vShow as dr, createElementVNode as x, withModifiers as z, createTextVNode as T, h as mi, mergeProps as Or, toHandlers as Ai, normalizeStyle as He, resolveDynamicComponent as ft, vModelSelect as Tt, pushScopeId as qe, popScopeId as We, Teleport as Wo, vModelText as se, withKeys as ge, TransitionGroup as Go, nextTick as Sa, vModelDynamic as Hn } from "vue";
|
|
3
3
|
import { EventDispatcher as Ko } from "@qikdev/sdk";
|
|
4
|
-
const Yo = "0.2.
|
|
4
|
+
const Yo = "0.2.177";
|
|
5
5
|
class Pt extends Error {
|
|
6
6
|
}
|
|
7
7
|
class Zo extends Pt {
|
|
@@ -20978,40 +20978,44 @@ const oi = "form.ready", uV = "form.processing", _a = "form.complete", ga = "for
|
|
|
20978
20978
|
e.processing = !0, e.state = uV, e.$emit("processing");
|
|
20979
20979
|
const { submission: t, error: n } = await e.preSubmit(e.model);
|
|
20980
20980
|
if (n)
|
|
20981
|
-
return console.log("pre submit error", n),
|
|
20981
|
+
return console.log("pre submit error", n), l(n);
|
|
20982
|
+
const i = {}, s = new URLSearchParams(window.location.search);
|
|
20983
|
+
for (const [u, f] of s)
|
|
20984
|
+
i[u] = f;
|
|
20982
20985
|
e.$sdk.api.post(`/form/${e.formID}`, {
|
|
20983
20986
|
data: t,
|
|
20984
|
-
sandbox: e.sandbox
|
|
20985
|
-
|
|
20986
|
-
|
|
20987
|
-
|
|
20987
|
+
sandbox: e.sandbox,
|
|
20988
|
+
gtm: i
|
|
20989
|
+
}).then(function(u) {
|
|
20990
|
+
const { data: f } = u;
|
|
20991
|
+
return f.submission ? a(u.data) : f.intent ? r(u.data) : l({
|
|
20988
20992
|
message: "Unexpected response from server",
|
|
20989
20993
|
status: 500,
|
|
20990
20994
|
statusCode: 500
|
|
20991
20995
|
});
|
|
20992
|
-
},
|
|
20993
|
-
async function
|
|
20994
|
-
switch (console.log("Submission intent was returned",
|
|
20996
|
+
}, l);
|
|
20997
|
+
async function r({ intent: u }) {
|
|
20998
|
+
switch (console.log("Submission intent was returned", u), e.intent = u, e.intentModule) {
|
|
20995
20999
|
case "stripe":
|
|
20996
21000
|
await e.$sdk.utils.loadExternalScript("https://js.stripe.com/v3/");
|
|
20997
21001
|
break;
|
|
20998
21002
|
}
|
|
20999
|
-
e.state = dV, e.processing = !1, e.$emit("intent",
|
|
21003
|
+
e.state = dV, e.processing = !1, e.$emit("intent", u);
|
|
21000
21004
|
}
|
|
21001
|
-
async function
|
|
21002
|
-
await e.postSubmit(
|
|
21005
|
+
async function a(u) {
|
|
21006
|
+
await e.postSubmit(u), e.processing = !1, e.state = _a, e.$emit("success", u);
|
|
21003
21007
|
}
|
|
21004
|
-
async function
|
|
21005
|
-
var
|
|
21006
|
-
|
|
21008
|
+
async function l(u) {
|
|
21009
|
+
var f;
|
|
21010
|
+
u = ((f = u.response) == null ? void 0 : f.data) || u, e.error = u, e.processing = !1, e.state = ga, e.$emit("error", u);
|
|
21007
21011
|
}
|
|
21008
21012
|
},
|
|
21009
21013
|
async preSubmit(e) {
|
|
21010
|
-
var
|
|
21011
|
-
const t = this, n = JSON.parse(JSON.stringify(e)), i = (
|
|
21014
|
+
var r, a;
|
|
21015
|
+
const t = this, n = JSON.parse(JSON.stringify(e)), i = (r = n._payment) == null ? void 0 : r.total, s = (a = n._payment) == null ? void 0 : a.gateway;
|
|
21012
21016
|
if (t.form.hasGeographicRequirements) {
|
|
21013
|
-
const { coords:
|
|
21014
|
-
if (!
|
|
21017
|
+
const { coords: l } = await t.$sdk.geo.getPosition();
|
|
21018
|
+
if (!l || !l.latitude || !l.longitude)
|
|
21015
21019
|
return {
|
|
21016
21020
|
error: {
|
|
21017
21021
|
message: "Location data is required to submit this form",
|
|
@@ -21020,16 +21024,13 @@ const oi = "form.ready", uV = "form.processing", _a = "form.complete", ga = "for
|
|
|
21020
21024
|
}
|
|
21021
21025
|
};
|
|
21022
21026
|
n._geo = {
|
|
21023
|
-
latitude:
|
|
21024
|
-
longitude:
|
|
21025
|
-
altitude:
|
|
21026
|
-
accuracy:
|
|
21027
|
+
latitude: l.latitude,
|
|
21028
|
+
longitude: l.longitude,
|
|
21029
|
+
altitude: l.altitude,
|
|
21030
|
+
accuracy: l.accuracy
|
|
21027
21031
|
};
|
|
21028
21032
|
}
|
|
21029
|
-
|
|
21030
|
-
for (const [f, c] of a)
|
|
21031
|
-
r[f] = c;
|
|
21032
|
-
return n.gtm = r, i ? s ? (s.integration, { submission: n }) : {
|
|
21033
|
+
return i ? s ? (s.integration, { submission: n }) : {
|
|
21033
21034
|
error: {
|
|
21034
21035
|
message: "No gateway selected",
|
|
21035
21036
|
status: 400,
|
|
@@ -21178,7 +21179,7 @@ const oi = "form.ready", uV = "form.processing", _a = "form.complete", ga = "for
|
|
|
21178
21179
|
return this.form.fields || [];
|
|
21179
21180
|
}
|
|
21180
21181
|
}
|
|
21181
|
-
}, fV = (e) => (qe("data-v-
|
|
21182
|
+
}, fV = (e) => (qe("data-v-9cdffe7f"), e = e(), We(), e), mV = /* @__PURE__ */ fV(() => /* @__PURE__ */ x("h3", null, "An error occurred", -1)), hV = { key: 0 }, pV = { key: 1 }, yV = { key: 2 }, _V = { class: "intent-submit" }, gV = ["tooltip"];
|
|
21182
21183
|
function vV(e, t, n, i, s, r) {
|
|
21183
21184
|
var v;
|
|
21184
21185
|
const a = y("ux-icon"), l = y("ux-button"), u = y("ux-panel-body"), f = y("ux-panel"), c = y("StripeElement"), p = y("StripeElements"), g = y("ux-form");
|
|
@@ -21285,7 +21286,7 @@ function vV(e, t, n, i, s, r) {
|
|
|
21285
21286
|
], 64))
|
|
21286
21287
|
], 2);
|
|
21287
21288
|
}
|
|
21288
|
-
const va = /* @__PURE__ */ C(cV, [["render", vV], ["__scopeId", "data-v-
|
|
21289
|
+
const va = /* @__PURE__ */ C(cV, [["render", vV], ["__scopeId", "data-v-9cdffe7f"]]);
|
|
21289
21290
|
const bV = {
|
|
21290
21291
|
props: {
|
|
21291
21292
|
autofocus: {
|