cleek 2.1.12 → 2.1.16

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, onMounted, getCurrentInstance, mergeProps, withKeys, withModifiers, pushScopeId, popScopeId, withCtx, createTextVNode, toDisplayString, withDirectives, isRef as isRef$1, vModelDynamic, createVNode, 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;
@@ -26,8 +26,8 @@ var _export_sfc = (sfc, props) => {
26
26
  }
27
27
  return target;
28
28
  };
29
- const _hoisted_1$j = { class: "ck-dropdown" };
30
- const _sfc_main$n = /* @__PURE__ */ defineComponent({
29
+ const _hoisted_1$k = { class: "ck-dropdown" };
30
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
31
31
  props: {
32
32
  triggerType: { type: String, default: "click" },
33
33
  dark: { type: Boolean, default: false }
@@ -49,7 +49,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
49
49
  isOpen.value = true;
50
50
  }
51
51
  return (_ctx, _cache) => {
52
- return openBlock(), createElementBlock("div", _hoisted_1$j, [
52
+ return openBlock(), createElementBlock("div", _hoisted_1$k, [
53
53
  createElementVNode("div", {
54
54
  class: "ck-dropdown__trigger",
55
55
  onClick: _cache[0] || (_cache[0] = ($event) => openClose())
@@ -71,9 +71,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
71
71
  };
72
72
  }
73
73
  });
74
- var ckDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-64a91fb4"]]);
74
+ var ckDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-64a91fb4"]]);
75
75
  var ckNavbar_vue_vue_type_style_index_0_scoped_true_lang = "";
76
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
76
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
77
77
  props: {
78
78
  padding: { type: String, default: 0 },
79
79
  position: { type: String, default: "fixed" }
@@ -108,77 +108,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
108
108
  };
109
109
  }
110
110
  });
111
- var ckNavbar = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-5024db6a"]]);
112
- var validators = {
113
- size: (type) => {
114
- return ["", "xs", "s", "m", "l", "xl"].includes(type);
115
- },
116
- group: (type) => {
117
- return ["", "left", "right", "center"].includes(type);
118
- },
119
- groupVertical: (type) => {
120
- return ["top", "bottom", "center"].includes(type);
121
- },
122
- align: (type) => {
123
- return ["left", "center", "right"].includes(type);
124
- },
125
- buttonType: (type) => {
126
- return ["filled", "outlined", "flat"].includes(type);
127
- },
128
- inputType: (type) => {
129
- return ["text", "number", "date", "time", "password"].includes(type);
130
- },
131
- radioOptions: (options) => {
132
- let isValid = true;
133
- options.forEach((option) => {
134
- isValid = isValid && "label" in option && "value" in option;
135
- });
136
- return isValid;
137
- }
138
- };
139
- var functions$1 = {
140
- getGroupClass({ group = "", groupVertical = "", groupBreak = "" } = {}) {
141
- const _screenSize = "";
142
- if (groupBreak && groupBreak === _screenSize)
143
- return [];
144
- const classList2 = [];
145
- if (group)
146
- classList2.push(`ck-component__group--${group}`);
147
- if (groupVertical)
148
- classList2.push(`ck-component__group-vertical--${groupVertical}`);
149
- return classList2;
150
- },
151
- isColorTemplateVariable(color) {
152
- if (color === "primary")
153
- return true;
154
- if (color === "secondary")
155
- return true;
156
- if (color === "success")
157
- return true;
158
- if (color === "warning")
159
- return true;
160
- if (color === "danger")
161
- return true;
162
- if (color === "dark")
163
- return true;
164
- if (color === "light")
165
- return true;
166
- return false;
167
- },
168
- isColumnDisplayed(column) {
169
- if (column.isDisplayed === false)
170
- return false;
171
- if (column.unchangeable) {
172
- if (column.isDisplayed === true)
173
- return true;
174
- return false;
175
- }
176
- return true;
177
- },
178
- getCleekOptions(getCurrentInstance2) {
179
- return getCurrentInstance2().appContext.app.config.globalProperties.$cleekOptions;
180
- }
181
- };
111
+ var ckNavbar = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-5024db6a"]]);
182
112
  /*!
183
113
  * Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com
184
114
  * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
@@ -384,11 +314,11 @@ if (!w[NAMESPACE_IDENTIFIER].hooks)
384
314
  if (!w[NAMESPACE_IDENTIFIER].shims)
385
315
  w[NAMESPACE_IDENTIFIER].shims = [];
386
316
  var namespace = w[NAMESPACE_IDENTIFIER];
387
- var functions = [];
317
+ var functions$1 = [];
388
318
  var listener = function listener2() {
389
319
  DOCUMENT.removeEventListener("DOMContentLoaded", listener2);
390
320
  loaded = 1;
391
- functions.map(function(fn2) {
321
+ functions$1.map(function(fn2) {
392
322
  return fn2();
393
323
  });
394
324
  };
@@ -11299,7 +11229,7 @@ defineComponent({
11299
11229
  }
11300
11230
  });
11301
11231
  var ckIcon_vue_vue_type_style_index_0_scoped_true_lang = "";
11302
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
11232
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
11303
11233
  props: {
11304
11234
  icon: { type: [String, Array], default: "" },
11305
11235
  color: { type: String, default: "" },
@@ -11359,10 +11289,212 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
11359
11289
  };
11360
11290
  }
11361
11291
  });
11362
- var ckIcon = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-25801d7b"]]);
11292
+ var ckIcon = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-25801d7b"]]);
11293
+ var ckNotify_vue_vue_type_style_index_0_scoped_true_lang = "";
11294
+ const _hoisted_1$j = { class: "ck-notify__container" };
11295
+ const _hoisted_2$9 = { class: "ck-notify__title" };
11296
+ const _hoisted_3$6 = { class: "close-btn" };
11297
+ const _hoisted_4$4 = { class: "ck-notify__text" };
11298
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
11299
+ setup(__props, { expose }) {
11300
+ expose({
11301
+ ckNotify: ckNotify2,
11302
+ ckNotifySuccess,
11303
+ ckNotifyError,
11304
+ ckNotifyWarning
11305
+ });
11306
+ const isActive = ref(false);
11307
+ const globalTitle = ref("");
11308
+ const globalText = ref("");
11309
+ const globalColor = ref("");
11310
+ const defaultDuration = ref(2e3);
11311
+ function closeNotification() {
11312
+ isActive.value = false;
11313
+ }
11314
+ function ckNotify2({ text: text3 = "", title = "", color = "#ccc", duration = defaultDuration.value }) {
11315
+ console.log("openNotify", title);
11316
+ globalTitle.value = title;
11317
+ globalText.value = text3;
11318
+ globalColor.value = color;
11319
+ isActive.value = true;
11320
+ setTimeout(() => {
11321
+ closeNotification();
11322
+ }, duration);
11323
+ }
11324
+ function ckNotifySuccess(text3 = "", title = "\xC9xito") {
11325
+ ckNotify2({
11326
+ text: text3,
11327
+ title,
11328
+ color: "#66CC00"
11329
+ });
11330
+ }
11331
+ function ckNotifyError(text3 = "", title = "Error") {
11332
+ ckNotify2({ text: text3, title, color: "#FF3333" });
11333
+ }
11334
+ function ckNotifyWarning(text3 = "", title = "Atenci\xF3n") {
11335
+ ckNotify2({ text: text3, title, color: "#FFDD33" });
11336
+ }
11337
+ return (_ctx, _cache) => {
11338
+ return isActive.value ? (openBlock(), createBlock(Teleport, {
11339
+ key: 0,
11340
+ to: "body"
11341
+ }, [
11342
+ createElementVNode("div", _hoisted_1$j, [
11343
+ createElementVNode("div", {
11344
+ class: "ck-notify",
11345
+ style: normalizeStyle({ "background-color": globalColor.value }),
11346
+ onClick: _cache[0] || (_cache[0] = ($event) => closeNotification())
11347
+ }, [
11348
+ createElementVNode("div", _hoisted_2$9, [
11349
+ createElementVNode("div", _hoisted_3$6, [
11350
+ createVNode(ckIcon, { icon: "times" })
11351
+ ]),
11352
+ createTextVNode(toDisplayString(globalTitle.value), 1)
11353
+ ]),
11354
+ createElementVNode("div", _hoisted_4$4, toDisplayString(globalText.value), 1)
11355
+ ], 4)
11356
+ ])
11357
+ ])) : createCommentVNode("", true);
11358
+ };
11359
+ }
11360
+ });
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"]]);
11371
+ var validators = {
11372
+ size: (type) => {
11373
+ return ["", "xs", "s", "m", "l", "xl"].includes(type);
11374
+ },
11375
+ group: (type) => {
11376
+ return ["", "left", "right", "center"].includes(type);
11377
+ },
11378
+ groupVertical: (type) => {
11379
+ return ["top", "bottom", "center"].includes(type);
11380
+ },
11381
+ align: (type) => {
11382
+ return ["left", "center", "right"].includes(type);
11383
+ },
11384
+ buttonType: (type) => {
11385
+ return ["filled", "outlined", "flat"].includes(type);
11386
+ },
11387
+ inputType: (type) => {
11388
+ return ["text", "number", "date", "time", "password"].includes(type);
11389
+ },
11390
+ radioOptions: (options) => {
11391
+ let isValid = true;
11392
+ options.forEach((option) => {
11393
+ isValid = isValid && "label" in option && "value" in option;
11394
+ });
11395
+ return isValid;
11396
+ }
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
+ });
11451
+ var functions = {
11452
+ getGroupClass({ group = "", groupVertical = "", groupBreak = "" } = {}) {
11453
+ const _screenSize = "";
11454
+ if (groupBreak && groupBreak === _screenSize)
11455
+ return [];
11456
+ const classList2 = [];
11457
+ if (group)
11458
+ classList2.push(`ck-component__group--${group}`);
11459
+ if (groupVertical)
11460
+ classList2.push(`ck-component__group-vertical--${groupVertical}`);
11461
+ return classList2;
11462
+ },
11463
+ isColorTemplateVariable(color) {
11464
+ if (color === "primary")
11465
+ return true;
11466
+ if (color === "secondary")
11467
+ return true;
11468
+ if (color === "success")
11469
+ return true;
11470
+ if (color === "warning")
11471
+ return true;
11472
+ if (color === "danger")
11473
+ return true;
11474
+ if (color === "dark")
11475
+ return true;
11476
+ if (color === "light")
11477
+ return true;
11478
+ return false;
11479
+ },
11480
+ isColumnDisplayed(column) {
11481
+ if (column.isDisplayed === false)
11482
+ return false;
11483
+ if (column.unchangeable) {
11484
+ if (column.isDisplayed === true)
11485
+ return true;
11486
+ return false;
11487
+ }
11488
+ return true;
11489
+ },
11490
+ getCleekOptions(getCurrentInstance2) {
11491
+ console.log("getCurrentInstance", getCurrentInstance2);
11492
+ return getCurrentInstance2().appContext.app.config.globalProperties.$cleekOptions;
11493
+ }
11494
+ };
11363
11495
  var ckButton_vue_vue_type_style_index_0_scoped_true_lang = "";
11364
- const _hoisted_1$i = ["title", "aria-label", "disabled"];
11365
- const _sfc_main$k = /* @__PURE__ */ defineComponent({
11496
+ const _hoisted_1$g = ["title", "aria-label", "disabled"];
11497
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
11366
11498
  props: {
11367
11499
  title: { type: String, default: void 0 },
11368
11500
  disabled: { type: Boolean, default: false },
@@ -11385,7 +11517,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
11385
11517
  const isMounted = ref(false);
11386
11518
  const computedClass = computed$2(() => {
11387
11519
  const classList2 = [];
11388
- classList2.push(functions$1.getGroupClass(props));
11520
+ classList2.push(functions.getGroupClass(props));
11389
11521
  if (props.color !== "primary") {
11390
11522
  if (props.type === "filled") {
11391
11523
  classList2.push(`ck-component__bg-color--${props.color}`);
@@ -11439,46 +11571,414 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
11439
11571
  icon: __props.iconRight,
11440
11572
  "icon-pack": __props.iconPack
11441
11573
  }, null, 8, ["icon", "icon-pack"])) : createCommentVNode("", true)
11442
- ], 10, _hoisted_1$i);
11574
+ ], 10, _hoisted_1$g);
11443
11575
  };
11444
11576
  }
11445
11577
  });
