@tekkare/auriga 0.1.7 → 0.1.9

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.
Files changed (43) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/argActions.vue +120 -0
  3. package/dist/runtime/components/argActions.vue.d.ts +29 -0
  4. package/dist/runtime/components/argChart.vue +38 -4
  5. package/dist/runtime/components/argChartTableCard.vue +30 -0
  6. package/dist/runtime/components/argChartTableCard.vue.d.ts +2 -0
  7. package/dist/runtime/components/argCheckbox.vue +14 -6
  8. package/dist/runtime/components/argCheckbox.vue.d.ts +11 -2
  9. package/dist/runtime/components/argComplexSelect.vue +2 -2
  10. package/dist/runtime/components/argDataLoader.vue +13 -3
  11. package/dist/runtime/components/argDataLoader.vue.d.ts +22 -1
  12. package/dist/runtime/components/argFileBtn.vue.d.ts +2 -2
  13. package/dist/runtime/components/argFilterCard.vue +37 -8
  14. package/dist/runtime/components/argFilterCard.vue.d.ts +30 -1
  15. package/dist/runtime/components/argFilterTabs.vue +109 -0
  16. package/dist/runtime/components/argFilterTabs.vue.d.ts +64 -0
  17. package/dist/runtime/components/argFooter.vue +21 -20
  18. package/dist/runtime/components/argHeader.vue +8 -2
  19. package/dist/runtime/components/argHeader.vue.d.ts +9 -0
  20. package/dist/runtime/components/argInfoBar.vue +175 -0
  21. package/dist/runtime/components/argInfoBar.vue.d.ts +35 -0
  22. package/dist/runtime/components/argInfoSection.vue +265 -0
  23. package/dist/runtime/components/argInfoSection.vue.d.ts +55 -0
  24. package/dist/runtime/components/argMainLayout.vue +46 -21
  25. package/dist/runtime/components/argMainLayout.vue.d.ts +13 -1
  26. package/dist/runtime/components/argMenuItem.vue +44 -27
  27. package/dist/runtime/components/argMenuItem.vue.d.ts +11 -1
  28. package/dist/runtime/components/argMenuLink.vue +43 -20
  29. package/dist/runtime/components/argMenuLink.vue.d.ts +9 -0
  30. package/dist/runtime/components/argMultipleChoice.vue +25 -3
  31. package/dist/runtime/components/argMultipleSelect.vue +785 -0
  32. package/dist/runtime/components/argMultipleSelect.vue.d.ts +143 -0
  33. package/dist/runtime/components/argNavBar.vue +26 -12
  34. package/dist/runtime/components/argNavBar.vue.d.ts +11 -2
  35. package/dist/runtime/components/argRadioButtons.vue +134 -0
  36. package/dist/runtime/components/argRadioButtons.vue.d.ts +48 -0
  37. package/dist/runtime/components/argSidebar.vue +89 -9
  38. package/dist/runtime/components/argSidebar.vue.d.ts +8 -2
  39. package/dist/runtime/components/argStyle.vue +18 -2
  40. package/dist/runtime/components/argSubMenu.vue +79 -37
  41. package/dist/runtime/components/argSubMenu.vue.d.ts +9 -0
  42. package/dist/runtime/components/argTable.vue +15 -1
  43. package/package.json +1 -1
