vue3-extended-multiselect 2.3.0 → 2.3.1
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/README.md
CHANGED
|
@@ -345,12 +345,12 @@ const _hoisted_2$e = /*#__PURE__*/vue.createElementVNode("g", null, [
|
|
|
345
345
|
/*#__PURE__*/vue.createElementVNode("path", { d: "M96.1,103.6c-10.4,8.4-23.5,12.4-36.8,11.1c-10.5-1-20.3-5.1-28.2-11.8H44v-8H18v26h8v-11.9c9.1,7.7,20.4,12.5,32.6,13.6 c1.9,0.2,3.7,0.3,5.5,0.3c13.5,0,26.5-4.6,37-13.2c19.1-15.4,26.6-40.5,19.1-63.9l-7.6,2.4C119,68.6,112.6,90.3,96.1,103.6z" }),
|
|
346
346
|
/*#__PURE__*/vue.createElementVNode("path", { d: "M103,19.7c-21.2-18.7-53.5-20-76.1-1.6C7.9,33.5,0.4,58.4,7.7,81.7l7.6-2.4C9,59.2,15.5,37.6,31.9,24.4 C51.6,8.4,79.7,9.6,98,26H85v8h26V8h-8V19.7z" })
|
|
347
347
|
], -1 /* HOISTED */);
|
|
348
|
-
const _hoisted_3$
|
|
348
|
+
const _hoisted_3$8 = [
|
|
349
349
|
_hoisted_2$e
|
|
350
350
|
];
|
|
351
351
|
|
|
352
352
|
function render$8(_ctx, _cache) {
|
|
353
|
-
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$f, [..._hoisted_3$
|
|
353
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$f, [..._hoisted_3$8]))
|
|
354
354
|
}
|
|
355
355
|
|
|
356
356
|
const script$f = {};
|
|
@@ -766,6 +766,7 @@ const _hoisted_2$b = {
|
|
|
766
766
|
key: 0,
|
|
767
767
|
class: "extended__multiselect-placeholder"
|
|
768
768
|
};
|
|
769
|
+
const _hoisted_3$7 = ["onClick"];
|
|
769
770
|
|
|
770
771
|
|
|
771
772
|
var script$b = {
|
|
@@ -1111,20 +1112,20 @@ return (_ctx, _cache) => {
|
|
|
1111
1112
|
}, [
|
|
1112
1113
|
vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(optionCreateLabel)(option)), 1 /* TEXT */),
|
|
1113
1114
|
vue.createElementVNode("div", {
|
|
1114
|
-
class: vue.normalizeClass(deselectClasses.value)
|
|
1115
|
+
class: vue.normalizeClass(deselectClasses.value),
|
|
1116
|
+
onClick: vue.withModifiers($event => (deselectBlock(index)), ["stop"])
|
|
1115
1117
|
}, [
|
|
1116
1118
|
(!showLoaderIcon.value)
|
|
1117
1119
|
? (vue.openBlock(), vue.createBlock(script$d, {
|
|
1118
1120
|
key: 0,
|
|
1119
|
-
class: "extended__multiselect_deselect-block-icon"
|
|
1120
|
-
|
|
1121
|
-
}, null, 8 /* PROPS */, ["onClick"]))
|
|
1121
|
+
class: "extended__multiselect_deselect-block-icon"
|
|
1122
|
+
}))
|
|
1122
1123
|
: (vue.openBlock(), vue.createBlock(script$e, {
|
|
1123
1124
|
key: 1,
|
|
1124
1125
|
"icon-filter": __props.iconFilter,
|
|
1125
1126
|
"icon-size": "deselect"
|
|
1126
1127
|
}, null, 8 /* PROPS */, ["icon-filter"]))
|
|
1127
|
-
],
|
|
1128
|
+
], 10 /* CLASS, PROPS */, _hoisted_3$7)
|
|
1128
1129
|
], 2 /* CLASS */)
|
|
1129
1130
|
])
|
|
1130
1131
|
]))
|
|
@@ -1577,7 +1578,7 @@ vue.watch(searchValue, (value) => {
|
|
|
1577
1578
|
* @function
|
|
1578
1579
|
* @emits extended:expand-options
|
|
1579
1580
|
*/
|
|
1580
|
-
const expand = () => {
|
|
1581
|
+
const expand = (event) => {
|
|
1581
1582
|
if (disabled.value) return;
|
|
1582
1583
|
|
|
1583
1584
|
searchFieldFocused.value = true;
|
|
@@ -3632,7 +3633,7 @@ const _hoisted_3 = { class: "extended__multiselect-cancel_wrapper" };
|
|
|
3632
3633
|
|
|
3633
3634
|
/**
|
|
3634
3635
|
* @author Ridiger Daniil Dmitrievich, 2022
|
|
3635
|
-
* @version 2.3.
|
|
3636
|
+
* @version 2.3.1
|
|
3636
3637
|
*/
|
|
3637
3638
|
|
|
3638
3639
|
var script = {
|
|
@@ -4303,6 +4304,7 @@ const togglePattern = /^extended__multiselect-toggle_wrapper/i;
|
|
|
4303
4304
|
const extendedMultiselect = vue.ref(null);
|
|
4304
4305
|
const extendedMultiselectToggle = vue.ref(null);
|
|
4305
4306
|
const extendedMultiselectWrapper = vue.ref(null);
|
|
4307
|
+
const extendedMultiselectOptions = vue.ref(null);
|
|
4306
4308
|
|
|
4307
4309
|
const {
|
|
4308
4310
|
defaultExpanded,
|
|
@@ -4852,15 +4854,17 @@ const setPreselectedOptionsByConditions = () => {
|
|
|
4852
4854
|
* @returns {string} position
|
|
4853
4855
|
*/
|
|
4854
4856
|
const toggleAppearanceRestrictor = () => {
|
|
4855
|
-
if (!window) return "under";
|
|
4857
|
+
if (!window || !extendedMultiselectOptions.value.$el) return "under";
|
|
4856
4858
|
|
|
4857
4859
|
const innerHeight = window.innerHeight;
|
|
4860
|
+
const offsetHeight = extendedMultiselectOptions.value.$el.offsetHeight
|
|
4861
|
+
+ extendedMultiselect.value.offsetHeight;
|
|
4858
4862
|
const offsetTop = extendedMultiselect.value
|
|
4859
4863
|
? extendedMultiselect.value.getBoundingClientRect().y
|
|
4860
4864
|
: 0;
|
|
4861
4865
|
const difference = innerHeight - offsetTop;
|
|
4862
4866
|
|
|
4863
|
-
if (difference >
|
|
4867
|
+
if (difference > offsetHeight) {
|
|
4864
4868
|
return "under";
|
|
4865
4869
|
} else {
|
|
4866
4870
|
return "atop";
|
|
@@ -4872,7 +4876,7 @@ const toggleAppearanceRestrictor = () => {
|
|
|
4872
4876
|
* @function
|
|
4873
4877
|
*/
|
|
4874
4878
|
const toggleAppearanceRestrictorActivate = () => {
|
|
4875
|
-
if (
|
|
4879
|
+
if (dropdownActive.value) {
|
|
4876
4880
|
chosenToggleAppearanceSide.value = toggleAppearanceSide.value !== "auto"
|
|
4877
4881
|
? toggleAppearanceSide.value
|
|
4878
4882
|
: toggleAppearanceRestrictor();
|
|
@@ -4992,15 +4996,17 @@ const toggleDetector = (mouseEvent, pattern, mode) => {
|
|
|
4992
4996
|
const toggleOptions = () => {
|
|
4993
4997
|
if (internalLoading.value || disabled.value || dropdownDisabled.value) return;
|
|
4994
4998
|
|
|
4995
|
-
|
|
4999
|
+
dropdownActive.value = !dropdownActive.value;
|
|
5000
|
+
|
|
5001
|
+
vue.nextTick(() => {
|
|
5002
|
+
toggleAppearanceRestrictorActivate();
|
|
5003
|
+
});
|
|
4996
5004
|
|
|
4997
5005
|
if (!dropdownActive.value) {
|
|
4998
5006
|
activeEmitter();
|
|
4999
5007
|
} else {
|
|
5000
5008
|
closeEmitter();
|
|
5001
5009
|
}
|
|
5002
|
-
|
|
5003
|
-
dropdownActive.value = !dropdownActive.value;
|
|
5004
5010
|
};
|
|
5005
5011
|
|
|
5006
5012
|
/**
|
|
@@ -5267,15 +5273,21 @@ vue.onMounted(() => {
|
|
|
5267
5273
|
&& typeof options.value !== "function"
|
|
5268
5274
|
) {
|
|
5269
5275
|
dropdownActive.value = true;
|
|
5276
|
+
|
|
5277
|
+
vue.nextTick(() => {
|
|
5278
|
+
toggleAppearanceRestrictorActivate();
|
|
5279
|
+
});
|
|
5270
5280
|
}
|
|
5271
5281
|
|
|
5272
5282
|
emitter.value.on("extended:expand-options", () => {
|
|
5273
5283
|
if (dropdownActive.value || dropdownDisabled.value) return;
|
|
5274
|
-
|
|
5275
|
-
toggleAppearanceRestrictorActivate();
|
|
5276
|
-
activeEmitter();
|
|
5277
|
-
|
|
5284
|
+
|
|
5278
5285
|
dropdownActive.value = true;
|
|
5286
|
+
|
|
5287
|
+
vue.nextTick(() => {
|
|
5288
|
+
toggleAppearanceRestrictorActivate();
|
|
5289
|
+
});
|
|
5290
|
+
activeEmitter();
|
|
5279
5291
|
});
|
|
5280
5292
|
|
|
5281
5293
|
emitter.value.on("extended:loader-pattern-changed", async (pattern) => {
|
|
@@ -5455,6 +5467,8 @@ return (_ctx, _cache) => {
|
|
|
5455
5467
|
(dropdownActive.value)
|
|
5456
5468
|
? (vue.openBlock(), vue.createBlock(script$9, {
|
|
5457
5469
|
key: 0,
|
|
5470
|
+
ref_key: "extendedMultiselectOptions",
|
|
5471
|
+
ref: extendedMultiselectOptions,
|
|
5458
5472
|
"auto-select-created-option": __props.autoSelectCreatedOption,
|
|
5459
5473
|
"clear-by-select-when-multiple": __props.clearBySelectWhenMultiple,
|
|
5460
5474
|
"create-on-the-go": __props.createOnTheGo,
|