@progress/kendo-vue-dateinputs 2.7.3 → 2.8.0-dev.202201111325
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/dist/cdn/js/kendo-vue-dateinputs.js +1 -1
- package/dist/es/additionalTypes.ts +7 -1
- package/dist/es/calendar/components/Calendar.d.ts +2 -3
- package/dist/es/calendar/components/CalendarCell.d.ts +2 -3
- package/dist/es/calendar/components/CalendarCell.js +1 -1
- package/dist/es/calendar/components/CalendarHeaderTitle.d.ts +2 -3
- package/dist/es/calendar/components/CalendarHeaderTitle.js +19 -12
- package/dist/es/calendar/components/CalendarWeekCell.d.ts +2 -3
- package/dist/es/calendar/components/Header.d.ts +2 -3
- package/dist/es/calendar/components/Header.js +36 -37
- package/dist/es/calendar/components/View.d.ts +2 -3
- package/dist/es/calendar/components/ViewList.d.ts +2 -3
- package/dist/es/common/PickerWrap.d.ts +2 -3
- package/dist/es/dateinput/DateInput.d.ts +2 -3
- package/dist/es/dateinput/DateInput.js +62 -49
- package/dist/es/dateinput/models/DateInputSettings.d.ts +39 -0
- package/dist/es/dateinput/utils.js +2 -2
- package/dist/es/datepicker/DatePicker.d.ts +2 -3
- package/dist/es/datepicker/DatePicker.js +66 -80
- package/dist/es/datepicker/ToggleButton.d.ts +3 -24
- package/dist/es/datepicker/ToggleButton.js +2 -67
- package/dist/es/datepicker/interfaces/DatePickerComputed.d.ts +0 -1
- package/dist/es/datepicker/models/DatePickerSettings.d.ts +39 -0
- package/dist/es/daterangepicker/DateRangePicker.d.ts +2 -3
- package/dist/es/daterangepicker/DateRangePicker.js +49 -20
- package/dist/es/daterangepicker/models/DateRangePickerSettings.d.ts +39 -0
- package/dist/es/datetimepicker/DateTimePicker.d.ts +2 -3
- package/dist/es/datetimepicker/DateTimePicker.js +75 -51
- package/dist/es/datetimepicker/DateTimeSelector.d.ts +2 -3
- package/dist/es/datetimepicker/DateTimeSelector.js +21 -14
- package/dist/es/datetimepicker/models/DateTimePickerSettings.d.ts +39 -0
- package/dist/es/main.d.ts +2 -2
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/timepicker/TimeList.d.ts +2 -3
- package/dist/es/timepicker/TimePart.d.ts +2 -3
- package/dist/es/timepicker/TimePart.js +13 -6
- package/dist/es/timepicker/TimePicker.d.ts +2 -3
- package/dist/es/timepicker/TimePicker.js +73 -41
- package/dist/es/timepicker/TimeSelector.d.ts +2 -3
- package/dist/es/timepicker/TimeSelector.js +20 -11
- package/dist/es/timepicker/models/TimePickerSettings.d.ts +39 -0
- package/dist/es/virtualization/Virtualization.d.ts +2 -3
- package/dist/npm/additionalTypes.ts +7 -1
- package/dist/npm/calendar/components/Calendar.d.ts +2 -3
- package/dist/npm/calendar/components/CalendarCell.d.ts +2 -3
- package/dist/npm/calendar/components/CalendarCell.js +1 -1
- package/dist/npm/calendar/components/CalendarHeaderTitle.d.ts +2 -3
- package/dist/npm/calendar/components/CalendarHeaderTitle.js +20 -12
- package/dist/npm/calendar/components/CalendarWeekCell.d.ts +2 -3
- package/dist/npm/calendar/components/Header.d.ts +2 -3
- package/dist/npm/calendar/components/Header.js +37 -37
- package/dist/npm/calendar/components/View.d.ts +2 -3
- package/dist/npm/calendar/components/ViewList.d.ts +2 -3
- package/dist/npm/common/PickerWrap.d.ts +2 -3
- package/dist/npm/dateinput/DateInput.d.ts +2 -3
- package/dist/npm/dateinput/DateInput.js +60 -46
- package/dist/npm/dateinput/models/DateInputSettings.d.ts +39 -0
- package/dist/npm/dateinput/utils.js +2 -2
- package/dist/npm/datepicker/DatePicker.d.ts +2 -3
- package/dist/npm/datepicker/DatePicker.js +65 -80
- package/dist/npm/datepicker/ToggleButton.d.ts +3 -24
- package/dist/npm/datepicker/ToggleButton.js +3 -69
- package/dist/npm/datepicker/interfaces/DatePickerComputed.d.ts +0 -1
- package/dist/npm/datepicker/models/DatePickerSettings.d.ts +39 -0
- package/dist/npm/daterangepicker/DateRangePicker.d.ts +2 -3
- package/dist/npm/daterangepicker/DateRangePicker.js +49 -20
- package/dist/npm/daterangepicker/models/DateRangePickerSettings.d.ts +39 -0
- package/dist/npm/datetimepicker/DateTimePicker.d.ts +2 -3
- package/dist/npm/datetimepicker/DateTimePicker.js +75 -50
- package/dist/npm/datetimepicker/DateTimeSelector.d.ts +2 -3
- package/dist/npm/datetimepicker/DateTimeSelector.js +21 -14
- package/dist/npm/datetimepicker/models/DateTimePickerSettings.d.ts +39 -0
- package/dist/npm/main.d.ts +2 -2
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/timepicker/TimeList.d.ts +2 -3
- package/dist/npm/timepicker/TimePart.d.ts +2 -3
- package/dist/npm/timepicker/TimePart.js +14 -6
- package/dist/npm/timepicker/TimePicker.d.ts +2 -3
- package/dist/npm/timepicker/TimePicker.js +73 -40
- package/dist/npm/timepicker/TimeSelector.d.ts +2 -3
- package/dist/npm/timepicker/TimeSelector.js +21 -11
- package/dist/npm/timepicker/models/TimePickerSettings.d.ts +39 -0
- package/dist/npm/virtualization/Virtualization.d.ts +2 -3
- package/package.json +7 -7
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var __spreadArrays = undefined && undefined.__spreadArrays || function () {
|
|
4
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++) {
|
|
5
|
-
s += arguments[i].length;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++) {
|
|
9
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {
|
|
10
|
-
r[k] = a[j];
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return r;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
3
|
Object.defineProperty(exports, "__esModule", {
|
|
18
4
|
value: true
|
|
19
5
|
});
|
|
@@ -34,6 +20,8 @@ var models_1 = require("./models");
|
|
|
34
20
|
|
|
35
21
|
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
36
22
|
|
|
23
|
+
var kendo_vue_buttons_1 = require("@progress/kendo-vue-buttons");
|
|
24
|
+
|
|
37
25
|
var package_metadata_1 = require("../package-metadata");
|
|
38
26
|
|
|
39
27
|
var utils_1 = require("./utils");
|
|
@@ -86,6 +74,27 @@ var DateInput = {
|
|
|
86
74
|
return utils_1.defaultFormatPlaceholder;
|
|
87
75
|
}
|
|
88
76
|
},
|
|
77
|
+
rounded: {
|
|
78
|
+
type: String,
|
|
79
|
+
default: 'medium',
|
|
80
|
+
validator: function validator(value) {
|
|
81
|
+
return ['small', 'medium', 'large', 'full'].includes(value);
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
fillMode: {
|
|
85
|
+
type: String,
|
|
86
|
+
default: 'solid',
|
|
87
|
+
validator: function validator(value) {
|
|
88
|
+
return ['solid', 'flat', 'outline'].includes(value);
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
size: {
|
|
92
|
+
type: String,
|
|
93
|
+
default: 'medium',
|
|
94
|
+
validator: function validator(value) {
|
|
95
|
+
return ['small', 'medium', 'large'].includes(value);
|
|
96
|
+
}
|
|
97
|
+
},
|
|
89
98
|
tabIndex: Number,
|
|
90
99
|
title: String,
|
|
91
100
|
steps: Object,
|
|
@@ -181,15 +190,18 @@ var DateInput = {
|
|
|
181
190
|
},
|
|
182
191
|
wrapperClassNames: {
|
|
183
192
|
get: function get() {
|
|
193
|
+
var _a;
|
|
194
|
+
|
|
184
195
|
var isValid = !this.$data.hasMounted || !this.$props.validityStyles || this.validity().valid;
|
|
185
196
|
var disabled = this.$props.disabled;
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
'k-
|
|
192
|
-
|
|
197
|
+
var _b = this.$props,
|
|
198
|
+
size = _b.size,
|
|
199
|
+
fillMode = _b.fillMode,
|
|
200
|
+
rounded = _b.rounded;
|
|
201
|
+
return _a = {
|
|
202
|
+
'k-dateinput': true,
|
|
203
|
+
'k-input': true
|
|
204
|
+
}, _a["k-input-" + (kendo_vue_common_1.kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-input-" + fillMode] = fillMode, _a["k-rounded-" + (kendo_vue_common_1.kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded, _a['k-disabled'] = disabled, _a['k-invalid'] = !isValid && isValid !== undefined, _a['k-focus'] = this.isFocused, _a['k-rtl'] = this.$props.dir === 'rtl', _a;
|
|
193
205
|
}
|
|
194
206
|
}
|
|
195
207
|
},
|
|
@@ -537,6 +549,7 @@ var DateInput = {
|
|
|
537
549
|
var _this = this;
|
|
538
550
|
|
|
539
551
|
var h = gh || createElement;
|
|
552
|
+
var defaultSlot = kendo_vue_common_1.getDefaultSlots(this);
|
|
540
553
|
var localizationService = kendo_vue_intl_1.provideLocalizationService(this);
|
|
541
554
|
var _a = this.$props,
|
|
542
555
|
formatPlaceholder = _a.formatPlaceholder,
|
|
@@ -567,21 +580,12 @@ var DateInput = {
|
|
|
567
580
|
var textToDisplay = !showPlaceHolder ? currentText : null;
|
|
568
581
|
var inputId = id || this._inputId;
|
|
569
582
|
var isValid = !this.$props.validityStyles || this.validity().valid;
|
|
570
|
-
|
|
571
|
-
var wrapperClassesInstance = __spreadArrays(utils_1.wrapperClasses);
|
|
572
|
-
|
|
573
|
-
if (this.$props.className) {
|
|
574
|
-
wrapperClassesInstance.push(this.$props.className);
|
|
575
|
-
}
|
|
576
|
-
|
|
577
583
|
var dateinput = h("span", {
|
|
584
|
+
"class": this.wrapperClassNames,
|
|
578
585
|
dir: this.$props.dir,
|
|
579
586
|
attrs: this.v3 ? undefined : {
|
|
580
587
|
dir: this.$props.dir
|
|
581
|
-
}
|
|
582
|
-
"class": wrapperClassesInstance.join(' ')
|
|
583
|
-
}, [h("span", {
|
|
584
|
-
"class": this.wrapperClassNames
|
|
588
|
+
}
|
|
585
589
|
}, [h("input", {
|
|
586
590
|
role: "spinbutton",
|
|
587
591
|
attrs: this.v3 ? undefined : {
|
|
@@ -608,7 +612,7 @@ var DateInput = {
|
|
|
608
612
|
spellcheck: false,
|
|
609
613
|
autoComplete: "off",
|
|
610
614
|
autoCorrect: "off",
|
|
611
|
-
"class": "k-input",
|
|
615
|
+
"class": "k-input-inner",
|
|
612
616
|
id: inputId,
|
|
613
617
|
placeholder: this.$props.placeholder,
|
|
614
618
|
onWheel: this.wheel,
|
|
@@ -639,41 +643,51 @@ var DateInput = {
|
|
|
639
643
|
ref: this.v3 ? function (el) {
|
|
640
644
|
_this.inputRef = el;
|
|
641
645
|
} : 'input'
|
|
642
|
-
}),
|
|
643
|
-
"class": "k-
|
|
646
|
+
}), defaultSlot, this.$props.spinners && h("span", {
|
|
647
|
+
"class": "k-input-spinner k-spin-button",
|
|
644
648
|
onMousedown: this.spinnersMouseDown,
|
|
645
649
|
on: this.v3 ? undefined : {
|
|
646
650
|
"mousedown": this.spinnersMouseDown
|
|
647
651
|
}
|
|
648
|
-
}, [
|
|
649
|
-
|
|
650
|
-
|
|
652
|
+
}, [// @ts-ignore
|
|
653
|
+
h(kendo_vue_buttons_1.Button, {
|
|
654
|
+
icon: 'arrow-n',
|
|
651
655
|
attrs: this.v3 ? undefined : {
|
|
656
|
+
icon: 'arrow-n',
|
|
657
|
+
size: this.$props.size,
|
|
658
|
+
fillMode: this.$props.fillMode,
|
|
652
659
|
"aria-label": localizationService.toLanguageString(messages_1.increaseValue, messages_1.messages[messages_1.increaseValue]),
|
|
653
660
|
title: localizationService.toLanguageString(messages_1.increaseValue, messages_1.messages[messages_1.increaseValue])
|
|
654
661
|
},
|
|
662
|
+
size: this.$props.size,
|
|
663
|
+
fillMode: this.$props.fillMode,
|
|
664
|
+
"class": "k-spinner-increase",
|
|
665
|
+
"aria-label": localizationService.toLanguageString(messages_1.increaseValue, messages_1.messages[messages_1.increaseValue]),
|
|
655
666
|
title: localizationService.toLanguageString(messages_1.increaseValue, messages_1.messages[messages_1.increaseValue]),
|
|
656
667
|
onClick: this.increasePart,
|
|
657
668
|
on: this.v3 ? undefined : {
|
|
658
669
|
"click": this.increasePart
|
|
659
670
|
}
|
|
660
|
-
},
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
"aria-label": localizationService.toLanguageString(messages_1.decreaseValue, messages_1.messages[messages_1.decreaseValue]),
|
|
671
|
+
}), // @ts-ignore
|
|
672
|
+
h(kendo_vue_buttons_1.Button, {
|
|
673
|
+
"class": "k-spinner-decrease",
|
|
674
|
+
icon: 'arrow-s',
|
|
665
675
|
attrs: this.v3 ? undefined : {
|
|
676
|
+
icon: 'arrow-s',
|
|
677
|
+
size: this.$props.size,
|
|
678
|
+
fillMode: this.$props.fillMode,
|
|
666
679
|
"aria-label": localizationService.toLanguageString(messages_1.decreaseValue, messages_1.messages[messages_1.decreaseValue]),
|
|
667
680
|
title: localizationService.toLanguageString(messages_1.decreaseValue, messages_1.messages[messages_1.decreaseValue])
|
|
668
681
|
},
|
|
682
|
+
size: this.$props.size,
|
|
683
|
+
fillMode: this.$props.fillMode,
|
|
684
|
+
"aria-label": localizationService.toLanguageString(messages_1.decreaseValue, messages_1.messages[messages_1.decreaseValue]),
|
|
669
685
|
title: localizationService.toLanguageString(messages_1.decreaseValue, messages_1.messages[messages_1.decreaseValue]),
|
|
670
686
|
onClick: this.decreasePart,
|
|
671
687
|
on: this.v3 ? undefined : {
|
|
672
688
|
"click": this.decreasePart
|
|
673
689
|
}
|
|
674
|
-
}
|
|
675
|
-
"class": "k-icon k-i-arrow-s"
|
|
676
|
-
})])])])]);
|
|
690
|
+
})])]);
|
|
677
691
|
return label ? // @ts-ignore function children
|
|
678
692
|
h(kendo_vue_labels_1.FloatingLabel, {
|
|
679
693
|
label: label,
|
|
@@ -17,6 +17,45 @@ export interface DateInputSettings {
|
|
|
17
17
|
* Specifies the width of the DateInput.
|
|
18
18
|
*/
|
|
19
19
|
width?: number | string;
|
|
20
|
+
/**
|
|
21
|
+
* Configures the `size` of the DateInput.
|
|
22
|
+
*
|
|
23
|
+
* The available options are:
|
|
24
|
+
* - small
|
|
25
|
+
* - medium
|
|
26
|
+
* - large
|
|
27
|
+
* - null—Does not set a size `class`.
|
|
28
|
+
*
|
|
29
|
+
* @default `medium`
|
|
30
|
+
*/
|
|
31
|
+
size?: null | 'small' | 'medium' | 'large' | string;
|
|
32
|
+
/**
|
|
33
|
+
* Configures the `roundness` of the DateInput.
|
|
34
|
+
*
|
|
35
|
+
* The available options are:
|
|
36
|
+
* - small
|
|
37
|
+
* - medium
|
|
38
|
+
* - large
|
|
39
|
+
* - circle
|
|
40
|
+
* - full
|
|
41
|
+
* - null—Does not set a rounded `class`.
|
|
42
|
+
*
|
|
43
|
+
* @default `medium`
|
|
44
|
+
*/
|
|
45
|
+
rounded?: null | 'small' | 'medium' | 'large' | 'full' | string;
|
|
46
|
+
/**
|
|
47
|
+
* Configures the `fillMode` of the DateInput.
|
|
48
|
+
*
|
|
49
|
+
* The available options are:
|
|
50
|
+
* - solid
|
|
51
|
+
* - outline
|
|
52
|
+
* - flat
|
|
53
|
+
* - link
|
|
54
|
+
* - null—Does not set a fillMode `class`.
|
|
55
|
+
*
|
|
56
|
+
* @default `solid`
|
|
57
|
+
*/
|
|
58
|
+
fillMode?: null | 'solid' | 'outline' | 'flat' | string;
|
|
20
59
|
/**
|
|
21
60
|
* Sets the `tabIndex` property of the DateInput.
|
|
22
61
|
*/
|
|
@@ -81,6 +81,6 @@ exports.isInRange = function (candidate, min, max) { return (candidate === null
|
|
|
81
81
|
/**
|
|
82
82
|
* @hidden
|
|
83
83
|
*/
|
|
84
|
-
exports.invalidClasses = ['k-
|
|
84
|
+
exports.invalidClasses = ['k-invalid'];
|
|
85
85
|
/** @hidden */
|
|
86
|
-
exports.wrapperClasses = ['k-
|
|
86
|
+
exports.wrapperClasses = ['k-dateinput'];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { DefineComponent } from '../additionalTypes';
|
|
2
|
-
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
1
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
|
|
3
2
|
declare type DefaultData<V> = object | ((this: V) => DatePickerData);
|
|
4
3
|
declare type DefaultMethods<V> = {
|
|
5
4
|
[key: string]: (this: V, ...args: any[]) => any;
|
|
@@ -12,7 +11,7 @@ import { DatePickerProps } from './interfaces/DatePickerProps';
|
|
|
12
11
|
/**
|
|
13
12
|
* @hidden
|
|
14
13
|
*/
|
|
15
|
-
export interface DatePickerAll extends
|
|
14
|
+
export interface DatePickerAll extends Vue2type, DatePickerMethods, DatePickerData, DatePickerComputed, DatePickerState {
|
|
16
15
|
}
|
|
17
16
|
declare let DatePicker: ComponentOptions<DatePickerAll, DefaultData<DatePickerData>, DefaultMethods<DatePickerAll>, DatePickerComputed, RecordPropsDefinition<DatePickerProps>>;
|
|
18
17
|
declare const DatePickerVue3: DefineComponent<DatePickerProps, any, DatePickerData, DatePickerComputed, DatePickerMethods, {}, {}, {}, string, DatePickerProps, DatePickerProps, {}>;
|
|
@@ -34,8 +34,6 @@ var kendo_vue_intl_1 = require("@progress/kendo-vue-intl");
|
|
|
34
34
|
|
|
35
35
|
var ToggleButton_1 = require("./ToggleButton");
|
|
36
36
|
|
|
37
|
-
var PickerWrap_1 = require("../common/PickerWrap");
|
|
38
|
-
|
|
39
37
|
var kendo_vue_labels_1 = require("@progress/kendo-vue-labels"); // tslint:enable:max-line-length
|
|
40
38
|
|
|
41
39
|
|
|
@@ -101,10 +99,25 @@ var DatePicker = {
|
|
|
101
99
|
return undefined;
|
|
102
100
|
}
|
|
103
101
|
},
|
|
104
|
-
|
|
105
|
-
type:
|
|
106
|
-
default:
|
|
107
|
-
|
|
102
|
+
rounded: {
|
|
103
|
+
type: String,
|
|
104
|
+
default: 'medium',
|
|
105
|
+
validator: function validator(value) {
|
|
106
|
+
return ['small', 'medium', 'large', 'full'].includes(value);
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
fillMode: {
|
|
110
|
+
type: String,
|
|
111
|
+
default: 'solid',
|
|
112
|
+
validator: function validator(value) {
|
|
113
|
+
return ['solid', 'flat', 'outline'].includes(value);
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
size: {
|
|
117
|
+
type: String,
|
|
118
|
+
default: 'medium',
|
|
119
|
+
validator: function validator(value) {
|
|
120
|
+
return ['small', 'medium', 'large'].includes(value);
|
|
108
121
|
}
|
|
109
122
|
},
|
|
110
123
|
focusedDate: Date,
|
|
@@ -178,14 +191,12 @@ var DatePicker = {
|
|
|
178
191
|
kendo_vue_common_1.validatePackage(package_metadata_1.packageMetadata);
|
|
179
192
|
this._popupId = kendo_vue_common_1.guid();
|
|
180
193
|
this._anchor = kendo_vue_common_1.guid();
|
|
181
|
-
this._wrapper = null;
|
|
182
194
|
this._dateInput = null;
|
|
183
195
|
this._calendar = null;
|
|
184
196
|
this.$data.currentValue = this.$props.defaultValue;
|
|
185
197
|
this.$data.currentShow = this.$props.defaultShow;
|
|
186
198
|
},
|
|
187
199
|
mounted: function mounted() {
|
|
188
|
-
this._wrapper = this.v3 ? this.wrapperRef : this.$refs.wrapper;
|
|
189
200
|
this._dateInput = this.v3 ? this.dateInputRef : this.$refs.dateInput;
|
|
190
201
|
|
|
191
202
|
if (this.$refs.calendar || this.calendarRef) {
|
|
@@ -250,15 +261,6 @@ var DatePicker = {
|
|
|
250
261
|
get: function get() {
|
|
251
262
|
return this.$data.showDuringOnChange !== undefined ? this.$data.showDuringOnChange : this.$props.show !== undefined ? this.$props.show : this.$data.currentShow;
|
|
252
263
|
}
|
|
253
|
-
},
|
|
254
|
-
wrapperClassNames: {
|
|
255
|
-
get: function get() {
|
|
256
|
-
var disabled = this.$props.disabled;
|
|
257
|
-
return {
|
|
258
|
-
'k-state-disabled': disabled,
|
|
259
|
-
'k-state-focused': this.$data.isFocused
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
264
|
}
|
|
263
265
|
},
|
|
264
266
|
methods: {
|
|
@@ -269,18 +271,11 @@ var DatePicker = {
|
|
|
269
271
|
},
|
|
270
272
|
handleFocus: function handleFocus(event) {
|
|
271
273
|
this._oldShow = this.computedShow;
|
|
272
|
-
|
|
273
|
-
if (this._wrapper) {
|
|
274
|
-
this.$data.isFocused = true;
|
|
275
|
-
}
|
|
276
|
-
|
|
274
|
+
this.$data.isFocused = true;
|
|
277
275
|
this.$emit('focus', event);
|
|
278
276
|
},
|
|
279
277
|
handleBlur: function handleBlur(event) {
|
|
280
|
-
|
|
281
|
-
this.$data.isFocused = false;
|
|
282
|
-
}
|
|
283
|
-
|
|
278
|
+
this.$data.isFocused = false;
|
|
284
279
|
this.createBlurTimeout();
|
|
285
280
|
this.$emit('blur', event);
|
|
286
281
|
},
|
|
@@ -421,41 +416,49 @@ var DatePicker = {
|
|
|
421
416
|
},
|
|
422
417
|
// @ts-ignore
|
|
423
418
|
render: function render(createElement) {
|
|
419
|
+
var _a;
|
|
420
|
+
|
|
424
421
|
var _this = this;
|
|
425
422
|
|
|
426
423
|
var h = gh || createElement;
|
|
427
|
-
var
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
width =
|
|
440
|
-
name =
|
|
441
|
-
validationMessage =
|
|
442
|
-
required =
|
|
443
|
-
validityStyles =
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
424
|
+
var defaultSlot = kendo_vue_common_1.getDefaultSlots(this);
|
|
425
|
+
var _b = this.$props,
|
|
426
|
+
disabled = _b.disabled,
|
|
427
|
+
tabIndex = _b.tabIndex,
|
|
428
|
+
title = _b.title,
|
|
429
|
+
id = _b.id,
|
|
430
|
+
format = _b.format,
|
|
431
|
+
formatPlaceholder = _b.formatPlaceholder,
|
|
432
|
+
min = _b.min,
|
|
433
|
+
max = _b.max,
|
|
434
|
+
weekNumber = _b.weekNumber,
|
|
435
|
+
focusedDate = _b.focusedDate,
|
|
436
|
+
width = _b.width,
|
|
437
|
+
name = _b.name,
|
|
438
|
+
validationMessage = _b.validationMessage,
|
|
439
|
+
required = _b.required,
|
|
440
|
+
validityStyles = _b.validityStyles,
|
|
441
|
+
size = _b.size,
|
|
442
|
+
fillMode = _b.fillMode,
|
|
443
|
+
rounded = _b.rounded;
|
|
444
|
+
var _c = this.$props.popupSettings,
|
|
445
|
+
popupClass = _c.popupClass,
|
|
446
|
+
animate = _c.animate,
|
|
447
|
+
appendTo = _c.appendTo;
|
|
448
448
|
var show = this.computedShow;
|
|
449
449
|
var value = this.computedValue;
|
|
450
450
|
var sanitizedValue = value && kendo_date_math_1.getDate(value);
|
|
451
451
|
var isValid = !this.$props.validityStyles || this.validity().valid;
|
|
452
|
-
var rootClassName = kendo_vue_common_1.classNames('k-widget k-datepicker', {
|
|
453
|
-
'k-state-invalid': !isValid
|
|
454
|
-
}, className);
|
|
455
452
|
var popupClassNames = kendo_vue_common_1.classNames('k-calendar-container k-group k-reset', popupClass);
|
|
456
453
|
var toggleButton = this.$props.toggleButton ? kendo_vue_common_1.templateRendering.call(this, this.$props.toggleButton, kendo_vue_common_1.getListeners.call(this)) : undefined;
|
|
457
|
-
var toggleButtonDefaultRendering = // @ts-ignore
|
|
454
|
+
var toggleButtonDefaultRendering = // @ts-ignore
|
|
458
455
|
h(ToggleButton_1.ToggleButton, {
|
|
456
|
+
icon: "calendar",
|
|
457
|
+
attrs: this.v3 ? undefined : {
|
|
458
|
+
icon: "calendar",
|
|
459
|
+
title: kendo_vue_intl_1.provideLocalizationService(this).toLanguageString(messages_1.toggleCalendar, messages_1.messages[messages_1.toggleCalendar]),
|
|
460
|
+
"aria-label": kendo_vue_intl_1.provideLocalizationService(this).toLanguageString(messages_1.toggleCalendar, messages_1.messages[messages_1.toggleCalendar])
|
|
461
|
+
},
|
|
459
462
|
onMousedown: this.handleIconMouseDown,
|
|
460
463
|
on: this.v3 ? undefined : {
|
|
461
464
|
"mousedown": this.handleIconMouseDown,
|
|
@@ -463,17 +466,9 @@ var DatePicker = {
|
|
|
463
466
|
},
|
|
464
467
|
onClick: this.handleIconClick,
|
|
465
468
|
title: kendo_vue_intl_1.provideLocalizationService(this).toLanguageString(messages_1.toggleCalendar, messages_1.messages[messages_1.toggleCalendar]),
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
"class": "k-select"
|
|
470
|
-
}, this.v3 ? function () {
|
|
471
|
-
return [h("span", {
|
|
472
|
-
"class": "k-icon k-i-calendar"
|
|
473
|
-
})];
|
|
474
|
-
} : [h("span", {
|
|
475
|
-
"class": "k-icon k-i-calendar"
|
|
476
|
-
})]);
|
|
469
|
+
"aria-label": kendo_vue_intl_1.provideLocalizationService(this).toLanguageString(messages_1.toggleCalendar, messages_1.messages[messages_1.toggleCalendar]),
|
|
470
|
+
"class": "k-input-button"
|
|
471
|
+
});
|
|
477
472
|
var toggleButtonRendering = kendo_vue_common_1.getTemplate.call(this, {
|
|
478
473
|
h: h,
|
|
479
474
|
template: toggleButton,
|
|
@@ -501,6 +496,9 @@ var DatePicker = {
|
|
|
501
496
|
max: max,
|
|
502
497
|
min: min,
|
|
503
498
|
name: name,
|
|
499
|
+
size: null,
|
|
500
|
+
rounded: null,
|
|
501
|
+
fillMode: null,
|
|
504
502
|
required: required,
|
|
505
503
|
tabIndex: !show ? tabIndex : -1,
|
|
506
504
|
title: title,
|
|
@@ -516,6 +514,9 @@ var DatePicker = {
|
|
|
516
514
|
max: max,
|
|
517
515
|
min: min,
|
|
518
516
|
name: name,
|
|
517
|
+
size: null,
|
|
518
|
+
rounded: null,
|
|
519
|
+
fillMode: null,
|
|
519
520
|
onChange: this.handleInputValueChange,
|
|
520
521
|
on: this.v3 ? undefined : {
|
|
521
522
|
"change": this.handleInputValueChange
|
|
@@ -533,22 +534,6 @@ var DatePicker = {
|
|
|
533
534
|
template: dateInput,
|
|
534
535
|
defaultRendering: dateInputDefaultRendering
|
|
535
536
|
});
|
|
536
|
-
var pickerWrap = this.$props.pickerWrap ? kendo_vue_common_1.templateRendering.call(this, this.$props.pickerWrap, kendo_vue_common_1.getListeners.call(this)) : undefined;
|
|
537
|
-
var pickerWrapDefaultRendering = // @ts-ignore function children
|
|
538
|
-
h(PickerWrap_1.PickerWrap, {
|
|
539
|
-
ref: this.v3 ? function (el) {
|
|
540
|
-
_this.wrapperRef = el;
|
|
541
|
-
} : 'wrapper',
|
|
542
|
-
"class": this.wrapperClassNames
|
|
543
|
-
}, this.v3 ? function () {
|
|
544
|
-
return [dateInputRendering, toggleButtonRendering];
|
|
545
|
-
} : [dateInputRendering, toggleButtonRendering]);
|
|
546
|
-
var pickerWrapRendering = kendo_vue_common_1.getTemplate.call(this, {
|
|
547
|
-
h: h,
|
|
548
|
-
template: pickerWrap,
|
|
549
|
-
defaultRendering: pickerWrapDefaultRendering,
|
|
550
|
-
defaultSlots: [dateInputRendering, toggleButtonRendering]
|
|
551
|
-
});
|
|
552
537
|
var calendar = this.$props.calendar ? kendo_vue_common_1.templateRendering.call(this, this.$props.calendar, kendo_vue_common_1.getListeners.call(this)) : undefined;
|
|
553
538
|
var calendarDefaultRendering = // @ts-ignore
|
|
554
539
|
h(Calendar_1.Calendar, {
|
|
@@ -636,7 +621,7 @@ var DatePicker = {
|
|
|
636
621
|
"aria-expanded": this.computedShow
|
|
637
622
|
},
|
|
638
623
|
"aria-expanded": this.computedShow,
|
|
639
|
-
"class":
|
|
624
|
+
"class": kendo_vue_common_1.classNames('k-input', 'k-datepicker', (_a = {}, _a["k-input-" + (kendo_vue_common_1.kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-input-" + fillMode] = fillMode, _a["k-rounded-" + (kendo_vue_common_1.kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded, _a['k-valid'] = isValid, _a['k-invalid'] = !isValid, _a['k-required'] = this.required, _a['k-disabled'] = this.$props.disabled, _a['k-focus'] = this.$data.isFocused, _a)),
|
|
640
625
|
onKeydown: this.handleKeyDown,
|
|
641
626
|
on: this.v3 ? undefined : {
|
|
642
627
|
"keydown": this.handleKeyDown,
|
|
@@ -645,7 +630,7 @@ var DatePicker = {
|
|
|
645
630
|
},
|
|
646
631
|
onFocusin: this.handleFocus,
|
|
647
632
|
onFocusout: this.handleBlur
|
|
648
|
-
}, [
|
|
633
|
+
}, [dateInputRendering, toggleButtonRendering, popupRendering]);
|
|
649
634
|
return this.$props.label ? // @ts-ignore function children
|
|
650
635
|
h(kendo_vue_labels_1.FloatingLabel, {
|
|
651
636
|
label: this.$props.label,
|
|
@@ -1,29 +1,8 @@
|
|
|
1
|
+
import { ButtonProps } from '@progress/kendo-vue-buttons';
|
|
1
2
|
import { DefineComponent } from '../additionalTypes';
|
|
2
|
-
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
3
|
-
declare type DefaultData<V> = object | ((this: V) => {});
|
|
4
|
-
declare type DefaultMethods<V> = {
|
|
5
|
-
[key: string]: (this: V, ...args: any[]) => any;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Represents the this.$props of the Kendo UI for Vue
|
|
9
|
-
* [Toggle Button]({% slug api_dateinputs_native_togglebuttonprops %}) component.
|
|
10
|
-
*/
|
|
11
|
-
export interface ToggleButtonProps {
|
|
12
|
-
id?: string;
|
|
13
|
-
tabIndex?: number;
|
|
14
|
-
title?: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* @hidden
|
|
18
|
-
*/
|
|
19
|
-
export interface ToggleButtonMethods extends Vue {
|
|
20
|
-
handleMouseDown: (e: any) => void;
|
|
21
|
-
handleMouseUp: (e: any) => void;
|
|
22
|
-
handleClick: (e: any) => void;
|
|
23
|
-
}
|
|
24
3
|
/**
|
|
25
4
|
* Represents the default `toggleButton` component.
|
|
26
5
|
*/
|
|
27
|
-
declare let ToggleButton:
|
|
28
|
-
declare const ToggleButtonVue3: DefineComponent<
|
|
6
|
+
declare let ToggleButton: any;
|
|
7
|
+
declare const ToggleButtonVue3: DefineComponent<ButtonProps, any, {}, {}, {}, {}, {}, {}, string, ButtonProps, ButtonProps, {}>;
|
|
29
8
|
export { ToggleButton, ToggleButtonVue3 };
|
|
@@ -3,81 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.ToggleButtonVue3 = exports.ToggleButton = void 0;
|
|
6
|
+
exports.ToggleButtonVue3 = exports.ToggleButton = void 0;
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
var allVue = Vue;
|
|
11
|
-
var gh = allVue.h;
|
|
12
|
-
|
|
13
|
-
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
8
|
+
var kendo_vue_buttons_1 = require("@progress/kendo-vue-buttons");
|
|
14
9
|
/**
|
|
15
10
|
* Represents the default `toggleButton` component.
|
|
16
11
|
*/
|
|
17
12
|
|
|
18
13
|
|
|
19
|
-
var ToggleButton =
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
emits: {
|
|
22
|
-
'click': null,
|
|
23
|
-
'mousedown': null,
|
|
24
|
-
'mouseup': null
|
|
25
|
-
},
|
|
26
|
-
props: {
|
|
27
|
-
id: String,
|
|
28
|
-
tabIndex: {
|
|
29
|
-
type: Number,
|
|
30
|
-
default: undefined
|
|
31
|
-
},
|
|
32
|
-
title: String
|
|
33
|
-
},
|
|
34
|
-
methods: {
|
|
35
|
-
handleMouseDown: function handleMouseDown(e) {
|
|
36
|
-
this.$emit('mousedown', e);
|
|
37
|
-
},
|
|
38
|
-
handleMouseUp: function handleMouseUp(e) {
|
|
39
|
-
this.$emit('mouseup', e);
|
|
40
|
-
},
|
|
41
|
-
handleClick: function handleClick(e) {
|
|
42
|
-
this.$emit('click', e);
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
// @ts-ignore
|
|
46
|
-
setup: !gh ? undefined : function () {
|
|
47
|
-
var v3 = !!gh;
|
|
48
|
-
return {
|
|
49
|
-
v3: v3
|
|
50
|
-
};
|
|
51
|
-
},
|
|
52
|
-
// @ts-ignore
|
|
53
|
-
render: function render(createElement) {
|
|
54
|
-
var h = gh || createElement;
|
|
55
|
-
var defaultSlot = kendo_vue_common_1.getDefaultSlots(this);
|
|
56
|
-
return h("a", {
|
|
57
|
-
id: this.$props.id,
|
|
58
|
-
attrs: this.v3 ? undefined : {
|
|
59
|
-
id: this.$props.id,
|
|
60
|
-
role: "button",
|
|
61
|
-
tabindex: this.$props.tabIndex,
|
|
62
|
-
title: this.$props.title,
|
|
63
|
-
"aria-label": this.$props.title
|
|
64
|
-
},
|
|
65
|
-
role: "button",
|
|
66
|
-
"class": 'k-select',
|
|
67
|
-
tabindex: this.$props.tabIndex,
|
|
68
|
-
title: this.$props.title,
|
|
69
|
-
"aria-label": this.$props.title,
|
|
70
|
-
onMousedown: this.handleMouseDown,
|
|
71
|
-
on: this.v3 ? undefined : {
|
|
72
|
-
"mousedown": this.handleMouseDown,
|
|
73
|
-
"click": this.handleClick,
|
|
74
|
-
"mouseup": this.handleMouseUp
|
|
75
|
-
},
|
|
76
|
-
onClick: this.handleClick,
|
|
77
|
-
onMouseup: this.handleMouseUp
|
|
78
|
-
}, [defaultSlot]);
|
|
79
|
-
}
|
|
80
|
-
};
|
|
14
|
+
var ToggleButton = kendo_vue_buttons_1.Button;
|
|
81
15
|
exports.ToggleButton = ToggleButton;
|
|
82
16
|
var ToggleButtonVue3 = ToggleButton;
|
|
83
17
|
exports.ToggleButtonVue3 = ToggleButtonVue3;
|
|
@@ -38,6 +38,45 @@ export interface DatePickerSettings {
|
|
|
38
38
|
* Determines whether the DatePicker is disabled ([see example]({% slug disabled_datepicker_native %})).
|
|
39
39
|
*/
|
|
40
40
|
disabled?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Configures the `size` of the TimeInput.
|
|
43
|
+
*
|
|
44
|
+
* The available options are:
|
|
45
|
+
* - small
|
|
46
|
+
* - medium
|
|
47
|
+
* - large
|
|
48
|
+
* - null—Does not set a size `class`.
|
|
49
|
+
*
|
|
50
|
+
* @default `medium`
|
|
51
|
+
*/
|
|
52
|
+
size?: null | 'small' | 'medium' | 'large' | string;
|
|
53
|
+
/**
|
|
54
|
+
* Configures the `roundness` of the TimeInput.
|
|
55
|
+
*
|
|
56
|
+
* The available options are:
|
|
57
|
+
* - small
|
|
58
|
+
* - medium
|
|
59
|
+
* - large
|
|
60
|
+
* - circle
|
|
61
|
+
* - full
|
|
62
|
+
* - null—Does not set a rounded `class`.
|
|
63
|
+
*
|
|
64
|
+
* @default `medium`
|
|
65
|
+
*/
|
|
66
|
+
rounded?: null | 'small' | 'medium' | 'large' | 'full' | string;
|
|
67
|
+
/**
|
|
68
|
+
* Configures the `fillMode` of the TimeInput.
|
|
69
|
+
*
|
|
70
|
+
* The available options are:
|
|
71
|
+
* - solid
|
|
72
|
+
* - outline
|
|
73
|
+
* - flat
|
|
74
|
+
* - link
|
|
75
|
+
* - null—Does not set a fillMode `class`.
|
|
76
|
+
*
|
|
77
|
+
* @default `solid`
|
|
78
|
+
*/
|
|
79
|
+
fillMode?: null | 'solid' | 'outline' | 'flat' | string;
|
|
41
80
|
/**
|
|
42
81
|
* Specifies the focused date of the DatePicker ([see example]({% slug dates_datepicker_native %})).
|
|
43
82
|
*/
|