@qikdev/vue-ui 0.1.39 → 0.1.42

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.39";
35
+ const version$1 = "0.1.42";
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;
@@ -941,7 +941,7 @@ function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
941
941
  }
942
942
  var UXListItem = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$O], ["__scopeId", "data-v-0e73c260"]]);
943
943
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
944
- var safeJsonStringify$2 = { exports: {} };
944
+ var safeJsonStringify$1 = { exports: {} };
945
945
  var hasProp = Object.prototype.hasOwnProperty;
946
946
  function throwsMessage(err) {
947
947
  return "[Throws: " + (err ? err.message : "?") + "]";
@@ -989,11 +989,11 @@ function ensureProperties(obj) {
989
989
  }
990
990
  return visit(obj);
991
991
  }
992
- safeJsonStringify$2.exports = function(data, replacer, space) {
992
+ safeJsonStringify$1.exports = function(data, replacer, space) {
993
993
  return JSON.stringify(ensureProperties(data), replacer, space);
994
994
  };
995
- safeJsonStringify$2.exports.ensureProperties = ensureProperties;
996
- var safeJsonStringify$1 = safeJsonStringify$2.exports;
995
+ safeJsonStringify$1.exports.ensureProperties = ensureProperties;
996
+ var safeJsonStringify = safeJsonStringify$1.exports;
997
997
  function isUndefined$7(v, type) {
998
998
  return v === void 0 || v === null || type == "date" && v.toString && v.toString() === "Invalid Date";
999
999
  }
@@ -1018,7 +1018,7 @@ var InputMixin = {
1018
1018
  modelValue(val, old) {
1019
1019
  var cleanedValue = this.cleanInput(val);
1020
1020
  var cleanedModel = this.cleanInput(this.model);
1021
- if (safeJsonStringify$1(cleanedValue) != safeJsonStringify$1(cleanedModel)) {
1021
+ if (safeJsonStringify(cleanedValue) != safeJsonStringify(cleanedModel)) {
1022
1022
  this.model = cleanedValue;
1023
1023
  }
1024
1024
  }
@@ -5072,7 +5072,8 @@ const _sfc_main$J = {
5072
5072
  maximum: self2.field.maximum,
5073
5073
  browserOptions: {
5074
5074
  columns: self2.field.columns,
5075
- select: self2.field.select
5075
+ select: self2.field.select,
5076
+ lockFilter: self2.field.lockFilter
5076
5077
  }
5077
5078
  };
5078
5079
  console.log("Modal options", modalOptions);
@@ -5231,7 +5232,7 @@ function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
5231
5232
  }, 8, ["onClick"])
5232
5233
  ], 64);
5233
5234
  }
5234
- var ContentSelect = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$J], ["__scopeId", "data-v-858ab1cc"]]);
5235
+ var ContentSelect = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$J], ["__scopeId", "data-v-41fe69cc"]]);
5235
5236
  var typeSelect_vue_vue_type_style_index_0_scoped_true_lang = "";
