cleek 2.1.13 → 2.1.14

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 CHANGED
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { defineComponent, ref, openBlock, createElementBlock, createElementVNode, renderSlot, normalizeClass, createCommentVNode, computed as computed$2, normalizeStyle, unref as unref$1, watch, h, createBlock, Teleport, createVNode, createTextVNode, toDisplayString, onMounted, getCurrentInstance, mergeProps, withKeys, withModifiers, pushScopeId, popScopeId, withCtx, withDirectives, isRef as isRef$1, vModelDynamic, Fragment, renderList, vModelRadio, vModelSelect, vModelCheckbox, vModelText } from "vue";
20
+ import { defineComponent, ref, openBlock, createElementBlock, createElementVNode, renderSlot, normalizeClass, createCommentVNode, computed as computed$2, normalizeStyle, unref as unref$1, watch, h, createBlock, Teleport, createVNode, createTextVNode, toDisplayString, withCtx, onMounted, getCurrentInstance, withDirectives, isRef as isRef$1, vModelDynamic, Fragment, renderList, mergeProps, withKeys, withModifiers, pushScopeId, popScopeId, vModelRadio, vModelSelect, vModelCheckbox, vModelText } from "vue";
21
21
  var ckDropdown_vue_vue_type_style_index_0_scoped_true_lang = "";
22
22
  var _export_sfc = (sfc, props) => {
23
23
  const target = sfc.__vccOpts || sfc;
@@ -11300,7 +11300,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
11300
11300
  expose({
11301
11301
  ckNotify: ckNotify2,
11302
11302
  ckNotifySuccess,
11303
- ckNotifyDanger,
11303
+ ckNotifyError,
11304
11304
  ckNotifyWarning
11305
11305
  });
11306
11306
  const isActive = ref(false);
@@ -11328,7 +11328,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
11328
11328
  color: "#66CC00"
11329
11329
  });
11330
11330
  }
11331
- function ckNotifyDanger(text3 = "", title = "Error") {
11331
+ function ckNotifyError(text3 = "", title = "Error") {
11332
11332
  ckNotify2({ text: text3, title, color: "#FF3333" });
11333
11333
  }
11334
11334
  function ckNotifyWarning(text3 = "", title = "Atenci\xF3n") {
@@ -11358,7 +11358,16 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
11358
11358
  };
11359
11359
  }
11360
11360
  });
11361
- var ckNotify = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-33c8c0d8"]]);
11361
+ var ckNotify = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-4eba623e"]]);
11362
+ const _hoisted_1$i = { class: "ck-tr" };
11363
+ function render$1(_ctx, _cache) {
11364
+ return openBlock(), createElementBlock("tr", _hoisted_1$i, [
11365
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
11366
+ ]);
11367
+ }
11368
+ var ckTr_vue_vue_type_style_index_0_scoped_true_lang = "";
11369
+ const _sfc_main$k = {};
11370
+ var ckTr = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", render$1], ["__scopeId", "data-v-519cf874"]]);
11362
11371
  var validators = {
11363
11372
  size: (type) => {
11364
11373
  return ["", "xs", "s", "m", "l", "xl"].includes(type);
@@ -11386,6 +11395,59 @@ var validators = {
11386
11395
  return isValid;
11387
11396
  }
11388
11397
  };
11398
+ var ckTh_vue_vue_type_style_index_0_scoped_true_lang = "";
11399
+ const _hoisted_1$h = { class: "ck-th" };
11400
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
11401
+ props: {
11402
+ align: { type: String, default: "left", validator: validators.align },
11403
+ minWidth: { type: String, default: void 0 }
11404
+ },
11405
+ setup(__props) {
11406
+ const props = __props;
11407
+ const computedSpanClass = computed$2(() => {
11408
+ return {
11409
+ "align-center": props.align !== "left" && props.align !== "right",
11410
+ "align-left": props.align === "left",
11411
+ "align-right": props.align === "right"
11412
+ };
11413
+ });
11414
+ const computedStyle = computed$2(() => {
11415
+ const list = [];
11416
+ if (props.minWidth)
11417
+ list.push({ "min-width": props.minWidth });
11418
+ return list;
11419
+ });
11420
+ return (_ctx, _cache) => {
11421
+ return openBlock(), createElementBlock("th", _hoisted_1$h, [
11422
+ createElementVNode("span", {
11423
+ class: normalizeClass(unref$1(computedSpanClass)),
11424
+ style: normalizeStyle(unref$1(computedStyle))
11425
+ }, [
11426
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
11427
+ ], 6)
11428
+ ]);
11429
+ };
11430
+ }
11431
+ });
11432
+ var ckTh = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-385c14e2"]]);
11433
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
11434
+ props: {
11435
+ col: { type: Object, required: true }
11436
+ },
11437
+ setup(__props) {
11438
+ return (_ctx, _cache) => {
11439
+ return openBlock(), createBlock(ckTh, {
11440
+ align: __props.col.align,
11441
+ "min-width": __props.col.minWidth
11442
+ }, {
11443
+ default: withCtx(() => [
11444
+ createTextVNode(toDisplayString(__props.col.title), 1)
11445
+ ]),
11446
+ _: 1
11447
+ }, 8, ["align", "min-width"]);
11448
+ };
11449
+ }
11450
+ });
11389
11451
  var functions = {
11390
11452
  getGroupClass({ group = "", groupVertical = "", groupBreak = "" } = {}) {
11391
11453
  const _screenSize = "";
@@ -11431,8 +11493,8 @@ var functions = {
11431
11493
  }
11432
11494
  };
11433
11495
  var ckButton_vue_vue_type_style_index_0_scoped_true_lang = "";
11434
- const _hoisted_1$i = ["title", "aria-label", "disabled"];
11435
- const _sfc_main$k = /* @__PURE__ */ defineComponent({
11496
+ const _hoisted_1$g = ["title", "aria-label", "disabled"];
11497
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
11436
11498
  props: {
11437
11499
  title: { type: String, default: void 0 },
11438
11500
  disabled: { type: Boolean, default: false },
@@ -11509,124 +11571,492 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
11509
11571
  icon: __props.iconRight,
11510
11572
  "icon-pack": __props.iconPack
11511
11573
  }, null, 8, ["icon", "icon-pack"])) : createCommentVNode("", true)
11512
- ], 10, _hoisted_1$i);
11574
+ ], 10, _hoisted_1$g);
11513
11575
  };
11514
11576
  }
11515
11577
  });
