@nethserver/ns8-ui-lib 0.1.10 → 0.1.13
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 +547 -464
- package/dist/ns8-ui-lib.min.js +1 -1
- package/dist/ns8-ui-lib.ssr.js +533 -456
- package/package.json +1 -1
- package/src/lib-components/NsComboBox.vue +15 -6
- package/src/lib-components/NsMultiSelect.vue +15 -6
- package/src/lib-components/pictograms/UserProfilePictogram.vue +14 -0
package/package.json
CHANGED
|
@@ -143,11 +143,7 @@
|
|
|
143
143
|
@mousedown.prevent
|
|
144
144
|
>
|
|
145
145
|
<div :class="[`${carbonPrefix}--list-box__menu-item__option`]">
|
|
146
|
-
{{
|
|
147
|
-
showItemType && item.type
|
|
148
|
-
? item.label + " - " + item.type
|
|
149
|
-
: item.label
|
|
150
|
-
}}
|
|
146
|
+
{{ getItemLabel(item) }}
|
|
151
147
|
</div>
|
|
152
148
|
</div>
|
|
153
149
|
</div>
|
|
@@ -226,6 +222,7 @@ export default {
|
|
|
226
222
|
maxDisplayOptions: { type: Number, default: 100 },
|
|
227
223
|
acceptUserInput: { type: Boolean, default: false },
|
|
228
224
|
showItemType: { type: Boolean, default: false },
|
|
225
|
+
showItemDescription: { type: Boolean, default: false },
|
|
229
226
|
marginBottomOnOpen: { type: Boolean, default: false },
|
|
230
227
|
tooltipAlignment: {
|
|
231
228
|
type: String,
|
|
@@ -555,6 +552,18 @@ export default {
|
|
|
555
552
|
if (this.disabled) return;
|
|
556
553
|
this.doOpen(true);
|
|
557
554
|
},
|
|
555
|
+
getItemLabel(item) {
|
|
556
|
+
let label = item.label;
|
|
557
|
+
|
|
558
|
+
if (this.showItemType && item.type) {
|
|
559
|
+
label += ` [${item.type}]`;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
if (this.showItemDescription && item.description) {
|
|
563
|
+
label += ` ${item.description}`;
|
|
564
|
+
}
|
|
565
|
+
return label;
|
|
566
|
+
},
|
|
558
567
|
},
|
|
559
568
|
};
|
|
560
569
|
</script>
|
|
@@ -576,4 +585,4 @@ export default {
|
|
|
576
585
|
.ns-combo-box .bx--tooltip__label .bx--tooltip__trigger {
|
|
577
586
|
margin-left: 0.25rem;
|
|
578
587
|
}
|
|
579
|
-
</style>
|
|
588
|
+
</style>
|
|
@@ -175,11 +175,7 @@
|
|
|
175
175
|
:value="item.value"
|
|
176
176
|
:name="item.name"
|
|
177
177
|
:data-test="item.name"
|
|
178
|
-
:label="
|
|
179
|
-
showItemType && item.type
|
|
180
|
-
? item.label + ' - ' + item.type
|
|
181
|
-
: item.label
|
|
182
|
-
"
|
|
178
|
+
:label="getItemLabel(item)"
|
|
183
179
|
style="pointer-events: none"
|
|
184
180
|
/>
|
|
185
181
|
</div>
|
|
@@ -308,6 +304,7 @@ export default {
|
|
|
308
304
|
maxDisplayOptions: { type: Number, default: 100 },
|
|
309
305
|
acceptUserInput: { type: Boolean, default: false },
|
|
310
306
|
showItemType: { type: Boolean, default: false },
|
|
307
|
+
showItemDescription: { type: Boolean, default: false },
|
|
311
308
|
// use cv-tag color
|
|
312
309
|
selectedItemsColor: { type: String, default: "high-contrast" },
|
|
313
310
|
marginBottomOnOpen: { type: Boolean, default: false },
|
|
@@ -688,6 +685,18 @@ export default {
|
|
|
688
685
|
inputFocus() {
|
|
689
686
|
this.doOpen(true);
|
|
690
687
|
},
|
|
688
|
+
getItemLabel(item) {
|
|
689
|
+
let label = item.label;
|
|
690
|
+
|
|
691
|
+
if (this.showItemType && item.type) {
|
|
692
|
+
label += ` [${item.type}]`;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
if (this.showItemDescription && item.description) {
|
|
696
|
+
label += ` ${item.description}`;
|
|
697
|
+
}
|
|
698
|
+
return label;
|
|
699
|
+
},
|
|
691
700
|
},
|
|
692
701
|
};
|
|
693
702
|
</script>
|
|
@@ -719,4 +728,4 @@ export default {
|
|
|
719
728
|
.ns-multi-select .bx--tooltip__label .bx--tooltip__trigger {
|
|
720
729
|
margin-left: 0.25rem;
|
|
721
730
|
}
|
|
722
|
-
</style>
|
|
731
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<path
|
|
3
|
+
id="user--profile_1_"
|
|
4
|
+
d="M16,31.36C7.53,31.36,0.64,24.47,0.64,16S7.53,0.64,16,0.64S31.36,7.53,31.36,16
|
|
5
|
+
S24.47,31.36,16,31.36z M6.349,27c2.579,2.266,5.957,3.64,9.651,3.64c3.693,0,7.072-1.374,9.65-3.64h-0.01
|
|
6
|
+
c0-4.341-2.941-8.161-7.153-9.29c-0.144-0.038-0.248-0.16-0.265-0.307c-0.018-0.146,0.058-0.289,0.188-0.358
|
|
7
|
+
c1.678-0.897,2.72-2.635,2.72-4.534c0-2.84-2.306-5.151-5.14-5.151s-5.141,2.311-5.141,5.151c0,1.899,1.042,3.637,2.72,4.534
|
|
8
|
+
c0.13,0.069,0.205,0.212,0.188,0.358s-0.122,0.269-0.264,0.307C9.292,18.835,6.36,22.655,6.36,27H6.349z M19.435,17.25
|
|
9
|
+
c3.913,1.377,6.646,4.973,6.905,9.104c2.655-2.651,4.3-6.314,4.3-10.354c0-8.073-6.567-14.64-14.64-14.64
|
|
10
|
+
C7.927,1.36,1.36,7.927,1.36,16c0,4.04,1.645,7.703,4.3,10.354c0.258-4.135,2.982-7.729,6.883-9.104
|
|
11
|
+
c-1.506-1.094-2.415-2.846-2.415-4.739c0-3.237,2.629-5.871,5.86-5.871c3.232,0,5.861,2.633,5.861,5.871
|
|
12
|
+
C21.85,14.404,20.941,16.156,19.435,17.25z"
|
|
13
|
+
/>
|
|
14
|
+
</template>
|