@progress/kendo-react-dateinputs 7.5.0-develop.2 → 7.5.0-develop.20
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.js +2 -2
- package/calendar/components/Calendar.mjs +46 -40
- package/calendar/components/CalendarCell.js +1 -1
- package/calendar/components/CalendarCell.mjs +51 -48
- package/calendar/components/Header.js +1 -1
- package/calendar/components/Header.mjs +20 -19
- package/calendar/components/HorizontalViewList.js +1 -1
- package/calendar/components/HorizontalViewList.mjs +8 -5
- package/calendar/components/MultiViewCalendar.js +1 -1
- package/calendar/components/MultiViewCalendar.mjs +99 -93
- package/calendar/components/TodayCommand.js +1 -1
- package/calendar/components/TodayCommand.mjs +1 -1
- package/calendar/components/View.js +1 -1
- package/calendar/components/View.mjs +31 -29
- package/calendar/components/ViewList.js +1 -1
- package/calendar/components/ViewList.mjs +47 -45
- package/calendar/services/MonthViewService.js +1 -1
- package/calendar/services/MonthViewService.mjs +14 -16
- package/calendar/services/WeekNamesService.js +1 -1
- package/calendar/services/WeekNamesService.mjs +5 -5
- package/datepicker/DatePicker.js +1 -1
- package/datepicker/DatePicker.mjs +3 -0
- package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
- package/index.d.mts +63 -7
- package/index.d.ts +63 -7
- package/package-metadata.mjs +1 -1
- package/package.json +8 -8
- package/virtualization/Virtualization.js +1 -1
- package/virtualization/Virtualization.mjs +5 -6
- package/virtualization/services/RowHeightService.js +0 -8
- package/virtualization/services/RowHeightService.mjs +0 -50
package/index.d.mts
CHANGED
|
@@ -141,6 +141,14 @@ export declare interface CalendarHandle extends Pick<CalendarWithoutContext, key
|
|
|
141
141
|
value: Date | null;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
+
/**
|
|
145
|
+
* The props which will be received by the custom header of the Calendar and the MultiViewCalendar.
|
|
146
|
+
*/
|
|
147
|
+
declare interface CalendarHeaderProps {
|
|
148
|
+
headerTitleProps: CalendarHeaderTitleProps;
|
|
149
|
+
commands: React.ReactNode;
|
|
150
|
+
}
|
|
151
|
+
|
|
144
152
|
/**
|
|
145
153
|
* The `CalendarHeaderTitle` component is internally used for rendering the title of the current calendar view. Also used as a custom `headerTitle` for the [Calendar]({% slug api_dateinputs_calendarprops %}#toc-headertitle) and the [MultiViewCalendar]({% slug api_dateinputs_multiviewcalendarprops %}#toc-headertitle) components.
|
|
146
154
|
*
|
|
@@ -302,10 +310,20 @@ export declare interface CalendarSettings {
|
|
|
302
310
|
* Defines the topmost view to which the user can navigate.
|
|
303
311
|
*/
|
|
304
312
|
topView?: ActiveView;
|
|
313
|
+
/**
|
|
314
|
+
* Specifies the possible format options for the displayed Calendar week days' names.
|
|
315
|
+
*
|
|
316
|
+
* @default short
|
|
317
|
+
*/
|
|
318
|
+
weekDaysFormat?: WeekDaysFormat;
|
|
305
319
|
/**
|
|
306
320
|
* Determines if the week number column will be displayed.
|
|
307
321
|
*/
|
|
308
322
|
weekNumber?: boolean;
|
|
323
|
+
/**
|
|
324
|
+
* Displays the days that fall out of the current month.
|
|
325
|
+
*/
|
|
326
|
+
showOtherMonthDays?: boolean;
|
|
309
327
|
/**
|
|
310
328
|
* Enables the customization or the override of the default Calendar cell
|
|
311
329
|
* ([see example]({% slug custom_rendering_calendar %}#toc-cells-inside-the-view)).
|
|
@@ -321,6 +339,11 @@ export declare interface CalendarSettings {
|
|
|
321
339
|
* ([see example]({% slug custom_rendering_calendar %}#toc-titles-of-current-views)).
|
|
322
340
|
*/
|
|
323
341
|
headerTitle?: React.ComponentType<CalendarHeaderTitleProps>;
|
|
342
|
+
/**
|
|
343
|
+
* Enables the customization or the override of the default header title in the Calendar
|
|
344
|
+
* ([see example]({% slug custom_rendering_calendar %}#toc-titles-of-current-views)).
|
|
345
|
+
*/
|
|
346
|
+
header?: React.ComponentType<CalendarHeaderProps>;
|
|
324
347
|
/**
|
|
325
348
|
* Enables the customization or the override of the default navigation item in the Calendar
|
|
326
349
|
* ([see example]({% slug custom_rendering_calendar %}#toc-items-in-the-side-navigation)).
|
|
@@ -391,6 +414,7 @@ export declare class CalendarWithoutContext extends React_2.Component<CalendarPr
|
|
|
391
414
|
id: PropTypes.Requireable<string>;
|
|
392
415
|
ariaLabelledBy: PropTypes.Requireable<string>;
|
|
393
416
|
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
417
|
+
weekDaysFormat: PropTypes.Requireable<string>;
|
|
394
418
|
max: PropTypes.Requireable<Date>;
|
|
395
419
|
min: PropTypes.Requireable<Date>;
|
|
396
420
|
navigation: PropTypes.Requireable<boolean>;
|
|
@@ -411,11 +435,13 @@ export declare class CalendarWithoutContext extends React_2.Component<CalendarPr
|
|
|
411
435
|
disabled: boolean;
|
|
412
436
|
min: Date;
|
|
413
437
|
max: Date;
|
|
438
|
+
weekDaysFormat: string;
|
|
414
439
|
navigation: boolean;
|
|
415
440
|
defaultActiveView: ActiveView;
|
|
416
441
|
defaultValue: null;
|
|
417
442
|
topView: ActiveView;
|
|
418
443
|
bottomView: ActiveView;
|
|
444
|
+
showOtherMonthDays: boolean;
|
|
419
445
|
};
|
|
420
446
|
protected dom: DOMService;
|
|
421
447
|
protected scrollSyncService: ScrollSyncService | null;
|
|
@@ -492,6 +518,7 @@ export declare interface CellContext {
|
|
|
492
518
|
isToday: boolean;
|
|
493
519
|
title?: string;
|
|
494
520
|
value: Date;
|
|
521
|
+
isOtherMonth?: boolean;
|
|
495
522
|
}
|
|
496
523
|
|
|
497
524
|
/**
|
|
@@ -883,7 +910,7 @@ export declare class DateInputWithoutContext extends React_2.Component<DateInput
|
|
|
883
910
|
second: PropTypes.Requireable<string>;
|
|
884
911
|
timeZoneName: PropTypes.Requireable<string>;
|
|
885
912
|
}> | null | undefined>>;
|
|
886
|
-
formatPlaceholder: PropTypes.Requireable<NonNullable<"
|
|
913
|
+
formatPlaceholder: PropTypes.Requireable<NonNullable<"short" | "narrow" | "wide" | "formatPattern" | PropTypes.InferProps<{
|
|
887
914
|
year: PropTypes.Requireable<string>;
|
|
888
915
|
month: PropTypes.Requireable<string>;
|
|
889
916
|
day: PropTypes.Requireable<string>;
|
|
@@ -1389,7 +1416,7 @@ export declare class DatePickerWithoutContext extends React_2.Component<DatePick
|
|
|
1389
1416
|
second: PropTypes.Requireable<string>;
|
|
1390
1417
|
timeZoneName: PropTypes.Requireable<string>;
|
|
1391
1418
|
}> | null | undefined>>;
|
|
1392
|
-
formatPlaceholder: PropTypes.Requireable<NonNullable<"
|
|
1419
|
+
formatPlaceholder: PropTypes.Requireable<NonNullable<"short" | "narrow" | "wide" | "formatPattern" | PropTypes.InferProps<{
|
|
1393
1420
|
year: PropTypes.Requireable<string>;
|
|
1394
1421
|
month: PropTypes.Requireable<string>;
|
|
1395
1422
|
day: PropTypes.Requireable<string>;
|
|
@@ -1565,7 +1592,7 @@ export declare const DateRangePicker: React_2.ForwardRefExoticComponent<DateRang
|
|
|
1565
1592
|
/**
|
|
1566
1593
|
* Represents the settings that can be passed to the MultiViewCalendar inside the DateRangePicker.
|
|
1567
1594
|
*/
|
|
1568
|
-
export declare interface DateRangePickerCalendarSettings extends MultiViewCalendarSettings {
|
|
1595
|
+
export declare interface DateRangePickerCalendarSettings extends Omit<MultiViewCalendarSettings, 'showOtherMonthDays'> {
|
|
1569
1596
|
}
|
|
1570
1597
|
|
|
1571
1598
|
/**
|
|
@@ -1851,7 +1878,7 @@ export declare class DateRangePickerWithoutContext extends React_2.Component<Dat
|
|
|
1851
1878
|
second: PropTypes.Requireable<string>;
|
|
1852
1879
|
timeZoneName: PropTypes.Requireable<string>;
|
|
1853
1880
|
}> | null | undefined>>;
|
|
1854
|
-
formatPlaceholder: PropTypes.Requireable<NonNullable<"
|
|
1881
|
+
formatPlaceholder: PropTypes.Requireable<NonNullable<"short" | "narrow" | "wide" | "formatPattern" | PropTypes.InferProps<{
|
|
1855
1882
|
year: PropTypes.Requireable<string>;
|
|
1856
1883
|
month: PropTypes.Requireable<string>;
|
|
1857
1884
|
day: PropTypes.Requireable<string>;
|
|
@@ -2363,7 +2390,7 @@ export declare class DateTimePickerWithoutContext extends React_2.Component<Date
|
|
|
2363
2390
|
second: PropTypes.Requireable<string>;
|
|
2364
2391
|
timeZoneName: PropTypes.Requireable<string>;
|
|
2365
2392
|
}> | null | undefined>>;
|
|
2366
|
-
formatPlaceholder: PropTypes.Requireable<NonNullable<"
|
|
2393
|
+
formatPlaceholder: PropTypes.Requireable<NonNullable<"short" | "narrow" | "wide" | "formatPattern" | PropTypes.InferProps<{
|
|
2367
2394
|
year: PropTypes.Requireable<string>;
|
|
2368
2395
|
month: PropTypes.Requireable<string>;
|
|
2369
2396
|
day: PropTypes.Requireable<string>;
|
|
@@ -2708,6 +2735,7 @@ declare interface HeaderProps {
|
|
|
2708
2735
|
rangeLength?: number;
|
|
2709
2736
|
service: ViewService;
|
|
2710
2737
|
headerTitle?: React_2.ComponentType<CalendarHeaderTitleProps>;
|
|
2738
|
+
header?: React_2.ComponentType<CalendarHeaderProps>;
|
|
2711
2739
|
commands?: React_2.ReactNode;
|
|
2712
2740
|
verticalView?: boolean;
|
|
2713
2741
|
}
|
|
@@ -2721,6 +2749,7 @@ export declare class HorizontalViewList extends React_2.Component<HorizontalView
|
|
|
2721
2749
|
views: number;
|
|
2722
2750
|
take: number;
|
|
2723
2751
|
allowReverse: boolean;
|
|
2752
|
+
weekDaysFormat: string;
|
|
2724
2753
|
min: Date;
|
|
2725
2754
|
max: Date;
|
|
2726
2755
|
};
|
|
@@ -2764,6 +2793,7 @@ export declare interface HorizontalViewListProps {
|
|
|
2764
2793
|
selectionRange: SelectionRange;
|
|
2765
2794
|
service: ViewService;
|
|
2766
2795
|
showWeekNumbers?: boolean;
|
|
2796
|
+
weekDaysFormat?: WeekDaysFormat;
|
|
2767
2797
|
take?: number;
|
|
2768
2798
|
value: Date[] | Date | null;
|
|
2769
2799
|
views?: number;
|
|
@@ -2771,6 +2801,7 @@ export declare interface HorizontalViewListProps {
|
|
|
2771
2801
|
allowReverse?: boolean;
|
|
2772
2802
|
cell?: React_2.ComponentType<CalendarCellProps>;
|
|
2773
2803
|
weekCell?: React_2.ComponentType<CalendarWeekCellProps>;
|
|
2804
|
+
showOtherMonthDays?: boolean;
|
|
2774
2805
|
headerTitle?: React_2.ComponentType<CalendarHeaderTitleProps>;
|
|
2775
2806
|
dates: any[];
|
|
2776
2807
|
verticalView?: boolean;
|
|
@@ -3044,6 +3075,12 @@ export declare interface MultiViewCalendarSettings {
|
|
|
3044
3075
|
* Determines if the week number column will be displayed.
|
|
3045
3076
|
*/
|
|
3046
3077
|
weekNumber?: boolean;
|
|
3078
|
+
/**
|
|
3079
|
+
* Specifies the possible format options for the displayed Calendar week days' names.
|
|
3080
|
+
*
|
|
3081
|
+
* @default short
|
|
3082
|
+
*/
|
|
3083
|
+
weekDaysFormat?: WeekDaysFormat;
|
|
3047
3084
|
/**
|
|
3048
3085
|
* Fires each time the MultiViewCalendar is focused.
|
|
3049
3086
|
*/
|
|
@@ -3094,6 +3131,10 @@ export declare interface MultiViewCalendarSettings {
|
|
|
3094
3131
|
* * `range`—Renders a date-range selection.
|
|
3095
3132
|
*/
|
|
3096
3133
|
mode?: MultiViewCalendarMode;
|
|
3134
|
+
/**
|
|
3135
|
+
* Displays the days that fall out of the current month.
|
|
3136
|
+
*/
|
|
3137
|
+
showOtherMonthDays?: boolean;
|
|
3097
3138
|
/**
|
|
3098
3139
|
* Fires each time the MultiViewCalendar is blurred.
|
|
3099
3140
|
*/
|
|
@@ -3144,6 +3185,7 @@ export declare class MultiViewCalendarWithoutContext extends React_2.Component<M
|
|
|
3144
3185
|
disabled: PropTypes.Requireable<boolean>;
|
|
3145
3186
|
focusedDate: PropTypes.Requireable<Date>;
|
|
3146
3187
|
id: PropTypes.Requireable<string>;
|
|
3188
|
+
weekDaysFormat: PropTypes.Requireable<string>;
|
|
3147
3189
|
ariaLabelledBy: PropTypes.Requireable<string>;
|
|
3148
3190
|
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
3149
3191
|
max: PropTypes.Requireable<Date>;
|
|
@@ -3157,6 +3199,7 @@ export declare class MultiViewCalendarWithoutContext extends React_2.Component<M
|
|
|
3157
3199
|
value: PropTypes.Requireable<any>;
|
|
3158
3200
|
views: (props: MultiViewCalendarProps, propName: keyof MultiViewCalendarProps<any>, componentName: string) => Error | null;
|
|
3159
3201
|
weekNumber: PropTypes.Requireable<boolean>;
|
|
3202
|
+
showOtherMonthDays: PropTypes.Requireable<boolean>;
|
|
3160
3203
|
dir: PropTypes.Requireable<string>;
|
|
3161
3204
|
};
|
|
3162
3205
|
/**
|
|
@@ -3170,10 +3213,12 @@ export declare class MultiViewCalendarWithoutContext extends React_2.Component<M
|
|
|
3170
3213
|
defaultActiveView: ActiveView;
|
|
3171
3214
|
defaultValue: null;
|
|
3172
3215
|
topView: ActiveView;
|
|
3216
|
+
weekDaysFormat: string;
|
|
3173
3217
|
tabIndex: number;
|
|
3174
3218
|
bottomView: ActiveView;
|
|
3175
3219
|
views: number;
|
|
3176
3220
|
allowReverse: boolean;
|
|
3221
|
+
showOtherMonthDays: boolean;
|
|
3177
3222
|
};
|
|
3178
3223
|
protected dates: any[];
|
|
3179
3224
|
private lastView;
|
|
@@ -3931,7 +3976,7 @@ export declare class TimePickerWithoutContext extends React_2.Component<TimePick
|
|
|
3931
3976
|
second: PropTypes.Requireable<string>;
|
|
3932
3977
|
timeZoneName: PropTypes.Requireable<string>;
|
|
3933
3978
|
}> | null | undefined>>;
|
|
3934
|
-
formatPlaceholder: PropTypes.Requireable<NonNullable<"
|
|
3979
|
+
formatPlaceholder: PropTypes.Requireable<NonNullable<"short" | "narrow" | "wide" | "formatPattern" | PropTypes.InferProps<{
|
|
3935
3980
|
year: PropTypes.Requireable<string>;
|
|
3936
3981
|
month: PropTypes.Requireable<string>;
|
|
3937
3982
|
day: PropTypes.Requireable<string>;
|
|
@@ -4281,11 +4326,13 @@ export declare class ViewList extends React_2.Component<ViewListProps, ViewListS
|
|
|
4281
4326
|
value: PropTypes.Requireable<Date>;
|
|
4282
4327
|
viewHeight: PropTypes.Requireable<number>;
|
|
4283
4328
|
viewOffset: PropTypes.Requireable<number>;
|
|
4329
|
+
weekDaysFormat: PropTypes.Requireable<string>;
|
|
4284
4330
|
tabIndex: PropTypes.Requireable<number>;
|
|
4285
4331
|
};
|
|
4286
4332
|
static defaultProps: {
|
|
4287
4333
|
take: number;
|
|
4288
4334
|
showWeekNumbers: boolean;
|
|
4335
|
+
weekDaysFormat: string;
|
|
4289
4336
|
smoothScroll: boolean;
|
|
4290
4337
|
};
|
|
4291
4338
|
virtualization: Virtualization | null;
|
|
@@ -4302,6 +4349,7 @@ export declare class ViewList extends React_2.Component<ViewListProps, ViewListS
|
|
|
4302
4349
|
private shouldScroll;
|
|
4303
4350
|
private indexToScroll?;
|
|
4304
4351
|
private lastFocus;
|
|
4352
|
+
private weekService;
|
|
4305
4353
|
get element(): HTMLDivElement | null;
|
|
4306
4354
|
protected get weekNames(): string[];
|
|
4307
4355
|
protected get weekNumber(): boolean;
|
|
@@ -4353,11 +4401,14 @@ declare interface ViewListProps {
|
|
|
4353
4401
|
showWeekNumbers?: boolean;
|
|
4354
4402
|
smoothScroll?: boolean;
|
|
4355
4403
|
take?: number;
|
|
4404
|
+
weekDaysFormat?: WeekDaysFormat;
|
|
4356
4405
|
value: Date | null;
|
|
4357
4406
|
viewHeight?: number;
|
|
4358
4407
|
viewOffset?: number;
|
|
4359
4408
|
weekCell?: React_2.ComponentType<CalendarWeekCellProps>;
|
|
4409
|
+
showOtherMonthDays?: boolean;
|
|
4360
4410
|
headerTitle?: React_2.ComponentType<CalendarHeaderTitleProps>;
|
|
4411
|
+
header?: React_2.ComponentType<CalendarHeaderProps>;
|
|
4361
4412
|
shouldScroll?: () => boolean;
|
|
4362
4413
|
tabIndex?: number;
|
|
4363
4414
|
}
|
|
@@ -4488,13 +4539,18 @@ declare interface VirtualizationProps {
|
|
|
4488
4539
|
children?: React_2.ReactNode;
|
|
4489
4540
|
}
|
|
4490
4541
|
|
|
4542
|
+
/**
|
|
4543
|
+
* Specifies the possible format options for the displayed Calendar week days' names.
|
|
4544
|
+
*/
|
|
4545
|
+
declare type WeekDaysFormat = 'short' | 'narrow' | 'abbreviated';
|
|
4546
|
+
|
|
4491
4547
|
/**
|
|
4492
4548
|
* @hidden
|
|
4493
4549
|
*/
|
|
4494
4550
|
export declare class WeekNamesService {
|
|
4495
4551
|
private intl;
|
|
4496
4552
|
constructor(intl: IntlService);
|
|
4497
|
-
getWeekNames(includeWeekNumber?: boolean): string[];
|
|
4553
|
+
getWeekNames(includeWeekNumber?: boolean, weekDaysFormat?: WeekDaysFormat): string[];
|
|
4498
4554
|
}
|
|
4499
4555
|
|
|
4500
4556
|
/**
|
package/index.d.ts
CHANGED
|
@@ -141,6 +141,14 @@ export declare interface CalendarHandle extends Pick<CalendarWithoutContext, key
|
|
|
141
141
|
value: Date | null;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
+
/**
|
|
145
|
+
* The props which will be received by the custom header of the Calendar and the MultiViewCalendar.
|
|
146
|
+
*/
|
|
147
|
+
declare interface CalendarHeaderProps {
|
|
148
|
+
headerTitleProps: CalendarHeaderTitleProps;
|
|
149
|
+
commands: React.ReactNode;
|
|
150
|
+
}
|
|
151
|
+
|
|
144
152
|
/**
|
|
145
153
|
* The `CalendarHeaderTitle` component is internally used for rendering the title of the current calendar view. Also used as a custom `headerTitle` for the [Calendar]({% slug api_dateinputs_calendarprops %}#toc-headertitle) and the [MultiViewCalendar]({% slug api_dateinputs_multiviewcalendarprops %}#toc-headertitle) components.
|
|
146
154
|
*
|
|
@@ -302,10 +310,20 @@ export declare interface CalendarSettings {
|
|
|
302
310
|
* Defines the topmost view to which the user can navigate.
|
|
303
311
|
*/
|
|
304
312
|
topView?: ActiveView;
|
|
313
|
+
/**
|
|
314
|
+
* Specifies the possible format options for the displayed Calendar week days' names.
|
|
315
|
+
*
|
|
316
|
+
* @default short
|
|
317
|
+
*/
|
|
318
|
+
weekDaysFormat?: WeekDaysFormat;
|
|
305
319
|
/**
|
|
306
320
|
* Determines if the week number column will be displayed.
|
|
307
321
|
*/
|
|
308
322
|
weekNumber?: boolean;
|
|
323
|
+
/**
|
|
324
|
+
* Displays the days that fall out of the current month.
|
|
325
|
+
*/
|
|
326
|
+
showOtherMonthDays?: boolean;
|
|
309
327
|
/**
|
|
310
328
|
* Enables the customization or the override of the default Calendar cell
|
|
311
329
|
* ([see example]({% slug custom_rendering_calendar %}#toc-cells-inside-the-view)).
|
|
@@ -321,6 +339,11 @@ export declare interface CalendarSettings {
|
|
|
321
339
|
* ([see example]({% slug custom_rendering_calendar %}#toc-titles-of-current-views)).
|
|
322
340
|
*/
|
|
323
341
|
headerTitle?: React.ComponentType<CalendarHeaderTitleProps>;
|
|
342
|
+
/**
|
|
343
|
+
* Enables the customization or the override of the default header title in the Calendar
|
|
344
|
+
* ([see example]({% slug custom_rendering_calendar %}#toc-titles-of-current-views)).
|
|
345
|
+
*/
|
|
346
|
+
header?: React.ComponentType<CalendarHeaderProps>;
|
|
324
347
|
/**
|
|
325
348
|
* Enables the customization or the override of the default navigation item in the Calendar
|
|
326
349
|
* ([see example]({% slug custom_rendering_calendar %}#toc-items-in-the-side-navigation)).
|
|
@@ -391,6 +414,7 @@ export declare class CalendarWithoutContext extends React_2.Component<CalendarPr
|
|
|
391
414
|
id: PropTypes.Requireable<string>;
|
|
392
415
|
ariaLabelledBy: PropTypes.Requireable<string>;
|
|
393
416
|
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
417
|
+
weekDaysFormat: PropTypes.Requireable<string>;
|
|
394
418
|
max: PropTypes.Requireable<Date>;
|
|
395
419
|
min: PropTypes.Requireable<Date>;
|
|
396
420
|
navigation: PropTypes.Requireable<boolean>;
|
|
@@ -411,11 +435,13 @@ export declare class CalendarWithoutContext extends React_2.Component<CalendarPr
|
|
|
411
435
|
disabled: boolean;
|
|
412
436
|
min: Date;
|
|
413
437
|
max: Date;
|
|
438
|
+
weekDaysFormat: string;
|
|
414
439
|
navigation: boolean;
|
|
415
440
|
defaultActiveView: ActiveView;
|
|
416
441
|
defaultValue: null;
|
|
417
442
|
topView: ActiveView;
|
|
418
443
|
bottomView: ActiveView;
|
|
444
|
+
showOtherMonthDays: boolean;
|
|
419
445
|
};
|
|
420
446
|
protected dom: DOMService;
|
|
421
447
|
protected scrollSyncService: ScrollSyncService | null;
|
|
@@ -492,6 +518,7 @@ export declare interface CellContext {
|
|
|
492
518
|
isToday: boolean;
|
|
493
519
|
title?: string;
|
|
494
520
|
value: Date;
|
|
521
|
+
isOtherMonth?: boolean;
|
|
495
522
|
}
|
|
496
523
|
|
|
497
524
|
/**
|
|
@@ -883,7 +910,7 @@ export declare class DateInputWithoutContext extends React_2.Component<DateInput
|
|
|
883
910
|
second: PropTypes.Requireable<string>;
|
|
884
911
|
timeZoneName: PropTypes.Requireable<string>;
|
|
885
912
|
}> | null | undefined>>;
|
|
886
|
-
formatPlaceholder: PropTypes.Requireable<NonNullable<"
|
|
913
|
+
formatPlaceholder: PropTypes.Requireable<NonNullable<"short" | "narrow" | "wide" | "formatPattern" | PropTypes.InferProps<{
|
|
887
914
|
year: PropTypes.Requireable<string>;
|
|
888
915
|
month: PropTypes.Requireable<string>;
|
|
889
916
|
day: PropTypes.Requireable<string>;
|
|
@@ -1389,7 +1416,7 @@ export declare class DatePickerWithoutContext extends React_2.Component<DatePick
|
|
|
1389
1416
|
second: PropTypes.Requireable<string>;
|
|
1390
1417
|
timeZoneName: PropTypes.Requireable<string>;
|
|
1391
1418
|
}> | null | undefined>>;
|
|
1392
|
-
formatPlaceholder: PropTypes.Requireable<NonNullable<"
|
|
1419
|
+
formatPlaceholder: PropTypes.Requireable<NonNullable<"short" | "narrow" | "wide" | "formatPattern" | PropTypes.InferProps<{
|
|
1393
1420
|
year: PropTypes.Requireable<string>;
|
|
1394
1421
|
month: PropTypes.Requireable<string>;
|
|
1395
1422
|
day: PropTypes.Requireable<string>;
|
|
@@ -1565,7 +1592,7 @@ export declare const DateRangePicker: React_2.ForwardRefExoticComponent<DateRang
|
|
|
1565
1592
|
/**
|
|
1566
1593
|
* Represents the settings that can be passed to the MultiViewCalendar inside the DateRangePicker.
|
|
1567
1594
|
*/
|
|
1568
|
-
export declare interface DateRangePickerCalendarSettings extends MultiViewCalendarSettings {
|
|
1595
|
+
export declare interface DateRangePickerCalendarSettings extends Omit<MultiViewCalendarSettings, 'showOtherMonthDays'> {
|
|
1569
1596
|
}
|
|
1570
1597
|
|
|
1571
1598
|
/**
|
|
@@ -1851,7 +1878,7 @@ export declare class DateRangePickerWithoutContext extends React_2.Component<Dat
|
|
|
1851
1878
|
second: PropTypes.Requireable<string>;
|
|
1852
1879
|
timeZoneName: PropTypes.Requireable<string>;
|
|
1853
1880
|
}> | null | undefined>>;
|
|
1854
|
-
formatPlaceholder: PropTypes.Requireable<NonNullable<"
|
|
1881
|
+
formatPlaceholder: PropTypes.Requireable<NonNullable<"short" | "narrow" | "wide" | "formatPattern" | PropTypes.InferProps<{
|
|
1855
1882
|
year: PropTypes.Requireable<string>;
|
|
1856
1883
|
month: PropTypes.Requireable<string>;
|
|
1857
1884
|
day: PropTypes.Requireable<string>;
|
|
@@ -2363,7 +2390,7 @@ export declare class DateTimePickerWithoutContext extends React_2.Component<Date
|
|
|
2363
2390
|
second: PropTypes.Requireable<string>;
|
|
2364
2391
|
timeZoneName: PropTypes.Requireable<string>;
|
|
2365
2392
|
}> | null | undefined>>;
|
|
2366
|
-
formatPlaceholder: PropTypes.Requireable<NonNullable<"
|
|
2393
|
+
formatPlaceholder: PropTypes.Requireable<NonNullable<"short" | "narrow" | "wide" | "formatPattern" | PropTypes.InferProps<{
|
|
2367
2394
|
year: PropTypes.Requireable<string>;
|
|
2368
2395
|
month: PropTypes.Requireable<string>;
|
|
2369
2396
|
day: PropTypes.Requireable<string>;
|
|
@@ -2708,6 +2735,7 @@ declare interface HeaderProps {
|
|
|
2708
2735
|
rangeLength?: number;
|
|
2709
2736
|
service: ViewService;
|
|
2710
2737
|
headerTitle?: React_2.ComponentType<CalendarHeaderTitleProps>;
|
|
2738
|
+
header?: React_2.ComponentType<CalendarHeaderProps>;
|
|
2711
2739
|
commands?: React_2.ReactNode;
|
|
2712
2740
|
verticalView?: boolean;
|
|
2713
2741
|
}
|
|
@@ -2721,6 +2749,7 @@ export declare class HorizontalViewList extends React_2.Component<HorizontalView
|
|
|
2721
2749
|
views: number;
|
|
2722
2750
|
take: number;
|
|
2723
2751
|
allowReverse: boolean;
|
|
2752
|
+
weekDaysFormat: string;
|
|
2724
2753
|
min: Date;
|
|
2725
2754
|
max: Date;
|
|
2726
2755
|
};
|
|
@@ -2764,6 +2793,7 @@ export declare interface HorizontalViewListProps {
|
|
|
2764
2793
|
selectionRange: SelectionRange;
|
|
2765
2794
|
service: ViewService;
|
|
2766
2795
|
showWeekNumbers?: boolean;
|
|
2796
|
+
weekDaysFormat?: WeekDaysFormat;
|
|
2767
2797
|
take?: number;
|
|
2768
2798
|
value: Date[] | Date | null;
|
|
2769
2799
|
views?: number;
|
|
@@ -2771,6 +2801,7 @@ export declare interface HorizontalViewListProps {
|
|
|
2771
2801
|
allowReverse?: boolean;
|
|
2772
2802
|
cell?: React_2.ComponentType<CalendarCellProps>;
|
|
2773
2803
|
weekCell?: React_2.ComponentType<CalendarWeekCellProps>;
|
|
2804
|
+
showOtherMonthDays?: boolean;
|
|
2774
2805
|
headerTitle?: React_2.ComponentType<CalendarHeaderTitleProps>;
|
|
2775
2806
|
dates: any[];
|
|
2776
2807
|
verticalView?: boolean;
|
|
@@ -3044,6 +3075,12 @@ export declare interface MultiViewCalendarSettings {
|
|
|
3044
3075
|
* Determines if the week number column will be displayed.
|
|
3045
3076
|
*/
|
|
3046
3077
|
weekNumber?: boolean;
|
|
3078
|
+
/**
|
|
3079
|
+
* Specifies the possible format options for the displayed Calendar week days' names.
|
|
3080
|
+
*
|
|
3081
|
+
* @default short
|
|
3082
|
+
*/
|
|
3083
|
+
weekDaysFormat?: WeekDaysFormat;
|
|
3047
3084
|
/**
|
|
3048
3085
|
* Fires each time the MultiViewCalendar is focused.
|
|
3049
3086
|
*/
|
|
@@ -3094,6 +3131,10 @@ export declare interface MultiViewCalendarSettings {
|
|
|
3094
3131
|
* * `range`—Renders a date-range selection.
|
|
3095
3132
|
*/
|
|
3096
3133
|
mode?: MultiViewCalendarMode;
|
|
3134
|
+
/**
|
|
3135
|
+
* Displays the days that fall out of the current month.
|
|
3136
|
+
*/
|
|
3137
|
+
showOtherMonthDays?: boolean;
|
|
3097
3138
|
/**
|
|
3098
3139
|
* Fires each time the MultiViewCalendar is blurred.
|
|
3099
3140
|
*/
|
|
@@ -3144,6 +3185,7 @@ export declare class MultiViewCalendarWithoutContext extends React_2.Component<M
|
|
|
3144
3185
|
disabled: PropTypes.Requireable<boolean>;
|
|
3145
3186
|
focusedDate: PropTypes.Requireable<Date>;
|
|
3146
3187
|
id: PropTypes.Requireable<string>;
|
|
3188
|
+
weekDaysFormat: PropTypes.Requireable<string>;
|
|
3147
3189
|
ariaLabelledBy: PropTypes.Requireable<string>;
|
|
3148
3190
|
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
3149
3191
|
max: PropTypes.Requireable<Date>;
|
|
@@ -3157,6 +3199,7 @@ export declare class MultiViewCalendarWithoutContext extends React_2.Component<M
|
|
|
3157
3199
|
value: PropTypes.Requireable<any>;
|
|
3158
3200
|
views: (props: MultiViewCalendarProps, propName: keyof MultiViewCalendarProps<any>, componentName: string) => Error | null;
|
|
3159
3201
|
weekNumber: PropTypes.Requireable<boolean>;
|
|
3202
|
+
showOtherMonthDays: PropTypes.Requireable<boolean>;
|
|
3160
3203
|
dir: PropTypes.Requireable<string>;
|
|
3161
3204
|
};
|
|
3162
3205
|
/**
|
|
@@ -3170,10 +3213,12 @@ export declare class MultiViewCalendarWithoutContext extends React_2.Component<M
|
|
|
3170
3213
|
defaultActiveView: ActiveView;
|
|
3171
3214
|
defaultValue: null;
|
|
3172
3215
|
topView: ActiveView;
|
|
3216
|
+
weekDaysFormat: string;
|
|
3173
3217
|
tabIndex: number;
|
|
3174
3218
|
bottomView: ActiveView;
|
|
3175
3219
|
views: number;
|
|
3176
3220
|
allowReverse: boolean;
|
|
3221
|
+
showOtherMonthDays: boolean;
|
|
3177
3222
|
};
|
|
3178
3223
|
protected dates: any[];
|
|
3179
3224
|
private lastView;
|
|
@@ -3931,7 +3976,7 @@ export declare class TimePickerWithoutContext extends React_2.Component<TimePick
|
|
|
3931
3976
|
second: PropTypes.Requireable<string>;
|
|
3932
3977
|
timeZoneName: PropTypes.Requireable<string>;
|
|
3933
3978
|
}> | null | undefined>>;
|
|
3934
|
-
formatPlaceholder: PropTypes.Requireable<NonNullable<"
|
|
3979
|
+
formatPlaceholder: PropTypes.Requireable<NonNullable<"short" | "narrow" | "wide" | "formatPattern" | PropTypes.InferProps<{
|
|
3935
3980
|
year: PropTypes.Requireable<string>;
|
|
3936
3981
|
month: PropTypes.Requireable<string>;
|
|
3937
3982
|
day: PropTypes.Requireable<string>;
|
|
@@ -4281,11 +4326,13 @@ export declare class ViewList extends React_2.Component<ViewListProps, ViewListS
|
|
|
4281
4326
|
value: PropTypes.Requireable<Date>;
|
|
4282
4327
|
viewHeight: PropTypes.Requireable<number>;
|
|
4283
4328
|
viewOffset: PropTypes.Requireable<number>;
|
|
4329
|
+
weekDaysFormat: PropTypes.Requireable<string>;
|
|
4284
4330
|
tabIndex: PropTypes.Requireable<number>;
|
|
4285
4331
|
};
|
|
4286
4332
|
static defaultProps: {
|
|
4287
4333
|
take: number;
|
|
4288
4334
|
showWeekNumbers: boolean;
|
|
4335
|
+
weekDaysFormat: string;
|
|
4289
4336
|
smoothScroll: boolean;
|
|
4290
4337
|
};
|
|
4291
4338
|
virtualization: Virtualization | null;
|
|
@@ -4302,6 +4349,7 @@ export declare class ViewList extends React_2.Component<ViewListProps, ViewListS
|
|
|
4302
4349
|
private shouldScroll;
|
|
4303
4350
|
private indexToScroll?;
|
|
4304
4351
|
private lastFocus;
|
|
4352
|
+
private weekService;
|
|
4305
4353
|
get element(): HTMLDivElement | null;
|
|
4306
4354
|
protected get weekNames(): string[];
|
|
4307
4355
|
protected get weekNumber(): boolean;
|
|
@@ -4353,11 +4401,14 @@ declare interface ViewListProps {
|
|
|
4353
4401
|
showWeekNumbers?: boolean;
|
|
4354
4402
|
smoothScroll?: boolean;
|
|
4355
4403
|
take?: number;
|
|
4404
|
+
weekDaysFormat?: WeekDaysFormat;
|
|
4356
4405
|
value: Date | null;
|
|
4357
4406
|
viewHeight?: number;
|
|
4358
4407
|
viewOffset?: number;
|
|
4359
4408
|
weekCell?: React_2.ComponentType<CalendarWeekCellProps>;
|
|
4409
|
+
showOtherMonthDays?: boolean;
|
|
4360
4410
|
headerTitle?: React_2.ComponentType<CalendarHeaderTitleProps>;
|
|
4411
|
+
header?: React_2.ComponentType<CalendarHeaderProps>;
|
|
4361
4412
|
shouldScroll?: () => boolean;
|
|
4362
4413
|
tabIndex?: number;
|
|
4363
4414
|
}
|
|
@@ -4488,13 +4539,18 @@ declare interface VirtualizationProps {
|
|
|
4488
4539
|
children?: React_2.ReactNode;
|
|
4489
4540
|
}
|
|
4490
4541
|
|
|
4542
|
+
/**
|
|
4543
|
+
* Specifies the possible format options for the displayed Calendar week days' names.
|
|
4544
|
+
*/
|
|
4545
|
+
declare type WeekDaysFormat = 'short' | 'narrow' | 'abbreviated';
|
|
4546
|
+
|
|
4491
4547
|
/**
|
|
4492
4548
|
* @hidden
|
|
4493
4549
|
*/
|
|
4494
4550
|
export declare class WeekNamesService {
|
|
4495
4551
|
private intl;
|
|
4496
4552
|
constructor(intl: IntlService);
|
|
4497
|
-
getWeekNames(includeWeekNumber?: boolean): string[];
|
|
4553
|
+
getWeekNames(includeWeekNumber?: boolean, weekDaysFormat?: WeekDaysFormat): string[];
|
|
4498
4554
|
}
|
|
4499
4555
|
|
|
4500
4556
|
/**
|
package/package-metadata.mjs
CHANGED
|
@@ -10,7 +10,7 @@ const e = {
|
|
|
10
10
|
name: "@progress/kendo-react-dateinputs",
|
|
11
11
|
productName: "KendoReact",
|
|
12
12
|
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
13
|
-
publishDate:
|
|
13
|
+
publishDate: 1715351737,
|
|
14
14
|
version: "",
|
|
15
15
|
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"
|
|
16
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-dateinputs",
|
|
3
|
-
"version": "7.5.0-develop.
|
|
3
|
+
"version": "7.5.0-develop.20",
|
|
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",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@progress/kendo-date-math": "^1.4.0",
|
|
26
26
|
"@progress/kendo-licensing": "^1.3.4",
|
|
27
|
-
"@progress/kendo-react-buttons": "7.5.0-develop.
|
|
28
|
-
"@progress/kendo-react-common": "7.5.0-develop.
|
|
29
|
-
"@progress/kendo-react-intl": "7.5.0-develop.
|
|
30
|
-
"@progress/kendo-react-labels": "7.5.0-develop.
|
|
31
|
-
"@progress/kendo-react-layout": "7.5.0-develop.
|
|
32
|
-
"@progress/kendo-react-popup": "7.5.0-develop.
|
|
33
|
-
"@progress/kendo-svg-icons": "^
|
|
27
|
+
"@progress/kendo-react-buttons": "7.5.0-develop.20",
|
|
28
|
+
"@progress/kendo-react-common": "7.5.0-develop.20",
|
|
29
|
+
"@progress/kendo-react-intl": "7.5.0-develop.20",
|
|
30
|
+
"@progress/kendo-react-labels": "7.5.0-develop.20",
|
|
31
|
+
"@progress/kendo-react-layout": "7.5.0-develop.20",
|
|
32
|
+
"@progress/kendo-react-popup": "7.5.0-develop.20",
|
|
33
|
+
"@progress/kendo-svg-icons": "^3.0.0",
|
|
34
34
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0",
|
|
35
35
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
|
|
36
36
|
},
|
|
@@ -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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),s=require("prop-types"),
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),s=require("prop-types"),d=require("@progress/kendo-react-common"),w=require("./services/ScrollerService.js");function H(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const h=H(b),P=(r,e,t)=>Math.min(Math.abs(e-r),t),T=17,O=10,A={1:r=>e=>e+r,0:r=>e=>e-r},x={1:r=>e=>Math.min(e,r),0:r=>e=>Math.max(e,r)},I={1:r=>e=>e<r,0:r=>e=>e>r},c=class c extends h.Component{constructor(e){super(e),this.rowHeightService=null,this.scrollContainer=null,this.lastDirection=null,this.lastTotal=0,this.lastTake=0,this.animationInProgress=!1,this.restrictScroll=!1,this.scrollTo=t=>{const i=this.direction==="vertical"?"scrollTop":"scrollLeft";if(!this.scrollContainer)return;const o=this.scrollContainer[i];this.restrictScroll&&i==="scrollTop"&&(!Number.isInteger(o)||!Number.isInteger(t))&&Math.abs(o-t)<O||(this.scrollContainer[i]=t)},this.scrollToIndex=t=>{this.animationInProgress=!1,this.rowHeightService&&this.scrollTo(this.rowHeightService.offset(t))},this.animateToIndex=t=>{if(!this.rowHeightService||!window)return;window.cancelAnimationFrame(this.cancelAnimation);const i=this.rowHeightService.offset(t),o=this.getContainerScrollDirection(i);let{start:n,end:l}=this.scrollRange(i,o);if(n===l)return;const f=this.scrollStep(n,l),a=A[o](f),p=x[o](l),g=I[o](a(l)),m=v=>{this.animationInProgress=!0;const S=a(v);this.scrollTo(p(S)),g(S)?this.cancelAnimation=window.requestAnimationFrame(()=>{m(S)}):this.animationInProgress=!1};this.cancelAnimation=window.requestAnimationFrame(()=>{m(n)})},this.scrollToBottom=()=>{this.rowHeightService&&this.scrollTo(this.rowHeightService.totalHeight()+this.props.bottomOffset)},this.scrollStep=(t,i)=>{const o=this.props.scrollDuration||c.defaultProps.scrollDuration;return Math.abs(i-t)/(o/T)},this.scrollRange=(t,i)=>{const o=this.containerScrollPosition;if(parseInt(`${t}`,10)===parseInt(`${o}`,10))return{start:t,end:t};const n=this.containerMaxScroll(),l=i===0?1:-1,f=P(o,t,this.props.maxScrollDifference||0),a=Math.min(t,n);return{start:Math.min(Math.max(a+l*f,0),n),end:a}},this.containerMaxScroll=()=>this.containerScrollSize-this.containerOffsetSize,this.getContainerScrollDirection=t=>t<this.containerScrollPosition?0:1,this.initServices=(t=this.props)=>{const i=this.direction==="vertical"?t.itemHeight:t.itemWidth;i!==void 0&&(this.rowHeightService=new d.RowHeightService(t.total,i,0),this.scrollerService.create(this.rowHeightService,t.skip,t.take,t.total,t.topOffset,this.scrollOffsetSize,this.direction))},this.getContainerProperty=t=>this.scrollContainer?this.scrollContainer[t]:0,this.handleScroll=t=>{if(!this.scrollContainer||!this.rowHeightService)return;const i=t.target;this.scrollerService.onScroll({scrollLeft:i.scrollLeft,scrollTop:i.scrollTop,offsetHeight:i.offsetHeight,offsetWidth:i.offsetWidth});const o=this.rowHeightService.index(this.containerScrollPosition-this.props.topOffset),{onScrollAction:n}=this.props,l={index:o,target:i,scrollAction:this.scrollAction,pageAction:this.pageAction,animationInProgress:this.animationInProgress};this.props.onScroll&&this.props.onScroll.call(void 0,t),n&&n.call(void 0,l),this.scrollAction=void 0,this.pageAction=void 0},this.handleScrollAction=t=>{this.scrollAction=t},this.handlePageAction=t=>{this.pageAction=t},this.scrollerService=new w.ScrollerService(this.handleScrollAction,this.handlePageAction),this.restrictScroll=Number.parseFloat(h.version)>17}get element(){return this.scrollContainer}get containerOffsetSize(){return this.getContainerProperty(this.direction==="vertical"?"offsetHeight":"offsetWidth")}get containerScrollSize(){return this.getContainerProperty(this.direction==="vertical"?"scrollHeight":"scrollWidth")}get containerScrollPosition(){return this.getContainerProperty(this.direction==="vertical"?"scrollTop":"scrollLeft")}get direction(){return this.props.direction!==void 0?this.props.direction:c.defaultProps.direction}get scrollOffsetSize(){return this.props.scrollOffsetSize!==void 0?this.props.scrollOffsetSize:c.defaultProps.scrollOffsetSize}activeIndex(){return this.itemIndex(Math.ceil(this.containerScrollPosition))}itemIndex(e){return this.rowHeightService?this.rowHeightService.index(e):0}itemOffset(e){return this.rowHeightService?this.rowHeightService.offset(e):0}isIndexVisible(e){if(!this.rowHeightService)return!1;const t=this.containerScrollPosition,i=t+this.containerOffsetSize,o=this.rowHeightService.offset(e),n=o+this.rowHeightService.height(e);return o>=t&&n<=i}isListScrolled(e){return this.rowHeightService?this.containerScrollPosition!==this.rowHeightService.offset(e):!1}componentDidMount(){const{onMount:e}=this.props;e&&e.call(void 0,this)}render(){(this.lastTotal!==this.props.total||this.lastDirection!==this.direction||this.lastTake!==this.props.take)&&(this.initServices(),this.lastTotal=this.props.total,this.lastDirection=this.direction,this.lastTake=this.props.take);const e=`${(this.rowHeightService?this.rowHeightService.totalHeight():0)+this.props.bottomOffset}`,t=this.direction==="vertical"?{height:`${e}px`}:{width:`${e}px`},i=d.classNames("k-content k-scrollable",{"k-scrollable-horizontal":this.direction==="horizontal"},this.props.className),o=d.classNames("k-scrollable-placeholder",{"k-scrollable-horizontal-placeholder":this.direction==="horizontal"});return h.createElement("div",{ref:n=>{this.scrollContainer=n},onScroll:this.handleScroll,className:i,tabIndex:this.props.tabIndex,role:this.props.role},this.props.children,h.createElement("div",{style:t,className:o}))}};c.propTypes={bottomOffset:s.number.isRequired,className:s.string,direction:s.oneOf(["horizontal","vertical"]),forceScroll:s.bool,itemHeight:s.number,itemWidth:s.number,maxScrollDifference:s.number,onScroll:s.func,onScrollAction:s.func,scrollDuration:s.number,scrollOffsetSize:s.number,skip:s.number.isRequired,tabIndex:s.number,take:s.number.isRequired,topOffset:s.number.isRequired,total:s.number.isRequired,role:s.string},c.defaultProps={direction:"vertical",forceScroll:!1,scrollOffsetSize:0,maxScrollDifference:100,scrollDuration:100};let u=c;exports.Virtualization=u;
|
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
"use client";
|
|
9
9
|
import * as a from "react";
|
|
10
10
|
import o from "prop-types";
|
|
11
|
-
import { classNames as m } from "@progress/kendo-react-common";
|
|
12
|
-
import { RowHeightService as w } from "./services/RowHeightService.mjs";
|
|
11
|
+
import { RowHeightService as w, classNames as m } from "@progress/kendo-react-common";
|
|
13
12
|
import { ScrollerService as b } from "./services/ScrollerService.mjs";
|
|
14
13
|
const H = (s, i, t) => Math.min(Math.abs(i - s), t), P = 17, T = 10, x = {
|
|
15
14
|
1: (s) => (i) => i + s,
|
|
@@ -38,15 +37,15 @@ const H = (s, i, t) => Math.min(Math.abs(i - s), t), P = 17, T = 10, x = {
|
|
|
38
37
|
let { start: n, end: l } = this.scrollRange(e, r);
|
|
39
38
|
if (n === l)
|
|
40
39
|
return;
|
|
41
|
-
const f = this.scrollStep(n, l), h = x[r](f),
|
|
40
|
+
const f = this.scrollStep(n, l), h = x[r](f), d = A[r](l), u = I[r](h(l)), p = (v) => {
|
|
42
41
|
this.animationInProgress = !0;
|
|
43
42
|
const S = h(v);
|
|
44
|
-
this.scrollTo(
|
|
45
|
-
|
|
43
|
+
this.scrollTo(d(S)), u(S) ? this.cancelAnimation = window.requestAnimationFrame(() => {
|
|
44
|
+
p(S);
|
|
46
45
|
}) : this.animationInProgress = !1;
|
|
47
46
|
};
|
|
48
47
|
this.cancelAnimation = window.requestAnimationFrame(() => {
|
|
49
|
-
|
|
48
|
+
p(n);
|
|
50
49
|
});
|
|
51
50
|
}, this.scrollToBottom = () => {
|
|
52
51
|
this.rowHeightService && this.scrollTo(this.rowHeightService.totalHeight() + this.props.bottomOffset);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=(i,t,e)=>[...i.slice(0,t+1),...i.slice(t+1).map(s=>s+e)];class g{constructor(t=0,e,s){this.total=t,this.rowHeight=e,this.detailRowHeight=s,this.offsets=[],this.heights=[];let h=0;for(let f=0;f<t;f++)this.offsets.push(h),h+=e,this.heights.push(e)}height(t){return this.heights[t]}expandDetail(t){this.height(t)===this.rowHeight&&this.updateRowHeight(t,this.detailRowHeight)}collapseDetail(t){this.height(t)>this.rowHeight&&this.updateRowHeight(t,this.detailRowHeight*-1)}index(t){for(let e=0;e<this.offsets.length;e++){if(t===this.offsets[e])return e;if(t<this.offsets[e])return e-1}return this.total-1}offset(t){return this.offsets[t]}totalHeight(){return this.heights.reduce((t,e)=>t+e,0)}updateRowHeight(t,e){this.heights[t]+=e,this.offsets=o(this.offsets,t,e)}}exports.RowHeightService=g;
|