aloha-vue 1.0.252 → 1.0.253
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/docs/src/components/TheMenu/TheMenu.pug +1 -0
- package/docs/src/views/PageTable/PageTable.js +1 -1
- package/package.json +1 -1
- package/src/AMenu/AMenu.js +6 -0
- package/src/AMenu/AMenuPanel.js +4 -0
- package/src/AMenu/AMenuPanelLink/compositionAPI/AttributesAPI.js +5 -0
- package/src/AMenu/AMenuSearchGroup.js +47 -11
- package/src/AMenu/AMenuSearchPanel.js +6 -0
- package/src/ATable/ATableTopPanel/compositionAPI/ActionsAPI.js +3 -0
- package/src/styles/components/AMenu.scss +4 -0
package/package.json
CHANGED
package/src/AMenu/AMenu.js
CHANGED
|
@@ -83,6 +83,11 @@ export default {
|
|
|
83
83
|
required: false,
|
|
84
84
|
default: true,
|
|
85
85
|
},
|
|
86
|
+
isSearchBreadcrumbsAll: {
|
|
87
|
+
type: Boolean,
|
|
88
|
+
required: false,
|
|
89
|
+
default: false,
|
|
90
|
+
},
|
|
86
91
|
keyChildren: {
|
|
87
92
|
type: String,
|
|
88
93
|
required: false,
|
|
@@ -283,6 +288,7 @@ export default {
|
|
|
283
288
|
dataProParentList: this.dataProParentList,
|
|
284
289
|
idsSearchVisible: this.idsSearchVisible,
|
|
285
290
|
isSearchActive: this.isSearchActive,
|
|
291
|
+
isSearchBreadcrumbsAll: this.isSearchBreadcrumbsAll,
|
|
286
292
|
modelSearch: this.modelSearch,
|
|
287
293
|
}, this.$slots),
|
|
288
294
|
]),
|
package/src/AMenu/AMenuPanel.js
CHANGED
|
@@ -59,12 +59,16 @@ export default {
|
|
|
59
59
|
const isFirst = toRef(props, "isFirst");
|
|
60
60
|
const panelParentsOpen = toRef(props, "panelParentsOpen");
|
|
61
61
|
const parentId = toRef(props, "parentId");
|
|
62
|
+
const isSearchActive = toRef(props, "isSearchActive");
|
|
62
63
|
|
|
63
64
|
const panelId = computed(() => {
|
|
64
65
|
return `a_menu_panel_${ parentId.value || "" }`;
|
|
65
66
|
});
|
|
66
67
|
|
|
67
68
|
const isPanelOpen = computed(() => {
|
|
69
|
+
if (isSearchActive.value) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
68
72
|
if (isFirst.value) {
|
|
69
73
|
return panelParentsOpen.value.length === 0;
|
|
70
74
|
}
|
|
@@ -6,9 +6,14 @@ import {
|
|
|
6
6
|
|
|
7
7
|
export default function AttributesAPI(props) {
|
|
8
8
|
const isPanelOpen = toRef(props, "isPanelOpen");
|
|
9
|
+
const isLinkInSearchPanel = toRef(props, "isLinkInSearchPanel");
|
|
10
|
+
|
|
9
11
|
const isMenuOpen = inject("isMenuOpen");
|
|
10
12
|
|
|
11
13
|
const tabindex = computed(() => {
|
|
14
|
+
if (isLinkInSearchPanel.value) {
|
|
15
|
+
return 0;
|
|
16
|
+
}
|
|
12
17
|
return isPanelOpen.value && isMenuOpen.value ? 0 : -1;
|
|
13
18
|
});
|
|
14
19
|
|
|
@@ -13,7 +13,7 @@ import AKeyParent from "../ui/const/AKeyParent";
|
|
|
13
13
|
import AKeyLabel from "../ui/const/AKeyLabel";
|
|
14
14
|
|
|
15
15
|
import {
|
|
16
|
-
get,
|
|
16
|
+
get, isNil,
|
|
17
17
|
} from "lodash-es";
|
|
18
18
|
|
|
19
19
|
export default {
|
|
@@ -39,6 +39,11 @@ export default {
|
|
|
39
39
|
type: Array,
|
|
40
40
|
required: true,
|
|
41
41
|
},
|
|
42
|
+
isSearchBreadcrumbsAll: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
required: false,
|
|
45
|
+
default: false,
|
|
46
|
+
},
|
|
42
47
|
modelSearch: {
|
|
43
48
|
type: String,
|
|
44
49
|
required: false,
|
|
@@ -50,31 +55,62 @@ export default {
|
|
|
50
55
|
const idsSearchVisible = toRef(props, "idsSearchVisible");
|
|
51
56
|
const items = toRef(props, "items");
|
|
52
57
|
const dataKeyById = toRef(props, "dataKeyById");
|
|
58
|
+
const isSearchBreadcrumbsAll = toRef(props, "isSearchBreadcrumbsAll");
|
|
53
59
|
|
|
54
60
|
const isGroupVisible = computed(() => {
|
|
55
61
|
return !!idsSearchVisible.value.main[groupIndex.value];
|
|
56
62
|
});
|
|
57
63
|
|
|
58
|
-
const
|
|
64
|
+
const getParentLabels = ({ labels = [], item }) => {
|
|
65
|
+
if (item[AKeyParent]) {
|
|
66
|
+
const PARENT = dataKeyById.value[item[AKeyParent]];
|
|
67
|
+
const LABEL = get(PARENT, AKeyLabel);
|
|
68
|
+
if (!isNil(LABEL)) {
|
|
69
|
+
labels.push(LABEL);
|
|
70
|
+
}
|
|
71
|
+
return getParentLabels({ labels, item: PARENT });
|
|
72
|
+
}
|
|
73
|
+
return labels;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const labelsGroup = computed(() => {
|
|
77
|
+
let labels = [];
|
|
59
78
|
const itemFirst = items.value[0] || {};
|
|
60
|
-
|
|
79
|
+
if (isSearchBreadcrumbsAll.value) {
|
|
80
|
+
labels = getParentLabels({ labels, item: itemFirst });
|
|
81
|
+
} else {
|
|
82
|
+
const LABEL = get(dataKeyById.value, `${ itemFirst[AKeyParent] }.${ AKeyLabel }`);
|
|
83
|
+
if (!isNil(LABEL)) {
|
|
84
|
+
labels.push(LABEL);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return labels;
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
const hasLabelsGroup = computed(() => {
|
|
91
|
+
return labelsGroup.value.length > 0;
|
|
61
92
|
});
|
|
62
93
|
|
|
63
94
|
return {
|
|
95
|
+
hasLabelsGroup,
|
|
64
96
|
isGroupVisible,
|
|
65
|
-
|
|
97
|
+
labelsGroup,
|
|
66
98
|
};
|
|
67
99
|
},
|
|
68
100
|
render() {
|
|
69
101
|
if (this.isGroupVisible) {
|
|
70
102
|
return [
|
|
71
|
-
|
|
72
|
-
this.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
103
|
+
this.hasLabelsGroup ?
|
|
104
|
+
this.labelsGroup.map(label => {
|
|
105
|
+
return h("dt", null, [
|
|
106
|
+
withDirectives(h("div", {
|
|
107
|
+
class: "a_menu__list_header a_menu__list_header_search",
|
|
108
|
+
}), [
|
|
109
|
+
[ASafeHtml, label],
|
|
110
|
+
]),
|
|
111
|
+
]);
|
|
112
|
+
}) :
|
|
113
|
+
h("dt"),
|
|
78
114
|
this.items.map(item => {
|
|
79
115
|
return h(AMenuPanelLink, {
|
|
80
116
|
item,
|
|
@@ -33,6 +33,11 @@ export default {
|
|
|
33
33
|
type: Boolean,
|
|
34
34
|
required: true,
|
|
35
35
|
},
|
|
36
|
+
isSearchBreadcrumbsAll: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
required: false,
|
|
39
|
+
default: false,
|
|
40
|
+
},
|
|
36
41
|
modelSearch: {
|
|
37
42
|
type: String,
|
|
38
43
|
required: false,
|
|
@@ -72,6 +77,7 @@ export default {
|
|
|
72
77
|
dataKeyById: this.dataKeyById,
|
|
73
78
|
dataProParentChildren: this.dataProParentChildren,
|
|
74
79
|
idsSearchVisible: this.idsSearchVisible,
|
|
80
|
+
isSearchBreadcrumbsAll: this.isSearchBreadcrumbsAll,
|
|
75
81
|
modelSearch: this.modelSearch,
|
|
76
82
|
}, this.$slots);
|
|
77
83
|
}),
|
|
@@ -22,6 +22,7 @@ export default function ActionsAPI(props, { emit }) {
|
|
|
22
22
|
|
|
23
23
|
const tableId = inject("tableId");
|
|
24
24
|
const currentMultipleActions = inject("currentMultipleActions");
|
|
25
|
+
const rowsLocal = inject("rowsLocal");
|
|
25
26
|
|
|
26
27
|
const {
|
|
27
28
|
closeConfirm,
|
|
@@ -75,6 +76,7 @@ export default function ActionsAPI(props, { emit }) {
|
|
|
75
76
|
const onStartModalMultipleActions = async() => {
|
|
76
77
|
await currentMultipleActions.value.callback({
|
|
77
78
|
rows: selectedRows.value,
|
|
79
|
+
rowsVisible: rowsLocal.value,
|
|
78
80
|
id: buttonMultipleId.value,
|
|
79
81
|
areAllRowsSelected: areAllRowsSelected.value,
|
|
80
82
|
modelFilters: modelFilters.value,
|
|
@@ -95,6 +97,7 @@ export default function ActionsAPI(props, { emit }) {
|
|
|
95
97
|
currentMultipleActions.value.callback({
|
|
96
98
|
close: closeMultipleActionsActive.value,
|
|
97
99
|
rows: selectedRows.value,
|
|
100
|
+
rowsVisible: rowsLocal.value,
|
|
98
101
|
id: buttonMultipleId.value,
|
|
99
102
|
areAllRowsSelected: areAllRowsSelected.value,
|
|
100
103
|
modelFilters: modelFilters.value,
|
|
@@ -172,6 +172,10 @@ $a_menu_breakpoint_mobile: 991px;
|
|
|
172
172
|
padding-top: .5rem;
|
|
173
173
|
padding-bottom: .5rem;
|
|
174
174
|
}
|
|
175
|
+
.a_menu__list_header_search {
|
|
176
|
+
padding-left: var(--a_menu_link_padding_x);
|
|
177
|
+
padding-right: var(--a_menu_link_padding_x);
|
|
178
|
+
}
|
|
175
179
|
.a_menu__link {
|
|
176
180
|
flex-grow: 1;
|
|
177
181
|
flex-basis: 10%;
|