aloha-vue 2.57.2 → 2.57.4
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.md +11 -0
- package/dist/aloha-vue.es.js +12616 -12549
- package/dist/aloha-vue.umd.js +56 -56
- package/package.json +1 -1
- package/src/ATableForm/ATableForm.js +31 -27
- package/src/ATableForm/ATableFormCellAction/ATableFormCellAction.js +34 -7
- package/src/ATableForm/ATableFormCellAction/compositionAPI/DeleteAPI.js +1 -6
- package/src/ATableForm/ATableFormCellAction/compositionAPI/IdsAPI.js +31 -0
- package/src/ATableForm/ATableFormRow/ATableFormRow.js +26 -20
- package/src/ATableForm/ATableFormRow/compositionAPI/EditAPI.js +5 -4
- package/src/ATableForm/compositionAPI/ClassesAPI.js +23 -23
- package/src/ATableForm/compositionAPI/EditAPI.js +119 -107
- package/src/ui/AInputCurrency/AInputCurrency.js +4 -0
- package/src/ui/AInputCurrency/compositionAPI/InputEventsAPI.js +20 -4
- package/src/ui/AInputCurrency/compositionAPI/ModelAPI.js +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aloha-vue",
|
|
3
|
-
"version": "2.57.
|
|
3
|
+
"version": "2.57.4",
|
|
4
4
|
"description": "Aloha-vue is a JavaScript library that provides a wide range of accessible components and directives for Vue.js. Accessibility is of paramount importance to us, and we have designed all our components to meet accessibility compliance criteria. This library is a valuable tool for frontend developers and has already been used in three projects, including two large-scale ones",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accessibility compliance criteria",
|
|
@@ -215,7 +215,7 @@ export default {
|
|
|
215
215
|
} = IconsAPI(props);
|
|
216
216
|
|
|
217
217
|
const {
|
|
218
|
-
|
|
218
|
+
actionsClassesLocal,
|
|
219
219
|
} = ClassesAPI(props);
|
|
220
220
|
|
|
221
221
|
const {
|
|
@@ -302,7 +302,7 @@ export default {
|
|
|
302
302
|
canAddRow,
|
|
303
303
|
canMoveRowDown,
|
|
304
304
|
canMoveRowUp,
|
|
305
|
-
|
|
305
|
+
actionsClassesLocal,
|
|
306
306
|
columnsStylesGrow,
|
|
307
307
|
draggedRowIndex,
|
|
308
308
|
dragOverPosition,
|
|
@@ -361,22 +361,23 @@ export default {
|
|
|
361
361
|
}, [
|
|
362
362
|
h(ATableFormRow, {
|
|
363
363
|
id: this.id,
|
|
364
|
+
actionsClasses: this.actionsClasses,
|
|
365
|
+
actionsDisabledCallback: this.actionsDisabledCallback,
|
|
366
|
+
actionsHideCallback: this.actionsHideCallback,
|
|
367
|
+
actionsTitleCallback: this.actionsTitleCallback,
|
|
364
368
|
allColumnsLength: this.allColumnsLength,
|
|
365
369
|
canMoveRowDown: this.canMoveRowDown,
|
|
366
370
|
canMoveRowUp: this.canMoveRowUp,
|
|
367
371
|
cellTag: "th",
|
|
368
372
|
changeModel: this.changeModel,
|
|
369
|
-
actionsClasses: this.actionsClasses,
|
|
370
373
|
columns: this.columns,
|
|
371
374
|
columnsStylesGrow: this.columnsStylesGrow,
|
|
372
375
|
draggedRowIndex: this.draggedRowIndex,
|
|
376
|
+
extra: this.extra,
|
|
373
377
|
hasActionsColumn: this.hasActionsColumn,
|
|
374
378
|
hasActiveEditRow: false,
|
|
375
|
-
isActiveEditMode: false,
|
|
376
379
|
isActionsSticky: this.isActionsSticky,
|
|
377
|
-
|
|
378
|
-
actionsHideCallback: this.actionsHideCallback,
|
|
379
|
-
actionsTitleCallback: this.actionsTitleCallback,
|
|
380
|
+
isActiveEditMode: false,
|
|
380
381
|
isDeletable: this.isDeletable,
|
|
381
382
|
isDeletableConfirm: this.isDeletableConfirm,
|
|
382
383
|
isDndDisabled: this.hasActiveEditRow,
|
|
@@ -395,8 +396,8 @@ export default {
|
|
|
395
396
|
rows: this.rows,
|
|
396
397
|
saveRow: this.saveRow,
|
|
397
398
|
texts: this.textsLocal,
|
|
398
|
-
widths: this.widthsLocal,
|
|
399
399
|
trClass: "a_table_form__row a_table_form__row_head",
|
|
400
|
+
widths: this.widthsLocal,
|
|
400
401
|
}, this.$slots),
|
|
401
402
|
]),
|
|
402
403
|
h("tbody", {
|
|
@@ -410,31 +411,32 @@ export default {
|
|
|
410
411
|
});
|
|
411
412
|
|
|
412
413
|
return h(ATableFormRow, {
|
|
414
|
+
key: rowKey,
|
|
413
415
|
id: this.id,
|
|
416
|
+
actionsClasses: this.actionsClassesLocal,
|
|
417
|
+
actionsDisabledCallback: this.actionsDisabledCallback,
|
|
418
|
+
actionsHideCallback: this.actionsHideCallback,
|
|
419
|
+
actionsTitleCallback: this.actionsTitleCallback,
|
|
414
420
|
allColumnsLength: this.allColumnsLength,
|
|
415
421
|
canMoveRowDown: this.canMoveRowDown,
|
|
416
422
|
canMoveRowUp: this.canMoveRowUp,
|
|
417
423
|
changeModel: this.changeModel,
|
|
418
|
-
actionsClasses: this.actionsClasses,
|
|
419
424
|
columns: this.columns,
|
|
420
425
|
columnsStylesGrow: this.columnsStylesGrow,
|
|
421
426
|
draggedRowIndex: this.draggedRowIndex,
|
|
422
427
|
editModel: this.activeEditRowKey === rowKey ? this.activeEditModel : undefined,
|
|
423
428
|
errorIcon: this.errorIcon,
|
|
429
|
+
extra: this.extra,
|
|
424
430
|
hasActionsColumn: this.hasActionsColumn,
|
|
425
431
|
hasActiveEditRow: this.hasActiveEditRow,
|
|
426
|
-
isActiveEditMode: this.activeEditRowKey === rowKey,
|
|
427
432
|
isActionsSticky: this.isActionsSticky,
|
|
428
|
-
|
|
429
|
-
actionsHideCallback: this.actionsHideCallback,
|
|
430
|
-
actionsTitleCallback: this.actionsTitleCallback,
|
|
433
|
+
isActiveEditMode: this.activeEditRowKey === rowKey,
|
|
431
434
|
isCreateMode: false,
|
|
432
435
|
isDeletable: this.isDeletable,
|
|
433
436
|
isDeletableConfirm: this.isDeletableConfirm,
|
|
434
437
|
isDndDisabled: this.hasActiveEditRow,
|
|
435
438
|
isDragAndDrop: this.isDragAndDrop,
|
|
436
439
|
isEditable: this.isEditable,
|
|
437
|
-
key: rowKey,
|
|
438
440
|
moveRowDown: this.moveRowDown,
|
|
439
441
|
moveRowUp: this.moveRowUp,
|
|
440
442
|
onCancelEditRow: this.onCancelEditRow,
|
|
@@ -467,23 +469,24 @@ export default {
|
|
|
467
469
|
}),
|
|
468
470
|
this.isAddRowActive && h(ATableFormRow, {
|
|
469
471
|
id: this.id,
|
|
472
|
+
actionsClasses: this.actionsClassesLocal,
|
|
473
|
+
actionsDisabledCallback: this.actionsDisabledCallback,
|
|
474
|
+
actionsHideCallback: this.actionsHideCallback,
|
|
475
|
+
actionsTitleCallback: this.actionsTitleCallback,
|
|
470
476
|
allColumnsLength: this.allColumnsLength,
|
|
471
477
|
canMoveRowDown: this.canMoveRowDown,
|
|
472
478
|
canMoveRowUp: this.canMoveRowUp,
|
|
473
479
|
changeModel: this.changeModel,
|
|
474
|
-
actionsClasses: this.actionsClasses,
|
|
475
480
|
columns: this.columns,
|
|
476
481
|
columnsStylesGrow: this.columnsStylesGrow,
|
|
482
|
+
draggedRowIndex: this.draggedRowIndex,
|
|
477
483
|
editModel: this.activeEditModel,
|
|
478
484
|
errorIcon: this.errorIcon,
|
|
479
|
-
|
|
485
|
+
extra: this.extra,
|
|
480
486
|
hasActionsColumn: this.hasActionsColumn,
|
|
481
487
|
hasActiveEditRow: this.hasActiveEditRow,
|
|
482
|
-
isActiveEditMode: true,
|
|
483
488
|
isActionsSticky: this.isActionsSticky,
|
|
484
|
-
|
|
485
|
-
actionsHideCallback: this.actionsHideCallback,
|
|
486
|
-
actionsTitleCallback: this.actionsTitleCallback,
|
|
489
|
+
isActiveEditMode: true,
|
|
487
490
|
isCreateMode: true,
|
|
488
491
|
isDeletable: false,
|
|
489
492
|
isDeletableConfirm: false,
|
|
@@ -507,8 +510,8 @@ export default {
|
|
|
507
510
|
rows: this.rows,
|
|
508
511
|
saveRow: this.addRow,
|
|
509
512
|
texts: this.textsLocal,
|
|
510
|
-
widths: this.widthsLocal,
|
|
511
513
|
trClass: "a_table_form__row a_table_form__row_create",
|
|
514
|
+
widths: this.widthsLocal,
|
|
512
515
|
}, this.$slots),
|
|
513
516
|
] :
|
|
514
517
|
[h("tr", {
|
|
@@ -529,21 +532,22 @@ export default {
|
|
|
529
532
|
}, this.rowsFooter.map((row, rowIndex) => {
|
|
530
533
|
return h(ATableFormRow, {
|
|
531
534
|
id: this.id,
|
|
535
|
+
actionsClasses: this.actionsClassesLocal,
|
|
536
|
+
actionsDisabledCallback: this.actionsDisabledCallback,
|
|
537
|
+
actionsHideCallback: this.actionsHideCallback,
|
|
538
|
+
actionsTitleCallback: this.actionsTitleCallback,
|
|
532
539
|
allColumnsLength: this.allColumnsLength,
|
|
533
540
|
canMoveRowDown: this.canMoveRowDown,
|
|
534
541
|
canMoveRowUp: this.canMoveRowUp,
|
|
535
542
|
changeModel: this.changeModel,
|
|
536
|
-
actionsClasses: this.actionsClasses,
|
|
537
543
|
columns: this.columns,
|
|
538
544
|
columnsStylesGrow: this.columnsStylesGrow,
|
|
539
545
|
draggedRowIndex: this.draggedRowIndex,
|
|
546
|
+
extra: this.extra,
|
|
540
547
|
hasActionsColumn: this.hasActionsColumn,
|
|
541
548
|
hasActiveEditRow: this.hasActiveEditRow,
|
|
542
|
-
isActiveEditMode: false,
|
|
543
549
|
isActionsSticky: this.isActionsSticky,
|
|
544
|
-
|
|
545
|
-
actionsHideCallback: this.actionsHideCallback,
|
|
546
|
-
actionsTitleCallback: this.actionsTitleCallback,
|
|
550
|
+
isActiveEditMode: false,
|
|
547
551
|
isDeletable: this.isDeletable,
|
|
548
552
|
isDeletableConfirm: this.isDeletableConfirm,
|
|
549
553
|
isDndDisabled: this.hasActiveEditRow,
|
|
@@ -578,7 +582,7 @@ export default {
|
|
|
578
582
|
class: "a_mt_3 a_text_right",
|
|
579
583
|
}, [
|
|
580
584
|
h(AButton, {
|
|
581
|
-
class: this.
|
|
585
|
+
class: this.actionsClassesLocal.addRow,
|
|
582
586
|
disabled: this.isAddDisabled,
|
|
583
587
|
extra: this.extra,
|
|
584
588
|
iconLeft: this.iconsLocal.actionAddRow,
|
|
@@ -8,6 +8,7 @@ import ATranslation from "../../ATranslation/ATranslation";
|
|
|
8
8
|
import DeleteAPI from "./compositionAPI/DeleteAPI";
|
|
9
9
|
import DisabledAPI from "./compositionAPI/DisabledAPI";
|
|
10
10
|
import HiddenAPI from "./compositionAPI/HiddenAPI";
|
|
11
|
+
import IdsAPI from "./compositionAPI/IdsAPI";
|
|
11
12
|
import StylesAPI from "./compositionAPI/StylesAPI";
|
|
12
13
|
import TitleAPI from "./compositionAPI/TitleAPI";
|
|
13
14
|
|
|
@@ -20,11 +21,6 @@ import XLg from "aloha-svg/dist/js/bootstrap/XLg";
|
|
|
20
21
|
export default {
|
|
21
22
|
name: "ATableFormCellAction",
|
|
22
23
|
props: {
|
|
23
|
-
hasActiveEditRow: {
|
|
24
|
-
type: Boolean,
|
|
25
|
-
required: false,
|
|
26
|
-
default: false,
|
|
27
|
-
},
|
|
28
24
|
actionsClasses: {
|
|
29
25
|
type: Object,
|
|
30
26
|
required: false,
|
|
@@ -45,16 +41,26 @@ export default {
|
|
|
45
41
|
required: false,
|
|
46
42
|
default: () => ({}),
|
|
47
43
|
},
|
|
44
|
+
extra: {
|
|
45
|
+
type: Object,
|
|
46
|
+
required: false,
|
|
47
|
+
default: undefined,
|
|
48
|
+
},
|
|
49
|
+
hasActiveEditRow: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
required: false,
|
|
52
|
+
default: false,
|
|
53
|
+
},
|
|
48
54
|
id: {
|
|
49
55
|
type: String,
|
|
50
56
|
required: true,
|
|
51
57
|
},
|
|
52
|
-
|
|
58
|
+
isActionsSticky: {
|
|
53
59
|
type: Boolean,
|
|
54
60
|
required: false,
|
|
55
61
|
default: false,
|
|
56
62
|
},
|
|
57
|
-
|
|
63
|
+
isActiveEditMode: {
|
|
58
64
|
type: Boolean,
|
|
59
65
|
required: false,
|
|
60
66
|
default: false,
|
|
@@ -136,9 +142,16 @@ export default {
|
|
|
136
142
|
} = HiddenAPI(props);
|
|
137
143
|
|
|
138
144
|
const {
|
|
145
|
+
idBtnCancel,
|
|
139
146
|
idBtnDelete,
|
|
147
|
+
idBtnEdit,
|
|
148
|
+
idBtnSave,
|
|
149
|
+
} = IdsAPI(props);
|
|
150
|
+
|
|
151
|
+
const {
|
|
140
152
|
onDeleteClick,
|
|
141
153
|
} = DeleteAPI(props, {
|
|
154
|
+
idBtnDelete,
|
|
142
155
|
isActionsDisabled: isDeleteDisabled,
|
|
143
156
|
});
|
|
144
157
|
|
|
@@ -155,7 +168,10 @@ export default {
|
|
|
155
168
|
columnStyles,
|
|
156
169
|
deleteTitle,
|
|
157
170
|
editTitle,
|
|
171
|
+
idBtnCancel,
|
|
158
172
|
idBtnDelete,
|
|
173
|
+
idBtnEdit,
|
|
174
|
+
idBtnSave,
|
|
159
175
|
isDeleteDisabled,
|
|
160
176
|
isDeleteHidden,
|
|
161
177
|
isEditDisabled,
|
|
@@ -194,29 +210,36 @@ export default {
|
|
|
194
210
|
}, this.isActiveEditMode ?
|
|
195
211
|
[
|
|
196
212
|
h(AButton, {
|
|
213
|
+
id: this.idBtnCancel,
|
|
197
214
|
class: [
|
|
198
215
|
"a_table_form__action_button",
|
|
199
216
|
this.actionsClasses.editCancel,
|
|
200
217
|
],
|
|
201
218
|
disabled: this.isSaving,
|
|
219
|
+
extra: this.extra,
|
|
202
220
|
iconLeft: XLg,
|
|
203
221
|
title: this.texts.actionEditCancel,
|
|
204
222
|
textScreenReader: this.texts.actionEditCancel,
|
|
205
223
|
onClick: () => this.onCancelEditRow({
|
|
224
|
+
id: this.id,
|
|
206
225
|
row: this.row,
|
|
207
226
|
rowIndex: this.rowIndex,
|
|
227
|
+
trigger: "cancel",
|
|
208
228
|
}),
|
|
209
229
|
}),
|
|
210
230
|
h(AButton, {
|
|
231
|
+
id: this.idBtnSave,
|
|
211
232
|
class: [
|
|
212
233
|
"a_table_form__action_button",
|
|
213
234
|
this.actionsClasses.editSave,
|
|
214
235
|
],
|
|
215
236
|
disabled: this.isSaving,
|
|
237
|
+
extra: this.extra,
|
|
216
238
|
iconLeft: Floppy2Fill,
|
|
217
239
|
title: this.texts.actionEditSave,
|
|
218
240
|
textScreenReader: this.texts.actionEditSave,
|
|
219
241
|
onClick: () => this.onSaveEditRow({
|
|
242
|
+
id: this.id,
|
|
220
243
|
row: this.row,
|
|
221
244
|
rowIndex: this.rowIndex,
|
|
222
245
|
}),
|
|
@@ -230,21 +253,25 @@ export default {
|
|
|
230
253
|
this.actionsClasses.delete,
|
|
231
254
|
],
|
|
232
255
|
disabled: this.isDeleteDisabled,
|
|
256
|
+
extra: this.extra,
|
|
233
257
|
iconLeft: Trash,
|
|
234
258
|
title: this.deleteTitle,
|
|
235
259
|
textScreenReader: this.deleteTitle,
|
|
236
260
|
onClick: this.onDeleteClick,
|
|
237
261
|
}),
|
|
238
262
|
this.isEditable && !this.isEditHidden && h(AButton, {
|
|
263
|
+
id: this.idBtnEdit,
|
|
239
264
|
class: [
|
|
240
265
|
"a_table_form__action_button",
|
|
241
266
|
this.actionsClasses.edit,
|
|
242
267
|
],
|
|
243
268
|
disabled: this.isEditDisabled,
|
|
269
|
+
extra: this.extra,
|
|
244
270
|
iconLeft: PencilFill,
|
|
245
271
|
title: this.editTitle,
|
|
246
272
|
textScreenReader: this.editTitle,
|
|
247
273
|
onClick: () => this.onEditRow({
|
|
274
|
+
id: this.id,
|
|
248
275
|
row: this.row,
|
|
249
276
|
rowIndex: this.rowIndex,
|
|
250
277
|
}),
|
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
} from "../../../index";
|
|
10
10
|
|
|
11
11
|
export default function DeleteAPI(props, {
|
|
12
|
+
idBtnDelete = computed(() => ""),
|
|
12
13
|
isActionsDisabled = computed(() => false),
|
|
13
14
|
}) {
|
|
14
|
-
const id = toRef(props, "id");
|
|
15
15
|
const isDeletable = toRef(props, "isDeletable");
|
|
16
16
|
const isDeletableConfirm = toRef(props, "isDeletableConfirm");
|
|
17
17
|
const onDeleteRow = toRef(props, "onDeleteRow");
|
|
@@ -24,10 +24,6 @@ export default function DeleteAPI(props, {
|
|
|
24
24
|
openConfirm,
|
|
25
25
|
} = AConfirmAPI();
|
|
26
26
|
|
|
27
|
-
const idBtnDelete = computed(() => {
|
|
28
|
-
return `${ id.value }_delete`;
|
|
29
|
-
});
|
|
30
|
-
|
|
31
27
|
const closeConfirmLocal = () => {
|
|
32
28
|
closeConfirm();
|
|
33
29
|
nextTick().then(
|
|
@@ -74,7 +70,6 @@ export default function DeleteAPI(props, {
|
|
|
74
70
|
};
|
|
75
71
|
|
|
76
72
|
return {
|
|
77
|
-
idBtnDelete,
|
|
78
73
|
onDeleteClick,
|
|
79
74
|
};
|
|
80
75
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computed,
|
|
3
|
+
toRef,
|
|
4
|
+
} from "vue";
|
|
5
|
+
|
|
6
|
+
export default function IdsAPI(props) {
|
|
7
|
+
const id = toRef(props, "id");
|
|
8
|
+
|
|
9
|
+
const idBtnDelete = computed(() => {
|
|
10
|
+
return `${ id.value }_delete`;
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const idBtnEdit = computed(() => {
|
|
14
|
+
return `${ id.value }_edit`;
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const idBtnCancel = computed(() => {
|
|
18
|
+
return `${ id.value }_cancel`;
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const idBtnSave = computed(() => {
|
|
22
|
+
return `${ id.value }_save`;
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
idBtnCancel,
|
|
27
|
+
idBtnDelete,
|
|
28
|
+
idBtnEdit,
|
|
29
|
+
idBtnSave,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -30,6 +30,21 @@ export default {
|
|
|
30
30
|
required: false,
|
|
31
31
|
default: () => ({}),
|
|
32
32
|
},
|
|
33
|
+
actionsDisabledCallback: {
|
|
34
|
+
type: Object,
|
|
35
|
+
required: false,
|
|
36
|
+
default: () => ({}),
|
|
37
|
+
},
|
|
38
|
+
actionsHideCallback: {
|
|
39
|
+
type: Object,
|
|
40
|
+
required: false,
|
|
41
|
+
default: () => ({}),
|
|
42
|
+
},
|
|
43
|
+
actionsTitleCallback: {
|
|
44
|
+
type: Object,
|
|
45
|
+
required: false,
|
|
46
|
+
default: () => ({}),
|
|
47
|
+
},
|
|
33
48
|
allColumnsLength: {
|
|
34
49
|
type: Number,
|
|
35
50
|
required: true,
|
|
@@ -61,21 +76,6 @@ export default {
|
|
|
61
76
|
required: false,
|
|
62
77
|
default: () => ({}),
|
|
63
78
|
},
|
|
64
|
-
actionsDisabledCallback: {
|
|
65
|
-
type: Object,
|
|
66
|
-
required: false,
|
|
67
|
-
default: () => ({}),
|
|
68
|
-
},
|
|
69
|
-
actionsHideCallback: {
|
|
70
|
-
type: Object,
|
|
71
|
-
required: false,
|
|
72
|
-
default: () => ({}),
|
|
73
|
-
},
|
|
74
|
-
actionsTitleCallback: {
|
|
75
|
-
type: Object,
|
|
76
|
-
required: false,
|
|
77
|
-
default: () => ({}),
|
|
78
|
-
},
|
|
79
79
|
draggedRowIndex: {
|
|
80
80
|
type: Number,
|
|
81
81
|
required: false,
|
|
@@ -91,6 +91,11 @@ export default {
|
|
|
91
91
|
required: false,
|
|
92
92
|
default: undefined,
|
|
93
93
|
},
|
|
94
|
+
extra: {
|
|
95
|
+
type: Object,
|
|
96
|
+
required: false,
|
|
97
|
+
default: undefined,
|
|
98
|
+
},
|
|
94
99
|
hasActionsColumn: {
|
|
95
100
|
type: Boolean,
|
|
96
101
|
required: false,
|
|
@@ -105,12 +110,12 @@ export default {
|
|
|
105
110
|
type: String,
|
|
106
111
|
required: true,
|
|
107
112
|
},
|
|
108
|
-
|
|
113
|
+
isActionsSticky: {
|
|
109
114
|
type: Boolean,
|
|
110
115
|
required: false,
|
|
111
116
|
default: false,
|
|
112
117
|
},
|
|
113
|
-
|
|
118
|
+
isActiveEditMode: {
|
|
114
119
|
type: Boolean,
|
|
115
120
|
required: false,
|
|
116
121
|
default: false,
|
|
@@ -386,13 +391,15 @@ export default {
|
|
|
386
391
|
}),
|
|
387
392
|
this.hasActionsColumn ?
|
|
388
393
|
h(ATableFormCellAction, {
|
|
394
|
+
id: this.idTr,
|
|
389
395
|
actionsClasses: this.actionsClasses,
|
|
390
396
|
actionsDisabledCallback: this.actionsDisabledCallback,
|
|
391
397
|
actionsHideCallback: this.actionsHideCallback,
|
|
392
|
-
|
|
398
|
+
actionsTitleCallback: this.actionsTitleCallback,
|
|
399
|
+
extra: this.extra,
|
|
393
400
|
hasActiveEditRow: this.hasActiveEditRow,
|
|
394
|
-
isActiveEditMode: this.isActiveEditMode,
|
|
395
401
|
isActionsSticky: this.isActionsSticky,
|
|
402
|
+
isActiveEditMode: this.isActiveEditMode,
|
|
396
403
|
isDeletable: this.isDeletable,
|
|
397
404
|
isDeletableConfirm: this.isDeletableConfirm,
|
|
398
405
|
isEditable: this.isEditable,
|
|
@@ -406,7 +413,6 @@ export default {
|
|
|
406
413
|
row: this.row,
|
|
407
414
|
rowIndex: this.rowIndex,
|
|
408
415
|
texts: this.texts,
|
|
409
|
-
actionsTitleCallback: this.actionsTitleCallback,
|
|
410
416
|
widths: this.widths,
|
|
411
417
|
}) :
|
|
412
418
|
null,
|
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
7
|
cloneDeep,
|
|
8
|
-
isPlainObject,
|
|
9
8
|
set,
|
|
10
9
|
unset,
|
|
11
10
|
} from "lodash-es";
|
|
@@ -51,14 +50,16 @@ export default function EditAPI(props, {
|
|
|
51
50
|
unset(errorsLocal.value, columnId);
|
|
52
51
|
};
|
|
53
52
|
|
|
54
|
-
const cancelEditRow = () => {
|
|
53
|
+
const cancelEditRow = ({ trigger, id } = {}) => {
|
|
55
54
|
onCancelEditRow.value({
|
|
56
55
|
row: row.value,
|
|
57
56
|
rowIndex: rowIndex.value,
|
|
57
|
+
trigger,
|
|
58
|
+
id,
|
|
58
59
|
});
|
|
59
60
|
};
|
|
60
61
|
|
|
61
|
-
const saveEditRow = async() => {
|
|
62
|
+
const saveEditRow = async({ id } = {}) => {
|
|
62
63
|
if (isSaving.value) {
|
|
63
64
|
return;
|
|
64
65
|
}
|
|
@@ -79,7 +80,7 @@ export default function EditAPI(props, {
|
|
|
79
80
|
return;
|
|
80
81
|
}
|
|
81
82
|
|
|
82
|
-
cancelEditRow();
|
|
83
|
+
cancelEditRow({ trigger: "save", id });
|
|
83
84
|
} catch (error) {
|
|
84
85
|
errorsLocal.value = error;
|
|
85
86
|
} finally {
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
computed,
|
|
3
|
-
toRef,
|
|
4
|
-
} from "vue";
|
|
5
|
-
|
|
6
|
-
export default function ClassesAPI(props) {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
return {
|
|
11
|
-
delete: "a_btn a_btn_transparent_danger",
|
|
12
|
-
edit: "a_btn a_btn_transparent_primary",
|
|
13
|
-
editCancel: "a_btn a_btn_transparent_primary",
|
|
14
|
-
editSave: "a_btn a_btn_transparent_primary",
|
|
15
|
-
addRow: "a_btn a_btn_outline_primary",
|
|
16
|
-
...
|
|
17
|
-
};
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
return {
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
computed,
|
|
3
|
+
toRef,
|
|
4
|
+
} from "vue";
|
|
5
|
+
|
|
6
|
+
export default function ClassesAPI(props) {
|
|
7
|
+
const actionsClasses = toRef(props, "actionsClasses");
|
|
8
|
+
|
|
9
|
+
const actionsClassesLocal = computed(() => {
|
|
10
|
+
return {
|
|
11
|
+
delete: "a_btn a_btn_transparent_danger",
|
|
12
|
+
edit: "a_btn a_btn_transparent_primary",
|
|
13
|
+
editCancel: "a_btn a_btn_transparent_primary",
|
|
14
|
+
editSave: "a_btn a_btn_transparent_primary",
|
|
15
|
+
addRow: "a_btn a_btn_outline_primary",
|
|
16
|
+
...actionsClasses.value,
|
|
17
|
+
};
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
return {
|
|
21
|
+
actionsClassesLocal,
|
|
22
|
+
};
|
|
23
|
+
}
|