@@ -0,0 +1,785 @@
1
+ <template>
2
+ <div>
3
+ <arg-style />
4
+ <!-- Simple select -->
5
+ <arg-simple-label
6
+ :disabled="disabled"
7
+ :show_amount="show_amount"
8
+ :amount_value="selected_items.length"
9
+ @click="changeDisplay()"
10
+ :class="isDisplay ? 'open' : ''"
11
+ >
12
+ <p :class="show_amount === true ? 'oip_crop big' : 'oip_crop small'">
13
+ {{
14
+ (nested && selected_nested.length > 0) ||
15
+ (!nested && selected_items.length > 0)
16
+ ? getAllSelect
17
+ : emptyMsg
18
+ }}
19
+ </p>
20
+ </arg-simple-label>
21
+
22
+ <div
23
+ :style="isDisplay === false ? 'display : none' : ''"
24
+ class="oip_select_dropdown_block multiple"
25
+ @click.stop
26
+ >
27
+ <!--<div v-if="filter_placeholder" class="oip_select_multiple_title">{{ filter_placeholder }}</div>-->
28
+ <div v-if="search === true" class="oip_search_container">
29
+ <arg-icon size="20" name="MagnifyingGlass"></arg-icon>
30
+ <input
31
+ class="oip_search_name"
32
+ v-model="searchName"
33
+ @input="changeInput()"
34
+ placeholder="Search"
35
+ />
36
+ </div>
37
+ <!-- List -->
38
+ <div v-if="!nested" class="oip_select_dropdown_selection_container">
39
+ <div
40
+ v-if="show_all"
41
+ class="oip_select_complex_selection_loop"
42
+ @click="
43
+ selected_all || getOptions.length === selected_items.length
44
+ ? del_all()
45
+ : add_all()
46
+ "
47
+ >
48
+ <arg-icon
49
+ :class="
50
+ !selected_all && getOptions.length !== selected_items.length
51
+ ? 'del'
52
+ : 'add'
53
+ "
54
+ thickness="24"
55
+ size="16px"
56
+ :name="
57
+ selected_all || getOptions.length === selected_items.length
58
+ ? 'CheckSquareFill'
59
+ : 'Square'
60
+ "
61
+ ></arg-icon>
62
+ <div
63
+ :class="[
64
+ 'oip_select_complex_selection_loop_name',
65
+ !selected_all && getOptions.length !== selected_items.length
66
+ ? 'del'
67
+ : 'add',
68
+ ]"
69
+ >
70
+ All
71
+ </div>
72
+ </div>
73
+ <div :class="show_all ? 'oip_select_multiple_left_margin' : ''">
74
+ <div v-if="multiple_columns" class="oip_row v-start gap-16">
75
+ <div v-for="(table, tabIndex) of filterName" :key="tabIndex">
76
+ <div
77
+ class="oip_select_complex_selection_loop multiple"
78
+ v-for="(element, index) of table"
79
+ :key="index"
80
+ :class="
81
+ options_disable.includes(index + tabIndex * 7)
82
+ ? 'disabled'
83
+ : ''
84
+ "
85
+ @click="
86
+ selected_items.includes(element)
87
+ ? del_element(element, index + tabIndex * 7)
88
+ : add_element(element, index + tabIndex * 7)
89
+ "
90
+ >
91
+ <arg-icon
92
+ v-if="
93
+ tabIndex === 0
94
+ ? options_disable.includes(index)
95
+ : options_disable.includes(index + tabIndex * 7)
96
+ "
97
+ name="MinusSquareDisable"
98
+ size="16"
99
+ color="var(--independence)"
100
+ class="disable"
101
+ />
102
+ <arg-icon
103
+ v-else
104
+ :class="selected_items.includes(element) ? 'add' : ''"
105
+ size="16px"
106
+ thickness="24"
107
+ :name="
108
+ selected_items.includes(element)
109
+ ? 'CheckSquareFill'
110
+ : 'Square'
111
+ "
112
+ ></arg-icon>
113
+ <div
114
+ :class="[
115
+ 'oip_select_complex_selection_loop_name',
116
+ selected_items.includes(element) ? 'add' : 'del',
117
+ ]"
118
+ >
119
+ {{ element }}
120
+ </div>
121
+ </div>
122
+ </div>
123
+ </div>
124
+ <div v-else>
125
+ <div
126
+ class="oip_select_complex_selection_loop multiple"
127
+ v-for="(element, index) of filterName"
128
+ :key="index"
129
+ :class="options_disable.includes(index) ? 'disabled' : ''"
130
+ @click="
131
+ selected_items.includes(element)
132
+ ? del_element(element, index)
133
+ : add_element(element, index)
134
+ "
135
+ >
136
+ <arg-icon
137
+ v-if="options_disable.includes(index)"
138
+ name="MinusSquareDisable"
139
+ size="16"
140
+ color="var(--independence)"
141
+ class="disable"
142
+ />
143
+ <arg-icon
144
+ v-else
145
+ :class="selected_items.includes(element) ? 'add' : ''"
146
+ size="16px"
147
+ thickness="24"
148
+ :name="
149
+ selected_items.includes(element)
150
+ ? 'CheckSquareFill'
151
+ : 'Square'
152
+ "
153
+ ></arg-icon>
154
+ <div
155
+ :class="[
156
+ 'oip_select_complex_selection_loop_name',
157
+ selected_items.includes(element) ? 'add' : 'del',
158
+ options_disable.includes(index) ? 'disabled' : '',
159
+ ]"
160
+ >
161
+ {{ element }}
162
+ </div>
163
+ </div>
164
+ </div>
165
+ </div>
166
+ </div>
167
+ <div v-else class="oip_select_dropdown_selection_container">
168
+ <div
169
+ v-if="show_all"
170
+ class="oip_select_complex_selection_loop"
171
+ @click="
172
+ selected_all || getOptions.length === nestedSelectedLength
173
+ ? del_all()
174
+ : add_all()
175
+ "
176
+ >
177
+ <arg-icon
178
+ :class="
179
+ !selected_all && getOptions.length !== nestedSelectedLength
180
+ ? 'del'
181
+ : selected_all || getOptions.length === nestedSelectedLength
182
+ ? 'add'
183
+ : 'more'
184
+ "
185
+ thickness="24"
186
+ size="16px"
187
+ :name="
188
+ selected_all || getOptions.length === nestedSelectedLength
189
+ ? 'CheckSquareFill'
190
+ : 'Square'
191
+ "
192
+ ></arg-icon>
193
+ <div
194
+ :class="[
195
+ 'oip_select_complex_selection_loop_name',
196
+ !selected_all && getOptions.length !== nestedSelectedLength
197
+ ? 'del'
198
+ : selected_all || getOptions.length === nestedSelectedLength
199
+ ? 'add'
200
+ : 'more',
201
+ ]"
202
+ >
203
+ All
204
+ </div>
205
+ </div>
206
+ <div
207
+ :class="[
208
+ show_all ? 'oip_select_multiple_left_margin cate_left_margin' : '',
209
+ multiple_columns ? 'cate_row' : 'cate_col',
210
+ ]"
211
+ >
212
+ <div v-for="(element, index) of filterNested" :key="index">
213
+ <div
214
+ class="oip_select_complex_selection_loop"
215
+ @click="
216
+ selectedCats.includes(index)
217
+ ? del_all_cat(index)
218
+ : add_all_cat(index)
219
+ "
220
+ >
221
+ <arg-icon
222
+ :class="
223
+ !selectedCats.includes(index)
224
+ ? 'del'
225
+ : selectedCats.includes(index)
226
+ ? 'add'
227
+ : 'more'
228
+ "
229
+ thickness="24"
230
+ size="16px"
231
+ :name="
232
+ selectedCats.includes(index) ? 'CheckSquareFill' : 'Square'
233
+ "
234
+ ></arg-icon>
235
+ <div
236
+ :class="[
237
+ 'oip_select_complex_selection_loop_name',
238
+ !selectedCats.includes(index)
239
+ ? 'del'
240
+ : selectedCats.includes(index)
241
+ ? 'add'
242
+ : 'more',
243
+ ]"
244
+ >
245
+ {{ element.title }}
246
+ </div>
247
+ </div>
248
+ <div class="left_margin">
249
+ <div
250
+ class="oip_select_complex_selection_loop multiple"
251
+ v-for="(option, optIndex) of element.values"
252
+ :key="optIndex"
253
+ @click="
254
+ nestedIncludes(option, index)
255
+ ? del_nested_element(index, option)
256
+ : add_nested_element(index, option)
257
+ "
258
+ >
259
+ <arg-icon
260
+ :class="nestedIncludes(option, index) ? 'add' : ''"
261
+ size="16px"
262
+ thickness="24"
263
+ :name="
264
+ nestedIncludes(option, index) ? 'CheckSquareFill' : 'Square'
265
+ "
266
+ ></arg-icon>
267
+ <div
268
+ :class="[
269
+ 'oip_select_complex_selection_loop_name',
270
+ nestedIncludes(option, index) ? 'add' : 'del',
271
+ ]"
272
+ >
273
+ {{ option }}
274
+ </div>
275
+ </div>
276
+ </div>
277
+ </div>
278
+ </div>
279
+ </div>
280
+ </div>
281
+ </div>
282
+ </template>
283
+ <script>
284
+ import argIcon from "./argIcon.vue";
285
+ import argSimpleLabel from "./argSimpleLabel.vue";
286
+ import {
287
+ ref,
288
+ computed,
289
+ onBeforeMount,
290
+ watch,
291
+ defineComponent,
292
+ onUnmounted
293
+ } from "vue";
294
+ export default defineComponent({
295
+ name: "argMultipleSelect",
296
+ components: { argIcon, argSimpleLabel },
297
+ props: {
298
+ element_table: { type: Array, required: true },
299
+ nested: { type: Boolean, default: false },
300
+ search: { type: Boolean, default: true },
301
+ filter_placeholder: { type: String, required: false },
302
+ show_all: { type: Boolean, default: false },
303
+ default_select: { type: Array, required: false },
304
+ preselection_all: { type: Boolean, default: false },
305
+ disabled: { type: Boolean, default: false },
306
+ multiple_columns: { type: Boolean, default: false },
307
+ options_disable: { type: Array, default: () => [] },
308
+ show_amount: { type: Boolean, default: true },
309
+ emptyMsg: { type: String, default: "No selection" }
310
+ },
311
+ emits: ["changeElement", "update:Selection", "changeInputValue", "onClose"],
312
+ setup(props, { emit }) {
313
+ const selected_items = ref([]);
314
+ const selected_nested = ref([]);
315
+ const isDisplay = ref(false);
316
+ const searchName = ref(null);
317
+ const selected_all = ref(false);
318
+ const selectedCats = ref([]);
319
+ const valueFrom = ref([]);
320
+ const element_table_copy = ref([]);
321
+ watch(
322
+ () => props.element_table,
323
+ (new_element_table) => {
324
+ element_table_copy.value = new_element_table;
325
+ if (props.preselection_all) {
326
+ add_all();
327
+ } else if (props.default_select && props.default_select.length > 0) {
328
+ selected_items.value = props.default_select.map(
329
+ (index) => element_table_copy.value[index]
330
+ );
331
+ }
332
+ }
333
+ );
334
+ onBeforeMount(() => {
335
+ element_table_copy.value = props.element_table;
336
+ if (props.preselection_all) {
337
+ add_all();
338
+ } else if (props.default_select && props.default_select.length > 0) {
339
+ selected_items.value = props.default_select.map(
340
+ (index) => element_table_copy.value[index]
341
+ );
342
+ }
343
+ emit("changeElement", selected_items.value);
344
+ emit("update:Selection", selected_items.value);
345
+ });
346
+ const getAllSelect = computed(() => {
347
+ const fullSelect = props.nested ? selected_nested.value : selected_items.value;
348
+ let filterFill = ``;
349
+ for (let i = 0; i < fullSelect.length; i++) {
350
+ if (props.nested) {
351
+ for (let j = 0; j < fullSelect[i].elements.length; j++) {
352
+ if (i === 0) {
353
+ filterFill = fullSelect[i].elements[j];
354
+ } else {
355
+ filterFill = `${filterFill}, ${fullSelect[i].elements[j]}`;
356
+ }
357
+ }
358
+ } else {
359
+ if (i === 0) {
360
+ filterFill = fullSelect[i];
361
+ } else {
362
+ filterFill = `${filterFill}, ${fullSelect[i]}`;
363
+ }
364
+ }
365
+ }
366
+ return filterFill;
367
+ });
368
+ const getOptions = computed(() => {
369
+ if (props.nested) {
370
+ const optionsTable = [];
371
+ for (let i = 0; i < element_table_copy.value.length; i++) {
372
+ for (let j = 0; j < element_table_copy.value[i].values.length; j++) {
373
+ optionsTable.push(element_table_copy.value[i].values[j]);
374
+ }
375
+ }
376
+ return optionsTable;
377
+ } else {
378
+ if (props.options_disable.length > 0) {
379
+ return optionsWithoutDisabled.value;
380
+ } else
381
+ return element_table_copy.value;
382
+ }
383
+ });
384
+ const filterName = computed(() => {
385
+ if (!props.multiple_columns) {
386
+ if (searchName.value !== null) {
387
+ return element_table_copy.value.filter(
388
+ (element) => element.toLowerCase().includes(searchName.value.toLowerCase())
389
+ );
390
+ } else
391
+ return props.element_table;
392
+ } else {
393
+ let selectTable = [];
394
+ let finalTable = [];
395
+ if (searchName.value !== null) {
396
+ selectTable = [
397
+ ...new Set(
398
+ element_table_copy.value.filter(
399
+ (element) => element.toLowerCase().includes(searchName.value.toLowerCase())
400
+ )
401
+ )
402
+ ];
403
+ const chunkSize = 7;
404
+ for (let i = 0; i < selectTable.length; i += chunkSize) {
405
+ const chunk = selectTable.slice(i, i + chunkSize);
406
+ finalTable.push(chunk);
407
+ }
408
+ return finalTable;
409
+ } else {
410
+ const chunkSize = 7;
411
+ for (let i = 0; i < props.element_table.length; i += chunkSize) {
412
+ const chunk = props.element_table.slice(i, i + chunkSize);
413
+ finalTable.push(chunk);
414
+ }
415
+ return finalTable;
416
+ }
417
+ }
418
+ });
419
+ const filterNested = computed(() => {
420
+ if (searchName.value !== null || searchName.value && searchName.value.length === 0) {
421
+ return element_table_copy.value.filter(
422
+ (element) => element.values.includes(
423
+ searchName.value || searchName.value.toLowerCase()
424
+ )
425
+ );
426
+ } else
427
+ return props.element_table;
428
+ });
429
+ const optionsWithoutDisabled = computed(() => {
430
+ let optionsArray = [Number];
431
+ for (let i = 0; i < element_table_copy.value.length; i++) {
432
+ if (!props.options_disable.includes(i)) {
433
+ optionsArray.push(element_table_copy.value[i]);
434
+ }
435
+ }
436
+ return optionsArray;
437
+ });
438
+ const nestedSelectedLength = computed(() => {
439
+ let length = 0;
440
+ for (let i = 0; i < selected_nested.value.length; i++) {
441
+ length += selected_nested.value[i].elements.length;
442
+ }
443
+ return length;
444
+ });
445
+ function changeInput() {
446
+ emit("changeInputValue", searchName.value);
447
+ }
448
+ function nestedIncludes(option, index) {
449
+ if (selectedCats.value.includes(index)) {
450
+ return true;
451
+ } else if (selected_nested.value.filter(
452
+ (a) => a.cat === index && a.elements.includes(option)
453
+ ).length > 0) {
454
+ return true;
455
+ } else
456
+ return false;
457
+ }
458
+ function getNestedOptions(index) {
459
+ if (selected_all.value) {
460
+ return getOptions;
461
+ } else
462
+ return element_table_copy.value[index].values;
463
+ }
464
+ function selected_all_cats(index) {
465
+ let selected_cat = true;
466
+ for (let i = 0; i < element_table_copy.value[index].values.length; i++) {
467
+ if (!selected_items.value.includes(
468
+ element_table_copy.value[index].values[i]
469
+ )) {
470
+ selected_cat = false;
471
+ }
472
+ }
473
+ if (selected_all.value)
474
+ return selected_all.value;
475
+ else
476
+ return selected_cat;
477
+ }
478
+ function changeDisplay() {
479
+ if (props.disabled === false) {
480
+ if (isDisplay.value === true) {
481
+ emit("onClose");
482
+ } else {
483
+ isDisplay.value = !isDisplay.value;
484
+ setTimeout(() => {
485
+ document.addEventListener("click", close);
486
+ }, 100);
487
+ }
488
+ }
489
+ }
490
+ function close() {
491
+ if (isDisplay.value) {
492
+ emit("onClose");
493
+ isDisplay.value = false;
494
+ document.removeEventListener("click", close);
495
+ }
496
+ }
497
+ function add_element(element, index) {
498
+ if (!props.options_disable.includes(index)) {
499
+ selected_items.value.push(element);
500
+ emit("changeElement", selected_items.value);
501
+ emit("update:Selection", selected_items.value);
502
+ }
503
+ }
504
+ function del_element(element, index) {
505
+ selected_all.value = false;
506
+ if (!props.options_disable.includes(index)) {
507
+ selected_items.value.splice(selected_items.value.indexOf(element), 1);
508
+ emit("changeElement", selected_items.value);
509
+ emit("update:Selection", selected_items.value);
510
+ }
511
+ }
512
+ function add_nested_element(index, elem) {
513
+ if (selected_nested.value.length > 0) {
514
+ if (selected_nested.value.filter((a) => a.cat === index).length > 0) {
515
+ selected_nested.value[selected_nested.value.findIndex(
516
+ (a) => a.cat === index
517
+ )].elements.push(elem);
518
+ } else
519
+ selected_nested.value.push({
520
+ cat: index,
521
+ title: element_table_copy.value[index].title,
522
+ elements: [elem]
523
+ });
524
+ } else
525
+ selected_nested.value.push({
526
+ cat: index,
527
+ title: element_table_copy.value[index].title,
528
+ elements: [elem]
529
+ });
530
+ emit("changeElement", selected_nested.value);
531
+ emit("update:Selection", selected_nested.value);
532
+ }
533
+ function del_nested_elements(index, elem) {
534
+ selected_all.value = false;
535
+ if (selectedCats.value.includes(index)) {
536
+ selectedCats.value.splice(
537
+ selectedCats.value.findIndex((a) => a === index),
538
+ 1
539
+ );
540
+ }
541
+ selected_nested.value[selected_nested.value.findIndex((a) => a.cat === index)].elements.splice(
542
+ selected_nested.value[selected_nested.value.findIndex(
543
+ (a) => a.cat === index
544
+ )].elements.findIndex((a) => a === elem),
545
+ 1
546
+ );
547
+ if (selected_nested.value.findIndex(
548
+ (a) => a.cat === index
549
+ ) !== -1) {
550
+ if (selected_nested.value[selected_nested.value.findIndex(
551
+ (a) => a.cat === index
552
+ )].elements.length === 0) {
553
+ selected_nested.value.splice(
554
+ selected_nested.value.findIndex(
555
+ (a) => a.cat === index
556
+ ),
557
+ 1
558
+ );
559
+ }
560
+ }
561
+ emit("changeElement", selected_nested.value);
562
+ emit("update:Selection", selected_nested.value);
563
+ }
564
+ function add_all() {
565
+ selected_all.value = true;
566
+ selected_items.value = [];
567
+ selected_nested.value = [];
568
+ if (props.nested) {
569
+ for (let i = 0; i < element_table_copy.value.length; i++) {
570
+ selected_nested.value.push({
571
+ cat: i,
572
+ title: element_table_copy.value[i].title,
573
+ elements: []
574
+ });
575
+ for (let j = 0; j < element_table_copy.value[i].values.length; j++) {
576
+ selected_nested.value[i].elements.push(
577
+ element_table_copy.value[i].values[j]
578
+ );
579
+ }
580
+ selectedCats.value.push(i);
581
+ }
582
+ } else {
583
+ for (let i = 0; i < element_table_copy.value.length; i++) {
584
+ if (!props.options_disable.includes(i)) {
585
+ selected_items.value.push(element_table_copy.value[i]);
586
+ }
587
+ }
588
+ }
589
+ emit(
590
+ "changeElement",
591
+ props.nested ? selected_nested.value : selected_items.value
592
+ );
593
+ emit(
594
+ "update:Selection",
595
+ props.nested ? selected_nested.value : selected_items.value
596
+ );
597
+ }
598
+ function add_all_cat(index) {
599
+ selectedCats.value.push(index);
600
+ if (selected_nested.value.filter((f) => f.cat === index).length === 0) {
601
+ selected_nested.value.push({
602
+ cat: index,
603
+ title: element_table.value[index].title,
604
+ elements: element_table_copy.value[index].values
605
+ });
606
+ } else
607
+ selected_nested.value[selected_nested.value.findIndex(
608
+ (f) => f.cat === index
609
+ )].elements = element_table_copy.value[index].values;
610
+ emit("changeElement", selected_nested.value);
611
+ emit("update:Selection", selected_nested.value);
612
+ }
613
+ function del_all_cat(index) {
614
+ selected_all.value = false;
615
+ if (selectedCats.value.includes(index)) {
616
+ selectedCats.value.splice(selectedCats.value.indexOf(index), 1);
617
+ }
618
+ for (let i = 0; i < selected_nested.value.filter((f) => f.cat === index).length; i++) {
619
+ selected_nested.value.splice(
620
+ selected_nested.value.findIndex(
621
+ (f) => f.cat === index
622
+ ),
623
+ 1
624
+ );
625
+ }
626
+ emit("changeElement", selected_nested.value);
627
+ emit("update:Selection", selected_nested.value);
628
+ }
629
+ function del_all() {
630
+ selected_all.value = false;
631
+ selected_items.value = [];
632
+ selected_nested.value = [];
633
+ selectedCats.value = [];
634
+ emit("changeElement", selected_items.value);
635
+ emit("update:Selection", selected_items.value);
636
+ }
637
+ onUnmounted(() => {
638
+ document.removeEventListener("click", close);
639
+ });
640
+ return {
641
+ del_all,
642
+ del_all_cat,
643
+ add_all_cat,
644
+ add_all,
645
+ del_nested_elements,
646
+ add_nested_element,
647
+ del_element,
648
+ add_element,
649
+ close,
650
+ changeDisplay,
651
+ selected_all_cats,
652
+ getNestedOptions,
653
+ nestedIncludes,
654
+ changeInput,
655
+ nestedSelectedLength,
656
+ optionsWithoutDisabled,
657
+ filterNested,
658
+ filterName,
659
+ getOptions,
660
+ getAllSelect,
661
+ isDisplay,
662
+ searchName,
663
+ selected_items,
664
+ selected_nested,
665
+ selected_all,
666
+ selectedCats,
667
+ valueFrom
668
+ };
669
+ }
670
+ });
671
+ </script>
672
+
673
+ <style>
674
+ .oip_select_complex_selection_loop > svg {
675
+ color: var(--lavendar-grey) !important;
676
+ }
677
+
678
+ .oip_select_dropdown_block.multiple {
679
+ min-width: 225px;
680
+ overflow-y: auto;
681
+ }
682
+
683
+ .oip_select_complex_selection_loop.multiple {
684
+ padding-left: 7px;
685
+ }
686
+
687
+ .oip_select_multiple_left_margin {
688
+ margin-left: 7px;
689
+ border-left: 1px solid var(--more);
690
+ }
691
+
692
+ /*.oip_select_complex_selection_loop>svg.more>* {
693
+ color: var(--cool-grey) !important;
694
+ fill: var(--cool-grey) !important;
695
+ }
696
+
697
+ .oip_select_complex_selection_loop>svg.add>* {
698
+ fill: var(--accent) !important;
699
+ color: var(--pure-white) !important;
700
+ stroke-width: 0;
701
+ } */
702
+
703
+ .relative {
704
+ position: relative;
705
+ }
706
+ </style>
707
+ <style scoped>
708
+ .oip_select_complex_selection_loop > svg.add {
709
+ width: 16px !important;
710
+ height: 16px !important;
711
+ }
712
+ .oip_select_complex_selection_loop:hover > svg {
713
+ color: var(--primary) !important;
714
+ }
715
+ .oip_select_complex_selection_loop > svg.disable {
716
+ color: var(--independence) !important;
717
+ }
718
+ .oip_select_complex_selection_loop > svg.disable {
719
+ color: var(--independence) !important;
720
+ }
721
+ .oip_select_complex_selection_loop > .add {
722
+ font-weight: 700 !important;
723
+ }
724
+ .oip_select_complex_selection_loop:hover > svg.add {
725
+ color: var(--primary-hover2) !important;
726
+ }
727
+ .oip_select_complex_selection_loop > svg.add {
728
+ color: var(--primary) !important;
729
+ fill: var(--primary) !important;
730
+ }
731
+ .oip_select_multiple_title {
732
+ margin-bottom: 8px;
733
+ }
734
+ .disabled {
735
+ color: var(--lavendar-grey);
736
+ }
737
+ .oip_select_complex_selection_loop:hover {
738
+ background: rgba(33, 118, 255, 0.05);
739
+ border-radius: 4px;
740
+ }
741
+ .oip_select_complex_selection_loop.disabled:hover {
742
+ background: transparent !important;
743
+ cursor: initial;
744
+ }
745
+ .oip_select_complex_selection_loop {
746
+ padding: 2px 4px;
747
+ }
748
+ .oip_select_complex_selection_loop.multiple {
749
+ margin-left: 5px;
750
+ }
751
+
752
+ .left_margin {
753
+ margin-left: 7px;
754
+ border-left: 1px solid var(--more);
755
+ }
756
+
757
+ .cate_left_margin {
758
+ padding-left: 12px !important;
759
+ }
760
+
761
+ .cate_row {
762
+ display: flex;
763
+ flex-direction: row;
764
+ align-items: flex-start;
765
+ gap: 8px;
766
+ }
767
+ .cate_col {
768
+ display: flex;
769
+ flex-direction: column;
770
+ align-items: flex-start;
771
+ gap: 8px;
772
+ }
773
+ .oip_crop {
774
+ overflow: hidden;
775
+ white-space: nowrap;
776
+ text-overflow: ellipsis;
777
+ }
778
+
779
+ .oip_crop.big {
780
+ width: 85% !important;
781
+ }
782
+ .oip_crop.small {
783
+ width: 98% !important;
784
+ }
785
+ </style>