@qikdev/vue-ui 0.1.32 → 0.1.35

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
@@ -31,9 +31,8 @@ var __objRest = (source, exclude) => {
31
31
  return target;
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
- import { VAceEditor } from "vue3-ace-editor";
35
34
  import { EventDispatcher } from "@qikdev/sdk";
36
- const version$1 = "0.1.32";
35
+ const version$1 = "0.1.35";
37
36
  var flexColumn_vue_vue_type_style_index_0_scoped_true_lang = "";
38
37
  var _export_sfc = (sfc, props2) => {
39
38
  const target = sfc.__vccOpts || sfc;
@@ -412,6 +411,12 @@ const _sfc_main$S = {
412
411
  default() {
413
412
  return false;
414
413
  }
414
+ },
415
+ loading: {
416
+ type: Boolean,
417
+ default() {
418
+ return false;
419
+ }
415
420
  }
416
421
  },
417
422
  computed: {
@@ -422,16 +427,27 @@ const _sfc_main$S = {
422
427
  } else {
423
428
  array.push(`ux-switch-false`);
424
429
  }
430
+ if (this.loading) {
431
+ array.push(`ux-switch-loading`);
432
+ }
425
433
  return array;
426
434
  }
427
435
  }
428
436
  };
429
437
  function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
438
+ const _component_ux_icon = resolveComponent("ux-icon");
430
439
  return openBlock(), createElementBlock("a", {
431
440
  class: normalizeClass(["ux-switch", $options.classes])
432
- }, null, 2);
441
+ }, [
442
+ createElementVNode("span", null, [
443
+ createVNode(_component_ux_icon, {
444
+ spin: "",
445
+ icon: "fa-spinner"
446
+ })
447
+ ])
448
+ ], 2);
433
449
  }
434
- 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"]]);
435
451
  var link_vue_vue_type_style_index_0_scoped_true_lang = "";
436
452
  const _sfc_main$R = {
437
453
  props: {
@@ -484,8 +500,14 @@ const _sfc_main$R = {
484
500
  return array;
485
501
  },
486
502
  element() {
503
+ if (this.nuxtMode) {
504
+ return "a";
505
+ }
506
+ if (this.buildMode) {
507
+ return "a";
508
+ }
487
509
  if (this.to) {
488
- return this.$qik && this.$qik.nuxt ? `a` : `router-link`;
510
+ return `router-link`;
489
511
  } else {
490
512
  return "a";
491
513
  }
@@ -506,7 +528,7 @@ function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
506
528
  _: 3
507
529
  }, 8, ["onClick", "to", "href", "target", "class"]);
508
530
  }
509
- var UXLink = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$R], ["__scopeId", "data-v-0fa2817a"]]);
531
+ var UXLink = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$R], ["__scopeId", "data-v-4ed46cbc"]]);
510
532
  var icon_vue_vue_type_style_index_0_scoped_true_lang = "";
511
533
  const _sfc_main$Q = {
512
534
  props: {
@@ -4985,11 +5007,17 @@ const _sfc_main$G = {
4985
5007
  open() {
4986
5008
  var self2 = this;
4987
5009
  self2.touch();
4988
- self2.$qik.browse(this.field.referenceType, {
5010
+ var modalOptions = {
4989
5011
  field: self2.field,
4990
5012
  model: self2.multiValue ? self2.value : [self2.value].filter(Boolean),
4991
- maximum: self2.field.maximum
4992
- }).then(function(newSelection) {
5013
+ maximum: self2.field.maximum,
5014
+ browserOptions: {
5015
+ columns: self2.field.columns,
5016
+ select: self2.field.select
5017
+ }
5018
+ };
5019
+ console.log("Modal options", modalOptions);
5020
+ self2.$qik.browse(this.field.referenceType, modalOptions).then(function(newSelection) {
4993
5021
  self2.model = self2.multiValue ? newSelection : newSelection[0];
4994
5022
  }).catch(function(err) {
4995
5023
  console.log("Error", err);
@@ -5144,7 +5172,7 @@ function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
5144
5172
  }, 8, ["onClick"])
5145
5173
  ], 64);
5146
5174
  }
5147
- var ContentSelect = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$G], ["__scopeId", "data-v-19e783ac"]]);
5175
+ var ContentSelect = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$G], ["__scopeId", "data-v-858ab1cc"]]);
5148
5176
  var typeSelect_vue_vue_type_style_index_0_scoped_true_lang = "";
