@quoreadmin/ui 1.5.1 → 1.6.0
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/index.js +48 -46
- package/dist/index10.js +2 -2
- package/dist/index100.js +119 -6
- package/dist/index102.js +128 -25
- package/dist/index103.js +10 -0
- package/dist/index105.js +39 -0
- package/dist/{index104.js → index107.js} +2 -2
- package/dist/{index106.js → index109.js} +1 -1
- package/dist/index11.js +2 -2
- package/dist/{index108.js → index111.js} +4 -4
- package/dist/{index110.js → index113.js} +7 -7
- package/dist/{index112.js → index115.js} +1 -1
- package/dist/{index114.js → index117.js} +5 -5
- package/dist/index12.js +2 -2
- package/dist/{index118.js → index121.js} +1 -1
- package/dist/{index126.js → index129.js} +1 -1
- package/dist/index13.js +2 -2
- package/dist/{index128.js → index131.js} +1 -1
- package/dist/{index132.js → index135.js} +1 -1
- package/dist/{index136.js → index139.js} +8 -8
- package/dist/index14.js +2 -2
- package/dist/{index138.js → index141.js} +1 -1
- package/dist/{index140.js → index143.js} +11 -11
- package/dist/index15.js +2 -2
- package/dist/{index148.js → index151.js} +1 -1
- package/dist/{index150.js → index153.js} +1 -1
- package/dist/{index152.js → index155.js} +2 -2
- package/dist/index157.js +205 -111
- package/dist/index16.js +2 -2
- package/dist/index160.js +110 -87
- package/dist/index161.js +478 -844
- package/dist/index162.js +5520 -36
- package/dist/index163.js +90 -279
- package/dist/index164.js +833 -122
- package/dist/index165.js +36 -1197
- package/dist/index166.js +268 -760
- package/dist/index167.js +146 -1304
- package/dist/index168.js +1151 -228
- package/dist/index169.js +754 -88
- package/dist/index17.js +2 -2
- package/dist/index170.js +1308 -2
- package/dist/index171.js +259 -1359
- package/dist/index172.js +108 -0
- package/dist/index173.js +2 -18
- package/dist/index174.js +1372 -14
- package/dist/index176.js +8 -8
- package/dist/index177.js +10 -17
- package/dist/index178.js +18 -759
- package/dist/index179.js +18 -1100
- package/dist/index18.js +2 -2
- package/dist/index180.js +22 -1231
- package/dist/index181.js +740 -11258
- package/dist/index182.js +1100 -36
- package/dist/index183.js +1200 -81
- package/dist/index184.js +11276 -43
- package/dist/index185.js +36 -5938
- package/dist/index186.js +85 -177
- package/dist/index187.js +43 -34
- package/dist/index188.js +5933 -13
- package/dist/index189.js +133 -1116
- package/dist/index19.js +2 -2
- package/dist/index190.js +37 -0
- package/dist/index191.js +16 -76
- package/dist/index192.js +1172 -235
- package/dist/index194.js +77 -26
- package/dist/index195.js +245 -55
- package/dist/index196.js +13655 -209
- package/dist/index197.js +26 -307
- package/dist/index198.js +43 -268
- package/dist/index199.js +231 -81
- package/dist/index2.js +2 -2
- package/dist/index20.js +2 -2
- package/dist/index200.js +288 -387
- package/dist/index201.js +287 -21
- package/dist/index202.js +84 -29
- package/dist/index203.js +400 -109
- package/dist/index204.js +22 -36
- package/dist/index205.js +33 -26
- package/dist/index206.js +111 -31
- package/dist/index207.js +36 -9
- package/dist/index208.js +26 -19
- package/dist/index209.js +36 -10
- package/dist/index21.js +2 -2
- package/dist/index210.js +9 -10
- package/dist/index211.js +18 -50
- package/dist/index212.js +10 -43
- package/dist/index213.js +10 -4
- package/dist/index214.js +48 -36
- package/dist/index215.js +43 -21
- package/dist/index216.js +3 -160
- package/dist/index217.js +34 -223
- package/dist/index218.js +21 -37
- package/dist/index219.js +127 -10
- package/dist/index22.js +2 -2
- package/dist/index220.js +33 -122
- package/dist/index221.js +80 -38
- package/dist/index222.js +20 -80
- package/dist/index223.js +12 -12
- package/dist/index224.js +3 -3
- package/dist/index225.js +3 -3
- package/dist/index226.js +11 -11
- package/dist/index227.js +160 -19
- package/dist/index228.js +228 -22
- package/dist/index229.js +36 -21
- package/dist/index23.js +61 -170
- package/dist/index230.js +10 -20
- package/dist/index231.js +120 -795
- package/dist/index232.js +19 -701
- package/dist/index233.js +22 -176
- package/dist/index234.js +198 -21
- package/dist/index235.js +69 -19
- package/dist/index236.js +34 -20
- package/dist/index237.js +40 -3
- package/dist/index238.js +3611 -166
- package/dist/index239.js +50 -128
- package/dist/index24.js +173 -10
- package/dist/index240.js +70 -154
- package/dist/index241.js +45 -1216
- package/dist/index242.js +215 -20
- package/dist/index243.js +10 -22
- package/dist/index244.js +57 -20
- package/dist/index245.js +61 -22
- package/dist/index246.js +54 -29
- package/dist/index247.js +75 -20
- package/dist/index248.js +722 -19
- package/dist/index249.js +39 -2
- package/dist/index25.js +9 -38
- package/dist/index250.js +64 -2
- package/dist/index251.js +10 -3631
- package/dist/index252.js +696 -46
- package/dist/index253.js +818 -75
- package/dist/index254.js +22 -52
- package/dist/index255.js +22 -215
- package/dist/index256.js +20 -10
- package/dist/index257.js +827 -48
- package/dist/index258.js +691 -50
- package/dist/index259.js +174 -52
- package/dist/index26.js +36 -116
- package/dist/index260.js +22 -75
- package/dist/index261.js +19 -722
- package/dist/index262.js +20 -39
- package/dist/index263.js +3 -64
- package/dist/index264.js +187 -11
- package/dist/index265.js +124 -696
- package/dist/index266.js +1189 -786
- package/dist/index267.js +13 -15
- package/dist/index268.js +21 -198
- package/dist/index269.js +21 -69
- package/dist/index27.js +116 -22
- package/dist/index270.js +28 -33
- package/dist/index271.js +19 -39
- package/dist/index272.js +20 -253
- package/dist/index273.js +2 -8
- package/dist/index274.js +2 -138
- package/dist/index275.js +232 -62
- package/dist/index276.js +8 -3
- package/dist/index277.js +135 -24
- package/dist/index278.js +83 -2
- package/dist/index279.js +2 -79
- package/dist/index28.js +24 -158
- package/dist/index280.js +71 -71
- package/dist/index281.js +234 -21
- package/dist/index282.js +5 -934
- package/dist/index283.js +133 -21
- package/dist/index284.js +67 -19
- package/dist/index285.js +85 -18
- package/dist/index286.js +28 -68
- package/dist/index287.js +8 -18
- package/dist/index288.js +75 -19
- package/dist/index289.js +3 -53
- package/dist/index29.js +141 -264
- package/dist/index290.js +2 -22
- package/dist/index291.js +82 -21
- package/dist/index292.js +53 -62
- package/dist/index293.js +4 -233
- package/dist/index294.js +4 -5
- package/dist/index295.js +166 -121
- package/dist/index296.js +58 -63
- package/dist/index297.js +73 -85
- package/dist/index298.js +3 -29
- package/dist/index299.js +26 -8
- package/dist/index3.js +2 -2
- package/dist/index30.js +279 -62
- package/dist/index300.js +52 -73
- package/dist/index301.js +25 -3
- package/dist/index302.js +22 -2
- package/dist/index303.js +21 -82
- package/dist/index304.js +14 -52
- package/dist/index305.js +17 -6
- package/dist/index306.js +23 -5
- package/dist/index307.js +1488 -149
- package/dist/index308.js +378 -55
- package/dist/index309.js +2731 -75
- package/dist/index31.js +64 -178
- package/dist/index310.js +79 -1511
- package/dist/index311.js +3717 -333
- package/dist/index312.js +47 -2718
- package/dist/index313.js +15 -86
- package/dist/index314.js +60 -3746
- package/dist/index315.js +197 -55
- package/dist/index316.js +246 -15
- package/dist/index317.js +76 -81
- package/dist/index318.js +22 -202
- package/dist/index319.js +915 -226
- package/dist/index32.js +177 -38
- package/dist/index320.js +13 -17
- package/dist/index321.js +11 -13
- package/dist/index322.js +13 -15
- package/dist/index323.js +67 -14
- package/dist/index324.js +16 -14
- package/dist/index325.js +17 -21
- package/dist/index326.js +21 -8
- package/dist/index327.js +21 -12
- package/dist/index328.js +63 -55
- package/dist/index329.js +34 -9
- package/dist/index33.js +38 -49
- package/dist/index330.js +20 -13
- package/dist/index331.js +53 -55
- package/dist/index332.js +27 -50
- package/dist/index333.js +6 -30
- package/dist/index334.js +52 -2
- package/dist/index335.js +5 -4
- package/dist/index336.js +12 -2
- package/dist/index337.js +6 -22
- package/dist/index338.js +27 -40
- package/dist/index339.js +2 -2
- package/dist/index34.js +47 -30
- package/dist/index340.js +69 -10
- package/dist/index341.js +165 -18
- package/dist/index342.js +9 -16
- package/dist/index343.js +9 -9
- package/dist/index344.js +13 -9
- package/dist/index345.js +10 -2
- package/dist/index346.js +16 -8
- package/dist/index347.js +8 -9
- package/dist/index348.js +13 -14
- package/dist/index349.js +50 -32
- package/dist/index35.js +31 -28
- package/dist/index350.js +11 -19
- package/dist/index351.js +13 -19
- package/dist/index352.js +53 -59
- package/dist/index353.js +51 -36
- package/dist/index354.js +28 -18
- package/dist/index355.js +2 -56
- package/dist/index356.js +5 -29
- package/dist/index357.js +2 -7
- package/dist/index358.js +21 -50
- package/dist/index359.js +40 -5
- package/dist/index36.js +29 -13
- package/dist/index360.js +2 -12
- package/dist/index361.js +10 -6
- package/dist/index362.js +20 -28
- package/dist/index363.js +2 -2
- package/dist/index364.js +8 -69
- package/dist/index365.js +20 -167
- package/dist/index366.js +20 -17
- package/dist/index367.js +63 -30
- package/dist/index368.js +37 -11
- package/dist/index369.js +30 -3
- package/dist/index37.js +15 -43
- package/dist/index370.js +10 -3
- package/dist/index371.js +4 -13
- package/dist/index372.js +4 -7
- package/dist/index373.js +13 -12
- package/dist/index374.js +7 -5
- package/dist/index375.js +12 -33
- package/dist/index376.js +5 -31
- package/dist/index377.js +32 -27
- package/dist/index378.js +28 -58
- package/dist/index379.js +26 -99
- package/dist/index38.js +42 -37
- package/dist/index380.js +61 -91
- package/dist/index382.js +100 -2
- package/dist/index383.js +91 -2
- package/dist/index384.js +17 -2
- package/dist/index385.js +3 -17
- package/dist/index386.js +2 -13
- package/dist/index387.js +2 -6
- package/dist/index388.js +17 -32
- package/dist/index389.js +15 -0
- package/dist/index39.js +36 -26
- package/dist/index390.js +8 -0
- package/dist/index391.js +34 -0
- package/dist/index4.js +2 -2
- package/dist/index40.js +25 -32
- package/dist/index41.js +32 -37
- package/dist/index42.js +37 -1068
- package/dist/index43.js +1045 -309
- package/dist/index44.js +326 -146
- package/dist/index45.js +155 -18
- package/dist/index46.js +16 -36
- package/dist/index47.js +38 -68
- package/dist/index48.js +67 -60
- package/dist/index49.js +56 -175
- package/dist/index5.js +2 -2
- package/dist/index50.js +173 -77
- package/dist/index51.js +79 -200
- package/dist/index52.js +206 -68
- package/dist/index53.js +69 -20
- package/dist/index54.js +20 -11
- package/dist/index55.js +10 -6
- package/dist/index56.js +5 -209
- package/dist/index57.js +210 -12
- package/dist/index58.js +12 -184
- package/dist/index59.js +176 -68
- package/dist/index6.js +2 -2
- package/dist/index60.js +79 -0
- package/dist/index62.js +7 -63
- package/dist/index63.js +65 -0
- package/dist/index7.js +2 -2
- package/dist/{index70.js → index71.js} +2 -2
- package/dist/index75.js +40 -304
- package/dist/index76.js +326 -0
- package/dist/{index77.js → index78.js} +1 -1
- package/dist/index8.js +3 -3
- package/dist/{index79.js → index80.js} +7 -7
- package/dist/{index81.js → index82.js} +1 -1
- package/dist/index84.js +22 -126
- package/dist/index85.js +140 -0
- package/dist/{index86.js → index87.js} +5 -5
- package/dist/{index88.js → index89.js} +5 -5
- package/dist/index9.js +2 -2
- package/dist/{index94.js → index95.js} +4 -4
- package/dist/index97.js +20 -25
- package/dist/index98.js +34 -0
- package/dist/src/components/event/event.d.ts +356 -0
- package/dist/src/components/event/event.stories.d.ts +33 -0
- package/dist/src/components/event/event.vue.d.ts +2 -0
- package/dist/src/components/room-details-popover/room-details-popover.d.ts +1 -1
- package/dist/src/index.d.ts +2 -0
- package/package.json +1 -1
- package/dist/index154.js +0 -210
- package/dist/index158.js +0 -497
- package/dist/index159.js +0 -5524
- package/dist/index175.js +0 -20
- package/dist/index193.js +0 -13686
- package/dist/index61.js +0 -9
- package/dist/index74.js +0 -62
- package/dist/index83.js +0 -36
- package/dist/index96.js +0 -29
- package/dist/index99.js +0 -142
- /package/dist/{index116.js → index119.js} +0 -0
- /package/dist/{index120.js → index123.js} +0 -0
- /package/dist/{index122.js → index125.js} +0 -0
- /package/dist/{index124.js → index127.js} +0 -0
- /package/dist/{index130.js → index133.js} +0 -0
- /package/dist/{index134.js → index137.js} +0 -0
- /package/dist/{index142.js → index145.js} +0 -0
- /package/dist/{index144.js → index147.js} +0 -0
- /package/dist/{index146.js → index149.js} +0 -0
- /package/dist/{index64.js → index65.js} +0 -0
- /package/dist/{index66.js → index67.js} +0 -0
- /package/dist/{index68.js → index69.js} +0 -0
- /package/dist/{index72.js → index73.js} +0 -0
- /package/dist/{index90.js → index91.js} +0 -0
- /package/dist/{index92.js → index93.js} +0 -0
package/dist/index192.js
CHANGED
|
@@ -1,255 +1,1192 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
function d(t) {
|
|
5
|
-
return E((e, r) => ({
|
|
6
|
-
get() {
|
|
7
|
-
return e(), t;
|
|
8
|
-
},
|
|
9
|
-
set(n) {
|
|
10
|
-
t = n, requestAnimationFrame(() => {
|
|
11
|
-
requestAnimationFrame(() => {
|
|
12
|
-
r();
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}));
|
|
1
|
+
import { createElementBlock as d, openBlock as p, withKeys as f, normalizeClass as V, withModifiers as r, renderSlot as u, createElementVNode as o, createVNode as L, createCommentVNode as c, withDirectives as b, Fragment as $, renderList as B, toDisplayString as g, vShow as y, Transition as k, withCtx as D, normalizeStyle as O, createTextVNode as v } from "vue";
|
|
2
|
+
function S(e) {
|
|
3
|
+
return e === 0 ? !1 : Array.isArray(e) && e.length === 0 ? !0 : !e;
|
|
17
4
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
}, k = s({
|
|
45
|
-
name: "EditorContent",
|
|
5
|
+
function T(e) {
|
|
6
|
+
return (...t) => !e(...t);
|
|
7
|
+
}
|
|
8
|
+
function A(e, t) {
|
|
9
|
+
return e === void 0 && (e = "undefined"), e === null && (e = "null"), e === !1 && (e = "false"), e.toString().toLowerCase().indexOf(t.trim()) !== -1;
|
|
10
|
+
}
|
|
11
|
+
function M(e) {
|
|
12
|
+
return e.filter((t) => !t.$isLabel);
|
|
13
|
+
}
|
|
14
|
+
function w(e, t) {
|
|
15
|
+
return (i) => i.reduce((l, a) => a[e] && a[e].length ? (l.push({
|
|
16
|
+
$groupLabel: a[t],
|
|
17
|
+
$isLabel: !0
|
|
18
|
+
}), l.concat(a[e])) : l, []);
|
|
19
|
+
}
|
|
20
|
+
const E = (...e) => (t) => e.reduce((i, l) => l(i), t);
|
|
21
|
+
var P = {
|
|
22
|
+
data() {
|
|
23
|
+
return {
|
|
24
|
+
search: "",
|
|
25
|
+
isOpen: !1,
|
|
26
|
+
preferredOpenDirection: "below",
|
|
27
|
+
optimizedHeight: this.maxHeight
|
|
28
|
+
};
|
|
29
|
+
},
|
|
46
30
|
props: {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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 [];
|
|
245
|
+
}
|
|
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
|
|
50
282
|
}
|
|
51
283
|
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
return v(() => {
|
|
55
|
-
const n = t.editor;
|
|
56
|
-
n && n.options.element && e.value && S(() => {
|
|
57
|
-
var i;
|
|
58
|
-
if (!e.value || !((i = n.view.dom) != null && i.parentNode))
|
|
59
|
-
return;
|
|
60
|
-
const a = h(e.value);
|
|
61
|
-
e.value.append(...n.view.dom.parentNode.childNodes), n.contentComponent = r.ctx._, r && (n.appContext = {
|
|
62
|
-
...r.appContext,
|
|
63
|
-
// Vue internally uses prototype chain to forward/shadow injects across the entire component chain
|
|
64
|
-
// so don't use object spread operator or 'Object.assign' and just set `provides` as is on editor's appContext
|
|
65
|
-
// @ts-expect-error forward instance's 'provides' into appContext
|
|
66
|
-
provides: r.provides
|
|
67
|
-
}), n.setOptions({
|
|
68
|
-
element: a
|
|
69
|
-
}), n.createNodeViews();
|
|
70
|
-
});
|
|
71
|
-
}), u(() => {
|
|
72
|
-
const n = t.editor;
|
|
73
|
-
n && (n.contentComponent = null, n.appContext = null);
|
|
74
|
-
}), { rootEl: e };
|
|
284
|
+
mounted() {
|
|
285
|
+
!this.multiple && this.max && console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false."), this.preselectFirst && !this.internalValue.length && this.options.length && this.select(this.filteredOptions[0]);
|
|
75
286
|
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
287
|
+
computed: {
|
|
288
|
+
internalValue() {
|
|
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;
|
|
90
304
|
}
|
|
91
305
|
},
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
306
|
+
watch: {
|
|
307
|
+
internalValue: {
|
|
308
|
+
handler() {
|
|
309
|
+
this.resetAfter && this.internalValue.length && (this.search = "", this.$emit("update:modelValue", this.multiple ? [] : null));
|
|
96
310
|
},
|
|
97
|
-
|
|
98
|
-
}
|
|
311
|
+
deep: !0
|
|
312
|
+
},
|
|
313
|
+
search() {
|
|
314
|
+
this.$emit("search-change", this.search);
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
emits: ["open", "search-change", "close", "select", "update:modelValue", "remove", "tag"],
|
|
318
|
+
methods: {
|
|
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();
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
/**
|
|
424
|
+
* Add the given group options to the list of selected options
|
|
425
|
+
* If all group optiona are already selected -> remove it from the results.
|
|
426
|
+
*
|
|
427
|
+
* @param {Object||String||Integer} group to select/deselect
|
|
428
|
+
*/
|
|
429
|
+
selectGroup(e) {
|
|
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
|
+
);
|
|
446
|
+
}
|
|
447
|
+
this.closeOnSelect && this.deactivate();
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
/**
|
|
451
|
+
* Helper to identify if all values in a group are selected
|
|
452
|
+
*
|
|
453
|
+
* @param {Object} group to validated selected values against
|
|
454
|
+
*/
|
|
455
|
+
wholeGroupSelected(e) {
|
|
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;
|
|
481
|
+
}
|
|
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
|
+
}
|
|
99
563
|
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
564
|
+
}, F = {
|
|
565
|
+
data() {
|
|
566
|
+
return {
|
|
567
|
+
pointer: 0,
|
|
568
|
+
pointerDirty: !1
|
|
569
|
+
};
|
|
570
|
+
},
|
|
103
571
|
props: {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
572
|
+
/**
|
|
573
|
+
* Enable/disable highlighting of the pointed value.
|
|
574
|
+
* @type {Boolean}
|
|
575
|
+
* @default true
|
|
576
|
+
*/
|
|
577
|
+
showPointer: {
|
|
578
|
+
type: Boolean,
|
|
579
|
+
default: !0
|
|
580
|
+
},
|
|
581
|
+
optionHeight: {
|
|
582
|
+
type: Number,
|
|
583
|
+
default: 40
|
|
107
584
|
}
|
|
108
585
|
},
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
586
|
+
computed: {
|
|
587
|
+
pointerPosition() {
|
|
588
|
+
return this.pointer * this.optionHeight;
|
|
589
|
+
},
|
|
590
|
+
visibleElements() {
|
|
591
|
+
return this.optimizedHeight / this.optionHeight;
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
watch: {
|
|
595
|
+
filteredOptions() {
|
|
596
|
+
this.pointerAdjust();
|
|
597
|
+
},
|
|
598
|
+
isOpen() {
|
|
599
|
+
this.pointerDirty = !1;
|
|
600
|
+
},
|
|
601
|
+
pointer() {
|
|
602
|
+
this.$refs.search && this.$refs.search.setAttribute("aria-activedescendant", this.id + "-" + this.pointer.toString());
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
methods: {
|
|
606
|
+
optionHighlight(e, t) {
|
|
607
|
+
return {
|
|
608
|
+
"multiselect__option--highlight": e === this.pointer && this.showPointer,
|
|
609
|
+
"multiselect__option--selected": this.isSelected(t)
|
|
610
|
+
};
|
|
611
|
+
},
|
|
612
|
+
groupHighlight(e, t) {
|
|
613
|
+
if (!this.groupSelect)
|
|
614
|
+
return [
|
|
615
|
+
"multiselect__option--disabled",
|
|
616
|
+
{ "multiselect__option--group": t.$isLabel }
|
|
617
|
+
];
|
|
618
|
+
const i = this.options.find((l) => l[this.groupLabel] === t.$groupLabel);
|
|
619
|
+
return i && !this.wholeGroupDisabled(i) ? [
|
|
620
|
+
"multiselect__option--group",
|
|
621
|
+
{ "multiselect__option--highlight": e === this.pointer && this.showPointer },
|
|
622
|
+
{ "multiselect__option--group-selected": this.wholeGroupSelected(i) }
|
|
623
|
+
] : "multiselect__option--disabled";
|
|
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
|
+
}
|
|
126
643
|
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
const o = (n = (r = e.value) == null ? void 0 : r.view.dom) == null ? void 0 : n.parentNode, c = o?.cloneNode(!0);
|
|
135
|
-
(i = o?.parentNode) == null || i.replaceChild(c, o), (a = e.value) == null || a.destroy();
|
|
136
|
-
}), e;
|
|
137
|
-
};
|
|
138
|
-
s({
|
|
139
|
-
name: "MarkViewContent",
|
|
644
|
+
}, G = {
|
|
645
|
+
name: "vue-multiselect",
|
|
646
|
+
mixins: [P, F],
|
|
647
|
+
compatConfig: {
|
|
648
|
+
MODE: 3,
|
|
649
|
+
ATTR_ENUMERATED_COERCION: !1
|
|
650
|
+
},
|
|
140
651
|
props: {
|
|
141
|
-
|
|
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: {
|
|
142
695
|
type: String,
|
|
143
|
-
default: "
|
|
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
|
|
144
815
|
}
|
|
145
816
|
},
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}
|
|
817
|
+
computed: {
|
|
818
|
+
hasOptionGroup() {
|
|
819
|
+
return this.groupValues && this.groupLabel && this.groupSelect;
|
|
820
|
+
},
|
|
821
|
+
isSingleLabelVisible() {
|
|
822
|
+
return (this.singleValue || this.singleValue === 0) && (!this.isOpen || !this.searchable) && !this.visibleValues.length;
|
|
823
|
+
},
|
|
824
|
+
isPlaceholderVisible() {
|
|
825
|
+
return !this.internalValue.length && (!this.searchable || !this.isOpen);
|
|
826
|
+
},
|
|
827
|
+
visibleValues() {
|
|
828
|
+
return this.multiple ? this.internalValue.slice(0, this.limit) : [];
|
|
829
|
+
},
|
|
830
|
+
singleValue() {
|
|
831
|
+
return this.internalValue[0];
|
|
832
|
+
},
|
|
833
|
+
deselectLabelText() {
|
|
834
|
+
return this.showLabels ? this.deselectLabel : "";
|
|
835
|
+
},
|
|
836
|
+
deselectGroupLabelText() {
|
|
837
|
+
return this.showLabels ? this.deselectGroupLabel : "";
|
|
838
|
+
},
|
|
839
|
+
selectLabelText() {
|
|
840
|
+
return this.showLabels ? this.selectLabel : "";
|
|
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
|
+
}
|
|
153
863
|
}
|
|
154
|
-
}
|
|
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"
|
|
892
|
+
},
|
|
893
|
+
null,
|
|
894
|
+
32
|
|
895
|
+
/* NEED_HYDRATION */
|
|
896
|
+
)
|
|
897
|
+
]),
|
|
898
|
+
u(e.$slots, "clear", { search: e.search }),
|
|
899
|
+
o(
|
|
900
|
+
"div",
|
|
901
|
+
C,
|
|
902
|
+
[
|
|
903
|
+
u(e.$slots, "selection", {
|
|
904
|
+
search: e.search,
|
|
905
|
+
remove: e.removeElement,
|
|
906
|
+
values: n.visibleValues,
|
|
907
|
+
isOpen: e.isOpen
|
|
908
|
+
}, () => [
|
|
909
|
+
b(o(
|
|
910
|
+
"div",
|
|
911
|
+
K,
|
|
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 */
|
|
976
|
+
}),
|
|
977
|
+
e.searchable ? (p(), d("input", {
|
|
978
|
+
key: 0,
|
|
979
|
+
ref: "search",
|
|
980
|
+
name: i.name,
|
|
981
|
+
id: e.id,
|
|
982
|
+
type: "text",
|
|
983
|
+
autocomplete: "off",
|
|
984
|
+
spellcheck: i.spellcheck,
|
|
985
|
+
placeholder: e.placeholder,
|
|
986
|
+
required: n.isRequired,
|
|
987
|
+
style: O(n.inputStyle),
|
|
988
|
+
value: e.search,
|
|
989
|
+
disabled: i.disabled,
|
|
990
|
+
tabindex: i.tabindex,
|
|
991
|
+
"aria-label": i.name + "-searchbox",
|
|
992
|
+
onInput: t[2] || (t[2] = (s) => e.updateSearch(s.target.value)),
|
|
993
|
+
onFocus: t[3] || (t[3] = r((s) => e.activate(), ["prevent"])),
|
|
994
|
+
onBlur: t[4] || (t[4] = r((s) => e.deactivate(), ["prevent"])),
|
|
995
|
+
onKeyup: t[5] || (t[5] = f((s) => e.deactivate(), ["esc"])),
|
|
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;
|
|
155
1187
|
export {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
T as Extension,
|
|
161
|
-
F as InputRule,
|
|
162
|
-
I as MappablePosition,
|
|
163
|
-
B as Mark,
|
|
164
|
-
O as Node,
|
|
165
|
-
D as NodePos,
|
|
166
|
-
_ as PasteRule,
|
|
167
|
-
j as callOrReturn,
|
|
168
|
-
V as canInsertNode,
|
|
169
|
-
q as combineTransactionSteps,
|
|
170
|
-
z as commands,
|
|
171
|
-
L as createAtomBlockMarkdownSpec,
|
|
172
|
-
U as createBlockMarkdownSpec,
|
|
173
|
-
$ as createChainableState,
|
|
174
|
-
H as createDocument,
|
|
175
|
-
W as createInlineMarkdownSpec,
|
|
176
|
-
G as createMappablePosition,
|
|
177
|
-
J as createNodeFromContent,
|
|
178
|
-
K as createStyleTag,
|
|
179
|
-
Q as defaultBlockAt,
|
|
180
|
-
X as deleteProps,
|
|
181
|
-
Y as elementFromString,
|
|
182
|
-
Z as extensions,
|
|
183
|
-
ee as findChildrenInRange,
|
|
184
|
-
te as findDuplicates,
|
|
185
|
-
ne as findParentNode,
|
|
186
|
-
re as findParentNodeClosestToPos,
|
|
187
|
-
ie as flattenExtensions,
|
|
188
|
-
oe as fromString,
|
|
189
|
-
ae as getAttributes,
|
|
190
|
-
se as getAttributesFromExtensions,
|
|
191
|
-
le as getChangedRanges,
|
|
192
|
-
de as getExtensionField,
|
|
193
|
-
ue as getHTMLFromFragment,
|
|
194
|
-
ce as getMarkAttributes,
|
|
195
|
-
pe as getMarkRange,
|
|
196
|
-
ge as getMarkType,
|
|
197
|
-
me as getMarksBetween,
|
|
198
|
-
ve as getNodeAtPosition,
|
|
199
|
-
Se as getNodeAttributes,
|
|
200
|
-
he as getNodeType,
|
|
201
|
-
xe as getRenderedAttributes,
|
|
202
|
-
fe as getSchemaByResolvedExtensions,
|
|
203
|
-
we as getSchemaTypeByName,
|
|
204
|
-
Ee as getSchemaTypeNameByName,
|
|
205
|
-
Ne as getSplittedAttributes,
|
|
206
|
-
be as getText,
|
|
207
|
-
Ce as getTextBetween,
|
|
208
|
-
ke as getTextContentFromNodes,
|
|
209
|
-
Ae as getTextSerializersFromSchema,
|
|
210
|
-
Re as getUpdatedPosition,
|
|
211
|
-
Pe as injectExtensionAttributesToParseRule,
|
|
212
|
-
ye as inputRulesPlugin,
|
|
213
|
-
Me as isActive,
|
|
214
|
-
Te as isAndroid,
|
|
215
|
-
Fe as isAtEndOfNode,
|
|
216
|
-
Ie as isAtStartOfNode,
|
|
217
|
-
Be as isEmptyObject,
|
|
218
|
-
Oe as isExtensionRulesEnabled,
|
|
219
|
-
De as isFunction,
|
|
220
|
-
_e as isList,
|
|
221
|
-
je as isMacOS,
|
|
222
|
-
Ve as isMarkActive,
|
|
223
|
-
qe as isNodeActive,
|
|
224
|
-
ze as isNodeEmpty,
|
|
225
|
-
Le as isNodeSelection,
|
|
226
|
-
Ue as isNumber,
|
|
227
|
-
$e as isPlainObject,
|
|
228
|
-
He as isRegExp,
|
|
229
|
-
We as isSafari,
|
|
230
|
-
Ge as isTextSelection,
|
|
231
|
-
Je as isiOS,
|
|
232
|
-
Ke as markInputRule,
|
|
233
|
-
Qe as markPasteRule,
|
|
234
|
-
Xe as markdown,
|
|
235
|
-
Ye as mergeAttributes,
|
|
236
|
-
Ze as mergeDeep,
|
|
237
|
-
et as minMax,
|
|
238
|
-
tt as nodeInputRule,
|
|
239
|
-
nt as objectIncludes,
|
|
240
|
-
rt as parseAttributes,
|
|
241
|
-
it as parseIndentedBlocks,
|
|
242
|
-
ot as pasteRulesPlugin,
|
|
243
|
-
at as removeDuplicates,
|
|
244
|
-
st as renderNestedMarkdownContent,
|
|
245
|
-
lt as resolveExtensions,
|
|
246
|
-
dt as resolveFocusPosition,
|
|
247
|
-
ut as selectionToInsertionEnd,
|
|
248
|
-
ct as serializeAttributes,
|
|
249
|
-
pt as sortExtensions,
|
|
250
|
-
gt as splitExtensions,
|
|
251
|
-
mt as textblockTypeInputRule,
|
|
252
|
-
vt as updateMarkViewAttributes,
|
|
253
|
-
A as useEditor,
|
|
254
|
-
St as wrappingInputRule
|
|
1188
|
+
G as Multiselect,
|
|
1189
|
+
G as default,
|
|
1190
|
+
P as multiselectMixin,
|
|
1191
|
+
F as pointerMixin
|
|
255
1192
|
};
|