11446
- var ckButton = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-36b03be6"]]);
11447
- const NOOP$1 = () => {
11448
- };
11449
- const isArray$1 = Array.isArray;
11450
- const isFunction$1 = (val) => typeof val === "function";
11451
- const isSymbol = (val) => typeof val === "symbol";
11452
- const def = (obj, key, value) => {
11453
- Object.defineProperty(obj, key, {
11454
- configurable: true,
11455
- enumerable: false,
11456
- value
11457
- });
11458
- };
11459
- let activeEffectScope;
11460
- function recordEffectScope(effect3, scope) {
11461
- scope = scope || activeEffectScope;
11462
- if (scope && scope.active) {
11463
- scope.effects.push(effect3);
11464
- }
11465
- }
11466
- const createDep = (effects) => {
11467
- const dep = new Set(effects);
11468
- dep.w = 0;
11469
- dep.n = 0;
11470
- return dep;
11471
- };
11472
- const wasTracked = (dep) => (dep.w & trackOpBit) > 0;
11473
- const newTracked = (dep) => (dep.n & trackOpBit) > 0;
11474
- const initDepMarkers = ({ deps }) => {
11475
- if (deps.length) {
11476
- for (let i = 0; i < deps.length; i++) {
11477
- deps[i].w |= trackOpBit;
11478
- }
11479
- }
11480
- };
11481
- const finalizeDepMarkers = (effect3) => {
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
+ };
11604
+ }
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);
11640
+ }
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();
11674
+ }
11675
+ function setSelect() {
11676
+ realInput.value.select();
11677
+ }
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-7a01f122"]]);
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) => {
11482
11982
  const { deps } = effect3;
11483
11983
  if (deps.length) {
11484
11984
  let ptr = 0;
@@ -12047,465 +12547,205 @@ function traverse(value, seen) {
12047
12547
  return value;
12048
12548
  }
12049
12549
  seen = seen || new Set();
12050
- if (seen.has(value)) {
12051
- return value;
12052
- }
12053
- seen.add(value);
12054
- if (isRef(value)) {
12055
- traverse(value.value, seen);
12056
- } else if (isArray(value)) {
12057
- for (let i = 0; i < value.length; i++) {
12058
- traverse(value[i], seen);
12059
- }
12060
- } else if (isSet(value) || isMap(value)) {
12061
- value.forEach((v) => {
12062
- traverse(v, seen);
12063
- });
12064
- } else if (isPlainObject(value)) {
12065
- for (const key in value) {
12066
- traverse(value[key], seen);
12067
- }
12068
- }
12069
- return value;
12070
- }
12071
- function resolveMergedOptions(instance) {
12072
- const base = instance.type;
12073
- const { mixins, extends: extendsOptions } = base;
12074
- const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext;
12075
- const cached = cache.get(base);
12076
- let resolved;
12077
- if (cached) {
12078
- resolved = cached;
12079
- } else if (!globalMixins.length && !mixins && !extendsOptions) {
12080
- {
12081
- resolved = base;
12082
- }
12083
- } else {
12084
- resolved = {};
12085
- if (globalMixins.length) {
12086
- globalMixins.forEach((m) => mergeOptions(resolved, m, optionMergeStrategies, true));
12087
- }
12088
- mergeOptions(resolved, base, optionMergeStrategies);
12089
- }
12090
- cache.set(base, resolved);
12091
- return resolved;
12092
- }
12093
- function mergeOptions(to, from, strats, asMixin = false) {
12094
- const { mixins, extends: extendsOptions } = from;
12095
- if (extendsOptions) {
12096
- mergeOptions(to, extendsOptions, strats, true);
12097
- }
12098
- if (mixins) {
12099
- mixins.forEach((m) => mergeOptions(to, m, strats, true));
12100
- }
12101
- for (const key in from) {
12102
- if (asMixin && key === "expose")
12103
- ;
12104
- else {
12105
- const strat = internalOptionMergeStrats[key] || strats && strats[key];
12106
- to[key] = strat ? strat(to[key], from[key]) : from[key];
12107
- }
12108
- }
12109
- return to;
12110
- }
12111
- const internalOptionMergeStrats = {
12112
- data: mergeDataFn,
12113
- props: mergeObjectOptions,
12114
- emits: mergeObjectOptions,
12115
- methods: mergeObjectOptions,
12116
- computed: mergeObjectOptions,
12117
- beforeCreate: mergeAsArray,
12118
- created: mergeAsArray,
12119
- beforeMount: mergeAsArray,
12120
- mounted: mergeAsArray,
12121
- beforeUpdate: mergeAsArray,
12122
- updated: mergeAsArray,
12123
- beforeDestroy: mergeAsArray,
12124
- beforeUnmount: mergeAsArray,
12125
- destroyed: mergeAsArray,
12126
- unmounted: mergeAsArray,
12127
- activated: mergeAsArray,
12128
- deactivated: mergeAsArray,
12129
- errorCaptured: mergeAsArray,
12130
- serverPrefetch: mergeAsArray,
12131
- components: mergeObjectOptions,
12132
- directives: mergeObjectOptions,
12133
- watch: mergeWatchOptions,
12134
- provide: mergeDataFn,
12135
- inject: mergeInject
12136
- };
12137
- function mergeDataFn(to, from) {
12138
- if (!from) {
12139
- return to;
12140
- }
12141
- if (!to) {
12142
- return from;
12143
- }
12144
- return function mergedDataFn() {
12145
- return extend(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from);
12146
- };
12147
- }
12148
- function mergeInject(to, from) {
12149
- return mergeObjectOptions(normalizeInject(to), normalizeInject(from));
12150
- }
12151
- function normalizeInject(raw) {
12152
- if (isArray(raw)) {
12153
- const res = {};
12154
- for (let i = 0; i < raw.length; i++) {
12155
- res[raw[i]] = raw[i];
12156
- }
12157
- return res;
12158
- }
12159
- return raw;
12160
- }
12161
- function mergeAsArray(to, from) {
12162
- return to ? [...new Set([].concat(to, from))] : from;
12163
- }
12164
- function mergeObjectOptions(to, from) {
12165
- return to ? extend(extend(Object.create(null), to), from) : from;
12166
- }
12167
- function mergeWatchOptions(to, from) {
12168
- if (!to)
12169
- return from;
12170
- if (!from)
12171
- return to;
12172
- const merged = extend(Object.create(null), to);
12173
- for (const key in from) {
12174
- merged[key] = mergeAsArray(to[key], from[key]);
12175
- }
12176
- return merged;
12177
- }
12178
- const queuePostRenderEffect = queueEffectWithSuspense;
12179
- const getPublicInstance = (i) => {
12180
- if (!i)
12181
- return null;
12182
- if (isStatefulComponent(i))
12183
- return getExposeProxy(i) || i.proxy;
12184
- return getPublicInstance(i.parent);
12185
- };
12186
- const publicPropertiesMap = extend(Object.create(null), {
12187
- $: (i) => i,
12188
- $el: (i) => i.vnode.el,
12189
- $data: (i) => i.data,
12190
- $props: (i) => i.props,
12191
- $attrs: (i) => i.attrs,
12192
- $slots: (i) => i.slots,
12193
- $refs: (i) => i.refs,
12194
- $parent: (i) => getPublicInstance(i.parent),
12195
- $root: (i) => getPublicInstance(i.root),
12196
- $emit: (i) => i.emit,
12197
- $options: (i) => resolveMergedOptions(i),
12198
- $forceUpdate: (i) => () => queueJob(i.update),
12199
- $nextTick: (i) => nextTick.bind(i.proxy),
12200
- $watch: (i) => instanceWatch.bind(i)
12201
- });
12202
- let currentInstance = null;
12203
- const setCurrentInstance = (instance) => {
12204
- currentInstance = instance;
12205
- instance.scope.on();
12206
- };
12207
- const unsetCurrentInstance = () => {
12208
- currentInstance && currentInstance.scope.off();
12209
- currentInstance = null;
12210
- };
12211
- function isStatefulComponent(instance) {
12212
- return instance.vnode.shapeFlag & 4;
12213
- }
12214
- let isInSSRComponentSetup = false;
12215
- function getExposeProxy(instance) {
12216
- if (instance.exposed) {
12217
- return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
12218
- get(target, key) {
12219
- if (key in target) {
12220
- return target[key];
12221
- } else if (key in publicPropertiesMap) {
12222
- return publicPropertiesMap[key](instance);
12223
- }
12224
- }
12225
- }));
12550
+ if (seen.has(value)) {
12551
+ return value;
12226
12552
  }
12227
- }
12228
- const computed = (getterOrOptions, debugOptions) => {
12229
- return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
12230
- };
12231
- var ckCheckbox_vue_vue_type_style_index_0_scoped_true_lang = "";
12232
- const _withScopeId$2 = (n) => (pushScopeId("data-v-132565da"), n = n(), popScopeId(), n);
12233
- const _hoisted_1$h = ["disabled", "checked"];
12234
- const _hoisted_2$8 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", { class: "ck-checkbox__element" }, null, -1));
12235
- const _hoisted_3$5 = {
12236
- key: 0,
12237
- class: "c-Checkbox__label"
12238
- };
12239
- const _sfc_main$j = /* @__PURE__ */ defineComponent({
12240
- props: {
12241
- modelValue: { type: Boolean, default: false },
12242
- label: { type: String, default: void 0 },
12243
- disabled: { type: Boolean, default: false }
12244
- },
12245
- emits: ["update:modelValue", "change"],
12246
- setup(__props, { emit: emits }) {
12247
- const props = __props;
12248
- const value = computed({
12249
- get() {
12250
- return props.modelValue;
12251
- },
12252
- set(val) {
12253
- emits("update:modelValue", val);
12254
- }
12255
- });
12256
- const checkboxAttributes = computed(() => {
12257
- return {
12258
- "aria-disabled": props.disabled,
12259
- tabindex: props.disabled ? void 0 : "0"
12260
- };
12553
+ seen.add(value);
12554
+ if (isRef(value)) {
12555
+ traverse(value.value, seen);
12556
+ } else if (isArray(value)) {
12557
+ for (let i = 0; i < value.length; i++) {
12558
+ traverse(value[i], seen);
12559
+ }
12560
+ } else if (isSet(value) || isMap(value)) {
12561
+ value.forEach((v) => {
12562
+ traverse(v, seen);
12261
12563
  });
12262
- function onChange(event) {
12263
- emits("change", event);
12564
+ } else if (isPlainObject(value)) {
12565
+ for (const key in value) {
12566
+ traverse(value[key], seen);
12264
12567
  }
12265
- function onTrigger2() {
12266
- value.value = !value.value;
12568
+ }
12569
+ return value;
12570
+ }
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;
12267
12582
  }
12268
- return (_ctx, _cache) => {
12269
- return openBlock(), createElementBlock("label", mergeProps({ class: "ck-checkbox" }, unref$1(checkboxAttributes), {
12270
- onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(() => {
12271
- }, ["prevent"]), ["space"])),
12272
- onKeyup: [
12273
- _cache[2] || (_cache[2] = withKeys(($event) => onTrigger2(), ["enter"])),
12274
- _cache[3] || (_cache[3] = withKeys(($event) => onTrigger2(), ["space"]))
12275
- ]
12276
- }), [
12277
- createElementVNode("input", {
12278
- class: "ck-checkbox__input",
12279
- "aria-hidden": "true",
12280
- type: "checkbox",
12281
- disabled: __props.disabled,
12282
- checked: unref$1(value),
12283
- onChange: _cache[0] || (_cache[0] = ($event) => {
12284
- value.value = $event.target.checked;
12285
- onChange($event);
12286
- })
12287
- }, null, 40, _hoisted_1$h),
12288
- _hoisted_2$8,
12289
- _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_3$5, [
12290
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
12291
- ])) : createCommentVNode("", true)
12292
- ], 16);
12293
- };
12583
+ } else {
12584
+ resolved = {};
12585
+ if (globalMixins.length) {
12586
+ globalMixins.forEach((m) => mergeOptions(resolved, m, optionMergeStrategies, true));
12587
+ }
12588
+ mergeOptions(resolved, base, optionMergeStrategies);
12294
12589
  }
