cleek 2.1.22 → 2.1.23
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 +80 -35
- package/dist/cleek.umd.js +6 -6
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/cleek.es.js
CHANGED
|
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { defineComponent, ref, openBlock, createElementBlock, createElementVNode, renderSlot, normalizeClass, createCommentVNode, computed as computed$2, normalizeStyle, unref as unref$1, watch, h, createBlock, Teleport, createVNode, createTextVNode, toDisplayString, withCtx, onMounted, getCurrentInstance, withDirectives, isRef as isRef$1, vModelDynamic, Fragment, renderList, mergeProps, withKeys, withModifiers, pushScopeId, popScopeId,
|
|
20
|
+
import { defineComponent, ref, openBlock, createElementBlock, createElementVNode, renderSlot, normalizeClass, createCommentVNode, computed as computed$2, normalizeStyle, unref as unref$1, watch, h, createBlock, Teleport, createVNode, createTextVNode, toDisplayString, withCtx, onMounted, getCurrentInstance, nextTick as nextTick$1, onBeforeUnmount, withDirectives, isRef as isRef$1, vModelDynamic, Fragment, renderList, mergeProps, withKeys, withModifiers, pushScopeId, popScopeId, vModelRadio, vModelSelect, vModelCheckbox, vModelText } from "vue";
|
|
21
21
|
var ckDropdown_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
22
22
|
var _export_sfc = (sfc, props) => {
|
|
23
23
|
const target = sfc.__vccOpts || sfc;
|
|
@@ -11292,7 +11292,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
11292
11292
|
var ckIcon = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-25801d7b"]]);
|
|
11293
11293
|
var ckNotify_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
11294
11294
|
const _hoisted_1$j = { class: "ck-notify__container" };
|
|
11295
|
-
const _hoisted_2$
|
|
11295
|
+
const _hoisted_2$8 = { class: "ck-notify__title" };
|
|
11296
11296
|
const _hoisted_3$6 = { class: "close-btn" };
|
|
11297
11297
|
const _hoisted_4$4 = { class: "ck-notify__text" };
|
|
11298
11298
|
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
@@ -11345,7 +11345,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
11345
11345
|
style: normalizeStyle({ "background-color": globalColor.value }),
|
|
11346
11346
|
onClick: _cache[0] || (_cache[0] = ($event) => closeNotification())
|
|
11347
11347
|
}, [
|
|
11348
|
-
createElementVNode("div", _hoisted_2$
|
|
11348
|
+
createElementVNode("div", _hoisted_2$8, [
|
|
11349
11349
|
createElementVNode("div", _hoisted_3$6, [
|
|
11350
11350
|
createVNode(ckIcon, { icon: "times" })
|
|
11351
11351
|
]),
|
|
@@ -11450,16 +11450,43 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
11450
11450
|
});
|
|
11451
11451
|
var functions = {
|
|
11452
11452
|
getGroupClass({ group = "", groupVertical = "", groupBreak = "" } = {}) {
|
|
11453
|
-
const _screenSize = "";
|
|
11454
|
-
if (groupBreak && groupBreak === _screenSize)
|
|
11455
|
-
return [];
|
|
11456
11453
|
const classList2 = [];
|
|
11457
11454
|
if (group)
|
|
11458
11455
|
classList2.push(`ck-component__group--${group}`);
|
|
11459
11456
|
if (groupVertical)
|
|
11460
11457
|
classList2.push(`ck-component__group-vertical--${groupVertical}`);
|
|
11458
|
+
if (groupBreak) {
|
|
11459
|
+
if (groupBreak === "s") {
|
|
11460
|
+
classList2.push(`ck-component__group-break--${groupBreak}`);
|
|
11461
|
+
}
|
|
11462
|
+
}
|
|
11463
|
+
return classList2;
|
|
11464
|
+
},
|
|
11465
|
+
getGroupClassContainer({ groupBreak = "" } = "") {
|
|
11466
|
+
const classList2 = [];
|
|
11467
|
+
if (groupBreak) {
|
|
11468
|
+
if (groupBreak === "s") {
|
|
11469
|
+
classList2.push(`ck-component__group-break-container--${groupBreak}`);
|
|
11470
|
+
}
|
|
11471
|
+
}
|
|
11461
11472
|
return classList2;
|
|
11462
11473
|
},
|
|
11474
|
+
getGroupBreakStyleContainer({ groupBreak } = {}, windowWidth) {
|
|
11475
|
+
if (windowWidth <= groupBreak) {
|
|
11476
|
+
return [
|
|
11477
|
+
{ width: "100%" }
|
|
11478
|
+
];
|
|
11479
|
+
}
|
|
11480
|
+
},
|
|
11481
|
+
getGroupBreakStyle({ groupBreak } = {}, windowWidth) {
|
|
11482
|
+
if (windowWidth <= groupBreak) {
|
|
11483
|
+
return [
|
|
11484
|
+
{ width: "100%" },
|
|
11485
|
+
{ borderRadius: "4px !important" },
|
|
11486
|
+
{ border: "1px solid #DAE1E7 !important" }
|
|
11487
|
+
];
|
|
11488
|
+
}
|
|
11489
|
+
},
|
|
11463
11490
|
isColorTemplateVariable(color) {
|
|
11464
11491
|
if (color === "primary")
|
|
11465
11492
|
return true;
|
|
@@ -11488,7 +11515,6 @@ var functions = {
|
|
|
11488
11515
|
return true;
|
|
11489
11516
|
},
|
|
11490
11517
|
getCleekOptions(getCurrentInstance2) {
|
|
11491
|
-
console.log("getCurrentInstance", getCurrentInstance2);
|
|
11492
11518
|
return getCurrentInstance2().appContext.app.config.globalProperties.$cleekOptions;
|
|
11493
11519
|
}
|
|
11494
11520
|
};
|
|
@@ -11600,9 +11626,26 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
11600
11626
|
}
|
|
11601
11627
|
});
|
|
11602
11628
|
var ckLabel = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-ef74ea02"]]);
|
|
11629
|
+
function useWindowWidth() {
|
|
11630
|
+
const windowWidth = ref(0);
|
|
11631
|
+
function handleWindowResize(event) {
|
|
11632
|
+
windowWidth.value = event.currentTarget.innerWidth;
|
|
11633
|
+
}
|
|
11634
|
+
onMounted(() => {
|
|
11635
|
+
nextTick$1(() => {
|
|
11636
|
+
window.addEventListener("resize", handleWindowResize);
|
|
11637
|
+
});
|
|
11638
|
+
windowWidth.value = window.innerWidth;
|
|
11639
|
+
});
|
|
11640
|
+
onBeforeUnmount(() => {
|
|
11641
|
+
window.removeEventListener("resize", handleWindowResize);
|
|
11642
|
+
});
|
|
11643
|
+
return {
|
|
11644
|
+
windowWidth
|
|
11645
|
+
};
|
|
11646
|
+
}
|
|
11603
11647
|
var ckInput_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
11604
|
-
const _hoisted_1$e =
|
|
11605
|
-
const _hoisted_2$8 = ["autocomplete", "type", "placeholder", "id", "disabled"];
|
|
11648
|
+
const _hoisted_1$e = ["autocomplete", "type", "placeholder", "disabled"];
|
|
11606
11649
|
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
11607
11650
|
props: {
|
|
11608
11651
|
modelValue: {},
|
|
@@ -11616,7 +11659,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
11616
11659
|
iconPack: { type: String, default: void 0 },
|
|
11617
11660
|
iconRight: { type: String, default: void 0 },
|
|
11618
11661
|
group: { type: String, default: void 0 },
|
|
11619
|
-
groupBreak: { type: String, default: "
|
|
11662
|
+
groupBreak: { type: String, default: "" },
|
|
11620
11663
|
groupVertical: { type: String, default: void 0 },
|
|
11621
11664
|
hideBorder: { type: Boolean, default: false },
|
|
11622
11665
|
width: { type: String, default: void 0 },
|
|
@@ -11626,6 +11669,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
11626
11669
|
emits: ["update:modelValue", "click", "input", "change"],
|
|
11627
11670
|
setup(__props, { expose, emit: emits }) {
|
|
11628
11671
|
const props = __props;
|
|
11672
|
+
const { windowWidth } = useWindowWidth();
|
|
11629
11673
|
expose({ setFocus, setSelect });
|
|
11630
11674
|
const realInput = ref(null);
|
|
11631
11675
|
const value = computed$2({
|
|
@@ -11647,10 +11691,9 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
11647
11691
|
const onChange = (event) => {
|
|
11648
11692
|
emits("change", event);
|
|
11649
11693
|
};
|
|
11650
|
-
const
|
|
11694
|
+
const computedClass = computed$2(() => {
|
|
11651
11695
|
const list = [];
|
|
11652
|
-
|
|
11653
|
-
list.push({ width: props.width });
|
|
11696
|
+
list.push(functions.getGroupClassContainer(props));
|
|
11654
11697
|
return list;
|
|
11655
11698
|
});
|
|
11656
11699
|
const computedClassInput = computed$2(() => {
|
|
@@ -11666,6 +11709,18 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
11666
11709
|
list.push("no-border");
|
|
11667
11710
|
return list;
|
|
11668
11711
|
});
|
|
11712
|
+
const computedStyle = computed$2(() => {
|
|
11713
|
+
const list = [];
|
|
11714
|
+
list.push(functions.getGroupBreakStyleContainer(props, windowWidth.value));
|
|
11715
|
+
return list;
|
|
11716
|
+
});
|
|
11717
|
+
const computedStyleInput = computed$2(() => {
|
|
11718
|
+
const list = [];
|
|
11719
|
+
list.push(functions.getGroupBreakStyle(props, windowWidth.value));
|
|
11720
|
+
if (props.width)
|
|
11721
|
+
list.push({ width: props.width });
|
|
11722
|
+
return list;
|
|
11723
|
+
});
|
|
11669
11724
|
function setFocus() {
|
|
11670
11725
|
realInput.value.focus();
|
|
11671
11726
|
}
|
|
@@ -11673,7 +11728,10 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
11673
11728
|
realInput.value.select();
|
|
11674
11729
|
}
|
|
11675
11730
|
return (_ctx, _cache) => {
|
|
11676
|
-
return openBlock(), createElementBlock("div",
|
|
11731
|
+
return openBlock(), createElementBlock("div", {
|
|
11732
|
+
class: normalizeClass(["ck-input", unref$1(computedClass)]),
|
|
11733
|
+
style: normalizeStyle(unref$1(computedStyle))
|
|
11734
|
+
}, [
|
|
11677
11735
|
__props.label ? (openBlock(), createBlock(ckLabel, {
|
|
11678
11736
|
key: 0,
|
|
11679
11737
|
align: __props.labelAlign,
|
|
@@ -11695,17 +11753,16 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
11695
11753
|
ref_key: "realInput",
|
|
11696
11754
|
ref: realInput,
|
|
11697
11755
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(value) ? value.value = $event : null),
|
|
11698
|
-
autocomplete: __props.autocomplete,
|
|
11756
|
+
autocomplete: __props.autocomplete ? "on" : "off",
|
|
11699
11757
|
type: __props.type,
|
|
11700
11758
|
placeholder: __props.placeholder,
|
|
11701
11759
|
class: normalizeClass(unref$1(computedClassInput)),
|
|
11702
11760
|
style: normalizeStyle(unref$1(computedStyleInput)),
|
|
11703
|
-
id: __props.label ? "ck-input" : "",
|
|
11704
11761
|
disabled: __props.disabled,
|
|
11705
11762
|
onChange: _cache[1] || (_cache[1] = ($event) => onChange($event)),
|
|
11706
11763
|
onInput: _cache[2] || (_cache[2] = ($event) => onInput($event)),
|
|
11707
11764
|
onClick: _cache[3] || (_cache[3] = ($event) => onClick($event))
|
|
11708
|
-
}, null, 46,
|
|
11765
|
+
}, null, 46, _hoisted_1$e), [
|
|
11709
11766
|
[vModelDynamic, unref$1(value)]
|
|
11710
11767
|
]),
|
|
11711
11768
|
__props.iconRight ? (openBlock(), createBlock(ckIcon, {
|
|
@@ -11715,11 +11772,11 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
11715
11772
|
icon: __props.iconRight,
|
|
11716
11773
|
"icon-pack": __props.iconPack
|
|
11717
11774
|
}, null, 8, ["icon", "icon-pack"])) : createCommentVNode("", true)
|
|
11718
|
-
]);
|
|
11775
|
+
], 6);
|
|
11719
11776
|
};
|
|
11720
11777
|
}
|
|
11721
11778
|
});
|
|
11722
|
-
var ckInput = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-
|
|
11779
|
+
var ckInput = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-459e2aaf"]]);
|
|
11723
11780
|
var ckTable__headerItems_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
11724
11781
|
const _hoisted_1$d = { class: "ck-table__header-items" };
|
|
11725
11782
|
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
@@ -11813,7 +11870,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
11813
11870
|
};
|
|
11814
11871
|
}
|
|
11815
11872
|
});
|
|
11816
|
-
var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-
|
|
11873
|
+
var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-be0cc8e8"]]);
|
|
11817
11874
|
var ckTable__pagination_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
11818
11875
|
const _hoisted_1$c = { class: "ck-table__pagination" };
|
|
11819
11876
|
const _hoisted_2$7 = ["onClick"];
|
|
@@ -13282,6 +13339,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
13282
13339
|
setup(__props, { emit: emits }) {
|
|
13283
13340
|
const props = __props;
|
|
13284
13341
|
const { qmObj: qmObj2 } = main$1;
|
|
13342
|
+
const { windowWidth } = useWindowWidth();
|
|
13285
13343
|
const IsPopupActive = ref({
|
|
13286
13344
|
columnsManager: false
|
|
13287
13345
|
});
|
|
@@ -13317,7 +13375,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
13317
13375
|
}
|
|
13318
13376
|
});
|
|
13319
13377
|
const isMobileVisible = computed$2(() => {
|
|
13320
|
-
return
|
|
13378
|
+
return windowWidth.value <= +props.mobileMaxWidth;
|
|
13321
13379
|
});
|
|
13322
13380
|
function refreshList(pageChange = false) {
|
|
13323
13381
|
emits("refreshList", pageChange);
|
|
@@ -13329,19 +13387,6 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
13329
13387
|
console.log("ERROR ck-table", "The columns list should be an object");
|
|
13330
13388
|
}
|
|
13331
13389
|
}
|
|
13332
|
-
const realWindowWidth = ref(0);
|
|
13333
|
-
function handleWindowResize(event) {
|
|
13334
|
-
realWindowWidth.value = event.currentTarget.innerWidth;
|
|
13335
|
-
}
|
|
13336
|
-
onMounted(() => {
|
|
13337
|
-
nextTick$1(() => {
|
|
13338
|
-
window.addEventListener("resize", handleWindowResize);
|
|
13339
|
-
});
|
|
13340
|
-
realWindowWidth.value = window.innerWidth;
|
|
13341
|
-
});
|
|
13342
|
-
onBeforeUnmount(() => {
|
|
13343
|
-
window.removeEventListener("resize", handleWindowResize);
|
|
13344
|
-
});
|
|
13345
13390
|
return (_ctx, _cache) => {
|
|
13346
13391
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
13347
13392
|
__props.hasColumnsManager && unref$1(columnsAreObj) ? (openBlock(), createBlock(TableColumnsManager, {
|
|
@@ -13411,7 +13456,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
13411
13456
|
};
|
|
13412
13457
|
}
|
|
13413
13458
|
});
|
|
13414
|
-
var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-
|
|
13459
|
+
var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-79775e25"]]);
|
|
13415
13460
|
var ckTd_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
13416
13461
|
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
13417
13462
|
props: {
|