mediacube-ui-v2 0.0.342 → 0.0.344
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.
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { Directions as
|
|
4
|
-
import { useFieldErrors as
|
|
5
|
-
import { SelectGroupKeys as w, SelectListDirections as
|
|
6
|
-
import { PreviewSizes as
|
|
7
|
-
import { TitleVariations as
|
|
8
|
-
import { TooltipPositions as
|
|
9
|
-
import { Weights as
|
|
10
|
-
import { ChipSize as
|
|
11
|
-
import { useTheme as
|
|
12
|
-
import { useThrottleFn as
|
|
1
|
+
import { defineComponent as Ie, defineAsyncComponent as q, useSlots as Ye, inject as Ge, ref as d, computed as i, onBeforeUnmount as Ue, watch as J, openBlock as s, createElementBlock as O, normalizeStyle as Xe, normalizeClass as de, createElementVNode as T, renderSlot as $, createBlock as u, unref as a, withCtx as r, createTextVNode as E, toDisplayString as f, createCommentVNode as _, createVNode as S, mergeProps as Ke, createSlots as Q, nextTick as me } from "vue";
|
|
2
|
+
import Je from "vue-multiselect";
|
|
3
|
+
import { Directions as pe } from "../../../enums/ui/Directions2.js";
|
|
4
|
+
import { useFieldErrors as Qe } from "../../../composables/useFieldErrors2.js";
|
|
5
|
+
import { SelectGroupKeys as w, SelectListDirections as Ze } from "../../../enums/Select2.js";
|
|
6
|
+
import { PreviewSizes as fe } from "../../../enums/Preview2.js";
|
|
7
|
+
import { TitleVariations as ve } from "../../../enums/Title2.js";
|
|
8
|
+
import { TooltipPositions as et } from "../../../enums/Tooltip2.js";
|
|
9
|
+
import { Weights as Z } from "../../../enums/ui/Weights2.js";
|
|
10
|
+
import { ChipSize as tt } from "../../../enums/Chip2.js";
|
|
11
|
+
import { useTheme as lt } from "../../../composables/useTheme2.js";
|
|
12
|
+
import { useThrottleFn as ot } from "@vueuse/core";
|
|
13
13
|
import h from "../McTitle/McTitle.vue2.js";
|
|
14
14
|
import '../../../assets/components/elements/McSvgIcon/index.css';import '../../../assets/components/elements/McTitle/index.css';/* empty css */
|
|
15
|
-
import
|
|
15
|
+
import j from "../McSvgIcon/McSvgIcon.vue2.js";
|
|
16
16
|
/* empty css */
|
|
17
|
-
const
|
|
17
|
+
const nt = ["dir"], at = { class: "mc-field-select__header" }, rt = { class: "mc-field-select__main" }, it = {
|
|
18
18
|
key: 1,
|
|
19
19
|
class: "mc-field-select__single-label"
|
|
20
|
-
},
|
|
20
|
+
}, st = {
|
|
21
21
|
key: 0,
|
|
22
22
|
class: "mc-field-select__prepend"
|
|
23
|
-
},
|
|
23
|
+
}, ct = {
|
|
24
24
|
key: 0,
|
|
25
25
|
class: "mc-field-select__footer"
|
|
26
|
-
},
|
|
26
|
+
}, ut = { key: 1 }, Vt = /* @__PURE__ */ Ie({
|
|
27
27
|
__name: "McFieldSelect",
|
|
28
28
|
props: {
|
|
29
29
|
/**
|
|
@@ -250,7 +250,7 @@ const tt = ["dir"], lt = { class: "mc-field-select__header" }, ot = { class: "mc
|
|
|
250
250
|
},
|
|
251
251
|
dir: {
|
|
252
252
|
type: String,
|
|
253
|
-
default:
|
|
253
|
+
default: pe.Ltr
|
|
254
254
|
},
|
|
255
255
|
/**
|
|
256
256
|
* На какое после смотреть что бы считать его заголовком строки
|
|
@@ -268,11 +268,11 @@ const tt = ["dir"], lt = { class: "mc-field-select__header" }, ot = { class: "mc
|
|
|
268
268
|
}
|
|
269
269
|
},
|
|
270
270
|
emits: ["original-input", "tag", "search-change", "update:modelValue", "handle-open", "handle-close"],
|
|
271
|
-
setup(k, { emit:
|
|
272
|
-
const H =
|
|
271
|
+
setup(k, { emit: ge }) {
|
|
272
|
+
const H = q(() => import("../McAvatar/McAvatar.vue.js")), he = q(() => import("../McTooltip/McTooltip.vue.js")), ee = q(() => import("../../patterns/McPreview/McPreview.vue.js")), ye = q(() => import("../McChip/McChip.vue.js")), C = ge, be = Ye(), te = Ge("dsOptions", {}), e = k, m = lt("select"), y = Qe(e.errors), L = d(null), x = d(null), I = d(null), A = d([]), g = d(null), z = d(), F = d(!1), N = d(null), Y = d(null), P = d(null), B = i(() => e.options.some(
|
|
273
273
|
(t) => Object.prototype.hasOwnProperty.call(t, w.Label) && Object.prototype.hasOwnProperty.call(t, w.Values) && //@ts-ignore
|
|
274
274
|
Array.isArray(t[w.Values])
|
|
275
|
-
)),
|
|
275
|
+
)), le = i(() => !!e.title), oe = i(() => e.avatar || e.icon), V = i(() => e.multiple), _e = i(() => V.value ? !!(e.modelValue || [])?.length : !!e.modelValue), Se = i(() => e.noResultsText ?? te.componentTranslations?.select?.noResultsText), we = i(() => e.emptyList ?? te.componentTranslations?.select?.emptyList), ke = i(() => ({
|
|
276
276
|
label: e.titleField,
|
|
277
277
|
trackBy: e.valueField,
|
|
278
278
|
loading: e.loading,
|
|
@@ -297,37 +297,37 @@ const tt = ["dir"], lt = { class: "mc-field-select__header" }, ot = { class: "mc
|
|
|
297
297
|
})), R = i(() => {
|
|
298
298
|
if (B.value) return e.options;
|
|
299
299
|
const t = /* @__PURE__ */ new Set();
|
|
300
|
-
return [...e.options,
|
|
300
|
+
return [...e.options, ...A.value].filter((l) => {
|
|
301
301
|
const n = l[e.valueField];
|
|
302
302
|
return t.has(String(n)) ? !1 : (t.add(String(n)), !0);
|
|
303
303
|
});
|
|
304
|
-
}),
|
|
304
|
+
}), ne = i(() => B.value ? R.value.map((t) => t[w.Values]).flat() : R.value), Ce = i(() => new Map(ne.value.map((t) => [String(t[e.valueField]), t]))), xe = i(() => e.dir === pe.Rtl), Be = i(() => ({
|
|
305
305
|
"mc-field-select": !0,
|
|
306
306
|
"mc-field-select--error": !!y.errorText.value,
|
|
307
307
|
"mc-field-select--disabled": e.disabled,
|
|
308
308
|
[`mc-field-select--bg-${e.backgroundColor}`]: !!e.backgroundColor,
|
|
309
|
-
"mc-field-select--is-empty-options-list":
|
|
310
|
-
"mc-field-select--with-preview": e.optionWithPreview &&
|
|
309
|
+
"mc-field-select--is-empty-options-list": Ee.value || e.loading,
|
|
310
|
+
"mc-field-select--with-preview": e.optionWithPreview && _e.value,
|
|
311
311
|
"mc-field-select--max-height": !!e.maxHeight,
|
|
312
|
-
"mc-field-select--rtl":
|
|
313
|
-
"mc-field-select--hide-arrow": !!
|
|
314
|
-
})),
|
|
312
|
+
"mc-field-select--rtl": xe.value,
|
|
313
|
+
"mc-field-select--hide-arrow": !!be.arrow
|
|
314
|
+
})), Ve = i(() => `${e.title}${e.required ? " *" : ""}`), Te = i(() => {
|
|
315
315
|
const t = ["gray", "dark-gray", "black"], o = ["white"];
|
|
316
|
-
let l = "gray", n = e.backgroundColor, c = e.backgroundColor,
|
|
317
|
-
return (!e.backgroundColor || o.includes(e.backgroundColor)) && (n =
|
|
316
|
+
let l = "gray", n = e.backgroundColor, c = e.backgroundColor, p = "black";
|
|
317
|
+
return (!e.backgroundColor || o.includes(e.backgroundColor)) && (n = m.component.color), t.includes(e.backgroundColor) && (p = "white", l = "white", n = "black"), e.disabled && !e.backgroundColor && (c = "hover-gray"), {
|
|
318
318
|
"--mc-field-select-max-height": e.maxHeight,
|
|
319
|
-
"--mc-field-select-bg-color": c &&
|
|
320
|
-
"--mc-field-select-color":
|
|
321
|
-
"--mc-field-select-selected-color":
|
|
322
|
-
"--mc-field-select-border-color": n &&
|
|
323
|
-
"--mc-field-select-label-color":
|
|
324
|
-
"--mc-field-select-placeholder-color":
|
|
319
|
+
"--mc-field-select-bg-color": c && m.colors[c],
|
|
320
|
+
"--mc-field-select-color": m.colors[m.component.color],
|
|
321
|
+
"--mc-field-select-selected-color": m.colors[m.component.selected],
|
|
322
|
+
"--mc-field-select-border-color": n && m.colors[n],
|
|
323
|
+
"--mc-field-select-label-color": m.colors[p],
|
|
324
|
+
"--mc-field-select-placeholder-color": m.colors[l]
|
|
325
325
|
};
|
|
326
|
-
}),
|
|
326
|
+
}), Ee = i(() => e.hideSelected && !L.value || !e.options.length ? e.multiple ? B.value ? !1 : Array.isArray(e.modelValue) && e.options.length === e.modelValue.length : !!e.modelValue && R.value?.length === 1 && !L.value : e.options.length === 0 ? !e.options.length : !1), M = i({
|
|
327
327
|
get() {
|
|
328
328
|
let t = V.value ? e.modelValue || [] : [e.modelValue].filter(Boolean);
|
|
329
329
|
t = t.map((l) => {
|
|
330
|
-
const n =
|
|
330
|
+
const n = Ce.value.get(String(l));
|
|
331
331
|
return {
|
|
332
332
|
[e.titleField]: n?.[e.titleField] || l,
|
|
333
333
|
[e.valueField]: n?.[e.valueField] || l,
|
|
@@ -344,25 +344,25 @@ const tt = ["dir"], lt = { class: "mc-field-select__header" }, ot = { class: "mc
|
|
|
344
344
|
let o = V.value ? Array.isArray(t) ? t : [] : [t];
|
|
345
345
|
o = o.filter(Boolean).map((n) => n[e.valueField]);
|
|
346
346
|
const [l] = o;
|
|
347
|
-
|
|
347
|
+
Ae(t), $e(V.value ? o : l);
|
|
348
348
|
}
|
|
349
|
-
}),
|
|
350
|
-
const o = /* @__PURE__ */ new Set(), l = B.value ? t.flatMap((c) => c[w.Values] ?? []) : t, n = [
|
|
351
|
-
|
|
352
|
-
const
|
|
353
|
-
if (o.has(String(
|
|
354
|
-
const b = e.modelValue?.constructor === Array ? e.modelValue.map((
|
|
355
|
-
return b && o.add(String(
|
|
349
|
+
}), ae = (t = e.options) => {
|
|
350
|
+
const o = /* @__PURE__ */ new Set(), l = B.value ? t.flatMap((c) => c[w.Values] ?? []) : t, n = [...A.value, ...l];
|
|
351
|
+
A.value = n.filter((c) => {
|
|
352
|
+
const p = c[e.valueField];
|
|
353
|
+
if (o.has(String(p))) return !1;
|
|
354
|
+
const b = e.modelValue?.constructor === Array ? e.modelValue.map((X) => String(X)).includes(String(c[e.valueField])) : String(c[e.valueField]) === String(e.modelValue);
|
|
355
|
+
return b && o.add(String(p)), b;
|
|
356
356
|
});
|
|
357
|
-
},
|
|
357
|
+
}, re = (t) => {
|
|
358
358
|
if (!t || t.nodeType !== Node.ELEMENT_NODE || t === document.documentElement)
|
|
359
359
|
return document.documentElement;
|
|
360
360
|
const { overflow: o, overflowY: l } = getComputedStyle(t);
|
|
361
|
-
if (["auto", "scroll"].some((
|
|
361
|
+
if (["auto", "scroll"].some((p) => [o, l].includes(p)))
|
|
362
362
|
return t;
|
|
363
363
|
const c = t.parentNode;
|
|
364
|
-
return !c || c.nodeType !== Node.ELEMENT_NODE ? document.documentElement :
|
|
365
|
-
},
|
|
364
|
+
return !c || c.nodeType !== Node.ELEMENT_NODE ? document.documentElement : re(c);
|
|
365
|
+
}, Le = (t) => {
|
|
366
366
|
if (!t) return null;
|
|
367
367
|
let o = t.parentElement;
|
|
368
368
|
for (; o && o !== document.body; ) {
|
|
@@ -371,7 +371,7 @@ const tt = ["dir"], lt = { class: "mc-field-select__header" }, ot = { class: "mc
|
|
|
371
371
|
o = o.parentElement;
|
|
372
372
|
}
|
|
373
373
|
return null;
|
|
374
|
-
},
|
|
374
|
+
}, ie = i(() => ["iPhone", "iPad"].some((t) => navigator?.platform?.includes(t)) && window.visualViewport?.offsetTop || 0), D = ot(() => {
|
|
375
375
|
if (!g.value || !x.value) return;
|
|
376
376
|
const {
|
|
377
377
|
top: t = 0,
|
|
@@ -379,131 +379,139 @@ const tt = ["dir"], lt = { class: "mc-field-select__header" }, ot = { class: "mc
|
|
|
379
379
|
height: l = 0,
|
|
380
380
|
width: n = 0,
|
|
381
381
|
left: c = 0
|
|
382
|
-
} = I.value?.getBoundingClientRect() || {},
|
|
382
|
+
} = I.value?.getBoundingClientRect() || {}, p = g.value.getBoundingClientRect(), b = x.value;
|
|
383
383
|
if (!b) return;
|
|
384
|
-
const
|
|
385
|
-
if (
|
|
386
|
-
const v = b.$refs.list,
|
|
387
|
-
v.style.width = `${n}px`, v.style.position = "fixed", v.style.left = `${c -
|
|
388
|
-
const
|
|
389
|
-
let
|
|
390
|
-
switch (
|
|
384
|
+
const X = t - p.top, De = o - p.bottom;
|
|
385
|
+
if (X >= -l && De < l) {
|
|
386
|
+
const v = b.$refs.list, W = Le(v), We = W ? W.left : 0, ue = W ? W.top : 0;
|
|
387
|
+
v.style.width = `${n}px`, v.style.position = "fixed", v.style.left = `${c - We}px`;
|
|
388
|
+
const qe = I.value?.querySelector(".mc-field-select__header")?.offsetHeight, je = 8;
|
|
389
|
+
let K = e.openDirection;
|
|
390
|
+
switch (K === Ze.Auto && (K = b?.isAbove ? "top" : "bottom"), K) {
|
|
391
391
|
case "top": {
|
|
392
|
-
const
|
|
393
|
-
v.style.top = `${
|
|
392
|
+
const He = t + (le.value ? qe + je : 0) + ie.value - v.getBoundingClientRect().height - 8;
|
|
393
|
+
v.style.top = `${He - ue}px`, v.style.bottom = "auto";
|
|
394
394
|
break;
|
|
395
395
|
}
|
|
396
396
|
case "bottom":
|
|
397
|
-
v.style.bottom = "auto", v.style.top = `${t +
|
|
397
|
+
v.style.bottom = "auto", v.style.top = `${t + ie.value + l - ue}px`;
|
|
398
398
|
break;
|
|
399
399
|
}
|
|
400
400
|
} else if (!/Android/i.test(navigator.userAgent))
|
|
401
401
|
return b.deactivate();
|
|
402
|
-
}, 16),
|
|
403
|
-
G(), g.value =
|
|
404
|
-
},
|
|
402
|
+
}, 16), Fe = () => {
|
|
403
|
+
G(), g.value = re(x.value.$el) || document.documentElement, g.value.addEventListener("scroll", D), z.value?.disconnect(), z.value = new ResizeObserver(D), z.value.observe(g.value);
|
|
404
|
+
}, se = (t) => {
|
|
405
405
|
const o = { [e.titleField]: t, [e.valueField]: t };
|
|
406
|
-
|
|
407
|
-
}, Fe = (t) => {
|
|
408
|
-
j.value = t, C("search-change", t);
|
|
406
|
+
A.value.push(o), M.value = V.value ? [...M.value, o] : o, C("tag", t);
|
|
409
407
|
}, Oe = (t) => {
|
|
410
|
-
|
|
408
|
+
L.value = t, C("search-change", t);
|
|
411
409
|
}, $e = (t) => {
|
|
410
|
+
y.toggleErrorVisible(), C("update:modelValue", t);
|
|
411
|
+
}, Ae = (t) => {
|
|
412
412
|
C("original-input", t);
|
|
413
|
-
},
|
|
413
|
+
}, ze = () => {
|
|
414
414
|
const t = x.value;
|
|
415
415
|
if (!t?.$refs?.list) return;
|
|
416
416
|
const o = t.$refs.list;
|
|
417
|
-
if (o.parentNode?.nodeName === "BODY" ||
|
|
418
|
-
|
|
417
|
+
if (o.parentNode?.nodeName === "BODY" || P.value?.contains(o)) return;
|
|
418
|
+
N.value = o.parentElement, Y.value = o.nextSibling;
|
|
419
419
|
const l = document.createElement("div");
|
|
420
420
|
l.className = "mc-field-select mc-field-select--list-portal";
|
|
421
421
|
const n = document.createElement("div");
|
|
422
|
-
n.className = "multiselect", n.appendChild(o), l.appendChild(n), document.body.appendChild(l),
|
|
423
|
-
},
|
|
424
|
-
if (!
|
|
425
|
-
const o = x.value?.$refs?.list, l =
|
|
426
|
-
o && l?.contains(o) &&
|
|
427
|
-
}, ze = () => {
|
|
428
|
-
C("handle-open"), e.renderAbsoluteList && (Ee(), ce(Ae));
|
|
429
|
-
}, G = () => {
|
|
430
|
-
A.value?.disconnect(), g.value && (g.value.removeEventListener("scroll", M), g.value = null);
|
|
422
|
+
n.className = "multiselect", n.appendChild(o), l.appendChild(n), document.body.appendChild(l), P.value = l, F.value = !0, me(D);
|
|
423
|
+
}, ce = () => {
|
|
424
|
+
if (!F.value || !N.value) return;
|
|
425
|
+
const o = x.value?.$refs?.list, l = P.value;
|
|
426
|
+
o && l?.contains(o) && N.value.insertBefore(o, Y.value), l?.remove(), F.value = !1, N.value = null, Y.value = null, P.value = null;
|
|
431
427
|
}, Ne = () => {
|
|
432
|
-
|
|
428
|
+
C("handle-open"), e.renderAbsoluteList && (Fe(), me(ze));
|
|
429
|
+
}, G = () => {
|
|
430
|
+
z.value?.disconnect(), g.value && (g.value.removeEventListener("scroll", D), g.value = null);
|
|
431
|
+
}, U = d(!1), Pe = () => {
|
|
432
|
+
U.value = !0;
|
|
433
|
+
}, Re = () => {
|
|
434
|
+
U.value ? U.value = !1 : e.taggable && Me(), F.value && ce(), G(), C("handle-close");
|
|
435
|
+
}, Me = () => {
|
|
436
|
+
const t = L.value?.trim();
|
|
437
|
+
!t || ne.value.some(
|
|
438
|
+
(l) => String(l[e.titleField]).toLowerCase() === t.toLowerCase()
|
|
439
|
+
) || (se(t), L.value = "");
|
|
433
440
|
};
|
|
434
|
-
return
|
|
435
|
-
|
|
436
|
-
}),
|
|
441
|
+
return Ue(() => {
|
|
442
|
+
F.value && ce(), G();
|
|
443
|
+
}), J(
|
|
437
444
|
() => e.options,
|
|
438
445
|
(t) => {
|
|
439
|
-
|
|
446
|
+
ae(t);
|
|
440
447
|
},
|
|
441
448
|
{ immediate: !0 }
|
|
442
|
-
),
|
|
449
|
+
), J(
|
|
443
450
|
() => e.modelValue,
|
|
444
451
|
() => {
|
|
445
|
-
|
|
452
|
+
ae();
|
|
446
453
|
},
|
|
447
454
|
{ immediate: !0, deep: !0 }
|
|
448
|
-
),
|
|
455
|
+
), J(
|
|
449
456
|
() => e.errors,
|
|
450
457
|
(t) => {
|
|
451
458
|
y.setError(t);
|
|
452
459
|
}
|
|
453
|
-
), (t, o) => (s(),
|
|
460
|
+
), (t, o) => (s(), O("div", {
|
|
454
461
|
ref_key: "field_select_wrapper_ref",
|
|
455
462
|
ref: I,
|
|
456
463
|
dir: k.dir,
|
|
457
|
-
class:
|
|
458
|
-
style:
|
|
464
|
+
class: de(Be.value),
|
|
465
|
+
style: Xe(Te.value)
|
|
459
466
|
}, [
|
|
460
|
-
T("div",
|
|
461
|
-
|
|
462
|
-
|
|
467
|
+
T("div", at, [
|
|
468
|
+
$(t.$slots, "header", {}, () => [
|
|
469
|
+
le.value ? (s(), u(h, {
|
|
463
470
|
key: 0,
|
|
464
471
|
"max-width": "100%",
|
|
465
|
-
weight: a(
|
|
472
|
+
weight: a(Z).Medium
|
|
466
473
|
}, {
|
|
467
474
|
default: r(() => [
|
|
468
|
-
E(f(
|
|
475
|
+
E(f(Ve.value), 1)
|
|
469
476
|
]),
|
|
470
477
|
_: 1
|
|
471
478
|
}, 8, ["weight"])) : _("", !0)
|
|
472
479
|
])
|
|
473
480
|
]),
|
|
474
|
-
T("div",
|
|
475
|
-
S(a(
|
|
481
|
+
T("div", rt, [
|
|
482
|
+
S(a(Je), Ke({
|
|
476
483
|
ref_key: "field_select_ref",
|
|
477
484
|
ref: x,
|
|
478
|
-
modelValue:
|
|
479
|
-
"onUpdate:modelValue": o[0] || (o[0] = (l) =>
|
|
480
|
-
},
|
|
481
|
-
onTag:
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
485
|
+
modelValue: M.value,
|
|
486
|
+
"onUpdate:modelValue": o[0] || (o[0] = (l) => M.value = l)
|
|
487
|
+
}, ke.value, {
|
|
488
|
+
onTag: se,
|
|
489
|
+
onSelect: Pe,
|
|
490
|
+
onSearchChange: Oe,
|
|
491
|
+
onOpen: Ne,
|
|
492
|
+
onClose: Re
|
|
493
|
+
}), Q({
|
|
486
494
|
singleLabel: r(({ option: l }) => [
|
|
487
|
-
e.optionWithPreview ? (s(), u(a(
|
|
495
|
+
e.optionWithPreview ? (s(), u(a(ee), {
|
|
488
496
|
key: 0,
|
|
489
497
|
class: "option__desc",
|
|
490
|
-
size: a(
|
|
491
|
-
},
|
|
498
|
+
size: a(fe).L
|
|
499
|
+
}, Q({
|
|
492
500
|
top: r(() => [
|
|
493
501
|
S(h, {
|
|
494
|
-
weight: a(
|
|
502
|
+
weight: a(Z).SemiBold,
|
|
495
503
|
"html-data": l[e.titleField]
|
|
496
504
|
}, null, 8, ["weight", "html-data"])
|
|
497
505
|
]),
|
|
498
506
|
right: r(() => [
|
|
499
|
-
|
|
507
|
+
$(t.$slots, "arrow")
|
|
500
508
|
]),
|
|
501
509
|
_: 2
|
|
502
510
|
}, [
|
|
503
511
|
l.icon || l.avatar ? {
|
|
504
512
|
name: "left",
|
|
505
513
|
fn: r(() => [
|
|
506
|
-
l.icon ? (s(), u(
|
|
514
|
+
l.icon ? (s(), u(j, {
|
|
507
515
|
key: 0,
|
|
508
516
|
name: l.icon,
|
|
509
517
|
color: l.iconColor || "main",
|
|
@@ -532,43 +540,43 @@ const tt = ["dir"], lt = { class: "mc-field-select__header" }, ot = { class: "mc
|
|
|
532
540
|
]),
|
|
533
541
|
key: "1"
|
|
534
542
|
} : void 0
|
|
535
|
-
]), 1032, ["size"])) : (s(),
|
|
536
|
-
|
|
543
|
+
]), 1032, ["size"])) : (s(), O("div", it, [
|
|
544
|
+
oe.value ? (s(), O("div", st, [
|
|
537
545
|
k.avatar ? (s(), u(a(H), {
|
|
538
546
|
key: 0,
|
|
539
547
|
src: k.avatar
|
|
540
|
-
}, null, 8, ["src"])) : (s(), u(
|
|
548
|
+
}, null, 8, ["src"])) : (s(), u(j, {
|
|
541
549
|
key: 1,
|
|
542
550
|
color: l.iconColor || "main",
|
|
543
551
|
name: e.icon
|
|
544
552
|
}, null, 8, ["color", "name"]))
|
|
545
553
|
])) : _("", !0),
|
|
546
554
|
T("div", {
|
|
547
|
-
class:
|
|
555
|
+
class: de(["mc-field-select__label-text", oe.value ? "mc-field-select__label-text--indent-left" : ""])
|
|
548
556
|
}, f(l ? l[e.titleField] : k.placeholder), 3)
|
|
549
557
|
]))
|
|
550
558
|
]),
|
|
551
559
|
noResult: r(() => [
|
|
552
|
-
|
|
553
|
-
T("span", null, f(
|
|
560
|
+
$(t.$slots, "noResult", {}, () => [
|
|
561
|
+
T("span", null, f(Se.value), 1)
|
|
554
562
|
])
|
|
555
563
|
]),
|
|
556
564
|
noOptions: r(() => [
|
|
557
|
-
|
|
558
|
-
T("span", null, f(
|
|
565
|
+
$(t.$slots, "noOptions", {}, () => [
|
|
566
|
+
T("span", null, f(we.value), 1)
|
|
559
567
|
])
|
|
560
568
|
]),
|
|
561
569
|
tag: r((l) => [
|
|
562
|
-
S(a(
|
|
563
|
-
size: a(
|
|
570
|
+
S(a(ye), {
|
|
571
|
+
size: a(tt).Xs,
|
|
564
572
|
class: "multiselect__tag",
|
|
565
|
-
variation: `${a(
|
|
573
|
+
variation: `${a(m).component.selected}-invert`,
|
|
566
574
|
"text-color": "black",
|
|
567
575
|
closable: !l?.option?.hasOwnProperty("is_closable") || l?.option?.is_closable,
|
|
568
576
|
onClose: (n) => l.remove(l.option)
|
|
569
577
|
}, {
|
|
570
578
|
button: r(() => [
|
|
571
|
-
S(
|
|
579
|
+
S(j, {
|
|
572
580
|
size: "250",
|
|
573
581
|
name: "cancel"
|
|
574
582
|
})
|
|
@@ -593,14 +601,14 @@ const tt = ["dir"], lt = { class: "mc-field-select__header" }, ot = { class: "mc
|
|
|
593
601
|
]),
|
|
594
602
|
_: 2
|
|
595
603
|
}, 1024)) : _("", !0),
|
|
596
|
-
e.optionWithPreview ? (s(), u(a(
|
|
604
|
+
e.optionWithPreview ? (s(), u(a(ee), {
|
|
597
605
|
key: 1,
|
|
598
606
|
class: "option__desc",
|
|
599
|
-
size: a(
|
|
600
|
-
},
|
|
607
|
+
size: a(fe).L
|
|
608
|
+
}, Q({
|
|
601
609
|
top: r(() => [
|
|
602
610
|
S(h, {
|
|
603
|
-
weight: a(
|
|
611
|
+
weight: a(Z).SemiBold,
|
|
604
612
|
"html-data": l[e.titleField]
|
|
605
613
|
}, null, 8, ["weight", "html-data"])
|
|
606
614
|
]),
|
|
@@ -609,7 +617,7 @@ const tt = ["dir"], lt = { class: "mc-field-select__header" }, ot = { class: "mc
|
|
|
609
617
|
l.icon || l.avatar ? {
|
|
610
618
|
name: "left",
|
|
611
619
|
fn: r(() => [
|
|
612
|
-
l.icon ? (s(), u(
|
|
620
|
+
l.icon ? (s(), u(j, {
|
|
613
621
|
key: 0,
|
|
614
622
|
name: l.icon,
|
|
615
623
|
color: l.iconColor || "main",
|
|
@@ -635,12 +643,12 @@ const tt = ["dir"], lt = { class: "mc-field-select__header" }, ot = { class: "mc
|
|
|
635
643
|
]),
|
|
636
644
|
key: "1"
|
|
637
645
|
} : void 0
|
|
638
|
-
]), 1032, ["size"])) : (s(), u(a(
|
|
646
|
+
]), 1032, ["size"])) : (s(), u(a(he), {
|
|
639
647
|
key: 2,
|
|
640
648
|
class: "mc-field-select__options-tooltip-target",
|
|
641
649
|
"max-width": "m",
|
|
642
650
|
color: "black",
|
|
643
|
-
placement: a(
|
|
651
|
+
placement: a(et).Top,
|
|
644
652
|
content: l[e.titleField]
|
|
645
653
|
}, {
|
|
646
654
|
default: r(() => [
|
|
@@ -653,23 +661,24 @@ const tt = ["dir"], lt = { class: "mc-field-select__header" }, ot = { class: "mc
|
|
|
653
661
|
} : void 0
|
|
654
662
|
]), 1040, ["modelValue"])
|
|
655
663
|
]),
|
|
656
|
-
a(y).errorText.value || e.helpText || t.$slots.footer ? (s(),
|
|
664
|
+
a(y).errorText.value || e.helpText || t.$slots.footer ? (s(), O("div", ct, [
|
|
657
665
|
a(y).errorText.value ? (s(), u(h, {
|
|
658
666
|
key: 0,
|
|
659
667
|
"tag-name": "div",
|
|
660
668
|
color: "red",
|
|
661
|
-
variation: a(
|
|
669
|
+
variation: a(ve).Overline,
|
|
662
670
|
"max-width": "100%",
|
|
663
671
|
"html-data": a(y).errorText.value
|
|
664
672
|
}, null, 8, ["variation", "html-data"])) : _("", !0),
|
|
665
|
-
a(y).errorText.value ? (s(),
|
|
666
|
-
|
|
673
|
+
a(y).errorText.value ? (s(), O("br", ut)) : _("", !0),
|
|
674
|
+
$(t.$slots, "footer", {}, () => [
|
|
667
675
|
e.helpText ? (s(), u(h, {
|
|
668
676
|
key: 0,
|
|
669
677
|
"tag-name": "div",
|
|
670
|
-
variation: a(
|
|
678
|
+
variation: a(ve).Overline,
|
|
671
679
|
color: "gray",
|
|
672
|
-
"max-width": "100%"
|
|
680
|
+
"max-width": "100%",
|
|
681
|
+
"pre-line": ""
|
|
673
682
|
}, {
|
|
674
683
|
default: r(() => [
|
|
675
684
|
E(f(e.helpText), 1)
|
|
@@ -678,9 +687,9 @@ const tt = ["dir"], lt = { class: "mc-field-select__header" }, ot = { class: "mc
|
|
|
678
687
|
}, 8, ["variation"])) : _("", !0)
|
|
679
688
|
])
|
|
680
689
|
])) : _("", !0)
|
|
681
|
-
], 14,
|
|
690
|
+
], 14, nt));
|
|
682
691
|
}
|
|
683
692
|
});
|
|
684
693
|
export {
|
|
685
|
-
|
|
694
|
+
Vt as default
|
|
686
695
|
};
|