aloha-vue 1.0.28 → 1.0.29
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/views/PageTable/PageTable.pug +3 -0
- package/package.json +1 -1
- package/src/ATable/ATable.js +19 -2
- package/src/ATable/ATableHeader/ATableHeader.js +2 -1
- package/src/ATable/ATableHeaderTh/ATableHeaderTh.js +3 -1
- package/src/ATable/ATableHeaderThAction/ATableHeaderThActionItem.js +3 -2
- package/src/ATable/ATableTd/ATableTd.js +7 -3
- package/src/ATable/ATableTr/ATableTr.js +2 -1
- package/src/ATable/compositionAPI/DragAndDropChildAPI.js +2 -1
- package/src/styles/components/ATable.scss +1 -0
|
@@ -9,6 +9,9 @@ div
|
|
|
9
9
|
:table-actions="tableActions"
|
|
10
10
|
preview="right"
|
|
11
11
|
:is-quick-search="true"
|
|
12
|
+
:is-action-column-visible="true"
|
|
13
|
+
:is-columns-dnd="true"
|
|
14
|
+
:is-pagination="true"
|
|
12
15
|
v-model:modelQuickSearch="modelQuickSearch"
|
|
13
16
|
@change-columns-ordering="changeColumnsOrdering"
|
|
14
17
|
)
|
package/package.json
CHANGED
package/src/ATable/ATable.js
CHANGED
|
@@ -141,6 +141,11 @@ export default {
|
|
|
141
141
|
required: false,
|
|
142
142
|
default: () => [],
|
|
143
143
|
},
|
|
144
|
+
isPagination: {
|
|
145
|
+
type: Boolean,
|
|
146
|
+
required: false,
|
|
147
|
+
default: true,
|
|
148
|
+
},
|
|
144
149
|
isPaginationOutside: {
|
|
145
150
|
type: Boolean,
|
|
146
151
|
required: false,
|
|
@@ -174,6 +179,16 @@ export default {
|
|
|
174
179
|
required: false,
|
|
175
180
|
default: "",
|
|
176
181
|
},
|
|
182
|
+
isActionColumnVisible: {
|
|
183
|
+
type: Boolean,
|
|
184
|
+
required: false,
|
|
185
|
+
default: true,
|
|
186
|
+
},
|
|
187
|
+
isColumnsDnd: {
|
|
188
|
+
type: Boolean,
|
|
189
|
+
required: false,
|
|
190
|
+
default: true,
|
|
191
|
+
},
|
|
177
192
|
},
|
|
178
193
|
emits: [
|
|
179
194
|
"update:modelColumnsOrder",
|
|
@@ -195,6 +210,8 @@ export default {
|
|
|
195
210
|
columns: computed(() => this.columns),
|
|
196
211
|
columnActionsWidthLocal: computed(() => this.columnActionsWidth),
|
|
197
212
|
columnWidthDefault: computed(() => this.columnWidthDefault),
|
|
213
|
+
isActionColumnVisible: computed(() => this.isActionColumnVisible),
|
|
214
|
+
isColumnsDnd: computed(() => this.isColumnsDnd),
|
|
198
215
|
isLoadingOptions: computed(() => this.isLoadingOptions),
|
|
199
216
|
isLoadingTable: computed(() => this.isLoadingTable),
|
|
200
217
|
rowActions: computed(() => this.rowActions),
|
|
@@ -305,7 +322,7 @@ export default {
|
|
|
305
322
|
},
|
|
306
323
|
|
|
307
324
|
dataPaginated() {
|
|
308
|
-
if (this.limit && !this.isPaginationOutside) {
|
|
325
|
+
if (this.limit && !this.isPaginationOutside && this.isPagination) {
|
|
309
326
|
const DATA_SORTED = cloneDeep(this.dataSorted);
|
|
310
327
|
const INDEX_START = this.offset;
|
|
311
328
|
const INDEX_END = INDEX_START + this.limit;
|
|
@@ -498,7 +515,7 @@ export default {
|
|
|
498
515
|
!this.hasRows && h("div", {
|
|
499
516
|
class: "a_table__empty_text",
|
|
500
517
|
}, "Keine Einträge vorhanden."),
|
|
501
|
-
h("div", {
|
|
518
|
+
this.isPagination && h("div", {
|
|
502
519
|
class: "a_pagination__parent"
|
|
503
520
|
}, [
|
|
504
521
|
h(ATableCountProPage, {
|
|
@@ -20,6 +20,7 @@ export default {
|
|
|
20
20
|
},
|
|
21
21
|
},
|
|
22
22
|
inject: [
|
|
23
|
+
"isActionColumnVisible",
|
|
23
24
|
"changeColumnsOrdering",
|
|
24
25
|
"columnsOrdered",
|
|
25
26
|
],
|
|
@@ -72,7 +73,7 @@ export default {
|
|
|
72
73
|
onDragendParent: this.dragend,
|
|
73
74
|
});
|
|
74
75
|
}),
|
|
75
|
-
h(ATableHeaderThAction),
|
|
76
|
+
this.isActionColumnVisible && h(ATableHeaderThAction),
|
|
76
77
|
]),
|
|
77
78
|
]);
|
|
78
79
|
},
|
|
@@ -36,6 +36,7 @@ export default {
|
|
|
36
36
|
],
|
|
37
37
|
inject: [
|
|
38
38
|
"changeModelSort",
|
|
39
|
+
"isColumnsDnd",
|
|
39
40
|
"isLoadingOptions",
|
|
40
41
|
"isLoadingTable",
|
|
41
42
|
"modelColumnsVisibleMapping",
|
|
@@ -77,8 +78,9 @@ export default {
|
|
|
77
78
|
classForTh() {
|
|
78
79
|
return [
|
|
79
80
|
"a_table__th a_table__cell",
|
|
81
|
+
this.column.class,
|
|
80
82
|
{
|
|
81
|
-
a_table__th_draggable: !this.isLocked && !this.isLoadingOptions,
|
|
83
|
+
a_table__th_draggable: !this.isLocked && !this.isLoadingOptions && this.isColumnsDnd,
|
|
82
84
|
a_table__th_sorting: this.isSorting,
|
|
83
85
|
}
|
|
84
86
|
];
|
|
@@ -45,6 +45,7 @@ export default {
|
|
|
45
45
|
"changeColumnsOrdering",
|
|
46
46
|
"changeModelColumnsVisible",
|
|
47
47
|
"columnsOrdered",
|
|
48
|
+
"isColumnsDnd",
|
|
48
49
|
"isLoadingOptions",
|
|
49
50
|
"isLoadingTable",
|
|
50
51
|
"modelColumnsVisibleLocal",
|
|
@@ -118,7 +119,7 @@ export default {
|
|
|
118
119
|
},
|
|
119
120
|
|
|
120
121
|
arrowButtons() {
|
|
121
|
-
if (!this.isLocked) {
|
|
122
|
+
if (!this.isLocked && this.isColumnsDnd) {
|
|
122
123
|
return [
|
|
123
124
|
this.isButtonArrowUpVisible && h("button", {
|
|
124
125
|
id: this.idButtonArrowUp,
|
|
@@ -246,7 +247,7 @@ export default {
|
|
|
246
247
|
}),
|
|
247
248
|
...this.arrowButtons,
|
|
248
249
|
]),
|
|
249
|
-
!this.isLocked && h(AIcon, {
|
|
250
|
+
(!this.isLocked && this.isColumnsDnd) && h(AIcon, {
|
|
250
251
|
icon: "Dnd",
|
|
251
252
|
class: "a_table__th__dropdown_item__icon_dnd"
|
|
252
253
|
}),
|
|
@@ -64,9 +64,13 @@ export default {
|
|
|
64
64
|
attributesForTd() {
|
|
65
65
|
const ATTRIBUTES = {
|
|
66
66
|
role: "cell",
|
|
67
|
-
class: [
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
class: [
|
|
68
|
+
"a_table__td a_table__cell",
|
|
69
|
+
this.column.class,
|
|
70
|
+
{
|
|
71
|
+
a_table__cell_click: this.hasPreview,
|
|
72
|
+
},
|
|
73
|
+
],
|
|
70
74
|
style: this.columnsStyles,
|
|
71
75
|
};
|
|
72
76
|
if (this.hasPreview) {
|
|
@@ -24,6 +24,7 @@ export default {
|
|
|
24
24
|
inject: [
|
|
25
25
|
"columnsOrdered",
|
|
26
26
|
"hasPreview",
|
|
27
|
+
"isActionColumnVisible",
|
|
27
28
|
"previewRightRowIndex",
|
|
28
29
|
"previewRightRowIndexLast",
|
|
29
30
|
"tableId",
|
|
@@ -71,7 +72,7 @@ export default {
|
|
|
71
72
|
rowIndex: this.rowIndex,
|
|
72
73
|
}, this.$slots);
|
|
73
74
|
}),
|
|
74
|
-
h(ATableTdAction, {
|
|
75
|
+
this.isActionColumnVisible && h(ATableTdAction, {
|
|
75
76
|
row: this.row,
|
|
76
77
|
rowIndex: this.rowIndex,
|
|
77
78
|
}, this.$slots),
|
|
@@ -10,6 +10,7 @@ export default function DragAndDropChildAPI(props, { emit }, { classOver = "" })
|
|
|
10
10
|
const columnIndex = toRef(props, "columnIndex");
|
|
11
11
|
|
|
12
12
|
const isLoadingOptions = inject("isLoadingOptions");
|
|
13
|
+
const isColumnsDnd = inject("isColumnsDnd");
|
|
13
14
|
|
|
14
15
|
const root = ref(null);
|
|
15
16
|
|
|
@@ -60,7 +61,7 @@ export default function DragAndDropChildAPI(props, { emit }, { classOver = "" })
|
|
|
60
61
|
const ATTRIBUTES = {
|
|
61
62
|
ref: "root",
|
|
62
63
|
};
|
|
63
|
-
if (!isLocked.value) {
|
|
64
|
+
if (!isLocked.value && isColumnsDnd.value) {
|
|
64
65
|
ATTRIBUTES.draggable = !isLoadingOptions.value;
|
|
65
66
|
ATTRIBUTES.onDragstart = dragstart;
|
|
66
67
|
ATTRIBUTES.onDragend = dragend;
|