5149
5177
  function isUndefined$4(entry) {
5150
5178
  return entry === void 0 || typeof entry === "undefined" || entry === null || String(entry) === "null" || String(entry) === "undefined";
@@ -8693,9 +8721,7 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
8693
8721
  var OptionsManager = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n], ["__scopeId", "data-v-42a51394"]]);
8694
8722
  var codeEditor_vue_vue_type_style_index_0_scoped_true_lang = "";
8695
8723
  const _sfc_main$m = {
8696
- components: {
8697
- VAceEditor
8698
- },
8724
+ components: {},
8699
8725
  methods: {
8700
8726
  editorInit() {
8701
8727
  }
@@ -8748,7 +8774,7 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
8748
8774
  _: 1
8749
8775
  })) : createCommentVNode("", true);
8750
8776
  }
8751
- var CodeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$m], ["__scopeId", "data-v-c8117c2c"]]);
8777
+ var CodeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$m], ["__scopeId", "data-v-38988542"]]);
8752
8778
  var codeEditorField_vue_vue_type_style_index_0_scoped_true_lang = "";
8753
8779
  const _sfc_main$l = {
8754
8780
  components: {
@@ -16934,12 +16960,16 @@ const _sfc_main$5 = {
16934
16960
  return this.definition.plural;
16935
16961
  },
16936
16962
  selectFields() {
16937
- return this.columns.map(function(column) {
16963
+ var fields = this.columns.map(function(column) {
16938
16964
  if (column.fields) {
16939
16965
  return [column.key, ...column.fields];
16940
16966
  }
16941
16967
  return column.key;
16942
16968
  }).flat();
16969
+ if (this.options.select) {
16970
+ fields = [...fields, ...this.options.select];
16971
+ }
16972
+ return fields;
16943
16973
  },
16944
16974
  columns() {
16945
16975
  let columns = [];
@@ -16948,6 +16978,17 @@ const _sfc_main$5 = {
16948
16978
  set[column.key] = 1;
16949
16979
  return set;
16950
16980
  }, {});
16981
+ var augmentColumns = this.options.columns || [];
16982
+ augmentColumns.forEach(function(field) {
16983
+ if (!existingColumns[field.key]) {
16984
+ existingColumns[field.key] = 1;
16985
+ columns.push({
16986
+ title: field.title,
16987
+ key: field.path,
16988
+ type: field.type
16989
+ });
16990
+ }
16991
+ });
16951
16992
  var additionalFields = this.additionalFields;
16952
16993
  additionalFields.forEach(function(field) {
16953
16994
  if (!existingColumns[field.key]) {
@@ -17120,7 +17161,7 @@ const _sfc_main$5 = {
17120
17161
  };
17121
17162
  }
17122
17163
  };
17123
- const _withScopeId = (n2) => (pushScopeId("data-v-41c6f78a"), n2 = n2(), popScopeId(), n2);
17164
+ const _withScopeId = (n2) => (pushScopeId("data-v-3bfbea74"), n2 = n2(), popScopeId(), n2);
17124
17165
  const _hoisted_1$5 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("p", null, null, -1));
17125
17166
  const _hoisted_2$4 = { class: "footer" };
17126
17167
  function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
@@ -17289,7 +17330,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
17289
17330
  _: 3
17290
17331
  })) : createCommentVNode("", true);
17291
17332
  }
17292
- var ContentBrowser = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5], ["__scopeId", "data-v-41c6f78a"]]);
17333
+ var ContentBrowser = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5], ["__scopeId", "data-v-3bfbea74"]]);
17293
17334
  var ModalMixin = {
17294
17335
  props: {
17295
17336
  options: {
@@ -17644,7 +17685,7 @@ const _sfc_main = {
17644
17685
  return this.options.maximum || 0;
17645
17686
  },
17646
17687
  browserOptions() {
17647
- return {};
17688
+ return this.options.browserOptions || {};
17648
17689
  }
17649
17690
  },
17650
17691
  data() {
@@ -17755,7 +17796,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
17755
17796
  _: 1
17756
17797
  });
17757
17798
  }
17758
- var QikContentModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-26046182"]]);
17799
+ var QikContentModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-2efc11d9"]]);
17759
17800
  function device() {
17760
17801
  var service2 = reactive({
17761
17802
  mounted: false,