11516
- var ckButton = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-36b03be6"]]);
11517
- const NOOP$1 = () => {
11518
- };
11519
- const isArray$1 = Array.isArray;
11520
- const isFunction$1 = (val) => typeof val === "function";
11521
- const isSymbol = (val) => typeof val === "symbol";
11522
- const def = (obj, key, value) => {
11523
- Object.defineProperty(obj, key, {
11524
- configurable: true,
11525
- enumerable: false,
11526
- value
11527
- });
11528
- };
11529
- let activeEffectScope;
11530
- function recordEffectScope(effect3, scope) {
11531
- scope = scope || activeEffectScope;
11532
- if (scope && scope.active) {
11533
- scope.effects.push(effect3);
11534
- }
11535
- }
11536
- const createDep = (effects) => {
11537
- const dep = new Set(effects);
11538
- dep.w = 0;
11539
- dep.n = 0;
11540
- return dep;
11541
- };
11542
- const wasTracked = (dep) => (dep.w & trackOpBit) > 0;
11543
- const newTracked = (dep) => (dep.n & trackOpBit) > 0;
11544
- const initDepMarkers = ({ deps }) => {
11545
- if (deps.length) {
11546
- for (let i = 0; i < deps.length; i++) {
11547
- deps[i].w |= trackOpBit;
11548
- }
11549
- }
11550
- };
11551
- const finalizeDepMarkers = (effect3) => {
11552
- const { deps } = effect3;
11553
- if (deps.length) {
11554
- let ptr = 0;
11555
- for (let i = 0; i < deps.length; i++) {
11556
- const dep = deps[i];
11557
- if (wasTracked(dep) && !newTracked(dep)) {
11558
- dep.delete(effect3);
11559
- } else {
11560
- deps[ptr++] = dep;
11561
- }
11562
- dep.w &= ~trackOpBit;
11563
- dep.n &= ~trackOpBit;
11564
- }
11565
- deps.length = ptr;
11566
- }
11567
- };
11568
- let effectTrackDepth = 0;
11569
- let trackOpBit = 1;
11570
- const maxMarkerBits = 30;
11571
- const effectStack = [];
11572
- let activeEffect;
11573
- class ReactiveEffect {
11574
- constructor(fn2, scheduler = null, scope) {
11575
- this.fn = fn2;
11576
- this.scheduler = scheduler;
11577
- this.active = true;
11578
- this.deps = [];
11579
- recordEffectScope(this, scope);
11580
- }
11581
- run() {
11582
- if (!this.active) {
11583
- return this.fn();
11584
- }
11585
- if (!effectStack.length || !effectStack.includes(this)) {
11586
- try {
11587
- effectStack.push(activeEffect = this);
11588
- enableTracking();
11589
- trackOpBit = 1 << ++effectTrackDepth;
11590
- if (effectTrackDepth <= maxMarkerBits) {
11591
- initDepMarkers(this);
11592
- } else {
11593
- cleanupEffect(this);
11594
- }
11595
- return this.fn();
11596
- } finally {
11597
- if (effectTrackDepth <= maxMarkerBits) {
11598
- finalizeDepMarkers(this);
11599
- }
11600
- trackOpBit = 1 << --effectTrackDepth;
11601
- resetTracking();
11602
- effectStack.pop();
11603
- const n = effectStack.length;
11604
- activeEffect = n > 0 ? effectStack[n - 1] : void 0;
11605
- }
11606
- }
11578
+ var ckButton = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-36b03be6"]]);
11579
+ var ckLabel_vue_vue_type_style_index_0_scoped_true_lang = "";
11580
+ const _hoisted_1$f = ["for"];
11581
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
11582
+ props: {
11583
+ for: { type: String, default: "" },
11584
+ align: { type: String, default: "" }
11585
+ },
11586
+ setup(__props) {
11587
+ const props = __props;
11588
+ const computedClass = computed$2(() => {
11589
+ const list = [];
11590
+ let align = "left";
11591
+ if (props.align === "center" || props.align === "right")
11592
+ align = props.align;
11593
+ list.push(`ck-align--${align}`);
11594
+ return list;
11595
+ });
11596
+ return (_ctx, _cache) => {
11597
+ return openBlock(), createElementBlock("label", {
11598
+ class: normalizeClass(["ck-label", unref$1(computedClass)]),
11599
+ for: __props.for
11600
+ }, [
11601
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
11602
+ ], 10, _hoisted_1$f);
11603
+ };
11607
11604
  }
11608
- stop() {
11609
- if (this.active) {
11610
- cleanupEffect(this);
11611
- if (this.onStop) {
11612
- this.onStop();
11605
+ });
11606
+ var ckLabel = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-ef74ea02"]]);
11607
+ var ckInput_vue_vue_type_style_index_0_scoped_true_lang = "";
11608
+ const _hoisted_1$e = { class: "ck-input" };
11609
+ const _hoisted_2$8 = ["type", "placeholder", "id", "disabled"];
11610
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
11611
+ props: {
11612
+ modelValue: {},
11613
+ type: { type: String, validator: validators.inputType, default: "text" },
11614
+ disabled: { type: Boolean, default: false },
11615
+ placeholder: { type: String, default: void 0 },
11616
+ label: { type: String, default: void 0 },
11617
+ labelAlign: { type: String, validator: validators.align, default: void 0 },
11618
+ icon: { type: [String, Array], default: void 0 },
11619
+ iconPack: { type: String, default: void 0 },
11620
+ iconRight: { type: String, default: void 0 },
11621
+ group: { type: String, default: void 0 },
11622
+ groupBreak: { type: String, default: "s" },
11623
+ groupVertical: { type: String, default: void 0 },
11624
+ hideBorder: { type: Boolean, default: false },
11625
+ width: { type: String, default: void 0 },
11626
+ align: { type: String, validator: validators.align, default: void 0 },
11627
+ autoSelect: { type: Boolean, default: false }
11628
+ },
11629
+ emits: ["update:modelValue", "click", "input", "change"],
11630
+ setup(__props, { expose, emit: emits }) {
11631
+ const props = __props;
11632
+ expose({ setFocus, setSelect });
11633
+ const realInput = ref(null);
11634
+ const value = computed$2({
11635
+ get() {
11636
+ return props.modelValue;
11637
+ },
11638
+ set(val) {
11639
+ emits("update:modelValue", val);
11613
11640
  }
11614
- this.active = false;
11641
+ });
11642
+ const onClick = (event) => {
11643
+ if (props.autoSelect)
11644
+ event.target.select();
11645
+ emits("click", event);
11646
+ };
11647
+ const onInput = (event) => {
11648
+ emits("input", event);
11649
+ };
11650
+ const onChange = (event) => {
11651
+ emits("change", event);
11652
+ };
11653
+ const computedStyleInput = computed$2(() => {
11654
+ const list = [];
11655
+ if (props.width)
11656
+ list.push({ width: props.width });
11657
+ return list;
11658
+ });
11659
+ const computedClassInput = computed$2(() => {
11660
+ const list = [];
11661
+ list.push(functions.getGroupClass(props));
11662
+ if (props.icon)
11663
+ list.push("has-icon-left");
11664
+ if (props.iconRight)
11665
+ list.push("has-icon-right");
11666
+ if (props.align)
11667
+ list.push(`align--${props.align}`);
11668
+ if (props.hideBorder)
11669
+ list.push("no-border");
11670
+ return list;
11671
+ });
11672
+ function setFocus() {
11673
+ realInput.value.focus();
11615
11674
  }
11616
- }
11617
- }
11618
- function cleanupEffect(effect3) {
11619
- const { deps } = effect3;
11620
- if (deps.length) {
11621
- for (let i = 0; i < deps.length; i++) {
11622
- deps[i].delete(effect3);
11675
+ function setSelect() {
11676
+ realInput.value.select();
11623
11677
  }
11624
- deps.length = 0;
11625
- }
11626
- }
11627
- let shouldTrack = true;
11628
- const trackStack = [];
11629
- function enableTracking() {
11678
+ return (_ctx, _cache) => {
11679
+ return openBlock(), createElementBlock("div", _hoisted_1$e, [
11680
+ __props.label ? (openBlock(), createBlock(ckLabel, {
11681
+ key: 0,
11682
+ align: __props.labelAlign,
11683
+ for: "ck-input"
11684
+ }, {
11685
+ default: withCtx(() => [
11686
+ createTextVNode(toDisplayString(__props.label), 1)
11687
+ ]),
11688
+ _: 1
11689
+ }, 8, ["align"])) : createCommentVNode("", true),
11690
+ __props.icon ? (openBlock(), createBlock(ckIcon, {
11691
+ key: 1,
11692
+ class: "ck-input__icon-left",
11693
+ color: "lightgrey",
11694
+ icon: __props.icon,
11695
+ "icon-pack": __props.iconPack
11696
+ }, null, 8, ["icon", "icon-pack"])) : createCommentVNode("", true),
11697
+ withDirectives(createElementVNode("input", {
11698
+ ref_key: "realInput",
11699
+ ref: realInput,
11700
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(value) ? value.value = $event : null),
11701
+ type: __props.type,
11702
+ placeholder: __props.placeholder,
11703
+ class: normalizeClass(unref$1(computedClassInput)),
11704
+ style: normalizeStyle(unref$1(computedStyleInput)),
11705
+ id: __props.label ? "ck-input" : "",
11706
+ disabled: __props.disabled,
11707
+ onChange: _cache[1] || (_cache[1] = ($event) => onChange($event)),
11708
+ onInput: _cache[2] || (_cache[2] = ($event) => onInput($event)),
11709
+ onClick: _cache[3] || (_cache[3] = ($event) => onClick($event))
11710
+ }, null, 46, _hoisted_2$8), [
11711
+ [vModelDynamic, unref$1(value)]
11712
+ ]),
11713
+ __props.iconRight ? (openBlock(), createBlock(ckIcon, {
11714
+ key: 2,
11715
+ class: "ck-input__icon-right",
11716
+ color: "lightgrey",
11717
+ icon: __props.iconRight,
11718
+ "icon-pack": __props.iconPack
11719
+ }, null, 8, ["icon", "icon-pack"])) : createCommentVNode("", true)
11720
+ ]);
11721
+ };
11722
+ }
11723
+ });
11724
+ var ckInput = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-19dca096"]]);
11725
+ var ckTable__headerItems_vue_vue_type_style_index_0_scoped_true_lang = "";
11726
+ const _hoisted_1$d = { class: "ck-table__header-items" };
11727
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
11728
+ props: {
11729
+ search: { type: String, default: void 0 },
11730
+ hasColumnsManager: { type: Boolean, default: false },
11731
+ showRefreshBtn: { type: Boolean, required: true },
11732
+ hideItemsPerPage: { type: Boolean, required: true },
11733
+ currentPage: { type: Number, required: true },
11734
+ itemsPerPage: { type: Number, required: true },
11735
+ listLength: { type: Number, required: true }
11736
+ },
11737
+ emits: ["update:search", "refreshList", "openColumnsManager"],
11738
+ setup(__props, { emit: emits }) {
11739
+ const props = __props;
11740
+ const searchLocal = computed$2({
11741
+ get() {
11742
+ return props.search;
11743
+ },
11744
+ set(val) {
11745
+ emits("update:search", val);
11746
+ }
11747
+ });
11748
+ const hideSearch = computed$2(() => {
11749
+ return typeof searchLocal.value === "undefined";
11750
+ });
11751
+ const itemsPerPageStart = computed$2(() => {
11752
+ return (props.currentPage - 1) * props.itemsPerPage + 1;
11753
+ });
11754
+ const itemsPerPageEnd = computed$2(() => {
11755
+ const value = props.currentPage * props.itemsPerPage;
11756
+ if (value > props.listLength)
11757
+ return props.listLength;
11758
+ return value;
11759
+ });
11760
+ const itemsPerPageIsVisible = computed$2(() => {
11761
+ return !props.hideItemsPerPage && props.listLength && props.currentPage;
11762
+ });
11763
+ const refreshBtnIsVisible = computed$2(() => {
11764
+ return itemsPerPageIsVisible.value || props.showRefreshBtn;
11765
+ });
11766
+ const searchGroupValue = computed$2(() => {
11767
+ if (itemsPerPageIsVisible.value && props.hasColumnsManager) {
11768
+ return "center";
11769
+ }
11770
+ if (itemsPerPageIsVisible.value)
11771
+ return "right";
11772
+ if (props.hasColumnsManager)
11773
+ return "left";
11774
+ return "";
11775
+ });
11776
+ function checkRefresh() {
11777
+ const search = searchLocal.value;
11778
+ setTimeout(() => {
11779
+ if (search !== searchLocal.value)
11780
+ return;
11781
+ emits("refreshList", false);
11782
+ }, 1e3);
11783
+ }
11784
+ return (_ctx, _cache) => {
11785
+ return openBlock(), createElementBlock("div", _hoisted_1$d, [
11786
+ unref$1(refreshBtnIsVisible) ? (openBlock(), createBlock(ckButton, {
11787
+ key: 0,
11788
+ type: "flat",
11789
+ icon: "redo-alt",
11790
+ title: "Recargar lista",
11791
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("refreshList", false))
11792
+ })) : createCommentVNode("", true),
11793
+ unref$1(itemsPerPageIsVisible) ? (openBlock(), createElementBlock("div", {
11794
+ key: 1,
11795
+ class: normalizeClass(["items-per-page", { "ck-component__group--left": !unref$1(hideSearch) }])
11796
+ }, toDisplayString(unref$1(itemsPerPageStart)) + " - " + toDisplayString(unref$1(itemsPerPageEnd)) + " de " + toDisplayString(__props.listLength), 3)) : createCommentVNode("", true),
11797
+ !unref$1(hideSearch) ? (openBlock(), createBlock(ckInput, {
11798
+ key: 2,
11799
+ modelValue: unref$1(searchLocal),
11800
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef$1(searchLocal) ? searchLocal.value = $event : null),
11801
+ icon: "search",
11802
+ placeholder: "Buscar...",
11803
+ group: unref$1(searchGroupValue),
11804
+ onInput: _cache[2] || (_cache[2] = ($event) => checkRefresh())
11805
+ }, null, 8, ["modelValue", "group"])) : createCommentVNode("", true),
11806
+ __props.hasColumnsManager ? (openBlock(), createBlock(ckButton, {
11807
+ key: 3,
11808
+ icon: "columns",
11809
+ type: "filled",
11810
+ title: "Administrador de columnas",
11811
+ group: unref$1(itemsPerPageIsVisible) || !unref$1(hideSearch) ? "right" : "",
11812
+ onClick: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("openColumnsManager"))
11813
+ }, null, 8, ["group"])) : createCommentVNode("", true)
11814
+ ]);
11815
+ };
11816
+ }
11817
+ });
11818
+ var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-5638f498"]]);
11819
+ var ckTable__pagination_vue_vue_type_style_index_0_scoped_true_lang = "";
11820
+ const _hoisted_1$c = { class: "ck-table__pagination" };
11821
+ const _hoisted_2$7 = ["onClick"];
11822
+ const _hoisted_3$5 = ["onClick"];
11823
+ const itemsShowed = 5;
11824
+ const __default__ = {
11825
+ name: "CkTablePagination",
11826
+ props: {
11827
+ currentPage: { type: Number, required: true },
11828
+ align: { type: String, required: true },
11829
+ itemsPerPage: { type: Number, required: true },
11830
+ listLength: { type: Number, required: true }
11831
+ },
11832
+ emits: ["refreshList", "update:currentPage"],
11833
+ computed: {
11834
+ currentPageLocal2: {
11835
+ get() {
11836
+ return this.currentPage;
11837
+ },
11838
+ set(val) {
11839
+ return;
11840
+ }
11841
+ },
11842
+ hasArrowLeft() {
11843
+ if (!this.listLeft.length)
11844
+ return false;
11845
+ return this.listLeft[0] !== 1;
11846
+ },
11847
+ totalPages() {
11848
+ return Math.ceil(this.listLength / this.itemsPerPage);
11849
+ },
11850
+ hasArrowRight() {
11851
+ if (!this.listRight.length)
11852
+ return false;
11853
+ return this.listRight[this.listRight.length - 1] !== this.totalPages;
11854
+ },
11855
+ listLeft() {
11856
+ if (!this.listLength)
11857
+ return [];
11858
+ const list = [];
11859
+ const listLength = (itemsShowed - 1) / 2;
11860
+ for (const num of Array(listLength).keys()) {
11861
+ const listItem = this.currentPage - num - 1;
11862
+ if (listItem > 0)
11863
+ list.unshift(listItem);
11864
+ }
11865
+ return list;
11866
+ },
11867
+ listRight() {
11868
+ if (!this.listLength)
11869
+ return [];
11870
+ const list = [];
11871
+ const listLength = (itemsShowed - 1) / 2;
11872
+ for (const num of Array(listLength).keys()) {
11873
+ const listItem = this.currentPage + num + 1;
11874
+ if (listItem <= this.totalPages)
11875
+ list.push(listItem);
11876
+ }
11877
+ return list;
11878
+ }
11879
+ },
11880
+ methods: {
11881
+ updateCurrentPage(val) {
11882
+ this.$emit("update:currentPage", val);
11883
+ this.$emit("refreshList", val);
11884
+ },
11885
+ validateInputNumber(val) {
11886
+ val = +val;
11887
+ if (val > this.totalPages)
11888
+ val = this.totalPages;
11889
+ if (val < 1)
11890
+ val = 1;
11891
+ if (val === this.currentPage)
11892
+ return;
11893
+ this.updateCurrentPage(val);
11894
+ }
11895
+ }
11896
+ };
11897
+ const _sfc_main$d = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__), {
11898
+ setup(__props) {
11899
+ return (_ctx, _cache) => {
11900
+ return __props.currentPage && _ctx.totalPages > 1 ? (openBlock(), createElementBlock("div", {
11901
+ key: 0,
11902
+ class: normalizeClass(["ck-table__pagination-container", `pagination-align--${__props.align}`])
11903
+ }, [
11904
+ createElementVNode("div", _hoisted_1$c, [
11905
+ _ctx.hasArrowLeft ? (openBlock(), createElementBlock("div", {
11906
+ key: 0,
11907
+ class: "ck-table__pagination--arrow-left",
11908
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.updateCurrentPage(__props.currentPage - 1))
11909
+ }, [
11910
+ createVNode(ckIcon, { icon: "arrow-left" })
11911
+ ])) : createCommentVNode("", true),
11912
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.listLeft, (num) => {
11913
+ return openBlock(), createElementBlock("div", {
11914
+ class: "ck-table__pagination-item pagination-item__left",
11915
+ onClick: ($event) => _ctx.updateCurrentPage(num)
11916
+ }, toDisplayString(num), 9, _hoisted_2$7);
11917
+ }), 256)),
11918
+ createVNode(ckInput, {
11919
+ class: "ck-table__pagination-input",
11920
+ autoSelect: "",
11921
+ type: "number",
11922
+ width: "50px",
11923
+ align: "center",
11924
+ modelValue: _ctx.currentPageLocal2,
11925
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef$1(currentPageLocal2) ? currentPageLocal2.value = $event : null),
11926
+ onChange: _cache[2] || (_cache[2] = ($event) => _ctx.validateInputNumber($event.target.value))
11927
+ }, null, 8, ["modelValue"]),
11928
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.listRight, (num) => {
11929
+ return openBlock(), createElementBlock("div", {
11930
+ class: "ck-table__pagination-item pagination-item__right",
11931
+ onClick: ($event) => _ctx.updateCurrentPage(num)
11932
+ }, toDisplayString(num), 9, _hoisted_3$5);
11933
+ }), 256)),
11934
+ _ctx.hasArrowRight ? (openBlock(), createElementBlock("div", {
11935
+ key: 1,
11936
+ class: "ck-table__pagination--arrow-right",
11937
+ onClick: _cache[3] || (_cache[3] = ($event) => _ctx.updateCurrentPage(__props.currentPage + 1))
11938
+ }, [
11939
+ createVNode(ckIcon, { icon: "arrow-right" })
11940
+ ])) : createCommentVNode("", true)
11941
+ ])
11942
+ ], 2)) : createCommentVNode("", true);
11943
+ };
11944
+ }
11945
+ }));
11946
+ var TablePagination = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-65c21486"]]);
11947
+ const NOOP$1 = () => {
11948
+ };
11949
+ const isArray$1 = Array.isArray;
11950
+ const isFunction$1 = (val) => typeof val === "function";
11951
+ const isSymbol = (val) => typeof val === "symbol";
11952
+ const def = (obj, key, value) => {
11953
+ Object.defineProperty(obj, key, {
11954
+ configurable: true,
11955
+ enumerable: false,
11956
+ value
11957
+ });
11958
+ };
11959
+ let activeEffectScope;
11960
+ function recordEffectScope(effect3, scope) {
11961
+ scope = scope || activeEffectScope;
11962
+ if (scope && scope.active) {
11963
+ scope.effects.push(effect3);
11964
+ }
11965
+ }
11966
+ const createDep = (effects) => {
11967
+ const dep = new Set(effects);
11968
+ dep.w = 0;
11969
+ dep.n = 0;
11970
+ return dep;
11971
+ };
11972
+ const wasTracked = (dep) => (dep.w & trackOpBit) > 0;
11973
+ const newTracked = (dep) => (dep.n & trackOpBit) > 0;
11974
+ const initDepMarkers = ({ deps }) => {
11975
+ if (deps.length) {
11976
+ for (let i = 0; i < deps.length; i++) {
11977
+ deps[i].w |= trackOpBit;
11978
+ }
11979
+ }
11980
+ };
11981
+ const finalizeDepMarkers = (effect3) => {
11982
+ const { deps } = effect3;
11983
+ if (deps.length) {
11984
+ let ptr = 0;
11985
+ for (let i = 0; i < deps.length; i++) {
11986
+ const dep = deps[i];
11987
+ if (wasTracked(dep) && !newTracked(dep)) {
11988
+ dep.delete(effect3);
11989
+ } else {
11990
+ deps[ptr++] = dep;
11991
+ }
11992
+ dep.w &= ~trackOpBit;
11993
+ dep.n &= ~trackOpBit;
11994
+ }
11995
+ deps.length = ptr;
11996
+ }
11997
+ };
11998
+ let effectTrackDepth = 0;
11999
+ let trackOpBit = 1;
12000
+ const maxMarkerBits = 30;
12001
+ const effectStack = [];
12002
+ let activeEffect;
12003
+ class ReactiveEffect {
12004
+ constructor(fn2, scheduler = null, scope) {
12005
+ this.fn = fn2;
12006
+ this.scheduler = scheduler;
12007
+ this.active = true;
12008
+ this.deps = [];
12009
+ recordEffectScope(this, scope);
12010
+ }
12011
+ run() {
12012
+ if (!this.active) {
12013
+ return this.fn();
12014
+ }
12015
+ if (!effectStack.length || !effectStack.includes(this)) {
12016
+ try {
12017
+ effectStack.push(activeEffect = this);
12018
+ enableTracking();
12019
+ trackOpBit = 1 << ++effectTrackDepth;
12020
+ if (effectTrackDepth <= maxMarkerBits) {
12021
+ initDepMarkers(this);
12022
+ } else {
12023
+ cleanupEffect(this);
12024
+ }
12025
+ return this.fn();
12026
+ } finally {
12027
+ if (effectTrackDepth <= maxMarkerBits) {
12028
+ finalizeDepMarkers(this);
12029
+ }
12030
+ trackOpBit = 1 << --effectTrackDepth;
12031
+ resetTracking();
12032
+ effectStack.pop();
12033
+ const n = effectStack.length;
12034
+ activeEffect = n > 0 ? effectStack[n - 1] : void 0;
12035
+ }
12036
+ }
12037
+ }
12038
+ stop() {
12039
+ if (this.active) {
12040
+ cleanupEffect(this);
12041
+ if (this.onStop) {
12042
+ this.onStop();
12043
+ }
12044
+ this.active = false;
12045
+ }
12046
+ }
12047
+ }
12048
+ function cleanupEffect(effect3) {
12049
+ const { deps } = effect3;
12050
+ if (deps.length) {
12051
+ for (let i = 0; i < deps.length; i++) {
12052
+ deps[i].delete(effect3);
12053
+ }
12054
+ deps.length = 0;
12055
+ }
12056
+ }
12057
+ let shouldTrack = true;
12058
+ const trackStack = [];
12059
+ function enableTracking() {
11630
12060
  trackStack.push(shouldTrack);
11631
12061
  shouldTrack = true;
11632
12062
  }
@@ -12126,458 +12556,196 @@ function traverse(value, seen) {
12126
12556
  } else if (isArray(value)) {
12127
12557
  for (let i = 0; i < value.length; i++) {
12128
12558
  traverse(value[i], seen);
12129
- }
12130
- } else if (isSet(value) || isMap(value)) {
12131
- value.forEach((v) => {
12132
- traverse(v, seen);
12133
- });
12134
- } else if (isPlainObject(value)) {
12135
- for (const key in value) {
12136
- traverse(value[key], seen);
12137
- }
12138
- }
12139
- return value;
12140
- }
12141
- function resolveMergedOptions(instance) {
12142
- const base = instance.type;
12143
- const { mixins, extends: extendsOptions } = base;
12144
- const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext;
12145
- const cached = cache.get(base);
12146
- let resolved;
12147
- if (cached) {
12148
- resolved = cached;
12149
- } else if (!globalMixins.length && !mixins && !extendsOptions) {
12150
- {
12151
- resolved = base;
12152
- }
12153
- } else {
12154
- resolved = {};
12155
- if (globalMixins.length) {
12156
- globalMixins.forEach((m) => mergeOptions(resolved, m, optionMergeStrategies, true));
12157
- }
12158
- mergeOptions(resolved, base, optionMergeStrategies);
12159
- }
12160
- cache.set(base, resolved);
12161
- return resolved;
12162
- }
12163
- function mergeOptions(to, from, strats, asMixin = false) {
12164
- const { mixins, extends: extendsOptions } = from;
12165
- if (extendsOptions) {
12166
- mergeOptions(to, extendsOptions, strats, true);
12167
- }
12168
- if (mixins) {
12169
- mixins.forEach((m) => mergeOptions(to, m, strats, true));
12170
- }
12171
- for (const key in from) {
12172
- if (asMixin && key === "expose")
12173
- ;
12174
- else {
12175
- const strat = internalOptionMergeStrats[key] || strats && strats[key];
12176
- to[key] = strat ? strat(to[key], from[key]) : from[key];
12177
- }
12178
- }
12179
- return to;
12180
- }
12181
- const internalOptionMergeStrats = {
12182
- data: mergeDataFn,
12183
- props: mergeObjectOptions,
12184
- emits: mergeObjectOptions,
12185
- methods: mergeObjectOptions,
12186
- computed: mergeObjectOptions,
12187
- beforeCreate: mergeAsArray,
12188
- created: mergeAsArray,
12189
- beforeMount: mergeAsArray,
12190
- mounted: mergeAsArray,
12191
- beforeUpdate: mergeAsArray,
12192
- updated: mergeAsArray,
12193
- beforeDestroy: mergeAsArray,
12194
- beforeUnmount: mergeAsArray,
12195
- destroyed: mergeAsArray,
12196
- unmounted: mergeAsArray,
12197
- activated: mergeAsArray,
12198
- deactivated: mergeAsArray,
12199
- errorCaptured: mergeAsArray,
12200
- serverPrefetch: mergeAsArray,
12201
- components: mergeObjectOptions,
12202
- directives: mergeObjectOptions,
12203
- watch: mergeWatchOptions,
12204
- provide: mergeDataFn,
12205
- inject: mergeInject
12206
- };
12207
- function mergeDataFn(to, from) {
12208
- if (!from) {
12209
- return to;
12210
- }
12211
- if (!to) {
12212
- return from;
12213
- }
12214
- return function mergedDataFn() {
12215
- return extend(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from);
12216
- };
12217
- }
12218
- function mergeInject(to, from) {
12219
- return mergeObjectOptions(normalizeInject(to), normalizeInject(from));
12220
- }
12221
- function normalizeInject(raw) {
12222
- if (isArray(raw)) {
12223
- const res = {};
12224
- for (let i = 0; i < raw.length; i++) {
12225
- res[raw[i]] = raw[i];
12226
- }
12227
- return res;
12228
- }
12229
- return raw;
12230
- }
12231
- function mergeAsArray(to, from) {
12232
- return to ? [...new Set([].concat(to, from))] : from;
12233
- }
12234
- function mergeObjectOptions(to, from) {
12235
- return to ? extend(extend(Object.create(null), to), from) : from;
12236
- }
12237
- function mergeWatchOptions(to, from) {
12238
- if (!to)
12239
- return from;
12240
- if (!from)
12241
- return to;
12242
- const merged = extend(Object.create(null), to);
12243
- for (const key in from) {
12244
- merged[key] = mergeAsArray(to[key], from[key]);
12245
- }
12246
- return merged;
12247
- }
12248
- const queuePostRenderEffect = queueEffectWithSuspense;
12249
- const getPublicInstance = (i) => {
12250
- if (!i)
12251
- return null;
12252
- if (isStatefulComponent(i))
12253
- return getExposeProxy(i) || i.proxy;
12254
- return getPublicInstance(i.parent);
12255
- };
12256
- const publicPropertiesMap = extend(Object.create(null), {
12257
- $: (i) => i,
12258
- $el: (i) => i.vnode.el,
12259
- $data: (i) => i.data,
12260
- $props: (i) => i.props,
12261
- $attrs: (i) => i.attrs,
12262
- $slots: (i) => i.slots,
12263
- $refs: (i) => i.refs,
12264
- $parent: (i) => getPublicInstance(i.parent),
12265
- $root: (i) => getPublicInstance(i.root),
12266
- $emit: (i) => i.emit,
12267
- $options: (i) => resolveMergedOptions(i),
12268
- $forceUpdate: (i) => () => queueJob(i.update),
12269
- $nextTick: (i) => nextTick.bind(i.proxy),
12270
- $watch: (i) => instanceWatch.bind(i)
12271
- });
12272
- let currentInstance = null;
12273
- const setCurrentInstance = (instance) => {
12274
- currentInstance = instance;
12275
- instance.scope.on();
12276
- };
12277
- const unsetCurrentInstance = () => {
12278
- currentInstance && currentInstance.scope.off();
12279
- currentInstance = null;
12280
- };
12281
- function isStatefulComponent(instance) {
12282
- return instance.vnode.shapeFlag & 4;
12283
- }
12284
- let isInSSRComponentSetup = false;
12285
- function getExposeProxy(instance) {
12286
- if (instance.exposed) {
12287
- return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
12288
- get(target, key) {
12289
- if (key in target) {
12290
- return target[key];
12291
- } else if (key in publicPropertiesMap) {
12292
- return publicPropertiesMap[key](instance);
12293
- }
12294
- }
12295
- }));
12559
+ }
12560
+ } else if (isSet(value) || isMap(value)) {
12561
+ value.forEach((v) => {
12562
+ traverse(v, seen);
12563
+ });
12564
+ } else if (isPlainObject(value)) {
12565
+ for (const key in value) {
12566
+ traverse(value[key], seen);
12567
+ }
12296
12568
  }
