tpmkms_4wp 9.1.1-beta.16 → 9.1.1-beta.17
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/common/menus.js +16 -1
- package/common/menus.test.json +3500 -0
- package/package.json +2 -2
package/common/menus.js
CHANGED
@@ -24,6 +24,10 @@ class MenusAPI {
|
|
24
24
|
}
|
25
25
|
}
|
26
26
|
|
27
|
+
close() {
|
28
|
+
this._objects.close = true
|
29
|
+
}
|
30
|
+
|
27
31
|
move(direction, steps = 1, units = undefined) {
|
28
32
|
this._objects.move = { direction, steps, units }
|
29
33
|
let next = this.current()
|
@@ -116,9 +120,20 @@ const template = {
|
|
116
120
|
{
|
117
121
|
operators: [
|
118
122
|
"([show_menus|show] (showable_menus))",
|
123
|
+
"([close_menus|close] (menu_menus/*))",
|
119
124
|
"((@<= menu_menus) [typeOfMenu_menus|show] (@== menu_menus))",
|
120
125
|
],
|
121
126
|
bridges: [
|
127
|
+
{
|
128
|
+
id: 'close_menus',
|
129
|
+
isA: ['verb'],
|
130
|
+
associations: ['menus'],
|
131
|
+
bridge: "{ ...next(operator), closee: after[0], generate: ['this', 'closee'] }",
|
132
|
+
semantic: ({context, api}) => {
|
133
|
+
debugger
|
134
|
+
api.close()
|
135
|
+
}
|
136
|
+
},
|
122
137
|
{
|
123
138
|
id: 'show_menus',
|
124
139
|
isA: ['verb'],
|
@@ -231,7 +246,7 @@ knowledgeModule({
|
|
231
246
|
contents: tests,
|
232
247
|
fixtures,
|
233
248
|
checks: {
|
234
|
-
objects: ['move', 'select', 'unselect', 'cancel', 'stop', 'show', 'menuDefs'],
|
249
|
+
objects: ['move', 'select', 'unselect', 'cancel', 'stop', 'show', 'menuDefs', 'close'],
|
235
250
|
context: defaultContextCheck(['operator', 'direction', 'moveable']),
|
236
251
|
},
|
237
252
|
},
|