cleek 1.5.13 → 1.6.3

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
@@ -1,4 +1,4 @@
1
- import require$$0, { defineComponent, computed, watch, h, resolveComponent, openBlock, createElementBlock, createBlock, createCommentVNode, normalizeClass, renderSlot, mergeProps, withKeys, withModifiers, createElementVNode, pushScopeId, popScopeId, normalizeStyle, withDirectives, vModelText, createVNode, withCtx, createTextVNode, Fragment, renderList, vModelRadio, toDisplayString, vModelCheckbox } from "vue";
1
+ import { defineComponent, computed, watch, h, resolveComponent, openBlock, createElementBlock, createBlock, createCommentVNode, normalizeClass, renderSlot, mergeProps, withKeys, withModifiers, createElementVNode, pushScopeId, popScopeId, normalizeStyle, withCtx, createTextVNode, toDisplayString, withDirectives, vModelText, createVNode, Fragment, renderList, vModelRadio, vModelCheckbox } from "vue";
2
2
  var validators = {
3
3
  size: (type) => {
4
4
  return ["", "xs", "s", "m", "l", "xl"].includes(type);
@@ -10748,7 +10748,7 @@ var _iconsCache = {
10748
10748
  faYoutubeSquare,
10749
10749
  faZhihu
10750
10750
  };
10751
- var commonjsGlobal$1 = typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
10751
+ var commonjsGlobal = typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
10752
10752
  function createCommonjsModule(fn2, module) {
10753
10753
  return module = { exports: {} }, fn2(module, module.exports), module.exports;
10754
10754
  }
@@ -10851,7 +10851,7 @@ var humps = createCommonjsModule(function(module) {
10851
10851
  } else {
10852
10852
  global2.humps = humps2;
10853
10853
  }
10854
- })(commonjsGlobal$1);
10854
+ })(commonjsGlobal);
10855
10855
  });
10856
10856
  var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
10857
10857
  return typeof obj;
@@ -11186,7 +11186,7 @@ function render$i(_ctx, _cache, $props, $setup, $data, $options) {
11186
11186
  class: "ck-icon",
11187
11187
  onClick: _cache[0] || (_cache[0] = ($event) => $options.onClick($event))
11188
11188
  }, [
11189
- $options.computedIconPackage === "font-awesome" ? (openBlock(), createBlock(_component_font_awesome_icon, {
11189
+ $options.computediconPack === "font-awesome" ? (openBlock(), createBlock(_component_font_awesome_icon, {
11190
11190
  key: 0,
11191
11191
  icon: $props.icon,
11192
11192
  size: $props.size,
@@ -11216,7 +11216,7 @@ const _sfc_main$h = {
11216
11216
  },
11217
11217
  props: {
11218
11218
  icon: { type: [String, Array], default: "" },
11219
- iconPackage: { type: String, default: "" },
11219
+ iconPack: { type: String, default: "" },
11220
11220
  size: { type: String, default: null },
11221
11221
  rotation: { type: String, default: null },
11222
11222
  flip: { type: String, default: null },
@@ -11229,12 +11229,12 @@ const _sfc_main$h = {
11229
11229
  },
11230
11230
  emits: ["click"],
11231
11231
  computed: {
11232
- computedIconPackage() {
11232
+ computediconPack() {
11233
11233
  const defaultPackage = "font-awesome";
11234
- if (this.iconPackage === "")
11234
+ if (this.iconPack === "")
11235
11235
  return defaultPackage;
11236
- if (this.iconPackage === "feather")
11237
- return this.iconPackage;
11236
+ if (this.iconPack === "feather")
11237
+ return this.iconPack;
11238
11238
  return defaultPackage;
11239
11239
  }
11240
11240
  },
@@ -11249,8 +11249,8 @@ const _sfc_main$h = {
11249
11249
  }
11250
11250
  }
11251
11251
  };
11252
- var ckIcon = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", render$i], ["__scopeId", "data-v-2609c60b"]]);
11253
- const _hoisted_1$d = ["title", "aria-label", "disabled"];
11252
+ var ckIcon = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", render$i], ["__scopeId", "data-v-4026c04e"]]);
11253
+ const _hoisted_1$e = ["title", "aria-label", "disabled"];
11254
11254
  function render$h(_ctx, _cache, $props, $setup, $data, $options) {
11255
11255
  const _component_ck_icon = resolveComponent("ck-icon");
11256
11256
  return openBlock(), createElementBlock("button", {
@@ -11265,16 +11265,16 @@ function render$h(_ctx, _cache, $props, $setup, $data, $options) {
11265
11265
  key: 0,
11266
11266
  class: "ck-button__icon-left",
11267
11267
  icon: $props.icon,
11268
- "icon-pack": _ctx.iconPack
11268
+ "icon-pack": $props.iconPack
11269
11269
  }, null, 8, ["icon", "icon-pack"])) : createCommentVNode("", true),
11270
11270
  renderSlot(_ctx.$slots, "default", {}, void 0, true),
11271
11271
  $props.iconRight ? (openBlock(), createBlock(_component_ck_icon, {
11272
11272
  key: 1,
11273
11273
  class: "ck-button__icon-right",
11274
11274
  icon: $props.iconRight,
11275
- "icon-pack": _ctx.iconPack
11275
+ "icon-pack": $props.iconPack
11276
11276
  }, null, 8, ["icon", "icon-pack"])) : createCommentVNode("", true)
11277
- ], 10, _hoisted_1$d);
11277
+ ], 10, _hoisted_1$e);
11278
11278
  }
11279
11279
  var ckButton_vue_vue_type_style_index_0_scoped_true_lang = "";
11280
11280
  const defaults = { type: "outlined" };
@@ -11289,7 +11289,7 @@ const _sfc_main$g = {
11289
11289
  color: { type: String, default: "" },
11290
11290
  disabled: { type: Boolean, default: false },
11291
11291
  icon: { type: [String, Array], default: void 0 },
11292
- iconPackage: { type: String, default: void 0 },
11292
+ iconPack: { type: String, default: void 0 },
11293
11293
  iconRight: { type: String, default: void 0 },
11294
11294
  label: { type: String, default: void 0 },
11295
11295
  labelAlign: { type: String, default: void 0 },
@@ -11309,6 +11309,12 @@ const _sfc_main$g = {
11309
11309
  classList2.push(`ck-component__border-color--${this.color}`);
11310
11310
  }
11311
11311
  }
11312
+ if (!!this.$slots.default) {
11313
+ if (this.icon || this.iconRight) {
11314
+ if (!(this.icon && this.iconRight))
11315
+ classList2.push("just-icon");
11316
+ }
11317
+ }
11312
11318
  let type = this.type;
11313
11319
  if (!validators.buttonType(this.type))
11314
11320
  type = defaults.type;
@@ -11322,11 +11328,11 @@ const _sfc_main$g = {
11322
11328
  }
11323
11329
  }
11324
11330
  };
11325
- var ckButton = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", render$h], ["__scopeId", "data-v-29466fcf"]]);
11331
+ var ckButton = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", render$h], ["__scopeId", "data-v-2ea10950"]]);
11326
11332
  const _withScopeId$2 = (n) => (pushScopeId("data-v-c7841510"), n = n(), popScopeId(), n);
11327
- const _hoisted_1$c = ["disabled", "checked"];
11328
- const _hoisted_2$6 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", { class: "ck-checkbox__element" }, null, -1));
11329
- const _hoisted_3$4 = {
11333
+ const _hoisted_1$d = ["disabled", "checked"];
11334
+ const _hoisted_2$7 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", { class: "ck-checkbox__element" }, null, -1));
11335
+ const _hoisted_3$5 = {
11330
11336
  key: 0,
11331
11337
  class: "c-Checkbox__label"
11332
11338
  };
@@ -11349,9 +11355,9 @@ function render$g(_ctx, _cache, $props, $setup, $data, $options) {
11349
11355
  $options.value = $event.target.checked;
11350
11356
  $options.onChange($event);
11351
11357
  })
11352
- }, null, 40, _hoisted_1$c),
11353
- _hoisted_2$6,
11354
- _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_3$4, [
11358
+ }, null, 40, _hoisted_1$d),
11359
+ _hoisted_2$7,
11360
+ _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_3$5, [
11355
11361
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
11356
11362
  ])) : createCommentVNode("", true)
