@tekkare/auriga 0.1.184 → 0.1.186
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/argAdvancedSearchBar.vue +1 -0
- package/dist/runtime/components/argComplexSelect.vue +19 -7
- package/dist/runtime/components/argComplexSelect.vue.d.ts +18 -0
- package/dist/runtime/components/argDropdownSelect.vue.d.ts +2 -2
- package/dist/runtime/components/argMultipleSelect.vue +24 -4
- package/dist/runtime/components/argMultipleSelect.vue.d.ts +18 -0
- package/dist/runtime/components/argTipsBox.vue +5 -1
- package/dist/runtime/components/argTipsBox.vue.d.ts +9 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
class="oip_select_complex_selection_container"
|
|
139
139
|
>
|
|
140
140
|
<div
|
|
141
|
-
class="oip_select_complex_selection_loop add"
|
|
141
|
+
class="oip_select_complex_selection_loop add break"
|
|
142
142
|
v-for="(element, index) of filterNameAdd"
|
|
143
143
|
:key="index"
|
|
144
144
|
@mouseover="hoverAdd = index"
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
<!-- List -->
|
|
222
222
|
<div class="oip_select_complex_selection_container">
|
|
223
223
|
<div
|
|
224
|
-
class="oip_select_complex_selection_loop del"
|
|
224
|
+
class="oip_select_complex_selection_loop del break"
|
|
225
225
|
v-for="(element, index) of filterNameDel"
|
|
226
226
|
:key="index"
|
|
227
227
|
@mouseover="hoverRemove = index"
|
|
@@ -253,6 +253,7 @@
|
|
|
253
253
|
</div>
|
|
254
254
|
</template>
|
|
255
255
|
<script>
|
|
256
|
+
import { useFuse } from "@vueuse/integrations/useFuse";
|
|
256
257
|
import argSimpleLabel from "./argSimpleLabel.vue";
|
|
257
258
|
import argBtn from "./argBtn.vue";
|
|
258
259
|
import argIcon from "./argIcon.vue";
|
|
@@ -304,7 +305,9 @@ export default defineComponent({
|
|
|
304
305
|
}
|
|
305
306
|
},
|
|
306
307
|
loader_text: { type: Array, default: null },
|
|
307
|
-
empty_content_msg: { type: String, default: null }
|
|
308
|
+
empty_content_msg: { type: String, default: null },
|
|
309
|
+
fuzzySearch: { type: Boolean, default: false },
|
|
310
|
+
fuzzyThreshold: { type: Number, default: 0.5 }
|
|
308
311
|
},
|
|
309
312
|
emits: ["changeElement", "changeAddInputValue", "update:Selection"],
|
|
310
313
|
setup(props, { emit }) {
|
|
@@ -430,13 +433,22 @@ export default defineComponent({
|
|
|
430
433
|
});
|
|
431
434
|
function checkIfContainsValue(element, searchArray) {
|
|
432
435
|
let hasValue = false;
|
|
433
|
-
|
|
436
|
+
searchArray = searchArray.filter((a) => a.length > 0);
|
|
437
|
+
if (searchArray.every(
|
|
438
|
+
(l) => props.fuzzySearch ? useFuse(l, add_table.value, options.value).results.value.map((a) => a.item).includes(element) : element.includes(l)
|
|
439
|
+
)) {
|
|
434
440
|
hasValue = true;
|
|
435
441
|
}
|
|
436
442
|
return hasValue;
|
|
437
443
|
}
|
|
444
|
+
const options = computed(() => ({
|
|
445
|
+
fuseOptions: {
|
|
446
|
+
includeScore: true,
|
|
447
|
+
threshold: props.fuzzyThreshold
|
|
448
|
+
}
|
|
449
|
+
}));
|
|
438
450
|
const filterNameAdd = computed(() => {
|
|
439
|
-
if (searchNameAdd.value !== null) {
|
|
451
|
+
if (searchNameAdd.value !== null && searchNameAdd.value.length > 0) {
|
|
440
452
|
if (searchNameAdd.value.includes(" ")) {
|
|
441
453
|
return add_table.value.filter(
|
|
442
454
|
(element) => checkIfContainsValue(
|
|
@@ -446,7 +458,7 @@ export default defineComponent({
|
|
|
446
458
|
).slice(0, props.max_result);
|
|
447
459
|
} else
|
|
448
460
|
return add_table.value.filter(
|
|
449
|
-
(element) => element.toLowerCase().includes(searchNameAdd.value.toLowerCase())
|
|
461
|
+
(element) => props.fuzzySearch ? useFuse(searchNameAdd.value, add_table.value, options.value).results.value.map((a) => a.item).includes(element) : element.toLowerCase().includes(searchNameAdd.value.toLowerCase())
|
|
450
462
|
).slice(0, props.max_result);
|
|
451
463
|
} else
|
|
452
464
|
return add_table.value.slice(0, props.max_result);
|
|
@@ -642,7 +654,7 @@ export default defineComponent({
|
|
|
642
654
|
</script>
|
|
643
655
|
|
|
644
656
|
<style scoped>
|
|
645
|
-
.oip_select_complex_del_selection{flex:1;padding:16px}.oip_select_complex_add_selection{border-right:1px solid var(--light);flex:1;padding:16px
|
|
657
|
+
.oip_select_complex_del_selection{flex:1;padding:16px}.oip_select_complex_add_selection{border-right:1px solid var(--light);flex:1;max-width:50%;padding:16px}.oip_select_complex_all_tittle_right,.oip_select_complex_all_tittle_right.add{font-size:12px;font-weight:500;line-height:22px;vertical-align:bottom}.oip_select_complex_all_tittle_right.add{color:var(--primary);cursor:pointer}.oip_select_complex_selection_loop.add svg.disable{color:var(--dark)!important}.oip_select_complex_selection_loop.break{word-break:break-word}.oip_select_complex_all_tittle_right.del{color:var(--system-alert);cursor:pointer;font-size:12px;font-weight:500;line-height:22px;vertical-align:bottom}.oip_select_complex_all_title{display:flex;gap:12px;margin-bottom:8px}.oip_select_complex_all_tittle_left{border-right:1px solid var(--light);color:var(--darkest);font-size:14px;font-weight:500;line-height:22px;padding-right:12px}.oip_select_complex_all_selection{display:flex}.oip_select_complex_footer{background-color:var(--white);border-radius:0 0 12px 12px;border-top:1px solid var(--light);display:flex;gap:16px;justify-content:flex-end;padding:28px 36px}.oip_select_complex_smart_title{font-size:14px;font-weight:500;line-height:22px;margin-bottom:12px}.oip_select_complex_smart_selection{display:flex;flex-wrap:wrap;gap:10px}.oip_select_complex_smart_selection>.oip_tag{cursor:pointer}.oip_select_complex_smart{margin-bottom:0;padding:16px}.oip_select_complex_block{background:var(--demi-fond);border:1px solid var(--light);border-radius:12px;box-shadow:var(--overlay-shadow);margin-top:15px;position:absolute;width:780px;z-index:12}.oip_select_complex_header{background-color:var(--white);border-bottom:1px solid var(--light);border-radius:12px 12px 0 0;padding:16px}.oip_select_complex_header_title{font-size:16px;font-weight:700;line-height:19px}.oip_select_complex_selection_loop>svg.add{fill:var(--accent)!important;color:var(--white)!important}.oip_tag.is_disable{cursor:pointer!important}
|
|
646
658
|
</style>
|
|
647
659
|
|
|
648
660
|
<style scoped>
|
|
@@ -120,6 +120,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
120
120
|
type: StringConstructor;
|
|
121
121
|
default: null;
|
|
122
122
|
};
|
|
123
|
+
fuzzySearch: {
|
|
124
|
+
type: BooleanConstructor;
|
|
125
|
+
default: boolean;
|
|
126
|
+
};
|
|
127
|
+
fuzzyThreshold: {
|
|
128
|
+
type: NumberConstructor;
|
|
129
|
+
default: number;
|
|
130
|
+
};
|
|
123
131
|
}, {
|
|
124
132
|
add_table: import("vue").Ref<any>;
|
|
125
133
|
del_table: import("vue").Ref<any>;
|
|
@@ -276,6 +284,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
276
284
|
type: StringConstructor;
|
|
277
285
|
default: null;
|
|
278
286
|
};
|
|
287
|
+
fuzzySearch: {
|
|
288
|
+
type: BooleanConstructor;
|
|
289
|
+
default: boolean;
|
|
290
|
+
};
|
|
291
|
+
fuzzyThreshold: {
|
|
292
|
+
type: NumberConstructor;
|
|
293
|
+
default: number;
|
|
294
|
+
};
|
|
279
295
|
}>> & {
|
|
280
296
|
onChangeElement?: ((...args: any[]) => any) | undefined;
|
|
281
297
|
onChangeAddInputValue?: ((...args: any[]) => any) | undefined;
|
|
@@ -298,5 +314,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
298
314
|
empty_msg: string;
|
|
299
315
|
loader_text: string[];
|
|
300
316
|
empty_content_msg: string;
|
|
317
|
+
fuzzySearch: boolean;
|
|
318
|
+
fuzzyThreshold: number;
|
|
301
319
|
}, {}>;
|
|
302
320
|
export default _default;
|
|
@@ -240,6 +240,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
240
240
|
empty_msg: string;
|
|
241
241
|
loader_text: string[];
|
|
242
242
|
empty_content_msg: string;
|
|
243
|
+
fuzzySearch: boolean;
|
|
244
|
+
fuzzyThreshold: number;
|
|
243
245
|
search: boolean;
|
|
244
246
|
filter_placeholder: string;
|
|
245
247
|
close_on_click: boolean;
|
|
@@ -247,7 +249,5 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
247
249
|
watch_default_change: boolean;
|
|
248
250
|
values_disabled: unknown[];
|
|
249
251
|
is_sort: boolean;
|
|
250
|
-
fuzzySearch: boolean;
|
|
251
|
-
fuzzyThreshold: number;
|
|
252
252
|
}, {}>;
|
|
253
253
|
export default _default;
|
|
@@ -302,6 +302,7 @@
|
|
|
302
302
|
</div>
|
|
303
303
|
</template>
|
|
304
304
|
<script>
|
|
305
|
+
import { useFuse } from "@vueuse/integrations/useFuse";
|
|
305
306
|
import {
|
|
306
307
|
onMounted,
|
|
307
308
|
ref,
|
|
@@ -339,7 +340,9 @@ export default defineComponent({
|
|
|
339
340
|
}
|
|
340
341
|
},
|
|
341
342
|
loader_text: { type: Array, default: null },
|
|
342
|
-
empty_content_msg: { type: String, default: null }
|
|
343
|
+
empty_content_msg: { type: String, default: null },
|
|
344
|
+
fuzzySearch: { type: Boolean, default: false },
|
|
345
|
+
fuzzyThreshold: { type: Number, default: 0.5 }
|
|
343
346
|
},
|
|
344
347
|
emits: ["changeElement", "update:Selection", "changeInputValue", "onClose"],
|
|
345
348
|
setup(props, { emit }) {
|
|
@@ -454,9 +457,18 @@ export default defineComponent({
|
|
|
454
457
|
return element_table_copy.value;
|
|
455
458
|
}
|
|
456
459
|
});
|
|
460
|
+
const options = computed(() => ({
|
|
461
|
+
fuseOptions: {
|
|
462
|
+
includeScore: true,
|
|
463
|
+
threshold: props.fuzzyThreshold
|
|
464
|
+
}
|
|
465
|
+
}));
|
|
457
466
|
function checkIfContainsValue(element, searchArray) {
|
|
458
467
|
let hasValue = false;
|
|
459
|
-
|
|
468
|
+
searchArray = searchArray.filter((a) => a.length > 0);
|
|
469
|
+
if (searchArray.every(
|
|
470
|
+
(l) => props.fuzzySearch ? useFuse(l, element_table_copy.value, options.value).results.value.map((a) => a.item).includes(element) : element.includes(l)
|
|
471
|
+
)) {
|
|
460
472
|
hasValue = true;
|
|
461
473
|
}
|
|
462
474
|
return hasValue;
|
|
@@ -473,7 +485,11 @@ export default defineComponent({
|
|
|
473
485
|
);
|
|
474
486
|
} else
|
|
475
487
|
return element_table_copy.value.filter(
|
|
476
|
-
(element) =>
|
|
488
|
+
(element) => props.fuzzySearch ? useFuse(
|
|
489
|
+
searchName.value,
|
|
490
|
+
element_table_copy.value,
|
|
491
|
+
options.value
|
|
492
|
+
).results.value.map((a) => a.item).includes(element) : element.toLowerCase().includes(searchName.value.toLowerCase())
|
|
477
493
|
);
|
|
478
494
|
} else
|
|
479
495
|
return element_table_copy.value;
|
|
@@ -484,7 +500,11 @@ export default defineComponent({
|
|
|
484
500
|
selectTable = [
|
|
485
501
|
...new Set(
|
|
486
502
|
element_table_copy.value.filter(
|
|
487
|
-
(element) =>
|
|
503
|
+
(element) => props.fuzzySearch ? useFuse(
|
|
504
|
+
searchName.value,
|
|
505
|
+
element_table_copy.value,
|
|
506
|
+
options.value
|
|
507
|
+
).results.value.map((a) => a.item).includes(element) : element.toLowerCase().includes(searchName.value.toLowerCase())
|
|
488
508
|
)
|
|
489
509
|
)
|
|
490
510
|
];
|
|
@@ -108,6 +108,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
108
108
|
type: StringConstructor;
|
|
109
109
|
default: null;
|
|
110
110
|
};
|
|
111
|
+
fuzzySearch: {
|
|
112
|
+
type: BooleanConstructor;
|
|
113
|
+
default: boolean;
|
|
114
|
+
};
|
|
115
|
+
fuzzyThreshold: {
|
|
116
|
+
type: NumberConstructor;
|
|
117
|
+
default: number;
|
|
118
|
+
};
|
|
111
119
|
}, {
|
|
112
120
|
getNestedLength: import("vue").ComputedRef<number>;
|
|
113
121
|
del_all: () => void;
|
|
@@ -252,6 +260,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
252
260
|
type: StringConstructor;
|
|
253
261
|
default: null;
|
|
254
262
|
};
|
|
263
|
+
fuzzySearch: {
|
|
264
|
+
type: BooleanConstructor;
|
|
265
|
+
default: boolean;
|
|
266
|
+
};
|
|
267
|
+
fuzzyThreshold: {
|
|
268
|
+
type: NumberConstructor;
|
|
269
|
+
default: number;
|
|
270
|
+
};
|
|
255
271
|
}>> & {
|
|
256
272
|
onOnClose?: ((...args: any[]) => any) | undefined;
|
|
257
273
|
onChangeElement?: ((...args: any[]) => any) | undefined;
|
|
@@ -265,6 +281,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
265
281
|
empty_msg: string;
|
|
266
282
|
loader_text: string[];
|
|
267
283
|
empty_content_msg: string;
|
|
284
|
+
fuzzySearch: boolean;
|
|
285
|
+
fuzzyThreshold: number;
|
|
268
286
|
search: boolean;
|
|
269
287
|
filter_placeholder: string;
|
|
270
288
|
default_select: String[];
|
|
@@ -70,11 +70,15 @@ export default defineComponent({
|
|
|
70
70
|
validator: (value) => {
|
|
71
71
|
return ["en", "fr", "es"].includes(value);
|
|
72
72
|
}
|
|
73
|
+
},
|
|
74
|
+
defaultOpen: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: false
|
|
73
77
|
}
|
|
74
78
|
},
|
|
75
79
|
setup(props, { emit }) {
|
|
76
80
|
const displayTip = ref(true);
|
|
77
|
-
const showMore = ref(
|
|
81
|
+
const showMore = ref(props.defaultOpen);
|
|
78
82
|
return {
|
|
79
83
|
displayTip,
|
|
80
84
|
showMore
|
|
@@ -12,6 +12,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
12
12
|
default: string;
|
|
13
13
|
validator: (value: unknown) => boolean;
|
|
14
14
|
};
|
|
15
|
+
defaultOpen: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
default: boolean;
|
|
18
|
+
};
|
|
15
19
|
}, {
|
|
16
20
|
displayTip: import("vue").Ref<boolean>;
|
|
17
21
|
showMore: import("vue").Ref<boolean>;
|
|
@@ -29,7 +33,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
29
33
|
default: string;
|
|
30
34
|
validator: (value: unknown) => boolean;
|
|
31
35
|
};
|
|
36
|
+
defaultOpen: {
|
|
37
|
+
type: BooleanConstructor;
|
|
38
|
+
default: boolean;
|
|
39
|
+
};
|
|
32
40
|
}>>, {
|
|
41
|
+
defaultOpen: boolean;
|
|
33
42
|
haveClose: boolean;
|
|
34
43
|
haveMore: boolean;
|
|
35
44
|
tipsLang: string;
|