12569
+ return value;
12297
12570
  }
12298
- const computed = (getterOrOptions, debugOptions) => {
12299
- return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
12300
- };
12301
- var ckCheckbox_vue_vue_type_style_index_0_scoped_true_lang = "";
12302
- const _withScopeId$2 = (n) => (pushScopeId("data-v-132565da"), n = n(), popScopeId(), n);
12303
- const _hoisted_1$h = ["disabled", "checked"];
12304
- const _hoisted_2$8 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", { class: "ck-checkbox__element" }, null, -1));
12305
- const _hoisted_3$5 = {
12306
- key: 0,
12307
- class: "c-Checkbox__label"
12308
- };
12309
- const _sfc_main$j = /* @__PURE__ */ defineComponent({
12310
- props: {
12311
- modelValue: { type: Boolean, default: false },
12312
- label: { type: String, default: void 0 },
12313
- disabled: { type: Boolean, default: false }
12314
- },
12315
- emits: ["update:modelValue", "change"],
12316
- setup(__props, { emit: emits }) {
12317
- const props = __props;
12318
- const value = computed({
12319
- get() {
12320
- return props.modelValue;
12321
- },
12322
- set(val) {
12323
- emits("update:modelValue", val);
12324
- }
12325
- });
12326
- const checkboxAttributes = computed(() => {
12327
- return {
12328
- "aria-disabled": props.disabled,
12329
- tabindex: props.disabled ? void 0 : "0"
12330
- };
12331
- });
12332
- function onChange(event) {
12333
- emits("change", event);
12571
+ function resolveMergedOptions(instance) {
12572
+ const base = instance.type;
12573
+ const { mixins, extends: extendsOptions } = base;
12574
+ const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext;
12575
+ const cached = cache.get(base);
12576
+ let resolved;
12577
+ if (cached) {
12578
+ resolved = cached;
12579
+ } else if (!globalMixins.length && !mixins && !extendsOptions) {
12580
+ {
12581
+ resolved = base;
12334
12582
  }
12335
- function onTrigger2() {
12336
- value.value = !value.value;
12583
+ } else {
12584
+ resolved = {};
12585
+ if (globalMixins.length) {
12586
+ globalMixins.forEach((m) => mergeOptions(resolved, m, optionMergeStrategies, true));
12337
12587
  }
12338
- return (_ctx, _cache) => {
12339
- return openBlock(), createElementBlock("label", mergeProps({ class: "ck-checkbox" }, unref$1(checkboxAttributes), {
12340
- onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(() => {
12341
- }, ["prevent"]), ["space"])),
12342
- onKeyup: [
12343
- _cache[2] || (_cache[2] = withKeys(($event) => onTrigger2(), ["enter"])),
12344
- _cache[3] || (_cache[3] = withKeys(($event) => onTrigger2(), ["space"]))
12345
- ]
12346
- }), [
12347
- createElementVNode("input", {
12348
- class: "ck-checkbox__input",
12349
- "aria-hidden": "true",
12350
- type: "checkbox",
12351
- disabled: __props.disabled,
12352
- checked: unref$1(value),
12353
- onChange: _cache[0] || (_cache[0] = ($event) => {
12354
- value.value = $event.target.checked;
12355
- onChange($event);
12356
- })
12357
- }, null, 40, _hoisted_1$h),
12358
- _hoisted_2$8,
12359
- _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_3$5, [
12360
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
12361
- ])) : createCommentVNode("", true)
12362
- ], 16);
12363
- };
12588
+ mergeOptions(resolved, base, optionMergeStrategies);
12364
12589
  }
12365
- });
12366
- var ckCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-132565da"]]);
12367
- var ckChip_vue_vue_type_style_index_0_scoped_true_lang = "";
12368
- const _hoisted_1$g = ["color"];
12369
- const _sfc_main$i = /* @__PURE__ */ defineComponent({
12370
- props: {
12371
- size: { type: String, default: "s" },
12372
- color: { type: String, default: "primary" },
12373
- textColor: { type: String, default: void 0 },
12374
- icon: { type: String, default: void 0 },
12375
- iconPack: { type: String, default: void 0 }
12376
- },
12377
- emits: ["click"],
12378
- setup(__props, { emit: emits }) {
12379
- const props = __props;
12380
- const computedClass = computed$2(() => {
12381
- return [
12382
- `size-${props.size}`,
12383
- `ck-component__bg-color--${props.color}`
12384
- ];
12385
- });
12386
- const computedStyle = computed$2(() => {
12387
- const list = [];
12388
- if (props.color)
12389
- ;
12390
- return list;
12391
- });
12392
- return (_ctx, _cache) => {
12393
- return openBlock(), createElementBlock("div", {
12394
- class: normalizeClass(["ck-chip", unref$1(computedClass)]),
12395
- color: __props.color,
12396
- style: normalizeStyle(unref$1(computedStyle)),
12397
- onClick: _cache[0] || (_cache[0] = ($event) => emits("click", $event))
12398
- }, [
12399
- __props.icon ? (openBlock(), createBlock(ckIcon, {
12400
- key: 0,
12401
- icon: __props.icon,
12402
- "icon-pack": __props.iconPack
12403
- }, null, 8, ["icon", "icon-pack"])) : createCommentVNode("", true),
12404
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
12405
- ], 14, _hoisted_1$g);
12406
- };
12590
+ cache.set(base, resolved);
12591
+ return resolved;
12592
+ }
12593
+ function mergeOptions(to, from, strats, asMixin = false) {
12594
+ const { mixins, extends: extendsOptions } = from;
12595
+ if (extendsOptions) {
12596
+ mergeOptions(to, extendsOptions, strats, true);
12407
12597
  }
12408
- });
12409
- var ckChip = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-5333de26"]]);
12410
- var globalVariables = {
12411
- defaultFailImg: "df",
12412
- imagesFolderPath: "",
12413
- defaultImgBorderColor: "#EEEEEE"
12414
- };
12415
- var ckImg_vue_vue_type_style_index_0_scoped_true_lang = "";
12416
- const _hoisted_1$f = ["src", "alt"];
12417
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
12418
- props: {
12419
- src: { type: String, default: "" },
12420
- isFullPath: { type: Boolean, default: false },
12421
- failImgSrc: { type: String, default: "" },
12422
- alt: { type: String, default: "" },
12423
- size: { type: String, default: "", validator: validators.size },
12424
- sizeAbsolute: { type: String, default: "" },
12425
- width: { type: String, default: "" },
12426
- height: { type: String, default: "" },
12427
- zoom: { type: Boolean, default: false },
12428
- zoomTitle: { type: String, default: "" },
12429
- hasBorder: { type: Boolean, default: false },
12430
- radius: { type: String, default: "" },
12431
- borderColor: { type: String, default: "" },
12432
- rounded: { type: Boolean, default: false }
12433
- },
12434
- setup(__props) {
12435
- const props = __props;
12436
- const altNeeded = ref(false);
12437
- let isMounted = ref(false);
12438
- const imageUrl = computed$2(() => {
12439
- if (!isMounted.value)
12440
- return "";
12441
- if (props.isFullPath)
12442
- return props.src;
12443
- return getImg(props.src);
12444
- });
12445
- const computedClass = computed$2(() => {
12446
- const classList2 = [];
12447
- if (props.size)
12448
- classList2.push(`ck-img__size--${props.size}`);
12449
- if (props.rounded)
12450
- classList2.push("is-rounded");
12451
- if (props.hasBorder) {
12452
- classList2.push("ck-img__has-border");
12453
- if (functions.isColorTemplateVariable(realBorderColor.value)) {
12454
- classList2.push(`ck-component__border-color--${realBorderColor.value}`);
12455
- }
12456
- }
12457
- if (props.zoom)
12458
- classList2.push("zoom-able");
12459
- return classList2;
12460
- });
12461
- const computedStyle = computed$2(() => {
12462
- const styleList = [];
12463
- if (props.sizeAbsolute) {
12464
- styleList.push({ width: props.sizeAbsolute });
12465
- styleList.push({ height: props.sizeAbsolute });
12466
- }
12467
- if (props.radius)
12468
- styleList.push({ "border-radius": props.radius });
12469
- if (props.hasBorder) {
12470
- if (!functions.isColorTemplateVariable(realBorderColor.value)) {
12471
- styleList.push({ "border-color": realBorderColor.value });
12472
- }
12473
- }
12474
- return styleList;
12475
- });
12476
- const computedImgStyle = computed$2(() => {
12477
- const styleList = [];
12478
- if (props.radius)
12479
- styleList.push({ "border-radius": props.radius });
12480
- if (props.width)
12481
- styleList.push({ width: props.width });
12482
- if (props.height)
12483
- styleList.push({ height: props.height });
12484
- return styleList;
12485
- });
12486
- const realBorderColor = computed$2(() => {
12487
- if (props.borderColor)
12488
- return props.borderColor;
12489
- return globalVariables.defaultImgBorderColor;
12490
- });
12491
- function clickImg() {
12492
- if (props.zoom)
12493
- ;
12598
+ if (mixins) {
12599
+ mixins.forEach((m) => mergeOptions(to, m, strats, true));
12600
+ }
12601
+ for (const key in from) {
12602
+ if (asMixin && key === "expose")
12603
+ ;
12604
+ else {
12605
+ const strat = internalOptionMergeStrats[key] || strats && strats[key];
12606
+ to[key] = strat ? strat(to[key], from[key]) : from[key];
12494
12607
  }
12495
- function getImg(src) {
12496
- let path = "";
12497
- const $cleekOptions = functions.getCleekOptions(getCurrentInstance);
12498
- if ($cleekOptions) {
12499
- if ($cleekOptions.imgPath)
12500
- path = $cleekOptions.imgPath;
12501
- }
12502
- return `${path}${src}`;
12608
+ }
12609
+ return to;
12610
+ }
12611
+ const internalOptionMergeStrats = {
12612
+ data: mergeDataFn,
12613
+ props: mergeObjectOptions,
12614
+ emits: mergeObjectOptions,
12615
+ methods: mergeObjectOptions,
12616
+ computed: mergeObjectOptions,
12617
+ beforeCreate: mergeAsArray,
12618
+ created: mergeAsArray,
12619
+ beforeMount: mergeAsArray,
12620
+ mounted: mergeAsArray,
12621
+ beforeUpdate: mergeAsArray,
12622
+ updated: mergeAsArray,
12623
+ beforeDestroy: mergeAsArray,
12624
+ beforeUnmount: mergeAsArray,
12625
+ destroyed: mergeAsArray,
12626
+ unmounted: mergeAsArray,
12627
+ activated: mergeAsArray,
12628
+ deactivated: mergeAsArray,
12629
+ errorCaptured: mergeAsArray,
12630
+ serverPrefetch: mergeAsArray,
12631
+ components: mergeObjectOptions,
12632
+ directives: mergeObjectOptions,
12633
+ watch: mergeWatchOptions,
12634
+ provide: mergeDataFn,
12635
+ inject: mergeInject
12636
+ };
12637
+ function mergeDataFn(to, from) {
12638
+ if (!from) {
12639
+ return to;
12640
+ }
12641
+ if (!to) {
12642
+ return from;
12643
+ }
12644
+ return function mergedDataFn() {
12645
+ return extend(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from);
12646
+ };
12647
+ }
12648
+ function mergeInject(to, from) {
12649
+ return mergeObjectOptions(normalizeInject(to), normalizeInject(from));
12650
+ }
12651
+ function normalizeInject(raw) {
12652
+ if (isArray(raw)) {
12653
+ const res = {};
12654
+ for (let i = 0; i < raw.length; i++) {
12655
+ res[raw[i]] = raw[i];
12503
12656
  }
12504
- onMounted(() => {
12505
- getCurrentInstance().ctx;
12506
- isMounted.value = true;
12507
- });
12508
- return (_ctx, _cache) => {
12509
- return openBlock(), createElementBlock("div", {
12510
- class: normalizeClass(["ck-img", unref$1(computedClass)]),
12511
- style: normalizeStyle(unref$1(computedStyle)),
12512
- onClick: _cache[1] || (_cache[1] = ($event) => clickImg())
12513
- }, [
12514
- createElementVNode("img", {
12515
- src: unref$1(imageUrl),
12516
- style: normalizeStyle(unref$1(computedImgStyle)),
12517
- alt: __props.alt,
12518
- onError: _cache[0] || (_cache[0] = ($event) => altNeeded.value = true)
12519
- }, null, 44, _hoisted_1$f)
12520
- ], 6);
12521
- };
12657
+ return res;
12522
12658
  }
12523
- });
12524
- var ckImg = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-e808078e"]]);
12525
- var ckLabel_vue_vue_type_style_index_0_scoped_true_lang = "";
12526
- const _hoisted_1$e = ["for"];
12527
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
12528
- props: {
12529
- for: { type: String, default: "" },
12530
- align: { type: String, default: "" }
12531
- },
12532
- setup(__props) {
12533
- const props = __props;
12534
- const computedClass = computed$2(() => {
12535
- const list = [];
12536
- let align = "left";
12537
- if (props.align === "center" || props.align === "right")
12538
- align = props.align;
12539
- list.push(`ck-align--${align}`);
12540
- return list;
12541
- });
12542
- return (_ctx, _cache) => {
12543
- return openBlock(), createElementBlock("label", {
12544
- class: normalizeClass(["ck-label", unref$1(computedClass)]),
12545
- for: __props.for
12546
- }, [
12547
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
12548
- ], 10, _hoisted_1$e);
12549
- };
12659
+ return raw;
12660
+ }
12661
+ function mergeAsArray(to, from) {
12662
+ return to ? [...new Set([].concat(to, from))] : from;
12663
+ }
12664
+ function mergeObjectOptions(to, from) {
12665
+ return to ? extend(extend(Object.create(null), to), from) : from;
12666
+ }
12667
+ function mergeWatchOptions(to, from) {
12668
+ if (!to)
12669
+ return from;
12670
+ if (!from)
12671
+ return to;
12672
+ const merged = extend(Object.create(null), to);
12673
+ for (const key in from) {
12674
+ merged[key] = mergeAsArray(to[key], from[key]);
12550
12675
  }
12676
+ return merged;
12677
+ }
12678
+ const queuePostRenderEffect = queueEffectWithSuspense;
12679
+ const getPublicInstance = (i) => {
12680
+ if (!i)
12681
+ return null;
12682
+ if (isStatefulComponent(i))
12683
+ return getExposeProxy(i) || i.proxy;
12684
+ return getPublicInstance(i.parent);
12685
+ };
12686
+ const publicPropertiesMap = extend(Object.create(null), {
12687
+ $: (i) => i,
12688
+ $el: (i) => i.vnode.el,
12689
+ $data: (i) => i.data,
12690
+ $props: (i) => i.props,
12691
+ $attrs: (i) => i.attrs,
12692
+ $slots: (i) => i.slots,
12693
+ $refs: (i) => i.refs,
12694
+ $parent: (i) => getPublicInstance(i.parent),
12695
+ $root: (i) => getPublicInstance(i.root),
12696
+ $emit: (i) => i.emit,
12697
+ $options: (i) => resolveMergedOptions(i),
12698
+ $forceUpdate: (i) => () => queueJob(i.update),
12699
+ $nextTick: (i) => nextTick.bind(i.proxy),
12700
+ $watch: (i) => instanceWatch.bind(i)
12551
12701
  });
12552
- var ckLabel = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-ef74ea02"]]);
12553
- var ckInput_vue_vue_type_style_index_0_scoped_true_lang = "";
12554
- const _hoisted_1$d = { class: "ck-input" };
12555
- const _hoisted_2$7 = ["type", "placeholder", "id", "disabled"];
12556
- const _sfc_main$f = /* @__PURE__ */ defineComponent({
12702
+ let currentInstance = null;
12703
+ const setCurrentInstance = (instance) => {
12704
+ currentInstance = instance;
12705
+ instance.scope.on();
12706
+ };
12707
+ const unsetCurrentInstance = () => {
12708
+ currentInstance && currentInstance.scope.off();
12709
+ currentInstance = null;
12710
+ };
12711
+ function isStatefulComponent(instance) {
12712
+ return instance.vnode.shapeFlag & 4;
12713
+ }
12714
+ let isInSSRComponentSetup = false;
12715
+ function getExposeProxy(instance) {
12716
+ if (instance.exposed) {
12717
+ return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
12718
+ get(target, key) {
12719
+ if (key in target) {
12720
+ return target[key];
12721
+ } else if (key in publicPropertiesMap) {
12722
+ return publicPropertiesMap[key](instance);
12723
+ }
12724
+ }
12725
+ }));
12726
+ }
12727
+ }
12728
+ const computed = (getterOrOptions, debugOptions) => {
12729
+ return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
12730
+ };
12731
+ var ckCheckbox_vue_vue_type_style_index_0_scoped_true_lang = "";
12732
+ const _withScopeId$2 = (n) => (pushScopeId("data-v-132565da"), n = n(), popScopeId(), n);
12733
+ const _hoisted_1$b = ["disabled", "checked"];
12734
+ const _hoisted_2$6 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", { class: "ck-checkbox__element" }, null, -1));
12735
+ const _hoisted_3$4 = {
12736
+ key: 0,
12737
+ class: "c-Checkbox__label"
12738
+ };
12739
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
12557
12740
  props: {
12558
- modelValue: {},
12559
- type: { type: String, validator: validators.inputType, default: "text" },
12560
- disabled: { type: Boolean, default: false },
12561
- placeholder: { type: String, default: void 0 },
12741
+ modelValue: { type: Boolean, default: false },
12562
12742
  label: { type: String, default: void 0 },
12563
- labelAlign: { type: String, validator: validators.align, default: void 0 },
12564
- icon: { type: [String, Array], default: void 0 },
12565
- iconPack: { type: String, default: void 0 },
12566
- iconRight: { type: String, default: void 0 },
12567
- group: { type: String, default: void 0 },
12568
- groupBreak: { type: String, default: "s" },
12569
- groupVertical: { type: String, default: void 0 },
12570
- hideBorder: { type: Boolean, default: false },
12571
- width: { type: String, default: void 0 },
12572
- align: { type: String, validator: validators.align, default: void 0 },
12573
- autoSelect: { type: Boolean, default: false }
12743
+ disabled: { type: Boolean, default: false }
12574
12744
  },
12575
- emits: ["update:modelValue", "click", "input", "change"],
12576
- setup(__props, { expose, emit: emits }) {
12745
+ emits: ["update:modelValue", "change"],
12746
+ setup(__props, { emit: emits }) {
12577
12747
  const props = __props;
12578
- expose({ setFocus, setSelect });
12579
- const realInput = ref(null);
12580
- const value = computed$2({
12748
+ const value = computed({
12581
12749
  get() {
12582
12750
  return props.modelValue;
12583
12751
  },
@@ -12585,96 +12753,54 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
12585
12753
  emits("update:modelValue", val);
12586
12754
  }
12587
12755
  });
12588
- const onClick = (event) => {
12589
- if (props.autoSelect)
12590
- event.target.select();
12591
- emits("click", event);
12592
- };
12593
- const onInput = (event) => {
12594
- emits("input", event);
12595
- };
12596
- const onChange = (event) => {
12597
- emits("change", event);
12598
- };
12599
- const computedStyleInput = computed$2(() => {
12600
- const list = [];
12601
- if (props.width)
12602
- list.push({ width: props.width });
12603
- return list;
12604
- });
12605
- const computedClassInput = computed$2(() => {
12606
- const list = [];
12607
- list.push(functions.getGroupClass(props));
12608
- if (props.icon)
12609
- list.push("has-icon-left");
12610
- if (props.iconRight)
12611
- list.push("has-icon-right");
12612
- if (props.align)
12613
- list.push(`align--${props.align}`);
12614
- if (props.hideBorder)
12615
- list.push("no-border");
12616
- return list;
12756
+ const checkboxAttributes = computed(() => {
12757
+ return {
12758
+ "aria-disabled": props.disabled,
12759
+ tabindex: props.disabled ? void 0 : "0"
12760
+ };
12617
12761
  });
12618
- function setFocus() {
12619
- realInput.value.focus();
12762
+ function onChange(event) {
12763
+ emits("change", event);
12620
12764
  }
12621
- function setSelect() {
12622
- realInput.value.select();
12765
+ function onTrigger2() {
12766
+ value.value = !value.value;
12623
12767
  }
12624
12768
  return (_ctx, _cache) => {
12625
- return openBlock(), createElementBlock("div", _hoisted_1$d, [
12626
- __props.label ? (openBlock(), createBlock(ckLabel, {
12627
- key: 0,
12628
- align: __props.labelAlign,
12629
- for: "ck-input"
12630
- }, {
12631
- default: withCtx(() => [
12632
- createTextVNode(toDisplayString(__props.label), 1)
12633
- ]),
12634
- _: 1
12635
- }, 8, ["align"])) : createCommentVNode("", true),
12636
- __props.icon ? (openBlock(), createBlock(ckIcon, {
12637
- key: 1,
12638
- class: "ck-input__icon-left",
12639
- color: "lightgrey",
12640
- icon: __props.icon,
12641
- "icon-pack": __props.iconPack
12642
- }, null, 8, ["icon", "icon-pack"])) : createCommentVNode("", true),
12643
- withDirectives(createElementVNode("input", {
12644
- ref_key: "realInput",
12645
- ref: realInput,
12646
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(value) ? value.value = $event : null),
12647
- type: __props.type,
12648
- placeholder: __props.placeholder,
12649
- class: normalizeClass(unref$1(computedClassInput)),
12650
- style: normalizeStyle(unref$1(computedStyleInput)),
12651
- id: __props.label ? "ck-input" : "",
12652
- disabled: __props.disabled,
12653
- onChange: _cache[1] || (_cache[1] = ($event) => onChange($event)),
12654
- onInput: _cache[2] || (_cache[2] = ($event) => onInput($event)),
12655
- onClick: _cache[3] || (_cache[3] = ($event) => onClick($event))
12656
- }, null, 46, _hoisted_2$7), [
12657
- [vModelDynamic, unref$1(value)]
12658
- ]),
12659
- __props.iconRight ? (openBlock(), createBlock(ckIcon, {
12660
- key: 2,
12661
- class: "ck-input__icon-right",
12662
- color: "lightgrey",
12663
- icon: __props.iconRight,
12664
- "icon-pack": __props.iconPack
12665
- }, null, 8, ["icon", "icon-pack"])) : createCommentVNode("", true)
12666
- ]);
12769
+ return openBlock(), createElementBlock("label", mergeProps({ class: "ck-checkbox" }, unref$1(checkboxAttributes), {
12770
+ onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(() => {
12771
+ }, ["prevent"]), ["space"])),
12772
+ onKeyup: [
12773
+ _cache[2] || (_cache[2] = withKeys(($event) => onTrigger2(), ["enter"])),
12774
+ _cache[3] || (_cache[3] = withKeys(($event) => onTrigger2(), ["space"]))
12775
+ ]
12776
+ }), [
12777
+ createElementVNode("input", {
12778
+ class: "ck-checkbox__input",
12779
+ "aria-hidden": "true",
12780
+ type: "checkbox",
12781
+ disabled: __props.disabled,
12782
+ checked: unref$1(value),
12783
+ onChange: _cache[0] || (_cache[0] = ($event) => {
12784
+ value.value = $event.target.checked;
12785
+ onChange($event);
12786
+ })
12787
+ }, null, 40, _hoisted_1$b),
12788
+ _hoisted_2$6,
12789
+ _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_3$4, [
12790
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
12791
+ ])) : createCommentVNode("", true)
12792
+ ], 16);
12667
12793
  };
12668
12794
  }
12669
12795
  });
