@nethserver/ns8-ui-lib 0.1.28 → 0.1.30
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/ns8-ui-lib.esm.js
CHANGED
|
@@ -20924,7 +20924,6 @@ var script$5 = {
|
|
|
20924
20924
|
data() {
|
|
20925
20925
|
return {
|
|
20926
20926
|
open: false,
|
|
20927
|
-
// dataOptions: null, ////
|
|
20928
20927
|
// includes user input items
|
|
20929
20928
|
internalOptions: [],
|
|
20930
20929
|
dataValue: "",
|
|
@@ -20954,10 +20953,7 @@ var script$5 = {
|
|
|
20954
20953
|
},
|
|
20955
20954
|
|
|
20956
20955
|
options() {
|
|
20957
|
-
this.internalOptions = cloneDeep_1(this.options);
|
|
20958
|
-
},
|
|
20959
|
-
|
|
20960
|
-
selectionFeedback() {// this.updateOptions(); ////
|
|
20956
|
+
this.internalOptions = cloneDeep_1(this.options);
|
|
20961
20957
|
},
|
|
20962
20958
|
|
|
20963
20959
|
open() {
|
|
@@ -20977,16 +20973,11 @@ var script$5 = {
|
|
|
20977
20973
|
},
|
|
20978
20974
|
|
|
20979
20975
|
created() {
|
|
20980
|
-
|
|
20981
|
-
|
|
20982
|
-
this.internalOptions = cloneDeep_1(this.options); // this.updateOptions(); ////
|
|
20983
|
-
|
|
20976
|
+
this.internalOptions = cloneDeep_1(this.options);
|
|
20984
20977
|
this.dataValue = this.value.filter(item => this.internalOptions.some(opt => opt.value === item.trim()));
|
|
20985
20978
|
},
|
|
20986
20979
|
|
|
20987
20980
|
mounted() {
|
|
20988
|
-
console.log("ns-multi-select mounted"); ////
|
|
20989
|
-
|
|
20990
20981
|
this.highlighted = this.value ? this.value : this.highlight; // override highlight with value if provided
|
|
20991
20982
|
|
|
20992
20983
|
this.checkSlots();
|
|
@@ -21054,7 +21045,6 @@ var script$5 = {
|
|
|
21054
21045
|
},
|
|
21055
21046
|
|
|
21056
21047
|
filteredOptions() {
|
|
21057
|
-
//// use this.dataFilter?
|
|
21058
21048
|
if (!this.filter) {
|
|
21059
21049
|
return this.limitedDataOptions;
|
|
21060
21050
|
}
|
|
@@ -21094,7 +21084,7 @@ var script$5 = {
|
|
|
21094
21084
|
clearFilter() {
|
|
21095
21085
|
this.filter = "";
|
|
21096
21086
|
this.$refs.input.focus();
|
|
21097
|
-
this.doOpen(true);
|
|
21087
|
+
this.doOpen(true);
|
|
21098
21088
|
},
|
|
21099
21089
|
|
|
21100
21090
|
checkHighlightPosition(newHiglight) {
|
|
@@ -21131,50 +21121,6 @@ var script$5 = {
|
|
|
21131
21121
|
}
|
|
21132
21122
|
},
|
|
21133
21123
|
|
|
21134
|
-
// updateOptions() { ////
|
|
21135
|
-
// console.log("ns-multi-select updateOptions"); ////
|
|
21136
|
-
// if (this.autoFilter) {
|
|
21137
|
-
// const escFilter = this.filter.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
21138
|
-
// const pat = new RegExp(escFilter, "iu");
|
|
21139
|
-
// this.dataOptions = this.internalOptions
|
|
21140
|
-
// .filter((opt) => pat.test(opt.label))
|
|
21141
|
-
// .slice(0);
|
|
21142
|
-
// } else {
|
|
21143
|
-
// this.dataOptions = this.internalOptions.slice(0);
|
|
21144
|
-
// }
|
|
21145
|
-
// if (this.highlight !== this.highlighted) {
|
|
21146
|
-
// this.highlighted = this.highlight;
|
|
21147
|
-
// }
|
|
21148
|
-
// // multi select unique part
|
|
21149
|
-
// if (
|
|
21150
|
-
// !this.sorting &&
|
|
21151
|
-
// this.selectionFeedback !== selectionFeedbackOptions[FIXED]
|
|
21152
|
-
// ) {
|
|
21153
|
-
// // if included in data value move to top
|
|
21154
|
-
// this.dataOptions.sort(
|
|
21155
|
-
// (a, b) =>
|
|
21156
|
-
// (this.dataValue.includes(a.value) ? -1 : 1) -
|
|
21157
|
-
// (this.dataValue.includes(b.value) ? -1 : 1)
|
|
21158
|
-
// );
|
|
21159
|
-
// }
|
|
21160
|
-
// // added for ns-multi-select
|
|
21161
|
-
// if (this.acceptUserInput && this.filter.trim()) {
|
|
21162
|
-
// //// remove block?
|
|
21163
|
-
// // suggest user input
|
|
21164
|
-
// const trimmedFilter = this.filter.trim();
|
|
21165
|
-
// const itemFound = this.internalOptions.find(
|
|
21166
|
-
// (o) => o.value.trim() === trimmedFilter
|
|
21167
|
-
// );
|
|
21168
|
-
// if (!itemFound) {
|
|
21169
|
-
// this.dataOptions.push({
|
|
21170
|
-
// name: trimmedFilter,
|
|
21171
|
-
// label: trimmedFilter,
|
|
21172
|
-
// value: trimmedFilter,
|
|
21173
|
-
// type: this.userInputLabel,
|
|
21174
|
-
// });
|
|
21175
|
-
// }
|
|
21176
|
-
// }
|
|
21177
|
-
// },
|
|
21178
21124
|
updateHighlight() {
|
|
21179
21125
|
let firstMatchIndex;
|
|
21180
21126
|
|
|
@@ -21192,19 +21138,11 @@ var script$5 = {
|
|
|
21192
21138
|
},
|
|
21193
21139
|
|
|
21194
21140
|
onInput() {
|
|
21195
|
-
this.doOpen(true);
|
|
21196
|
-
|
|
21141
|
+
this.doOpen(true);
|
|
21197
21142
|
this.updateHighlight();
|
|
21198
21143
|
},
|
|
21199
21144
|
|
|
21200
21145
|
doOpen(newVal) {
|
|
21201
|
-
// if ( ////
|
|
21202
|
-
// newVal &&
|
|
21203
|
-
// !this.open &&
|
|
21204
|
-
// this.selectionFeedback === selectionFeedbackOptions[TOP_AFTER_REOPEN]
|
|
21205
|
-
// ) {
|
|
21206
|
-
// this.updateOptions();
|
|
21207
|
-
// }
|
|
21208
21146
|
this.open = newVal;
|
|
21209
21147
|
},
|
|
21210
21148
|
|
|
@@ -21240,9 +21178,6 @@ var script$5 = {
|
|
|
21240
21178
|
this.onItemClick(this.highlighted);
|
|
21241
21179
|
this.$refs.input.focus();
|
|
21242
21180
|
this.filter = "";
|
|
21243
|
-
this.doOpen(false); // this.updateOptions(); ////
|
|
21244
|
-
} else {
|
|
21245
|
-
this.doOpen(true);
|
|
21246
21181
|
}
|
|
21247
21182
|
},
|
|
21248
21183
|
|
|
@@ -21302,10 +21237,7 @@ var script$5 = {
|
|
|
21302
21237
|
this.clearFilter();
|
|
21303
21238
|
});
|
|
21304
21239
|
}
|
|
21305
|
-
}
|
|
21306
|
-
// this.updateOptions(); ////
|
|
21307
|
-
// }
|
|
21308
|
-
|
|
21240
|
+
}
|
|
21309
21241
|
|
|
21310
21242
|
this.$refs.button.focus();
|
|
21311
21243
|
this.$emit("change", this.dataValue);
|
|
@@ -21618,11 +21550,11 @@ var __vue_staticRenderFns__$e = [];
|
|
|
21618
21550
|
|
|
21619
21551
|
const __vue_inject_styles__$f = function (inject) {
|
|
21620
21552
|
if (!inject) return;
|
|
21621
|
-
inject("data-v-
|
|
21622
|
-
source: ".bx--multi-select--filterable .bx--tag.selected-item[data-v-
|
|
21553
|
+
inject("data-v-0bf1e0ec_0", {
|
|
21554
|
+
source: ".bx--multi-select--filterable .bx--tag.selected-item[data-v-0bf1e0ec]{margin-left:0;margin-bottom:.25rem}.margin-bottom-on-open[data-v-0bf1e0ec]{margin-bottom:14rem}.label-with-tooltip[data-v-0bf1e0ec]{display:flex;align-items:baseline}",
|
|
21623
21555
|
map: undefined,
|
|
21624
21556
|
media: undefined
|
|
21625
|
-
}), inject("data-v-
|
|
21557
|
+
}), inject("data-v-0bf1e0ec_1", {
|
|
21626
21558
|
source: ".selected-item button.bx--tag__close-icon{position:relative;right:1px}.ns-multi-select .bx--tooltip__label .bx--tooltip__trigger{margin-left:.25rem}",
|
|
21627
21559
|
map: undefined,
|
|
21628
21560
|
media: undefined
|
|
@@ -21631,7 +21563,7 @@ const __vue_inject_styles__$f = function (inject) {
|
|
|
21631
21563
|
/* scoped */
|
|
21632
21564
|
|
|
21633
21565
|
|
|
21634
|
-
const __vue_scope_id__$f = "data-v-
|
|
21566
|
+
const __vue_scope_id__$f = "data-v-0bf1e0ec";
|
|
21635
21567
|
/* module identifier */
|
|
21636
21568
|
|
|
21637
21569
|
const __vue_module_identifier__$f = undefined;
|