@things-factory/lite-menu 4.1.15 → 4.1.22
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.
|
@@ -34,9 +34,11 @@ export class LiteMenuPortrait extends LitElement {
|
|
|
34
34
|
: menu.active && typeof menu.active === 'function'
|
|
35
35
|
? menu.active.call(menu, { path: this.path })
|
|
36
36
|
: false}
|
|
37
|
+
.menu=${menu}
|
|
38
|
+
menu
|
|
37
39
|
>
|
|
38
40
|
<a href=${menu.path || '#'}>
|
|
39
|
-
${menu.menus?.length > 0 ? html` <mwc-icon
|
|
41
|
+
${menu.menus?.length > 0 ? html` <mwc-icon submenu-button></mwc-icon> ` : html``}
|
|
40
42
|
<mwc-icon>${menu.icon}</mwc-icon>
|
|
41
43
|
${menu.name}
|
|
42
44
|
</a>
|
|
@@ -55,12 +57,16 @@ export class LiteMenuPortrait extends LitElement {
|
|
|
55
57
|
|
|
56
58
|
firstUpdated() {
|
|
57
59
|
this.renderRoot.addEventListener('click', e => {
|
|
58
|
-
|
|
59
|
-
/* protect to act move to href. */
|
|
60
|
-
e.stopPropagation()
|
|
61
|
-
e.preventDefault()
|
|
60
|
+
const menuElement = e.target.closest('[menu]')
|
|
62
61
|
|
|
63
|
-
|
|
62
|
+
if (menuElement?.menu) {
|
|
63
|
+
let menu = menuElement.menu
|
|
64
|
+
|
|
65
|
+
if (!menu.path) {
|
|
66
|
+
/* protect to act move to href. */
|
|
67
|
+
e.stopPropagation()
|
|
68
|
+
e.preventDefault()
|
|
69
|
+
}
|
|
64
70
|
|
|
65
71
|
this.dispatchEvent(
|
|
66
72
|
new CustomEvent('active-toplevel', {
|
|
@@ -68,8 +74,6 @@ export class LiteMenuPortrait extends LitElement {
|
|
|
68
74
|
detail: this.activeTopLevel === menu ? undefined : menu
|
|
69
75
|
})
|
|
70
76
|
)
|
|
71
|
-
|
|
72
|
-
return
|
|
73
77
|
}
|
|
74
78
|
|
|
75
79
|
/* to respond even if current acting menu is selected */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/lite-menu",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.22",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
"@operato/shell": "^0.3.28",
|
|
34
34
|
"@operato/styles": "^0.3.28",
|
|
35
35
|
"@operato/utils": "^0.3.28",
|
|
36
|
-
"@things-factory/apptool-base": "^4.1.
|
|
37
|
-
"@things-factory/auth-base": "^4.1.
|
|
38
|
-
"@things-factory/board-service": "^4.1.
|
|
39
|
-
"@things-factory/board-ui": "^4.1.
|
|
40
|
-
"@things-factory/grist-ui": "^4.1.
|
|
41
|
-
"@things-factory/more-base": "^4.1.
|
|
42
|
-
"@things-factory/setting-base": "^4.1.
|
|
43
|
-
"@things-factory/utils": "^4.1.
|
|
36
|
+
"@things-factory/apptool-base": "^4.1.22",
|
|
37
|
+
"@things-factory/auth-base": "^4.1.22",
|
|
38
|
+
"@things-factory/board-service": "^4.1.22",
|
|
39
|
+
"@things-factory/board-ui": "^4.1.22",
|
|
40
|
+
"@things-factory/grist-ui": "^4.1.22",
|
|
41
|
+
"@things-factory/more-base": "^4.1.22",
|
|
42
|
+
"@things-factory/setting-base": "^4.1.22",
|
|
43
|
+
"@things-factory/utils": "^4.1.19"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "e40b890d9a573562872298a6b79b26f600f607bf"
|
|
46
46
|
}
|