bfg-common 1.4.185 → 1.4.187
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/assets/localization/local_be.json +17 -2
- package/assets/localization/local_en.json +17 -2
- package/assets/localization/local_hy.json +17 -2
- package/assets/localization/local_kk.json +17 -2
- package/assets/localization/local_ru.json +17 -2
- package/assets/localization/local_zh.json +17 -2
- package/components/atoms/comboDropdownMenu/ComboDropdownMenu.vue +357 -0
- package/components/atoms/comboDropdownMenu/lib/models/interfaces.ts +26 -0
- package/components/common/monitor/overview/filters/Filters.vue +230 -230
- package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModal.vue +238 -238
- package/lib/models/interfaces.ts +1 -0
- package/package.json +1 -1
|
@@ -2274,7 +2274,8 @@
|
|
|
2274
2274
|
"inventoryConfigure": {
|
|
2275
2275
|
"acceptanceLevel": "узровень прыняцця",
|
|
2276
2276
|
"activeType": "Актыўны тып",
|
|
2277
|
-
"services": "Паслуга"
|
|
2277
|
+
"services": "Паслуга",
|
|
2278
|
+
"selectTrigger": "Выберыце трыгер"
|
|
2278
2279
|
},
|
|
2279
2280
|
"datastoreWizard": {
|
|
2280
2281
|
"accessMode": "Рэжым доступу"
|
|
@@ -2566,7 +2567,15 @@
|
|
|
2566
2567
|
"relativeThroughput": "Адносная прапускная здольнасць"
|
|
2567
2568
|
},
|
|
2568
2569
|
"scheduledTasks": {
|
|
2569
|
-
"chooseFrequency": "Выберыце частату"
|
|
2570
|
+
"chooseFrequency": "Выберыце частату",
|
|
2571
|
+
"scheduledDescription": "Запланаванае апісанне",
|
|
2572
|
+
"scheduledDetails": "Запланаваныя дэталі",
|
|
2573
|
+
"emailNotification": "Апавяшчэнне па электроннай пошце",
|
|
2574
|
+
"historyLastRuns": "Гісторыя апошніх 5 прабегаў",
|
|
2575
|
+
"duration": "Працягласць",
|
|
2576
|
+
"endTime": "Час заканчэння",
|
|
2577
|
+
"result": "Вынік",
|
|
2578
|
+
"advancedSearch": "Пашыраны пошук"
|
|
2570
2579
|
},
|
|
2571
2580
|
"license": {
|
|
2572
2581
|
"limits": "Limits",
|
|
@@ -2586,5 +2595,11 @@
|
|
|
2586
2595
|
"licenseName": "Назва ліцэнзіі",
|
|
2587
2596
|
"newLicense": "Новая ліцэнзія",
|
|
2588
2597
|
"noActiveLicense": "Няма актыўнай ліцэнзіі"
|
|
2598
|
+
},
|
|
2599
|
+
"events": {
|
|
2600
|
+
"childs": "З дзецьмі",
|
|
2601
|
+
"tasks": "З задачамі",
|
|
2602
|
+
"frontReqs": "З рэгулярнымі запытамі",
|
|
2603
|
+
"related": "Роднасныя"
|
|
2589
2604
|
}
|
|
2590
2605
|
}
|
|
@@ -2278,7 +2278,8 @@
|
|
|
2278
2278
|
"inventoryConfigure": {
|
|
2279
2279
|
"acceptanceLevel": "Acceptance level",
|
|
2280
2280
|
"activeType": "Active Type",
|
|
2281
|
-
"services": "Services"
|
|
2281
|
+
"services": "Services",
|
|
2282
|
+
"selectTrigger": "Select a trigger"
|
|
2282
2283
|
},
|
|
2283
2284
|
"datastoreWizard": {
|
|
2284
2285
|
"accessMode": "Access Mode"
|
|
@@ -2570,7 +2571,15 @@
|
|
|
2570
2571
|
"relativeThroughput": "Relative Throughput"
|
|
2571
2572
|
},
|
|
2572
2573
|
"scheduledTasks": {
|
|
2573
|
-
"chooseFrequency": "Choose a frequency"
|
|
2574
|
+
"chooseFrequency": "Choose a frequency",
|
|
2575
|
+
"scheduledDescription": "Scheduled description",
|
|
2576
|
+
"scheduledDetails": "Scheduled details",
|
|
2577
|
+
"emailNotification": "Email notification",
|
|
2578
|
+
"historyLastRuns": "History of last 5 runs",
|
|
2579
|
+
"duration": "Duration",
|
|
2580
|
+
"endTime": "End time",
|
|
2581
|
+
"result": "Result",
|
|
2582
|
+
"advancedSearch": "Advanced search"
|
|
2574
2583
|
},
|
|
2575
2584
|
"license": {
|
|
2576
2585
|
"limits": "Limits",
|
|
@@ -2590,5 +2599,11 @@
|
|
|
2590
2599
|
"licenseName": "License name",
|
|
2591
2600
|
"newLicense": "New license",
|
|
2592
2601
|
"noActiveLicense": "No active license"
|
|
2602
|
+
},
|
|
2603
|
+
"events": {
|
|
2604
|
+
"childs": "With Childs",
|
|
2605
|
+
"tasks": "With Tasks",
|
|
2606
|
+
"frontReqs": "With regular requests",
|
|
2607
|
+
"related": "Related"
|
|
2593
2608
|
}
|
|
2594
2609
|
}
|
|
@@ -2278,7 +2278,8 @@
|
|
|
2278
2278
|
"inventoryConfigure": {
|
|
2279
2279
|
"acceptanceLevel": "ընդունման մակարդակ",
|
|
2280
2280
|
"activeType": "Ակտիվ տեսակ",
|
|
2281
|
-
"services": "Ծառայություններ"
|
|
2281
|
+
"services": "Ծառայություններ",
|
|
2282
|
+
"selectTrigger": "Ընտրեք ձգան"
|
|
2282
2283
|
},
|
|
2283
2284
|
"datastoreWizard": {
|
|
2284
2285
|
"accessMode": "Մուտքի ռեժիմ"
|
|
@@ -2570,7 +2571,15 @@
|
|
|
2570
2571
|
"relativeThroughput": "Հարաբերական թողունակություն"
|
|
2571
2572
|
},
|
|
2572
2573
|
"scheduledTasks": {
|
|
2573
|
-
"chooseFrequency": "Ընտրեք հաճախականություն"
|
|
2574
|
+
"chooseFrequency": "Ընտրեք հաճախականություն",
|
|
2575
|
+
"scheduledDescription": "Պլանավորված նկարագրություն",
|
|
2576
|
+
"scheduledDetails": "Պլանավորված մանրամասներ",
|
|
2577
|
+
"emailNotification": "Էլփոստի ծանուցում",
|
|
2578
|
+
"historyLastRuns": "Վերջին 5 վազքի պատմություն",
|
|
2579
|
+
"duration": "Տևողությունը",
|
|
2580
|
+
"endTime": "Ավարտի ժամանակը",
|
|
2581
|
+
"result": "Արդյունք",
|
|
2582
|
+
"advancedSearch": "Ընդլայնված որոնում"
|
|
2574
2583
|
},
|
|
2575
2584
|
"license": {
|
|
2576
2585
|
"limits": "Limits",
|
|
@@ -2590,5 +2599,11 @@
|
|
|
2590
2599
|
"licenseName": "Լիցենզիայի անվանումը",
|
|
2591
2600
|
"newLicense": "Նոր լիցենզիա",
|
|
2592
2601
|
"noActiveLicense": "Ակտիվ լիցենզիա չկա"
|
|
2602
|
+
},
|
|
2603
|
+
"events": {
|
|
2604
|
+
"childs": "Երեխաների հետ",
|
|
2605
|
+
"tasks": "Առաջադրանքներով",
|
|
2606
|
+
"frontReqs": "Կանոնավոր խնդրանքներով",
|
|
2607
|
+
"related": "Առնչվող"
|
|
2593
2608
|
}
|
|
2594
2609
|
}
|
|
@@ -2277,7 +2277,8 @@
|
|
|
2277
2277
|
"inventoryConfigure": {
|
|
2278
2278
|
"acceptanceLevel": "қабылдау деңгейі",
|
|
2279
2279
|
"activeType": "Белсенді түрі",
|
|
2280
|
-
"services": "Қызметтер"
|
|
2280
|
+
"services": "Қызметтер",
|
|
2281
|
+
"selectTrigger": "Триггерді таңдау"
|
|
2281
2282
|
},
|
|
2282
2283
|
"datastoreWizard": {
|
|
2283
2284
|
"accessMode": "Қол жеткізу режимі"
|
|
@@ -2569,7 +2570,15 @@
|
|
|
2569
2570
|
"relativeThroughput": "Салыстырмалы өткізу қабілеті"
|
|
2570
2571
|
},
|
|
2571
2572
|
"scheduledTasks": {
|
|
2572
|
-
"chooseFrequency": "Жиілікті таңдаңыз"
|
|
2573
|
+
"chooseFrequency": "Жиілікті таңдаңыз",
|
|
2574
|
+
"scheduledDescription": "Жоспарланған сипаттама",
|
|
2575
|
+
"scheduledDetails": "Жоспарланған мәліметтер",
|
|
2576
|
+
"emailNotification": "Электрондық пошта хабарландыруы",
|
|
2577
|
+
"historyLastRuns": "Соңғы 5 жүгіру тарихы",
|
|
2578
|
+
"duration": "Ұзақтығы",
|
|
2579
|
+
"endTime": "Аяқталу уақыты",
|
|
2580
|
+
"result": "Нәтиже",
|
|
2581
|
+
"advancedSearch": "Кеңейтілген іздеу"
|
|
2573
2582
|
},
|
|
2574
2583
|
"license": {
|
|
2575
2584
|
"limits": "Limits",
|
|
@@ -2589,5 +2598,11 @@
|
|
|
2589
2598
|
"licenseName": "Лицензия атауы",
|
|
2590
2599
|
"newLicense": "Жаңа лицензия",
|
|
2591
2600
|
"noActiveLicense": "Белсенді лицензия жоқ"
|
|
2601
|
+
},
|
|
2602
|
+
"events": {
|
|
2603
|
+
"childs": "Балалармен",
|
|
2604
|
+
"tasks": "Тапсырмалармен",
|
|
2605
|
+
"frontReqs": "Тұрақты сұраныстармен",
|
|
2606
|
+
"related": "Қатысты"
|
|
2592
2607
|
}
|
|
2593
2608
|
}
|
|
@@ -2280,7 +2280,8 @@
|
|
|
2280
2280
|
"inventoryConfigure": {
|
|
2281
2281
|
"acceptanceLevel": "Уровень приемлемости",
|
|
2282
2282
|
"activeType": "Белсенді түрі",
|
|
2283
|
-
"services": "Сервисы"
|
|
2283
|
+
"services": "Сервисы",
|
|
2284
|
+
"selectTrigger": "Выберите триггер"
|
|
2284
2285
|
},
|
|
2285
2286
|
"datastoreWizard": {
|
|
2286
2287
|
"accessMode": "Режим доступа"
|
|
@@ -2572,7 +2573,15 @@
|
|
|
2572
2573
|
"relativeThroughput": "Относительная пропускная способность"
|
|
2573
2574
|
},
|
|
2574
2575
|
"scheduledTasks": {
|
|
2575
|
-
"chooseFrequency": "Выберите частоту"
|
|
2576
|
+
"chooseFrequency": "Выберите частоту",
|
|
2577
|
+
"scheduledDescription": "Запланированное описание",
|
|
2578
|
+
"scheduledDetails": "Запланированные детали",
|
|
2579
|
+
"emailNotification": "Уведомление по электронной почте",
|
|
2580
|
+
"historyLastRuns": "История последних 5 запусков",
|
|
2581
|
+
"duration": "Продолжительность",
|
|
2582
|
+
"endTime": "Время окончания",
|
|
2583
|
+
"result": "Результат",
|
|
2584
|
+
"advancedSearch": "Расширенный поиск"
|
|
2576
2585
|
},
|
|
2577
2586
|
"license": {
|
|
2578
2587
|
"limits": "Limits",
|
|
@@ -2592,5 +2601,11 @@
|
|
|
2592
2601
|
"licenseName": "Название лицензии",
|
|
2593
2602
|
"newLicense": "Новая лицензия",
|
|
2594
2603
|
"noActiveLicense": "Нету активной лицензии"
|
|
2604
|
+
},
|
|
2605
|
+
"events": {
|
|
2606
|
+
"childs": "C Потомками",
|
|
2607
|
+
"tasks": "C Тасками",
|
|
2608
|
+
"frontReqs": "C регулярными запросамы",
|
|
2609
|
+
"related": "Связанный"
|
|
2595
2610
|
}
|
|
2596
2611
|
}
|
|
@@ -2276,7 +2276,8 @@
|
|
|
2276
2276
|
"inventoryConfigure": {
|
|
2277
2277
|
"acceptanceLevel": "接受級別",
|
|
2278
2278
|
"activeType": "活动型",
|
|
2279
|
-
"services": "服务"
|
|
2279
|
+
"services": "服务",
|
|
2280
|
+
"selectTrigger": "选择触发器"
|
|
2280
2281
|
},
|
|
2281
2282
|
"datastoreWizard": {
|
|
2282
2283
|
"accessMode": "访问方式"
|
|
@@ -2568,7 +2569,15 @@
|
|
|
2568
2569
|
"relativeThroughput": "相对吞吐量"
|
|
2569
2570
|
},
|
|
2570
2571
|
"scheduledTasks": {
|
|
2571
|
-
"chooseFrequency": "选择频率"
|
|
2572
|
+
"chooseFrequency": "选择频率",
|
|
2573
|
+
"scheduledDescription": "预定说明",
|
|
2574
|
+
"scheduledDetails": "预定详情",
|
|
2575
|
+
"emailNotification": "电子邮件通知",
|
|
2576
|
+
"historyLastRuns": "最近 5 场比赛的历史记录",
|
|
2577
|
+
"duration": "期间",
|
|
2578
|
+
"endTime": "结束时间",
|
|
2579
|
+
"result": "结果",
|
|
2580
|
+
"advancedSearch": "高级搜索"
|
|
2572
2581
|
},
|
|
2573
2582
|
"license": {
|
|
2574
2583
|
"limits": "Limits",
|
|
@@ -2588,5 +2597,11 @@
|
|
|
2588
2597
|
"licenseName": "许可证名称",
|
|
2589
2598
|
"newLicense": "新许可证",
|
|
2590
2599
|
"noActiveLicense": "无有效许可证"
|
|
2600
|
+
},
|
|
2601
|
+
"events": {
|
|
2602
|
+
"childs": "与孩子们",
|
|
2603
|
+
"tasks": "有任务",
|
|
2604
|
+
"frontReqs": "定期提出要求",
|
|
2605
|
+
"related": "有关的"
|
|
2591
2606
|
}
|
|
2592
2607
|
}
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="combo-dropdown-content">
|
|
3
|
+
<div>
|
|
4
|
+
<div>
|
|
5
|
+
<div
|
|
6
|
+
:class="['alarm-trigger-combo-box dropdown', { open: isShowList }]"
|
|
7
|
+
@mouseenter="isHover = true"
|
|
8
|
+
@mouseleave="isHover = false"
|
|
9
|
+
>
|
|
10
|
+
<div class="select dropdown-toggle">
|
|
11
|
+
<input
|
|
12
|
+
v-model="selectedLocal"
|
|
13
|
+
:placeholder="localization.inventoryConfigure.selectTrigger"
|
|
14
|
+
:data-id="`${props.testId}-selected-field`"
|
|
15
|
+
type="text"
|
|
16
|
+
class="form-control dropdown-host"
|
|
17
|
+
@click="isShowList = !isShowList"
|
|
18
|
+
/>
|
|
19
|
+
</div>
|
|
20
|
+
<div v-if="isShowList" class="combo-dropdown-menu dropdown-menu">
|
|
21
|
+
<input
|
|
22
|
+
id="search-input"
|
|
23
|
+
v-model="search"
|
|
24
|
+
:data-id="`${props.testId}-search-field`"
|
|
25
|
+
type="search"
|
|
26
|
+
autocomplete="off"
|
|
27
|
+
maxlength="300"
|
|
28
|
+
class="form-control dropdown-search-box"
|
|
29
|
+
:placeholder="localization.common.search"
|
|
30
|
+
@input="onInputSearch"
|
|
31
|
+
/>
|
|
32
|
+
<div class="dropdown-result-holder">
|
|
33
|
+
<p v-if="search && !filteredData.length" class="empty-text">
|
|
34
|
+
<i>{{ localization.common.noItemsDisplay }}</i>
|
|
35
|
+
</p>
|
|
36
|
+
<div>
|
|
37
|
+
<div
|
|
38
|
+
v-for="(item, key) in filteredData"
|
|
39
|
+
:key="key"
|
|
40
|
+
:data-id="item.text"
|
|
41
|
+
:class="[
|
|
42
|
+
'clr-tree-node item-row dropdown-parent-item',
|
|
43
|
+
{ open: arrowKeys[key] },
|
|
44
|
+
{ searched: isSearched },
|
|
45
|
+
]"
|
|
46
|
+
>
|
|
47
|
+
<div
|
|
48
|
+
v-if="!isSearched"
|
|
49
|
+
class="clr-tree-node-content-container"
|
|
50
|
+
>
|
|
51
|
+
<button
|
|
52
|
+
:data-id="`${item.testId}-toggle-button`"
|
|
53
|
+
aria-hidden="true"
|
|
54
|
+
type="button"
|
|
55
|
+
class="clr-treenode-caret"
|
|
56
|
+
@click="arrowKeys[key] = !arrowKeys[key]"
|
|
57
|
+
>
|
|
58
|
+
<atoms-the-icon
|
|
59
|
+
:class="[
|
|
60
|
+
'trigger-icon clr-icon',
|
|
61
|
+
{ open: arrowKeys[key] },
|
|
62
|
+
]"
|
|
63
|
+
name="angle"
|
|
64
|
+
/>
|
|
65
|
+
</button>
|
|
66
|
+
<div class="clr-treenode-content item-title-content">
|
|
67
|
+
<b
|
|
68
|
+
:title="`${item.text} (${item.itemsCount})`"
|
|
69
|
+
class="dropdown-item-text category-name"
|
|
70
|
+
>
|
|
71
|
+
{{ item.text }} </b
|
|
72
|
+
><b
|
|
73
|
+
:title="`${item.text} (${item.itemsCount})`"
|
|
74
|
+
class="dropdown-item-text category-size"
|
|
75
|
+
>
|
|
76
|
+
({{ item.itemsCount }})</b
|
|
77
|
+
>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
<div
|
|
81
|
+
:class="[
|
|
82
|
+
'clr-treenode-children children-content',
|
|
83
|
+
{ open: arrowKeys[key] },
|
|
84
|
+
]"
|
|
85
|
+
>
|
|
86
|
+
<div
|
|
87
|
+
v-for="(item2, key2) in item.childs"
|
|
88
|
+
:key="key2"
|
|
89
|
+
:data-id="item2.testId"
|
|
90
|
+
class="clr-tree-node"
|
|
91
|
+
@click="onSelect(item2.value)"
|
|
92
|
+
>
|
|
93
|
+
<div class="clr-tree-node-content-container">
|
|
94
|
+
<div class="clr-treenode-content item-title-content">
|
|
95
|
+
<button
|
|
96
|
+
:title="item2.text"
|
|
97
|
+
:data-id="item2.text"
|
|
98
|
+
type="button"
|
|
99
|
+
class="btn-link dropdown-child-item"
|
|
100
|
+
>
|
|
101
|
+
<span :title="item2.text" class="dropdown-item-text"
|
|
102
|
+
>{{ item2.firstText }}<b>{{ item2.secondText }}</b
|
|
103
|
+
>{{ item2.thirdText }}</span
|
|
104
|
+
>
|
|
105
|
+
</button>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
</template>
|
|
119
|
+
|
|
120
|
+
<script setup lang="ts">
|
|
121
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
122
|
+
import type {
|
|
123
|
+
UI_I_ComboDropdown,
|
|
124
|
+
UI_I_ComboDropdownChild,
|
|
125
|
+
UI_I_ComboDropdownSearched,
|
|
126
|
+
UI_I_ComboDropdownSearchedItem,
|
|
127
|
+
} from '~/components/atoms/comboDropdownMenu/lib/models/interfaces'
|
|
128
|
+
|
|
129
|
+
const props = defineProps<{
|
|
130
|
+
selected: string
|
|
131
|
+
items: UI_I_ComboDropdown[]
|
|
132
|
+
testId: string
|
|
133
|
+
}>()
|
|
134
|
+
const emits = defineEmits<{
|
|
135
|
+
(event: 'select', value: string): void
|
|
136
|
+
}>()
|
|
137
|
+
|
|
138
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
139
|
+
|
|
140
|
+
const selectedLocal = ref<string>(props.selected)
|
|
141
|
+
watch(
|
|
142
|
+
() => props.selected,
|
|
143
|
+
(newValue) => {
|
|
144
|
+
selectedLocal.value = newValue
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
const search = ref<string>('')
|
|
148
|
+
const isSearched = ref<boolean>(false)
|
|
149
|
+
const onInputSearch = (): void => {
|
|
150
|
+
isSearched.value = !!search.value
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// New Function for search
|
|
154
|
+
// const text = ref<string>('Hello Worlds!')
|
|
155
|
+
// const searchQuery = ref<string>('')
|
|
156
|
+
//
|
|
157
|
+
// const highlightText = computed<string>((): any => {
|
|
158
|
+
// if (!searchQuery.value) return text.value
|
|
159
|
+
// const regex = new RegExp(`(${searchQuery.value})`, 'gi')
|
|
160
|
+
// return text.value.replace(regex, '<bold style="font-weight: 500">$1</bold>')
|
|
161
|
+
// })
|
|
162
|
+
const constructChildesBySearch = (
|
|
163
|
+
data: UI_I_ComboDropdownChild[]
|
|
164
|
+
): UI_I_ComboDropdownSearchedItem[] => {
|
|
165
|
+
if (!isSearched.value)
|
|
166
|
+
return data.map((item) => {
|
|
167
|
+
return {
|
|
168
|
+
text: item.text,
|
|
169
|
+
value: item.value,
|
|
170
|
+
firstText: item.text,
|
|
171
|
+
secondText: '',
|
|
172
|
+
thirdText: '',
|
|
173
|
+
testId: `${item.text}-child`,
|
|
174
|
+
}
|
|
175
|
+
})
|
|
176
|
+
|
|
177
|
+
const searchLower = search.value.toLowerCase()
|
|
178
|
+
const searchLength = searchLower.length
|
|
179
|
+
const result: UI_I_ComboDropdownSearchedItem[] = []
|
|
180
|
+
data.forEach((item) => {
|
|
181
|
+
const showTextLower = item.text.toLowerCase()
|
|
182
|
+
const showText = item.text
|
|
183
|
+
if (showTextLower.includes(searchLower)) {
|
|
184
|
+
const getIndex = showTextLower.indexOf(searchLower)
|
|
185
|
+
|
|
186
|
+
const newValue = {
|
|
187
|
+
text: item.text,
|
|
188
|
+
value: item.value,
|
|
189
|
+
firstText: showText.slice(0, getIndex),
|
|
190
|
+
secondText: showText.slice(getIndex, getIndex + searchLength),
|
|
191
|
+
thirdText: showText.slice(getIndex + searchLength, showText.length),
|
|
192
|
+
testId: `${item.text}-child`,
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
result.push(newValue)
|
|
196
|
+
}
|
|
197
|
+
})
|
|
198
|
+
return result
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const filteredData = computed<UI_I_ComboDropdownSearched[]>(() => {
|
|
202
|
+
const result: UI_I_ComboDropdownSearched[] = []
|
|
203
|
+
|
|
204
|
+
props.items.forEach((item) => {
|
|
205
|
+
const filteredChilds = constructChildesBySearch(item.childs)
|
|
206
|
+
|
|
207
|
+
if (filteredChilds.length)
|
|
208
|
+
result.push({
|
|
209
|
+
text: item.text,
|
|
210
|
+
itemsCount: item.itemsCount,
|
|
211
|
+
childs: filteredChilds,
|
|
212
|
+
testId: item.testId,
|
|
213
|
+
})
|
|
214
|
+
})
|
|
215
|
+
return result
|
|
216
|
+
})
|
|
217
|
+
|
|
218
|
+
const arrowKeys = ref<boolean[]>([])
|
|
219
|
+
watch(
|
|
220
|
+
() => props.items,
|
|
221
|
+
(newValue) => {
|
|
222
|
+
if (!newValue.length) return
|
|
223
|
+
|
|
224
|
+
newValue.forEach((_, key) => {
|
|
225
|
+
const currentValue = key === 0
|
|
226
|
+
arrowKeys.value.push(currentValue)
|
|
227
|
+
})
|
|
228
|
+
},
|
|
229
|
+
{ immediate: true, deep: true }
|
|
230
|
+
)
|
|
231
|
+
|
|
232
|
+
const isShowList = ref<boolean>(false)
|
|
233
|
+
watch(isShowList, (newValue) => {
|
|
234
|
+
if (!newValue) {
|
|
235
|
+
isSearched.value = false
|
|
236
|
+
return
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
setTimeout(() => {
|
|
240
|
+
document.getElementById('search-input')?.focus()
|
|
241
|
+
}, 0)
|
|
242
|
+
selectedLocal.value && (search.value = selectedLocal.value)
|
|
243
|
+
})
|
|
244
|
+
const isHover = ref<boolean>(false)
|
|
245
|
+
|
|
246
|
+
const hideMenu = (force?: boolean): void => {
|
|
247
|
+
if (isHover.value && !force) return
|
|
248
|
+
|
|
249
|
+
isShowList.value = false
|
|
250
|
+
}
|
|
251
|
+
const windowClick = (): void => {
|
|
252
|
+
hideMenu()
|
|
253
|
+
}
|
|
254
|
+
const windowScroll = (): void => {
|
|
255
|
+
hideMenu()
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
const onSelect = (value: string): void => {
|
|
259
|
+
emits('select', value)
|
|
260
|
+
hideMenu(true)
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
onMounted(() => {
|
|
264
|
+
window.addEventListener('click', windowClick)
|
|
265
|
+
window.addEventListener('scroll', windowScroll, true)
|
|
266
|
+
})
|
|
267
|
+
onUnmounted(() => {
|
|
268
|
+
window.removeEventListener('click', windowClick)
|
|
269
|
+
window.removeEventListener('scroll', windowScroll)
|
|
270
|
+
})
|
|
271
|
+
</script>
|
|
272
|
+
|
|
273
|
+
<style scoped lang="scss">
|
|
274
|
+
.combo-dropdown-content {
|
|
275
|
+
.alarm-trigger-combo-box {
|
|
276
|
+
position: static;
|
|
277
|
+
|
|
278
|
+
.combo-dropdown-menu {
|
|
279
|
+
position: absolute;
|
|
280
|
+
inset: 0 auto auto 0;
|
|
281
|
+
transform: translateX(15px) translateY(24px);
|
|
282
|
+
margin-top: -15px;
|
|
283
|
+
width: 30rem;
|
|
284
|
+
|
|
285
|
+
#search-input {
|
|
286
|
+
margin: 5px 2px 3px;
|
|
287
|
+
width: calc(100% - 4px);
|
|
288
|
+
height: 34px;
|
|
289
|
+
padding: 6px 12px;
|
|
290
|
+
color: #333;
|
|
291
|
+
font-size: 13px;
|
|
292
|
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
|
293
|
+
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
|
|
294
|
+
border: 1px solid #949494;
|
|
295
|
+
background-image: none;
|
|
296
|
+
|
|
297
|
+
&:focus {
|
|
298
|
+
outline: none;
|
|
299
|
+
border-color: #3cf;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
.dropdown-result-holder {
|
|
303
|
+
padding-top: 10px;
|
|
304
|
+
max-height: 18rem;
|
|
305
|
+
overflow-x: hidden;
|
|
306
|
+
overflow-y: auto;
|
|
307
|
+
|
|
308
|
+
.empty-text {
|
|
309
|
+
padding: 0 0.24rem 1.2rem 0.72rem;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.dropdown-parent-item {
|
|
313
|
+
&.open {
|
|
314
|
+
&.searched {
|
|
315
|
+
.children-content {
|
|
316
|
+
.item-title-content {
|
|
317
|
+
.dropdown-child-item {
|
|
318
|
+
padding-left: 14px;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.trigger-icon {
|
|
325
|
+
transform: rotate(180deg);
|
|
326
|
+
}
|
|
327
|
+
.children-content {
|
|
328
|
+
overflow-y: visible;
|
|
329
|
+
height: auto;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.trigger-icon {
|
|
334
|
+
transform: rotate(90deg);
|
|
335
|
+
}
|
|
336
|
+
.children-content {
|
|
337
|
+
overflow-x: hidden;
|
|
338
|
+
margin-left: 0;
|
|
339
|
+
height: 0;
|
|
340
|
+
overflow-y: visible;
|
|
341
|
+
|
|
342
|
+
.item-title-content {
|
|
343
|
+
&:first-child {
|
|
344
|
+
padding-left: 0;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.dropdown-child-item {
|
|
348
|
+
padding-left: 28px;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
</style>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface UI_I_ComboDropdownChild {
|
|
2
|
+
text: string
|
|
3
|
+
value: string
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface UI_I_ComboDropdown {
|
|
7
|
+
text: string
|
|
8
|
+
itemsCount: number
|
|
9
|
+
childs: UI_I_ComboDropdownChild[]
|
|
10
|
+
testId: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface UI_I_ComboDropdownSearchedItem {
|
|
14
|
+
text: string
|
|
15
|
+
firstText: string
|
|
16
|
+
secondText: string
|
|
17
|
+
thirdText: string
|
|
18
|
+
testId: string
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface UI_I_ComboDropdownSearched {
|
|
22
|
+
text: string
|
|
23
|
+
itemsCount: number
|
|
24
|
+
childs: UI_I_ComboDropdownSearchedItem[]
|
|
25
|
+
testId: string
|
|
26
|
+
}
|