cleek 2.0.0 → 2.0.4
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 +662 -262
- package/dist/cleek.umd.js +6 -6
- package/dist/style.css +1 -1
- package/package.json +4 -3
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, normalizeStyle, withCtx, createTextVNode, toDisplayString, withDirectives, isRef,
|
|
20
|
+
import { defineComponent, computed, watch, h, resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, createCommentVNode, renderSlot, mergeProps, withKeys, withModifiers, createElementVNode, pushScopeId, popScopeId, ref, getCurrentInstance, onMounted, unref, normalizeStyle, 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,13 @@ 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;
|
|
81
|
+
},
|
|
82
|
+
getCleekOptions(getCurrentInstance2) {
|
|
83
|
+
return getCurrentInstance2().appContext.app.config.globalProperties.$cleekOptions;
|
|
79
84
|
}
|
|
80
85
|
};
|
|
81
86
|
var globalVariables = {
|
|
@@ -11202,7 +11207,7 @@ defineComponent({
|
|
|
11202
11207
|
};
|
|
11203
11208
|
}
|
|
11204
11209
|
});
|
|
11205
|
-
function render$
|
|
11210
|
+
function render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11206
11211
|
const _component_font_awesome_icon = resolveComponent("font-awesome-icon");
|
|
11207
11212
|
return openBlock(), createElementBlock("div", {
|
|
11208
11213
|
class: normalizeClass(["ck-icon", $options.computedClass]),
|
|
@@ -11231,7 +11236,7 @@ var _export_sfc = (sfc, props) => {
|
|
|
11231
11236
|
}
|
|
11232
11237
|
return target;
|
|
11233
11238
|
};
|
|
11234
|
-
const _sfc_main$
|
|
11239
|
+
const _sfc_main$k = {
|
|
11235
11240
|
name: "CkIcon",
|
|
11236
11241
|
components: {
|
|
11237
11242
|
FontAwesomeIcon
|
|
@@ -11278,9 +11283,9 @@ const _sfc_main$j = {
|
|
|
11278
11283
|
}
|
|
11279
11284
|
}
|
|
11280
11285
|
};
|
|
11281
|
-
var ckIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11282
|
-
const _hoisted_1$
|
|
11283
|
-
function render$
|
|
11286
|
+
var ckIcon = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", render$b], ["__scopeId", "data-v-77d9963a"]]);
|
|
11287
|
+
const _hoisted_1$h = ["title", "aria-label", "disabled"];
|
|
11288
|
+
function render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11284
11289
|
const _component_ck_icon = resolveComponent("ck-icon");
|
|
11285
11290
|
return openBlock(), createElementBlock("button", {
|
|
11286
11291
|
type: "button",
|
|
@@ -11303,13 +11308,13 @@ function render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11303
11308
|
icon: $props.iconRight,
|
|
11304
11309
|
"icon-pack": $props.iconPack
|
|
11305
11310
|
}, null, 8, ["icon", "icon-pack"])) : createCommentVNode("", true)
|
|
11306
|
-
], 10, _hoisted_1$
|
|
11311
|
+
], 10, _hoisted_1$h);
|
|
11307
11312
|
}
|
|
11308
11313
|
var ckButton_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
11309
11314
|
const defaultType = "outlined";
|
|
11310
11315
|
const defaultColor = "primary";
|
|
11311
11316
|
const defaultAlign = "left";
|
|
11312
|
-
const _sfc_main$
|
|
11317
|
+
const _sfc_main$j = {
|
|
11313
11318
|
name: "CkButton",
|
|
11314
11319
|
components: {
|
|
11315
11320
|
ckIcon
|
|
@@ -11363,15 +11368,15 @@ const _sfc_main$i = {
|
|
|
11363
11368
|
}
|
|
11364
11369
|
}
|
|
11365
11370
|
};
|
|
11366
|
-
var ckButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11371
|
+
var ckButton = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", render$a], ["__scopeId", "data-v-a687842a"]]);
|
|
11367
11372
|
const _withScopeId$2 = (n) => (pushScopeId("data-v-69dfa524"), n = n(), popScopeId(), n);
|
|
11368
|
-
const _hoisted_1$
|
|
11369
|
-
const _hoisted_2$
|
|
11373
|
+
const _hoisted_1$g = ["disabled", "checked"];
|
|
11374
|
+
const _hoisted_2$8 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", { class: "ck-checkbox__element" }, null, -1));
|
|
11370
11375
|
const _hoisted_3$5 = {
|
|
11371
11376
|
key: 0,
|
|
11372
11377
|
class: "c-Checkbox__label"
|
|
11373
11378
|
};
|
|
11374
|
-
function render$
|
|
11379
|
+
function render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11375
11380
|
return openBlock(), createElementBlock("label", mergeProps({ class: "ck-checkbox" }, $options.checkboxAttributes, {
|
|
11376
11381
|
onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(() => {
|
|
11377
11382
|
}, ["prevent"]), ["space"])),
|
|
@@ -11390,15 +11395,15 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11390
11395
|
$options.value = $event.target.checked;
|
|
11391
11396
|
$options.onChange($event);
|
|
11392
11397
|
})
|
|
11393
|
-
}, null, 40, _hoisted_1$
|
|
11394
|
-
_hoisted_2$
|
|
11398
|
+
}, null, 40, _hoisted_1$g),
|
|
11399
|
+
_hoisted_2$8,
|
|
11395
11400
|
_ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_3$5, [
|
|
11396
11401
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
11397
11402
|
])) : createCommentVNode("", true)
|
|
11398
11403
|
], 16);
|
|
11399
11404
|
}
|
|
11400
11405
|
var ckCheckbox_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
11401
|
-
const _sfc_main$
|
|
11406
|
+
const _sfc_main$i = {
|
|
11402
11407
|
name: "CkCheckbox",
|
|
11403
11408
|
props: {
|
|
11404
11409
|
modelValue: { type: Boolean, default: false },
|
|
@@ -11431,27 +11436,15 @@ const _sfc_main$h = {
|
|
|
11431
11436
|
}
|
|
11432
11437
|
}
|
|
11433
11438
|
};
|
|
11434
|
-
var ckCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11435
|
-
const _hoisted_1$e = ["src"];
|
|
11436
|
-
function render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11437
|
-
return openBlock(), createElementBlock("div", {
|
|
11438
|
-
class: normalizeClass(["ck-img", $options.computedClass]),
|
|
11439
|
-
style: normalizeStyle($options.computedStyle),
|
|
11440
|
-
onClick: _cache[1] || (_cache[1] = ($event) => $options.clickImg())
|
|
11441
|
-
}, [
|
|
11442
|
-
createElementVNode("img", {
|
|
11443
|
-
src: $options.imageUrl,
|
|
11444
|
-
style: normalizeStyle($options.computedImgStyle),
|
|
11445
|
-
onError: _cache[0] || (_cache[0] = ($event) => _ctx.altNeeded = true)
|
|
11446
|
-
}, null, 44, _hoisted_1$e)
|
|
11447
|
-
], 6);
|
|
11448
|
-
}
|
|
11439
|
+
var ckCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", render$9], ["__scopeId", "data-v-69dfa524"]]);
|
|
11449
11440
|
var ckImg_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
11450
|
-
const
|
|
11441
|
+
const _hoisted_1$f = ["src", "alt"];
|
|
11442
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
11451
11443
|
props: {
|
|
11452
11444
|
src: { type: String, default: "" },
|
|
11453
11445
|
isFullPath: { type: Boolean, default: false },
|
|
11454
11446
|
failImgSrc: { type: String, default: "" },
|
|
11447
|
+
alt: { type: String, default: "" },
|
|
11455
11448
|
size: { type: String, default: "", validator: validators.size },
|
|
11456
11449
|
sizeAbsolute: { type: String, default: "" },
|
|
11457
11450
|
width: { type: String, default: "" },
|
|
@@ -11462,88 +11455,110 @@ const _sfc_main$g = {
|
|
|
11462
11455
|
radius: { type: String, default: "" },
|
|
11463
11456
|
borderColor: { type: String, default: "" }
|
|
11464
11457
|
},
|
|
11465
|
-
|
|
11466
|
-
|
|
11467
|
-
|
|
11468
|
-
|
|
11469
|
-
|
|
11470
|
-
|
|
11471
|
-
|
|
11458
|
+
setup(__props) {
|
|
11459
|
+
const props = __props;
|
|
11460
|
+
const altNeeded = ref(false);
|
|
11461
|
+
let isMounted = ref(false);
|
|
11462
|
+
const imageUrl = computed(() => {
|
|
11463
|
+
if (!isMounted.value)
|
|
11464
|
+
return "";
|
|
11465
|
+
if (props.isFullPath)
|
|
11466
|
+
return props.src;
|
|
11467
|
+
return getImg(props.src);
|
|
11468
|
+
});
|
|
11469
|
+
const computedClass = computed(() => {
|
|
11472
11470
|
const classList2 = [];
|
|
11473
|
-
let
|
|
11474
|
-
if (size
|
|
11471
|
+
let size = props.size;
|
|
11472
|
+
if (!size && !props.sizeAbsolute && !props.width && !props.height) {
|
|
11475
11473
|
size = "m";
|
|
11476
11474
|
}
|
|
11477
11475
|
if (size)
|
|
11478
11476
|
classList2.push(`ck-img__size--${size}`);
|
|
11479
|
-
if (
|
|
11477
|
+
if (props.hasBorder) {
|
|
11480
11478
|
classList2.push("ck-img__has-border");
|
|
11481
|
-
if (functions$1.isColorTemplateVariable(
|
|
11482
|
-
classList2.push(`ck-component__border-color--${
|
|
11479
|
+
if (functions$1.isColorTemplateVariable(realBorderColor.value)) {
|
|
11480
|
+
classList2.push(`ck-component__border-color--${realBorderColor.value}`);
|
|
11483
11481
|
}
|
|
11484
11482
|
}
|
|
11485
|
-
if (
|
|
11483
|
+
if (props.zoom)
|
|
11486
11484
|
classList2.push("zoom-able");
|
|
11487
11485
|
return classList2;
|
|
11488
|
-
}
|
|
11489
|
-
computedStyle() {
|
|
11486
|
+
});
|
|
11487
|
+
const computedStyle = computed(() => {
|
|
11490
11488
|
const styleList = [];
|
|
11491
|
-
if (
|
|
11492
|
-
styleList.push({ width:
|
|
11493
|
-
styleList.push({ height:
|
|
11489
|
+
if (props.sizeAbsolute) {
|
|
11490
|
+
styleList.push({ width: props.sizeAbsolute });
|
|
11491
|
+
styleList.push({ height: props.sizeAbsolute });
|
|
11494
11492
|
}
|
|
11495
|
-
if (
|
|
11496
|
-
styleList.push({ "border-radius":
|
|
11497
|
-
if (
|
|
11498
|
-
if (!functions$1.isColorTemplateVariable(
|
|
11499
|
-
styleList.push({ "border-color":
|
|
11493
|
+
if (props.radius)
|
|
11494
|
+
styleList.push({ "border-radius": props.radius });
|
|
11495
|
+
if (props.hasBorder) {
|
|
11496
|
+
if (!functions$1.isColorTemplateVariable(realBorderColor.value)) {
|
|
11497
|
+
styleList.push({ "border-color": realBorderColor.value });
|
|
11500
11498
|
}
|
|
11501
11499
|
}
|
|
11502
11500
|
return styleList;
|
|
11503
|
-
}
|
|
11504
|
-
computedImgStyle() {
|
|
11501
|
+
});
|
|
11502
|
+
const computedImgStyle = computed(() => {
|
|
11505
11503
|
const styleList = [];
|
|
11506
|
-
if (
|
|
11507
|
-
styleList.push({ "border-radius":
|
|
11508
|
-
if (
|
|
11509
|
-
styleList.push({ width:
|
|
11510
|
-
if (
|
|
11511
|
-
styleList.push({ height:
|
|
11504
|
+
if (props.radius)
|
|
11505
|
+
styleList.push({ "border-radius": props.radius });
|
|
11506
|
+
if (props.width)
|
|
11507
|
+
styleList.push({ width: props.width });
|
|
11508
|
+
if (props.height)
|
|
11509
|
+
styleList.push({ height: props.height });
|
|
11512
11510
|
return styleList;
|
|
11513
|
-
}
|
|
11514
|
-
realBorderColor() {
|
|
11515
|
-
if (
|
|
11516
|
-
return
|
|
11511
|
+
});
|
|
11512
|
+
const realBorderColor = computed(() => {
|
|
11513
|
+
if (props.borderColor)
|
|
11514
|
+
return props.borderColor;
|
|
11517
11515
|
return globalVariables.defaultImgBorderColor;
|
|
11518
|
-
}
|
|
11519
|
-
|
|
11520
|
-
|
|
11521
|
-
|
|
11522
|
-
|
|
11523
|
-
|
|
11524
|
-
|
|
11525
|
-
|
|
11526
|
-
|
|
11527
|
-
|
|
11516
|
+
});
|
|
11517
|
+
function clickImg() {
|
|
11518
|
+
if (props.zoom)
|
|
11519
|
+
;
|
|
11520
|
+
}
|
|
11521
|
+
function getImg(src) {
|
|
11522
|
+
let path = "";
|
|
11523
|
+
const $cleekOptions = functions$1.getCleekOptions(getCurrentInstance);
|
|
11524
|
+
if ($cleekOptions) {
|
|
11525
|
+
if ($cleekOptions.imgPath)
|
|
11526
|
+
path = $cleekOptions.imgPath;
|
|
11528
11527
|
}
|
|
11529
|
-
|
|
11530
|
-
getImg(src) {
|
|
11531
|
-
return `${globalVariables.imagesFolderPath}${src}`;
|
|
11528
|
+
return `${path}${src}`;
|
|
11532
11529
|
}
|
|
11530
|
+
onMounted(() => {
|
|
11531
|
+
getCurrentInstance().ctx;
|
|
11532
|
+
isMounted.value = true;
|
|
11533
|
+
});
|
|
11534
|
+
return (_ctx, _cache) => {
|
|
11535
|
+
return openBlock(), createElementBlock("div", {
|
|
11536
|
+
class: normalizeClass(["ck-img", unref(computedClass)]),
|
|
11537
|
+
style: normalizeStyle(unref(computedStyle)),
|
|
11538
|
+
onClick: _cache[1] || (_cache[1] = ($event) => clickImg())
|
|
11539
|
+
}, [
|
|
11540
|
+
createElementVNode("img", {
|
|
11541
|
+
src: unref(imageUrl),
|
|
11542
|
+
style: normalizeStyle(unref(computedImgStyle)),
|
|
11543
|
+
alt: __props.alt,
|
|
11544
|
+
onError: _cache[0] || (_cache[0] = ($event) => altNeeded.value = true)
|
|
11545
|
+
}, null, 44, _hoisted_1$f)
|
|
11546
|
+
], 6);
|
|
11547
|
+
};
|
|
11533
11548
|
}
|
|
11534
|
-
};
|
|
11535
|
-
var ckImg = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11536
|
-
const _hoisted_1$
|
|
11537
|
-
function render$
|
|
11549
|
+
});
|
|
11550
|
+
var ckImg = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-53d78f2e"]]);
|
|
11551
|
+
const _hoisted_1$e = ["for"];
|
|
11552
|
+
function render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11538
11553
|
return openBlock(), createElementBlock("label", {
|
|
11539
11554
|
class: normalizeClass(["ck-label", $options.computedClass]),
|
|
11540
11555
|
for: $props.for
|
|
11541
11556
|
}, [
|
|
11542
11557
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
11543
|
-
], 10, _hoisted_1$
|
|
11558
|
+
], 10, _hoisted_1$e);
|
|
11544
11559
|
}
|
|
11545
11560
|
var ckLabel_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
11546
|
-
const _sfc_main$
|
|
11561
|
+
const _sfc_main$g = {
|
|
11547
11562
|
name: "CkLabel",
|
|
11548
11563
|
props: {
|
|
11549
11564
|
for: { type: String, default: "" },
|
|
@@ -11560,11 +11575,11 @@ const _sfc_main$f = {
|
|
|
11560
11575
|
}
|
|
11561
11576
|
}
|
|
11562
11577
|
};
|
|
11563
|
-
var ckLabel = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11578
|
+
var ckLabel = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", render$8], ["__scopeId", "data-v-4b8b9ab4"]]);
|
|
11564
11579
|
var ckInput_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
11565
|
-
const _hoisted_1$
|
|
11566
|
-
const _hoisted_2$
|
|
11567
|
-
const _sfc_main$
|
|
11580
|
+
const _hoisted_1$d = { class: "ck-input" };
|
|
11581
|
+
const _hoisted_2$7 = ["type", "placeholder", "id", "disabled"];
|
|
11582
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
11568
11583
|
props: {
|
|
11569
11584
|
modelValue: {},
|
|
11570
11585
|
type: { type: String, validator: validators.inputType, default: "text" },
|
|
@@ -11625,7 +11640,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
11625
11640
|
return list;
|
|
11626
11641
|
});
|
|
11627
11642
|
return (_ctx, _cache) => {
|
|
11628
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
11643
|
+
return openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
11629
11644
|
__props.label ? (openBlock(), createBlock(ckLabel, {
|
|
11630
11645
|
key: 0,
|
|
11631
11646
|
align: __props.labelAlign,
|
|
@@ -11654,7 +11669,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
11654
11669
|
onChange: _cache[1] || (_cache[1] = ($event) => onChange($event)),
|
|
11655
11670
|
onInput: _cache[2] || (_cache[2] = ($event) => onInput($event)),
|
|
11656
11671
|
onClick: _cache[3] || (_cache[3] = ($event) => onClick($event))
|
|
11657
|
-
}, null, 46, _hoisted_2$
|
|
11672
|
+
}, null, 46, _hoisted_2$7), [
|
|
11658
11673
|
[vModelDynamic, unref(value)]
|
|
11659
11674
|
]),
|
|
11660
11675
|
__props.iconRight ? (openBlock(), createBlock(ckIcon, {
|
|
@@ -11668,13 +11683,13 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
11668
11683
|
};
|
|
11669
11684
|
}
|
|
11670
11685
|
});
|
|
11671
|
-
var ckInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11686
|
+
var ckInput = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-61fababc"]]);
|
|
11672
11687
|
var ckPopup_vue_vue_type_style_index_0_lang = "";
|
|
11673
|
-
const _hoisted_1$
|
|
11688
|
+
const _hoisted_1$c = {
|
|
11674
11689
|
key: 0,
|
|
11675
11690
|
class: "ck-popup"
|
|
11676
11691
|
};
|
|
11677
|
-
const _hoisted_2$
|
|
11692
|
+
const _hoisted_2$6 = /* @__PURE__ */ createElementVNode("div", { class: "blackout" }, null, -1);
|
|
11678
11693
|
const _hoisted_3$4 = { class: "ck-popup__slot-header" };
|
|
11679
11694
|
const _hoisted_4$2 = {
|
|
11680
11695
|
key: 0,
|
|
@@ -11727,11 +11742,11 @@ const __default__$1 = {
|
|
|
11727
11742
|
}
|
|
11728
11743
|
}
|
|
11729
11744
|
};
|
|
11730
|
-
const _sfc_main$
|
|
11745
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$1), {
|
|
11731
11746
|
setup(__props) {
|
|
11732
11747
|
return (_ctx, _cache) => {
|
|
11733
|
-
return _ctx.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
11734
|
-
_hoisted_2$
|
|
11748
|
+
return _ctx.value ? (openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
11749
|
+
_hoisted_2$6,
|
|
11735
11750
|
createElementVNode("div", {
|
|
11736
11751
|
class: "popup-container",
|
|
11737
11752
|
onClick: _cache[4] || (_cache[4] = ($event) => _ctx.onBgClick())
|
|
@@ -11784,14 +11799,14 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
11784
11799
|
}
|
|
11785
11800
|
}));
|
|
11786
11801
|
const _withScopeId$1 = (n) => (pushScopeId("data-v-73a891e8"), n = n(), popScopeId(), n);
|
|
11787
|
-
const _hoisted_1$
|
|
11788
|
-
const _hoisted_2$
|
|
11802
|
+
const _hoisted_1$b = ["onKeyup"];
|
|
11803
|
+
const _hoisted_2$5 = ["name", "value", "disabled"];
|
|
11789
11804
|
const _hoisted_3$3 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", { class: "c-Radio__element" }, null, -1));
|
|
11790
11805
|
const _hoisted_4$1 = {
|
|
11791
11806
|
key: 0,
|
|
11792
11807
|
class: "c-Radio__label"
|
|
11793
11808
|
};
|
|
11794
|
-
function render$
|
|
11809
|
+
function render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11795
11810
|
return openBlock(true), createElementBlock(Fragment, null, renderList($props.options, (item, index) => {
|
|
11796
11811
|
return openBlock(), createElementBlock("label", mergeProps({
|
|
11797
11812
|
key: `radio-${index}`,
|
|
@@ -11812,16 +11827,16 @@ function render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11812
11827
|
name: $props.name,
|
|
11813
11828
|
value: item.value,
|
|
11814
11829
|
disabled: $props.disabled
|
|
11815
|
-
}, null, 8, _hoisted_2$
|
|
11830
|
+
}, null, 8, _hoisted_2$5), [
|
|
11816
11831
|
[vModelRadio, $options.value]
|
|
11817
11832
|
]),
|
|
11818
11833
|
_hoisted_3$3,
|
|
11819
11834
|
item.label ? (openBlock(), createElementBlock("span", _hoisted_4$1, toDisplayString(item.label), 1)) : createCommentVNode("", true)
|
|
11820
|
-
], 16, _hoisted_1$
|
|
11835
|
+
], 16, _hoisted_1$b);
|
|
11821
11836
|
}), 128);
|
|
11822
11837
|
}
|
|
11823
11838
|
var ckRadio_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
11824
|
-
const _sfc_main$
|
|
11839
|
+
const _sfc_main$d = {
|
|
11825
11840
|
name: "CkRadio",
|
|
11826
11841
|
props: {
|
|
11827
11842
|
modelValue: { type: String, default: void 0 },
|
|
@@ -11853,7 +11868,100 @@ const _sfc_main$c = {
|
|
|
11853
11868
|
}
|
|
11854
11869
|
}
|
|
11855
11870
|
};
|
|
11856
|
-
var ckRadio = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11871
|
+
var ckRadio = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", render$7], ["__scopeId", "data-v-73a891e8"]]);
|
|
11872
|
+
var qmApi = {};
|
|
11873
|
+
var qmArray = {
|
|
11874
|
+
arrayToText(arr, key = null) {
|
|
11875
|
+
let msg = "";
|
|
11876
|
+
for (let index = 0; index < arr.length; index++) {
|
|
11877
|
+
if (index) {
|
|
11878
|
+
if (index === arr.length - 1) {
|
|
11879
|
+
msg += " y ";
|
|
11880
|
+
} else {
|
|
11881
|
+
msg += ", ";
|
|
11882
|
+
}
|
|
11883
|
+
}
|
|
11884
|
+
let word;
|
|
11885
|
+
if (key) {
|
|
11886
|
+
word = arr[index][key];
|
|
11887
|
+
} else {
|
|
11888
|
+
word = arr[index];
|
|
11889
|
+
}
|
|
11890
|
+
msg += `"${word}"`;
|
|
11891
|
+
}
|
|
11892
|
+
return msg;
|
|
11893
|
+
},
|
|
11894
|
+
getRandomElementOfArray(arr) {
|
|
11895
|
+
return arr[Math.floor(Math.random() * arr.length)];
|
|
11896
|
+
},
|
|
11897
|
+
hexToRGBA(hex, alpha) {
|
|
11898
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
11899
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
11900
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
11901
|
+
if (alpha)
|
|
11902
|
+
return `rgba(${r}, ${g}, ${b}, ${alpha})`;
|
|
11903
|
+
return `rgb(${r}, ${g}, ${b})`;
|
|
11904
|
+
},
|
|
11905
|
+
removeOfArray(list, findFunction) {
|
|
11906
|
+
if (!list || !findFunction)
|
|
11907
|
+
return;
|
|
11908
|
+
const index = list.findIndex(findFunction);
|
|
11909
|
+
if (index === -1)
|
|
11910
|
+
return;
|
|
11911
|
+
list.splice(index, 1);
|
|
11912
|
+
},
|
|
11913
|
+
removeOfArrayById(list, id) {
|
|
11914
|
+
const index = list.findIndex((i) => i.id === id);
|
|
11915
|
+
if (index === -1)
|
|
11916
|
+
return;
|
|
11917
|
+
list.splice(index, 1);
|
|
11918
|
+
},
|
|
11919
|
+
replaceInList(arr, NewItem, prop = "id") {
|
|
11920
|
+
if (!NewItem)
|
|
11921
|
+
return;
|
|
11922
|
+
const index = arr.findIndex((i) => i[prop] === NewItem[prop]);
|
|
11923
|
+
if (index !== -1)
|
|
11924
|
+
arr.splice(index, 1, NewItem);
|
|
11925
|
+
},
|
|
11926
|
+
sort(arr, keys) {
|
|
11927
|
+
if (typeof keys === "string")
|
|
11928
|
+
keys = [keys];
|
|
11929
|
+
if (keys.length === 2) {
|
|
11930
|
+
if (keys[1] === "DESC" || keys[1] === "ASC") {
|
|
11931
|
+
keys = [keys];
|
|
11932
|
+
}
|
|
11933
|
+
}
|
|
11934
|
+
const finalKeys = [];
|
|
11935
|
+
keys.forEach((key) => {
|
|
11936
|
+
if (typeof key === "string")
|
|
11937
|
+
key = [key];
|
|
11938
|
+
if (typeof key[1] === "undefined")
|
|
11939
|
+
key[1] = "ASC";
|
|
11940
|
+
finalKeys.push(key);
|
|
11941
|
+
});
|
|
11942
|
+
return arr.sort((a, b) => {
|
|
11943
|
+
let value = 0;
|
|
11944
|
+
finalKeys.forEach(([key, order2]) => {
|
|
11945
|
+
if (!value) {
|
|
11946
|
+
const mult = order2 === "DESC" ? -1 : 1;
|
|
11947
|
+
if (a[key] < b[key])
|
|
11948
|
+
value = -1 * mult;
|
|
11949
|
+
if (a[key] > b[key])
|
|
11950
|
+
value = 1 * mult;
|
|
11951
|
+
}
|
|
11952
|
+
});
|
|
11953
|
+
return value;
|
|
11954
|
+
});
|
|
11955
|
+
}
|
|
11956
|
+
};
|
|
11957
|
+
var qmAudio = {
|
|
11958
|
+
reproduceAudio(path) {
|
|
11959
|
+
if (path) {
|
|
11960
|
+
const audio = new Audio(path);
|
|
11961
|
+
audio.play();
|
|
11962
|
+
}
|
|
11963
|
+
}
|
|
11964
|
+
};
|
|
11857
11965
|
const qmStr = {
|
|
11858
11966
|
capitalize(str) {
|
|
11859
11967
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
@@ -11871,6 +11979,15 @@ const qmStr = {
|
|
|
11871
11979
|
str = str.toLowerCase();
|
|
11872
11980
|
return str;
|
|
11873
11981
|
},
|
|
11982
|
+
getRandomStr(length = 10) {
|
|
11983
|
+
let result = "";
|
|
11984
|
+
const characters = "ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz123456789";
|
|
11985
|
+
const charactersLength = characters.length;
|
|
11986
|
+
for (let i = 0; i < length; i++) {
|
|
11987
|
+
result += characters.charAt(Math.floor(Math.random() * charactersLength));
|
|
11988
|
+
}
|
|
11989
|
+
return result;
|
|
11990
|
+
},
|
|
11874
11991
|
padZeros(num, size = 2) {
|
|
11875
11992
|
return `000000000${num}`.substr(-size);
|
|
11876
11993
|
},
|
|
@@ -11890,9 +12007,146 @@ const qmStr = {
|
|
|
11890
12007
|
return joinArray;
|
|
11891
12008
|
}
|
|
11892
12009
|
};
|
|
12010
|
+
var qmNum = {
|
|
12011
|
+
getRandomInt(min2, max2) {
|
|
12012
|
+
min2 = Math.ceil(min2);
|
|
12013
|
+
max2 = Math.floor(max2);
|
|
12014
|
+
return Math.floor(Math.random() * (max2 - min2 + 1)) + min2;
|
|
12015
|
+
},
|
|
12016
|
+
setPrice(num, { precision = 2 } = {}) {
|
|
12017
|
+
if (!num)
|
|
12018
|
+
return 0;
|
|
12019
|
+
return +parseFloat(num).toFixed(precision);
|
|
12020
|
+
},
|
|
12021
|
+
presentNum(num, forceDecimal = false) {
|
|
12022
|
+
num = +num;
|
|
12023
|
+
let finalInt = "0";
|
|
12024
|
+
let decimal = "00";
|
|
12025
|
+
const isNegative = num < 0;
|
|
12026
|
+
const isValidNum = !(!num || !+num);
|
|
12027
|
+
if (isValidNum) {
|
|
12028
|
+
num = parseFloat(Math.abs(num)).toFixed(2);
|
|
12029
|
+
decimal = num.substring(num.length - 2, num.length);
|
|
12030
|
+
const int = num.substring(0, num.length - 3);
|
|
12031
|
+
const reversedInt = qmStr.reverseString(int);
|
|
12032
|
+
let reversedRealInt = "";
|
|
12033
|
+
for (let i = 0; i < reversedInt.length; i++) {
|
|
12034
|
+
reversedRealInt += reversedInt.charAt(i);
|
|
12035
|
+
if (i + 1 >= reversedInt.length)
|
|
12036
|
+
continue;
|
|
12037
|
+
if ((i + 1) % 3)
|
|
12038
|
+
continue;
|
|
12039
|
+
reversedRealInt += ".";
|
|
12040
|
+
}
|
|
12041
|
+
finalInt = qmStr.reverseString(reversedRealInt);
|
|
12042
|
+
}
|
|
12043
|
+
let finalValue = finalInt;
|
|
12044
|
+
if (isNegative)
|
|
12045
|
+
finalValue = `-${finalValue}`;
|
|
12046
|
+
if (forceDecimal || +decimal) {
|
|
12047
|
+
finalValue = `${finalValue},${decimal}`;
|
|
12048
|
+
}
|
|
12049
|
+
return finalValue;
|
|
12050
|
+
},
|
|
12051
|
+
removeNoNumber(str, isFloat = false) {
|
|
12052
|
+
let newStr = "";
|
|
12053
|
+
str = str.toString();
|
|
12054
|
+
for (let i = 0; i < str.length; i++) {
|
|
12055
|
+
if (str[i] == parseInt(str[i], 10)) {
|
|
12056
|
+
newStr += str[i];
|
|
12057
|
+
} else if (isFloat && str[i] == "," || isFloat && str[i] == ".") {
|
|
12058
|
+
newStr += ".";
|
|
12059
|
+
isFloat = false;
|
|
12060
|
+
}
|
|
12061
|
+
}
|
|
12062
|
+
return newStr;
|
|
12063
|
+
},
|
|
12064
|
+
showPrice(num, Extra = { hideIcon: false, currency: "$" }) {
|
|
12065
|
+
if (Extra.hideIcon !== true)
|
|
12066
|
+
Extra.hideIcon = false;
|
|
12067
|
+
let presentedNum = this.presentNum(num, true);
|
|
12068
|
+
const isNegative = presentedNum[0] === "-";
|
|
12069
|
+
if (isNegative)
|
|
12070
|
+
presentedNum = presentedNum.substring(1, presentedNum.length);
|
|
12071
|
+
if (!Extra.hideIcon)
|
|
12072
|
+
presentedNum = `${Extra.currency}${presentedNum}`;
|
|
12073
|
+
if (isNegative)
|
|
12074
|
+
presentedNum = `- ${presentedNum}`;
|
|
12075
|
+
return presentedNum;
|
|
12076
|
+
},
|
|
12077
|
+
simplifyNum(num) {
|
|
12078
|
+
if (!(num % 1))
|
|
12079
|
+
return Math.floor(num);
|
|
12080
|
+
return this.presentNum(num);
|
|
12081
|
+
}
|
|
12082
|
+
};
|
|
12083
|
+
function getKeyValue(obj, key) {
|
|
12084
|
+
return obj[key];
|
|
12085
|
+
}
|
|
12086
|
+
function setKeyValue(obj, key, value) {
|
|
12087
|
+
obj[key] = value;
|
|
12088
|
+
}
|
|
12089
|
+
var qmObj = {
|
|
12090
|
+
addEmptyOptionToList(optionsList, { prop = "name", title = "Todos", noneId = 0 } = {}) {
|
|
12091
|
+
const noneOption = {
|
|
12092
|
+
id: noneId,
|
|
12093
|
+
[prop]: title
|
|
12094
|
+
};
|
|
12095
|
+
const newList = [...optionsList];
|
|
12096
|
+
newList.unshift(noneOption);
|
|
12097
|
+
return newList;
|
|
12098
|
+
},
|
|
12099
|
+
copyAvaibleFields(ObjEditable, ObjToCopy) {
|
|
12100
|
+
for (const key in ObjEditable) {
|
|
12101
|
+
if (typeof getKeyValue(ObjToCopy, key) !== "undefined") {
|
|
12102
|
+
setKeyValue(ObjEditable, key, getKeyValue(ObjToCopy, key));
|
|
12103
|
+
}
|
|
12104
|
+
}
|
|
12105
|
+
},
|
|
12106
|
+
isArray(obj) {
|
|
12107
|
+
return obj.constructor === Array;
|
|
12108
|
+
},
|
|
12109
|
+
objsAreTheSame(obj1, obj2) {
|
|
12110
|
+
for (const key in obj1) {
|
|
12111
|
+
if (getKeyValue(obj1, key) != getKeyValue(obj2, key))
|
|
12112
|
+
return false;
|
|
12113
|
+
}
|
|
12114
|
+
for (const key in obj2) {
|
|
12115
|
+
if (getKeyValue(obj1, key) != getKeyValue(obj2, key))
|
|
12116
|
+
return false;
|
|
12117
|
+
}
|
|
12118
|
+
return true;
|
|
12119
|
+
},
|
|
12120
|
+
qoIsObjEmpty(obj = {}) {
|
|
12121
|
+
return obj && Object.keys(obj).length === 0 && Object.getPrototypeOf(obj) === Object.prototype;
|
|
12122
|
+
}
|
|
12123
|
+
};
|
|
12124
|
+
var main$1 = {
|
|
12125
|
+
qmApi,
|
|
12126
|
+
qmArray,
|
|
12127
|
+
qmAudio,
|
|
12128
|
+
qmNum,
|
|
12129
|
+
qmObj,
|
|
12130
|
+
qmStr
|
|
12131
|
+
};
|
|
12132
|
+
var App;
|
|
12133
|
+
(function(App2) {
|
|
12134
|
+
class SomeClass {
|
|
12135
|
+
getName() {
|
|
12136
|
+
return "name";
|
|
12137
|
+
}
|
|
12138
|
+
}
|
|
12139
|
+
App2.SomeClass = SomeClass;
|
|
12140
|
+
class OtherClass {
|
|
12141
|
+
getName() {
|
|
12142
|
+
return "name";
|
|
12143
|
+
}
|
|
12144
|
+
}
|
|
12145
|
+
App2.OtherClass = OtherClass;
|
|
12146
|
+
})(App || (App = {}));
|
|
11893
12147
|
var ckSelect_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
11894
|
-
const _hoisted_1$
|
|
11895
|
-
const _sfc_main$
|
|
12148
|
+
const _hoisted_1$a = ["value"];
|
|
12149
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
11896
12150
|
props: {
|
|
11897
12151
|
modelValue: { default: null, type: [Boolean, Number, Object, Array, String] },
|
|
11898
12152
|
prop: { type: String, default: "name" },
|
|
@@ -11917,6 +12171,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
11917
12171
|
emits: ["update:modelValue", "click", "change"],
|
|
11918
12172
|
setup(__props, { emit: emits }) {
|
|
11919
12173
|
const props = __props;
|
|
12174
|
+
const { qmStr: qmStr2 } = main$1;
|
|
11920
12175
|
const search = ref("");
|
|
11921
12176
|
ref(null);
|
|
11922
12177
|
const value = computed({
|
|
@@ -11932,7 +12187,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
11932
12187
|
const filteredOptions = computed(() => {
|
|
11933
12188
|
const list = props.options.filter((option) => {
|
|
11934
12189
|
const name = getOptionName(option);
|
|
11935
|
-
return
|
|
12190
|
+
return qmStr2.checkContainsStr(name, search.value);
|
|
11936
12191
|
});
|
|
11937
12192
|
return list;
|
|
11938
12193
|
});
|
|
@@ -12030,7 +12285,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
12030
12285
|
return openBlock(), createElementBlock("option", {
|
|
12031
12286
|
value: getOptionKey(option),
|
|
12032
12287
|
key: option
|
|
12033
|
-
}, toDisplayString(getOptionName(option)), 9, _hoisted_1$
|
|
12288
|
+
}, toDisplayString(getOptionName(option)), 9, _hoisted_1$a);
|
|
12034
12289
|
}), 128))
|
|
12035
12290
|
], 34), [
|
|
12036
12291
|
[vModelSelect, unref(value)]
|
|
@@ -12039,15 +12294,15 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
12039
12294
|
};
|
|
12040
12295
|
}
|
|
12041
12296
|
});
|
|
12042
|
-
var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12297
|
+
var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-31af160a"]]);
|
|
12043
12298
|
const _withScopeId = (n) => (pushScopeId("data-v-022b9f3c"), n = n(), popScopeId(), n);
|
|
12044
|
-
const _hoisted_1$
|
|
12045
|
-
const _hoisted_2$
|
|
12299
|
+
const _hoisted_1$9 = ["disabled"];
|
|
12300
|
+
const _hoisted_2$4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "ck-switch__slider" }, null, -1));
|
|
12046
12301
|
const _hoisted_3$2 = {
|
|
12047
12302
|
key: 0,
|
|
12048
12303
|
class: "ck-switch__content"
|
|
12049
12304
|
};
|
|
12050
|
-
function render$
|
|
12305
|
+
function render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12051
12306
|
return openBlock(), createElementBlock("label", mergeProps({ class: "ck-switch" }, $options.computedAttributes, {
|
|
12052
12307
|
class: $options.computedClass,
|
|
12053
12308
|
onKeydown: _cache[2] || (_cache[2] = withKeys(withModifiers(() => {
|
|
@@ -12064,17 +12319,17 @@ function render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
12064
12319
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $options.value = $event),
|
|
12065
12320
|
disabled: $props.disabled,
|
|
12066
12321
|
onClick: _cache[1] || (_cache[1] = ($event) => $options.onTrigger())
|
|
12067
|
-
}, null, 8, _hoisted_1$
|
|
12322
|
+
}, null, 8, _hoisted_1$9), [
|
|
12068
12323
|
[vModelCheckbox, $options.value]
|
|
12069
12324
|
]),
|
|
12070
|
-
_hoisted_2$
|
|
12325
|
+
_hoisted_2$4,
|
|
12071
12326
|
_ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_3$2, [
|
|
12072
12327
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
12073
12328
|
])) : createCommentVNode("", true)
|
|
12074
12329
|
], 16);
|
|
12075
12330
|
}
|
|
12076
12331
|
var ckSwitch_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12077
|
-
const _sfc_main$
|
|
12332
|
+
const _sfc_main$b = {
|
|
12078
12333
|
name: "Switch",
|
|
12079
12334
|
props: {
|
|
12080
12335
|
modelValue: { type: Boolean, default: false },
|
|
@@ -12113,12 +12368,12 @@ const _sfc_main$a = {
|
|
|
12113
12368
|
}
|
|
12114
12369
|
}
|
|
12115
12370
|
};
|
|
12116
|
-
var ckSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12117
|
-
const _hoisted_1$
|
|
12118
|
-
const _hoisted_2$
|
|
12119
|
-
function render$
|
|
12371
|
+
var ckSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", render$6], ["__scopeId", "data-v-022b9f3c"]]);
|
|
12372
|
+
const _hoisted_1$8 = { class: "ck-switch-options__container-exterior" };
|
|
12373
|
+
const _hoisted_2$3 = ["onClick"];
|
|
12374
|
+
function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12120
12375
|
const _component_ck_label = resolveComponent("ck-label");
|
|
12121
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12376
|
+
return openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
12122
12377
|
$props.label ? (openBlock(), createBlock(_component_ck_label, {
|
|
12123
12378
|
key: 0,
|
|
12124
12379
|
align: $props.labelAlign
|
|
@@ -12137,13 +12392,13 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
12137
12392
|
key: `ck-switch-options${index}`,
|
|
12138
12393
|
style: normalizeStyle($options.computedItemStyle),
|
|
12139
12394
|
onClick: ($event) => $options.selectedOption = $options.getOptionValue(Option)
|
|
12140
|
-
}, toDisplayString(Option[$props.prop]), 15, _hoisted_2$
|
|
12395
|
+
}, toDisplayString(Option[$props.prop]), 15, _hoisted_2$3);
|
|
12141
12396
|
}), 128))
|
|
12142
12397
|
], 2)
|
|
12143
12398
|
]);
|
|
12144
12399
|
}
|
|
12145
12400
|
var ckSwitchOptions_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12146
|
-
const _sfc_main$
|
|
12401
|
+
const _sfc_main$a = {
|
|
12147
12402
|
components: {
|
|
12148
12403
|
ckLabel
|
|
12149
12404
|
},
|
|
@@ -12191,19 +12446,19 @@ const _sfc_main$9 = {
|
|
|
12191
12446
|
}
|
|
12192
12447
|
}
|
|
12193
12448
|
};
|
|
12194
|
-
var ckSwitchOptions = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12195
|
-
const _hoisted_1$
|
|
12196
|
-
function render$
|
|
12197
|
-
return openBlock(), createElementBlock("tr", _hoisted_1$
|
|
12449
|
+
var ckSwitchOptions = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", render$5], ["__scopeId", "data-v-f0c51430"]]);
|
|
12450
|
+
const _hoisted_1$7 = { class: "ck-tr" };
|
|
12451
|
+
function render$4(_ctx, _cache) {
|
|
12452
|
+
return openBlock(), createElementBlock("tr", _hoisted_1$7, [
|
|
12198
12453
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
12199
12454
|
]);
|
|
12200
12455
|
}
|
|
12201
12456
|
var ckTr_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12202
|
-
const _sfc_main$
|
|
12203
|
-
var ckTr = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12204
|
-
const _hoisted_1$
|
|
12205
|
-
function render$
|
|
12206
|
-
return openBlock(), createElementBlock("th", _hoisted_1$
|
|
12457
|
+
const _sfc_main$9 = {};
|
|
12458
|
+
var ckTr = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", render$4], ["__scopeId", "data-v-1dd12190"]]);
|
|
12459
|
+
const _hoisted_1$6 = { class: "ck-th" };
|
|
12460
|
+
function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12461
|
+
return openBlock(), createElementBlock("th", _hoisted_1$6, [
|
|
12207
12462
|
createElementVNode("span", {
|
|
12208
12463
|
class: normalizeClass($options.computedSpanClass),
|
|
12209
12464
|
style: normalizeStyle($options.computedStyle)
|
|
@@ -12213,7 +12468,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
12213
12468
|
]);
|
|
12214
12469
|
}
|
|
12215
12470
|
var ckTh_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12216
|
-
const _sfc_main$
|
|
12471
|
+
const _sfc_main$8 = {
|
|
12217
12472
|
props: {
|
|
12218
12473
|
align: { type: String, default: "center", validator: validators.align },
|
|
12219
12474
|
minWidth: { type: String, default: void 0 }
|
|
@@ -12234,46 +12489,38 @@ const _sfc_main$7 = {
|
|
|
12234
12489
|
}
|
|
12235
12490
|
}
|
|
12236
12491
|
};
|
|
12237
|
-
var ckTh = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12238
|
-
|
|
12239
|
-
const _component_ck_th = resolveComponent("ck-th");
|
|
12240
|
-
return $options.isVisible ? (openBlock(), createBlock(_component_ck_th, {
|
|
12241
|
-
key: 0,
|
|
12242
|
-
align: $props.col.align,
|
|
12243
|
-
"min-width": $props.col.minWidth
|
|
12244
|
-
}, {
|
|
12245
|
-
default: withCtx(() => [
|
|
12246
|
-
createTextVNode(toDisplayString($props.col.title), 1)
|
|
12247
|
-
]),
|
|
12248
|
-
_: 1
|
|
12249
|
-
}, 8, ["align", "min-width"])) : createCommentVNode("", true);
|
|
12250
|
-
}
|
|
12251
|
-
const _sfc_main$6 = {
|
|
12252
|
-
components: {
|
|
12253
|
-
ckTh
|
|
12254
|
-
},
|
|
12492
|
+
var ckTh = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", render$3], ["__scopeId", "data-v-e9943550"]]);
|
|
12493
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
12255
12494
|
props: {
|
|
12256
12495
|
col: { type: Object, required: true }
|
|
12257
12496
|
},
|
|
12258
|
-
|
|
12259
|
-
|
|
12260
|
-
return
|
|
12261
|
-
|
|
12497
|
+
setup(__props) {
|
|
12498
|
+
return (_ctx, _cache) => {
|
|
12499
|
+
return openBlock(), createBlock(ckTh, {
|
|
12500
|
+
align: __props.col.align,
|
|
12501
|
+
"min-width": __props.col.minWidth
|
|
12502
|
+
}, {
|
|
12503
|
+
default: withCtx(() => [
|
|
12504
|
+
createTextVNode(toDisplayString(__props.col.title), 1)
|
|
12505
|
+
]),
|
|
12506
|
+
_: 1
|
|
12507
|
+
}, 8, ["align", "min-width"]);
|
|
12508
|
+
};
|
|
12262
12509
|
}
|
|
12263
|
-
};
|
|
12264
|
-
var ckTableTitle = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", render$4]]);
|
|
12510
|
+
});
|
|
12265
12511
|
var ckTable__headerItems_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12266
|
-
const _hoisted_1$
|
|
12267
|
-
const _sfc_main$
|
|
12512
|
+
const _hoisted_1$5 = { class: "ck-table__header-items" };
|
|
12513
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
12268
12514
|
props: {
|
|
12269
12515
|
search: { type: String, default: void 0 },
|
|
12516
|
+
hasColumnManager: { type: Boolean, default: false },
|
|
12270
12517
|
hideRefreshBtn: { type: Boolean, required: true },
|
|
12271
12518
|
hideItemsPerPage: { type: Boolean, required: true },
|
|
12272
12519
|
currentPage: { type: Number, required: true },
|
|
12273
12520
|
itemsPerPage: { type: Number, required: true },
|
|
12274
12521
|
listLength: { type: Number, required: true }
|
|
12275
12522
|
},
|
|
12276
|
-
emits: ["update:search", "refreshList"],
|
|
12523
|
+
emits: ["update:search", "refreshList", "openColumnsManager"],
|
|
12277
12524
|
setup(__props, { emit: emits }) {
|
|
12278
12525
|
const props = __props;
|
|
12279
12526
|
const searchLocal = computed({
|
|
@@ -12296,6 +12543,19 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
12296
12543
|
return props.listLength;
|
|
12297
12544
|
return value;
|
|
12298
12545
|
});
|
|
12546
|
+
const itemsPerPageIsVisible = computed(() => {
|
|
12547
|
+
return !props.hideItemsPerPage && props.listLength;
|
|
12548
|
+
});
|
|
12549
|
+
const searchGroupValue = computed(() => {
|
|
12550
|
+
if (itemsPerPageIsVisible.value && props.hasColumnManager) {
|
|
12551
|
+
return "center";
|
|
12552
|
+
}
|
|
12553
|
+
if (itemsPerPageIsVisible.value)
|
|
12554
|
+
return "right";
|
|
12555
|
+
if (props.hasColumnManager)
|
|
12556
|
+
return "left";
|
|
12557
|
+
return "";
|
|
12558
|
+
});
|
|
12299
12559
|
function checkRefresh() {
|
|
12300
12560
|
const search = searchLocal.value;
|
|
12301
12561
|
setTimeout(() => {
|
|
@@ -12305,14 +12565,15 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
12305
12565
|
}, 1e3);
|
|
12306
12566
|
}
|
|
12307
12567
|
return (_ctx, _cache) => {
|
|
12308
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12568
|
+
return openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
12309
12569
|
!__props.hideRefreshBtn ? (openBlock(), createBlock(ckButton, {
|
|
12310
12570
|
key: 0,
|
|
12311
12571
|
type: "flat",
|
|
12312
12572
|
icon: "redo-alt",
|
|
12573
|
+
title: "Recargar lista",
|
|
12313
12574
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("refreshList", false))
|
|
12314
12575
|
})) : createCommentVNode("", true),
|
|
12315
|
-
|
|
12576
|
+
unref(itemsPerPageIsVisible) ? (openBlock(), createElementBlock("div", {
|
|
12316
12577
|
key: 1,
|
|
12317
12578
|
class: normalizeClass(["items-per-page", { "ck-component__group--left": !unref(hideSearch) }])
|
|
12318
12579
|
}, toDisplayString(unref(itemsPerPageStart)) + " - " + toDisplayString(unref(itemsPerPageEnd)) + " de " + toDisplayString(__props.listLength), 3)) : createCommentVNode("", true),
|
|
@@ -12322,17 +12583,25 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
12322
12583
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(searchLocal) ? searchLocal.value = $event : null),
|
|
12323
12584
|
icon: "search",
|
|
12324
12585
|
placeholder: "Buscar...",
|
|
12325
|
-
group:
|
|
12586
|
+
group: unref(searchGroupValue),
|
|
12326
12587
|
onInput: _cache[2] || (_cache[2] = ($event) => checkRefresh())
|
|
12327
|
-
}, null, 8, ["modelValue", "group"])) : createCommentVNode("", true)
|
|
12588
|
+
}, null, 8, ["modelValue", "group"])) : createCommentVNode("", true),
|
|
12589
|
+
__props.hasColumnManager ? (openBlock(), createBlock(ckButton, {
|
|
12590
|
+
key: 3,
|
|
12591
|
+
icon: "columns",
|
|
12592
|
+
type: "filled",
|
|
12593
|
+
title: "Administrador de columnas",
|
|
12594
|
+
group: unref(itemsPerPageIsVisible) || !unref(hideSearch) ? "left" : "",
|
|
12595
|
+
onClick: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("openColumnsManager"))
|
|
12596
|
+
}, null, 8, ["group"])) : createCommentVNode("", true)
|
|
12328
12597
|
]);
|
|
12329
12598
|
};
|
|
12330
12599
|
}
|
|
12331
12600
|
});
|
|
12332
|
-
var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12601
|
+
var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-a15c3d80"]]);
|
|
12333
12602
|
var ckTable__pagination_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12334
|
-
const _hoisted_1$
|
|
12335
|
-
const _hoisted_2$
|
|
12603
|
+
const _hoisted_1$4 = { class: "ck-table__pagination" };
|
|
12604
|
+
const _hoisted_2$2 = ["onClick"];
|
|
12336
12605
|
const _hoisted_3$1 = ["onClick"];
|
|
12337
12606
|
const itemsShowed = 5;
|
|
12338
12607
|
const __default__ = {
|
|
@@ -12408,14 +12677,14 @@ const __default__ = {
|
|
|
12408
12677
|
}
|
|
12409
12678
|
}
|
|
12410
12679
|
};
|
|
12411
|
-
const _sfc_main$
|
|
12680
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__), {
|
|
12412
12681
|
setup(__props) {
|
|
12413
12682
|
return (_ctx, _cache) => {
|
|
12414
12683
|
return __props.currentPage && _ctx.totalPages > 1 ? (openBlock(), createElementBlock("div", {
|
|
12415
12684
|
key: 0,
|
|
12416
12685
|
class: normalizeClass(["ck-table__pagination-container", `pagination-align--${__props.align}`])
|
|
12417
12686
|
}, [
|
|
12418
|
-
createElementVNode("div", _hoisted_1$
|
|
12687
|
+
createElementVNode("div", _hoisted_1$4, [
|
|
12419
12688
|
_ctx.hasArrowLeft ? (openBlock(), createElementBlock("div", {
|
|
12420
12689
|
key: 0,
|
|
12421
12690
|
class: "ck-table__pagination--arrow-left",
|
|
@@ -12427,7 +12696,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
12427
12696
|
return openBlock(), createElementBlock("div", {
|
|
12428
12697
|
class: "ck-table__pagination-item pagination-item__left",
|
|
12429
12698
|
onClick: ($event) => _ctx.updateCurrentPage(num)
|
|
12430
|
-
}, toDisplayString(num), 9, _hoisted_2$
|
|
12699
|
+
}, toDisplayString(num), 9, _hoisted_2$2);
|
|
12431
12700
|
}), 256)),
|
|
12432
12701
|
createVNode(ckInput, {
|
|
12433
12702
|
class: "ck-table__pagination-input",
|
|
@@ -12457,7 +12726,79 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
12457
12726
|
};
|
|
12458
12727
|
}
|
|
12459
12728
|
}));
|
|
12460
|
-
var TablePagination = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12729
|
+
var TablePagination = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-7ad6042e"]]);
|
|
12730
|
+
var ckTable__columnsManager_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12731
|
+
const _hoisted_1$3 = { class: "columns-manger-container" };
|
|
12732
|
+
const _hoisted_2$1 = { class: "columns-manger__item" };
|
|
12733
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
12734
|
+
props: {
|
|
12735
|
+
modelValue: { type: Boolean, required: true },
|
|
12736
|
+
columns: { type: Object, required: true },
|
|
12737
|
+
columnsArray: { type: Array, required: true }
|
|
12738
|
+
},
|
|
12739
|
+
emits: ["update:modelValue"],
|
|
12740
|
+
setup(__props, { emit: emits }) {
|
|
12741
|
+
const props = __props;
|
|
12742
|
+
let columnsCheckable = ref([]);
|
|
12743
|
+
const isActive = computed({
|
|
12744
|
+
get() {
|
|
12745
|
+
return props.modelValue;
|
|
12746
|
+
},
|
|
12747
|
+
set(val) {
|
|
12748
|
+
emits("update:modelValue", val);
|
|
12749
|
+
}
|
|
12750
|
+
});
|
|
12751
|
+
watch(() => isActive.value, (val) => {
|
|
12752
|
+
if (!val)
|
|
12753
|
+
return;
|
|
12754
|
+
setColumnsCheckable();
|
|
12755
|
+
});
|
|
12756
|
+
function setColumnsCheckable() {
|
|
12757
|
+
console.log("hoola");
|
|
12758
|
+
const list = [];
|
|
12759
|
+
props.columnsArray.forEach((col) => {
|
|
12760
|
+
if (functions$1)
|
|
12761
|
+
list.push({
|
|
12762
|
+
name: col.name,
|
|
12763
|
+
title: col.title,
|
|
12764
|
+
value: functions$1.isColumnDisplayed(col)
|
|
12765
|
+
});
|
|
12766
|
+
});
|
|
12767
|
+
columnsCheckable.value = list;
|
|
12768
|
+
}
|
|
12769
|
+
function setColumnDisplayValue(colName, value) {
|
|
12770
|
+
props.columns[colName].isDisplayed = value;
|
|
12771
|
+
}
|
|
12772
|
+
return (_ctx, _cache) => {
|
|
12773
|
+
return openBlock(), createBlock(_sfc_main$e, {
|
|
12774
|
+
modelValue: unref(isActive),
|
|
12775
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(isActive) ? isActive.value = $event : null),
|
|
12776
|
+
title: "Administrador de columnas"
|
|
12777
|
+
}, {
|
|
12778
|
+
default: withCtx(() => [
|
|
12779
|
+
createElementVNode("div", _hoisted_1$3, [
|
|
12780
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(columnsCheckable), (col) => {
|
|
12781
|
+
return openBlock(), createElementBlock("div", _hoisted_2$1, [
|
|
12782
|
+
createVNode(ckCheckbox, {
|
|
12783
|
+
modelValue: col.value,
|
|
12784
|
+
"onUpdate:modelValue": ($event) => col.value = $event,
|
|
12785
|
+
onChange: ($event) => setColumnDisplayValue(col.name, col.value)
|
|
12786
|
+
}, {
|
|
12787
|
+
default: withCtx(() => [
|
|
12788
|
+
createTextVNode(toDisplayString(col.title), 1)
|
|
12789
|
+
]),
|
|
12790
|
+
_: 2
|
|
12791
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])
|
|
12792
|
+
]);
|
|
12793
|
+
}), 256))
|
|
12794
|
+
])
|
|
12795
|
+
]),
|
|
12796
|
+
_: 1
|
|
12797
|
+
}, 8, ["modelValue"]);
|
|
12798
|
+
};
|
|
12799
|
+
}
|
|
12800
|
+
});
|
|
12801
|
+
var TableColumnsManager = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-6ae82d89"]]);
|
|
12461
12802
|
var ckTable_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12462
12803
|
const _hoisted_1$2 = { class: "ck-table" };
|
|
12463
12804
|
const _hoisted_2 = {
|
|
@@ -12473,7 +12814,8 @@ const _hoisted_5 = { key: 0 };
|
|
|
12473
12814
|
const _hoisted_6 = { key: 1 };
|
|
12474
12815
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
12475
12816
|
props: {
|
|
12476
|
-
columns: { type: Array, required: true, default: () => [] },
|
|
12817
|
+
columns: { type: [Array, Object], required: true, default: () => [] },
|
|
12818
|
+
hasColumnManager: { type: Boolean, default: false },
|
|
12477
12819
|
currentPage: { type: Number, default: 0 },
|
|
12478
12820
|
itemsPerPage: { type: Number, default: 40 },
|
|
12479
12821
|
listLength: { type: Number, default: 0 },
|
|
@@ -12486,6 +12828,25 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
12486
12828
|
emits: ["refreshList", "update:search", "update:currentPage"],
|
|
12487
12829
|
setup(__props, { emit: emits }) {
|
|
12488
12830
|
const props = __props;
|
|
12831
|
+
const { qmObj: qmObj2 } = main$1;
|
|
12832
|
+
const IsPopupActive = ref({
|
|
12833
|
+
columnsManager: false
|
|
12834
|
+
});
|
|
12835
|
+
const columnsAreObj = computed(() => !qmObj2.isArray(props.columns));
|
|
12836
|
+
const columnsArray = computed(() => {
|
|
12837
|
+
if (!columnsAreObj.value)
|
|
12838
|
+
return props.columns;
|
|
12839
|
+
const arr = Object.values(props.columns);
|
|
12840
|
+
const keys = Object.keys(props.columns);
|
|
12841
|
+
arr.forEach((col, index) => {
|
|
12842
|
+
const key = keys[index];
|
|
12843
|
+
col.name = key;
|
|
12844
|
+
});
|
|
12845
|
+
return arr;
|
|
12846
|
+
});
|
|
12847
|
+
const filteredColumnsList = computed(() => {
|
|
12848
|
+
return columnsArray.value.filter(functions$1.isColumnDisplayed);
|
|
12849
|
+
});
|
|
12489
12850
|
const searchLocal = computed({
|
|
12490
12851
|
get() {
|
|
12491
12852
|
return props.search;
|
|
@@ -12505,114 +12866,150 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
12505
12866
|
function refreshList(pageChange = false) {
|
|
12506
12867
|
emits("refreshList", pageChange);
|
|
12507
12868
|
}
|
|
12869
|
+
function openColumnsManager() {
|
|
12870
|
+
if (columnsAreObj.value) {
|
|
12871
|
+
IsPopupActive.value.columnsManager = true;
|
|
12872
|
+
} else {
|
|
12873
|
+
console.log("ERROR ck-table", "The columns list should be an object");
|
|
12874
|
+
}
|
|
12875
|
+
}
|
|
12508
12876
|
return (_ctx, _cache) => {
|
|
12509
|
-
return openBlock(), createElementBlock(
|
|
12510
|
-
|
|
12511
|
-
|
|
12512
|
-
|
|
12513
|
-
|
|
12514
|
-
|
|
12515
|
-
|
|
12516
|
-
|
|
12517
|
-
|
|
12518
|
-
|
|
12519
|
-
|
|
12520
|
-
|
|
12521
|
-
|
|
12522
|
-
|
|
12523
|
-
|
|
12524
|
-
|
|
12525
|
-
|
|
12526
|
-
|
|
12527
|
-
|
|
12528
|
-
|
|
12529
|
-
|
|
12530
|
-
|
|
12531
|
-
|
|
12532
|
-
|
|
12533
|
-
|
|
12534
|
-
|
|
12535
|
-
}), 128))
|
|
12536
|
-
]),
|
|
12537
|
-
_: 1
|
|
12538
|
-
})
|
|
12877
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
12878
|
+
__props.hasColumnManager && unref(columnsAreObj) ? (openBlock(), createBlock(TableColumnsManager, {
|
|
12879
|
+
key: 0,
|
|
12880
|
+
modelValue: IsPopupActive.value.columnsManager,
|
|
12881
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => IsPopupActive.value.columnsManager = $event),
|
|
12882
|
+
columnsArray: unref(columnsArray),
|
|
12883
|
+
columns: __props.columns
|
|
12884
|
+
}, null, 8, ["modelValue", "columnsArray", "columns"])) : createCommentVNode("", true),
|
|
12885
|
+
createElementVNode("div", _hoisted_1$2, [
|
|
12886
|
+
_ctx.$slots.header || !__props.hideHeaderActions ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
12887
|
+
!__props.hideHeaderActions ? (openBlock(), createBlock(TableHeaderItems, {
|
|
12888
|
+
key: 0,
|
|
12889
|
+
search: unref(searchLocal),
|
|
12890
|
+
"onUpdate:search": _cache[1] || (_cache[1] = ($event) => isRef(searchLocal) ? searchLocal.value = $event : null),
|
|
12891
|
+
currentPage: __props.currentPage,
|
|
12892
|
+
hasColumnManager: __props.hasColumnManager,
|
|
12893
|
+
itemsPerPage: __props.itemsPerPage,
|
|
12894
|
+
listLength: __props.listLength,
|
|
12895
|
+
hideRefreshBtn: __props.hideRefreshBtn,
|
|
12896
|
+
hideItemsPerPage: __props.hideItemsPerPage,
|
|
12897
|
+
onRefreshList: _cache[2] || (_cache[2] = ($event) => refreshList($event)),
|
|
12898
|
+
onOpenColumnsManager: _cache[3] || (_cache[3] = ($event) => openColumnsManager())
|
|
12899
|
+
}, null, 8, ["search", "currentPage", "hasColumnManager", "itemsPerPage", "listLength", "hideRefreshBtn", "hideItemsPerPage"])) : createCommentVNode("", true),
|
|
12900
|
+
_ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
12901
|
+
renderSlot(_ctx.$slots, "header", {}, void 0, true)
|
|
12902
|
+
])) : createCommentVNode("", true)
|
|
12539
12903
|
])) : createCommentVNode("", true),
|
|
12540
|
-
createElementVNode("
|
|
12541
|
-
|
|
12904
|
+
createElementVNode("table", _hoisted_4, [
|
|
12905
|
+
unref(filteredColumnsList).length ? (openBlock(), createElementBlock("thead", _hoisted_5, [
|
|
12906
|
+
createVNode(ckTr, null, {
|
|
12907
|
+
default: withCtx(() => [
|
|
12908
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(filteredColumnsList), (col) => {
|
|
12909
|
+
return openBlock(), createBlock(_sfc_main$7, {
|
|
12910
|
+
key: col.title,
|
|
12911
|
+
col
|
|
12912
|
+
}, null, 8, ["col"]);
|
|
12913
|
+
}), 128))
|
|
12914
|
+
]),
|
|
12915
|
+
_: 1
|
|
12916
|
+
})
|
|
12917
|
+
])) : createCommentVNode("", true),
|
|
12918
|
+
createElementVNode("tbody", null, [
|
|
12919
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
12920
|
+
]),
|
|
12921
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("tfoot", _hoisted_6, [
|
|
12922
|
+
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
12923
|
+
])) : createCommentVNode("", true)
|
|
12542
12924
|
]),
|
|
12543
|
-
|
|
12544
|
-
|
|
12545
|
-
|
|
12546
|
-
|
|
12547
|
-
|
|
12548
|
-
|
|
12549
|
-
|
|
12550
|
-
|
|
12551
|
-
|
|
12552
|
-
|
|
12553
|
-
onRefreshList: _cache[3] || (_cache[3] = ($event) => refreshList(true))
|
|
12554
|
-
}, null, 8, ["currentPage", "itemsPerPage", "listLength", "align"])
|
|
12555
|
-
]);
|
|
12925
|
+
createVNode(TablePagination, {
|
|
12926
|
+
currentPage: unref(currentPageLocal),
|
|
12927
|
+
"onUpdate:currentPage": _cache[4] || (_cache[4] = ($event) => isRef(currentPageLocal) ? currentPageLocal.value = $event : null),
|
|
12928
|
+
itemsPerPage: __props.itemsPerPage,
|
|
12929
|
+
listLength: __props.listLength,
|
|
12930
|
+
align: __props.paginationAlign,
|
|
12931
|
+
onRefreshList: _cache[5] || (_cache[5] = ($event) => refreshList(true))
|
|
12932
|
+
}, null, 8, ["currentPage", "itemsPerPage", "listLength", "align"])
|
|
12933
|
+
])
|
|
12934
|
+
], 64);
|
|
12556
12935
|
};
|
|
12557
12936
|
}
|
|
12558
12937
|
});
|
|
12559
|
-
var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
12560
|
-
function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12561
|
-
return openBlock(), createElementBlock("td", {
|
|
12562
|
-
class: normalizeClass(["ck-td", $options.computedTdClass])
|
|
12563
|
-
}, [
|
|
12564
|
-
createElementVNode("span", {
|
|
12565
|
-
class: normalizeClass($options.computedSpanClass),
|
|
12566
|
-
style: normalizeStyle($options.computedStyle)
|
|
12567
|
-
}, [
|
|
12568
|
-
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
12569
|
-
], 6)
|
|
12570
|
-
], 2);
|
|
12571
|
-
}
|
|
12938
|
+
var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-3084c768"]]);
|
|
12572
12939
|
var ckTd_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12573
|
-
const _sfc_main$2 = {
|
|
12940
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
12574
12941
|
props: {
|
|
12942
|
+
col: { type: Object, default: void 0 },
|
|
12575
12943
|
wrap: { type: Boolean, default: false },
|
|
12576
12944
|
block: { type: Boolean, default: false },
|
|
12577
12945
|
autoWidth: { type: Boolean, default: false },
|
|
12578
|
-
align: { type: String, default:
|
|
12946
|
+
align: { type: String, default: void 0, validator: validators.align },
|
|
12579
12947
|
fixedWidth: { type: String, default: "" },
|
|
12580
12948
|
minWidth: { type: String, default: "" },
|
|
12581
12949
|
maxWidth: { type: String, default: "" },
|
|
12582
12950
|
maxHeight: { type: String, default: "" }
|
|
12583
12951
|
},
|
|
12584
|
-
|
|
12585
|
-
|
|
12586
|
-
|
|
12587
|
-
"auto-width": this.autoWidth
|
|
12588
|
-
};
|
|
12589
|
-
},
|
|
12590
|
-
computedSpanClass() {
|
|
12952
|
+
setup(__props) {
|
|
12953
|
+
const props = __props;
|
|
12954
|
+
const computedTdClass = computed(() => {
|
|
12591
12955
|
return {
|
|
12592
|
-
|
|
12593
|
-
"wrap-text": this.wrap,
|
|
12594
|
-
"align-center": this.align !== "left" && this.align !== "right",
|
|
12595
|
-
"align-left": this.align === "left",
|
|
12596
|
-
"align-right": this.align === "right"
|
|
12956
|
+
"auto-width": props.autoWidth
|
|
12597
12957
|
};
|
|
12598
|
-
}
|
|
12599
|
-
|
|
12958
|
+
});
|
|
12959
|
+
const computedSpanClass = computed(() => {
|
|
12960
|
+
const list = [];
|
|
12961
|
+
let align;
|
|
12962
|
+
if (props.col)
|
|
12963
|
+
align = props.col.align;
|
|
12964
|
+
if (props.align)
|
|
12965
|
+
align = props.align;
|
|
12966
|
+
if (align) {
|
|
12967
|
+
if (align === "center")
|
|
12968
|
+
list.push("align-center");
|
|
12969
|
+
if (align === "right")
|
|
12970
|
+
list.push("align-right");
|
|
12971
|
+
}
|
|
12972
|
+
if (props.block)
|
|
12973
|
+
list.push("block");
|
|
12974
|
+
if (props.block)
|
|
12975
|
+
list.push("wrap-text");
|
|
12976
|
+
return list;
|
|
12977
|
+
});
|
|
12978
|
+
const computedStyle = computed(() => {
|
|
12600
12979
|
const list = {};
|
|
12601
|
-
if (
|
|
12602
|
-
list["min-width"] =
|
|
12603
|
-
if (
|
|
12604
|
-
list["min-width"] =
|
|
12605
|
-
if (
|
|
12606
|
-
list["max-width"] =
|
|
12607
|
-
if (
|
|
12608
|
-
list["max-width"] =
|
|
12609
|
-
if (
|
|
12610
|
-
list["max-height"] =
|
|
12980
|
+
if (props.minWidth)
|
|
12981
|
+
list["min-width"] = props.minWidth;
|
|
12982
|
+
if (props.fixedWidth)
|
|
12983
|
+
list["min-width"] = props.fixedWidth;
|
|
12984
|
+
if (props.maxWidth)
|
|
12985
|
+
list["max-width"] = props.maxWidth;
|
|
12986
|
+
if (props.fixedWidth)
|
|
12987
|
+
list["max-width"] = props.fixedWidth;
|
|
12988
|
+
if (props.maxHeight)
|
|
12989
|
+
list["max-height"] = props.maxHeight;
|
|
12611
12990
|
return list;
|
|
12612
|
-
}
|
|
12991
|
+
});
|
|
12992
|
+
const isColumnDisplayed = computed(() => {
|
|
12993
|
+
if (!props.col)
|
|
12994
|
+
return true;
|
|
12995
|
+
return functions$1.isColumnDisplayed(props.col);
|
|
12996
|
+
});
|
|
12997
|
+
return (_ctx, _cache) => {
|
|
12998
|
+
return unref(isColumnDisplayed) ? (openBlock(), createElementBlock("td", {
|
|
12999
|
+
key: 0,
|
|
13000
|
+
class: normalizeClass(["ck-td", unref(computedTdClass)])
|
|
13001
|
+
}, [
|
|
13002
|
+
createElementVNode("span", {
|
|
13003
|
+
class: normalizeClass(unref(computedSpanClass)),
|
|
13004
|
+
style: normalizeStyle(unref(computedStyle))
|
|
13005
|
+
}, [
|
|
13006
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
13007
|
+
], 6)
|
|
13008
|
+
], 2)) : createCommentVNode("", true);
|
|
13009
|
+
};
|
|
12613
13010
|
}
|
|
12614
|
-
};
|
|
12615
|
-
var ckTd = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["
|
|
13011
|
+
});
|
|
13012
|
+
var ckTd = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-c34b91ca"]]);
|
|
12616
13013
|
const _hoisted_1$1 = { class: "ck-textarea" };
|
|
12617
13014
|
function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12618
13015
|
const _component_ck_label = resolveComponent("ck-label");
|
|
@@ -15258,7 +15655,7 @@ var components = /* @__PURE__ */ Object.freeze({
|
|
|
15258
15655
|
ckImg,
|
|
15259
15656
|
ckInput,
|
|
15260
15657
|
ckLabel,
|
|
15261
|
-
ckPopup: _sfc_main$
|
|
15658
|
+
ckPopup: _sfc_main$e,
|
|
15262
15659
|
ckRadio,
|
|
15263
15660
|
ckSelect,
|
|
15264
15661
|
ckSwitch,
|
|
@@ -15275,6 +15672,8 @@ var components = /* @__PURE__ */ Object.freeze({
|
|
|
15275
15672
|
unlockScroll
|
|
15276
15673
|
});
|
|
15277
15674
|
function setDefaultColors(options) {
|
|
15675
|
+
if (!options)
|
|
15676
|
+
return;
|
|
15278
15677
|
var r = document.querySelector(":root");
|
|
15279
15678
|
const colorList = [
|
|
15280
15679
|
"primary",
|
|
@@ -15296,10 +15695,11 @@ function setDefaultColors(options) {
|
|
|
15296
15695
|
}
|
|
15297
15696
|
}
|
|
15298
15697
|
const install = function installCleek(app, options) {
|
|
15698
|
+
app.config.globalProperties.$cleekOptions = options;
|
|
15299
15699
|
console.log("arranco paquete", options);
|
|
15300
15700
|
setDefaultColors(options);
|
|
15301
15701
|
Object.entries(components).forEach(([componentName, component]) => {
|
|
15302
15702
|
app.component(componentName, component);
|
|
15303
15703
|
});
|
|
15304
15704
|
};
|
|
15305
|
-
export { events as EVENTS, mitt as EventBus, ckButton, ckCheckbox, ckIcon, ckImg, ckInput, ckLabel, _sfc_main$
|
|
15705
|
+
export { events as EVENTS, mitt as EventBus, ckButton, ckCheckbox, ckIcon, ckImg, ckInput, ckLabel, _sfc_main$e as ckPopup, ckRadio, ckSelect, ckSwitch, ckSwitchOptions, ckTable, ckTd, ckTextarea, ckTh, ckTooltip, ckTr, install as default, lockScroll, unlockScroll };
|