11357
11363
  ], 16);
@@ -11391,7 +11397,7 @@ const _sfc_main$f = {
11391
11397
  }
11392
11398
  };
11393
11399
  var ckCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", render$g], ["__scopeId", "data-v-c7841510"]]);
11394
- const _hoisted_1$b = ["src"];
11400
+ const _hoisted_1$c = ["src"];
11395
11401
  function render$f(_ctx, _cache, $props, $setup, $data, $options) {
11396
11402
  return openBlock(), createElementBlock("div", {
11397
11403
  class: normalizeClass(["ck-img", $options.computedClass]),
@@ -11402,7 +11408,7 @@ function render$f(_ctx, _cache, $props, $setup, $data, $options) {
11402
11408
  src: $options.imageUrl,
11403
11409
  style: normalizeStyle($options.computedImgStyle),
11404
11410
  onError: _cache[0] || (_cache[0] = ($event) => _ctx.altNeeded = true)
11405
- }, null, 44, _hoisted_1$b)
11411
+ }, null, 44, _hoisted_1$c)
11406
11412
  ], 6);
11407
11413
  }
11408
11414
  var ckImg_vue_vue_type_style_index_0_scoped_true_lang = "";
@@ -11491,23 +11497,66 @@ const _sfc_main$e = {
11491
11497
  }
11492
11498
  };
11493
11499
  var ckImg = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", render$f], ["__scopeId", "data-v-1c6a3b4e"]]);
11494
- const _hoisted_1$a = { class: "ck-input-text" };
11495
- const _hoisted_2$5 = ["placeholder"];
11500
+ const _hoisted_1$b = ["for"];
11496
11501
  function render$e(_ctx, _cache, $props, $setup, $data, $options) {
11502
+ return openBlock(), createElementBlock("label", {
11503
+ class: normalizeClass(["ck-label", $options.computedClass]),
11504
+ for: $props.for
11505
+ }, [
11506
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
11507
+ ], 10, _hoisted_1$b);
11508
+ }
11509
+ var ckLabel_vue_vue_type_style_index_0_scoped_true_lang = "";
11510
+ const _sfc_main$d = {
11511
+ name: "CkLabel",
11512
+ props: {
11513
+ for: { type: String, default: "" },
11514
+ align: { type: String, default: "" }
11515
+ },
11516
+ computed: {
11517
+ computedClass() {
11518
+ const list = [];
11519
+ let align = "left";
11520
+ if (this.align === "center" || this.align === "right")
11521
+ align = this.align;
11522
+ list.push(`ck-align--${align}`);
11523
+ return list;
11524
+ }
11525
+ }
11526
+ };
11527
+ var ckLabel = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", render$e], ["__scopeId", "data-v-4b8b9ab4"]]);
11528
+ const _hoisted_1$a = { class: "ck-input-text" };
11529
+ const _hoisted_2$6 = ["id", "placeholder"];
11530
+ function render$d(_ctx, _cache, $props, $setup, $data, $options) {
11531
+ const _component_ck_label = resolveComponent("ck-label");
11497
11532
  return openBlock(), createElementBlock("div", _hoisted_1$a, [
11533
+ $props.label ? (openBlock(), createBlock(_component_ck_label, {
11534
+ key: 0,
11535
+ align: $props.labelAlign,
11536
+ for: "ck-input-text"
11537
+ }, {
11538
+ default: withCtx(() => [
11539
+ createTextVNode(toDisplayString($props.label), 1)
11540
+ ]),
11541
+ _: 1
11542
+ }, 8, ["align"])) : createCommentVNode("", true),
11498
11543
  withDirectives(createElementVNode("input", {
11544
+ id: $props.label ? "ck-input-text" : "",
11499
11545
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $options.value = $event),
11500
11546
  type: "text",
11501
11547
  placeholder: $props.placeholder,
11502
11548
  class: normalizeClass($options.computedClass)
11503
- }, null, 10, _hoisted_2$5), [
11549
+ }, null, 10, _hoisted_2$6), [
11504
11550
  [vModelText, $options.value]
11505
11551
  ])
11506
11552
  ]);
11507
11553
  }
11508
11554
  var ckInputText_vue_vue_type_style_index_0_scoped_true_lang = "";
