@qikdev/vue-ui 0.2.170 → 0.2.172

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  import './style.css';
2
2
  import { defineComponent as Vr, ref as Zt, toRefs as xa, onMounted as wa, onBeforeUnmount as Ho, watch as Er, computed as fr, openBlock as o, createElementBlock as d, renderSlot as H, createCommentVNode as _, normalizeClass as L, useSlots as qo, reactive as Ti, provide as Li, 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 di, createElementVNode as x, withModifiers as z, createTextVNode as T, h as mr, mergeProps as Oi, toHandlers as Ar, normalizeStyle as ze, resolveDynamicComponent as ft, vModelSelect as Tt, pushScopeId as He, popScopeId as qe, 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.170";
4
+ const Yo = "0.2.172";
5
5
  class Lt extends Error {
6
6
  }
7
7
  class Zo extends Lt {
@@ -20908,7 +20908,6 @@ const or = "form.ready", uV = "form.processing", _a = "form.complete", ga = "for
20908
20908
  }
20909
20909
  },
20910
20910
  async submit() {
20911
- console.log("Submit");
20912
20911
  const e = this;
20913
20912
  if (e.touch(), e.submitAttempted || (e.submitAttempted = !0, e.touch()), e.buttonDisabled) {
20914
20913
  console.log("Form is invalid", this.formState);
@@ -20946,15 +20945,32 @@ const or = "form.ready", uV = "form.processing", _a = "form.complete", ga = "for
20946
20945
  }
20947
20946
  },
20948
20947
  async preSubmit(e) {
20949
- var s, i;
20950
- const t = JSON.parse(JSON.stringify(e)), n = (s = t._payment) == null ? void 0 : s.total, r = (i = t._payment) == null ? void 0 : i.gateway;
20951
- return n ? r ? (r.integration, { submission: t }) : {
20948
+ var i, a;
20949
+ const t = this, n = JSON.parse(JSON.stringify(e)), r = (i = n._payment) == null ? void 0 : i.total, s = (a = n._payment) == null ? void 0 : a.gateway;
20950
+ if (t.form.hasGeographicRequirements) {
20951
+ const { coords: l } = await t.$sdk.geo.getPosition();
20952
+ if (!l || !l.latitude || !l.longitude)
20953
+ return {
20954
+ error: {
20955
+ message: "Location data is required to submit this form",
20956
+ status: 400,
20957
+ statusCode: 400
20958
+ }
20959
+ };
20960
+ n._geo = {
20961
+ latitude: l.latitude,
20962
+ longitude: l.longitude,
20963
+ altitude: l.altitude,
20964
+ accuracy: l.accuracy
20965
+ };
20966
+ }
20967
+ return r ? s ? (s.integration, { submission: n }) : {
20952
20968
  error: {
20953
20969
  message: "No gateway selected",
20954
20970
  status: 400,
20955
20971
  statusCode: 400
20956
20972
  }
20957
- } : (console.log("No total"), { submission: t });
20973
+ } : { submission: n };
20958
20974
  },
20959
20975
  async postSubmit(e) {
20960
20976
  }
@@ -21097,7 +21113,7 @@ const or = "form.ready", uV = "form.processing", _a = "form.complete", ga = "for
21097
21113
  return this.form.fields || [];
21098
21114
  }
21099
21115
  }
21100
- }, fV = (e) => (He("data-v-e1ea11cb"), e = e(), qe(), 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"];
21116
+ }, fV = (e) => (He("data-v-256c7e92"), e = e(), qe(), 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"];
21101
21117
  function vV(e, t, n, r, s, i) {
21102
21118
  var v;
21103
21119
  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");
@@ -21204,7 +21220,7 @@ function vV(e, t, n, r, s, i) {
21204
21220
  ], 64))
21205
21221
  ], 2);
21206
21222
  }
21207
- const va = /* @__PURE__ */ C(cV, [["render", vV], ["__scopeId", "data-v-e1ea11cb"]]);
21223
+ const va = /* @__PURE__ */ C(cV, [["render", vV], ["__scopeId", "data-v-256c7e92"]]);
21208
21224
  const bV = {
21209
21225
  props: {
21210
21226
  autofocus: {