@tekkare/auriga 0.1.24 → 0.1.25
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/argComplexSelect.vue +96 -17
- package/dist/runtime/components/argComplexSelect.vue.d.ts +79 -9
- package/dist/runtime/components/argDate.vue +4 -1
- package/dist/runtime/components/argDate.vue.d.ts +2 -0
- package/dist/runtime/components/argDropdownSelect.vue +52 -8
- package/dist/runtime/components/argDropdownSelect.vue.d.ts +63 -6
- package/dist/runtime/components/argMultipleSelect.vue +227 -189
- package/dist/runtime/components/argMultipleSelect.vue.d.ts +67 -7
- package/dist/runtime/components/argSimpleLabel.vue +14 -0
- package/dist/runtime/components/argStyle.vue +20 -53
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
]"
|
|
19
19
|
>
|
|
20
20
|
{{
|
|
21
|
-
del_table.map((elem) => elem).length > 0
|
|
21
|
+
del_table.map((elem) => elem).length > 0
|
|
22
|
+
? getAllSelect
|
|
23
|
+
: getEmptyMsg
|
|
22
24
|
}}
|
|
23
25
|
</span>
|
|
24
26
|
</arg-simple-label>
|
|
@@ -33,7 +35,13 @@
|
|
|
33
35
|
<div class="oip_select_complex_header">
|
|
34
36
|
<h1 class="oip_select_complex_header_title">
|
|
35
37
|
{{
|
|
36
|
-
!!select_placeholder
|
|
38
|
+
!!select_placeholder
|
|
39
|
+
? `${select_placeholder} ${
|
|
40
|
+
lang === "fr" ? "sélection" : "select"
|
|
41
|
+
}`
|
|
42
|
+
: lang === "fr"
|
|
43
|
+
? "Sélection"
|
|
44
|
+
: "Select"
|
|
37
45
|
}}
|
|
38
46
|
</h1>
|
|
39
47
|
</div>
|
|
@@ -61,30 +69,36 @@
|
|
|
61
69
|
</div>
|
|
62
70
|
</div>
|
|
63
71
|
</div>
|
|
64
|
-
<p v-if="reachMax" class="warning_text">{{
|
|
72
|
+
<p v-if="reachMax" class="warning_text">{{ getMaxSelectMsg }}</p>
|
|
65
73
|
<div class="oip_select_complex_all_selection">
|
|
66
74
|
<div class="oip_select_complex_add_selection">
|
|
67
75
|
<div class="oip_select_complex_all_title">
|
|
68
|
-
<div class="oip_select_complex_all_tittle_left">
|
|
76
|
+
<div class="oip_select_complex_all_tittle_left">
|
|
77
|
+
{{ lang === "fr" ? "Disponible" : "Available" }}
|
|
78
|
+
</div>
|
|
69
79
|
<div
|
|
70
80
|
v-if="show_select_all"
|
|
71
81
|
class="oip_select_complex_all_tittle_right add"
|
|
72
82
|
@click="add_all_element"
|
|
73
83
|
>
|
|
74
|
-
Select all
|
|
84
|
+
{{ lang === "fr" ? "Tout sélectionner" : "Select all" }}
|
|
75
85
|
</div>
|
|
76
86
|
<div
|
|
77
87
|
v-if="max_amount !== null"
|
|
78
88
|
class="oip_select_complex_all_tittle_right"
|
|
79
89
|
>
|
|
80
|
-
|
|
90
|
+
{{
|
|
91
|
+
lng === "fr"
|
|
92
|
+
? `Maximum: ${max_amount} éléments`
|
|
93
|
+
: `Maximum: ${max_amount} items`
|
|
94
|
+
}}
|
|
81
95
|
</div>
|
|
82
96
|
</div>
|
|
83
97
|
<div class="oip_search_container">
|
|
84
98
|
<arg-icon size="20" name="MagnifyingGlass"></arg-icon>
|
|
85
99
|
<input
|
|
86
100
|
class="oip_search_name"
|
|
87
|
-
:placeholder="
|
|
101
|
+
:placeholder="getPlaceholderAdd"
|
|
88
102
|
v-model="searchNameAdd"
|
|
89
103
|
@input="changeInput"
|
|
90
104
|
/>
|
|
@@ -130,25 +144,36 @@
|
|
|
130
144
|
</div>
|
|
131
145
|
</div>
|
|
132
146
|
</div>
|
|
147
|
+
<div
|
|
148
|
+
class="oip_empty_dropdown"
|
|
149
|
+
v-else-if="filterNameAdd.length === 0"
|
|
150
|
+
>
|
|
151
|
+
<p>{{ getEmptyContentMsg }}</p>
|
|
152
|
+
</div>
|
|
133
153
|
<div v-else class="oip_select_complex_selection_container">
|
|
134
|
-
<arg-data-loader
|
|
154
|
+
<arg-data-loader
|
|
155
|
+
:text="getLoaderText[0]"
|
|
156
|
+
:sub-text="getLoaderText[1]"
|
|
157
|
+
/>
|
|
135
158
|
</div>
|
|
136
159
|
</div>
|
|
137
160
|
<div class="oip_select_complex_del_selection">
|
|
138
161
|
<div class="oip_select_complex_all_title">
|
|
139
|
-
<div class="oip_select_complex_all_tittle_left">
|
|
162
|
+
<div class="oip_select_complex_all_tittle_left">
|
|
163
|
+
{{ lang === "fr" ? "Sélectionné" : "Selected" }}
|
|
164
|
+
</div>
|
|
140
165
|
<div
|
|
141
166
|
class="oip_select_complex_all_tittle_right del"
|
|
142
167
|
@click="del_all_element"
|
|
143
168
|
>
|
|
144
|
-
Clear all
|
|
169
|
+
{{ lang === "fr" ? "Tout effacer" : "Clear all" }}
|
|
145
170
|
</div>
|
|
146
171
|
</div>
|
|
147
172
|
<div class="oip_search_container">
|
|
148
173
|
<arg-icon size="20" name="MagnifyingGlass"></arg-icon>
|
|
149
174
|
<input
|
|
150
175
|
class="oip_search_name"
|
|
151
|
-
:placeholder="
|
|
176
|
+
:placeholder="getPlaceholderDel"
|
|
152
177
|
v-model="searchNameDel"
|
|
153
178
|
/>
|
|
154
179
|
<arg-icon
|
|
@@ -185,7 +210,9 @@
|
|
|
185
210
|
<arg-btn @click="cancel_function()" btnStyle="secondary"
|
|
186
211
|
>Cancel</arg-btn
|
|
187
212
|
>
|
|
188
|
-
<arg-btn @click="apply_function()" btnStyle="primary">
|
|
213
|
+
<arg-btn @click="apply_function()" btnStyle="primary">{{
|
|
214
|
+
lang === "fr" ? "Apply" : "Appliquer"
|
|
215
|
+
}}</arg-btn>
|
|
189
216
|
</div>
|
|
190
217
|
</div>
|
|
191
218
|
</div>
|
|
@@ -208,7 +235,8 @@ export default defineComponent({
|
|
|
208
235
|
components: { argSimpleLabel, argBtn, argIcon, argDataLoader },
|
|
209
236
|
props: {
|
|
210
237
|
element_table: { type: Array, required: true },
|
|
211
|
-
|
|
238
|
+
search_placeholder_add: { type: String, default: null },
|
|
239
|
+
search_placeholder_del: { type: String, default: null },
|
|
212
240
|
need_apply: { type: Boolean, default: false },
|
|
213
241
|
select_placeholder: { type: String, required: false },
|
|
214
242
|
smart_selection_table: {
|
|
@@ -228,11 +256,20 @@ export default defineComponent({
|
|
|
228
256
|
max_amount: { type: Number, default: null },
|
|
229
257
|
reach_max_msg: {
|
|
230
258
|
type: String,
|
|
231
|
-
default:
|
|
259
|
+
default: null
|
|
232
260
|
},
|
|
233
261
|
loading: { type: Boolean, default: false },
|
|
234
|
-
empty_msg: { type: String, default:
|
|
235
|
-
complex_label: { type: String, required: true }
|
|
262
|
+
empty_msg: { type: String, default: null },
|
|
263
|
+
complex_label: { type: String, required: true },
|
|
264
|
+
lang: {
|
|
265
|
+
type: String,
|
|
266
|
+
default: "en",
|
|
267
|
+
validator: (value) => {
|
|
268
|
+
return ["en", "fr"].includes(value);
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
loader_text: { type: Array, default: null },
|
|
272
|
+
empty_content_msg: { type: String, default: null }
|
|
236
273
|
},
|
|
237
274
|
emits: ["changeElement", "changeAddInputValue", "update:Selection"],
|
|
238
275
|
setup(props, { emit }) {
|
|
@@ -307,6 +344,42 @@ export default defineComponent({
|
|
|
307
344
|
);
|
|
308
345
|
}
|
|
309
346
|
);
|
|
347
|
+
const getEmptyMsg = computed(() => {
|
|
348
|
+
if (props.empty_msg === null) {
|
|
349
|
+
return props.lang === "fr" ? "Aucune S\xE9lection" : "No Selection";
|
|
350
|
+
} else
|
|
351
|
+
return props.empty_msg;
|
|
352
|
+
});
|
|
353
|
+
const getLoaderText = computed(() => {
|
|
354
|
+
if (props.loader_text === null) {
|
|
355
|
+
return props.lang === "fr" ? ["Chargement...", "Veuillez patienter"] : ["Loading...", "Please wait"];
|
|
356
|
+
} else
|
|
357
|
+
return props.loader_text;
|
|
358
|
+
});
|
|
359
|
+
const getPlaceholderAdd = computed(() => {
|
|
360
|
+
if (props.search_placeholder_add === null) {
|
|
361
|
+
return props.lang === "fr" ? "Rechercher une option..." : "Search options...";
|
|
362
|
+
} else
|
|
363
|
+
return props.search_placeholder_add;
|
|
364
|
+
});
|
|
365
|
+
const getPlaceholderDel = computed(() => {
|
|
366
|
+
if (props.search_placeholder_del === null) {
|
|
367
|
+
return props.lang === "fr" ? "Rechercher parmis les options selection\xE9es..." : "Search selected options...";
|
|
368
|
+
} else
|
|
369
|
+
return props.search_placeholder_del;
|
|
370
|
+
});
|
|
371
|
+
const getMaxSelectMsg = computed(() => {
|
|
372
|
+
if (props.reach_max_msg === null) {
|
|
373
|
+
return props.lang === "fr" ? "Vous avez atteint le maximum d'\xE9l\xE9ments que vous pouvez s\xE9lectionner'" : "You've reached the maximum amount of items you can select";
|
|
374
|
+
} else
|
|
375
|
+
return props.reach_max_msg;
|
|
376
|
+
});
|
|
377
|
+
const getEmptyContentMsg = computed(() => {
|
|
378
|
+
if (props.empty_content_msg === null) {
|
|
379
|
+
return props.lang === "fr" ? "Aucun contenu n'a \xE9t\xE9 trouv\xE9" : "No content was found";
|
|
380
|
+
} else
|
|
381
|
+
return props.empty_content_msg;
|
|
382
|
+
});
|
|
310
383
|
const getAllSelect = computed(() => {
|
|
311
384
|
const fullSelect = del_table.value.map((elem) => elem);
|
|
312
385
|
let filterFill = ``;
|
|
@@ -500,7 +573,13 @@ export default defineComponent({
|
|
|
500
573
|
cancel_function,
|
|
501
574
|
change_save_table,
|
|
502
575
|
getAllSelect,
|
|
503
|
-
reachMax
|
|
576
|
+
reachMax,
|
|
577
|
+
getEmptyMsg,
|
|
578
|
+
getLoaderText,
|
|
579
|
+
getPlaceholderAdd,
|
|
580
|
+
getPlaceholderDel,
|
|
581
|
+
getMaxSelectMsg,
|
|
582
|
+
getEmptyContentMsg
|
|
504
583
|
};
|
|
505
584
|
}
|
|
506
585
|
});
|
|
@@ -16,9 +16,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
16
16
|
};
|
|
17
17
|
required: true;
|
|
18
18
|
};
|
|
19
|
-
|
|
19
|
+
search_placeholder_add: {
|
|
20
20
|
type: StringConstructor;
|
|
21
|
-
default:
|
|
21
|
+
default: null;
|
|
22
|
+
};
|
|
23
|
+
search_placeholder_del: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
default: null;
|
|
22
26
|
};
|
|
23
27
|
need_apply: {
|
|
24
28
|
type: BooleanConstructor;
|
|
@@ -76,7 +80,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
76
80
|
};
|
|
77
81
|
reach_max_msg: {
|
|
78
82
|
type: StringConstructor;
|
|
79
|
-
default:
|
|
83
|
+
default: null;
|
|
80
84
|
};
|
|
81
85
|
loading: {
|
|
82
86
|
type: BooleanConstructor;
|
|
@@ -84,12 +88,38 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
84
88
|
};
|
|
85
89
|
empty_msg: {
|
|
86
90
|
type: StringConstructor;
|
|
87
|
-
default:
|
|
91
|
+
default: null;
|
|
88
92
|
};
|
|
89
93
|
complex_label: {
|
|
90
94
|
type: StringConstructor;
|
|
91
95
|
required: true;
|
|
92
96
|
};
|
|
97
|
+
lang: {
|
|
98
|
+
type: StringConstructor;
|
|
99
|
+
default: string;
|
|
100
|
+
validator: (value: string) => boolean;
|
|
101
|
+
};
|
|
102
|
+
loader_text: {
|
|
103
|
+
type: {
|
|
104
|
+
(arrayLength: number): string[];
|
|
105
|
+
(...items: string[]): string[];
|
|
106
|
+
new (arrayLength: number): string[];
|
|
107
|
+
new (...items: string[]): string[];
|
|
108
|
+
isArray(arg: any): arg is any[];
|
|
109
|
+
readonly prototype: any[];
|
|
110
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
111
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
112
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
113
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
114
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
115
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
116
|
+
};
|
|
117
|
+
default: null;
|
|
118
|
+
};
|
|
119
|
+
empty_content_msg: {
|
|
120
|
+
type: StringConstructor;
|
|
121
|
+
default: null;
|
|
122
|
+
};
|
|
93
123
|
}, {
|
|
94
124
|
add_table: import("vue").Ref<string[]>;
|
|
95
125
|
del_table: import("vue").Ref<string[]>;
|
|
@@ -120,6 +150,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
120
150
|
change_save_table: () => void;
|
|
121
151
|
getAllSelect: import("vue").ComputedRef<string>;
|
|
122
152
|
reachMax: import("vue").Ref<boolean>;
|
|
153
|
+
getEmptyMsg: import("vue").ComputedRef<string>;
|
|
154
|
+
getLoaderText: import("vue").ComputedRef<string[]>;
|
|
155
|
+
getPlaceholderAdd: import("vue").ComputedRef<string>;
|
|
156
|
+
getPlaceholderDel: import("vue").ComputedRef<string>;
|
|
157
|
+
getMaxSelectMsg: import("vue").ComputedRef<string>;
|
|
158
|
+
getEmptyContentMsg: import("vue").ComputedRef<string>;
|
|
123
159
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("changeElement" | "changeAddInputValue" | "update:Selection")[], "changeElement" | "changeAddInputValue" | "update:Selection", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
124
160
|
element_table: {
|
|
125
161
|
type: {
|
|
@@ -138,9 +174,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
138
174
|
};
|
|
139
175
|
required: true;
|
|
140
176
|
};
|
|
141
|
-
|
|
177
|
+
search_placeholder_add: {
|
|
142
178
|
type: StringConstructor;
|
|
143
|
-
default:
|
|
179
|
+
default: null;
|
|
180
|
+
};
|
|
181
|
+
search_placeholder_del: {
|
|
182
|
+
type: StringConstructor;
|
|
183
|
+
default: null;
|
|
144
184
|
};
|
|
145
185
|
need_apply: {
|
|
146
186
|
type: BooleanConstructor;
|
|
@@ -198,7 +238,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
198
238
|
};
|
|
199
239
|
reach_max_msg: {
|
|
200
240
|
type: StringConstructor;
|
|
201
|
-
default:
|
|
241
|
+
default: null;
|
|
202
242
|
};
|
|
203
243
|
loading: {
|
|
204
244
|
type: BooleanConstructor;
|
|
@@ -206,19 +246,47 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
206
246
|
};
|
|
207
247
|
empty_msg: {
|
|
208
248
|
type: StringConstructor;
|
|
209
|
-
default:
|
|
249
|
+
default: null;
|
|
210
250
|
};
|
|
211
251
|
complex_label: {
|
|
212
252
|
type: StringConstructor;
|
|
213
253
|
required: true;
|
|
214
254
|
};
|
|
255
|
+
lang: {
|
|
256
|
+
type: StringConstructor;
|
|
257
|
+
default: string;
|
|
258
|
+
validator: (value: string) => boolean;
|
|
259
|
+
};
|
|
260
|
+
loader_text: {
|
|
261
|
+
type: {
|
|
262
|
+
(arrayLength: number): string[];
|
|
263
|
+
(...items: string[]): string[];
|
|
264
|
+
new (arrayLength: number): string[];
|
|
265
|
+
new (...items: string[]): string[];
|
|
266
|
+
isArray(arg: any): arg is any[];
|
|
267
|
+
readonly prototype: any[];
|
|
268
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
269
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
270
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
271
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
272
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
273
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
274
|
+
};
|
|
275
|
+
default: null;
|
|
276
|
+
};
|
|
277
|
+
empty_content_msg: {
|
|
278
|
+
type: StringConstructor;
|
|
279
|
+
default: null;
|
|
280
|
+
};
|
|
215
281
|
}>> & {
|
|
216
282
|
onChangeElement?: ((...args: any[]) => any) | undefined;
|
|
217
283
|
onChangeAddInputValue?: ((...args: any[]) => any) | undefined;
|
|
218
284
|
"onUpdate:Selection"?: ((...args: any[]) => any) | undefined;
|
|
219
285
|
}, {
|
|
286
|
+
lang: string;
|
|
220
287
|
loading: boolean;
|
|
221
|
-
|
|
288
|
+
search_placeholder_add: string;
|
|
289
|
+
search_placeholder_del: string;
|
|
222
290
|
need_apply: boolean;
|
|
223
291
|
smart_selection_table: unknown[];
|
|
224
292
|
return_value: boolean;
|
|
@@ -230,5 +298,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
230
298
|
max_amount: number;
|
|
231
299
|
reach_max_msg: string;
|
|
232
300
|
empty_msg: string;
|
|
301
|
+
loader_text: string[];
|
|
302
|
+
empty_content_msg: string;
|
|
233
303
|
}, {}>;
|
|
234
304
|
export default _default;
|
|
@@ -6,6 +6,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6
6
|
lang: {
|
|
7
7
|
type: StringConstructor;
|
|
8
8
|
default: string;
|
|
9
|
+
validator: (value: string) => boolean;
|
|
9
10
|
};
|
|
10
11
|
compact: {
|
|
11
12
|
type: BooleanConstructor;
|
|
@@ -22,6 +23,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
22
23
|
lang: {
|
|
23
24
|
type: StringConstructor;
|
|
24
25
|
default: string;
|
|
26
|
+
validator: (value: string) => boolean;
|
|
25
27
|
};
|
|
26
28
|
compact: {
|
|
27
29
|
type: BooleanConstructor;
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
:id="`label_${selected_item}`"
|
|
33
33
|
>{{
|
|
34
34
|
selected_item === null || selected_item === undefined
|
|
35
|
-
?
|
|
35
|
+
? getEmptyMsg
|
|
36
36
|
: selected_item
|
|
37
37
|
}}</span
|
|
38
38
|
>
|
|
@@ -53,11 +53,18 @@
|
|
|
53
53
|
class="oip_search_name"
|
|
54
54
|
v-model="searchName"
|
|
55
55
|
@input="changeInput()"
|
|
56
|
-
:placeholder="
|
|
56
|
+
:placeholder="getPlaceholder"
|
|
57
57
|
/>
|
|
58
58
|
</div>
|
|
59
59
|
<!-- List -->
|
|
60
|
-
<arg-data-loader
|
|
60
|
+
<arg-data-loader
|
|
61
|
+
v-if="loading"
|
|
62
|
+
:text="getLoaderText[0]"
|
|
63
|
+
:sub-text="getLoaderText[1]"
|
|
64
|
+
/>
|
|
65
|
+
<div class="oip_empty_dropdown" v-else-if="filterName.length === 0">
|
|
66
|
+
<p>{{ getEmptyContentMsg }}</p>
|
|
67
|
+
</div>
|
|
61
68
|
<div v-else class="oip_select_dropdown_selection_container">
|
|
62
69
|
<div
|
|
63
70
|
v-for="(element, index) of filterName()"
|
|
@@ -132,6 +139,7 @@ import argDataLoader from "./argDataLoader.vue";
|
|
|
132
139
|
import {
|
|
133
140
|
onMounted,
|
|
134
141
|
ref,
|
|
142
|
+
computed,
|
|
135
143
|
watch,
|
|
136
144
|
defineComponent,
|
|
137
145
|
onUnmounted,
|
|
@@ -145,8 +153,7 @@ export default defineComponent({
|
|
|
145
153
|
search: { type: Boolean, default: true },
|
|
146
154
|
filter_placeholder: {
|
|
147
155
|
type: String,
|
|
148
|
-
|
|
149
|
-
default: "Search options..."
|
|
156
|
+
default: null
|
|
150
157
|
},
|
|
151
158
|
close_on_click: { type: Boolean, default: true },
|
|
152
159
|
default_select: { type: Number, required: false, default: null },
|
|
@@ -154,9 +161,18 @@ export default defineComponent({
|
|
|
154
161
|
disabled: { type: Boolean, default: false },
|
|
155
162
|
return_value: { type: Boolean, default: false },
|
|
156
163
|
values_disabled: { type: Array, default: () => [] },
|
|
157
|
-
empty_msg: { type: String, default:
|
|
164
|
+
empty_msg: { type: String, default: null },
|
|
158
165
|
dropdown_label: { type: String, required: true },
|
|
159
|
-
loading: { type: Boolean, default: false }
|
|
166
|
+
loading: { type: Boolean, default: false },
|
|
167
|
+
lang: {
|
|
168
|
+
type: String,
|
|
169
|
+
default: "en",
|
|
170
|
+
validator: (value) => {
|
|
171
|
+
return ["en", "fr"].includes(value);
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
loader_text: { type: Array, default: null },
|
|
175
|
+
empty_content_msg: { type: String, default: null }
|
|
160
176
|
},
|
|
161
177
|
emits: ["changeElement", "update:Selection", "changeInputValue"],
|
|
162
178
|
setup(props, { emit }) {
|
|
@@ -190,6 +206,30 @@ export default defineComponent({
|
|
|
190
206
|
}
|
|
191
207
|
}
|
|
192
208
|
);
|
|
209
|
+
const getEmptyMsg = computed(() => {
|
|
210
|
+
if (props.empty_msg === null) {
|
|
211
|
+
return props.lang === "fr" ? "Aucune S\xE9lection" : "No Selection";
|
|
212
|
+
} else
|
|
213
|
+
return props.empty_msg;
|
|
214
|
+
});
|
|
215
|
+
const getLoaderText = computed(() => {
|
|
216
|
+
if (props.loader_text === null) {
|
|
217
|
+
return props.lang === "fr" ? ["Chargement...", "Veuillez patienter"] : ["Loading...", "Please wait"];
|
|
218
|
+
} else
|
|
219
|
+
return props.loader_text;
|
|
220
|
+
});
|
|
221
|
+
const getPlaceholder = computed(() => {
|
|
222
|
+
if (props.filter_placeholder === null) {
|
|
223
|
+
return props.lang === "fr" ? "Rechercher une option..." : "Search options...";
|
|
224
|
+
} else
|
|
225
|
+
return props.filter_placeholder;
|
|
226
|
+
});
|
|
227
|
+
const getEmptyContentMsg = computed(() => {
|
|
228
|
+
if (props.empty_content_msg === null) {
|
|
229
|
+
return props.lang === "fr" ? "Aucun contenu n'a \xE9t\xE9 trouv\xE9" : "No content was found";
|
|
230
|
+
} else
|
|
231
|
+
return props.empty_content_msg;
|
|
232
|
+
});
|
|
193
233
|
function changeInput() {
|
|
194
234
|
setTimeout(() => {
|
|
195
235
|
emit("changeInputValue", searchName.value);
|
|
@@ -276,7 +316,11 @@ export default defineComponent({
|
|
|
276
316
|
closeDropdown,
|
|
277
317
|
filterName,
|
|
278
318
|
changeDisplay,
|
|
279
|
-
changeInput
|
|
319
|
+
changeInput,
|
|
320
|
+
getEmptyMsg,
|
|
321
|
+
getLoaderText,
|
|
322
|
+
getPlaceholder,
|
|
323
|
+
getEmptyContentMsg
|
|
280
324
|
};
|
|
281
325
|
}
|
|
282
326
|
});
|
|
@@ -22,8 +22,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
22
22
|
};
|
|
23
23
|
filter_placeholder: {
|
|
24
24
|
type: StringConstructor;
|
|
25
|
-
|
|
26
|
-
default: string;
|
|
25
|
+
default: null;
|
|
27
26
|
};
|
|
28
27
|
close_on_click: {
|
|
29
28
|
type: BooleanConstructor;
|
|
@@ -52,7 +51,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
52
51
|
};
|
|
53
52
|
empty_msg: {
|
|
54
53
|
type: StringConstructor;
|
|
55
|
-
default:
|
|
54
|
+
default: null;
|
|
56
55
|
};
|
|
57
56
|
dropdown_label: {
|
|
58
57
|
type: StringConstructor;
|
|
@@ -62,6 +61,32 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
62
61
|
type: BooleanConstructor;
|
|
63
62
|
default: boolean;
|
|
64
63
|
};
|
|
64
|
+
lang: {
|
|
65
|
+
type: StringConstructor;
|
|
66
|
+
default: string;
|
|
67
|
+
validator: (value: string) => boolean;
|
|
68
|
+
};
|
|
69
|
+
loader_text: {
|
|
70
|
+
type: {
|
|
71
|
+
(arrayLength: number): string[];
|
|
72
|
+
(...items: string[]): string[];
|
|
73
|
+
new (arrayLength: number): string[];
|
|
74
|
+
new (...items: string[]): string[];
|
|
75
|
+
isArray(arg: any): arg is any[];
|
|
76
|
+
readonly prototype: any[];
|
|
77
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
78
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
79
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
80
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
81
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
82
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
83
|
+
};
|
|
84
|
+
default: null;
|
|
85
|
+
};
|
|
86
|
+
empty_content_msg: {
|
|
87
|
+
type: StringConstructor;
|
|
88
|
+
default: null;
|
|
89
|
+
};
|
|
65
90
|
}, {
|
|
66
91
|
isDisplay: import("vue").Ref<boolean>;
|
|
67
92
|
searchName: import("vue").Ref<string>;
|
|
@@ -76,6 +101,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
76
101
|
filterName: () => string[];
|
|
77
102
|
changeDisplay: () => void;
|
|
78
103
|
changeInput: () => void;
|
|
104
|
+
getEmptyMsg: import("vue").ComputedRef<string>;
|
|
105
|
+
getLoaderText: import("vue").ComputedRef<string[]>;
|
|
106
|
+
getPlaceholder: import("vue").ComputedRef<string>;
|
|
107
|
+
getEmptyContentMsg: import("vue").ComputedRef<string>;
|
|
79
108
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("changeElement" | "update:Selection" | "changeInputValue")[], "changeElement" | "update:Selection" | "changeInputValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
80
109
|
element_table: {
|
|
81
110
|
type: {
|
|
@@ -100,8 +129,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
100
129
|
};
|
|
101
130
|
filter_placeholder: {
|
|
102
131
|
type: StringConstructor;
|
|
103
|
-
|
|
104
|
-
default: string;
|
|
132
|
+
default: null;
|
|
105
133
|
};
|
|
106
134
|
close_on_click: {
|
|
107
135
|
type: BooleanConstructor;
|
|
@@ -130,7 +158,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
130
158
|
};
|
|
131
159
|
empty_msg: {
|
|
132
160
|
type: StringConstructor;
|
|
133
|
-
default:
|
|
161
|
+
default: null;
|
|
134
162
|
};
|
|
135
163
|
dropdown_label: {
|
|
136
164
|
type: StringConstructor;
|
|
@@ -140,15 +168,44 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
140
168
|
type: BooleanConstructor;
|
|
141
169
|
default: boolean;
|
|
142
170
|
};
|
|
171
|
+
lang: {
|
|
172
|
+
type: StringConstructor;
|
|
173
|
+
default: string;
|
|
174
|
+
validator: (value: string) => boolean;
|
|
175
|
+
};
|
|
176
|
+
loader_text: {
|
|
177
|
+
type: {
|
|
178
|
+
(arrayLength: number): string[];
|
|
179
|
+
(...items: string[]): string[];
|
|
180
|
+
new (arrayLength: number): string[];
|
|
181
|
+
new (...items: string[]): string[];
|
|
182
|
+
isArray(arg: any): arg is any[];
|
|
183
|
+
readonly prototype: any[];
|
|
184
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
185
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
186
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
187
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
188
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
189
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
190
|
+
};
|
|
191
|
+
default: null;
|
|
192
|
+
};
|
|
193
|
+
empty_content_msg: {
|
|
194
|
+
type: StringConstructor;
|
|
195
|
+
default: null;
|
|
196
|
+
};
|
|
143
197
|
}>> & {
|
|
144
198
|
onChangeElement?: ((...args: any[]) => any) | undefined;
|
|
145
199
|
"onUpdate:Selection"?: ((...args: any[]) => any) | undefined;
|
|
146
200
|
onChangeInputValue?: ((...args: any[]) => any) | undefined;
|
|
147
201
|
}, {
|
|
202
|
+
lang: string;
|
|
148
203
|
loading: boolean;
|
|
149
204
|
return_value: boolean;
|
|
150
205
|
disabled: boolean;
|
|
151
206
|
empty_msg: string;
|
|
207
|
+
loader_text: string[];
|
|
208
|
+
empty_content_msg: string;
|
|
152
209
|
search: boolean;
|
|
153
210
|
filter_placeholder: string;
|
|
154
211
|
close_on_click: boolean;
|