aloha-vue 1.0.147 → 1.0.148
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/package.json
CHANGED
package/src/AMenu/AMenu.js
CHANGED
|
@@ -189,15 +189,17 @@ export default {
|
|
|
189
189
|
|
|
190
190
|
return {
|
|
191
191
|
attributesBlockerClick,
|
|
192
|
+
dataKeyById,
|
|
193
|
+
dataProParent,
|
|
194
|
+
dataProParentList,
|
|
192
195
|
idsSearchVisible,
|
|
193
196
|
isButtonToggleVisible,
|
|
194
197
|
isMenuOpen,
|
|
195
198
|
isSearchActive,
|
|
196
|
-
dataKeyById,
|
|
197
|
-
dataProParent,
|
|
198
|
-
dataProParentList,
|
|
199
199
|
modelSearch,
|
|
200
200
|
panelParentsOpen,
|
|
201
|
+
toggleMenu,
|
|
202
|
+
togglePanel,
|
|
201
203
|
updateModelSearch,
|
|
202
204
|
};
|
|
203
205
|
},
|
|
@@ -10,13 +10,16 @@ import AIcon from "../AIcon/AIcon";
|
|
|
10
10
|
|
|
11
11
|
import AFiltersAPI from "../compositionAPI/AFiltersAPI";
|
|
12
12
|
|
|
13
|
-
import AKeysCode from "../const/AKeysCode";
|
|
14
|
-
import AKeyLabel from "../ui/const/AKeyLabel";
|
|
15
13
|
import AKeyId from "../ui/const/AKeyId";
|
|
14
|
+
import AKeyLabel from "../ui/const/AKeyLabel";
|
|
15
|
+
import AKeyParent from "../ui/const/AKeyParent";
|
|
16
|
+
import AKeysCode from "../const/AKeysCode";
|
|
17
|
+
import {
|
|
18
|
+
setFocusToFirstLinkInPanel
|
|
19
|
+
} from "./utils/utils";
|
|
16
20
|
import {
|
|
17
21
|
get,
|
|
18
22
|
} from "lodash-es";
|
|
19
|
-
import AKeyParent from "../ui/const/AKeyParent";
|
|
20
23
|
|
|
21
24
|
|
|
22
25
|
export default {
|
|
@@ -116,14 +119,7 @@ export default {
|
|
|
116
119
|
|
|
117
120
|
const openSubMenu = () => {
|
|
118
121
|
togglePanel({ parentId: id.value, isLinkInSearchPanel: isLinkInSearchPanel.value });
|
|
119
|
-
|
|
120
|
-
const PANEL_LINKS_SELECTOR = `${ PANEL_ID } a`;
|
|
121
|
-
setTimeout(() => {
|
|
122
|
-
const EL_LINK = document.querySelector(PANEL_LINKS_SELECTOR);
|
|
123
|
-
if (EL_LINK) {
|
|
124
|
-
EL_LINK.focus();
|
|
125
|
-
}
|
|
126
|
-
});
|
|
122
|
+
setFocusToFirstLinkInPanel(id.value);
|
|
127
123
|
};
|
|
128
124
|
|
|
129
125
|
const onKeydown = $event => {
|
|
@@ -33,8 +33,10 @@ export default function AMenuPanelsAPI(props, {
|
|
|
33
33
|
return panelParentsOpenLocal;
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
const togglePanel = ({ parentId, isLinkInSearchPanel }) => {
|
|
37
|
-
if (
|
|
36
|
+
const togglePanel = ({ parentIds, parentId, isLinkInSearchPanel }) => {
|
|
37
|
+
if (parentIds) {
|
|
38
|
+
panelParentsOpen.value = parentIds;
|
|
39
|
+
} else if (isLinkInSearchPanel) {
|
|
38
40
|
const PANEL_PARENTS_OPEN = [];
|
|
39
41
|
panelParentsOpen.value = openPanelFromSearch({ parentId, panelParentsOpenLocal: PANEL_PARENTS_OPEN });
|
|
40
42
|
} else {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function setFocusToFirstLinkInPanel(panelId = "") {
|
|
2
|
+
const PANEL_ID = `#a_menu_panel_${ panelId }`;
|
|
3
|
+
const PANEL_LINKS_SELECTOR = `${ PANEL_ID } a`;
|
|
4
|
+
setTimeout(() => {
|
|
5
|
+
const EL_LINK = document.querySelector(PANEL_LINKS_SELECTOR);
|
|
6
|
+
if (EL_LINK) {
|
|
7
|
+
EL_LINK.focus();
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
}
|