5236
5237
  function isUndefined$4(entry) {
5237
5238
  return entry === void 0 || typeof entry === "undefined" || entry === null || String(entry) === "null" || String(entry) === "undefined";
@@ -10023,14 +10024,29 @@ function getDefaultValue(fieldData, currentValue) {
10023
10024
  }
10024
10025
  break;
10025
10026
  case "reference":
10026
- if (multiValue) {
10027
- if (defaultValues.length) {
10028
- output = defaultValues.slice(0, maximum);
10027
+ if (fieldData.widget === "form") {
10028
+ var number = ask;
10029
+ if (multiValue) {
10030
+ if (number > 0) {
10031
+ output = Array(number).fill().map(function() {
10032
+ return {};
10033
+ });
10034
+ } else {
10035
+ output = [];
10036
+ }
10029
10037
  } else {
10030
- output = [];
10038
+ output = isUndefined2(firstDefaultValue) ? {} : firstDefaultValue;
10031
10039
  }
10032
10040
  } else {
10033
- output = isUndefined2(firstDefaultValue) ? void 0 : firstDefaultValue;
10041
+ if (multiValue) {
10042
+ if (defaultValues.length) {
10043
+ output = defaultValues.slice(0, maximum);
10044
+ } else {
10045
+ output = [];
10046
+ }
10047
+ } else {
10048
+ output = isUndefined2(firstDefaultValue) ? void 0 : firstDefaultValue;
10049
+ }
10034
10050
  }
10035
10051
  break;
10036
10052
  case "string":
@@ -10253,7 +10269,6 @@ const _sfc_main$l = {
10253
10269
  this.$emit("field:dirty", this);
10254
10270
  },
10255
10271
  changeString(v) {
10256
- console.log("CHANGE STRING", v);
10257
10272
  this.validateResults = this.$qik.content.validateField(this.fieldModel, this.actualField);
10258
10273
  },
10259
10274
  modelValue(val, old) {
@@ -10724,7 +10739,7 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
10724
10739
  $options.error && $data.validateResults.message ? (openBlock(), createElementBlock("div", _hoisted_1$g, toDisplayString($data.validateResults.message), 1)) : createCommentVNode("", true)
10725
10740
  ], 34)) : createCommentVNode("", true);
10726
10741
  }
10727
- var UXFormField = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$l], ["__scopeId", "data-v-addc0926"]]);
10742
+ var UXFormField = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$l], ["__scopeId", "data-v-54e7b3ce"]]);
10728
10743
  var form_vue_vue_type_style_index_0_scoped_true_lang = "";
10729
10744
  const _sfc_main$k = {
10730
10745
  props: {
@@ -17238,6 +17253,25 @@ const _sfc_main$5 = {
17238
17253
  }
17239
17254
  },
17240
17255
  computed: {
17256
+ combinedFilter() {
17257
+ const self2 = this;
17258
+ let userSelectedFilters = self2.filter;
17259
+ let lockFilter = self2.options.lockFilter;
17260
+ if (!lockFilter) {
17261
+ return userSelectedFilters;
17262
+ }
17263
+ userSelectedFilters = JSON.parse(JSON.stringify(userSelectedFilters));
17264
+ lockFilter = JSON.parse(JSON.stringify(lockFilter));
17265
+ let combinedFilter;
17266
+ if (userSelectedFilters.operator === "and") {
17267
+ combinedFilter = userSelectedFilters;
17268
+ combinedFilter.filters.push(lockFilter);
17269
+ } else {
17270
+ combinedFilter = lockFilter;
17271
+ lockFilter.filters.push(userSelectedFilters);
17272
+ }
17273
+ return combinedFilter;
17274
+ },
17241
17275
  viewMode() {
17242
17276
  var view = this.view;
17243
17277
  switch (view.key) {
@@ -17399,7 +17433,7 @@ const _sfc_main$5 = {
17399
17433
  var search = self2.keywords;
17400
17434
  var select = self2.selectFields;
17401
17435
  var page = self2.page;
17402
- var filter = self2.filter;
17436
+ var filter = self2.combinedFilter;
17403
17437
  return {
17404
17438
  sort: sort2,
17405
17439
  search,
@@ -17533,7 +17567,7 @@ const _sfc_main$5 = {
17533
17567
  };
17534
17568
  }
17535
17569
  };
17536
- const _withScopeId = (n2) => (pushScopeId("data-v-685be52b"), n2 = n2(), popScopeId(), n2);
17570
+ const _withScopeId = (n2) => (pushScopeId("data-v-04072c44"), n2 = n2(), popScopeId(), n2);
17537
17571
  const _hoisted_1$5 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("p", null, null, -1));
17538
17572
  const _hoisted_2$4 = { class: "footer" };
17539
17573
  function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
@@ -17703,7 +17737,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
17703
17737
  _: 3
17704
17738
  })) : createCommentVNode("", true);
17705
17739
  }
17706
- var ContentBrowser = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5], ["__scopeId", "data-v-685be52b"]]);
17740
+ var ContentBrowser = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5], ["__scopeId", "data-v-04072c44"]]);
17707
17741
  var ModalMixin = {
17708
17742
  props: {
17709
17743
  options: {