aleman 1.10.0 → 1.11.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
CHANGED
package/menu/addons/click.js
CHANGED
package/menu/addons/enter.js
CHANGED
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
import {run} from './run/index.js';
|
|
2
|
+
import * as right from './right.js';
|
|
2
3
|
|
|
3
4
|
export const keys = ['Enter'];
|
|
4
5
|
|
|
5
6
|
export const filter = ({state}) => state.command === 'show';
|
|
6
7
|
|
|
7
8
|
export const stopPropagation = true;
|
|
9
|
+
export const preventDefault = true;
|
|
8
10
|
|
|
9
11
|
export const listener = ({options, state}) => {
|
|
10
|
-
run({
|
|
12
|
+
const [result] = run({
|
|
11
13
|
options,
|
|
12
14
|
state,
|
|
13
15
|
});
|
|
16
|
+
|
|
17
|
+
if (!result)
|
|
18
|
+
return right.listener({
|
|
19
|
+
options,
|
|
20
|
+
state,
|
|
21
|
+
});
|
|
22
|
+
|
|
14
23
|
options.beforeHide?.(state);
|
|
15
24
|
|
|
16
25
|
return {
|
package/menu/addons/run/index.js
CHANGED
|
@@ -7,8 +7,11 @@ export const run = ({options, state}) => {
|
|
|
7
7
|
|
|
8
8
|
const fn = values(menu)[index];
|
|
9
9
|
|
|
10
|
+
if (isObject(fn) && submenuIndex === -1)
|
|
11
|
+
return [false];
|
|
12
|
+
|
|
10
13
|
if (isObject(fn))
|
|
11
|
-
return setTimeout(values(fn)[submenuIndex]);
|
|
14
|
+
return [true, setTimeout(values(fn)[submenuIndex])];
|
|
12
15
|
|
|
13
|
-
setTimeout(fn);
|
|
16
|
+
return [true, setTimeout(fn)];
|
|
14
17
|
};
|