11509
- const _sfc_main$d = {
11555
+ const _sfc_main$c = {
11510
11556
  name: "CkInputText",
11557
+ components: {
11558
+ ckLabel
11559
+ },
11511
11560
  props: {
11512
11561
  modelValue: { type: String, default: "" },
11513
11562
  label: { type: String, default: "" },
@@ -11534,36 +11583,7 @@ const _sfc_main$d = {
11534
11583
  }
11535
11584
  }
11536
11585
  };
11537
- var ckInputText = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", render$e], ["__scopeId", "data-v-f5426fe4"]]);
11538
- function render$d(_ctx, _cache, $props, $setup, $data, $options) {
11539
- return openBlock(), createElementBlock("label", {
11540
- class: normalizeClass(["ck-label", $options.computedClass])
11541
- }, [
11542
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
11543
- ], 2);
11544
- }
11545
- var ckLabel_vue_vue_type_style_index_0_scoped_true_lang = "";
11546
- const _sfc_main$c = {
11547
- name: "CkLabel",
11548
- props: {
11549
- align: { type: String, default: "" }
11550
- },
11551
- computed: {
11552
- computedClass() {
11553
- const list = [];
11554
- let align = "left";
11555
- if (this.align === "center" || this.align === "right")
11556
- align = this.align;
11557
- list.push(`ck-align--${align}`);
11558
- return list;
11559
- }
11560
- }
11561
- };
11562
- var ckLabel = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", render$d], ["__scopeId", "data-v-753ae406"]]);
11563
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
11564
- function getDefaultExportFromCjs(x) {
11565
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
11566
- }
11586
+ var ckInputText = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", render$d], ["__scopeId", "data-v-75b88129"]]);
11567
11587
  var dist = function(t) {
11568
11588
  function e(i) {
11569
11589
  if (r[i])
@@ -12172,9 +12192,9 @@ const _hoisted_1$9 = {
12172
12192
  key: 0,
12173
12193
  class: "ck-popup"
12174
12194
  };
12175
- const _hoisted_2$4 = /* @__PURE__ */ createElementVNode("div", { class: "blackout" }, null, -1);
12176
- const _hoisted_3$3 = { class: "ck-popup__slot-header" };
12177
- const _hoisted_4$1 = { class: "ck-popup__slot-body" };
12195
+ const _hoisted_2$5 = /* @__PURE__ */ createElementVNode("div", { class: "blackout" }, null, -1);
12196
+ const _hoisted_3$4 = { class: "ck-popup__slot-header" };
12197
+ const _hoisted_4$2 = { class: "ck-popup__slot-body" };
12178
12198
  const _hoisted_5 = {
12179
12199
  key: 0,
12180
12200
  class: "ck-popup__slot-footer"
@@ -12189,7 +12209,7 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) {
12189
12209
  const _component_ck_icon = resolveComponent("ck-icon");
12190
12210
  const _component_ck_button = resolveComponent("ck-button");
12191
12211
  return $options.value ? (openBlock(), createElementBlock("div", _hoisted_1$9, [
12192
- _hoisted_2$4,
12212
+ _hoisted_2$5,
12193
12213
  createElementVNode("div", {
12194
12214
  class: "popup-container",
12195
12215
  onClick: _cache[4] || (_cache[4] = ($event) => $options.onBgClick())
@@ -12199,7 +12219,7 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) {
12199
12219
  onClick: _cache[3] || (_cache[3] = withModifiers(() => {
12200
12220
  }, ["stop"]))
12201
12221
  }, [
12202
- createElementVNode("div", _hoisted_3$3, [
12222
+ createElementVNode("div", _hoisted_3$4, [
12203
12223
  renderSlot(_ctx.$slots, "header", { class: "ml-3" }),
12204
12224
  !$props.notCloseBtn ? (openBlock(), createBlock(_component_ck_icon, {
12205
12225
  key: 0,
@@ -12208,7 +12228,7 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) {
12208
12228
  onClick: _cache[0] || (_cache[0] = ($event) => $options.value = false)
12209
12229
  })) : createCommentVNode("", true)
12210
12230
  ]),
12211
- createElementVNode("div", _hoisted_4$1, [
12231
+ createElementVNode("div", _hoisted_4$2, [
12212
12232
  renderSlot(_ctx.$slots, "body")
12213
12233
  ]),
12214
12234
  _ctx.$slots.footer || $props.confirmButtons ? (openBlock(), createElementBlock("div", _hoisted_5, [
@@ -12280,9 +12300,9 @@ const _sfc_main$b = {
12280
12300
  var ckPopup = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", render$c]]);
12281
12301
  const _withScopeId$1 = (n) => (pushScopeId("data-v-73a891e8"), n = n(), popScopeId(), n);
12282
12302
  const _hoisted_1$8 = ["onKeyup"];
12283
- const _hoisted_2$3 = ["name", "value", "disabled"];
12284
- const _hoisted_3$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", { class: "c-Radio__element" }, null, -1));
12285
- const _hoisted_4 = {
12303
+ const _hoisted_2$4 = ["name", "value", "disabled"];
12304
+ const _hoisted_3$3 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", { class: "c-Radio__element" }, null, -1));
12305
+ const _hoisted_4$1 = {
12286
12306
  key: 0,
12287
12307
  class: "c-Radio__label"
12288
12308
  };
@@ -12307,11 +12327,11 @@ function render$b(_ctx, _cache, $props, $setup, $data, $options) {
12307
12327
  name: $props.name,
12308
12328
  value: item.value,
12309
12329
  disabled: $props.disabled
12310
- }, null, 8, _hoisted_2$3), [
12330
+ }, null, 8, _hoisted_2$4), [
12311
12331
  [vModelRadio, $options.value]
12312
12332
  ]),
12313
- _hoisted_3$2,
12314
- item.label ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(item.label), 1)) : createCommentVNode("", true)
12333
+ _hoisted_3$3,
12334
+ item.label ? (openBlock(), createElementBlock("span", _hoisted_4$1, toDisplayString(item.label), 1)) : createCommentVNode("", true)
12315
12335
  ], 16, _hoisted_1$8);
12316
12336
  }), 128);
12317
12337
  }
@@ -12349,442 +12369,86 @@ const _sfc_main$a = {
12349
12369
  }
12350
12370
  };
12351
12371
  var ckRadio = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", render$b], ["__scopeId", "data-v-73a891e8"]]);
12352
- var vueSelect$1 = { exports: {} };
12353
- (function(module, exports) {
12354
- !function(e, t) {
12355
- module.exports = t(require$$0);
12356
- }(typeof self != "undefined" ? self : commonjsGlobal, function(e) {
12357
- return function(e2) {
12358
- var t = {};
12359
- function o(n) {
12360
- if (t[n])
12361
- return t[n].exports;
12362
- var i = t[n] = { i: n, l: false, exports: {} };
12363
- return e2[n].call(i.exports, i, i.exports, o), i.l = true, i.exports;
12364
- }
12365
- return o.m = e2, o.c = t, o.d = function(e3, t2, n) {
12366
- o.o(e3, t2) || Object.defineProperty(e3, t2, { enumerable: true, get: n });
12367
- }, o.r = function(e3) {
12368
- typeof Symbol != "undefined" && Symbol.toStringTag && Object.defineProperty(e3, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e3, "__esModule", { value: true });
12369
- }, o.t = function(e3, t2) {
12370
- if (1 & t2 && (e3 = o(e3)), 8 & t2)
12371
- return e3;
12372
- if (4 & t2 && typeof e3 == "object" && e3 && e3.__esModule)
12373
- return e3;
12374
- var n = Object.create(null);
12375
- if (o.r(n), Object.defineProperty(n, "default", { enumerable: true, value: e3 }), 2 & t2 && typeof e3 != "string")
12376
- for (var i in e3)
12377
- o.d(n, i, function(t3) {
12378
- return e3[t3];
12379
- }.bind(null, i));
12380
- return n;
12381
- }, o.n = function(e3) {
12382
- var t2 = e3 && e3.__esModule ? function() {
12383
- return e3.default;
12384
- } : function() {
12385
- return e3;
12386
- };
12387
- return o.d(t2, "a", t2), t2;
12388
- }, o.o = function(e3, t2) {
12389
- return Object.prototype.hasOwnProperty.call(e3, t2);
12390
- }, o.p = "/", o(o.s = 10);
12391
- }([function(t, o) {
12392
- t.exports = e;
12393
- }, function(e2, t, o) {
12394
- Object.defineProperty(t, "__esModule", { value: true }), t.default = (e3, t2) => {
12395
- for (const [o2, n] of t2)
12396
- e3[o2] = n;
12397
- return e3;
12398
- };
12399
- }, function(e2, t, o) {
12400
- var n = o(6), i = o(7), r = o(8);
12401
- e2.exports = function(e3) {
12402
- return n(e3) || i(e3) || r();
12403
- };
12404
- }, function(e2, t) {
12405
- function o(t2) {
12406
- return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? e2.exports = o = function(e3) {
12407
- return typeof e3;
12408
- } : e2.exports = o = function(e3) {
12409
- return e3 && typeof Symbol == "function" && e3.constructor === Symbol && e3 !== Symbol.prototype ? "symbol" : typeof e3;
12410
- }, o(t2);
12411
- }
12412
- e2.exports = o;
12413
- }, function(e2, t) {
12414
- e2.exports = function(e3, t2, o) {
12415
- return t2 in e3 ? Object.defineProperty(e3, t2, { value: o, enumerable: true, configurable: true, writable: true }) : e3[t2] = o, e3;
12416
- };
12417
- }, function(e2, t, o) {
12418
- }, function(e2, t) {
12419
- e2.exports = function(e3) {
12420
- if (Array.isArray(e3)) {
12421
- for (var t2 = 0, o = new Array(e3.length); t2 < e3.length; t2++)
12422
- o[t2] = e3[t2];
12423
- return o;
12424
- }
12425
- };
12426
- }, function(e2, t) {
12427
- e2.exports = function(e3) {
12428
- if (Symbol.iterator in Object(e3) || Object.prototype.toString.call(e3) === "[object Arguments]")
12429
- return Array.from(e3);
12430
- };
12431
- }, function(e2, t) {
12432
- e2.exports = function() {
12433
- throw new TypeError("Invalid attempt to spread non-iterable instance");
12434
- };
12435
- }, function(e2, t, o) {
12436
- o(5);
12437
- }, function(e2, t, o) {
12438
- o.r(t);
12439
- var n = o(0);
12440
- const i = ["dir"], r = ["id", "aria-expanded", "aria-owns"], s = { ref: "selectedOptions", class: "vs__selected-options" }, l = ["disabled", "title", "aria-label", "onClick"], c = { ref: "actions", class: "vs__actions" }, a = ["disabled"], u = { class: "vs__spinner" }, p = ["id"], d2 = ["id", "aria-selected", "onMouseover", "onClick"], h2 = { key: 0, class: "vs__no-options" }, f = Object(n.createTextVNode)("Sorry, no matching options."), b = ["id"];
12441
- var O = o(2), m = o.n(O), y = o(3), g = o.n(y), v = o(4), j = o.n(v), w2 = { props: { autoscroll: { type: Boolean, default: true } }, watch: { typeAheadPointer: function() {
12442
- this.autoscroll && this.maybeAdjustScroll();
12443
- }, open: function(e3) {
12444
- var t2 = this;
12445
- this.autoscroll && e3 && this.$nextTick(function() {
12446
- return t2.maybeAdjustScroll();
12447
- });
12448
- } }, methods: { maybeAdjustScroll: function() {
12449
- var e3, t2 = ((e3 = this.$refs.dropdownMenu) === null || e3 === void 0 ? void 0 : e3.children[this.typeAheadPointer]) || false;
12450
- if (t2) {
12451
- var o2 = this.getDropdownViewport(), n2 = t2.getBoundingClientRect(), i2 = n2.top, r2 = n2.bottom, s2 = n2.height;
12452
- if (i2 < o2.top)
12453
- return this.$refs.dropdownMenu.scrollTop = t2.offsetTop;
12454
- if (r2 > o2.bottom)
12455
- return this.$refs.dropdownMenu.scrollTop = t2.offsetTop - (o2.height - s2);
12456
- }
12457
- }, getDropdownViewport: function() {
12458
- return this.$refs.dropdownMenu ? this.$refs.dropdownMenu.getBoundingClientRect() : { height: 0, top: 0, bottom: 0 };
12459
- } } }, S = { data: function() {
12460
- return { typeAheadPointer: -1 };
12461
- }, watch: { filteredOptions: function() {
12462
- for (var e3 = 0; e3 < this.filteredOptions.length; e3++)
12463
- if (this.selectable(this.filteredOptions[e3])) {
12464
- this.typeAheadPointer = e3;
12465
- break;
12466
- }
12467
- } }, methods: { typeAheadUp: function() {
12468
- for (var e3 = this.typeAheadPointer - 1; e3 >= 0; e3--)
12469
- if (this.selectable(this.filteredOptions[e3])) {
12470
- this.typeAheadPointer = e3;
12471
- break;
12472
- }
12473
- }, typeAheadDown: function() {
12474
- for (var e3 = this.typeAheadPointer + 1; e3 < this.filteredOptions.length; e3++)
12475
- if (this.selectable(this.filteredOptions[e3])) {
12476
- this.typeAheadPointer = e3;
12477
- break;
12478
- }
12479
- }, typeAheadSelect: function() {
12480
- var e3 = this.filteredOptions[this.typeAheadPointer];
12481
- e3 && this.select(e3);
12482
- } } }, _ = { props: { loading: { type: Boolean, default: false } }, data: function() {
12483
- return { mutableLoading: false };
12484
- }, watch: { search: function() {
12485
- this.$emit("search", this.search, this.toggleLoading);
12486
- }, loading: function(e3) {
12487
- this.mutableLoading = e3;
12488
- } }, methods: { toggleLoading: function() {
12489
- var e3 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
12490
- return this.mutableLoading = e3 == null ? !this.mutableLoading : e3;
12491
- } } };
12492
- const B = { xmlns: "http://www.w3.org/2000/svg", width: "10", height: "10" }, P = [Object(n.createElementVNode)("path", { d: "M6.895455 5l2.842897-2.842898c.348864-.348863.348864-.914488 0-1.263636L9.106534.261648c-.348864-.348864-.914489-.348864-1.263636 0L5 3.104545 2.157102.261648c-.348863-.348864-.914488-.348864-1.263636 0L.261648.893466c-.348864.348864-.348864.914489 0 1.263636L3.104545 5 .261648 7.842898c-.348864.348863-.348864.914488 0 1.263636l.631818.631818c.348864.348864.914773.348864 1.263636 0L5 6.895455l2.842898 2.842897c.348863.348864.914772.348864 1.263636 0l.631818-.631818c.348864-.348864.348864-.914489 0-1.263636L6.895455 5z" }, null, -1)];
12493
- var V = o(1), k = o.n(V);
12494
- const x = {};
12495
- var C = k()(x, [["render", function(e3, t2) {
12496
- return Object(n.openBlock)(), Object(n.createElementBlock)("svg", B, P);
12497
- }]]);
12498
- const $ = { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "10" }, D = [Object(n.createElementVNode)("path", { d: "M9.211364 7.59931l4.48338-4.867229c.407008-.441854.407008-1.158247 0-1.60046l-.73712-.80023c-.407008-.441854-1.066904-.441854-1.474243 0L7 5.198617 2.51662.33139c-.407008-.441853-1.066904-.441853-1.474243 0l-.737121.80023c-.407008.441854-.407008 1.158248 0 1.600461l4.48338 4.867228L7 10l2.211364-2.40069z" }, null, -1)];
12499
- const E = {};
12500
- var A = { Deselect: C, OpenIndicator: k()(E, [["render", function(e3, t2) {
12501
- return Object(n.openBlock)(), Object(n.createElementBlock)("svg", $, D);
12502
- }]]) }, L = { mounted: function(e3, t2) {
12503
- var o2 = t2.instance;
12504
- if (o2.appendToBody) {
12505
- var n2 = o2.$refs.toggle.getBoundingClientRect(), i2 = n2.height, r2 = n2.top, s2 = n2.left, l2 = n2.width, c2 = window.scrollX || window.pageXOffset, a2 = window.scrollY || window.pageYOffset;
12506
- e3.unbindPosition = o2.calculatePosition(e3, o2, { width: l2 + "px", left: c2 + s2 + "px", top: a2 + r2 + i2 + "px" }), document.body.appendChild(e3);
12507
- }
12508
- }, unmounted: function(e3, t2) {
12509
- t2.instance.appendToBody && (e3.unbindPosition && typeof e3.unbindPosition == "function" && e3.unbindPosition(), e3.parentNode && e3.parentNode.removeChild(e3));
12510
- } };
12511
- var T = function(e3) {
12512
- var t2 = {};
12513
- return Object.keys(e3).sort().forEach(function(o2) {
12514
- t2[o2] = e3[o2];
12515
- }), JSON.stringify(t2);
12516
- }, F = 0;
12517
- var M = function() {
12518
- return ++F;
12519
- };
12520
- function N(e3, t2) {
12521
- var o2 = Object.keys(e3);
12522
- if (Object.getOwnPropertySymbols) {
12523
- var n2 = Object.getOwnPropertySymbols(e3);
12524
- t2 && (n2 = n2.filter(function(t3) {
12525
- return Object.getOwnPropertyDescriptor(e3, t3).enumerable;
12526
- })), o2.push.apply(o2, n2);
12527
- }
12528
- return o2;
12529
- }
12530
- function z(e3) {
12531
- for (var t2 = 1; t2 < arguments.length; t2++) {
12532
- var o2 = arguments[t2] != null ? arguments[t2] : {};
12533
- t2 % 2 ? N(Object(o2), true).forEach(function(t3) {
12534
- j()(e3, t3, o2[t3]);
12535
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e3, Object.getOwnPropertyDescriptors(o2)) : N(Object(o2)).forEach(function(t3) {
12536
- Object.defineProperty(e3, t3, Object.getOwnPropertyDescriptor(o2, t3));
12537
- });
12538
- }
12539
- return e3;
12540
- }
12541
- var R = { components: z({}, A), directives: { appendToBody: L }, mixins: [w2, S, _], emits: ["open", "close", "update:modelValue", "search", "search:compositionstart", "search:compositionend", "search:keydown", "search:blur", "search:focus", "search:input", "option:created", "option:selecting", "option:selected", "option:deselecting", "option:deselected"], props: { modelValue: {}, components: { type: Object, default: function() {
12542
- return {};
12543
- } }, options: { type: Array, default: function() {
12544
- return [];
12545
- } }, disabled: { type: Boolean, default: false }, clearable: { type: Boolean, default: true }, deselectFromDropdown: { type: Boolean, default: false }, searchable: { type: Boolean, default: true }, multiple: { type: Boolean, default: false }, placeholder: { type: String, default: "" }, transition: { type: String, default: "vs__fade" }, clearSearchOnSelect: { type: Boolean, default: true }, closeOnSelect: { type: Boolean, default: true }, label: { type: String, default: "label" }, autocomplete: { type: String, default: "off" }, reduce: { type: Function, default: function(e3) {
12546
- return e3;
12547
- } }, selectable: { type: Function, default: function(e3) {
12548
- return true;
12549
- } }, getOptionLabel: { type: Function, default: function(e3) {
12550
- return g()(e3) === "object" ? e3.hasOwnProperty(this.label) ? e3[this.label] : console.warn('[vue-select warn]: Label key "option.'.concat(this.label, '" does not') + " exist in options object ".concat(JSON.stringify(e3), ".\n") + "https://vue-select.org/api/props.html#getoptionlabel") : e3;
12551
- } }, getOptionKey: { type: Function, default: function(e3) {
12552
- if (g()(e3) !== "object")
12553
- return e3;
12554
- try {
12555
- return e3.hasOwnProperty("id") ? e3.id : T(e3);
12556
- } catch (t2) {
12557
- return console.warn("[vue-select warn]: Could not stringify this option to generate unique key. Please provide'getOptionKey' prop to return a unique key for each option.\nhttps://vue-select.org/api/props.html#getoptionkey", e3, t2);
12558
- }
12559
- } }, onTab: { type: Function, default: function() {
12560
- this.selectOnTab && !this.isComposing && this.typeAheadSelect();
12561
- } }, taggable: { type: Boolean, default: false }, tabindex: { type: Number, default: null }, pushTags: { type: Boolean, default: false }, filterable: { type: Boolean, default: true }, filterBy: { type: Function, default: function(e3, t2, o2) {
12562
- return (t2 || "").toLocaleLowerCase().indexOf(o2.toLocaleLowerCase()) > -1;
12563
- } }, filter: { type: Function, default: function(e3, t2) {
12564
- var o2 = this;
12565
- return e3.filter(function(e4) {
12566
- var n2 = o2.getOptionLabel(e4);
12567
- return typeof n2 == "number" && (n2 = n2.toString()), o2.filterBy(e4, n2, t2);
12568
- });
12569
- } }, createOption: { type: Function, default: function(e3) {
12570
- return g()(this.optionList[0]) === "object" ? j()({}, this.label, e3) : e3;
12571
- } }, resetOnOptionsChange: { default: false, validator: function(e3) {
12572
- return ["function", "boolean"].includes(g()(e3));
12573
- } }, clearSearchOnBlur: { type: Function, default: function(e3) {
12574
- var t2 = e3.clearSearchOnSelect, o2 = e3.multiple;
12575
- return t2 && !o2;
12576
- } }, noDrop: { type: Boolean, default: false }, inputId: { type: String }, dir: { type: String, default: "auto" }, selectOnTab: { type: Boolean, default: false }, selectOnKeyCodes: { type: Array, default: function() {
12577
- return [13];
12578
- } }, searchInputQuerySelector: { type: String, default: "[type=search]" }, mapKeydown: { type: Function, default: function(e3, t2) {
12579
- return e3;
12580
- } }, appendToBody: { type: Boolean, default: false }, calculatePosition: { type: Function, default: function(e3, t2, o2) {
12581
- var n2 = o2.width, i2 = o2.top, r2 = o2.left;
12582
- e3.style.top = i2, e3.style.left = r2, e3.style.width = n2;
12583
- } }, dropdownShouldOpen: { type: Function, default: function(e3) {
12584
- var t2 = e3.noDrop, o2 = e3.open, n2 = e3.mutableLoading;
12585
- return !t2 && (o2 && !n2);
12586
- } }, uid: { type: [String, Number], default: function() {
12587
- return M();
12588
- } } }, data: function() {
12589
- return { search: "", open: false, isComposing: false, pushedTags: [], _value: [], deselectButtons: [] };
12590
- }, computed: { isReducingValues: function() {
12591
- return this.$props.reduce !== this.$options.props.reduce.default;
12592
- }, isTrackingValues: function() {
12593
- return this.modelValue === void 0 || this.isReducingValues;
12594
- }, selectedValue: function() {
12595
- var e3 = this.modelValue;
12596
- return this.isTrackingValues && (e3 = this.$data._value), e3 ? [].concat(e3) : [];
12597
- }, optionList: function() {
12598
- return this.options.concat(this.pushTags ? this.pushedTags : []);
12599
- }, searchEl: function() {
12600
- return this.$slots.search ? this.$refs.selectedOptions.querySelector(this.searchInputQuerySelector) : this.$refs.search;
12601
- }, scope: function() {
12602
- var e3 = this, t2 = { search: this.search, loading: this.loading, searching: this.searching, filteredOptions: this.filteredOptions };
12603
- return { search: { attributes: z({ disabled: this.disabled, placeholder: this.searchPlaceholder, tabindex: this.tabindex, readonly: !this.searchable, id: this.inputId, "aria-autocomplete": "list", "aria-labelledby": "vs".concat(this.uid, "__combobox"), "aria-controls": "vs".concat(this.uid, "__listbox"), ref: "search", type: "search", autocomplete: this.autocomplete, value: this.search }, this.dropdownOpen && this.filteredOptions[this.typeAheadPointer] ? { "aria-activedescendant": "vs".concat(this.uid, "__option-").concat(this.typeAheadPointer) } : {}), events: { compositionstart: function() {
12604
- return e3.isComposing = true;
12605
- }, compositionend: function() {
12606
- return e3.isComposing = false;
12607
- }, keydown: this.onSearchKeyDown, blur: this.onSearchBlur, focus: this.onSearchFocus, input: function(t3) {
12608
- return e3.search = t3.target.value;
12609
- } } }, spinner: { loading: this.mutableLoading }, noOptions: { search: this.search, loading: this.mutableLoading, searching: this.searching }, openIndicator: { attributes: { ref: "openIndicator", role: "presentation", class: "vs__open-indicator" } }, listHeader: t2, listFooter: t2, header: z({}, t2, { deselect: this.deselect }), footer: z({}, t2, { deselect: this.deselect }) };
12610
- }, childComponents: function() {
12611
- return z({}, A, {}, this.components);
12612
- }, stateClasses: function() {
12613
- return { "vs--open": this.dropdownOpen, "vs--single": !this.multiple, "vs--multiple": this.multiple, "vs--searching": this.searching && !this.noDrop, "vs--searchable": this.searchable && !this.noDrop, "vs--unsearchable": !this.searchable, "vs--loading": this.mutableLoading, "vs--disabled": this.disabled };
12614
- }, searching: function() {
12615
- return !!this.search;
12616
- }, dropdownOpen: function() {
12617
- return this.dropdownShouldOpen(this);
12618
- }, searchPlaceholder: function() {
12619
- return this.isValueEmpty && this.placeholder ? this.placeholder : void 0;
12620
- }, filteredOptions: function() {
12621
- var e3 = [].concat(this.optionList);
12622
- if (!this.filterable && !this.taggable)
12623
- return e3;
12624
- var t2 = this.search.length ? this.filter(e3, this.search, this) : e3;
12625
- if (this.taggable && this.search.length) {
12626
- var o2 = this.createOption(this.search);
12627
- this.optionExists(o2) || t2.unshift(o2);
12628
- }
12629
- return t2;
12630
- }, isValueEmpty: function() {
12631
- return this.selectedValue.length === 0;
12632
- }, showClearButton: function() {
12633
- return !this.multiple && this.clearable && !this.open && !this.isValueEmpty;
12634
- } }, watch: { options: function(e3, t2) {
12635
- var o2 = this;
12636
- !this.taggable && (typeof o2.resetOnOptionsChange == "function" ? o2.resetOnOptionsChange(e3, t2, o2.selectedValue) : o2.resetOnOptionsChange) && this.clearSelection(), this.modelValue && this.isTrackingValues && this.setInternalValueFromOptions(this.modelValue);
12637
- }, modelValue: { immediate: true, handler: function(e3) {
12638
- this.isTrackingValues && this.setInternalValueFromOptions(e3);
12639
- } }, multiple: function() {
12640
- this.clearSelection();
12641
- }, open: function(e3) {
12642
- this.$emit(e3 ? "open" : "close");
12643
- } }, created: function() {
12644
- this.mutableLoading = this.loading;
12645
- }, methods: { setInternalValueFromOptions: function(e3) {
12646
- var t2 = this;
12647
- Array.isArray(e3) ? this.$data._value = e3.map(function(e4) {
12648
- return t2.findOptionFromReducedValue(e4);
12649
- }) : this.$data._value = this.findOptionFromReducedValue(e3);
12650
- }, select: function(e3) {
12651
- this.$emit("option:selecting", e3), this.isOptionSelected(e3) ? this.deselectFromDropdown && (this.clearable || this.multiple && this.selectedValue.length > 1) && this.deselect(e3) : (this.taggable && !this.optionExists(e3) && (this.$emit("option:created", e3), this.pushTag(e3)), this.multiple && (e3 = this.selectedValue.concat(e3)), this.updateValue(e3), this.$emit("option:selected", e3)), this.onAfterSelect(e3);
12652
- }, deselect: function(e3) {
12653
- var t2 = this;
12654
- this.$emit("option:deselecting", e3), this.updateValue(this.selectedValue.filter(function(o2) {
12655
- return !t2.optionComparator(o2, e3);
12656
- })), this.$emit("option:deselected", e3);
12657
- }, clearSelection: function() {
12658
- this.updateValue(this.multiple ? [] : null);
12659
- }, onAfterSelect: function(e3) {
12660
- this.closeOnSelect && (this.open = !this.open, this.searchEl.blur()), this.clearSearchOnSelect && (this.search = "");
12661
- }, updateValue: function(e3) {
12662
- var t2 = this;
12663
- this.modelValue === void 0 && (this.$data._value = e3), e3 !== null && (e3 = Array.isArray(e3) ? e3.map(function(e4) {
12664
- return t2.reduce(e4);
12665
- }) : this.reduce(e3)), this.$emit("update:modelValue", e3);
12666
- }, toggleDropdown: function(e3) {
12667
- var t2 = e3.target !== this.searchEl;
12668
- t2 && e3.preventDefault();
12669
- var o2 = [].concat(m()(this.deselectButtons || []), m()([this.$refs.clearButton]));
12670
- this.searchEl === void 0 || o2.filter(Boolean).some(function(t3) {
12671
- return t3.contains(e3.target) || t3 === e3.target;
12672
- }) ? e3.preventDefault() : this.open && t2 ? this.searchEl.blur() : this.disabled || (this.open = true, this.searchEl.focus());
12673
- }, isOptionSelected: function(e3) {
12674
- var t2 = this;
12675
- return this.selectedValue.some(function(o2) {
12676
- return t2.optionComparator(o2, e3);
12677
- });
12678
- }, isOptionDeselectable: function(e3) {
12679
- return this.isOptionSelected(e3) && this.deselectFromDropdown;
12680
- }, optionComparator: function(e3, t2) {
12681
- return this.getOptionKey(e3) === this.getOptionKey(t2);
12682
- }, findOptionFromReducedValue: function(e3) {
12683
- var t2 = this, o2 = [].concat(m()(this.options), m()(this.pushedTags)).filter(function(o3) {
12684
- return JSON.stringify(t2.reduce(o3)) === JSON.stringify(e3);
12685
- });
12686
- return o2.length === 1 ? o2[0] : o2.find(function(e4) {
12687
- return t2.optionComparator(e4, t2.$data._value);
12688
- }) || e3;
12689
- }, closeSearchOptions: function() {
12690
- this.open = false, this.$emit("search:blur");
12691
- }, maybeDeleteValue: function() {
12692
- if (!this.searchEl.value.length && this.selectedValue && this.selectedValue.length && this.clearable) {
12693
- var e3 = null;
12694
- this.multiple && (e3 = m()(this.selectedValue.slice(0, this.selectedValue.length - 1))), this.updateValue(e3);
12695
- }
12696
- }, optionExists: function(e3) {
12697
- var t2 = this;
12698
- return this.optionList.some(function(o2) {
12699
- return t2.optionComparator(o2, e3);
12700
- });
12701
- }, normalizeOptionForSlot: function(e3) {
12702
- return g()(e3) === "object" ? e3 : j()({}, this.label, e3);
12703
- }, pushTag: function(e3) {
12704
- this.pushedTags.push(e3);
12705
- }, onEscape: function() {
12706
- this.search.length ? this.search = "" : this.searchEl.blur();
12707
- }, onSearchBlur: function() {
12708
- if (!this.mousedown || this.searching) {
12709
- var e3 = this.clearSearchOnSelect, t2 = this.multiple;
12710
- return this.clearSearchOnBlur({ clearSearchOnSelect: e3, multiple: t2 }) && (this.search = ""), void this.closeSearchOptions();
12711
- }
12712
- this.mousedown = false, this.search.length !== 0 || this.options.length !== 0 || this.closeSearchOptions();
12713
- }, onSearchFocus: function() {
12714
- this.open = true, this.$emit("search:focus");
12715
- }, onMousedown: function() {
12716
- this.mousedown = true;
12717
- }, onMouseUp: function() {
12718
- this.mousedown = false;
12719
- }, onSearchKeyDown: function(e3) {
12720
- var t2 = this, o2 = function(e4) {
12721
- return e4.preventDefault(), !t2.isComposing && t2.typeAheadSelect();
12722
- }, n2 = { 8: function(e4) {
12723
- return t2.maybeDeleteValue();
12724
- }, 9: function(e4) {
12725
- return t2.onTab();
12726
- }, 27: function(e4) {
12727
- return t2.onEscape();
12728
- }, 38: function(e4) {
12729
- return e4.preventDefault(), t2.typeAheadUp();
12730
- }, 40: function(e4) {
12731
- return e4.preventDefault(), t2.typeAheadDown();
12732
- } };
12733
- this.selectOnKeyCodes.forEach(function(e4) {
12734
- return n2[e4] = o2;
12735
- });
12736
- var i2 = this.mapKeydown(n2, this);
12737
- if (typeof i2[e3.keyCode] == "function")
12738
- return i2[e3.keyCode](e3);
12739
- } } };
12740
- o(9);
12741
- var I = k()(R, [["render", function(e3, t2, o2, O2, m2, y2) {
12742
- const g2 = Object(n.resolveDirective)("append-to-body");
12743
- return Object(n.openBlock)(), Object(n.createElementBlock)("div", { dir: o2.dir, class: Object(n.normalizeClass)(["v-select", y2.stateClasses]) }, [Object(n.renderSlot)(e3.$slots, "header", Object(n.normalizeProps)(Object(n.guardReactiveProps)(y2.scope.header))), Object(n.createElementVNode)("div", { id: `vs${o2.uid}__combobox`, ref: "toggle", class: "vs__dropdown-toggle", role: "combobox", "aria-expanded": y2.dropdownOpen.toString(), "aria-owns": `vs${o2.uid}__listbox`, "aria-label": "Search for option", onMousedown: t2[1] || (t2[1] = (e4) => y2.toggleDropdown(e4)) }, [Object(n.createElementVNode)("div", s, [(Object(n.openBlock)(true), Object(n.createElementBlock)(n.Fragment, null, Object(n.renderList)(y2.selectedValue, (t3, i2) => Object(n.renderSlot)(e3.$slots, "selected-option-container", { option: y2.normalizeOptionForSlot(t3), deselect: y2.deselect, multiple: o2.multiple, disabled: o2.disabled }, () => [(Object(n.openBlock)(), Object(n.createElementBlock)("span", { key: o2.getOptionKey(t3), class: "vs__selected" }, [Object(n.renderSlot)(e3.$slots, "selected-option", Object(n.normalizeProps)(Object(n.guardReactiveProps)(y2.normalizeOptionForSlot(t3))), () => [Object(n.createTextVNode)(Object(n.toDisplayString)(o2.getOptionLabel(t3)), 1)]), o2.multiple ? (Object(n.openBlock)(), Object(n.createElementBlock)("button", { key: 0, ref: "deselectButtons", disabled: o2.disabled, type: "button", class: "vs__deselect", title: `Deselect ${o2.getOptionLabel(t3)}`, "aria-label": `Deselect ${o2.getOptionLabel(t3)}`, onClick: (e4) => y2.deselect(t3) }, [(Object(n.openBlock)(), Object(n.createBlock)(Object(n.resolveDynamicComponent)(y2.childComponents.Deselect)))], 8, l)) : Object(n.createCommentVNode)("", true)]))])), 256)), Object(n.renderSlot)(e3.$slots, "search", Object(n.normalizeProps)(Object(n.guardReactiveProps)(y2.scope.search)), () => [Object(n.createElementVNode)("input", Object(n.mergeProps)({ class: "vs__search" }, y2.scope.search.attributes, Object(n.toHandlers)(y2.scope.search.events)), null, 16)])], 512), Object(n.createElementVNode)("div", c, [Object(n.withDirectives)(Object(n.createElementVNode)("button", { ref: "clearButton", disabled: o2.disabled, type: "button", class: "vs__clear", title: "Clear Selected", "aria-label": "Clear Selected", onClick: t2[0] || (t2[0] = (...e4) => y2.clearSelection && y2.clearSelection(...e4)) }, [(Object(n.openBlock)(), Object(n.createBlock)(Object(n.resolveDynamicComponent)(y2.childComponents.Deselect)))], 8, a), [[n.vShow, y2.showClearButton]]), Object(n.renderSlot)(e3.$slots, "open-indicator", Object(n.normalizeProps)(Object(n.guardReactiveProps)(y2.scope.openIndicator)), () => [o2.noDrop ? Object(n.createCommentVNode)("", true) : (Object(n.openBlock)(), Object(n.createBlock)(Object(n.resolveDynamicComponent)(y2.childComponents.OpenIndicator), Object(n.normalizeProps)(Object(n.mergeProps)({ key: 0 }, y2.scope.openIndicator.attributes)), null, 16))]), Object(n.renderSlot)(e3.$slots, "spinner", Object(n.normalizeProps)(Object(n.guardReactiveProps)(y2.scope.spinner)), () => [Object(n.withDirectives)(Object(n.createElementVNode)("div", u, "Loading...", 512), [[n.vShow, e3.mutableLoading]])])], 512)], 40, r), Object(n.createVNode)(n.Transition, { name: o2.transition }, { default: Object(n.withCtx)(() => [y2.dropdownOpen ? Object(n.withDirectives)((Object(n.openBlock)(), Object(n.createElementBlock)("ul", { id: `vs${o2.uid}__listbox`, ref: "dropdownMenu", key: `vs${o2.uid}__listbox`, class: "vs__dropdown-menu", role: "listbox", tabindex: "-1", onMousedown: t2[2] || (t2[2] = Object(n.withModifiers)((...e4) => y2.onMousedown && y2.onMousedown(...e4), ["prevent"])), onMouseup: t2[3] || (t2[3] = (...e4) => y2.onMouseUp && y2.onMouseUp(...e4)) }, [Object(n.renderSlot)(e3.$slots, "list-header", Object(n.normalizeProps)(Object(n.guardReactiveProps)(y2.scope.listHeader))), (Object(n.openBlock)(true), Object(n.createElementBlock)(n.Fragment, null, Object(n.renderList)(y2.filteredOptions, (t3, i2) => (Object(n.openBlock)(), Object(n.createElementBlock)("li", { id: `vs${o2.uid}__option-${i2}`, key: o2.getOptionKey(t3), role: "option", class: Object(n.normalizeClass)(["vs__dropdown-option", { "vs__dropdown-option--deselect": y2.isOptionDeselectable(t3) && i2 === e3.typeAheadPointer, "vs__dropdown-option--selected": y2.isOptionSelected(t3), "vs__dropdown-option--highlight": i2 === e3.typeAheadPointer, "vs__dropdown-option--disabled": !o2.selectable(t3) }]), "aria-selected": i2 === e3.typeAheadPointer || null, onMouseover: (n2) => o2.selectable(t3) ? e3.typeAheadPointer = i2 : null, onClick: Object(n.withModifiers)((e4) => o2.selectable(t3) ? y2.select(t3) : null, ["prevent", "stop"]) }, [Object(n.renderSlot)(e3.$slots, "option", Object(n.normalizeProps)(Object(n.guardReactiveProps)(y2.normalizeOptionForSlot(t3))), () => [Object(n.createTextVNode)(Object(n.toDisplayString)(o2.getOptionLabel(t3)), 1)])], 42, d2))), 128)), y2.filteredOptions.length === 0 ? (Object(n.openBlock)(), Object(n.createElementBlock)("li", h2, [Object(n.renderSlot)(e3.$slots, "no-options", Object(n.normalizeProps)(Object(n.guardReactiveProps)(y2.scope.noOptions)), () => [f])])) : Object(n.createCommentVNode)("", true), Object(n.renderSlot)(e3.$slots, "list-footer", Object(n.normalizeProps)(Object(n.guardReactiveProps)(y2.scope.listFooter)))], 40, p)), [[g2]]) : (Object(n.openBlock)(), Object(n.createElementBlock)("ul", { key: 1, id: `vs${o2.uid}__listbox`, role: "listbox", style: { display: "none", visibility: "hidden" } }, null, 8, b))]), _: 3 }, 8, ["name"]), Object(n.renderSlot)(e3.$slots, "footer", Object(n.normalizeProps)(Object(n.guardReactiveProps)(y2.scope.footer)))], 10, i);
12744
- }]]), K = { ajax: _, pointer: S, pointerScroll: w2 };
12745
- o.d(t, "VueSelect", function() {
12746
- return I;
12747
- }), o.d(t, "mixins", function() {
12748
- return K;
12749
- });
12750
- t.default = I;
12751
- }]);
12752
- });
12753
- })(vueSelect$1);
12754
- var vSelect = /* @__PURE__ */ getDefaultExportFromCjs(vueSelect$1.exports);
12755
- var vueSelect = "";
12756
- const _hoisted_1$7 = { slot: "no-options" };
12372
+ const qmStr = {
12373
+ capitalize(str) {
12374
+ return str.charAt(0).toUpperCase() + str.slice(1);
12375
+ },
12376
+ checkContainsStr(str, subStr) {
12377
+ str = qmStr.cleanStr(str);
12378
+ subStr = qmStr.cleanStr(subStr);
12379
+ return str.includes(subStr);
12380
+ },
12381
+ cleanStr(str) {
12382
+ if (!str)
12383
+ return "";
12384
+ str = qmStr.removeWhiteSpaces(str);
12385
+ str = qmStr.removeDiacritics(str);
12386
+ str = str.toLowerCase();
12387
+ return str;
12388
+ },
12389
+ padZeros(num, size = 2) {
12390
+ return `000000000${num}`.substr(-size);
12391
+ },
12392
+ removeDiacritics(str) {
12393
+ return str.normalize("NFD").replace(/([^n\u0300-\u036f]|n(?!\u0303(?![\u0300-\u036f])))[\u0300-\u036f]+/gi, "$1").normalize();
12394
+ },
12395
+ removeWhiteSpaces(str) {
12396
+ str = str.trim();
12397
+ str = str.replace(/\s\s+/g, " ");
12398
+ return str;
12399
+ },
12400
+ reverseString(str) {
12401
+ str = String(str);
12402
+ const splitString = str.split("");
12403
+ const reverseArray = splitString.reverse();
12404
+ const joinArray = reverseArray.join("");
12405
+ return joinArray;
12406
+ }
12407
+ };
12408
+ const _hoisted_1$7 = {
12409
+ class: "ck-select",
12410
+ action: "/action_page.php",
12411
+ method: "get"
12412
+ };
12413
+ const _hoisted_2$3 = ["placeholder"];
12414
+ const _hoisted_3$2 = { id: "ck-select__list" };
12415
+ const _hoisted_4 = ["value"];
12757
12416
  function render$a(_ctx, _cache, $props, $setup, $data, $options) {
12758
- const _component_v_select = resolveComponent("v-select");
12759
- return openBlock(), createElementBlock("div", {
12760
- class: "ck-select",
12761
- style: normalizeStyle($options.computedStyle)
12762
- }, [
12763
- createElementVNode("div", null, toDisplayString($props.options), 1),
12764
- createVNode(_component_v_select, {
12765
- class: "ck-select__v-select",
12766
- ref: "vSelect",
12767
- modelValue: $options.value,
12768
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $options.value = $event),
12769
- label: $props.prop,
12770
- options: $props.options,
12771
- disabled: !!$props.disabled,
12772
- reduce: $options.realReduceFunction,
12773
- clearable: !$props.notClearable && !$options.valueIsDefault,
12774
- searchable: $options.realSearchable
12417
+ const _component_ck_label = resolveComponent("ck-label");
12418
+ return openBlock(), createElementBlock("form", _hoisted_1$7, [
12419
+ $props.label ? (openBlock(), createBlock(_component_ck_label, {
12420
+ key: 0,
12421
+ align: $props.labelAlign,
12422
+ for: "ck-select"
12775
12423
  }, {
12776
12424
  default: withCtx(() => [
12777
- createElementVNode("span", _hoisted_1$7, toDisplayString($props.noDataText), 1)
12425
+ createTextVNode(toDisplayString($props.label), 1)
12778
12426
  ]),
12779
12427
  _: 1
12780
- }, 8, ["modelValue", "label", "options", "disabled", "reduce", "clearable", "searchable"])
12781
- ], 4);
12428
+ }, 8, ["align"])) : createCommentVNode("", true),
12429
+ createElementVNode("input", {
12430
+ list: "ck-select__list",
12431
+ name: "ck-select",
12432
+ id: "ck-select",
12433
+ placeholder: $data.lastSelectedValue,
12434
+ class: normalizeClass($options.computedClass),
12435
+ onFocus: _cache[0] || (_cache[0] = ($event) => $options.onFocus($event)),
12436
+ onBlur: _cache[1] || (_cache[1] = ($event) => $options.onBlur($event))
12437
+ }, null, 42, _hoisted_2$3),
12438
+ createElementVNode("datalist", _hoisted_3$2, [
12439
+ (openBlock(true), createElementBlock(Fragment, null, renderList($props.options, (option) => {
12440
+ return openBlock(), createElementBlock("option", {
12441
+ value: option.name
12442
+ }, null, 8, _hoisted_4);
12443
+ }), 256))
12444
+ ])
12445
+ ]);
12782
12446
  }
12783
12447
  var ckSelect_vue_vue_type_style_index_0_scoped_true_lang = "";
12784
12448
  const _sfc_main$9 = {
12785
12449
  name: "CkSelect",
12786
12450
  components: {
12787
- vSelect
12451
+ ckLabel
12788
12452
  },
12789
12453
  props: {
12790
12454
  modelValue: { default: null, type: [Boolean, Number, Object, Array] },
@@ -12808,6 +12472,12 @@ const _sfc_main$9 = {
12808
12472
  labelAlign: { type: String, default: "" }
12809
12473
  },
12810
12474
  emits: ["update:modelValue"],
12475
+ data() {
12476
+ return {
12477
+ search: "",
12478
+ lastSelectedValue: null
12479
+ };
12480
+ },
12811
12481
  computed: {
12812
12482
  value: {
12813
12483
  get() {
@@ -12819,6 +12489,12 @@ const _sfc_main$9 = {
12819
12489
  this.$emit("update:modelValue", val);
12820
12490
  }
12821
12491
  },
12492
+ filteredOptions() {
12493
+ return this.options.filter((option) => {
12494
+ const name = this.getOptionName(option);
12495
+ return qmStr.checkContainsStr(name, this.search);
12496
+ });
12497
+ },
12822
12498
  computedClass() {
12823
12499
  const classList2 = [];
12824
12500
  classList2.push(functions$1.getGroupClass(this));
@@ -12871,21 +12547,40 @@ const _sfc_main$9 = {
12871
12547
  }
12872
12548
  },
12873
12549
  methods: {
12874
- realReduceFunction(Option) {
12550
+ onBlur(event) {
12551
+ const isValid = this.checkOptionsIsValid(event.target.value);
12552
+ if (!isValid)
12553
+ event.target.value = this.lastSelectedValue;
12554
+ this.lastSelectedValue = null;
12555
+ },
12556
+ onFocus(event) {
12557
+ this.lastSelectedValue = event.target.value;
12558
+ event.target.value = "";
12559
+ },
12560
+ checkOptionsIsValid(optionName) {
12561
+ if (!optionName)
12562
+ return;
12563
+ return this.options.some((i) => this.getOptionName(i) === optionName);
12564
+ },
12565
+ getOptionKey(option) {
12566
+ return this.realReduceFunction(option);
12567
+ },
12568
+ getOptionName(option) {
12569
+ if (!this.prop)
12570
+ return option;
12571
+ return option[this.prop];
12572
+ },
12573
+ realReduceFunction(option) {
12875
12574
  if (this.notReduce)
12876
- return Option;
12877
- return this.reduceFunction(Option);
12575
+ return option;
12576
+ return this.reduceFunction(option);
12878
12577
  },
12879
12578
  setFocus() {
12880
- const el = this.$refs.vSelect.$el.children[0].children[0].children[1];
12881
- setTimeout(() => {
12882
- el.focus();
12883
- }, 100);
12884
12579
  }
12885
12580
  }
12886
12581
  };
12887
- var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", render$a], ["__scopeId", "data-v-069e50be"]]);
12888
- const _withScopeId = (n) => (pushScopeId("data-v-6f20f256"), n = n(), popScopeId(), n);
12582
+ var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", render$a], ["__scopeId", "data-v-7751c2da"]]);
12583
+ const _withScopeId = (n) => (pushScopeId("data-v-2da281ed"), n = n(), popScopeId(), n);
12889
12584
  const _hoisted_1$6 = ["disabled"];
12890
12585
  const _hoisted_2$2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "ck-switch__slider" }, null, -1));
12891
12586
  const _hoisted_3$1 = {
@@ -12958,7 +12653,7 @@ const _sfc_main$8 = {
12958
12653
  }
12959
12654
  }
12960
12655
  };
12961
- var ckSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", render$9], ["__scopeId", "data-v-6f20f256"]]);
12656
+ var ckSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", render$9], ["__scopeId", "data-v-2da281ed"]]);
12962
12657
  const _hoisted_1$5 = { class: "ck-switch-options__container-exterior" };
12963
12658
  const _hoisted_2$1 = ["onClick"];
12964
12659
  function render$8(_ctx, _cache, $props, $setup, $data, $options) {
@@ -12999,8 +12694,10 @@ const _sfc_main$7 = {
12999
12694
  notReduce: { type: Boolean, default: false },
13000
12695
  reduceFunction: { type: Function, default: (Option) => Option.id },
13001
12696
  label: { type: String, default: "" },
13002
- labelAlign: { type: String, default: "center" },
12697
+ labelAlign: { type: String, default: "" },
13003
12698
  group: { type: String, default: "" },
12699
+ groupBreak: { type: String, default: "s" },
12700
+ groupVertical: { type: String, default: "" },
13004
12701
  sameWidthOptions: { type: Boolean, default: false }
13005
12702
  },
13006
12703
  emits: ["update:modelValue", "change"],
@@ -13015,10 +12712,9 @@ const _sfc_main$7 = {
13015
12712
  }
13016
12713
  },
13017
12714
  computedClass() {
13018
- return {
13019
- "group-top": this.group === "top",
13020
- "group-bottom": this.group === "bottom"
13021
- };
12715
+ const classList2 = [];
12716
+ classList2.push(functions$1.getGroupClass(this));
12717
+ return classList2;
13022
12718
  },
13023
12719
  computedItemStyle() {
13024
12720
  const list = [];
@@ -13035,7 +12731,7 @@ const _sfc_main$7 = {
13035
12731
  }
13036
12732
  }
13037
12733
  };
13038
- var ckSwitchOptions = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", render$8], ["__scopeId", "data-v-c097c88c"]]);
12734
+ var ckSwitchOptions = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", render$8], ["__scopeId", "data-v-2572a09c"]]);
13039
12735
  const _hoisted_1$4 = { class: "ck-tr" };
13040
12736
  function render$7(_ctx, _cache) {
13041
12737
  return openBlock(), createElementBlock("tr", _hoisted_1$4, [
@@ -13078,7 +12774,7 @@ const _sfc_main$5 = {
13078
12774
  }
13079
12775
  }
13080
12776
  };
13081
- var ckTh = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", render$6], ["__scopeId", "data-v-6841da4d"]]);
12777
+ var ckTh = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", render$6], ["__scopeId", "data-v-e9943550"]]);
13082
12778
  function render$5(_ctx, _cache, $props, $setup, $data, $options) {
13083
12779
  const _component_ck_th = resolveComponent("ck-th");
13084
12780
  return $options.isVisible ? (openBlock(), createBlock(_component_ck_th, {