12670
- var ckInput = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-19dca096"]]);
12796
+ var ckCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-132565da"]]);
12671
12797
  var ckPopup_vue_vue_type_style_index_0_lang = "";
12672
- const _hoisted_1$c = {
12798
+ const _hoisted_1$a = {
12673
12799
  key: 0,
12674
12800
  class: "ck-popup"
12675
12801
  };
12676
- const _hoisted_2$6 = /* @__PURE__ */ createElementVNode("div", { class: "blackout" }, null, -1);
12677
- const _hoisted_3$4 = { class: "ck-popup__slot-header" };
12802
+ const _hoisted_2$5 = /* @__PURE__ */ createElementVNode("div", { class: "blackout" }, null, -1);
12803
+ const _hoisted_3$3 = { class: "ck-popup__slot-header" };
12678
12804
  const _hoisted_4$3 = {
12679
12805
  key: 0,
12680
12806
  class: "ck-popup__title"
@@ -12690,7 +12816,7 @@ const _hoisted_7 = {
12690
12816
  };
12691
12817
  const _hoisted_8 = /* @__PURE__ */ createTextVNode("Cancelar");
12692
12818
  const _hoisted_9 = /* @__PURE__ */ createTextVNode("Aceptar");
12693
- const _sfc_main$e = /* @__PURE__ */ defineComponent({
12819
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
12694
12820
  props: {
12695
12821
  modelValue: { type: Boolean },
12696
12822
  title: { type: String, default: void 0 },
@@ -12724,8 +12850,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
12724
12850
  isActive.value = false;
12725
12851
  }
12726
12852
  return (_ctx, _cache) => {
12727
- return unref$1(isActive) ? (openBlock(), createElementBlock("div", _hoisted_1$c, [
12728
- _hoisted_2$6,
12853
+ return unref$1(isActive) ? (openBlock(), createElementBlock("div", _hoisted_1$a, [
12854
+ _hoisted_2$5,
12729
12855
  createElementVNode("div", {
12730
12856
  class: "popup-container",
12731
12857
  onClick: _cache[4] || (_cache[4] = ($event) => onBgClick())
@@ -12735,7 +12861,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
12735
12861
  onClick: _cache[3] || (_cache[3] = withModifiers(() => {
12736
12862
  }, ["stop"]))
12737
12863
  }, [
12738
- createElementVNode("div", _hoisted_3$4, [
12864
+ createElementVNode("div", _hoisted_3$3, [
12739
12865
  __props.title ? (openBlock(), createElementBlock("h3", _hoisted_4$3, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
12740
12866
  renderSlot(_ctx.$slots, "header"),
12741
12867
  !__props.notCloseBtn ? (openBlock(), createBlock(ckIcon, {
@@ -12778,26 +12904,20 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
12778
12904
  };
12779
12905
  }
12780
12906
  });
12781
- var ckRadio_vue_vue_type_style_index_0_scoped_true_lang = "";
12782
- const _withScopeId$1 = (n) => (pushScopeId("data-v-a5198d80"), n = n(), popScopeId(), n);
12783
- const _hoisted_1$b = ["onKeyup"];
12784
- const _hoisted_2$5 = ["name", "value", "disabled"];
12785
- const _hoisted_3$3 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", { class: "c-Radio__element" }, null, -1));
12786
- const _hoisted_4$2 = {
12787
- key: 0,
12788
- class: "c-Radio__label"
12789
- };
12790
- const _sfc_main$d = /* @__PURE__ */ defineComponent({
12907
+ var ckTable__columnsManager_vue_vue_type_style_index_0_scoped_true_lang = "";
12908
+ const _hoisted_1$9 = { class: "columns-manger-container" };
12909
+ const _hoisted_2$4 = { class: "columns-manger__item" };
12910
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
12791
12911
  props: {
12792
- modelValue: { type: String, default: void 0 },
12793
- name: { type: String, required: true },
12794
- options: { type: Array, required: true, validator: validators.radioOptions },
12795
- disabled: { type: Boolean, default: false }
12912
+ modelValue: { type: Boolean, required: true },
12913
+ columns: { type: Object, required: true },
12914
+ columnsArray: { type: Array, required: true }
12796
12915
  },
12797
- emits: ["update:modelValue", "change"],
12916
+ emits: ["update:modelValue"],
12798
12917
  setup(__props, { emit: emits }) {
12799
12918
  const props = __props;
12800
- const value = computed$2({
12919
+ let columnsCheckable = ref([]);
12920
+ const isActive = computed$2({
12801
12921
  get() {
12802
12922
  return props.modelValue;
12803
12923
  },
@@ -12805,48 +12925,58 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
12805
12925
  emits("update:modelValue", val);
12806
12926
  }
12807
12927
  });
12808
- const radioAttributes = computed$2(() => {
12809
- return {
12810
- "aria-disabled": props.disabled,
12811
- tabindex: props.disabled ? void 0 : "0"
12812
- };
12928
+ watch(() => isActive.value, (val) => {
12929
+ if (!val)
12930
+ return;
12931
+ setColumnsCheckable();
12813
12932
  });
12814
- function handleChange(value2) {
12815
- value2.value = value2;
12816
- emits("change", value2);
12933
+ function setColumnsCheckable() {
12934
+ console.log("hoola");
12935
+ const list = [];
12936
+ props.columnsArray.forEach((col) => {
12937
+ if (!col.unchangeable) {
12938
+ list.push({
12939
+ name: col.name,
12940
+ title: col.title,
12941
+ value: functions.isColumnDisplayed(col)
12942
+ });
12943
+ }
12944
+ });
12945
+ columnsCheckable.value = list;
12946
+ }
12947
+ function setColumnDisplayValue(colName, value) {
12948
+ props.columns[colName].isDisplayed = value;
12817
12949
  }
12818
12950
  return (_ctx, _cache) => {
12819
- return openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (item, index) => {
12820
- return openBlock(), createElementBlock("label", mergeProps({
12821
- key: `radio-${index}`,
12822
- class: "c-Radio"
12823
- }, unref$1(radioAttributes), {
12824
- onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(() => {
12825
- }, ["prevent"]), ["space"])),
12826
- onKeyup: [
12827
- withKeys(($event) => handleChange(item.value), ["enter"]),
12828
- withKeys(($event) => handleChange(item.value), ["space"])
12829
- ]
12830
- }), [
12831
- withDirectives(createElementVNode("input", {
12832
- class: "c-Radio__input",
12833
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(value) ? value.value = $event : null),
12834
- "aria-hidden": "true",
12835
- type: "radio",
12836
- name: __props.name,
12837
- value: item.value,
12838
- disabled: __props.disabled
12839
- }, null, 8, _hoisted_2$5), [
12840
- [vModelRadio, unref$1(value)]
12841
- ]),
12842
- _hoisted_3$3,
12843
- item.label ? (openBlock(), createElementBlock("span", _hoisted_4$2, toDisplayString(item.label), 1)) : createCommentVNode("", true)
12844
- ], 16, _hoisted_1$b);
12845
- }), 128);
12951
+ return openBlock(), createBlock(_sfc_main$b, {
12952
+ modelValue: unref$1(isActive),
12953
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(isActive) ? isActive.value = $event : null),
12954
+ title: "Administrador de columnas"
12955
+ }, {
12956
+ default: withCtx(() => [
12957
+ createElementVNode("div", _hoisted_1$9, [
12958
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref$1(columnsCheckable), (col) => {
12959
+ return openBlock(), createElementBlock("div", _hoisted_2$4, [
12960
+ createVNode(ckCheckbox, {
12961
+ modelValue: col.value,
12962
+ "onUpdate:modelValue": ($event) => col.value = $event,
12963
+ onChange: ($event) => setColumnDisplayValue(col.name, col.value)
12964
+ }, {
12965
+ default: withCtx(() => [
12966
+ createTextVNode(toDisplayString(col.title), 1)
12967
+ ]),
12968
+ _: 2
12969
+ }, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])
12970
+ ]);
12971
+ }), 256))
12972
+ ])
12973
+ ]),
12974
+ _: 1
12975
+ }, 8, ["modelValue"]);
12846
12976
  };
12847
12977
  }
12848
12978
  });
12849
- var ckRadio = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-a5198d80"]]);
12979
+ var TableColumnsManager = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-5b0e173f"]]);
12850
12980
  var qmApi = {};
12851
12981
  var qmArray = {
12852
12982
  arrayToText(arr, key = null) {
@@ -13074,955 +13204,825 @@ var qmObj = {
13074
13204
  newList.unshift(noneOption);
13075
13205
  return newList;
13076
13206
  },
13077
- copyAvaibleFields(ObjEditable, ObjToCopy) {
13078
- for (const key in ObjEditable) {
13079
- if (typeof getKeyValue(ObjToCopy, key) !== "undefined") {
13080
- setKeyValue(ObjEditable, key, getKeyValue(ObjToCopy, key));
13081
- }
13082
- }
13083
- },
13084
- isArray(obj) {
13085
- return obj.constructor === Array;
13086
- },
13087
- objsAreTheSame(obj1, obj2) {
13088
- for (const key in obj1) {
13089
- if (getKeyValue(obj1, key) != getKeyValue(obj2, key))
13090
- return false;
13091
- }
13092
- for (const key in obj2) {
13093
- if (getKeyValue(obj1, key) != getKeyValue(obj2, key))
13094
- return false;
13095
- }
13096
- return true;
13097
- },
13098
- qoIsObjEmpty(obj = {}) {
13099
- return obj && Object.keys(obj).length === 0 && Object.getPrototypeOf(obj) === Object.prototype;
13100
- }
13101
- };
13102
- var main$1 = {
13103
- qmApi,
13104
- qmArray,
13105
- qmAudio,
13106
- qmNum,
13107
- qmObj,
13108
- qmStr
13109
- };
13110
- var App;
13111
- (function(App2) {
13112
- class SomeClass {
13113
- getName() {
13114
- return "name";
13115
- }
13116
- }
13117
- App2.SomeClass = SomeClass;
13118
- class OtherClass {
13119
- getName() {
13120
- return "name";
13121
- }
13122
- }
13123
- App2.OtherClass = OtherClass;
13124
- })(App || (App = {}));
13125
- var ckSelect_vue_vue_type_style_index_0_scoped_true_lang = "";
13126
- const _hoisted_1$a = ["value"];
13127
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
13128
- props: {
13129
- modelValue: { default: null, type: [Boolean, Number, Object, Array, String] },
13130
- prop: { type: String, default: "name" },
13131
- autofocus: { type: Boolean, default: false },
13132
- noDataText: { type: String, default: "No se encontr\xF3 nada" },
13133
- notReduce: { type: Boolean, default: false },
13134
- options: { type: Array, default: () => [] },
13135
- reduceFunction: { type: Function, default: (Option) => Option.id },
13136
- notClearable: { type: Boolean, default: false },
13137
- clearValue: { type: [Boolean, String], default: "auto" },
13138
- searchable: { type: [Boolean, String], default: "auto" },
13139
- minWidth: { type: String, default: "180px" },
13140
- noBorder: { type: Boolean, default: false },
13141
- bgTransparent: { type: Boolean, default: false },
13142
- disabled: { type: [Boolean, Number], default: false },
13143
- group: { type: String, default: "" },
13144
- groupBreak: { type: String, default: "" },
13145
- groupVertical: { type: String, default: "" },
13146
- label: { type: String, default: "" },
13147
- labelAlign: { type: String, default: "" }
13148
- },
13149
- emits: ["update:modelValue", "click", "change"],
13150
- setup(__props, { emit: emits }) {
13151
- const props = __props;
13152
- const { qmStr: qmStr2 } = main$1;
13153
- const search = ref("");
13154
- ref(null);
13155
- const value = computed$2({
13156
- get() {
13157
- return props.modelValue;
13158
- },
13159
- set(val) {
13160
- if (val === null)
13161
- val = realClearValue;
13162
- emits("update:modelValue", val);
13163
- }
13164
- });
13165
- const filteredOptions = computed$2(() => {
13166
- const list = props.options.filter((option) => {
13167
- const name = getOptionName(option);
13168
- return qmStr2.checkContainsStr(name, search.value);
13169
- });
13170
- return list;
13171
- });
13172
- const computedClass = computed$2(() => {
13173
- const classList2 = [];
13174
- classList2.push(functions.getGroupClass(props));
13175
- return classList2;
13176
- });
13177
- const computedStyle = computed$2(() => {
13178
- const list = [];
13179
- if (props.minWidth)
13180
- list.push({ "min-width": props.minWidth });
13181
- return list;
13182
- });
13183
- computed$2(() => {
13184
- if (props.searchable === "auto") {
13185
- if (props.options.length < 5)
13186
- return false;
13187
- return true;
13188
- }
13189
- return props.searchable;
13190
- });
13191
- const realClearValue = computed$2(() => {
13192
- switch (typeof props.modelValue) {
13193
- case "number":
13194
- return 0;
13195
- case "string":
13196
- return "";
13197
- case "object":
13198
- if (props.modelValue.constructor === Array)
13199
- return [];
13200
- return {};
13201
- default:
13202
- return null;
13203
- }
13204
- });
13205
- computed$2(() => {
13206
- switch (typeof props.modelValue) {
13207
- case "number":
13208
- return props.modelValue === 0;
13209
- case "string":
13210
- return props.modelValue === "";
13211
- case "object":
13212
- if (!props.modelValue)
13213
- return null;
13214
- if (props.modelValue.constructor === Array) {
13215
- return props.modelValue.length() === 0;
13216
- }
13217
- return Object.keys(props.modelValue).length === 0;
13218
- default:
13219
- return props.modelValue === null;
13207
+ copyAvaibleFields(ObjEditable, ObjToCopy) {
13208
+ for (const key in ObjEditable) {
13209
+ if (typeof getKeyValue(ObjToCopy, key) !== "undefined") {
13210
+ setKeyValue(ObjEditable, key, getKeyValue(ObjToCopy, key));
13220
13211
  }
13221
- });
13222
- function onClick(event) {
13223
- emits("click", event);
13224
13212
  }
13225
- const onChange = (event) => {
13226
- emits("change", event);
13227
- };
13228
- const getOptionKey = (option) => {
13229
- return realReduceFunction(option);
13230
- };
13231
- const getOptionName = (option) => {
13232
- if (!props.prop)
13233
- return option;
13234
- return option[props.prop];
13235
- };
13236
- const realReduceFunction = (option) => {
13237
- if (props.notReduce)
13238
- return option;
13239
- return props.reduceFunction(option);
13240
- };
13241
- return (_ctx, _cache) => {
13242
- return openBlock(), createElementBlock("div", {
13243
- class: "ck-select",
13244
- style: normalizeStyle(unref$1(computedStyle))
13245
- }, [
13246
- __props.label ? (openBlock(), createBlock(ckLabel, {
13247
- key: 0,
13248
- align: __props.labelAlign,
13249
- for: "ck-input"
13250
- }, {
13251
- default: withCtx(() => [
13252
- createTextVNode(toDisplayString(__props.label), 1)
13253
- ]),
13254
- _: 1
13255
- }, 8, ["align"])) : createCommentVNode("", true),
13256
- withDirectives(createElementVNode("select", {
13257
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(value) ? value.value = $event : null),
13258
- class: normalizeClass(unref$1(computedClass)),
13259
- onClick: _cache[1] || (_cache[1] = ($event) => onClick($event)),
13260
- onChange: _cache[2] || (_cache[2] = ($event) => onChange($event))
13261
- }, [
13262
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref$1(filteredOptions), (option) => {
13263
- return openBlock(), createElementBlock("option", {
13264
- value: getOptionKey(option),
13265
- key: option
13266
- }, toDisplayString(getOptionName(option)), 9, _hoisted_1$a);
13267
- }), 128))
13268
- ], 34), [
13269
- [vModelSelect, unref$1(value)]
13270
- ])
13271
- ], 4);
13272
- };
13213
+ },
13214
+ isArray(obj) {
13215
+ return obj.constructor === Array;
13216
+ },
13217
+ objsAreTheSame(obj1, obj2) {
13218
+ for (const key in obj1) {
13219
+ if (getKeyValue(obj1, key) != getKeyValue(obj2, key))
13220
+ return false;
13221
+ }
13222
+ for (const key in obj2) {
13223
+ if (getKeyValue(obj1, key) != getKeyValue(obj2, key))
13224
+ return false;
13225
+ }
13226
+ return true;
13227
+ },
13228
+ qoIsObjEmpty(obj = {}) {
13229
+ return obj && Object.keys(obj).length === 0 && Object.getPrototypeOf(obj) === Object.prototype;
13273
13230
  }
13274
- });
13275
- var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-31af160a"]]);
13276
- var ckSwitch_vue_vue_type_style_index_0_scoped_true_lang = "";
13277
- const _withScopeId = (n) => (pushScopeId("data-v-b6a4dfaa"), n = n(), popScopeId(), n);
13278
- const _hoisted_1$9 = ["disabled"];
13279
- const _hoisted_2$4 = { class: "ck-switch__slider-container" };
13280
- const _hoisted_3$2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "ck-switch__slider" }, null, -1));
13281
- const _hoisted_4$1 = {
13231
+ };
13232
+ var main$1 = {
13233
+ qmApi,
13234
+ qmArray,
13235
+ qmAudio,
13236
+ qmNum,
13237
+ qmObj,
13238
+ qmStr
13239
+ };
13240
+ var App;
13241
+ (function(App2) {
13242
+ class SomeClass {
13243
+ getName() {
13244
+ return "name";
13245
+ }
13246
+ }
13247
+ App2.SomeClass = SomeClass;
13248
+ class OtherClass {
13249
+ getName() {
13250
+ return "name";
13251
+ }
13252
+ }
13253
+ App2.OtherClass = OtherClass;
13254
+ })(App || (App = {}));
13255
+ var ckTable_vue_vue_type_style_index_0_scoped_true_lang = "";
13256
+ const _hoisted_1$8 = { class: "ck-table" };
13257
+ const _hoisted_2$3 = {
13282
13258
  key: 0,
13283
- class: "ck-switch__content"
13259
+ class: "ck-table__header"
13284
13260
  };
13285
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
13261
+ const _hoisted_3$2 = {
13262
+ key: 1,
13263
+ class: "ck-table__header--slot"
13264
+ };
13265
+ const _hoisted_4$2 = { class: "ck-table__table-container" };
13266
+ const _hoisted_5 = { key: 0 };
13267
+ const _hoisted_6 = { key: 1 };
13268
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
13286
13269
  props: {
13287
- modelValue: { type: [Boolean, Number], default: false },
13288
- disabled: { type: Boolean, default: false },
13289
- outlined: { type: Boolean, default: false },
13290
- squared: { type: Boolean, default: false },
13291
- size: { type: String, default: "m" },
13292
- icon: { type: String, default: void 0 },
13293
- iconPack: { type: String, default: void 0 }
13270
+ columns: { type: [Array, Object], required: true, default: () => [] },
13271
+ hasColumnsManager: { type: Boolean, default: false },
13272
+ currentPage: { type: Number, default: 0 },
13273
+ itemsPerPage: { type: Number, default: 40 },
13274
+ listLength: { type: Number, default: 0 },
13275
+ paginationAlign: { type: String, default: "center", validator: validators.align },
13276
+ search: { type: String, default: void 0 },
13277
+ hideHeaderActions: { type: Boolean, default: false },
13278
+ showRefreshBtn: { type: Boolean, default: false },
13279
+ hideItemsPerPage: { type: Boolean, default: false },
13280
+ notFullWidth: { type: Boolean, default: false }
13294
13281
  },
13295
- emits: ["update:modelValue"],
13282
+ emits: ["refreshList", "update:search", "update:currentPage"],
13296
13283
  setup(__props, { emit: emits }) {
13297
13284
  const props = __props;
13298
- const value = computed$2({
13299
- get() {
13300
- return props.modelValue;
13301
- },
13302
- set(val) {
13303
- emits("update:modelValue", val);
13304
- }
13305
- });
13306
- const computedClass = computed$2(() => {
13307
- const list = [];
13308
- if (props.squared)
13309
- list.push("is-squared");
13310
- if (props.outlined)
13311
- list.push("is-outlined");
13312
- let size = "s";
13313
- if (props.size === "m" || props.size === "l")
13314
- size = props.size;
13315
- list.push(`ck-switch--size-${size}`);
13316
- return list;
13285
+ const { qmObj: qmObj2 } = main$1;
13286
+ const IsPopupActive = ref({
13287
+ columnsManager: false
13317
13288
  });
13318
- const computedAttributes = computed$2(() => {
13319
- return {
13320
- "aria-disabled": props.disabled,
13321
- tabindex: props.disabled ? void 0 : "0"
13322
- };
13289
+ const columnsAreObj = computed$2(() => !qmObj2.isArray(props.columns));
13290
+ const columnsArray = computed$2(() => {
13291
+ if (!columnsAreObj.value)
13292
+ return props.columns;
13293
+ const arr = Object.values(props.columns);
13294
+ const keys = Object.keys(props.columns);
13295
+ arr.forEach((col, index) => {
13296
+ const key = keys[index];
13297
+ col.name = key;
13298
+ });
13299
+ return arr;
13323
13300
  });
13324
- const iconClass = computed$2(() => {
13325
- const list = [];
13326
- if (props.size && props.size !== "m") {
13327
- list.push(`ck-switch__icon-size--${props.size}`);
13328
- }
13329
- return list;
13301
+ const filteredColumnsList = computed$2(() => {
13302
+ return columnsArray.value.filter(functions.isColumnDisplayed);
13330
13303
  });
13331
- function onTrigger2() {
13332
- value.value = !value.value;
13333
- }
13334
- return (_ctx, _cache) => {
13335
- return openBlock(), createElementBlock("label", mergeProps({ class: "ck-switch" }, unref$1(computedAttributes), {
13336
- class: unref$1(computedClass),
13337
- onKeydown: _cache[2] || (_cache[2] = withKeys(withModifiers(() => {
13338
- }, ["prevent"]), ["space"])),
13339
- onKeyup: [
13340
- _cache[3] || (_cache[3] = withKeys(($event) => onTrigger2(), ["enter"])),
13341
- _cache[4] || (_cache[4] = withKeys(($event) => onTrigger2(), ["space"]))
13342
- ]
13343
- }), [
13344
- withDirectives(createElementVNode("input", {
13345
- class: "ck-switch__input",
13346
- "aria-hidden": "true",
13347
- type: "checkbox",
13348
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(value) ? value.value = $event : null),
13349
- disabled: __props.disabled,
13350
- onClick: _cache[1] || (_cache[1] = ($event) => onTrigger2())
13351
- }, null, 8, _hoisted_1$9), [
13352
- [vModelCheckbox, unref$1(value)]
13353
- ]),
13354
- createElementVNode("div", _hoisted_2$4, [
13355
- _hoisted_3$2,
13356
- __props.icon && unref$1(value) ? (openBlock(), createBlock(ckIcon, {
13357
- key: 0,
13358
- class: normalizeClass(["ck-switch__icon-left", unref$1(iconClass)]),
13359
- icon: __props.icon,
13360
- "icon-pack": __props.iconPack
13361
- }, null, 8, ["icon", "icon-pack", "class"])) : createCommentVNode("", true),
13362
- __props.icon && !unref$1(value) ? (openBlock(), createBlock(ckIcon, {
13363
- key: 1,
13364
- class: normalizeClass(["ck-switch__icon-right", unref$1(iconClass)]),
13365
- icon: __props.icon,
13366
- "icon-pack": __props.iconPack
13367
- }, null, 8, ["icon", "icon-pack", "class"])) : createCommentVNode("", true)
13368
- ]),
13369
- _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_4$1, [
13370
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
13371
- ])) : createCommentVNode("", true)
13372
- ], 16);
13373
- };
13374
- }
13375
- });
13376
- var ckSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-b6a4dfaa"]]);
13377
- var ckSwitchOptions_vue_vue_type_style_index_0_scoped_true_lang = "";
13378
- const _hoisted_1$8 = { class: "ck-switch-options__container-exterior" };
13379
- const _hoisted_2$3 = ["onClick"];
13380
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
13381
- props: {
13382
- modelValue: { type: [Boolean, Number, Object], default: 0 },
13383
- options: { type: Array, required: true },
13384
- prop: { type: String, default: "name" },
13385
- notReduce: { type: Boolean, default: false },
13386
- reduceFunction: { type: Function, default: (Option) => Option.id },
13387
- label: { type: String, default: "" },
13388
- labelAlign: { type: String, default: "" },
13389
- group: { type: String, default: "" },
13390
- groupBreak: { type: String, default: "s" },
13391
- groupVertical: { type: String, default: "" },
13392
- sameWidthOptions: { type: Boolean, default: false }
13393
- },
13394
- emits: ["update:modelValue", "change"],
13395
- setup(__props, { emit: emits }) {
13396
- const props = __props;
13397
- const selectedOption = computed$2({
13304
+ const searchLocal = computed$2({
13398
13305
  get() {
13399
- return props.modelValue;
13306
+ return props.search;
13400
13307
  },
13401
13308
  set(val) {
13402
- emits("update:modelValue", val);
13403
- emits("change", val);
13309
+ emits("update:search", val);
13404
13310
  }
13405
13311
  });
13406
- const computedClass = computed$2(() => {
13407
- const classList2 = [];
13408
- classList2.push(functions.getGroupClass(props));
13409
- return classList2;
13410
- });
13411
- const computedItemStyle = computed$2(() => {
13412
- const list = [];
13413
- if (props.sameWidthOptions)
13414
- list.push({ width: `${100 / props.options.length}%` });
13415
- return list;
13312
+ const currentPageLocal = computed$2({
13313
+ get() {
13314
+ return props.currentPage;
13315
+ },
13316
+ set(val) {
13317
+ emits("update:currentPage", val);
13318
+ }
13416
13319
  });
13417
- function getOptionValue(Option) {
13418
- if (props.notReduce)
13419
- return Option;
13420
- return props.reduceFunction(Option);
13320
+ function refreshList(pageChange = false) {
13321
+ emits("refreshList", pageChange);
13322
+ }
13323
+ function openColumnsManager() {
13324
+ if (columnsAreObj.value) {
13325
+ IsPopupActive.value.columnsManager = true;
13326
+ } else {
13327
+ console.log("ERROR ck-table", "The columns list should be an object");
13328
+ }
13421
13329
  }
13422
13330
  return (_ctx, _cache) => {
13423
- return openBlock(), createElementBlock("div", _hoisted_1$8, [
13424
- __props.label ? (openBlock(), createBlock(ckLabel, {
13331
+ return openBlock(), createElementBlock(Fragment, null, [
13332
+ __props.hasColumnsManager && unref$1(columnsAreObj) ? (openBlock(), createBlock(TableColumnsManager, {
13425
13333
  key: 0,
13426
- align: __props.labelAlign
13427
- }, {
13428
- default: withCtx(() => [
13429
- createTextVNode(toDisplayString(__props.label), 1)
13334
+ modelValue: IsPopupActive.value.columnsManager,
13335
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => IsPopupActive.value.columnsManager = $event),
13336
+ columnsArray: unref$1(columnsArray),
13337
+ columns: __props.columns
13338
+ }, null, 8, ["modelValue", "columnsArray", "columns"])) : createCommentVNode("", true),
13339
+ createElementVNode("div", _hoisted_1$8, [
13340
+ _ctx.$slots.header || !__props.hideHeaderActions ? (openBlock(), createElementBlock("div", _hoisted_2$3, [
13341
+ !__props.hideHeaderActions ? (openBlock(), createBlock(TableHeaderItems, {
13342
+ key: 0,
13343
+ search: unref$1(searchLocal),
13344
+ "onUpdate:search": _cache[1] || (_cache[1] = ($event) => isRef$1(searchLocal) ? searchLocal.value = $event : null),
13345
+ currentPage: __props.currentPage,
13346
+ hasColumnsManager: __props.hasColumnsManager,
13347
+ itemsPerPage: __props.itemsPerPage,
13348
+ listLength: __props.listLength,
13349
+ showRefreshBtn: __props.showRefreshBtn,
13350
+ hideItemsPerPage: __props.hideItemsPerPage,
13351
+ onRefreshList: _cache[2] || (_cache[2] = ($event) => refreshList($event)),
13352
+ onOpenColumnsManager: _cache[3] || (_cache[3] = ($event) => openColumnsManager())
13353
+ }, null, 8, ["search", "currentPage", "hasColumnsManager", "itemsPerPage", "listLength", "showRefreshBtn", "hideItemsPerPage"])) : createCommentVNode("", true),
13354
+ _ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_3$2, [
13355
+ renderSlot(_ctx.$slots, "header", {}, void 0, true)
13356
+ ])) : createCommentVNode("", true)
13357
+ ])) : createCommentVNode("", true),
13358
+ createElementVNode("div", _hoisted_4$2, [
13359
+ createElementVNode("table", {
13360
+ class: normalizeClass(["ck-table__table", { "not-full-width": __props.notFullWidth }])
13361
+ }, [
13362
+ unref$1(filteredColumnsList).length ? (openBlock(), createElementBlock("thead", _hoisted_5, [
13363
+ createVNode(ckTr, null, {
13364
+ default: withCtx(() => [
13365
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref$1(filteredColumnsList), (col) => {
13366
+ return openBlock(), createBlock(_sfc_main$i, {
13367
+ key: col.title,
13368
+ col
13369
+ }, null, 8, ["col"]);
13370
+ }), 128))
13371
+ ]),
13372
+ _: 1
13373
+ })
13374
+ ])) : createCommentVNode("", true),
13375
+ createElementVNode("tbody", null, [
13376
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
13377
+ ]),
13378
+ _ctx.$slots.footer ? (openBlock(), createElementBlock("tfoot", _hoisted_6, [
13379
+ renderSlot(_ctx.$slots, "footer", {}, void 0, true)
13380
+ ])) : createCommentVNode("", true)
13381
+ ], 2)
13430
13382
  ]),
13431
- _: 1
13432
- }, 8, ["align"])) : createCommentVNode("", true),
13433
- createElementVNode("div", {
13434
- class: normalizeClass(["ck-switch-options__container", unref$1(computedClass)])
13435
- }, [
13436
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (Option, index) => {
13437
- return openBlock(), createElementBlock("div", {
13438
- class: normalizeClass(["ck-switch-options__option", { selected: unref$1(selectedOption) == getOptionValue(Option) }]),
13439
- key: `ck-switch-options${index}`,
13440
- style: normalizeStyle(unref$1(computedItemStyle)),
13441
- onClick: ($event) => selectedOption.value = getOptionValue(Option)
13442
- }, toDisplayString(Option[__props.prop]), 15, _hoisted_2$3);
13443
- }), 128))
13444
- ], 2)
13445
- ]);
13383
+ createVNode(TablePagination, {
13384
+ class: "ck-table__pagination",
13385
+ currentPage: unref$1(currentPageLocal),
13386
+ "onUpdate:currentPage": _cache[4] || (_cache[4] = ($event) => isRef$1(currentPageLocal) ? currentPageLocal.value = $event : null),
13387
+ itemsPerPage: __props.itemsPerPage,
13388
+ listLength: __props.listLength,
13389
+ align: __props.paginationAlign,
13390
+ onRefreshList: _cache[5] || (_cache[5] = ($event) => refreshList(true))
13391
+ }, null, 8, ["currentPage", "itemsPerPage", "listLength", "align"])
13392
+ ])
13393
+ ], 64);
13446
13394
  };
13447
13395
  }
13448
13396
  });
13449
- var ckSwitchOptions = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-2c3e07c8"]]);
13450
- const _hoisted_1$7 = { class: "ck-tr" };
13451
- function render$1(_ctx, _cache) {
13452
- return openBlock(), createElementBlock("tr", _hoisted_1$7, [
13453
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
13454
- ]);
13455
- }
13456
- var ckTr_vue_vue_type_style_index_0_scoped_true_lang = "";
13457
- const _sfc_main$9 = {};
13458
- var ckTr = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", render$1], ["__scopeId", "data-v-1dd12190"]]);
13459
- var ckTh_vue_vue_type_style_index_0_scoped_true_lang = "";
13460
- const _hoisted_1$6 = { class: "ck-th" };
13397
+ var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-160656a0"]]);
13398
+ var ckTd_vue_vue_type_style_index_0_scoped_true_lang = "";
13461
13399
  const _sfc_main$8 = /* @__PURE__ */ defineComponent({
13462
13400
  props: {
13463
- align: { type: String, default: "center", validator: validators.align },
13464
- minWidth: { type: String, default: void 0 }
13401
+ col: { type: Object, default: void 0 },
13402
+ nowrap: { type: Boolean, default: false },
13403
+ block: { type: Boolean, default: false },
13404
+ autoWidth: { type: Boolean, default: false },
13405
+ overflowAuto: { type: Boolean, default: false },
13406
+ align: { type: String, default: void 0, validator: validators.align },
13407
+ fixedWidth: { type: String, default: "" },
13408
+ minWidth: { type: String, default: "" },
13409
+ maxWidth: { type: String, default: "" },
13410
+ maxHeight: { type: String, default: "" }
13465
13411
  },
13466
13412
  setup(__props) {
13467
13413
  const props = __props;
13468
- const computedSpanClass = computed$2(() => {
13414
+ const computedTdClass = computed$2(() => {
13469
13415
  return {
13470
- "align-center": props.align !== "left" && props.align !== "right",
13471
- "align-left": props.align === "left",
13472
- "align-right": props.align === "right"
13416
+ "auto-width": props.autoWidth,
13417
+ "overflow-auto": props.overflowAuto
13473
13418
  };
13474
13419
  });
13475
- const computedStyle = computed$2(() => {
13420
+ const computedSpanClass = computed$2(() => {
13476
13421
  const list = [];
13422
+ let align;
13423
+ if (props.col)
13424
+ align = props.col.align;
13425
+ if (props.align)
13426
+ align = props.align;
13427
+ if (align) {
13428
+ if (align === "center")
13429
+ list.push("align-center");
13430
+ if (align === "right")
13431
+ list.push("align-right");
13432
+ }
13433
+ if (props.block)
13434
+ list.push("block");
13435
+ if (props.block)
13436
+ list.push("no-wrap-text");
13437
+ return list;
13438
+ });
13439
+ const computedStyle = computed$2(() => {
13440
+ const list = {};
13477
13441
  if (props.minWidth)
13478
- list.push({ "min-width": props.minWidth });
13442
+ list["min-width"] = props.minWidth;
13443
+ if (props.fixedWidth)
13444
+ list["min-width"] = props.fixedWidth;
13445
+ if (props.maxWidth)
13446
+ list["max-width"] = props.maxWidth;
13447
+ if (props.fixedWidth)
13448
+ list["max-width"] = props.fixedWidth;
13449
+ if (props.maxHeight)
13450
+ list["max-height"] = props.maxHeight;
13479
13451
  return list;
13480
13452
  });
13453
+ const isColumnDisplayed = computed$2(() => {
13454
+ if (!props.col)
13455
+ return true;
13456
+ return functions.isColumnDisplayed(props.col);
13457
+ });
13481
13458
  return (_ctx, _cache) => {
13482
- return openBlock(), createElementBlock("th", _hoisted_1$6, [
13459
+ return unref$1(isColumnDisplayed) ? (openBlock(), createElementBlock("td", {
13460
+ key: 0,
13461
+ class: normalizeClass(["ck-td", unref$1(computedTdClass)])
13462
+ }, [
13483
13463
  createElementVNode("span", {
13484
13464
  class: normalizeClass(unref$1(computedSpanClass)),
13485
13465
  style: normalizeStyle(unref$1(computedStyle))
13486
13466
  }, [
13487
13467
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
13488
13468
  ], 6)
13489
- ]);
13469
+ ], 2)) : createCommentVNode("", true);
13490
13470
  };
13491
13471
  }
13492
13472
  });
13493
- var ckTh = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-c179a3c2"]]);
13473
+ var ckTd = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-4eae6064"]]);
13474
+ var ckChip_vue_vue_type_style_index_0_scoped_true_lang = "";
13475
+ const _hoisted_1$7 = ["color"];
13494
13476
  const _sfc_main$7 = /* @__PURE__ */ defineComponent({
13495
13477
  props: {
13496
- col: { type: Object, required: true }
13478
+ size: { type: String, default: "s" },
13479
+ color: { type: String, default: "primary" },
13480
+ textColor: { type: String, default: void 0 },
13481
+ icon: { type: String, default: void 0 },
13482
+ iconPack: { type: String, default: void 0 }
13497
13483
  },
13498
- setup(__props) {
13484
+ emits: ["click"],
13485
+ setup(__props, { emit: emits }) {
13486
+ const props = __props;
13487
+ const computedClass = computed$2(() => {
13488
+ return [
13489
+ `size-${props.size}`,
13490
+ `ck-component__bg-color--${props.color}`
13491
+ ];
13492
+ });
13493
+ const computedStyle = computed$2(() => {
13494
+ const list = [];
13495
+ if (props.color)
13496
+ ;
13497
+ return list;
13498
+ });
13499
13499
  return (_ctx, _cache) => {
13500
- return openBlock(), createBlock(ckTh, {
13501
- align: __props.col.align,
13502
- "min-width": __props.col.minWidth
13503
- }, {
13504
- default: withCtx(() => [
13505
- createTextVNode(toDisplayString(__props.col.title), 1)
13506
- ]),
13507
- _: 1
13508
- }, 8, ["align", "min-width"]);
13500
+ return openBlock(), createElementBlock("div", {
13501
+ class: normalizeClass(["ck-chip", unref$1(computedClass)]),
13502
+ color: __props.color,
13503
+ style: normalizeStyle(unref$1(computedStyle)),
13504
+ onClick: _cache[0] || (_cache[0] = ($event) => emits("click", $event))
13505
+ }, [
13506
+ __props.icon ? (openBlock(), createBlock(ckIcon, {
13507
+ key: 0,
13508
+ icon: __props.icon,
13509
+ "icon-pack": __props.iconPack
13510
+ }, null, 8, ["icon", "icon-pack"])) : createCommentVNode("", true),
13511
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
13512
+ ], 14, _hoisted_1$7);
13509
13513
  };
13510
13514
  }
13511
13515
  });
13512
- var ckTable__headerItems_vue_vue_type_style_index_0_scoped_true_lang = "";
13513
- const _hoisted_1$5 = { class: "ck-table__header-items" };
13516
+ var ckChip = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-5333de26"]]);
13517
+ var globalVariables = {
13518
+ defaultFailImg: "df",
13519
+ imagesFolderPath: "",
13520
+ defaultImgBorderColor: "#EEEEEE"
13521
+ };
13522
+ var ckImg_vue_vue_type_style_index_0_scoped_true_lang = "";
13523
+ const _hoisted_1$6 = ["src", "alt"];
13514
13524
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
13515
13525
  props: {
13516
- search: { type: String, default: void 0 },
13517
- hasColumnsManager: { type: Boolean, default: false },
13518
- showRefreshBtn: { type: Boolean, required: true },
13519
- hideItemsPerPage: { type: Boolean, required: true },
13520
- currentPage: { type: Number, required: true },
13521
- itemsPerPage: { type: Number, required: true },
13522
- listLength: { type: Number, required: true }
13526
+ src: { type: String, default: "" },
13527
+ isFullPath: { type: Boolean, default: false },
13528
+ failImgSrc: { type: String, default: "" },
13529
+ alt: { type: String, default: "" },
13530
+ size: { type: String, default: "", validator: validators.size },
13531
+ sizeAbsolute: { type: String, default: "" },
13532
+ width: { type: String, default: "" },
13533
+ height: { type: String, default: "" },
13534
+ zoom: { type: Boolean, default: false },
13535
+ zoomTitle: { type: String, default: "" },
13536
+ hasBorder: { type: Boolean, default: false },
13537
+ radius: { type: String, default: "" },
13538
+ borderColor: { type: String, default: "" },
13539
+ rounded: { type: Boolean, default: false }
13523
13540
  },
13524
- emits: ["update:search", "refreshList", "openColumnsManager"],
13525
- setup(__props, { emit: emits }) {
13541
+ setup(__props) {
13526
13542
  const props = __props;
13527
- const searchLocal = computed$2({
13528
- get() {
13529
- return props.search;
13530
- },
13531
- set(val) {
13532
- emits("update:search", val);
13543
+ const altNeeded = ref(false);
13544
+ let isMounted = ref(false);
13545
+ const imageUrl = computed$2(() => {
13546
+ if (!isMounted.value)
13547
+ return "";
13548
+ if (props.isFullPath)
13549
+ return props.src;
13550
+ return getImg(props.src);
13551
+ });
13552
+ const computedClass = computed$2(() => {
13553
+ const classList2 = [];
13554
+ if (props.size)
13555
+ classList2.push(`ck-img__size--${props.size}`);
13556
+ if (props.rounded)
13557
+ classList2.push("is-rounded");
13558
+ if (props.hasBorder) {
13559
+ classList2.push("ck-img__has-border");
13560
+ if (functions.isColorTemplateVariable(realBorderColor.value)) {
13561
+ classList2.push(`ck-component__border-color--${realBorderColor.value}`);
13562
+ }
13533
13563
  }
13564
+ if (props.zoom)
13565
+ classList2.push("zoom-able");
13566
+ return classList2;
13534
13567
  });
13535
- const hideSearch = computed$2(() => {
13536
- return typeof searchLocal.value === "undefined";
13537
- });
13538
- const itemsPerPageStart = computed$2(() => {
13539
- return (props.currentPage - 1) * props.itemsPerPage + 1;
13540
- });
13541
- const itemsPerPageEnd = computed$2(() => {
13542
- const value = props.currentPage * props.itemsPerPage;
13543
- if (value > props.listLength)
13544
- return props.listLength;
13545
- return value;
13568
+ const computedStyle = computed$2(() => {
13569
+ const styleList = [];
13570
+ if (props.sizeAbsolute) {
13571
+ styleList.push({ width: props.sizeAbsolute });
13572
+ styleList.push({ height: props.sizeAbsolute });
13573
+ }
13574
+ if (props.radius)
13575
+ styleList.push({ "border-radius": props.radius });
13576
+ if (props.hasBorder) {
13577
+ if (!functions.isColorTemplateVariable(realBorderColor.value)) {
13578
+ styleList.push({ "border-color": realBorderColor.value });
13579
+ }
13580
+ }
13581
+ return styleList;
13546
13582
  });
13547
- const itemsPerPageIsVisible = computed$2(() => {
13548
- return !props.hideItemsPerPage && props.listLength && props.currentPage;
13583
+ const computedImgStyle = computed$2(() => {
13584
+ const styleList = [];
13585
+ if (props.radius)
13586
+ styleList.push({ "border-radius": props.radius });
13587
+ if (props.width)
13588
+ styleList.push({ width: props.width });
13589
+ if (props.height)
13590
+ styleList.push({ height: props.height });
13591
+ return styleList;
13549
13592
  });
13550
- const refreshBtnIsVisible = computed$2(() => {
13551
- return itemsPerPageIsVisible.value || props.showRefreshBtn;
13593
+ const realBorderColor = computed$2(() => {
13594
+ if (props.borderColor)
13595
+ return props.borderColor;
13596
+ return globalVariables.defaultImgBorderColor;
13552
13597
  });
13553
- const searchGroupValue = computed$2(() => {
13554
- if (itemsPerPageIsVisible.value && props.hasColumnsManager) {
13555
- return "center";
13598
+ function clickImg() {
13599
+ if (props.zoom)
13600
+ ;
13601
+ }
13602
+ function getImg(src) {
13603
+ let path = "";
13604
+ const $cleekOptions = functions.getCleekOptions(getCurrentInstance);
13605
+ if ($cleekOptions) {
13606
+ if ($cleekOptions.imgPath)
13607
+ path = $cleekOptions.imgPath;
13556
13608
  }
13557
- if (itemsPerPageIsVisible.value)
13558
- return "right";
13559
- if (props.hasColumnsManager)
13560
- return "left";
13561
- return "";
13562
- });
13563
- function checkRefresh() {
13564
- const search = searchLocal.value;
13565
- setTimeout(() => {
13566
- if (search !== searchLocal.value)
13567
- return;
13568
- emits("refreshList", false);
13569
- }, 1e3);
13609
+ return `${path}${src}`;
13570
13610
  }
13611
+ onMounted(() => {
13612
+ getCurrentInstance().ctx;
13613
+ isMounted.value = true;
13614
+ });
13571
13615
  return (_ctx, _cache) => {
13572
- return openBlock(), createElementBlock("div", _hoisted_1$5, [
13573
- unref$1(refreshBtnIsVisible) ? (openBlock(), createBlock(ckButton, {
13574
- key: 0,
13575
- type: "flat",
13576
- icon: "redo-alt",
13577
- title: "Recargar lista",
13578
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("refreshList", false))
13579
- })) : createCommentVNode("", true),
13580
- unref$1(itemsPerPageIsVisible) ? (openBlock(), createElementBlock("div", {
13581
- key: 1,
13582
- class: normalizeClass(["items-per-page", { "ck-component__group--left": !unref$1(hideSearch) }])
13583
- }, toDisplayString(unref$1(itemsPerPageStart)) + " - " + toDisplayString(unref$1(itemsPerPageEnd)) + " de " + toDisplayString(__props.listLength), 3)) : createCommentVNode("", true),
13584
- !unref$1(hideSearch) ? (openBlock(), createBlock(ckInput, {
13585
- key: 2,
13586
- modelValue: unref$1(searchLocal),
13587
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef$1(searchLocal) ? searchLocal.value = $event : null),
13588
- icon: "search",
13589
- placeholder: "Buscar...",
13590
- group: unref$1(searchGroupValue),
13591
- onInput: _cache[2] || (_cache[2] = ($event) => checkRefresh())
13592
- }, null, 8, ["modelValue", "group"])) : createCommentVNode("", true),
13593
- __props.hasColumnsManager ? (openBlock(), createBlock(ckButton, {
13594
- key: 3,
13595
- icon: "columns",
13596
- type: "filled",
13597
- title: "Administrador de columnas",
13598
- group: unref$1(itemsPerPageIsVisible) || !unref$1(hideSearch) ? "right" : "",
13599
- onClick: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("openColumnsManager"))
13600
- }, null, 8, ["group"])) : createCommentVNode("", true)
13601
- ]);
13616
+ return openBlock(), createElementBlock("div", {
13617
+ class: normalizeClass(["ck-img", unref$1(computedClass)]),
13618
+ style: normalizeStyle(unref$1(computedStyle)),
13619
+ onClick: _cache[1] || (_cache[1] = ($event) => clickImg())
13620
+ }, [
13621
+ createElementVNode("img", {
13622
+ src: unref$1(imageUrl),
13623
+ style: normalizeStyle(unref$1(computedImgStyle)),
13624
+ alt: __props.alt,
13625
+ onError: _cache[0] || (_cache[0] = ($event) => altNeeded.value = true)
13626
+ }, null, 44, _hoisted_1$6)
13627
+ ], 6);
13602
13628
  };
13603
13629
  }
13604
13630
  });
13605
- var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-15c7bf13"]]);
13606
- var ckTable__pagination_vue_vue_type_style_index_0_scoped_true_lang = "";
13607
- const _hoisted_1$4 = { class: "ck-table__pagination" };
13608
- const _hoisted_2$2 = ["onClick"];
13609
- const _hoisted_3$1 = ["onClick"];
13610
- const itemsShowed = 5;
13611
- const __default__ = {
13612
- name: "CkTablePagination",
13631
+ var ckImg = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-e808078e"]]);
13632
+ var ckRadio_vue_vue_type_style_index_0_scoped_true_lang = "";
13633
+ const _withScopeId$1 = (n) => (pushScopeId("data-v-a5198d80"), n = n(), popScopeId(), n);
13634
+ const _hoisted_1$5 = ["onKeyup"];
13635
+ const _hoisted_2$2 = ["name", "value", "disabled"];
13636
+ const _hoisted_3$1 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", { class: "c-Radio__element" }, null, -1));
13637
+ const _hoisted_4$1 = {
13638
+ key: 0,
13639
+ class: "c-Radio__label"
13640
+ };
13641
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
13613
13642
  props: {
13614
- currentPage: { type: Number, required: true },
13615
- align: { type: String, required: true },
13616
- itemsPerPage: { type: Number, required: true },
13617
- listLength: { type: Number, required: true }
13643
+ modelValue: { type: String, default: void 0 },
13644
+ name: { type: String, required: true },
13645
+ options: { type: Array, required: true, validator: validators.radioOptions },
13646
+ disabled: { type: Boolean, default: false }
13618
13647
  },
13619
- emits: ["refreshList", "update:currentPage"],
13620
- computed: {
13621
- currentPageLocal2: {
13648
+ emits: ["update:modelValue", "change"],
13649
+ setup(__props, { emit: emits }) {
13650
+ const props = __props;
13651
+ const value = computed$2({
13622
13652
  get() {
13623
- return this.currentPage;
13653
+ return props.modelValue;
13624
13654
  },
13625
13655
  set(val) {
13626
- return;
13627
- }
13628
- },
13629
- hasArrowLeft() {
13630
- if (!this.listLeft.length)
13631
- return false;
13632
- return this.listLeft[0] !== 1;
13633
- },
13634
- totalPages() {
13635
- return Math.ceil(this.listLength / this.itemsPerPage);
13636
- },
13637
- hasArrowRight() {
13638
- if (!this.listRight.length)
13639
- return false;
13640
- return this.listRight[this.listRight.length - 1] !== this.totalPages;
13641
- },
13642
- listLeft() {
13643
- if (!this.listLength)
13644
- return [];
13645
- const list = [];
13646
- const listLength = (itemsShowed - 1) / 2;
13647
- for (const num of Array(listLength).keys()) {
13648
- const listItem = this.currentPage - num - 1;
13649
- if (listItem > 0)
13650
- list.unshift(listItem);
13651
- }
13652
- return list;
13653
- },
13654
- listRight() {
13655
- if (!this.listLength)
13656
- return [];
13657
- const list = [];
13658
- const listLength = (itemsShowed - 1) / 2;
13659
- for (const num of Array(listLength).keys()) {
13660
- const listItem = this.currentPage + num + 1;
13661
- if (listItem <= this.totalPages)
13662
- list.push(listItem);
13656
+ emits("update:modelValue", val);
13663
13657
  }
13664
- return list;
13665
- }
13666
- },
13667
- methods: {
13668
- updateCurrentPage(val) {
13669
- this.$emit("update:currentPage", val);
13670
- this.$emit("refreshList", val);
13671
- },
13672
- validateInputNumber(val) {
13673
- val = +val;
13674
- if (val > this.totalPages)
13675
- val = this.totalPages;
13676
- if (val < 1)
13677
- val = 1;
13678
- if (val === this.currentPage)
13679
- return;
13680
- this.updateCurrentPage(val);
13658
+ });
13659
+ const radioAttributes = computed$2(() => {
13660
+ return {
13661
+ "aria-disabled": props.disabled,
13662
+ tabindex: props.disabled ? void 0 : "0"
13663
+ };
13664
+ });
13665
+ function handleChange(value2) {
13666
+ value2.value = value2;
13667
+ emits("change", value2);
13681
13668
  }
13682
- }
13683
- };
13684
- const _sfc_main$5 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__), {
13685
- setup(__props) {
13686
13669
  return (_ctx, _cache) => {
13687
- return __props.currentPage && _ctx.totalPages > 1 ? (openBlock(), createElementBlock("div", {
13688
- key: 0,
13689
- class: normalizeClass(["ck-table__pagination-container", `pagination-align--${__props.align}`])
13690
- }, [
13691
- createElementVNode("div", _hoisted_1$4, [
13692
- _ctx.hasArrowLeft ? (openBlock(), createElementBlock("div", {
13693
- key: 0,
13694
- class: "ck-table__pagination--arrow-left",
13695
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.updateCurrentPage(__props.currentPage - 1))
13696
- }, [
13697
- createVNode(ckIcon, { icon: "arrow-left" })
13698
- ])) : createCommentVNode("", true),
13699
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.listLeft, (num) => {
13700
- return openBlock(), createElementBlock("div", {
13701
- class: "ck-table__pagination-item pagination-item__left",
13702
- onClick: ($event) => _ctx.updateCurrentPage(num)
13703
- }, toDisplayString(num), 9, _hoisted_2$2);
13704
- }), 256)),
13705
- createVNode(ckInput, {
13706
- class: "ck-table__pagination-input",
13707
- autoSelect: "",
13708
- type: "number",
13709
- width: "50px",
13710
- align: "center",
13711
- modelValue: _ctx.currentPageLocal2,
13712
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef$1(currentPageLocal2) ? currentPageLocal2.value = $event : null),
13713
- onChange: _cache[2] || (_cache[2] = ($event) => _ctx.validateInputNumber($event.target.value))
13714
- }, null, 8, ["modelValue"]),
13715
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.listRight, (num) => {
13716
- return openBlock(), createElementBlock("div", {
13717
- class: "ck-table__pagination-item pagination-item__right",
13718
- onClick: ($event) => _ctx.updateCurrentPage(num)
13719
- }, toDisplayString(num), 9, _hoisted_3$1);
13720
- }), 256)),
13721
- _ctx.hasArrowRight ? (openBlock(), createElementBlock("div", {
13722
- key: 1,
13723
- class: "ck-table__pagination--arrow-right",
13724
- onClick: _cache[3] || (_cache[3] = ($event) => _ctx.updateCurrentPage(__props.currentPage + 1))
13725
- }, [
13726
- createVNode(ckIcon, { icon: "arrow-right" })
13727
- ])) : createCommentVNode("", true)
13728
- ])
13729
- ], 2)) : createCommentVNode("", true);
13670
+ return openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (item, index) => {
13671
+ return openBlock(), createElementBlock("label", mergeProps({
13672
+ key: `radio-${index}`,
13673
+ class: "c-Radio"
13674
+ }, unref$1(radioAttributes), {
13675
+ onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(() => {
13676
+ }, ["prevent"]), ["space"])),
13677
+ onKeyup: [
13678
+ withKeys(($event) => handleChange(item.value), ["enter"]),
13679
+ withKeys(($event) => handleChange(item.value), ["space"])
13680
+ ]
13681
+ }), [
13682
+ withDirectives(createElementVNode("input", {
13683
+ class: "c-Radio__input",
13684
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(value) ? value.value = $event : null),
13685
+ "aria-hidden": "true",
13686
+ type: "radio",
13687
+ name: __props.name,
13688
+ value: item.value,
13689
+ disabled: __props.disabled
13690
+ }, null, 8, _hoisted_2$2), [
13691
+ [vModelRadio, unref$1(value)]
13692
+ ]),
13693
+ _hoisted_3$1,
13694
+ item.label ? (openBlock(), createElementBlock("span", _hoisted_4$1, toDisplayString(item.label), 1)) : createCommentVNode("", true)
13695
+ ], 16, _hoisted_1$5);
13696
+ }), 128);
13730
13697
  };
13731
13698
  }
13732
- }));
13733
- var TablePagination = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-4045b8e3"]]);
13734
- var ckTable__columnsManager_vue_vue_type_style_index_0_scoped_true_lang = "";
13735
- const _hoisted_1$3 = { class: "columns-manger-container" };
13736
- const _hoisted_2$1 = { class: "columns-manger__item" };
13699
+ });
13700
+ var ckRadio = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-a5198d80"]]);
13701
+ var ckSelect_vue_vue_type_style_index_0_scoped_true_lang = "";
13702
+ const _hoisted_1$4 = ["value"];
13737
13703
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
13738
13704
  props: {
13739
- modelValue: { type: Boolean, required: true },
13740
- columns: { type: Object, required: true },
13741
- columnsArray: { type: Array, required: true }
13705
+ modelValue: { default: null, type: [Boolean, Number, Object, Array, String] },
13706
+ prop: { type: String, default: "name" },
13707
+ autofocus: { type: Boolean, default: false },
13708
+ noDataText: { type: String, default: "No se encontr\xF3 nada" },
13709
+ notReduce: { type: Boolean, default: false },
13710
+ options: { type: Array, default: () => [] },
13711
+ reduceFunction: { type: Function, default: (Option) => Option.id },
13712
+ notClearable: { type: Boolean, default: false },
13713
+ clearValue: { type: [Boolean, String], default: "auto" },
13714
+ searchable: { type: [Boolean, String], default: "auto" },
13715
+ minWidth: { type: String, default: "180px" },
13716
+ noBorder: { type: Boolean, default: false },
13717
+ bgTransparent: { type: Boolean, default: false },
13718
+ disabled: { type: [Boolean, Number], default: false },
13719
+ group: { type: String, default: "" },
13720
+ groupBreak: { type: String, default: "" },
13721
+ groupVertical: { type: String, default: "" },
13722
+ label: { type: String, default: "" },
13723
+ labelAlign: { type: String, default: "" }
13742
13724
  },
