cleek 2.4.42 → 2.4.43

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
@@ -21235,8 +21235,8 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
21235
21235
  emits("update:search", val);
21236
21236
  }
21237
21237
  });
21238
- const hideSearch = computed$2(() => {
21239
- return typeof searchLocal.value === "undefined";
21238
+ const isSearchVisible = computed$2(() => {
21239
+ return typeof searchLocal.value !== "undefined";
21240
21240
  });
21241
21241
  const itemsPerPageStart = computed$2(() => {
21242
21242
  return (props.currentPage - 1) * props.itemsPerPage + 1;
@@ -21296,9 +21296,9 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
21296
21296
  }, null, 8, ["layout"])) : createCommentVNode("", true),
21297
21297
  unref$1(itemsPerPageIsVisible) ? (openBlock(), createElementBlock("div", {
21298
21298
  key: 1,
21299
- class: normalizeClass(["items-per-page", { "ck-component__group--left": !unref$1(hideSearch) }])
21299
+ class: normalizeClass(["items-per-page", { "ck-component__group--left": unref$1(isSearchVisible) }])
21300
21300
  }, toDisplayString(unref$1(itemsPerPageStart)) + " - " + toDisplayString(unref$1(itemsPerPageEnd)) + " de " + toDisplayString(__props.listLength), 3)) : createCommentVNode("", true),
21301
- !unref$1(hideSearch) ? (openBlock(), createBlock(CkInput, {
21301
+ unref$1(isSearchVisible) ? (openBlock(), createBlock(CkInput, {
21302
21302
  key: 2,
21303
21303
  modelValue: unref$1(searchLocal),
21304
21304
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef$1(searchLocal) ? searchLocal.value = $event : null),
@@ -21313,7 +21313,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
21313
21313
  icon: "columns",
21314
21314
  type: "filled",
21315
21315
  title: "Administrador de columnas",
21316
- group: unref$1(itemsPerPageIsVisible) || !unref$1(hideSearch) ? "right" : "",
21316
+ group: unref$1(itemsPerPageIsVisible) || unref$1(isSearchVisible) ? "right" : "",
21317
21317
  layout: __props.layout,
21318
21318
  onClick: _cache[3] || (_cache[3] = ($event) => emits("openColumnsManager"))
21319
21319
  }, null, 8, ["group", "layout"])) : createCommentVNode("", true)
@@ -21322,7 +21322,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
21322
21322
  };
21323
21323
  }
21324
21324
  });
21325
- var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-af0d0550"]]);
21325
+ var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-4bfc21c8"]]);
21326
21326
  var ckTable__pagination_vue_vue_type_style_index_0_scoped_true_lang = "";
21327
21327
  const _withScopeId$4 = (n) => (pushScopeId("data-v-78fe58de"), n = n(), popScopeId(), n);
21328
21328
  const _hoisted_1$e = { class: "ck-table__pagination" };
@@ -22645,12 +22645,17 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
22645
22645
  setup(__props, { emit: emits }) {
22646
22646
  const props = __props;
22647
22647
  let cleekOptions2 = ref();
22648
- const defaultNoResultsText = "No results found";
22649
22648
  const defaultItemsPerPage = 40;
22650
22649
  const { windowWidth } = useWindowWidth();
22651
22650
  const isPopupActive = ref({
22652
22651
  columnsManager: false
22653
22652
  });
22653
+ const defaultNoResultsText = computed$2(() => {
22654
+ var _a;
22655
+ if (((_a = cleekOptions2.value) == null ? void 0 : _a.lang) === "es")
22656
+ return "No se encontraron resultados";
22657
+ return "No results found";
22658
+ });
22654
22659
  const columnsAreObj = computed$2(() => !qmObj.isArray(props.columns || []));
22655
22660
  const columnsArray = computed$2(() => {
22656
22661
  if (columnsAreObj.value) {
@@ -22677,7 +22682,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
22677
22682
  });
22678
22683
  const searchLocal = computed$2({
22679
22684
  get() {
22680
- return props.search || "";
22685
+ return props.search;
22681
22686
  },
22682
22687
  set(val) {
22683
22688
  emits("update:search", val);
@@ -22796,7 +22801,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
22796
22801
  align: "center"
22797
22802
  }, {
22798
22803
  default: withCtx(() => [
22799
- createTextVNode(toDisplayString(__props.noResultsText || defaultNoResultsText), 1)
22804
+ createTextVNode(toDisplayString(__props.noResultsText || unref$1(defaultNoResultsText)), 1)
22800
22805
  ]),
22801
22806
  _: 1
22802
22807
  })
@@ -22827,7 +22832,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
22827
22832
  };
22828
22833
  }
22829
22834
  });
