@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,3 +1,9 @@
|
|
|
1
1
|
// @ts-ignore
|
|
2
2
|
import { DefineComponent } from 'vue';
|
|
3
|
-
|
|
3
|
+
// @ts-ignore
|
|
4
|
+
import * as Vue from 'vue';
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
type Vue2type = Vue.default;
|
|
7
|
+
// @ts-ignore
|
|
8
|
+
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
9
|
+
export { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type };
|
|
@@ -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) => CalendarData);
|
|
4
3
|
declare type DefaultMethods<V> = {
|
|
5
4
|
[key: string]: (this: V, ...args: any[]) => any;
|
|
@@ -12,7 +11,7 @@ import { CalendarProps } from './interfaces/CalendarProps';
|
|
|
12
11
|
/**
|
|
13
12
|
* @hidden
|
|
14
13
|
*/
|
|
15
|
-
export interface CalendarAll extends
|
|
14
|
+
export interface CalendarAll extends Vue2type, CalendarMethods, CalendarComputed, CalendarState, CalendarData {
|
|
16
15
|
}
|
|
17
16
|
declare let Calendar: ComponentOptions<CalendarAll, DefaultData<CalendarData>, DefaultMethods<CalendarAll>, CalendarComputed, RecordPropsDefinition<CalendarProps>>;
|
|
18
17
|
declare const CalendarVue3: DefineComponent<CalendarProps, any, CalendarData, CalendarComputed, CalendarMethods, {}, {}, {}, string, CalendarProps, CalendarProps, {}>;
|
|
@@ -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 DefaultMethods<V> = {
|
|
4
3
|
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
4
|
};
|
|
@@ -24,7 +23,7 @@ export interface CalendarCellMethods {
|
|
|
24
23
|
/**
|
|
25
24
|
* @hidden
|
|
26
25
|
*/
|
|
27
|
-
export interface CalendarCellAllMethods extends
|
|
26
|
+
export interface CalendarCellAllMethods extends Vue2type, CalendarCellMethods {
|
|
28
27
|
}
|
|
29
28
|
/**
|
|
30
29
|
* The `CalendarCell` component is internally used for rendering the items in the current view. Also be used as a custom `cell` of the [Calendar]({% slug api_dateinputs_native_calendarprops %}#toc-cell).
|
|
@@ -62,7 +62,7 @@ var CalendarCell = {
|
|
|
62
62
|
// Manually checking if the component needs an update
|
|
63
63
|
// due to date object being compared by instance
|
|
64
64
|
// and new Date object is created
|
|
65
|
-
// every time and fails the shallow compare of the Vue.
|
|
65
|
+
// every time and fails the shallow compare of the Vue.
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
68
|
* @hidden
|
|
@@ -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 DefaultMethods<V> = {
|
|
4
3
|
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
4
|
};
|
|
@@ -21,7 +20,7 @@ export interface CalendarHeaderTitleMethods {
|
|
|
21
20
|
/**
|
|
22
21
|
* @hidden
|
|
23
22
|
*/
|
|
24
|
-
export interface CalendarHeaderTitleAllMethods extends
|
|
23
|
+
export interface CalendarHeaderTitleAllMethods extends Vue2type, CalendarHeaderTitleMethods {
|
|
25
24
|
}
|
|
26
25
|
/**
|
|
27
26
|
* The `CalendarCell` component is internally used for rendering the items in the current view. Also be used as a custom `cell` of the [Calendar]({% slug api_dateinputs_native_calendarprops %}#toc-cell).
|
|
@@ -3,6 +3,7 @@ import * as Vue from 'vue';
|
|
|
3
3
|
var allVue = Vue;
|
|
4
4
|
var gh = allVue.h;
|
|
5
5
|
import { getDefaultSlots } from '@progress/kendo-vue-common';
|
|
6
|
+
import { Button as KButton } from '@progress/kendo-vue-buttons';
|
|
6
7
|
/**
|
|
7
8
|
* The `CalendarCell` component is internally used for rendering the items in the current view. Also be used as a custom `cell` of the [Calendar]({% slug api_dateinputs_native_calendarprops %}#toc-cell).
|
|
8
9
|
*
|
|
@@ -41,20 +42,26 @@ var CalendarHeaderTitle = {
|
|
|
41
42
|
render: function render(createElement) {
|
|
42
43
|
var h = gh || createElement;
|
|
43
44
|
var defaultSlot = getDefaultSlots(this);
|
|
44
|
-
return
|
|
45
|
-
|
|
46
|
-
attrs: this.v3 ? undefined : {
|
|
45
|
+
return (// @ts-ignore function children
|
|
46
|
+
h(KButton, {
|
|
47
47
|
value: this.$props.value,
|
|
48
|
+
attrs: this.v3 ? undefined : {
|
|
49
|
+
value: this.$props.value,
|
|
50
|
+
id: this.$props.id,
|
|
51
|
+
fillMode: 'flat',
|
|
52
|
+
tabIndex: 0
|
|
53
|
+
},
|
|
48
54
|
id: this.$props.id,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
fillMode: 'flat',
|
|
56
|
+
onClick: this.handleClick,
|
|
57
|
+
on: this.v3 ? undefined : {
|
|
58
|
+
"click": this.handleClick
|
|
59
|
+
},
|
|
60
|
+
tabIndex: 0
|
|
61
|
+
}, this.v3 ? function () {
|
|
62
|
+
return [defaultSlot];
|
|
63
|
+
} : [defaultSlot])
|
|
64
|
+
);
|
|
58
65
|
}
|
|
59
66
|
};
|
|
60
67
|
var CalendarHeaderTitleVue3 = CalendarHeaderTitle;
|
|
@@ -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 DefaultMethods<V> = {
|
|
4
3
|
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
4
|
};
|
|
@@ -14,7 +13,7 @@ export interface CalendarWeekCellProps {
|
|
|
14
13
|
/**
|
|
15
14
|
* @hidden
|
|
16
15
|
*/
|
|
17
|
-
export interface CalendarWeekCellAllMethods extends
|
|
16
|
+
export interface CalendarWeekCellAllMethods extends Vue2type {
|
|
18
17
|
handleClick?: (e: any) => void;
|
|
19
18
|
}
|
|
20
19
|
/**
|
|
@@ -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
|
import { LocalizationService } from '@progress/kendo-vue-intl';
|
|
4
3
|
import { BusViewService } from '../services';
|
|
5
4
|
import { ViewService, Action } from '../models';
|
|
@@ -61,7 +60,7 @@ export interface HeaderState {
|
|
|
61
60
|
/**
|
|
62
61
|
* @hidden
|
|
63
62
|
*/
|
|
64
|
-
export interface HeaderAllMethods extends
|
|
63
|
+
export interface HeaderAllMethods extends Vue2type, HeaderMethods, HeaderComputed, HeaderState {
|
|
65
64
|
}
|
|
66
65
|
/**
|
|
67
66
|
* @hidden
|
|
@@ -5,6 +5,7 @@ var gh = allVue.h;
|
|
|
5
5
|
var inject = allVue.inject;
|
|
6
6
|
import { provideLocalizationService } from '@progress/kendo-vue-intl';
|
|
7
7
|
import { getDate } from '@progress/kendo-date-math';
|
|
8
|
+
import { Button as KButton } from '@progress/kendo-vue-buttons';
|
|
8
9
|
import { CalendarHeaderTitle } from './CalendarHeaderTitle';
|
|
9
10
|
import { messages, today, prevView, nextView } from '../../messages';
|
|
10
11
|
import { Action } from '../models';
|
|
@@ -176,11 +177,11 @@ var Header = {
|
|
|
176
177
|
|
|
177
178
|
var isPrevDisabled = !this.canNavigate(Action.PrevView);
|
|
178
179
|
var isNextDisabled = !this.canNavigate(Action.NextView);
|
|
179
|
-
var titleClassNames = classNames('k-calendar-title', 'k-
|
|
180
|
-
'k-
|
|
180
|
+
var titleClassNames = classNames('k-calendar-title', 'k-title', {
|
|
181
|
+
'k-disabled': !this.navigate
|
|
181
182
|
});
|
|
182
183
|
var todayClassNames = classNames('k-nav-today', {
|
|
183
|
-
'k-
|
|
184
|
+
'k-disabled': !this.todayIsInRange
|
|
184
185
|
});
|
|
185
186
|
var headerTitle;
|
|
186
187
|
var headerTitleDefaultRendering = // @ts-ignore function children
|
|
@@ -210,29 +211,28 @@ var Header = {
|
|
|
210
211
|
"class": 'k-spacer'
|
|
211
212
|
}), h("span", {
|
|
212
213
|
"class": 'k-calendar-nav k-hstack'
|
|
213
|
-
}, [
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
'k-button k-flat k-icon-button': true,
|
|
217
|
-
'k-state-disabled': isPrevDisabled
|
|
218
|
-
},
|
|
219
|
-
tabIndex: this.$props.tabIndex,
|
|
214
|
+
}, [// @ts-ignore
|
|
215
|
+
h(KButton, {
|
|
216
|
+
icon: 'arrow-60-left',
|
|
220
217
|
attrs: this.v3 ? undefined : {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
218
|
+
icon: 'arrow-60-left',
|
|
219
|
+
size: this.$props.size,
|
|
220
|
+
fillMode: 'flat',
|
|
221
|
+
desabled: isPrevDisabled,
|
|
222
|
+
"aria-label": prevViewTitle,
|
|
223
|
+
title: prevViewTitle
|
|
225
224
|
},
|
|
225
|
+
size: this.$props.size,
|
|
226
|
+
fillMode: 'flat',
|
|
227
|
+
"class": "k-prev-view",
|
|
228
|
+
desabled: isPrevDisabled,
|
|
229
|
+
"aria-label": prevViewTitle,
|
|
226
230
|
title: prevViewTitle,
|
|
227
|
-
type: "button",
|
|
228
231
|
onClick: this.handlePrevClick,
|
|
229
232
|
on: this.v3 ? undefined : {
|
|
230
233
|
"click": this.handlePrevClick
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
}, [h("span", {
|
|
234
|
-
"class": "k-button-icon k-icon k-i-arrow-60-left"
|
|
235
|
-
})]), h("span", {
|
|
234
|
+
}
|
|
235
|
+
}), h("span", {
|
|
236
236
|
"class": todayClassNames,
|
|
237
237
|
tabIndex: this.$props.tabIndex,
|
|
238
238
|
attrs: this.v3 ? undefined : {
|
|
@@ -244,29 +244,28 @@ var Header = {
|
|
|
244
244
|
"click": this.handleTodayClick
|
|
245
245
|
},
|
|
246
246
|
onClick: this.handleTodayClick
|
|
247
|
-
}, [todayMessage]),
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
'k-button k-flat k-icon-button': true,
|
|
251
|
-
'k-state-disabled': isNextDisabled
|
|
252
|
-
},
|
|
253
|
-
tabIndex: this.$props.tabIndex,
|
|
247
|
+
}, [todayMessage]), // @ts-ignore
|
|
248
|
+
h(KButton, {
|
|
249
|
+
icon: 'arrow-60-right',
|
|
254
250
|
attrs: this.v3 ? undefined : {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
251
|
+
icon: 'arrow-60-right',
|
|
252
|
+
size: this.$props.size,
|
|
253
|
+
fillMode: 'flat',
|
|
254
|
+
desabled: isNextDisabled,
|
|
255
|
+
"aria-label": nextViewTittle,
|
|
256
|
+
title: nextViewTittle
|
|
259
257
|
},
|
|
258
|
+
size: this.$props.size,
|
|
259
|
+
fillMode: 'flat',
|
|
260
|
+
"class": "k-next-view",
|
|
261
|
+
desabled: isNextDisabled,
|
|
262
|
+
"aria-label": nextViewTittle,
|
|
260
263
|
title: nextViewTittle,
|
|
261
|
-
type: "button",
|
|
262
264
|
onClick: this.handleNextClick,
|
|
263
265
|
on: this.v3 ? undefined : {
|
|
264
266
|
"click": this.handleNextClick
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
}, [h("span", {
|
|
268
|
-
"class": "k-button-icon k-icon k-i-arrow-60-right"
|
|
269
|
-
})])])]);
|
|
267
|
+
}
|
|
268
|
+
})])]);
|
|
270
269
|
}
|
|
271
270
|
};
|
|
272
271
|
var HeaderVue3 = Header;
|
|
@@ -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 DefaultMethods<V> = {
|
|
4
3
|
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
4
|
};
|
|
@@ -98,7 +97,7 @@ export interface ViewData {
|
|
|
98
97
|
/**
|
|
99
98
|
* @hidden
|
|
100
99
|
*/
|
|
101
|
-
export interface ViewAllMethods extends
|
|
100
|
+
export interface ViewAllMethods extends Vue2type, ViewMethods, ViewComputed, ViewState {
|
|
102
101
|
}
|
|
103
102
|
declare let View: ComponentOptions<ViewAllMethods, DefaultData<ViewData>, DefaultMethods<ViewAllMethods>, ViewComputed, RecordPropsDefinition<ViewProps>>;
|
|
104
103
|
declare const ViewVue3: DefineComponent<ViewProps, any, ViewData, ViewComputed, ViewMethods, {}, {}, {}, string, ViewProps, ViewProps, {}>;
|
|
@@ -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 DefaultMethods<V> = {
|
|
4
3
|
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
4
|
};
|
|
@@ -106,7 +105,7 @@ export interface ViewListData {
|
|
|
106
105
|
/**
|
|
107
106
|
* @hidden
|
|
108
107
|
*/
|
|
109
|
-
export interface ViewListAll extends
|
|
108
|
+
export interface ViewListAll extends Vue2type, ViewListMethods, ViewListComputed, ViewListState, ViewListData {
|
|
110
109
|
}
|
|
111
110
|
declare let ViewList: ComponentOptions<ViewListAll, DefaultData<ViewListData>, DefaultMethods<ViewListAll>, ViewListComputed, RecordPropsDefinition<ViewListProps>>;
|
|
112
111
|
declare const ViewListVue3: DefineComponent<ViewListProps, any, ViewListData, ViewListComputed, ViewListMethods, {}, {}, {}, string, ViewListProps, ViewListProps, {}>;
|
|
@@ -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) => {});
|
|
4
3
|
declare type DefaultMethods<V> = {
|
|
5
4
|
[key: string]: (this: V, ...args: any[]) => any;
|
|
@@ -14,6 +13,6 @@ export interface PickerWrapProps {
|
|
|
14
13
|
/**
|
|
15
14
|
* Represents the default `pickerWrap` component
|
|
16
15
|
*/
|
|
17
|
-
declare let PickerWrap: ComponentOptions<
|
|
16
|
+
declare let PickerWrap: ComponentOptions<Vue2type, DefaultData<{}>, DefaultMethods<Vue2type>, {}, RecordPropsDefinition<PickerWrapProps>>;
|
|
18
17
|
declare const PickerWrapVue3: DefineComponent<PickerWrapProps, any, {}, {}, {}, {}, {}, {}, string, PickerWrapProps, PickerWrapProps, {}>;
|
|
19
18
|
export { PickerWrap, PickerWrapVue3 };
|
|
@@ -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
|
import { DateInputData } from './interfaces/DateInputData';
|
|
4
3
|
import { DateInputMethods } from './interfaces/DateInputMethods';
|
|
5
4
|
import { DateInputComputed } from './interfaces/DateInputComputed';
|
|
@@ -12,7 +11,7 @@ declare type DefaultMethods<V> = {
|
|
|
12
11
|
/**
|
|
13
12
|
* @hidden
|
|
14
13
|
*/
|
|
15
|
-
export interface DateInputAll extends
|
|
14
|
+
export interface DateInputAll extends Vue2type, DateInputMethods, DateInputData, DateInputComputed, DateInputState {
|
|
16
15
|
}
|
|
17
16
|
declare let DateInput: ComponentOptions<DateInputAll, DefaultData<DateInputData>, DefaultMethods<DateInputAll>, DateInputComputed, RecordPropsDefinition<DateInputProps>>;
|
|
18
17
|
declare const DateInputVue3: DefineComponent<DateInputProps, any, DateInputData, DateInputComputed, DateInputMethods, {}, {}, {}, string, DateInputProps, DateInputProps, {}>;
|
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++) {
|
|
3
|
-
s += arguments[i].length;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++) {
|
|
7
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {
|
|
8
|
-
r[k] = a[j];
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
return r;
|
|
13
|
-
}; // @ts-ignore
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
// @ts-ignore
|
|
16
2
|
import * as Vue from 'vue';
|
|
17
3
|
var allVue = Vue;
|
|
18
4
|
var gh = allVue.h;
|
|
@@ -21,9 +7,10 @@ var inject = allVue.inject;
|
|
|
21
7
|
import { isEqual, cloneDate } from '@progress/kendo-date-math';
|
|
22
8
|
import { provideIntlService, provideLocalizationService } from '@progress/kendo-vue-intl';
|
|
23
9
|
import { KendoDate } from './models';
|
|
24
|
-
import { guid, noop, validatePackage, canUseDOM } from '@progress/kendo-vue-common';
|
|
10
|
+
import { guid, noop, validatePackage, canUseDOM, kendoThemeMaps, getDefaultSlots } from '@progress/kendo-vue-common';
|
|
11
|
+
import { Button as KButton } from '@progress/kendo-vue-buttons';
|
|
25
12
|
import { packageMetadata } from '../package-metadata';
|
|
26
|
-
import { approximateStringMatching, defaultFormat, defaultFormatPlaceholder, isInRange
|
|
13
|
+
import { approximateStringMatching, defaultFormat, defaultFormatPlaceholder, isInRange } from './utils';
|
|
27
14
|
import { MAX_DATE, MIN_DATE } from './../utils';
|
|
28
15
|
import { messages, increaseValue, decreaseValue } from './../messages';
|
|
29
16
|
import { isInTimeRange } from '../timepicker/utils';
|
|
@@ -67,6 +54,27 @@ var DateInput = {
|
|
|
67
54
|
return defaultFormatPlaceholder;
|
|
68
55
|
}
|
|
69
56
|
},
|
|
57
|
+
rounded: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: 'medium',
|
|
60
|
+
validator: function validator(value) {
|
|
61
|
+
return ['small', 'medium', 'large', 'full'].includes(value);
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
fillMode: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: 'solid',
|
|
67
|
+
validator: function validator(value) {
|
|
68
|
+
return ['solid', 'flat', 'outline'].includes(value);
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
size: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: 'medium',
|
|
74
|
+
validator: function validator(value) {
|
|
75
|
+
return ['small', 'medium', 'large'].includes(value);
|
|
76
|
+
}
|
|
77
|
+
},
|
|
70
78
|
tabIndex: Number,
|
|
71
79
|
title: String,
|
|
72
80
|
steps: Object,
|
|
@@ -162,15 +170,18 @@ var DateInput = {
|
|
|
162
170
|
},
|
|
163
171
|
wrapperClassNames: {
|
|
164
172
|
get: function get() {
|
|
173
|
+
var _a;
|
|
174
|
+
|
|
165
175
|
var isValid = !this.$data.hasMounted || !this.$props.validityStyles || this.validity().valid;
|
|
166
176
|
var disabled = this.$props.disabled;
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
'k-
|
|
173
|
-
|
|
177
|
+
var _b = this.$props,
|
|
178
|
+
size = _b.size,
|
|
179
|
+
fillMode = _b.fillMode,
|
|
180
|
+
rounded = _b.rounded;
|
|
181
|
+
return _a = {
|
|
182
|
+
'k-dateinput': true,
|
|
183
|
+
'k-input': true
|
|
184
|
+
}, _a["k-input-" + (kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-input-" + fillMode] = fillMode, _a["k-rounded-" + (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;
|
|
174
185
|
}
|
|
175
186
|
}
|
|
176
187
|
},
|
|
@@ -518,6 +529,7 @@ var DateInput = {
|
|
|
518
529
|
var _this = this;
|
|
519
530
|
|
|
520
531
|
var h = gh || createElement;
|
|
532
|
+
var defaultSlot = getDefaultSlots(this);
|
|
521
533
|
var localizationService = provideLocalizationService(this);
|
|
522
534
|
var _a = this.$props,
|
|
523
535
|
formatPlaceholder = _a.formatPlaceholder,
|
|
@@ -548,21 +560,12 @@ var DateInput = {
|
|
|
548
560
|
var textToDisplay = !showPlaceHolder ? currentText : null;
|
|
549
561
|
var inputId = id || this._inputId;
|
|
550
562
|
var isValid = !this.$props.validityStyles || this.validity().valid;
|
|
551
|
-
|
|
552
|
-
var wrapperClassesInstance = __spreadArrays(wrapperClasses);
|
|
553
|
-
|
|
554
|
-
if (this.$props.className) {
|
|
555
|
-
wrapperClassesInstance.push(this.$props.className);
|
|
556
|
-
}
|
|
557
|
-
|
|
558
563
|
var dateinput = h("span", {
|
|
564
|
+
"class": this.wrapperClassNames,
|
|
559
565
|
dir: this.$props.dir,
|
|
560
566
|
attrs: this.v3 ? undefined : {
|
|
561
567
|
dir: this.$props.dir
|
|
562
|
-
}
|
|
563
|
-
"class": wrapperClassesInstance.join(' ')
|
|
564
|
-
}, [h("span", {
|
|
565
|
-
"class": this.wrapperClassNames
|
|
568
|
+
}
|
|
566
569
|
}, [h("input", {
|
|
567
570
|
role: "spinbutton",
|
|
568
571
|
attrs: this.v3 ? undefined : {
|
|
@@ -589,7 +592,7 @@ var DateInput = {
|
|
|
589
592
|
spellcheck: false,
|
|
590
593
|
autoComplete: "off",
|
|
591
594
|
autoCorrect: "off",
|
|
592
|
-
"class": "k-input",
|
|
595
|
+
"class": "k-input-inner",
|
|
593
596
|
id: inputId,
|
|
594
597
|
placeholder: this.$props.placeholder,
|
|
595
598
|
onWheel: this.wheel,
|
|
@@ -620,41 +623,51 @@ var DateInput = {
|
|
|
620
623
|
ref: this.v3 ? function (el) {
|
|
621
624
|
_this.inputRef = el;
|
|
622
625
|
} : 'input'
|
|
623
|
-
}),
|
|
624
|
-
"class": "k-
|
|
626
|
+
}), defaultSlot, this.$props.spinners && h("span", {
|
|
627
|
+
"class": "k-input-spinner k-spin-button",
|
|
625
628
|
onMousedown: this.spinnersMouseDown,
|
|
626
629
|
on: this.v3 ? undefined : {
|
|
627
630
|
"mousedown": this.spinnersMouseDown
|
|
628
631
|
}
|
|
629
|
-
}, [
|
|
630
|
-
|
|
631
|
-
|
|
632
|
+
}, [// @ts-ignore
|
|
633
|
+
h(KButton, {
|
|
634
|
+
icon: 'arrow-n',
|
|
632
635
|
attrs: this.v3 ? undefined : {
|
|
636
|
+
icon: 'arrow-n',
|
|
637
|
+
size: this.$props.size,
|
|
638
|
+
fillMode: this.$props.fillMode,
|
|
633
639
|
"aria-label": localizationService.toLanguageString(increaseValue, messages[increaseValue]),
|
|
634
640
|
title: localizationService.toLanguageString(increaseValue, messages[increaseValue])
|
|
635
641
|
},
|
|
642
|
+
size: this.$props.size,
|
|
643
|
+
fillMode: this.$props.fillMode,
|
|
644
|
+
"class": "k-spinner-increase",
|
|
645
|
+
"aria-label": localizationService.toLanguageString(increaseValue, messages[increaseValue]),
|
|
636
646
|
title: localizationService.toLanguageString(increaseValue, messages[increaseValue]),
|
|
637
647
|
onClick: this.increasePart,
|
|
638
648
|
on: this.v3 ? undefined : {
|
|
639
649
|
"click": this.increasePart
|
|
640
650
|
}
|
|
641
|
-
},
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
"aria-label": localizationService.toLanguageString(decreaseValue, messages[decreaseValue]),
|
|
651
|
+
}), // @ts-ignore
|
|
652
|
+
h(KButton, {
|
|
653
|
+
"class": "k-spinner-decrease",
|
|
654
|
+
icon: 'arrow-s',
|
|
646
655
|
attrs: this.v3 ? undefined : {
|
|
656
|
+
icon: 'arrow-s',
|
|
657
|
+
size: this.$props.size,
|
|
658
|
+
fillMode: this.$props.fillMode,
|
|
647
659
|
"aria-label": localizationService.toLanguageString(decreaseValue, messages[decreaseValue]),
|
|
648
660
|
title: localizationService.toLanguageString(decreaseValue, messages[decreaseValue])
|
|
649
661
|
},
|
|
662
|
+
size: this.$props.size,
|
|
663
|
+
fillMode: this.$props.fillMode,
|
|
664
|
+
"aria-label": localizationService.toLanguageString(decreaseValue, messages[decreaseValue]),
|
|
650
665
|
title: localizationService.toLanguageString(decreaseValue, messages[decreaseValue]),
|
|
651
666
|
onClick: this.decreasePart,
|
|
652
667
|
on: this.v3 ? undefined : {
|
|
653
668
|
"click": this.decreasePart
|
|
654
669
|
}
|
|
655
|
-
}
|
|
656
|
-
"class": "k-icon k-i-arrow-s"
|
|
657
|
-
})])])])]);
|
|
670
|
+
})])]);
|
|
658
671
|
return label ? // @ts-ignore function children
|
|
659
672
|
h(FloatingLabel, {
|
|
660
673
|
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
|
*/
|
|
@@ -78,6 +78,6 @@ export var isInRange = function (candidate, min, max) { return (candidate === nu
|
|
|
78
78
|
/**
|
|
79
79
|
* @hidden
|
|
80
80
|
*/
|
|
81
|
-
export var invalidClasses = ['k-
|
|
81
|
+
export var invalidClasses = ['k-invalid'];
|
|
82
82
|
/** @hidden */
|
|
83
|
-
export var wrapperClasses = ['k-
|
|
83
|
+
export var 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, {}>;
|