13743
- emits: ["update:modelValue"],
13725
+ emits: ["update:modelValue", "click", "change"],
13744
13726
  setup(__props, { emit: emits }) {
13745
13727
  const props = __props;
13746
- let columnsCheckable = ref([]);
13747
- const isActive = computed$2({
13728
+ const { qmStr: qmStr2 } = main$1;
13729
+ const search = ref("");
13730
+ ref(null);
13731
+ const value = computed$2({
13748
13732
  get() {
13749
13733
  return props.modelValue;
13750
13734
  },
13751
13735
  set(val) {
13736
+ if (val === null)
13737
+ val = realClearValue;
13752
13738
  emits("update:modelValue", val);
13753
13739
  }
13754
13740
  });
13755
- watch(() => isActive.value, (val) => {
13756
- if (!val)
13757
- return;
13758
- setColumnsCheckable();
13741
+ const filteredOptions = computed$2(() => {
13742
+ const list = props.options.filter((option) => {
13743
+ const name = getOptionName(option);
13744
+ return qmStr2.checkContainsStr(name, search.value);
13745
+ });
13746
+ return list;
13759
13747
  });
13760
- function setColumnsCheckable() {
13761
- console.log("hoola");
13748
+ const computedClass = computed$2(() => {
13749
+ const classList2 = [];
13750
+ classList2.push(functions.getGroupClass(props));
13751
+ return classList2;
13752
+ });
13753
+ const computedStyle = computed$2(() => {
13762
13754
  const list = [];
13763
- props.columnsArray.forEach((col) => {
13764
- if (!col.unchangeable) {
13765
- list.push({
13766
- name: col.name,
13767
- title: col.title,
13768
- value: functions.isColumnDisplayed(col)
13769
- });
13770
- }
13771
- });
13772
- columnsCheckable.value = list;
13773
- }
13774
- function setColumnDisplayValue(colName, value) {
13775
- props.columns[colName].isDisplayed = value;
13755
+ if (props.minWidth)
13756
+ list.push({ "min-width": props.minWidth });
13757
+ return list;
13758
+ });
13759
+ computed$2(() => {
13760
+ if (props.searchable === "auto") {
13761
+ if (props.options.length < 5)
13762
+ return false;
13763
+ return true;
13764
+ }
13765
+ return props.searchable;
13766
+ });
13767
+ const realClearValue = computed$2(() => {
13768
+ switch (typeof props.modelValue) {
13769
+ case "number":
13770
+ return 0;
13771
+ case "string":
13772
+ return "";
13773
+ case "object":
13774
+ if (props.modelValue.constructor === Array)
13775
+ return [];
13776
+ return {};
13777
+ default:
13778
+ return null;
13779
+ }
13780
+ });
13781
+ computed$2(() => {
13782
+ switch (typeof props.modelValue) {
13783
+ case "number":
13784
+ return props.modelValue === 0;
13785
+ case "string":
13786
+ return props.modelValue === "";
13787
+ case "object":
13788
+ if (!props.modelValue)
13789
+ return null;
13790
+ if (props.modelValue.constructor === Array) {
13791
+ return props.modelValue.length() === 0;
13792
+ }
13793
+ return Object.keys(props.modelValue).length === 0;
13794
+ default:
13795
+ return props.modelValue === null;
13796
+ }
13797
+ });
13798
+ function onClick(event) {
13799
+ emits("click", event);
13776
13800
  }
13801
+ const onChange = (event) => {
13802
+ emits("change", event);
13803
+ };
13804
+ const getOptionKey = (option) => {
13805
+ return realReduceFunction(option);
13806
+ };
13807
+ const getOptionName = (option) => {
13808
+ if (!props.prop)
13809
+ return option;
13810
+ return option[props.prop];
13811
+ };
13812
+ const realReduceFunction = (option) => {
13813
+ if (props.notReduce)
13814
+ return option;
13815
+ return props.reduceFunction(option);
13816
+ };
13777
13817
  return (_ctx, _cache) => {
13778
- return openBlock(), createBlock(_sfc_main$e, {
13779
- modelValue: unref$1(isActive),
13780
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(isActive) ? isActive.value = $event : null),
13781
- title: "Administrador de columnas"
13782
- }, {
13783
- default: withCtx(() => [
13784
- createElementVNode("div", _hoisted_1$3, [
13785
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref$1(columnsCheckable), (col) => {
13786
- return openBlock(), createElementBlock("div", _hoisted_2$1, [
13787
- createVNode(ckCheckbox, {
13788
- modelValue: col.value,
13789
- "onUpdate:modelValue": ($event) => col.value = $event,
13790
- onChange: ($event) => setColumnDisplayValue(col.name, col.value)
13791
- }, {
13792
- default: withCtx(() => [
13793
- createTextVNode(toDisplayString(col.title), 1)
13794
- ]),
13795
- _: 2
13796
- }, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])
13797
- ]);
13798
- }), 256))
13799
- ])
13800
- ]),
13801
- _: 1
13802
- }, 8, ["modelValue"]);
13818
+ return openBlock(), createElementBlock("div", {
13819
+ class: "ck-select",
13820
+ style: normalizeStyle(unref$1(computedStyle))
13821
+ }, [
13822
+ __props.label ? (openBlock(), createBlock(ckLabel, {
13823
+ key: 0,
13824
+ align: __props.labelAlign,
13825
+ for: "ck-input"
13826
+ }, {
13827
+ default: withCtx(() => [
13828
+ createTextVNode(toDisplayString(__props.label), 1)
13829
+ ]),
13830
+ _: 1
13831
+ }, 8, ["align"])) : createCommentVNode("", true),
13832
+ withDirectives(createElementVNode("select", {
13833
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(value) ? value.value = $event : null),
13834
+ class: normalizeClass(unref$1(computedClass)),
13835
+ onClick: _cache[1] || (_cache[1] = ($event) => onClick($event)),
13836
+ onChange: _cache[2] || (_cache[2] = ($event) => onChange($event))
13837
+ }, [
13838
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref$1(filteredOptions), (option) => {
13839
+ return openBlock(), createElementBlock("option", {
13840
+ value: getOptionKey(option),
13841
+ key: option
13842
+ }, toDisplayString(getOptionName(option)), 9, _hoisted_1$4);
13843
+ }), 128))
13844
+ ], 34), [
13845
+ [vModelSelect, unref$1(value)]
13846
+ ])
13847
+ ], 4);
13803
13848
  };
