aloha-vue 2.57.3 → 2.57.5

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.
Files changed (34) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/aloha-vue.es.js +12519 -12436
  3. package/dist/aloha-vue.umd.js +52 -52
  4. package/package.json +1 -1
  5. package/src/AButton/AButton.js +275 -270
  6. package/src/AElement/AElement.js +23 -11
  7. package/src/AElement/{comositionAPI → compositionAPI}/AttributesAPI.js +51 -51
  8. package/src/AElement/{comositionAPI → compositionAPI}/ClickAPI.js +30 -30
  9. package/src/AElement/{comositionAPI → compositionAPI}/ComponentLocalAPI.js +23 -23
  10. package/src/AElement/{comositionAPI → compositionAPI}/DisabledAPI.js +22 -22
  11. package/src/AElement/{comositionAPI → compositionAPI}/HtmlTitleAPI.js +33 -33
  12. package/src/AElement/compositionAPI/KeydownAPI.js +35 -0
  13. package/src/AElement/{comositionAPI → compositionAPI}/LoadingAPI.js +22 -22
  14. package/src/AElement/{comositionAPI → compositionAPI}/RouterLinkAPI.js +20 -20
  15. package/src/AElement/{comositionAPI → compositionAPI}/SwitchAPI.js +33 -33
  16. package/src/AElement/{comositionAPI → compositionAPI}/TagAPI.js +34 -34
  17. package/src/AElement/{comositionAPI → compositionAPI}/TextAPI.js +78 -78
  18. package/src/AElement/{comositionAPI → compositionAPI}/TitleAPI.js +29 -29
  19. package/src/ALink/ALink.js +253 -248
  20. package/src/ATableForm/ATableForm.js +11 -6
  21. package/src/ATableForm/ATableFormCellAction/ATableFormCellAction.js +18 -0
  22. package/src/ATableForm/ATableFormCellAction/compositionAPI/DeleteAPI.js +5 -5
  23. package/src/ATableForm/ATableFormCellAction/compositionAPI/IdsAPI.js +31 -0
  24. package/src/ATableForm/ATableFormCellDnd/ATableFormCellDnd.js +2 -0
  25. package/src/ATableForm/ATableFormRow/compositionAPI/EditAPI.js +5 -4
  26. package/src/ATableForm/ATableFormTh/ATableFormTh.js +0 -6
  27. package/src/ATableForm/compositionAPI/ClassesAPI.js +4 -4
  28. package/src/ATableForm/compositionAPI/ColumnsGrowAPI.js +4 -1
  29. package/src/ATableForm/compositionAPI/DeleteAPI.js +2 -2
  30. package/src/ATableForm/compositionAPI/DragAndDropAPI.js +24 -14
  31. package/src/ATableForm/compositionAPI/EditAPI.js +119 -107
  32. package/src/ui/AInputCurrency/AInputCurrency.js +4 -0
  33. package/src/ui/AInputCurrency/compositionAPI/InputEventsAPI.js +4 -3
  34. package/src/ui/AInputCurrency/compositionAPI/ModelAPI.js +3 -2
