@webilio-xyz/webilio-vue 1.1.4 → 1.1.6

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/Component.js CHANGED
@@ -3,7 +3,7 @@ import { B as M } from "./ButtonComponent-DOEH129x.js";
3
3
  import { _ as R } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  import "laravel-vue-i18n";
5
5
  import "@vuepic/vue-datepicker";
6
- import { u as Z, _ as G, E as K } from "./LabelComponent-CfsH2P2a.js";
6
+ import { u as Z, _ as G, E as K } from "./LabelComponent-G6wxDGoZ.js";
7
7
  import { AkCloudUpload as W, AkChevronRightSmall as X, AkChevronDownSmall as Q, AkSend as Y } from "@kalimahapps/vue-icons";
8
8
  import { d as ee } from "./debounce-C1ND-yYU.js";
9
9
  import { a as te } from "./isObject-BD_iszZg.js";
package/dist/Input.js CHANGED
@@ -1,7 +1,7 @@
1
- import { computed as v, withDirectives as U, openBlock as b, createElementBlock as S, vModelCheckbox as J, ref as A, onMounted as M, renderSlot as y, createCommentVNode as N, createElementVNode as D, normalizeClass as V, unref as z, Fragment as se, createBlock as C, createVNode as L, normalizeStyle as ue, createSlots as q, withCtx as h, createTextVNode as E, toDisplayString as B, normalizeProps as oe, guardReactiveProps as ie } from "vue";
1
+ import { computed as v, withDirectives as U, openBlock as b, createElementBlock as S, vModelCheckbox as J, ref as A, onMounted as M, normalizeClass as V, renderSlot as y, createCommentVNode as N, createElementVNode as D, unref as z, Fragment as se, createBlock as C, createVNode as L, normalizeStyle as ue, createSlots as q, withCtx as h, createTextVNode as E, toDisplayString as B, normalizeProps as ie, guardReactiveProps as oe } from "vue";
2
2
  import { trans as re, isLoaded as de, getActiveLanguage as me } from "laravel-vue-i18n";
3
3
  import ce from "@vuepic/vue-datepicker";
4
- import { s as pe, u as H, _ as K, E as Q } from "./LabelComponent-CfsH2P2a.js";
4
+ import { s as pe, u as H, _ as K, E as Q } from "./LabelComponent-G6wxDGoZ.js";
5
5
  import { _ as X } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
6
  import { a as fe } from "./toString-CykDHNcE.js";
7
7
  import { b as ge } from "./_baseIteratee-r_6HOn93.js";
@@ -25,8 +25,8 @@ const Y = {
25
25
  l("update:checked", u), l("update:modelValue", u);
26
26
  }
27
27
  });