13804
13849
  }
13805
13850
  });
13806
- var TableColumnsManager = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-e6aed8c8"]]);
13807
- var ckTable_vue_vue_type_style_index_0_scoped_true_lang = "";
13808
- const _hoisted_1$2 = { class: "ck-table" };
13809
- const _hoisted_2 = {
13851
+ var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-31af160a"]]);
13852
+ var ckSwitch_vue_vue_type_style_index_0_scoped_true_lang = "";
13853
+ const _withScopeId = (n) => (pushScopeId("data-v-b6a4dfaa"), n = n(), popScopeId(), n);
13854
+ const _hoisted_1$3 = ["disabled"];
13855
+ const _hoisted_2$1 = { class: "ck-switch__slider-container" };
13856
+ const _hoisted_3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "ck-switch__slider" }, null, -1));
13857
+ const _hoisted_4 = {
13810
13858
  key: 0,
13811
- class: "ck-table__header"
13812
- };
13813
- const _hoisted_3 = {
13814
- key: 1,
13815
- class: "ck-table__header--slot"
13859
+ class: "ck-switch__content"
13816
13860
  };
13817
- const _hoisted_4 = { class: "ck-table__table-container" };
13818
- const _hoisted_5 = { key: 0 };
13819
- const _hoisted_6 = { key: 1 };
13820
13861
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
13821
13862
  props: {
13822
- columns: { type: [Array, Object], required: true, default: () => [] },
13823
- hasColumnsManager: { type: Boolean, default: false },
13824
- currentPage: { type: Number, default: 0 },
13825
- itemsPerPage: { type: Number, default: 40 },
13826
- listLength: { type: Number, default: 0 },
13827
- paginationAlign: { type: String, default: "center", validator: validators.align },
13828
- search: { type: String, default: void 0 },
13829
- hideHeaderActions: { type: Boolean, default: false },
13830
- showRefreshBtn: { type: Boolean, default: false },
13831
- hideItemsPerPage: { type: Boolean, default: false },
13832
- notFullWidth: { type: Boolean, default: false }
13863
+ modelValue: { type: [Boolean, Number], default: false },
13864
+ disabled: { type: Boolean, default: false },
13865
+ outlined: { type: Boolean, default: false },
13866
+ squared: { type: Boolean, default: false },
13867
+ size: { type: String, default: "m" },
13868
+ icon: { type: String, default: void 0 },
13869
+ iconPack: { type: String, default: void 0 }
13833
13870
  },
