aloha-vue 2.56.0 → 2.57.0
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 +9 -0
- package/dist/aloha-vue.css +312 -2
- package/dist/aloha-vue.css.map +1 -1
- package/dist/aloha-vue.es.js +21629 -19204
- package/dist/aloha-vue.umd.js +70 -70
- package/package.json +1 -1
- package/scss/aloha-vue.scss +1 -0
- package/scss/components/ATableForm.scss +230 -0
- package/scss/components/ui/ADatepicker.scss +12 -0
- package/scss/components/ui/ASelect.scss +39 -0
- package/scss/components/ui/ASwitch.scss +28 -0
- package/scss/components/ui/ui.scss +31 -2
- package/src/AAccordion/AAccordion.js +0 -1
- package/src/AElement/AElement.js +506 -506
- package/src/ATableForm/ATableForm.js +578 -0
- package/src/ATableForm/ATableFormCell/ATableFormCell.js +182 -0
- package/src/ATableForm/ATableFormCell/compositionAPI/DisabledAPI.js +20 -0
- package/src/ATableForm/ATableFormCell/compositionAPI/ReadonlyAPI.js +28 -0
- package/src/ATableForm/ATableFormCell/compositionAPI/SlotAPI.js +38 -0
- package/src/ATableForm/ATableFormCellAction/ATableFormCellAction.js +238 -0
- package/src/ATableForm/ATableFormCellAction/compositionAPI/DeleteAPI.js +80 -0
- package/src/ATableForm/ATableFormCellAction/compositionAPI/DisabledAPI.js +60 -0
- package/src/ATableForm/ATableFormCellAction/compositionAPI/HiddenAPI.js +46 -0
- package/src/ATableForm/ATableFormCellAction/compositionAPI/StylesAPI.js +29 -0
- package/src/ATableForm/ATableFormCellAction/compositionAPI/TitleAPI.js +47 -0
- package/src/ATableForm/ATableFormCellDnd/ATableFormCellDnd.js +174 -0
- package/src/ATableForm/ATableFormCellDnd/compositionAPI/IdAPI.js +21 -0
- package/src/ATableForm/ATableFormRow/ATableFormRow.js +431 -0
- package/src/ATableForm/ATableFormRow/compositionAPI/ClassAPI.js +55 -0
- package/src/ATableForm/ATableFormRow/compositionAPI/EditAPI.js +97 -0
- package/src/ATableForm/ATableFormRow/compositionAPI/ErrorsAPI.js +40 -0
- package/src/ATableForm/ATableFormRow/compositionAPI/FocusAPI.js +33 -0
- package/src/ATableForm/ATableFormRow/compositionAPI/IdAPI.js +19 -0
- package/src/ATableForm/ATableFormTh/ATableFormTh.js +70 -0
- package/src/ATableForm/compositionAPI/ColumnsAPI.js +34 -0
- package/src/ATableForm/compositionAPI/ColumnsGrowAPI.js +208 -0
- package/src/ATableForm/compositionAPI/DeleteAPI.js +9 -0
- package/src/ATableForm/compositionAPI/DragAndDropAPI.js +258 -0
- package/src/ATableForm/compositionAPI/EditAPI.js +107 -0
- package/src/ATableForm/compositionAPI/IconsAPI.js +21 -0
- package/src/ATableForm/compositionAPI/RowsAPI.js +42 -0
- package/src/ATableForm/compositionAPI/StylesAPI.js +62 -0
- package/src/ATableForm/compositionAPI/TextsAPI.js +34 -0
- package/src/ATableForm/compositionAPI/WidthsAPI.js +21 -0
- package/src/ATableForm/i18n/ATableFormI18n.js +19 -0
- package/src/ATableForm/i18n/ar.json +17 -0
- package/src/ATableForm/i18n/de.json +17 -0
- package/src/ATableForm/i18n/en.json +17 -0
- package/src/ATableForm/i18n/es.json +17 -0
- package/src/ATableForm/i18n/fr.json +17 -0
- package/src/ATableForm/i18n/hr.json +17 -0
- package/src/ATableForm/i18n/it.json +17 -0
- package/src/ATableForm/i18n/ru.json +17 -0
- package/src/i18n/allLanguages.js +9 -0
- package/src/index.js +10 -8
- package/src/ui/ACheckbox/ACheckbox.js +196 -195
- package/src/ui/ADatepicker/ADatepicker.js +19 -0
- package/src/ui/ADatepickerRange/ADatepickerRange.js +6 -0
- package/src/ui/AErrorsText/AErrorsText.js +62 -57
- package/src/ui/AFieldset/AFieldset.js +535 -529
- package/src/ui/AFormElement/AFormElement.js +10 -0
- package/src/ui/AGroup/AGroup.js +427 -421
- package/src/ui/AInput/AInput.js +516 -494
- package/src/ui/AInput/compositionAPI/ClassAPI.js +6 -0
- package/src/ui/AInputCurrency/AInputCurrency.js +21 -0
- package/src/ui/AInputCurrency/compositionAPI/InputEventsAPI.js +93 -18
- package/src/ui/AInputCurrency/compositionAPI/ModelAPI.js +12 -7
- package/src/ui/AInputFile/AInputFile.js +1 -0
- package/src/ui/AInputNumber/AInputNumber.js +18 -0
- package/src/ui/AInputNumber/compositionAPI/InputEventsAPI.js +196 -196
- package/src/ui/AInputNumber/compositionAPI/ModelAPI.js +72 -72
- package/src/ui/AInputNumberRange/AInputNumberRange.js +6 -0
- package/src/ui/AJson/AJson.js +6 -0
- package/src/ui/AMultiselectOrdered/AMultiselectOrdered.js +185 -179
- package/src/ui/AOneCheckbox/AOneCheckbox.js +366 -360
- package/src/ui/ARadio/ARadio.js +195 -189
- package/src/ui/ASelect/ASelect.js +25 -0
- package/src/ui/ASlider/ASlider.js +6 -0
- package/src/ui/ASwitch/ASwitch.js +25 -1
- package/src/ui/ATextarea/ATextarea.js +23 -0
- package/src/ui/AValidatedJson/AValidatedJson.js +7 -0
- package/src/ui/compositionApi/UiDataFromServerAPI.js +5 -3
- package/src/ui/mixins/UiMixinProps.js +5 -0
package/src/AElement/AElement.js
CHANGED
|
@@ -1,506 +1,506 @@
|
|
|
1
|
-
import {
|
|
2
|
-
h,
|
|
3
|
-
} from "vue";
|
|
4
|
-
import {
|
|
5
|
-
AIcon,
|
|
6
|
-
APlacements,
|
|
7
|
-
ASpinner,
|
|
8
|
-
ATranslation,
|
|
9
|
-
} from "../index";
|
|
10
|
-
|
|
11
|
-
import AriaLabelAPI from "../ATranslation/compositionAPI/AriaLabelAPI";
|
|
12
|
-
import AttributesAPI from "./comositionAPI/AttributesAPI";
|
|
13
|
-
import ClickAPI from "./comositionAPI/ClickAPI";
|
|
14
|
-
import ComponentLocalAPI from "./comositionAPI/ComponentLocalAPI";
|
|
15
|
-
import DisabledAPI from "./comositionAPI/DisabledAPI";
|
|
16
|
-
import HtmlTitleAPI from "./comositionAPI/HtmlTitleAPI";
|
|
17
|
-
import LoadingAPI from "./comositionAPI/LoadingAPI";
|
|
18
|
-
import RouterLinkAPI from "./comositionAPI/RouterLinkAPI";
|
|
19
|
-
import SwitchAPI from "./comositionAPI/SwitchAPI";
|
|
20
|
-
import TagAPI from "./comositionAPI/TagAPI";
|
|
21
|
-
import TextAPI from "./comositionAPI/TextAPI";
|
|
22
|
-
import TitleAPI from "./comositionAPI/TitleAPI";
|
|
23
|
-
import UIExcludeRenderAttributesAPI from "../ui/compositionApi/UIExcludeRenderAttributesAPI";
|
|
24
|
-
|
|
25
|
-
import {
|
|
26
|
-
isInteger,
|
|
27
|
-
isString,
|
|
28
|
-
uniqueId,
|
|
29
|
-
} from "lodash-es";
|
|
30
|
-
|
|
31
|
-
export default {
|
|
32
|
-
name: "AElement",
|
|
33
|
-
inheritAttrs: false,
|
|
34
|
-
props: {
|
|
35
|
-
alwaysTranslate: {
|
|
36
|
-
type: Boolean,
|
|
37
|
-
required: false,
|
|
38
|
-
},
|
|
39
|
-
ariaDisabled: {
|
|
40
|
-
type: Boolean,
|
|
41
|
-
required: false,
|
|
42
|
-
default: undefined,
|
|
43
|
-
},
|
|
44
|
-
ariaLabel: {
|
|
45
|
-
type: [String, Number, Object],
|
|
46
|
-
required: false,
|
|
47
|
-
default: undefined,
|
|
48
|
-
},
|
|
49
|
-
attributes: {
|
|
50
|
-
type: Object,
|
|
51
|
-
required: false,
|
|
52
|
-
default: () => ({}),
|
|
53
|
-
},
|
|
54
|
-
class: {
|
|
55
|
-
type: [String, Object],
|
|
56
|
-
required: false,
|
|
57
|
-
default: undefined,
|
|
58
|
-
},
|
|
59
|
-
classDefault: {
|
|
60
|
-
type: String,
|
|
61
|
-
required: false,
|
|
62
|
-
default: "aloha_element",
|
|
63
|
-
},
|
|
64
|
-
classDefaultHidden: {
|
|
65
|
-
type: String,
|
|
66
|
-
required: false,
|
|
67
|
-
default: "aloha_element__hidden",
|
|
68
|
-
},
|
|
69
|
-
classDisabled: {
|
|
70
|
-
type: String,
|
|
71
|
-
required: false,
|
|
72
|
-
default: "disabled",
|
|
73
|
-
},
|
|
74
|
-
disabled: {
|
|
75
|
-
type: Boolean,
|
|
76
|
-
required: false,
|
|
77
|
-
default: undefined,
|
|
78
|
-
},
|
|
79
|
-
excludeRenderAttributes: {
|
|
80
|
-
type: Array,
|
|
81
|
-
required: false,
|
|
82
|
-
default: () => [],
|
|
83
|
-
},
|
|
84
|
-
extra: {
|
|
85
|
-
type: Object,
|
|
86
|
-
required: false,
|
|
87
|
-
default: undefined,
|
|
88
|
-
},
|
|
89
|
-
extraData: {
|
|
90
|
-
type: [String, Number, Boolean, Array, Object, Date, Function, Symbol, null, undefined],
|
|
91
|
-
required: false,
|
|
92
|
-
default: undefined,
|
|
93
|
-
},
|
|
94
|
-
href: {
|
|
95
|
-
type: String,
|
|
96
|
-
required: false,
|
|
97
|
-
default: undefined,
|
|
98
|
-
},
|
|
99
|
-
html: {
|
|
100
|
-
type: [String, Number, Object, Array],
|
|
101
|
-
required: false,
|
|
102
|
-
default: undefined,
|
|
103
|
-
},
|
|
104
|
-
htmlScreenReader: {
|
|
105
|
-
type: [String, Number, Object, Array],
|
|
106
|
-
required: false,
|
|
107
|
-
default: undefined,
|
|
108
|
-
},
|
|
109
|
-
iconAttributes: {
|
|
110
|
-
type: Object,
|
|
111
|
-
required: false,
|
|
112
|
-
default: () => ({}),
|
|
113
|
-
},
|
|
114
|
-
iconClass: {
|
|
115
|
-
type: [String, Object],
|
|
116
|
-
required: false,
|
|
117
|
-
default: undefined,
|
|
118
|
-
},
|
|
119
|
-
iconLeft: {
|
|
120
|
-
type: [String, Object],
|
|
121
|
-
required: false,
|
|
122
|
-
default: undefined,
|
|
123
|
-
},
|
|
124
|
-
iconRight: {
|
|
125
|
-
type: [String, Object],
|
|
126
|
-
required: false,
|
|
127
|
-
default: undefined,
|
|
128
|
-
},
|
|
129
|
-
iconTag: {
|
|
130
|
-
type: String,
|
|
131
|
-
required: false,
|
|
132
|
-
default: undefined,
|
|
133
|
-
},
|
|
134
|
-
id: {
|
|
135
|
-
type: String,
|
|
136
|
-
required: false,
|
|
137
|
-
default: () => uniqueId("a_element_"),
|
|
138
|
-
},
|
|
139
|
-
isSwitch: {
|
|
140
|
-
type: Boolean,
|
|
141
|
-
required: false,
|
|
142
|
-
default: undefined,
|
|
143
|
-
},
|
|
144
|
-
isTitleHtml: {
|
|
145
|
-
type: Boolean,
|
|
146
|
-
required: false,
|
|
147
|
-
default: undefined,
|
|
148
|
-
},
|
|
149
|
-
loading: {
|
|
150
|
-
type: Boolean,
|
|
151
|
-
required: false,
|
|
152
|
-
default: false,
|
|
153
|
-
},
|
|
154
|
-
loadingAlign: {
|
|
155
|
-
type: String,
|
|
156
|
-
required: false,
|
|
157
|
-
default: "right",
|
|
158
|
-
validator: value => ["right", "left"].indexOf(value) !== -1,
|
|
159
|
-
},
|
|
160
|
-
loadingClass: {
|
|
161
|
-
type: [String, Object],
|
|
162
|
-
required: false,
|
|
163
|
-
default: "a_spinner_small",
|
|
164
|
-
},
|
|
165
|
-
modelSwitch: {
|
|
166
|
-
type: Boolean,
|
|
167
|
-
required: false,
|
|
168
|
-
default: undefined,
|
|
169
|
-
},
|
|
170
|
-
prevent: {
|
|
171
|
-
type: Boolean,
|
|
172
|
-
required: false,
|
|
173
|
-
default: undefined,
|
|
174
|
-
},
|
|
175
|
-
safeHtml: {
|
|
176
|
-
type: [String, Number, Object, Array],
|
|
177
|
-
required: false,
|
|
178
|
-
default: undefined,
|
|
179
|
-
},
|
|
180
|
-
safeHtmlScreenReader: {
|
|
181
|
-
type: [String, Number, Object, Array],
|
|
182
|
-
required: false,
|
|
183
|
-
default: undefined,
|
|
184
|
-
},
|
|
185
|
-
stop: {
|
|
186
|
-
type: Boolean,
|
|
187
|
-
required: false,
|
|
188
|
-
default: undefined,
|
|
189
|
-
},
|
|
190
|
-
tabindex: {
|
|
191
|
-
type: [Number, String],
|
|
192
|
-
required: false,
|
|
193
|
-
default: undefined,
|
|
194
|
-
},
|
|
195
|
-
tag: {
|
|
196
|
-
type: String,
|
|
197
|
-
required: false,
|
|
198
|
-
default: undefined,
|
|
199
|
-
},
|
|
200
|
-
target: {
|
|
201
|
-
type: String,
|
|
202
|
-
required: false,
|
|
203
|
-
default: undefined,
|
|
204
|
-
},
|
|
205
|
-
text: {
|
|
206
|
-
type: [String, Number, Object, Array],
|
|
207
|
-
required: false,
|
|
208
|
-
default: undefined,
|
|
209
|
-
},
|
|
210
|
-
textAfter: {
|
|
211
|
-
type: [String, Number, Object],
|
|
212
|
-
required: false,
|
|
213
|
-
default: undefined,
|
|
214
|
-
},
|
|
215
|
-
textAriaHidden: {
|
|
216
|
-
type: Boolean,
|
|
217
|
-
required: false,
|
|
218
|
-
default: undefined,
|
|
219
|
-
},
|
|
220
|
-
textBefore: {
|
|
221
|
-
type: [String, Number, Object],
|
|
222
|
-
required: false,
|
|
223
|
-
default: undefined,
|
|
224
|
-
},
|
|
225
|
-
textClass: {
|
|
226
|
-
type: String,
|
|
227
|
-
required: false,
|
|
228
|
-
default: undefined,
|
|
229
|
-
},
|
|
230
|
-
textScreenReader: {
|
|
231
|
-
type: [String, Number, Object, Array],
|
|
232
|
-
required: false,
|
|
233
|
-
default: undefined,
|
|
234
|
-
},
|
|
235
|
-
textTag: {
|
|
236
|
-
type: String,
|
|
237
|
-
required: false,
|
|
238
|
-
default: "span",
|
|
239
|
-
},
|
|
240
|
-
title: {
|
|
241
|
-
type: [String, Number, Object, Array],
|
|
242
|
-
required: false,
|
|
243
|
-
default: undefined,
|
|
244
|
-
},
|
|
245
|
-
titleAttributes: {
|
|
246
|
-
type: Object,
|
|
247
|
-
required: false,
|
|
248
|
-
default: () => ({}),
|
|
249
|
-
},
|
|
250
|
-
titlePlacement: {
|
|
251
|
-
type: String,
|
|
252
|
-
required: false,
|
|
253
|
-
default: "top",
|
|
254
|
-
validator: placement => APlacements.indexOf(placement) !== -1,
|
|
255
|
-
},
|
|
256
|
-
titleZIndex: {
|
|
257
|
-
type: [Number, String],
|
|
258
|
-
required: false,
|
|
259
|
-
default: "auto",
|
|
260
|
-
validator: value => {
|
|
261
|
-
if (isString(value)) {
|
|
262
|
-
return value === "auto";
|
|
263
|
-
}
|
|
264
|
-
return isInteger(value);
|
|
265
|
-
},
|
|
266
|
-
},
|
|
267
|
-
to: {
|
|
268
|
-
type: [Object, String],
|
|
269
|
-
required: false,
|
|
270
|
-
default: undefined,
|
|
271
|
-
},
|
|
272
|
-
type: {
|
|
273
|
-
type: String,
|
|
274
|
-
required: true,
|
|
275
|
-
default: "text",
|
|
276
|
-
validator: value => ["button", "submit", "reset", "link", "text"].indexOf(value) !== -1,
|
|
277
|
-
},
|
|
278
|
-
},
|
|
279
|
-
emits: [
|
|
280
|
-
"click",
|
|
281
|
-
],
|
|
282
|
-
setup(props, context) {
|
|
283
|
-
const {
|
|
284
|
-
attributesToExcludeFromRender,
|
|
285
|
-
} = UIExcludeRenderAttributesAPI(props);
|
|
286
|
-
|
|
287
|
-
const {
|
|
288
|
-
isRouterLink,
|
|
289
|
-
} = RouterLinkAPI(props);
|
|
290
|
-
|
|
291
|
-
const {
|
|
292
|
-
disabledLocal,
|
|
293
|
-
} = DisabledAPI(props);
|
|
294
|
-
|
|
295
|
-
const {
|
|
296
|
-
tagLocal,
|
|
297
|
-
} = TagAPI(props, {
|
|
298
|
-
isRouterLink,
|
|
299
|
-
});
|
|
300
|
-
|
|
301
|
-
const {
|
|
302
|
-
toHrefAttributes,
|
|
303
|
-
typeAttribut,
|
|
304
|
-
} = AttributesAPI(props, {
|
|
305
|
-
isRouterLink,
|
|
306
|
-
tagLocal,
|
|
307
|
-
});
|
|
308
|
-
|
|
309
|
-
const {
|
|
310
|
-
isTitleVisible,
|
|
311
|
-
} = TitleAPI(props);
|
|
312
|
-
|
|
313
|
-
const {
|
|
314
|
-
isLoadingLeft,
|
|
315
|
-
isLoadingRight,
|
|
316
|
-
} = LoadingAPI(props);
|
|
317
|
-
|
|
318
|
-
const {
|
|
319
|
-
isTextOrHtmlVisible,
|
|
320
|
-
isTextOrHtmlScreenReaderVisible,
|
|
321
|
-
} = TextAPI(props);
|
|
322
|
-
|
|
323
|
-
const {
|
|
324
|
-
onClick,
|
|
325
|
-
} = ClickAPI(props, context);
|
|
326
|
-
|
|
327
|
-
const {
|
|
328
|
-
componentLocal,
|
|
329
|
-
} = ComponentLocalAPI(props, {
|
|
330
|
-
tagLocal,
|
|
331
|
-
});
|
|
332
|
-
|
|
333
|
-
const {
|
|
334
|
-
elementRef,
|
|
335
|
-
htmlTitleAttributes,
|
|
336
|
-
} = HtmlTitleAPI(props, {
|
|
337
|
-
tagLocal,
|
|
338
|
-
});
|
|
339
|
-
|
|
340
|
-
const {
|
|
341
|
-
ariaLabelAttributes,
|
|
342
|
-
} = AriaLabelAPI(props);
|
|
343
|
-
|
|
344
|
-
const {
|
|
345
|
-
isSwitchActive,
|
|
346
|
-
switchClass,
|
|
347
|
-
} = SwitchAPI(props);
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
return {
|
|
351
|
-
ariaLabelAttributes,
|
|
352
|
-
attributesToExcludeFromRender,
|
|
353
|
-
componentLocal,
|
|
354
|
-
disabledLocal,
|
|
355
|
-
elementRef,
|
|
356
|
-
htmlTitleAttributes,
|
|
357
|
-
isLoadingLeft,
|
|
358
|
-
isLoadingRight,
|
|
359
|
-
isSwitchActive,
|
|
360
|
-
isTextOrHtmlScreenReaderVisible,
|
|
361
|
-
isTextOrHtmlVisible,
|
|
362
|
-
isTitleVisible,
|
|
363
|
-
onClick,
|
|
364
|
-
switchClass,
|
|
365
|
-
tagLocal,
|
|
366
|
-
toHrefAttributes,
|
|
367
|
-
typeAttribut,
|
|
368
|
-
};
|
|
369
|
-
},
|
|
370
|
-
render() {
|
|
371
|
-
return h(this.componentLocal, {
|
|
372
|
-
...this.$attrs,
|
|
373
|
-
...this.htmlTitleAttributes,
|
|
374
|
-
...this.ariaLabelAttributes,
|
|
375
|
-
...this.toHrefAttributes,
|
|
376
|
-
ref: "elementRef",
|
|
377
|
-
id: this.id,
|
|
378
|
-
class: [
|
|
379
|
-
this.classDefault,
|
|
380
|
-
this.switchClass,
|
|
381
|
-
this.class,
|
|
382
|
-
{
|
|
383
|
-
[this.classDisabled]: this.ariaDisabled,
|
|
384
|
-
},
|
|
385
|
-
],
|
|
386
|
-
type: this.typeAttribut,
|
|
387
|
-
tabindex: this.tabindex,
|
|
388
|
-
disabled: this.disabledLocal,
|
|
389
|
-
ariaDisabled: this.ariaDisabled,
|
|
390
|
-
"aria-pressed": this.isSwitchActive,
|
|
391
|
-
isAllRowsSelected: undefined, // TODO: ATable
|
|
392
|
-
onClick: this.onClick,
|
|
393
|
-
...this.attributes,
|
|
394
|
-
...this.attributesToExcludeFromRender,
|
|
395
|
-
}, {
|
|
396
|
-
default: () => [
|
|
397
|
-
(!this.isTitleHtml && this.isTitleVisible) ?
|
|
398
|
-
h(ATranslation, {
|
|
399
|
-
tag: "span",
|
|
400
|
-
alwaysTranslate: this.alwaysTranslate,
|
|
401
|
-
ariaHidden: true,
|
|
402
|
-
class: [
|
|
403
|
-
"a_position_absolute_all",
|
|
404
|
-
this.classDefaultHidden,
|
|
405
|
-
],
|
|
406
|
-
title: this.title,
|
|
407
|
-
extra: this.extra,
|
|
408
|
-
style: {
|
|
409
|
-
zIndex: this.titleZIndex,
|
|
410
|
-
},
|
|
411
|
-
...this.titleAttributes,
|
|
412
|
-
}) :
|
|
413
|
-
"",
|
|
414
|
-
this.isTextOrHtmlScreenReaderVisible ?
|
|
415
|
-
h(ATranslation, {
|
|
416
|
-
alwaysTranslate: this.alwaysTranslate,
|
|
417
|
-
class: [
|
|
418
|
-
"a_sr_only",
|
|
419
|
-
this.classDefaultHidden,
|
|
420
|
-
],
|
|
421
|
-
tag: "span",
|
|
422
|
-
text: this.textScreenReader,
|
|
423
|
-
html: this.htmlScreenReader,
|
|
424
|
-
safeHtml: this.safeHtmlScreenReader,
|
|
425
|
-
extra: this.extra,
|
|
426
|
-
}) :
|
|
427
|
-
"",
|
|
428
|
-
this.$slots.buttonPrepend ?
|
|
429
|
-
this.$slots.buttonPrepend({ extraData: this.extraData }) :
|
|
430
|
-
"",
|
|
431
|
-
this.isLoadingLeft ?
|
|
432
|
-
h(ASpinner, {
|
|
433
|
-
class: [
|
|
434
|
-
"aloha_btn__spinner_left",
|
|
435
|
-
this.loadingClass,
|
|
436
|
-
],
|
|
437
|
-
}) :
|
|
438
|
-
"",
|
|
439
|
-
h(AIcon, {
|
|
440
|
-
icon: this.iconLeft,
|
|
441
|
-
iconTag: this.iconTag,
|
|
442
|
-
class: [
|
|
443
|
-
"aloha_btn__icon_left",
|
|
444
|
-
this.iconClass,
|
|
445
|
-
],
|
|
446
|
-
...this.iconAttributes,
|
|
447
|
-
}),
|
|
448
|
-
this.$slots.default ?
|
|
449
|
-
this.$slots.default({ extraData: this.extraData }) :
|
|
450
|
-
"",
|
|
451
|
-
this.isTextOrHtmlVisible ?
|
|
452
|
-
h(ATranslation, {
|
|
453
|
-
alwaysTranslate: this.alwaysTranslate,
|
|
454
|
-
ariaHidden: this.textAriaHidden,
|
|
455
|
-
class: this.textClass,
|
|
456
|
-
extra: this.extra,
|
|
457
|
-
html: this.html,
|
|
458
|
-
safeHtml: this.safeHtml,
|
|
459
|
-
tag: this.textTag,
|
|
460
|
-
text: this.text,
|
|
461
|
-
textAfter: this.textAfter,
|
|
462
|
-
textBefore: this.textBefore,
|
|
463
|
-
}) :
|
|
464
|
-
"",
|
|
465
|
-
h(AIcon, {
|
|
466
|
-
icon: this.iconRight,
|
|
467
|
-
iconTag: this.iconTag,
|
|
468
|
-
class: [
|
|
469
|
-
"aloha_btn__icon_right",
|
|
470
|
-
this.iconClass,
|
|
471
|
-
],
|
|
472
|
-
...this.iconAttributes,
|
|
473
|
-
}),
|
|
474
|
-
this.isLoadingRight ?
|
|
475
|
-
h(ASpinner, {
|
|
476
|
-
class: [
|
|
477
|
-
"aloha_btn__spinner_right",
|
|
478
|
-
this.loadingClass,
|
|
479
|
-
],
|
|
480
|
-
}) :
|
|
481
|
-
"",
|
|
482
|
-
this.$slots.buttonAppend ?
|
|
483
|
-
this.$slots.buttonAppend({ extraData: this.extraData }) :
|
|
484
|
-
"",
|
|
485
|
-
],
|
|
486
|
-
title: !this.isTitleHtml ||
|
|
487
|
-
(!this.title && !this.$slots.buttonTitle) ?
|
|
488
|
-
() => "" :
|
|
489
|
-
() => {
|
|
490
|
-
return [
|
|
491
|
-
this.isTitleVisible ?
|
|
492
|
-
h(ATranslation, {
|
|
493
|
-
alwaysTranslate: this.alwaysTranslate,
|
|
494
|
-
html: this.title,
|
|
495
|
-
tag: "span",
|
|
496
|
-
extra: this.extra,
|
|
497
|
-
}) :
|
|
498
|
-
"",
|
|
499
|
-
this.$slots.buttonTitle ?
|
|
500
|
-
this.$slots.buttonTitle({ extraData: this.extraData }) :
|
|
501
|
-
"",
|
|
502
|
-
];
|
|
503
|
-
},
|
|
504
|
-
});
|
|
505
|
-
},
|
|
506
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
h,
|
|
3
|
+
} from "vue";
|
|
4
|
+
import {
|
|
5
|
+
AIcon,
|
|
6
|
+
APlacements,
|
|
7
|
+
ASpinner,
|
|
8
|
+
ATranslation,
|
|
9
|
+
} from "../index";
|
|
10
|
+
|
|
11
|
+
import AriaLabelAPI from "../ATranslation/compositionAPI/AriaLabelAPI";
|
|
12
|
+
import AttributesAPI from "./comositionAPI/AttributesAPI";
|
|
13
|
+
import ClickAPI from "./comositionAPI/ClickAPI";
|
|
14
|
+
import ComponentLocalAPI from "./comositionAPI/ComponentLocalAPI";
|
|
15
|
+
import DisabledAPI from "./comositionAPI/DisabledAPI";
|
|
16
|
+
import HtmlTitleAPI from "./comositionAPI/HtmlTitleAPI";
|
|
17
|
+
import LoadingAPI from "./comositionAPI/LoadingAPI";
|
|
18
|
+
import RouterLinkAPI from "./comositionAPI/RouterLinkAPI";
|
|
19
|
+
import SwitchAPI from "./comositionAPI/SwitchAPI";
|
|
20
|
+
import TagAPI from "./comositionAPI/TagAPI";
|
|
21
|
+
import TextAPI from "./comositionAPI/TextAPI";
|
|
22
|
+
import TitleAPI from "./comositionAPI/TitleAPI";
|
|
23
|
+
import UIExcludeRenderAttributesAPI from "../ui/compositionApi/UIExcludeRenderAttributesAPI";
|
|
24
|
+
|
|
25
|
+
import {
|
|
26
|
+
isInteger,
|
|
27
|
+
isString,
|
|
28
|
+
uniqueId,
|
|
29
|
+
} from "lodash-es";
|
|
30
|
+
|
|
31
|
+
export default {
|
|
32
|
+
name: "AElement",
|
|
33
|
+
inheritAttrs: false,
|
|
34
|
+
props: {
|
|
35
|
+
alwaysTranslate: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
required: false,
|
|
38
|
+
},
|
|
39
|
+
ariaDisabled: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
required: false,
|
|
42
|
+
default: undefined,
|
|
43
|
+
},
|
|
44
|
+
ariaLabel: {
|
|
45
|
+
type: [String, Number, Object],
|
|
46
|
+
required: false,
|
|
47
|
+
default: undefined,
|
|
48
|
+
},
|
|
49
|
+
attributes: {
|
|
50
|
+
type: Object,
|
|
51
|
+
required: false,
|
|
52
|
+
default: () => ({}),
|
|
53
|
+
},
|
|
54
|
+
class: {
|
|
55
|
+
type: [String, Object],
|
|
56
|
+
required: false,
|
|
57
|
+
default: undefined,
|
|
58
|
+
},
|
|
59
|
+
classDefault: {
|
|
60
|
+
type: String,
|
|
61
|
+
required: false,
|
|
62
|
+
default: "aloha_element",
|
|
63
|
+
},
|
|
64
|
+
classDefaultHidden: {
|
|
65
|
+
type: String,
|
|
66
|
+
required: false,
|
|
67
|
+
default: "aloha_element__hidden",
|
|
68
|
+
},
|
|
69
|
+
classDisabled: {
|
|
70
|
+
type: String,
|
|
71
|
+
required: false,
|
|
72
|
+
default: "disabled",
|
|
73
|
+
},
|
|
74
|
+
disabled: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
required: false,
|
|
77
|
+
default: undefined,
|
|
78
|
+
},
|
|
79
|
+
excludeRenderAttributes: {
|
|
80
|
+
type: Array,
|
|
81
|
+
required: false,
|
|
82
|
+
default: () => [],
|
|
83
|
+
},
|
|
84
|
+
extra: {
|
|
85
|
+
type: Object,
|
|
86
|
+
required: false,
|
|
87
|
+
default: undefined,
|
|
88
|
+
},
|
|
89
|
+
extraData: {
|
|
90
|
+
type: [String, Number, Boolean, Array, Object, Date, Function, Symbol, null, undefined],
|
|
91
|
+
required: false,
|
|
92
|
+
default: undefined,
|
|
93
|
+
},
|
|
94
|
+
href: {
|
|
95
|
+
type: String,
|
|
96
|
+
required: false,
|
|
97
|
+
default: undefined,
|
|
98
|
+
},
|
|
99
|
+
html: {
|
|
100
|
+
type: [String, Number, Object, Array],
|
|
101
|
+
required: false,
|
|
102
|
+
default: undefined,
|
|
103
|
+
},
|
|
104
|
+
htmlScreenReader: {
|
|
105
|
+
type: [String, Number, Object, Array],
|
|
106
|
+
required: false,
|
|
107
|
+
default: undefined,
|
|
108
|
+
},
|
|
109
|
+
iconAttributes: {
|
|
110
|
+
type: Object,
|
|
111
|
+
required: false,
|
|
112
|
+
default: () => ({}),
|
|
113
|
+
},
|
|
114
|
+
iconClass: {
|
|
115
|
+
type: [String, Object],
|
|
116
|
+
required: false,
|
|
117
|
+
default: undefined,
|
|
118
|
+
},
|
|
119
|
+
iconLeft: {
|
|
120
|
+
type: [String, Object],
|
|
121
|
+
required: false,
|
|
122
|
+
default: undefined,
|
|
123
|
+
},
|
|
124
|
+
iconRight: {
|
|
125
|
+
type: [String, Object],
|
|
126
|
+
required: false,
|
|
127
|
+
default: undefined,
|
|
128
|
+
},
|
|
129
|
+
iconTag: {
|
|
130
|
+
type: String,
|
|
131
|
+
required: false,
|
|
132
|
+
default: undefined,
|
|
133
|
+
},
|
|
134
|
+
id: {
|
|
135
|
+
type: String,
|
|
136
|
+
required: false,
|
|
137
|
+
default: () => uniqueId("a_element_"),
|
|
138
|
+
},
|
|
139
|
+
isSwitch: {
|
|
140
|
+
type: Boolean,
|
|
141
|
+
required: false,
|
|
142
|
+
default: undefined,
|
|
143
|
+
},
|
|
144
|
+
isTitleHtml: {
|
|
145
|
+
type: Boolean,
|
|
146
|
+
required: false,
|
|
147
|
+
default: undefined,
|
|
148
|
+
},
|
|
149
|
+
loading: {
|
|
150
|
+
type: Boolean,
|
|
151
|
+
required: false,
|
|
152
|
+
default: false,
|
|
153
|
+
},
|
|
154
|
+
loadingAlign: {
|
|
155
|
+
type: String,
|
|
156
|
+
required: false,
|
|
157
|
+
default: "right",
|
|
158
|
+
validator: value => ["right", "left"].indexOf(value) !== -1,
|
|
159
|
+
},
|
|
160
|
+
loadingClass: {
|
|
161
|
+
type: [String, Object],
|
|
162
|
+
required: false,
|
|
163
|
+
default: "a_spinner_small",
|
|
164
|
+
},
|
|
165
|
+
modelSwitch: {
|
|
166
|
+
type: Boolean,
|
|
167
|
+
required: false,
|
|
168
|
+
default: undefined,
|
|
169
|
+
},
|
|
170
|
+
prevent: {
|
|
171
|
+
type: Boolean,
|
|
172
|
+
required: false,
|
|
173
|
+
default: undefined,
|
|
174
|
+
},
|
|
175
|
+
safeHtml: {
|
|
176
|
+
type: [String, Number, Object, Array],
|
|
177
|
+
required: false,
|
|
178
|
+
default: undefined,
|
|
179
|
+
},
|
|
180
|
+
safeHtmlScreenReader: {
|
|
181
|
+
type: [String, Number, Object, Array],
|
|
182
|
+
required: false,
|
|
183
|
+
default: undefined,
|
|
184
|
+
},
|
|
185
|
+
stop: {
|
|
186
|
+
type: Boolean,
|
|
187
|
+
required: false,
|
|
188
|
+
default: undefined,
|
|
189
|
+
},
|
|
190
|
+
tabindex: {
|
|
191
|
+
type: [Number, String],
|
|
192
|
+
required: false,
|
|
193
|
+
default: undefined,
|
|
194
|
+
},
|
|
195
|
+
tag: {
|
|
196
|
+
type: String,
|
|
197
|
+
required: false,
|
|
198
|
+
default: undefined,
|
|
199
|
+
},
|
|
200
|
+
target: {
|
|
201
|
+
type: String,
|
|
202
|
+
required: false,
|
|
203
|
+
default: undefined,
|
|
204
|
+
},
|
|
205
|
+
text: {
|
|
206
|
+
type: [String, Number, Object, Array],
|
|
207
|
+
required: false,
|
|
208
|
+
default: undefined,
|
|
209
|
+
},
|
|
210
|
+
textAfter: {
|
|
211
|
+
type: [String, Number, Object],
|
|
212
|
+
required: false,
|
|
213
|
+
default: undefined,
|
|
214
|
+
},
|
|
215
|
+
textAriaHidden: {
|
|
216
|
+
type: Boolean,
|
|
217
|
+
required: false,
|
|
218
|
+
default: undefined,
|
|
219
|
+
},
|
|
220
|
+
textBefore: {
|
|
221
|
+
type: [String, Number, Object],
|
|
222
|
+
required: false,
|
|
223
|
+
default: undefined,
|
|
224
|
+
},
|
|
225
|
+
textClass: {
|
|
226
|
+
type: String,
|
|
227
|
+
required: false,
|
|
228
|
+
default: undefined,
|
|
229
|
+
},
|
|
230
|
+
textScreenReader: {
|
|
231
|
+
type: [String, Number, Object, Array],
|
|
232
|
+
required: false,
|
|
233
|
+
default: undefined,
|
|
234
|
+
},
|
|
235
|
+
textTag: {
|
|
236
|
+
type: String,
|
|
237
|
+
required: false,
|
|
238
|
+
default: "span",
|
|
239
|
+
},
|
|
240
|
+
title: {
|
|
241
|
+
type: [String, Number, Object, Array],
|
|
242
|
+
required: false,
|
|
243
|
+
default: undefined,
|
|
244
|
+
},
|
|
245
|
+
titleAttributes: {
|
|
246
|
+
type: Object,
|
|
247
|
+
required: false,
|
|
248
|
+
default: () => ({}),
|
|
249
|
+
},
|
|
250
|
+
titlePlacement: {
|
|
251
|
+
type: String,
|
|
252
|
+
required: false,
|
|
253
|
+
default: "top",
|
|
254
|
+
validator: placement => APlacements.indexOf(placement) !== -1,
|
|
255
|
+
},
|
|
256
|
+
titleZIndex: {
|
|
257
|
+
type: [Number, String],
|
|
258
|
+
required: false,
|
|
259
|
+
default: "auto",
|
|
260
|
+
validator: value => {
|
|
261
|
+
if (isString(value)) {
|
|
262
|
+
return value === "auto";
|
|
263
|
+
}
|
|
264
|
+
return isInteger(value);
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
to: {
|
|
268
|
+
type: [Object, String],
|
|
269
|
+
required: false,
|
|
270
|
+
default: undefined,
|
|
271
|
+
},
|
|
272
|
+
type: {
|
|
273
|
+
type: String,
|
|
274
|
+
required: true,
|
|
275
|
+
default: "text",
|
|
276
|
+
validator: value => ["button", "submit", "reset", "link", "text"].indexOf(value) !== -1,
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
emits: [
|
|
280
|
+
"click",
|
|
281
|
+
],
|
|
282
|
+
setup(props, context) {
|
|
283
|
+
const {
|
|
284
|
+
attributesToExcludeFromRender,
|
|
285
|
+
} = UIExcludeRenderAttributesAPI(props);
|
|
286
|
+
|
|
287
|
+
const {
|
|
288
|
+
isRouterLink,
|
|
289
|
+
} = RouterLinkAPI(props);
|
|
290
|
+
|
|
291
|
+
const {
|
|
292
|
+
disabledLocal,
|
|
293
|
+
} = DisabledAPI(props);
|
|
294
|
+
|
|
295
|
+
const {
|
|
296
|
+
tagLocal,
|
|
297
|
+
} = TagAPI(props, {
|
|
298
|
+
isRouterLink,
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
const {
|
|
302
|
+
toHrefAttributes,
|
|
303
|
+
typeAttribut,
|
|
304
|
+
} = AttributesAPI(props, {
|
|
305
|
+
isRouterLink,
|
|
306
|
+
tagLocal,
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
const {
|
|
310
|
+
isTitleVisible,
|
|
311
|
+
} = TitleAPI(props);
|
|
312
|
+
|
|
313
|
+
const {
|
|
314
|
+
isLoadingLeft,
|
|
315
|
+
isLoadingRight,
|
|
316
|
+
} = LoadingAPI(props);
|
|
317
|
+
|
|
318
|
+
const {
|
|
319
|
+
isTextOrHtmlVisible,
|
|
320
|
+
isTextOrHtmlScreenReaderVisible,
|
|
321
|
+
} = TextAPI(props);
|
|
322
|
+
|
|
323
|
+
const {
|
|
324
|
+
onClick,
|
|
325
|
+
} = ClickAPI(props, context);
|
|
326
|
+
|
|
327
|
+
const {
|
|
328
|
+
componentLocal,
|
|
329
|
+
} = ComponentLocalAPI(props, {
|
|
330
|
+
tagLocal,
|
|
331
|
+
});
|
|
332
|
+
|
|
333
|
+
const {
|
|
334
|
+
elementRef,
|
|
335
|
+
htmlTitleAttributes,
|
|
336
|
+
} = HtmlTitleAPI(props, {
|
|
337
|
+
tagLocal,
|
|
338
|
+
});
|
|
339
|
+
|
|
340
|
+
const {
|
|
341
|
+
ariaLabelAttributes,
|
|
342
|
+
} = AriaLabelAPI(props);
|
|
343
|
+
|
|
344
|
+
const {
|
|
345
|
+
isSwitchActive,
|
|
346
|
+
switchClass,
|
|
347
|
+
} = SwitchAPI(props);
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
return {
|
|
351
|
+
ariaLabelAttributes,
|
|
352
|
+
attributesToExcludeFromRender,
|
|
353
|
+
componentLocal,
|
|
354
|
+
disabledLocal,
|
|
355
|
+
elementRef,
|
|
356
|
+
htmlTitleAttributes,
|
|
357
|
+
isLoadingLeft,
|
|
358
|
+
isLoadingRight,
|
|
359
|
+
isSwitchActive,
|
|
360
|
+
isTextOrHtmlScreenReaderVisible,
|
|
361
|
+
isTextOrHtmlVisible,
|
|
362
|
+
isTitleVisible,
|
|
363
|
+
onClick,
|
|
364
|
+
switchClass,
|
|
365
|
+
tagLocal,
|
|
366
|
+
toHrefAttributes,
|
|
367
|
+
typeAttribut,
|
|
368
|
+
};
|
|
369
|
+
},
|
|
370
|
+
render() {
|
|
371
|
+
return h(this.componentLocal, {
|
|
372
|
+
...this.$attrs,
|
|
373
|
+
...this.htmlTitleAttributes,
|
|
374
|
+
...this.ariaLabelAttributes,
|
|
375
|
+
...this.toHrefAttributes,
|
|
376
|
+
ref: "elementRef",
|
|
377
|
+
id: this.id,
|
|
378
|
+
class: [
|
|
379
|
+
this.classDefault,
|
|
380
|
+
this.switchClass,
|
|
381
|
+
this.class,
|
|
382
|
+
{
|
|
383
|
+
[this.classDisabled]: this.ariaDisabled,
|
|
384
|
+
},
|
|
385
|
+
],
|
|
386
|
+
type: this.typeAttribut,
|
|
387
|
+
tabindex: this.tabindex,
|
|
388
|
+
disabled: this.disabledLocal,
|
|
389
|
+
ariaDisabled: this.ariaDisabled,
|
|
390
|
+
"aria-pressed": this.isSwitchActive,
|
|
391
|
+
isAllRowsSelected: undefined, // TODO: ATable
|
|
392
|
+
onClick: this.onClick,
|
|
393
|
+
...this.attributes,
|
|
394
|
+
...this.attributesToExcludeFromRender,
|
|
395
|
+
}, {
|
|
396
|
+
default: () => [
|
|
397
|
+
(!this.isTitleHtml && this.isTitleVisible) ?
|
|
398
|
+
h(ATranslation, {
|
|
399
|
+
tag: "span",
|
|
400
|
+
alwaysTranslate: this.alwaysTranslate,
|
|
401
|
+
ariaHidden: true,
|
|
402
|
+
class: [
|
|
403
|
+
"a_position_absolute_all",
|
|
404
|
+
this.classDefaultHidden,
|
|
405
|
+
],
|
|
406
|
+
title: this.title,
|
|
407
|
+
extra: this.extra,
|
|
408
|
+
style: {
|
|
409
|
+
zIndex: this.titleZIndex,
|
|
410
|
+
},
|
|
411
|
+
...this.titleAttributes,
|
|
412
|
+
}) :
|
|
413
|
+
"",
|
|
414
|
+
this.isTextOrHtmlScreenReaderVisible ?
|
|
415
|
+
h(ATranslation, {
|
|
416
|
+
alwaysTranslate: this.alwaysTranslate,
|
|
417
|
+
class: [
|
|
418
|
+
"a_sr_only",
|
|
419
|
+
this.classDefaultHidden,
|
|
420
|
+
],
|
|
421
|
+
tag: "span",
|
|
422
|
+
text: this.textScreenReader,
|
|
423
|
+
html: this.htmlScreenReader,
|
|
424
|
+
safeHtml: this.safeHtmlScreenReader,
|
|
425
|
+
extra: this.extra,
|
|
426
|
+
}) :
|
|
427
|
+
"",
|
|
428
|
+
this.$slots.buttonPrepend ?
|
|
429
|
+
this.$slots.buttonPrepend({ extraData: this.extraData }) :
|
|
430
|
+
"",
|
|
431
|
+
this.isLoadingLeft ?
|
|
432
|
+
h(ASpinner, {
|
|
433
|
+
class: [
|
|
434
|
+
"aloha_btn__spinner_left",
|
|
435
|
+
this.loadingClass,
|
|
436
|
+
],
|
|
437
|
+
}) :
|
|
438
|
+
"",
|
|
439
|
+
h(AIcon, {
|
|
440
|
+
icon: this.iconLeft,
|
|
441
|
+
iconTag: this.iconTag,
|
|
442
|
+
class: [
|
|
443
|
+
"aloha_btn__icon_left",
|
|
444
|
+
this.iconClass,
|
|
445
|
+
],
|
|
446
|
+
...this.iconAttributes,
|
|
447
|
+
}),
|
|
448
|
+
this.$slots.default ?
|
|
449
|
+
this.$slots.default({ extraData: this.extraData }) :
|
|
450
|
+
"",
|
|
451
|
+
this.isTextOrHtmlVisible ?
|
|
452
|
+
h(ATranslation, {
|
|
453
|
+
alwaysTranslate: this.alwaysTranslate,
|
|
454
|
+
ariaHidden: this.textAriaHidden,
|
|
455
|
+
class: this.textClass,
|
|
456
|
+
extra: this.extra,
|
|
457
|
+
html: this.html,
|
|
458
|
+
safeHtml: this.safeHtml,
|
|
459
|
+
tag: this.textTag,
|
|
460
|
+
text: this.text,
|
|
461
|
+
textAfter: this.textAfter,
|
|
462
|
+
textBefore: this.textBefore,
|
|
463
|
+
}) :
|
|
464
|
+
"",
|
|
465
|
+
h(AIcon, {
|
|
466
|
+
icon: this.iconRight,
|
|
467
|
+
iconTag: this.iconTag,
|
|
468
|
+
class: [
|
|
469
|
+
"aloha_btn__icon_right",
|
|
470
|
+
this.iconClass,
|
|
471
|
+
],
|
|
472
|
+
...this.iconAttributes,
|
|
473
|
+
}),
|
|
474
|
+
this.isLoadingRight ?
|
|
475
|
+
h(ASpinner, {
|
|
476
|
+
class: [
|
|
477
|
+
"aloha_btn__spinner_right",
|
|
478
|
+
this.loadingClass,
|
|
479
|
+
],
|
|
480
|
+
}) :
|
|
481
|
+
"",
|
|
482
|
+
this.$slots.buttonAppend ?
|
|
483
|
+
this.$slots.buttonAppend({ extraData: this.extraData }) :
|
|
484
|
+
"",
|
|
485
|
+
],
|
|
486
|
+
title: !this.isTitleHtml ||
|
|
487
|
+
(!this.title && !this.$slots.buttonTitle) ?
|
|
488
|
+
() => "" :
|
|
489
|
+
() => {
|
|
490
|
+
return [
|
|
491
|
+
this.isTitleVisible ?
|
|
492
|
+
h(ATranslation, {
|
|
493
|
+
alwaysTranslate: this.alwaysTranslate,
|
|
494
|
+
html: this.title,
|
|
495
|
+
tag: "span",
|
|
496
|
+
extra: this.extra,
|
|
497
|
+
}) :
|
|
498
|
+
"",
|
|
499
|
+
this.$slots.buttonTitle ?
|
|
500
|
+
this.$slots.buttonTitle({ extraData: this.extraData }) :
|
|
501
|
+
"",
|
|
502
|
+
];
|
|
503
|
+
},
|
|
504
|
+
});
|
|
505
|
+
},
|
|
506
|
+
};
|