@qikdev/vue-ui 0.1.71 → 0.1.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
@@ -32,7 +32,7 @@ var __objRest = (source, exclude) => {
32
32
  };
33
33
  import { openBlock, createElementBlock, renderSlot, resolveComponent, createBlock, withCtx, createVNode, Fragment, renderList, normalizeClass, toDisplayString, withDirectives, resolveDynamicComponent, vShow, withModifiers, createTextVNode, createCommentVNode, createElementVNode, mergeProps, toHandlers, pushScopeId, popScopeId, normalizeStyle, Teleport, vModelSelect, withKeys, vModelText, TransitionGroup, defineComponent, h, nextTick, vModelDynamic, vModelCheckbox, reactive, watch } from "vue";
34
34
  import { EventDispatcher } from "@qikdev/sdk";
35
- const version$1 = "0.1.71";
35
+ const version$1 = "0.1.74";
36
36
  var flexColumn_vue_vue_type_style_index_0_scoped_true_lang = "";
37
37
  var _export_sfc = (sfc, props2) => {
38
38
  const target = sfc.__vccOpts || sfc;
@@ -6649,7 +6649,7 @@ function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
6649
6649
  ])
6650
6650
  ], 2);
6651
6651
  }
6652
- var NativeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$H], ["__scopeId", "data-v-1d53b270"]]);
6652
+ var NativeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$H], ["__scopeId", "data-v-be09a2cc"]]);
6653
6653
  var phoneNumberInput_vue_vue_type_style_index_0_scoped_true_lang = "";