12295
- });
12296
- var ckCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-132565da"]]);
12297
- var ckChip_vue_vue_type_style_index_0_scoped_true_lang = "";
12298
- const _hoisted_1$g = ["color"];
12299
- const _sfc_main$i = /* @__PURE__ */ defineComponent({
12300
- props: {
12301
- size: { type: String, default: "s" },
12302
- color: { type: String, default: "primary" },
12303
- textColor: { type: String, default: void 0 },
12304
- icon: { type: String, default: void 0 },
12305
- iconPack: { type: String, default: void 0 }
12306
- },
12307
- emits: ["click"],
12308
- setup(__props, { emit: emits }) {
12309
- const props = __props;
12310
- const computedClass = computed$2(() => {
12311
- return [
12312
- `size-${props.size}`,
12313
- `ck-component__bg-color--${props.color}`
12314
- ];
12315
- });
12316
- const computedStyle = computed$2(() => {
12317
- const list = [];
12318
- if (props.color)
12319
- ;
12320
- return list;
12321
- });
12322
- return (_ctx, _cache) => {
12323
- return openBlock(), createElementBlock("div", {
12324
- class: normalizeClass(["ck-chip", unref$1(computedClass)]),
12325
- color: __props.color,
12326
- style: normalizeStyle(unref$1(computedStyle)),
12327
- onClick: _cache[0] || (_cache[0] = ($event) => emits("click", $event))
12328
- }, [
12329
- __props.icon ? (openBlock(), createBlock(ckIcon, {
12330
- key: 0,
12331
- icon: __props.icon,
12332
- "icon-pack": __props.iconPack
12333
- }, null, 8, ["icon", "icon-pack"])) : createCommentVNode("", true),
12334
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
12335
- ], 14, _hoisted_1$g);
12336
- };
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);
12337
12597
  }
12338
- });
12339
- var ckChip = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-5333de26"]]);
12340
- var globalVariables = {
12341
- defaultFailImg: "df",
12342
- imagesFolderPath: "",
12343
- defaultImgBorderColor: "#EEEEEE"
12344
- };
12345
- var ckImg_vue_vue_type_style_index_0_scoped_true_lang = "";
12346
- const _hoisted_1$f = ["src", "alt"];
12347
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
12348
- props: {
12349
- src: { type: String, default: "" },
12350
- isFullPath: { type: Boolean, default: false },
12351
- failImgSrc: { type: String, default: "" },
12352
- alt: { type: String, default: "" },
12353
- size: { type: String, default: "", validator: validators.size },
12354
- sizeAbsolute: { type: String, default: "" },
12355
- width: { type: String, default: "" },
12356
- height: { type: String, default: "" },
12357
- zoom: { type: Boolean, default: false },
12358
- zoomTitle: { type: String, default: "" },
12359
- hasBorder: { type: Boolean, default: false },
12360
- radius: { type: String, default: "" },
12361
- borderColor: { type: String, default: "" },
12362
- rounded: { type: Boolean, default: false }
12363
- },
12364
- setup(__props) {
12365
- const props = __props;
12366
- const altNeeded = ref(false);
12367
- let isMounted = ref(false);
12368
- const imageUrl = computed$2(() => {
12369
- if (!isMounted.value)
12370
- return "";
12371
- if (props.isFullPath)
12372
- return props.src;
12373
- return getImg(props.src);
12374
- });
12375
- const computedClass = computed$2(() => {
12376
- const classList2 = [];
12377
- if (props.size)
12378
- classList2.push(`ck-img__size--${props.size}`);
12379
- if (props.rounded)
12380
- classList2.push("is-rounded");
12381
- if (props.hasBorder) {
12382
- classList2.push("ck-img__has-border");
12383
- if (functions$1.isColorTemplateVariable(realBorderColor.value)) {
12384
- classList2.push(`ck-component__border-color--${realBorderColor.value}`);
12385
- }
12386
- }
12387
- if (props.zoom)
12388
- classList2.push("zoom-able");
12389
- return classList2;
12390
- });
12391
- const computedStyle = computed$2(() => {
12392
- const styleList = [];
12393
- if (props.sizeAbsolute) {
12394
- styleList.push({ width: props.sizeAbsolute });
12395
- styleList.push({ height: props.sizeAbsolute });
12396
- }
12397
- if (props.radius)
12398
- styleList.push({ "border-radius": props.radius });
12399
- if (props.hasBorder) {
12400
- if (!functions$1.isColorTemplateVariable(realBorderColor.value)) {
12401
- styleList.push({ "border-color": realBorderColor.value });
12402
- }
12403
- }
12404
- return styleList;
12405
- });
12406
- const computedImgStyle = computed$2(() => {
12407
- const styleList = [];
12408
- if (props.radius)
12409
- styleList.push({ "border-radius": props.radius });
12410
- if (props.width)
12411
- styleList.push({ width: props.width });
12412
- if (props.height)
12413
- styleList.push({ height: props.height });
12414
- return styleList;
12415
- });
12416
- const realBorderColor = computed$2(() => {
12417
- if (props.borderColor)
12418
- return props.borderColor;
12419
- return globalVariables.defaultImgBorderColor;
12420
- });
12421
- function clickImg() {
12422
- if (props.zoom)
12423
- ;
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];
12424
12607
  }
12425
- function getImg(src) {
12426
- let path = "";
12427
- const $cleekOptions = functions$1.getCleekOptions(getCurrentInstance);
12428
- if ($cleekOptions) {
12429
- if ($cleekOptions.imgPath)
12430
- path = $cleekOptions.imgPath;
12431
- }
12432
- 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];
12433
12656
  }
12434
- onMounted(() => {
12435
- getCurrentInstance().ctx;
12436
- isMounted.value = true;
12437
- });
12438
- return (_ctx, _cache) => {
12439
- return openBlock(), createElementBlock("div", {
12440
- class: normalizeClass(["ck-img", unref$1(computedClass)]),
12441
- style: normalizeStyle(unref$1(computedStyle)),
12442
- onClick: _cache[1] || (_cache[1] = ($event) => clickImg())
12443
- }, [
12444
- createElementVNode("img", {
12445
- src: unref$1(imageUrl),
12446
- style: normalizeStyle(unref$1(computedImgStyle)),
12447
- alt: __props.alt,
12448
- onError: _cache[0] || (_cache[0] = ($event) => altNeeded.value = true)
12449
- }, null, 44, _hoisted_1$f)
12450
- ], 6);
12451
- };
12657
+ return res;
12452
12658
  }
12453
- });
12454
- var ckImg = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-e808078e"]]);
12455
- var ckLabel_vue_vue_type_style_index_0_scoped_true_lang = "";
12456
- const _hoisted_1$e = ["for"];
12457
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
12458
- props: {
12459
- for: { type: String, default: "" },
12460
- align: { type: String, default: "" }
12461
- },
12462
- setup(__props) {
12463
- const props = __props;
12464
- const computedClass = computed$2(() => {
12465
- const list = [];
12466
- let align = "left";
12467
- if (props.align === "center" || props.align === "right")
12468
- align = props.align;
12469
- list.push(`ck-align--${align}`);
12470
- return list;
12471
- });
12472
- return (_ctx, _cache) => {
12473
- return openBlock(), createElementBlock("label", {
12474
- class: normalizeClass(["ck-label", unref$1(computedClass)]),
12475
- for: __props.for
12476
- }, [
12477
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
12478
- ], 10, _hoisted_1$e);
12479
- };
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]);
12480
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)
12481
12701
  });