@@ -1,248 +1,253 @@
1
- import {
2
- h,
3
- } from "vue";
4
-
5
- import AElement from "../AElement/AElement";
6
-
7
- import EmitsAPI from "../AButton/compositionAPI/EmitsAPI";
8
-
9
- import placements from "../const/placements";
10
- import {
11
- isInteger,
12
- isString,
13
- uniqueId,
14
- } from "lodash-es";
15
-
16
- export default {
17
- name: "ALink",
18
- inheritAttrs: false,
19
- props: {
20
- alwaysTranslate: {
21
- type: Boolean,
22
- required: false,
23
- },
24
- ariaLabel: {
25
- type: [String, Number, Object],
26
- required: false,
27
- default: undefined,
28
- },
29
- attributes: {
30
- type: Object,
31
- required: false,
32
- default: () => ({}),
33
- },
34
- class: {
35
- type: [String, Object],
36
- required: false,
37
- default: undefined,
38
- },
39
- classDefault: {
40
- type: String,
41
- required: false,
42
- default: "aloha_element",
43
- },
44
- classDefaultHidden: {
45
- type: String,
46
- required: false,
47
- default: "aloha_element__hidden",
48
- },
49
- classDisabled: {
50
- type: String,
51
- required: false,
52
- default: "disabled",
53
- },
54
- disabled: {
55
- type: Boolean,
56
- required: false,
57
- default: undefined,
58
- },
59
- excludeRenderAttributes: {
60
- type: Array,
61
- required: false,
62
- default: () => [],
63
- },
64
- extra: {
65
- type: Object,
66
- required: false,
67
- default: undefined,
68
- },
69
- extraData: {
70
- type: [String, Number, Boolean, Array, Object, Date, Function, Symbol, null, undefined],
71
- required: false,
72
- default: undefined,
73
- },
74
- href: {
75
- type: String,
76
- required: false,
77
- default: undefined,
78
- },
79
- html: {
80
- type: [String, Number, Object, Array],
81
- required: false,
82
- default: undefined,
83
- },
84
- htmlScreenReader: {
85
- type: [String, Number, Object, Array],
86
- required: false,
87
- default: undefined,
88
- },
89
- iconAttributes: {
90
- type: Object,
91
- required: false,
92
- default: () => ({}),
93
- },
94
- iconClass: {
95
- type: [String, Object],
96
- required: false,
97
- default: undefined,
98
- },
99
- iconLeft: {
100
- type: [String, Object],
101
- required: false,
102
- default: undefined,
103
- },
104
- iconRight: {
105
- type: [String, Object],
106
- required: false,
107
- default: undefined,
108
- },
109
- iconTag: {
110
- type: String,
111
- required: false,
112
- default: undefined,
113
- },
114
- id: {
115
- type: String,
116
- required: false,
117
- default: () => uniqueId("a_link_"),
118
- },
119
- isTitleHtml: {
120
- type: Boolean,
121
- required: false,
122
- default: undefined,
123
- },
124
- loading: {
125
- type: Boolean,
126
- required: false,
127
- default: false,
128
- },
129
- loadingAlign: {
130
- type: String,
131
- required: false,
132
- default: "right",
133
- validator: value => ["right", "left"].indexOf(value) !== -1,
134
- },
135
- loadingClass: {
136
- type: [String, Object],
137
- required: false,
138
- default: "a_spinner_small",
139
- },
140
- safeHtml: {
141
- type: [String, Number, Object, Array],
142
- required: false,
143
- default: undefined,
144
- },
145
- safeHtmlScreenReader: {
146
- type: [String, Number, Object, Array],
147
- required: false,
148
- default: undefined,
149
- },
150
- stop: {
151
- type: Boolean,
152
- required: false,
153
- default: undefined,
154
- },
155
- target: {
156
- type: String,
157
- required: false,
158
- default: undefined,
159
- },
160
- text: {
161
- type: [String, Number, Object, Array],
162
- required: false,
163
- default: undefined,
164
- },
165
- textAfter: {
166
- type: [String, Number, Object],
167
- required: false,
168
- default: undefined,
169
- },
170
- textAriaHidden: {
171
- type: Boolean,
172
- required: false,
173
- default: undefined,
174
- },
175
- textBefore: {
176
- type: [String, Number, Object],
177
- required: false,
178
- default: undefined,
179
- },
180
- textClass: {
181
- type: String,
182
- required: false,
183
- default: undefined,
184
- },
185
- textScreenReader: {
186
- type: [String, Number, Object, Array],
187
- required: false,
188
- default: undefined,
189
- },
190
- textTag: {
191
- type: String,
192
- required: false,
193
- default: "span",
194
- },
195
- title: {
196
- type: [String, Number, Object, Array],
197
- required: false,
198
- default: undefined,
199
- },
200
- titleAttributes: {
201
- type: Object,
202
- required: false,
203
- default: () => ({}),
204
- },
205
- titlePlacement: {
206
- type: String,
207
- required: false,
208
- default: "top",
209
- validator: placement => placements.indexOf(placement) !== -1,
210
- },
211
- titleZIndex: {
212
- type: [Number, String],
213
- required: false,
214
- default: "auto",
215
- validator: value => {
216
- if (isString(value)) {
217
- return value === "auto";
218
- }
219
- return isInteger(value);
220
- },
221
- },
222
- to: {
223
- type: [Object, String],
224
- required: false,
225
- default: undefined,
226
- },
227
- },
228
- emits: [
229
- "click",
230
- ],
231
- setup(props, context) {
232
- const {
233
- clickEmit,
234
- } = EmitsAPI(props, context);
235
-
236
- return {
237
- clickEmit,
238
- };
239
- },
240
- render() {
241
- return h(AElement, {
242
- ...this.$attrs,
243
- ...this.$props,
244
- type: "link",
245
- onClick: this.clickEmit,
246
- }, this.$slots);
247
- },
248
- };
1
+ import {
2
+ h,
3
+ } from "vue";
4
+
5
+ import AElement from "../AElement/AElement";
6
+
7
+ import EmitsAPI from "../AButton/compositionAPI/EmitsAPI";
8
+
9
+ import placements from "../const/placements";
10
+ import {
11
+ isInteger,
12
+ isString,
13
+ uniqueId,
14
+ } from "lodash-es";
15
+
16
+ export default {
17
+ name: "ALink",
18
+ inheritAttrs: false,
19
+ props: {
20
+ alwaysTranslate: {
21
+ type: Boolean,
22
+ required: false,
23
+ },
24
+ ariaLabel: {
25
+ type: [String, Number, Object],
26
+ required: false,
27
+ default: undefined,
28
+ },
29
+ attributes: {
30
+ type: Object,
31
+ required: false,
32
+ default: () => ({}),
33
+ },
34
+ class: {
35
+ type: [String, Object],
36
+ required: false,
37
+ default: undefined,
38
+ },
39
+ classDefault: {
40
+ type: String,
41
+ required: false,
42
+ default: "aloha_element",
43
+ },
44
+ classDefaultHidden: {
45
+ type: String,
46
+ required: false,
47
+ default: "aloha_element__hidden",
48
+ },
49
+ classDisabled: {
50
+ type: String,
51
+ required: false,
52
+ default: "disabled",
53
+ },
54
+ disabled: {
55
+ type: Boolean,
56
+ required: false,
57
+ default: undefined,
58
+ },
59
+ excludeRenderAttributes: {
60
+ type: Array,
61
+ required: false,
62
+ default: () => [],
63
+ },
64
+ extra: {
65
+ type: Object,
66
+ required: false,
67
+ default: undefined,
68
+ },
69
+ extraData: {
70
+ type: [String, Number, Boolean, Array, Object, Date, Function, Symbol, null, undefined],
71
+ required: false,
72
+ default: undefined,
73
+ },
74
+ href: {
75
+ type: String,
76
+ required: false,
77
+ default: undefined,
78
+ },
79
+ html: {
80
+ type: [String, Number, Object, Array],
81
+ required: false,
82
+ default: undefined,
83
+ },
84
+ htmlScreenReader: {
85
+ type: [String, Number, Object, Array],
86
+ required: false,
87
+ default: undefined,
88
+ },
89
+ iconAttributes: {
90
+ type: Object,
91
+ required: false,
92
+ default: () => ({}),
93
+ },
94
+ iconClass: {
95
+ type: [String, Object],
96
+ required: false,
97
+ default: undefined,
98
+ },
99
+ iconLeft: {
100
+ type: [String, Object],
101
+ required: false,
102
+ default: undefined,
103
+ },
104
+ iconRight: {
105
+ type: [String, Object],
106
+ required: false,
107
+ default: undefined,
108
+ },
109
+ iconTag: {
110
+ type: String,
111
+ required: false,
112
+ default: undefined,
113
+ },
114
+ id: {
115
+ type: String,
116
+ required: false,
117
+ default: () => uniqueId("a_link_"),
118
+ },
119
+ isTitleHtml: {
120
+ type: Boolean,
121
+ required: false,
122
+ default: undefined,
123
+ },
124
+ loading: {
125
+ type: Boolean,
126
+ required: false,
127
+ default: false,
128
+ },
129
+ loadingAlign: {
130
+ type: String,
131
+ required: false,
132
+ default: "right",
133
+ validator: value => ["right", "left"].indexOf(value) !== -1,
134
+ },
135
+ loadingClass: {
136
+ type: [String, Object],
137
+ required: false,
138
+ default: "a_spinner_small",
139
+ },
140
+ preventKeyboardRepeat: {
141
+ type: Boolean,
142
+ required: false,
143
+ default: false,
144
+ },
145
+ safeHtml: {
146
+ type: [String, Number, Object, Array],
147
+ required: false,
148
+ default: undefined,
149
+ },
150
+ safeHtmlScreenReader: {
151
+ type: [String, Number, Object, Array],
152
+ required: false,
153
+ default: undefined,
154
+ },
155
+ stop: {
156
+ type: Boolean,
157
+ required: false,
158
+ default: undefined,
159
+ },
160
+ target: {
161
+ type: String,
162
+ required: false,
163
+ default: undefined,
164
+ },
165
+ text: {
166
+ type: [String, Number, Object, Array],
167
+ required: false,
168
+ default: undefined,
169
+ },
170
+ textAfter: {
171
+ type: [String, Number, Object],
172
+ required: false,
173
+ default: undefined,
174
+ },
175
+ textAriaHidden: {
176
+ type: Boolean,
177
+ required: false,
178
+ default: undefined,
179
+ },
180
+ textBefore: {
181
+ type: [String, Number, Object],
182
+ required: false,
183
+ default: undefined,
184
+ },
185
+ textClass: {
186
+ type: String,
187
+ required: false,
188
+ default: undefined,
189
+ },
190
+ textScreenReader: {
191
+ type: [String, Number, Object, Array],
192
+ required: false,
193
+ default: undefined,
194
+ },
195
+ textTag: {
196
+ type: String,
197
+ required: false,
198
+ default: "span",
199
+ },
200
+ title: {
201
+ type: [String, Number, Object, Array],
202
+ required: false,
203
+ default: undefined,
204
+ },
205
+ titleAttributes: {
206
+ type: Object,
207
+ required: false,
208
+ default: () => ({}),
209
+ },
210
+ titlePlacement: {
211
+ type: String,
212
+ required: false,
213
+ default: "top",
214
+ validator: placement => placements.indexOf(placement) !== -1,
215
+ },
216
+ titleZIndex: {
217
+ type: [Number, String],
218
+ required: false,
219
+ default: "auto",
220
+ validator: value => {
221
+ if (isString(value)) {
222
+ return value === "auto";
223
+ }
224
+ return isInteger(value);
225
+ },
226
+ },
227
+ to: {
228
+ type: [Object, String],
229
+ required: false,
230
+ default: undefined,
231
+ },
232
+ },
233
+ emits: [
234
+ "click",
235
+ ],
236
+ setup(props, context) {
237
+ const {
238
+ clickEmit,
239
+ } = EmitsAPI(props, context);
240
+
241
+ return {
242
+ clickEmit,
243
+ };
244
+ },
245
+ render() {
246
+ return h(AElement, {
247
+ ...this.$attrs,
248
+ ...this.$props,
249
+ type: "link",
250
+ onClick: this.clickEmit,
251
+ }, this.$slots);
252
+ },
253
+ };
@@ -81,6 +81,11 @@ export default {
81
81
  required: false,
82
82
  default: undefined,
83
83
  },
