aloha-vue 1.2.83 → 1.2.85
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/main.js +0 -6
- package/package.json +1 -1
- package/src/AFilters/AFiltersHorizontal/AFiltersHorizontal.js +9 -6
- package/src/AFilters/AFiltersHorizontal/AFiltersHorizontalFilterUi/compositionAPI/FilterSpecificTypeAPI.js +4 -1
- package/src/APagination/APaginationCountPerPage/APaginationCountPerPage.js +3 -0
- package/src/APagination/APaginationCountPerPage/compositionAPI/LimitAPI.js +12 -0
- package/src/APagination/APaginationPages/APaginationPages.js +15 -0
- package/src/APagination/APaginationPages/compositionAPI/UpdateOffsetAPI.js +52 -0
- package/src/ATable/ATablePreviewDown/ATablePreviewDown.js +26 -1
- package/src/ATable/ATablePreviewDown/compositionAPI/AriaLabelAPI.js +19 -0
- package/src/ATable/ATablePreviewDown/compositionAPI/FocusAPI.js +16 -0
- package/src/ATable/ATablePreviewRight/ATablePreviewRight.js +15 -0
- package/src/ATable/ATablePreviewRight/compositionAPI/AriaLabelAPI.js +19 -0
- package/src/ATable/ATablePreviewRight/compositionAPI/IdAPI.js +20 -0
- package/src/ATable/ATableTd/compositionAPI/AttributesAPI.js +1 -29
- package/src/ATable/ATableTr/compositionAPI/AttributesAPI.js +58 -5
- package/src/ATable/compositionAPI/PreviewAPI.js +17 -0
- package/src/ATable/i18n/de.json +5 -1
- package/src/ATable/i18n/ru.json +5 -1
- package/src/ATable/utils/utils.js +4 -0
- package/src/styles/components/ATable.scss +24 -7
- package/src/styles/components/ui/ADatepickerRange.scss +20 -3
- package/src/styles/components/ui/AInputNumberRange.scss +5 -4
- package/src/ui/ADatepicker/compositionAPI/AttributesAPI.js +1 -1
- package/src/ui/ADatepickerRange/ADatepickerRange.js +67 -59
- package/src/ui/ADatepickerRange/utils/Types.js +14 -0
package/docs/src/main.js
CHANGED
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
AMobilePlugin,
|
|
10
10
|
AModalPlugin,
|
|
11
11
|
ASafeHtml,
|
|
12
|
-
ASelectPlugin,
|
|
13
12
|
} from "../../dist";
|
|
14
13
|
import mainIcons from "./mainIcons";
|
|
15
14
|
|
|
@@ -32,11 +31,6 @@ APP.use(AModalPlugin, {
|
|
|
32
31
|
closeButtonClass: "a_btn a_btn_link",
|
|
33
32
|
},
|
|
34
33
|
});
|
|
35
|
-
APP.use(ASelectPlugin, {
|
|
36
|
-
propsDefault: {
|
|
37
|
-
menuWidthType: "by_content",
|
|
38
|
-
},
|
|
39
|
-
});
|
|
40
34
|
APP.use(AFiltersPlugin, {
|
|
41
35
|
config: {
|
|
42
36
|
headerBottomGroups: [
|
package/package.json
CHANGED
|
@@ -250,9 +250,11 @@ export default {
|
|
|
250
250
|
class: "a_filters_top__footer__select",
|
|
251
251
|
type: "select",
|
|
252
252
|
data: this.filtersHidden,
|
|
253
|
+
keyGroup: "group",
|
|
253
254
|
keyLabel: "label",
|
|
254
255
|
keyId: "id",
|
|
255
256
|
label: "_A_FILTERS_ADD_FILTER_",
|
|
257
|
+
menuWidthType: "by_content",
|
|
256
258
|
translateData: true,
|
|
257
259
|
disabled: !this.filtersHidden.length,
|
|
258
260
|
search: true,
|
|
@@ -275,17 +277,18 @@ export default {
|
|
|
275
277
|
}, [
|
|
276
278
|
h(ASelect, {
|
|
277
279
|
modelValue: this.modelFiltersSaved,
|
|
280
|
+
change: this.changeModelFiltersSaved,
|
|
278
281
|
class: "a_filters_top__save_select",
|
|
279
|
-
type: "select",
|
|
280
282
|
data: this.filtersSaved,
|
|
281
|
-
|
|
283
|
+
deselect: true,
|
|
284
|
+
disabled: !this.filtersSaved.length,
|
|
282
285
|
keyId: "label",
|
|
286
|
+
keyLabel: "label",
|
|
283
287
|
label: "_A_FILTERS_SAVE_SELECT_",
|
|
284
|
-
|
|
285
|
-
disabled: !this.filtersSaved.length,
|
|
288
|
+
menuWidthType: "by_content",
|
|
286
289
|
search: true,
|
|
287
|
-
|
|
288
|
-
|
|
290
|
+
translateData: true,
|
|
291
|
+
type: "select",
|
|
289
292
|
}),
|
|
290
293
|
h(AButton, {
|
|
291
294
|
id: this.buttonSaveComponentId,
|
|
@@ -3,6 +3,9 @@ import {
|
|
|
3
3
|
toRef,
|
|
4
4
|
} from "vue";
|
|
5
5
|
|
|
6
|
+
import {
|
|
7
|
+
typesMapDatepickerRange,
|
|
8
|
+
} from "../../../../ui/ADatepickerRange/utils/Types";
|
|
6
9
|
import {
|
|
7
10
|
typesMapInputNumberRange,
|
|
8
11
|
} from "../../../../ui/AInputNumberRange/utils/Types";
|
|
@@ -15,7 +18,7 @@ export default function FilterSpecificTypeAPI(props) {
|
|
|
15
18
|
|
|
16
19
|
const filterSpecificAttributes = computed(() => {
|
|
17
20
|
const ATTRIBUTES = {};
|
|
18
|
-
if (typesMapInputNumberRange[filter.value.type]) {
|
|
21
|
+
if (typesMapInputNumberRange[filter.value.type] || typesMapDatepickerRange[filter.value.type]) {
|
|
19
22
|
if (isUndefined(filter.value.inputWidth)) {
|
|
20
23
|
ATTRIBUTES.inputWidth = "auto";
|
|
21
24
|
}
|
|
@@ -51,6 +51,7 @@ export default {
|
|
|
51
51
|
const {
|
|
52
52
|
changeLimit,
|
|
53
53
|
changeLimitFromSelect,
|
|
54
|
+
keyDownChangeLimit,
|
|
54
55
|
limitString,
|
|
55
56
|
} = LimitAPI(props, context);
|
|
56
57
|
|
|
@@ -62,6 +63,7 @@ export default {
|
|
|
62
63
|
changeLimit,
|
|
63
64
|
changeLimitFromSelect,
|
|
64
65
|
extraForTranslate,
|
|
66
|
+
keyDownChangeLimit,
|
|
65
67
|
limitString,
|
|
66
68
|
};
|
|
67
69
|
},
|
|
@@ -136,6 +138,7 @@ export default {
|
|
|
136
138
|
textScreenReader: "_A_COUNT_PER_PAGE_ITEM_{{count}}_",
|
|
137
139
|
title: "_A_COUNT_PER_PAGE_ITEM_{{count}}_",
|
|
138
140
|
onClick: () => this.changeLimit(count),
|
|
141
|
+
onKeydown: $event => this.keyDownChangeLimit($event, count),
|
|
139
142
|
}),
|
|
140
143
|
]);
|
|
141
144
|
}),
|
|
@@ -3,6 +3,8 @@ import {
|
|
|
3
3
|
toRef,
|
|
4
4
|
} from "vue";
|
|
5
5
|
|
|
6
|
+
import AKeysCode from "../../../const/AKeysCode";
|
|
7
|
+
|
|
6
8
|
export default function LimitAPI(props, { emit }) {
|
|
7
9
|
const isLoadingTable = toRef(props, "isLoadingTable");
|
|
8
10
|
const limit = toRef(props, "limit");
|
|
@@ -22,9 +24,19 @@ export default function LimitAPI(props, { emit }) {
|
|
|
22
24
|
changeLimit(model);
|
|
23
25
|
};
|
|
24
26
|
|
|
27
|
+
const keyDownChangeLimit = ($event, limit) => {
|
|
28
|
+
if ($event.keyCode === AKeysCode.enter ||
|
|
29
|
+
$event.keyCode === AKeysCode.space) {
|
|
30
|
+
changeLimit(limit);
|
|
31
|
+
$event.stopPropagation();
|
|
32
|
+
$event.preventDefault();
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
25
36
|
return {
|
|
26
37
|
changeLimit,
|
|
27
38
|
changeLimitFromSelect,
|
|
39
|
+
keyDownChangeLimit,
|
|
28
40
|
limitString,
|
|
29
41
|
};
|
|
30
42
|
}
|
|
@@ -64,6 +64,11 @@ export default {
|
|
|
64
64
|
});
|
|
65
65
|
|
|
66
66
|
const {
|
|
67
|
+
keyDownUpdateOffset,
|
|
68
|
+
keyDownUpdateOffsetFirst,
|
|
69
|
+
keyDownUpdateOffsetLast,
|
|
70
|
+
keyDownUpdateOffsetNext,
|
|
71
|
+
keyDownUpdateOffsetPrevious,
|
|
67
72
|
updateOffset,
|
|
68
73
|
updateOffsetFirst,
|
|
69
74
|
updateOffsetLast,
|
|
@@ -80,6 +85,11 @@ export default {
|
|
|
80
85
|
currentItem,
|
|
81
86
|
disabledButtonFirstPage,
|
|
82
87
|
disabledButtonLastPage,
|
|
88
|
+
keyDownUpdateOffset,
|
|
89
|
+
keyDownUpdateOffsetFirst,
|
|
90
|
+
keyDownUpdateOffsetLast,
|
|
91
|
+
keyDownUpdateOffsetNext,
|
|
92
|
+
keyDownUpdateOffsetPrevious,
|
|
83
93
|
maxItems,
|
|
84
94
|
paginationItems,
|
|
85
95
|
updateOffset,
|
|
@@ -117,6 +127,7 @@ export default {
|
|
|
117
127
|
title: "_A_PAGINATION_FIRST_PAGE_",
|
|
118
128
|
iconLeft: "DoubleAngleLeft",
|
|
119
129
|
onClick: this.updateOffsetFirst,
|
|
130
|
+
onKeydown: this.keyDownUpdateOffsetFirst,
|
|
120
131
|
}),
|
|
121
132
|
]),
|
|
122
133
|
h("li", {
|
|
@@ -130,6 +141,7 @@ export default {
|
|
|
130
141
|
title: "_A_PAGINATION_PREVIOUS_PAGE_",
|
|
131
142
|
iconLeft: "AngleLeft",
|
|
132
143
|
onClick: this.updateOffsetPrevious,
|
|
144
|
+
onKeydown: this.keyDownUpdateOffsetPrevious,
|
|
133
145
|
}),
|
|
134
146
|
]),
|
|
135
147
|
this.mode === "short" ?
|
|
@@ -167,6 +179,7 @@ export default {
|
|
|
167
179
|
textAriaHidden: true,
|
|
168
180
|
title: "_A_PAGINATION_TO_PAGE_{{page}}_",
|
|
169
181
|
onClick: () => this.updateOffset(item),
|
|
182
|
+
onKeydown: $event => this.keyDownUpdateOffset($event, item),
|
|
170
183
|
}),
|
|
171
184
|
]);
|
|
172
185
|
}),
|
|
@@ -181,6 +194,7 @@ export default {
|
|
|
181
194
|
title: "_A_PAGINATION_NEXT_PAGE_",
|
|
182
195
|
iconLeft: "AngleRight",
|
|
183
196
|
onClick: this.updateOffsetNext,
|
|
197
|
+
onKeydown: this.keyDownUpdateOffsetNext,
|
|
184
198
|
}),
|
|
185
199
|
]),
|
|
186
200
|
h("li", {
|
|
@@ -194,6 +208,7 @@ export default {
|
|
|
194
208
|
title: "_A_PAGINATION_LAST_PAGE_",
|
|
195
209
|
iconLeft: "DoubleAngleRight",
|
|
196
210
|
onClick: this.updateOffsetLast,
|
|
211
|
+
onKeydown: this.keyDownUpdateOffsetLast,
|
|
197
212
|
}),
|
|
198
213
|
]),
|
|
199
214
|
]),
|
|
@@ -3,6 +3,8 @@ import {
|
|
|
3
3
|
toRef,
|
|
4
4
|
} from "vue";
|
|
5
5
|
|
|
6
|
+
import AKeysCode from "../../../const/AKeysCode";
|
|
7
|
+
|
|
6
8
|
export default function UpdateOffsetAPI(props, { emit }, {
|
|
7
9
|
currentItem = computed(() => 1),
|
|
8
10
|
disabledButtonFirstPage = computed(() => false),
|
|
@@ -49,7 +51,57 @@ export default function UpdateOffsetAPI(props, { emit }, {
|
|
|
49
51
|
emit("update:offset", offset.value + limit.value);
|
|
50
52
|
};
|
|
51
53
|
|
|
54
|
+
const keyDownUpdateOffsetFirst = $event => {
|
|
55
|
+
if ($event.keyCode === AKeysCode.enter ||
|
|
56
|
+
$event.keyCode === AKeysCode.space) {
|
|
57
|
+
updateOffsetFirst();
|
|
58
|
+
$event.stopPropagation();
|
|
59
|
+
$event.preventDefault();
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const keyDownUpdateOffset = ($event, item) => {
|
|
64
|
+
if ($event.keyCode === AKeysCode.enter ||
|
|
65
|
+
$event.keyCode === AKeysCode.space) {
|
|
66
|
+
updateOffset(item);
|
|
67
|
+
$event.stopPropagation();
|
|
68
|
+
$event.preventDefault();
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const keyDownUpdateOffsetPrevious = $event => {
|
|
73
|
+
if ($event.keyCode === AKeysCode.enter ||
|
|
74
|
+
$event.keyCode === AKeysCode.space) {
|
|
75
|
+
updateOffsetPrevious();
|
|
76
|
+
$event.stopPropagation();
|
|
77
|
+
$event.preventDefault();
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const keyDownUpdateOffsetLast = $event => {
|
|
82
|
+
if ($event.keyCode === AKeysCode.enter ||
|
|
83
|
+
$event.keyCode === AKeysCode.space) {
|
|
84
|
+
updateOffsetLast();
|
|
85
|
+
$event.stopPropagation();
|
|
86
|
+
$event.preventDefault();
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const keyDownUpdateOffsetNext = $event => {
|
|
91
|
+
if ($event.keyCode === AKeysCode.enter ||
|
|
92
|
+
$event.keyCode === AKeysCode.space) {
|
|
93
|
+
updateOffsetNext();
|
|
94
|
+
$event.stopPropagation();
|
|
95
|
+
$event.preventDefault();
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
52
99
|
return {
|
|
100
|
+
keyDownUpdateOffset,
|
|
101
|
+
keyDownUpdateOffsetFirst,
|
|
102
|
+
keyDownUpdateOffsetLast,
|
|
103
|
+
keyDownUpdateOffsetNext,
|
|
104
|
+
keyDownUpdateOffsetPrevious,
|
|
53
105
|
updateOffset,
|
|
54
106
|
updateOffsetFirst,
|
|
55
107
|
updateOffsetLast,
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
h,
|
|
2
|
+
h, onMounted,
|
|
3
3
|
} from "vue";
|
|
4
4
|
|
|
5
5
|
import AButton from "../../AButton/AButton";
|
|
6
6
|
|
|
7
|
+
import AriaLabelAPI from "./compositionAPI/AriaLabelAPI";
|
|
8
|
+
import FocusAPI from "./compositionAPI/FocusAPI";
|
|
9
|
+
|
|
7
10
|
export default {
|
|
8
11
|
name: "ATablePreviewDown",
|
|
9
12
|
props: {
|
|
@@ -19,9 +22,31 @@ export default {
|
|
|
19
22
|
inject: [
|
|
20
23
|
"onTogglePreview",
|
|
21
24
|
],
|
|
25
|
+
setup() {
|
|
26
|
+
const {
|
|
27
|
+
previewAriaLabel,
|
|
28
|
+
} = AriaLabelAPI();
|
|
29
|
+
|
|
30
|
+
const {
|
|
31
|
+
componentRef,
|
|
32
|
+
setFocusToComponent,
|
|
33
|
+
} = FocusAPI();
|
|
34
|
+
|
|
35
|
+
onMounted(() => {
|
|
36
|
+
setFocusToComponent();
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
componentRef,
|
|
41
|
+
previewAriaLabel,
|
|
42
|
+
};
|
|
43
|
+
},
|
|
22
44
|
render() {
|
|
23
45
|
return h("div", {
|
|
46
|
+
ref: "componentRef",
|
|
24
47
|
class: "a_table__preview_down",
|
|
48
|
+
tabindex: -1,
|
|
49
|
+
"aria-label": this.previewAriaLabel,
|
|
25
50
|
}, [
|
|
26
51
|
this.$slots.previewDown && this.$slots.previewDown({
|
|
27
52
|
row: this.row,
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computed,
|
|
3
|
+
} from "vue";
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
getTranslatedText,
|
|
7
|
+
} from "../../../ATranslation/compositionAPI/UtilsAPI";
|
|
8
|
+
|
|
9
|
+
export default function AriaLabelAPI() {
|
|
10
|
+
const previewAriaLabel = computed(() => {
|
|
11
|
+
return getTranslatedText({
|
|
12
|
+
placeholder: "_A_TABLE_PREVIEW_DOWN_ARIA_LABEL_",
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
return {
|
|
17
|
+
previewAriaLabel,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ref,
|
|
3
|
+
} from "vue";
|
|
4
|
+
|
|
5
|
+
export default function FocusAPI() {
|
|
6
|
+
const componentRef = ref(undefined);
|
|
7
|
+
|
|
8
|
+
const setFocusToComponent = () => {
|
|
9
|
+
componentRef.value?.focus();
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
return {
|
|
13
|
+
componentRef,
|
|
14
|
+
setFocusToComponent,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -9,7 +9,9 @@ import ACloak from "../../ACloak/ACloak";
|
|
|
9
9
|
import AResizer from "../../AResizer/AResizer";
|
|
10
10
|
import ATranslation from "../../ATranslation/ATranslation";
|
|
11
11
|
|
|
12
|
+
import AriaLabelAPI from "./compositionAPI/AriaLabelAPI";
|
|
12
13
|
import ArrowsAPI from "./compositionAPI/ArrowsAPI";
|
|
14
|
+
import IdAPI from "./compositionAPI/IdAPI";
|
|
13
15
|
import MouseEventsAPI from "./compositionAPI/MouseEventsAPI";
|
|
14
16
|
import PreviewRightRewAPI from "../compositionAPI/PreviewRightRewAPI";
|
|
15
17
|
import RowAPI from "./compositionAPI/RowAPI";
|
|
@@ -74,6 +76,14 @@ export default {
|
|
|
74
76
|
previewRef,
|
|
75
77
|
} = PreviewRightRewAPI();
|
|
76
78
|
|
|
79
|
+
const {
|
|
80
|
+
idLocal,
|
|
81
|
+
} = IdAPI();
|
|
82
|
+
|
|
83
|
+
const {
|
|
84
|
+
previewAriaLabel,
|
|
85
|
+
} = AriaLabelAPI();
|
|
86
|
+
|
|
77
87
|
const {
|
|
78
88
|
mousedown,
|
|
79
89
|
mousemove,
|
|
@@ -117,9 +127,11 @@ export default {
|
|
|
117
127
|
currentRow,
|
|
118
128
|
disabledBtnArrowLeft,
|
|
119
129
|
disabledBtnArrowRight,
|
|
130
|
+
idLocal,
|
|
120
131
|
mousedown,
|
|
121
132
|
mousemove,
|
|
122
133
|
mouseup,
|
|
134
|
+
previewAriaLabel,
|
|
123
135
|
previewRef,
|
|
124
136
|
rowNumber,
|
|
125
137
|
rowNumberFormatted,
|
|
@@ -130,8 +142,11 @@ export default {
|
|
|
130
142
|
render() {
|
|
131
143
|
return h("div", {
|
|
132
144
|
ref: "previewRef",
|
|
145
|
+
id: this.idLocal,
|
|
146
|
+
"aria-label": this.previewAriaLabel,
|
|
133
147
|
class: "a_table__preview_right",
|
|
134
148
|
style: this.previewStyles,
|
|
149
|
+
tabindex: -1,
|
|
135
150
|
}, [
|
|
136
151
|
h(AResizer, {
|
|
137
152
|
class: "a_table__preview_right__resizer",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computed,
|
|
3
|
+
} from "vue";
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
getTranslatedText,
|
|
7
|
+
} from "../../../ATranslation/compositionAPI/UtilsAPI";
|
|
8
|
+
|
|
9
|
+
export default function AriaLabelAPI() {
|
|
10
|
+
const previewAriaLabel = computed(() => {
|
|
11
|
+
return getTranslatedText({
|
|
12
|
+
placeholder: "_A_TABLE_PREVIEW_RIGHT_ARIA_LABEL_",
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
return {
|
|
17
|
+
previewAriaLabel,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computed,
|
|
3
|
+
inject,
|
|
4
|
+
} from "vue";
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
getPreviewRightId,
|
|
8
|
+
} from "../../utils/utils";
|
|
9
|
+
|
|
10
|
+
export default function IdAPI() {
|
|
11
|
+
const tableId = inject("tableId");
|
|
12
|
+
|
|
13
|
+
const idLocal = computed(() => {
|
|
14
|
+
return getPreviewRightId({ tableId: tableId.value });
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
return {
|
|
18
|
+
idLocal,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -6,20 +6,12 @@ import {
|
|
|
6
6
|
|
|
7
7
|
import ColumnStylesAPI from "../../compositionAPI/ColumnStylesAPI";
|
|
8
8
|
|
|
9
|
-
import {
|
|
10
|
-
isClickTags,
|
|
11
|
-
} from "../../utils/utils";
|
|
12
|
-
|
|
13
9
|
export default function AttributesAPI(props) {
|
|
14
10
|
const column = toRef(props, "column");
|
|
15
|
-
const disabledPreview = toRef(props, "disabledPreview");
|
|
16
11
|
const isFooter = toRef(props, "isFooter");
|
|
17
|
-
const row = toRef(props, "row");
|
|
18
|
-
const rowIndex = toRef(props, "rowIndex");
|
|
19
12
|
|
|
20
13
|
const hasPreview = inject("hasPreview");
|
|
21
14
|
const isMobile = inject("isMobile");
|
|
22
|
-
const onTogglePreview = inject("onTogglePreview");
|
|
23
15
|
|
|
24
16
|
const {
|
|
25
17
|
columnsStyles,
|
|
@@ -39,27 +31,7 @@ export default function AttributesAPI(props) {
|
|
|
39
31
|
if (!isMobile.value) {
|
|
40
32
|
ATTRIBUTES.role = "cell";
|
|
41
33
|
}
|
|
42
|
-
|
|
43
|
-
ATTRIBUTES.onClick = $event => {
|
|
44
|
-
if (disabledPreview.value) {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
if (isClickTags({
|
|
48
|
-
$event,
|
|
49
|
-
tagsName: [
|
|
50
|
-
"A",
|
|
51
|
-
"BUTTON",
|
|
52
|
-
],
|
|
53
|
-
classStop: "a_table__td",
|
|
54
|
-
})) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
onTogglePreview({
|
|
58
|
-
row: row.value,
|
|
59
|
-
rowIndex: rowIndex.value,
|
|
60
|
-
});
|
|
61
|
-
};
|
|
62
|
-
}
|
|
34
|
+
|
|
63
35
|
return ATTRIBUTES;
|
|
64
36
|
});
|
|
65
37
|
|
|
@@ -3,9 +3,20 @@ import {
|
|
|
3
3
|
inject,
|
|
4
4
|
toRef,
|
|
5
5
|
} from "vue";
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
import AKeysCode from "../../../const/AKeysCode";
|
|
8
|
+
import {
|
|
9
|
+
isClickTags,
|
|
10
|
+
} from "../../utils/utils";
|
|
11
|
+
import {
|
|
12
|
+
getTranslatedText,
|
|
13
|
+
} from "../../../ATranslation/compositionAPI/UtilsAPI";
|
|
14
|
+
import {
|
|
15
|
+
isFunction,
|
|
16
|
+
} from "lodash-es";
|
|
7
17
|
|
|
8
18
|
export default function AttributesAPI(props) {
|
|
19
|
+
const disabledPreview = toRef(props, "disabledPreview");
|
|
9
20
|
const isFooter = toRef(props, "isFooter");
|
|
10
21
|
const row = toRef(props, "row");
|
|
11
22
|
const rowClass = toRef(props, "rowClass");
|
|
@@ -13,6 +24,7 @@ export default function AttributesAPI(props) {
|
|
|
13
24
|
|
|
14
25
|
const hasPreview = inject("hasPreview");
|
|
15
26
|
const isMobile = inject("isMobile");
|
|
27
|
+
const onTogglePreview = inject("onTogglePreview");
|
|
16
28
|
const previewRightRowIndex = inject("previewRightRowIndex");
|
|
17
29
|
const previewRightRowIndexLast = inject("previewRightRowIndexLast");
|
|
18
30
|
const tableId = inject("tableId");
|
|
@@ -45,8 +57,8 @@ export default function AttributesAPI(props) {
|
|
|
45
57
|
return [
|
|
46
58
|
"a_table__row a_table__row_hover",
|
|
47
59
|
{
|
|
48
|
-
|
|
49
|
-
|
|
60
|
+
a_table__row_preview_open: isPreviewRightForCurrentRowOpen.value,
|
|
61
|
+
a_table__row_preview_was_open: isPreviewRightForCurrentRowWasOpen.value,
|
|
50
62
|
},
|
|
51
63
|
rowClassLocal.value
|
|
52
64
|
];
|
|
@@ -56,14 +68,55 @@ export default function AttributesAPI(props) {
|
|
|
56
68
|
return isMobile.value ? "listitem" : "row";
|
|
57
69
|
});
|
|
58
70
|
|
|
71
|
+
const previewAriaLabel = computed(() => {
|
|
72
|
+
return getTranslatedText({
|
|
73
|
+
placeholder: isPreviewRightForCurrentRowOpen.value ?
|
|
74
|
+
"_A_TABLE_ROW_PREVIEW_CLOSE_" :
|
|
75
|
+
"_A_TABLE_ROW_PREVIEW_OPEN_",
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
const onClickRow = $event => {
|
|
80
|
+
if (disabledPreview.value) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (isClickTags({
|
|
84
|
+
$event,
|
|
85
|
+
tagsName: [
|
|
86
|
+
"A",
|
|
87
|
+
"BUTTON",
|
|
88
|
+
],
|
|
89
|
+
classStop: "a_table__row",
|
|
90
|
+
})) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
$event.stopPropagation();
|
|
95
|
+
$event.preventDefault();
|
|
96
|
+
|
|
97
|
+
onTogglePreview({
|
|
98
|
+
row: row.value,
|
|
99
|
+
rowIndex: rowIndex.value,
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
const onKeydownRow = $event => {
|
|
104
|
+
if ($event.keyCode === AKeysCode.enter) {
|
|
105
|
+
onClickRow($event);
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
|
|
59
109
|
const rowAttributes = computed(() => {
|
|
60
110
|
const ATTRIBUTES = {
|
|
61
111
|
id: rowId.value,
|
|
62
112
|
class: rowClassComputed.value,
|
|
63
113
|
role: roleLocal.value,
|
|
64
114
|
};
|
|
65
|
-
if (hasPreview.value) {
|
|
66
|
-
ATTRIBUTES.tabindex =
|
|
115
|
+
if (hasPreview.value && !isFooter.value) {
|
|
116
|
+
ATTRIBUTES.tabindex = 0;
|
|
117
|
+
ATTRIBUTES["aria-label"] = previewAriaLabel.value;
|
|
118
|
+
ATTRIBUTES.onClick = onClickRow;
|
|
119
|
+
ATTRIBUTES.onKeydown = onKeydownRow;
|
|
67
120
|
}
|
|
68
121
|
return ATTRIBUTES;
|
|
69
122
|
});
|
|
@@ -10,6 +10,9 @@ import PreviewRightResizeAPI from "./PreviewRightResizeAPI";
|
|
|
10
10
|
import {
|
|
11
11
|
setFocusToElement,
|
|
12
12
|
} from "../../utils/utilsDOM";
|
|
13
|
+
import {
|
|
14
|
+
getPreviewRightId,
|
|
15
|
+
} from "../utils/utils";
|
|
13
16
|
import {
|
|
14
17
|
isNil,
|
|
15
18
|
isUndefined,
|
|
@@ -50,6 +53,13 @@ export default function PreviewAPI(props, context, {
|
|
|
50
53
|
});
|
|
51
54
|
};
|
|
52
55
|
|
|
56
|
+
const setFocusToPreviewRight = () => {
|
|
57
|
+
setTimeout(() => {
|
|
58
|
+
const PREVIEW_ID = `#${ getPreviewRightId({ tableId: tableId.value }) }`;
|
|
59
|
+
setFocusToElement({ selector: PREVIEW_ID });
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
|
|
53
63
|
const isPreviewRight = computed(() => {
|
|
54
64
|
return preview.value === "right";
|
|
55
65
|
});
|
|
@@ -58,6 +68,7 @@ export default function PreviewAPI(props, context, {
|
|
|
58
68
|
const isPreviewRightOpen = computed(() => {
|
|
59
69
|
return !isNil(previewRightRowIndex.value);
|
|
60
70
|
});
|
|
71
|
+
|
|
61
72
|
const closePreviewRight = () => {
|
|
62
73
|
setFocusToRow({
|
|
63
74
|
rowIndex: previewRightRowIndex.value,
|
|
@@ -71,6 +82,7 @@ export default function PreviewAPI(props, context, {
|
|
|
71
82
|
previewRightRowIndex.value = undefined;
|
|
72
83
|
removeEventListenerWindowResize();
|
|
73
84
|
};
|
|
85
|
+
|
|
74
86
|
const closePreviewRightAll = () => {
|
|
75
87
|
emit("togglePreview", {
|
|
76
88
|
row: rowsLocalAll.value[previewRightRowIndex.value],
|
|
@@ -85,10 +97,13 @@ export default function PreviewAPI(props, context, {
|
|
|
85
97
|
const isPreviewDown = computed(() => {
|
|
86
98
|
return preview.value === "down";
|
|
87
99
|
});
|
|
100
|
+
|
|
88
101
|
const previewDownRowIndexes = ref({});
|
|
102
|
+
|
|
89
103
|
const closePreviewDown = ({ rowIndex }) => {
|
|
90
104
|
previewDownRowIndexes.value[rowIndex] = undefined;
|
|
91
105
|
};
|
|
106
|
+
|
|
92
107
|
const closePreviewDownAll = () => {
|
|
93
108
|
previewDownRowIndexes.value = {};
|
|
94
109
|
};
|
|
@@ -122,6 +137,8 @@ export default function PreviewAPI(props, context, {
|
|
|
122
137
|
});
|
|
123
138
|
previewRightRowIndex.value = rowIndex;
|
|
124
139
|
previewRightRowIndexLast.value = undefined;
|
|
140
|
+
|
|
141
|
+
setFocusToPreviewRight();
|
|
125
142
|
};
|
|
126
143
|
|
|
127
144
|
const onTogglePreviewRight = ({ rowIndex }) => {
|
package/src/ATable/i18n/de.json
CHANGED
|
@@ -31,5 +31,9 @@
|
|
|
31
31
|
"_A_TABLE_OPTIONS_BTN_EYE_TITLE_": "Spalte ausblenden",
|
|
32
32
|
"_A_TABLE_OPTIONS_BTN_EYE_CLOSED_TITLE_": "Spalte einblenden",
|
|
33
33
|
"_A_TABLE_OPTIONS_BTN_ARROW_UP_TITLE_": "Spalte nach links verschieben",
|
|
34
|
-
"_A_TABLE_OPTIONS_BTN_ARROW_DOWN_TITLE_": "Spalte nach rechts verschieben"
|
|
34
|
+
"_A_TABLE_OPTIONS_BTN_ARROW_DOWN_TITLE_": "Spalte nach rechts verschieben",
|
|
35
|
+
"_A_TABLE_ROW_PREVIEW_CLOSE_": "Vorschau der Zeile schließen",
|
|
36
|
+
"_A_TABLE_ROW_PREVIEW_OPEN_": "Vorschau der Zeile öffnen",
|
|
37
|
+
"_A_TABLE_PREVIEW_DOWN_ARIA_LABEL_": "Vorschau der Zeile",
|
|
38
|
+
"_A_TABLE_PREVIEW_RIGHT_ARIA_LABEL_": "Vorschau der Zeile"
|
|
35
39
|
}
|
package/src/ATable/i18n/ru.json
CHANGED
|
@@ -31,5 +31,9 @@
|
|
|
31
31
|
"_A_TABLE_OPTIONS_BTN_EYE_TITLE_": "Скрыть столбец",
|
|
32
32
|
"_A_TABLE_OPTIONS_BTN_EYE_CLOSED_TITLE_": "Показать столбец",
|
|
33
33
|
"_A_TABLE_OPTIONS_BTN_ARROW_UP_TITLE_": "Передвинуть столбец влево",
|
|
34
|
-
"_A_TABLE_OPTIONS_BTN_ARROW_DOWN_TITLE_": "Передвинуть столбец вправо"
|
|
34
|
+
"_A_TABLE_OPTIONS_BTN_ARROW_DOWN_TITLE_": "Передвинуть столбец вправо",
|
|
35
|
+
"_A_TABLE_ROW_PREVIEW_CLOSE_": "Закрыть предпросмотр строки",
|
|
36
|
+
"_A_TABLE_ROW_PREVIEW_OPEN_": "Открыть предпросмотр строки",
|
|
37
|
+
"_A_TABLE_PREVIEW_DOWN_ARIA_LABEL_": "Предпросмотр строки",
|
|
38
|
+
"_A_TABLE_PREVIEW_RIGHT_ARIA_LABEL_": "Предпросмотр строки"
|
|
35
39
|
}
|
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
--a_table_row_border_bottom_width: 2px;
|
|
10
10
|
--a_table_row_border_bottom_color: var(--a_color_gray_500);
|
|
11
11
|
--a_table_row_hover_bg: #e1f2ff;
|
|
12
|
-
--
|
|
13
|
-
--
|
|
12
|
+
--a_table_row_focus_shadow_size: inset 0 0 1px 3px;
|
|
13
|
+
--a_table_row_focus_shadow_color: var(--a_color_focus);
|
|
14
|
+
--a_table_row_preview_open_bg: #D0DD98;
|
|
15
|
+
--a_table_row_preview_was_open_bg: #ECF1D5;
|
|
14
16
|
--a_table_td_border_left_width: 2px;
|
|
15
17
|
--a_table_td_border_left_color: var(--a_color_gray_200);
|
|
16
18
|
--a_table_cell_padding_x: .5rem;
|
|
@@ -37,7 +39,7 @@
|
|
|
37
39
|
--a_table_multiple_bg: var(--a_color_gray_100, #fff);
|
|
38
40
|
--a_table_multiple_header_text_font_size: 1rem;
|
|
39
41
|
--a_table_multiple_items_selected_border: 1px solid var(-a_table_row_preview_focus_bg);
|
|
40
|
-
--a_table_multiple_items_selected_bg: var(--
|
|
42
|
+
--a_table_multiple_items_selected_bg: var(--a_table_row_preview_was_open_bg);
|
|
41
43
|
--a_table_sort_sequence_num_bg: var(--a_color_primary);
|
|
42
44
|
--a_table_sort_sequence_num_color: var(--a_color_white);
|
|
43
45
|
|
|
@@ -103,6 +105,10 @@
|
|
|
103
105
|
display: flex;
|
|
104
106
|
border-bottom: var(--a_table_row_border_bottom_width) solid var(--a_table_row_border_bottom_color);
|
|
105
107
|
background-color: var(--a_table_bg);
|
|
108
|
+
&:focus {
|
|
109
|
+
outline: none;
|
|
110
|
+
box-shadow: var(--a_table_row_focus_shadow_size) var(--a_table_row_focus_shadow_color);
|
|
111
|
+
}
|
|
106
112
|
}
|
|
107
113
|
.a_table__head__row {
|
|
108
114
|
background-color: var(--a_table_th_bg);
|
|
@@ -182,6 +188,9 @@
|
|
|
182
188
|
.a_dropdown__item_text {
|
|
183
189
|
color: var(--a_color_gray_600);
|
|
184
190
|
}
|
|
191
|
+
.a_table__th__dropdown_item__icon_btn {
|
|
192
|
+
color: var(--a_color_gray_600);
|
|
193
|
+
}
|
|
185
194
|
}
|
|
186
195
|
|
|
187
196
|
.a_table__th__dropdown__li_over {
|
|
@@ -231,11 +240,11 @@
|
|
|
231
240
|
.a_table__row_hover:focus-within {
|
|
232
241
|
background-color: var(--a_table_row_hover_bg);
|
|
233
242
|
}
|
|
234
|
-
.a_table__row.
|
|
235
|
-
background-color: var(--
|
|
243
|
+
.a_table__row.a_table__row_preview_open {
|
|
244
|
+
background-color: var(--a_table_row_preview_open_bg);
|
|
236
245
|
}
|
|
237
|
-
.a_table__row.
|
|
238
|
-
background-color: var(--
|
|
246
|
+
.a_table__row.a_table__row_preview_was_open {
|
|
247
|
+
background-color: var(--a_table_row_preview_was_open_bg);
|
|
239
248
|
}
|
|
240
249
|
}
|
|
241
250
|
.a_table__td {
|
|
@@ -421,6 +430,10 @@
|
|
|
421
430
|
border-width: var(--a_table_preview_right_border_width);
|
|
422
431
|
border-style: solid;
|
|
423
432
|
border-color: var(--a_table_preview_right_border_color);
|
|
433
|
+
|
|
434
|
+
&:focus {
|
|
435
|
+
box-shadow: var(--a_table_row_focus_shadow_size) var(--a_table_row_focus_shadow_color);
|
|
436
|
+
}
|
|
424
437
|
}
|
|
425
438
|
.a_table__preview_right__header {
|
|
426
439
|
background-color: var(--a_table_preview_right_header_bg);
|
|
@@ -532,6 +545,10 @@
|
|
|
532
545
|
padding: var(--a_table_preview_down_padding_y) var(--a_table_preview_down_padding_left) var(--a_table_preview_down_padding_y) var(--a_table_preview_down_padding_left);
|
|
533
546
|
position: relative;
|
|
534
547
|
min-height: 50px;
|
|
548
|
+
|
|
549
|
+
&:focus {
|
|
550
|
+
box-shadow: var(--a_table_row_focus_shadow_size) var(--a_table_row_focus_shadow_color);
|
|
551
|
+
}
|
|
535
552
|
.a_table__preview_down__btn_close {
|
|
536
553
|
line-height: 1;
|
|
537
554
|
padding: 0;
|
|
@@ -1,20 +1,37 @@
|
|
|
1
1
|
.a_datepicker_range {
|
|
2
|
+
--a_input_datepicker_range_width: 100%;
|
|
3
|
+
--a_input_datepicker_range_max_width: 100%;
|
|
4
|
+
--a_input_datepicker_range_min_width: 100px;
|
|
5
|
+
|
|
2
6
|
--a_datepicker_range_label_padding_right: .5rem;
|
|
3
|
-
--
|
|
7
|
+
--a_datepicker_range_label_max_margin_left: 6px;
|
|
4
8
|
--a_datepicker_range_label_white_space: nowrap;
|
|
9
|
+
|
|
10
|
+
.a_form_element {
|
|
11
|
+
width: var(--a_input_datepicker_range_width);
|
|
12
|
+
max-width: var(--a_input_datepicker_range_max_width);
|
|
13
|
+
min-width: var(--a_input_datepicker_range_min_width);
|
|
14
|
+
}
|
|
5
15
|
}
|
|
6
16
|
.a_datepicker_range__content {
|
|
7
17
|
display: flex;
|
|
8
18
|
align-items: center;
|
|
19
|
+
flex-wrap: wrap;
|
|
20
|
+
row-gap: .5rem;
|
|
21
|
+
}
|
|
22
|
+
.a_datepicker_range__group {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
flex-basis: 50%;
|
|
9
26
|
}
|
|
10
27
|
.a_datepicker_range__label {
|
|
11
28
|
margin-right: var(--a_datepicker_range_label_padding_right);
|
|
12
29
|
white-space: var(--a_datepicker_range_label_white_space);
|
|
13
30
|
}
|
|
14
31
|
.a_datepicker_range__label_max {
|
|
15
|
-
margin-left: var(--
|
|
32
|
+
margin-left: var(--a_datepicker_range_label_max_margin_left);
|
|
16
33
|
}
|
|
17
34
|
|
|
18
35
|
.a_datepicker_range__help_text {
|
|
19
36
|
padding-left: 10px;
|
|
20
|
-
}
|
|
37
|
+
}
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
.a_input_number_range {
|
|
2
2
|
--a_input_number_range_label_padding_right: .5rem;
|
|
3
|
-
--
|
|
3
|
+
--a_input_number_range_label_max_margin_left: 6px;
|
|
4
4
|
--a_input_number_range_label_white_space: nowrap;
|
|
5
5
|
}
|
|
6
6
|
.a_input_number_range__content {
|
|
7
7
|
display: flex;
|
|
8
8
|
align-items: center;
|
|
9
|
-
|
|
9
|
+
flex-wrap: wrap;
|
|
10
|
+
row-gap: .5rem;
|
|
10
11
|
}
|
|
11
12
|
.a_input_number_range__group {
|
|
12
13
|
display: flex;
|
|
13
14
|
align-items: center;
|
|
14
|
-
|
|
15
|
+
flex-basis: 50%;
|
|
15
16
|
}
|
|
16
17
|
.a_input_number_range__label {
|
|
17
18
|
margin-right: var(--a_input_number_range_label_padding_right);
|
|
18
19
|
white-space: var(--a_input_number_range_label_white_space);
|
|
19
20
|
}
|
|
20
21
|
.a_input_number_range__label_max {
|
|
21
|
-
margin-left: var(--
|
|
22
|
+
margin-left: var(--a_input_number_range_label_max_margin_left);
|
|
22
23
|
}
|
|
@@ -61,7 +61,7 @@ export default function AttributesAPI(props, {
|
|
|
61
61
|
});
|
|
62
62
|
|
|
63
63
|
const widthLocal = computed(() => {
|
|
64
|
-
if (isNumber(width.value) || (isString(width.value) && /^\d+$/.test(
|
|
64
|
+
if (isNumber(width.value) || (isString(width.value) && /^\d+$/.test(width.value))) {
|
|
65
65
|
return width.value + "px";
|
|
66
66
|
}
|
|
67
67
|
return width.value;
|
|
@@ -123,7 +123,7 @@ export default {
|
|
|
123
123
|
default: "date",
|
|
124
124
|
},
|
|
125
125
|
inputWidth: {
|
|
126
|
-
type: Number,
|
|
126
|
+
type: [Number, String],
|
|
127
127
|
required: false,
|
|
128
128
|
default: 270,
|
|
129
129
|
},
|
|
@@ -294,64 +294,72 @@ export default {
|
|
|
294
294
|
h("div", {
|
|
295
295
|
class: "a_datepicker_range__content",
|
|
296
296
|
}, [
|
|
297
|
-
h(
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
297
|
+
h("div", {
|
|
298
|
+
class: "a_datepicker_range__group a_datepicker_range__group_min"
|
|
299
|
+
}, [
|
|
300
|
+
h(ALabel, {
|
|
301
|
+
id: this.idFrom,
|
|
302
|
+
labelClass: "a_datepicker_range__label a_datepicker_range__label_min",
|
|
303
|
+
isLabelFloat: false,
|
|
304
|
+
label: this.labelFrom,
|
|
305
|
+
}),
|
|
306
|
+
h(ADatepicker, {
|
|
307
|
+
id: this.idFrom,
|
|
308
|
+
ref: "from",
|
|
309
|
+
inputAttr: this.inputAttributesFromLocal,
|
|
310
|
+
modelValue: this.modelValueFrom,
|
|
311
|
+
formatSave: this.formatSave,
|
|
312
|
+
firstDayOfWeek: this.firstDayOfWeek,
|
|
313
|
+
appendToBody: this.appendToBody,
|
|
314
|
+
popupStyle: this.popupStyle,
|
|
315
|
+
iconDay: this.iconDay,
|
|
316
|
+
inputName: this.inputName,
|
|
317
|
+
placement: this.placement,
|
|
318
|
+
clearable: this.clearable,
|
|
319
|
+
shortcuts: this.shortcuts,
|
|
320
|
+
lang: this.lang,
|
|
321
|
+
inputClass: this.inputClass,
|
|
322
|
+
placeholder: this.placeholderFrom,
|
|
323
|
+
disabled: this.disabled || this.disabledFrom,
|
|
324
|
+
width: this.inputWidth,
|
|
325
|
+
format: this.format,
|
|
326
|
+
type: "date",
|
|
327
|
+
onChange: this.changeModelFrom,
|
|
328
|
+
}),
|
|
329
|
+
]),
|
|
330
|
+
h("div", {
|
|
331
|
+
class: "a_datepicker_range__group"
|
|
332
|
+
}, [
|
|
333
|
+
h(ALabel, {
|
|
334
|
+
id: this.idUntil,
|
|
335
|
+
labelClass: "a_datepicker_range__label a_datepicker_range__label_max",
|
|
336
|
+
isLabelFloat: false,
|
|
337
|
+
label: this.labelUntil,
|
|
338
|
+
}),
|
|
339
|
+
h(ADatepicker, {
|
|
340
|
+
id: this.idUntil,
|
|
341
|
+
ref: "until",
|
|
342
|
+
modelValue: this.modelValueUntil,
|
|
343
|
+
formatSave: this.formatSave,
|
|
344
|
+
firstDayOfWeek: this.firstDayOfWeek,
|
|
345
|
+
appendToBody: this.appendToBody,
|
|
346
|
+
popupStyle: this.popupStyle,
|
|
347
|
+
iconDay: this.iconDay,
|
|
348
|
+
inputName: this.inputName,
|
|
349
|
+
placement: this.placement,
|
|
350
|
+
clearable: this.clearable,
|
|
351
|
+
shortcuts: this.shortcuts,
|
|
352
|
+
lang: this.lang,
|
|
353
|
+
inputClass: this.inputClass,
|
|
354
|
+
placeholder: this.placeholderUntil,
|
|
355
|
+
disabled: this.disabled || this.disabledUntil,
|
|
356
|
+
width: this.inputWidth,
|
|
357
|
+
format: this.format,
|
|
358
|
+
type: "date",
|
|
359
|
+
inputAttr: this.inputAttributesUntilLocal,
|
|
360
|
+
onChange: this.changeModelUntil,
|
|
361
|
+
}),
|
|
362
|
+
]),
|
|
355
363
|
h(AFormHelpText, {
|
|
356
364
|
class: "a_datepicker_range__help_text",
|
|
357
365
|
id: this.helpTextId,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
forEach,
|
|
3
|
+
} from "lodash-es";
|
|
4
|
+
|
|
5
|
+
const TYPES = ["datepickerRange", "dateRange"];
|
|
6
|
+
|
|
7
|
+
export default TYPES;
|
|
8
|
+
|
|
9
|
+
const TYPES_MAP = {};
|
|
10
|
+
forEach(TYPES, type => {
|
|
11
|
+
TYPES_MAP[type] = true;
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export const typesMapDatepickerRange = TYPES_MAP;
|