12482
- var ckLabel = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-ef74ea02"]]);
12483
- var ckInput_vue_vue_type_style_index_0_scoped_true_lang = "";
12484
- const _hoisted_1$d = { class: "ck-input" };
12485
- const _hoisted_2$7 = ["type", "placeholder", "id", "disabled"];
12486
- 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({
12487
12740
  props: {
12488
- modelValue: {},
12489
- type: { type: String, validator: validators.inputType, default: "text" },
12490
- disabled: { type: Boolean, default: false },
12491
- placeholder: { type: String, default: void 0 },
12741
+ modelValue: { type: Boolean, default: false },
12492
12742
  label: { type: String, default: void 0 },
12493
- labelAlign: { type: String, validator: validators.align, default: void 0 },
12494
- icon: { type: [String, Array], default: void 0 },
12495
- iconPack: { type: String, default: void 0 },
12496
- iconRight: { type: String, default: void 0 },
12497
- group: { type: String, default: void 0 },
12498
- groupBreak: { type: String, default: "s" },
12499
- groupVertical: { type: String, default: void 0 },
12500
- hideBorder: { type: Boolean, default: false },
12501
- width: { type: String, default: void 0 },
12502
- align: { type: String, validator: validators.align, default: void 0 },
12503
- autoSelect: { type: Boolean, default: false }
12743
+ disabled: { type: Boolean, default: false }
12504
12744
  },
12505
- emits: ["update:modelValue", "click", "input", "change"],
12745
+ emits: ["update:modelValue", "change"],
12506
12746
  setup(__props, { emit: emits }) {
12507
12747
  const props = __props;
12508
- const value = computed$2({
12748
+ const value = computed({
12509
12749
  get() {
12510
12750
  return props.modelValue;
12511
12751
  },
@@ -12513,88 +12753,54 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
12513
12753
  emits("update:modelValue", val);
12514
12754
  }
12515
12755
  });
12516
- const onClick = (event) => {
12517
- if (props.autoSelect)
12518
- event.target.select();
12519
- emits("click", event);
12520
- };
12521
- const onInput = (event) => {
12522
- emits("input", event);
12523
- };
12524
- const onChange = (event) => {
12525
- emits("change", event);
12526
- };
12527
- const computedStyleInput = computed$2(() => {
12528
- const list = [];
12529
- if (props.width)
12530
- list.push({ width: props.width });
12531
- return list;
12532
- });
12533
- const computedClassInput = computed$2(() => {
12534
- const list = [];
12535
- list.push(functions$1.getGroupClass(props));
12536
- if (props.icon)
12537
- list.push("has-icon-left");
12538
- if (props.iconRight)
12539
- list.push("has-icon-right");
12540
- if (props.align)
12541
- list.push(`align--${props.align}`);
12542
- if (props.hideBorder)
12543
- list.push("no-border");
12544
- return list;
12756
+ const checkboxAttributes = computed(() => {
12757
+ return {
12758
+ "aria-disabled": props.disabled,
12759
+ tabindex: props.disabled ? void 0 : "0"
12760
+ };
12545
12761
  });
12762
+ function onChange(event) {
12763
+ emits("change", event);
12764
+ }
12765
+ function onTrigger2() {
12766
+ value.value = !value.value;
12767
+ }
12546
12768
  return (_ctx, _cache) => {
12547
- return openBlock(), createElementBlock("div", _hoisted_1$d, [
12548
- __props.label ? (openBlock(), createBlock(ckLabel, {
12549
- key: 0,
12550
- align: __props.labelAlign,
12551
- for: "ck-input"
12552
- }, {
12553
- default: withCtx(() => [
12554
- createTextVNode(toDisplayString(__props.label), 1)
12555
- ]),
12556
- _: 1
12557
- }, 8, ["align"])) : createCommentVNode("", true),
12558
- __props.icon ? (openBlock(), createBlock(ckIcon, {
12559
- key: 1,
12560
- class: "ck-input__icon-left",
12561
- color: "lightgrey",
12562
- icon: __props.icon,
12563
- "icon-pack": __props.iconPack
12564
- }, null, 8, ["icon", "icon-pack"])) : createCommentVNode("", true),
12565
- withDirectives(createElementVNode("input", {
12566
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(value) ? value.value = $event : null),
12567
- type: __props.type,
12568
- placeholder: __props.placeholder,
12569
- class: normalizeClass(unref$1(computedClassInput)),
12570
- style: normalizeStyle(unref$1(computedStyleInput)),
12571
- id: __props.label ? "ck-input" : "",
12572
- disabled: __props.disabled,
12573
- onChange: _cache[1] || (_cache[1] = ($event) => onChange($event)),
12574
- onInput: _cache[2] || (_cache[2] = ($event) => onInput($event)),
12575
- onClick: _cache[3] || (_cache[3] = ($event) => onClick($event))
12576
- }, null, 46, _hoisted_2$7), [
12577
- [vModelDynamic, unref$1(value)]
12578
- ]),
12579
- __props.iconRight ? (openBlock(), createBlock(ckIcon, {
12580
- key: 2,
12581
- class: "ck-input__icon-right",
12582
- color: "lightgrey",
12583
- icon: __props.iconRight,
12584
- "icon-pack": __props.iconPack
12585
- }, null, 8, ["icon", "icon-pack"])) : createCommentVNode("", true)
12586
- ]);
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);
12587
12793
  };
12588
12794
  }
12589
12795
  });
12590
- var ckInput = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-5db08b1e"]]);
12796
+ var ckCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-132565da"]]);
12591
12797
  var ckPopup_vue_vue_type_style_index_0_lang = "";
12592
- const _hoisted_1$c = {
12798
+ const _hoisted_1$a = {
12593
12799
  key: 0,
12594
12800
  class: "ck-popup"
12595
12801
  };
12596
- const _hoisted_2$6 = /* @__PURE__ */ createElementVNode("div", { class: "blackout" }, null, -1);
12597
- 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" };
12598
12804
  const _hoisted_4$3 = {
12599
12805
  key: 0,
12600
12806
  class: "ck-popup__title"
@@ -12610,7 +12816,7 @@ const _hoisted_7 = {
12610
12816
  };
12611
12817
  const _hoisted_8 = /* @__PURE__ */ createTextVNode("Cancelar");
12612
12818
  const _hoisted_9 = /* @__PURE__ */ createTextVNode("Aceptar");
12613
- const _sfc_main$e = /* @__PURE__ */ defineComponent({
12819
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
12614
12820
  props: {
12615
12821
  modelValue: { type: Boolean },
12616
12822
  title: { type: String, default: void 0 },
@@ -12644,8 +12850,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
12644
12850
  isActive.value = false;
12645
12851
  }
12646
12852
  return (_ctx, _cache) => {
12647
- return unref$1(isActive) ? (openBlock(), createElementBlock("div", _hoisted_1$c, [
12648
- _hoisted_2$6,
12853
+ return unref$1(isActive) ? (openBlock(), createElementBlock("div", _hoisted_1$a, [
12854
+ _hoisted_2$5,
12649
12855
  createElementVNode("div", {
12650
12856
  class: "popup-container",
12651
12857
  onClick: _cache[4] || (_cache[4] = ($event) => onBgClick())
@@ -12655,12 +12861,12 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
12655
12861
  onClick: _cache[3] || (_cache[3] = withModifiers(() => {
12656
12862
  }, ["stop"]))
12657
12863
  }, [
12658
- createElementVNode("div", _hoisted_3$4, [
12864
+ createElementVNode("div", _hoisted_3$3, [
12659
12865
  __props.title ? (openBlock(), createElementBlock("h3", _hoisted_4$3, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
12660
- renderSlot(_ctx.$slots, "header", { class: "ml-3" }),
12866
+ renderSlot(_ctx.$slots, "header"),
12661
12867
  !__props.notCloseBtn ? (openBlock(), createBlock(ckIcon, {
12662
12868
  key: 1,
12663
- class: "mr-3 close",
12869
+ class: "close",
12664
12870
  icon: "times",
12665
12871
  onClick: _cache[0] || (_cache[0] = ($event) => isActive.value = false)
12666
12872
  })) : createCommentVNode("", true)
@@ -12698,26 +12904,20 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
12698
12904
  };
12699
12905
  }
12700
12906
  });
12701
- var ckRadio_vue_vue_type_style_index_0_scoped_true_lang = "";
12702
- const _withScopeId$1 = (n) => (pushScopeId("data-v-a5198d80"), n = n(), popScopeId(), n);
12703
- const _hoisted_1$b = ["onKeyup"];
12704
- const _hoisted_2$5 = ["name", "value", "disabled"];
12705
- const _hoisted_3$3 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", { class: "c-Radio__element" }, null, -1));
12706
- const _hoisted_4$2 = {
12707
- key: 0,
12708
- class: "c-Radio__label"
12709
- };
12710
- 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({
12711
12911
  props: {
12712
- modelValue: { type: String, default: void 0 },
12713
- name: { type: String, required: true },
12714
- options: { type: Array, required: true, validator: validators.radioOptions },
12715
- disabled: { type: Boolean, default: false }
12912
+ modelValue: { type: Boolean, required: true },
12913
+ columns: { type: Object, required: true },
12914
+ columnsArray: { type: Array, required: true }
12716
12915
  },
12717
- emits: ["update:modelValue", "change"],
12916
+ emits: ["update:modelValue"],
12718
12917
  setup(__props, { emit: emits }) {
12719
12918
  const props = __props;
12720
- const value = computed$2({
12919
+ let columnsCheckable = ref([]);
12920
+ const isActive = computed$2({
12721
12921
  get() {
12722
12922
  return props.modelValue;
12723
12923
  },
@@ -12725,48 +12925,58 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
12725
12925
  emits("update:modelValue", val);
12726
12926
  }
12727
12927
  });
12728
- const radioAttributes = computed$2(() => {
12729
- return {
12730
- "aria-disabled": props.disabled,
12731
- tabindex: props.disabled ? void 0 : "0"
12732
- };
12928
+ watch(() => isActive.value, (val) => {
12929
+ if (!val)
12930
+ return;
12931
+ setColumnsCheckable();
12733
12932
  });
12734
- function handleChange(value2) {
12735
- value2.value = value2;
12736
- 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;
12737
12949
  }
12738
12950
  return (_ctx, _cache) => {
12739
- return openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (item, index) => {
12740
- return openBlock(), createElementBlock("label", mergeProps({
12741
- key: `radio-${index}`,
12742
- class: "c-Radio"
12743
- }, unref$1(radioAttributes), {
12744
- onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(() => {
12745
- }, ["prevent"]), ["space"])),
12746
- onKeyup: [
12747
- withKeys(($event) => handleChange(item.value), ["enter"]),
12748
- withKeys(($event) => handleChange(item.value), ["space"])
12749
- ]
12750
- }), [
12751
- withDirectives(createElementVNode("input", {
12752
- class: "c-Radio__input",
12753
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(value) ? value.value = $event : null),
12754
- "aria-hidden": "true",
12755
- type: "radio",
12756
- name: __props.name,
12757
- value: item.value,
12758
- disabled: __props.disabled
12759
- }, null, 8, _hoisted_2$5), [
12760
- [vModelRadio, unref$1(value)]
12761
- ]),
12762
- _hoisted_3$3,
12763
- item.label ? (openBlock(), createElementBlock("span", _hoisted_4$2, toDisplayString(item.label), 1)) : createCommentVNode("", true)
12764
- ], 16, _hoisted_1$b);
12765
- }), 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"]);
12766
12976
  };
12767
12977
  }
12768
12978
  });
12769
- 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"]]);
12770
12980
  var qmApi = {};
12771
12981
  var qmArray = {
12772
12982
  arrayToText(arr, key = null) {
@@ -12986,963 +13196,835 @@ function setKeyValue(obj, key, value) {
12986
13196
  }
12987
13197
  var qmObj = {
12988
13198
  addEmptyOptionToList(optionsList, { prop = "name", title = "Todos", noneId = 0 } = {}) {
12989
- const noneOption = {
12990
- id: noneId,
12991
- [prop]: title
12992
- };
12993
- const newList = [...optionsList];
12994
- newList.unshift(noneOption);
12995
- return newList;
12996
- },
12997
- copyAvaibleFields(ObjEditable, ObjToCopy) {
12998
- for (const key in ObjEditable) {
12999
- if (typeof getKeyValue(ObjToCopy, key) !== "undefined") {
13000
- setKeyValue(ObjEditable, key, getKeyValue(ObjToCopy, key));
13001
- }
13002
- }
13003
- },
13004
- isArray(obj) {
13005
- return obj.constructor === Array;
13006
- },
13007
- objsAreTheSame(obj1, obj2) {
13008
- for (const key in obj1) {
13009
- if (getKeyValue(obj1, key) != getKeyValue(obj2, key))
13010
- return false;
13011
- }
13012
- for (const key in obj2) {
13013
- if (getKeyValue(obj1, key) != getKeyValue(obj2, key))
13014
- return false;
13015
- }
13016
- return true;
13017
- },
13018
- qoIsObjEmpty(obj = {}) {
13019
- return obj && Object.keys(obj).length === 0 && Object.getPrototypeOf(obj) === Object.prototype;
13020
- }
13021
- };
13022
- var main$1 = {
13023
- qmApi,
13024
- qmArray,
13025
- qmAudio,
13026
- qmNum,
13027
- qmObj,
13028
- qmStr
13029
- };
13030
- var App;
13031
- (function(App2) {
13032
- class SomeClass {
13033
- getName() {
13034
- return "name";
13035
- }
13036
- }
13037
- App2.SomeClass = SomeClass;
13038
- class OtherClass {
13039
- getName() {
13040
- return "name";
13041
- }
13042
- }
13043
- App2.OtherClass = OtherClass;
13044
- })(App || (App = {}));
13045
- var ckSelect_vue_vue_type_style_index_0_scoped_true_lang = "";
13046
- const _hoisted_1$a = ["value"];
13047
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
13048
- props: {
13049
- modelValue: { default: null, type: [Boolean, Number, Object, Array, String] },
13050
- prop: { type: String, default: "name" },
13051
- autofocus: { type: Boolean, default: false },
13052
- noDataText: { type: String, default: "No se encontr\xF3 nada" },
13053
- notReduce: { type: Boolean, default: false },
13054
- options: { type: Array, default: () => [] },
13055
- reduceFunction: { type: Function, default: (Option) => Option.id },
13056
- notClearable: { type: Boolean, default: false },
13057
- clearValue: { type: [Boolean, String], default: "auto" },
13058
- searchable: { type: [Boolean, String], default: "auto" },
13059
- minWidth: { type: String, default: "180px" },
13060
- noBorder: { type: Boolean, default: false },
13061
- bgTransparent: { type: Boolean, default: false },
13062
- disabled: { type: [Boolean, Number], default: false },
13063
- group: { type: String, default: "" },
13064
- groupBreak: { type: String, default: "" },
13065
- groupVertical: { type: String, default: "" },
13066
- label: { type: String, default: "" },
13067
- labelAlign: { type: String, default: "" }
13068
- },
13069
- emits: ["update:modelValue", "click", "change"],
13070
- setup(__props, { emit: emits }) {
13071
- const props = __props;
13072
- const { qmStr: qmStr2 } = main$1;
13073
- const search = ref("");
13074
- ref(null);
13075
- const value = computed$2({
13076
- get() {
13077
- return props.modelValue;
13078
- },
13079
- set(val) {
13080
- if (val === null)
13081
- val = realClearValue;
13082
- emits("update:modelValue", val);
13083
- }
13084
- });
13085
- const filteredOptions = computed$2(() => {
13086
- const list = props.options.filter((option) => {
13087
- const name = getOptionName(option);
13088
- return qmStr2.checkContainsStr(name, search.value);
13089
- });
13090
- return list;
13091
- });
13092
- const computedClass = computed$2(() => {
13093
- const classList2 = [];
13094
- classList2.push(functions$1.getGroupClass(props));
13095
- return classList2;
13096
- });
13097
- const computedStyle = computed$2(() => {
13098
- const list = [];
13099
- if (props.minWidth)
13100
- list.push({ "min-width": props.minWidth });
13101
- return list;
13102
- });
13103
- computed$2(() => {
13104
- if (props.searchable === "auto") {
13105
- if (props.options.length < 5)
13106
- return false;
13107
- return true;
13108
- }
13109
- return props.searchable;
13110
- });
13111
- const realClearValue = computed$2(() => {
13112
- switch (typeof props.modelValue) {
13113
- case "number":
13114
- return 0;
13115
- case "string":
13116
- return "";
13117
- case "object":
13118
- if (props.modelValue.constructor === Array)
13119
- return [];
13120
- return {};
13121
- default:
13122
- return null;
13123
- }
13124
- });
13125
- computed$2(() => {
13126
- switch (typeof props.modelValue) {
13127
- case "number":
13128
- return props.modelValue === 0;
13129
- case "string":
13130
- return props.modelValue === "";
13131
- case "object":
13132
- if (!props.modelValue)
13133
- return null;
13134
- if (props.modelValue.constructor === Array) {
13135
- return props.modelValue.length() === 0;
13136
- }
13137
- return Object.keys(props.modelValue).length === 0;
13138
- default:
13139
- return props.modelValue === null;
13199
+ const noneOption = {
13200
+ id: noneId,
13201
+ [prop]: title
13202
+ };
13203
+ const newList = [...optionsList];
13204
+ newList.unshift(noneOption);
13205
+ return newList;
13206
+ },
13207
+ copyAvaibleFields(ObjEditable, ObjToCopy) {
13208
+ for (const key in ObjEditable) {
13209
+ if (typeof getKeyValue(ObjToCopy, key) !== "undefined") {
13210
+ setKeyValue(ObjEditable, key, getKeyValue(ObjToCopy, key));
13140
13211
  }
13141
- });
13142
- function onClick(event) {
13143
- emits("click", event);
13144
13212
  }
13145
- const onChange = (event) => {
13146
- emits("change", event);
13147
- };
13148
- const getOptionKey = (option) => {
13149
- return realReduceFunction(option);
13150
- };
13151
- const getOptionName = (option) => {
13152
- if (!props.prop)
13153
- return option;
13154
- return option[props.prop];
13155
- };
13156
- const realReduceFunction = (option) => {
13157
- if (props.notReduce)
13158
- return option;
13159
- return props.reduceFunction(option);
13160
- };
13161
- return (_ctx, _cache) => {
13162
- return openBlock(), createElementBlock("div", {
13163
- class: "ck-select",
13164
- style: normalizeStyle(unref$1(computedStyle))
13165
- }, [
13166
- __props.label ? (openBlock(), createBlock(ckLabel, {
13167
- key: 0,
13168
- align: __props.labelAlign,
13169
- for: "ck-input"
13170
- }, {
13171
- default: withCtx(() => [
13172
- createTextVNode(toDisplayString(__props.label), 1)
13173
- ]),
13174
- _: 1
13175
- }, 8, ["align"])) : createCommentVNode("", true),
13176
- withDirectives(createElementVNode("select", {
13177
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(value) ? value.value = $event : null),
13178
- class: normalizeClass(unref$1(computedClass)),
13179
- onClick: _cache[1] || (_cache[1] = ($event) => onClick($event)),
13180
- onChange: _cache[2] || (_cache[2] = ($event) => onChange($event))
13181
- }, [
13182
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref$1(filteredOptions), (option) => {
13183
- return openBlock(), createElementBlock("option", {
13184
- value: getOptionKey(option),
13185
- key: option
13186
- }, toDisplayString(getOptionName(option)), 9, _hoisted_1$a);
13187
- }), 128))
13188
- ], 34), [
13189
- [vModelSelect, unref$1(value)]
13190
- ])
13191
- ], 4);
13192
- };
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;
13193
13230
  }
13194
- });
13195
- var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-31af160a"]]);
13196
- var ckSwitch_vue_vue_type_style_index_0_scoped_true_lang = "";
13197
- const _withScopeId = (n) => (pushScopeId("data-v-b6a4dfaa"), n = n(), popScopeId(), n);
13198
- const _hoisted_1$9 = ["disabled"];
13199
- const _hoisted_2$4 = { class: "ck-switch__slider-container" };
13200
- const _hoisted_3$2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "ck-switch__slider" }, null, -1));
13201
- 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 = {
13202
13258
  key: 0,
13203
- class: "ck-switch__content"
13259
+ class: "ck-table__header"
13204
13260
  };
13205
- 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({
13206
13269
  props: {
13207
- modelValue: { type: [Boolean, Number], default: false },
13208
- disabled: { type: Boolean, default: false },
13209
- outlined: { type: Boolean, default: false },
13210
- squared: { type: Boolean, default: false },
13211
- size: { type: String, default: "m" },
13212
- icon: { type: String, default: void 0 },
13213
- 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 }
13214
13281
  },
13215
- emits: ["update:modelValue"],
13282
+ emits: ["refreshList", "update:search", "update:currentPage"],
13216
13283
  setup(__props, { emit: emits }) {
13217
13284
  const props = __props;
13218
- const value = computed$2({
13219
- get() {
13220
- return props.modelValue;
13221
- },
13222
- set(val) {
13223
- emits("update:modelValue", val);
13224
- }
13225
- });
13226
- const computedClass = computed$2(() => {
13227
- const list = [];
13228
- if (props.squared)
13229
- list.push("is-squared");
13230
- if (props.outlined)
13231
- list.push("is-outlined");
13232
- let size = "s";
13233
- if (props.size === "m" || props.size === "l")
13234
- size = props.size;
13235
- list.push(`ck-switch--size-${size}`);
13236
- return list;
13285
+ const { qmObj: qmObj2 } = main$1;
13286
+ const IsPopupActive = ref({
13287
+ columnsManager: false
13237
13288
  });
13238
- const computedAttributes = computed$2(() => {
13239
- return {
13240
- "aria-disabled": props.disabled,
13241
- tabindex: props.disabled ? void 0 : "0"
13242
- };
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;
13243
13300
  });
13244
- const iconClass = computed$2(() => {
13245
- const list = [];
13246
- if (props.size && props.size !== "m") {
13247
- list.push(`ck-switch__icon-size--${props.size}`);
13248
- }
13249
- return list;
13301
+ const filteredColumnsList = computed$2(() => {
13302
+ return columnsArray.value.filter(functions.isColumnDisplayed);
13250
13303
  });
13251
- function onTrigger2() {
13252
- value.value = !value.value;
13253
- }
13254
- return (_ctx, _cache) => {
13255
- return openBlock(), createElementBlock("label", mergeProps({ class: "ck-switch" }, unref$1(computedAttributes), {
13256
- class: unref$1(computedClass),
13257
- onKeydown: _cache[2] || (_cache[2] = withKeys(withModifiers(() => {
13258
- }, ["prevent"]), ["space"])),
13259
- onKeyup: [
13260
- _cache[3] || (_cache[3] = withKeys(($event) => onTrigger2(), ["enter"])),
13261
- _cache[4] || (_cache[4] = withKeys(($event) => onTrigger2(), ["space"]))
13262
- ]
13263
- }), [
13264
- withDirectives(createElementVNode("input", {
13265
- class: "ck-switch__input",
13266
- "aria-hidden": "true",
13267
- type: "checkbox",
13268
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(value) ? value.value = $event : null),
13269
- disabled: __props.disabled,
13270
- onClick: _cache[1] || (_cache[1] = ($event) => onTrigger2())
13271
- }, null, 8, _hoisted_1$9), [
13272
- [vModelCheckbox, unref$1(value)]
13273
- ]),
13274
- createElementVNode("div", _hoisted_2$4, [
13275
- _hoisted_3$2,
13276
- __props.icon && unref$1(value) ? (openBlock(), createBlock(ckIcon, {
13277
- key: 0,
13278
- class: normalizeClass(["ck-switch__icon-left", unref$1(iconClass)]),
13279
- icon: __props.icon,
13280
- "icon-pack": __props.iconPack
13281
- }, null, 8, ["icon", "icon-pack", "class"])) : createCommentVNode("", true),
13282
- __props.icon && !unref$1(value) ? (openBlock(), createBlock(ckIcon, {
13283
- key: 1,
13284
- class: normalizeClass(["ck-switch__icon-right", unref$1(iconClass)]),
13285
- icon: __props.icon,
13286
- "icon-pack": __props.iconPack
13287
- }, null, 8, ["icon", "icon-pack", "class"])) : createCommentVNode("", true)
13288
- ]),
13289
- _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_4$1, [
13290
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
13291
- ])) : createCommentVNode("", true)
13292
- ], 16);
13293
- };
13294
- }
13295
- });
13296
- var ckSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-b6a4dfaa"]]);
13297
- var ckSwitchOptions_vue_vue_type_style_index_0_scoped_true_lang = "";
13298
- const _hoisted_1$8 = { class: "ck-switch-options__container-exterior" };
13299
- const _hoisted_2$3 = ["onClick"];
13300
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
13301
- props: {
13302
- modelValue: { type: [Boolean, Number, Object], default: 0 },
13303
- options: { type: Array, required: true },
13304
- prop: { type: String, default: "name" },
13305
- notReduce: { type: Boolean, default: false },
13306
- reduceFunction: { type: Function, default: (Option) => Option.id },
13307
- label: { type: String, default: "" },
13308
- labelAlign: { type: String, default: "" },
13309
- group: { type: String, default: "" },
13310
- groupBreak: { type: String, default: "s" },
13311
- groupVertical: { type: String, default: "" },
13312
- sameWidthOptions: { type: Boolean, default: false }
13313
- },
13314
- emits: ["update:modelValue", "change"],
13315
- setup(__props, { emit: emits }) {
13316
- const props = __props;
13317
- const selectedOption = computed$2({
13304
+ const searchLocal = computed$2({
13318
13305
  get() {
13319
- return props.modelValue;
13306
+ return props.search;
13320
13307
  },
13321
13308
  set(val) {
13322
- emits("update:modelValue", val);
13323
- emits("change", val);
13309
+ emits("update:search", val);
13324
13310
  }
13325
13311
  });
13326
- const computedClass = computed$2(() => {
13327
- const classList2 = [];
13328
- classList2.push(functions$1.getGroupClass(props));
13329
- return classList2;
13330
- });
13331
- const computedItemStyle = computed$2(() => {
13332
- const list = [];
13333
- if (props.sameWidthOptions)
13334
- list.push({ width: `${100 / props.options.length}%` });
13335
- return list;
13312
+ const currentPageLocal = computed$2({
13313
+ get() {
13314
+ return props.currentPage;
13315
+ },
13316
+ set(val) {
13317
+ emits("update:currentPage", val);
13318
+ }
13336
13319
  });
13337
- function getOptionValue(Option) {
13338
- if (props.notReduce)
13339
- return Option;
13340
- 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
+ }
13341
13329
  }
13342
13330
  return (_ctx, _cache) => {
13343
- return openBlock(), createElementBlock("div", _hoisted_1$8, [
13344
- __props.label ? (openBlock(), createBlock(ckLabel, {
13331
+ return openBlock(), createElementBlock(Fragment, null, [
13332
+ __props.hasColumnsManager && unref$1(columnsAreObj) ? (openBlock(), createBlock(TableColumnsManager, {
13345
13333
  key: 0,
13346
- align: __props.labelAlign
13347
- }, {
13348
- default: withCtx(() => [
13349
- 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)
13350
13382
  ]),
13351
- _: 1
13352
- }, 8, ["align"])) : createCommentVNode("", true),
13353
- createElementVNode("div", {
13354
- class: normalizeClass(["ck-switch-options__container", unref$1(computedClass)])
13355
- }, [
13356
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (Option, index) => {
13357
- return openBlock(), createElementBlock("div", {
13358
- class: normalizeClass(["ck-switch-options__option", { selected: unref$1(selectedOption) == getOptionValue(Option) }]),
13359
- key: `ck-switch-options${index}`,
13360
- style: normalizeStyle(unref$1(computedItemStyle)),
13361
- onClick: ($event) => selectedOption.value = getOptionValue(Option)
13362
- }, toDisplayString(Option[__props.prop]), 15, _hoisted_2$3);
13363
- }), 128))
13364
- ], 2)
13365
- ]);
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);
13366
13394
  };
13367
13395
  }
13368
13396
  });
13369
- var ckSwitchOptions = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-2c3e07c8"]]);
13370
- const _hoisted_1$7 = { class: "ck-tr" };
13371
- function render$1(_ctx, _cache) {
13372
- return openBlock(), createElementBlock("tr", _hoisted_1$7, [
13373
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
13374
- ]);
13375
- }
13376
- var ckTr_vue_vue_type_style_index_0_scoped_true_lang = "";
13377
- const _sfc_main$9 = {};
13378
- var ckTr = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", render$1], ["__scopeId", "data-v-1dd12190"]]);
13379
- var ckTh_vue_vue_type_style_index_0_scoped_true_lang = "";
13380
- 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 = "";
13381
13399
  const _sfc_main$8 = /* @__PURE__ */ defineComponent({
13382
13400
  props: {
13383
- align: { type: String, default: "center", validator: validators.align },
13384
- 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: "" }
13385
13411
  },
13386
13412
  setup(__props) {
13387
13413
  const props = __props;
13388
- const computedSpanClass = computed$2(() => {
13414
+ const computedTdClass = computed$2(() => {
13389
13415
  return {
13390
- "align-center": props.align !== "left" && props.align !== "right",
13391
- "align-left": props.align === "left",
13392
- "align-right": props.align === "right"
13416
+ "auto-width": props.autoWidth,
13417
+ "overflow-auto": props.overflowAuto
13393
13418
  };
13394
13419
  });
13395
- const computedStyle = computed$2(() => {
13420
+ const computedSpanClass = computed$2(() => {
13396
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 = {};
13397
13441
  if (props.minWidth)
13398
- 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;
13399
13451
  return list;
13400
13452
  });
13453
+ const isColumnDisplayed = computed$2(() => {
13454
+ if (!props.col)
13455
+ return true;
13456
+ return functions.isColumnDisplayed(props.col);
13457
+ });
13401
13458
  return (_ctx, _cache) => {
13402
- 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
+ }, [
13403
13463
  createElementVNode("span", {
13404
13464
  class: normalizeClass(unref$1(computedSpanClass)),
13405
13465
  style: normalizeStyle(unref$1(computedStyle))
13406
13466
  }, [
13407
13467
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
13408
13468
  ], 6)
13409
- ]);
13469
+ ], 2)) : createCommentVNode("", true);
13410
13470
  };
13411
13471
  }
13412
13472
  });
13413
- 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"];
13414
13476
  const _sfc_main$7 = /* @__PURE__ */ defineComponent({
13415
13477
  props: {
13416
- 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 }
13417
13483
  },
13418
- 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
+ });
13419
13499
  return (_ctx, _cache) => {
13420
- return openBlock(), createBlock(ckTh, {
13421
- align: __props.col.align,
13422
- "min-width": __props.col.minWidth
13423
- }, {
13424
- default: withCtx(() => [
13425
- createTextVNode(toDisplayString(__props.col.title), 1)
13426
- ]),
13427
- _: 1
13428
- }, 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);
13429
13513
  };
13430
13514
  }
13431
13515
  });
13432
- var ckTable__headerItems_vue_vue_type_style_index_0_scoped_true_lang = "";
13433
- 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"];
13434
13524
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
13435
13525
  props: {
13436
- search: { type: String, default: void 0 },
13437
- hasColumnsManager: { type: Boolean, default: false },
13438
- showRefreshBtn: { type: Boolean, required: true },
13439
- hideItemsPerPage: { type: Boolean, required: true },
13440
- currentPage: { type: Number, required: true },
13441
- itemsPerPage: { type: Number, required: true },
13442
- listLength: { type: Number, required: true }
13526
+ src: { type: String, default: "" },
13527
+ failImgSrc: { type: String, default: "" },
13528
+ alt: { type: String, default: "" },
13529
+ size: { type: String, default: "", validator: validators.size },
13530
+ sizeAbsolute: { type: String, default: "" },
13531
+ width: { type: String, default: "" },
13532
+ height: { type: String, default: "" },
13533
+ zoom: { type: Boolean, default: false },
13534
+ zoomTitle: { type: String, default: "" },
13535
+ hasBorder: { type: Boolean, default: false },
13536
+ radius: { type: String, default: "" },
13537
+ borderColor: { type: String, default: "" },
13538
+ rounded: { type: Boolean, default: false }
13443
13539
  },
13444
- emits: ["update:search", "refreshList", "openColumnsManager"],
13445
- setup(__props, { emit: emits }) {
13540
+ setup(__props) {
13446
13541
  const props = __props;
13447
- const searchLocal = computed$2({
13448
- get() {
13449
- return props.search;
13450
- },
13451
- set(val) {
13452
- emits("update:search", val);
13542
+ const altNeeded = ref(false);
13543
+ let isMounted = ref(false);
13544
+ const isFullPath = computed$2(() => {
13545
+ return props.src.substring(0, 4) === "http";
13546
+ });
13547
+ const imageUrl = computed$2(() => {
13548
+ if (!isMounted.value)
13549
+ return "";
13550
+ if (isFullPath.value)
13551
+ return props.src;
13552
+ return getImg(props.src);
13553
+ });
13554
+ const computedClass = computed$2(() => {
13555
+ const classList2 = [];
13556
+ if (props.size)
13557
+ classList2.push(`ck-img__size--${props.size}`);
13558
+ if (props.rounded)
13559
+ classList2.push("is-rounded");
13560
+ if (props.hasBorder) {
13561
+ classList2.push("ck-img__has-border");
13562
+ if (functions.isColorTemplateVariable(realBorderColor.value)) {
13563
+ classList2.push(`ck-component__border-color--${realBorderColor.value}`);
13564
+ }
13453
13565
  }
13566
+ if (props.zoom)
13567
+ classList2.push("zoom-able");
13568
+ return classList2;
13454
13569
  });
13455
- const hideSearch = computed$2(() => {
13456
- return typeof searchLocal.value === "undefined";
13457
- });
13458
- const itemsPerPageStart = computed$2(() => {
13459
- return (props.currentPage - 1) * props.itemsPerPage + 1;
13460
- });
13461
- const itemsPerPageEnd = computed$2(() => {
13462
- const value = props.currentPage * props.itemsPerPage;
13463
- if (value > props.listLength)
13464
- return props.listLength;
13465
- return value;
13570
+ const computedStyle = computed$2(() => {
13571
+ const styleList = [];
13572
+ if (props.sizeAbsolute) {
13573
+ styleList.push({ width: props.sizeAbsolute });
13574
+ styleList.push({ height: props.sizeAbsolute });
13575
+ }
13576
+ if (props.radius)
13577
+ styleList.push({ "border-radius": props.radius });
13578
+ if (props.hasBorder) {
13579
+ if (!functions.isColorTemplateVariable(realBorderColor.value)) {
13580
+ styleList.push({ "border-color": realBorderColor.value });
13581
+ }
13582
+ }
13583
+ return styleList;
13466
13584
  });
13467
- const itemsPerPageIsVisible = computed$2(() => {
13468
- return !props.hideItemsPerPage && props.listLength && props.currentPage;
13585
+ const computedImgStyle = computed$2(() => {
13586
+ const styleList = [];
13587
+ if (props.radius)
13588
+ styleList.push({ "border-radius": props.radius });
13589
+ if (props.width)
13590
+ styleList.push({ width: props.width });
13591
+ if (props.height)
13592
+ styleList.push({ height: props.height });
13593
+ return styleList;
13469
13594
  });
13470
- const refreshBtnIsVisible = computed$2(() => {
13471
- return itemsPerPageIsVisible.value || props.showRefreshBtn;
13595
+ const realBorderColor = computed$2(() => {
13596
+ if (props.borderColor)
13597
+ return props.borderColor;
13598
+ return globalVariables.defaultImgBorderColor;
13472
13599
  });
13473
- const searchGroupValue = computed$2(() => {
13474
- if (itemsPerPageIsVisible.value && props.hasColumnsManager) {
13475
- return "center";
13600
+ function clickImg() {
13601
+ if (props.zoom)
13602
+ ;
13603
+ }
13604
+ function getImg(src) {
13605
+ let path = "";
13606
+ const $cleekOptions = functions.getCleekOptions(getCurrentInstance);
13607
+ if ($cleekOptions) {
13608
+ if ($cleekOptions.imgPath)
13609
+ path = $cleekOptions.imgPath;
13476
13610
  }
13477
- if (itemsPerPageIsVisible.value)
13478
- return "right";
13479
- if (props.hasColumnsManager)
13480
- return "left";
13481
- return "";
13482
- });
13483
- function checkRefresh() {
13484
- const search = searchLocal.value;
13485
- setTimeout(() => {
13486
- if (search !== searchLocal.value)
13487
- return;
13488
- emits("refreshList", false);
13489
- }, 1e3);
13611
+ return `${path}${src}`;
13490
13612
  }
13613
+ onMounted(() => {
13614
+ getCurrentInstance().ctx;
13615
+ isMounted.value = true;
13616
+ });
13491
13617
  return (_ctx, _cache) => {
13492
- return openBlock(), createElementBlock("div", _hoisted_1$5, [
13493
- unref$1(refreshBtnIsVisible) ? (openBlock(), createBlock(ckButton, {
13494
- key: 0,
13495
- type: "flat",
13496
- icon: "redo-alt",
13497
- title: "Recargar lista",
13498
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("refreshList", false))
13499
- })) : createCommentVNode("", true),
13500
- unref$1(itemsPerPageIsVisible) ? (openBlock(), createElementBlock("div", {
13501
- key: 1,
13502
- class: normalizeClass(["items-per-page", { "ck-component__group--left": !unref$1(hideSearch) }])
13503
- }, toDisplayString(unref$1(itemsPerPageStart)) + " - " + toDisplayString(unref$1(itemsPerPageEnd)) + " de " + toDisplayString(__props.listLength), 3)) : createCommentVNode("", true),
13504
- !unref$1(hideSearch) ? (openBlock(), createBlock(ckInput, {
13505
- key: 2,
13506
- modelValue: unref$1(searchLocal),
13507
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef$1(searchLocal) ? searchLocal.value = $event : null),
13508
- icon: "search",
13509
- placeholder: "Buscar...",
13510
- group: unref$1(searchGroupValue),
13511
- onInput: _cache[2] || (_cache[2] = ($event) => checkRefresh())
13512
- }, null, 8, ["modelValue", "group"])) : createCommentVNode("", true),
13513
- __props.hasColumnsManager ? (openBlock(), createBlock(ckButton, {
13514
- key: 3,
13515
- icon: "columns",
13516
- type: "filled",
13517
- title: "Administrador de columnas",
13518
- group: unref$1(itemsPerPageIsVisible) || !unref$1(hideSearch) ? "right" : "",
13519
- onClick: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("openColumnsManager"))
13520
- }, null, 8, ["group"])) : createCommentVNode("", true)
13521
- ]);
13618
+ return openBlock(), createElementBlock("div", {
13619
+ class: normalizeClass(["ck-img", unref$1(computedClass)]),
13620
+ style: normalizeStyle(unref$1(computedStyle)),
13621
+ onClick: _cache[1] || (_cache[1] = ($event) => clickImg())
13622
+ }, [
13623
+ createElementVNode("img", {
13624
+ src: unref$1(imageUrl),
13625
+ style: normalizeStyle(unref$1(computedImgStyle)),
13626
+ alt: __props.alt,
13627
+ onError: _cache[0] || (_cache[0] = ($event) => altNeeded.value = true)
13628
+ }, null, 44, _hoisted_1$6)
13629
+ ], 6);
13522
13630
  };
13523
13631
  }
13524
13632
  });
13525
- var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-15c7bf13"]]);
13526
- var ckTable__pagination_vue_vue_type_style_index_0_scoped_true_lang = "";
13527
- const _hoisted_1$4 = { class: "ck-table__pagination" };
13528
- const _hoisted_2$2 = ["onClick"];
13529
- const _hoisted_3$1 = ["onClick"];
13530
- const itemsShowed = 5;
13531
- const __default__ = {
13532
- name: "CkTablePagination",
13633
+ var ckImg = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-65d88644"]]);
13634
+ var ckRadio_vue_vue_type_style_index_0_scoped_true_lang = "";
13635
+ const _withScopeId$1 = (n) => (pushScopeId("data-v-a5198d80"), n = n(), popScopeId(), n);
13636
+ const _hoisted_1$5 = ["onKeyup"];
13637
+ const _hoisted_2$2 = ["name", "value", "disabled"];
13638
+ const _hoisted_3$1 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", { class: "c-Radio__element" }, null, -1));
13639
+ const _hoisted_4$1 = {
13640
+ key: 0,
13641
+ class: "c-Radio__label"
13642
+ };
13643
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
13533
13644
  props: {
13534
- currentPage: { type: Number, required: true },
13535
- align: { type: String, required: true },
13536
- itemsPerPage: { type: Number, required: true },
13537
- listLength: { type: Number, required: true }
13645
+ modelValue: { type: String, default: void 0 },
13646
+ name: { type: String, required: true },
13647
+ options: { type: Array, required: true, validator: validators.radioOptions },
13648
+ disabled: { type: Boolean, default: false }
13538
13649
  },
13539
- emits: ["refreshList", "update:currentPage"],
13540
- computed: {
13541
- currentPageLocal2: {
13650
+ emits: ["update:modelValue", "change"],
13651
+ setup(__props, { emit: emits }) {
13652
+ const props = __props;
13653
+ const value = computed$2({
13542
13654
  get() {
13543
- return this.currentPage;
13655
+ return props.modelValue;
13544
13656
  },
13545
13657
  set(val) {
13546
- return;
13547
- }
13548
- },
13549
- hasArrowLeft() {
13550
- if (!this.listLeft.length)
13551
- return false;
13552
- return this.listLeft[0] !== 1;
13553
- },
13554
- totalPages() {
13555
- return Math.ceil(this.listLength / this.itemsPerPage);
13556
- },
13557
- hasArrowRight() {
13558
- if (!this.listRight.length)
13559
- return false;
13560
- return this.listRight[this.listRight.length - 1] !== this.totalPages;
13561
- },
13562
- listLeft() {
13563
- if (!this.listLength)
13564
- return [];
13565
- const list = [];
13566
- const listLength = (itemsShowed - 1) / 2;
13567
- for (const num of Array(listLength).keys()) {
13568
- const listItem = this.currentPage - num - 1;
13569
- if (listItem > 0)
13570
- list.unshift(listItem);
13571
- }
13572
- return list;
13573
- },
13574
- listRight() {
13575
- if (!this.listLength)
13576
- return [];
13577
- const list = [];
13578
- const listLength = (itemsShowed - 1) / 2;
13579
- for (const num of Array(listLength).keys()) {
13580
- const listItem = this.currentPage + num + 1;
13581
- if (listItem <= this.totalPages)
13582
- list.push(listItem);
13658
+ emits("update:modelValue", val);
13583
13659
  }
13584
- return list;
13585
- }
13586
- },
13587
- methods: {
13588
- updateCurrentPage(val) {
13589
- this.$emit("update:currentPage", val);
13590
- this.$emit("refreshList", val);
13591
- },
13592
- validateInputNumber(val) {
13593
- val = +val;
13594
- if (val > this.totalPages)
13595
- val = this.totalPages;
13596
- if (val < 1)
13597
- val = 1;
13598
- if (val === this.currentPage)
13599
- return;
13600
- this.updateCurrentPage(val);
13660
+ });
13661
+ const radioAttributes = computed$2(() => {
13662
+ return {
13663
+ "aria-disabled": props.disabled,
13664
+ tabindex: props.disabled ? void 0 : "0"
13665
+ };
13666
+ });
13667
+ function handleChange(value2) {
13668
+ value2.value = value2;
13669
+ emits("change", value2);
13601
13670
  }
13602
- }
13603
- };
13604
- const _sfc_main$5 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__), {
13605
- setup(__props) {
13606
13671
  return (_ctx, _cache) => {
13607
- return __props.currentPage && _ctx.totalPages > 1 ? (openBlock(), createElementBlock("div", {
13608
- key: 0,
13609
- class: normalizeClass(["ck-table__pagination-container", `pagination-align--${__props.align}`])
13610
- }, [
13611
- createElementVNode("div", _hoisted_1$4, [
13612
- _ctx.hasArrowLeft ? (openBlock(), createElementBlock("div", {
13613
- key: 0,
13614
- class: "ck-table__pagination--arrow-left",
13615
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.updateCurrentPage(__props.currentPage - 1))
13616
- }, [
13617
- createVNode(ckIcon, { icon: "arrow-left" })
13618
- ])) : createCommentVNode("", true),
13619
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.listLeft, (num) => {
13620
- return openBlock(), createElementBlock("div", {
13621
- class: "ck-table__pagination-item pagination-item__left",
13622
- onClick: ($event) => _ctx.updateCurrentPage(num)
13623
- }, toDisplayString(num), 9, _hoisted_2$2);
13624
- }), 256)),
13625
- createVNode(ckInput, {
13626
- class: "ck-table__pagination-input",
13627
- autoSelect: "",
13628
- type: "number",
13629
- width: "50px",
13630
- align: "center",
13631
- modelValue: _ctx.currentPageLocal2,
13632
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef$1(currentPageLocal2) ? currentPageLocal2.value = $event : null),
13633
- onChange: _cache[2] || (_cache[2] = ($event) => _ctx.validateInputNumber($event.target.value))
13634
- }, null, 8, ["modelValue"]),
13635
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.listRight, (num) => {
13636
- return openBlock(), createElementBlock("div", {
13637
- class: "ck-table__pagination-item pagination-item__right",
13638
- onClick: ($event) => _ctx.updateCurrentPage(num)
13639
- }, toDisplayString(num), 9, _hoisted_3$1);
13640
- }), 256)),
13641
- _ctx.hasArrowRight ? (openBlock(), createElementBlock("div", {
13642
- key: 1,
13643
- class: "ck-table__pagination--arrow-right",
13644
- onClick: _cache[3] || (_cache[3] = ($event) => _ctx.updateCurrentPage(__props.currentPage + 1))
13645
- }, [
13646
- createVNode(ckIcon, { icon: "arrow-right" })
13647
- ])) : createCommentVNode("", true)
13648
- ])
13649
- ], 2)) : createCommentVNode("", true);
13672
+ return openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (item, index) => {
13673
+ return openBlock(), createElementBlock("label", mergeProps({
13674
+ key: `radio-${index}`,
13675
+ class: "c-Radio"
13676
+ }, unref$1(radioAttributes), {
13677
+ onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(() => {
13678
+ }, ["prevent"]), ["space"])),
13679
+ onKeyup: [
13680
+ withKeys(($event) => handleChange(item.value), ["enter"]),
13681
+ withKeys(($event) => handleChange(item.value), ["space"])
13682
+ ]
13683
+ }), [
13684
+ withDirectives(createElementVNode("input", {
13685
+ class: "c-Radio__input",
13686
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(value) ? value.value = $event : null),
13687
+ "aria-hidden": "true",
13688
+ type: "radio",
13689
+ name: __props.name,
13690
+ value: item.value,
13691
+ disabled: __props.disabled
13692
+ }, null, 8, _hoisted_2$2), [
13693
+ [vModelRadio, unref$1(value)]
13694
+ ]),
13695
+ _hoisted_3$1,
13696
+ item.label ? (openBlock(), createElementBlock("span", _hoisted_4$1, toDisplayString(item.label), 1)) : createCommentVNode("", true)
13697
+ ], 16, _hoisted_1$5);
13698
+ }), 128);
13650
13699
  };
13651
13700
  }
13652
- }));
13653
- var TablePagination = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-4045b8e3"]]);
13654
- var ckTable__columnsManager_vue_vue_type_style_index_0_scoped_true_lang = "";
13655
- const _hoisted_1$3 = { class: "columns-manger-container" };
13656
- const _hoisted_2$1 = { class: "columns-manger__item" };
13701
+ });
13702
+ var ckRadio = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-a5198d80"]]);
13703
+ var ckSelect_vue_vue_type_style_index_0_scoped_true_lang = "";
13704
+ const _hoisted_1$4 = ["value"];
13657
13705
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
13658
13706
  props: {
13659
- modelValue: { type: Boolean, required: true },
13660
- columns: { type: Object, required: true },
13661
- columnsArray: { type: Array, required: true }
13707
+ modelValue: { default: null, type: [Boolean, Number, Object, Array, String] },
13708
+ prop: { type: String, default: "name" },
13709
+ autofocus: { type: Boolean, default: false },
13710
+ noDataText: { type: String, default: "No se encontr\xF3 nada" },
13711
+ notReduce: { type: Boolean, default: false },
13712
+ options: { type: Array, default: () => [] },
13713
+ reduceFunction: { type: Function, default: (Option) => Option.id },
13714
+ notClearable: { type: Boolean, default: false },
13715
+ clearValue: { type: [Boolean, String], default: "auto" },
13716
+ searchable: { type: [Boolean, String], default: "auto" },
13717
+ minWidth: { type: String, default: "180px" },
13718
+ noBorder: { type: Boolean, default: false },
13719
+ bgTransparent: { type: Boolean, default: false },
13720
+ disabled: { type: [Boolean, Number], default: false },
13721
+ group: { type: String, default: "" },
13722
+ groupBreak: { type: String, default: "" },
13723
+ groupVertical: { type: String, default: "" },
13724
+ label: { type: String, default: "" },
13725
+ labelAlign: { type: String, default: "" }
13662
13726
  },