28
- return (u, i) => U((b(), S("input", {
29
- "onUpdate:modelValue": i[0] || (i[0] = (o) => s.value = o),
28
+ return (u, o) => U((b(), S("input", {
29
+ "onUpdate:modelValue": o[0] || (o[0] = (i) => s.value = i),
30
30
  type: "checkbox",
31
31
  class: "wv-input wv-checkbox-input rounded border-gray-300 text-indigo-600 shadow-sm focus:ring-indigo-500"
32
32
  }, null, 512)), [
@@ -47,18 +47,18 @@ const j = {
47
47
  roundingMode: "trunc"
48
48
  });
49
49
  }, xe = (e, a = !0, l) => {
50
- var t, s, u, i;
51
- const o = ((t = l.number) == null ? void 0 : t.unsigned) == null && e.startsWith("-") ? "-" : "", n = ((s = l.number) == null ? void 0 : s.fraction) ?? 0;
50
+ var t, s, u, o;
51
+ const i = ((t = l.number) == null ? void 0 : t.unsigned) == null && e.startsWith("-") ? "-" : "", n = ((s = l.number) == null ? void 0 : s.fraction) ?? 0;
52
52
  let d = G(0, n, l);
53
- const f = d.formatToParts(1000.12), g = ((u = f.find((r) => r.type === "group")) == null ? void 0 : u.value) ?? " ", m = ((i = f.find((r) => r.type === "decimal")) == null ? void 0 : i.value) ?? ".", p = Z(e, g, m);
54
- if (p === "" || Number.isNaN(p)) return o;
53
+ const f = d.formatToParts(1000.12), g = ((u = f.find((r) => r.type === "group")) == null ? void 0 : u.value) ?? " ", m = ((o = f.find((r) => r.type === "decimal")) == null ? void 0 : o.value) ?? ".", p = Z(e, g, m);
54
+ if (p === "" || Number.isNaN(p)) return i;
55
55
  const x = p.split(".");
56
56
  if (x[1] != null && x[1].length >= 1) {
57
57
  const r = x[1].length <= n ? x[1].length : n;
58
58
  d = G(r, n, l);
59
59
  }
60
60
  let c = d.format(parseFloat(p));
61
- return a ? n > 0 && p.endsWith(".") && !p.slice(0, -1).includes(".") && (c += m) : c = Z(c, g, m), o + c;
61
+ return a ? n > 0 && p.endsWith(".") && !p.slice(0, -1).includes(".") && (c += m) : c = Z(c, g, m), i + c;
62
62
  };
63
63
  class Ve {
64
64
  constructor(a = {}) {
@@ -112,14 +112,14 @@ class Ve {
112
112
  if (l == null) return a;
113
113
  const s = `v=${a},mr=${l},m=${t ? 1 : 0}`;
114
114
  if (this.memo.has(s)) return this.memo.get(s);
115
- const { mask: u, escaped: i } = this.escapeMask(l), o = [], n = this.opts.tokens != null ? this.opts.tokens : {}, d = this.isReversed() ? -1 : 1, f = this.isReversed() ? "unshift" : "push", g = this.isReversed() ? 0 : u.length - 1, m = this.isReversed() ? () => r > -1 && k > -1 : () => r < u.length && k < a.length, p = ($) => !this.isReversed() && $ <= g || this.isReversed() && $ >= g;
115
+ const { mask: u, escaped: o } = this.escapeMask(l), i = [], n = this.opts.tokens != null ? this.opts.tokens : {}, d = this.isReversed() ? -1 : 1, f = this.isReversed() ? "unshift" : "push", g = this.isReversed() ? 0 : u.length - 1, m = this.isReversed() ? () => r > -1 && k > -1 : () => r < u.length && k < a.length, p = ($) => !this.isReversed() && $ <= g || this.isReversed() && $ >= g;
116
116
  let x, c = -1, r = this.isReversed() ? u.length - 1 : 0, k = this.isReversed() ? a.length - 1 : 0, P = !1;
117
117
  for (; m(); ) {
118
118
  const $ = u.charAt(r), w = n[$], I = (w == null ? void 0 : w.transform) != null ? w.transform(a.charAt(k)) : a.charAt(k);
119
- if (!i.includes(r) && w != null ? (I.match(w.pattern) != null ? (o[f](I), w.repeated ? (c === -1 ? c = r : r === g && r !== c && (r = c - d), g === c && (r -= d)) : w.multiple && (P = !0, r -= d), r += d) : w.multiple ? P && (r += d, k -= d, P = !1) : I === x ? x = void 0 : w.optional && (r += d, k -= d), k += d) : (t && !this.isEager() && o[f]($), I === $ && !this.isEager() ? k += d : x = $, this.isEager() || (r += d)), this.isEager())
120
- for (; p(r) && (n[u.charAt(r)] == null || i.includes(r)); ) {
119
+ if (!o.includes(r) && w != null ? (I.match(w.pattern) != null ? (i[f](I), w.repeated ? (c === -1 ? c = r : r === g && r !== c && (r = c - d), g === c && (r -= d)) : w.multiple && (P = !0, r -= d), r += d) : w.multiple ? P && (r += d, k -= d, P = !1) : I === x ? x = void 0 : w.optional && (r += d, k -= d), k += d) : (t && !this.isEager() && i[f]($), I === $ && !this.isEager() ? k += d : x = $, this.isEager() || (r += d)), this.isEager())
120
+ for (; p(r) && (n[u.charAt(r)] == null || o.includes(r)); ) {
121
121
  if (t) {
122
- if (o[f](u.charAt(r)), a.charAt(k) === u.charAt(r)) {
122
+ if (i[f](u.charAt(r)), a.charAt(k) === u.charAt(r)) {
123
123
  r += d, k += d;
124
124
  continue;
125
125
  }
@@ -127,7 +127,7 @@ class Ve {
127
127
  r += d;
128
128
  }
129
129
  }
130
- return this.memo.set(s, o.join("")), this.memo.get(s);
130
+ return this.memo.set(s, i.join("")), this.memo.get(s);
131
131
  }
132
132
  }
133
133
  const _ = (e) => JSON.parse(e.replaceAll("'", '"')), we = (e, a = {}) => {
@@ -154,8 +154,8 @@ class $e {
154
154
  R(this, "items", /* @__PURE__ */ new Map()), R(this, "onInput", (t) => {
155
155
  if (t instanceof CustomEvent && t.type === "input")
156
156
  return;
157
- const s = t.target, u = this.items.get(s), i = "inputType" in t && t.inputType.startsWith("delete"), o = u.isEager(), n = i && o && u.unmasked(s.value) === "" ? "" : s.value;
158
- this.fixCursor(s, i, () => this.setValue(s, n));
157
+ const s = t.target, u = this.items.get(s), o = "inputType" in t && t.inputType.startsWith("delete"), i = u.isEager(), n = o && i && u.unmasked(s.value) === "" ? "" : s.value;
158
+ this.fixCursor(s, o, () => this.setValue(s, n));
159
159
  }), this.options = l, this.init(this.getInputs(a));
160
160
  }
161
161
  update(a = {}) {
@@ -187,9 +187,9 @@ class $e {
187
187
  fixCursor(a, l, t) {
188
188
  const s = a.selectionStart, u = a.value;
189
189
  if (t(), s === null || s === u.length && !l) return;
190
- const i = a.value, o = u.slice(0, s), n = i.slice(0, s), d = this.processInput(a, o).unmasked, f = this.processInput(a, n).unmasked;
190
+ const o = a.value, i = u.slice(0, s), n = o.slice(0, s), d = this.processInput(a, i).unmasked, f = this.processInput(a, n).unmasked;
191
191
  let g = s;
192
- o !== n && (g += l ? i.length - u.length : d.length - f.length), a.setSelectionRange(g, g);
192
+ i !== n && (g += l ? o.length - u.length : d.length - f.length), a.setSelectionRange(g, g);
193
193
  }
194
194
  setValue(a, l) {
195
195
  const t = this.processInput(a, l);
@@ -217,17 +217,17 @@ const F = /* @__PURE__ */ new WeakMap(), Ae = (e, a) => {
217
217
  if (t == null || (t == null ? void 0 : t.type) === "file") return;
218
218
  let s = {};
219
219
  if (a.value != null && (s = typeof a.value == "string" ? { mask: a.value } : { ...a.value }), a.arg != null) {
220
- const u = (i) => {
221
- const o = a.modifiers.unmasked ? i.unmasked : a.modifiers.completed ? i.completed : i.masked;
222
- Ae(a, o);
220
+ const u = (o) => {
221
+ const i = a.modifiers.unmasked ? o.unmasked : a.modifiers.completed ? o.completed : o.masked;
222
+ Ae(a, i);
223
223
  };
224
224
  s.onMaska = s.onMaska == null ? u : Array.isArray(s.onMaska) ? [...s.onMaska, u] : [s.onMaska, u];
225
225
  }
226
226
  F.has(t) ? (l = F.get(t)) == null || l.update(s) : F.set(t, new $e(t, s));
227
- }, Ie = { class: "wv-input wv-text-input-wrapper flex items-center border border-gray-300 focus-within:border-indigo-500 focus-within:ring-1 focus-within:ring-indigo-500 rounded-md shadow-sm" }, Te = {
227
+ }, Ie = {
228
228
  key: 0,
229
229
  class: "wv-text-input-prefix flex items-center pl-2"
230
- }, Ee = ["type", "inputmode", "value", "min", "max", "step"], Be = {
230
+ }, Te = ["disabled", "inputmode", "max", "min", "step", "type", "value"], Ee = {
231
231
  key: 1,
232
232
  class: "wv-text-input-suffix flex items-center pr-2"
233
233
  }, W = {
@@ -255,11 +255,15 @@ const F = /* @__PURE__ */ new WeakMap(), Ae = (e, a) => {
255
255
  inputClass: {
256
256
  type: [String, Array, Object],
257
257
  default: null
258
+ },
259
+ disabled: {
260
+ type: Boolean,
261
+ default: !1
258
262
  }
259
263
  },
260
264
  emits: ["update:modelValue"],
261
265
  setup(e, { expose: a, emit: l }) {
262
- const t = e, s = l, u = v(() => t.type === "number"), i = v(() => u.value && t.precision !== null ? "text" : t.type), o = v(() => u.value && t.precision !== null ? "decimal" : null), n = v(() => t.step ? t.step : t.precision !== null ? Math.pow(10, -t.precision).toFixed(t.precision) : null), d = (m) => {
266
+ const t = e, s = l, u = v(() => t.type === "number"), o = v(() => u.value && t.precision !== null ? "text" : t.type), i = v(() => u.value && t.precision !== null ? "decimal" : null), n = v(() => t.step ? t.step : t.precision !== null ? Math.pow(10, -t.precision).toFixed(t.precision) : null), d = (m) => {
263
267
  if (!u.value || m === "" || m === "-" || m === "." || m === "-.") return m;
264
268
  const p = parseFloat(m);
265
269
  return isNaN(p) ? m : t.min !== null && p < parseFloat(t.min) ? t.min : t.max !== null && p > parseFloat(t.max) ? t.max : m;
@@ -276,30 +280,33 @@ const F = /* @__PURE__ */ new WeakMap(), Ae = (e, a) => {
276
280
  }, g = A(null);
277
281
  return M(() => {
278
282
  g.value.hasAttribute("autofocus") && g.value.focus();
279
- }), a({ focus: () => g.value.focus() }), (m, p) => (b(), S("div", Ie, [
280
- m.$slots.prefix ? (b(), S("div", Te, [
283
+ }), a({ focus: () => g.value.focus() }), (m, p) => (b(), S("div", {
284
+ class: V(["wv-input wv-text-input-wrapper flex items-center border border-gray-300 focus-within:border-indigo-500 focus-within:ring-1 focus-within:ring-indigo-500 rounded-md shadow-sm", { "disabled-input": e.disabled }])
285
+ }, [
286
+ m.$slots.prefix ? (b(), S("div", Ie, [
281
287
  y(m.$slots, "prefix")
282
288
  ])) : N("", !0),
283
289
  U(D("input", {
284
290
  ref_key: "input",
285
291
  ref: g,
286
- type: i.value,
287
- inputmode: o.value,
288
292
  class: V(["wv-text-input flex-1 border-0 focus:ring-0 disabled:bg-gray-200 px-1", e.inputClass]),
289
- value: e.modelValue,
290
- min: e.min,
293
+ disabled: e.disabled,
294
+ inputmode: i.value,
291
295
  max: e.max,
296
+ min: e.min,
292
297
  step: n.value,
298
+ type: o.value,
299
+ value: e.modelValue,
293
300
  onInput: f
294
- }, null, 42, Ee), [
301
+ }, null, 42, Te), [
295
302
  [z(Me), e.mask]
296
303
  ]),
297
- m.$slots.suffix ? (b(), S("div", Be, [
304
+ m.$slots.suffix ? (b(), S("div", Ee, [
298
305
  y(m.$slots, "suffix")
299
306
  ])) : N("", !0)
300
- ]));
307
+ ], 2));
301
308
  }
302
- }, Ne = {
309
+ }, Be = {
303
310
  __name: "DateComponent",
304
311
  props: {
305
312
  modelValue: String,
@@ -332,21 +339,21 @@ const F = /* @__PURE__ */ new WeakMap(), Ae = (e, a) => {
332
339
  ]));
333
340
  }, u = v(() => {
334
341
  let c = "yyyy/MM/dd";
335
- if (i.value && l)
342
+ if (o.value && l)
336
343
  try {
337
344
  const r = re("date.format").toString(), k = l.parse("29/10/1989", "P", /* @__PURE__ */ new Date());
338
345
  l.format(k, r), c = r;
339
346
  } catch {
340
347
  }
341
348
  return c;
342
- }), i = A(!1);
349
+ }), o = A(!1);
343
350
  M(async () => {
344
351
  await s();
345
352
  const c = setInterval(() => {
346
- de() && (i.value = !0, clearInterval(c));
353
+ de() && (o.value = !0, clearInterval(c));
347
354
  }, 50);
348
355
  });
349
- const o = v(() => me()), n = e, d = a, f = (c) => !c || !t ? null : Array.isArray(c) ? c.map((r) => t.fromZonedTime(r, Intl.DateTimeFormat().resolvedOptions().timeZone)) : t.fromZonedTime(c, Intl.DateTimeFormat().resolvedOptions().timeZone), g = v(() => f(n.modelValue)), m = v(() => f(n.min)), p = v(() => f(n.max)), x = (c) => {
356
+ const i = v(() => me()), n = e, d = a, f = (c) => !c || !t ? null : Array.isArray(c) ? c.map((r) => t.fromZonedTime(r, Intl.DateTimeFormat().resolvedOptions().timeZone)) : t.fromZonedTime(c, Intl.DateTimeFormat().resolvedOptions().timeZone), g = v(() => f(n.modelValue)), m = v(() => f(n.min)), p = v(() => f(n.max)), x = (c) => {
350
357
  d("update:modelValue", c);
351
358
  };
352
359
  return (c, r) => (b(), S(se, null, [
@@ -358,7 +365,7 @@ const F = /* @__PURE__ */ new WeakMap(), Ae = (e, a) => {
358
365
  "max-date": p.value,
359
366
  "enable-time-picker": e.enableTimePicker,
360
367
  format: u.value,
361
- locale: o.value,
368
+ locale: i.value,
362
369
  range: e.range,
363
370
  "select-text": c.$t("Select"),
364
371
  "cancel-text-text": c.$t("Cancel"),
@@ -375,7 +382,7 @@ const F = /* @__PURE__ */ new WeakMap(), Ae = (e, a) => {
375
382
  }, null, 8, ["model-value"])
376
383
  ], 64));
377
384
  }
378
- }, ee = /* @__PURE__ */ X(Ne, [["__scopeId", "data-v-75d7c74c"]]), Le = ["disabled"], Re = {
385
+ }, ee = /* @__PURE__ */ X(Be, [["__scopeId", "data-v-75d7c74c"]]), Ne = ["disabled"], Le = {
379
386
  __name: "ToggleComponent",
380
387
  props: {
381
388
  modelValue: {
@@ -399,20 +406,20 @@ const F = /* @__PURE__ */ new WeakMap(), Ae = (e, a) => {
399
406
  get() {
400
407
  return !!t.modelValue;
401
408
  },
402
- set(i) {
403
- t.disabled || (l("update:modelValue", i), l("update:checked", i));
409
+ set(o) {
410
+ t.disabled || (l("update:modelValue", o), l("update:checked", o));
404
411
  }
405
412
  });
406
- return (i, o) => (b(), S("label", {
413
+ return (o, i) => (b(), S("label", {
407
414
  class: V(["inline-flex items-center", { "cursor-pointer": !e.disabled }])
408
415
  }, [
409
416
  U(D("input", {
410
- "onUpdate:modelValue": o[0] || (o[0] = (n) => u.value = n),
417
+ "onUpdate:modelValue": i[0] || (i[0] = (n) => u.value = n),
411
418
  type: "checkbox",
412
419
  value: "",
413
420
  disabled: e.disabled,
414
421
  class: "sr-only peer"
415
- }, null, 8, Le), [
422
+ }, null, 8, Ne), [
416
423
  [J, u.value]
417
424
  ]),
418
425
  D("div", {
@@ -425,15 +432,15 @@ const F = /* @__PURE__ */ new WeakMap(), Ae = (e, a) => {
425
432
  }, null, 6)
426
433
  ], 2));
427
434
  }
428
- }, te = /* @__PURE__ */ X(Re, [["__scopeId", "data-v-d62d3d36"]]);
429
- function Pe(e, a) {
435
+ }, te = /* @__PURE__ */ X(Le, [["__scopeId", "data-v-d62d3d36"]]);
436
+ function Re(e, a) {
430
437
  var l = -1, t = he(e) ? Array(e.length) : [];
431
- return be(e, function(s, u, i) {
432
- t[++l] = a(s, u, i);
438
+ return be(e, function(s, u, o) {
439
+ t[++l] = a(s, u, o);
433
440
  }), t;
434
441
  }
435
442
  function O(e, a) {
436
- var l = ye(e) ? fe : Pe;
443
+ var l = ye(e) ? fe : Re;
437
444
  return l(e, ge(a));
438
445
  }
439
446
  const ae = {
@@ -507,7 +514,7 @@ const ae = {
507
514
  }), u = v(() => O(t == null ? void 0 : t.options, (n) => typeof n == "string" ? {
508
515
  label: n,
509
516
  value: n
510
- } : n) ?? []), i = (n) => {
517
+ } : n) ?? []), o = (n) => {
511
518
  if (t.deselectable) {
512
519
  let d;
513
520
  if (t.multiple) {
@@ -516,7 +523,7 @@ const ae = {
516
523
  }
517
524
  l("update:modelValue", d);
518
525
  }
519
- }, o = (n) => {
526
+ }, i = (n) => {
520
527
  l("tag", n);
521
528
  };
522
529
  return (n, d) => (b(), C(z(pe), {
@@ -537,8 +544,8 @@ const ae = {
537
544
  "group-values": e.groupValues,
538
545
  "group-label": e.groupLabel,
539
546
  taggable: e.taggable,
540
- onTag: o,
541
- onRemove: i
547
+ onTag: i,
548
+ onRemove: o
542
549
  }, q({
543
550
  maxElements: h(() => [
544
551
  E(B(n.$tChoice("select.maxElements", e.max)), 1)
@@ -554,7 +561,7 @@ const ae = {
554
561
  n.$slots.tag ? {
555
562
  name: "tag",
556
563
  fn: h((f) => [
557
- y(n.$slots, "tag", oe(ie(f)))
564
+ y(n.$slots, "tag", ie(oe(f)))
558
565
  ]),
559
566
  key: "0"
560
567
  } : void 0,
@@ -623,7 +630,7 @@ const ae = {
623
630
  } : void 0
624
631
  ]), 1032, ["modelValue", "options", "placeholder", "multiple", "max", "open-direction", "close-on-select", "searchable", "group-select", "group-values", "group-label", "taggable"]));
625
632
  }
626
- }, Fe = ["value", "placeholder"], le = {
633
+ }, Pe = ["value", "placeholder"], le = {
627
634
  __name: "TextareaComponent",
628
635
  props: {
629
636
  modelValue: String,
@@ -641,9 +648,9 @@ const ae = {
641
648
  value: e.modelValue,
642
649
  placeholder: e.placeholder,
643
650
  onInput: s[0] || (s[0] = (u) => t.$emit("update:modelValue", u.target.value))
644
- }, null, 40, Fe));
651
+ }, null, 40, Pe));
645
652
  }
646
- }, Oe = {
653
+ }, Fe = {
647
654
  key: 1,
648
655
  class: "h-10 flex items-center"
649
656
  }, ne = {
@@ -721,15 +728,15 @@ const ae = {
721
728
  s.value = H("input_group_");
722
729
  });
723
730
  const u = v(() => l.type === "tel" ? "(###) ###-####" : null);
724
- return (i, o) => e.type === "checkbox" ? (b(), C(Y, {
731
+ return (o, i) => e.type === "checkbox" ? (b(), C(Y, {
725
732
  key: 0,
726
733
  id: s.value,
727
734
  name: e.name,
728
735
  "model-value": e.modelValue,
729
736
  class: V("size-10 " + e.customClass),
730
737
  disabled: e.disabled,
731
- "onUpdate:modelValue": o[0] || (o[0] = (n) => t("update:modelValue", n))
732
- }, null, 8, ["id", "name", "model-value", "class", "disabled"])) : e.type === "toggle" ? (b(), S("div", Oe, [
738
+ "onUpdate:modelValue": i[0] || (i[0] = (n) => t("update:modelValue", n))
739
+ }, null, 8, ["id", "name", "model-value", "class", "disabled"])) : e.type === "toggle" ? (b(), S("div", Fe, [
733
740
  L(te, {
734
741
  id: s.value,
735
742
  name: e.name,
@@ -737,7 +744,7 @@ const ae = {
737
744
  size: "15",
738
745
  class: V(e.customClass),
739
746
  disabled: e.disabled,
740
- "onUpdate:modelValue": o[1] || (o[1] = (n) => t("update:modelValue", n))
747
+ "onUpdate:modelValue": i[1] || (i[1] = (n) => t("update:modelValue", n))
741
748
  }, null, 8, ["id", "name", "model-value", "class", "disabled"])
742
749
  ])) : e.type === "select" ? (b(), C(ae, {
743
750
  key: 2,
@@ -751,8 +758,8 @@ const ae = {
751
758
  searchable: e.searchable,
752
759
  taggable: e.taggable,
753
760
  deselectable: e.deselectable,
754
- "onUpdate:modelValue": o[2] || (o[2] = (n) => t("update:modelValue", n)),
755
- onTag: o[3] || (o[3] = (n) => t("tag", n))
761
+ "onUpdate:modelValue": i[2] || (i[2] = (n) => t("update:modelValue", n)),
762
+ onTag: i[3] || (i[3] = (n) => t("tag", n))
756
763
  }, null, 8, ["id", "name", "model-value", "class", "options", "disabled", "multiple", "searchable", "taggable", "deselectable"])) : e.type === "textarea" ? (b(), C(le, {
757
764
  key: 3,
758
765
  id: s.value,
@@ -761,7 +768,7 @@ const ae = {
761
768
  class: V("w-full " + e.customClass),
762
769
  placeholder: e.placeholder,
763
770
  disabled: e.disabled,
764
- "onUpdate:modelValue": o[4] || (o[4] = (n) => t("update:modelValue", n))
771
+ "onUpdate:modelValue": i[4] || (i[4] = (n) => t("update:modelValue", n))
765
772
  }, null, 8, ["id", "name", "model-value", "class", "placeholder", "disabled"])) : e.type === "date" ? (b(), C(ee, {
766
773
  key: 4,
767
774
  id: s.value,
@@ -773,7 +780,7 @@ const ae = {
773
780
  range: e.range,
774
781
  "enable-time-picker": e.enableTimePicker,
775
782
  disabled: e.disabled,
776
- "onUpdate:modelValue": o[5] || (o[5] = (n) => t("update:modelValue", n))
783
+ "onUpdate:modelValue": i[5] || (i[5] = (n) => t("update:modelValue", n))
777
784
  }, null, 8, ["id", "name", "model-value", "class", "max", "min", "range", "enable-time-picker", "disabled"])) : (b(), C(W, {
778
785
  key: 5,
779
786
  id: s.value,
@@ -789,25 +796,25 @@ const ae = {
789
796
  step: e.step,
790
797
  class: V("w-full " + e.customClass),
791
798
  "input-class": e.inputClass,
792
- "onUpdate:modelValue": o[6] || (o[6] = (n) => t("update:modelValue", n))
799
+ "onUpdate:modelValue": i[6] || (i[6] = (n) => t("update:modelValue", n))
793
800
  }, q({ _: 2 }, [
794
- i.$slots.prefix ? {
801
+ o.$slots.prefix ? {
795
802
  name: "prefix",
796
803
  fn: h(() => [
797
- y(i.$slots, "prefix")
804
+ y(o.$slots, "prefix")
798
805
  ]),
799
806
  key: "0"
800
807
  } : void 0,
801
- i.$slots.suffix ? {
808
+ o.$slots.suffix ? {
802
809
  name: "suffix",
803
810
  fn: h(() => [
804
- y(i.$slots, "suffix")
811
+ y(o.$slots, "suffix")
805
812
  ]),
806
813
  key: "1"
807
814
  } : void 0
808
815
  ]), 1032, ["id", "type", "name", "placeholder", "model-value", "disabled", "min", "max", "mask", "precision", "step", "class", "input-class"]));
809
816
  }
810
- }, De = {
817
+ }, Oe = {
811
818
  __name: "InputGroupComponent",
812
819
  props: {
813
820
  modelValue: String,
@@ -891,7 +898,7 @@ const ae = {
891
898
  s.value = H("input_group_");
892
899
  });
893
900
  const u = v(() => l.type === "tel" ? "(###) ###-####" : null);
894
- return (i, o) => (b(), S("div", {
901
+ return (o, i) => (b(), S("div", {
895
902
  class: V(["w-full", { error: e.errors !== null && e.errors !== "" }])
896
903
  }, [
897
904
  L(K, {
@@ -926,20 +933,20 @@ const ae = {
926
933
  precision: e.precision,
927
934
  step: e.step,
928
935
  "input-class": e.inputClass,
929
- "onUpdate:modelValue": o[0] || (o[0] = (n) => t("update:modelValue", n)),
930
- onTag: o[1] || (o[1] = (n) => t("tag", n))
936
+ "onUpdate:modelValue": i[0] || (i[0] = (n) => t("update:modelValue", n)),
937
+ onTag: i[1] || (i[1] = (n) => t("tag", n))
931
938
  }, q({ _: 2 }, [
932
- i.$slots.prefix ? {
939
+ o.$slots.prefix ? {
933
940
  name: "prefix",
934
941
  fn: h(() => [
935
- y(i.$slots, "prefix")
942
+ y(o.$slots, "prefix")
936
943
  ]),
937
944
  key: "0"
938
945
  } : void 0,
939
- i.$slots.suffix ? {
946
+ o.$slots.suffix ? {
940
947
  name: "suffix",
941
948
  fn: h(() => [
942
- y(i.$slots, "suffix")
949
+ y(o.$slots, "suffix")
943
950
  ]),
944
951
  key: "1"
945
952
  } : void 0
@@ -951,12 +958,12 @@ const ae = {
951
958
  }, null, 8, ["message"])) : N("", !0)
952
959
  ], 2));
953
960
  }
954
- }, Ke = {
961
+ }, He = {
955
962
  CheckboxComponent: Y,
956
963
  DateComponent: ee,
957
964
  ErrorComponent: Q,
958
965
  InputComponent: ne,
959
- InputGroupComponent: De,
966
+ InputGroupComponent: Oe,
960
967
  LabelComponent: K,
961
968
  SelectComponent: ae,
962
969
  TextareaComponent: le,
@@ -968,11 +975,11 @@ export {
968
975
  ee as DateComponent,
969
976
  Q as ErrorComponent,
970
977
  ne as InputComponent,
971
- De as InputGroupComponent,
978
+ Oe as InputGroupComponent,
972
979
  K as LabelComponent,
973
980
  ae as SelectComponent,
974
981
  W as TextInputComponent,
975
982
  le as TextareaComponent,
976
983
  te as ToggleComponent,
977
- Ke as default
984
+ He as default
978
985
  };
@@ -1,38 +1,41 @@
1
- import { defineComponent as E, withDirectives as m, openBlock as u, createElementBlock as b, createElementVNode as T, toDisplayString as g, vShow as v, createBlock as p, withKeys as f, withModifiers as r, renderSlot as h, createVNode as a, Fragment as w, renderList as $, createCommentVNode as c, Transition as L, withCtx as B, createTextVNode as y } from "vue";
2
- import { _ as A } from "./_plugin-vue_export-helper-CHgC5LLL.js";
1
+ import { defineComponent as E, computed as T, withDirectives as m, openBlock as u, createElementBlock as b, createElementVNode as A, toDisplayString as g, vShow as y, createBlock as p, withKeys as f, withModifiers as r, renderSlot as h, createVNode as a, Fragment as w, renderList as $, createCommentVNode as c, Transition as L, withCtx as B, createTextVNode as v } from "vue";
2
+ import { _ as M } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
3
  import { t as P } from "./toString-CykDHNcE.js";
4
- const M = E({
4
+ const C = E({
5
5
  name: "ErrorComponent",
6
6
  props: {
7
- message: String
7
+ message: [String, Array]
8
+ },
9
+ setup(e) {
10
+ return { displayMessage: T(() => Array.isArray(e.message) ? e.message[0] : e.message) };
8
11
  }
9
- }), C = { class: "wv-error text-sm text-red-600" };
10
- function H(e, t, i, l, o, n) {
12
+ }), H = { class: "wv-error text-sm text-red-600" };
13
+ function G(e, t, i, l, o, n) {
11
14
  return m((u(), b("div", null, [
12
- T("p", C, g(e.message), 1)
15
+ A("p", H, g(e.displayMessage), 1)
13
16
  ], 512)), [
14
- [v, e.message]
17
+ [y, e.displayMessage]
15
18
  ]);
16
19
  }
17
- const oe = /* @__PURE__ */ A(M, [["render", H]]);
18
- var G = 0;
19
- function ue(e) {
20
- var t = ++G;
20
+ const ue = /* @__PURE__ */ M(C, [["render", G]]);
21
+ var K = 0;
22
+ function he(e) {
23
+ var t = ++K;
21
24
  return P(e) + t;
22
25
  }
23
26
  function S(e) {
24
27
  return e === 0 ? !1 : Array.isArray(e) && e.length === 0 ? !0 : !e;
25
28
  }
26
- function K(e) {
29
+ function F(e) {
27
30
  return (...t) => !e(...t);
28
31
  }
29
- function F(e, t) {
32
+ function N(e, t) {
30
33
  return e === void 0 && (e = "undefined"), e === null && (e = "null"), e === !1 && (e = "false"), e.toString().toLowerCase().indexOf(t.trim()) !== -1;
31
34
  }
32
35
  function D(e, t, i, l) {
33
- return t ? e.filter((o) => F(l(o, i), t)).sort((o, n) => l(o, i).length - l(n, i).length) : e;
36
+ return t ? e.filter((o) => N(l(o, i), t)).sort((o, n) => l(o, i).length - l(n, i).length) : e;
34
37
  }
35
- function N(e) {
38
+ function R(e) {
36
39
  return e.filter((t) => !t.$isLabel);
37
40
  }
38
41
  function O(e, t) {
@@ -41,7 +44,7 @@ function O(e, t) {
41
44
  $isLabel: !0
42
45
  }), l.concat(o[e])) : l, []);
43
46
  }
44
- function R(e, t, i, l, o) {
47
+ function q(e, t, i, l, o) {
45
48
  return (n) => n.map((s) => {
46
49
  if (!s[i])
47
50
  return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."), [];
@@ -53,7 +56,7 @@ function R(e, t, i, l, o) {
53
56
  });
54
57
  }
55
58
  const k = (...e) => (t) => e.reduce((i, l) => l(i), t);
56
- var q = {
59
+ var z = {
57
60
  data() {
58
61
  return {
59
62
  search: "",
@@ -317,7 +320,7 @@ var q = {
317
320
  filteredOptions() {
318
321
  const e = this.search || "", t = e.toLowerCase().trim();
319
322
  let i = this.options.concat();
320
- return this.internalSearch ? i = this.groupValues ? this.filterAndFlat(i, t, this.label) : D(i, t, this.label, this.customLabel) : i = this.groupValues ? O(this.groupValues, this.groupLabel)(i) : i, i = this.hideSelected ? i.filter(K(this.isSelected)) : i, this.taggable && t.length && !this.isExistingOption(t) && (this.tagPosition === "bottom" ? i.push({ isTag: !0, label: e }) : i.unshift({ isTag: !0, label: e })), i.slice(0, this.optionsLimit);
323
+ return this.internalSearch ? i = this.groupValues ? this.filterAndFlat(i, t, this.label) : D(i, t, this.label, this.customLabel) : i = this.groupValues ? O(this.groupValues, this.groupLabel)(i) : i, i = this.hideSelected ? i.filter(F(this.isSelected)) : i, this.taggable && t.length && !this.isExistingOption(t) && (this.tagPosition === "bottom" ? i.push({ isTag: !0, label: e }) : i.unshift({ isTag: !0, label: e })), i.slice(0, this.optionsLimit);
321
324
  },
322
325
  valueKeys() {
323
326
  return this.trackBy ? this.internalValue.map((e) => e[this.trackBy]) : this.internalValue;
@@ -356,7 +359,7 @@ var q = {
356
359
  */
357
360
  filterAndFlat(e, t, i) {
358
361
  return k(
359
- R(t, i, this.groupValues, this.groupLabel, this.customLabel),
362
+ q(t, i, this.groupValues, this.groupLabel, this.customLabel),
360
363
  O(this.groupValues, this.groupLabel)
361
364
  )(e);
362
365
  },
@@ -368,7 +371,7 @@ var q = {
368
371
  flatAndStrip(e) {
369
372
  return k(
370
373
  O(this.groupValues, this.groupLabel),
371
- N
374
+ R
372
375
  )(e);
373
376
  },
374
377
  /**
@@ -556,7 +559,7 @@ var q = {
556
559
  t > this.maxHeight || t > e || this.openDirection === "below" || this.openDirection === "bottom" ? (this.preferredOpenDirection = "below", this.optimizedHeight = Math.min(t - 40, this.maxHeight)) : (this.preferredOpenDirection = "above", this.optimizedHeight = Math.min(e - 40, this.maxHeight));
557
560
  }
558
561
  }
559
- }, z = {
562
+ }, j = {
560
563
  data() {
561
564
  return {
562
565
  pointer: 0,
@@ -636,9 +639,9 @@ var q = {
636
639
  this.pointer = e, this.pointerDirty = !0;
637
640
  }
638
641
  }
639
- }, j = {
642
+ }, I = {
640
643
  name: "vue-multiselect",
641
- mixins: [q, z],
644
+ mixins: [z, j],
642
645
  compatConfig: {
643
646
  MODE: 3,
644
647
  ATTR_ENUMERATED_COERCION: !1
@@ -836,11 +839,11 @@ var q = {
836
839
  }
837
840
  }
838
841
  };
839
- const I = {
842
+ const U = {
840
843
  ref: "tags",
841
844
  class: "multiselect__tags"
842
- }, U = { class: "multiselect__tags-wrap" }, J = { class: "multiselect__spinner" }, Q = { key: 0 }, W = { class: "multiselect__option" }, X = { class: "multiselect__option" }, Y = /* @__PURE__ */ y("No elements found. Consider changing the search query."), Z = { class: "multiselect__option" }, x = /* @__PURE__ */ y("List is empty.");
843
- function _(e, t, i, l, o, n) {
845
+ }, J = { class: "multiselect__tags-wrap" }, Q = { class: "multiselect__spinner" }, W = { key: 0 }, X = { class: "multiselect__option" }, Y = { class: "multiselect__option" }, Z = /* @__PURE__ */ v("No elements found. Consider changing the search query."), x = { class: "multiselect__option" }, _ = /* @__PURE__ */ v("List is empty.");
846
+ function ee(e, t, i, l, o, n) {
844
847
  return u(), p("div", {
845
848
  tabindex: e.searchable ? -1 : i.tabindex,
846
849
  class: [{ "multiselect--active": e.isOpen, "multiselect--disabled": i.disabled, "multiselect--above": n.isAbove, "multiselect--has-options-group": n.hasOptionGroup }, "multiselect"],
@@ -870,7 +873,7 @@ function _(e, t, i, l, o, n) {
870
873
  h(e.$slots, "clear", { search: e.search }),
871
874
  a(
872
875
  "div",
873
- I,
876
+ U,
874
877
  [
875
878
  h(e.$slots, "selection", {
876
879
  search: e.search,
@@ -880,7 +883,7 @@ function _(e, t, i, l, o, n) {
880
883
  }, () => [
881
884
  m(a(
882
885
  "div",
883
- U,
886
+ J,
884
887
  [
885
888
  (u(!0), p(
886
889
  w,
@@ -912,7 +915,7 @@ function _(e, t, i, l, o, n) {
912
915
  512
913
916
  /* NEED_PATCH */
914
917
  ), [
915
- [v, n.visibleValues.length > 0]
918
+ [y, n.visibleValues.length > 0]
916
919
  ]),
917
920
  e.internalValue && e.internalValue.length > i.limit ? h(e.$slots, "limit", { key: 0 }, () => [
918
921
  a("strong", {
@@ -926,12 +929,12 @@ function _(e, t, i, l, o, n) {
926
929
  h(e.$slots, "loading", {}, () => [
927
930
  m(a(
928
931
  "div",
929
- J,
932
+ Q,
930
933
  null,
931
934
  512
932
935
  /* NEED_PATCH */
933
936
  ), [
934
- [v, i.loading]
937
+ [y, i.loading]
935
938
  ])
936
939
  ])
937
940
  ]),
@@ -973,7 +976,7 @@ function _(e, t, i, l, o, n) {
973
976
  },
974
977
  [
975
978
  h(e.$slots, "singleLabel", { option: n.singleValue }, () => [
976
- y(
979
+ v(
977
980
  g(e.currentOptionLabel),
978
981
  1
979
982
  /* TEXT */
@@ -992,7 +995,7 @@ function _(e, t, i, l, o, n) {
992
995
  },
993
996
  [
994
997
  h(e.$slots, "placeholder", {}, () => [
995
- y(
998
+ v(
996
999
  g(e.placeholder),
997
1000
  1
998
1001
  /* TEXT */
@@ -1027,10 +1030,10 @@ function _(e, t, i, l, o, n) {
1027
1030
  id: "listbox-" + e.id
1028
1031
  }, [
1029
1032
  h(e.$slots, "beforeList"),
1030
- e.multiple && e.max === e.internalValue.length ? (u(), p("li", Q, [
1031
- a("span", W, [
1033
+ e.multiple && e.max === e.internalValue.length ? (u(), p("li", W, [
1034
+ a("span", X, [
1032
1035
  h(e.$slots, "maxElements", {}, () => [
1033
- y(
1036
+ v(
1034
1037
  "Maximum of " + g(e.max) + " options selected. First remove a selected option to select another.",
1035
1038
  1
1036
1039
  /* TEXT */
@@ -1100,31 +1103,31 @@ function _(e, t, i, l, o, n) {
1100
1103
  "li",
1101
1104
  null,
1102
1105
  [
1103
- a("span", X, [
1106
+ a("span", Y, [
1104
1107
  h(e.$slots, "noResult", { search: e.search }, () => [
1105
- Y
1108
+ Z
1106
1109
  ])
1107
1110
  ])
1108
1111
  ],
1109
1112
  512
1110
1113
  /* NEED_PATCH */
1111
1114
  ), [
1112
- [v, i.showNoResults && e.filteredOptions.length === 0 && e.search && !i.loading]
1115
+ [y, i.showNoResults && e.filteredOptions.length === 0 && e.search && !i.loading]
1113
1116
  ]),
1114
1117
  m(a(
1115
1118
  "li",
1116
1119
  null,
1117
1120
  [
1118
- a("span", Z, [
1121
+ a("span", x, [
1119
1122
  h(e.$slots, "noOptions", {}, () => [
1120
- x
1123
+ _
1121
1124
  ])
1122
1125
  ])
1123
1126
  ],
1124
1127
  512
1125
1128
  /* NEED_PATCH */
1126
1129
  ), [
1127
- [v, i.showNoOptions && (e.options.length === 0 || n.hasOptionGroup === !0 && e.filteredOptions.length === 0) && !e.search && !i.loading]
1130
+ [y, i.showNoOptions && (e.options.length === 0 || n.hasOptionGroup === !0 && e.filteredOptions.length === 0) && !e.search && !i.loading]
1128
1131
  ]),
1129
1132
  h(e.$slots, "afterList")
1130
1133
  ], 12, ["id"])
@@ -1132,7 +1135,7 @@ function _(e, t, i, l, o, n) {
1132
1135
  36
1133
1136
  /* STYLE, HYDRATE_EVENTS */
1134
1137
  ), [
1135
- [v, e.isOpen]
1138
+ [y, e.isOpen]
1136
1139
  ])
1137
1140
  ]),
1138
1141
  _: 3
@@ -1140,14 +1143,14 @@ function _(e, t, i, l, o, n) {
1140
1143
  })
1141
1144
  ], 42, ["tabindex", "aria-owns"]);
1142
1145
  }
1143
- j.render = _;
1144
- const ee = { class: "wv-label block font-medium text-sm text-gray-700" }, te = { key: 0 }, ie = {
1146
+ I.render = ee;
1147
+ const te = { class: "wv-label block font-medium text-sm text-gray-700" }, ie = { key: 0 }, se = {
1145
1148
  key: 0,
1146
1149
  class: "text-red-600"
1147
- }, se = { key: 1 }, le = {
1150
+ }, le = { key: 1 }, ne = {
1148
1151
  key: 0,
1149
1152
  class: "text-red-600"
1150
- }, he = {
1153
+ }, de = {
1151
1154
  __name: "LabelComponent",
1152
1155
  props: {
1153
1156
  value: String,
@@ -1157,20 +1160,20 @@ const ee = { class: "wv-label block font-medium text-sm text-gray-700" }, te = {
1157
1160
  }
1158
1161
  },
1159
1162
  setup(e) {
1160
- return (t, i) => (u(), b("label", ee, [
1161
- e.value ? (u(), b("span", te, [
1162
- y(g(e.value), 1),
1163
- e.required ? (u(), b("sup", ie, "*")) : c("", !0)
1164
- ])) : (u(), b("span", se, [
1163
+ return (t, i) => (u(), b("label", te, [
1164
+ e.value ? (u(), b("span", ie, [
1165
+ v(g(e.value), 1),
1166
+ e.required ? (u(), b("sup", se, "*")) : c("", !0)
1167
+ ])) : (u(), b("span", le, [
1165
1168
  h(t.$slots, "default"),
1166
- e.required ? (u(), b("sup", le, "*")) : c("", !0)
1169
+ e.required ? (u(), b("sup", ne, "*")) : c("", !0)
1167
1170
  ]))
1168
1171
  ]));
1169
1172
  }
1170
1173
  };
1171
1174
  export {
1172
- oe as E,
1173
- he as _,
1174
- j as s,
1175
- ue as u
1175
+ ue as E,
1176
+ de as _,
1177
+ I as s,
1178
+ he as u
1176
1179
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webilio-xyz/webilio-vue",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite --host 0.0.0.0",