cleek 2.0.3 → 2.0.7
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 +701 -254
- package/dist/cleek.umd.js +6 -6
- package/dist/style.css +1 -1
- package/package.json +2 -2
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, computed, watch, h, resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, createCommentVNode, renderSlot, mergeProps, withKeys, withModifiers, createElementVNode, pushScopeId, popScopeId,
|
|
20
|
+
import { defineComponent, computed, watch, h, resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, createCommentVNode, renderSlot, mergeProps, withKeys, withModifiers, createElementVNode, pushScopeId, popScopeId, unref, normalizeStyle, ref, getCurrentInstance, onMounted, withCtx, createTextVNode, toDisplayString, withDirectives, isRef, vModelDynamic, createVNode, Fragment, renderList, vModelRadio, vModelSelect, vModelCheckbox, vModelText } from "vue";
|
|
21
21
|
var validators = {
|
|
22
22
|
size: (type) => {
|
|
23
23
|
return ["", "xs", "s", "m", "l", "xl"].includes(type);
|
|
@@ -74,8 +74,10 @@ var functions$1 = {
|
|
|
74
74
|
return true;
|
|
75
75
|
return false;
|
|
76
76
|
},
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
isColumnDisplayed(column) {
|
|
78
|
+
if (column.isDisplayed === false)
|
|
79
|
+
return false;
|
|
80
|
+
return true;
|
|
79
81
|
},
|
|
80
82
|
getCleekOptions(getCurrentInstance2) {
|
|
81
83
|
return getCurrentInstance2().appContext.app.config.globalProperties.$cleekOptions;
|
|
@@ -83,7 +85,7 @@ var functions$1 = {
|
|
|
83
85
|
};
|
|
84
86
|
var globalVariables = {
|
|
85
87
|
defaultFailImg: "df",
|
|
86
|
-
imagesFolderPath: "
|
|
88
|
+
imagesFolderPath: "",
|
|
87
89
|
defaultImgBorderColor: "#EEEEEE"
|
|
88
90
|
};
|
|
89
91
|
/*!
|
|
@@ -11205,7 +11207,7 @@ defineComponent({
|
|
|
11205
11207
|
};
|
|
11206
11208
|
}
|
|
11207
11209
|
});
|
|
11208
|
-
function render$
|
|
11210
|
+
function render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11209
11211
|
const _component_font_awesome_icon = resolveComponent("font-awesome-icon");
|
|
11210
11212
|
return openBlock(), createElementBlock("div", {
|
|
11211
11213
|
class: normalizeClass(["ck-icon", $options.computedClass]),
|
|
@@ -11234,7 +11236,7 @@ var _export_sfc = (sfc, props) => {
|
|
|
11234
11236
|
}
|
|
11235
11237
|
return target;
|
|
11236
11238
|
};
|
|
11237
|
-
const _sfc_main$
|
|
11239
|
+
const _sfc_main$l = {
|
|
11238
11240
|
name: "CkIcon",
|
|
11239
11241
|
components: {
|
|
11240
11242
|
FontAwesomeIcon
|
|
@@ -11281,9 +11283,9 @@ const _sfc_main$j = {
|
|
|
11281
11283
|
}
|
|
11282
11284
|
}
|
|
11283
11285
|
};
|
|
11284
|
-
var ckIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11285
|
-
const _hoisted_1$
|
|
11286
|
-
function render$
|
|
11286
|
+
var ckIcon = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", render$a], ["__scopeId", "data-v-77d9963a"]]);
|
|
11287
|
+
const _hoisted_1$i = ["title", "aria-label", "disabled"];
|
|
11288
|
+
function render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11287
11289
|
const _component_ck_icon = resolveComponent("ck-icon");
|
|
11288
11290
|
return openBlock(), createElementBlock("button", {
|
|
11289
11291
|
type: "button",
|
|
@@ -11306,13 +11308,13 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11306
11308
|
icon: $props.iconRight,
|
|
11307
11309
|
"icon-pack": $props.iconPack
|
|
11308
11310
|
}, null, 8, ["icon", "icon-pack"])) : createCommentVNode("", true)
|
|
11309
|
-
], 10, _hoisted_1$
|
|
11311
|
+
], 10, _hoisted_1$i);
|
|
11310
11312
|
}
|
|
11311
11313
|
var ckButton_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
11312
11314
|
const defaultType = "outlined";
|
|
11313
11315
|
const defaultColor = "primary";
|
|
11314
11316
|
const defaultAlign = "left";
|
|
11315
|
-
const _sfc_main$
|
|
11317
|
+
const _sfc_main$k = {
|
|
11316
11318
|
name: "CkButton",
|
|
11317
11319
|
components: {
|
|
11318
11320
|
ckIcon
|
|
@@ -11366,15 +11368,15 @@ const _sfc_main$i = {
|
|
|
11366
11368
|
}
|
|
11367
11369
|
}
|
|
11368
11370
|
};
|
|
11369
|
-
var ckButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11371
|
+
var ckButton = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", render$9], ["__scopeId", "data-v-a687842a"]]);
|
|
11370
11372
|
const _withScopeId$2 = (n) => (pushScopeId("data-v-69dfa524"), n = n(), popScopeId(), n);
|
|
11371
|
-
const _hoisted_1$
|
|
11372
|
-
const _hoisted_2$
|
|
11373
|
+
const _hoisted_1$h = ["disabled", "checked"];
|
|
11374
|
+
const _hoisted_2$8 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", { class: "ck-checkbox__element" }, null, -1));
|
|
11373
11375
|
const _hoisted_3$5 = {
|
|
11374
11376
|
key: 0,
|
|
11375
11377
|
class: "c-Checkbox__label"
|
|
11376
11378
|
};
|
|
11377
|
-
function render$
|
|
11379
|
+
function render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11378
11380
|
return openBlock(), createElementBlock("label", mergeProps({ class: "ck-checkbox" }, $options.checkboxAttributes, {
|
|
11379
11381
|
onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(() => {
|
|
11380
11382
|
}, ["prevent"]), ["space"])),
|
|
@@ -11393,15 +11395,15 @@ function render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11393
11395
|
$options.value = $event.target.checked;
|
|
11394
11396
|
$options.onChange($event);
|
|
11395
11397
|
})
|
|
11396
|
-
}, null, 40, _hoisted_1$
|
|
11397
|
-
_hoisted_2$
|
|
11398
|
+
}, null, 40, _hoisted_1$h),
|
|
11399
|
+
_hoisted_2$8,
|
|
11398
11400
|
_ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_3$5, [
|
|
11399
11401
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
11400
11402
|
])) : createCommentVNode("", true)
|
|
11401
11403
|
], 16);
|
|
11402
11404
|
}
|
|
11403
11405
|
var ckCheckbox_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
11404
|
-
const _sfc_main$
|
|
11406
|
+
const _sfc_main$j = {
|
|
11405
11407
|
name: "CkCheckbox",
|
|
11406
11408
|
props: {
|
|
11407
11409
|
modelValue: { type: Boolean, default: false },
|
|
@@ -11434,14 +11436,58 @@ const _sfc_main$h = {
|
|
|
11434
11436
|
}
|
|
11435
11437
|
}
|
|
11436
11438
|
};
|
|
11437
|
-
var ckCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11439
|
+
var ckCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", render$8], ["__scopeId", "data-v-69dfa524"]]);
|
|
11440
|
+
var ckChip_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
11441
|
+
const _hoisted_1$g = ["color"];
|
|
11442
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
11443
|
+
props: {
|
|
11444
|
+
size: { type: String, default: "s" },
|
|
11445
|
+
color: { type: String, default: "primary" },
|
|
11446
|
+
textColor: { type: String, default: void 0 },
|
|
11447
|
+
icon: { type: String, default: void 0 },
|
|
11448
|
+
iconPack: { type: String, default: void 0 }
|
|
11449
|
+
},
|
|
11450
|
+
emits: ["click"],
|
|
11451
|
+
setup(__props, { emit: emits }) {
|
|
11452
|
+
const props = __props;
|
|
11453
|
+
const computedClass = computed(() => {
|
|
11454
|
+
return [
|
|
11455
|
+
`size-${props.size}`,
|
|
11456
|
+
`ck-component__bg-color--${props.color}`
|
|
11457
|
+
];
|
|
11458
|
+
});
|
|
11459
|
+
const computedStyle = computed(() => {
|
|
11460
|
+
const list = [];
|
|
11461
|
+
if (props.color)
|
|
11462
|
+
;
|
|
11463
|
+
return list;
|
|
11464
|
+
});
|
|
11465
|
+
return (_ctx, _cache) => {
|
|
11466
|
+
return openBlock(), createElementBlock("div", {
|
|
11467
|
+
class: normalizeClass(["ck-chip", unref(computedClass)]),
|
|
11468
|
+
color: __props.color,
|
|
11469
|
+
style: normalizeStyle(unref(computedStyle)),
|
|
11470
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emits("click", $event))
|
|
11471
|
+
}, [
|
|
11472
|
+
__props.icon ? (openBlock(), createBlock(ckIcon, {
|
|
11473
|
+
key: 0,
|
|
11474
|
+
icon: __props.icon,
|
|
11475
|
+
"icon-pack": __props.iconPack
|
|
11476
|
+
}, null, 8, ["icon", "icon-pack"])) : createCommentVNode("", true),
|
|
11477
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
11478
|
+
], 14, _hoisted_1$g);
|
|
11479
|
+
};
|
|
11480
|
+
}
|
|
11481
|
+
});
|
|
11482
|
+
var ckChip = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-73ff343b"]]);
|
|
11438
11483
|
var ckImg_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
11439
|
-
const _hoisted_1$
|
|
11440
|
-
const _sfc_main$
|
|
11484
|
+
const _hoisted_1$f = ["src", "alt"];
|
|
11485
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
11441
11486
|
props: {
|
|
11442
11487
|
src: { type: String, default: "" },
|
|
11443
11488
|
isFullPath: { type: Boolean, default: false },
|
|
11444
11489
|
failImgSrc: { type: String, default: "" },
|
|
11490
|
+
alt: { type: String, default: "" },
|
|
11445
11491
|
size: { type: String, default: "", validator: validators.size },
|
|
11446
11492
|
sizeAbsolute: { type: String, default: "" },
|
|
11447
11493
|
width: { type: String, default: "" },
|
|
@@ -11518,8 +11564,10 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
11518
11564
|
function getImg(src) {
|
|
11519
11565
|
let path = "";
|
|
11520
11566
|
const $cleekOptions = functions$1.getCleekOptions(getCurrentInstance);
|
|
11521
|
-
if ($cleekOptions)
|
|
11522
|
-
|
|
11567
|
+
if ($cleekOptions) {
|
|
11568
|
+
if ($cleekOptions.imgPath)
|
|
11569
|
+
path = $cleekOptions.imgPath;
|
|
11570
|
+
}
|
|
11523
11571
|
return `${path}${src}`;
|
|
11524
11572
|
}
|
|
11525
11573
|
onMounted(() => {
|
|
@@ -11535,24 +11583,25 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
11535
11583
|
createElementVNode("img", {
|
|
11536
11584
|
src: unref(imageUrl),
|
|
11537
11585
|
style: normalizeStyle(unref(computedImgStyle)),
|
|
11586
|
+
alt: __props.alt,
|
|
11538
11587
|
onError: _cache[0] || (_cache[0] = ($event) => altNeeded.value = true)
|
|
11539
|
-
}, null, 44, _hoisted_1$
|
|
11588
|
+
}, null, 44, _hoisted_1$f)
|
|
11540
11589
|
], 6);
|
|
11541
11590
|
};
|
|
11542
11591
|
}
|
|
11543
11592
|
});
|
|
11544
|
-
var ckImg = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11545
|
-
const _hoisted_1$
|
|
11546
|
-
function render$
|
|
11593
|
+
var ckImg = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-53d78f2e"]]);
|
|
11594
|
+
const _hoisted_1$e = ["for"];
|
|
11595
|
+
function render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11547
11596
|
return openBlock(), createElementBlock("label", {
|
|
11548
11597
|
class: normalizeClass(["ck-label", $options.computedClass]),
|
|
11549
11598
|
for: $props.for
|
|
11550
11599
|
}, [
|
|
11551
11600
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
11552
|
-
], 10, _hoisted_1$
|
|
11601
|
+
], 10, _hoisted_1$e);
|
|
11553
11602
|
}
|
|
11554
11603
|
var ckLabel_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
11555
|
-
const _sfc_main$
|
|
11604
|
+
const _sfc_main$g = {
|
|
11556
11605
|
name: "CkLabel",
|
|
11557
11606
|
props: {
|
|
11558
11607
|
for: { type: String, default: "" },
|
|
@@ -11569,11 +11618,11 @@ const _sfc_main$f = {
|
|
|
11569
11618
|
}
|
|
11570
11619
|
}
|
|
11571
11620
|
};
|
|
11572
|
-
var ckLabel = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11621
|
+
var ckLabel = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", render$7], ["__scopeId", "data-v-4b8b9ab4"]]);
|
|
11573
11622
|
var ckInput_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
11574
|
-
const _hoisted_1$
|
|
11575
|
-
const _hoisted_2$
|
|
11576
|
-
const _sfc_main$
|
|
11623
|
+
const _hoisted_1$d = { class: "ck-input" };
|
|
11624
|
+
const _hoisted_2$7 = ["type", "placeholder", "id", "disabled"];
|
|
11625
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
11577
11626
|
props: {
|
|
11578
11627
|
modelValue: {},
|
|
11579
11628
|
type: { type: String, validator: validators.inputType, default: "text" },
|
|
@@ -11634,7 +11683,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
11634
11683
|
return list;
|
|
11635
11684
|
});
|
|
11636
11685
|
return (_ctx, _cache) => {
|
|
11637
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
11686
|
+
return openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
11638
11687
|
__props.label ? (openBlock(), createBlock(ckLabel, {
|
|
11639
11688
|
key: 0,
|
|
11640
11689
|
align: __props.labelAlign,
|
|
@@ -11663,7 +11712,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
11663
11712
|
onChange: _cache[1] || (_cache[1] = ($event) => onChange($event)),
|
|
11664
11713
|
onInput: _cache[2] || (_cache[2] = ($event) => onInput($event)),
|
|
11665
11714
|
onClick: _cache[3] || (_cache[3] = ($event) => onClick($event))
|
|
11666
|
-
}, null, 46, _hoisted_2$
|
|
11715
|
+
}, null, 46, _hoisted_2$7), [
|
|
11667
11716
|
[vModelDynamic, unref(value)]
|
|
11668
11717
|
]),
|
|
11669
11718
|
__props.iconRight ? (openBlock(), createBlock(ckIcon, {
|
|
@@ -11677,15 +11726,15 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
11677
11726
|
};
|
|
11678
11727
|
}
|
|
11679
11728
|
});
|
|
11680
|
-
var ckInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11729
|
+
var ckInput = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-61fababc"]]);
|
|
11681
11730
|
var ckPopup_vue_vue_type_style_index_0_lang = "";
|
|
11682
|
-
const _hoisted_1$
|
|
11731
|
+
const _hoisted_1$c = {
|
|
11683
11732
|
key: 0,
|
|
11684
11733
|
class: "ck-popup"
|
|
11685
11734
|
};
|
|
11686
|
-
const _hoisted_2$
|
|
11735
|
+
const _hoisted_2$6 = /* @__PURE__ */ createElementVNode("div", { class: "blackout" }, null, -1);
|
|
11687
11736
|
const _hoisted_3$4 = { class: "ck-popup__slot-header" };
|
|
11688
|
-
const _hoisted_4$
|
|
11737
|
+
const _hoisted_4$3 = {
|
|
11689
11738
|
key: 0,
|
|
11690
11739
|
class: "ck-popup__title"
|
|
11691
11740
|
};
|
|
@@ -11736,11 +11785,11 @@ const __default__$1 = {
|
|
|
11736
11785
|
}
|
|
11737
11786
|
}
|
|
11738
11787
|
};
|
|
11739
|
-
const _sfc_main$
|
|
11788
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$1), {
|
|
11740
11789
|
setup(__props) {
|
|
11741
11790
|
return (_ctx, _cache) => {
|
|
11742
|
-
return _ctx.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
11743
|
-
_hoisted_2$
|
|
11791
|
+
return _ctx.value ? (openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
11792
|
+
_hoisted_2$6,
|
|
11744
11793
|
createElementVNode("div", {
|
|
11745
11794
|
class: "popup-container",
|
|
11746
11795
|
onClick: _cache[4] || (_cache[4] = ($event) => _ctx.onBgClick())
|
|
@@ -11751,7 +11800,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
11751
11800
|
}, ["stop"]))
|
|
11752
11801
|
}, [
|
|
11753
11802
|
createElementVNode("div", _hoisted_3$4, [
|
|
11754
|
-
__props.title ? (openBlock(), createElementBlock("h3", _hoisted_4$
|
|
11803
|
+
__props.title ? (openBlock(), createElementBlock("h3", _hoisted_4$3, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
|
|
11755
11804
|
renderSlot(_ctx.$slots, "header", { class: "ml-3" }),
|
|
11756
11805
|
!__props.notCloseBtn ? (openBlock(), createBlock(ckIcon, {
|
|
11757
11806
|
key: 1,
|
|
@@ -11793,14 +11842,14 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
11793
11842
|
}
|
|
11794
11843
|
}));
|
|
11795
11844
|
const _withScopeId$1 = (n) => (pushScopeId("data-v-73a891e8"), n = n(), popScopeId(), n);
|
|
11796
|
-
const _hoisted_1$
|
|
11797
|
-
const _hoisted_2$
|
|
11845
|
+
const _hoisted_1$b = ["onKeyup"];
|
|
11846
|
+
const _hoisted_2$5 = ["name", "value", "disabled"];
|
|
11798
11847
|
const _hoisted_3$3 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", { class: "c-Radio__element" }, null, -1));
|
|
11799
|
-
const _hoisted_4$
|
|
11848
|
+
const _hoisted_4$2 = {
|
|
11800
11849
|
key: 0,
|
|
11801
11850
|
class: "c-Radio__label"
|
|
11802
11851
|
};
|
|
11803
|
-
function render$
|
|
11852
|
+
function render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11804
11853
|
return openBlock(true), createElementBlock(Fragment, null, renderList($props.options, (item, index) => {
|
|
11805
11854
|
return openBlock(), createElementBlock("label", mergeProps({
|
|
11806
11855
|
key: `radio-${index}`,
|
|
@@ -11821,16 +11870,16 @@ function render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11821
11870
|
name: $props.name,
|
|
11822
11871
|
value: item.value,
|
|
11823
11872
|
disabled: $props.disabled
|
|
11824
|
-
}, null, 8, _hoisted_2$
|
|
11873
|
+
}, null, 8, _hoisted_2$5), [
|
|
11825
11874
|
[vModelRadio, $options.value]
|
|
11826
11875
|
]),
|
|
11827
11876
|
_hoisted_3$3,
|
|
11828
|
-
item.label ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
11829
|
-
], 16, _hoisted_1$
|
|
11877
|
+
item.label ? (openBlock(), createElementBlock("span", _hoisted_4$2, toDisplayString(item.label), 1)) : createCommentVNode("", true)
|
|
11878
|
+
], 16, _hoisted_1$b);
|
|
11830
11879
|
}), 128);
|
|
11831
11880
|
}
|
|
11832
11881
|
var ckRadio_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
11833
|
-
const _sfc_main$
|
|
11882
|
+
const _sfc_main$d = {
|
|
11834
11883
|
name: "CkRadio",
|
|
11835
11884
|
props: {
|
|
11836
11885
|
modelValue: { type: String, default: void 0 },
|
|
@@ -11862,7 +11911,100 @@ const _sfc_main$c = {
|
|
|
11862
11911
|
}
|
|
11863
11912
|
}
|
|
11864
11913
|
};
|
|
11865
|
-
var ckRadio = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11914
|
+
var ckRadio = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", render$6], ["__scopeId", "data-v-73a891e8"]]);
|
|
11915
|
+
var qmApi = {};
|
|
11916
|
+
var qmArray = {
|
|
11917
|
+
arrayToText(arr, key = null) {
|
|
11918
|
+
let msg = "";
|
|
11919
|
+
for (let index = 0; index < arr.length; index++) {
|
|
11920
|
+
if (index) {
|
|
11921
|
+
if (index === arr.length - 1) {
|
|
11922
|
+
msg += " y ";
|
|
11923
|
+
} else {
|
|
11924
|
+
msg += ", ";
|
|
11925
|
+
}
|
|
11926
|
+
}
|
|
11927
|
+
let word;
|
|
11928
|
+
if (key) {
|
|
11929
|
+
word = arr[index][key];
|
|
11930
|
+
} else {
|
|
11931
|
+
word = arr[index];
|
|
11932
|
+
}
|
|
11933
|
+
msg += `"${word}"`;
|
|
11934
|
+
}
|
|
11935
|
+
return msg;
|
|
11936
|
+
},
|
|
11937
|
+
getRandomElementOfArray(arr) {
|
|
11938
|
+
return arr[Math.floor(Math.random() * arr.length)];
|
|
11939
|
+
},
|
|
11940
|
+
hexToRGBA(hex, alpha) {
|
|
11941
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
11942
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
11943
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
11944
|
+
if (alpha)
|
|
11945
|
+
return `rgba(${r}, ${g}, ${b}, ${alpha})`;
|
|
11946
|
+
return `rgb(${r}, ${g}, ${b})`;
|
|
11947
|
+
},
|
|
11948
|
+
removeOfArray(list, findFunction) {
|
|
11949
|
+
if (!list || !findFunction)
|
|
11950
|
+
return;
|
|
11951
|
+
const index = list.findIndex(findFunction);
|
|
11952
|
+
if (index === -1)
|
|
11953
|
+
return;
|
|
11954
|
+
list.splice(index, 1);
|
|
11955
|
+
},
|
|
11956
|
+
removeOfArrayById(list, id) {
|
|
11957
|
+
const index = list.findIndex((i) => i.id === id);
|
|
11958
|
+
if (index === -1)
|
|
11959
|
+
return;
|
|
11960
|
+
list.splice(index, 1);
|
|
11961
|
+
},
|
|
11962
|
+
replaceInList(arr, NewItem, prop = "id") {
|
|
11963
|
+
if (!NewItem)
|
|
11964
|
+
return;
|
|
11965
|
+
const index = arr.findIndex((i) => i[prop] === NewItem[prop]);
|
|
11966
|
+
if (index !== -1)
|
|
11967
|
+
arr.splice(index, 1, NewItem);
|
|
11968
|
+
},
|
|
11969
|
+
sort(arr, keys) {
|
|
11970
|
+
if (typeof keys === "string")
|
|
11971
|
+
keys = [keys];
|
|
11972
|
+
if (keys.length === 2) {
|
|
11973
|
+
if (keys[1] === "DESC" || keys[1] === "ASC") {
|
|
11974
|
+
keys = [keys];
|
|
11975
|
+
}
|
|
11976
|
+
}
|
|
11977
|
+
const finalKeys = [];
|
|
11978
|
+
keys.forEach((key) => {
|
|
11979
|
+
if (typeof key === "string")
|
|
11980
|
+
key = [key];
|
|
11981
|
+
if (typeof key[1] === "undefined")
|
|
11982
|
+
key[1] = "ASC";
|
|
11983
|
+
finalKeys.push(key);
|
|
11984
|
+
});
|
|
11985
|
+
return arr.sort((a, b) => {
|
|
11986
|
+
let value = 0;
|
|
11987
|
+
finalKeys.forEach(([key, order2]) => {
|
|
11988
|
+
if (!value) {
|
|
11989
|
+
const mult = order2 === "DESC" ? -1 : 1;
|
|
11990
|
+
if (a[key] < b[key])
|
|
11991
|
+
value = -1 * mult;
|
|
11992
|
+
if (a[key] > b[key])
|
|
11993
|
+
value = 1 * mult;
|
|
11994
|
+
}
|
|
11995
|
+
});
|
|
11996
|
+
return value;
|
|
11997
|
+
});
|
|
11998
|
+
}
|
|
11999
|
+
};
|
|
12000
|
+
var qmAudio = {
|
|
12001
|
+
reproduceAudio(path) {
|
|
12002
|
+
if (path) {
|
|
12003
|
+
const audio = new Audio(path);
|
|
12004
|
+
audio.play();
|
|
12005
|
+
}
|
|
12006
|
+
}
|
|
12007
|
+
};
|
|
11866
12008
|
const qmStr = {
|
|
11867
12009
|
capitalize(str) {
|
|
11868
12010
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
@@ -11880,6 +12022,15 @@ const qmStr = {
|
|
|
11880
12022
|
str = str.toLowerCase();
|
|
11881
12023
|
return str;
|
|
11882
12024
|
},
|
|
12025
|
+
getRandomStr(length = 10) {
|
|
12026
|
+
let result = "";
|
|
12027
|
+
const characters = "ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz123456789";
|
|
12028
|
+
const charactersLength = characters.length;
|
|
12029
|
+
for (let i = 0; i < length; i++) {
|
|
12030
|
+
result += characters.charAt(Math.floor(Math.random() * charactersLength));
|
|
12031
|
+
}
|
|
12032
|
+
return result;
|
|
12033
|
+
},
|
|
11883
12034
|
padZeros(num, size = 2) {
|
|
11884
12035
|
return `000000000${num}`.substr(-size);
|
|
11885
12036
|
},
|
|
@@ -11899,9 +12050,146 @@ const qmStr = {
|
|
|
11899
12050
|
return joinArray;
|
|
11900
12051
|
}
|
|
11901
12052
|
};
|
|
12053
|
+
var qmNum = {
|
|
12054
|
+
getRandomInt(min2, max2) {
|
|
12055
|
+
min2 = Math.ceil(min2);
|
|
12056
|
+
max2 = Math.floor(max2);
|
|
12057
|
+
return Math.floor(Math.random() * (max2 - min2 + 1)) + min2;
|
|
12058
|
+
},
|
|
12059
|
+
setPrice(num, { precision = 2 } = {}) {
|
|
12060
|
+
if (!num)
|
|
12061
|
+
return 0;
|
|
12062
|
+
return +parseFloat(num).toFixed(precision);
|
|
12063
|
+
},
|
|
12064
|
+
presentNum(num, forceDecimal = false) {
|
|
12065
|
+
num = +num;
|
|
12066
|
+
let finalInt = "0";
|
|
12067
|
+
let decimal = "00";
|
|
12068
|
+
const isNegative = num < 0;
|
|
12069
|
+
const isValidNum = !(!num || !+num);
|
|
12070
|
+
if (isValidNum) {
|
|
12071
|
+
num = parseFloat(Math.abs(num)).toFixed(2);
|
|
12072
|
+
decimal = num.substring(num.length - 2, num.length);
|
|
12073
|
+
const int = num.substring(0, num.length - 3);
|
|
12074
|
+
const reversedInt = qmStr.reverseString(int);
|
|
12075
|
+
let reversedRealInt = "";
|
|
12076
|
+
for (let i = 0; i < reversedInt.length; i++) {
|
|
12077
|
+
reversedRealInt += reversedInt.charAt(i);
|
|
12078
|
+
if (i + 1 >= reversedInt.length)
|
|
12079
|
+
continue;
|
|
12080
|
+
if ((i + 1) % 3)
|
|
12081
|
+
continue;
|
|
12082
|
+
reversedRealInt += ".";
|
|
12083
|
+
}
|
|
12084
|
+
finalInt = qmStr.reverseString(reversedRealInt);
|
|
12085
|
+
}
|
|
12086
|
+
let finalValue = finalInt;
|
|
12087
|
+
if (isNegative)
|
|
12088
|
+
finalValue = `-${finalValue}`;
|
|
12089
|
+
if (forceDecimal || +decimal) {
|
|
12090
|
+
finalValue = `${finalValue},${decimal}`;
|
|
12091
|
+
}
|
|
12092
|
+
return finalValue;
|
|
12093
|
+
},
|
|
12094
|
+
removeNoNumber(str, isFloat = false) {
|
|
12095
|
+
let newStr = "";
|
|
12096
|
+
str = str.toString();
|
|
12097
|
+
for (let i = 0; i < str.length; i++) {
|
|
12098
|
+
if (str[i] == parseInt(str[i], 10)) {
|
|
12099
|
+
newStr += str[i];
|
|
12100
|
+
} else if (isFloat && str[i] == "," || isFloat && str[i] == ".") {
|
|
12101
|
+
newStr += ".";
|
|
12102
|
+
isFloat = false;
|
|
12103
|
+
}
|
|
12104
|
+
}
|
|
12105
|
+
return newStr;
|
|
12106
|
+
},
|
|
12107
|
+
showPrice(num, Extra = { hideIcon: false, currency: "$" }) {
|
|
12108
|
+
if (Extra.hideIcon !== true)
|
|
12109
|
+
Extra.hideIcon = false;
|
|
12110
|
+
let presentedNum = this.presentNum(num, true);
|
|
12111
|
+
const isNegative = presentedNum[0] === "-";
|
|
12112
|
+
if (isNegative)
|
|
12113
|
+
presentedNum = presentedNum.substring(1, presentedNum.length);
|
|
12114
|
+
if (!Extra.hideIcon)
|
|
12115
|
+
presentedNum = `${Extra.currency}${presentedNum}`;
|
|
12116
|
+
if (isNegative)
|
|
12117
|
+
presentedNum = `- ${presentedNum}`;
|
|
12118
|
+
return presentedNum;
|
|
12119
|
+
},
|
|
12120
|
+
simplifyNum(num) {
|
|
12121
|
+
if (!(num % 1))
|
|
12122
|
+
return Math.floor(num);
|
|
12123
|
+
return this.presentNum(num);
|
|
12124
|
+
}
|
|
12125
|
+
};
|
|
12126
|
+
function getKeyValue(obj, key) {
|
|
12127
|
+
return obj[key];
|
|
12128
|
+
}
|
|
12129
|
+
function setKeyValue(obj, key, value) {
|
|
12130
|
+
obj[key] = value;
|
|
12131
|
+
}
|
|
12132
|
+
var qmObj = {
|
|
12133
|
+
addEmptyOptionToList(optionsList, { prop = "name", title = "Todos", noneId = 0 } = {}) {
|
|
12134
|
+
const noneOption = {
|
|
12135
|
+
id: noneId,
|
|
12136
|
+
[prop]: title
|
|
12137
|
+
};
|
|
12138
|
+
const newList = [...optionsList];
|
|
12139
|
+
newList.unshift(noneOption);
|
|
12140
|
+
return newList;
|
|
12141
|
+
},
|
|
12142
|
+
copyAvaibleFields(ObjEditable, ObjToCopy) {
|
|
12143
|
+
for (const key in ObjEditable) {
|
|
12144
|
+
if (typeof getKeyValue(ObjToCopy, key) !== "undefined") {
|
|
12145
|
+
setKeyValue(ObjEditable, key, getKeyValue(ObjToCopy, key));
|
|
12146
|
+
}
|
|
12147
|
+
}
|
|
12148
|
+
},
|
|
12149
|
+
isArray(obj) {
|
|
12150
|
+
return obj.constructor === Array;
|
|
12151
|
+
},
|
|
12152
|
+
objsAreTheSame(obj1, obj2) {
|
|
12153
|
+
for (const key in obj1) {
|
|
12154
|
+
if (getKeyValue(obj1, key) != getKeyValue(obj2, key))
|
|
12155
|
+
return false;
|
|
12156
|
+
}
|
|
12157
|
+
for (const key in obj2) {
|
|
12158
|
+
if (getKeyValue(obj1, key) != getKeyValue(obj2, key))
|
|
12159
|
+
return false;
|
|
12160
|
+
}
|
|
12161
|
+
return true;
|
|
12162
|
+
},
|
|
12163
|
+
qoIsObjEmpty(obj = {}) {
|
|
12164
|
+
return obj && Object.keys(obj).length === 0 && Object.getPrototypeOf(obj) === Object.prototype;
|
|
12165
|
+
}
|
|
12166
|
+
};
|
|
12167
|
+
var main$1 = {
|
|
12168
|
+
qmApi,
|
|
12169
|
+
qmArray,
|
|
12170
|
+
qmAudio,
|
|
12171
|
+
qmNum,
|
|
12172
|
+
qmObj,
|
|
12173
|
+
qmStr
|
|
12174
|
+
};
|
|
12175
|
+
var App;
|
|
12176
|
+
(function(App2) {
|
|
12177
|
+
class SomeClass {
|
|
12178
|
+
getName() {
|
|
12179
|
+
return "name";
|
|
12180
|
+
}
|
|
12181
|
+
}
|
|
12182
|
+
App2.SomeClass = SomeClass;
|
|
12183
|
+
class OtherClass {
|
|
12184
|
+
getName() {
|
|
12185
|
+
return "name";
|
|
12186
|
+
}
|
|
12187
|
+
}
|
|
12188
|
+
App2.OtherClass = OtherClass;
|
|
12189
|
+
})(App || (App = {}));
|
|
11902
12190
|
var ckSelect_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
11903
|
-
const _hoisted_1$
|
|
11904
|
-
const _sfc_main$
|
|
12191
|
+
const _hoisted_1$a = ["value"];
|
|
12192
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
11905
12193
|
props: {
|
|
11906
12194
|
modelValue: { default: null, type: [Boolean, Number, Object, Array, String] },
|
|
11907
12195
|
prop: { type: String, default: "name" },
|
|
@@ -11926,6 +12214,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
11926
12214
|
emits: ["update:modelValue", "click", "change"],
|
|
11927
12215
|
setup(__props, { emit: emits }) {
|
|
11928
12216
|
const props = __props;
|
|
12217
|
+
const { qmStr: qmStr2 } = main$1;
|
|
11929
12218
|
const search = ref("");
|
|
11930
12219
|
ref(null);
|
|
11931
12220
|
const value = computed({
|
|
@@ -11941,7 +12230,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
11941
12230
|
const filteredOptions = computed(() => {
|
|
11942
12231
|
const list = props.options.filter((option) => {
|
|
11943
12232
|
const name = getOptionName(option);
|
|
11944
|
-
return
|
|
12233
|
+
return qmStr2.checkContainsStr(name, search.value);
|
|
11945
12234
|
});
|
|
11946
12235
|
return list;
|
|
11947
12236
|
});
|
|
@@ -12039,7 +12328,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
12039
12328
|
return openBlock(), createElementBlock("option", {
|
|
12040
12329
|
value: getOptionKey(option),
|
|
12041
12330
|
key: option
|
|
12042
|
-
}, toDisplayString(getOptionName(option)), 9, _hoisted_1$
|
|
12331
|
+
}, toDisplayString(getOptionName(option)), 9, _hoisted_1$a);
|
|
12043
12332
|
}), 128))
|
|
12044
12333
|
], 34), [
|
|
12045
12334
|
[vModelSelect, unref(value)]
|
|
@@ -12048,86 +12337,101 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
12048
12337
|
};
|
|
12049
12338
|
}
|
|
12050
12339
|
});
|
|
12051
|
-
var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12052
|
-
|
|
12053
|
-
const
|
|
12054
|
-
const
|
|
12055
|
-
const
|
|
12340
|
+
var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-31af160a"]]);
|
|
12341
|
+
var ckSwitch_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12342
|
+
const _withScopeId = (n) => (pushScopeId("data-v-6a563501"), n = n(), popScopeId(), n);
|
|
12343
|
+
const _hoisted_1$9 = ["disabled"];
|
|
12344
|
+
const _hoisted_2$4 = { class: "ck-switch__slider-container" };
|
|
12345
|
+
const _hoisted_3$2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "ck-switch__slider" }, null, -1));
|
|
12346
|
+
const _hoisted_4$1 = {
|
|
12056
12347
|
key: 0,
|
|
12057
12348
|
class: "ck-switch__content"
|
|
12058
12349
|
};
|
|
12059
|
-
|
|
12060
|
-
return openBlock(), createElementBlock("label", mergeProps({ class: "ck-switch" }, $options.computedAttributes, {
|
|
12061
|
-
class: $options.computedClass,
|
|
12062
|
-
onKeydown: _cache[2] || (_cache[2] = withKeys(withModifiers(() => {
|
|
12063
|
-
}, ["prevent"]), ["space"])),
|
|
12064
|
-
onKeyup: [
|
|
12065
|
-
_cache[3] || (_cache[3] = withKeys(($event) => $options.onTrigger(), ["enter"])),
|
|
12066
|
-
_cache[4] || (_cache[4] = withKeys(($event) => $options.onTrigger(), ["space"]))
|
|
12067
|
-
]
|
|
12068
|
-
}), [
|
|
12069
|
-
withDirectives(createElementVNode("input", {
|
|
12070
|
-
class: "ck-switch__input",
|
|
12071
|
-
"aria-hidden": "true",
|
|
12072
|
-
type: "checkbox",
|
|
12073
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $options.value = $event),
|
|
12074
|
-
disabled: $props.disabled,
|
|
12075
|
-
onClick: _cache[1] || (_cache[1] = ($event) => $options.onTrigger())
|
|
12076
|
-
}, null, 8, _hoisted_1$8), [
|
|
12077
|
-
[vModelCheckbox, $options.value]
|
|
12078
|
-
]),
|
|
12079
|
-
_hoisted_2$3,
|
|
12080
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_3$2, [
|
|
12081
|
-
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
12082
|
-
])) : createCommentVNode("", true)
|
|
12083
|
-
], 16);
|
|
12084
|
-
}
|
|
12085
|
-
var ckSwitch_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12086
|
-
const _sfc_main$a = {
|
|
12087
|
-
name: "Switch",
|
|
12350
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
12088
12351
|
props: {
|
|
12089
12352
|
modelValue: { type: Boolean, default: false },
|
|
12090
12353
|
disabled: { type: Boolean, default: false },
|
|
12091
12354
|
outlined: { type: Boolean, default: false },
|
|
12092
|
-
squared: { type: Boolean, default: false }
|
|
12355
|
+
squared: { type: Boolean, default: false },
|
|
12356
|
+
icon: { type: String, default: void 0 },
|
|
12357
|
+
iconPack: { type: String, default: void 0 }
|
|
12093
12358
|
},
|
|
12094
12359
|
emits: ["update:modelValue"],
|
|
12095
|
-
|
|
12096
|
-
|
|
12360
|
+
setup(__props, { emit: emits }) {
|
|
12361
|
+
const props = __props;
|
|
12362
|
+
const value = computed({
|
|
12097
12363
|
get() {
|
|
12098
|
-
return
|
|
12364
|
+
return props.modelValue;
|
|
12099
12365
|
},
|
|
12100
12366
|
set(val) {
|
|
12101
|
-
|
|
12367
|
+
emits("update:modelValue", val);
|
|
12102
12368
|
}
|
|
12103
|
-
}
|
|
12104
|
-
computedClass() {
|
|
12369
|
+
});
|
|
12370
|
+
const computedClass = computed(() => {
|
|
12105
12371
|
const list = [];
|
|
12106
|
-
if (
|
|
12372
|
+
if (props.squared)
|
|
12107
12373
|
list.push("is-squared");
|
|
12108
|
-
if (
|
|
12374
|
+
if (props.outlined)
|
|
12109
12375
|
list.push("is-outlined");
|
|
12110
12376
|
return list;
|
|
12111
|
-
}
|
|
12112
|
-
computedAttributes() {
|
|
12377
|
+
});
|
|
12378
|
+
const computedAttributes = computed(() => {
|
|
12113
12379
|
return {
|
|
12114
|
-
"aria-disabled":
|
|
12115
|
-
tabindex:
|
|
12380
|
+
"aria-disabled": props.disabled,
|
|
12381
|
+
tabindex: props.disabled ? void 0 : "0"
|
|
12116
12382
|
};
|
|
12383
|
+
});
|
|
12384
|
+
function onTrigger2() {
|
|
12385
|
+
value.value = !value.value;
|
|
12117
12386
|
}
|
|
12118
|
-
|
|
12119
|
-
|
|
12120
|
-
|
|
12121
|
-
|
|
12122
|
-
|
|
12387
|
+
return (_ctx, _cache) => {
|
|
12388
|
+
return openBlock(), createElementBlock("label", mergeProps({ class: "ck-switch" }, unref(computedAttributes), {
|
|
12389
|
+
class: unref(computedClass),
|
|
12390
|
+
onKeydown: _cache[2] || (_cache[2] = withKeys(withModifiers(() => {
|
|
12391
|
+
}, ["prevent"]), ["space"])),
|
|
12392
|
+
onKeyup: [
|
|
12393
|
+
_cache[3] || (_cache[3] = withKeys(($event) => onTrigger2(), ["enter"])),
|
|
12394
|
+
_cache[4] || (_cache[4] = withKeys(($event) => onTrigger2(), ["space"]))
|
|
12395
|
+
]
|
|
12396
|
+
}), [
|
|
12397
|
+
withDirectives(createElementVNode("input", {
|
|
12398
|
+
class: "ck-switch__input",
|
|
12399
|
+
"aria-hidden": "true",
|
|
12400
|
+
type: "checkbox",
|
|
12401
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(value) ? value.value = $event : null),
|
|
12402
|
+
disabled: __props.disabled,
|
|
12403
|
+
onClick: _cache[1] || (_cache[1] = ($event) => onTrigger2())
|
|
12404
|
+
}, null, 8, _hoisted_1$9), [
|
|
12405
|
+
[vModelCheckbox, unref(value)]
|
|
12406
|
+
]),
|
|
12407
|
+
createElementVNode("div", _hoisted_2$4, [
|
|
12408
|
+
_hoisted_3$2,
|
|
12409
|
+
__props.icon && unref(value) ? (openBlock(), createBlock(ckIcon, {
|
|
12410
|
+
key: 0,
|
|
12411
|
+
class: "ck-switch__icon-left",
|
|
12412
|
+
icon: __props.icon,
|
|
12413
|
+
"icon-pack": __props.iconPack
|
|
12414
|
+
}, null, 8, ["icon", "icon-pack"])) : createCommentVNode("", true),
|
|
12415
|
+
__props.icon && !unref(value) ? (openBlock(), createBlock(ckIcon, {
|
|
12416
|
+
key: 1,
|
|
12417
|
+
class: "ck-switch__icon-right",
|
|
12418
|
+
icon: __props.icon,
|
|
12419
|
+
"icon-pack": __props.iconPack
|
|
12420
|
+
}, null, 8, ["icon", "icon-pack"])) : createCommentVNode("", true)
|
|
12421
|
+
]),
|
|
12422
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_4$1, [
|
|
12423
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
12424
|
+
])) : createCommentVNode("", true)
|
|
12425
|
+
], 16);
|
|
12426
|
+
};
|
|
12123
12427
|
}
|
|
12124
|
-
};
|
|
12125
|
-
var ckSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12126
|
-
const _hoisted_1$
|
|
12127
|
-
const _hoisted_2$
|
|
12128
|
-
function render$
|
|
12428
|
+
});
|
|
12429
|
+
var ckSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-6a563501"]]);
|
|
12430
|
+
const _hoisted_1$8 = { class: "ck-switch-options__container-exterior" };
|
|
12431
|
+
const _hoisted_2$3 = ["onClick"];
|
|
12432
|
+
function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12129
12433
|
const _component_ck_label = resolveComponent("ck-label");
|
|
12130
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12434
|
+
return openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
12131
12435
|
$props.label ? (openBlock(), createBlock(_component_ck_label, {
|
|
12132
12436
|
key: 0,
|
|
12133
12437
|
align: $props.labelAlign
|
|
@@ -12146,13 +12450,13 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
12146
12450
|
key: `ck-switch-options${index}`,
|
|
12147
12451
|
style: normalizeStyle($options.computedItemStyle),
|
|
12148
12452
|
onClick: ($event) => $options.selectedOption = $options.getOptionValue(Option)
|
|
12149
|
-
}, toDisplayString(Option[$props.prop]), 15, _hoisted_2$
|
|
12453
|
+
}, toDisplayString(Option[$props.prop]), 15, _hoisted_2$3);
|
|
12150
12454
|
}), 128))
|
|
12151
12455
|
], 2)
|
|
12152
12456
|
]);
|
|
12153
12457
|
}
|
|
12154
12458
|
var ckSwitchOptions_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12155
|
-
const _sfc_main$
|
|
12459
|
+
const _sfc_main$a = {
|
|
12156
12460
|
components: {
|
|
12157
12461
|
ckLabel
|
|
12158
12462
|
},
|
|
@@ -12200,19 +12504,19 @@ const _sfc_main$9 = {
|
|
|
12200
12504
|
}
|
|
12201
12505
|
}
|
|
12202
12506
|
};
|
|
12203
|
-
var ckSwitchOptions = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12204
|
-
const _hoisted_1$
|
|
12205
|
-
function render$
|
|
12206
|
-
return openBlock(), createElementBlock("tr", _hoisted_1$
|
|
12507
|
+
var ckSwitchOptions = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", render$5], ["__scopeId", "data-v-f0c51430"]]);
|
|
12508
|
+
const _hoisted_1$7 = { class: "ck-tr" };
|
|
12509
|
+
function render$4(_ctx, _cache) {
|
|
12510
|
+
return openBlock(), createElementBlock("tr", _hoisted_1$7, [
|
|
12207
12511
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
12208
12512
|
]);
|
|
12209
12513
|
}
|
|
12210
12514
|
var ckTr_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12211
|
-
const _sfc_main$
|
|
12212
|
-
var ckTr = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12213
|
-
const _hoisted_1$
|
|
12214
|
-
function render$
|
|
12215
|
-
return openBlock(), createElementBlock("th", _hoisted_1$
|
|
12515
|
+
const _sfc_main$9 = {};
|
|
12516
|
+
var ckTr = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", render$4], ["__scopeId", "data-v-1dd12190"]]);
|
|
12517
|
+
const _hoisted_1$6 = { class: "ck-th" };
|
|
12518
|
+
function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12519
|
+
return openBlock(), createElementBlock("th", _hoisted_1$6, [
|
|
12216
12520
|
createElementVNode("span", {
|
|
12217
12521
|
class: normalizeClass($options.computedSpanClass),
|
|
12218
12522
|
style: normalizeStyle($options.computedStyle)
|
|
@@ -12222,7 +12526,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
12222
12526
|
]);
|
|
12223
12527
|
}
|
|
12224
12528
|
var ckTh_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12225
|
-
const _sfc_main$
|
|
12529
|
+
const _sfc_main$8 = {
|
|
12226
12530
|
props: {
|
|
12227
12531
|
align: { type: String, default: "center", validator: validators.align },
|
|
12228
12532
|
minWidth: { type: String, default: void 0 }
|
|
@@ -12243,46 +12547,38 @@ const _sfc_main$7 = {
|
|
|
12243
12547
|
}
|
|
12244
12548
|
}
|
|
12245
12549
|
};
|
|
12246
|
-
var ckTh = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12247
|
-
|
|
12248
|
-
const _component_ck_th = resolveComponent("ck-th");
|
|
12249
|
-
return $options.isVisible ? (openBlock(), createBlock(_component_ck_th, {
|
|
12250
|
-
key: 0,
|
|
12251
|
-
align: $props.col.align,
|
|
12252
|
-
"min-width": $props.col.minWidth
|
|
12253
|
-
}, {
|
|
12254
|
-
default: withCtx(() => [
|
|
12255
|
-
createTextVNode(toDisplayString($props.col.title), 1)
|
|
12256
|
-
]),
|
|
12257
|
-
_: 1
|
|
12258
|
-
}, 8, ["align", "min-width"])) : createCommentVNode("", true);
|
|
12259
|
-
}
|
|
12260
|
-
const _sfc_main$6 = {
|
|
12261
|
-
components: {
|
|
12262
|
-
ckTh
|
|
12263
|
-
},
|
|
12550
|
+
var ckTh = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", render$3], ["__scopeId", "data-v-e9943550"]]);
|
|
12551
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
12264
12552
|
props: {
|
|
12265
12553
|
col: { type: Object, required: true }
|
|
12266
12554
|
},
|
|
12267
|
-
|
|
12268
|
-
|
|
12269
|
-
return
|
|
12270
|
-
|
|
12555
|
+
setup(__props) {
|
|
12556
|
+
return (_ctx, _cache) => {
|
|
12557
|
+
return openBlock(), createBlock(ckTh, {
|
|
12558
|
+
align: __props.col.align,
|
|
12559
|
+
"min-width": __props.col.minWidth
|
|
12560
|
+
}, {
|
|
12561
|
+
default: withCtx(() => [
|
|
12562
|
+
createTextVNode(toDisplayString(__props.col.title), 1)
|
|
12563
|
+
]),
|
|
12564
|
+
_: 1
|
|
12565
|
+
}, 8, ["align", "min-width"]);
|
|
12566
|
+
};
|
|
12271
12567
|
}
|
|
12272
|
-
};
|
|
12273
|
-
var ckTableTitle = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", render$4]]);
|
|
12568
|
+
});
|
|
12274
12569
|
var ckTable__headerItems_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12275
|
-
const _hoisted_1$
|
|
12276
|
-
const _sfc_main$
|
|
12570
|
+
const _hoisted_1$5 = { class: "ck-table__header-items" };
|
|
12571
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
12277
12572
|
props: {
|
|
12278
12573
|
search: { type: String, default: void 0 },
|
|
12574
|
+
hasColumnsManager: { type: Boolean, default: false },
|
|
12279
12575
|
hideRefreshBtn: { type: Boolean, required: true },
|
|
12280
12576
|
hideItemsPerPage: { type: Boolean, required: true },
|
|
12281
12577
|
currentPage: { type: Number, required: true },
|
|
12282
12578
|
itemsPerPage: { type: Number, required: true },
|
|
12283
12579
|
listLength: { type: Number, required: true }
|
|
12284
12580
|
},
|
|
12285
|
-
emits: ["update:search", "refreshList"],
|
|
12581
|
+
emits: ["update:search", "refreshList", "openColumnsManager"],
|
|
12286
12582
|
setup(__props, { emit: emits }) {
|
|
12287
12583
|
const props = __props;
|
|
12288
12584
|
const searchLocal = computed({
|
|
@@ -12305,6 +12601,19 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
12305
12601
|
return props.listLength;
|
|
12306
12602
|
return value;
|
|
12307
12603
|
});
|
|
12604
|
+
const itemsPerPageIsVisible = computed(() => {
|
|
12605
|
+
return !props.hideItemsPerPage && props.listLength;
|
|
12606
|
+
});
|
|
12607
|
+
const searchGroupValue = computed(() => {
|
|
12608
|
+
if (itemsPerPageIsVisible.value && props.hasColumnsManager) {
|
|
12609
|
+
return "center";
|
|
12610
|
+
}
|
|
12611
|
+
if (itemsPerPageIsVisible.value)
|
|
12612
|
+
return "right";
|
|
12613
|
+
if (props.hasColumnsManager)
|
|
12614
|
+
return "left";
|
|
12615
|
+
return "";
|
|
12616
|
+
});
|
|
12308
12617
|
function checkRefresh() {
|
|
12309
12618
|
const search = searchLocal.value;
|
|
12310
12619
|
setTimeout(() => {
|
|
@@ -12314,14 +12623,15 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
12314
12623
|
}, 1e3);
|
|
12315
12624
|
}
|
|
12316
12625
|
return (_ctx, _cache) => {
|
|
12317
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12626
|
+
return openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
12318
12627
|
!__props.hideRefreshBtn ? (openBlock(), createBlock(ckButton, {
|
|
12319
12628
|
key: 0,
|
|
12320
12629
|
type: "flat",
|
|
12321
12630
|
icon: "redo-alt",
|
|
12631
|
+
title: "Recargar lista",
|
|
12322
12632
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("refreshList", false))
|
|
12323
12633
|
})) : createCommentVNode("", true),
|
|
12324
|
-
|
|
12634
|
+
unref(itemsPerPageIsVisible) ? (openBlock(), createElementBlock("div", {
|
|
12325
12635
|
key: 1,
|
|
12326
12636
|
class: normalizeClass(["items-per-page", { "ck-component__group--left": !unref(hideSearch) }])
|
|
12327
12637
|
}, toDisplayString(unref(itemsPerPageStart)) + " - " + toDisplayString(unref(itemsPerPageEnd)) + " de " + toDisplayString(__props.listLength), 3)) : createCommentVNode("", true),
|
|
@@ -12331,17 +12641,25 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
12331
12641
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(searchLocal) ? searchLocal.value = $event : null),
|
|
12332
12642
|
icon: "search",
|
|
12333
12643
|
placeholder: "Buscar...",
|
|
12334
|
-
group:
|
|
12644
|
+
group: unref(searchGroupValue),
|
|
12335
12645
|
onInput: _cache[2] || (_cache[2] = ($event) => checkRefresh())
|
|
12336
|
-
}, null, 8, ["modelValue", "group"])) : createCommentVNode("", true)
|
|
12646
|
+
}, null, 8, ["modelValue", "group"])) : createCommentVNode("", true),
|
|
12647
|
+
__props.hasColumnsManager ? (openBlock(), createBlock(ckButton, {
|
|
12648
|
+
key: 3,
|
|
12649
|
+
icon: "columns",
|
|
12650
|
+
type: "filled",
|
|
12651
|
+
title: "Administrador de columnas",
|
|
12652
|
+
group: unref(itemsPerPageIsVisible) || !unref(hideSearch) ? "right" : "",
|
|
12653
|
+
onClick: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("openColumnsManager"))
|
|
12654
|
+
}, null, 8, ["group"])) : createCommentVNode("", true)
|
|
12337
12655
|
]);
|
|
12338
12656
|
};
|
|
12339
12657
|
}
|
|
12340
12658
|
});
|
|
12341
|
-
var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12659
|
+
var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-38244f67"]]);
|
|
12342
12660
|
var ckTable__pagination_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12343
|
-
const _hoisted_1$
|
|
12344
|
-
const _hoisted_2$
|
|
12661
|
+
const _hoisted_1$4 = { class: "ck-table__pagination" };
|
|
12662
|
+
const _hoisted_2$2 = ["onClick"];
|
|
12345
12663
|
const _hoisted_3$1 = ["onClick"];
|
|
12346
12664
|
const itemsShowed = 5;
|
|
12347
12665
|
const __default__ = {
|
|
@@ -12417,14 +12735,14 @@ const __default__ = {
|
|
|
12417
12735
|
}
|
|
12418
12736
|
}
|
|
12419
12737
|
};
|
|
12420
|
-
const _sfc_main$
|
|
12738
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__), {
|
|
12421
12739
|
setup(__props) {
|
|
12422
12740
|
return (_ctx, _cache) => {
|
|
12423
12741
|
return __props.currentPage && _ctx.totalPages > 1 ? (openBlock(), createElementBlock("div", {
|
|
12424
12742
|
key: 0,
|
|
12425
12743
|
class: normalizeClass(["ck-table__pagination-container", `pagination-align--${__props.align}`])
|
|
12426
12744
|
}, [
|
|
12427
|
-
createElementVNode("div", _hoisted_1$
|
|
12745
|
+
createElementVNode("div", _hoisted_1$4, [
|
|
12428
12746
|
_ctx.hasArrowLeft ? (openBlock(), createElementBlock("div", {
|
|
12429
12747
|
key: 0,
|
|
12430
12748
|
class: "ck-table__pagination--arrow-left",
|
|
@@ -12436,7 +12754,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
12436
12754
|
return openBlock(), createElementBlock("div", {
|
|
12437
12755
|
class: "ck-table__pagination-item pagination-item__left",
|
|
12438
12756
|
onClick: ($event) => _ctx.updateCurrentPage(num)
|
|
12439
|
-
}, toDisplayString(num), 9, _hoisted_2$
|
|
12757
|
+
}, toDisplayString(num), 9, _hoisted_2$2);
|
|
12440
12758
|
}), 256)),
|
|
12441
12759
|
createVNode(ckInput, {
|
|
12442
12760
|
class: "ck-table__pagination-input",
|
|
@@ -12466,7 +12784,79 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
12466
12784
|
};
|
|
12467
12785
|
}
|
|
12468
12786
|
}));
|
|
12469
|
-
var TablePagination = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12787
|
+
var TablePagination = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-7ad6042e"]]);
|
|
12788
|
+
var ckTable__columnsManager_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12789
|
+
const _hoisted_1$3 = { class: "columns-manger-container" };
|
|
12790
|
+
const _hoisted_2$1 = { class: "columns-manger__item" };
|
|
12791
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
12792
|
+
props: {
|
|
12793
|
+
modelValue: { type: Boolean, required: true },
|
|
12794
|
+
columns: { type: Object, required: true },
|
|
12795
|
+
columnsArray: { type: Array, required: true }
|
|
12796
|
+
},
|
|
12797
|
+
emits: ["update:modelValue"],
|
|
12798
|
+
setup(__props, { emit: emits }) {
|
|
12799
|
+
const props = __props;
|
|
12800
|
+
let columnsCheckable = ref([]);
|
|
12801
|
+
const isActive = computed({
|
|
12802
|
+
get() {
|
|
12803
|
+
return props.modelValue;
|
|
12804
|
+
},
|
|
12805
|
+
set(val) {
|
|
12806
|
+
emits("update:modelValue", val);
|
|
12807
|
+
}
|
|
12808
|
+
});
|
|
12809
|
+
watch(() => isActive.value, (val) => {
|
|
12810
|
+
if (!val)
|
|
12811
|
+
return;
|
|
12812
|
+
setColumnsCheckable();
|
|
12813
|
+
});
|
|
12814
|
+
function setColumnsCheckable() {
|
|
12815
|
+
console.log("hoola");
|
|
12816
|
+
const list = [];
|
|
12817
|
+
props.columnsArray.forEach((col) => {
|
|
12818
|
+
if (functions$1)
|
|
12819
|
+
list.push({
|
|
12820
|
+
name: col.name,
|
|
12821
|
+
title: col.title,
|
|
12822
|
+
value: functions$1.isColumnDisplayed(col)
|
|
12823
|
+
});
|
|
12824
|
+
});
|
|
12825
|
+
columnsCheckable.value = list;
|
|
12826
|
+
}
|
|
12827
|
+
function setColumnDisplayValue(colName, value) {
|
|
12828
|
+
props.columns[colName].isDisplayed = value;
|
|
12829
|
+
}
|
|
12830
|
+
return (_ctx, _cache) => {
|
|
12831
|
+
return openBlock(), createBlock(_sfc_main$e, {
|
|
12832
|
+
modelValue: unref(isActive),
|
|
12833
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(isActive) ? isActive.value = $event : null),
|
|
12834
|
+
title: "Administrador de columnas"
|
|
12835
|
+
}, {
|
|
12836
|
+
default: withCtx(() => [
|
|
12837
|
+
createElementVNode("div", _hoisted_1$3, [
|
|
12838
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(columnsCheckable), (col) => {
|
|
12839
|
+
return openBlock(), createElementBlock("div", _hoisted_2$1, [
|
|
12840
|
+
createVNode(ckCheckbox, {
|
|
12841
|
+
modelValue: col.value,
|
|
12842
|
+
"onUpdate:modelValue": ($event) => col.value = $event,
|
|
12843
|
+
onChange: ($event) => setColumnDisplayValue(col.name, col.value)
|
|
12844
|
+
}, {
|
|
12845
|
+
default: withCtx(() => [
|
|
12846
|
+
createTextVNode(toDisplayString(col.title), 1)
|
|
12847
|
+
]),
|
|
12848
|
+
_: 2
|
|
12849
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])
|
|
12850
|
+
]);
|
|
12851
|
+
}), 256))
|
|
12852
|
+
])
|
|
12853
|
+
]),
|
|
12854
|
+
_: 1
|
|
12855
|
+
}, 8, ["modelValue"]);
|
|
12856
|
+
};
|
|
12857
|
+
}
|
|
12858
|
+
});
|
|
12859
|
+
var TableColumnsManager = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-6ae82d89"]]);
|
|
12470
12860
|
var ckTable_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12471
12861
|
const _hoisted_1$2 = { class: "ck-table" };
|
|
12472
12862
|
const _hoisted_2 = {
|
|
@@ -12482,7 +12872,8 @@ const _hoisted_5 = { key: 0 };
|
|
|
12482
12872
|
const _hoisted_6 = { key: 1 };
|
|
12483
12873
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
12484
12874
|
props: {
|
|
12485
|
-
columns: { type: Array, required: true, default: () => [] },
|
|
12875
|
+
columns: { type: [Array, Object], required: true, default: () => [] },
|
|
12876
|
+
hasColumnsManager: { type: Boolean, default: false },
|
|
12486
12877
|
currentPage: { type: Number, default: 0 },
|
|
12487
12878
|
itemsPerPage: { type: Number, default: 40 },
|
|
12488
12879
|
listLength: { type: Number, default: 0 },
|
|
@@ -12495,6 +12886,25 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
12495
12886
|
emits: ["refreshList", "update:search", "update:currentPage"],
|
|
12496
12887
|
setup(__props, { emit: emits }) {
|
|
12497
12888
|
const props = __props;
|
|
12889
|
+
const { qmObj: qmObj2 } = main$1;
|
|
12890
|
+
const IsPopupActive = ref({
|
|
12891
|
+
columnsManager: false
|
|
12892
|
+
});
|
|
12893
|
+
const columnsAreObj = computed(() => !qmObj2.isArray(props.columns));
|
|
12894
|
+
const columnsArray = computed(() => {
|
|
12895
|
+
if (!columnsAreObj.value)
|
|
12896
|
+
return props.columns;
|
|
12897
|
+
const arr = Object.values(props.columns);
|
|
12898
|
+
const keys = Object.keys(props.columns);
|
|
12899
|
+
arr.forEach((col, index) => {
|
|
12900
|
+
const key = keys[index];
|
|
12901
|
+
col.name = key;
|
|
12902
|
+
});
|
|
12903
|
+
return arr;
|
|
12904
|
+
});
|
|
12905
|
+
const filteredColumnsList = computed(() => {
|
|
12906
|
+
return columnsArray.value.filter(functions$1.isColumnDisplayed);
|
|
12907
|
+
});
|
|
12498
12908
|
const searchLocal = computed({
|
|
12499
12909
|
get() {
|
|
12500
12910
|
return props.search;
|
|
@@ -12514,114 +12924,150 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
12514
12924
|
function refreshList(pageChange = false) {
|
|
12515
12925
|
emits("refreshList", pageChange);
|
|
12516
12926
|
}
|
|
12927
|
+
function openColumnsManager() {
|
|
12928
|
+
if (columnsAreObj.value) {
|
|
12929
|
+
IsPopupActive.value.columnsManager = true;
|
|
12930
|
+
} else {
|
|
12931
|
+
console.log("ERROR ck-table", "The columns list should be an object");
|
|
12932
|
+
}
|
|
12933
|
+
}
|
|
12517
12934
|
return (_ctx, _cache) => {
|
|
12518
|
-
return openBlock(), createElementBlock(
|
|
12519
|
-
|
|
12520
|
-
|
|
12521
|
-
|
|
12522
|
-
|
|
12523
|
-
|
|
12524
|
-
|
|
12525
|
-
|
|
12526
|
-
|
|
12527
|
-
|
|
12528
|
-
|
|
12529
|
-
|
|
12530
|
-
|
|
12531
|
-
|
|
12532
|
-
|
|
12533
|
-
|
|
12534
|
-
|
|
12535
|
-
|
|
12536
|
-
|
|
12537
|
-
|
|
12538
|
-
|
|
12539
|
-
|
|
12540
|
-
|
|
12541
|
-
|
|
12542
|
-
|
|
12543
|
-
|
|
12544
|
-
}), 128))
|
|
12545
|
-
]),
|
|
12546
|
-
_: 1
|
|
12547
|
-
})
|
|
12935
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
12936
|
+
__props.hasColumnsManager && unref(columnsAreObj) ? (openBlock(), createBlock(TableColumnsManager, {
|
|
12937
|
+
key: 0,
|
|
12938
|
+
modelValue: IsPopupActive.value.columnsManager,
|
|
12939
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => IsPopupActive.value.columnsManager = $event),
|
|
12940
|
+
columnsArray: unref(columnsArray),
|
|
12941
|
+
columns: __props.columns
|
|
12942
|
+
}, null, 8, ["modelValue", "columnsArray", "columns"])) : createCommentVNode("", true),
|
|
12943
|
+
createElementVNode("div", _hoisted_1$2, [
|
|
12944
|
+
_ctx.$slots.header || !__props.hideHeaderActions ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
12945
|
+
!__props.hideHeaderActions ? (openBlock(), createBlock(TableHeaderItems, {
|
|
12946
|
+
key: 0,
|
|
12947
|
+
search: unref(searchLocal),
|
|
12948
|
+
"onUpdate:search": _cache[1] || (_cache[1] = ($event) => isRef(searchLocal) ? searchLocal.value = $event : null),
|
|
12949
|
+
currentPage: __props.currentPage,
|
|
12950
|
+
hasColumnsManager: __props.hasColumnsManager,
|
|
12951
|
+
itemsPerPage: __props.itemsPerPage,
|
|
12952
|
+
listLength: __props.listLength,
|
|
12953
|
+
hideRefreshBtn: __props.hideRefreshBtn,
|
|
12954
|
+
hideItemsPerPage: __props.hideItemsPerPage,
|
|
12955
|
+
onRefreshList: _cache[2] || (_cache[2] = ($event) => refreshList($event)),
|
|
12956
|
+
onOpenColumnsManager: _cache[3] || (_cache[3] = ($event) => openColumnsManager())
|
|
12957
|
+
}, null, 8, ["search", "currentPage", "hasColumnsManager", "itemsPerPage", "listLength", "hideRefreshBtn", "hideItemsPerPage"])) : createCommentVNode("", true),
|
|
12958
|
+
_ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
12959
|
+
renderSlot(_ctx.$slots, "header", {}, void 0, true)
|
|
12960
|
+
])) : createCommentVNode("", true)
|
|
12548
12961
|
])) : createCommentVNode("", true),
|
|
12549
|
-
createElementVNode("
|
|
12550
|
-
|
|
12962
|
+
createElementVNode("table", _hoisted_4, [
|
|
12963
|
+
unref(filteredColumnsList).length ? (openBlock(), createElementBlock("thead", _hoisted_5, [
|
|
12964
|
+
createVNode(ckTr, null, {
|
|
12965
|
+
default: withCtx(() => [
|
|
12966
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(filteredColumnsList), (col) => {
|
|
12967
|
+
return openBlock(), createBlock(_sfc_main$7, {
|
|
12968
|
+
key: col.title,
|
|
12969
|
+
col
|
|
12970
|
+
}, null, 8, ["col"]);
|
|
12971
|
+
}), 128))
|
|
12972
|
+
]),
|
|
12973
|
+
_: 1
|
|
12974
|
+
})
|
|
12975
|
+
])) : createCommentVNode("", true),
|
|
12976
|
+
createElementVNode("tbody", null, [
|
|
12977
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
12978
|
+
]),
|
|
12979
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("tfoot", _hoisted_6, [
|
|
12980
|
+
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
12981
|
+
])) : createCommentVNode("", true)
|
|
12551
12982
|
]),
|
|
12552
|
-
|
|
12553
|
-
|
|
12554
|
-
|
|
12555
|
-
|
|
12556
|
-
|
|
12557
|
-
|
|
12558
|
-
|
|
12559
|
-
|
|
12560
|
-
|
|
12561
|
-
|
|
12562
|
-
onRefreshList: _cache[3] || (_cache[3] = ($event) => refreshList(true))
|
|
12563
|
-
}, null, 8, ["currentPage", "itemsPerPage", "listLength", "align"])
|
|
12564
|
-
]);
|
|
12983
|
+
createVNode(TablePagination, {
|
|
12984
|
+
currentPage: unref(currentPageLocal),
|
|
12985
|
+
"onUpdate:currentPage": _cache[4] || (_cache[4] = ($event) => isRef(currentPageLocal) ? currentPageLocal.value = $event : null),
|
|
12986
|
+
itemsPerPage: __props.itemsPerPage,
|
|
12987
|
+
listLength: __props.listLength,
|
|
12988
|
+
align: __props.paginationAlign,
|
|
12989
|
+
onRefreshList: _cache[5] || (_cache[5] = ($event) => refreshList(true))
|
|
12990
|
+
}, null, 8, ["currentPage", "itemsPerPage", "listLength", "align"])
|
|
12991
|
+
])
|
|
12992
|
+
], 64);
|
|
12565
12993
|
};
|
|
12566
12994
|
}
|
|
12567
12995
|
});
|
|
12568
|
-
var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
12569
|
-
function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12570
|
-
return openBlock(), createElementBlock("td", {
|
|
12571
|
-
class: normalizeClass(["ck-td", $options.computedTdClass])
|
|
12572
|
-
}, [
|
|
12573
|
-
createElementVNode("span", {
|
|
12574
|
-
class: normalizeClass($options.computedSpanClass),
|
|
12575
|
-
style: normalizeStyle($options.computedStyle)
|
|
12576
|
-
}, [
|
|
12577
|
-
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
12578
|
-
], 6)
|
|
12579
|
-
], 2);
|
|
12580
|
-
}
|
|
12996
|
+
var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-4abe8990"]]);
|
|
12581
12997
|
var ckTd_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12582
|
-
const _sfc_main$2 = {
|
|
12998
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
12583
12999
|
props: {
|
|
13000
|
+
col: { type: Object, default: void 0 },
|
|
12584
13001
|
wrap: { type: Boolean, default: false },
|
|
12585
13002
|
block: { type: Boolean, default: false },
|
|
12586
13003
|
autoWidth: { type: Boolean, default: false },
|
|
12587
|
-
align: { type: String, default:
|
|
13004
|
+
align: { type: String, default: void 0, validator: validators.align },
|
|
12588
13005
|
fixedWidth: { type: String, default: "" },
|
|
12589
13006
|
minWidth: { type: String, default: "" },
|
|
12590
13007
|
maxWidth: { type: String, default: "" },
|
|
12591
13008
|
maxHeight: { type: String, default: "" }
|
|
12592
13009
|
},
|
|
12593
|
-
|
|
12594
|
-
|
|
13010
|
+
setup(__props) {
|
|
13011
|
+
const props = __props;
|
|
13012
|
+
const computedTdClass = computed(() => {
|
|
12595
13013
|
return {
|
|
12596
|
-
"auto-width":
|
|
13014
|
+
"auto-width": props.autoWidth
|
|
12597
13015
|
};
|
|
12598
|
-
}
|
|
12599
|
-
computedSpanClass() {
|
|
12600
|
-
|
|
12601
|
-
|
|
12602
|
-
|
|
12603
|
-
|
|
12604
|
-
|
|
12605
|
-
|
|
12606
|
-
|
|
12607
|
-
|
|
12608
|
-
|
|
13016
|
+
});
|
|
13017
|
+
const computedSpanClass = computed(() => {
|
|
13018
|
+
const list = [];
|
|
13019
|
+
let align;
|
|
13020
|
+
if (props.col)
|
|
13021
|
+
align = props.col.align;
|
|
13022
|
+
if (props.align)
|
|
13023
|
+
align = props.align;
|
|
13024
|
+
if (align) {
|
|
13025
|
+
if (align === "center")
|
|
13026
|
+
list.push("align-center");
|
|
13027
|
+
if (align === "right")
|
|
13028
|
+
list.push("align-right");
|
|
13029
|
+
}
|
|
13030
|
+
if (props.block)
|
|
13031
|
+
list.push("block");
|
|
13032
|
+
if (props.block)
|
|
13033
|
+
list.push("wrap-text");
|
|
13034
|
+
return list;
|
|
13035
|
+
});
|
|
13036
|
+
const computedStyle = computed(() => {
|
|
12609
13037
|
const list = {};
|
|
12610
|
-
if (
|
|
12611
|
-
list["min-width"] =
|
|
12612
|
-
if (
|
|
12613
|
-
list["min-width"] =
|
|
12614
|
-
if (
|
|
12615
|
-
list["max-width"] =
|
|
12616
|
-
if (
|
|
12617
|
-
list["max-width"] =
|
|
12618
|
-
if (
|
|
12619
|
-
list["max-height"] =
|
|
13038
|
+
if (props.minWidth)
|
|
13039
|
+
list["min-width"] = props.minWidth;
|
|
13040
|
+
if (props.fixedWidth)
|
|
13041
|
+
list["min-width"] = props.fixedWidth;
|
|
13042
|
+
if (props.maxWidth)
|
|
13043
|
+
list["max-width"] = props.maxWidth;
|
|
13044
|
+
if (props.fixedWidth)
|
|
13045
|
+
list["max-width"] = props.fixedWidth;
|
|
13046
|
+
if (props.maxHeight)
|
|
13047
|
+
list["max-height"] = props.maxHeight;
|
|
12620
13048
|
return list;
|
|
12621
|
-
}
|
|
13049
|
+
});
|
|
13050
|
+
const isColumnDisplayed = computed(() => {
|
|
13051
|
+
if (!props.col)
|
|
13052
|
+
return true;
|
|
13053
|
+
return functions$1.isColumnDisplayed(props.col);
|
|
13054
|
+
});
|
|
13055
|
+
return (_ctx, _cache) => {
|
|
13056
|
+
return unref(isColumnDisplayed) ? (openBlock(), createElementBlock("td", {
|
|
13057
|
+
key: 0,
|
|
13058
|
+
class: normalizeClass(["ck-td", unref(computedTdClass)])
|
|
13059
|
+
}, [
|
|
13060
|
+
createElementVNode("span", {
|
|
13061
|
+
class: normalizeClass(unref(computedSpanClass)),
|
|
13062
|
+
style: normalizeStyle(unref(computedStyle))
|
|
13063
|
+
}, [
|
|
13064
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
13065
|
+
], 6)
|
|
13066
|
+
], 2)) : createCommentVNode("", true);
|
|
13067
|
+
};
|
|
12622
13068
|
}
|
|
12623
|
-
};
|
|
12624
|
-
var ckTd = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["
|
|
13069
|
+
});
|
|
13070
|
+
var ckTd = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-c34b91ca"]]);
|
|
12625
13071
|
const _hoisted_1$1 = { class: "ck-textarea" };
|
|
12626
13072
|
function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12627
13073
|
const _component_ck_label = resolveComponent("ck-label");
|
|
@@ -15263,11 +15709,12 @@ var components = /* @__PURE__ */ Object.freeze({
|
|
|
15263
15709
|
[Symbol.toStringTag]: "Module",
|
|
15264
15710
|
ckButton,
|
|
15265
15711
|
ckCheckbox,
|
|
15712
|
+
ckChip,
|
|
15266
15713
|
ckIcon,
|
|
15267
15714
|
ckImg,
|
|
15268
15715
|
ckInput,
|
|
15269
15716
|
ckLabel,
|
|
15270
|
-
ckPopup: _sfc_main$
|
|
15717
|
+
ckPopup: _sfc_main$e,
|
|
15271
15718
|
ckRadio,
|
|
15272
15719
|
ckSelect,
|
|
15273
15720
|
ckSwitch,
|
|
@@ -15314,4 +15761,4 @@ const install = function installCleek(app, options) {
|
|
|
15314
15761
|
app.component(componentName, component);
|
|
15315
15762
|
});
|
|
15316
15763
|
};
|
|
15317
|
-
export { events as EVENTS, mitt as EventBus, ckButton, ckCheckbox, ckIcon, ckImg, ckInput, ckLabel, _sfc_main$
|
|
15764
|
+
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 };
|