tpmkms_4wp 9.1.1-beta.20 → 9.1.1-beta.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.
@@ -123,10 +123,32 @@ const calculateParentsHelper = (defs, parents) => {
123
123
  return parents
124
124
  }
125
125
 
126
+ const calculatePaths = (defs) => {
127
+ const paths = {}
128
+ calculatePathsHelper(defs, paths)
129
+ return paths
130
+ }
131
+
132
+ const calculatePathsHelper = (defs, paths) => {
133
+ if (Array.isArray(defs)) {
134
+ for (const def of defs) {
135
+ calculatePathsHelper(def, paths)
136
+ }
137
+ } else {
138
+ paths[defs.key] = [defs.key]
139
+ for (const child of (defs.children || [])) {
140
+ paths[child.key] = [defs.key, child.key]
141
+ }
142
+ }
143
+ return paths
144
+ }
145
+
146
+
126
147
  module.exports = {
127
148
  calculateRights,
128
149
  calculateLefts,
129
150
  calculateDowns,
130
151
  calculateUps,
131
152
  calculateParents,
153
+ calculatePaths,
132
154
  }
package/common/menus.js CHANGED
@@ -21,6 +21,7 @@ class MenusAPI {
21
21
  up: helpers.calculateUps(this._objects.menuDefs),
22
22
  down: helpers.calculateDowns(this._objects.menuDefs),
23
23
  parents: helpers.calculateParents(this._objects.menuDefs),
24
+ paths: helpers.calculatePaths(this._objects.menuDefs),
24
25
  }
25
26
  }
26
27
 
@@ -130,7 +131,6 @@ const template = {
130
131
  associations: ['menus'],
131
132
  bridge: "{ ...next(operator), closee: after[0], generate: ['this', 'closee'] }",
132
133
  semantic: ({context, api}) => {
133
- debugger
134
134
  api.close()
135
135
  }
136
136
  },
package/package.json CHANGED
@@ -325,8 +325,8 @@
325
325
  "scriptjs": "^2.5.9",
326
326
  "table": "^6.7.1",
327
327
  "uuid": "^9.0.0",
328
- "theprogrammablemind_4wp": "9.1.1-beta.20"
328
+ "theprogrammablemind_4wp": "9.1.1-beta.22"
329
329
  },
330
- "version": "9.1.1-beta.20",
330
+ "version": "9.1.1-beta.22",
331
331
  "license": "UNLICENSED"
332
332
  }