@quoreadmin/ui 1.7.10 → 1.7.11
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/index.css +1 -1
- package/dist/index140.js +2 -2
- package/dist/index142.js +1 -1
- package/dist/index144.js +4 -4
- package/dist/index155.js +1 -1
- package/dist/index159.js +7 -7
- package/dist/index173.js +3 -3
- package/dist/index176.js +4 -4
- package/dist/index183.js +10 -10
- package/dist/index185.js +10 -10
- package/dist/index187.js +1077 -5825
- package/dist/index189.js +36 -35
- package/dist/index190.js +43 -17
- package/dist/index191.js +5932 -72
- package/dist/index192.js +199 -245
- package/dist/index193.js +25 -13674
- package/dist/index194.js +17 -26
- package/dist/index195.js +76 -61
- package/dist/index196.js +239 -224
- package/dist/index197.js +13659 -283
- package/dist/index198.js +27 -288
- package/dist/index199.js +63 -36
- package/dist/index200.js +238 -44
- package/dist/index201.js +287 -1169
- package/dist/index202.js +290 -0
- package/dist/index206.js +2 -2
- package/dist/index207.js +1 -1
- package/dist/index208.js +1 -1
- package/dist/index209.js +1 -1
- package/dist/index210.js +1 -1
- package/dist/index211.js +4 -4
- package/dist/index213.js +4 -4
- package/dist/index216.js +1 -1
- package/dist/index217.js +157 -84
- package/dist/index218.js +205 -384
- package/dist/index219.js +37 -22
- package/dist/index220.js +10 -161
- package/dist/index221.js +13 -11
- package/dist/index222.js +14 -12
- package/dist/index223.js +13 -15
- package/dist/index224.js +790 -153
- package/dist/index225.js +677 -45
- package/dist/index226.js +406 -33
- package/dist/index227.js +175 -39
- package/dist/index228.js +19 -160
- package/dist/index229.js +20 -228
- package/dist/index230.js +21 -36
- package/dist/index231.js +20 -10
- package/dist/index232.js +20 -3632
- package/dist/index233.js +20 -55
- package/dist/index234.js +3 -77
- package/dist/index235.js +84 -48
- package/dist/index236.js +180 -208
- package/dist/index237.js +133 -10
- package/dist/index238.js +155 -51
- package/dist/index239.js +1214 -52
- package/dist/index240.js +121 -48
- package/dist/index241.js +20 -75
- package/dist/index242.js +21 -722
- package/dist/index243.js +20 -39
- package/dist/index244.js +22 -64
- package/dist/index245.js +38 -11
- package/dist/index246.js +29 -705
- package/dist/index247.js +20 -820
- package/dist/index248.js +19 -126
- package/dist/index249.js +2 -38
- package/dist/index250.js +2 -80
- package/dist/index251.js +80 -20
- package/dist/index252.js +3 -3
- package/dist/index253.js +11 -11
- package/dist/index254.js +15 -13
- package/dist/index255.js +198 -21
- package/dist/index256.js +69 -21
- package/dist/index257.js +34 -20
- package/dist/index258.js +27 -823
- package/dist/index259.js +22 -702
- package/dist/index260.js +3626 -170
- package/dist/index261.js +55 -22
- package/dist/index262.js +77 -20
- package/dist/index263.js +52 -20
- package/dist/index264.js +215 -3
- package/dist/index265.js +10 -187
- package/dist/index266.js +52 -128
- package/dist/index267.js +52 -1214
- package/dist/index268.js +54 -20
- package/dist/index269.js +75 -22
- package/dist/index270.js +722 -21
- package/dist/index271.js +39 -29
- package/dist/index272.js +64 -20
- package/dist/index273.js +11 -20
- package/dist/index274.js +705 -2
- package/dist/index275.js +820 -2
- package/dist/index276.js +3 -253
- package/dist/index277.js +27 -8
- package/dist/index280.js +249 -50
- package/dist/index281.js +2 -79
- package/dist/index282.js +78 -25
- package/dist/index283.js +7 -21
- package/dist/index284.js +78 -21
- package/dist/index285.js +22 -16
- package/dist/index286.js +934 -16
- package/dist/index287.js +21 -22
- package/dist/index288.js +20 -3
- package/dist/index289.js +19 -26
- package/dist/index290.js +69 -1518
- package/dist/index291.js +19 -386
- package/dist/index292.js +19 -2731
- package/dist/index293.js +50 -82
- package/dist/index294.js +22 -3770
- package/dist/index295.js +21 -59
- package/dist/index296.js +63 -15
- package/dist/index297.js +226 -75
- package/dist/index298.js +4 -200
- package/dist/index299.js +124 -236
- package/dist/index300.js +68 -2
- package/dist/index301.js +83 -75
- package/dist/index302.js +28 -21
- package/dist/index303.js +9 -935
- package/dist/index304.js +74 -21
- package/dist/index305.js +3 -19
- package/dist/index306.js +2 -20
- package/dist/index307.js +80 -66
- package/dist/index308.js +53 -18
- package/dist/index309.js +6 -19
- package/dist/index310.js +4 -21
- package/dist/index311.js +178 -21
- package/dist/index312.js +62 -62
- package/dist/index313.js +74 -234
- package/dist/index314.js +25 -5
- package/dist/index315.js +21 -133
- package/dist/index316.js +21 -67
- package/dist/index317.js +14 -85
- package/dist/index318.js +17 -29
- package/dist/index319.js +22 -8
- package/dist/index320.js +1507 -64
- package/dist/index321.js +385 -3
- package/dist/index322.js +2731 -2
- package/dist/index323.js +80 -77
- package/dist/index324.js +3769 -53
- package/dist/index325.js +58 -4
- package/dist/index326.js +15 -5
- package/dist/index327.js +71 -166
- package/dist/index328.js +196 -57
- package/dist/index329.js +246 -75
- package/dist/index330.js +8 -36
- package/dist/index331.js +12 -8
- package/dist/index332.js +54 -12
- package/dist/index333.js +9 -52
- package/dist/index334.js +13 -11
- package/dist/index335.js +53 -9
- package/dist/index336.js +49 -55
- package/dist/index337.js +28 -49
- package/dist/index338.js +2 -31
- package/dist/index339.js +5 -2
- package/dist/index340.js +2 -5
- package/dist/index341.js +23 -2
- package/dist/index342.js +39 -21
- package/dist/index343.js +2 -41
- package/dist/index344.js +11 -2
- package/dist/index345.js +20 -11
- package/dist/index346.js +15 -18
- package/dist/index347.js +9 -16
- package/dist/index348.js +9 -9
- package/dist/index349.js +2 -10
- package/dist/index350.js +9 -2
- package/dist/index351.js +10 -9
- package/dist/index352.js +14 -10
- package/dist/index353.js +37 -14
- package/dist/index354.js +1 -1
- package/dist/index355.js +1 -1
- package/dist/index356.js +2 -2
- package/dist/index358.js +2 -2
- package/dist/index359.js +1 -1
- package/dist/index360.js +6 -6
- package/dist/index361.js +2 -2
- package/dist/index362.js +2 -2
- package/dist/index364.js +2 -2
- package/dist/index365.js +2 -2
- package/dist/index366.js +1 -1
- package/dist/index368.js +8 -8
- package/dist/index369.js +8 -8
- package/dist/index370.js +16 -100
- package/dist/index371.js +30 -90
- package/dist/index372.js +11 -98
- package/dist/index373.js +4 -17
- package/dist/index374.js +3 -30
- package/dist/index375.js +13 -11
- package/dist/index376.js +7 -4
- package/dist/index377.js +11 -3
- package/dist/index378.js +5 -13
- package/dist/index379.js +33 -7
- package/dist/index380.js +30 -11
- package/dist/index381.js +28 -5
- package/dist/index382.js +61 -33
- package/dist/index383.js +96 -29
- package/dist/index384.js +99 -26
- package/dist/index385.js +91 -61
- package/dist/index386.js +1 -1
- package/dist/index392.js +1 -1
- package/package.json +1 -1
- package/dist/index188.js +0 -209
package/dist/index201.js
CHANGED
|
@@ -1,1192 +1,310 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { Mark as x, markPasteRule as b, mergeAttributes as v, combineTransactionSteps as w, getChangedRanges as T, findChildrenInRange as O, getMarksBetween as R, getAttributes as _ } from "./index260.js";
|
|
2
|
+
import { registerCustomProtocol as C, tokenize as H, find as M, reset as U } from "./index274.js";
|
|
3
|
+
import { Plugin as g, PluginKey as A } from "./index275.js";
|
|
4
|
+
var P = "[\0- -\u2029 ]", I = new RegExp(P), B = new RegExp(`${P}$`), N = new RegExp(P, "g");
|
|
5
|
+
function W(t) {
|
|
6
|
+
return t.length === 1 ? t[0].isLink : t.length === 3 && t[1].isLink ? ["()", "[]"].includes(t[0].value + t[2].value) : !1;
|
|
4
7
|
}
|
|
5
|
-
function
|
|
6
|
-
return
|
|
8
|
+
function z(t) {
|
|
9
|
+
return new g({
|
|
10
|
+
key: new A("autolink"),
|
|
11
|
+
appendTransaction: (e, r, o) => {
|
|
12
|
+
const s = e.some((i) => i.docChanged) && !r.doc.eq(o.doc), l = e.some((i) => i.getMeta("preventAutolink"));
|
|
13
|
+
if (!s || l)
|
|
14
|
+
return;
|
|
15
|
+
const { tr: d } = o, a = w(r.doc, [...e]);
|
|
16
|
+
if (T(a).forEach(({ newRange: i }) => {
|
|
17
|
+
const f = O(o.doc, i, (c) => c.isTextblock);
|
|
18
|
+
let u, p;
|
|
19
|
+
if (f.length > 1)
|
|
20
|
+
u = f[0], p = o.doc.textBetween(
|
|
21
|
+
u.pos,
|
|
22
|
+
u.pos + u.node.nodeSize,
|
|
23
|
+
void 0,
|
|
24
|
+
" "
|
|
25
|
+
);
|
|
26
|
+
else if (f.length) {
|
|
27
|
+
const c = o.doc.textBetween(i.from, i.to, " ", " ");
|
|
28
|
+
if (!B.test(c))
|
|
29
|
+
return;
|
|
30
|
+
u = f[0], p = o.doc.textBetween(u.pos, i.to, void 0, " ");
|
|
31
|
+
}
|
|
32
|
+
if (u && p) {
|
|
33
|
+
const c = p.split(I).filter(Boolean);
|
|
34
|
+
if (c.length <= 0)
|
|
35
|
+
return !1;
|
|
36
|
+
const m = c[c.length - 1], E = u.pos + p.lastIndexOf(m);
|
|
37
|
+
if (!m)
|
|
38
|
+
return !1;
|
|
39
|
+
const L = H(m).map((n) => n.toObject(t.defaultProtocol));
|
|
40
|
+
if (!W(L))
|
|
41
|
+
return !1;
|
|
42
|
+
L.filter((n) => n.isLink).map((n) => ({
|
|
43
|
+
...n,
|
|
44
|
+
from: E + n.start + 1,
|
|
45
|
+
to: E + n.end + 1
|
|
46
|
+
})).filter((n) => o.schema.marks.code ? !o.doc.rangeHasMark(n.from, n.to, o.schema.marks.code) : !0).filter((n) => t.validate(n.value)).filter((n) => t.shouldAutoLink(n.value)).forEach((n) => {
|
|
47
|
+
R(n.from, n.to, o.doc).some((y) => y.mark.type === t.type) || d.addMark(
|
|
48
|
+
n.from,
|
|
49
|
+
n.to,
|
|
50
|
+
t.type.create({
|
|
51
|
+
href: n.href
|
|
52
|
+
})
|
|
53
|
+
);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}), !!d.steps.length)
|
|
57
|
+
return d;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
7
60
|
}
|
|
8
|
-
function
|
|
9
|
-
return
|
|
61
|
+
function V(t) {
|
|
62
|
+
return new g({
|
|
63
|
+
key: new A("handleClickLink"),
|
|
64
|
+
props: {
|
|
65
|
+
handleClick: (e, r, o) => {
|
|
66
|
+
var s, l;
|
|
67
|
+
if (o.button !== 0 || !e.editable)
|
|
68
|
+
return !1;
|
|
69
|
+
let d = !1;
|
|
70
|
+
if (t.enableClickSelection && (d = t.editor.commands.extendMarkRange(t.type.name)), t.openOnClick) {
|
|
71
|
+
let a = null;
|
|
72
|
+
if (o.target instanceof HTMLAnchorElement)
|
|
73
|
+
a = o.target;
|
|
74
|
+
else {
|
|
75
|
+
let u = o.target;
|
|
76
|
+
const p = [];
|
|
77
|
+
for (; u.nodeName !== "DIV"; )
|
|
78
|
+
p.push(u), u = u.parentNode;
|
|
79
|
+
a = p.find((c) => c.nodeName === "A");
|
|
80
|
+
}
|
|
81
|
+
if (!a)
|
|
82
|
+
return d;
|
|
83
|
+
const h = _(e.state, t.type.name), i = (s = a?.href) != null ? s : h.href, f = (l = a?.target) != null ? l : h.target;
|
|
84
|
+
a && i && (window.open(i, f), d = !0);
|
|
85
|
+
}
|
|
86
|
+
return d;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
});
|
|
10
90
|
}
|
|
11
|
-
function
|
|
12
|
-
return
|
|
91
|
+
function D(t) {
|
|
92
|
+
return new g({
|
|
93
|
+
key: new A("handlePasteLink"),
|
|
94
|
+
props: {
|
|
95
|
+
handlePaste: (e, r, o) => {
|
|
96
|
+
const { shouldAutoLink: s } = t, { state: l } = e, { selection: d } = l, { empty: a } = d;
|
|
97
|
+
if (a)
|
|
98
|
+
return !1;
|
|
99
|
+
let h = "";
|
|
100
|
+
o.content.forEach((f) => {
|
|
101
|
+
h += f.textContent;
|
|
102
|
+
});
|
|
103
|
+
const i = M(h, { defaultProtocol: t.defaultProtocol }).find(
|
|
104
|
+
(f) => f.isLink && f.value === h
|
|
105
|
+
);
|
|
106
|
+
return !h || !i || s !== void 0 && !s(i.value) ? !1 : t.editor.commands.setMark(t.type, {
|
|
107
|
+
href: i.href
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
});
|
|
13
112
|
}
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
113
|
+
function k(t, e) {
|
|
114
|
+
const r = ["http", "https", "ftp", "ftps", "mailto", "tel", "callto", "sms", "cid", "xmpp"];
|
|
115
|
+
return e && e.forEach((o) => {
|
|
116
|
+
const s = typeof o == "string" ? o : o.scheme;
|
|
117
|
+
s && r.push(s);
|
|
118
|
+
}), !t || t.replace(N, "").match(
|
|
119
|
+
new RegExp(
|
|
120
|
+
// eslint-disable-next-line no-useless-escape
|
|
121
|
+
`^(?:(?:${r.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,
|
|
122
|
+
"i"
|
|
123
|
+
)
|
|
124
|
+
);
|
|
19
125
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
props: {
|
|
31
|
-
/**
|
|
32
|
-
* Decide whether to filter the results based on search query.
|
|
33
|
-
* Useful for async filtering, where we search through more complex data.
|
|
34
|
-
* @type {Boolean}
|
|
35
|
-
*/
|
|
36
|
-
internalSearch: {
|
|
37
|
-
type: Boolean,
|
|
38
|
-
default: !0
|
|
39
|
-
},
|
|
40
|
-
/**
|
|
41
|
-
* Array of available options: Objects, Strings or Integers.
|
|
42
|
-
* If array of objects, visible label will default to option.label.
|
|
43
|
-
* If `labal` prop is passed, label will equal option['label']
|
|
44
|
-
* @type {Array}
|
|
45
|
-
*/
|
|
46
|
-
options: {
|
|
47
|
-
type: Array,
|
|
48
|
-
required: !0
|
|
49
|
-
},
|
|
50
|
-
/**
|
|
51
|
-
* Equivalent to the `multiple` attribute on a `<select>` input.
|
|
52
|
-
* @default false
|
|
53
|
-
* @type {Boolean}
|
|
54
|
-
*/
|
|
55
|
-
multiple: {
|
|
56
|
-
type: Boolean,
|
|
57
|
-
default: !1
|
|
58
|
-
},
|
|
59
|
-
/**
|
|
60
|
-
* Key to compare objects
|
|
61
|
-
* @default 'id'
|
|
62
|
-
* @type {String}
|
|
63
|
-
*/
|
|
64
|
-
trackBy: {
|
|
65
|
-
type: String
|
|
66
|
-
},
|
|
67
|
-
/**
|
|
68
|
-
* Label to look for in option Object
|
|
69
|
-
* @default 'label'
|
|
70
|
-
* @type {String}
|
|
71
|
-
*/
|
|
72
|
-
label: {
|
|
73
|
-
type: String
|
|
74
|
-
},
|
|
75
|
-
/**
|
|
76
|
-
* Enable/disable search in options
|
|
77
|
-
* @default true
|
|
78
|
-
* @type {Boolean}
|
|
79
|
-
*/
|
|
80
|
-
searchable: {
|
|
81
|
-
type: Boolean,
|
|
82
|
-
default: !0
|
|
83
|
-
},
|
|
84
|
-
/**
|
|
85
|
-
* Clear the search input after `)
|
|
86
|
-
* @default true
|
|
87
|
-
* @type {Boolean}
|
|
88
|
-
*/
|
|
89
|
-
clearOnSelect: {
|
|
90
|
-
type: Boolean,
|
|
91
|
-
default: !0
|
|
92
|
-
},
|
|
93
|
-
/**
|
|
94
|
-
* Hide already selected options
|
|
95
|
-
* @default false
|
|
96
|
-
* @type {Boolean}
|
|
97
|
-
*/
|
|
98
|
-
hideSelected: {
|
|
99
|
-
type: Boolean,
|
|
100
|
-
default: !1
|
|
101
|
-
},
|
|
102
|
-
/**
|
|
103
|
-
* Equivalent to the `placeholder` attribute on a `<select>` input.
|
|
104
|
-
* @default 'Select option'
|
|
105
|
-
* @type {String}
|
|
106
|
-
*/
|
|
107
|
-
placeholder: {
|
|
108
|
-
type: String,
|
|
109
|
-
default: "Select option"
|
|
110
|
-
},
|
|
111
|
-
/**
|
|
112
|
-
* Allow to remove all selected values
|
|
113
|
-
* @default true
|
|
114
|
-
* @type {Boolean}
|
|
115
|
-
*/
|
|
116
|
-
allowEmpty: {
|
|
117
|
-
type: Boolean,
|
|
118
|
-
default: !0
|
|
119
|
-
},
|
|
120
|
-
/**
|
|
121
|
-
* Reset this.internalValue, this.search after this.internalValue changes.
|
|
122
|
-
* Useful if want to create a stateless dropdown.
|
|
123
|
-
* @default false
|
|
124
|
-
* @type {Boolean}
|
|
125
|
-
*/
|
|
126
|
-
resetAfter: {
|
|
127
|
-
type: Boolean,
|
|
128
|
-
default: !1
|
|
129
|
-
},
|
|
130
|
-
/**
|
|
131
|
-
* Enable/disable closing after selecting an option
|
|
132
|
-
* @default true
|
|
133
|
-
* @type {Boolean}
|
|
134
|
-
*/
|
|
135
|
-
closeOnSelect: {
|
|
136
|
-
type: Boolean,
|
|
137
|
-
default: !0
|
|
138
|
-
},
|
|
139
|
-
/**
|
|
140
|
-
* Function to interpolate the custom label
|
|
141
|
-
* @default false
|
|
142
|
-
* @type {Function}
|
|
143
|
-
*/
|
|
144
|
-
customLabel: {
|
|
145
|
-
type: Function,
|
|
146
|
-
default(e, t) {
|
|
147
|
-
return S(e) ? "" : t ? e[t] : e;
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
/**
|
|
151
|
-
* Disable / Enable tagging
|
|
152
|
-
* @default false
|
|
153
|
-
* @type {Boolean}
|
|
154
|
-
*/
|
|
155
|
-
taggable: {
|
|
156
|
-
type: Boolean,
|
|
157
|
-
default: !1
|
|
158
|
-
},
|
|
159
|
-
/**
|
|
160
|
-
* String to show when highlighting a potential tag
|
|
161
|
-
* @default 'Press enter to create a tag'
|
|
162
|
-
* @type {String}
|
|
163
|
-
*/
|
|
164
|
-
tagPlaceholder: {
|
|
165
|
-
type: String,
|
|
166
|
-
default: "Press enter to create a tag"
|
|
167
|
-
},
|
|
168
|
-
/**
|
|
169
|
-
* By default new tags will appear above the search results.
|
|
170
|
-
* Changing to 'bottom' will revert this behaviour
|
|
171
|
-
* and will proritize the search results
|
|
172
|
-
* @default 'top'
|
|
173
|
-
* @type {String}
|
|
174
|
-
*/
|
|
175
|
-
tagPosition: {
|
|
176
|
-
type: String,
|
|
177
|
-
default: "top"
|
|
178
|
-
},
|
|
179
|
-
/**
|
|
180
|
-
* Number of allowed selected options. No limit if 0.
|
|
181
|
-
* @default 0
|
|
182
|
-
* @type {Number}
|
|
183
|
-
*/
|
|
184
|
-
max: {
|
|
185
|
-
type: [Number, Boolean],
|
|
186
|
-
default: !1
|
|
187
|
-
},
|
|
188
|
-
/**
|
|
189
|
-
* Will be passed with all events as second param.
|
|
190
|
-
* Useful for identifying events origin.
|
|
191
|
-
* @default null
|
|
192
|
-
* @type {String|Integer}
|
|
193
|
-
*/
|
|
194
|
-
id: {
|
|
195
|
-
default: null
|
|
196
|
-
},
|
|
197
|
-
/**
|
|
198
|
-
* Limits the options displayed in the dropdown
|
|
199
|
-
* to the first X options.
|
|
200
|
-
* @default 1000
|
|
201
|
-
* @type {Integer}
|
|
202
|
-
*/
|
|
203
|
-
optionsLimit: {
|
|
204
|
-
type: Number,
|
|
205
|
-
default: 1e3
|
|
206
|
-
},
|
|
207
|
-
/**
|
|
208
|
-
* Name of the property containing
|
|
209
|
-
* the group values
|
|
210
|
-
* @default 1000
|
|
211
|
-
* @type {String}
|
|
212
|
-
*/
|
|
213
|
-
groupValues: {
|
|
214
|
-
type: String
|
|
215
|
-
},
|
|
216
|
-
/**
|
|
217
|
-
* Name of the property containing
|
|
218
|
-
* the group label
|
|
219
|
-
* @default 1000
|
|
220
|
-
* @type {String}
|
|
221
|
-
*/
|
|
222
|
-
groupLabel: {
|
|
223
|
-
type: String
|
|
224
|
-
},
|
|
225
|
-
/**
|
|
226
|
-
* Allow to select all group values
|
|
227
|
-
* by selecting the group label
|
|
228
|
-
* @default false
|
|
229
|
-
* @type {Boolean}
|
|
230
|
-
*/
|
|
231
|
-
groupSelect: {
|
|
232
|
-
type: Boolean,
|
|
233
|
-
default: !1
|
|
234
|
-
},
|
|
235
|
-
/**
|
|
236
|
-
* Array of keyboard keys to block
|
|
237
|
-
* when selecting
|
|
238
|
-
* @default 1000
|
|
239
|
-
* @type {String}
|
|
240
|
-
*/
|
|
241
|
-
blockKeys: {
|
|
242
|
-
type: Array,
|
|
243
|
-
default() {
|
|
244
|
-
return [];
|
|
126
|
+
var X = x.create({
|
|
127
|
+
name: "link",
|
|
128
|
+
priority: 1e3,
|
|
129
|
+
keepOnSplit: !1,
|
|
130
|
+
exitable: !0,
|
|
131
|
+
onCreate() {
|
|
132
|
+
this.options.validate && !this.options.shouldAutoLink && (this.options.shouldAutoLink = this.options.validate, console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")), this.options.protocols.forEach((t) => {
|
|
133
|
+
if (typeof t == "string") {
|
|
134
|
+
C(t);
|
|
135
|
+
return;
|
|
245
136
|
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
* Prevent from wiping up the search value
|
|
249
|
-
* @default false
|
|
250
|
-
* @type {Boolean}
|
|
251
|
-
*/
|
|
252
|
-
preserveSearch: {
|
|
253
|
-
type: Boolean,
|
|
254
|
-
default: !1
|
|
255
|
-
},
|
|
256
|
-
/**
|
|
257
|
-
* Select 1st options if value is empty
|
|
258
|
-
* @default false
|
|
259
|
-
* @type {Boolean}
|
|
260
|
-
*/
|
|
261
|
-
preselectFirst: {
|
|
262
|
-
type: Boolean,
|
|
263
|
-
default: !1
|
|
264
|
-
},
|
|
265
|
-
/**
|
|
266
|
-
* Prevent autofocus
|
|
267
|
-
* @default false
|
|
268
|
-
* @type {Boolean}
|
|
269
|
-
*/
|
|
270
|
-
preventAutofocus: {
|
|
271
|
-
type: Boolean,
|
|
272
|
-
default: !1
|
|
273
|
-
},
|
|
274
|
-
/**
|
|
275
|
-
* Allows a custom function for sorting search/filtered results.
|
|
276
|
-
* @default null
|
|
277
|
-
* @type {Function}
|
|
278
|
-
*/
|
|
279
|
-
filteringSortFunc: {
|
|
280
|
-
type: Function,
|
|
281
|
-
default: null
|
|
282
|
-
}
|
|
137
|
+
C(t.scheme, t.optionalSlashes);
|
|
138
|
+
});
|
|
283
139
|
},
|
|
284
|
-
|
|
285
|
-
|
|
140
|
+
onDestroy() {
|
|
141
|
+
U();
|
|
286
142
|
},
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
return this.modelValue || this.modelValue === 0 ? Array.isArray(this.modelValue) ? this.modelValue : [this.modelValue] : [];
|
|
290
|
-
},
|
|
291
|
-
filteredOptions() {
|
|
292
|
-
const e = this.search || "", t = e.toLowerCase().trim();
|
|
293
|
-
let i = this.options.concat();
|
|
294
|
-
return this.internalSearch ? i = this.groupValues ? this.filterAndFlat(i, t, this.label) : this.filterOptions(i, t, this.label, this.customLabel) : i = this.groupValues ? w(this.groupValues, this.groupLabel)(i) : i, i = this.hideSelected ? i.filter(T(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);
|
|
295
|
-
},
|
|
296
|
-
valueKeys() {
|
|
297
|
-
return this.trackBy ? this.internalValue.map((e) => e[this.trackBy]) : this.internalValue;
|
|
298
|
-
},
|
|
299
|
-
optionKeys() {
|
|
300
|
-
return (this.groupValues ? this.flatAndStrip(this.options) : this.options).map((t) => this.customLabel(t, this.label).toString().toLowerCase());
|
|
301
|
-
},
|
|
302
|
-
currentOptionLabel() {
|
|
303
|
-
return this.multiple ? this.searchable ? "" : this.placeholder : this.internalValue.length ? this.getOptionLabel(this.internalValue[0]) : this.searchable ? "" : this.placeholder;
|
|
304
|
-
}
|
|
143
|
+
inclusive() {
|
|
144
|
+
return this.options.autolink;
|
|
305
145
|
},
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
146
|
+
addOptions() {
|
|
147
|
+
return {
|
|
148
|
+
openOnClick: !0,
|
|
149
|
+
enableClickSelection: !1,
|
|
150
|
+
linkOnPaste: !0,
|
|
151
|
+
autolink: !0,
|
|
152
|
+
protocols: [],
|
|
153
|
+
defaultProtocol: "http",
|
|
154
|
+
HTMLAttributes: {
|
|
155
|
+
target: "_blank",
|
|
156
|
+
rel: "noopener noreferrer nofollow",
|
|
157
|
+
class: null
|
|
310
158
|
},
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
/**
|
|
320
|
-
* Returns the internalValue in a way it can be emited to the parent
|
|
321
|
-
* @returns {Object||Array||String||Integer}
|
|
322
|
-
*/
|
|
323
|
-
getValue() {
|
|
324
|
-
return this.multiple ? this.internalValue : this.internalValue.length === 0 ? null : this.internalValue[0];
|
|
325
|
-
},
|
|
326
|
-
/**
|
|
327
|
-
* Filters and then flattens the options list
|
|
328
|
-
* @param {Array}
|
|
329
|
-
* @return {Array} returns a filtered and flat options list
|
|
330
|
-
*/
|
|
331
|
-
filterAndFlat(e, t, i) {
|
|
332
|
-
return E(
|
|
333
|
-
this.filterGroups(t, i, this.groupValues, this.groupLabel, this.customLabel),
|
|
334
|
-
w(this.groupValues, this.groupLabel)
|
|
335
|
-
)(e);
|
|
336
|
-
},
|
|
337
|
-
/**
|
|
338
|
-
* Flattens and then strips the group labels from the options list
|
|
339
|
-
* @param {Array}
|
|
340
|
-
* @return {Array} returns a flat options list without group labels
|
|
341
|
-
*/
|
|
342
|
-
flatAndStrip(e) {
|
|
343
|
-
return E(
|
|
344
|
-
w(this.groupValues, this.groupLabel),
|
|
345
|
-
M
|
|
346
|
-
)(e);
|
|
347
|
-
},
|
|
348
|
-
/**
|
|
349
|
-
* Updates the search value
|
|
350
|
-
* @param {String}
|
|
351
|
-
*/
|
|
352
|
-
updateSearch(e) {
|
|
353
|
-
this.search = e;
|
|
354
|
-
},
|
|
355
|
-
/**
|
|
356
|
-
* Finds out if the given query is already present
|
|
357
|
-
* in the available options
|
|
358
|
-
* @param {String}
|
|
359
|
-
* @return {Boolean} returns true if element is available
|
|
360
|
-
*/
|
|
361
|
-
isExistingOption(e) {
|
|
362
|
-
return this.options ? this.optionKeys.indexOf(e) > -1 : !1;
|
|
363
|
-
},
|
|
364
|
-
/**
|
|
365
|
-
* Finds out if the given element is already present
|
|
366
|
-
* in the result value
|
|
367
|
-
* @param {Object||String||Integer} option passed element to check
|
|
368
|
-
* @returns {Boolean} returns true if element is selected
|
|
369
|
-
*/
|
|
370
|
-
isSelected(e) {
|
|
371
|
-
const t = this.trackBy ? e[this.trackBy] : e;
|
|
372
|
-
return this.valueKeys.indexOf(t) > -1;
|
|
373
|
-
},
|
|
374
|
-
/**
|
|
375
|
-
* Finds out if the given option is disabled
|
|
376
|
-
* @param {Object||String||Integer} option passed element to check
|
|
377
|
-
* @returns {Boolean} returns true if element is disabled
|
|
378
|
-
*/
|
|
379
|
-
isOptionDisabled(e) {
|
|
380
|
-
return !!e.$isDisabled;
|
|
381
|
-
},
|
|
382
|
-
/**
|
|
383
|
-
* Returns empty string when options is null/undefined
|
|
384
|
-
* Returns tag query if option is tag.
|
|
385
|
-
* Returns the customLabel() results and casts it to string.
|
|
386
|
-
*
|
|
387
|
-
* @param {Object||String||Integer} Passed option
|
|
388
|
-
* @returns {Object||String}
|
|
389
|
-
*/
|
|
390
|
-
getOptionLabel(e) {
|
|
391
|
-
if (S(e)) return "";
|
|
392
|
-
if (e.isTag) return e.label;
|
|
393
|
-
if (e.$isLabel) return e.$groupLabel;
|
|
394
|
-
const t = this.customLabel(e, this.label);
|
|
395
|
-
return S(t) ? "" : t;
|
|
396
|
-
},
|
|
397
|
-
/**
|
|
398
|
-
* Add the given option to the list of selected options
|
|
399
|
-
* or sets the option as the selected option.
|
|
400
|
-
* If option is already selected -> remove it from the results.
|
|
401
|
-
*
|
|
402
|
-
* @param {Object||String||Integer} option to select/deselect
|
|
403
|
-
* @param {Boolean} block removing
|
|
404
|
-
*/
|
|
405
|
-
select(e, t) {
|
|
406
|
-
if (e.$isLabel && this.groupSelect) {
|
|
407
|
-
this.selectGroup(e);
|
|
408
|
-
return;
|
|
409
|
-
}
|
|
410
|
-
if (!(this.blockKeys.indexOf(t) !== -1 || this.disabled || e.$isDisabled || e.$isLabel) && !(this.max && this.multiple && this.internalValue.length === this.max) && !(t === "Tab" && !this.pointerDirty)) {
|
|
411
|
-
if (e.isTag)
|
|
412
|
-
this.$emit("tag", e.label, this.id), this.search = "", this.closeOnSelect && !this.multiple && this.deactivate();
|
|
413
|
-
else {
|
|
414
|
-
if (this.isSelected(e)) {
|
|
415
|
-
t !== "Tab" && this.removeElement(e);
|
|
416
|
-
return;
|
|
417
|
-
}
|
|
418
|
-
this.multiple ? this.$emit("update:modelValue", this.internalValue.concat([e])) : this.$emit("update:modelValue", e), this.$emit("select", e, this.id), this.clearOnSelect && (this.search = "");
|
|
419
|
-
}
|
|
420
|
-
this.closeOnSelect && this.deactivate();
|
|
159
|
+
isAllowedUri: (t, e) => !!k(t, e.protocols),
|
|
160
|
+
validate: (t) => !!t,
|
|
161
|
+
shouldAutoLink: (t) => {
|
|
162
|
+
const e = /^[a-z][a-z0-9+.-]*:\/\//i.test(t), r = /^[a-z][a-z0-9+.-]*:/i.test(t);
|
|
163
|
+
if (e || r && !t.includes("@"))
|
|
164
|
+
return !0;
|
|
165
|
+
const s = (t.includes("@") ? t.split("@").pop() : t).split(/[/?#:]/)[0];
|
|
166
|
+
return !(/^\d{1,3}(\.\d{1,3}){3}$/.test(s) || !/\./.test(s));
|
|
421
167
|
}
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
const t = this.options.find((i) => i[this.groupLabel] === e.$groupLabel);
|
|
431
|
-
if (t) {
|
|
432
|
-
if (this.wholeGroupSelected(t)) {
|
|
433
|
-
this.$emit("remove", t[this.groupValues], this.id);
|
|
434
|
-
const i = this.trackBy ? t[this.groupValues].map((a) => a[this.trackBy]) : t[this.groupValues], l = this.internalValue.filter(
|
|
435
|
-
(a) => i.indexOf(this.trackBy ? a[this.trackBy] : a) === -1
|
|
436
|
-
);
|
|
437
|
-
this.$emit("update:modelValue", l);
|
|
438
|
-
} else {
|
|
439
|
-
const i = t[this.groupValues].filter(
|
|
440
|
-
(l) => !(this.isOptionDisabled(l) || this.isSelected(l))
|
|
441
|
-
);
|
|
442
|
-
this.max && i.splice(this.max - this.internalValue.length), this.$emit("select", i, this.id), this.$emit(
|
|
443
|
-
"update:modelValue",
|
|
444
|
-
this.internalValue.concat(i)
|
|
445
|
-
);
|
|
168
|
+
};
|
|
169
|
+
},
|
|
170
|
+
addAttributes() {
|
|
171
|
+
return {
|
|
172
|
+
href: {
|
|
173
|
+
default: null,
|
|
174
|
+
parseHTML(t) {
|
|
175
|
+
return t.getAttribute("href");
|
|
446
176
|
}
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
return e[this.groupValues].every(
|
|
457
|
-
(t) => this.isSelected(t) || this.isOptionDisabled(t)
|
|
458
|
-
);
|
|
459
|
-
},
|
|
460
|
-
/**
|
|
461
|
-
* Helper to identify if all values in a group are disabled
|
|
462
|
-
*
|
|
463
|
-
* @param {Object} group to check for disabled values
|
|
464
|
-
*/
|
|
465
|
-
wholeGroupDisabled(e) {
|
|
466
|
-
return e[this.groupValues].every(this.isOptionDisabled);
|
|
467
|
-
},
|
|
468
|
-
/**
|
|
469
|
-
* Removes the given option from the selected options.
|
|
470
|
-
* Additionally checks this.allowEmpty prop if option can be removed when
|
|
471
|
-
* it is the last selected option.
|
|
472
|
-
*
|
|
473
|
-
* @param {type} option description
|
|
474
|
-
* @return {type} description
|
|
475
|
-
*/
|
|
476
|
-
removeElement(e, t = !0) {
|
|
477
|
-
if (this.disabled || e.$isDisabled) return;
|
|
478
|
-
if (!this.allowEmpty && this.internalValue.length <= 1) {
|
|
479
|
-
this.deactivate();
|
|
480
|
-
return;
|
|
177
|
+
},
|
|
178
|
+
target: {
|
|
179
|
+
default: this.options.HTMLAttributes.target
|
|
180
|
+
},
|
|
181
|
+
rel: {
|
|
182
|
+
default: this.options.HTMLAttributes.rel
|
|
183
|
+
},
|
|
184
|
+
class: {
|
|
185
|
+
default: this.options.HTMLAttributes.class
|
|
481
186
|
}
|
|
482
|
-
const i = typeof e == "object" ? this.valueKeys.indexOf(e[this.trackBy]) : this.valueKeys.indexOf(e);
|
|
483
|
-
if (this.multiple) {
|
|
484
|
-
const l = this.internalValue.slice(0, i).concat(this.internalValue.slice(i + 1));
|
|
485
|
-
this.$emit("update:modelValue", l);
|
|
486
|
-
} else
|
|
487
|
-
this.$emit("update:modelValue", null);
|
|
488
|
-
this.$emit("remove", e, this.id), this.closeOnSelect && t && this.deactivate();
|
|
489
|
-
},
|
|
490
|
-
/**
|
|
491
|
-
* Calls this.removeElement() with the last element
|
|
492
|
-
* from this.internalValue (selected element Array)
|
|
493
|
-
*
|
|
494
|
-
* @fires this#removeElement
|
|
495
|
-
*/
|
|
496
|
-
removeLastElement() {
|
|
497
|
-
this.blockKeys.indexOf("Delete") === -1 && this.search.length === 0 && Array.isArray(this.internalValue) && this.internalValue.length && this.removeElement(this.internalValue[this.internalValue.length - 1], !1);
|
|
498
|
-
},
|
|
499
|
-
/**
|
|
500
|
-
* Opens the multiselect’s dropdown.
|
|
501
|
-
* Sets this.isOpen to TRUE
|
|
502
|
-
*/
|
|
503
|
-
activate() {
|
|
504
|
-
this.isOpen || this.disabled || (this.adjustPosition(), this.groupValues && this.pointer === 0 && this.filteredOptions.length && (this.pointer = 1), this.isOpen = !0, this.searchable ? (this.preserveSearch || (this.search = ""), this.preventAutofocus || this.$nextTick(() => this.$refs.search && this.$refs.search.focus())) : this.preventAutofocus || typeof this.$el < "u" && this.$el.focus(), this.$emit("open", this.id));
|
|
505
|
-
},
|
|
506
|
-
/**
|
|
507
|
-
* Closes the multiselect’s dropdown.
|
|
508
|
-
* Sets this.isOpen to FALSE
|
|
509
|
-
*/
|
|
510
|
-
deactivate() {
|
|
511
|
-
this.isOpen && (this.isOpen = !1, this.searchable ? this.$refs.search !== null && typeof this.$refs.search < "u" && this.$refs.search.blur() : typeof this.$el < "u" && this.$el.blur(), this.preserveSearch || (this.search = ""), this.$emit("close", this.getValue(), this.id));
|
|
512
|
-
},
|
|
513
|
-
/**
|
|
514
|
-
* Call this.activate() or this.deactivate()
|
|
515
|
-
* depending on this.isOpen value.
|
|
516
|
-
*
|
|
517
|
-
* @fires this#activate || this#deactivate
|
|
518
|
-
* @property {Boolean} isOpen indicates if dropdown is open
|
|
519
|
-
*/
|
|
520
|
-
toggle() {
|
|
521
|
-
this.isOpen ? this.deactivate() : this.activate();
|
|
522
|
-
},
|
|
523
|
-
/**
|
|
524
|
-
* Updates the hasEnoughSpace variable used for
|
|
525
|
-
* detecting where to expand the dropdown
|
|
526
|
-
*/
|
|
527
|
-
adjustPosition() {
|
|
528
|
-
if (typeof window > "u") return;
|
|
529
|
-
const e = this.$el.getBoundingClientRect().top, t = window.innerHeight - this.$el.getBoundingClientRect().bottom;
|
|
530
|
-
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));
|
|
531
|
-
},
|
|
532
|
-
/**
|
|
533
|
-
* Filters and sorts the options ready for selection
|
|
534
|
-
* @param {Array} options
|
|
535
|
-
* @param {String} search
|
|
536
|
-
* @param {String} label
|
|
537
|
-
* @param {Function} customLabel
|
|
538
|
-
* @returns {Array}
|
|
539
|
-
*/
|
|
540
|
-
filterOptions(e, t, i, l) {
|
|
541
|
-
return t ? e.filter((a) => A(l(a, i), t)).sort((a, n) => typeof this.filteringSortFunc == "function" ? this.filteringSortFunc(a, n) : l(a, i).length - l(n, i).length) : e;
|
|
542
|
-
},
|
|
543
|
-
/**
|
|
544
|
-
*
|
|
545
|
-
* @param {String} search
|
|
546
|
-
* @param {String} label
|
|
547
|
-
* @param {String} values
|
|
548
|
-
* @param {String} groupLabel
|
|
549
|
-
* @param {function} customLabel
|
|
550
|
-
* @returns {function(*): *}
|
|
551
|
-
*/
|
|
552
|
-
filterGroups(e, t, i, l, a) {
|
|
553
|
-
return (n) => n.map((s) => {
|
|
554
|
-
if (!s[i])
|
|
555
|
-
return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."), [];
|
|
556
|
-
const h = this.filterOptions(s[i], e, t, a);
|
|
557
|
-
return h.length ? {
|
|
558
|
-
[l]: s[l],
|
|
559
|
-
[i]: h
|
|
560
|
-
} : [];
|
|
561
|
-
});
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
}, F = {
|
|
565
|
-
data() {
|
|
566
|
-
return {
|
|
567
|
-
pointer: 0,
|
|
568
|
-
pointerDirty: !1
|
|
569
187
|
};
|
|
570
188
|
},
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
189
|
+
parseHTML() {
|
|
190
|
+
return [
|
|
191
|
+
{
|
|
192
|
+
tag: "a[href]",
|
|
193
|
+
getAttrs: (t) => {
|
|
194
|
+
const e = t.getAttribute("href");
|
|
195
|
+
return !e || !this.options.isAllowedUri(e, {
|
|
196
|
+
defaultValidate: (r) => !!k(r, this.options.protocols),
|
|
197
|
+
protocols: this.options.protocols,
|
|
198
|
+
defaultProtocol: this.options.defaultProtocol
|
|
199
|
+
}) ? !1 : null;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
];
|
|
585
203
|
},
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
}
|
|
204
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
205
|
+
return this.options.isAllowedUri(t.href, {
|
|
206
|
+
defaultValidate: (e) => !!k(e, this.options.protocols),
|
|
207
|
+
protocols: this.options.protocols,
|
|
208
|
+
defaultProtocol: this.options.defaultProtocol
|
|
209
|
+
}) ? ["a", v(this.options.HTMLAttributes, t), 0] : ["a", v(this.options.HTMLAttributes, { ...t, href: "" }), 0];
|
|
593
210
|
},
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
}
|
|
211
|
+
markdownTokenName: "link",
|
|
212
|
+
parseMarkdown: (t, e) => e.applyMark("link", e.parseInline(t.tokens || []), {
|
|
213
|
+
href: t.href,
|
|
214
|
+
title: t.title || null
|
|
215
|
+
}),
|
|
216
|
+
renderMarkdown: (t, e) => {
|
|
217
|
+
var r;
|
|
218
|
+
const o = ((r = t.attrs) == null ? void 0 : r.href) || "";
|
|
219
|
+
return `[${e.renderChildren(t)}](${o})`;
|
|
604
220
|
},
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
}
|
|
625
|
-
addPointerElement({ key: e } = "Enter") {
|
|
626
|
-
this.filteredOptions.length > 0 && this.select(this.filteredOptions[this.pointer], e), this.pointerReset();
|
|
627
|
-
},
|
|
628
|
-
pointerForward() {
|
|
629
|
-
this.pointer < this.filteredOptions.length - 1 && (this.pointer++, this.$refs.list.scrollTop <= this.pointerPosition - (this.visibleElements - 1) * this.optionHeight && (this.$refs.list.scrollTop = this.pointerPosition - (this.visibleElements - 1) * this.optionHeight), this.filteredOptions[this.pointer] && this.filteredOptions[this.pointer].$isLabel && !this.groupSelect && this.pointerForward()), this.pointerDirty = !0;
|
|
630
|
-
},
|
|
631
|
-
pointerBackward() {
|
|
632
|
-
this.pointer > 0 ? (this.pointer--, this.$refs.list.scrollTop >= this.pointerPosition && (this.$refs.list.scrollTop = this.pointerPosition), this.filteredOptions[this.pointer] && this.filteredOptions[this.pointer].$isLabel && !this.groupSelect && this.pointerBackward()) : this.filteredOptions[this.pointer] && this.filteredOptions[0].$isLabel && !this.groupSelect && this.pointerForward(), this.pointerDirty = !0;
|
|
633
|
-
},
|
|
634
|
-
pointerReset() {
|
|
635
|
-
this.closeOnSelect && (this.pointer = 0, this.$refs.list && (this.$refs.list.scrollTop = 0));
|
|
636
|
-
},
|
|
637
|
-
pointerAdjust() {
|
|
638
|
-
this.pointer >= this.filteredOptions.length - 1 && (this.pointer = this.filteredOptions.length ? this.filteredOptions.length - 1 : 0), this.filteredOptions.length > 0 && this.filteredOptions[this.pointer].$isLabel && !this.groupSelect && this.pointerForward();
|
|
639
|
-
},
|
|
640
|
-
pointerSet(e) {
|
|
641
|
-
this.pointer = e, this.pointerDirty = !0;
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
}, G = {
|
|
645
|
-
name: "vue-multiselect",
|
|
646
|
-
mixins: [P, F],
|
|
647
|
-
compatConfig: {
|
|
648
|
-
MODE: 3,
|
|
649
|
-
ATTR_ENUMERATED_COERCION: !1
|
|
650
|
-
},
|
|
651
|
-
props: {
|
|
652
|
-
/**
|
|
653
|
-
* name attribute to match optional label element
|
|
654
|
-
* @default ''
|
|
655
|
-
* @type {String}
|
|
656
|
-
*/
|
|
657
|
-
name: {
|
|
658
|
-
type: String,
|
|
659
|
-
default: ""
|
|
660
|
-
},
|
|
661
|
-
/**
|
|
662
|
-
* Presets the selected options value.
|
|
663
|
-
* @type {Object||Array||String||Integer}
|
|
664
|
-
*/
|
|
665
|
-
modelValue: {
|
|
666
|
-
type: null,
|
|
667
|
-
default() {
|
|
668
|
-
return [];
|
|
669
|
-
}
|
|
670
|
-
},
|
|
671
|
-
/**
|
|
672
|
-
* String to show when pointing to an option
|
|
673
|
-
* @default 'Press enter to select'
|
|
674
|
-
* @type {String}
|
|
675
|
-
*/
|
|
676
|
-
selectLabel: {
|
|
677
|
-
type: String,
|
|
678
|
-
default: "Press enter to select"
|
|
679
|
-
},
|
|
680
|
-
/**
|
|
681
|
-
* String to show when pointing to an option
|
|
682
|
-
* @default 'Press enter to select'
|
|
683
|
-
* @type {String}
|
|
684
|
-
*/
|
|
685
|
-
selectGroupLabel: {
|
|
686
|
-
type: String,
|
|
687
|
-
default: "Press enter to select group"
|
|
688
|
-
},
|
|
689
|
-
/**
|
|
690
|
-
* String to show next to selected option
|
|
691
|
-
* @default 'Selected'
|
|
692
|
-
* @type {String}
|
|
693
|
-
*/
|
|
694
|
-
selectedLabel: {
|
|
695
|
-
type: String,
|
|
696
|
-
default: "Selected"
|
|
697
|
-
},
|
|
698
|
-
/**
|
|
699
|
-
* String to show when pointing to an already selected option
|
|
700
|
-
* @default 'Press enter to remove'
|
|
701
|
-
* @type {String}
|
|
702
|
-
*/
|
|
703
|
-
deselectLabel: {
|
|
704
|
-
type: String,
|
|
705
|
-
default: "Press enter to remove"
|
|
706
|
-
},
|
|
707
|
-
/**
|
|
708
|
-
* String to show when pointing to an already selected option
|
|
709
|
-
* @default 'Press enter to remove'
|
|
710
|
-
* @type {String}
|
|
711
|
-
*/
|
|
712
|
-
deselectGroupLabel: {
|
|
713
|
-
type: String,
|
|
714
|
-
default: "Press enter to deselect group"
|
|
715
|
-
},
|
|
716
|
-
/**
|
|
717
|
-
* Decide whether to show pointer labels
|
|
718
|
-
* @default true
|
|
719
|
-
* @type {Boolean}
|
|
720
|
-
*/
|
|
721
|
-
showLabels: {
|
|
722
|
-
type: Boolean,
|
|
723
|
-
default: !0
|
|
724
|
-
},
|
|
725
|
-
/**
|
|
726
|
-
* Limit the display of selected options. The rest will be hidden within the limitText string.
|
|
727
|
-
* @default 99999
|
|
728
|
-
* @type {Integer}
|
|
729
|
-
*/
|
|
730
|
-
limit: {
|
|
731
|
-
type: Number,
|
|
732
|
-
default: 99999
|
|
733
|
-
},
|
|
734
|
-
/**
|
|
735
|
-
* Sets maxHeight style value of the dropdown
|
|
736
|
-
* @default 300
|
|
737
|
-
* @type {Integer}
|
|
738
|
-
*/
|
|
739
|
-
maxHeight: {
|
|
740
|
-
type: Number,
|
|
741
|
-
default: 300
|
|
742
|
-
},
|
|
743
|
-
/**
|
|
744
|
-
* Function that process the message shown when selected
|
|
745
|
-
* elements pass the defined limit.
|
|
746
|
-
* @default 'and * more'
|
|
747
|
-
* @param {Int} count Number of elements more than limit
|
|
748
|
-
* @type {Function}
|
|
749
|
-
*/
|
|
750
|
-
limitText: {
|
|
751
|
-
type: Function,
|
|
752
|
-
default: (e) => `and ${e} more`
|
|
753
|
-
},
|
|
754
|
-
/**
|
|
755
|
-
* Set true to trigger the loading spinner.
|
|
756
|
-
* @default False
|
|
757
|
-
* @type {Boolean}
|
|
758
|
-
*/
|
|
759
|
-
loading: {
|
|
760
|
-
type: Boolean,
|
|
761
|
-
default: !1
|
|
762
|
-
},
|
|
763
|
-
/**
|
|
764
|
-
* Disables the multiselect if true.
|
|
765
|
-
* @default false
|
|
766
|
-
* @type {Boolean}
|
|
767
|
-
*/
|
|
768
|
-
disabled: {
|
|
769
|
-
type: Boolean,
|
|
770
|
-
default: !1
|
|
771
|
-
},
|
|
772
|
-
/**
|
|
773
|
-
* Enables search input's spellcheck if true.
|
|
774
|
-
* @default false
|
|
775
|
-
* @type {Boolean}
|
|
776
|
-
*/
|
|
777
|
-
spellcheck: {
|
|
778
|
-
type: Boolean,
|
|
779
|
-
default: !1
|
|
780
|
-
},
|
|
781
|
-
/**
|
|
782
|
-
* Fixed opening direction
|
|
783
|
-
* @default ''
|
|
784
|
-
* @type {String}
|
|
785
|
-
*/
|
|
786
|
-
openDirection: {
|
|
787
|
-
type: String,
|
|
788
|
-
default: ""
|
|
789
|
-
},
|
|
790
|
-
/**
|
|
791
|
-
* Shows slot with message about empty options
|
|
792
|
-
* @default true
|
|
793
|
-
* @type {Boolean}
|
|
794
|
-
*/
|
|
795
|
-
showNoOptions: {
|
|
796
|
-
type: Boolean,
|
|
797
|
-
default: !0
|
|
798
|
-
},
|
|
799
|
-
showNoResults: {
|
|
800
|
-
type: Boolean,
|
|
801
|
-
default: !0
|
|
802
|
-
},
|
|
803
|
-
tabindex: {
|
|
804
|
-
type: Number,
|
|
805
|
-
default: 0
|
|
806
|
-
},
|
|
807
|
-
/**
|
|
808
|
-
* Adds Required attribute to the input element when there is no value selected
|
|
809
|
-
* @default false
|
|
810
|
-
* @type {Boolean}
|
|
811
|
-
*/
|
|
812
|
-
required: {
|
|
813
|
-
type: Boolean,
|
|
814
|
-
default: !1
|
|
815
|
-
}
|
|
221
|
+
addCommands() {
|
|
222
|
+
return {
|
|
223
|
+
setLink: (t) => ({ chain: e }) => {
|
|
224
|
+
const { href: r } = t;
|
|
225
|
+
return this.options.isAllowedUri(r, {
|
|
226
|
+
defaultValidate: (o) => !!k(o, this.options.protocols),
|
|
227
|
+
protocols: this.options.protocols,
|
|
228
|
+
defaultProtocol: this.options.defaultProtocol
|
|
229
|
+
}) ? e().setMark(this.name, t).setMeta("preventAutolink", !0).run() : !1;
|
|
230
|
+
},
|
|
231
|
+
toggleLink: (t) => ({ chain: e }) => {
|
|
232
|
+
const { href: r } = t || {};
|
|
233
|
+
return r && !this.options.isAllowedUri(r, {
|
|
234
|
+
defaultValidate: (o) => !!k(o, this.options.protocols),
|
|
235
|
+
protocols: this.options.protocols,
|
|
236
|
+
defaultProtocol: this.options.defaultProtocol
|
|
237
|
+
}) ? !1 : e().toggleMark(this.name, t, { extendEmptyMarkRange: !0 }).setMeta("preventAutolink", !0).run();
|
|
238
|
+
},
|
|
239
|
+
unsetLink: () => ({ chain: t }) => t().unsetMark(this.name, { extendEmptyMarkRange: !0 }).setMeta("preventAutolink", !0).run()
|
|
240
|
+
};
|
|
816
241
|
},
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
},
|
|
842
|
-
selectGroupLabelText() {
|
|
843
|
-
return this.showLabels ? this.selectGroupLabel : "";
|
|
844
|
-
},
|
|
845
|
-
selectedLabelText() {
|
|
846
|
-
return this.showLabels ? this.selectedLabel : "";
|
|
847
|
-
},
|
|
848
|
-
inputStyle() {
|
|
849
|
-
return this.searchable || this.multiple && this.modelValue && this.modelValue.length ? this.isOpen ? { width: "100%" } : { width: "0", position: "absolute", padding: "0" } : "";
|
|
850
|
-
},
|
|
851
|
-
contentStyle() {
|
|
852
|
-
return this.options.length ? { display: "inline-block" } : { display: "block" };
|
|
853
|
-
},
|
|
854
|
-
isAbove() {
|
|
855
|
-
return this.openDirection === "above" || this.openDirection === "top" ? !0 : this.openDirection === "below" || this.openDirection === "bottom" ? !1 : this.preferredOpenDirection === "above";
|
|
856
|
-
},
|
|
857
|
-
showSearchInput() {
|
|
858
|
-
return this.searchable && (this.hasSingleSelectedSlot && (this.visibleSingleValue || this.visibleSingleValue === 0) ? this.isOpen : !0);
|
|
859
|
-
},
|
|
860
|
-
isRequired() {
|
|
861
|
-
return this.required === !1 ? !1 : this.internalValue.length <= 0;
|
|
862
|
-
}
|
|
863
|
-
}
|
|
864
|
-
};
|
|
865
|
-
const H = ["tabindex", "aria-expanded", "aria-owns", "aria-activedescendant"], C = {
|
|
866
|
-
ref: "tags",
|
|
867
|
-
class: "multiselect__tags"
|
|
868
|
-
}, K = { class: "multiselect__tags-wrap" }, N = ["textContent"], R = ["onKeypress", "onMousedown"], q = ["textContent"], z = { class: "multiselect__spinner" }, j = ["name", "id", "spellcheck", "placeholder", "required", "value", "disabled", "tabindex", "aria-label", "aria-controls"], I = ["id", "aria-multiselectable"], U = { key: 0 }, J = { class: "multiselect__option" }, Q = ["aria-selected", "id", "role"], W = ["onClick", "onMouseenter", "data-select", "data-selected", "data-deselect"], X = ["data-select", "data-deselect", "onMouseenter", "onMousedown"], Y = { class: "multiselect__option" }, Z = { class: "multiselect__option" };
|
|
869
|
-
function x(e, t, i, l, a, n) {
|
|
870
|
-
return p(), d("div", {
|
|
871
|
-
tabindex: e.searchable ? -1 : i.tabindex,
|
|
872
|
-
class: V([{ "multiselect--active": e.isOpen, "multiselect--disabled": i.disabled, "multiselect--above": n.isAbove, "multiselect--has-options-group": n.hasOptionGroup }, "multiselect"]),
|
|
873
|
-
onFocus: t[14] || (t[14] = (s) => e.activate()),
|
|
874
|
-
onBlur: t[15] || (t[15] = (s) => e.searchable ? !1 : e.deactivate()),
|
|
875
|
-
onKeydown: [
|
|
876
|
-
t[16] || (t[16] = f(r((s) => e.pointerForward(), ["self", "prevent"]), ["down"])),
|
|
877
|
-
t[17] || (t[17] = f(r((s) => e.pointerBackward(), ["self", "prevent"]), ["up"]))
|
|
878
|
-
],
|
|
879
|
-
onKeypress: t[18] || (t[18] = f(r((s) => e.addPointerElement(s), ["stop", "self"]), ["enter", "tab"])),
|
|
880
|
-
onKeyup: t[19] || (t[19] = f((s) => e.deactivate(), ["esc"])),
|
|
881
|
-
role: "combobox",
|
|
882
|
-
"aria-expanded": e.isOpen,
|
|
883
|
-
"aria-owns": "listbox-" + e.id,
|
|
884
|
-
"aria-activedescendant": e.isOpen && e.pointer !== null ? e.id + "-" + e.pointer : null
|
|
885
|
-
}, [
|
|
886
|
-
u(e.$slots, "caret", { toggle: e.toggle }, () => [
|
|
887
|
-
o(
|
|
888
|
-
"div",
|
|
889
|
-
{
|
|
890
|
-
onMousedown: t[0] || (t[0] = r((s) => e.toggle(), ["prevent", "stop"])),
|
|
891
|
-
class: "multiselect__select"
|
|
242
|
+
addPasteRules() {
|
|
243
|
+
return [
|
|
244
|
+
b({
|
|
245
|
+
find: (t) => {
|
|
246
|
+
const e = [];
|
|
247
|
+
if (t) {
|
|
248
|
+
const { protocols: r, defaultProtocol: o } = this.options, s = M(t).filter(
|
|
249
|
+
(l) => l.isLink && this.options.isAllowedUri(l.value, {
|
|
250
|
+
defaultValidate: (d) => !!k(d, r),
|
|
251
|
+
protocols: r,
|
|
252
|
+
defaultProtocol: o
|
|
253
|
+
})
|
|
254
|
+
);
|
|
255
|
+
s.length && s.forEach((l) => {
|
|
256
|
+
this.options.shouldAutoLink(l.value) && e.push({
|
|
257
|
+
text: l.value,
|
|
258
|
+
data: {
|
|
259
|
+
href: l.href
|
|
260
|
+
},
|
|
261
|
+
index: l.start
|
|
262
|
+
});
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
return e;
|
|
892
266
|
},
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
(p(!0), d(
|
|
914
|
-
$,
|
|
915
|
-
null,
|
|
916
|
-
B(n.visibleValues, (s, h) => u(e.$slots, "tag", {
|
|
917
|
-
option: s,
|
|
918
|
-
search: e.search,
|
|
919
|
-
remove: e.removeElement
|
|
920
|
-
}, () => [
|
|
921
|
-
(p(), d(
|
|
922
|
-
"span",
|
|
923
|
-
{
|
|
924
|
-
class: "multiselect__tag",
|
|
925
|
-
key: h,
|
|
926
|
-
onMousedown: t[1] || (t[1] = r(() => {
|
|
927
|
-
}, ["prevent"]))
|
|
928
|
-
},
|
|
929
|
-
[
|
|
930
|
-
o("span", {
|
|
931
|
-
textContent: g(e.getOptionLabel(s))
|
|
932
|
-
}, null, 8, N),
|
|
933
|
-
o("i", {
|
|
934
|
-
tabindex: "1",
|
|
935
|
-
onKeypress: f(r((m) => e.removeElement(s), ["prevent"]), ["enter"]),
|
|
936
|
-
onMousedown: r((m) => e.removeElement(s), ["prevent"]),
|
|
937
|
-
class: "multiselect__tag-icon"
|
|
938
|
-
}, null, 40, R)
|
|
939
|
-
],
|
|
940
|
-
32
|
|
941
|
-
/* NEED_HYDRATION */
|
|
942
|
-
))
|
|
943
|
-
])),
|
|
944
|
-
256
|
|
945
|
-
/* UNKEYED_FRAGMENT */
|
|
946
|
-
))
|
|
947
|
-
],
|
|
948
|
-
512
|
|
949
|
-
/* NEED_PATCH */
|
|
950
|
-
), [
|
|
951
|
-
[y, n.visibleValues.length > 0]
|
|
952
|
-
]),
|
|
953
|
-
e.internalValue && e.internalValue.length > i.limit ? u(e.$slots, "limit", { key: 0 }, () => [
|
|
954
|
-
o("strong", {
|
|
955
|
-
class: "multiselect__strong",
|
|
956
|
-
textContent: g(i.limitText(e.internalValue.length - i.limit))
|
|
957
|
-
}, null, 8, q)
|
|
958
|
-
]) : c("v-if", !0)
|
|
959
|
-
]),
|
|
960
|
-
L(k, { name: "multiselect__loading" }, {
|
|
961
|
-
default: D(() => [
|
|
962
|
-
u(e.$slots, "loading", {}, () => [
|
|
963
|
-
b(o(
|
|
964
|
-
"div",
|
|
965
|
-
z,
|
|
966
|
-
null,
|
|
967
|
-
512
|
|
968
|
-
/* NEED_PATCH */
|
|
969
|
-
), [
|
|
970
|
-
[y, i.loading]
|
|
971
|
-
])
|
|
972
|
-
])
|
|
973
|
-
]),
|
|
974
|
-
_: 3
|
|
975
|
-
/* FORWARDED */
|
|
267
|
+
type: this.type,
|
|
268
|
+
getAttributes: (t) => {
|
|
269
|
+
var e;
|
|
270
|
+
return {
|
|
271
|
+
href: (e = t.data) == null ? void 0 : e.href
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
})
|
|
275
|
+
];
|
|
276
|
+
},
|
|
277
|
+
addProseMirrorPlugins() {
|
|
278
|
+
const t = [], { protocols: e, defaultProtocol: r } = this.options;
|
|
279
|
+
return this.options.autolink && t.push(
|
|
280
|
+
z({
|
|
281
|
+
type: this.type,
|
|
282
|
+
defaultProtocol: this.options.defaultProtocol,
|
|
283
|
+
validate: (o) => this.options.isAllowedUri(o, {
|
|
284
|
+
defaultValidate: (s) => !!k(s, e),
|
|
285
|
+
protocols: e,
|
|
286
|
+
defaultProtocol: r
|
|
976
287
|
}),
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
onKeydown: [
|
|
997
|
-
t[6] || (t[6] = f(r((s) => e.pointerForward(), ["prevent"]), ["down"])),
|
|
998
|
-
t[7] || (t[7] = f(r((s) => e.pointerBackward(), ["prevent"]), ["up"])),
|
|
999
|
-
t[9] || (t[9] = f(r((s) => e.removeLastElement(), ["stop"]), ["delete"]))
|
|
1000
|
-
],
|
|
1001
|
-
onKeypress: t[8] || (t[8] = f(r((s) => e.addPointerElement(s), ["prevent", "stop", "self"]), ["enter"])),
|
|
1002
|
-
class: "multiselect__input",
|
|
1003
|
-
"aria-controls": "listbox-" + e.id
|
|
1004
|
-
}, null, 44, j)) : c("v-if", !0),
|
|
1005
|
-
n.isSingleLabelVisible ? (p(), d(
|
|
1006
|
-
"span",
|
|
1007
|
-
{
|
|
1008
|
-
key: 1,
|
|
1009
|
-
class: "multiselect__single",
|
|
1010
|
-
onMousedown: t[10] || (t[10] = r((...s) => e.toggle && e.toggle(...s), ["prevent"]))
|
|
1011
|
-
},
|
|
1012
|
-
[
|
|
1013
|
-
u(e.$slots, "singleLabel", { option: n.singleValue }, () => [
|
|
1014
|
-
v(
|
|
1015
|
-
g(e.currentOptionLabel),
|
|
1016
|
-
1
|
|
1017
|
-
/* TEXT */
|
|
1018
|
-
)
|
|
1019
|
-
])
|
|
1020
|
-
],
|
|
1021
|
-
32
|
|
1022
|
-
/* NEED_HYDRATION */
|
|
1023
|
-
)) : c("v-if", !0),
|
|
1024
|
-
n.isPlaceholderVisible ? (p(), d(
|
|
1025
|
-
"span",
|
|
1026
|
-
{
|
|
1027
|
-
key: 2,
|
|
1028
|
-
class: "multiselect__placeholder",
|
|
1029
|
-
onMousedown: t[11] || (t[11] = r((...s) => e.toggle && e.toggle(...s), ["prevent"]))
|
|
1030
|
-
},
|
|
1031
|
-
[
|
|
1032
|
-
u(e.$slots, "placeholder", {}, () => [
|
|
1033
|
-
v(
|
|
1034
|
-
g(e.placeholder),
|
|
1035
|
-
1
|
|
1036
|
-
/* TEXT */
|
|
1037
|
-
)
|
|
1038
|
-
])
|
|
1039
|
-
],
|
|
1040
|
-
32
|
|
1041
|
-
/* NEED_HYDRATION */
|
|
1042
|
-
)) : c("v-if", !0)
|
|
1043
|
-
],
|
|
1044
|
-
512
|
|
1045
|
-
/* NEED_PATCH */
|
|
1046
|
-
),
|
|
1047
|
-
L(k, {
|
|
1048
|
-
name: "multiselect",
|
|
1049
|
-
persisted: ""
|
|
1050
|
-
}, {
|
|
1051
|
-
default: D(() => [
|
|
1052
|
-
b(o(
|
|
1053
|
-
"div",
|
|
1054
|
-
{
|
|
1055
|
-
class: "multiselect__content-wrapper",
|
|
1056
|
-
onFocus: t[12] || (t[12] = (...s) => e.activate && e.activate(...s)),
|
|
1057
|
-
tabindex: "-1",
|
|
1058
|
-
onMousedown: t[13] || (t[13] = r(() => {
|
|
1059
|
-
}, ["prevent"])),
|
|
1060
|
-
style: O({ maxHeight: e.optimizedHeight + "px" }),
|
|
1061
|
-
ref: "list"
|
|
1062
|
-
},
|
|
1063
|
-
[
|
|
1064
|
-
o("ul", {
|
|
1065
|
-
class: "multiselect__content",
|
|
1066
|
-
style: O(n.contentStyle),
|
|
1067
|
-
role: "listbox",
|
|
1068
|
-
id: "listbox-" + e.id,
|
|
1069
|
-
"aria-multiselectable": e.multiple
|
|
1070
|
-
}, [
|
|
1071
|
-
u(e.$slots, "beforeList"),
|
|
1072
|
-
e.multiple && e.max === e.internalValue.length ? (p(), d("li", U, [
|
|
1073
|
-
o("span", J, [
|
|
1074
|
-
u(e.$slots, "maxElements", {}, () => [
|
|
1075
|
-
v(
|
|
1076
|
-
"Maximum of " + g(e.max) + " options selected. First remove a selected option to select another.",
|
|
1077
|
-
1
|
|
1078
|
-
/* TEXT */
|
|
1079
|
-
)
|
|
1080
|
-
])
|
|
1081
|
-
])
|
|
1082
|
-
])) : c("v-if", !0),
|
|
1083
|
-
!e.max || e.internalValue.length < e.max ? (p(!0), d(
|
|
1084
|
-
$,
|
|
1085
|
-
{ key: 1 },
|
|
1086
|
-
B(e.filteredOptions, (s, h) => (p(), d("li", {
|
|
1087
|
-
class: "multiselect__element",
|
|
1088
|
-
key: h,
|
|
1089
|
-
"aria-selected": e.isSelected(s),
|
|
1090
|
-
id: e.id + "-" + h,
|
|
1091
|
-
role: s && (s.$isLabel || s.$isDisabled) ? null : "option"
|
|
1092
|
-
}, [
|
|
1093
|
-
s && (s.$isLabel || s.$isDisabled) ? c("v-if", !0) : (p(), d("span", {
|
|
1094
|
-
key: 0,
|
|
1095
|
-
class: V([e.optionHighlight(h, s), "multiselect__option"]),
|
|
1096
|
-
onClick: r((m) => e.select(s), ["stop"]),
|
|
1097
|
-
onMouseenter: r((m) => e.pointerSet(h), ["self"]),
|
|
1098
|
-
"data-select": s && s.isTag ? e.tagPlaceholder : n.selectLabelText,
|
|
1099
|
-
"data-selected": n.selectedLabelText,
|
|
1100
|
-
"data-deselect": n.deselectLabelText
|
|
1101
|
-
}, [
|
|
1102
|
-
u(e.$slots, "option", {
|
|
1103
|
-
option: s,
|
|
1104
|
-
search: e.search,
|
|
1105
|
-
index: h
|
|
1106
|
-
}, () => [
|
|
1107
|
-
o(
|
|
1108
|
-
"span",
|
|
1109
|
-
null,
|
|
1110
|
-
g(e.getOptionLabel(s)),
|
|
1111
|
-
1
|
|
1112
|
-
/* TEXT */
|
|
1113
|
-
)
|
|
1114
|
-
])
|
|
1115
|
-
], 42, W)),
|
|
1116
|
-
s && (s.$isLabel || s.$isDisabled) ? (p(), d("span", {
|
|
1117
|
-
key: 1,
|
|
1118
|
-
"data-select": e.groupSelect && n.selectGroupLabelText,
|
|
1119
|
-
"data-deselect": e.groupSelect && n.deselectGroupLabelText,
|
|
1120
|
-
class: V([e.groupHighlight(h, s), "multiselect__option"]),
|
|
1121
|
-
onMouseenter: r((m) => e.groupSelect && e.pointerSet(h), ["self"]),
|
|
1122
|
-
onMousedown: r((m) => e.selectGroup(s), ["prevent"])
|
|
1123
|
-
}, [
|
|
1124
|
-
u(e.$slots, "option", {
|
|
1125
|
-
option: s,
|
|
1126
|
-
search: e.search,
|
|
1127
|
-
index: h
|
|
1128
|
-
}, () => [
|
|
1129
|
-
o(
|
|
1130
|
-
"span",
|
|
1131
|
-
null,
|
|
1132
|
-
g(e.getOptionLabel(s)),
|
|
1133
|
-
1
|
|
1134
|
-
/* TEXT */
|
|
1135
|
-
)
|
|
1136
|
-
])
|
|
1137
|
-
], 42, X)) : c("v-if", !0)
|
|
1138
|
-
], 8, Q))),
|
|
1139
|
-
128
|
|
1140
|
-
/* KEYED_FRAGMENT */
|
|
1141
|
-
)) : c("v-if", !0),
|
|
1142
|
-
b(o(
|
|
1143
|
-
"li",
|
|
1144
|
-
null,
|
|
1145
|
-
[
|
|
1146
|
-
o("span", Y, [
|
|
1147
|
-
u(e.$slots, "noResult", { search: e.search }, () => [
|
|
1148
|
-
t[20] || (t[20] = v("No elements found. Consider changing the search query."))
|
|
1149
|
-
])
|
|
1150
|
-
])
|
|
1151
|
-
],
|
|
1152
|
-
512
|
|
1153
|
-
/* NEED_PATCH */
|
|
1154
|
-
), [
|
|
1155
|
-
[y, i.showNoResults && e.filteredOptions.length === 0 && e.search && !i.loading]
|
|
1156
|
-
]),
|
|
1157
|
-
b(o(
|
|
1158
|
-
"li",
|
|
1159
|
-
null,
|
|
1160
|
-
[
|
|
1161
|
-
o("span", Z, [
|
|
1162
|
-
u(e.$slots, "noOptions", {}, () => [
|
|
1163
|
-
t[21] || (t[21] = v("List is empty."))
|
|
1164
|
-
])
|
|
1165
|
-
])
|
|
1166
|
-
],
|
|
1167
|
-
512
|
|
1168
|
-
/* NEED_PATCH */
|
|
1169
|
-
), [
|
|
1170
|
-
[y, i.showNoOptions && (e.options.length === 0 || n.hasOptionGroup === !0 && e.filteredOptions.length === 0) && !e.search && !i.loading]
|
|
1171
|
-
]),
|
|
1172
|
-
u(e.$slots, "afterList")
|
|
1173
|
-
], 12, I)
|
|
1174
|
-
],
|
|
1175
|
-
36
|
|
1176
|
-
/* STYLE, NEED_HYDRATION */
|
|
1177
|
-
), [
|
|
1178
|
-
[y, e.isOpen]
|
|
1179
|
-
])
|
|
1180
|
-
]),
|
|
1181
|
-
_: 3
|
|
1182
|
-
/* FORWARDED */
|
|
1183
|
-
})
|
|
1184
|
-
], 42, H);
|
|
1185
|
-
}
|
|
1186
|
-
G.render = x;
|
|
288
|
+
shouldAutoLink: this.options.shouldAutoLink
|
|
289
|
+
})
|
|
290
|
+
), t.push(
|
|
291
|
+
V({
|
|
292
|
+
type: this.type,
|
|
293
|
+
editor: this.editor,
|
|
294
|
+
openOnClick: this.options.openOnClick === "whenNotEditable" ? !0 : this.options.openOnClick,
|
|
295
|
+
enableClickSelection: this.options.enableClickSelection
|
|
296
|
+
})
|
|
297
|
+
), this.options.linkOnPaste && t.push(
|
|
298
|
+
D({
|
|
299
|
+
editor: this.editor,
|
|
300
|
+
defaultProtocol: this.options.defaultProtocol,
|
|
301
|
+
type: this.type,
|
|
302
|
+
shouldAutoLink: this.options.shouldAutoLink
|
|
303
|
+
})
|
|
304
|
+
), t;
|
|
305
|
+
}
|
|
306
|
+
});
|
|
1187
307
|
export {
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
P as multiselectMixin,
|
|
1191
|
-
F as pointerMixin
|
|
308
|
+
X as Link,
|
|
309
|
+
k as isAllowedUri
|
|
1192
310
|
};
|