@progress/kendo-angular-dateinputs 11.4.0-develop.8 → 11.4.0-develop.9
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/calendar/calendar.component.d.ts +18 -1
- package/common/adaptive.module.d.ts +18 -0
- package/datepicker/datepicker.component.d.ts +57 -6
- package/datepicker/datepicker.module.d.ts +2 -1
- package/daterange/date-range-popup.component.d.ts +58 -7
- package/daterange/date-range-selection.directive.d.ts +12 -2
- package/daterange/date-range.module.d.ts +9 -6
- package/daterange/localization/daterange-popup-custom-messages.component.d.ts +17 -0
- package/daterange/localization/daterange-popup-localized-messages.directive.d.ts +16 -0
- package/daterange/localization/messages.d.ts +29 -0
- package/datetimepicker/datetimepicker.component.d.ts +58 -5
- package/datetimepicker/datetimepicker.module.d.ts +2 -1
- package/esm2020/calendar/calendar.component.mjs +34 -2
- package/esm2020/calendar/multiview-calendar.component.mjs +2 -1
- package/esm2020/common/adaptive.module.mjs +41 -0
- package/esm2020/datepicker/datepicker.component.mjs +271 -48
- package/esm2020/datepicker/datepicker.module.mjs +7 -3
- package/esm2020/daterange/date-range-popup.component.mjs +320 -17
- package/esm2020/daterange/date-range-selection.directive.mjs +27 -12
- package/esm2020/daterange/date-range.component.mjs +1 -1
- package/esm2020/daterange/date-range.module.mjs +16 -5
- package/esm2020/daterange/localization/daterange-popup-custom-messages.component.mjs +41 -0
- package/esm2020/daterange/localization/daterange-popup-localized-messages.directive.mjs +37 -0
- package/esm2020/daterange/localization/messages.mjs +29 -0
- package/esm2020/datetimepicker/datetimepicker.component.mjs +306 -49
- package/esm2020/datetimepicker/datetimepicker.module.mjs +7 -3
- package/esm2020/index.mjs +3 -0
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/timepicker/services/dom.service.mjs +33 -7
- package/esm2020/timepicker/timepicker.component.mjs +279 -33
- package/esm2020/timepicker/timepicker.module.mjs +5 -2
- package/esm2020/timepicker/timeselector.component.mjs +7 -1
- package/esm2020/util.mjs +18 -0
- package/fesm2015/progress-kendo-angular-dateinputs.mjs +1417 -175
- package/fesm2020/progress-kendo-angular-dateinputs.mjs +1417 -175
- package/index.d.ts +4 -0
- package/package.json +11 -9
- package/timepicker/services/dom.service.d.ts +3 -0
- package/timepicker/timepicker.component.d.ts +52 -5
- package/timepicker/timepicker.module.d.ts +2 -1
- package/timepicker/timeselector.component.d.ts +7 -2
- package/util.d.ts +12 -0
|
@@ -17,6 +17,7 @@ import { DateTimePickerComponent } from './datetimepicker.component';
|
|
|
17
17
|
import { DateTimePickerCustomMessagesComponent } from './localization/datetimepicker-custom-messages.component';
|
|
18
18
|
import { LocalizedMessagesDirective } from './localization/localized-messages.directive';
|
|
19
19
|
import { IconsModule } from '@progress/kendo-angular-icons';
|
|
20
|
+
import { AdaptiveModule } from '../common/adaptive.module';
|
|
20
21
|
import * as i0 from "@angular/core";
|
|
21
22
|
const COMPONENT_DIRECTIVES = [
|
|
22
23
|
DateTimePickerComponent,
|
|
@@ -40,7 +41,8 @@ DateTimePickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", ve
|
|
|
40
41
|
PopupModule,
|
|
41
42
|
EventsModule,
|
|
42
43
|
TemplatesModule,
|
|
43
|
-
IconsModule
|
|
44
|
+
IconsModule,
|
|
45
|
+
AdaptiveModule], exports: [DateTimePickerComponent,
|
|
44
46
|
DateTimePickerCustomMessagesComponent,
|
|
45
47
|
LocalizedMessagesDirective, TemplatesModule] });
|
|
46
48
|
DateTimePickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DateTimePickerModule, providers: [
|
|
@@ -54,7 +56,8 @@ DateTimePickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ve
|
|
|
54
56
|
PopupModule,
|
|
55
57
|
EventsModule,
|
|
56
58
|
TemplatesModule,
|
|
57
|
-
IconsModule
|
|
59
|
+
IconsModule,
|
|
60
|
+
AdaptiveModule
|
|
58
61
|
], TemplatesModule] });
|
|
59
62
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DateTimePickerModule, decorators: [{
|
|
60
63
|
type: NgModule,
|
|
@@ -75,7 +78,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
75
78
|
PopupModule,
|
|
76
79
|
EventsModule,
|
|
77
80
|
TemplatesModule,
|
|
78
|
-
IconsModule
|
|
81
|
+
IconsModule,
|
|
82
|
+
AdaptiveModule
|
|
79
83
|
],
|
|
80
84
|
providers: [
|
|
81
85
|
{ provide: TOUCH_ENABLED, useValue: touchEnabled }
|
package/esm2020/index.mjs
CHANGED
|
@@ -57,3 +57,6 @@ export { TimePickerCustomMessagesComponent } from './timepicker/localization/tim
|
|
|
57
57
|
export { TimeSelectorCustomMessagesComponent } from './timepicker/localization/timeselector-custom-messages.component';
|
|
58
58
|
export { LocalizedMessagesDirective } from './datetimepicker/localization/localized-messages.directive';
|
|
59
59
|
export { DateTimePickerCustomMessagesComponent } from './datetimepicker/localization/datetimepicker-custom-messages.component';
|
|
60
|
+
export { DateRangePopupCustomMessagesComponent } from './daterange/localization/daterange-popup-custom-messages.component';
|
|
61
|
+
export { DateRangePopupLocalizedMessagesDirective } from './daterange/localization/daterange-popup-localized-messages.directive';
|
|
62
|
+
export { AdaptiveModule } from './common/adaptive.module';
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-dateinputs',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
13
|
-
version: '11.4.0-develop.
|
|
12
|
+
publishDate: 1678800266,
|
|
13
|
+
version: '11.4.0-develop.9',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
15
15
|
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { Injectable } from '@angular/core';
|
|
6
6
|
import { isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
7
|
-
import { domContainerFactory as containerFactory } from '../../util';
|
|
7
|
+
import { domContainerFactory as containerFactory, windowSize } from '../../util';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
const div = containerFactory('div');
|
|
10
10
|
const ul = containerFactory('ul');
|
|
@@ -14,17 +14,35 @@ const listTitle = () => span('hour', 'k-title k-timeselector-title');
|
|
|
14
14
|
const listItem = () => li('<span>02</span>', 'k-item');
|
|
15
15
|
const list = () => ul([listItem()], 'k-reset');
|
|
16
16
|
const scrollable = () => (div([list()], 'k-time-container k-flex k-content k-scrollable'));
|
|
17
|
-
const
|
|
17
|
+
const actionSheetContent = (isDateTimePicker) => ([
|
|
18
|
+
isDateTimePicker ? div([div('button', 'k-button k-button-lg')], 'k-datetime-buttongroup') : null,
|
|
19
|
+
div([
|
|
20
|
+
div([span('title', 'k-title')], 'k-time-header'),
|
|
21
|
+
div([listTitle(), div([scrollable()], 'k-time-list')], 'k-time-list-wrapper')
|
|
22
|
+
], 'k-timeselector k-timeselector-lg')
|
|
23
|
+
]);
|
|
24
|
+
const timeListWrapper = (isAdaptiveEnabled = false, windowSize, isDateTimePicker) => {
|
|
18
25
|
if (!isDocumentAvailable()) {
|
|
19
26
|
return null;
|
|
20
27
|
}
|
|
21
|
-
|
|
28
|
+
if (!isAdaptiveEnabled) {
|
|
29
|
+
return div([listTitle(), div([scrollable()], 'k-time-list')], 'k-time-list-wrapper', { left: '-10000px', position: 'absolute' });
|
|
30
|
+
}
|
|
31
|
+
return div([div([div([div([div([], 'k-i-x k-button-icon k-icon')], 'k-icon-wrapper-host')], 'k-button k-icon-button k-button-lg')], 'k-actionsheet-titlebar'),
|
|
32
|
+
div([
|
|
33
|
+
isDateTimePicker ? div([...actionSheetContent(isDateTimePicker)], 'k-datetime-wrap k-time-tab') : actionSheetContent(isDateTimePicker)[1]
|
|
34
|
+
], 'k-actionsheet-content'),
|
|
35
|
+
div([
|
|
36
|
+
div('button', 'k-button k-button-lg')
|
|
37
|
+
], 'k-adaptive-actionsheet k-actionsheet-footer')], `k-actionsheet k-adaptive-actionsheet ${windowSize === 'small' ? 'k-actionsheet-fullscreen' : ''}`, { height: windowSize === 'small' ? '100%' : '60vh', left: '-10000px', position: 'absolute', top: 0 });
|
|
22
38
|
};
|
|
23
|
-
const TIMELIST_WRAPPER = timeListWrapper();
|
|
24
39
|
/**
|
|
25
40
|
* @hidden
|
|
26
41
|
*/
|
|
27
42
|
export class TimePickerDOMService {
|
|
43
|
+
get windowSize() {
|
|
44
|
+
return windowSize();
|
|
45
|
+
}
|
|
28
46
|
ensureHeights() {
|
|
29
47
|
if (this.timeListHeight !== undefined) {
|
|
30
48
|
return;
|
|
@@ -35,9 +53,17 @@ export class TimePickerDOMService {
|
|
|
35
53
|
if (!isDocumentAvailable()) {
|
|
36
54
|
return;
|
|
37
55
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
56
|
+
let wrapper;
|
|
57
|
+
let hostContainer;
|
|
58
|
+
if (!this.isAdaptiveEnabled || this.windowSize === 'large') { // not adaptive
|
|
59
|
+
const listContainer = container && container.querySelector('.k-time-list-container');
|
|
60
|
+
hostContainer = listContainer || document.body;
|
|
61
|
+
wrapper = hostContainer.appendChild(timeListWrapper());
|
|
62
|
+
}
|
|
63
|
+
else { // adaptive mode
|
|
64
|
+
hostContainer = document.body;
|
|
65
|
+
wrapper = hostContainer.appendChild(timeListWrapper(true, this.windowSize, this.isDateTimePicker));
|
|
66
|
+
}
|
|
41
67
|
this.timeListHeight = wrapper.querySelector('.k-scrollable').getBoundingClientRect().height;
|
|
42
68
|
this.itemHeight = wrapper.querySelector('li').getBoundingClientRect().height;
|
|
43
69
|
hostContainer.removeChild(wrapper);
|