13834
- emits: ["refreshList", "update:search", "update:currentPage"],
13871
+ emits: ["update:modelValue"],
13835
13872
  setup(__props, { emit: emits }) {
13836
13873
  const props = __props;
13837
- const { qmObj: qmObj2 } = main$1;
13838
- const IsPopupActive = ref({
13839
- columnsManager: false
13840
- });
13841
- const columnsAreObj = computed$2(() => !qmObj2.isArray(props.columns));
13842
- const columnsArray = computed$2(() => {
13843
- if (!columnsAreObj.value)
13844
- return props.columns;
13845
- const arr = Object.values(props.columns);
13846
- const keys = Object.keys(props.columns);
13847
- arr.forEach((col, index) => {
13848
- const key = keys[index];
13849
- col.name = key;
13850
- });
13851
- return arr;
13852
- });
13853
- const filteredColumnsList = computed$2(() => {
13854
- return columnsArray.value.filter(functions.isColumnDisplayed);
13855
- });
13856
- const searchLocal = computed$2({
13857
- get() {
13858
- return props.search;
13859
- },
13860
- set(val) {
13861
- emits("update:search", val);
13862
- }
13863
- });
13864
- const currentPageLocal = computed$2({
13874
+ const value = computed$2({
13865
13875
  get() {
13866
- return props.currentPage;
13876
+ return props.modelValue;
13867
13877
  },
13868
13878
  set(val) {
13869
- emits("update:currentPage", val);
13879
+ emits("update:modelValue", val);
13870
13880
  }
13871
13881
  });
13872
- function refreshList(pageChange = false) {
13873
- emits("refreshList", pageChange);
13874
- }
13875
- function openColumnsManager() {
13876
- if (columnsAreObj.value) {
13877
- IsPopupActive.value.columnsManager = true;
13878
- } else {
13879
- console.log("ERROR ck-table", "The columns list should be an object");
13882
+ const computedClass = computed$2(() => {
13883
+ const list = [];
13884
+ if (props.squared)
13885
+ list.push("is-squared");
13886
+ if (props.outlined)
13887
+ list.push("is-outlined");
13888
+ let size = "s";
13889
+ if (props.size === "m" || props.size === "l")
13890
+ size = props.size;
13891
+ list.push(`ck-switch--size-${size}`);
13892
+ return list;
13893
+ });
13894
+ const computedAttributes = computed$2(() => {
13895
+ return {
13896
+ "aria-disabled": props.disabled,
13897
+ tabindex: props.disabled ? void 0 : "0"
13898
+ };
13899
+ });
13900
+ const iconClass = computed$2(() => {
13901
+ const list = [];
13902
+ if (props.size && props.size !== "m") {
13903
+ list.push(`ck-switch__icon-size--${props.size}`);
13880
13904
  }
13905
+ return list;
13906
+ });
13907
+ function onTrigger2() {
13908
+ value.value = !value.value;
13881
13909
  }
13882
13910
  return (_ctx, _cache) => {
13883
- return openBlock(), createElementBlock(Fragment, null, [
13884
- __props.hasColumnsManager && unref$1(columnsAreObj) ? (openBlock(), createBlock(TableColumnsManager, {
13885
- key: 0,
13886
- modelValue: IsPopupActive.value.columnsManager,
13887
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => IsPopupActive.value.columnsManager = $event),
13888
- columnsArray: unref$1(columnsArray),
13889
- columns: __props.columns
13890
- }, null, 8, ["modelValue", "columnsArray", "columns"])) : createCommentVNode("", true),
13891
- createElementVNode("div", _hoisted_1$2, [
13892
- _ctx.$slots.header || !__props.hideHeaderActions ? (openBlock(), createElementBlock("div", _hoisted_2, [
13893
- !__props.hideHeaderActions ? (openBlock(), createBlock(TableHeaderItems, {
13894
- key: 0,
13895
- search: unref$1(searchLocal),
13896
- "onUpdate:search": _cache[1] || (_cache[1] = ($event) => isRef$1(searchLocal) ? searchLocal.value = $event : null),
13897
- currentPage: __props.currentPage,
13898
- hasColumnsManager: __props.hasColumnsManager,
13899
- itemsPerPage: __props.itemsPerPage,
13900
- listLength: __props.listLength,
13901
- showRefreshBtn: __props.showRefreshBtn,
13902
- hideItemsPerPage: __props.hideItemsPerPage,
13903
- onRefreshList: _cache[2] || (_cache[2] = ($event) => refreshList($event)),
13904
- onOpenColumnsManager: _cache[3] || (_cache[3] = ($event) => openColumnsManager())
13905
- }, null, 8, ["search", "currentPage", "hasColumnsManager", "itemsPerPage", "listLength", "showRefreshBtn", "hideItemsPerPage"])) : createCommentVNode("", true),
13906
- _ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_3, [
13907
- renderSlot(_ctx.$slots, "header", {}, void 0, true)
13908
- ])) : createCommentVNode("", true)
13909
- ])) : createCommentVNode("", true),
13910
- createElementVNode("div", _hoisted_4, [
13911
- createElementVNode("table", {
13912
- class: normalizeClass(["ck-table__table", { "not-full-width": __props.notFullWidth }])
13913
- }, [
13914
- unref$1(filteredColumnsList).length ? (openBlock(), createElementBlock("thead", _hoisted_5, [
13915
- createVNode(ckTr, null, {
13916
- default: withCtx(() => [
13917
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref$1(filteredColumnsList), (col) => {
13918
- return openBlock(), createBlock(_sfc_main$7, {
13919
- key: col.title,
13920
- col
13921
- }, null, 8, ["col"]);
13922
- }), 128))
13923
- ]),
13924
- _: 1
13925
- })
13926
- ])) : createCommentVNode("", true),
13927
- createElementVNode("tbody", null, [
13928
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
13929
- ]),
13930
- _ctx.$slots.footer ? (openBlock(), createElementBlock("tfoot", _hoisted_6, [
13931
- renderSlot(_ctx.$slots, "footer", {}, void 0, true)
13932
- ])) : createCommentVNode("", true)
13933
- ], 2)
13934
- ]),
13935
- createVNode(TablePagination, {
13936
- class: "ck-table__pagination",
13937
- currentPage: unref$1(currentPageLocal),
13938
- "onUpdate:currentPage": _cache[4] || (_cache[4] = ($event) => isRef$1(currentPageLocal) ? currentPageLocal.value = $event : null),
13939
- itemsPerPage: __props.itemsPerPage,
13940
- listLength: __props.listLength,
13941
- align: __props.paginationAlign,
13942
- onRefreshList: _cache[5] || (_cache[5] = ($event) => refreshList(true))
13943
- }, null, 8, ["currentPage", "itemsPerPage", "listLength", "align"])
13944
- ])
13945
- ], 64);
13911
+ return openBlock(), createElementBlock("label", mergeProps({ class: "ck-switch" }, unref$1(computedAttributes), {
13912
+ class: unref$1(computedClass),
13913
+ onKeydown: _cache[2] || (_cache[2] = withKeys(withModifiers(() => {
13914
+ }, ["prevent"]), ["space"])),
13915
+ onKeyup: [
13916
+ _cache[3] || (_cache[3] = withKeys(($event) => onTrigger2(), ["enter"])),
13917
+ _cache[4] || (_cache[4] = withKeys(($event) => onTrigger2(), ["space"]))
13918
+ ]
13919
+ }), [
13920
+ withDirectives(createElementVNode("input", {
13921
+ class: "ck-switch__input",
13922
+ "aria-hidden": "true",
13923
+ type: "checkbox",
13924
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(value) ? value.value = $event : null),
13925
+ disabled: __props.disabled,
13926
+ onClick: _cache[1] || (_cache[1] = ($event) => onTrigger2())
13927
+ }, null, 8, _hoisted_1$3), [
13928
+ [vModelCheckbox, unref$1(value)]
13929
+ ]),
13930
+ createElementVNode("div", _hoisted_2$1, [
13931
+ _hoisted_3,
13932
+ __props.icon && unref$1(value) ? (openBlock(), createBlock(ckIcon, {
13933
+ key: 0,
13934
+ class: normalizeClass(["ck-switch__icon-left", unref$1(iconClass)]),
13935
+ icon: __props.icon,
13936
+ "icon-pack": __props.iconPack
13937
+ }, null, 8, ["icon", "icon-pack", "class"])) : createCommentVNode("", true),
13938
+ __props.icon && !unref$1(value) ? (openBlock(), createBlock(ckIcon, {
13939
+ key: 1,
13940
+ class: normalizeClass(["ck-switch__icon-right", unref$1(iconClass)]),
13941
+ icon: __props.icon,
13942
+ "icon-pack": __props.iconPack
13943
+ }, null, 8, ["icon", "icon-pack", "class"])) : createCommentVNode("", true)
13944
+ ]),
13945
+ _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_4, [
13946
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
13947
+ ])) : createCommentVNode("", true)
13948
+ ], 16);
13946
13949
  };
