@qikdev/vue-ui 0.2.72 → 0.2.74

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 ki, ref as Wt, toRefs as la, onMounted as oa, onBeforeUnmount as wo, watch as xi, computed as ai, openBlock as o, createElementBlock as d, renderSlot as G, createCommentVNode as _, useSlots as So, reactive as kr, provide as Fr, resolveComponent as y, normalizeClass as P, Fragment as S, unref as jn, createBlock as k, withCtx as h, createVNode as m, renderList as N, toDisplayString as b, withModifiers as W, createTextVNode as O, createElementVNode as w, h as li, resolveDynamicComponent as It, mergeProps as wi, toHandlers as ua, withDirectives as X, vModelSelect as kt, pushScopeId as it, popScopeId as st, normalizeStyle as xt, Teleport as Oo, vModelText as ge, withKeys as ve, TransitionGroup as To, nextTick as da, vModelDynamic as Rn, vShow as qi } from "vue";
3
3
  import { EventDispatcher as Eo } from "@qikdev/sdk";
4
- const Co = "0.2.72", lr = {
4
+ const Co = "0.2.74", lr = {
5
5
  STRIPE_NOT_LOADED: "Stripe v3 library is not loaded",
6
6
  INSTANCE_NOT_DEFINED: "Instance object is not defined. Make sure you initialized Stripe before creating elements",
7
7
  ELEMENTS_NOT_DEFINED: "Elements object is not defined. You can't create stripe element without it",
@@ -174,14 +174,14 @@ function iu(e, t, n, i, s, r) {
174
174
  G(e.$slots, "default", {}, void 0, !0)
175
175
  ]);
176
176
  }
177
- const su = /* @__PURE__ */ E(nu, [["render", iu], ["__scopeId", "data-v-c7bb49df"]]);
177
+ const su = /* @__PURE__ */ E(nu, [["render", iu], ["__scopeId", "data-v-ceefef08"]]);
178
178
  const au = {}, lu = { class: "flex-row" };
179
179
  function ou(e, t, n, i, s, r) {
180
180
  return o(), d("div", lu, [
181
181
  G(e.$slots, "default", {}, void 0, !0)
182
182
  ]);
183
183
  }
184
- const uu = /* @__PURE__ */ E(au, [["render", ou], ["__scopeId", "data-v-b6434689"]]);
184
+ const uu = /* @__PURE__ */ E(au, [["render", ou], ["__scopeId", "data-v-5b12efd6"]]);
185
185
  const du = {}, cu = { class: "flex-spacer" };
186
186
  function fu(e, t, n, i, s, r) {
187
187
  return o(), d("div", cu);
@@ -6912,7 +6912,12 @@ const Dy = {
6912
6912
  return this.multiValue ? e.push("multiple") : e.push("single"), e;
6913
6913
  },
6914
6914
  summary() {
6915
- return this.multiValue ? "Select an option" : this.model ? this.getLabel(this.optionLookup[this.model]) : this.title || "Click to select";
6915
+ if (this.multiValue)
6916
+ return "Select an option";
6917
+ const e = this.selectableOptions.find(function(n) {
6918
+ return n.none;
6919
+ }), t = (e == null ? void 0 : e.title) || (e == null ? void 0 : e.label);
6920
+ return this.model ? this.getLabel(this.optionLookup[this.model]) : t || this.title || "Click to select";
6916
6921
  },
6917
6922
  grouped() {
6918
6923
  const e = this, { values: t } = e.selectableOptions.reduce(function(n, i) {
@@ -6937,12 +6942,12 @@ const Dy = {
6937
6942
  }) : this.options;
6938
6943
  },
6939
6944
  showNoneOption() {
6940
- return this.singleValue && !this.minimum ? this.selectableOptions.find(function(n) {
6945
+ return !(!(this.singleValue && !this.minimum) || this.selectableOptions.find(function(n) {
6941
6946
  return n.none;
6942
- }) ? (console.log("has custom none option"), !1) : !0 : !1;
6947
+ }));
6943
6948
  }
6944
6949
  }
6945
- }, $y = (e) => (it("data-v-271e784a"), e = e(), st(), e), Ny = {
6950
+ }, $y = (e) => (it("data-v-9772b96a"), e = e(), st(), e), Ny = {
6946
6951
  key: 0,
6947
6952
  class: "ux-field-title"
6948
6953
  }, Ly = {
@@ -7061,7 +7066,7 @@ function Qy(e, t, n, i, s, r) {
7061
7066
  ]))
7062
7067
  ], 2);
7063
7068
  }
7064
- const Nt = /* @__PURE__ */ E(Dy, [["render", Qy], ["__scopeId", "data-v-271e784a"]]);
7069
+ const Nt = /* @__PURE__ */ E(Dy, [["render", Qy], ["__scopeId", "data-v-9772b96a"]]);
7065
7070
  const e_ = {
7066
7071
  props: {
7067
7072
  total: {
@@ -7768,20 +7773,60 @@ const I_ = /* @__PURE__ */ E(A_, [["render", M_], ["__scopeId", "data-v-db935124
7768
7773
  default: "none"
7769
7774
  }
7770
7775
  },
7776
+ mounted() {
7777
+ this.mounted = !0;
7778
+ },
7779
+ beforeUnmount() {
7780
+ this.mounted = !1, this.removeListeners();
7781
+ },
7771
7782
  computed: {
7772
7783
  filteredItems() {
7773
- return this.items.filter(function(e) {
7784
+ return this.tree.filter(function(e) {
7774
7785
  return !e.disabled;
7775
7786
  });
7787
+ },
7788
+ expandedItem: {
7789
+ get() {
7790
+ return this.currentExpandedItem;
7791
+ },
7792
+ set(e) {
7793
+ this.currentExpandedItem && (this.currentExpandedItem.expanded = !1, this.currentExpandedItem.collapsed = !0), this.currentExpandedItem = e, this.currentExpandedItem ? (this.currentExpandedItem.expanded = !0, this.currentExpandedItem.collapsed = !1, this.addListeners()) : this.removeListeners();
7794
+ }
7776
7795
  }
7777
7796
  },
7797
+ data() {
7798
+ return {
7799
+ currentExpandedItem: null,
7800
+ tree: JSON.parse(JSON.stringify(this.items))
7801
+ };
7802
+ },
7778
7803
  methods: {
7804
+ globalClick(e) {
7805
+ this.expandedItem = null;
7806
+ },
7807
+ addListeners() {
7808
+ var t;
7809
+ this.$sdk.addEventListener("route:change", this.globalClick);
7810
+ const e = (t = this.$el) == null ? void 0 : t.ownerDocument;
7811
+ e && e.body.addEventListener("click", this.globalClick);
7812
+ },
7813
+ removeListeners() {
7814
+ var t;
7815
+ this.$sdk.removeEventListener("route:change", this.globalClick);
7816
+ const e = (t = this.$el) == null ? void 0 : t.ownerDocument;
7817
+ e && e.body.removeEventListener("click", this.globalClick);
7818
+ },
7779
7819
  toggle(e) {
7780
- e.expanded = !e.expanded, e.collapsed = !e.expanded;
7820
+ this.currentExpandedItem === e ? this.expandedItem = null : this.expandedItem = e;
7781
7821
  }
7782
7822
  },
7783
- data() {
7784
- return {};
7823
+ watch: {
7824
+ items: {
7825
+ handler(e) {
7826
+ this.tree = JSON.parse(JSON.stringify(e));
7827
+ },
7828
+ deep: !0
7829
+ }
7785
7830
  }
7786
7831
  };
7787
7832
  function D_(e, t, n, i, s, r) {