cleek 2.4.43 → 2.4.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
@@ -18907,51 +18907,51 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
18907
18907
  setup(__props) {
18908
18908
  const props = __props;
18909
18909
  const computedTdClass = computed$2(() => {
18910
+ var _a, _b, _c;
18910
18911
  const list = [];
18911
- if (props.autoWidth)
18912
+ if (props.autoWidth || ((_a = props.col) == null ? void 0 : _a.autoWidth))
18912
18913
  list.push("auto-width");
18913
- if (props.overflowAuto)
18914
+ if (props.overflowAuto || ((_b = props.col) == null ? void 0 : _b.overflowAuto))
18914
18915
  list.push("overflow-auto");
18915
- if (props.verticalAlign)
18916
- list.push(`vertical-align--${props.verticalAlign}`);
18916
+ const verticalAlign = props.verticalAlign || ((_c = props.col) == null ? void 0 : _c.verticalAlign);
18917
+ if (verticalAlign)
18918
+ list.push(`vertical-align--${verticalAlign}`);
18917
18919
  return list;
18918
18920
  });
18919
18921
  const computedSpanClass = computed$2(() => {
18922
+ var _a, _b, _c;
18920
18923
  const list = [];
18921
- let align;
18922
- if (props.col)
18923
- align = props.col.align;
18924
- if (props.align)
18925
- align = props.align;
18924
+ const align = props.align || ((_a = props.col) == null ? void 0 : _a.align);
18926
18925
  if (align) {
18927
18926
  if (align === "center")
18928
18927
  list.push("align-center");
18929
18928
  if (align === "right")
18930
18929
  list.push("align-right");
18931
18930
  }
18932
- if (props.block)
18931
+ if (props.block || ((_b = props.col) == null ? void 0 : _b.block))
18933
18932
  list.push("block");
18934
- if (props.block)
18933
+ if (props.nowrap || ((_c = props.col) == null ? void 0 : _c.nowrap))
18935
18934
  list.push("no-wrap-text");
18936
18935
  return list;
18937
18936
  });
18938
18937
  const computedStyle = computed$2(() => {
18938
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
18939
18939
  const list = {};
18940
- let minWidth = "";
18941
- if (props.minWidth)
18942
- minWidth = props.minWidth;
18943
- if (props.fixedWidth)
18944
- minWidth = props.fixedWidth;
18940
+ let minWidth;
18941
+ if (props.minWidth || ((_a = props.col) == null ? void 0 : _a.minWidth))
18942
+ minWidth = props.minWidth || ((_b = props.col) == null ? void 0 : _b.minWidth);
18943
+ if (props.fixedWidth || ((_c = props.col) == null ? void 0 : _c.fixedWidth))
18944
+ minWidth = props.fixedWidth || ((_d = props.col) == null ? void 0 : _d.fixedWidth);
18945
18945
  if (minWidth)
18946
18946
  list.minWidth = minWidth;
18947
- let maxWidth = "";
18948
- if (props.maxWidth)
18949
- maxWidth = props.maxWidth;
18950
- if (props.fixedWidth)
18951
- maxWidth = props.fixedWidth;
18947
+ let maxWidth;
18948
+ if (props.maxWidth || ((_e = props.col) == null ? void 0 : _e.maxWidth))
18949
+ maxWidth = props.maxWidth || ((_f = props.col) == null ? void 0 : _f.maxWidth);
18950
+ if (props.fixedWidth || ((_g = props.col) == null ? void 0 : _g.fixedWidth))
18951
+ maxWidth = props.fixedWidth || ((_h = props.col) == null ? void 0 : _h.fixedWidth);
18952
18952
  if (maxWidth)
18953
18953
  list.maxWidth = maxWidth;
18954
- if (props.maxHeight)
18954
+ if (props.maxHeight || ((_i = props.col) == null ? void 0 : _i.maxHeight))
18955
18955
  list.maxHeight = props.maxHeight;
18956
18956
  return list;
18957
18957
  });
@@ -18979,7 +18979,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
18979
18979
  };
18980
18980
  }
18981
18981
  });
18982
- var CkTd = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-7f4cf041"]]);
18982
+ var CkTd = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-eb135f78"]]);
18983
18983
  var axios$2 = { exports: {} };
