@tekkare/auriga 0.2.148 → 0.2.151
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/module.json +1 -1
- package/dist/runtime/components/argMultipleSelect.vue +114 -51
- package/dist/runtime/components/argMultipleSelect.vue.d.ts +28 -10
- package/dist/runtime/components/argSimpleLabel.vue +17 -4
- package/dist/runtime/components/argSimpleLabel.vue.d.ts +19 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
<!-- Simple select -->
|
|
4
4
|
<div class="oip_select_display">
|
|
5
5
|
<p
|
|
6
|
+
v-if="!selectorIcon"
|
|
6
7
|
class="oip_filter_label"
|
|
7
8
|
:class="labelInfo ? 'oip_row v-center gap-4' : ''"
|
|
8
9
|
>
|
|
@@ -17,6 +18,8 @@
|
|
|
17
18
|
:amount_value="nested ? getNestedLength : selected_items.length"
|
|
18
19
|
@click="changeDisplay()"
|
|
19
20
|
:class="isDisplay ? 'open' : ''"
|
|
21
|
+
:selector-icon="selectorIcon"
|
|
22
|
+
:tooltip-icon="tooltipIcon"
|
|
20
23
|
>
|
|
21
24
|
<p
|
|
22
25
|
:class="[
|
|
@@ -208,23 +211,23 @@
|
|
|
208
211
|
v-if="show_all"
|
|
209
212
|
class="oip_select_complex_selection_loop"
|
|
210
213
|
@click="
|
|
211
|
-
selected_all || getOptions
|
|
214
|
+
selected_all || getOptions?.length === nestedSelectedLength
|
|
212
215
|
? del_all()
|
|
213
216
|
: add_all()
|
|
214
217
|
"
|
|
215
218
|
>
|
|
216
219
|
<arg-icon
|
|
217
220
|
:class="
|
|
218
|
-
!selected_all && getOptions
|
|
221
|
+
!selected_all && getOptions?.length !== nestedSelectedLength
|
|
219
222
|
? 'del'
|
|
220
|
-
: selected_all || getOptions
|
|
223
|
+
: selected_all || getOptions?.length === nestedSelectedLength
|
|
221
224
|
? 'add'
|
|
222
225
|
: 'more'
|
|
223
226
|
"
|
|
224
227
|
thickness="24"
|
|
225
228
|
size="16px"
|
|
226
229
|
:name="
|
|
227
|
-
selected_all || getOptions
|
|
230
|
+
selected_all || getOptions?.length === nestedSelectedLength
|
|
228
231
|
? 'CheckSquareFill'
|
|
229
232
|
: 'Square'
|
|
230
233
|
"
|
|
@@ -232,9 +235,9 @@
|
|
|
232
235
|
<div
|
|
233
236
|
:class="[
|
|
234
237
|
'oip_select_complex_selection_loop_name',
|
|
235
|
-
!selected_all && getOptions
|
|
238
|
+
!selected_all && getOptions?.length !== nestedSelectedLength
|
|
236
239
|
? 'del'
|
|
237
|
-
: selected_all || getOptions
|
|
240
|
+
: selected_all || getOptions?.length === nestedSelectedLength
|
|
238
241
|
? 'add'
|
|
239
242
|
: 'more',
|
|
240
243
|
]"
|
|
@@ -243,6 +246,7 @@
|
|
|
243
246
|
</div>
|
|
244
247
|
</div>
|
|
245
248
|
<div
|
|
249
|
+
v-if="filterNested?.length > 0"
|
|
246
250
|
:class="[
|
|
247
251
|
show_all ? 'oip_select_multiple_left_margin cate_left_margin' : '',
|
|
248
252
|
multiple_columns ? 'cate_row' : 'cate_col',
|
|
@@ -291,7 +295,7 @@
|
|
|
291
295
|
class="oip_select_complex_selection_loop multiple"
|
|
292
296
|
@click="
|
|
293
297
|
nestedIncludes(option, index)
|
|
294
|
-
? del_nested_element(index, option)
|
|
298
|
+
? del_nested_element(index, option, optIndex)
|
|
295
299
|
: add_nested_element(index, option)
|
|
296
300
|
"
|
|
297
301
|
>
|
|
@@ -364,7 +368,9 @@ export default defineComponent({
|
|
|
364
368
|
fuzzyThreshold: { type: Number, default: 0.5 },
|
|
365
369
|
filterSearch: { type: Boolean, default: true },
|
|
366
370
|
labelInfo: { type: Boolean, default: false },
|
|
367
|
-
fuzzyStart: { type: Number, default: 1 }
|
|
371
|
+
fuzzyStart: { type: Number, default: 1 },
|
|
372
|
+
selectorIcon: { type: String || null, default: null },
|
|
373
|
+
tooltipIcon: { type: String || null, default: null }
|
|
368
374
|
},
|
|
369
375
|
emits: [
|
|
370
376
|
"changeElement",
|
|
@@ -412,14 +418,20 @@ export default defineComponent({
|
|
|
412
418
|
if (props.preselection_all) {
|
|
413
419
|
add_all();
|
|
414
420
|
} else if (props.default_select && props.default_select.length > 0) {
|
|
415
|
-
if (
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
+
if (props.nested) {
|
|
422
|
+
selected_nested.value = [...new Set(props.default_select)];
|
|
423
|
+
} else {
|
|
424
|
+
if (!props.default_select.every(
|
|
425
|
+
(a) => element_table_copy.value.includes(a)
|
|
426
|
+
)) {
|
|
427
|
+
element_table_copy.value = [
|
|
428
|
+
...new Set(
|
|
429
|
+
element_table_copy.value.concat(props.default_select)
|
|
430
|
+
)
|
|
431
|
+
];
|
|
432
|
+
}
|
|
433
|
+
selected_items.value = [...new Set(props.default_select)];
|
|
421
434
|
}
|
|
422
|
-
selected_items.value = [...new Set(props.default_select)];
|
|
423
435
|
}
|
|
424
436
|
}
|
|
425
437
|
);
|
|
@@ -427,7 +439,9 @@ export default defineComponent({
|
|
|
427
439
|
() => props.default_select,
|
|
428
440
|
(new_selected) => {
|
|
429
441
|
if (new_selected && new_selected.length > 0) {
|
|
430
|
-
|
|
442
|
+
if (props.nested) {
|
|
443
|
+
selected_nested.value = [...new Set(props.default_select)];
|
|
444
|
+
} else selected_items.value = [...new Set(props.default_select)];
|
|
431
445
|
}
|
|
432
446
|
}
|
|
433
447
|
);
|
|
@@ -443,11 +457,13 @@ export default defineComponent({
|
|
|
443
457
|
`multiple_search_input_${props.multiple_label}`
|
|
444
458
|
);
|
|
445
459
|
searchBar.value?.addEventListener("input", debounce(changeInput, 500));
|
|
446
|
-
element_table_copy.value = props.element_table;
|
|
460
|
+
element_table_copy.value = [...new Set(props.element_table)];
|
|
447
461
|
if (props.preselection_all) {
|
|
448
462
|
add_all();
|
|
449
463
|
} else if (props.default_select && props.default_select.length > 0) {
|
|
450
|
-
|
|
464
|
+
if (props.nested) {
|
|
465
|
+
selected_nested.value = [...new Set(props.default_select)];
|
|
466
|
+
} else selected_items.value = props.default_select;
|
|
451
467
|
}
|
|
452
468
|
});
|
|
453
469
|
onUnmounted(() => {
|
|
@@ -476,7 +492,9 @@ export default defineComponent({
|
|
|
476
492
|
const getNestedLength = computed(() => {
|
|
477
493
|
let length = 0;
|
|
478
494
|
for (let i = 0; i < selected_nested.value.length; i++) {
|
|
479
|
-
|
|
495
|
+
if (selected_nested.value[i].elements) {
|
|
496
|
+
length += selected_nested.value[i].elements.length;
|
|
497
|
+
} else length += 1;
|
|
480
498
|
}
|
|
481
499
|
return length;
|
|
482
500
|
});
|
|
@@ -485,11 +503,19 @@ export default defineComponent({
|
|
|
485
503
|
let filterFill = ``;
|
|
486
504
|
for (let i = 0; i < fullSelect.length; i++) {
|
|
487
505
|
if (props.nested) {
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
filterFill
|
|
506
|
+
if (fullSelect[i]?.elements) {
|
|
507
|
+
for (let j = 0; j < fullSelect[i].elements.length; j++) {
|
|
508
|
+
if (j === 0 && filterFill.length === 0) {
|
|
509
|
+
filterFill = fullSelect[i].elements[j];
|
|
510
|
+
} else {
|
|
511
|
+
filterFill = `${filterFill}, ${fullSelect[i].elements[j]}`;
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
} else {
|
|
515
|
+
if (filterFill.length === 0) {
|
|
516
|
+
filterFill = fullSelect[i]?.title;
|
|
491
517
|
} else {
|
|
492
|
-
filterFill = `${filterFill}, ${fullSelect[i]
|
|
518
|
+
filterFill = `${filterFill}, ${fullSelect[i]?.title}`;
|
|
493
519
|
}
|
|
494
520
|
}
|
|
495
521
|
} else {
|
|
@@ -506,9 +532,11 @@ export default defineComponent({
|
|
|
506
532
|
if (props.nested) {
|
|
507
533
|
const optionsTable = [];
|
|
508
534
|
for (let i = 0; i < element_table_copy.value.length; i++) {
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
535
|
+
if (element_table_copy.value[i].values) {
|
|
536
|
+
for (let j = 0; j < element_table_copy.value[i].values.length; j++) {
|
|
537
|
+
optionsTable.push(element_table_copy.value[i].values[j]);
|
|
538
|
+
}
|
|
539
|
+
} else optionsTable.push(element_table_copy.value[i]?.title);
|
|
512
540
|
}
|
|
513
541
|
return optionsTable;
|
|
514
542
|
} else {
|
|
@@ -585,13 +613,17 @@ export default defineComponent({
|
|
|
585
613
|
});
|
|
586
614
|
function checkNestedContainsValues(element, search) {
|
|
587
615
|
let hasValue = false;
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
616
|
+
if (element?.title?.toLowerCase()?.includes(search?.toLowerCase())) {
|
|
617
|
+
hasValue = true;
|
|
618
|
+
} else if (element.values) {
|
|
619
|
+
for (let i = 0; i < element.values.length; i++) {
|
|
620
|
+
if (search.includes(" ")) {
|
|
621
|
+
if (search.toLowerCase().split(" ").every((l) => element.values[i].toLowerCase().includes(l))) {
|
|
622
|
+
hasValue = true;
|
|
623
|
+
}
|
|
624
|
+
} else if (element.values[i].toLowerCase().includes(search.toLowerCase())) {
|
|
591
625
|
hasValue = true;
|
|
592
626
|
}
|
|
593
|
-
} else if (element.values[i].toLowerCase().includes(search.toLowerCase())) {
|
|
594
|
-
hasValue = true;
|
|
595
627
|
}
|
|
596
628
|
}
|
|
597
629
|
return hasValue;
|
|
@@ -615,7 +647,9 @@ export default defineComponent({
|
|
|
615
647
|
const nestedSelectedLength = computed(() => {
|
|
616
648
|
let length = 0;
|
|
617
649
|
for (let i = 0; i < selected_nested.value.length; i++) {
|
|
618
|
-
|
|
650
|
+
if (selected_nested.value[i].elements) {
|
|
651
|
+
length += selected_nested.value[i].elements.length;
|
|
652
|
+
} else length += 1;
|
|
619
653
|
}
|
|
620
654
|
return length;
|
|
621
655
|
});
|
|
@@ -713,6 +747,11 @@ export default defineComponent({
|
|
|
713
747
|
title: element_table_copy.value[index].title,
|
|
714
748
|
elements: [elem]
|
|
715
749
|
});
|
|
750
|
+
if (element_table_copy.value[index]?.values.every(
|
|
751
|
+
(elem2) => selected_nested.value?.find((a) => a.cat === index)?.elements.includes(elem2)
|
|
752
|
+
)) {
|
|
753
|
+
selectedCats.value.push(index);
|
|
754
|
+
}
|
|
716
755
|
emit(
|
|
717
756
|
"changeElement",
|
|
718
757
|
selected_nested.value.map((a) => a)
|
|
@@ -722,7 +761,7 @@ export default defineComponent({
|
|
|
722
761
|
selected_nested.value.map((a) => a)
|
|
723
762
|
);
|
|
724
763
|
}
|
|
725
|
-
function del_nested_element(index, elem) {
|
|
764
|
+
function del_nested_element(index, elem, optIndex) {
|
|
726
765
|
selected_all.value = false;
|
|
727
766
|
if (selectedCats.value.includes(index)) {
|
|
728
767
|
selectedCats.value.splice(
|
|
@@ -730,15 +769,20 @@ export default defineComponent({
|
|
|
730
769
|
1
|
|
731
770
|
);
|
|
732
771
|
}
|
|
733
|
-
selected_nested.value[selected_nested.value.findIndex((a) => a.cat === index)].elements.splice(
|
|
734
|
-
selected_nested.value[selected_nested.value.findIndex(
|
|
735
|
-
(a) => a.cat === index
|
|
736
|
-
)].elements.findIndex((a) => a === elem),
|
|
737
|
-
1
|
|
738
|
-
);
|
|
739
772
|
if (selected_nested.value.findIndex(
|
|
740
773
|
(a) => a.cat === index
|
|
741
774
|
) !== -1) {
|
|
775
|
+
const currentOption = ref(
|
|
776
|
+
selected_nested.value.findIndex(
|
|
777
|
+
(a) => a.cat === index
|
|
778
|
+
)
|
|
779
|
+
);
|
|
780
|
+
const nestedElements = [
|
|
781
|
+
...new Set(selected_nested.value[currentOption?.value].elements)
|
|
782
|
+
];
|
|
783
|
+
selected_nested.value[selected_nested.value.findIndex(
|
|
784
|
+
(a) => a.cat === index
|
|
785
|
+
)].elements = nestedElements.filter((f) => f !== elem);
|
|
742
786
|
if (selected_nested.value[selected_nested.value.findIndex(
|
|
743
787
|
(a) => a.cat === index
|
|
744
788
|
)].elements.length === 0) {
|
|
@@ -749,6 +793,12 @@ export default defineComponent({
|
|
|
749
793
|
1
|
|
750
794
|
);
|
|
751
795
|
}
|
|
796
|
+
} else {
|
|
797
|
+
const currentOption = ref(element_table_copy.value[index]);
|
|
798
|
+
const nestedElements = [...new Set(currentOption?.value.values)];
|
|
799
|
+
selected_nested.value[selected_nested.value.findIndex(
|
|
800
|
+
(a) => a.cat === index
|
|
801
|
+
)].elements = nestedElements.filter((f) => f !== elem);
|
|
752
802
|
}
|
|
753
803
|
emit(
|
|
754
804
|
"changeElement",
|
|
@@ -770,11 +820,16 @@ export default defineComponent({
|
|
|
770
820
|
title: element_table_copy.value[i].title,
|
|
771
821
|
elements: []
|
|
772
822
|
});
|
|
773
|
-
|
|
823
|
+
if (element_table_copy.value[i].values) {
|
|
824
|
+
for (let j = 0; j < element_table_copy.value[i].values.length; j++) {
|
|
825
|
+
selected_nested.value[i].elements.push(
|
|
826
|
+
element_table_copy.value[i].values[j]
|
|
827
|
+
);
|
|
828
|
+
}
|
|
829
|
+
} else
|
|
774
830
|
selected_nested.value[i].elements.push(
|
|
775
|
-
element_table_copy.value[i]
|
|
831
|
+
element_table_copy.value[i]?.title
|
|
776
832
|
);
|
|
777
|
-
}
|
|
778
833
|
selectedCats.value.push(i);
|
|
779
834
|
}
|
|
780
835
|
} else {
|
|
@@ -795,16 +850,24 @@ export default defineComponent({
|
|
|
795
850
|
}
|
|
796
851
|
function add_all_cat(index) {
|
|
797
852
|
selectedCats.value.push(index);
|
|
798
|
-
if (
|
|
853
|
+
if (!element_table_copy.value[index].values) {
|
|
799
854
|
selected_nested.value.push({
|
|
800
855
|
cat: index,
|
|
801
856
|
title: element_table_copy.value[index].title,
|
|
802
|
-
elements: element_table_copy.value[index].
|
|
857
|
+
elements: [element_table_copy.value[index].title]
|
|
803
858
|
});
|
|
804
|
-
} else
|
|
805
|
-
selected_nested.value
|
|
806
|
-
(
|
|
807
|
-
|
|
859
|
+
} else {
|
|
860
|
+
if (selected_nested.value.filter((f) => f.cat === index).length === 0) {
|
|
861
|
+
selected_nested.value.push({
|
|
862
|
+
cat: index,
|
|
863
|
+
title: element_table_copy.value[index].title,
|
|
864
|
+
elements: element_table_copy.value[index].values
|
|
865
|
+
});
|
|
866
|
+
} else
|
|
867
|
+
selected_nested.value[selected_nested.value.findIndex(
|
|
868
|
+
(f) => f.cat === index
|
|
869
|
+
)].elements = element_table_copy.value[index].values;
|
|
870
|
+
}
|
|
808
871
|
emit(
|
|
809
872
|
"changeElement",
|
|
810
873
|
selected_nested.value.map((a) => a)
|
|
@@ -816,9 +879,6 @@ export default defineComponent({
|
|
|
816
879
|
}
|
|
817
880
|
function del_all_cat(index) {
|
|
818
881
|
selected_all.value = false;
|
|
819
|
-
if (selectedCats.value.includes(index)) {
|
|
820
|
-
selectedCats.value.splice(selectedCats.value.indexOf(index), 1);
|
|
821
|
-
}
|
|
822
882
|
for (let i = 0; i < selected_nested.value.filter((f) => f.cat === index).length; i++) {
|
|
823
883
|
selected_nested.value.splice(
|
|
824
884
|
selected_nested.value.findIndex(
|
|
@@ -827,6 +887,9 @@ export default defineComponent({
|
|
|
827
887
|
1
|
|
828
888
|
);
|
|
829
889
|
}
|
|
890
|
+
if (selectedCats.value.includes(index)) {
|
|
891
|
+
selectedCats.value.splice(selectedCats.value.indexOf(index), 1);
|
|
892
|
+
}
|
|
830
893
|
emit(
|
|
831
894
|
"changeElement",
|
|
832
895
|
selected_nested.value.map((a) => a)
|
|
@@ -34,10 +34,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
34
34
|
};
|
|
35
35
|
default_select: {
|
|
36
36
|
type: {
|
|
37
|
-
(arrayLength: number):
|
|
38
|
-
(...items:
|
|
39
|
-
new (arrayLength: number):
|
|
40
|
-
new (...items:
|
|
37
|
+
(arrayLength: number): any[];
|
|
38
|
+
(...items: any[]): any[];
|
|
39
|
+
new (arrayLength: number): any[];
|
|
40
|
+
new (...items: any[]): any[];
|
|
41
41
|
isArray(arg: any): arg is any[];
|
|
42
42
|
readonly prototype: any[];
|
|
43
43
|
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
@@ -128,13 +128,21 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
128
128
|
type: NumberConstructor;
|
|
129
129
|
default: number;
|
|
130
130
|
};
|
|
131
|
+
selectorIcon: {
|
|
132
|
+
type: StringConstructor;
|
|
133
|
+
default: null;
|
|
134
|
+
};
|
|
135
|
+
tooltipIcon: {
|
|
136
|
+
type: StringConstructor;
|
|
137
|
+
default: null;
|
|
138
|
+
};
|
|
131
139
|
}>, {
|
|
132
140
|
getNestedLength: import("vue").ComputedRef<number>;
|
|
133
141
|
del_all: () => void;
|
|
134
142
|
del_all_cat: (index: number) => void;
|
|
135
143
|
add_all_cat: (index: number) => void;
|
|
136
144
|
add_all: () => void;
|
|
137
|
-
del_nested_element: (index: number, elem: string) => void;
|
|
145
|
+
del_nested_element: (index: number, elem: string, optIndex: number) => void;
|
|
138
146
|
add_nested_element: (index: number, elem: any) => void;
|
|
139
147
|
del_element: (element: string, index: number) => void;
|
|
140
148
|
add_element: (element: string, index: number) => void;
|
|
@@ -200,10 +208,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
200
208
|
};
|
|
201
209
|
default_select: {
|
|
202
210
|
type: {
|
|
203
|
-
(arrayLength: number):
|
|
204
|
-
(...items:
|
|
205
|
-
new (arrayLength: number):
|
|
206
|
-
new (...items:
|
|
211
|
+
(arrayLength: number): any[];
|
|
212
|
+
(...items: any[]): any[];
|
|
213
|
+
new (arrayLength: number): any[];
|
|
214
|
+
new (...items: any[]): any[];
|
|
207
215
|
isArray(arg: any): arg is any[];
|
|
208
216
|
readonly prototype: any[];
|
|
209
217
|
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
@@ -294,6 +302,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
294
302
|
type: NumberConstructor;
|
|
295
303
|
default: number;
|
|
296
304
|
};
|
|
305
|
+
selectorIcon: {
|
|
306
|
+
type: StringConstructor;
|
|
307
|
+
default: null;
|
|
308
|
+
};
|
|
309
|
+
tooltipIcon: {
|
|
310
|
+
type: StringConstructor;
|
|
311
|
+
default: null;
|
|
312
|
+
};
|
|
297
313
|
}>> & Readonly<{
|
|
298
314
|
onOnClose?: ((...args: any[]) => any) | undefined;
|
|
299
315
|
onChangeElement?: ((...args: any[]) => any) | undefined;
|
|
@@ -315,12 +331,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
315
331
|
labelInfo: boolean;
|
|
316
332
|
fuzzyStart: number;
|
|
317
333
|
filter_placeholder: string;
|
|
318
|
-
default_select:
|
|
334
|
+
default_select: any[];
|
|
319
335
|
nested: boolean;
|
|
320
336
|
show_all: boolean;
|
|
321
337
|
preselection_all: boolean;
|
|
322
338
|
multiple_columns: boolean;
|
|
323
339
|
options_disable: unknown[];
|
|
340
|
+
selectorIcon: string;
|
|
341
|
+
tooltipIcon: string;
|
|
324
342
|
}, {}, {
|
|
325
343
|
argIcon: any;
|
|
326
344
|
argSimpleLabel: any;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="oip_select_wrap">
|
|
3
|
-
<div
|
|
3
|
+
<div
|
|
4
|
+
v-if="!selectorIcon"
|
|
5
|
+
class="oip_select_block"
|
|
6
|
+
:class="disabled ? 'disabled' : ''"
|
|
7
|
+
>
|
|
4
8
|
<span class="oip_select_label" :class="disabled ? 'disabled' : ''">
|
|
5
9
|
<slot></slot>
|
|
6
10
|
</span>
|
|
@@ -15,18 +19,25 @@
|
|
|
15
19
|
thickness="32"
|
|
16
20
|
/>
|
|
17
21
|
</div>
|
|
22
|
+
<div v-else class="oip_select_icon">
|
|
23
|
+
<arg-tooltip v-if="tooltipIcon" :tooltip-text="tooltipIcon" dir="top">
|
|
24
|
+
<arg-icon :name="selectorIcon" />
|
|
25
|
+
</arg-tooltip>
|
|
26
|
+
<arg-icon v-else :name="selectorIcon" color="var(--medium)" size="24" />
|
|
27
|
+
</div>
|
|
18
28
|
</div>
|
|
19
29
|
</template>
|
|
20
30
|
|
|
21
31
|
<script>
|
|
22
32
|
import argIcon from "./argIcon.vue";
|
|
33
|
+
import argTooltip from "./argTooltip.vue";
|
|
23
34
|
import {
|
|
24
35
|
onMounted,
|
|
25
36
|
defineComponent
|
|
26
37
|
} from "vue";
|
|
27
38
|
export default defineComponent({
|
|
28
39
|
name: "argSimpleLabel",
|
|
29
|
-
components: { argIcon },
|
|
40
|
+
components: { argIcon, argTooltip },
|
|
30
41
|
props: {
|
|
31
42
|
disabled: {
|
|
32
43
|
type: Boolean,
|
|
@@ -35,7 +46,9 @@ export default defineComponent({
|
|
|
35
46
|
empty: { type: Boolean, default: false },
|
|
36
47
|
show_amount: { type: Boolean, default: false },
|
|
37
48
|
amount_value: { type: Number, default: null },
|
|
38
|
-
sortIcon: { type: Boolean, default: false }
|
|
49
|
+
sortIcon: { type: Boolean, default: false },
|
|
50
|
+
selectorIcon: { type: String || null, default: null },
|
|
51
|
+
tooltipIcon: { type: String || null, default: null }
|
|
39
52
|
},
|
|
40
53
|
setup() {
|
|
41
54
|
onMounted(() => {
|
|
@@ -52,7 +65,7 @@ const drawSquircle=(ctx,geom,radii,smooth,lineWidth,color)=>{const defaultFill=c
|
|
|
52
65
|
</script>
|
|
53
66
|
|
|
54
67
|
<style>
|
|
55
|
-
.oip_select_dropdown_block{background:var(--demi-fond);border:1.5px solid var(--light);border-radius:12px;box-shadow:var(--overlay-shadow);display:flex;flex-direction:column;margin-top:15px;max-height:500px;min-width:230px;padding:16px;position:absolute;z-index:12}.oip_select_block{align-items:center;background:var(--white);border:1.5px solid var(--light);border-radius:8px;cursor:pointer;display:flex;gap:4px;-webkit-mask-image:paint(squircle);mask-image:paint(squircle);padding:12px;position:relative;width:196px;--squircle-radius:8px;--squircle-smooth:1}.filter_box:hover,.filter_wrap:hover>.filter_box:not(.open),.oip_select_block:hover,.oip_select_dropdown_block:hover,.prmt_parent_switch:hover{border:1.5px solid var(--primary-primary-20,#d3e4ff)!important}.filter_box.open,.oip_select_dropdown_block.open,.oip_select_wrap.open>.oip_select_block,.prmt_parent_switch.open{border:1.5px solid var(--primary)!important;filter:drop-shadow(0 0 4px rgba(33,118,255,.3))!important}.filter_wrap.open,.oip_select_wrap.open,.switch_wrapper.open{filter:drop-shadow(0 0 4px rgba(33,118,255,.3))!important}.oip_select_block.open>svg{color:var(--primary)!important}.oip_select_block.disabled{background:var(--light)!important;cursor:not-allowed}.oip_select_label .prmt_tooltip{display:flex}.oip_select_label .prmt_tooltip span,.oip_select_label>span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:98%}.oip_select_label{color:var(--darkest);font-size:14px;font-weight:700;line-height:16px;max-height:16px;width:90%}.oip_select_block svg{flex-shrink:0!important}.oip_select_label.disabled{color:var(--dark)}.oip_select_caret_down{float:right;margin-left:auto}.oip_select_complex_selection_loop_name{font-style:normal;line-height:160%;width:-moz-fit-content;width:fit-content}.oip_select_complex_selection_loop.del>svg{color:var(--system-alert)!important;flex-shrink:0}.oip_select_complex_selection_loop.add>svg{color:var(--primary)!important;flex-shrink:0}.oip_select_complex_selection_loop{align-self:stretch;cursor:pointer;display:flex;flex-grow:1;gap:8px;min-height:24px}.oip_select_complex_selection_container{margin:8px 0;max-height:350px;overflow-y:auto}.oip_select_complex_selection_loop_name{font-size:14px;font-weight:400;line-height:16px}.oip_search_container>svg{color:var(--medium)!important}.oip_search_name:focus-visible{outline:none}.oip_search_name::-moz-placeholder{color:var(--medium);font-size:12px;font-weight:400;line-height:20px}.oip_search_name::placeholder{color:var(--medium);font-size:12px;font-weight:400;line-height:20px}.oip_search_name{border:none;padding-left:8px;width:100%}.oip_search_container{align-items:center;align-self:stretch;background:var(--white);border:1px solid var(--light);border-radius:8px;display:flex;gap:8px;padding:8px 12px}.oip_select_dropdown_title{color:var(--darkest);font-size:14px;font-weight:500;margin-bottom:8px}.oip_select_dropdown_selection_container{display:flex;flex:1 1 auto;flex-direction:column;gap:0;margin-top:16px;min-height:10px;overflow-y:auto}.oip_select_dropdown_selection_container:only-child{margin-top:0}.oip_empty_dropdown{color:var(--dark);font-size:14px;font-style:italic;font-weight:400;line-height:16px;padding-top:16px;text-align:center}.oip_select_complex_selection_loop>svg.add{fill:var(--accent)!important;color:var(--white)!important}.arg-circle-amount{align-items:center;background:#e9f1ff;border-radius:50%;color:var(--primary);display:flex;flex-direction:column;flex-shrink:0;font-size:14px;font-style:normal;font-weight:600;gap:10px;height:20px;justify-content:center;padding:4px;position:absolute;right:34px;width:20px}.oip_empty_select{color:var(--dark);font-size:14px;font-style:italic;font-weight:400;line-height:normal;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.oip_select_display{align-items:flex-start;display:flex;flex-direction:column;gap:4px}.close-icon{align-items:center;background:var(--light);border-radius:100%;cursor:pointer;display:flex;justify-content:center;margin-left:auto;padding:4px}.close-icon:hover svg{color:var(--primary)!important}
|
|
68
|
+
.oip_select_icon{align-items:center;border:1px solid transparent;border-radius:8px;cursor:pointer;display:flex;justify-content:center;padding:8px;transition:border .15s ease-in}.oip_select_icon:hover,.oip_select_wrap.open .oip_select_icon{border:1px solid var(--light)!important}.oip_select_wrap.open .oip_select_icon{border:1px solid var(--primary)!important;filter:drop-shadow(0 0 4px rgba(33,118,255,.3))!important}.oip_select_wrap:not(.open) .oip_select_icon:hover svg{color:var(--primary)!important}.oip_select_dropdown_block{background:var(--demi-fond);border:1.5px solid var(--light);border-radius:12px;box-shadow:var(--overlay-shadow);display:flex;flex-direction:column;margin-top:15px;max-height:500px;min-width:230px;padding:16px;position:absolute;z-index:12}.oip_select_block{align-items:center;background:var(--white);border:1.5px solid var(--light);border-radius:8px;cursor:pointer;display:flex;gap:4px;-webkit-mask-image:paint(squircle);mask-image:paint(squircle);padding:12px;position:relative;width:196px;--squircle-radius:8px;--squircle-smooth:1}.filter_box:hover,.filter_wrap:hover>.filter_box:not(.open),.oip_select_block:hover,.oip_select_dropdown_block:hover,.prmt_parent_switch:hover{border:1.5px solid var(--primary-primary-20,#d3e4ff)!important}.filter_box.open,.oip_select_dropdown_block.open,.oip_select_wrap.open>.oip_select_block,.prmt_parent_switch.open{border:1.5px solid var(--primary)!important;filter:drop-shadow(0 0 4px rgba(33,118,255,.3))!important}.filter_wrap.open,.oip_select_wrap.open,.switch_wrapper.open{filter:drop-shadow(0 0 4px rgba(33,118,255,.3))!important}.oip_select_block.open>svg{color:var(--primary)!important}.oip_select_block.disabled{background:var(--light)!important;cursor:not-allowed}.oip_select_label .prmt_tooltip{display:flex}.oip_select_label .prmt_tooltip span,.oip_select_label>span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:98%}.oip_select_label{color:var(--darkest);font-size:14px;font-weight:700;line-height:16px;max-height:16px;width:90%}.oip_select_block svg{flex-shrink:0!important}.oip_select_label.disabled{color:var(--dark)}.oip_select_caret_down{float:right;margin-left:auto}.oip_select_complex_selection_loop_name{font-style:normal;line-height:160%;width:-moz-fit-content;width:fit-content}.oip_select_complex_selection_loop.del>svg{color:var(--system-alert)!important;flex-shrink:0}.oip_select_complex_selection_loop.add>svg{color:var(--primary)!important;flex-shrink:0}.oip_select_complex_selection_loop{align-self:stretch;cursor:pointer;display:flex;flex-grow:1;gap:8px;min-height:24px}.oip_select_complex_selection_container{margin:8px 0;max-height:350px;overflow-y:auto}.oip_select_complex_selection_loop_name{font-size:14px;font-weight:400;line-height:16px}.oip_search_container>svg{color:var(--medium)!important}.oip_search_name:focus-visible{outline:none}.oip_search_name::-moz-placeholder{color:var(--medium);font-size:12px;font-weight:400;line-height:20px}.oip_search_name::placeholder{color:var(--medium);font-size:12px;font-weight:400;line-height:20px}.oip_search_name{border:none;padding-left:8px;width:100%}.oip_search_container{align-items:center;align-self:stretch;background:var(--white);border:1px solid var(--light);border-radius:8px;display:flex;gap:8px;padding:8px 12px}.oip_select_dropdown_title{color:var(--darkest);font-size:14px;font-weight:500;margin-bottom:8px}.oip_select_dropdown_selection_container{display:flex;flex:1 1 auto;flex-direction:column;gap:0;margin-top:16px;min-height:10px;overflow-y:auto}.oip_select_dropdown_selection_container:only-child{margin-top:0}.oip_empty_dropdown{color:var(--dark);font-size:14px;font-style:italic;font-weight:400;line-height:16px;padding-top:16px;text-align:center}.oip_select_complex_selection_loop>svg.add{fill:var(--accent)!important;color:var(--white)!important}.arg-circle-amount{align-items:center;background:#e9f1ff;border-radius:50%;color:var(--primary);display:flex;flex-direction:column;flex-shrink:0;font-size:14px;font-style:normal;font-weight:600;gap:10px;height:20px;justify-content:center;padding:4px;position:absolute;right:34px;width:20px}.oip_empty_select{color:var(--dark);font-size:14px;font-style:italic;font-weight:400;line-height:normal;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.oip_select_display{align-items:flex-start;display:flex;flex-direction:column;gap:4px}.close-icon{align-items:center;background:var(--light);border-radius:100%;cursor:pointer;display:flex;justify-content:center;margin-left:auto;padding:4px}.close-icon:hover svg{color:var(--primary)!important}
|
|
56
69
|
</style>
|
|
57
70
|
<style scoped>
|
|
58
71
|
.oip_select_complex_selection_loop > svg.add {
|
|
@@ -19,6 +19,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
19
19
|
type: BooleanConstructor;
|
|
20
20
|
default: boolean;
|
|
21
21
|
};
|
|
22
|
+
selectorIcon: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
default: null;
|
|
25
|
+
};
|
|
26
|
+
tooltipIcon: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
default: null;
|
|
29
|
+
};
|
|
22
30
|
}>, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
31
|
disabled: {
|
|
24
32
|
type: BooleanConstructor;
|
|
@@ -40,13 +48,24 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
40
48
|
type: BooleanConstructor;
|
|
41
49
|
default: boolean;
|
|
42
50
|
};
|
|
51
|
+
selectorIcon: {
|
|
52
|
+
type: StringConstructor;
|
|
53
|
+
default: null;
|
|
54
|
+
};
|
|
55
|
+
tooltipIcon: {
|
|
56
|
+
type: StringConstructor;
|
|
57
|
+
default: null;
|
|
58
|
+
};
|
|
43
59
|
}>> & Readonly<{}>, {
|
|
44
60
|
disabled: boolean;
|
|
45
61
|
show_amount: boolean;
|
|
62
|
+
selectorIcon: string;
|
|
63
|
+
tooltipIcon: string;
|
|
46
64
|
empty: boolean;
|
|
47
65
|
amount_value: number;
|
|
48
66
|
sortIcon: boolean;
|
|
49
67
|
}, {}, {
|
|
50
68
|
argIcon: any;
|
|
69
|
+
argTooltip: any;
|
|
51
70
|
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
52
71
|
export default _default;
|