@tekkare/auriga 0.1.8 → 0.1.10

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