cleek 1.7.9 → 1.7.13

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2021 Ulisses Ferreira
3
+ Copyright (c) 2022 Quantic Onion
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/dist/cleek.es.js CHANGED
@@ -11607,8 +11607,6 @@ const __default__$4 = {
11607
11607
  this.$emit("change", event);
11608
11608
  },
11609
11609
  onClick(event) {
11610
- console.log("autoSelect", this.autoSelect);
11611
- console.log("event", event);
11612
11610
  if (this.autoSelect)
11613
11611
  event.target.select();
11614
11612
  this.$emit("click", event);
@@ -11659,7 +11657,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
11659
11657
  };
11660
11658
  }
11661
11659
  }));
11662
- var ckInputText = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-310c71a8"]]);
11660
+ var ckInputText = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-aee99f3c"]]);
11663
11661
  var ckPopup_vue_vue_type_style_index_0_lang = "";
11664
11662
  const _hoisted_1$b = {
11665
11663
  key: 0,
@@ -11667,25 +11665,31 @@ const _hoisted_1$b = {
11667
11665
  };
11668
11666
  const _hoisted_2$6 = /* @__PURE__ */ createElementVNode("div", { class: "blackout" }, null, -1);
11669
11667
  const _hoisted_3$5 = { class: "ck-popup__slot-header" };
11670
- const _hoisted_4$3 = { class: "ck-popup__slot-body" };
11671
- const _hoisted_5$1 = {
11668
+ const _hoisted_4$3 = {
11669
+ key: 0,
11670
+ class: "ck-popup__title"
11671
+ };
11672
+ const _hoisted_5$1 = { class: "ck-popup__slot-body" };
11673
+ const _hoisted_6$1 = {
11672
11674
  key: 0,
11673
11675
  class: "ck-popup__slot-footer"
11674
11676
  };
11675
- const _hoisted_6 = {
11677
+ const _hoisted_7 = {
11676
11678
  key: 0,
11677
11679
  class: "ck-popup-slot-footer__confirm-buttons"
11678
11680
  };
11679
- const _hoisted_7 = /* @__PURE__ */ createTextVNode("Cancelar");
11680
- const _hoisted_8 = /* @__PURE__ */ createTextVNode("Aceptar");
11681
+ const _hoisted_8 = /* @__PURE__ */ createTextVNode("Cancelar");
11682
+ const _hoisted_9 = /* @__PURE__ */ createTextVNode("Aceptar");
11681
11683
  const __default__$3 = {
11682
11684
  props: {
11683
11685
  modelValue: { type: Boolean },
11686
+ title: { type: String, default: void 0 },
11684
11687
  confirmButtons: { type: Boolean, default: false },
11685
11688
  notCloseBtn: { type: Boolean, default: false },
11686
- notCloseByBg: { type: Boolean, default: false }
11689
+ notCloseByBg: { type: Boolean, default: false },
11690
+ preventCloseOnCancel: { type: Boolean, default: false }
11687
11691
  },
11688
- emits: ["update:modelValue", "cancel", "confirm"],
11692
+ emits: ["update:modelValue", "cancel", "accept"],
11689
11693
  computed: {
11690
11694
  value: {
11691
11695
  get() {
@@ -11699,10 +11703,11 @@ const __default__$3 = {
11699
11703
  methods: {
11700
11704
  onCancel() {
11701
11705
  this.$emit("cancel");
11702
- this.value = false;
11706
+ if (!this.preventCloseOnCancel)
11707
+ this.value = false;
11703
11708
  },
11704
11709
  onAccept() {
11705
- this.$emit("confirm");
11710
+ this.$emit("accept");
11706
11711
  },
11707
11712
  onBgClick() {
11708
11713
  if (this.notCloseByBg)
@@ -11726,27 +11731,28 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
11726
11731
  }, ["stop"]))
11727
11732
  }, [
11728
11733
  createElementVNode("div", _hoisted_3$5, [
11734
+ __props.title ? (openBlock(), createElementBlock("h3", _hoisted_4$3, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
11729
11735
  renderSlot(_ctx.$slots, "header", { class: "ml-3" }),
11730
11736
  !__props.notCloseBtn ? (openBlock(), createBlock(ckIcon, {
11731
- key: 0,
11737
+ key: 1,
11732
11738
  class: "mr-3 close",
11733
11739
  icon: "times",
11734
11740
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.value = false)
11735
11741
  })) : createCommentVNode("", true)
11736
11742
  ]),
11737
- createElementVNode("div", _hoisted_4$3, [
11738
- renderSlot(_ctx.$slots, "body")
11743
+ createElementVNode("div", _hoisted_5$1, [
11744
+ renderSlot(_ctx.$slots, "default")
11739
11745
  ]),
11740
- _ctx.$slots.footer || __props.confirmButtons ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
11746
+ _ctx.$slots.footer || __props.confirmButtons ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
11741
11747
  renderSlot(_ctx.$slots, "footer"),
11742
- __props.confirmButtons ? (openBlock(), createElementBlock("div", _hoisted_6, [
11748
+ __props.confirmButtons ? (openBlock(), createElementBlock("div", _hoisted_7, [
11743
11749
  createVNode(ckButton, {
11744
11750
  class: "cancel-button",
11745
11751
  onClick: _cache[1] || (_cache[1] = ($event) => _ctx.onCancel()),
11746
11752
  color: "danger"
11747
11753
  }, {
11748
11754
  default: withCtx(() => [
11749
- _hoisted_7
11755
+ _hoisted_8
11750
11756
  ]),
11751
11757
  _: 1
11752
11758
  }),
@@ -11754,7 +11760,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
11754
11760
  onClick: _cache[2] || (_cache[2] = ($event) => _ctx.onAccept())
11755
11761
  }, {
11756
11762
  default: withCtx(() => [
11757
- _hoisted_8
11763
+ _hoisted_9
11758
11764
  ]),
11759
11765
  _: 1
11760
11766
  })
@@ -12208,7 +12214,7 @@ function render$6(_ctx, _cache) {
12208
12214
  }
12209
12215
  var ckTr_vue_vue_type_style_index_0_scoped_true_lang = "";
12210
12216
  const _sfc_main$8 = {};
12211
- var ckTr = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", render$6], ["__scopeId", "data-v-c6fe8e88"]]);
12217
+ var ckTr = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", render$6], ["__scopeId", "data-v-1dd12190"]]);
12212
12218
  const _hoisted_1$5 = { class: "ck-th" };
12213
12219
  function render$5(_ctx, _cache, $props, $setup, $data, $options) {
12214
12220
  return openBlock(), createElementBlock("th", _hoisted_1$5, [
@@ -12299,13 +12305,12 @@ const __default__$2 = {
12299
12305
  return (this.currentPage - 1) * this.itemsPerPage + 1;
12300
12306
  },
12301
12307
  itemsPerPageEnd() {
12308
+ console.log("this.currentPage", this.currentPage);
12309
+ console.log("this.itemsPerPage", this.itemsPerPage);
12302
12310
  const value2 = this.currentPage * this.itemsPerPage;
12303
12311
  if (value2 > this.listLength)
12304
12312
  return this.listLength;
12305
12313
  return value2;
12306
- },
12307
- itemsPerPageStart() {
12308
- return (this.currentPage - 1) * this.itemsPerPage + 1;
12309
12314
  }
12310
12315
  }
12311
12316
  };
@@ -12336,7 +12341,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
12336
12341
  };
12337
12342
  }
12338
12343
  }));
12339
- var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-6cf00b9c"]]);
12344
+ var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-5bc62f88"]]);
12340
12345
  var ckTable__pagination_vue_vue_type_style_index_0_scoped_true_lang = "";
12341
12346
  const _hoisted_1$3 = { class: "ck-table__pagination" };
12342
12347
  const _hoisted_2$1 = ["onClick"];
@@ -12418,7 +12423,7 @@ const __default__$1 = {
12418
12423
  const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$1), {
12419
12424
  setup(__props) {
12420
12425
  return (_ctx, _cache) => {
12421
- return __props.currentPage ? (openBlock(), createElementBlock("div", {
12426
+ return __props.currentPage && _ctx.totalPages > 1 ? (openBlock(), createElementBlock("div", {
12422
12427
  key: 0,
12423
12428
  class: normalizeClass(["ck-table__pagination-container", `pagination-align--${__props.align}`])
12424
12429
  }, [
@@ -12463,16 +12468,20 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
12463
12468
  };
12464
12469
  }
12465
12470
  }));
12466
- var TablePagination = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-383a2c93"]]);
12471
+ var TablePagination = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-1338efe2"]]);
12467
12472
  var ckTable_vue_vue_type_style_index_0_scoped_true_lang = "";
12468
12473
  const _hoisted_1$2 = { class: "ck-table" };
12469
12474
  const _hoisted_2 = {
12470
12475
  key: 0,
12471
12476
  class: "ck-table__header"
12472
12477
  };
12473
- const _hoisted_3 = { class: "ck-table__table" };
12474
- const _hoisted_4 = { key: 0 };
12475
- const _hoisted_5 = { key: 1 };
12478
+ const _hoisted_3 = {
12479
+ key: 1,
12480
+ class: "ck-table__header--slot"
12481
+ };
12482
+ const _hoisted_4 = { class: "ck-table__table" };
12483
+ const _hoisted_5 = { key: 0 };
12484
+ const _hoisted_6 = { key: 1 };
12476
12485
  const defaultPaginationAlign = "center";
12477
12486
  const defaultItemsPerPage = 40;
12478
12487
  const __default__ = {
@@ -12511,6 +12520,10 @@ const __default__ = {
12511
12520
  methods: {
12512
12521
  refreshList(pageChange = false) {
12513
12522
  this.$emit("refreshList", pageChange);
12523
+ },
12524
+ testCurrentPage(cosito) {
12525
+ console.log("cosito", cosito);
12526
+ this.$emit("update:currentPage", cosito);
12514
12527
  }
12515
12528
  }
12516
12529
  };
@@ -12519,7 +12532,6 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
12519
12532
  return (_ctx, _cache) => {
12520
12533
  return openBlock(), createElementBlock("div", _hoisted_1$2, [
12521
12534
  _ctx.$slots.header || !__props.hideHeaderActions ? (openBlock(), createElementBlock("div", _hoisted_2, [
12522
- renderSlot(_ctx.$slots, "header", {}, void 0, true),
12523
12535
  !__props.hideHeaderActions ? (openBlock(), createBlock(TableHeaderItems, {
12524
12536
  key: 0,
12525
12537
  search: _ctx.searchLocal,
@@ -12530,10 +12542,13 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
12530
12542
  hideRefreshBtn: __props.hideRefreshBtn,
12531
12543
  hideItemsPerPage: __props.hideItemsPerPage,
12532
12544
  onRefreshList: _cache[1] || (_cache[1] = ($event) => _ctx.refreshList($event))
12533
- }, null, 8, ["search", "currentPage", "itemsPerPage", "listLength", "hideRefreshBtn", "hideItemsPerPage"])) : createCommentVNode("", true)
12545
+ }, null, 8, ["search", "currentPage", "itemsPerPage", "listLength", "hideRefreshBtn", "hideItemsPerPage"])) : createCommentVNode("", true),
12546
+ _ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_3, [
12547
+ renderSlot(_ctx.$slots, "header", {}, void 0, true)
12548
+ ])) : createCommentVNode("", true)
12534
12549
  ])) : createCommentVNode("", true),
12535
- createElementVNode("table", _hoisted_3, [
12536
- __props.columns.length ? (openBlock(), createElementBlock("thead", _hoisted_4, [
12550
+ createElementVNode("table", _hoisted_4, [
12551
+ __props.columns.length ? (openBlock(), createElementBlock("thead", _hoisted_5, [
12537
12552
  createVNode(ckTr, null, {
12538
12553
  default: withCtx(() => [
12539
12554
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (col) => {
@@ -12549,13 +12564,13 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
12549
12564
  createElementVNode("tbody", null, [
12550
12565
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
12551
12566
  ]),
12552
- _ctx.$slots.footer ? (openBlock(), createElementBlock("tfoot", _hoisted_5, [
12567
+ _ctx.$slots.footer ? (openBlock(), createElementBlock("tfoot", _hoisted_6, [
12553
12568
  renderSlot(_ctx.$slots, "footer", {}, void 0, true)
12554
12569
  ])) : createCommentVNode("", true)
12555
12570
  ]),
12556
12571
  createVNode(TablePagination, {
12557
- currentPage: _ctx.currentPageLocal,
12558
- "onUpdate:currentPage": _cache[2] || (_cache[2] = ($event) => isRef(currentPageLocal) ? currentPageLocal.value = $event : null),
12572
+ currentPage: __props.currentPage,
12573
+ "onUpdate:currentPage": _cache[2] || (_cache[2] = ($event) => _ctx.testCurrentPage($event)),
12559
12574
  itemsPerPage: __props.itemsPerPage,
12560
12575
  listLength: __props.listLength,
12561
12576
  align: __props.paginationAlign,
@@ -12565,7 +12580,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
12565
12580
  };
12566
12581
  }
12567
12582
  }));
12568
- var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-0027f3f2"]]);
12583
+ var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-98ca4d56"]]);
12569
12584
  function render$3(_ctx, _cache, $props, $setup, $data, $options) {
12570
12585
  return openBlock(), createElementBlock("td", {
12571
12586
  class: normalizeClass(["ck-td", $options.computedTdClass])
@@ -12621,7 +12636,7 @@ const _sfc_main$2 = {
12621
12636
  }
12622
12637
  }
12623
12638
  };
12624
- var ckTd = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", render$3], ["__scopeId", "data-v-46fcbab5"]]);
12639
+ var ckTd = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", render$3], ["__scopeId", "data-v-1d7f9b49"]]);
12625
12640
  const _hoisted_1$1 = { class: "ck-textarea" };
12626
12641
  function render$2(_ctx, _cache, $props, $setup, $data, $options) {
12627
12642
  const _component_ck_label = resolveComponent("ck-label");