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.
|
@@ -341,12 +341,12 @@ const _hoisted_2$e = /*#__PURE__*/createElementVNode("g", null, [
|
|
|
341
341
|
/*#__PURE__*/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" }),
|
|
342
342
|
/*#__PURE__*/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" })
|
|
343
343
|
], -1 /* HOISTED */);
|
|
344
|
-
const _hoisted_3$
|
|
344
|
+
const _hoisted_3$8 = [
|
|
345
345
|
_hoisted_2$e
|
|
346
346
|
];
|
|
347
347
|
|
|
348
348
|
function render$8(_ctx, _cache) {
|
|
349
|
-
return (openBlock(), createElementBlock("svg", _hoisted_1$f, [..._hoisted_3$
|
|
349
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$f, [..._hoisted_3$8]))
|
|
350
350
|
}
|
|
351
351
|
|
|
352
352
|
const script$f = {};
|
|
@@ -762,6 +762,7 @@ const _hoisted_2$b = {
|
|
|
762
762
|
key: 0,
|
|
763
763
|
class: "extended__multiselect-placeholder"
|
|
764
764
|
};
|
|
765
|
+
const _hoisted_3$7 = ["onClick"];
|
|
765
766
|
|
|
766
767
|
|
|
767
768
|
var script$b = {
|
|
@@ -1107,20 +1108,20 @@ return (_ctx, _cache) => {
|
|
|
1107
1108
|
}, [
|
|
1108
1109
|
createElementVNode("span", null, toDisplayString(unref(optionCreateLabel)(option)), 1 /* TEXT */),
|
|
1109
1110
|
createElementVNode("div", {
|
|
1110
|
-
class: normalizeClass(deselectClasses.value)
|
|
1111
|
+
class: normalizeClass(deselectClasses.value),
|
|
1112
|
+
onClick: withModifiers($event => (deselectBlock(index)), ["stop"])
|
|
1111
1113
|
}, [
|
|
1112
1114
|
(!showLoaderIcon.value)
|
|
1113
1115
|
? (openBlock(), createBlock(script$d, {
|
|
1114
1116
|
key: 0,
|
|
1115
|
-
class: "extended__multiselect_deselect-block-icon"
|
|
1116
|
-
|
|
1117
|
-
}, null, 8 /* PROPS */, ["onClick"]))
|
|
1117
|
+
class: "extended__multiselect_deselect-block-icon"
|
|
1118
|
+
}))
|
|
1118
1119
|
: (openBlock(), createBlock(script$e, {
|
|
1119
1120
|
key: 1,
|
|
1120
1121
|
"icon-filter": __props.iconFilter,
|
|
1121
1122
|
"icon-size": "deselect"
|
|
1122
1123
|
}, null, 8 /* PROPS */, ["icon-filter"]))
|
|
1123
|
-
],
|
|
1124
|
+
], 10 /* CLASS, PROPS */, _hoisted_3$7)
|
|
1124
1125
|
], 2 /* CLASS */)
|
|
1125
1126
|
])
|
|
1126
1127
|
]))
|
|
@@ -1573,7 +1574,7 @@ watch(searchValue, (value) => {
|
|
|
1573
1574
|
* @function
|
|
1574
1575
|
* @emits extended:expand-options
|
|
1575
1576
|
*/
|
|
1576
|
-
const expand = () => {
|
|
1577
|
+
const expand = (event) => {
|
|
1577
1578
|
if (disabled.value) return;
|
|
1578
1579
|
|
|
1579
1580
|
searchFieldFocused.value = true;
|
|
@@ -3628,7 +3629,7 @@ const _hoisted_3 = { class: "extended__multiselect-cancel_wrapper" };
|
|
|
3628
3629
|
|
|
3629
3630
|
/**
|
|
3630
3631
|
* @author Ridiger Daniil Dmitrievich, 2022
|
|
3631
|
-
* @version 2.3.
|
|
3632
|
+
* @version 2.3.1
|
|
3632
3633
|
*/
|
|
3633
3634
|
|
|
3634
3635
|
var script = {
|
|
@@ -4299,6 +4300,7 @@ const togglePattern = /^extended__multiselect-toggle_wrapper/i;
|
|
|
4299
4300
|
const extendedMultiselect = ref(null);
|
|
4300
4301
|
const extendedMultiselectToggle = ref(null);
|
|
4301
4302
|
const extendedMultiselectWrapper = ref(null);
|
|
4303
|
+
const extendedMultiselectOptions = ref(null);
|
|
4302
4304
|
|
|
4303
4305
|
const {
|
|
4304
4306
|
defaultExpanded,
|
|
@@ -4848,15 +4850,17 @@ const setPreselectedOptionsByConditions = () => {
|
|
|
4848
4850
|
* @returns {string} position
|
|
4849
4851
|
*/
|
|
4850
4852
|
const toggleAppearanceRestrictor = () => {
|
|
4851
|
-
if (!window) return "under";
|
|
4853
|
+
if (!window || !extendedMultiselectOptions.value.$el) return "under";
|
|
4852
4854
|
|
|
4853
4855
|
const innerHeight = window.innerHeight;
|
|
4856
|
+
const offsetHeight = extendedMultiselectOptions.value.$el.offsetHeight
|
|
4857
|
+
+ extendedMultiselect.value.offsetHeight;
|
|
4854
4858
|
const offsetTop = extendedMultiselect.value
|
|
4855
4859
|
? extendedMultiselect.value.getBoundingClientRect().y
|
|
4856
4860
|
: 0;
|
|
4857
4861
|
const difference = innerHeight - offsetTop;
|
|
4858
4862
|
|
|
4859
|
-
if (difference >
|
|
4863
|
+
if (difference > offsetHeight) {
|
|
4860
4864
|
return "under";
|
|
4861
4865
|
} else {
|
|
4862
4866
|
return "atop";
|
|
@@ -4868,7 +4872,7 @@ const toggleAppearanceRestrictor = () => {
|
|
|
4868
4872
|
* @function
|
|
4869
4873
|
*/
|
|
4870
4874
|
const toggleAppearanceRestrictorActivate = () => {
|
|
4871
|
-
if (
|
|
4875
|
+
if (dropdownActive.value) {
|
|
4872
4876
|
chosenToggleAppearanceSide.value = toggleAppearanceSide.value !== "auto"
|
|
4873
4877
|
? toggleAppearanceSide.value
|
|
4874
4878
|
: toggleAppearanceRestrictor();
|
|
@@ -4988,15 +4992,17 @@ const toggleDetector = (mouseEvent, pattern, mode) => {
|
|
|
4988
4992
|
const toggleOptions = () => {
|
|
4989
4993
|
if (internalLoading.value || disabled.value || dropdownDisabled.value) return;
|
|
4990
4994
|
|
|
4991
|
-
|
|
4995
|
+
dropdownActive.value = !dropdownActive.value;
|
|
4996
|
+
|
|
4997
|
+
nextTick(() => {
|
|
4998
|
+
toggleAppearanceRestrictorActivate();
|
|
4999
|
+
});
|
|
4992
5000
|
|
|
4993
5001
|
if (!dropdownActive.value) {
|
|
4994
5002
|
activeEmitter();
|
|
4995
5003
|
} else {
|
|
4996
5004
|
closeEmitter();
|
|
4997
5005
|
}
|
|
4998
|
-
|
|
4999
|
-
dropdownActive.value = !dropdownActive.value;
|
|
5000
5006
|
};
|
|
5001
5007
|
|
|
5002
5008
|
/**
|
|
@@ -5263,15 +5269,21 @@ onMounted(() => {
|
|
|
5263
5269
|
&& typeof options.value !== "function"
|
|
5264
5270
|
) {
|
|
5265
5271
|
dropdownActive.value = true;
|
|
5272
|
+
|
|
5273
|
+
nextTick(() => {
|
|
5274
|
+
toggleAppearanceRestrictorActivate();
|
|
5275
|
+
});
|
|
5266
5276
|
}
|
|
5267
5277
|
|
|
5268
5278
|
emitter.value.on("extended:expand-options", () => {
|
|
5269
5279
|
if (dropdownActive.value || dropdownDisabled.value) return;
|
|
5270
|
-
|
|
5271
|
-
toggleAppearanceRestrictorActivate();
|
|
5272
|
-
activeEmitter();
|
|
5273
|
-
|
|
5280
|
+
|
|
5274
5281
|
dropdownActive.value = true;
|
|
5282
|
+
|
|
5283
|
+
nextTick(() => {
|
|
5284
|
+
toggleAppearanceRestrictorActivate();
|
|
5285
|
+
});
|
|
5286
|
+
activeEmitter();
|
|
5275
5287
|
});
|
|
5276
5288
|
|
|
5277
5289
|
emitter.value.on("extended:loader-pattern-changed", async (pattern) => {
|
|
@@ -5451,6 +5463,8 @@ return (_ctx, _cache) => {
|
|
|
5451
5463
|
(dropdownActive.value)
|
|
5452
5464
|
? (openBlock(), createBlock(script$9, {
|
|
5453
5465
|
key: 0,
|
|
5466
|
+
ref_key: "extendedMultiselectOptions",
|
|
5467
|
+
ref: extendedMultiselectOptions,
|
|
5454
5468
|
"auto-select-created-option": __props.autoSelectCreatedOption,
|
|
5455
5469
|
"clear-by-select-when-multiple": __props.clearBySelectWhenMultiple,
|
|
5456
5470
|
"create-on-the-go": __props.createOnTheGo,
|