bfg-common 1.3.470 → 1.3.471
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/components/common/layout/theHeader/helpMenu/helpMenuNew/HelpMenuNew.vue +116 -116
- package/components/common/layout/theHeader/userMenu/modals/preferences/Preferences.vue +1 -1
- package/components/common/layout/theHeader/userMenu/modals/preferences/lib/config/preferencesTabs.ts +33 -52
- package/components/common/layout/theHeader/userMenu/userMenuNew/UserMenuNew.vue +3 -0
- package/package.json +1 -1
|
@@ -1,116 +1,116 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="help-menu-content">
|
|
3
|
-
<button
|
|
4
|
-
id="help-menu-dropdown-toggle"
|
|
5
|
-
data-id="help-menu-dropdown-toggle"
|
|
6
|
-
class="help-menu-dropdown-toggle"
|
|
7
|
-
@click="isShowDropdown = !isShowDropdown"
|
|
8
|
-
>
|
|
9
|
-
<span class="help-icon-container">
|
|
10
|
-
<ui-icon-main-navigation-panel
|
|
11
|
-
name="icon-help"
|
|
12
|
-
width="24"
|
|
13
|
-
height="24"
|
|
14
|
-
/>
|
|
15
|
-
</span>
|
|
16
|
-
<span class="arrow-icon-container">
|
|
17
|
-
<ui-icon name="arrow2" width="16" height="8" />
|
|
18
|
-
</span>
|
|
19
|
-
</button>
|
|
20
|
-
</div>
|
|
21
|
-
<ui-dropdown
|
|
22
|
-
test-id="help-menu-dropdown"
|
|
23
|
-
:show="isShowDropdown"
|
|
24
|
-
:items="dropdownItems"
|
|
25
|
-
width="max-content"
|
|
26
|
-
elem-id="help-menu-dropdown-toggle"
|
|
27
|
-
@select="onSelectDropdown"
|
|
28
|
-
@hide="onHideDropdown"
|
|
29
|
-
/>
|
|
30
|
-
|
|
31
|
-
<common-layout-the-header-feedback
|
|
32
|
-
:is-show-feedback="isShowFeedback"
|
|
33
|
-
@show="isShowFeedback = true"
|
|
34
|
-
@hide="isShowFeedback = false"
|
|
35
|
-
/>
|
|
36
|
-
</template>
|
|
37
|
-
|
|
38
|
-
<script setup lang="ts">
|
|
39
|
-
import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
|
|
40
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
41
|
-
import { helpMenuFunc } from '~/components/common/layout/theHeader/helpMenu/helpMenuNew/lib/config/dropMenu'
|
|
42
|
-
|
|
43
|
-
const emits = defineEmits<{
|
|
44
|
-
(event: 'select-dropdown', value: string): void
|
|
45
|
-
}>()
|
|
46
|
-
|
|
47
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
48
|
-
|
|
49
|
-
const isShowFeedback = ref<boolean>(false)
|
|
50
|
-
|
|
51
|
-
const isShowDropdown = ref<boolean>(false)
|
|
52
|
-
const dropdownItems = computed<UI_I_Dropdown[]>(() =>
|
|
53
|
-
helpMenuFunc(localization.value)
|
|
54
|
-
)
|
|
55
|
-
|
|
56
|
-
const onHideDropdown = (): void => {
|
|
57
|
-
isShowDropdown.value = false
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
const onSelectDropdown = (value: string): void => {
|
|
61
|
-
switch (value) {
|
|
62
|
-
case 'sendFeedback':
|
|
63
|
-
isShowFeedback.value = true
|
|
64
|
-
break
|
|
65
|
-
default:
|
|
66
|
-
emits('select-dropdown', value)
|
|
67
|
-
}
|
|
68
|
-
onHideDropdown()
|
|
69
|
-
}
|
|
70
|
-
</script>
|
|
71
|
-
|
|
72
|
-
<style scoped lang="scss">
|
|
73
|
-
.help-menu-content {
|
|
74
|
-
.help-menu-dropdown-toggle {
|
|
75
|
-
border: unset;
|
|
76
|
-
padding: 0;
|
|
77
|
-
outline: unset;
|
|
78
|
-
background: transparent;
|
|
79
|
-
cursor: pointer;
|
|
80
|
-
display: flex;
|
|
81
|
-
align-items: center;
|
|
82
|
-
|
|
83
|
-
&:hover {
|
|
84
|
-
.help-icon-container {
|
|
85
|
-
:deep(svg) {
|
|
86
|
-
color: #ffffff;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
.arrow-icon-container {
|
|
90
|
-
color: #ffffff;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.help-icon-container {
|
|
95
|
-
display: flex;
|
|
96
|
-
margin-right: 10px;
|
|
97
|
-
|
|
98
|
-
:deep(svg) {
|
|
99
|
-
color: #d3d6da;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
.arrow-icon-container {
|
|
103
|
-
display: flex;
|
|
104
|
-
transform: rotate(90deg);
|
|
105
|
-
color: #d3d6da;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
:deep(span.nav-icon) {
|
|
110
|
-
padding: 0 !important;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
#dropdown-help-menu-dropdown {
|
|
114
|
-
margin-top: 17px;
|
|
115
|
-
}
|
|
116
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="help-menu-content">
|
|
3
|
+
<button
|
|
4
|
+
id="help-menu-dropdown-toggle"
|
|
5
|
+
data-id="help-menu-dropdown-toggle"
|
|
6
|
+
class="help-menu-dropdown-toggle"
|
|
7
|
+
@click="isShowDropdown = !isShowDropdown"
|
|
8
|
+
>
|
|
9
|
+
<span class="help-icon-container">
|
|
10
|
+
<ui-icon-main-navigation-panel
|
|
11
|
+
name="icon-help"
|
|
12
|
+
width="24"
|
|
13
|
+
height="24"
|
|
14
|
+
/>
|
|
15
|
+
</span>
|
|
16
|
+
<span class="arrow-icon-container">
|
|
17
|
+
<ui-icon name="arrow2" width="16" height="8" />
|
|
18
|
+
</span>
|
|
19
|
+
</button>
|
|
20
|
+
</div>
|
|
21
|
+
<ui-dropdown
|
|
22
|
+
test-id="help-menu-dropdown"
|
|
23
|
+
:show="isShowDropdown"
|
|
24
|
+
:items="dropdownItems"
|
|
25
|
+
width="max-content"
|
|
26
|
+
elem-id="help-menu-dropdown-toggle"
|
|
27
|
+
@select="onSelectDropdown"
|
|
28
|
+
@hide="onHideDropdown"
|
|
29
|
+
/>
|
|
30
|
+
|
|
31
|
+
<common-layout-the-header-feedback
|
|
32
|
+
:is-show-feedback="isShowFeedback"
|
|
33
|
+
@show="isShowFeedback = true"
|
|
34
|
+
@hide="isShowFeedback = false"
|
|
35
|
+
/>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<script setup lang="ts">
|
|
39
|
+
import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
|
|
40
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
41
|
+
import { helpMenuFunc } from '~/components/common/layout/theHeader/helpMenu/helpMenuNew/lib/config/dropMenu'
|
|
42
|
+
|
|
43
|
+
const emits = defineEmits<{
|
|
44
|
+
(event: 'select-dropdown', value: string): void
|
|
45
|
+
}>()
|
|
46
|
+
|
|
47
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
48
|
+
|
|
49
|
+
const isShowFeedback = ref<boolean>(false)
|
|
50
|
+
|
|
51
|
+
const isShowDropdown = ref<boolean>(false)
|
|
52
|
+
const dropdownItems = computed<UI_I_Dropdown[]>(() =>
|
|
53
|
+
helpMenuFunc(localization.value)
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
const onHideDropdown = (): void => {
|
|
57
|
+
isShowDropdown.value = false
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const onSelectDropdown = (value: string): void => {
|
|
61
|
+
switch (value) {
|
|
62
|
+
case 'sendFeedback':
|
|
63
|
+
isShowFeedback.value = true
|
|
64
|
+
break
|
|
65
|
+
default:
|
|
66
|
+
emits('select-dropdown', value)
|
|
67
|
+
}
|
|
68
|
+
onHideDropdown()
|
|
69
|
+
}
|
|
70
|
+
</script>
|
|
71
|
+
|
|
72
|
+
<style scoped lang="scss">
|
|
73
|
+
.help-menu-content {
|
|
74
|
+
.help-menu-dropdown-toggle {
|
|
75
|
+
border: unset;
|
|
76
|
+
padding: 0;
|
|
77
|
+
outline: unset;
|
|
78
|
+
background: transparent;
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
display: flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
|
|
83
|
+
&:hover {
|
|
84
|
+
.help-icon-container {
|
|
85
|
+
:deep(svg) {
|
|
86
|
+
color: #ffffff;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
.arrow-icon-container {
|
|
90
|
+
color: #ffffff;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.help-icon-container {
|
|
95
|
+
display: flex;
|
|
96
|
+
margin-right: 10px;
|
|
97
|
+
|
|
98
|
+
:deep(svg) {
|
|
99
|
+
color: #d3d6da;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
.arrow-icon-container {
|
|
103
|
+
display: flex;
|
|
104
|
+
transform: rotate(90deg);
|
|
105
|
+
color: #d3d6da;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
:deep(span.nav-icon) {
|
|
110
|
+
padding: 0 !important;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
#dropdown-help-menu-dropdown {
|
|
114
|
+
margin-top: 17px;
|
|
115
|
+
}
|
|
116
|
+
</style>
|
|
@@ -111,7 +111,7 @@ const tabsItems = computed<UI_I_CollapseNavItem[]>(() =>
|
|
|
111
111
|
const onHide = (): void => {
|
|
112
112
|
emits('hide')
|
|
113
113
|
|
|
114
|
-
if (
|
|
114
|
+
if (isSphere.value) {
|
|
115
115
|
selectedTab.value = 'time-tab'
|
|
116
116
|
$store.dispatch('profile/A_PREFERENCES_FOR_CHANGING', { clear: true })
|
|
117
117
|
}
|
package/components/common/layout/theHeader/userMenu/modals/preferences/lib/config/preferencesTabs.ts
CHANGED
|
@@ -6,62 +6,43 @@ export const preferencesTabs = (
|
|
|
6
6
|
localization: UI_I_Localization,
|
|
7
7
|
project: UI_T_Project
|
|
8
8
|
): UI_I_CollapseNavItem[] => {
|
|
9
|
+
const timeTab = {
|
|
10
|
+
text: `${localization.timeFormat}`,
|
|
11
|
+
value: 'time-tab',
|
|
12
|
+
disabled: false,
|
|
13
|
+
testId: 'time-format',
|
|
14
|
+
}
|
|
15
|
+
const languageTab = {
|
|
16
|
+
text: `${localization.language}`,
|
|
17
|
+
value: 'language-tab',
|
|
18
|
+
disabled: false,
|
|
19
|
+
testId: 'language',
|
|
20
|
+
}
|
|
21
|
+
const consoleTab = {
|
|
22
|
+
text: `${localization.defaultConsole}`,
|
|
23
|
+
value: 'console-tab',
|
|
24
|
+
disabled: false,
|
|
25
|
+
testId: 'user-preferences-default-console',
|
|
26
|
+
}
|
|
27
|
+
const inventoryTab = {
|
|
28
|
+
text: `${localization.inventory}`,
|
|
29
|
+
value: 'inventory-tab',
|
|
30
|
+
disabled: false,
|
|
31
|
+
testId: 'user-preferences-inventory',
|
|
32
|
+
}
|
|
33
|
+
const viewTab = {
|
|
34
|
+
text: `${localization.view}`,
|
|
35
|
+
value: 'view-tab',
|
|
36
|
+
disabled: false,
|
|
37
|
+
testId: 'user-preferences-view',
|
|
38
|
+
}
|
|
39
|
+
|
|
9
40
|
let result: UI_I_CollapseNavItem[] = []
|
|
10
41
|
|
|
11
42
|
if (project === 'sphere') {
|
|
12
|
-
result = [
|
|
13
|
-
{
|
|
14
|
-
text: `${localization.timeFormat}`,
|
|
15
|
-
value: 'time-tab',
|
|
16
|
-
disabled: false,
|
|
17
|
-
testId: 'user-preferences-time-format',
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
text: `${localization.language}`,
|
|
21
|
-
value: 'language-tab',
|
|
22
|
-
disabled: false,
|
|
23
|
-
testId: 'user-preferences-language',
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
text: `${localization.defaultConsole}`,
|
|
27
|
-
value: 'console-tab',
|
|
28
|
-
disabled: false,
|
|
29
|
-
testId: 'user-preferences-default-console',
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
text: `${localization.inventory}`,
|
|
33
|
-
value: 'inventory-tab',
|
|
34
|
-
disabled: false,
|
|
35
|
-
testId: 'user-preferences-inventory',
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
text: `${localization.view}`,
|
|
39
|
-
value: 'view-tab',
|
|
40
|
-
disabled: false,
|
|
41
|
-
testId: 'user-preferences-view',
|
|
42
|
-
},
|
|
43
|
-
]
|
|
43
|
+
result = [timeTab, languageTab, consoleTab, inventoryTab, viewTab]
|
|
44
44
|
} else if (project === 'procurator') {
|
|
45
|
-
result = [
|
|
46
|
-
{
|
|
47
|
-
text: `${localization.timeFormat}`,
|
|
48
|
-
value: 'time-tab',
|
|
49
|
-
disabled: false,
|
|
50
|
-
testId: 'time-format',
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
text: `${localization.language}`,
|
|
54
|
-
value: 'language-tab',
|
|
55
|
-
disabled: false,
|
|
56
|
-
testId: 'language',
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
text: `${localization.view}`,
|
|
60
|
-
value: 'view-tab',
|
|
61
|
-
disabled: false,
|
|
62
|
-
testId: 'view',
|
|
63
|
-
},
|
|
64
|
-
]
|
|
45
|
+
result = [timeTab, languageTab, viewTab]
|
|
65
46
|
}
|
|
66
47
|
|
|
67
48
|
return result
|
|
@@ -105,6 +105,9 @@ const onSelectDropdown = (value: string): void => {
|
|
|
105
105
|
#dropdown-user-menu-dropdown {
|
|
106
106
|
margin-top: 17px;
|
|
107
107
|
|
|
108
|
+
.ui-item-text {
|
|
109
|
+
color: var(--dropdown-item-hover-color);
|
|
110
|
+
}
|
|
108
111
|
.ui-dropdown-menu-item:has(.logout) {
|
|
109
112
|
.ui-item-text {
|
|
110
113
|
color: #ea3223;
|