13663
- emits: ["update:modelValue"],
13727
+ emits: ["update:modelValue", "click", "change"],
13664
13728
  setup(__props, { emit: emits }) {
13665
13729
  const props = __props;
13666
- let columnsCheckable = ref([]);
13667
- const isActive = computed$2({
13730
+ const { qmStr: qmStr2 } = main$1;
13731
+ const search = ref("");
13732
+ ref(null);
13733
+ const value = computed$2({
13668
13734
  get() {
13669
13735
  return props.modelValue;
13670
13736
  },
13671
13737
  set(val) {
13738
+ if (val === null)
13739
+ val = realClearValue;
13672
13740
  emits("update:modelValue", val);
13673
13741
  }
13674
13742
  });
13675
- watch(() => isActive.value, (val) => {
13676
- if (!val)
13677
- return;
13678
- setColumnsCheckable();
13743
+ const filteredOptions = computed$2(() => {
13744
+ const list = props.options.filter((option) => {
13745
+ const name = getOptionName(option);
13746
+ return qmStr2.checkContainsStr(name, search.value);
13747
+ });
13748
+ return list;
13679
13749
  });
13680
- function setColumnsCheckable() {
13681
- console.log("hoola");
13750
+ const computedClass = computed$2(() => {
13751
+ const classList2 = [];
13752
+ classList2.push(functions.getGroupClass(props));
13753
+ return classList2;
13754
+ });
13755
+ const computedStyle = computed$2(() => {
13682
13756
  const list = [];
13683
- props.columnsArray.forEach((col) => {
13684
- if (!col.unchangeable) {
13685
- list.push({
13686
- name: col.name,
13687
- title: col.title,
13688
- value: functions$1.isColumnDisplayed(col)
13689
- });
13690
- }
13691
- });
13692
- columnsCheckable.value = list;
13693
- }
13694
- function setColumnDisplayValue(colName, value) {
13695
- props.columns[colName].isDisplayed = value;
13757
+ if (props.minWidth)
13758
+ list.push({ "min-width": props.minWidth });
13759
+ return list;
13760
+ });
13761
+ computed$2(() => {
13762
+ if (props.searchable === "auto") {
13763
+ if (props.options.length < 5)
13764
+ return false;
13765
+ return true;
13766
+ }
13767
+ return props.searchable;
13768
+ });
13769
+ const realClearValue = computed$2(() => {
13770
+ switch (typeof props.modelValue) {
13771
+ case "number":
13772
+ return 0;
13773
+ case "string":
13774
+ return "";
13775
+ case "object":
13776
+ if (props.modelValue.constructor === Array)
13777
+ return [];
13778
+ return {};
13779
+ default:
13780
+ return null;
13781
+ }
13782
+ });
13783
+ computed$2(() => {
13784
+ switch (typeof props.modelValue) {
13785
+ case "number":
13786
+ return props.modelValue === 0;
13787
+ case "string":
13788
+ return props.modelValue === "";
13789
+ case "object":
13790
+ if (!props.modelValue)
13791
+ return null;
13792
+ if (props.modelValue.constructor === Array) {
13793
+ return props.modelValue.length() === 0;
13794
+ }
13795
+ return Object.keys(props.modelValue).length === 0;
13796
+ default:
13797
+ return props.modelValue === null;
13798
+ }
13799
+ });
13800
+ function onClick(event) {
13801
+ emits("click", event);
13696
13802
  }
13803
+ const onChange = (event) => {
13804
+ emits("change", event);
13805
+ };
13806
+ const getOptionKey = (option) => {
13807
+ return realReduceFunction(option);
13808
+ };
13809
+ const getOptionName = (option) => {
13810
+ if (!props.prop)
13811
+ return option;
13812
+ return option[props.prop];
13813
+ };
13814
+ const realReduceFunction = (option) => {
13815
+ if (props.notReduce)
13816
+ return option;
13817
+ return props.reduceFunction(option);
13818
+ };
13697
13819
  return (_ctx, _cache) => {
13698
- return openBlock(), createBlock(_sfc_main$e, {
13699
- modelValue: unref$1(isActive),
13700
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(isActive) ? isActive.value = $event : null),
13701
- title: "Administrador de columnas"
13702
- }, {
13703
- default: withCtx(() => [
13704
- createElementVNode("div", _hoisted_1$3, [
13705
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref$1(columnsCheckable), (col) => {
13706
- return openBlock(), createElementBlock("div", _hoisted_2$1, [
13707
- createVNode(ckCheckbox, {
13708
- modelValue: col.value,
13709
- "onUpdate:modelValue": ($event) => col.value = $event,
13710
- onChange: ($event) => setColumnDisplayValue(col.name, col.value)
13711
- }, {
13712
- default: withCtx(() => [
13713
- createTextVNode(toDisplayString(col.title), 1)
13714
- ]),
13715
- _: 2
13716
- }, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])
13717
- ]);
13718
- }), 256))
13719
- ])
13720
- ]),
13721
- _: 1
13722
- }, 8, ["modelValue"]);
13820
+ return openBlock(), createElementBlock("div", {
13821
+ class: "ck-select",
13822
+ style: normalizeStyle(unref$1(computedStyle))
13823
+ }, [
13824
+ __props.label ? (openBlock(), createBlock(ckLabel, {
13825
+ key: 0,
13826
+ align: __props.labelAlign,
13827
+ for: "ck-input"
13828
+ }, {
13829
+ default: withCtx(() => [
13830
+ createTextVNode(toDisplayString(__props.label), 1)
13831
+ ]),
13832
+ _: 1
13833
+ }, 8, ["align"])) : createCommentVNode("", true),
13834
+ withDirectives(createElementVNode("select", {
13835
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(value) ? value.value = $event : null),
13836
+ class: normalizeClass(unref$1(computedClass)),
13837
+ onClick: _cache[1] || (_cache[1] = ($event) => onClick($event)),
13838
+ onChange: _cache[2] || (_cache[2] = ($event) => onChange($event))
13839
+ }, [
13840
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref$1(filteredOptions), (option) => {
13841
+ return openBlock(), createElementBlock("option", {
13842
+ value: getOptionKey(option),
13843
+ key: option
13844
+ }, toDisplayString(getOptionName(option)), 9, _hoisted_1$4);
13845
+ }), 128))
13846
+ ], 34), [
13847
+ [vModelSelect, unref$1(value)]
13848
+ ])
13849
+ ], 4);
13723
13850
  };