6654
6654
  const _sfc_main$G = {
6655
6655
  props: {
@@ -10287,8 +10287,18 @@ const _sfc_main$D = {
10287
10287
  }
10288
10288
  },
10289
10289
  computed: {
10290
+ showList() {
10291
+ const self2 = this;
10292
+ if (self2.field.list === false) {
10293
+ return false;
10294
+ }
10295
+ return true;
10296
+ },
10290
10297
  canAdd() {
10291
10298
  const self2 = this;
10299
+ if (!self2.showList) {
10300
+ return true;
10301
+ }
10292
10302
  if (!self2.maximum) {
10293
10303
  return true;
10294
10304
  }
@@ -10296,6 +10306,9 @@ const _sfc_main$D = {
10296
10306
  },
10297
10307
  canCreate() {
10298
10308
  var _a;
10309
+ if (this.field.create === false) {
10310
+ return;
10311
+ }
10299
10312
  if (!((_a = this.$sdk.global) == null ? void 0 : _a.create)) {
10300
10313
  return;
10301
10314
  }
@@ -10312,6 +10325,13 @@ const _sfc_main$D = {
10312
10325
  if (this.multiValue) {
10313
10326
  if (this.model && this.model.length) {
10314
10327
  var length = this.model.length;
10328
+ if (!this.showList) {
10329
+ if (length === 1) {
10330
+ return this.model[0].title || this.model[0].name || this.model[0].firstName;
10331
+ } else {
10332
+ return `${length} selected`;
10333
+ }
10334
+ }
10315
10335
  var difference = Math.max(length - 3, 0);
10316
10336
  var summary;
10317
10337
  var cropped = this.model.slice(0, 3);
@@ -10330,7 +10350,11 @@ const _sfc_main$D = {
10330
10350
  }
10331
10351
  } else {
10332
10352
  if (this.model) {
10333
- return "Click to select";
10353
+ if (this.showList) {
10354
+ return "Click to select";
10355
+ } else {
10356
+ return this.model.title || this.model.name || this.model.firstName;
10357
+ }
10334
10358
  } else {
10335
10359
  return `Click to select`;
10336
10360
  }
@@ -10351,7 +10375,7 @@ const _hoisted_3$q = {
10351
10375
  class: "ux-field-description"
10352
10376
  };
10353
10377
  const _hoisted_4$n = {
10354
- key: 3,
10378
+ key: 1,
10355
10379
  class: "items"
10356
10380
  };
10357
10381
  const _hoisted_5$i = /* @__PURE__ */ createTextVNode(" Create ");
@@ -10369,72 +10393,74 @@ function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
10369
10393
  _ctx.required ? (openBlock(), createElementBlock("span", _hoisted_2$t, "*")) : createCommentVNode("", true)
10370
10394
  ])) : createCommentVNode("", true),
10371
10395
  _ctx.showDescription ? (openBlock(), createElementBlock("div", _hoisted_3$q, toDisplayString(_ctx.description), 1)) : createCommentVNode("", true),
10372
- _ctx.multiValue ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
10373
- _ctx.model && _ctx.model.length ? (openBlock(), createBlock(_component_draggable, {
10374
- key: 0,
10375
- class: "items",
10376
- modelValue: _ctx.model,
10377
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model = $event)
10378
- }, {
10379
- item: withCtx(({ element, index: index2 }) => [
10380
- (openBlock(), createBlock(_component_item, {
10381
- key: element._id,
10382
- item: element
10383
- }, {
10384
- actions: withCtx(() => [
10385
- $options.canEdit(element) ? (openBlock(), createBlock(_component_ux_button, {
10386
- key: 0,
10387
- icon: "",
10388
- onClick: withModifiers(($event) => $options.edit(element), ["stop", "prevent"])
10389
- }, {
10390
- default: withCtx(() => [
10391
- createVNode(_component_ux_icon, { icon: "fa-pencil" })
10392
- ]),
10393
- _: 2
10394
- }, 1032, ["onClick"])) : createCommentVNode("", true),
10395
- createVNode(_component_ux_button, {
10396
- icon: "",
10397
- onClick: withModifiers(($event) => _ctx.remove(element), ["stop", "prevent"])
10398
- }, {
10399
- default: withCtx(() => [
10400
- createVNode(_component_ux_icon, { icon: "fa-times" })
10401
- ]),
10402
- _: 2
10403
- }, 1032, ["onClick"])
10404
- ]),
10405
- _: 2
10406
- }, 1032, ["item"]))
10407
- ]),
10408
- _: 1
10409
- }, 8, ["modelValue"])) : createCommentVNode("", true)
10410
- ], 64)) : _ctx.model ? (openBlock(), createElementBlock("div", _hoisted_4$n, [
10411
- createVNode(_component_item, { item: _ctx.model }, {
10412
- actions: withCtx(() => [
10413
- $options.canEdit(_ctx.model) ? (openBlock(), createBlock(_component_ux_button, {
10414
- key: 0,
10415
- icon: "",
10416
- onClick: _cache[1] || (_cache[1] = withModifiers(($event) => $options.edit(_ctx.model), ["stop", "prevent"]))
10417
- }, {
10418
- default: withCtx(() => [
10419
- createVNode(_component_ux_icon, { icon: "fa-pencil" })
10420
- ]),
10421
- _: 1
10422
- })) : createCommentVNode("", true),
10423
- createVNode(_component_ux_button, {
10424
- icon: "",
10425
- onClick: withModifiers($options.clear, ["stop", "prevent"])
10426
- }, {
10427
- default: withCtx(() => [
10428
- createVNode(_component_ux_icon, { icon: "fa-times" })
10429
- ]),
10430
- _: 1
10431
- }, 8, ["onClick"])
10432
- ]),
10433
- _: 1
10434
- }, 8, ["item"])
10435
- ])) : createCommentVNode("", true),
10396
+ $options.showList ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
10397
+ _ctx.multiValue ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
10398
+ _ctx.model && _ctx.model.length ? (openBlock(), createBlock(_component_draggable, {
10399
+ key: 0,
10400
+ class: "items",
10401
+ modelValue: _ctx.model,
10402
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model = $event)
10403
+ }, {
10404
+ item: withCtx(({ element, index: index2 }) => [
10405
+ (openBlock(), createBlock(_component_item, {
10406
+ key: element._id,
10407
+ item: element
10408
+ }, {
10409
+ actions: withCtx(() => [
10410
+ $options.canEdit(element) ? (openBlock(), createBlock(_component_ux_button, {
10411
+ key: 0,
10412
+ icon: "",
10413
+ onClick: withModifiers(($event) => $options.edit(element), ["stop", "prevent"])
10414
+ }, {
10415
+ default: withCtx(() => [
10416
+ createVNode(_component_ux_icon, { icon: "fa-pencil" })
10417
+ ]),
10418
+ _: 2
10419
+ }, 1032, ["onClick"])) : createCommentVNode("", true),
10420
+ createVNode(_component_ux_button, {
10421
+ icon: "",
10422
+ onClick: withModifiers(($event) => _ctx.remove(element), ["stop", "prevent"])
10423
+ }, {
10424
+ default: withCtx(() => [
10425
+ createVNode(_component_ux_icon, { icon: "fa-times" })
10426
+ ]),
10427
+ _: 2
10428
+ }, 1032, ["onClick"])
10429
+ ]),
10430
+ _: 2
10431
+ }, 1032, ["item"]))
10432
+ ]),
10433
+ _: 1
10434
+ }, 8, ["modelValue"])) : createCommentVNode("", true)
10435
+ ], 64)) : _ctx.model ? (openBlock(), createElementBlock("div", _hoisted_4$n, [
10436
+ createVNode(_component_item, { item: _ctx.model }, {
10437
+ actions: withCtx(() => [
10438
+ $options.canEdit(_ctx.model) ? (openBlock(), createBlock(_component_ux_button, {
10439
+ key: 0,
10440
+ icon: "",
10441
+ onClick: _cache[1] || (_cache[1] = withModifiers(($event) => $options.edit(_ctx.model), ["stop", "prevent"]))
10442
+ }, {
10443
+ default: withCtx(() => [
10444
+ createVNode(_component_ux_icon, { icon: "fa-pencil" })
10445
+ ]),
10446
+ _: 1
10447
+ })) : createCommentVNode("", true),
10448
+ createVNode(_component_ux_button, {
10449
+ icon: "",
10450
+ onClick: withModifiers($options.clear, ["stop", "prevent"])
10451
+ }, {
10452
+ default: withCtx(() => [
10453
+ createVNode(_component_ux_icon, { icon: "fa-times" })
10454
+ ]),
10455
+ _: 1
10456
+ }, 8, ["onClick"])
10457
+ ]),
10458
+ _: 1
10459
+ }, 8, ["item"])
10460
+ ])) : createCommentVNode("", true)
10461
+ ], 64)) : createCommentVNode("", true),
10436
10462
  $options.canAdd ? (openBlock(), createBlock(_component_flex_row, {
10437
- key: 4,
10463
+ key: 3,
10438
10464
  gap: ""
10439
10465
  }, {
10440
10466
  default: withCtx(() => [
@@ -10476,7 +10502,7 @@ function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
10476
10502
  })) : createCommentVNode("", true)
10477
10503
  ], 64);