13947
13950
  }
13948
13951
  });
13949
- var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-2c108c86"]]);
13950
- var ckTd_vue_vue_type_style_index_0_scoped_true_lang = "";
13952
+ var ckSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-b6a4dfaa"]]);
13953
+ var ckSwitchOptions_vue_vue_type_style_index_0_scoped_true_lang = "";
13954
+ const _hoisted_1$2 = { class: "ck-switch-options__container-exterior" };
13955
+ const _hoisted_2 = ["onClick"];
13951
13956
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
13952
13957
  props: {
13953
- col: { type: Object, default: void 0 },
13954
- nowrap: { type: Boolean, default: false },
13955
- block: { type: Boolean, default: false },
13956
- autoWidth: { type: Boolean, default: false },
13957
- overflowAuto: { type: Boolean, default: false },
13958
- align: { type: String, default: void 0, validator: validators.align },
13959
- fixedWidth: { type: String, default: "" },
13960
- minWidth: { type: String, default: "" },
13961
- maxWidth: { type: String, default: "" },
13962
- maxHeight: { type: String, default: "" }
13958
+ modelValue: { type: [Boolean, Number, Object], default: 0 },
13959
+ options: { type: Array, required: true },
13960
+ prop: { type: String, default: "name" },
13961
+ notReduce: { type: Boolean, default: false },
13962
+ reduceFunction: { type: Function, default: (Option) => Option.id },
13963
+ label: { type: String, default: "" },
13964
+ labelAlign: { type: String, default: "" },
13965
+ group: { type: String, default: "" },
13966
+ groupBreak: { type: String, default: "s" },
13967
+ groupVertical: { type: String, default: "" },
13968
+ sameWidthOptions: { type: Boolean, default: false }
13963
13969
  },
13964
- setup(__props) {
13970
+ emits: ["update:modelValue", "change"],
13971
+ setup(__props, { emit: emits }) {
13965
13972
  const props = __props;
13966
- const computedTdClass = computed$2(() => {
13967
- return {
13968
- "auto-width": props.autoWidth,
13969
- "overflow-auto": props.overflowAuto
13970
- };
13971
- });
13972
- const computedSpanClass = computed$2(() => {
13973
- const list = [];
13974
- let align;
13975
- if (props.col)
13976
- align = props.col.align;
13977
- if (props.align)
13978
- align = props.align;
13979
- if (align) {
13980
- if (align === "center")
13981
- list.push("align-center");
13982
- if (align === "right")
13983
- list.push("align-right");
13973
+ const selectedOption = computed$2({
13974
+ get() {
13975
+ return props.modelValue;
13976
+ },
13977
+ set(val) {
13978
+ emits("update:modelValue", val);
13979
+ emits("change", val);
13984
13980
  }
13985
- if (props.block)
13986
- list.push("block");
13987
- if (props.block)
13988
- list.push("no-wrap-text");
13989
- return list;
13990
13981
  });
13991
- const computedStyle = computed$2(() => {
13992
- const list = {};
13993
- if (props.minWidth)
13994
- list["min-width"] = props.minWidth;
13995
- if (props.fixedWidth)
13996
- list["min-width"] = props.fixedWidth;
13997
- if (props.maxWidth)
13998
- list["max-width"] = props.maxWidth;
13999
- if (props.fixedWidth)
14000
- list["max-width"] = props.fixedWidth;
14001
- if (props.maxHeight)
14002
- list["max-height"] = props.maxHeight;
14003
- return list;
13982
+ const computedClass = computed$2(() => {
13983
+ const classList2 = [];
13984
+ classList2.push(functions.getGroupClass(props));
13985
+ return classList2;
14004
13986
  });
14005
- const isColumnDisplayed = computed$2(() => {
14006
- if (!props.col)
14007
- return true;
14008
- return functions.isColumnDisplayed(props.col);
13987
+ const computedItemStyle = computed$2(() => {
13988
+ const list = [];
13989
+ if (props.sameWidthOptions)
13990
+ list.push({ width: `${100 / props.options.length}%` });
13991
+ return list;
14009
13992
  });
13993
+ function getOptionValue(Option) {
13994
+ if (props.notReduce)
13995
+ return Option;
13996
+ return props.reduceFunction(Option);
13997
+ }
14010
13998
  return (_ctx, _cache) => {
14011
- return unref$1(isColumnDisplayed) ? (openBlock(), createElementBlock("td", {
14012
- key: 0,
14013
- class: normalizeClass(["ck-td", unref$1(computedTdClass)])
14014
- }, [
14015
- createElementVNode("span", {
14016
- class: normalizeClass(unref$1(computedSpanClass)),
14017
- style: normalizeStyle(unref$1(computedStyle))
13999
+ return openBlock(), createElementBlock("div", _hoisted_1$2, [
14000
+ __props.label ? (openBlock(), createBlock(ckLabel, {
14001
+ key: 0,
14002
+ align: __props.labelAlign
14003
+ }, {
14004
+ default: withCtx(() => [
14005
+ createTextVNode(toDisplayString(__props.label), 1)
14006
+ ]),
14007
+ _: 1
14008
+ }, 8, ["align"])) : createCommentVNode("", true),
14009
+ createElementVNode("div", {
14010
+ class: normalizeClass(["ck-switch-options__container", unref$1(computedClass)])
14018
14011
  }, [
14019
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
14020
- ], 6)
14021
- ], 2)) : createCommentVNode("", true);
14012
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (Option, index) => {
14013
+ return openBlock(), createElementBlock("div", {
14014
+ class: normalizeClass(["ck-switch-options__option", { selected: unref$1(selectedOption) == getOptionValue(Option) }]),
14015
+ key: `ck-switch-options${index}`,
14016
+ style: normalizeStyle(unref$1(computedItemStyle)),
14017
+ onClick: ($event) => selectedOption.value = getOptionValue(Option)
14018
+ }, toDisplayString(Option[__props.prop]), 15, _hoisted_2);
14019
+ }), 128))
14020
+ ], 2)
14021
+ ]);
14022
14022
  };
14023
14023
  }
14024
14024
  });
14025
- var ckTd = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-63af303c"]]);
14025
+ var ckSwitchOptions = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-2c3e07c8"]]);
14026
14026
  var ckTextarea_vue_vue_type_style_index_0_scoped_true_lang = "";
14027
14027
  const _hoisted_1$1 = { class: "ck-textarea" };
14028
14028
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
@@ -16666,6 +16666,10 @@ var components = /* @__PURE__ */ Object.freeze({
16666
16666
  ckDropdown,
16667
16667
  ckNavbar,
16668
16668
  ckNotify,
16669
+ ckTable,
16670
+ ckTd,
16671
+ ckTh,
16672
+ ckTr,
16669
16673
  ckButton,
16670
16674
  ckCheckbox,
16671
16675
  ckChip,
@@ -16673,17 +16677,13 @@ var components = /* @__PURE__ */ Object.freeze({
16673
16677
  ckImg,
16674
16678
  ckInput,
16675
16679
  ckLabel,
16676
- ckPopup: _sfc_main$e,
16680
+ ckPopup: _sfc_main$b,
16677
16681
  ckRadio,
16678
16682
  ckSelect,
16679
16683
  ckSwitch,
16680
16684
  ckSwitchOptions,
16681
- ckTable,
16682
- ckTd,
16683
16685
  ckTextarea,
16684
- ckTh,
16685
16686
  ckTooltip,
16686
- ckTr,
16687
16687
  EVENTS: events,
16688
16688
  EventBus: mitt,
16689
16689
  lockScroll,
@@ -16720,4 +16720,4 @@ const install = function installCleek(app, options) {
16720
16720
  app.component(componentName, component);
16721
16721
  });
16722
16722
  };
16723
- export { events as EVENTS, mitt as EventBus, ckButton, ckCheckbox, ckChip, ckDropdown, ckIcon, ckImg, ckInput, ckLabel, ckNavbar, ckNotify, _sfc_main$e as ckPopup, ckRadio, ckSelect, ckSwitch, ckSwitchOptions, ckTable, ckTd, ckTextarea, ckTh, ckTooltip, ckTr, install as default, lockScroll, unlockScroll };
16723
+ export { events as EVENTS, mitt as EventBus, ckButton, ckCheckbox, ckChip, ckDropdown, ckIcon, ckImg, ckInput, ckLabel, ckNavbar, ckNotify, _sfc_main$b as ckPopup, ckRadio, ckSelect, ckSwitch, ckSwitchOptions, ckTable, ckTd, ckTextarea, ckTh, ckTooltip, ckTr, install as default, lockScroll, unlockScroll };