13724
13851
  }
13725
13852
  });
13726
- var TableColumnsManager = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-e6aed8c8"]]);
13727
- var ckTable_vue_vue_type_style_index_0_scoped_true_lang = "";
13728
- const _hoisted_1$2 = { class: "ck-table" };
13729
- const _hoisted_2 = {
13853
+ var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-31af160a"]]);
13854
+ var ckSwitch_vue_vue_type_style_index_0_scoped_true_lang = "";
13855
+ const _withScopeId = (n) => (pushScopeId("data-v-b6a4dfaa"), n = n(), popScopeId(), n);
13856
+ const _hoisted_1$3 = ["disabled"];
13857
+ const _hoisted_2$1 = { class: "ck-switch__slider-container" };
13858
+ const _hoisted_3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "ck-switch__slider" }, null, -1));
13859
+ const _hoisted_4 = {
13730
13860
  key: 0,
13731
- class: "ck-table__header"
13732
- };
13733
- const _hoisted_3 = {
13734
- key: 1,
13735
- class: "ck-table__header--slot"
13861
+ class: "ck-switch__content"
13736
13862
  };
13737
- const _hoisted_4 = { class: "ck-table__table-container" };
13738
- const _hoisted_5 = { key: 0 };
13739
- const _hoisted_6 = { key: 1 };
13740
13863
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
13741
13864
  props: {
13742
- columns: { type: [Array, Object], required: true, default: () => [] },
13743
- hasColumnsManager: { type: Boolean, default: false },
13744
- currentPage: { type: Number, default: 0 },
13745
- itemsPerPage: { type: Number, default: 40 },
13746
- listLength: { type: Number, default: 0 },
13747
- paginationAlign: { type: String, default: "center", validator: validators.align },
13748
- search: { type: String, default: void 0 },
13749
- hideHeaderActions: { type: Boolean, default: false },
13750
- showRefreshBtn: { type: Boolean, default: false },
13751
- hideItemsPerPage: { type: Boolean, default: false },
13752
- notFullWidth: { type: Boolean, default: false }
13865
+ modelValue: { type: [Boolean, Number], default: false },
13866
+ disabled: { type: Boolean, default: false },
13867
+ outlined: { type: Boolean, default: false },
13868
+ squared: { type: Boolean, default: false },
13869
+ size: { type: String, default: "m" },
13870
+ icon: { type: String, default: void 0 },
13871
+ iconPack: { type: String, default: void 0 }
13753
13872
  },
