bfg-common 1.4.156 → 1.4.157

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,302 +1,307 @@
1
- <template>
2
- <div
3
- :class="['main-navigation-panel', { pinned: menuPined }]"
4
- @mouseenter="mainMenuHovered = true"
5
- @mouseleave="mainMenuHovered = false"
6
- >
7
- <div
8
- v-show="props.showMenu"
9
- :class="['nav-context', { collapsed: props.menuCollapsed }]"
10
- >
11
- <div class="tools">
12
- <div v-show="!props.menuCollapsed" class="pin-wrap">
13
- <input
14
- id="pin-menu-control"
15
- v-model="menuPined"
16
- data-id="navigation-panel-pin-menu-control"
17
- type="checkbox"
18
- :disabled="props.disabledPin"
19
- @change="emits('change-menu-pin')"
20
- />
21
- <label
22
- for="pin-menu-control"
23
- class="pointer flex-align-center pin-unpin-label"
24
- >
25
- <ui-icon-main-navigation-panel
26
- :name="menuPined ? 'unpin' : 'pin'"
27
- width="16px"
28
- height="16px"
29
- />
30
- <span v-if="!menuPined" class="pin-unpin-text">{{
31
- localization.common.pinMenu
32
- }}</span>
33
- <span v-else class="pin-unpin-text">{{
34
- localization.common.unpinMenu
35
- }}</span>
36
- </label>
37
- </div>
38
-
39
- <button
40
- v-if="menuPined"
41
- id="nav-trigger"
42
- data-id="navigation-panel-trigger"
43
- class="nav-trigger"
44
- @click="emits('collapse-menu')"
45
- >
46
- <span class="nav-trigger-icon flex">
47
- <ui-icon-main-navigation-panel
48
- name="doubleArrow"
49
- width="16px"
50
- height="16px"
51
- />
52
- </span>
53
- </button>
54
- </div>
55
-
56
- <div class="nav-content">
57
- <template v-for="(item, key) in props.navigationItems" :key="key">
58
- <template v-for="(item2, key2) in item" :key="item2.id">
59
- <ui-tooltip
60
- :id="`tooltip-nav-${key}-${key2}`"
61
- :test-id="`tooltip-nav-${key}-${key2}`"
62
- size="md"
63
- menu
64
- >
65
- <template #target>
66
- <div
67
- :id="`tooltip-nav-${key}-${key2}`"
68
- class="popped tooltip inline-block content-toggle-tooltip"
69
- >
70
- <nuxt-link
71
- :id="`nav-item-${key}-${key2}`"
72
- :data-id="item2.testId"
73
- class="nav-link"
74
- active-class="active"
75
- :to="item2.to"
76
- @click="emits('hide-main-menu')"
77
- >
78
- <ui-icon-main-navigation-panel
79
- :name="item2.iconName"
80
- width="20px"
81
- height="20px"
82
- />
83
- <span class="nav-text">{{ item2.title }}</span>
84
- </nuxt-link>
85
- </div>
86
- </template>
87
- <template #content>
88
- {{ item2.title }}
89
- </template>
90
- </ui-tooltip>
91
- <div
92
- v-show="key !== props.navigationItems.length - 1"
93
- class="nav-divider"
94
- />
95
- </template>
96
- </template>
97
- </div>
98
- </div>
99
- </div>
100
- </template>
101
-
102
- <script setup lang="ts">
103
- import type { UI_I_Localization } from '~/lib/models/interfaces'
104
- import type { UI_I_NavigationItem } from '~/components/common/mainNavigationPanel/lib/models/interfaces'
105
- import type { UI_T_ParentStatus } from '~/components/common/mainNavigationPanel/lib/models/types'
106
-
107
- const props = defineProps<{
108
- mainMenuStatus: boolean
109
- navigationItems: UI_I_NavigationItem[][]
110
- parentStatus: UI_T_ParentStatus
111
- disabledPin: boolean
112
- menuCollapsed: boolean
113
- showMenu: boolean
114
- }>()
115
- const emits = defineEmits<{
116
- (event: 'toggle', value: boolean): void
117
- (event: 'collapse-menu'): void
118
- (event: 'change-menu-pin'): void
119
- (event: 'hide-main-menu'): void
120
- }>()
121
-
122
- const mainMenuHovered = defineModel<boolean>('mainMenuHovered', {
123
- required: true,
124
- })
125
- const menuPined = defineModel<boolean>('menuPined', {
126
- required: true,
127
- })
128
-
129
- const localization = computed<UI_I_Localization>(() => useLocal())
130
- </script>
131
-
132
- <style scoped lang="scss">
133
- .main-navigation-panel {
134
- display: flex;
135
- flex: 1 1 auto;
136
-
137
- &.pinned {
138
- .nav-context {
139
- position: relative;
140
- }
141
- }
142
- &:not(.pinned) {
143
- .nav-context {
144
- backdrop-filter: blur(12px);
145
- box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.08);
146
- }
147
- }
148
-
149
- .nav-context {
150
- position: absolute;
151
- z-index: 1001;
152
- height: 100%;
153
- display: flex;
154
- flex-direction: column;
155
- background-color: var(--vertical-nav-bg-color);
156
-
157
- &.collapsed {
158
- .tools {
159
- justify-content: center;
160
-
161
- button {
162
- transform: rotate(180deg);
163
- }
164
- }
165
-
166
- .nav-link {
167
- .nav-text {
168
- display: none;
169
- }
170
- }
171
- }
172
-
173
- .tools {
174
- display: flex;
175
- align-items: center;
176
- justify-content: space-between;
177
- padding: 12px;
178
-
179
- .pin-wrap {
180
- padding: 4px;
181
- border-radius: 4px;
182
-
183
- &:hover {
184
- //background-color: var(--vertical-nav-hover-bg-color);
185
-
186
- .pin-unpin-label {
187
- color: var(--pin-unpin-label-hover-color);
188
- }
189
- }
190
-
191
- input {
192
- display: none;
193
- }
194
- .pin-unpin-label {
195
- color: var(--vertical-nav-item-color);
196
- font-size: 12px;
197
- font-weight: 500;
198
-
199
- .pin-unpin-text {
200
- font-size: 12px;
201
- font-weight: 500;
202
- margin-left: 6px;
203
- }
204
- }
205
- }
206
-
207
- #nav-trigger {
208
- padding: 4px;
209
- margin: 0;
210
- border-radius: 4px;
211
- border: none;
212
- background-color: transparent;
213
- cursor: pointer;
214
- color: var(--vertical-nav-item-color);
215
-
216
- &:hover {
217
- //background-color: var(--vertical-nav-hover-bg-color);
218
- color: var(--pin-unpin-label-hover-color);
219
- }
220
- }
221
- }
222
-
223
- .nav-content {
224
- overflow: auto;
225
- padding: 0 12px 12px;
226
- height: inherit;
227
-
228
- &::-webkit-scrollbar-thumb {
229
- background: var(--nav-content-scrollbar-thumb-bg);
230
- }
231
-
232
- .content-toggle-tooltip {
233
- width: 100%;
234
-
235
- .nav-link {
236
- display: flex;
237
- align-items: center;
238
- padding: 10px 12px;
239
- border-radius: 8px;
240
- color: var(--vertical-nav-item-color);
241
- font-size: 12px;
242
- font-weight: 500;
243
- white-space: nowrap;
244
- text-decoration: none;
245
-
246
- &.active {
247
- background-color: var(--vertical-active-nav-bg-color);
248
- color: var(--vertical-active-nav-color);
249
-
250
- .nav-text {
251
- color: var(--vertical-active-nav-color);
252
- }
253
- }
254
-
255
- &:not(.active):hover {
256
- background-color: var(--vertical-nav-hover-bg-color);
257
- }
258
-
259
- .nav-text {
260
- margin-left: 12px;
261
- font-size: 14px;
262
- font-weight: 400;
263
- }
264
- }
265
- .nav-link + .nav-link {
266
- margin-top: 4px;
267
- }
268
- }
269
-
270
- .nav-divider {
271
- width: 100%;
272
- height: 1px;
273
- background-color: var(--nav-content-divider-bg);
274
- margin: 12px 0;
275
- }
276
- }
277
- }
278
- }
279
- </style>
280
-
281
- <style>
282
- :root.is-new-view {
283
- --vertical-nav-bg-color: rgba(233, 235, 237, 0.92);
284
- --vertical-nav-item-color: #4d5d69;
285
- --vertical-nav-hover-bg-color: rgba(211, 214, 218, 0.48);
286
- --vertical-active-nav-bg-color: #213444;
287
- --vertical-active-nav-color: #ffffff;
288
- --pin-unpin-label-hover-color: #008fd6;
289
- --nav-content-scrollbar-thumb-bg: #9da6ad;
290
- --nav-content-divider-bg: #d3d6da;
291
- }
292
- :root.is-new-view.dark-theme {
293
- --vertical-nav-bg-color: rgba(51, 68, 83, 0.92);
294
- --vertical-nav-item-color: #e9eaec;
295
- --vertical-nav-hover-bg-color: rgba(233, 234, 236, 0.12);
296
- --vertical-active-nav-bg-color: rgba(233, 235, 237, 0.96);
297
- --vertical-active-nav-color: #213444;
298
- --pin-unpin-label-hover-color: #2ba2de;
299
- --nav-content-scrollbar-thumb-bg: rgba(157, 166, 173, 0.32);
300
- --nav-content-divider-bg: rgba(211, 214, 218, 0.12);
301
- }
302
- </style>
1
+ <template>
2
+ <div
3
+ :class="['main-navigation-panel', { pinned: menuPined }]"
4
+ @mouseenter="mainMenuHovered = true"
5
+ @mouseleave="mainMenuHovered = false"
6
+ >
7
+ <div
8
+ v-show="props.showMenu"
9
+ :class="['nav-context', { collapsed: props.menuCollapsed }]"
10
+ >
11
+ <div class="tools">
12
+ <div v-show="!props.menuCollapsed" class="pin-wrap">
13
+ <input
14
+ id="pin-menu-control"
15
+ v-model="menuPined"
16
+ data-id="navigation-panel-pin-menu-control"
17
+ type="checkbox"
18
+ :disabled="props.disabledPin"
19
+ @change="emits('change-menu-pin')"
20
+ />
21
+ <label
22
+ for="pin-menu-control"
23
+ class="pointer flex-align-center pin-unpin-label"
24
+ >
25
+ <ui-icon-main-navigation-panel
26
+ :name="menuPined ? 'unpin' : 'pin'"
27
+ width="16px"
28
+ height="16px"
29
+ />
30
+ <span v-if="!menuPined" class="pin-unpin-text">{{
31
+ localization.common.pinMenu
32
+ }}</span>
33
+ <span v-else class="pin-unpin-text">{{
34
+ localization.common.unpinMenu
35
+ }}</span>
36
+ </label>
37
+ </div>
38
+
39
+ <button
40
+ v-if="menuPined"
41
+ id="nav-trigger"
42
+ data-id="navigation-panel-trigger"
43
+ class="nav-trigger"
44
+ @click="emits('collapse-menu')"
45
+ >
46
+ <span class="nav-trigger-icon flex">
47
+ <ui-icon-main-navigation-panel
48
+ name="doubleArrow"
49
+ width="16px"
50
+ height="16px"
51
+ />
52
+ </span>
53
+ </button>
54
+ </div>
55
+
56
+ <div class="nav-content">
57
+ <template v-for="(item, key) in props.navigationItems" :key="key">
58
+ <template v-for="(item2, key2) in item" :key="item2.id">
59
+ <ui-tooltip
60
+ :id="`tooltip-nav-${key}-${key2}`"
61
+ :test-id="`tooltip-nav-${key}-${key2}`"
62
+ size="md"
63
+ menu
64
+ >
65
+ <template #target>
66
+ <div
67
+ :id="`tooltip-nav-${key}-${key2}`"
68
+ class="popped tooltip inline-block content-toggle-tooltip"
69
+ >
70
+ <nuxt-link
71
+ :id="`nav-item-${key}-${key2}`"
72
+ :data-id="item2.testId"
73
+ class="nav-link"
74
+ active-class="active"
75
+ :to="item2.to"
76
+ @click="emits('hide-main-menu')"
77
+ >
78
+ <ui-icon-main-navigation-panel
79
+ :name="item2.iconName"
80
+ width="20px"
81
+ height="20px"
82
+ />
83
+ <span class="nav-text">{{ item2.title }}</span>
84
+ </nuxt-link>
85
+ </div>
86
+ </template>
87
+ <template #content>
88
+ {{ item2.title }}
89
+ </template>
90
+ </ui-tooltip>
91
+ <div
92
+ v-show="key !== props.navigationItems.length - 1"
93
+ class="nav-divider"
94
+ />
95
+ </template>
96
+ </template>
97
+ </div>
98
+ </div>
99
+ </div>
100
+ </template>
101
+
102
+ <script setup lang="ts">
103
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
104
+ import type { UI_I_NavigationItem } from '~/components/common/mainNavigationPanel/lib/models/interfaces'
105
+ import type { UI_T_ParentStatus } from '~/components/common/mainNavigationPanel/lib/models/types'
106
+
107
+ const props = defineProps<{
108
+ mainMenuStatus: boolean
109
+ navigationItems: UI_I_NavigationItem[][]
110
+ parentStatus: UI_T_ParentStatus
111
+ disabledPin: boolean
112
+ menuCollapsed: boolean
113
+ showMenu: boolean
114
+ }>()
115
+ const emits = defineEmits<{
116
+ (event: 'toggle', value: boolean): void
117
+ (event: 'collapse-menu'): void
118
+ (event: 'change-menu-pin'): void
119
+ (event: 'hide-main-menu'): void
120
+ }>()
121
+
122
+ const mainMenuHovered = defineModel<boolean>('mainMenuHovered', {
123
+ required: true,
124
+ })
125
+ const menuPined = defineModel<boolean>('menuPined', {
126
+ required: true,
127
+ })
128
+
129
+ const localization = computed<UI_I_Localization>(() => useLocal())
130
+ </script>
131
+
132
+ <style scoped lang="scss">
133
+ .main-navigation-panel {
134
+ display: flex;
135
+ flex: 1 1 auto;
136
+
137
+ &.pinned {
138
+ .nav-context {
139
+ position: relative;
140
+ }
141
+ }
142
+ &:not(.pinned) {
143
+ .nav-context {
144
+ backdrop-filter: blur(12px);
145
+ box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.08);
146
+ }
147
+ }
148
+
149
+ .nav-context {
150
+ position: absolute;
151
+ z-index: 1001;
152
+ height: 100%;
153
+ display: flex;
154
+ flex-direction: column;
155
+ background-color: var(--vertical-nav-bg-color);
156
+
157
+ &.collapsed {
158
+ .tools {
159
+ justify-content: center;
160
+
161
+ button {
162
+ transform: rotate(180deg);
163
+ }
164
+ }
165
+
166
+ .nav-link {
167
+ .nav-text {
168
+ display: none;
169
+ }
170
+ }
171
+ }
172
+ &:not(.collapsed) {
173
+ :deep(.tooltip-container-hover) {
174
+ display: none;
175
+ }
176
+ }
177
+
178
+ .tools {
179
+ display: flex;
180
+ align-items: center;
181
+ justify-content: space-between;
182
+ padding: 12px;
183
+
184
+ .pin-wrap {
185
+ padding: 4px;
186
+ border-radius: 4px;
187
+
188
+ &:hover {
189
+ //background-color: var(--vertical-nav-hover-bg-color);
190
+
191
+ .pin-unpin-label {
192
+ color: var(--pin-unpin-label-hover-color);
193
+ }
194
+ }
195
+
196
+ input {
197
+ display: none;
198
+ }
199
+ .pin-unpin-label {
200
+ color: var(--vertical-nav-item-color);
201
+ font-size: 12px;
202
+ font-weight: 500;
203
+
204
+ .pin-unpin-text {
205
+ font-size: 12px;
206
+ font-weight: 500;
207
+ margin-left: 6px;
208
+ }
209
+ }
210
+ }
211
+
212
+ #nav-trigger {
213
+ padding: 4px;
214
+ margin: 0;
215
+ border-radius: 4px;
216
+ border: none;
217
+ background-color: transparent;
218
+ cursor: pointer;
219
+ color: var(--vertical-nav-item-color);
220
+
221
+ &:hover {
222
+ //background-color: var(--vertical-nav-hover-bg-color);
223
+ color: var(--pin-unpin-label-hover-color);
224
+ }
225
+ }
226
+ }
227
+
228
+ .nav-content {
229
+ overflow: auto;
230
+ padding: 0 12px 12px;
231
+ height: inherit;
232
+
233
+ &::-webkit-scrollbar-thumb {
234
+ background: var(--nav-content-scrollbar-thumb-bg);
235
+ }
236
+
237
+ .content-toggle-tooltip {
238
+ width: 100%;
239
+
240
+ .nav-link {
241
+ display: flex;
242
+ align-items: center;
243
+ padding: 10px 12px;
244
+ border-radius: 8px;
245
+ color: var(--vertical-nav-item-color);
246
+ font-size: 12px;
247
+ font-weight: 500;
248
+ white-space: nowrap;
249
+ text-decoration: none;
250
+
251
+ &.active {
252
+ background-color: var(--vertical-active-nav-bg-color);
253
+ color: var(--vertical-active-nav-color);
254
+
255
+ .nav-text {
256
+ color: var(--vertical-active-nav-color);
257
+ }
258
+ }
259
+
260
+ &:not(.active):hover {
261
+ background-color: var(--vertical-nav-hover-bg-color);
262
+ }
263
+
264
+ .nav-text {
265
+ margin-left: 12px;
266
+ font-size: 14px;
267
+ font-weight: 400;
268
+ }
269
+ }
270
+ .nav-link + .nav-link {
271
+ margin-top: 4px;
272
+ }
273
+ }
274
+
275
+ .nav-divider {
276
+ width: 100%;
277
+ height: 1px;
278
+ background-color: var(--nav-content-divider-bg);
279
+ margin: 12px 0;
280
+ }
281
+ }
282
+ }
283
+ }
284
+ </style>
285
+
286
+ <style>
287
+ :root.is-new-view {
288
+ --vertical-nav-bg-color: rgba(233, 235, 237, 0.92);
289
+ --vertical-nav-item-color: #4d5d69;
290
+ --vertical-nav-hover-bg-color: rgba(211, 214, 218, 0.48);
291
+ --vertical-active-nav-bg-color: #213444;
292
+ --vertical-active-nav-color: #ffffff;
293
+ --pin-unpin-label-hover-color: #008fd6;
294
+ --nav-content-scrollbar-thumb-bg: #9da6ad;
295
+ --nav-content-divider-bg: #d3d6da;
296
+ }
297
+ :root.is-new-view.dark-theme {
298
+ --vertical-nav-bg-color: rgba(51, 68, 83, 0.92);
299
+ --vertical-nav-item-color: #e9eaec;
300
+ --vertical-nav-hover-bg-color: rgba(233, 234, 236, 0.12);
301
+ --vertical-active-nav-bg-color: rgba(233, 235, 237, 0.96);
302
+ --vertical-active-nav-color: #213444;
303
+ --pin-unpin-label-hover-color: #2ba2de;
304
+ --nav-content-scrollbar-thumb-bg: rgba(157, 166, 173, 0.32);
305
+ --nav-content-divider-bg: rgba(211, 214, 218, 0.12);
306
+ }
307
+ </style>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.156",
4
+ "version": "1.4.157",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",