aloha-vue 1.2.159 → 1.2.161
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/PageFilters/PageFiltersExample/PageFiltersExample.js +1 -0
- package/docs/src/views/PageFilters/i18n/de.json +1 -0
- package/package.json +1 -1
- package/src/AElement/AElement.js +71 -53
- package/src/ATable/ATable.js +5 -0
- package/src/ATable/compositionAPI/RowsAPI.js +2 -1
- package/src/ui/ADatepicker/ADatepicker.js +6 -0
- package/src/ui/ADatepickerRange/ADatepickerRange.js +6 -0
- package/src/ui/AGroup/AGroup.js +1 -0
- package/src/ui/AInput/AInput.js +6 -6
- package/src/ui/AInputFile/AInputFile.js +6 -0
- package/src/ui/AInputNumber/AInputNumber.js +7 -0
- package/src/ui/AInputNumberRange/AInputNumberRange.js +6 -0
- package/src/ui/ALabel/ALabel.js +28 -26
- package/src/ui/ALabel/__tests__/ALabel.LabelAPI.test.js +27 -0
- package/src/ui/ALabel/compositionAPI/LabelAPI.js +25 -0
- package/src/ui/ASelect/ASelect.js +6 -0
- package/src/ui/ASwitch/ASwitch.js +6 -0
- package/src/ui/ATextarea/ATextarea.js +6 -6
- package/src/ui/ATinymce/ATinymce.js +6 -0
- package/src/ui/ALabel/__tests__/ALabel.TextAfterAPI.test.js +0 -19
- package/src/ui/ALabel/compositionAPI/TextAfterAPI.js +0 -18
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"_A_FILTERS_COMPONENT_DESCRIPTION_": "_A_FILTERS_COMPONENT_DESCRIPTION_",
|
|
3
3
|
"_A_FILTERS_COMPONENT_NAME_": "Filters",
|
|
4
4
|
"_A_PAGE_FILTER_SEARCH_": "Schnellsuche",
|
|
5
|
+
"_A_PAGE_FILTER_SEARCH_SCREEN_READER_": "Schnellsuche für Screen Reader",
|
|
5
6
|
"_A_PAGE_FILTER_TEXT_": "Text",
|
|
6
7
|
"_A_PAGE_FILTER_DATE_": "Datum",
|
|
7
8
|
"_A_PAGE_FILTER_INTEGER_": "Ganze Zahl",
|
package/package.json
CHANGED
package/src/AElement/AElement.js
CHANGED
|
@@ -377,38 +377,46 @@ export default {
|
|
|
377
377
|
...this.attributesToExcludeFromRender,
|
|
378
378
|
}, {
|
|
379
379
|
default: () => [
|
|
380
|
-
(!this.isTitleHtml && this.isTitleVisible) ?
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
380
|
+
(!this.isTitleHtml && this.isTitleVisible) ?
|
|
381
|
+
h(ATranslation, {
|
|
382
|
+
tag: "span",
|
|
383
|
+
ariaHidden: true,
|
|
384
|
+
class: [
|
|
385
|
+
"a_position_absolute_all",
|
|
386
|
+
this.classDefaultHidden,
|
|
387
|
+
],
|
|
388
|
+
title: this.title,
|
|
389
|
+
extra: this.extra,
|
|
390
|
+
style: {
|
|
391
|
+
zIndex: this.titleZIndex,
|
|
392
|
+
},
|
|
393
|
+
...this.titleAttributes,
|
|
394
|
+
}) :
|
|
395
|
+
"",
|
|
396
|
+
this.isTextOrHtmlScreenReaderVisible ?
|
|
397
|
+
h(ATranslation, {
|
|
398
|
+
class: [
|
|
399
|
+
"a_sr_only",
|
|
400
|
+
this.classDefaultHidden,
|
|
401
|
+
],
|
|
402
|
+
tag: "span",
|
|
403
|
+
text: this.textScreenReader,
|
|
404
|
+
html: this.htmlScreenReader,
|
|
405
|
+
safeHtml: this.safeHtmlScreenReader,
|
|
406
|
+
extra: this.extra,
|
|
407
|
+
}) :
|
|
408
|
+
"",
|
|
409
|
+
this.$slots.buttonPrepend ?
|
|
410
|
+
this.$slots.buttonPrepend({ extraData: this.extraData }) :
|
|
411
|
+
"",
|
|
412
|
+
this.isLoadingLeft ?
|
|
413
|
+
h(ASpinner, {
|
|
414
|
+
class: [
|
|
415
|
+
"aloha_btn__spinner_left",
|
|
416
|
+
this.loadingClass,
|
|
417
|
+
],
|
|
418
|
+
}) :
|
|
419
|
+
"",
|
|
412
420
|
h(AIcon, {
|
|
413
421
|
icon: this.iconLeft,
|
|
414
422
|
iconTag: this.iconTag,
|
|
@@ -418,18 +426,22 @@ export default {
|
|
|
418
426
|
],
|
|
419
427
|
...this.iconAttributes,
|
|
420
428
|
}),
|
|
421
|
-
this.$slots.default ?
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
429
|
+
this.$slots.default ?
|
|
430
|
+
this.$slots.default({ extraData: this.extraData }) :
|
|
431
|
+
"",
|
|
432
|
+
this.isTextOrHtmlVisible ?
|
|
433
|
+
h(ATranslation, {
|
|
434
|
+
ariaHidden: this.textAriaHidden,
|
|
435
|
+
class: this.textClass,
|
|
436
|
+
extra: this.extra,
|
|
437
|
+
html: this.html,
|
|
438
|
+
safeHtml: this.safeHtml,
|
|
439
|
+
tag: this.textTag,
|
|
440
|
+
text: this.text,
|
|
441
|
+
textAfter: this.textAfter,
|
|
442
|
+
textBefore: this.textBefore,
|
|
443
|
+
}) :
|
|
444
|
+
"",
|
|
433
445
|
h(AIcon, {
|
|
434
446
|
icon: this.iconRight,
|
|
435
447
|
iconTag: this.iconTag,
|
|
@@ -446,20 +458,26 @@ export default {
|
|
|
446
458
|
this.loadingClass,
|
|
447
459
|
],
|
|
448
460
|
}) :
|
|
449
|
-
|
|
450
|
-
this.$slots.buttonAppend ?
|
|
461
|
+
"",
|
|
462
|
+
this.$slots.buttonAppend ?
|
|
463
|
+
this.$slots.buttonAppend({ extraData: this.extraData }) :
|
|
464
|
+
"",
|
|
451
465
|
],
|
|
452
466
|
title: !this.isTitleHtml ||
|
|
453
467
|
(!this.title && !this.$slots.buttonTitle) ?
|
|
454
|
-
|
|
468
|
+
"" :
|
|
455
469
|
() => {
|
|
456
470
|
return [
|
|
457
|
-
this.isTitleVisible
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
471
|
+
this.isTitleVisible ?
|
|
472
|
+
h(ATranslation, {
|
|
473
|
+
html: this.title,
|
|
474
|
+
tag: "span",
|
|
475
|
+
extra: this.extra,
|
|
476
|
+
}) :
|
|
477
|
+
"",
|
|
478
|
+
this.$slots.buttonTitle ?
|
|
479
|
+
this.$slots.buttonTitle({ extraData: this.extraData }) :
|
|
480
|
+
"",
|
|
463
481
|
];
|
|
464
482
|
},
|
|
465
483
|
});
|
package/src/ATable/ATable.js
CHANGED
|
@@ -17,6 +17,7 @@ export default function RowsAPI(props, {
|
|
|
17
17
|
setEmptySelectedRowsIndexes = () => {},
|
|
18
18
|
usePaginationLocal = computed(() => false),
|
|
19
19
|
}) {
|
|
20
|
+
const clearSelectedRowsOnDataChange = toRef(props, "clearSelectedRowsOnDataChange");
|
|
20
21
|
const pagination = toRef(props, "pagination");
|
|
21
22
|
const rowsCountRenderPerTick = toRef(props, "rowsCountRenderPerTick");
|
|
22
23
|
|
|
@@ -88,7 +89,7 @@ export default function RowsAPI(props, {
|
|
|
88
89
|
return;
|
|
89
90
|
}
|
|
90
91
|
prevDataPaginated.value = [...newValue];
|
|
91
|
-
if (!firstLoad) {
|
|
92
|
+
if (!firstLoad && clearSelectedRowsOnDataChange.value) {
|
|
92
93
|
setEmptySelectedRowsIndexes();
|
|
93
94
|
}
|
|
94
95
|
firstLoad = false;
|
|
@@ -114,6 +114,11 @@ export default {
|
|
|
114
114
|
required: false,
|
|
115
115
|
default: false,
|
|
116
116
|
},
|
|
117
|
+
labelScreenreader: {
|
|
118
|
+
type: String,
|
|
119
|
+
required: false,
|
|
120
|
+
default: undefined,
|
|
121
|
+
},
|
|
117
122
|
lang: {
|
|
118
123
|
type: String,
|
|
119
124
|
default: "de",
|
|
@@ -475,6 +480,7 @@ export default {
|
|
|
475
480
|
id: this.htmlIdLocal,
|
|
476
481
|
label: this.label,
|
|
477
482
|
labelClass: this.labelClass,
|
|
483
|
+
labelScreenreader: this.labelScreenreader,
|
|
478
484
|
required: this.required,
|
|
479
485
|
type: this.type,
|
|
480
486
|
isLabelFloat: this.isLabelFloat,
|
|
@@ -169,6 +169,11 @@ export default {
|
|
|
169
169
|
required: false,
|
|
170
170
|
default: "_A_DATEPICKER_RANGE_FROM_",
|
|
171
171
|
},
|
|
172
|
+
labelScreenreader: {
|
|
173
|
+
type: String,
|
|
174
|
+
required: false,
|
|
175
|
+
default: undefined,
|
|
176
|
+
},
|
|
172
177
|
labelUntil: {
|
|
173
178
|
type: String,
|
|
174
179
|
required: false,
|
|
@@ -330,6 +335,7 @@ export default {
|
|
|
330
335
|
id: this.idFrom,
|
|
331
336
|
label: this.label,
|
|
332
337
|
labelClass: this.labelClass,
|
|
338
|
+
labelScreenreader: this.labelScreenreader,
|
|
333
339
|
required: this.required,
|
|
334
340
|
type: this.type,
|
|
335
341
|
isLabelFloat: false,
|
package/src/ui/AGroup/AGroup.js
CHANGED
|
@@ -155,6 +155,7 @@ export default {
|
|
|
155
155
|
id: this.htmlIdFirstChild,
|
|
156
156
|
label: this.firstChild.label,
|
|
157
157
|
labelClass: this.firstChild.labelClass,
|
|
158
|
+
labelScreenreader: this.firstChild.labelScreenreader,
|
|
158
159
|
required: this.firstChild.required,
|
|
159
160
|
type: this.firstChild.type,
|
|
160
161
|
isLabelFloat: false,
|
package/src/ui/AInput/AInput.js
CHANGED
|
@@ -10,7 +10,6 @@ import AFormElementBtnClear from "../../AFormElement/AFormElementBtnClear/AFormE
|
|
|
10
10
|
import AFormHelpText from "../AFormHelpText/AFormHelpText";
|
|
11
11
|
import AIcon from "../../AIcon/AIcon";
|
|
12
12
|
import ALabel from "../ALabel/ALabel";
|
|
13
|
-
import ATranslation from "../../ATranslation/ATranslation";
|
|
14
13
|
|
|
15
14
|
import UiClearButtonMixinProps from "../mixins/UiClearButtonMixinProps";
|
|
16
15
|
import UiMixinProps from "../mixins/UiMixinProps";
|
|
@@ -23,11 +22,6 @@ import UiStyleHideAPI from "../compositionApi/UiStyleHideAPI";
|
|
|
23
22
|
|
|
24
23
|
export default {
|
|
25
24
|
name: "AInput",
|
|
26
|
-
components: {
|
|
27
|
-
AFormElementBtnClear,
|
|
28
|
-
ALabel,
|
|
29
|
-
ATranslation,
|
|
30
|
-
},
|
|
31
25
|
mixins: [
|
|
32
26
|
UiClearButtonMixinProps,
|
|
33
27
|
UiMixinProps,
|
|
@@ -43,6 +37,11 @@ export default {
|
|
|
43
37
|
required: false,
|
|
44
38
|
default: undefined,
|
|
45
39
|
},
|
|
40
|
+
labelScreenreader: {
|
|
41
|
+
type: String,
|
|
42
|
+
required: false,
|
|
43
|
+
default: undefined,
|
|
44
|
+
},
|
|
46
45
|
maxlength: {
|
|
47
46
|
type: [String, Number],
|
|
48
47
|
required: false,
|
|
@@ -165,6 +164,7 @@ export default {
|
|
|
165
164
|
id: this.htmlIdLocal,
|
|
166
165
|
label: this.label,
|
|
167
166
|
labelClass: this.labelClass,
|
|
167
|
+
labelScreenreader: this.labelScreenreader,
|
|
168
168
|
required: this.required,
|
|
169
169
|
type: this.type,
|
|
170
170
|
isLabelFloat: this.isLabelFloat,
|
|
@@ -37,6 +37,11 @@ export default {
|
|
|
37
37
|
type: Boolean,
|
|
38
38
|
required: false,
|
|
39
39
|
},
|
|
40
|
+
labelScreenreader: {
|
|
41
|
+
type: String,
|
|
42
|
+
required: false,
|
|
43
|
+
default: undefined,
|
|
44
|
+
},
|
|
40
45
|
modelUndefined: {
|
|
41
46
|
required: false,
|
|
42
47
|
default: "",
|
|
@@ -161,6 +166,7 @@ export default {
|
|
|
161
166
|
id: this.htmlIdLocal,
|
|
162
167
|
label: this.label,
|
|
163
168
|
labelClass: this.labelClass,
|
|
169
|
+
labelScreenreader: this.labelScreenreader,
|
|
164
170
|
required: this.required,
|
|
165
171
|
hideId: true,
|
|
166
172
|
type: this.type,
|
|
@@ -75,6 +75,11 @@ export default {
|
|
|
75
75
|
required: false,
|
|
76
76
|
default: inputNumberPluginOptions.value.propsDefault.isLabelFloat,
|
|
77
77
|
},
|
|
78
|
+
labelScreenreader: {
|
|
79
|
+
type: String,
|
|
80
|
+
required: false,
|
|
81
|
+
default: undefined,
|
|
82
|
+
},
|
|
78
83
|
max: {
|
|
79
84
|
type: Number,
|
|
80
85
|
required: false,
|
|
@@ -295,6 +300,7 @@ export default {
|
|
|
295
300
|
id: this.htmlIdLocal,
|
|
296
301
|
label: this.label,
|
|
297
302
|
labelClass: this.labelClass,
|
|
303
|
+
labelScreenreader: this.labelScreenreader,
|
|
298
304
|
required: this.required,
|
|
299
305
|
type: this.type,
|
|
300
306
|
isLabelFloat: this.isLabelFloat,
|
|
@@ -317,6 +323,7 @@ export default {
|
|
|
317
323
|
id: this.htmlIdLocal,
|
|
318
324
|
label: this.label,
|
|
319
325
|
labelClass: this.labelClass,
|
|
326
|
+
labelScreenreader: this.labelScreenreader,
|
|
320
327
|
required: this.required,
|
|
321
328
|
type: this.type,
|
|
322
329
|
isLabelFloat: this.isLabelFloat,
|
|
@@ -143,6 +143,11 @@ export default {
|
|
|
143
143
|
required: false,
|
|
144
144
|
default: "_A_INPUT_NUMBER_RANGE_LABEL_MIN_",
|
|
145
145
|
},
|
|
146
|
+
labelScreenreader: {
|
|
147
|
+
type: String,
|
|
148
|
+
required: false,
|
|
149
|
+
default: undefined,
|
|
150
|
+
},
|
|
146
151
|
max: {
|
|
147
152
|
type: Number,
|
|
148
153
|
required: false,
|
|
@@ -314,6 +319,7 @@ export default {
|
|
|
314
319
|
id: this.htmlIdLocal,
|
|
315
320
|
label: this.label,
|
|
316
321
|
labelClass: this.labelClass,
|
|
322
|
+
labelScreenreader: this.labelScreenreader,
|
|
317
323
|
required: this.required,
|
|
318
324
|
type: this.type,
|
|
319
325
|
isLabelFloat: false,
|
package/src/ui/ALabel/ALabel.js
CHANGED
|
@@ -2,14 +2,12 @@ import {
|
|
|
2
2
|
h,
|
|
3
3
|
} from "vue";
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import ATranslation from "../../ATranslation/ATranslation";
|
|
5
|
+
import AElement from "../../AElement/AElement";
|
|
7
6
|
|
|
8
7
|
import ClickAPI from "./compositionAPI/ClickAPI";
|
|
9
8
|
import IdAPI from "./compositionAPI/IdAPI";
|
|
10
9
|
import LabelAPI from "./compositionAPI/LabelAPI";
|
|
11
10
|
import PropsTypeAPI from "./compositionAPI/PropsTypeAPI";
|
|
12
|
-
import TextAfterAPI from "./compositionAPI/TextAfterAPI";
|
|
13
11
|
import UIExcludeRenderAttributesAPI from "../compositionApi/UIExcludeRenderAttributesAPI";
|
|
14
12
|
|
|
15
13
|
export default {
|
|
@@ -56,6 +54,11 @@ export default {
|
|
|
56
54
|
labelClass: {
|
|
57
55
|
required: false,
|
|
58
56
|
},
|
|
57
|
+
labelScreenreader: {
|
|
58
|
+
type: String,
|
|
59
|
+
required: false,
|
|
60
|
+
default: undefined,
|
|
61
|
+
},
|
|
59
62
|
loading: {
|
|
60
63
|
type: Boolean,
|
|
61
64
|
required: false,
|
|
@@ -75,6 +78,11 @@ export default {
|
|
|
75
78
|
required: false,
|
|
76
79
|
default: undefined,
|
|
77
80
|
},
|
|
81
|
+
tag: {
|
|
82
|
+
type: String,
|
|
83
|
+
required: false,
|
|
84
|
+
default: "label",
|
|
85
|
+
},
|
|
78
86
|
type: {
|
|
79
87
|
type: String,
|
|
80
88
|
required: false,
|
|
@@ -100,12 +108,11 @@ export default {
|
|
|
100
108
|
hideIdLocal,
|
|
101
109
|
});
|
|
102
110
|
|
|
103
|
-
const {
|
|
104
|
-
textAfterLabel,
|
|
105
|
-
} = TextAfterAPI(props);
|
|
106
|
-
|
|
107
111
|
const {
|
|
108
112
|
isLabel,
|
|
113
|
+
labelLocal,
|
|
114
|
+
textAfterLabel,
|
|
115
|
+
titleLocal,
|
|
109
116
|
} = LabelAPI(props);
|
|
110
117
|
|
|
111
118
|
const {
|
|
@@ -121,33 +128,28 @@ export default {
|
|
|
121
128
|
forLabelLocal,
|
|
122
129
|
idLabelLocal,
|
|
123
130
|
isLabel,
|
|
131
|
+
labelLocal,
|
|
124
132
|
onClick,
|
|
125
133
|
textAfterLabel,
|
|
134
|
+
titleLocal,
|
|
126
135
|
};
|
|
127
136
|
},
|
|
128
137
|
render() {
|
|
129
|
-
return h(
|
|
138
|
+
return h(AElement, {
|
|
130
139
|
id: this.idLabelLocal,
|
|
131
|
-
for: this.forLabelLocal,
|
|
132
140
|
class: ["a_form_element_label", this.labelClass],
|
|
141
|
+
html: this.labelLocal,
|
|
142
|
+
htmlScreenReader: this.labelScreenreader,
|
|
143
|
+
for: this.forLabelLocal,
|
|
144
|
+
loading: this.loading,
|
|
145
|
+
loadingAlign: "right",
|
|
146
|
+
loadingClass: "a_spinner_small a_form_element_label__spinner",
|
|
147
|
+
tag: this.tag,
|
|
148
|
+
textAfter: this.textAfterLabel,
|
|
149
|
+
title: this.titleLocal,
|
|
150
|
+
type: "text",
|
|
133
151
|
onClick: this.onClick,
|
|
134
152
|
...this.attributesToExcludeFromRender,
|
|
135
|
-
}
|
|
136
|
-
this.isLabel && h(ATranslation, {
|
|
137
|
-
tag: "span",
|
|
138
|
-
html: this.label,
|
|
139
|
-
textAfter: this.textAfterLabel,
|
|
140
|
-
}, () => [
|
|
141
|
-
this.isLabelFloat && h(ATranslation, {
|
|
142
|
-
class: "a_position_absolute_all",
|
|
143
|
-
ariaHidden: true,
|
|
144
|
-
tag: "span",
|
|
145
|
-
title: this.label,
|
|
146
|
-
})
|
|
147
|
-
]),
|
|
148
|
-
this.loading && h(ASpinner, {
|
|
149
|
-
class: "a_spinner_small a_form_element_label__spinner",
|
|
150
|
-
}),
|
|
151
|
-
]);
|
|
153
|
+
});
|
|
152
154
|
},
|
|
153
155
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import LabelAPI from "../compositionAPI/LabelAPI";
|
|
2
|
+
|
|
3
|
+
describe("ALabel LabelAPI", () => {
|
|
4
|
+
it("textAfterLabel should be empty when 'required' is false", () => {
|
|
5
|
+
const {
|
|
6
|
+
textAfterLabel,
|
|
7
|
+
} = LabelAPI({ required: false, label: "Aloha" });
|
|
8
|
+
|
|
9
|
+
expect(textAfterLabel.value).toBe("");
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it("textAfterLabel should be empty when 'label' is empty", () => {
|
|
13
|
+
const {
|
|
14
|
+
textAfterLabel,
|
|
15
|
+
} = LabelAPI({ required: false, label: "" });
|
|
16
|
+
|
|
17
|
+
expect(textAfterLabel.value).toBe("");
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it("textAfterLabel should be asterisk when 'required' is true", () => {
|
|
21
|
+
const {
|
|
22
|
+
textAfterLabel,
|
|
23
|
+
} = LabelAPI({ required: true, label: "Aloha" });
|
|
24
|
+
|
|
25
|
+
expect(textAfterLabel.value).toBe("*");
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -8,13 +8,38 @@ import {
|
|
|
8
8
|
} from "lodash-es";
|
|
9
9
|
|
|
10
10
|
export default function LabelAPI(props) {
|
|
11
|
+
const isLabelFloat = toRef(props, "isLabelFloat");
|
|
11
12
|
const label = toRef(props, "label");
|
|
13
|
+
const required = toRef(props, "required");
|
|
12
14
|
|
|
13
15
|
const isLabel = computed(() => {
|
|
14
16
|
return !isNil(label.value);
|
|
15
17
|
});
|
|
16
18
|
|
|
19
|
+
const labelLocal = computed(() => {
|
|
20
|
+
return isLabel.value ?
|
|
21
|
+
label.value :
|
|
22
|
+
undefined;
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const textAfterLabel = computed(() => {
|
|
26
|
+
return required.value && isLabel.value ?
|
|
27
|
+
"*" :
|
|
28
|
+
"";
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const titleLocal = computed(() => {
|
|
32
|
+
if (isLabelFloat.value) {
|
|
33
|
+
return labelLocal.value;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return undefined;
|
|
37
|
+
});
|
|
38
|
+
|
|
17
39
|
return {
|
|
18
40
|
isLabel,
|
|
41
|
+
labelLocal,
|
|
42
|
+
textAfterLabel,
|
|
43
|
+
titleLocal,
|
|
19
44
|
};
|
|
20
45
|
}
|
|
@@ -242,6 +242,11 @@ export default {
|
|
|
242
242
|
required: false,
|
|
243
243
|
default: undefined,
|
|
244
244
|
},
|
|
245
|
+
labelScreenreader: {
|
|
246
|
+
type: String,
|
|
247
|
+
required: false,
|
|
248
|
+
default: undefined,
|
|
249
|
+
},
|
|
245
250
|
loading: {
|
|
246
251
|
type: Boolean,
|
|
247
252
|
required: false,
|
|
@@ -644,6 +649,7 @@ export default {
|
|
|
644
649
|
isLabelFloat: this.isLabelFloat,
|
|
645
650
|
label: this.label,
|
|
646
651
|
labelClass: this.labelClass,
|
|
652
|
+
labelScreenreader: this.labelScreenreader,
|
|
647
653
|
loading: this.loadingLocal,
|
|
648
654
|
required: this.required,
|
|
649
655
|
type: this.type,
|
|
@@ -144,6 +144,11 @@ export default {
|
|
|
144
144
|
required: false,
|
|
145
145
|
default: undefined,
|
|
146
146
|
},
|
|
147
|
+
labelScreenreader: {
|
|
148
|
+
type: String,
|
|
149
|
+
required: false,
|
|
150
|
+
default: undefined,
|
|
151
|
+
},
|
|
147
152
|
modelDependencies: {
|
|
148
153
|
type: Object,
|
|
149
154
|
required: false,
|
|
@@ -308,6 +313,7 @@ export default {
|
|
|
308
313
|
id: this.htmlIdLocal,
|
|
309
314
|
label: this.label,
|
|
310
315
|
labelClass: this.labelClass,
|
|
316
|
+
labelScreenreader: this.labelScreenreader,
|
|
311
317
|
required: this.required,
|
|
312
318
|
type: this.type,
|
|
313
319
|
isLabelFloat: this.isLabelFloat,
|
|
@@ -11,7 +11,6 @@ import AErrorsText from "../AErrorsText/AErrorsText";
|
|
|
11
11
|
import AFormElementBtnClear from "../../AFormElement/AFormElementBtnClear/AFormElementBtnClear";
|
|
12
12
|
import AFormHelpText from "../AFormHelpText/AFormHelpText";
|
|
13
13
|
import ALabel from "../ALabel/ALabel";
|
|
14
|
-
import ATranslation from "../../ATranslation/ATranslation";
|
|
15
14
|
|
|
16
15
|
import UiClearButtonMixinProps from "../mixins/UiClearButtonMixinProps";
|
|
17
16
|
import UiMixinProps from "../mixins/UiMixinProps";
|
|
@@ -26,11 +25,6 @@ import autosize from "../../utils/autosize";
|
|
|
26
25
|
|
|
27
26
|
export default {
|
|
28
27
|
name: "ATextarea",
|
|
29
|
-
components: {
|
|
30
|
-
AFormElementBtnClear,
|
|
31
|
-
ALabel,
|
|
32
|
-
ATranslation,
|
|
33
|
-
},
|
|
34
28
|
mixins: [
|
|
35
29
|
UiClearButtonMixinProps,
|
|
36
30
|
UiMixinProps,
|
|
@@ -45,6 +39,11 @@ export default {
|
|
|
45
39
|
type: Boolean,
|
|
46
40
|
required: false,
|
|
47
41
|
},
|
|
42
|
+
labelScreenreader: {
|
|
43
|
+
type: String,
|
|
44
|
+
required: false,
|
|
45
|
+
default: undefined,
|
|
46
|
+
},
|
|
48
47
|
maxlength: {
|
|
49
48
|
type: [String, Number],
|
|
50
49
|
required: false,
|
|
@@ -195,6 +194,7 @@ export default {
|
|
|
195
194
|
id: this.htmlIdLocal,
|
|
196
195
|
label: this.label,
|
|
197
196
|
labelClass: this.labelClass,
|
|
197
|
+
labelScreenreader: this.labelScreenreader,
|
|
198
198
|
required: this.required,
|
|
199
199
|
isLabelFloat: this.isLabelFloat,
|
|
200
200
|
}),
|
|
@@ -46,6 +46,11 @@ export default {
|
|
|
46
46
|
required: false,
|
|
47
47
|
default: () => [],
|
|
48
48
|
},
|
|
49
|
+
labelScreenreader: {
|
|
50
|
+
type: String,
|
|
51
|
+
required: false,
|
|
52
|
+
default: undefined,
|
|
53
|
+
},
|
|
49
54
|
languageDefault: {
|
|
50
55
|
type: String,
|
|
51
56
|
required: false,
|
|
@@ -191,6 +196,7 @@ export default {
|
|
|
191
196
|
clickLabel: this.clickLabel,
|
|
192
197
|
label: this.label,
|
|
193
198
|
labelClass: this.labelClass,
|
|
199
|
+
labelScreenreader: this.labelScreenreader,
|
|
194
200
|
prevent: true,
|
|
195
201
|
required: this.required,
|
|
196
202
|
stop: true,
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import TextAfterAPI from "../compositionAPI/TextAfterAPI";
|
|
2
|
-
|
|
3
|
-
describe("ALabel TextAfterAPI", () => {
|
|
4
|
-
it("textAfterLabel should be empty when 'required' is false", () => {
|
|
5
|
-
const {
|
|
6
|
-
textAfterLabel,
|
|
7
|
-
} = TextAfterAPI({ required: false });
|
|
8
|
-
|
|
9
|
-
expect(textAfterLabel.value).toBe("");
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
it("textAfterLabel should be asterisk when 'required' is true", () => {
|
|
13
|
-
const {
|
|
14
|
-
textAfterLabel,
|
|
15
|
-
} = TextAfterAPI({ required: true });
|
|
16
|
-
|
|
17
|
-
expect(textAfterLabel.value).toBe("*");
|
|
18
|
-
});
|
|
19
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
computed,
|
|
3
|
-
toRef,
|
|
4
|
-
} from "vue";
|
|
5
|
-
|
|
6
|
-
export default function TextAfterAPI(props) {
|
|
7
|
-
const required = toRef(props, "required");
|
|
8
|
-
|
|
9
|
-
const textAfterLabel = computed(() => {
|
|
10
|
-
return required.value ?
|
|
11
|
-
"*" :
|
|
12
|
-
"";
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
return {
|
|
16
|
-
textAfterLabel,
|
|
17
|
-
};
|
|
18
|
-
}
|