18984
18984
  var bind$2 = function bind2(fn, thisArg) {
18985
18985
  return function wrap() {
@@ -21051,6 +21051,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
21051
21051
  align: null,
21052
21052
  layout: null,
21053
21053
  borderColor: null,
21054
+ capitalize: { type: Boolean },
21054
21055
  autoSelect: { type: Boolean },
21055
21056
  delayChangeTime: null
21056
21057
  },
@@ -21068,6 +21069,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
21068
21069
  return props.modelValue;
21069
21070
  },
21070
21071
  set(val) {
21072
+ if (props.capitalize)
21073
+ val = qmStr.capitalize(`${val}`);
21071
21074
  emits("update:modelValue", val);
21072
21075
  checkSearchTime(val);
21073
21076
  }
@@ -21210,7 +21213,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
21210
21213
  };
21211
21214
  }
21212
21215
  });
21213
- var CkInput = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-4a21992c"]]);
21216
+ var CkInput = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-3dd03536"]]);
21214
21217
  var ckTable__headerItems_vue_vue_type_style_index_0_scoped_true_lang = "";
21215
21218
  const _sfc_main$g = /* @__PURE__ */ defineComponent({
21216
21219
  props: {
@@ -22778,7 +22781,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
22778
22781
  class: normalizeClass(["ck-table__table", unref$1(computedClassTable)])
22779
22782
  }, [
22780
22783
  unref$1(filteredColumnsList).length && !(_ctx.$slots.mobile && unref$1(isMobileVisible)) ? (openBlock(), createElementBlock("thead", _hoisted_4$4, [
22781
- createVNode(CkTr, null, {
22784
+ createVNode(CkTr, { class: "header-row" }, {
22782
22785
  default: withCtx(() => [
22783
22786
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref$1(filteredColumnsList), (col) => {
22784
22787
  return openBlock(), createBlock(_sfc_main$l, {
@@ -22832,7 +22835,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
22832
22835
  };
22833
22836
  }
22834
22837
  });
22835
- var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-02337344"]]);
22838
+ var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-64f91af6"]]);
22836
22839
  var ckChip_vue_vue_type_style_index_0_scoped_true_lang = "";
22837
22840
  const _hoisted_1$9 = ["color"];
22838
22841
  const _sfc_main$a = /* @__PURE__ */ defineComponent({
@@ -23631,24 +23634,35 @@ const _hoisted_2$2 = ["placeholder", "disabled"];
23631
23634
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
23632
23635
  props: {
23633
23636
  modelValue: null,
23634
- label: null,
23635
- labelAlign: null,
23637
+ disabled: { type: Boolean },
23638
+ placeholder: null,
23639
+ resize: { type: [Boolean, String] },
23636
23640
  layout: null,
23637
23641
  borderColor: null,
23638
- placeholder: null,
23639
- disabled: { type: Boolean },
23640
- preventResize: { type: Boolean },
23641
- resize: null
23642
+ group: null,
23643
+ groupVertical: null,
23644
+ borderRadius: null,
23645
+ fontSize: null,
23646
+ width: null,
23647
+ height: null,
23648
+ capitalize: { type: Boolean },
23649
+ autoSelect: { type: Boolean },
23650
+ label: null,
23651
+ labelAlign: null
23642
23652
  },
23643
- emits: ["update:modelValue"],
23653
+ emits: ["update:modelValue", "input", "change", "click"],
23644
23654
  setup(__props, { emit: emits }) {
23645
23655
  const props = __props;
23646
23656
  let cleekOptions2 = ref();
23647
- const value = computed$2({
23657
+ const refTextarea = ref(null);
23658
+ const { windowWidth } = useWindowWidth();
23659
+ const inputValue = computed$2({
23648
23660
  get() {
23649
23661
  return props.modelValue;
23650
23662
  },
23651
23663
  set(val) {
23664
+ if (props.capitalize)
23665
+ val = qmStr.capitalize(val);
23652
23666
  emits("update:modelValue", val);
23653
23667
  }
23654
23668
  });
@@ -23662,6 +23676,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
23662
23676
  if (borderColor && hooks8.isColorTemplateVariable(borderColor)) {
23663
23677
  list.push(`ck-component__border-color--${borderColor}`);
23664
23678
  }
23679
+ list.push(hooks8.getGroupClass(props, windowWidth.value));
23665
23680
  return list;
23666
23681
  });
23667
23682
  const computedStyleTextarea = computed$2(() => {
@@ -23671,10 +23686,31 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
23671
23686
  if (borderColor && !hooks8.isColorTemplateVariable(borderColor)) {
23672
23687
  list.push({ "border-color": borderColor });
23673
23688
  }
23674
- if (props.resize)
23675
- list.push({ resize: props.resize || "both" });
23689
+ if (props.fontSize)
23690
+ list.push({ "font-size": props.fontSize });
23691
+ if (props.borderRadius)
23692
+ list.push({ "border-radius": props.borderRadius });
23693
+ if (props.width)
23694
+ list.push({ "width": props.width });
23695
+ if (props.height)
23696
+ list.push({ "height": props.height });
23697
+ const resize = props.resize ? props.resize : "none";
23698
+ if (resize)
23699
+ list.push({ resize: resize || "both" });
23676
23700
  return list;
23677
23701
  });
23702
+ const onClick2 = (event) => {
23703
+ var _a;
23704
+ if (props.autoSelect)
23705
+ (_a = refTextarea.value) == null ? void 0 : _a.select();
23706
+ emits("click", event);
23707
+ };
23708
+ const onInput = (event) => {
23709
+ emits("input", event);
23710
+ };
23711
+ const onChange2 = (event) => {
23712
+ emits("change", event);
23713
+ };
23678
23714
  onMounted(() => {
23679
23715
  cleekOptions2.value = hooks8.getCleekOptions(getCurrentInstance);
23680
23716
  });
@@ -23690,19 +23726,24 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
23690
23726
  _: 1
23691
23727
  }, 8, ["label-align"])) : createCommentVNode("", true),
23692
23728
  withDirectives(createElementVNode("textarea", {
23693
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(value) ? value.value = $event : null),
23729
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(inputValue) ? inputValue.value = $event : null),
23730
+ ref_key: "refTextarea",
23731
+ ref: refTextarea,
23694
23732
  placeholder: __props.placeholder,
23695
23733
  disabled: __props.disabled,
23696
23734
  class: normalizeClass(unref$1(computedClassTextarea)),
23697
- style: normalizeStyle(unref$1(computedStyleTextarea))
23698
- }, null, 14, _hoisted_2$2), [
23699
- [vModelText, unref$1(value)]
23735
+ style: normalizeStyle(unref$1(computedStyleTextarea)),
23736
+ onClick: _cache[1] || (_cache[1] = ($event) => onClick2($event)),
23737
+ onInput: _cache[2] || (_cache[2] = ($event) => onInput($event)),
23738
+ onChange: _cache[3] || (_cache[3] = ($event) => onChange2($event))
23739
+ }, null, 46, _hoisted_2$2), [
23740
+ [vModelText, unref$1(inputValue)]
23700
23741
  ])
23701
23742
  ]);
23702
23743
  };
23703
23744
  }
23704
23745
  });
23705
- var ckTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-6f36045c"]]);
23746
+ var ckTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-6000e5e8"]]);
23706
23747
  var CkConfirm_vue_vue_type_style_index_0_scoped_true_lang = "";
23707
23748
  const _withScopeId = (n) => (pushScopeId("data-v-314de9fc"), n = n(), popScopeId(), n);
23708
23749
  const _hoisted_1$1 = { class: "ck-confirm--background" };
@@ -23826,10 +23867,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23826
23867
  });
23827
23868
  onMounted(() => {
23828
23869
  cleekOptions2.value = hooks8.getCleekOptions(getCurrentInstance);
23829
- console.log("getCurrentInstance", getCurrentInstance);
23830
- console.log("getCurrentInstance", __spreadValues({}, getCurrentInstance));
23831
- console.log("cleekOptions.value", cleekOptions2.value);
23832
- console.log("hooks.getCleekOptions(getCurrentInstance)", hooks8.getCleekOptions(getCurrentInstance));
23833
23870
  setTimeout(() => {
23834
23871
  setTimeout(() => {
23835
23872
  closeCallback.value();
@@ -23863,7 +23900,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23863
23900
  };
23864
23901
  }
23865
23902
  });
23866
- var CkNotifyComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-34060c3d"]]);
23903
+ var CkNotifyComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7c413389"]]);
23867
23904
  const defaultDuration = 2e3;
23868
23905
  var ckNotify = {
23869
23906
  confirmOptions({