22830
- var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-6d6258c2"]]);
22835
+ var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-02337344"]]);
22831
22836
  var ckChip_vue_vue_type_style_index_0_scoped_true_lang = "";
22832
22837
  const _hoisted_1$9 = ["color"];
22833
22838
  const _sfc_main$a = /* @__PURE__ */ defineComponent({
@@ -22835,6 +22840,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
22835
22840
  size: null,
22836
22841
  color: null,
22837
22842
  textColor: null,
22843
+ align: null,
22838
22844
  icon: null,
22839
22845
  iconPack: null
22840
22846
  },
@@ -22844,10 +22850,12 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
22844
22850
  const defaultColor = "primary";
22845
22851
  const defaultSize = "s";
22846
22852
  const computedClass = computed$2(() => {
22847
- return [
22848
- `size-${props.size || defaultSize}`,
22849
- `ck-component__bg-color--${props.color || defaultColor}`
22850
- ];
22853
+ const list = [];
22854
+ list.push(`size-${props.size || defaultSize}`);
22855
+ list.push(`ck-component__bg-color--${props.color || defaultColor}`);
22856
+ if (props.align)
22857
+ list.push(`align--${props.align}`);
22858
+ return list;
22851
22859
  });
22852
22860
  const computedStyle = computed$2(() => {
22853
22861
  return [];
@@ -22869,7 +22877,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
22869
22877
  };
22870
22878
  }
22871
22879
  });
22872
- var ckChip = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-65283496"]]);
22880
+ var ckChip = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-ad665c4a"]]);
22873
22881
  var ckDiv_vue_vue_type_style_index_0_lang = "";
22874
22882
  const _sfc_main$9 = /* @__PURE__ */ defineComponent({
22875
22883
  props: {
@@ -23696,7 +23704,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
23696
23704
  });
23697
23705
  var ckTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-6f36045c"]]);
23698
23706
  var CkConfirm_vue_vue_type_style_index_0_scoped_true_lang = "";
23699
- const _withScopeId = (n) => (pushScopeId("data-v-5d01d37a"), n = n(), popScopeId(), n);
23707
+ const _withScopeId = (n) => (pushScopeId("data-v-314de9fc"), n = n(), popScopeId(), n);
23700
23708
  const _hoisted_1$1 = { class: "ck-confirm--background" };
23701
23709
  const _hoisted_2$1 = { class: "ck-confirm" };
23702
23710
  const _hoisted_3$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "ck-confirm__icon" }, [
@@ -23721,22 +23729,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
23721
23729
  const responseFailure = ref(() => {
23722
23730
  });
23723
23731
  const defaultTitle = computed$2(() => {
23724
- var _a;
23725
- if (((_a = cleekOptions2.value) == null ? void 0 : _a.lang) === "es")
23726
- return "\xBFEst\xE1s seguro?";
23727
- return "\xBFAre you sure?";
23732
+ return "\xBFEst\xE1s seguro?";
23728
23733
  });
23729
23734
  const defaultAcceptText = computed$2(() => {
23730
- var _a;
23731
- if (((_a = cleekOptions2.value) == null ? void 0 : _a.lang) === "es")
23732
- return "Aceptar";
23733
- return "Accept";
23735
+ return "Aceptar";
23734
23736
  });
23735
23737
  const defaultCancelText = computed$2(() => {
23736
- var _a;
23737
- if (((_a = cleekOptions2.value) == null ? void 0 : _a.lang) === "es")
23738
- return "Cancelar";
23739
- return "Cancel";
23738
+ return "Cancelar";
23740
23739
  });
23741
23740
  function onCancel() {
23742
23741
  responseFailure.value();
@@ -23758,6 +23757,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
23758
23757
  return (_ctx, _cache) => {
23759
23758
  return openBlock(), createElementBlock("div", _hoisted_1$1, [
23760
23759
  createElementVNode("div", _hoisted_2$1, [
23760
+ createElementVNode("div", null, "cleekOptions " + toDisplayString(unref$1(cleekOptions2)), 1),
23761
23761
  _hoisted_3$1,
23762
23762
  createElementVNode("div", _hoisted_4$1, toDisplayString(title.value || unref$1(defaultTitle)), 1),
23763
23763
  createElementVNode("div", _hoisted_5, toDisplayString(msg.value), 1),
@@ -23776,7 +23776,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
23776
23776
  };
23777
23777
  }
23778
23778
  });
23779
- var CkConfirmComponent = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-5d01d37a"]]);
23779
+ var CkConfirmComponent = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-314de9fc"]]);
23780
23780
  var CkNotify_vue_vue_type_style_index_0_scoped_true_lang = "";
23781
23781
  const _hoisted_1 = { class: "ck-notify__container" };
23782
23782
  const _hoisted_2 = { class: "ck-notify__title" };
@@ -23802,17 +23802,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23802
23802
  const defaultTitle = computed$2(() => {
23803
23803
  switch (color.value) {
23804
23804
  case "success":
23805
- if (lang === "es")
23806
- return "\xC9xito";
23807
- return "Success";
23805
+ return "\xC9xito";
23808
23806
  case "danger":
23809
- if (lang === "es")
23810
- return "Error";
23811
23807
  return "Error";
23812
23808
  case "warning":
23813
- if (lang === "es")
23814
- return "Atenci\xF3n";
23815
- return "Alert";
23809
+ return "Atenci\xF3n";
23816
23810
  }
23817
23811
  return "";
23818
23812
  });
@@ -23832,9 +23826,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23832
23826
  });
23833
23827
  onMounted(() => {
23834
23828
  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));
23835
23833
  setTimeout(() => {
23836
- closeCallback.value();
23837
- }, duration.value);
23834
+ setTimeout(() => {
23835
+ closeCallback.value();
23836
+ }, duration.value);
23837
+ }, 10);
23838
23838
  });
