@things-factory/lite-menu 5.0.0-zeta.9 → 5.0.2

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.
@@ -91,7 +91,7 @@ class AddonMenuSetting extends connect(store)(localize(i18next)(PageView)) {
91
91
  <ox-grist .mode=${this.mode} .config=${this.config} .fetchHandler=${this.fetchHandler}>
92
92
  <div slot="headroom">
93
93
  <div id="filters">
94
- <ox-filters-form></ox-filters-form>
94
+ <ox-filters-form autofocus></ox-filters-form>
95
95
  </div>
96
96
 
97
97
  <div id="sorters">
@@ -8,6 +8,13 @@ import { connect } from 'pwa-helpers'
8
8
  import { store } from '@operato/shell'
9
9
  import { ScrollbarStyles } from '@operato/styles'
10
10
 
11
+ function isActiveMenu(menu, path) {
12
+ return (
13
+ menu.path?.split('?')[0] === path ||
14
+ (menu.active && typeof menu.active === 'function' && menu.active.call(menu, { path }))
15
+ )
16
+ }
17
+
11
18
  export class LiteMenuPart extends connect(store)(LitElement) {
12
19
  static get properties() {
13
20
  return {
@@ -58,10 +65,6 @@ export class LiteMenuPart extends connect(store)(LitElement) {
58
65
  ]
59
66
  }
60
67
 
61
- renderMenus(menus, activeTopLevel, activeMenu) {
62
- return
63
- }
64
-
65
68
  render() {
66
69
  return html`
67
70
  <slot name="head"></slot>
@@ -122,11 +125,11 @@ export class LiteMenuPart extends connect(store)(LitElement) {
122
125
  var activeMenu
123
126
 
124
127
  this._activeTopLevel = menus.find(menu => {
125
- if (menu.path?.split('?')[0] === path) {
128
+ if (isActiveMenu(menu, path)) {
126
129
  activeMenu = menu
127
130
  return true
128
131
  } else if (menu.menus) {
129
- activeMenu = menu.menus.find(menu => menu.path?.split('?')[0] === path)
132
+ activeMenu = menu.menus.find(menu => isActiveMenu(menu, path))
130
133
  return !!activeMenu
131
134
  }
132
135
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/lite-menu",
3
- "version": "5.0.0-zeta.9",
3
+ "version": "5.0.2",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -24,23 +24,23 @@
24
24
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
25
25
  },
26
26
  "dependencies": {
27
- "@operato/data-grist": "^1.0.0-beta.40",
28
- "@operato/graphql": "^1.0.0-beta.40",
29
- "@operato/i18n": "^1.0.0-beta.40",
30
- "@operato/input": "^1.0.0-beta.40",
31
- "@operato/layout": "^1.0.0-beta.40",
32
- "@operato/popup": "^1.0.0-beta.40",
33
- "@operato/shell": "^1.0.0-beta.40",
34
- "@operato/styles": "^1.0.0-beta.40",
35
- "@operato/utils": "^1.0.0-beta.40",
36
- "@things-factory/apptool-base": "^5.0.0-zeta.9",
37
- "@things-factory/auth-base": "^5.0.0-zeta.9",
38
- "@things-factory/board-service": "^5.0.0-zeta.9",
39
- "@things-factory/board-ui": "^5.0.0-zeta.9",
40
- "@things-factory/grist-ui": "^5.0.0-zeta.9",
41
- "@things-factory/more-base": "^5.0.0-zeta.9",
42
- "@things-factory/setting-base": "^5.0.0-zeta.9",
43
- "@things-factory/utils": "^5.0.0-zeta.9"
27
+ "@operato/data-grist": "^1.0.1",
28
+ "@operato/graphql": "^1.0.0",
29
+ "@operato/i18n": "^1.0.0",
30
+ "@operato/input": "^1.0.1",
31
+ "@operato/layout": "^1.0.1",
32
+ "@operato/popup": "^1.0.0",
33
+ "@operato/shell": "^1.0.1",
34
+ "@operato/styles": "^1.0.0",
35
+ "@operato/utils": "^1.0.1",
36
+ "@things-factory/apptool-base": "^5.0.1",
37
+ "@things-factory/auth-base": "^5.0.1",
38
+ "@things-factory/board-service": "^5.0.2",
39
+ "@things-factory/board-ui": "^5.0.1",
40
+ "@things-factory/grist-ui": "^5.0.1",
41
+ "@things-factory/more-base": "^5.0.1",
42
+ "@things-factory/setting-base": "^5.0.1",
43
+ "@things-factory/utils": "^5.0.1"
44
44
  },
45
- "gitHead": "af1562aba5cd179a7d10fc252b791e0a78049283"
45
+ "gitHead": "009cda6cb65e0930988fb2b1c1a309b9a7973383"
46
46
  }