aloha-vue 1.0.232 → 1.0.233
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.
|
@@ -129,6 +129,12 @@ export default {
|
|
|
129
129
|
data: [],
|
|
130
130
|
isLoadingOptions: false,
|
|
131
131
|
rowActions: [
|
|
132
|
+
{
|
|
133
|
+
isDivider: true,
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
isDivider: true,
|
|
137
|
+
},
|
|
132
138
|
{
|
|
133
139
|
label: "Click me",
|
|
134
140
|
title: "Click me title",
|
|
@@ -140,6 +146,15 @@ export default {
|
|
|
140
146
|
{
|
|
141
147
|
isDivider: true,
|
|
142
148
|
},
|
|
149
|
+
{
|
|
150
|
+
isDivider: true,
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
isDivider: true,
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
isDivider: true,
|
|
157
|
+
},
|
|
143
158
|
{
|
|
144
159
|
labelCallback: ({ row, rowIndex }) => `${ rowIndex } Click ${ row.aloha }`,
|
|
145
160
|
titleCallback: ({ row, rowIndex }) => `${ rowIndex } Click ${ row.aloha } title`,
|
|
@@ -154,8 +169,20 @@ export default {
|
|
|
154
169
|
label: "Dokument herunterladen",
|
|
155
170
|
target: "_blank",
|
|
156
171
|
},
|
|
172
|
+
{
|
|
173
|
+
isDivider: true,
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
isDivider: true,
|
|
177
|
+
},
|
|
157
178
|
],
|
|
158
179
|
multipleActions: [
|
|
180
|
+
{
|
|
181
|
+
isDivider: true,
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
isDivider: true,
|
|
185
|
+
},
|
|
159
186
|
{
|
|
160
187
|
label: "Aloha1",
|
|
161
188
|
title: "Aloha1 Title",
|
|
@@ -171,7 +198,12 @@ export default {
|
|
|
171
198
|
},
|
|
172
199
|
{
|
|
173
200
|
isDivider: true,
|
|
174
|
-
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
isDivider: true,
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
isDivider: true,
|
|
175
207
|
},
|
|
176
208
|
{
|
|
177
209
|
label: "Aloha1 modal",
|
|
@@ -182,6 +214,12 @@ export default {
|
|
|
182
214
|
isHidden: false,
|
|
183
215
|
isHiddenCallback: this.isHiddenMultiple,
|
|
184
216
|
},
|
|
217
|
+
{
|
|
218
|
+
isDivider: true,
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
isDivider: true,
|
|
222
|
+
},
|
|
185
223
|
],
|
|
186
224
|
tableActions: [
|
|
187
225
|
{
|
package/package.json
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
cloneDeep,
|
|
11
11
|
filter,
|
|
12
12
|
forEach,
|
|
13
|
+
last,
|
|
13
14
|
} from "lodash-es";
|
|
14
15
|
|
|
15
16
|
export default function ActionsAPI(props, { emit }) {
|
|
@@ -52,9 +53,24 @@ export default function ActionsAPI(props, { emit }) {
|
|
|
52
53
|
|
|
53
54
|
const multipleActions = toRef(props, "multipleActions");
|
|
54
55
|
const multipleActionsFiltered = computed(() => {
|
|
55
|
-
|
|
56
|
+
const ACTIONS_FILTERED = filter(multipleActions.value, action => {
|
|
56
57
|
return !action.isHidden;
|
|
57
58
|
});
|
|
59
|
+
|
|
60
|
+
const ACTIONS_DIVIDER_FILTERED = [];
|
|
61
|
+
forEach(ACTIONS_FILTERED, action => {
|
|
62
|
+
if (!action.isDivider ||
|
|
63
|
+
(ACTIONS_DIVIDER_FILTERED.length > 0 &&
|
|
64
|
+
!last(ACTIONS_DIVIDER_FILTERED).isDivider)) {
|
|
65
|
+
ACTIONS_DIVIDER_FILTERED.push(action);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
if (last(ACTIONS_DIVIDER_FILTERED).isDivider) {
|
|
70
|
+
ACTIONS_DIVIDER_FILTERED.pop();
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return ACTIONS_DIVIDER_FILTERED;
|
|
58
74
|
});
|
|
59
75
|
|
|
60
76
|
const isMultipleActionsFiltered = computed(() => {
|
|
@@ -6,7 +6,9 @@ import {
|
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
8
|
filter,
|
|
9
|
+
forEach,
|
|
9
10
|
isFunction,
|
|
11
|
+
last,
|
|
10
12
|
} from "lodash-es";
|
|
11
13
|
|
|
12
14
|
export default function RowActionsAPI(props) {
|
|
@@ -30,7 +32,22 @@ export default function RowActionsAPI(props) {
|
|
|
30
32
|
};
|
|
31
33
|
|
|
32
34
|
const rowActionsFiltered = computed(() => {
|
|
33
|
-
|
|
35
|
+
const ROW_ACTIONS_FILTERED = filter(rowActions.value, rowAction => isRowActionVisible({ rowAction }));
|
|
36
|
+
|
|
37
|
+
const ROW_ACTIONS_DIVIDER_FILTERED = [];
|
|
38
|
+
forEach(ROW_ACTIONS_FILTERED, action => {
|
|
39
|
+
if (!action.isDivider ||
|
|
40
|
+
(ROW_ACTIONS_DIVIDER_FILTERED.length > 0 &&
|
|
41
|
+
!last(ROW_ACTIONS_DIVIDER_FILTERED).isDivider)) {
|
|
42
|
+
ROW_ACTIONS_DIVIDER_FILTERED.push(action);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
if (last(ROW_ACTIONS_DIVIDER_FILTERED).isDivider) {
|
|
47
|
+
ROW_ACTIONS_DIVIDER_FILTERED.pop();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return ROW_ACTIONS_DIVIDER_FILTERED;
|
|
34
51
|
});
|
|
35
52
|
|
|
36
53
|
const isRowActionsDropdownVisible = computed(() => {
|