13754
- emits: ["refreshList", "update:search", "update:currentPage"],
13755
- setup(__props, { emit: emits }) {
13756
- const props = __props;
13757
- const { qmObj: qmObj2 } = main$1;
13758
- const IsPopupActive = ref({
13759
- columnsManager: false
13760
- });
13761
- const columnsAreObj = computed$2(() => !qmObj2.isArray(props.columns));
13762
- const columnsArray = computed$2(() => {
13763
- if (!columnsAreObj.value)
13764
- return props.columns;
13765
- const arr = Object.values(props.columns);
13766
- const keys = Object.keys(props.columns);
13767
- arr.forEach((col, index) => {
13768
- const key = keys[index];
13769
- col.name = key;
13770
- });
13771
- return arr;
13772
- });
13773
- const filteredColumnsList = computed$2(() => {
13774
- return columnsArray.value.filter(functions$1.isColumnDisplayed);
13775
- });
13776
- const searchLocal = computed$2({
13777
- get() {
13778
- return props.search;
13779
- },
13780
- set(val) {
13781
- emits("update:search", val);
13782
- }
13783
- });
13784
- const currentPageLocal = computed$2({
13873
+ emits: ["update:modelValue"],
13874
+ setup(__props, { emit: emits }) {
13875
+ const props = __props;
13876
+ const value = computed$2({
13785
13877
  get() {
13786
- return props.currentPage;
13878
+ return props.modelValue;
13787
13879
  },
13788
13880
  set(val) {
13789
- emits("update:currentPage", val);
13881
+ emits("update:modelValue", val);
13790
13882
  }
13791
13883
  });
13792
- function refreshList(pageChange = false) {
13793
- emits("refreshList", pageChange);
13794
- }
13795
- function openColumnsManager() {
13796
- if (columnsAreObj.value) {
13797
- IsPopupActive.value.columnsManager = true;
13798
- } else {
13799
- console.log("ERROR ck-table", "The columns list should be an object");
13884
+ const computedClass = computed$2(() => {
13885
+ const list = [];
13886
+ if (props.squared)
13887
+ list.push("is-squared");
13888
+ if (props.outlined)
13889
+ list.push("is-outlined");
13890
+ let size = "s";
13891
+ if (props.size === "m" || props.size === "l")
13892
+ size = props.size;
13893
+ list.push(`ck-switch--size-${size}`);
13894
+ return list;
13895
+ });
13896
+ const computedAttributes = computed$2(() => {
13897
+ return {
13898
+ "aria-disabled": props.disabled,
13899
+ tabindex: props.disabled ? void 0 : "0"
13900
+ };
13901
+ });
13902
+ const iconClass = computed$2(() => {
13903
+ const list = [];
13904
+ if (props.size && props.size !== "m") {
13905
+ list.push(`ck-switch__icon-size--${props.size}`);
13800
13906
  }
13907
+ return list;
13908
+ });
13909
+ function onTrigger2() {
13910
+ value.value = !value.value;
13801
13911
  }
13802
13912
  return (_ctx, _cache) => {
13803
- return openBlock(), createElementBlock(Fragment, null, [
13804
- __props.hasColumnsManager && unref$1(columnsAreObj) ? (openBlock(), createBlock(TableColumnsManager, {
13805
- key: 0,
13806
- modelValue: IsPopupActive.value.columnsManager,
13807
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => IsPopupActive.value.columnsManager = $event),
13808
- columnsArray: unref$1(columnsArray),
13809
- columns: __props.columns
13810
- }, null, 8, ["modelValue", "columnsArray", "columns"])) : createCommentVNode("", true),
13811
- createElementVNode("div", _hoisted_1$2, [
13812
- _ctx.$slots.header || !__props.hideHeaderActions ? (openBlock(), createElementBlock("div", _hoisted_2, [
13813
- !__props.hideHeaderActions ? (openBlock(), createBlock(TableHeaderItems, {
13814
- key: 0,
13815
- search: unref$1(searchLocal),
13816
- "onUpdate:search": _cache[1] || (_cache[1] = ($event) => isRef$1(searchLocal) ? searchLocal.value = $event : null),
13817
- currentPage: __props.currentPage,
13818
- hasColumnsManager: __props.hasColumnsManager,
13819
- itemsPerPage: __props.itemsPerPage,
13820
- listLength: __props.listLength,
13821
- showRefreshBtn: __props.showRefreshBtn,
13822
- hideItemsPerPage: __props.hideItemsPerPage,
13823
- onRefreshList: _cache[2] || (_cache[2] = ($event) => refreshList($event)),
13824
- onOpenColumnsManager: _cache[3] || (_cache[3] = ($event) => openColumnsManager())
13825
- }, null, 8, ["search", "currentPage", "hasColumnsManager", "itemsPerPage", "listLength", "showRefreshBtn", "hideItemsPerPage"])) : createCommentVNode("", true),
13826
- _ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_3, [
13827
- renderSlot(_ctx.$slots, "header", {}, void 0, true)
13828
- ])) : createCommentVNode("", true)
13829
- ])) : createCommentVNode("", true),
13830
- createElementVNode("div", _hoisted_4, [
13831
- createElementVNode("table", {
13832
- class: normalizeClass(["ck-table__table", { "not-full-width": __props.notFullWidth }])
13833
- }, [
13834
- unref$1(filteredColumnsList).length ? (openBlock(), createElementBlock("thead", _hoisted_5, [
13835
- createVNode(ckTr, null, {
13836
- default: withCtx(() => [
13837
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref$1(filteredColumnsList), (col) => {
13838
- return openBlock(), createBlock(_sfc_main$7, {
13839
- key: col.title,
13840
- col
13841
- }, null, 8, ["col"]);
13842
- }), 128))
13843
- ]),
13844
- _: 1
13845
- })
13846
- ])) : createCommentVNode("", true),
13847
- createElementVNode("tbody", null, [
13848
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
13849
- ]),
13850
- _ctx.$slots.footer ? (openBlock(), createElementBlock("tfoot", _hoisted_6, [
13851
- renderSlot(_ctx.$slots, "footer", {}, void 0, true)
13852
- ])) : createCommentVNode("", true)
13853
- ], 2)
13854
- ]),
13855
- createVNode(TablePagination, {
13856
- class: "ck-table__pagination",
13857
- currentPage: unref$1(currentPageLocal),
13858
- "onUpdate:currentPage": _cache[4] || (_cache[4] = ($event) => isRef$1(currentPageLocal) ? currentPageLocal.value = $event : null),
13859
- itemsPerPage: __props.itemsPerPage,
13860
- listLength: __props.listLength,
13861
- align: __props.paginationAlign,
13862
- onRefreshList: _cache[5] || (_cache[5] = ($event) => refreshList(true))
13863
- }, null, 8, ["currentPage", "itemsPerPage", "listLength", "align"])
13864
- ])
13865
- ], 64);
13913
+ return openBlock(), createElementBlock("label", mergeProps({ class: "ck-switch" }, unref$1(computedAttributes), {
13914
+ class: unref$1(computedClass),
13915
+ onKeydown: _cache[2] || (_cache[2] = withKeys(withModifiers(() => {
13916
+ }, ["prevent"]), ["space"])),
13917
+ onKeyup: [
13918
+ _cache[3] || (_cache[3] = withKeys(($event) => onTrigger2(), ["enter"])),
13919
+ _cache[4] || (_cache[4] = withKeys(($event) => onTrigger2(), ["space"]))
13920
+ ]
13921
+ }), [
13922
+ withDirectives(createElementVNode("input", {
13923
+ class: "ck-switch__input",
13924
+ "aria-hidden": "true",
13925
+ type: "checkbox",
13926
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(value) ? value.value = $event : null),
13927
+ disabled: __props.disabled,
13928
+ onClick: _cache[1] || (_cache[1] = ($event) => onTrigger2())
13929
+ }, null, 8, _hoisted_1$3), [
13930
+ [vModelCheckbox, unref$1(value)]
13931
+ ]),
13932
+ createElementVNode("div", _hoisted_2$1, [
13933
+ _hoisted_3,
13934
+ __props.icon && unref$1(value) ? (openBlock(), createBlock(ckIcon, {
13935
+ key: 0,
13936
+ class: normalizeClass(["ck-switch__icon-left", unref$1(iconClass)]),
13937
+ icon: __props.icon,
13938
+ "icon-pack": __props.iconPack
13939
+ }, null, 8, ["icon", "icon-pack", "class"])) : createCommentVNode("", true),
13940
+ __props.icon && !unref$1(value) ? (openBlock(), createBlock(ckIcon, {
13941
+ key: 1,
13942
+ class: normalizeClass(["ck-switch__icon-right", unref$1(iconClass)]),
13943
+ icon: __props.icon,
13944
+ "icon-pack": __props.iconPack
13945
+ }, null, 8, ["icon", "icon-pack", "class"])) : createCommentVNode("", true)
13946
+ ]),
13947
+ _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_4, [
13948
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
13949
+ ])) : createCommentVNode("", true)
13950
+ ], 16);
13866
13951
  };
