bfg-common 1.4.90 → 1.4.92
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.
|
@@ -1,56 +1,60 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<ui-tooltip
|
|
3
|
-
id="tooltip-theme-mode-toggle-button"
|
|
4
|
-
test-id="tooltip-theme-mode-toggle-button"
|
|
5
|
-
size="sm"
|
|
6
|
-
position="bottom"
|
|
7
|
-
position-by-tooltip="left"
|
|
8
|
-
menu
|
|
9
|
-
>
|
|
10
|
-
<template #target>
|
|
11
|
-
<div
|
|
12
|
-
id="tooltip-theme-mode-toggle-button"
|
|
13
|
-
class="popped tooltip inline-block"
|
|
14
|
-
>
|
|
15
|
-
<ui-switch v-model="model" size="md" dark>
|
|
16
|
-
<template #rightIcon>
|
|
17
|
-
<ui-icon name="light-theme" width="14" height="14" />
|
|
18
|
-
</template>
|
|
19
|
-
<template #leftIcon>
|
|
20
|
-
<ui-icon name="dark-theme" width="14" height="14" />
|
|
21
|
-
</template>
|
|
22
|
-
</ui-switch>
|
|
23
|
-
</div>
|
|
24
|
-
</template>
|
|
25
|
-
<template #content>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
}>()
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
)
|
|
56
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<ui-tooltip
|
|
3
|
+
id="tooltip-theme-mode-toggle-button"
|
|
4
|
+
test-id="tooltip-theme-mode-toggle-button"
|
|
5
|
+
size="sm"
|
|
6
|
+
position="bottom"
|
|
7
|
+
position-by-tooltip="left"
|
|
8
|
+
menu
|
|
9
|
+
>
|
|
10
|
+
<template #target>
|
|
11
|
+
<div
|
|
12
|
+
id="tooltip-theme-mode-toggle-button"
|
|
13
|
+
class="popped tooltip inline-block"
|
|
14
|
+
>
|
|
15
|
+
<ui-switch v-model="model" size="md" dark>
|
|
16
|
+
<template #rightIcon>
|
|
17
|
+
<ui-icon name="light-theme" width="14" height="14" />
|
|
18
|
+
</template>
|
|
19
|
+
<template #leftIcon>
|
|
20
|
+
<ui-icon name="dark-theme" width="14" height="14" />
|
|
21
|
+
</template>
|
|
22
|
+
</ui-switch>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
<template #content>
|
|
26
|
+
<span class="text-nowrap">
|
|
27
|
+
{{ tooltipText }}
|
|
28
|
+
</span>
|
|
29
|
+
</template>
|
|
30
|
+
</ui-tooltip>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script setup lang="ts">
|
|
34
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
35
|
+
|
|
36
|
+
const props = defineProps<{
|
|
37
|
+
isDarkTheme: boolean
|
|
38
|
+
}>()
|
|
39
|
+
|
|
40
|
+
const emits = defineEmits<{
|
|
41
|
+
(event: 'change-theme-mode'): void
|
|
42
|
+
}>()
|
|
43
|
+
|
|
44
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
45
|
+
|
|
46
|
+
const model = computed<boolean>({
|
|
47
|
+
get() {
|
|
48
|
+
return props.isDarkTheme
|
|
49
|
+
},
|
|
50
|
+
set() {
|
|
51
|
+
emits('change-theme-mode')
|
|
52
|
+
},
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
const tooltipText = computed<string>(() =>
|
|
56
|
+
model.value
|
|
57
|
+
? localization.value.common.darkMode
|
|
58
|
+
: localization.value.common.lightMode
|
|
59
|
+
)
|
|
60
|
+
</script>
|
|
@@ -1,170 +1,176 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="help-menu-content">
|
|
3
|
-
<ui-tooltip
|
|
4
|
-
id="tooltip-help-menu-dropdown-toggle"
|
|
5
|
-
test-id="tooltip-help-menu-dropdown-toggle"
|
|
6
|
-
size="sm"
|
|
7
|
-
position="bottom"
|
|
8
|
-
position-by-tooltip="left"
|
|
9
|
-
menu
|
|
10
|
-
>
|
|
11
|
-
<template #target>
|
|
12
|
-
<div
|
|
13
|
-
id="tooltip-help-menu-dropdown-toggle"
|
|
14
|
-
class="popped tooltip inline-block"
|
|
15
|
-
>
|
|
16
|
-
<button
|
|
17
|
-
id="help-menu-dropdown-toggle"
|
|
18
|
-
data-id="help-menu-dropdown-toggle"
|
|
19
|
-
class="help-menu-dropdown-toggle"
|
|
20
|
-
@click="isShowDropdown = !isShowDropdown"
|
|
21
|
-
>
|
|
22
|
-
<span class="help-icon-container">
|
|
23
|
-
<ui-icon-main-navigation-panel
|
|
24
|
-
name="icon-help"
|
|
25
|
-
width="24"
|
|
26
|
-
height="24"
|
|
27
|
-
/>
|
|
28
|
-
</span>
|
|
29
|
-
<span class="arrow-icon-container">
|
|
30
|
-
<ui-icon name="arrow2" width="16" height="8" />
|
|
31
|
-
</span>
|
|
32
|
-
</button>
|
|
33
|
-
</div>
|
|
34
|
-
</template>
|
|
35
|
-
<template #content>
|
|
36
|
-
{{ localization.mainNavigation.help }}
|
|
37
|
-
</template>
|
|
38
|
-
</ui-tooltip>
|
|
39
|
-
</div>
|
|
40
|
-
<ui-dropdown
|
|
41
|
-
test-id="help-menu-dropdown"
|
|
42
|
-
:show="isShowDropdown"
|
|
43
|
-
:items="dropdownItems"
|
|
44
|
-
width="max-content"
|
|
45
|
-
elem-id="help-menu-dropdown-toggle"
|
|
46
|
-
@select="onSelectDropdown"
|
|
47
|
-
@hide="onHideDropdown"
|
|
48
|
-
>
|
|
49
|
-
<template #row="{ item }">
|
|
50
|
-
<a
|
|
51
|
-
:id="item.testId"
|
|
52
|
-
:data-id="item.testId"
|
|
53
|
-
class="w-full flex items-center dropdown-item"
|
|
54
|
-
>
|
|
55
|
-
<span v-if="item.iconName === 'icon-help'" class="flex ui-item-text">
|
|
56
|
-
<ui-icon-main-navigation-panel
|
|
57
|
-
:name="item.iconName"
|
|
58
|
-
width="16"
|
|
59
|
-
height="16"
|
|
60
|
-
/>
|
|
61
|
-
</span>
|
|
62
|
-
<span v-if="item.iconName === 'info'" class="flex ui-item-text">
|
|
63
|
-
<ui-icon :name="item.iconName" width="16" height="16" />
|
|
64
|
-
</span>
|
|
65
|
-
<span v-if="item.iconName === 'comment'" class="flex ui-item-text">
|
|
66
|
-
<ui-icon :name="item.iconName" width="16" height="16" />
|
|
67
|
-
</span>
|
|
68
|
-
<p class="ui-item-text truncate text-sm font-medium mt-0 mb-0 ml-2">
|
|
69
|
-
{{ item.text }}
|
|
70
|
-
</p>
|
|
71
|
-
</a>
|
|
72
|
-
</template>
|
|
73
|
-
</ui-dropdown>
|
|
74
|
-
|
|
75
|
-
<common-layout-the-header-feedback
|
|
76
|
-
:is-show-feedback="isShowFeedback"
|
|
77
|
-
@show="isShowFeedback = true"
|
|
78
|
-
@hide="isShowFeedback = false"
|
|
79
|
-
/>
|
|
80
|
-
</template>
|
|
81
|
-
|
|
82
|
-
<script setup lang="ts">
|
|
83
|
-
import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
|
|
84
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
85
|
-
import { helpMenuFunc } from '~/components/common/layout/theHeader/helpMenu/helpMenuNew/lib/config/dropMenu'
|
|
86
|
-
|
|
87
|
-
const emits = defineEmits<{
|
|
88
|
-
(event: 'select-dropdown', value: string): void
|
|
89
|
-
}>()
|
|
90
|
-
|
|
91
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
92
|
-
|
|
93
|
-
const isShowFeedback = ref<boolean>(false)
|
|
94
|
-
|
|
95
|
-
const isShowDropdown = ref<boolean>(false)
|
|
96
|
-
const dropdownItems = computed<UI_I_Dropdown[]>(() =>
|
|
97
|
-
helpMenuFunc(localization.value)
|
|
98
|
-
)
|
|
99
|
-
|
|
100
|
-
const onHideDropdown = (): void => {
|
|
101
|
-
isShowDropdown.value = false
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
const onSelectDropdown = (value: string): void => {
|
|
105
|
-
switch (value) {
|
|
106
|
-
case 'sendFeedback':
|
|
107
|
-
isShowFeedback.value = true
|
|
108
|
-
break
|
|
109
|
-
default:
|
|
110
|
-
emits('select-dropdown', value)
|
|
111
|
-
}
|
|
112
|
-
onHideDropdown()
|
|
113
|
-
}
|
|
114
|
-
</script>
|
|
115
|
-
|
|
116
|
-
<style scoped lang="scss">
|
|
117
|
-
.help-menu-content {
|
|
118
|
-
.help-menu-dropdown-toggle {
|
|
119
|
-
border: unset;
|
|
120
|
-
padding: 0;
|
|
121
|
-
outline: unset;
|
|
122
|
-
background: transparent;
|
|
123
|
-
cursor: pointer;
|
|
124
|
-
display: flex;
|
|
125
|
-
align-items: center;
|
|
126
|
-
|
|
127
|
-
&:hover {
|
|
128
|
-
.help-icon-container {
|
|
129
|
-
:deep(svg) {
|
|
130
|
-
color: #ffffff;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
.arrow-icon-container {
|
|
134
|
-
color: #ffffff;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.help-icon-container {
|
|
139
|
-
display: flex;
|
|
140
|
-
margin-right: 10px;
|
|
141
|
-
|
|
142
|
-
:deep(svg) {
|
|
143
|
-
color: #d3d6da;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
.arrow-icon-container {
|
|
147
|
-
display: flex;
|
|
148
|
-
transform: rotate(90deg);
|
|
149
|
-
color: #d3d6da;
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}
|
|
170
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="help-menu-content">
|
|
3
|
+
<ui-tooltip
|
|
4
|
+
id="tooltip-help-menu-dropdown-toggle"
|
|
5
|
+
test-id="tooltip-help-menu-dropdown-toggle"
|
|
6
|
+
size="sm"
|
|
7
|
+
position="bottom"
|
|
8
|
+
position-by-tooltip="left"
|
|
9
|
+
menu
|
|
10
|
+
>
|
|
11
|
+
<template #target>
|
|
12
|
+
<div
|
|
13
|
+
id="tooltip-help-menu-dropdown-toggle"
|
|
14
|
+
class="popped tooltip inline-block"
|
|
15
|
+
>
|
|
16
|
+
<button
|
|
17
|
+
id="help-menu-dropdown-toggle"
|
|
18
|
+
data-id="help-menu-dropdown-toggle"
|
|
19
|
+
class="help-menu-dropdown-toggle"
|
|
20
|
+
@click="isShowDropdown = !isShowDropdown"
|
|
21
|
+
>
|
|
22
|
+
<span class="help-icon-container">
|
|
23
|
+
<ui-icon-main-navigation-panel
|
|
24
|
+
name="icon-help"
|
|
25
|
+
width="24"
|
|
26
|
+
height="24"
|
|
27
|
+
/>
|
|
28
|
+
</span>
|
|
29
|
+
<span :class="['arrow-icon-container', { active: isShowDropdown }]">
|
|
30
|
+
<ui-icon name="arrow2" width="16" height="8" />
|
|
31
|
+
</span>
|
|
32
|
+
</button>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
35
|
+
<template #content>
|
|
36
|
+
{{ localization.mainNavigation.help }}
|
|
37
|
+
</template>
|
|
38
|
+
</ui-tooltip>
|
|
39
|
+
</div>
|
|
40
|
+
<ui-dropdown
|
|
41
|
+
test-id="help-menu-dropdown"
|
|
42
|
+
:show="isShowDropdown"
|
|
43
|
+
:items="dropdownItems"
|
|
44
|
+
width="max-content"
|
|
45
|
+
elem-id="help-menu-dropdown-toggle"
|
|
46
|
+
@select="onSelectDropdown"
|
|
47
|
+
@hide="onHideDropdown"
|
|
48
|
+
>
|
|
49
|
+
<template #row="{ item }">
|
|
50
|
+
<a
|
|
51
|
+
:id="item.testId"
|
|
52
|
+
:data-id="item.testId"
|
|
53
|
+
class="w-full flex items-center dropdown-item"
|
|
54
|
+
>
|
|
55
|
+
<span v-if="item.iconName === 'icon-help'" class="flex ui-item-text">
|
|
56
|
+
<ui-icon-main-navigation-panel
|
|
57
|
+
:name="item.iconName"
|
|
58
|
+
width="16"
|
|
59
|
+
height="16"
|
|
60
|
+
/>
|
|
61
|
+
</span>
|
|
62
|
+
<span v-if="item.iconName === 'info'" class="flex ui-item-text">
|
|
63
|
+
<ui-icon :name="item.iconName" width="16" height="16" />
|
|
64
|
+
</span>
|
|
65
|
+
<span v-if="item.iconName === 'comment'" class="flex ui-item-text">
|
|
66
|
+
<ui-icon :name="item.iconName" width="16" height="16" />
|
|
67
|
+
</span>
|
|
68
|
+
<p class="ui-item-text truncate text-sm font-medium mt-0 mb-0 ml-2">
|
|
69
|
+
{{ item.text }}
|
|
70
|
+
</p>
|
|
71
|
+
</a>
|
|
72
|
+
</template>
|
|
73
|
+
</ui-dropdown>
|
|
74
|
+
|
|
75
|
+
<common-layout-the-header-feedback
|
|
76
|
+
:is-show-feedback="isShowFeedback"
|
|
77
|
+
@show="isShowFeedback = true"
|
|
78
|
+
@hide="isShowFeedback = false"
|
|
79
|
+
/>
|
|
80
|
+
</template>
|
|
81
|
+
|
|
82
|
+
<script setup lang="ts">
|
|
83
|
+
import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
|
|
84
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
85
|
+
import { helpMenuFunc } from '~/components/common/layout/theHeader/helpMenu/helpMenuNew/lib/config/dropMenu'
|
|
86
|
+
|
|
87
|
+
const emits = defineEmits<{
|
|
88
|
+
(event: 'select-dropdown', value: string): void
|
|
89
|
+
}>()
|
|
90
|
+
|
|
91
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
92
|
+
|
|
93
|
+
const isShowFeedback = ref<boolean>(false)
|
|
94
|
+
|
|
95
|
+
const isShowDropdown = ref<boolean>(false)
|
|
96
|
+
const dropdownItems = computed<UI_I_Dropdown[]>(() =>
|
|
97
|
+
helpMenuFunc(localization.value)
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
const onHideDropdown = (): void => {
|
|
101
|
+
isShowDropdown.value = false
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const onSelectDropdown = (value: string): void => {
|
|
105
|
+
switch (value) {
|
|
106
|
+
case 'sendFeedback':
|
|
107
|
+
isShowFeedback.value = true
|
|
108
|
+
break
|
|
109
|
+
default:
|
|
110
|
+
emits('select-dropdown', value)
|
|
111
|
+
}
|
|
112
|
+
onHideDropdown()
|
|
113
|
+
}
|
|
114
|
+
</script>
|
|
115
|
+
|
|
116
|
+
<style scoped lang="scss">
|
|
117
|
+
.help-menu-content {
|
|
118
|
+
.help-menu-dropdown-toggle {
|
|
119
|
+
border: unset;
|
|
120
|
+
padding: 0;
|
|
121
|
+
outline: unset;
|
|
122
|
+
background: transparent;
|
|
123
|
+
cursor: pointer;
|
|
124
|
+
display: flex;
|
|
125
|
+
align-items: center;
|
|
126
|
+
|
|
127
|
+
&:hover {
|
|
128
|
+
.help-icon-container {
|
|
129
|
+
:deep(svg) {
|
|
130
|
+
color: #ffffff;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
.arrow-icon-container {
|
|
134
|
+
color: #ffffff;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.help-icon-container {
|
|
139
|
+
display: flex;
|
|
140
|
+
margin-right: 10px;
|
|
141
|
+
|
|
142
|
+
:deep(svg) {
|
|
143
|
+
color: #d3d6da;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
.arrow-icon-container {
|
|
147
|
+
display: flex;
|
|
148
|
+
transform: rotate(90deg);
|
|
149
|
+
color: #d3d6da;
|
|
150
|
+
|
|
151
|
+
&.active {
|
|
152
|
+
transform: rotate(270deg);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
:deep(span.nav-icon) {
|
|
158
|
+
padding: 0 !important;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
#ui-popup-window-help-menu-dropdown-toggle {
|
|
162
|
+
margin-top: 17px;
|
|
163
|
+
}
|
|
164
|
+
#dropdown-help-menu-dropdown {
|
|
165
|
+
.ui-dropdown-menu-item {
|
|
166
|
+
&:hover {
|
|
167
|
+
.ui-item-text {
|
|
168
|
+
color: var(--dropdown-item-hover-color);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
.ui-item-text {
|
|
172
|
+
color: var(--dropdown-item-color);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
</style>
|
|
@@ -1,143 +1,154 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="user-menu-content">
|
|
3
|
-
<ui-tooltip
|
|
4
|
-
id="tooltip-user-menu-dropdown-toggle"
|
|
5
|
-
test-id="tooltip-user-menu-dropdown-toggle"
|
|
6
|
-
size="sm"
|
|
7
|
-
position="bottom"
|
|
8
|
-
position-by-tooltip="left"
|
|
9
|
-
menu
|
|
10
|
-
>
|
|
11
|
-
<template #target>
|
|
12
|
-
<div
|
|
13
|
-
id="tooltip-user-menu-dropdown-toggle"
|
|
14
|
-
class="popped tooltip inline-block"
|
|
15
|
-
>
|
|
16
|
-
<button
|
|
17
|
-
id="user-menu-dropdown-toggle"
|
|
18
|
-
data-id="user-menu-dropdown-toggle"
|
|
19
|
-
class="user-menu-dropdown-toggle"
|
|
20
|
-
@click="isShowDropdown = !isShowDropdown"
|
|
21
|
-
>
|
|
22
|
-
<span class="user-icon-container">
|
|
23
|
-
<ui-icon-icon3 name="user-icon" width="24" height="24" />
|
|
24
|
-
</span>
|
|
25
|
-
<span class="title">{{ props.hostname }}</span>
|
|
26
|
-
<span class="arrow-icon-container">
|
|
27
|
-
<ui-icon name="arrow2" width="16" height="8" />
|
|
28
|
-
</span>
|
|
29
|
-
</button>
|
|
30
|
-
</div>
|
|
31
|
-
</template>
|
|
32
|
-
<template #content>
|
|
33
|
-
{{ localization.mainNavigation.myAccount }}
|
|
34
|
-
</template>
|
|
35
|
-
</ui-tooltip>
|
|
36
|
-
</div>
|
|
37
|
-
<ui-dropdown
|
|
38
|
-
test-id="user-menu-dropdown"
|
|
39
|
-
:show="isShowDropdown"
|
|
40
|
-
:items="dropdownItems"
|
|
41
|
-
width="max-content"
|
|
42
|
-
elem-id="user-menu-dropdown-toggle"
|
|
43
|
-
@select="onSelectDropdown"
|
|
44
|
-
@hide="onHideDropdown"
|
|
45
|
-
>
|
|
46
|
-
<template #row="{ item }">
|
|
47
|
-
<a
|
|
48
|
-
:id="item.testId"
|
|
49
|
-
:data-id="item.testId"
|
|
50
|
-
:class="['w-full flex items-center dropdown-item', item.iconName]"
|
|
51
|
-
>
|
|
52
|
-
<span v-if="item.iconName === 'lock'" class="flex ui-item-text">
|
|
53
|
-
<ui-icon-icon3 :name="item.iconName" width="18" height="18" />
|
|
54
|
-
</span>
|
|
55
|
-
<span v-if="item.iconName === 'info'" class="flex ui-item-text">
|
|
56
|
-
<ui-icon :name="item.iconName" width="18" height="18" />
|
|
57
|
-
</span>
|
|
58
|
-
<span v-if="item.iconName === 'logout'" class="flex ui-item-text">
|
|
59
|
-
<ui-icon :name="item.iconName" width="18" height="18" />
|
|
60
|
-
</span>
|
|
61
|
-
<p class="ui-item-text truncate text-sm font-medium mt-0 mb-0 ml-2">
|
|
62
|
-
{{ item.text }}
|
|
63
|
-
</p>
|
|
64
|
-
</a>
|
|
65
|
-
</template>
|
|
66
|
-
</ui-dropdown>
|
|
67
|
-
</template>
|
|
68
|
-
|
|
69
|
-
<script setup lang="ts">
|
|
70
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
71
|
-
import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
|
|
72
|
-
import { userMenuFunc } from '~/components/common/layout/theHeader/userMenu/userMenuNew/lib/config/dropMenu'
|
|
73
|
-
|
|
74
|
-
const props = defineProps<{
|
|
75
|
-
hostname: string
|
|
76
|
-
}>()
|
|
77
|
-
|
|
78
|
-
const emits = defineEmits<{
|
|
79
|
-
(event: 'select-dropdown', value: string): void
|
|
80
|
-
}>()
|
|
81
|
-
|
|
82
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
83
|
-
|
|
84
|
-
const isShowDropdown = ref<boolean>(false)
|
|
85
|
-
|
|
86
|
-
const dropdownItems = computed<UI_I_Dropdown[]>(() =>
|
|
87
|
-
userMenuFunc(localization.value)
|
|
88
|
-
)
|
|
89
|
-
|
|
90
|
-
const onHideDropdown = (): void => {
|
|
91
|
-
isShowDropdown.value = false
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
const onSelectDropdown = (value: string): void => {
|
|
95
|
-
emits('select-dropdown', value)
|
|
96
|
-
onHideDropdown()
|
|
97
|
-
}
|
|
98
|
-
</script>
|
|
99
|
-
|
|
100
|
-
<style lang="scss">
|
|
101
|
-
.user-menu-content {
|
|
102
|
-
.user-menu-dropdown-toggle {
|
|
103
|
-
border: unset;
|
|
104
|
-
padding: 0;
|
|
105
|
-
outline: unset;
|
|
106
|
-
background: transparent;
|
|
107
|
-
cursor: pointer;
|
|
108
|
-
display: flex;
|
|
109
|
-
align-items: center;
|
|
110
|
-
grid-gap: 10px;
|
|
111
|
-
color: #d3d6da;
|
|
112
|
-
|
|
113
|
-
&:hover {
|
|
114
|
-
color: #ffffff;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.title {
|
|
118
|
-
font-size: 14px;
|
|
119
|
-
font-weight: 400;
|
|
120
|
-
font-family: 'Inter';
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.arrow-icon-container {
|
|
124
|
-
display: flex;
|
|
125
|
-
transform: rotate(90deg);
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="user-menu-content">
|
|
3
|
+
<ui-tooltip
|
|
4
|
+
id="tooltip-user-menu-dropdown-toggle"
|
|
5
|
+
test-id="tooltip-user-menu-dropdown-toggle"
|
|
6
|
+
size="sm"
|
|
7
|
+
position="bottom"
|
|
8
|
+
position-by-tooltip="left"
|
|
9
|
+
menu
|
|
10
|
+
>
|
|
11
|
+
<template #target>
|
|
12
|
+
<div
|
|
13
|
+
id="tooltip-user-menu-dropdown-toggle"
|
|
14
|
+
class="popped tooltip inline-block"
|
|
15
|
+
>
|
|
16
|
+
<button
|
|
17
|
+
id="user-menu-dropdown-toggle"
|
|
18
|
+
data-id="user-menu-dropdown-toggle"
|
|
19
|
+
class="user-menu-dropdown-toggle"
|
|
20
|
+
@click="isShowDropdown = !isShowDropdown"
|
|
21
|
+
>
|
|
22
|
+
<span class="user-icon-container">
|
|
23
|
+
<ui-icon-icon3 name="user-icon" width="24" height="24" />
|
|
24
|
+
</span>
|
|
25
|
+
<span class="title">{{ props.hostname }}</span>
|
|
26
|
+
<span :class="['arrow-icon-container', { active: isShowDropdown }]">
|
|
27
|
+
<ui-icon name="arrow2" width="16" height="8" />
|
|
28
|
+
</span>
|
|
29
|
+
</button>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
<template #content>
|
|
33
|
+
{{ localization.mainNavigation.myAccount }}
|
|
34
|
+
</template>
|
|
35
|
+
</ui-tooltip>
|
|
36
|
+
</div>
|
|
37
|
+
<ui-dropdown
|
|
38
|
+
test-id="user-menu-dropdown"
|
|
39
|
+
:show="isShowDropdown"
|
|
40
|
+
:items="dropdownItems"
|
|
41
|
+
width="max-content"
|
|
42
|
+
elem-id="user-menu-dropdown-toggle"
|
|
43
|
+
@select="onSelectDropdown"
|
|
44
|
+
@hide="onHideDropdown"
|
|
45
|
+
>
|
|
46
|
+
<template #row="{ item }">
|
|
47
|
+
<a
|
|
48
|
+
:id="item.testId"
|
|
49
|
+
:data-id="item.testId"
|
|
50
|
+
:class="['w-full flex items-center dropdown-item', item.iconName]"
|
|
51
|
+
>
|
|
52
|
+
<span v-if="item.iconName === 'lock'" class="flex ui-item-text">
|
|
53
|
+
<ui-icon-icon3 :name="item.iconName" width="18" height="18" />
|
|
54
|
+
</span>
|
|
55
|
+
<span v-if="item.iconName === 'info'" class="flex ui-item-text">
|
|
56
|
+
<ui-icon :name="item.iconName" width="18" height="18" />
|
|
57
|
+
</span>
|
|
58
|
+
<span v-if="item.iconName === 'logout'" class="flex ui-item-text">
|
|
59
|
+
<ui-icon :name="item.iconName" width="18" height="18" />
|
|
60
|
+
</span>
|
|
61
|
+
<p class="ui-item-text truncate text-sm font-medium mt-0 mb-0 ml-2">
|
|
62
|
+
{{ item.text }}
|
|
63
|
+
</p>
|
|
64
|
+
</a>
|
|
65
|
+
</template>
|
|
66
|
+
</ui-dropdown>
|
|
67
|
+
</template>
|
|
68
|
+
|
|
69
|
+
<script setup lang="ts">
|
|
70
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
71
|
+
import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
|
|
72
|
+
import { userMenuFunc } from '~/components/common/layout/theHeader/userMenu/userMenuNew/lib/config/dropMenu'
|
|
73
|
+
|
|
74
|
+
const props = defineProps<{
|
|
75
|
+
hostname: string
|
|
76
|
+
}>()
|
|
77
|
+
|
|
78
|
+
const emits = defineEmits<{
|
|
79
|
+
(event: 'select-dropdown', value: string): void
|
|
80
|
+
}>()
|
|
81
|
+
|
|
82
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
83
|
+
|
|
84
|
+
const isShowDropdown = ref<boolean>(false)
|
|
85
|
+
|
|
86
|
+
const dropdownItems = computed<UI_I_Dropdown[]>(() =>
|
|
87
|
+
userMenuFunc(localization.value)
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
const onHideDropdown = (): void => {
|
|
91
|
+
isShowDropdown.value = false
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const onSelectDropdown = (value: string): void => {
|
|
95
|
+
emits('select-dropdown', value)
|
|
96
|
+
onHideDropdown()
|
|
97
|
+
}
|
|
98
|
+
</script>
|
|
99
|
+
|
|
100
|
+
<style lang="scss">
|
|
101
|
+
.user-menu-content {
|
|
102
|
+
.user-menu-dropdown-toggle {
|
|
103
|
+
border: unset;
|
|
104
|
+
padding: 0;
|
|
105
|
+
outline: unset;
|
|
106
|
+
background: transparent;
|
|
107
|
+
cursor: pointer;
|
|
108
|
+
display: flex;
|
|
109
|
+
align-items: center;
|
|
110
|
+
grid-gap: 10px;
|
|
111
|
+
color: #d3d6da;
|
|
112
|
+
|
|
113
|
+
&:hover {
|
|
114
|
+
color: #ffffff;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.title {
|
|
118
|
+
font-size: 14px;
|
|
119
|
+
font-weight: 400;
|
|
120
|
+
font-family: 'Inter';
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.arrow-icon-container {
|
|
124
|
+
display: flex;
|
|
125
|
+
transform: rotate(90deg);
|
|
126
|
+
|
|
127
|
+
&.active {
|
|
128
|
+
transform: rotate(270deg);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
#ui-popup-window-user-menu-dropdown-toggle {
|
|
135
|
+
margin-top: 17px;
|
|
136
|
+
}
|
|
137
|
+
#dropdown-user-menu-dropdown {
|
|
138
|
+
.ui-dropdown-menu-item {
|
|
139
|
+
&:has(.logout) {
|
|
140
|
+
.ui-item-text {
|
|
141
|
+
color: #ea3223;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
&:hover {
|
|
145
|
+
.ui-item-text {
|
|
146
|
+
color: var(--dropdown-item-hover-color);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
.ui-item-text {
|
|
150
|
+
color: var(--dropdown-item-color);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
</style>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bfg-common",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.92",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "nuxt build",
|
|
7
7
|
"dev": "nuxt dev --port=3002",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@vueuse/components": "^10.1.2",
|
|
36
36
|
"date-fns": "^2.29.3",
|
|
37
37
|
"bfg-nuxt-3-graph": "1.0.15",
|
|
38
|
-
"bfg-uikit": "1.0.
|
|
38
|
+
"bfg-uikit": "1.0.95",
|
|
39
39
|
"html2canvas": "^1.4.1",
|
|
40
40
|
"prettier-eslint": "^15.0.1"
|
|
41
41
|
}
|