@progress/kendo-react-dateinputs 14.4.1-develop.9 → 14.5.0-develop.1
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/components/Calendar.d.ts +35 -110
- package/calendar/components/Calendar.js +5 -5
- package/calendar/components/Calendar.mjs +288 -313
- package/calendar/components/CalendarCell.d.ts +1 -10
- package/calendar/components/CalendarCell.js +1 -1
- package/calendar/components/CalendarCell.mjs +68 -78
- package/calendar/components/Header.d.ts +11 -24
- package/calendar/components/Header.js +1 -1
- package/calendar/components/Header.mjs +41 -55
- package/calendar/components/HorizontalViewList.d.ts +29 -27
- package/calendar/components/HorizontalViewList.js +1 -1
- package/calendar/components/HorizontalViewList.mjs +112 -102
- package/calendar/components/MultiViewCalendar.d.ts +39 -141
- package/calendar/components/MultiViewCalendar.js +1 -1
- package/calendar/components/MultiViewCalendar.mjs +331 -373
- package/calendar/components/Navigation.d.ts +19 -39
- package/calendar/components/Navigation.js +1 -1
- package/calendar/components/Navigation.mjs +95 -107
- package/calendar/components/TodayCommand.d.ts +8 -25
- package/calendar/components/TodayCommand.js +1 -1
- package/calendar/components/TodayCommand.mjs +44 -61
- package/calendar/components/View.d.ts +12 -43
- package/calendar/components/View.js +1 -1
- package/calendar/components/View.mjs +111 -137
- package/calendar/components/ViewList.d.ts +27 -67
- package/calendar/components/ViewList.js +1 -1
- package/calendar/components/ViewList.mjs +207 -225
- package/calendar/models/CalendarSettings.d.ts +2 -2
- package/calendar/models/MultiViewCalendarSettings.d.ts +4 -4
- package/calendar/models/ViewService.d.ts +1 -1
- package/calendar/models/index.d.ts +7 -7
- package/calendar/services/BusViewService.d.ts +1 -1
- package/calendar/services/DecadeViewService.d.ts +2 -2
- package/calendar/services/MonthViewService.d.ts +2 -2
- package/calendar/services/NavigationService.d.ts +1 -1
- package/calendar/services/ScrollSyncService.d.ts +4 -4
- package/calendar/services/WeekNamesService.d.ts +1 -1
- package/calendar/services/YearViewService.d.ts +2 -2
- package/dateinput/DateInput.d.ts +1 -1
- package/dateinput/models/DateInputSettings.d.ts +2 -2
- package/dateinput/models/dateinput-options.d.ts +2 -2
- package/dateinput/models/index.d.ts +7 -7
- package/dateinput/models/kendo-date.d.ts +1 -1
- package/datepicker/models/DatePickerSettings.d.ts +2 -2
- package/datepicker/models/index.d.ts +1 -1
- package/daterangepicker/models/DateRangePickerCalendarSettings.d.ts +1 -1
- package/daterangepicker/models/DateRangePickerDateInputSettings.d.ts +1 -1
- package/daterangepicker/models/DateRangePickerSettings.d.ts +3 -3
- package/daterangepicker/models/index.d.ts +4 -4
- package/datetimepicker/DateTimePicker.d.ts +1 -1
- package/datetimepicker/models/DateTimePickerSettings.d.ts +1 -1
- package/datetimepicker/models/index.d.ts +1 -1
- package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
- package/index.d.mts +1 -1
- package/index.d.ts +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +8 -8
- package/timepicker/TimePart.d.ts +1 -1
- package/timepicker/TimePicker.d.ts +1 -1
- package/timepicker/TimeSelector.d.ts +1 -1
- package/timepicker/models/ListService.d.ts +2 -2
- package/timepicker/models/TimePickerSettings.d.ts +3 -3
- package/timepicker/models/index.d.ts +5 -5
- package/timepicker/services/DayPeriodService.d.ts +3 -3
- package/timepicker/services/HoursService.d.ts +3 -3
- package/timepicker/services/MinutesService.d.ts +3 -3
- package/timepicker/services/SecondsService.d.ts +3 -3
- package/virtualization/Virtualization.d.ts +25 -63
- package/virtualization/Virtualization.js +1 -1
- package/virtualization/Virtualization.mjs +163 -168
package/index.d.mts
CHANGED
|
@@ -33,7 +33,7 @@ import { ViewList } from './calendar/components/ViewList.js';
|
|
|
33
33
|
import { Virtualization } from './virtualization/Virtualization.js';
|
|
34
34
|
import { HorizontalViewList, HorizontalViewListProps } from './calendar/components/HorizontalViewList.js';
|
|
35
35
|
import { TimeSelector } from './timepicker/TimeSelector.js';
|
|
36
|
-
import { DateInputsPopupSettings } from './PopupSettings
|
|
36
|
+
import { DateInputsPopupSettings } from './PopupSettings';
|
|
37
37
|
export * from './calendar/services/index.js';
|
|
38
38
|
export { DayPeriodService, HoursService, MinutesService, SecondsService } from './timepicker/services/index.js';
|
|
39
39
|
export * from './calendar/models/index.js';
|
package/index.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ import { ViewList } from './calendar/components/ViewList.js';
|
|
|
33
33
|
import { Virtualization } from './virtualization/Virtualization.js';
|
|
34
34
|
import { HorizontalViewList, HorizontalViewListProps } from './calendar/components/HorizontalViewList.js';
|
|
35
35
|
import { TimeSelector } from './timepicker/TimeSelector.js';
|
|
36
|
-
import { DateInputsPopupSettings } from './PopupSettings
|
|
36
|
+
import { DateInputsPopupSettings } from './PopupSettings';
|
|
37
37
|
export * from './calendar/services/index.js';
|
|
38
38
|
export { DayPeriodService, HoursService, MinutesService, SecondsService } from './timepicker/services/index.js';
|
|
39
39
|
export * from './calendar/models/index.js';
|
package/package-metadata.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-dateinputs",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-dateinputs",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1777909919,version:"14.5.0-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"});exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export const packageMetadata = Object.freeze({
|
|
|
6
6
|
productName: 'KendoReact',
|
|
7
7
|
productCode: 'KENDOUIREACT',
|
|
8
8
|
productCodes: ['KENDOUIREACT'],
|
|
9
|
-
publishDate:
|
|
10
|
-
version: '14.
|
|
9
|
+
publishDate: 1777909919,
|
|
10
|
+
version: '14.5.0-develop.1',
|
|
11
11
|
licensingDocsUrl:
|
|
12
12
|
'https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
13
13
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-dateinputs",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.5.0-develop.1",
|
|
4
4
|
"description": "React DateInput is a perfect input component for handling quick and efficient date values. KendoReact Date Inputs package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"@progress/kendo-date-math": "^1.4.0",
|
|
29
29
|
"@progress/kendo-licensing": "^1.7.2",
|
|
30
30
|
"@progress/kendo-dateinputs-common": "^0.4.7",
|
|
31
|
-
"@progress/kendo-react-buttons": "14.
|
|
32
|
-
"@progress/kendo-react-common": "14.
|
|
33
|
-
"@progress/kendo-react-intl": "14.
|
|
34
|
-
"@progress/kendo-react-labels": "14.
|
|
35
|
-
"@progress/kendo-react-layout": "14.
|
|
36
|
-
"@progress/kendo-react-popup": "14.
|
|
31
|
+
"@progress/kendo-react-buttons": "14.5.0-develop.1",
|
|
32
|
+
"@progress/kendo-react-common": "14.5.0-develop.1",
|
|
33
|
+
"@progress/kendo-react-intl": "14.5.0-develop.1",
|
|
34
|
+
"@progress/kendo-react-labels": "14.5.0-develop.1",
|
|
35
|
+
"@progress/kendo-react-layout": "14.5.0-develop.1",
|
|
36
|
+
"@progress/kendo-react-popup": "14.5.0-develop.1",
|
|
37
37
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
38
38
|
"react": "^18.0.0 || ^19.0.0",
|
|
39
39
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"package": {
|
|
90
90
|
"productName": "KendoReact",
|
|
91
91
|
"productCode": "KENDOUIREACT",
|
|
92
|
-
"publishDate":
|
|
92
|
+
"publishDate": 1777909919,
|
|
93
93
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"
|
|
94
94
|
}
|
|
95
95
|
},
|
package/timepicker/TimePart.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { default as PropTypes } from 'prop-types';
|
|
9
9
|
import { DateInputsClassStructure } from '@progress/kendo-react-common';
|
|
10
10
|
import { DateFormatPart, IntlService, DateFormatOptions } from '@progress/kendo-react-intl';
|
|
11
|
-
import { TimePickerIncrementalSteps } from './models/IncrementalSteps
|
|
11
|
+
import { TimePickerIncrementalSteps } from './models/IncrementalSteps';
|
|
12
12
|
import * as React from 'react';
|
|
13
13
|
/**
|
|
14
14
|
* @hidden
|
|
@@ -11,7 +11,7 @@ import { LocalizationService } from '@progress/kendo-react-intl';
|
|
|
11
11
|
import { DateInputHandle, DateInputProps } from '../dateinput/DateInput.js';
|
|
12
12
|
import { TimeSelector } from './TimeSelector.js';
|
|
13
13
|
import { TimePickerSettings } from './models/index.js';
|
|
14
|
-
import { DateInputCommonPackageProps } from '../dateinput/models/common-package-props
|
|
14
|
+
import { DateInputCommonPackageProps } from '../dateinput/models/common-package-props';
|
|
15
15
|
import * as React from 'react';
|
|
16
16
|
/**
|
|
17
17
|
* The arguments for the `onChange` event of the TimePicker.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { default as PropTypes } from 'prop-types';
|
|
9
9
|
import { DateInputsClassStructure } from '@progress/kendo-react-common';
|
|
10
10
|
import { IntlService, DateFormatOptions } from '@progress/kendo-react-intl';
|
|
11
|
-
import { TimePickerIncrementalSteps } from './models/IncrementalSteps
|
|
11
|
+
import { TimePickerIncrementalSteps } from './models/IncrementalSteps';
|
|
12
12
|
import * as React from 'react';
|
|
13
13
|
/**
|
|
14
14
|
* @hidden
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { ListItem } from './ListItem
|
|
9
|
-
import { ListServiceSettings } from './ListServiceSettings
|
|
8
|
+
import { ListItem } from './ListItem';
|
|
9
|
+
import { ListServiceSettings } from './ListServiceSettings';
|
|
10
10
|
/**
|
|
11
11
|
* @hidden
|
|
12
12
|
*/
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { DateInputFormatPlaceholder } from '../../dateinput/models/format-placeholder
|
|
9
|
-
import { TimePickerIncrementalSteps } from './IncrementalSteps
|
|
10
|
-
import { DateInputsPopupSettings } from '../../PopupSettings
|
|
8
|
+
import { DateInputFormatPlaceholder } from '../../dateinput/models/format-placeholder';
|
|
9
|
+
import { TimePickerIncrementalSteps } from './IncrementalSteps';
|
|
10
|
+
import { DateInputsPopupSettings } from '../../PopupSettings';
|
|
11
11
|
import { PopupProps } from '@progress/kendo-react-popup';
|
|
12
12
|
import { DateInputProps } from '../../index.js';
|
|
13
13
|
import { DateFormatOptions } from '@progress/kendo-react-intl';
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { TimePickerIncrementalSteps } from './IncrementalSteps
|
|
9
|
-
import { TimePickerSettings } from './TimePickerSettings
|
|
10
|
-
import { ListItem } from './ListItem
|
|
11
|
-
import { ListService } from './ListService
|
|
12
|
-
import { ListServiceSettings } from './ListServiceSettings
|
|
8
|
+
import { TimePickerIncrementalSteps } from './IncrementalSteps';
|
|
9
|
+
import { TimePickerSettings } from './TimePickerSettings';
|
|
10
|
+
import { ListItem } from './ListItem';
|
|
11
|
+
import { ListService } from './ListService';
|
|
12
|
+
import { ListServiceSettings } from './ListServiceSettings';
|
|
13
13
|
import { TIME_PART } from './TimePart.js';
|
|
14
14
|
export { TimePickerIncrementalSteps, TimePickerSettings, ListItem, ListService, ListServiceSettings, TIME_PART };
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import { IntlService } from '@progress/kendo-react-intl';
|
|
9
|
-
import { ListServiceSettings } from '../models/ListServiceSettings
|
|
10
|
-
import { ListService } from '../models/ListService
|
|
11
|
-
import { ListItem } from '../models/ListItem
|
|
9
|
+
import { ListServiceSettings } from '../models/ListServiceSettings';
|
|
10
|
+
import { ListService } from '../models/ListService';
|
|
11
|
+
import { ListItem } from '../models/ListItem';
|
|
12
12
|
/**
|
|
13
13
|
* @hidden
|
|
14
14
|
*/
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import { IntlService } from '@progress/kendo-react-intl';
|
|
9
|
-
import { ListServiceSettings } from '../models/ListServiceSettings
|
|
10
|
-
import { ListService } from '../models/ListService
|
|
11
|
-
import { ListItem } from '../models/ListItem
|
|
9
|
+
import { ListServiceSettings } from '../models/ListServiceSettings';
|
|
10
|
+
import { ListService } from '../models/ListService';
|
|
11
|
+
import { ListItem } from '../models/ListItem';
|
|
12
12
|
/**
|
|
13
13
|
* @hidden
|
|
14
14
|
*/
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import { IntlService } from '@progress/kendo-react-intl';
|
|
9
|
-
import { ListServiceSettings } from '../models/ListServiceSettings
|
|
10
|
-
import { ListService } from '../models/ListService
|
|
11
|
-
import { ListItem } from '../models/ListItem
|
|
9
|
+
import { ListServiceSettings } from '../models/ListServiceSettings';
|
|
10
|
+
import { ListService } from '../models/ListService';
|
|
11
|
+
import { ListItem } from '../models/ListItem';
|
|
12
12
|
/**
|
|
13
13
|
* @hidden
|
|
14
14
|
*/
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import { IntlService } from '@progress/kendo-react-intl';
|
|
9
|
-
import { ListServiceSettings } from '../models/ListServiceSettings
|
|
10
|
-
import { ListService } from '../models/ListService
|
|
11
|
-
import { ListItem } from '../models/ListItem
|
|
9
|
+
import { ListServiceSettings } from '../models/ListServiceSettings';
|
|
10
|
+
import { ListService } from '../models/ListService';
|
|
11
|
+
import { ListItem } from '../models/ListItem';
|
|
12
12
|
/**
|
|
13
13
|
* @hidden
|
|
14
14
|
*/
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { default as PropTypes } from 'prop-types';
|
|
9
8
|
import { DateInputsClassStructure } from '@progress/kendo-react-common';
|
|
10
9
|
import { ScrollAction, PageAction } from './services/index.js';
|
|
11
10
|
import * as React from 'react';
|
|
@@ -57,69 +56,32 @@ export interface VirtualizationProps {
|
|
|
57
56
|
/**
|
|
58
57
|
* @hidden
|
|
59
58
|
*/
|
|
60
|
-
export
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
direction: PropTypes.Requireable<string>;
|
|
65
|
-
forceScroll: PropTypes.Requireable<boolean>;
|
|
66
|
-
itemHeight: PropTypes.Requireable<number>;
|
|
67
|
-
itemWidth: PropTypes.Requireable<number>;
|
|
68
|
-
maxScrollDifference: PropTypes.Requireable<number>;
|
|
69
|
-
onScroll: PropTypes.Requireable<(...args: any[]) => any>;
|
|
70
|
-
onScrollAction: PropTypes.Requireable<(...args: any[]) => any>;
|
|
71
|
-
scrollDuration: PropTypes.Requireable<number>;
|
|
72
|
-
scrollOffsetSize: PropTypes.Requireable<number>;
|
|
73
|
-
skip: PropTypes.Validator<number>;
|
|
74
|
-
tabIndex: PropTypes.Requireable<number>;
|
|
75
|
-
take: PropTypes.Validator<number>;
|
|
76
|
-
topOffset: PropTypes.Validator<number>;
|
|
77
|
-
total: PropTypes.Validator<number>;
|
|
78
|
-
role: PropTypes.Requireable<string>;
|
|
79
|
-
};
|
|
80
|
-
static defaultProps: {
|
|
81
|
-
direction: Direction;
|
|
82
|
-
forceScroll: boolean;
|
|
83
|
-
scrollOffsetSize: number;
|
|
84
|
-
maxScrollDifference: number;
|
|
85
|
-
scrollDuration: number;
|
|
86
|
-
};
|
|
87
|
-
private cancelAnimation;
|
|
88
|
-
private rowHeightService;
|
|
89
|
-
private scrollerService;
|
|
90
|
-
private scrollContainer;
|
|
91
|
-
private scrollAction?;
|
|
92
|
-
private pageAction?;
|
|
93
|
-
private lastDirection;
|
|
94
|
-
private lastTotal;
|
|
95
|
-
private lastTake;
|
|
96
|
-
private animationInProgress;
|
|
97
|
-
private restrictScroll;
|
|
98
|
-
get element(): HTMLDivElement | null;
|
|
99
|
-
protected get containerOffsetSize(): number;
|
|
100
|
-
get containerScrollSize(): number;
|
|
101
|
-
get containerScrollPosition(): number;
|
|
102
|
-
protected get direction(): Direction;
|
|
103
|
-
protected get scrollOffsetSize(): number;
|
|
104
|
-
constructor(props: VirtualizationProps);
|
|
59
|
+
export interface VirtualizationHandle {
|
|
60
|
+
element: HTMLDivElement | null;
|
|
61
|
+
containerScrollSize: number;
|
|
62
|
+
containerScrollPosition: number;
|
|
105
63
|
activeIndex(): number;
|
|
106
|
-
|
|
107
|
-
|
|
64
|
+
scrollTo(value: number): void;
|
|
65
|
+
scrollToIndex(index: number): void;
|
|
66
|
+
animateToIndex(index: number): void;
|
|
67
|
+
scrollToBottom(): void;
|
|
108
68
|
isIndexVisible(index: number): boolean;
|
|
109
69
|
isListScrolled(index: number): boolean;
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
animateToIndex: (index: number) => void;
|
|
113
|
-
scrollToBottom: () => void;
|
|
114
|
-
componentDidMount(): void;
|
|
115
|
-
render(): React.JSX.Element;
|
|
116
|
-
protected scrollStep: (start: number, end: number) => number;
|
|
117
|
-
protected scrollRange: (indexOffset: number, direction: ScrollDirection) => any;
|
|
118
|
-
protected containerMaxScroll: () => number;
|
|
119
|
-
protected getContainerScrollDirection: (indexOffset: number) => ScrollDirection;
|
|
120
|
-
protected initServices: (props?: VirtualizationProps) => void;
|
|
121
|
-
protected getContainerProperty: (propertyName: 'offsetHeight' | 'offsetWidth' | 'scrollHeight' | 'scrollWidth' | 'scrollTop' | 'scrollLeft') => number;
|
|
122
|
-
private handleScroll;
|
|
123
|
-
private handleScrollAction;
|
|
124
|
-
private handlePageAction;
|
|
70
|
+
itemIndex(offset: number): number;
|
|
71
|
+
itemOffset(index: number): number;
|
|
125
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* The default props of the Virtualization component.
|
|
75
|
+
*
|
|
76
|
+
* @hidden
|
|
77
|
+
*/
|
|
78
|
+
export declare const virtualizationDefaultProps: {
|
|
79
|
+
direction: Direction;
|
|
80
|
+
scrollOffsetSize: number;
|
|
81
|
+
maxScrollDifference: number;
|
|
82
|
+
scrollDuration: number;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* @hidden
|
|
86
|
+
*/
|
|
87
|
+
export declare const Virtualization: React.ForwardRefExoticComponent<VirtualizationProps & React.RefAttributes<VirtualizationHandle | null>>;
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ze=require("react"),l=require("prop-types"),d=require("@progress/kendo-react-common"),xe=require("./services/ScrollerService.js");function Ne(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const g=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(n,s,g.get?g:{enumerable:!0,get:()=>t[s]})}}return n.default=t,Object.freeze(n)}const c=Ne(ze),De=(t,n,s)=>Math.min(Math.abs(n-t),s),Ie=17,Me=10,Ce={1:t=>n=>n+t,0:t=>n=>n-t},Oe={1:t=>n=>Math.min(n,t),0:t=>n=>Math.max(n,t)},Pe={1:t=>n=>n<t,0:t=>n=>n>t},S={direction:"vertical",scrollOffsetSize:0,maxScrollDifference:100,scrollDuration:100},P=c.forwardRef((t,n)=>{const{direction:s=S.direction,scrollOffsetSize:g=S.scrollOffsetSize,maxScrollDifference:K=S.maxScrollDifference,scrollDuration:U=S.scrollDuration,bottomOffset:A,className:G,tabIndex:J,role:Q,children:X,unstyled:T,total:b,take:z,skip:Y,topOffset:y,itemHeight:Z,itemWidth:ee,onMount:H,onScroll:q,onScrollAction:L}=t,x=e=>u.current?u.current[e]:0,k=()=>x(s==="vertical"?"offsetHeight":"offsetWidth"),w=()=>x(s==="vertical"?"scrollHeight":"scrollWidth"),m=()=>x(s==="vertical"?"scrollTop":"scrollLeft"),te=()=>w()-k(),re=e=>e<m()?0:1,ne=(e,o)=>{const i=U||S.scrollDuration;return Math.abs(o-e)/(i/Ie)},oe=(e,o)=>{const i=m();if(Number.parseInt(`${e}`,10)===Number.parseInt(`${i}`,10))return{start:e,end:e};const a=te(),f=o===0?1:-1,C=De(i,e,K||0),h=Math.min(e,a);return{start:Math.min(Math.max(h+f*C,0),a),end:h}},V=e=>r.current?r.current.index(e):0,ce=e=>r.current?r.current.offset(e):0,se=()=>V(Math.ceil(m())),le=e=>{if(!r.current)return!1;const o=m(),i=o+k(),a=r.current.offset(e),f=a+r.current.height(e);return a>=o&&f<=i},ie=e=>r.current?m()!==r.current.offset(e):!1,p=e=>{const o=s==="vertical"?"scrollTop":"scrollLeft";if(!u.current)return;const i=u.current[o];ge.current&&o==="scrollTop"&&(!Number.isInteger(i)||!Number.isInteger(e))&&Math.abs(i-e)<Me||(u.current[o]=e)},ae=e=>{v.current=!1,r.current&&p(r.current.offset(e))},ue=e=>{if(!r.current||!globalThis)return;globalThis.cancelAnimationFrame(N.current);const o=r.current.offset(e),i=re(o),{start:a,end:f}=oe(o,i);if(a===f)return;const C=ne(a,f),h=Ce[i](C),$=Oe[i](f),ve=Pe[i](h(f)),B=Te=>{v.current=!0;const O=h(Te);p($(O)),ve(O)?N.current=globalThis.requestAnimationFrame(()=>{B(O)}):v.current=!1};N.current=globalThis.requestAnimationFrame(()=>{B(a)})},fe=()=>{r.current&&p(r.current.totalHeight()+A)},me=e=>{D.current=e},de=e=>{I.current=e},Se=e=>{if(!u.current||!r.current)return;const o=e.target;W.current.onScroll({scrollLeft:o.scrollLeft,scrollTop:o.scrollTop,offsetHeight:o.offsetHeight,offsetWidth:o.offsetWidth});const a={index:r.current.index(m()-y),target:o,scrollAction:D.current,pageAction:I.current,animationInProgress:v.current};q&&q(e),L&&L(a),D.current=void 0,I.current=void 0},he=()=>{const e=s==="vertical"?Z:ee;e!==void 0&&(r.current=new d.RowHeightService(b,e),W.current.create(r.current,Y,z,b,y,g,s))},R=c.useRef(null),u=c.useRef(null),W=c.useRef(new xe.ScrollerService(me,de)),r=c.useRef(null),N=c.useRef(0),v=c.useRef(!1),ge=c.useRef(Number.parseFloat(c.version)>17),D=c.useRef(void 0),I=c.useRef(void 0),_=c.useRef(0),j=c.useRef(0),E=c.useRef(null);c.useImperativeHandle(R,()=>({element:u.current,containerScrollSize:w(),containerScrollPosition:m(),activeIndex:se,scrollTo:p,scrollToIndex:ae,animateToIndex:ue,scrollToBottom:fe,isIndexVisible:le,isListScrolled:ie,itemIndex:V,itemOffset:ce})),c.useImperativeHandle(n,()=>R.current),c.useEffect(()=>{H&&R.current&&H(R.current)},[]);const M=T==null?void 0:T.uCalendar;(_.current!==b||E.current!==s||j.current!==z)&&(he(),_.current=b,E.current=s,j.current=z);const F=`${(r.current?r.current.totalHeight():0)+A}`,be=s==="vertical"?{height:`${F}px`}:{width:`${F}px`},pe=d.classNames(d.uCalendar.scrollableSelector({c:M}),d.uCalendar.scrollable({c:M,horizontal:s==="horizontal"}),G),Re=d.classNames(d.uCalendar.scrollablePlaceholder({c:M,horizontal:s==="horizontal"}));return c.createElement("div",{ref:u,onScroll:Se,className:pe,tabIndex:J,role:Q},X,c.createElement("div",{style:be,className:Re}))});P.propTypes={bottomOffset:l.number.isRequired,className:l.string,direction:l.oneOf(["horizontal","vertical"]),itemHeight:l.number,itemWidth:l.number,maxScrollDifference:l.number,onScroll:l.func,onScrollAction:l.func,scrollDuration:l.number,scrollOffsetSize:l.number,skip:l.number.isRequired,tabIndex:l.number,take:l.number.isRequired,topOffset:l.number.isRequired,total:l.number.isRequired,role:l.string};P.displayName="KendoReactVirtualization";const Ae=P;exports.Virtualization=Ae;exports.virtualizationDefaultProps=S;
|