23839
23839
  return (_ctx, _cache) => {
23840
23840
  return isActive.value ? (openBlock(), createBlock(Teleport, {
@@ -23863,7 +23863,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23863
23863
  };
23864
23864
  }
23865
23865
  });
23866
- var CkNotifyComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-04e2d5fe"]]);
23866
+ var CkNotifyComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-34060c3d"]]);
23867
23867
  const defaultDuration = 2e3;
23868
23868
  var ckNotify = {
23869
23869
  confirmOptions({
@@ -23877,20 +23877,13 @@ var ckNotify = {
23877
23877
  }
23878
23878
  }) {
23879
23879
  const tempDiv = document.createElement("div");
23880
- const instance = createApp(CkConfirmComponent).mount(tempDiv);
23881
- instance.title = title;
23882
- instance.msg = msg;
23883
- instance.acceptText = acceptText;
23884
- instance.cancelText = cancelText;
23885
- instance.responseSuccess = () => {
23886
- instance.$el.remove();
23887
- success();
23888
- };
23889
- instance.responseFailure = () => {
23890
- instance.$el.remove();
23891
- failure();
23892
- };
23893
- document.body.appendChild(instance.$el);
23880
+ const instance = createApp(CkConfirmComponent);
23881
+ const instanceMounted = instance.mount(tempDiv);
23882
+ instanceMounted.title = title;
23883
+ instanceMounted.msg = msg;
23884
+ instanceMounted.acceptText = acceptText;
23885
+ instanceMounted.cancelText = cancelText;
23886
+ document.body.appendChild(instanceMounted.$el);
23894
23887
  },
23895
23888
  confirm(msg, success, failure) {
23896
23889
  this.confirmOptions({
@@ -23899,15 +23892,16 @@ var ckNotify = {
23899
23892
  failure
23900
23893
  });
23901
23894
  },
23902
- notify({ text: text2 = "", title = "", color = "", duration = defaultDuration }) {
23895
+ notify({ text: text2 = "", title = "", color = "", duration = 0 }) {
23903
23896
  const tempDiv = document.createElement("div");
23904
- const instance = createApp(CkNotifyComponent).mount(tempDiv);
23897
+ const app = createApp(CkNotifyComponent);
23898
+ const instance = app.mount(tempDiv);
23905
23899
  instance.title = title;
23906
23900
  instance.text = text2;
23907
23901
  instance.color = color;
23908
- instance.duration = duration;
23902
+ instance.duration = duration || defaultDuration;
23909
23903
  instance.closeCallback = () => {
23910
- instance.$el.remove();
23904
+ app.unmount();
23911
23905
  };
23912
23906
  },
23913
23907
  notifySuccess(text2, title = "") {