13867
13952
  }
13868
13953
  });
13869
- var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-2c108c86"]]);
13870
- var ckTd_vue_vue_type_style_index_0_scoped_true_lang = "";
13954
+ var ckSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-b6a4dfaa"]]);
13955
+ var ckSwitchOptions_vue_vue_type_style_index_0_scoped_true_lang = "";
13956
+ const _hoisted_1$2 = { class: "ck-switch-options__container-exterior" };
13957
+ const _hoisted_2 = ["onClick"];
13871
13958
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
13872
13959
  props: {
13873
- col: { type: Object, default: void 0 },
13874
- nowrap: { type: Boolean, default: false },
13875
- block: { type: Boolean, default: false },
13876
- autoWidth: { type: Boolean, default: false },
13877
- overflowAuto: { type: Boolean, default: false },
13878
- align: { type: String, default: void 0, validator: validators.align },
13879
- fixedWidth: { type: String, default: "" },
13880
- minWidth: { type: String, default: "" },
13881
- maxWidth: { type: String, default: "" },
13882
- maxHeight: { type: String, default: "" }
13960
+ modelValue: { type: [Boolean, Number, Object], default: 0 },
13961
+ options: { type: Array, required: true },
13962
+ prop: { type: String, default: "name" },
13963
+ notReduce: { type: Boolean, default: false },
13964
+ reduceFunction: { type: Function, default: (Option) => Option.id },
13965
+ label: { type: String, default: "" },
13966
+ labelAlign: { type: String, default: "" },
13967
+ group: { type: String, default: "" },
13968
+ groupBreak: { type: String, default: "s" },
13969
+ groupVertical: { type: String, default: "" },
13970
+ sameWidthOptions: { type: Boolean, default: false }
13883
13971
  },
13884
- setup(__props) {
13972
+ emits: ["update:modelValue", "change"],
13973
+ setup(__props, { emit: emits }) {
13885
13974
  const props = __props;
13886
- const computedTdClass = computed$2(() => {
13887
- return {
13888
- "auto-width": props.autoWidth,
13889
- "overflow-auto": props.overflowAuto
13890
- };
13891
- });
13892
- const computedSpanClass = computed$2(() => {
13893
- const list = [];
13894
- let align;
13895
- if (props.col)
13896
- align = props.col.align;
13897
- if (props.align)
13898
- align = props.align;
13899
- if (align) {
13900
- if (align === "center")
13901
- list.push("align-center");
13902
- if (align === "right")
13903
- list.push("align-right");
13975
+ const selectedOption = computed$2({
13976
+ get() {
13977
+ return props.modelValue;
13978
+ },
13979
+ set(val) {
13980
+ emits("update:modelValue", val);
13981
+ emits("change", val);
13904
13982
  }
13905
- if (props.block)
13906
- list.push("block");
13907
- if (props.block)
13908
- list.push("no-wrap-text");
13909
- return list;
13910
13983
  });
13911
- const computedStyle = computed$2(() => {
13912
- const list = {};
13913
- if (props.minWidth)
13914
- list["min-width"] = props.minWidth;
13915
- if (props.fixedWidth)
13916
- list["min-width"] = props.fixedWidth;
13917
- if (props.maxWidth)
13918
- list["max-width"] = props.maxWidth;
13919
- if (props.fixedWidth)
13920
- list["max-width"] = props.fixedWidth;
13921
- if (props.maxHeight)
13922
- list["max-height"] = props.maxHeight;
13923
- return list;
13984
+ const computedClass = computed$2(() => {
13985
+ const classList2 = [];
13986
+ classList2.push(functions.getGroupClass(props));
13987
+ return classList2;
13924
13988
  });
13925
- const isColumnDisplayed = computed$2(() => {
13926
- if (!props.col)
13927
- return true;
13928
- return functions$1.isColumnDisplayed(props.col);
13989
+ const computedItemStyle = computed$2(() => {
13990
+ const list = [];
13991
+ if (props.sameWidthOptions)
13992
+ list.push({ width: `${100 / props.options.length}%` });
13993
+ return list;
13929
13994
  });
13995
+ function getOptionValue(Option) {
13996
+ if (props.notReduce)
13997
+ return Option;
13998
+ return props.reduceFunction(Option);
13999
+ }
13930
14000
  return (_ctx, _cache) => {
13931
- return unref$1(isColumnDisplayed) ? (openBlock(), createElementBlock("td", {
13932
- key: 0,
13933
- class: normalizeClass(["ck-td", unref$1(computedTdClass)])
13934
- }, [
13935
- createElementVNode("span", {
13936
- class: normalizeClass(unref$1(computedSpanClass)),
13937
- style: normalizeStyle(unref$1(computedStyle))
14001
+ return openBlock(), createElementBlock("div", _hoisted_1$2, [
14002
+ __props.label ? (openBlock(), createBlock(ckLabel, {
14003
+ key: 0,
14004
+ align: __props.labelAlign
14005
+ }, {
14006
+ default: withCtx(() => [
14007
+ createTextVNode(toDisplayString(__props.label), 1)
14008
+ ]),
14009
+ _: 1
14010
+ }, 8, ["align"])) : createCommentVNode("", true),
14011
+ createElementVNode("div", {
14012
+ class: normalizeClass(["ck-switch-options__container", unref$1(computedClass)])
13938
14013
  }, [
13939
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
13940
- ], 6)
13941
- ], 2)) : createCommentVNode("", true);
14014
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (Option, index) => {
14015
+ return openBlock(), createElementBlock("div", {
14016
+ class: normalizeClass(["ck-switch-options__option", { selected: unref$1(selectedOption) == getOptionValue(Option) }]),
14017
+ key: `ck-switch-options${index}`,
14018
+ style: normalizeStyle(unref$1(computedItemStyle)),
14019
+ onClick: ($event) => selectedOption.value = getOptionValue(Option)
14020
+ }, toDisplayString(Option[__props.prop]), 15, _hoisted_2);
14021
+ }), 128))
14022
+ ], 2)
14023
+ ]);
13942
14024
  };
13943
14025
  }
13944
14026
  });
13945
- var ckTd = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-63af303c"]]);
14027
+ var ckSwitchOptions = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-2c3e07c8"]]);
13946
14028
  var ckTextarea_vue_vue_type_style_index_0_scoped_true_lang = "";
13947
14029
  const _hoisted_1$1 = { class: "ck-textarea" };
13948
14030
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
@@ -16585,6 +16667,11 @@ var components = /* @__PURE__ */ Object.freeze({
16585
16667
  [Symbol.toStringTag]: "Module",
16586
16668
  ckDropdown,
16587
16669
  ckNavbar,
16670
+ ckNotify,
16671
+ ckTable,
16672
+ ckTd,
16673
+ ckTh,
16674
+ ckTr,
16588
16675
  ckButton,
16589
16676
  ckCheckbox,
16590
16677
  ckChip,
@@ -16592,17 +16679,13 @@ var components = /* @__PURE__ */ Object.freeze({
16592
16679
  ckImg,
16593
16680
  ckInput,
16594
16681
  ckLabel,
16595
- ckPopup: _sfc_main$e,
16682
+ ckPopup: _sfc_main$b,
16596
16683
  ckRadio,
16597
16684
  ckSelect,
16598
16685
  ckSwitch,
16599
16686
  ckSwitchOptions,
16600
- ckTable,
16601
- ckTd,
16602
16687
  ckTextarea,
16603
- ckTh,
16604
16688
  ckTooltip,
16605
- ckTr,
16606
16689
  EVENTS: events,
16607
16690
  EventBus: mitt,
16608
16691
  lockScroll,
@@ -16639,4 +16722,4 @@ const install = function installCleek(app, options) {
16639
16722
  app.component(componentName, component);
16640
16723
  });
16641
16724
  };
16642
- export { events as EVENTS, mitt as EventBus, ckButton, ckCheckbox, ckChip, ckDropdown, ckIcon, ckImg, ckInput, ckLabel, ckNavbar, _sfc_main$e as ckPopup, ckRadio, ckSelect, ckSwitch, ckSwitchOptions, ckTable, ckTd, ckTextarea, ckTh, ckTooltip, ckTr, install as default, lockScroll, unlockScroll };
16725
+ 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 };