@awes-io/ui 2.81.0 → 2.82.0
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [2.82.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.81.0...@awes-io/ui@2.82.0) (2023-11-08)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* mobile nav special behaviour added ([0c37293](https://github.com/awes-io/client/commit/0c37293ebc3b3d73a5d39c4a5a4d376d612e7013))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [2.81.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.80.0...@awes-io/ui@2.81.0) (2023-11-08)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
<div class="aw-page-headline__back-wrapper">
|
|
5
5
|
<slot name="headline-breadcrumb" :breadcrumb="breadcrumb">
|
|
6
6
|
<AwButton
|
|
7
|
-
v-if="backUrl"
|
|
7
|
+
v-if="backUrl || isMenuToggler"
|
|
8
8
|
color="mono"
|
|
9
9
|
class="w-10 h-10 aw-page-headline__back"
|
|
10
10
|
:href="backUrl"
|
|
11
|
-
:aria-label="breadcrumb.title"
|
|
11
|
+
:aria-label="isMenuToggler ? $t('Menu') : breadcrumb.title"
|
|
12
12
|
content-class="p-0"
|
|
13
|
+
v-on="isMenuToggler ? { click: openMenu } : null"
|
|
13
14
|
>
|
|
14
15
|
<template #icon>
|
|
15
16
|
<AwIconSystemMono name="arrow-l" size="24" />
|
|
@@ -98,7 +99,14 @@ export default {
|
|
|
98
99
|
buttonsBreakpoint: {
|
|
99
100
|
type: String,
|
|
100
101
|
default: null
|
|
101
|
-
}
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
breadcrumbMenu: {
|
|
105
|
+
type: Boolean,
|
|
106
|
+
default() {
|
|
107
|
+
return conf(this, 'breadcrumbMenu')
|
|
108
|
+
}
|
|
109
|
+
},
|
|
102
110
|
},
|
|
103
111
|
|
|
104
112
|
computed: {
|
|
@@ -122,6 +130,16 @@ export default {
|
|
|
122
130
|
}
|
|
123
131
|
|
|
124
132
|
return this.breadcrumb.href
|
|
133
|
+
},
|
|
134
|
+
|
|
135
|
+
isMenuToggler() {
|
|
136
|
+
return !this.backUrl && this.breadcrumbMenu
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
|
|
140
|
+
methods: {
|
|
141
|
+
openMenu() {
|
|
142
|
+
this.$store.commit('awesIo/TOGGLE_MOBILE_MENU', true)
|
|
125
143
|
}
|
|
126
144
|
}
|
|
127
145
|
}
|
|
@@ -89,7 +89,8 @@
|
|
|
89
89
|
click: () =>
|
|
90
90
|
showSubmenu(
|
|
91
91
|
item.children,
|
|
92
|
-
item.subtitle || item.text
|
|
92
|
+
item.subtitle || item.text,
|
|
93
|
+
item.href
|
|
93
94
|
)
|
|
94
95
|
}
|
|
95
96
|
: item.listeners || null
|
|
@@ -119,7 +120,8 @@
|
|
|
119
120
|
click: () =>
|
|
120
121
|
showSubmenu(
|
|
121
122
|
item.children,
|
|
122
|
-
item.subtitle || item.text
|
|
123
|
+
item.subtitle || item.text,
|
|
124
|
+
item.href
|
|
123
125
|
)
|
|
124
126
|
}
|
|
125
127
|
: item.listeners || null
|
|
@@ -214,8 +216,11 @@
|
|
|
214
216
|
|
|
215
217
|
<script>
|
|
216
218
|
import { mapGetters } from 'vuex'
|
|
217
|
-
import { pathOr, viewOr, lensProp, partition } from 'rambdax'
|
|
219
|
+
import { pathOr, viewOr, lensProp, partition, isType } from 'rambdax'
|
|
218
220
|
import { disableBodyScroll, enableBodyScroll } from 'body-scroll-lock'
|
|
221
|
+
import { LINK_REGEX } from '@AwConfig'
|
|
222
|
+
import { conf } from '@AwUtils/component'
|
|
223
|
+
import { getPath } from '@AwUtils/router'
|
|
219
224
|
import AwMobileMenuNav from '@AwLayouts/_AwMobileMenuNav.vue'
|
|
220
225
|
import AwMobileMenuItemNew from '@AwLayouts/_AwMobileMenuItemNew.vue'
|
|
221
226
|
// import AwMobileMenuItem from '@AwLayouts/_AwMobileMenuItem.vue'
|
|
@@ -230,6 +235,15 @@ export default {
|
|
|
230
235
|
// AwMobileMenuItem
|
|
231
236
|
},
|
|
232
237
|
|
|
238
|
+
props: {
|
|
239
|
+
navigateToFirstPage: {
|
|
240
|
+
type: Boolean,
|
|
241
|
+
default() {
|
|
242
|
+
return conf(this, 'navigateToFirstPage')
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
|
|
233
247
|
inject: {
|
|
234
248
|
layoutProvider: {
|
|
235
249
|
default: null
|
|
@@ -348,7 +362,19 @@ export default {
|
|
|
348
362
|
},
|
|
349
363
|
|
|
350
364
|
methods: {
|
|
351
|
-
showSubmenu(items, text) {
|
|
365
|
+
showSubmenu(items, text, href) {
|
|
366
|
+
if (this.navigateToFirstPage && href) {
|
|
367
|
+
if (isType('String', href) && LINK_REGEX.test(href)) {
|
|
368
|
+
window.location.assign(href)
|
|
369
|
+
} else if (getPath(this.$route) === getPath(href)) {
|
|
370
|
+
this.show = false
|
|
371
|
+
} else {
|
|
372
|
+
this.$router.push(href)
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
return
|
|
376
|
+
}
|
|
377
|
+
|
|
352
378
|
const [submenu, submenuDeep] = partition(
|
|
353
379
|
({ children }) =>
|
|
354
380
|
!Array.isArray(children) || children.length === 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awes-io/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.82.0",
|
|
4
4
|
"description": "User Interface (UI) components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui",
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"rollup-plugin-visualizer": "^2.6.0",
|
|
114
114
|
"rollup-plugin-vue": "^5.0.1"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "4fec2536721f50b6ebca7ce727c38d0770d33d9b"
|
|
117
117
|
}
|