84
+ focusAfterMove: {
85
+ type: Boolean,
86
+ required: false,
87
+ default: true,
88
+ },
84
89
  icons: {
85
90
  type: Object,
86
91
  required: false,
@@ -215,7 +220,7 @@ export default {
215
220
  } = IconsAPI(props);
216
221
 
217
222
  const {
218
- classesLocal,
223
+ actionsClassesLocal,
219
224
  } = ClassesAPI(props);
220
225
 
221
226
  const {
@@ -302,7 +307,7 @@ export default {
302
307
  canAddRow,
303
308
  canMoveRowDown,
304
309
  canMoveRowUp,
305
- classesLocal,
310
+ actionsClassesLocal,
306
311
  columnsStylesGrow,
307
312
  draggedRowIndex,
308
313
  dragOverPosition,
@@ -413,7 +418,7 @@ export default {
413
418
  return h(ATableFormRow, {
414
419
  key: rowKey,
415
420
  id: this.id,
416
- actionsClasses: this.actionsClasses,
421
+ actionsClasses: this.actionsClassesLocal,
417
422
  actionsDisabledCallback: this.actionsDisabledCallback,
418
423
  actionsHideCallback: this.actionsHideCallback,
419
424
  actionsTitleCallback: this.actionsTitleCallback,
@@ -469,7 +474,7 @@ export default {
469
474
  }),
470
475
  this.isAddRowActive && h(ATableFormRow, {
471
476
  id: this.id,
472
- actionsClasses: this.actionsClasses,
477
+ actionsClasses: this.actionsClassesLocal,
473
478
  actionsDisabledCallback: this.actionsDisabledCallback,
474
479
  actionsHideCallback: this.actionsHideCallback,
475
480
  actionsTitleCallback: this.actionsTitleCallback,
@@ -532,7 +537,7 @@ export default {
532
537
  }, this.rowsFooter.map((row, rowIndex) => {
533
538
  return h(ATableFormRow, {
534
539
  id: this.id,
535
- actionsClasses: this.actionsClasses,
540
+ actionsClasses: this.actionsClassesLocal,
536
541
  actionsDisabledCallback: this.actionsDisabledCallback,
537
542
  actionsHideCallback: this.actionsHideCallback,
538
543
  actionsTitleCallback: this.actionsTitleCallback,
@@ -582,7 +587,7 @@ export default {
582
587
  class: "a_mt_3 a_text_right",
583
588
  }, [
584
589
  h(AButton, {
585
- class: this.classesLocal.addRow,
590
+ class: this.actionsClassesLocal.addRow,
586
591
  disabled: this.isAddDisabled,
587
592
  extra: this.extra,
588
593
  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
 
@@ -141,9 +142,16 @@ export default {
141
142
  } = HiddenAPI(props);
142
143
 
143
144
  const {
145
+ idBtnCancel,
144
146
  idBtnDelete,
147
+ idBtnEdit,
148
+ idBtnSave,
149
+ } = IdsAPI(props);
150
+
151
+ const {
145
152
  onDeleteClick,
146
153
  } = DeleteAPI(props, {
154
+ idBtnDelete,
147
155
  isActionsDisabled: isDeleteDisabled,
148
156
  });
149
157
 
@@ -160,7 +168,10 @@ export default {
160
168
  columnStyles,
161
169
  deleteTitle,
162
170
  editTitle,
171
+ idBtnCancel,
163
172
  idBtnDelete,
173
+ idBtnEdit,
174
+ idBtnSave,
164
175
  isDeleteDisabled,
165
176
  isDeleteHidden,
166
177
  isEditDisabled,
@@ -199,6 +210,7 @@ export default {
199
210
  }, this.isActiveEditMode ?
200
211
  [
201
212
  h(AButton, {
213
+ id: this.idBtnCancel,
202
214
  class: [
203
215
  "a_table_form__action_button",
204
216
  this.actionsClasses.editCancel,
@@ -209,11 +221,14 @@ export default {
209
221
  title: this.texts.actionEditCancel,
210
222
  textScreenReader: this.texts.actionEditCancel,
211
223
  onClick: () => this.onCancelEditRow({
224
+ id: this.id,
212
225
  row: this.row,
213
226
  rowIndex: this.rowIndex,
227
+ trigger: "cancel",
214
228
  }),
215
229
  }),
216
230
  h(AButton, {
231
+ id: this.idBtnSave,
217
232
  class: [
218
233
  "a_table_form__action_button",
219
234
  this.actionsClasses.editSave,
@@ -224,6 +239,7 @@ export default {
224
239
  title: this.texts.actionEditSave,
225
240
  textScreenReader: this.texts.actionEditSave,
226
241
  onClick: () => this.onSaveEditRow({
242
+ id: this.id,
227
243
  row: this.row,
228
244
  rowIndex: this.rowIndex,
229
245
  }),
@@ -244,6 +260,7 @@ export default {
244
260
  onClick: this.onDeleteClick,
245
261
  }),
246
262
  this.isEditable && !this.isEditHidden && h(AButton, {
263
+ id: this.idBtnEdit,
247
264
  class: [
248
265
  "a_table_form__action_button",
249
266
  this.actionsClasses.edit,
@@ -254,6 +271,7 @@ export default {
254
271
  title: this.editTitle,
255
272
  textScreenReader: this.editTitle,
256
273
  onClick: () => this.onEditRow({
274
+ id: this.id,
257
275
  row: this.row,
258
276
  rowIndex: this.rowIndex,
259
277
  }),
@@ -9,6 +9,7 @@ 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
15
  const id = toRef(props, "id");
@@ -24,10 +25,6 @@ export default function DeleteAPI(props, {
24
25
  openConfirm,
25
26
  } = AConfirmAPI();
26
27
 
27
- const idBtnDelete = computed(() => {
28
- return `${ id.value }_delete`;
29
- });
30
-
31
28
  const closeConfirmLocal = () => {
32
29
  closeConfirm();
33
30
  nextTick().then(
@@ -44,8 +41,10 @@ export default function DeleteAPI(props, {
44
41
  headerText: texts.value.actionDeleteConfirmHeader,
45
42
  save: async() => {
46
43
  await onDeleteRow.value({
44
+ btnDeleteId: idBtnDelete.value,
47
45
  row: row.value,
48
46
  rowIndex: rowIndex.value,
47
+ rowId: id.value,
49
48
  });
50
49
  closeConfirm();
51
50
  },
@@ -67,14 +66,15 @@ export default function DeleteAPI(props, {
67
66
 
68
67
  if (isDeletable.value) {
69
68
  onDeleteRow.value({
69
+ btnDeleteId: idBtnDelete.value,
70
70
  row: row.value,
71
71
  rowIndex: rowIndex.value,
72
+ rowId: id.value,
72
73
  });
73
74
  }
74
75
  };
75
76
 
76
77
  return {
77
- idBtnDelete,
78
78
  onDeleteClick,
79
79
  };
80
80
  }