cleek 2.0.9 → 2.1.3
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 +103 -43
- package/dist/cleek.umd.js +6 -6
- package/dist/style.css +1 -1
- package/package.json +2 -1
package/dist/cleek.es.js
CHANGED
|
@@ -17,7 +17,61 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { defineComponent, computed as computed$2, watch, h,
|
|
20
|
+
import { defineComponent, ref, openBlock, createElementBlock, createElementVNode, renderSlot, normalizeClass, createCommentVNode, computed as computed$2, watch, h, unref as unref$1, createBlock, onMounted, getCurrentInstance, mergeProps, withKeys, withModifiers, pushScopeId, popScopeId, normalizeStyle, withCtx, createTextVNode, toDisplayString, withDirectives, isRef as isRef$1, vModelDynamic, createVNode, Fragment, renderList, vModelRadio, vModelSelect, vModelCheckbox, vModelText } from "vue";
|
|
21
|
+
var ckDropdown_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
22
|
+
var _export_sfc = (sfc, props) => {
|
|
23
|
+
const target = sfc.__vccOpts || sfc;
|
|
24
|
+
for (const [key, val] of props) {
|
|
25
|
+
target[key] = val;
|
|
26
|
+
}
|
|
27
|
+
return target;
|
|
28
|
+
};
|
|
29
|
+
const _hoisted_1$j = { class: "ck-dropdown" };
|
|
30
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
31
|
+
props: {
|
|
32
|
+
triggerType: { type: String, default: "click" },
|
|
33
|
+
dark: { type: Boolean, default: false }
|
|
34
|
+
},
|
|
35
|
+
setup(__props) {
|
|
36
|
+
const isOpen = ref(false);
|
|
37
|
+
const popperRef = ref(null);
|
|
38
|
+
function openClose() {
|
|
39
|
+
if (isOpen.value)
|
|
40
|
+
return;
|
|
41
|
+
const closeListerner = (event) => {
|
|
42
|
+
if (popperRef.value != event.target)
|
|
43
|
+
isOpen.value = false;
|
|
44
|
+
window.removeEventListener("click", closeListerner);
|
|
45
|
+
};
|
|
46
|
+
setTimeout(() => {
|
|
47
|
+
window.addEventListener("click", closeListerner);
|
|
48
|
+
});
|
|
49
|
+
isOpen.value = true;
|
|
50
|
+
}
|
|
51
|
+
return (_ctx, _cache) => {
|
|
52
|
+
return openBlock(), createElementBlock("div", _hoisted_1$j, [
|
|
53
|
+
createElementVNode("div", {
|
|
54
|
+
class: "ck-dropdown__trigger",
|
|
55
|
+
onClick: _cache[0] || (_cache[0] = ($event) => openClose())
|
|
56
|
+
}, [
|
|
57
|
+
renderSlot(_ctx.$slots, "trigger", {}, void 0, true)
|
|
58
|
+
]),
|
|
59
|
+
isOpen.value ? (openBlock(), createElementBlock("section", {
|
|
60
|
+
key: 0,
|
|
61
|
+
class: normalizeClass(["ck-dropdown__popper", { "ck-dropdown__popper--dark": __props.dark }]),
|
|
62
|
+
ref_key: "popperRef",
|
|
63
|
+
ref: popperRef
|
|
64
|
+
}, [
|
|
65
|
+
createElementVNode("div", {
|
|
66
|
+
class: normalizeClass(["ck-dropdown__popper--arrow", { "ck-dropdown__popper--arrow--dark": __props.dark }])
|
|
67
|
+
}, null, 2),
|
|
68
|
+
renderSlot(_ctx.$slots, "popper", {}, void 0, true)
|
|
69
|
+
], 2)) : createCommentVNode("", true)
|
|
70
|
+
]);
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
var ckDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-64a91fb4"]]);
|
|
21
75
|
var validators = {
|
|
22
76
|
size: (type) => {
|
|
23
77
|
return ["", "xs", "s", "m", "l", "xl"].includes(type);
|
|
@@ -77,6 +131,11 @@ var functions$1 = {
|
|
|
77
131
|
isColumnDisplayed(column) {
|
|
78
132
|
if (column.isDisplayed === false)
|
|
79
133
|
return false;
|
|
134
|
+
if (column.unchangeable) {
|
|
135
|
+
if (column.isDisplayed === true)
|
|
136
|
+
return true;
|
|
137
|
+
return false;
|
|
138
|
+
}
|
|
80
139
|
return true;
|
|
81
140
|
},
|
|
82
141
|
getCleekOptions(getCurrentInstance2) {
|
|
@@ -11203,13 +11262,6 @@ defineComponent({
|
|
|
11203
11262
|
}
|
|
11204
11263
|
});
|
|
11205
11264
|
var ckIcon_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
11206
|
-
var _export_sfc = (sfc, props) => {
|
|
11207
|
-
const target = sfc.__vccOpts || sfc;
|
|
11208
|
-
for (const [key, val] of props) {
|
|
11209
|
-
target[key] = val;
|
|
11210
|
-
}
|
|
11211
|
-
return target;
|
|
11212
|
-
};
|
|
11213
11265
|
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
11214
11266
|
props: {
|
|
11215
11267
|
icon: { type: [String, Array], default: "" },
|
|
@@ -13105,7 +13157,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
13105
13157
|
});
|
|
13106
13158
|
var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-31af160a"]]);
|
|
13107
13159
|
var ckSwitch_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
13108
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
13160
|
+
const _withScopeId = (n) => (pushScopeId("data-v-35213eec"), n = n(), popScopeId(), n);
|
|
13109
13161
|
const _hoisted_1$9 = ["disabled"];
|
|
13110
13162
|
const _hoisted_2$4 = { class: "ck-switch__slider-container" };
|
|
13111
13163
|
const _hoisted_3$2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "ck-switch__slider" }, null, -1));
|
|
@@ -13115,7 +13167,7 @@ const _hoisted_4$1 = {
|
|
|
13115
13167
|
};
|
|
13116
13168
|
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
13117
13169
|
props: {
|
|
13118
|
-
modelValue: { type: Boolean, default: false },
|
|
13170
|
+
modelValue: { type: [Boolean, Number], default: false },
|
|
13119
13171
|
disabled: { type: Boolean, default: false },
|
|
13120
13172
|
outlined: { type: Boolean, default: false },
|
|
13121
13173
|
squared: { type: Boolean, default: false },
|
|
@@ -13192,7 +13244,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
13192
13244
|
};
|
|
13193
13245
|
}
|
|
13194
13246
|
});
|
|
13195
|
-
var ckSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-
|
|
13247
|
+
var ckSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-35213eec"]]);
|
|
13196
13248
|
var ckSwitchOptions_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
13197
13249
|
const _hoisted_1$8 = { class: "ck-switch-options__container-exterior" };
|
|
13198
13250
|
const _hoisted_2$3 = ["onClick"];
|
|
@@ -13309,7 +13361,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
13309
13361
|
};
|
|
13310
13362
|
}
|
|
13311
13363
|
});
|
|
13312
|
-
var ckTh = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-
|
|
13364
|
+
var ckTh = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-c179a3c2"]]);
|
|
13313
13365
|
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
13314
13366
|
props: {
|
|
13315
13367
|
col: { type: Object, required: true }
|
|
@@ -13364,7 +13416,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
13364
13416
|
return value;
|
|
13365
13417
|
});
|
|
13366
13418
|
const itemsPerPageIsVisible = computed$2(() => {
|
|
13367
|
-
return !props.hideItemsPerPage && props.listLength;
|
|
13419
|
+
return !props.hideItemsPerPage && props.listLength && props.currentPage;
|
|
13368
13420
|
});
|
|
13369
13421
|
const searchGroupValue = computed$2(() => {
|
|
13370
13422
|
if (itemsPerPageIsVisible.value && props.hasColumnsManager) {
|
|
@@ -13418,7 +13470,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
13418
13470
|
};
|
|
13419
13471
|
}
|
|
13420
13472
|
});
|
|
13421
|
-
var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-
|
|
13473
|
+
var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-350be915"]]);
|
|
13422
13474
|
var ckTable__pagination_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
13423
13475
|
const _hoisted_1$4 = { class: "ck-table__pagination" };
|
|
13424
13476
|
const _hoisted_2$2 = ["onClick"];
|
|
@@ -13577,12 +13629,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
13577
13629
|
console.log("hoola");
|
|
13578
13630
|
const list = [];
|
|
13579
13631
|
props.columnsArray.forEach((col) => {
|
|
13580
|
-
if (
|
|
13632
|
+
if (!col.unchangeable) {
|
|
13581
13633
|
list.push({
|
|
13582
13634
|
name: col.name,
|
|
13583
13635
|
title: col.title,
|
|
13584
13636
|
value: functions$1.isColumnDisplayed(col)
|
|
13585
13637
|
});
|
|
13638
|
+
}
|
|
13586
13639
|
});
|
|
13587
13640
|
columnsCheckable.value = list;
|
|
13588
13641
|
}
|
|
@@ -13618,7 +13671,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
13618
13671
|
};
|
|
13619
13672
|
}
|
|
13620
13673
|
});
|
|
13621
|
-
var TableColumnsManager = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
13674
|
+
var TableColumnsManager = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-e6aed8c8"]]);
|
|
13622
13675
|
var ckTable_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
13623
13676
|
const _hoisted_1$2 = { class: "ck-table" };
|
|
13624
13677
|
const _hoisted_2 = {
|
|
@@ -13629,7 +13682,7 @@ const _hoisted_3 = {
|
|
|
13629
13682
|
key: 1,
|
|
13630
13683
|
class: "ck-table__header--slot"
|
|
13631
13684
|
};
|
|
13632
|
-
const _hoisted_4 = { class: "ck-table__table" };
|
|
13685
|
+
const _hoisted_4 = { class: "ck-table__table-container" };
|
|
13633
13686
|
const _hoisted_5 = { key: 0 };
|
|
13634
13687
|
const _hoisted_6 = { key: 1 };
|
|
13635
13688
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
@@ -13643,7 +13696,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
13643
13696
|
search: { type: String, default: void 0 },
|
|
13644
13697
|
hideHeaderActions: { type: Boolean, default: false },
|
|
13645
13698
|
hideRefreshBtn: { type: Boolean, default: false },
|
|
13646
|
-
hideItemsPerPage: { type: Boolean, default: false }
|
|
13699
|
+
hideItemsPerPage: { type: Boolean, default: false },
|
|
13700
|
+
notFullWidth: { type: Boolean, default: false }
|
|
13647
13701
|
},
|
|
13648
13702
|
emits: ["refreshList", "update:search", "update:currentPage"],
|
|
13649
13703
|
setup(__props, { emit: emits }) {
|
|
@@ -13721,28 +13775,33 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
13721
13775
|
renderSlot(_ctx.$slots, "header", {}, void 0, true)
|
|
13722
13776
|
])) : createCommentVNode("", true)
|
|
13723
13777
|
])) : createCommentVNode("", true),
|
|
13724
|
-
createElementVNode("
|
|
13725
|
-
|
|
13726
|
-
|
|
13727
|
-
|
|
13728
|
-
|
|
13729
|
-
|
|
13730
|
-
|
|
13731
|
-
|
|
13732
|
-
|
|
13733
|
-
|
|
13734
|
-
|
|
13735
|
-
|
|
13736
|
-
|
|
13737
|
-
|
|
13738
|
-
|
|
13739
|
-
|
|
13740
|
-
|
|
13741
|
-
|
|
13742
|
-
|
|
13743
|
-
|
|
13778
|
+
createElementVNode("div", _hoisted_4, [
|
|
13779
|
+
createElementVNode("table", {
|
|
13780
|
+
class: normalizeClass(["ck-table__table", { "not-full-width": __props.notFullWidth }])
|
|
13781
|
+
}, [
|
|
13782
|
+
unref$1(filteredColumnsList).length ? (openBlock(), createElementBlock("thead", _hoisted_5, [
|
|
13783
|
+
createVNode(ckTr, null, {
|
|
13784
|
+
default: withCtx(() => [
|
|
13785
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref$1(filteredColumnsList), (col) => {
|
|
13786
|
+
return openBlock(), createBlock(_sfc_main$7, {
|
|
13787
|
+
key: col.title,
|
|
13788
|
+
col
|
|
13789
|
+
}, null, 8, ["col"]);
|
|
13790
|
+
}), 128))
|
|
13791
|
+
]),
|
|
13792
|
+
_: 1
|
|
13793
|
+
})
|
|
13794
|
+
])) : createCommentVNode("", true),
|
|
13795
|
+
createElementVNode("tbody", null, [
|
|
13796
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
13797
|
+
]),
|
|
13798
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("tfoot", _hoisted_6, [
|
|
13799
|
+
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
13800
|
+
])) : createCommentVNode("", true)
|
|
13801
|
+
], 2)
|
|
13744
13802
|
]),
|
|
13745
13803
|
createVNode(TablePagination, {
|
|
13804
|
+
class: "ck-table__pagination",
|
|
13746
13805
|
currentPage: unref$1(currentPageLocal),
|
|
13747
13806
|
"onUpdate:currentPage": _cache[4] || (_cache[4] = ($event) => isRef$1(currentPageLocal) ? currentPageLocal.value = $event : null),
|
|
13748
13807
|
itemsPerPage: __props.itemsPerPage,
|
|
@@ -13755,12 +13814,12 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
13755
13814
|
};
|
|
13756
13815
|
}
|
|
13757
13816
|
});
|
|
13758
|
-
var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
13817
|
+
var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-a5722810"]]);
|
|
13759
13818
|
var ckTd_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
13760
13819
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
13761
13820
|
props: {
|
|
13762
13821
|
col: { type: Object, default: void 0 },
|
|
13763
|
-
|
|
13822
|
+
nowrap: { type: Boolean, default: false },
|
|
13764
13823
|
block: { type: Boolean, default: false },
|
|
13765
13824
|
autoWidth: { type: Boolean, default: false },
|
|
13766
13825
|
align: { type: String, default: void 0, validator: validators.align },
|
|
@@ -13792,7 +13851,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
13792
13851
|
if (props.block)
|
|
13793
13852
|
list.push("block");
|
|
13794
13853
|
if (props.block)
|
|
13795
|
-
list.push("wrap-text");
|
|
13854
|
+
list.push("no-wrap-text");
|
|
13796
13855
|
return list;
|
|
13797
13856
|
});
|
|
13798
13857
|
const computedStyle = computed$2(() => {
|
|
@@ -13829,7 +13888,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
13829
13888
|
};
|
|
13830
13889
|
}
|
|
13831
13890
|
});
|
|
13832
|
-
var ckTd = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
13891
|
+
var ckTd = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-47b8a441"]]);
|
|
13833
13892
|
var ckTextarea_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
13834
13893
|
const _hoisted_1$1 = { class: "ck-textarea" };
|
|
13835
13894
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
@@ -16470,6 +16529,7 @@ const unlockScroll = () => {
|
|
|
16470
16529
|
var components = /* @__PURE__ */ Object.freeze({
|
|
16471
16530
|
__proto__: null,
|
|
16472
16531
|
[Symbol.toStringTag]: "Module",
|
|
16532
|
+
ckDropdown,
|
|
16473
16533
|
ckButton,
|
|
16474
16534
|
ckCheckbox,
|
|
16475
16535
|
ckChip,
|
|
@@ -16524,4 +16584,4 @@ const install = function installCleek(app, options) {
|
|
|
16524
16584
|
app.component(componentName, component);
|
|
16525
16585
|
});
|
|
16526
16586
|
};
|
|
16527
|
-
export { events as EVENTS, mitt as EventBus, ckButton, ckCheckbox, ckChip, ckIcon, ckImg, ckInput, ckLabel, _sfc_main$e as ckPopup, ckRadio, ckSelect, ckSwitch, ckSwitchOptions, ckTable, ckTd, ckTextarea, ckTh, ckTooltip, ckTr, install as default, lockScroll, unlockScroll };
|
|
16587
|
+
export { events as EVENTS, mitt as EventBus, ckButton, ckCheckbox, ckChip, ckDropdown, ckIcon, ckImg, ckInput, ckLabel, _sfc_main$e as ckPopup, ckRadio, ckSelect, ckSwitch, ckSwitchOptions, ckTable, ckTd, ckTextarea, ckTh, ckTooltip, ckTr, install as default, lockScroll, unlockScroll };
|