@qikdev/vue-ui 0.1.83 → 0.1.84

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, vModelText, vModelSelect, withKeys, TransitionGroup, defineComponent, h, nextTick, vModelDynamic, vModelCheckbox, reactive, watch } from "vue";
34
34
  import { EventDispatcher } from "@qikdev/sdk";
35
- const version$1 = "0.1.83";
35
+ const version$1 = "0.1.84";
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;
@@ -6412,6 +6412,9 @@ var safeJsonStringify = safeJsonStringify$1.exports;
6412
6412
  function isUndefined$6(v, type) {
6413
6413
  return v === void 0 || v === null || type == "date" && v.toString && v.toString() === "Invalid Date";
6414
6414
  }
6415
+ function isNotEmpty(value) {
6416
+ return value !== void 0 && value !== null;
6417
+ }
6415
6418
  var InputMixin = {
6416
6419
  props: {
6417
6420
  field: {
@@ -6639,13 +6642,15 @@ var InputMixin = {
6639
6642
  },
6640
6643
  getValue(option2) {
6641
6644
  if (!option2) {
6642
- return;
6645
+ return this.cleanTextInput(option2);
6643
6646
  }
6644
- var value = option2._id || option2.value;
6645
- if (!value && option2.title && !this.returnObject) {
6647
+ var value = this.cleanTextInput(option2._id || option2.value);
6648
+ var hasValue = isNotEmpty(value);
6649
+ if (!hasValue && option2.title && !this.returnObject) {
6646
6650
  value = option2.title;
6647
6651
  }
6648
- return value || option2;
6652
+ value = this.cleanTextInput(value);
6653
+ return isNotEmpty(value) ? value : option2;
6649
6654
  },
6650
6655
  getLabel(option2) {
6651
6656
  if (!option2) {
@@ -6787,7 +6792,9 @@ const _sfc_main$I = {
6787
6792
  }
6788
6793
  } else {
6789
6794
  if (self2.multiValue) {
6790
- val = (val || []).filter(Boolean).map(function(i2) {
6795
+ val = (val || []).filter(function(i2) {
6796
+ return i2 !== void 0 && i2 !== null;
6797
+ }).map(function(i2) {
6791
6798
  return self2.getValue(i2);
6792
6799
  });
6793
6800
  } else {
@@ -6810,13 +6817,27 @@ const _sfc_main$I = {
6810
6817
  val.length = self2.maximum;
6811
6818
  }
6812
6819
  }
6813
- val = val.filter(Boolean).map(function(v) {
6820
+ val = val.filter(function(v) {
6821
+ return v !== void 0 && v !== null;
6822
+ }).map(function(v) {
6814
6823
  var valueKey2 = self2.getValue(v);
6815
6824
  return self2.returnObject ? self2.optionLookup[valueKey2] : valueKey2;
6816
6825
  });
6817
6826
  } else {
6818
6827
  var valueKey = self2.getValue(val);
6819
6828
  val = self2.returnObject ? self2.optionLookup[valueKey] : valueKey;
6829
+ switch (val) {
6830
+ case "":
6831
+ switch (self2.type) {
6832
+ case "decimal":
6833
+ case "float":
6834
+ case "number":
6835
+ case "integer":
6836
+ val = void 0;
6837
+ break;
6838
+ }
6839
+ break;
6840
+ }
6820
6841
  }
6821
6842
  return val;
6822
6843
  }
@@ -6908,7 +6929,7 @@ function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
6908
6929
  ])
6909
6930
  ], 2);
6910
6931
  }
6911
- var NativeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$I], ["__scopeId", "data-v-be09a2cc"]]);
6932
+ var NativeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$I], ["__scopeId", "data-v-a06c20f2"]]);
6912
6933
  var phoneNumberInput_vue_vue_type_style_index_0_scoped_true_lang = "";
6913
6934
  const _sfc_main$H = {
6914
6935
  props: {