@qikdev/vue-ui 0.2.289 → 0.2.291

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
@@ -47,7 +47,7 @@ import {
47
47
  vModelDynamic as Zn,
48
48
  } from "vue";
49
49
  import { EventDispatcher as jl } from "@qikdev/sdk";
50
- const fu = "0.2.289";
50
+ const fu = "0.2.291";
51
51
  class qt extends Error {}
52
52
  class mu extends qt {
53
53
  constructor(t) {
@@ -9156,6 +9156,9 @@ const te = {
9156
9156
  if (t) return e.$sdk.api.generateEndpointURL(`/smartlist/${t}/select`);
9157
9157
  }
9158
9158
  },
9159
+ hasAuthenticationToken() {
9160
+ return this.$sdk.auth.getCurrentToken();
9161
+ },
9159
9162
  hasAsyncOptions() {
9160
9163
  var e;
9161
9164
  if (this.asyncOptionsURL) return !0;
@@ -9163,7 +9166,7 @@ const te = {
9163
9166
  if ((e = this.field.allowedReferences) != null && e.length) return !1;
9164
9167
  switch (this.field.widget) {
9165
9168
  case "select":
9166
- if (this.user) return !0;
9169
+ if (this.hasAuthenticationToken) return !0;
9167
9170
  break;
9168
9171
  default:
9169
9172
  return !1;
@@ -9378,9 +9381,9 @@ const te = {
9378
9381
  _id: i,
9379
9382
  };
9380
9383
  });
9381
- } else if (e.$sdk.auth.getCurrentToken()) {
9382
- const n = e.field.referenceType,
9383
- r = {
9384
+ } else if (e.hasAuthenticationToken) {
9385
+ const t = e.field.referenceType,
9386
+ n = {
9384
9387
  filter: e.field.lockFilter,
9385
9388
  sort: {
9386
9389
  key: "title",
@@ -9391,12 +9394,12 @@ const te = {
9391
9394
  size: 1e3,
9392
9395
  },
9393
9396
  },
9394
- { items: s } = await e.$sdk.content.list(n, r);
9395
- e.dynamicOptions = s.map(function ({ _id: i, title: l }) {
9397
+ { items: r } = await e.$sdk.content.list(t, n);
9398
+ e.dynamicOptions = r.map(function ({ _id: s, title: i }) {
9396
9399
  return {
9397
- value: i,
9398
- title: l,
9399
- _id: i,
9400
+ value: s,
9401
+ title: i,
9402
+ _id: s,
9400
9403
  };
9401
9404
  });
9402
9405
  }
@@ -21734,16 +21737,13 @@ const Cx = {
21734
21737
  var r;
21735
21738
  const e = this,
21736
21739
  t = e.extraCriteria;
21737
- console.log("GOT THE EXTRA", t);
21738
21740
  let n = [];
21739
21741
  if (t) {
21740
21742
  e.glossary = await e.$sdk.content.glossary({ hash: !0 });
21741
21743
  const s = e.glossary,
21742
- i = (r = e.field) == null ? void 0 : r.referenceType;
21743
- console.log("REFERENCE TYPE", i);
21744
- const l = s[i];
21744
+ i = (r = e.field) == null ? void 0 : r.referenceType,
21745
+ l = s[i];
21745
21746
  if (l) {
21746
- console.log("MATCHED REFERENCE", l);
21747
21747
  let o = l.fields || [],
21748
21748
  u = [];
21749
21749
  switch (i) {
@@ -22128,7 +22128,7 @@ const Cx = {
22128
22128
  TimezoneSelect: na,
22129
22129
  },
22130
22130
  },
22131
- Ex = (e) => (Ze("data-v-9d835b9a"), (e = e()), Je(), e),
22131
+ Ex = (e) => (Ze("data-v-8b387cdb"), (e = e()), Je(), e),
22132
22132
  Dx = {
22133
22133
  key: 0,
22134
22134
  class: "filter-condition",
@@ -22848,7 +22848,7 @@ function zx(e, t, n, r, s, i) {
22848
22848
  }
22849
22849
  const qx = /* @__PURE__ */ V(Cx, [
22850
22850
  ["render", zx],
22851
- ["__scopeId", "data-v-9d835b9a"],
22851
+ ["__scopeId", "data-v-8b387cdb"],
22852
22852
  ]);
22853
22853
  const Hx = {
22854
22854
  emits: ["remove"],
@@ -23679,6 +23679,7 @@ const mw = {
23679
23679
  t = e.definition,
23680
23680
  n = (m = e.field) == null ? void 0 : m.contextDefinition;
23681
23681
  if (!t) return [];
23682
+ if (e.$sdk.utils.getAllFields) return e.$sdk.utils.getAllFields(t);
23682
23683
  const r = t.definesType === "submission";
23683
23684
  var s = [...t.fields],
23684
23685
  i = n ? n.fields : t.definedFields || [];
@@ -23904,7 +23905,7 @@ function bw(e, t, n, r, s, i) {
23904
23905
  }
23905
23906
  const _l = /* @__PURE__ */ V(mw, [
23906
23907
  ["render", bw],
23907
- ["__scopeId", "data-v-e4654800"],
23908
+ ["__scopeId", "data-v-2ba39d6e"],
23908
23909
  ]);
23909
23910
  function kw(e, t, n) {
23910
23911
  return e + (t - e) * (n / 100);