@qikdev/vue-ui 0.2.289 → 0.2.290

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.290";
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
  }