@qikdev/vue-ui 0.1.33 → 0.1.34

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, pushScopeId, popScopeId, createElementVNode, normalizeStyle, createCommentVNode, Teleport, createTextVNode, vModelSelect, withKeys, withModifiers, vModelText, TransitionGroup, defineComponent, h, nextTick, vModelDynamic, vModelCheckbox, mergeProps, toHandlers, reactive, watch } from "vue";
34
34
  import { EventDispatcher } from "@qikdev/sdk";
35
- const version$1 = "0.1.33";
35
+ const version$1 = "0.1.34";
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;
@@ -411,6 +411,12 @@ const _sfc_main$S = {
411
411
  default() {
412
412
  return false;
413
413
  }
414
+ },
415
+ loading: {
416
+ type: Boolean,
417
+ default() {
418
+ return false;
419
+ }
414
420
  }
415
421
  },
416
422
  computed: {
@@ -421,16 +427,27 @@ const _sfc_main$S = {
421
427
  } else {
422
428
  array.push(`ux-switch-false`);
423
429
  }
430
+ if (this.loading) {
431
+ array.push(`ux-switch-loading`);
432
+ }
424
433
  return array;
425
434
  }
426
435
  }
427
436
  };
428
437
  function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
438
+ const _component_ux_icon = resolveComponent("ux-icon");
429
439
  return openBlock(), createElementBlock("a", {
430
440
  class: normalizeClass(["ux-switch", $options.classes])
431
- }, null, 2);
441
+ }, [
442
+ createElementVNode("span", null, [
443
+ createVNode(_component_ux_icon, {
444
+ spin: "",
445
+ icon: "fa-spinner"
446
+ })
447
+ ])
448
+ ], 2);
432
449
  }
433
- var UXSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$S], ["__scopeId", "data-v-7c22b478"]]);
450
+ var UXSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$S], ["__scopeId", "data-v-4063e9b5"]]);
434
451
  var link_vue_vue_type_style_index_0_scoped_true_lang = "";
435
452
  const _sfc_main$R = {
436
453
  props: {
@@ -4984,11 +5001,17 @@ const _sfc_main$G = {
4984
5001
  open() {
4985
5002
  var self2 = this;
4986
5003
  self2.touch();
4987
- self2.$qik.browse(this.field.referenceType, {
5004
+ var modalOptions = {
4988
5005
  field: self2.field,
4989
5006
  model: self2.multiValue ? self2.value : [self2.value].filter(Boolean),
4990
- maximum: self2.field.maximum
4991
- }).then(function(newSelection) {
5007
+ maximum: self2.field.maximum,
5008
+ browserOptions: {
5009
+ columns: self2.field.columns,
5010
+ select: self2.field.select
5011
+ }
5012
+ };
5013
+ console.log("Modal options", modalOptions);
5014
+ self2.$qik.browse(this.field.referenceType, modalOptions).then(function(newSelection) {
4992
5015
  self2.model = self2.multiValue ? newSelection : newSelection[0];
4993
5016
  }).catch(function(err) {
4994
5017
  console.log("Error", err);
@@ -5143,7 +5166,7 @@ function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
5143
5166
  }, 8, ["onClick"])
5144
5167
  ], 64);
5145
5168
  }
5146
- var ContentSelect = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$G], ["__scopeId", "data-v-19e783ac"]]);
5169
+ var ContentSelect = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$G], ["__scopeId", "data-v-858ab1cc"]]);
5147
5170
  var typeSelect_vue_vue_type_style_index_0_scoped_true_lang = "";
5148
5171
  function isUndefined$4(entry) {
5149
5172
  return entry === void 0 || typeof entry === "undefined" || entry === null || String(entry) === "null" || String(entry) === "undefined";
@@ -16931,12 +16954,16 @@ const _sfc_main$5 = {
16931
16954
  return this.definition.plural;
16932
16955
  },
16933
16956
  selectFields() {
16934
- return this.columns.map(function(column) {
16957
+ var fields = this.columns.map(function(column) {
16935
16958
  if (column.fields) {
16936
16959
  return [column.key, ...column.fields];
16937
16960
  }
16938
16961
  return column.key;
16939
16962
  }).flat();
16963
+ if (this.options.select) {
16964
+ fields = [...fields, ...this.options.select];
16965
+ }
16966
+ return fields;
16940
16967
  },
16941
16968
  columns() {
16942
16969
  let columns = [];
@@ -16945,6 +16972,17 @@ const _sfc_main$5 = {
16945
16972
  set[column.key] = 1;
16946
16973
  return set;
16947
16974
  }, {});
16975
+ var augmentColumns = this.options.columns || [];
16976
+ augmentColumns.forEach(function(field) {
16977
+ if (!existingColumns[field.key]) {
16978
+ existingColumns[field.key] = 1;
16979
+ columns.push({
16980
+ title: field.title,
16981
+ key: field.path,
16982
+ type: field.type
16983
+ });
16984
+ }
16985
+ });
16948
16986
  var additionalFields = this.additionalFields;
16949
16987
  additionalFields.forEach(function(field) {
16950
16988
  if (!existingColumns[field.key]) {
@@ -17117,7 +17155,7 @@ const _sfc_main$5 = {
17117
17155
  };
17118
17156
  }
17119
17157
  };
17120
- const _withScopeId = (n2) => (pushScopeId("data-v-41c6f78a"), n2 = n2(), popScopeId(), n2);
17158
+ const _withScopeId = (n2) => (pushScopeId("data-v-3bfbea74"), n2 = n2(), popScopeId(), n2);
17121
17159
  const _hoisted_1$5 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("p", null, null, -1));
17122
17160
  const _hoisted_2$4 = { class: "footer" };
17123
17161
  function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
@@ -17286,7 +17324,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
17286
17324
  _: 3
17287
17325
  })) : createCommentVNode("", true);
17288
17326
  }
17289
- var ContentBrowser = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5], ["__scopeId", "data-v-41c6f78a"]]);
17327
+ var ContentBrowser = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5], ["__scopeId", "data-v-3bfbea74"]]);
17290
17328
  var ModalMixin = {
17291
17329
  props: {
17292
17330
  options: {
@@ -17641,7 +17679,7 @@ const _sfc_main = {
17641
17679
  return this.options.maximum || 0;
17642
17680
  },
17643
17681
  browserOptions() {
17644
- return {};
17682
+ return this.options.browserOptions || {};
17645
17683
  }
17646
17684
  },
17647
17685
  data() {
@@ -17752,7 +17790,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
17752
17790
  _: 1
17753
17791
  });
17754
17792
  }
17755
- var QikContentModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-26046182"]]);
17793
+ var QikContentModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-2efc11d9"]]);
17756
17794
  function device() {
17757
17795
  var service2 = reactive({
17758
17796
  mounted: false,