cleek 2.3.45 → 2.3.46

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/cleek.es.js CHANGED
@@ -18999,12 +18999,14 @@ const _hoisted_1$4 = ["value"];
18999
18999
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
19000
19000
  props: {
19001
19001
  modelValue: { default: null, type: [Boolean, Number, Object, Array, String] },
19002
- prop: { type: String, default: "name" },
19002
+ prop: { type: String, default: void 0 },
19003
+ reduceKeyProp: { type: String, default: "name" },
19003
19004
  autofocus: { type: Boolean, default: false },
19004
19005
  noDataText: { type: String, default: "No se encontr\xF3 nada" },
19005
19006
  notReduce: { type: Boolean, default: false },
19006
19007
  options: { type: Array, default: () => [] },
19007
- reduceFunction: { type: Function, default: (Option) => Option.id },
19008
+ reduceNameFunction: { type: Function, default: (option) => option.name },
19009
+ reduceKeyFunction: { type: Function, default: (option) => option.id },
19008
19010
  notClearable: { type: Boolean, default: false },
19009
19011
  clearValue: { type: [Boolean, String], default: "auto" },
19010
19012
  searchable: { type: [Boolean, String], default: "auto" },
@@ -19111,17 +19113,16 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
19111
19113
  emits("change", event);
19112
19114
  }
19113
19115
  function getOptionKey(option) {
19114
- return realReduceFunction(option);
19116
+ if (!props.notReduce)
19117
+ props.reduceKeyFunction(option);
19118
+ return option;
19115
19119
  }
19116
19120
  function getOptionName(option) {
19117
- if (!props.prop)
19118
- return option;
19119
- return option[props.prop];
19120
- }
19121
- function realReduceFunction(option) {
19122
- if (props.notReduce)
19123
- return option;
19124
- return props.reduceFunction(option);
19121
+ if (props.prop || props.reduceKeyProp)
19122
+ return option[props.prop || props.reduceKeyProp];
19123
+ if (props.reduceNameFunction)
19124
+ return props.reduceNameFunction(option);
19125
+ return option;
19125
19126
  }
19126
19127
  function setFocus() {
19127
19128
  }
@@ -19159,7 +19160,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
19159
19160
  };
19160
19161
  }
19161
19162
  });
19162
- var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-93db8c36"]]);
19163
+ var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-6793cdee"]]);
19163
19164
  var ckSwitch_vue_vue_type_style_index_0_scoped_true_lang = "";
19164
19165
  const _withScopeId = (n) => (pushScopeId("data-v-7e2f20c4"), n = n(), popScopeId(), n);
19165
19166
  const _hoisted_1$3 = ["disabled"];