cleek 2.1.9 → 2.1.10

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
@@ -12622,7 +12622,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
12622
12622
  emits: ["update:modelValue", "cancel", "accept"],
12623
12623
  setup(__props, { emit: emits }) {
12624
12624
  const props = __props;
12625
- const value = computed$2({
12625
+ const isActive = computed$2({
12626
12626
  get() {
12627
12627
  return props.modelValue;
12628
12628
  },
@@ -12631,20 +12631,23 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
12631
12631
  }
12632
12632
  });
12633
12633
  function onCancel() {
12634
+ console.log("onCancel");
12634
12635
  emits("cancel");
12635
12636
  if (!props.preventCloseOnCancel)
12636
- value.value = false;
12637
+ isActive.value = false;
12637
12638
  }
12638
12639
  function onAccept() {
12640
+ console.log("onAccept");
12639
12641
  emits("accept");
12640
12642
  }
12641
12643
  function onBgClick() {
12644
+ console.log("onBgClick");
12642
12645
  if (props.notCloseByBg)
12643
12646
  return;
12644
- value.value = false;
12647
+ isActive.value = false;
12645
12648
  }
12646
12649
  return (_ctx, _cache) => {
12647
- return unref$1(value) ? (openBlock(), createElementBlock("div", _hoisted_1$c, [
12650
+ return unref$1(isActive) ? (openBlock(), createElementBlock("div", _hoisted_1$c, [
12648
12651
  _hoisted_2$6,
12649
12652
  createElementVNode("div", {
12650
12653
  class: "popup-container",
@@ -12662,7 +12665,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
12662
12665
  key: 1,
12663
12666
  class: "mr-3 close",
12664
12667
  icon: "times",
12665
- onClick: _cache[0] || (_cache[0] = ($event) => value.value = false)
12668
+ onClick: _cache[0] || (_cache[0] = ($event) => isActive.value = false)
12666
12669
  })) : createCommentVNode("", true)
12667
12670
  ]),
12668
12671
  createElementVNode("div", _hoisted_5$1, [
@@ -12674,7 +12677,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
12674
12677
  createVNode(ckButton, {
12675
12678
  class: "cancel-button",
12676
12679
  onClick: _cache[1] || (_cache[1] = ($event) => onCancel()),
12677
- color: "danger"
12680
+ color: "danger",
12681
+ type: "flat"
12678
12682
  }, {
12679
12683
  default: withCtx(() => [
12680
12684
  _hoisted_8
@@ -13422,7 +13426,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
13422
13426
  props: {
13423
13427
  search: { type: String, default: void 0 },
13424
13428
  hasColumnsManager: { type: Boolean, default: false },
13425
- hideRefreshBtn: { type: Boolean, required: true },
13429
+ showRefreshBtn: { type: Boolean, required: true },
13426
13430
  hideItemsPerPage: { type: Boolean, required: true },
13427
13431
  currentPage: { type: Number, required: true },
13428
13432
  itemsPerPage: { type: Number, required: true },
@@ -13454,6 +13458,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
13454
13458
  const itemsPerPageIsVisible = computed$2(() => {
13455
13459
  return !props.hideItemsPerPage && props.listLength && props.currentPage;
13456
13460
  });
13461
+ const refreshBtnIsVisible = computed$2(() => {
13462
+ return itemsPerPageIsVisible.value || props.showRefreshBtn;
13463
+ });
13457
13464
  const searchGroupValue = computed$2(() => {
13458
13465
  if (itemsPerPageIsVisible.value && props.hasColumnsManager) {
13459
13466
  return "center";
@@ -13474,7 +13481,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
13474
13481
  }
13475
13482
  return (_ctx, _cache) => {
13476
13483
  return openBlock(), createElementBlock("div", _hoisted_1$5, [
13477
- !__props.hideRefreshBtn ? (openBlock(), createBlock(ckButton, {
13484
+ unref$1(refreshBtnIsVisible) ? (openBlock(), createBlock(ckButton, {
13478
13485
  key: 0,
13479
13486
  type: "flat",
13480
13487
  icon: "redo-alt",
@@ -13506,7 +13513,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
13506
13513
  };
13507
13514
  }
13508
13515
  });
13509
- var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-4f5cca80"]]);
13516
+ var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-15c7bf13"]]);
13510
13517
  var ckTable__pagination_vue_vue_type_style_index_0_scoped_true_lang = "";
13511
13518
  const _hoisted_1$4 = { class: "ck-table__pagination" };
13512
13519
  const _hoisted_2$2 = ["onClick"];
@@ -13731,7 +13738,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
13731
13738
  paginationAlign: { type: String, default: "center", validator: validators.align },
13732
13739
  search: { type: String, default: void 0 },
13733
13740
  hideHeaderActions: { type: Boolean, default: false },
13734
- hideRefreshBtn: { type: Boolean, default: false },
13741
+ showRefreshBtn: { type: Boolean, default: false },
13735
13742
  hideItemsPerPage: { type: Boolean, default: false },
13736
13743
  notFullWidth: { type: Boolean, default: false }
13737
13744
  },
@@ -13802,11 +13809,11 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
13802
13809
  hasColumnsManager: __props.hasColumnsManager,
13803
13810
  itemsPerPage: __props.itemsPerPage,
13804
13811
  listLength: __props.listLength,
13805
- hideRefreshBtn: __props.hideRefreshBtn,
13812
+ showRefreshBtn: __props.showRefreshBtn,
13806
13813
  hideItemsPerPage: __props.hideItemsPerPage,
13807
13814
  onRefreshList: _cache[2] || (_cache[2] = ($event) => refreshList($event)),
13808
13815
  onOpenColumnsManager: _cache[3] || (_cache[3] = ($event) => openColumnsManager())
13809
- }, null, 8, ["search", "currentPage", "hasColumnsManager", "itemsPerPage", "listLength", "hideRefreshBtn", "hideItemsPerPage"])) : createCommentVNode("", true),
13816
+ }, null, 8, ["search", "currentPage", "hasColumnsManager", "itemsPerPage", "listLength", "showRefreshBtn", "hideItemsPerPage"])) : createCommentVNode("", true),
13810
13817
  _ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_3, [
13811
13818
  renderSlot(_ctx.$slots, "header", {}, void 0, true)
13812
13819
  ])) : createCommentVNode("", true)
@@ -13850,7 +13857,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
13850
13857
  };
13851
13858
  }
13852
13859
  });
13853
- var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-a5722810"]]);
13860
+ var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-2c108c86"]]);
13854
13861
  var ckTd_vue_vue_type_style_index_0_scoped_true_lang = "";
13855
13862
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
13856
13863
  props: {