@awes-io/ui 2.112.1 → 2.113.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 +16 -0
- package/assets/css/components/more.css +6 -0
- package/assets/css/components/switch-field.css +1 -1
- package/components/2_molecules/AwSelect.vue +1 -1
- package/components/4_pages/AwPage.vue +1 -4
- package/components/4_pages/_AwPageHeader.vue +3 -1
- package/components/5_layouts/_AwNav.vue +14 -17
- package/nuxt/pages/more.vue +20 -8
- package/package.json +2 -2
- package/store/awesIo.js +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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.113.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.112.1...@awes-io/ui@2.113.0) (2024-10-15)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **aw-page-header:** hide breadcrumb wrapper if empty ([c7d1781](https://github.com/awes-io/client/commit/c7d17817d0807fdffc441734dfc7c0b052b6a7e1))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* change logic for show active mobile menu childer ([d1d1e08](https://github.com/awes-io/client/commit/d1d1e08d31802cbe50ac3a941f408b9f8167b343))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [2.112.1](https://github.com/awes-io/client/compare/@awes-io/ui@2.112.0...@awes-io/ui@2.112.1) (2024-10-04)
|
|
7
23
|
|
|
8
24
|
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
border-radius: 50%;
|
|
86
86
|
|
|
87
87
|
&:checked {
|
|
88
|
-
|
|
88
|
+
mask-image: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M16 0C7.16344 0 0 7.16344 0 16C0 24.8366 7.16344 32 16 32C24.8366 32 32 24.8366 32 16C32 7.16344 24.8366 0 16 0ZM16 10C12.6863 10 10 12.6863 10 16C10 19.3137 12.6863 22 16 22C19.3137 22 22 19.3137 22 16C22 12.6863 19.3137 10 16 10Z' fill='%23D9D9D9'/%3E%3C/svg%3E");
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
@@ -19,15 +19,12 @@
|
|
|
19
19
|
:title="_title"
|
|
20
20
|
:title-showable="!isDesktop"
|
|
21
21
|
:hide-title="!isDesktop && !isHeaderStuck"
|
|
22
|
+
:hide-breadcrumb="!(backUrl || isMenuToggler)"
|
|
22
23
|
:container="container"
|
|
23
24
|
is-container
|
|
24
25
|
:is-stuck="isHeaderStuck && !isDesktop"
|
|
25
26
|
hide-menu
|
|
26
27
|
class="aw-page__header"
|
|
27
|
-
:style="{
|
|
28
|
-
'--breadcrumb-width':
|
|
29
|
-
backUrl || isMenuToggler ? '2.5rem' : '0px'
|
|
30
|
-
}"
|
|
31
28
|
>
|
|
32
29
|
<template #breadcrumbs>
|
|
33
30
|
<slot name="headline-breadcrumb">
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
}"
|
|
9
9
|
:style="{ '--header-container-width': headerContainerWidth }"
|
|
10
10
|
>
|
|
11
|
-
<div class="aw-page-header__breadcrumbs">
|
|
11
|
+
<div v-if="!hideBreadcrumb" class="aw-page-header__breadcrumbs">
|
|
12
12
|
<slot name="breadcrumbs"> </slot>
|
|
13
13
|
</div>
|
|
14
14
|
|
|
@@ -65,6 +65,8 @@ export default {
|
|
|
65
65
|
default: 'full'
|
|
66
66
|
},
|
|
67
67
|
|
|
68
|
+
hideBreadcrumb: Boolean,
|
|
69
|
+
|
|
68
70
|
hideTitle: Boolean,
|
|
69
71
|
|
|
70
72
|
titleShowable: Boolean,
|
|
@@ -42,7 +42,9 @@
|
|
|
42
42
|
!item.expanded
|
|
43
43
|
"
|
|
44
44
|
class="aw-nav__toggler"
|
|
45
|
-
:class="{
|
|
45
|
+
:class="{
|
|
46
|
+
'aw-nav__toggler--open': i === openedChildrenIndex
|
|
47
|
+
}"
|
|
46
48
|
:[$options.TOGGLE_CHILDREN_ATTR]="i"
|
|
47
49
|
>
|
|
48
50
|
<AwIconSystemMono name="angle" size="16" />
|
|
@@ -54,7 +56,7 @@
|
|
|
54
56
|
:is="item.expanded ? 'div' : 'AwAccordionFold'"
|
|
55
57
|
v-if="item.children && item.children.length"
|
|
56
58
|
:key="'children-' + i"
|
|
57
|
-
:show="
|
|
59
|
+
:show="i === openedChildrenIndex"
|
|
58
60
|
>
|
|
59
61
|
<AwNavItem
|
|
60
62
|
v-for="(subchild, j) in item.children"
|
|
@@ -133,7 +135,7 @@ export default {
|
|
|
133
135
|
|
|
134
136
|
data() {
|
|
135
137
|
return {
|
|
136
|
-
|
|
138
|
+
openedChildrenIndex: null,
|
|
137
139
|
tooltips: {}
|
|
138
140
|
}
|
|
139
141
|
},
|
|
@@ -147,11 +149,7 @@ export default {
|
|
|
147
149
|
watch: {
|
|
148
150
|
items: {
|
|
149
151
|
handler(items) {
|
|
150
|
-
this.
|
|
151
|
-
if (item.expanded) {
|
|
152
|
-
return null
|
|
153
|
-
}
|
|
154
|
-
|
|
152
|
+
this.openedChildrenIndex = items.findIndex((item) => {
|
|
155
153
|
return (
|
|
156
154
|
item === this.activeMenuItem ||
|
|
157
155
|
item.children.some(
|
|
@@ -201,14 +199,13 @@ export default {
|
|
|
201
199
|
if (toggleTarget) {
|
|
202
200
|
$event.stopPropagation()
|
|
203
201
|
|
|
204
|
-
const index =
|
|
205
|
-
|
|
206
|
-
this.$set(
|
|
207
|
-
this.openedChildren,
|
|
208
|
-
index,
|
|
209
|
-
!this.openedChildren[index]
|
|
202
|
+
const index = Number(
|
|
203
|
+
toggleTarget.getAttribute(TOGGLE_CHILDREN_ATTR)
|
|
210
204
|
)
|
|
211
205
|
|
|
206
|
+
this.openedChildrenIndex =
|
|
207
|
+
this.openedChildrenIndex === index ? null : index
|
|
208
|
+
|
|
212
209
|
return
|
|
213
210
|
}
|
|
214
211
|
|
|
@@ -217,9 +214,9 @@ export default {
|
|
|
217
214
|
if (openTarget) {
|
|
218
215
|
$event.stopPropagation()
|
|
219
216
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
217
|
+
this.openedChildrenIndex = Number(
|
|
218
|
+
openTarget.getAttribute(OPEN_CHILDREN_ATTR)
|
|
219
|
+
)
|
|
223
220
|
|
|
224
221
|
return
|
|
225
222
|
}
|
package/nuxt/pages/more.vue
CHANGED
|
@@ -3,13 +3,24 @@
|
|
|
3
3
|
<div class="aw-more__buttons">
|
|
4
4
|
<AwButton color="mono" icon="awesio/arrow" @click="onClickGoBack" />
|
|
5
5
|
|
|
6
|
-
<
|
|
7
|
-
v-if="user"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
<div
|
|
7
|
+
v-if="user || beforeProfileButtonComponent"
|
|
8
|
+
class="aw-more__buttons-wrapper"
|
|
9
|
+
>
|
|
10
|
+
<Component
|
|
11
|
+
v-if="beforeProfileButtonComponent"
|
|
12
|
+
:is="beforeProfileButtonComponent.is"
|
|
13
|
+
v-bind="beforeProfileButtonComponent.props"
|
|
14
|
+
/>
|
|
15
|
+
|
|
16
|
+
<AwButton
|
|
17
|
+
v-if="user"
|
|
18
|
+
color="mono"
|
|
19
|
+
icon="awesio/edit"
|
|
20
|
+
:href="profileUrl"
|
|
21
|
+
back
|
|
22
|
+
/>
|
|
23
|
+
</div>
|
|
13
24
|
</div>
|
|
14
25
|
|
|
15
26
|
<div class="aw-more__profile" v-if="user">
|
|
@@ -131,7 +142,8 @@ export default {
|
|
|
131
142
|
'logoComponent',
|
|
132
143
|
'userMenuAvatarComponent',
|
|
133
144
|
'afterMobileMenuComponent',
|
|
134
|
-
'beforeMobileMenuComponent'
|
|
145
|
+
'beforeMobileMenuComponent',
|
|
146
|
+
'beforeProfileButtonComponent'
|
|
135
147
|
]),
|
|
136
148
|
|
|
137
149
|
profileUrl() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awes-io/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.113.0",
|
|
4
4
|
"description": "User Interface (UI) components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui",
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"rollup-plugin-visualizer": "^2.6.0",
|
|
115
115
|
"rollup-plugin-vue": "^5.0.1"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "03c333535144de280da2aa6117e41ab92a144102"
|
|
118
118
|
}
|
package/store/awesIo.js
CHANGED
|
@@ -39,6 +39,7 @@ export const state = () => ({
|
|
|
39
39
|
},
|
|
40
40
|
mobileMenuOpened: false,
|
|
41
41
|
beforeMobileMenu: null,
|
|
42
|
+
beforeProfileButton: null,
|
|
42
43
|
userMenuAvatar: null,
|
|
43
44
|
afterMobileMenu: null,
|
|
44
45
|
bottomBarAction: null,
|
|
@@ -132,6 +133,10 @@ export const getters = {
|
|
|
132
133
|
return state.beforeMobileMenu
|
|
133
134
|
},
|
|
134
135
|
|
|
136
|
+
beforeProfileButtonComponent(state) {
|
|
137
|
+
return state.beforeProfileButton
|
|
138
|
+
},
|
|
139
|
+
|
|
135
140
|
userMenuAvatarComponent(state) {
|
|
136
141
|
return state.userMenuAvatar
|
|
137
142
|
},
|
|
@@ -233,6 +238,12 @@ export const mutations = {
|
|
|
233
238
|
}
|
|
234
239
|
},
|
|
235
240
|
|
|
241
|
+
SET_BEFORE_PROFILE_BUTTON(state, payload) {
|
|
242
|
+
if (payload && payload.component) {
|
|
243
|
+
state.beforeProfileButton = payload.component
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
|
|
236
247
|
SET_USER_MENU_AVATAR(state, payload) {
|
|
237
248
|
if (payload && payload.component) {
|
|
238
249
|
state.userMenuAvatar = payload.component
|