@awes-io/ui 2.63.5 → 2.64.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 +22 -0
- package/assets/css/components/icon-menu-item.css +1 -0
- package/assets/css/components/layout-menu.css +4 -3
- package/components/5_layouts/AwLayoutProvider.vue +20 -1
- package/components/5_layouts/_AwLayoutMenu.vue +28 -1
- package/components/5_layouts/_AwMobileMenu.vue +16 -0
- package/mixins/google-maps.js +1 -1
- package/package.json +2 -2
- package/store/awesIo.js +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
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.64.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.63.6...@awes-io/ui@2.64.0) (2023-06-27)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* tertiary menu added ([3c0d425](https://github.com/awes-io/client/commit/3c0d42598a9b628eeb5b347d76a8538902623e0f))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [2.63.6](https://github.com/awes-io/client/compare/@awes-io/ui@2.63.5...@awes-io/ui@2.63.6) (2023-06-27)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **google-maps:** set protocol in url to work in capacitor ([d928ec7](https://github.com/awes-io/client/commit/d928ec7346186a6fe4d8fe980bc5f3ba02e2ab5b))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## [2.63.5](https://github.com/awes-io/client/compare/@awes-io/ui@2.63.4...@awes-io/ui@2.63.5) (2023-06-23)
|
|
7
29
|
|
|
8
30
|
|
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
display: grid;
|
|
6
6
|
grid-template-columns: 60px auto;
|
|
7
|
-
grid-template-rows: 80px
|
|
7
|
+
grid-template-rows: 80px minmax(0, 2fr) minmax(0, 1fr) 80px minmax(0, auto);
|
|
8
8
|
|
|
9
9
|
z-index: 1;
|
|
10
10
|
|
|
11
11
|
&__logo,
|
|
12
12
|
&__aw-user-menu {
|
|
13
|
-
display:
|
|
13
|
+
display: flex;
|
|
14
|
+
justify-content: center;
|
|
14
15
|
width: 100%;
|
|
15
16
|
padding: theme('spacing.3');
|
|
16
17
|
margin: auto 0;
|
|
@@ -57,7 +58,7 @@
|
|
|
57
58
|
max-height: 100vh;
|
|
58
59
|
|
|
59
60
|
grid-column: 2;
|
|
60
|
-
grid-row: 1 /
|
|
61
|
+
grid-row: 1 / 6;
|
|
61
62
|
|
|
62
63
|
overflow-y: auto;
|
|
63
64
|
|
|
@@ -85,6 +85,7 @@ export default {
|
|
|
85
85
|
mainMenu: [],
|
|
86
86
|
secondaryMenu: [],
|
|
87
87
|
userMenu: [],
|
|
88
|
+
tertiaryMenu: [],
|
|
88
89
|
activeMenu: null,
|
|
89
90
|
activeMenuItem: null
|
|
90
91
|
}
|
|
@@ -92,7 +93,12 @@ export default {
|
|
|
92
93
|
},
|
|
93
94
|
|
|
94
95
|
computed: {
|
|
95
|
-
...mapGetters('awesIo', [
|
|
96
|
+
...mapGetters('awesIo', [
|
|
97
|
+
'mainMenu',
|
|
98
|
+
'secondaryMenu',
|
|
99
|
+
'userMenu',
|
|
100
|
+
'tertiaryMenu'
|
|
101
|
+
]),
|
|
96
102
|
|
|
97
103
|
// _flatChildren() {
|
|
98
104
|
// const items = []
|
|
@@ -124,6 +130,10 @@ export default {
|
|
|
124
130
|
|
|
125
131
|
_userMenu() {
|
|
126
132
|
return this._toMenuItems(this.userMenu)
|
|
133
|
+
},
|
|
134
|
+
|
|
135
|
+
_tertiaryMenu() {
|
|
136
|
+
return this._toMenuItems(this.tertiaryMenu)
|
|
127
137
|
}
|
|
128
138
|
},
|
|
129
139
|
|
|
@@ -155,6 +165,15 @@ export default {
|
|
|
155
165
|
immediate: true
|
|
156
166
|
},
|
|
157
167
|
|
|
168
|
+
_tertiaryMenu: {
|
|
169
|
+
handler(items) {
|
|
170
|
+
this.$set(this.layoutProvider, 'tertiaryMenu', items)
|
|
171
|
+
this._findActive()
|
|
172
|
+
},
|
|
173
|
+
deep: true,
|
|
174
|
+
immediate: true
|
|
175
|
+
},
|
|
176
|
+
|
|
158
177
|
'$route.path': {
|
|
159
178
|
handler: '_findActive',
|
|
160
179
|
immediate: true
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
v-else
|
|
23
23
|
:key="i"
|
|
24
24
|
v-bind="_getMenuItemProps(item)"
|
|
25
|
+
v-on="_getMenuItemListeners(item)"
|
|
25
26
|
:active="item === activeMenu"
|
|
26
27
|
tooltip
|
|
27
28
|
/>
|
|
@@ -38,6 +39,7 @@
|
|
|
38
39
|
v-else
|
|
39
40
|
:key="i"
|
|
40
41
|
v-bind="_getMenuItemProps(item)"
|
|
42
|
+
v-on="_getMenuItemListeners(item)"
|
|
41
43
|
:active="item === activeMenu"
|
|
42
44
|
tooltip
|
|
43
45
|
/>
|
|
@@ -48,6 +50,23 @@
|
|
|
48
50
|
<!-- user menu -->
|
|
49
51
|
<AwUserMenu class="aw-layout-menu__aw-user-menu" />
|
|
50
52
|
|
|
53
|
+
<div class="aw-layout-menu__tertiary-menu">
|
|
54
|
+
<slot name="tertiary-menu">
|
|
55
|
+
<template v-for="(item, i) in tertiaryMenu">
|
|
56
|
+
<!-- eslint-disable-next-line vue/require-component-is -->
|
|
57
|
+
<Component v-if="item.is" :key="'cmp-' + i" v-bind="item" />
|
|
58
|
+
<AwMenuItemIcon
|
|
59
|
+
v-else
|
|
60
|
+
:key="i"
|
|
61
|
+
v-bind="_getMenuItemProps(item)"
|
|
62
|
+
v-on="_getMenuItemListeners(item)"
|
|
63
|
+
:active="item === activeMenu"
|
|
64
|
+
tooltip
|
|
65
|
+
/>
|
|
66
|
+
</template>
|
|
67
|
+
</slot>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
51
70
|
<!-- submenu -->
|
|
52
71
|
<div
|
|
53
72
|
class="aw-layout-menu__submenu"
|
|
@@ -98,6 +117,10 @@ export default {
|
|
|
98
117
|
return viewOr([], lensProp('secondaryMenu'), this.layoutProvider)
|
|
99
118
|
},
|
|
100
119
|
|
|
120
|
+
tertiaryMenu() {
|
|
121
|
+
return viewOr(null, lensProp('tertiaryMenu'), this.layoutProvider)
|
|
122
|
+
},
|
|
123
|
+
|
|
101
124
|
activeMenu() {
|
|
102
125
|
return viewOr(null, lensProp('activeMenu'), this.layoutProvider)
|
|
103
126
|
},
|
|
@@ -123,7 +146,11 @@ export default {
|
|
|
123
146
|
|
|
124
147
|
methods: {
|
|
125
148
|
_getMenuItemProps(props) {
|
|
126
|
-
return omit('children,description,hideText', props)
|
|
149
|
+
return omit('children,description,hideText,listeners', props)
|
|
150
|
+
},
|
|
151
|
+
|
|
152
|
+
_getMenuItemListeners(props) {
|
|
153
|
+
return props.listeners || {}
|
|
127
154
|
}
|
|
128
155
|
}
|
|
129
156
|
}
|
|
@@ -118,6 +118,14 @@
|
|
|
118
118
|
@click:submenu="showSubmenu"
|
|
119
119
|
/>
|
|
120
120
|
|
|
121
|
+
<AwMobileMenuNav
|
|
122
|
+
v-show="!submenuOpened"
|
|
123
|
+
:title="$t('Tertiary menu')"
|
|
124
|
+
:items="tertiaryMenu"
|
|
125
|
+
class="aw-mobile-menu__menu"
|
|
126
|
+
@click:submenu="showSubmenu"
|
|
127
|
+
/>
|
|
128
|
+
|
|
121
129
|
<!-- submenu -->
|
|
122
130
|
<template v-for="({ text, children, badge }, i) in submenu">
|
|
123
131
|
<AwMobileMenuNav
|
|
@@ -215,6 +223,14 @@ export default {
|
|
|
215
223
|
)
|
|
216
224
|
},
|
|
217
225
|
|
|
226
|
+
tertiaryMenu() {
|
|
227
|
+
return viewOr(
|
|
228
|
+
[],
|
|
229
|
+
lensProp('tertiaryMenu'),
|
|
230
|
+
this.layoutProvider
|
|
231
|
+
).filter(({ is }) => !is)
|
|
232
|
+
},
|
|
233
|
+
|
|
218
234
|
show: {
|
|
219
235
|
get() {
|
|
220
236
|
return this.$store.state.awesIo.mobileMenuOpened
|
package/mixins/google-maps.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awes-io/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.64.0",
|
|
4
4
|
"description": "User Interface (UI) components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui",
|
|
@@ -122,5 +122,5 @@
|
|
|
122
122
|
"vue-template-compiler": "^2.6.10",
|
|
123
123
|
"webfonts-generator": "^0.4.0"
|
|
124
124
|
},
|
|
125
|
-
"gitHead": "
|
|
125
|
+
"gitHead": "9bee9f41561747fce924fc78db5aae56665acdf7"
|
|
126
126
|
}
|
package/store/awesIo.js
CHANGED
|
@@ -34,7 +34,8 @@ export const state = () => ({
|
|
|
34
34
|
menus: {
|
|
35
35
|
main: [],
|
|
36
36
|
secondary: [],
|
|
37
|
-
user: []
|
|
37
|
+
user: [],
|
|
38
|
+
tertiary: []
|
|
38
39
|
},
|
|
39
40
|
mobileMenuOpened: false,
|
|
40
41
|
beforeMobileMenu: null,
|
|
@@ -59,6 +60,10 @@ export const getters = {
|
|
|
59
60
|
return castArray(state.menus.user)
|
|
60
61
|
},
|
|
61
62
|
|
|
63
|
+
tertiaryMenu(state) {
|
|
64
|
+
return castArray(state.menus.tertiary)
|
|
65
|
+
},
|
|
66
|
+
|
|
62
67
|
user(state, getters, rootState) {
|
|
63
68
|
const user = pathOr({}, 'auth.user', rootState)
|
|
64
69
|
const src = pathOr('', 'avatar', user)
|