cleek 2.4.40 → 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 +56 -61
- package/dist/cleek.umd.js +2 -2
- package/dist/components/ck-chip.vue.d.ts +2 -0
- package/dist/components/ck-popup.vue.d.ts +2 -0
- package/dist/components/ck-table/inner-components/ck-table__header-items.vue.d.ts +2 -2
- package/dist/package-config.d.ts +3 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
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
|
|
21239
|
-
return typeof searchLocal.value
|
|
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":
|
|
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
|
-
|
|
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) ||
|
|
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-
|
|
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" };
|
|
@@ -22335,6 +22335,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
22335
22335
|
acceptButton: { type: Boolean },
|
|
22336
22336
|
acceptBtnText: null,
|
|
22337
22337
|
acceptBtnType: null,
|
|
22338
|
+
cancelButton: { type: Boolean },
|
|
22338
22339
|
cancelBtnText: null,
|
|
22339
22340
|
cancelBtnType: null,
|
|
22340
22341
|
notCloseBtn: { type: Boolean },
|
|
@@ -22498,10 +22499,10 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
22498
22499
|
createElementVNode("div", _hoisted_4$5, [
|
|
22499
22500
|
renderSlot(_ctx.$slots, "default")
|
|
22500
22501
|
]),
|
|
22501
|
-
_ctx.$slots.footer || __props.confirmButtons || __props.acceptButton ? (openBlock(), createElementBlock("div", _hoisted_5$2, [
|
|
22502
|
+
_ctx.$slots.footer || __props.confirmButtons || __props.acceptButton || __props.cancelButton ? (openBlock(), createElementBlock("div", _hoisted_5$2, [
|
|
22502
22503
|
renderSlot(_ctx.$slots, "footer"),
|
|
22503
|
-
__props.confirmButtons || __props.acceptButton ? (openBlock(), createElementBlock("div", _hoisted_6$2, [
|
|
22504
|
-
__props.confirmButtons ? (openBlock(), createBlock(CkButton, {
|
|
22504
|
+
__props.confirmButtons || __props.acceptButton || __props.cancelButton ? (openBlock(), createElementBlock("div", _hoisted_6$2, [
|
|
22505
|
+
__props.confirmButtons || __props.cancelButton ? (openBlock(), createBlock(CkButton, {
|
|
22505
22506
|
key: 0,
|
|
22506
22507
|
class: "cancel-button",
|
|
22507
22508
|
color: "danger",
|
|
@@ -22644,12 +22645,17 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
22644
22645
|
setup(__props, { emit: emits }) {
|
|
22645
22646
|
const props = __props;
|
|
22646
22647
|
let cleekOptions2 = ref();
|
|
22647
|
-
const defaultNoResultsText = "No results found";
|
|
22648
22648
|
const defaultItemsPerPage = 40;
|
|
22649
22649
|
const { windowWidth } = useWindowWidth();
|
|
22650
22650
|
const isPopupActive = ref({
|
|
22651
22651
|
columnsManager: false
|
|
22652
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
|
+
});
|
|
22653
22659
|
const columnsAreObj = computed$2(() => !qmObj.isArray(props.columns || []));
|
|
22654
22660
|
const columnsArray = computed$2(() => {
|
|
22655
22661
|
if (columnsAreObj.value) {
|
|
@@ -22676,7 +22682,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
22676
22682
|
});
|
|
22677
22683
|
const searchLocal = computed$2({
|
|
22678
22684
|
get() {
|
|
22679
|
-
return props.search
|
|
22685
|
+
return props.search;
|
|
22680
22686
|
},
|
|
22681
22687
|
set(val) {
|
|
22682
22688
|
emits("update:search", val);
|
|
@@ -22795,7 +22801,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
22795
22801
|
align: "center"
|
|
22796
22802
|
}, {
|
|
22797
22803
|
default: withCtx(() => [
|
|
22798
|
-
createTextVNode(toDisplayString(__props.noResultsText || defaultNoResultsText), 1)
|
|
22804
|
+
createTextVNode(toDisplayString(__props.noResultsText || unref$1(defaultNoResultsText)), 1)
|
|
22799
22805
|
]),
|
|
22800
22806
|
_: 1
|
|
22801
22807
|
})
|
|
@@ -22826,7 +22832,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
22826
22832
|
};
|
|
22827
22833
|
}
|
|
22828
22834
|
});
|
|
22829
|
-
var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-
|
|
22835
|
+
var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-02337344"]]);
|
|
22830
22836
|
var ckChip_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
22831
22837
|
const _hoisted_1$9 = ["color"];
|
|
22832
22838
|
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
@@ -22834,6 +22840,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
22834
22840
|
size: null,
|
|
22835
22841
|
color: null,
|
|
22836
22842
|
textColor: null,
|
|
22843
|
+
align: null,
|
|
22837
22844
|
icon: null,
|
|
22838
22845
|
iconPack: null
|
|
22839
22846
|
},
|
|
@@ -22843,10 +22850,12 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
22843
22850
|
const defaultColor = "primary";
|
|
22844
22851
|
const defaultSize = "s";
|
|
22845
22852
|
const computedClass = computed$2(() => {
|
|
22846
|
-
|
|
22847
|
-
|
|
22848
|
-
|
|
22849
|
-
|
|
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;
|
|
22850
22859
|
});
|
|
22851
22860
|
const computedStyle = computed$2(() => {
|
|
22852
22861
|
return [];
|
|
@@ -22868,7 +22877,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
22868
22877
|
};
|
|
22869
22878
|
}
|
|
22870
22879
|
});
|
|
22871
|
-
var ckChip = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-
|
|
22880
|
+
var ckChip = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-ad665c4a"]]);
|
|
22872
22881
|
var ckDiv_vue_vue_type_style_index_0_lang = "";
|
|
22873
22882
|
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
22874
22883
|
props: {
|
|
@@ -23695,7 +23704,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
23695
23704
|
});
|
|
23696
23705
|
var ckTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-6f36045c"]]);
|
|
23697
23706
|
var CkConfirm_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
23698
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
23707
|
+
const _withScopeId = (n) => (pushScopeId("data-v-314de9fc"), n = n(), popScopeId(), n);
|
|
23699
23708
|
const _hoisted_1$1 = { class: "ck-confirm--background" };
|
|
23700
23709
|
const _hoisted_2$1 = { class: "ck-confirm" };
|
|
23701
23710
|
const _hoisted_3$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "ck-confirm__icon" }, [
|
|
@@ -23720,22 +23729,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
23720
23729
|
const responseFailure = ref(() => {
|
|
23721
23730
|
});
|
|
23722
23731
|
const defaultTitle = computed$2(() => {
|
|
23723
|
-
|
|
23724
|
-
if (((_a = cleekOptions2.value) == null ? void 0 : _a.lang) === "es")
|
|
23725
|
-
return "\xBFEst\xE1s seguro?";
|
|
23726
|
-
return "\xBFAre you sure?";
|
|
23732
|
+
return "\xBFEst\xE1s seguro?";
|
|
23727
23733
|
});
|
|
23728
23734
|
const defaultAcceptText = computed$2(() => {
|
|
23729
|
-
|
|
23730
|
-
if (((_a = cleekOptions2.value) == null ? void 0 : _a.lang) === "es")
|
|
23731
|
-
return "Aceptar";
|
|
23732
|
-
return "Accept";
|
|
23735
|
+
return "Aceptar";
|
|
23733
23736
|
});
|
|
23734
23737
|
const defaultCancelText = computed$2(() => {
|
|
23735
|
-
|
|
23736
|
-
if (((_a = cleekOptions2.value) == null ? void 0 : _a.lang) === "es")
|
|
23737
|
-
return "Cancelar";
|
|
23738
|
-
return "Cancel";
|
|
23738
|
+
return "Cancelar";
|
|
23739
23739
|
});
|
|
23740
23740
|
function onCancel() {
|
|
23741
23741
|
responseFailure.value();
|
|
@@ -23757,6 +23757,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
23757
23757
|
return (_ctx, _cache) => {
|
|
23758
23758
|
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
23759
23759
|
createElementVNode("div", _hoisted_2$1, [
|
|
23760
|
+
createElementVNode("div", null, "cleekOptions " + toDisplayString(unref$1(cleekOptions2)), 1),
|
|
23760
23761
|
_hoisted_3$1,
|
|
23761
23762
|
createElementVNode("div", _hoisted_4$1, toDisplayString(title.value || unref$1(defaultTitle)), 1),
|
|
23762
23763
|
createElementVNode("div", _hoisted_5, toDisplayString(msg.value), 1),
|
|
@@ -23775,7 +23776,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
23775
23776
|
};
|
|
23776
23777
|
}
|
|
23777
23778
|
});
|
|
23778
|
-
var CkConfirmComponent = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
23779
|
+
var CkConfirmComponent = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-314de9fc"]]);
|
|
23779
23780
|
var CkNotify_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
23780
23781
|
const _hoisted_1 = { class: "ck-notify__container" };
|
|
23781
23782
|
const _hoisted_2 = { class: "ck-notify__title" };
|
|
@@ -23801,17 +23802,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23801
23802
|
const defaultTitle = computed$2(() => {
|
|
23802
23803
|
switch (color.value) {
|
|
23803
23804
|
case "success":
|
|
23804
|
-
|
|
23805
|
-
return "\xC9xito";
|
|
23806
|
-
return "Success";
|
|
23805
|
+
return "\xC9xito";
|
|
23807
23806
|
case "danger":
|
|
23808
|
-
if (lang === "es")
|
|
23809
|
-
return "Error";
|
|
23810
23807
|
return "Error";
|
|
23811
23808
|
case "warning":
|
|
23812
|
-
|
|
23813
|
-
return "Atenci\xF3n";
|
|
23814
|
-
return "Alert";
|
|
23809
|
+
return "Atenci\xF3n";
|
|
23815
23810
|
}
|
|
23816
23811
|
return "";
|
|
23817
23812
|
});
|
|
@@ -23831,9 +23826,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23831
23826
|
});
|
|
23832
23827
|
onMounted(() => {
|
|
23833
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));
|
|
23834
23833
|
setTimeout(() => {
|
|
23835
|
-
|
|
23836
|
-
|
|
23834
|
+
setTimeout(() => {
|
|
23835
|
+
closeCallback.value();
|
|
23836
|
+
}, duration.value);
|
|
23837
|
+
}, 10);
|
|
23837
23838
|
});
|
|
23838
23839
|
return (_ctx, _cache) => {
|
|
23839
23840
|
return isActive.value ? (openBlock(), createBlock(Teleport, {
|
|
@@ -23862,7 +23863,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23862
23863
|
};
|
|
23863
23864
|
}
|
|
23864
23865
|
});
|
|
23865
|
-
var CkNotifyComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
23866
|
+
var CkNotifyComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-34060c3d"]]);
|
|
23866
23867
|
const defaultDuration = 2e3;
|
|
23867
23868
|
var ckNotify = {
|
|
23868
23869
|
confirmOptions({
|
|
@@ -23876,20 +23877,13 @@ var ckNotify = {
|
|
|
23876
23877
|
}
|
|
23877
23878
|
}) {
|
|
23878
23879
|
const tempDiv = document.createElement("div");
|
|
23879
|
-
const instance = createApp(CkConfirmComponent)
|
|
23880
|
-
|
|
23881
|
-
|
|
23882
|
-
|
|
23883
|
-
|
|
23884
|
-
|
|
23885
|
-
|
|
23886
|
-
success();
|
|
23887
|
-
};
|
|
23888
|
-
instance.responseFailure = () => {
|
|
23889
|
-
instance.$el.remove();
|
|
23890
|
-
failure();
|
|
23891
|
-
};
|
|
23892
|
-
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);
|
|
23893
23887
|
},
|
|
23894
23888
|
confirm(msg, success, failure) {
|
|
23895
23889
|
this.confirmOptions({
|
|
@@ -23898,15 +23892,16 @@ var ckNotify = {
|
|
|
23898
23892
|
failure
|
|
23899
23893
|
});
|
|
23900
23894
|
},
|
|
23901
|
-
notify({ text: text2 = "", title = "", color = "", duration =
|
|
23895
|
+
notify({ text: text2 = "", title = "", color = "", duration = 0 }) {
|
|
23902
23896
|
const tempDiv = document.createElement("div");
|
|
23903
|
-
const
|
|
23897
|
+
const app = createApp(CkNotifyComponent);
|
|
23898
|
+
const instance = app.mount(tempDiv);
|
|
23904
23899
|
instance.title = title;
|
|
23905
23900
|
instance.text = text2;
|
|
23906
23901
|
instance.color = color;
|
|
23907
|
-
instance.duration = duration;
|
|
23902
|
+
instance.duration = duration || defaultDuration;
|
|
23908
23903
|
instance.closeCallback = () => {
|
|
23909
|
-
|
|
23904
|
+
app.unmount();
|
|
23910
23905
|
};
|
|
23911
23906
|
},
|
|
23912
23907
|
notifySuccess(text2, title = "") {
|