10478
10504
  }
10479
- var ContentSelect = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$D], ["__scopeId", "data-v-60b312d0"]]);
10505
+ var ContentSelect = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$D], ["__scopeId", "data-v-236b5d48"]]);
10480
10506
  var typeSelect_vue_vue_type_style_index_0_scoped_true_lang = "";
10481
10507
  function isUndefined$3(entry) {
10482
10508
  return entry === void 0 || typeof entry === "undefined" || entry === null || String(entry) === "null" || String(entry) === "undefined";
@@ -11574,7 +11600,7 @@ const _sfc_main$v = {
11574
11600
  break;
11575
11601
  default:
11576
11602
  set.push({
11577
- title: entry.titles.join(" > "),
11603
+ title: entry.titles.join(" \u2192 "),
11578
11604
  value: entry.path || entry.key
11579
11605
  });
11580
11606
  break;
@@ -11757,17 +11783,21 @@ const _sfc_main$v = {
11757
11783
  singleReferenceField() {
11758
11784
  return {
11759
11785
  type: "reference",
11760
- referenceType,
11786
+ referenceType: this.referenceType,
11761
11787
  maximum: 1,
11762
- minimum: 1
11788
+ minimum: 1,
11789
+ create: false,
11790
+ list: false
11763
11791
  };
11764
11792
  },
11765
11793
  multiReferenceField() {
11766
11794
  return {
11767
11795
  type: "reference",
11768
- referenceType,
11796
+ referenceType: this.referenceType,
11769
11797
  maximum: 0,
11770
- minimum: 1
11798
+ minimum: 1,
11799
+ create: false,
11800
+ list: false
11771
11801
  };
11772
11802
  }
11773
11803
  },
@@ -11775,7 +11805,8 @@ const _sfc_main$v = {
11775
11805
  components: {
11776
11806
  TextField,
11777
11807
  DateField,
11778
- NativeSelect
11808
+ NativeSelect,
11809
+ ContentSelect
11779
11810
  }
11780
11811
  };
11781
11812
  const _hoisted_1$p = {
@@ -11805,7 +11836,10 @@ function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
11805
11836
  const _component_ux_icon = resolveComponent("ux-icon");
11806
11837
  const _component_ux_button = resolveComponent("ux-button");
11807
11838
  return $data.comparators ? (openBlock(), createElementBlock("div", _hoisted_1$p, [
11808
- createVNode(_component_flex_row, null, {
11839
+ createVNode(_component_flex_row, {
11840
+ gap: "",
11841
+ vcenter: ""
11842
+ }, {
11809
11843
  default: withCtx(() => [
11810
11844
  createVNode(_component_flex_cell, null, {
11811
11845
  default: withCtx(() => [
@@ -12531,12 +12565,12 @@ const _sfc_main$s = {
12531
12565
  },
12532
12566
  watch: {
12533
12567
  "field.referenceType": {
12534
- handler: async function(referenceType2) {
12535
- if (!referenceType2) {
12568
+ handler: async function(referenceType) {
12569
+ if (!referenceType) {
12536
12570
  return this.definition = null;
12537
12571
  }
12538
12572
  var glossary = await this.$sdk.content.glossary({ hash: true });
12539
- this.definition = glossary[referenceType2];
12573
+ this.definition = glossary[referenceType];
12540
12574
  },
12541
12575
  immediate: true
12542
12576
  }
@@ -16612,7 +16646,7 @@ const _sfc_main$b = {
16612
16646
  this.state = STATE_READY;
16613
16647
  this.error = null;
16614
16648
  this.submitAttempted = false;
16615
- self.$emit("reset");
16649
+ this.$emit("reset");
16616
16650
  },
16617
16651
  async submit() {
16618
16652
  const self2 = this;
@@ -16711,7 +16745,7 @@ const _sfc_main$b = {
16711
16745
  }
16712
16746
  }
16713
16747
  };
16714
- const _withScopeId$1 = (n2) => (pushScopeId("data-v-0eb82701"), n2 = n2(), popScopeId(), n2);
16748
+ const _withScopeId$1 = (n2) => (pushScopeId("data-v-5d5b3222"), n2 = n2(), popScopeId(), n2);
16715
16749
  const _hoisted_1$9 = { class: "ux-submission-form" };
16716
16750
  const _hoisted_2$7 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("h3", null, "An error occurred", -1));
16717
16751
  const _hoisted_3$5 = { key: 0 };
@@ -16784,7 +16818,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
16784
16818
  ], 64))
16785
16819
  ]);
16786
16820
  }
16787
- var UXSubmissionForm = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b], ["__scopeId", "data-v-0eb82701"]]);
16821
+ var UXSubmissionForm = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b], ["__scopeId", "data-v-5d5b3222"]]);
16788
16822
  var search_vue_vue_type_style_index_0_scoped_true_lang = "";
16789
16823
  const _sfc_main$a = {
16790
16824
  props: {