@progress/kendo-react-dateinputs 7.5.0-develop.8 → 8.0.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.js +2 -2
- package/calendar/components/Calendar.mjs +46 -40
- package/calendar/components/CalendarCell.js +1 -1
- package/calendar/components/CalendarCell.mjs +53 -49
- package/calendar/components/CalendarWeekCell.js +1 -1
- package/calendar/components/CalendarWeekCell.mjs +12 -10
- 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 +37 -29
- package/calendar/components/MultiViewCalendar.js +1 -1
- package/calendar/components/MultiViewCalendar.mjs +153 -123
- 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 +56 -48
- 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/common/ClearButton.js +8 -0
- package/common/ClearButton.mjs +41 -0
- package/dateinput/DateInput.js +1 -1
- package/dateinput/DateInput.mjs +32 -29
- package/datepicker/DatePicker.js +1 -1
- package/datepicker/DatePicker.mjs +3 -0
- package/daterangepicker/DateRangePicker.js +1 -1
- package/daterangepicker/DateRangePicker.mjs +6 -4
- package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
- package/index.d.mts +80 -7
- package/index.d.ts +80 -7
- package/messages/index.js +1 -1
- package/messages/index.mjs +38 -36
- 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.ts
CHANGED
|
@@ -99,6 +99,7 @@ export declare interface CalendarCellProps extends CellContext {
|
|
|
99
99
|
style?: React_2.CSSProperties;
|
|
100
100
|
isDisabled?: boolean;
|
|
101
101
|
view?: CalendarViewEnum;
|
|
102
|
+
allowReverse?: boolean;
|
|
102
103
|
onClick?: (value: Date, event?: React_2.MouseEvent<any>) => void;
|
|
103
104
|
onMouseEnter?: (value: Date, event?: React_2.MouseEvent<any>) => void;
|
|
104
105
|
onMouseLeave?: (value: Date, event?: React_2.MouseEvent<any>) => void;
|
|
@@ -141,6 +142,14 @@ export declare interface CalendarHandle extends Pick<CalendarWithoutContext, key
|
|
|
141
142
|
value: Date | null;
|
|
142
143
|
}
|
|
143
144
|
|
|
145
|
+
/**
|
|
146
|
+
* The props which will be received by the custom header of the Calendar and the MultiViewCalendar.
|
|
147
|
+
*/
|
|
148
|
+
declare interface CalendarHeaderProps {
|
|
149
|
+
headerTitleProps: CalendarHeaderTitleProps;
|
|
150
|
+
commands: React.ReactNode;
|
|
151
|
+
}
|
|
152
|
+
|
|
144
153
|
/**
|
|
145
154
|
* 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
155
|
*
|
|
@@ -302,10 +311,20 @@ export declare interface CalendarSettings {
|
|
|
302
311
|
* Defines the topmost view to which the user can navigate.
|
|
303
312
|
*/
|
|
304
313
|
topView?: ActiveView;
|
|
314
|
+
/**
|
|
315
|
+
* Specifies the possible format options for the displayed Calendar week days' names.
|
|
316
|
+
*
|
|
317
|
+
* @default short
|
|
318
|
+
*/
|
|
319
|
+
weekDaysFormat?: WeekDaysFormat;
|
|
305
320
|
/**
|
|
306
321
|
* Determines if the week number column will be displayed.
|
|
307
322
|
*/
|
|
308
323
|
weekNumber?: boolean;
|
|
324
|
+
/**
|
|
325
|
+
* Displays the days that fall out of the current month.
|
|
326
|
+
*/
|
|
327
|
+
showOtherMonthDays?: boolean;
|
|
309
328
|
/**
|
|
310
329
|
* Enables the customization or the override of the default Calendar cell
|
|
311
330
|
* ([see example]({% slug custom_rendering_calendar %}#toc-cells-inside-the-view)).
|
|
@@ -321,6 +340,11 @@ export declare interface CalendarSettings {
|
|
|
321
340
|
* ([see example]({% slug custom_rendering_calendar %}#toc-titles-of-current-views)).
|
|
322
341
|
*/
|
|
323
342
|
headerTitle?: React.ComponentType<CalendarHeaderTitleProps>;
|
|
343
|
+
/**
|
|
344
|
+
* Enables the customization or the override of the default header title in the Calendar
|
|
345
|
+
* ([see example]({% slug custom_rendering_calendar %}#toc-titles-of-current-views)).
|
|
346
|
+
*/
|
|
347
|
+
header?: React.ComponentType<CalendarHeaderProps>;
|
|
324
348
|
/**
|
|
325
349
|
* Enables the customization or the override of the default navigation item in the Calendar
|
|
326
350
|
* ([see example]({% slug custom_rendering_calendar %}#toc-items-in-the-side-navigation)).
|
|
@@ -358,6 +382,7 @@ export declare class CalendarWeekCell extends React_2.Component<CalendarWeekCell
|
|
|
358
382
|
* @return
|
|
359
383
|
* Returns a `<td />` element with the [`value`]({% slug api_dateinputs_calendarweekcellprops %}#toc-value) as a child.
|
|
360
384
|
*/
|
|
385
|
+
private handleClick;
|
|
361
386
|
render(): JSX_2.Element;
|
|
362
387
|
}
|
|
363
388
|
|
|
@@ -371,6 +396,8 @@ export declare interface CalendarWeekCellProps {
|
|
|
371
396
|
children?: React_2.ReactNode;
|
|
372
397
|
className?: string;
|
|
373
398
|
firstDate: Date;
|
|
399
|
+
weekDays?: Date[];
|
|
400
|
+
onClick?: (firstDate: Date, value: Date[], event: React_2.MouseEvent<HTMLTableCellElement>) => void;
|
|
374
401
|
}
|
|
375
402
|
|
|
376
403
|
/** @hidden */
|
|
@@ -391,6 +418,7 @@ export declare class CalendarWithoutContext extends React_2.Component<CalendarPr
|
|
|
391
418
|
id: PropTypes.Requireable<string>;
|
|
392
419
|
ariaLabelledBy: PropTypes.Requireable<string>;
|
|
393
420
|
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
421
|
+
weekDaysFormat: PropTypes.Requireable<string>;
|
|
394
422
|
max: PropTypes.Requireable<Date>;
|
|
395
423
|
min: PropTypes.Requireable<Date>;
|
|
396
424
|
navigation: PropTypes.Requireable<boolean>;
|
|
@@ -411,11 +439,13 @@ export declare class CalendarWithoutContext extends React_2.Component<CalendarPr
|
|
|
411
439
|
disabled: boolean;
|
|
412
440
|
min: Date;
|
|
413
441
|
max: Date;
|
|
442
|
+
weekDaysFormat: string;
|
|
414
443
|
navigation: boolean;
|
|
415
444
|
defaultActiveView: ActiveView;
|
|
416
445
|
defaultValue: null;
|
|
417
446
|
topView: ActiveView;
|
|
418
447
|
bottomView: ActiveView;
|
|
448
|
+
showOtherMonthDays: boolean;
|
|
419
449
|
};
|
|
420
450
|
protected dom: DOMService;
|
|
421
451
|
protected scrollSyncService: ScrollSyncService | null;
|
|
@@ -492,6 +522,7 @@ export declare interface CellContext {
|
|
|
492
522
|
isToday: boolean;
|
|
493
523
|
title?: string;
|
|
494
524
|
value: Date;
|
|
525
|
+
isOtherMonth?: boolean;
|
|
495
526
|
}
|
|
496
527
|
|
|
497
528
|
/**
|
|
@@ -702,6 +733,10 @@ export declare interface DateInputProps<T extends DateInput = any> extends FormC
|
|
|
702
733
|
* Determines whether the DateInput is in its read-only state.
|
|
703
734
|
*/
|
|
704
735
|
readonly?: boolean;
|
|
736
|
+
/**
|
|
737
|
+
* If `clearButton` is set to `true`, the DateInput renders a button next to the date value. Clicking this button resets the value of the date and triggers the `change` event.
|
|
738
|
+
*/
|
|
739
|
+
clearButton?: boolean;
|
|
705
740
|
}
|
|
706
741
|
|
|
707
742
|
/**
|
|
@@ -831,6 +866,7 @@ export declare const dateInputsMessages: {
|
|
|
831
866
|
"timepicker.toggleClock": string;
|
|
832
867
|
"dateinput.increment": string;
|
|
833
868
|
"dateinput.decrement": string;
|
|
869
|
+
"dateinput.clear": string;
|
|
834
870
|
"datepicker.toggleCalendar": string;
|
|
835
871
|
"multiviewcalendar.prevView": string;
|
|
836
872
|
"multiviewcalendar.nextView": string;
|
|
@@ -883,7 +919,7 @@ export declare class DateInputWithoutContext extends React_2.Component<DateInput
|
|
|
883
919
|
second: PropTypes.Requireable<string>;
|
|
884
920
|
timeZoneName: PropTypes.Requireable<string>;
|
|
885
921
|
}> | null | undefined>>;
|
|
886
|
-
formatPlaceholder: PropTypes.Requireable<NonNullable<"
|
|
922
|
+
formatPlaceholder: PropTypes.Requireable<NonNullable<"short" | "narrow" | "wide" | "formatPattern" | PropTypes.InferProps<{
|
|
887
923
|
year: PropTypes.Requireable<string>;
|
|
888
924
|
month: PropTypes.Requireable<string>;
|
|
889
925
|
day: PropTypes.Requireable<string>;
|
|
@@ -1048,6 +1084,7 @@ export declare class DateInputWithoutContext extends React_2.Component<DateInput
|
|
|
1048
1084
|
protected updateOnPaste: (event: React_2.SyntheticEvent<HTMLInputElement>) => void;
|
|
1049
1085
|
private spinnersMouseDown;
|
|
1050
1086
|
private handlePaste;
|
|
1087
|
+
private handleClick;
|
|
1051
1088
|
private elementChange;
|
|
1052
1089
|
private elementClick;
|
|
1053
1090
|
private nativeWheel;
|
|
@@ -1389,7 +1426,7 @@ export declare class DatePickerWithoutContext extends React_2.Component<DatePick
|
|
|
1389
1426
|
second: PropTypes.Requireable<string>;
|
|
1390
1427
|
timeZoneName: PropTypes.Requireable<string>;
|
|
1391
1428
|
}> | null | undefined>>;
|
|
1392
|
-
formatPlaceholder: PropTypes.Requireable<NonNullable<"
|
|
1429
|
+
formatPlaceholder: PropTypes.Requireable<NonNullable<"short" | "narrow" | "wide" | "formatPattern" | PropTypes.InferProps<{
|
|
1393
1430
|
year: PropTypes.Requireable<string>;
|
|
1394
1431
|
month: PropTypes.Requireable<string>;
|
|
1395
1432
|
day: PropTypes.Requireable<string>;
|
|
@@ -1565,7 +1602,7 @@ export declare const DateRangePicker: React_2.ForwardRefExoticComponent<DateRang
|
|
|
1565
1602
|
/**
|
|
1566
1603
|
* Represents the settings that can be passed to the MultiViewCalendar inside the DateRangePicker.
|
|
1567
1604
|
*/
|
|
1568
|
-
export declare interface DateRangePickerCalendarSettings extends MultiViewCalendarSettings {
|
|
1605
|
+
export declare interface DateRangePickerCalendarSettings extends Omit<MultiViewCalendarSettings, 'showOtherMonthDays'> {
|
|
1569
1606
|
}
|
|
1570
1607
|
|
|
1571
1608
|
/**
|
|
@@ -1676,6 +1713,10 @@ export declare interface DateRangePickerProps extends DateRangePickerSettings {
|
|
|
1676
1713
|
* Specifies the text that is rendered as title in the adaptive popup.
|
|
1677
1714
|
*/
|
|
1678
1715
|
adaptiveTitle?: string;
|
|
1716
|
+
/**
|
|
1717
|
+
* If `clearButton` is set to `true`, the DateRangePicker renders a button next to the start and end date values. Clicking this button resets the value of the date and triggers the `change` event.
|
|
1718
|
+
*/
|
|
1719
|
+
clearButton?: boolean;
|
|
1679
1720
|
/**
|
|
1680
1721
|
* @hidden
|
|
1681
1722
|
*/
|
|
@@ -1851,7 +1892,7 @@ export declare class DateRangePickerWithoutContext extends React_2.Component<Dat
|
|
|
1851
1892
|
second: PropTypes.Requireable<string>;
|
|
1852
1893
|
timeZoneName: PropTypes.Requireable<string>;
|
|
1853
1894
|
}> | null | undefined>>;
|
|
1854
|
-
formatPlaceholder: PropTypes.Requireable<NonNullable<"
|
|
1895
|
+
formatPlaceholder: PropTypes.Requireable<NonNullable<"short" | "narrow" | "wide" | "formatPattern" | PropTypes.InferProps<{
|
|
1855
1896
|
year: PropTypes.Requireable<string>;
|
|
1856
1897
|
month: PropTypes.Requireable<string>;
|
|
1857
1898
|
day: PropTypes.Requireable<string>;
|
|
@@ -2363,7 +2404,7 @@ export declare class DateTimePickerWithoutContext extends React_2.Component<Date
|
|
|
2363
2404
|
second: PropTypes.Requireable<string>;
|
|
2364
2405
|
timeZoneName: PropTypes.Requireable<string>;
|
|
2365
2406
|
}> | null | undefined>>;
|
|
2366
|
-
formatPlaceholder: PropTypes.Requireable<NonNullable<"
|
|
2407
|
+
formatPlaceholder: PropTypes.Requireable<NonNullable<"short" | "narrow" | "wide" | "formatPattern" | PropTypes.InferProps<{
|
|
2367
2408
|
year: PropTypes.Requireable<string>;
|
|
2368
2409
|
month: PropTypes.Requireable<string>;
|
|
2369
2410
|
day: PropTypes.Requireable<string>;
|
|
@@ -2708,6 +2749,7 @@ declare interface HeaderProps {
|
|
|
2708
2749
|
rangeLength?: number;
|
|
2709
2750
|
service: ViewService;
|
|
2710
2751
|
headerTitle?: React_2.ComponentType<CalendarHeaderTitleProps>;
|
|
2752
|
+
header?: React_2.ComponentType<CalendarHeaderProps>;
|
|
2711
2753
|
commands?: React_2.ReactNode;
|
|
2712
2754
|
verticalView?: boolean;
|
|
2713
2755
|
}
|
|
@@ -2721,6 +2763,7 @@ export declare class HorizontalViewList extends React_2.Component<HorizontalView
|
|
|
2721
2763
|
views: number;
|
|
2722
2764
|
take: number;
|
|
2723
2765
|
allowReverse: boolean;
|
|
2766
|
+
weekDaysFormat: string;
|
|
2724
2767
|
min: Date;
|
|
2725
2768
|
max: Date;
|
|
2726
2769
|
};
|
|
@@ -2736,6 +2779,7 @@ export declare class HorizontalViewList extends React_2.Component<HorizontalView
|
|
|
2736
2779
|
componentDidUpdate(): void;
|
|
2737
2780
|
render(): JSX_2.Element;
|
|
2738
2781
|
protected rotateSelectionRange: (selectionRange: SelectionRange) => SelectionRange;
|
|
2782
|
+
private handleWeekCellClick;
|
|
2739
2783
|
private handleDateChange;
|
|
2740
2784
|
}
|
|
2741
2785
|
|
|
@@ -2761,9 +2805,11 @@ export declare interface HorizontalViewListProps {
|
|
|
2761
2805
|
max?: Date;
|
|
2762
2806
|
min?: Date;
|
|
2763
2807
|
onChange?: (event: HorizontalViewListEventArguments) => void;
|
|
2808
|
+
onWeekSelect?: (firstDate: Date, daysToEqualize: number, event: React_2.MouseEvent<HTMLTableCellElement>) => void;
|
|
2764
2809
|
selectionRange: SelectionRange;
|
|
2765
2810
|
service: ViewService;
|
|
2766
2811
|
showWeekNumbers?: boolean;
|
|
2812
|
+
weekDaysFormat?: WeekDaysFormat;
|
|
2767
2813
|
take?: number;
|
|
2768
2814
|
value: Date[] | Date | null;
|
|
2769
2815
|
views?: number;
|
|
@@ -2771,6 +2817,7 @@ export declare interface HorizontalViewListProps {
|
|
|
2771
2817
|
allowReverse?: boolean;
|
|
2772
2818
|
cell?: React_2.ComponentType<CalendarCellProps>;
|
|
2773
2819
|
weekCell?: React_2.ComponentType<CalendarWeekCellProps>;
|
|
2820
|
+
showOtherMonthDays?: boolean;
|
|
2774
2821
|
headerTitle?: React_2.ComponentType<CalendarHeaderTitleProps>;
|
|
2775
2822
|
dates: any[];
|
|
2776
2823
|
verticalView?: boolean;
|
|
@@ -3044,6 +3091,12 @@ export declare interface MultiViewCalendarSettings {
|
|
|
3044
3091
|
* Determines if the week number column will be displayed.
|
|
3045
3092
|
*/
|
|
3046
3093
|
weekNumber?: boolean;
|
|
3094
|
+
/**
|
|
3095
|
+
* Specifies the possible format options for the displayed Calendar week days' names.
|
|
3096
|
+
*
|
|
3097
|
+
* @default short
|
|
3098
|
+
*/
|
|
3099
|
+
weekDaysFormat?: WeekDaysFormat;
|
|
3047
3100
|
/**
|
|
3048
3101
|
* Fires each time the MultiViewCalendar is focused.
|
|
3049
3102
|
*/
|
|
@@ -3094,6 +3147,10 @@ export declare interface MultiViewCalendarSettings {
|
|
|
3094
3147
|
* * `range`—Renders a date-range selection.
|
|
3095
3148
|
*/
|
|
3096
3149
|
mode?: MultiViewCalendarMode;
|
|
3150
|
+
/**
|
|
3151
|
+
* Displays the days that fall out of the current month.
|
|
3152
|
+
*/
|
|
3153
|
+
showOtherMonthDays?: boolean;
|
|
3097
3154
|
/**
|
|
3098
3155
|
* Fires each time the MultiViewCalendar is blurred.
|
|
3099
3156
|
*/
|
|
@@ -3144,6 +3201,7 @@ export declare class MultiViewCalendarWithoutContext extends React_2.Component<M
|
|
|
3144
3201
|
disabled: PropTypes.Requireable<boolean>;
|
|
3145
3202
|
focusedDate: PropTypes.Requireable<Date>;
|
|
3146
3203
|
id: PropTypes.Requireable<string>;
|
|
3204
|
+
weekDaysFormat: PropTypes.Requireable<string>;
|
|
3147
3205
|
ariaLabelledBy: PropTypes.Requireable<string>;
|
|
3148
3206
|
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
3149
3207
|
max: PropTypes.Requireable<Date>;
|
|
@@ -3157,6 +3215,7 @@ export declare class MultiViewCalendarWithoutContext extends React_2.Component<M
|
|
|
3157
3215
|
value: PropTypes.Requireable<any>;
|
|
3158
3216
|
views: (props: MultiViewCalendarProps, propName: keyof MultiViewCalendarProps<any>, componentName: string) => Error | null;
|
|
3159
3217
|
weekNumber: PropTypes.Requireable<boolean>;
|
|
3218
|
+
showOtherMonthDays: PropTypes.Requireable<boolean>;
|
|
3160
3219
|
dir: PropTypes.Requireable<string>;
|
|
3161
3220
|
};
|
|
3162
3221
|
/**
|
|
@@ -3170,10 +3229,12 @@ export declare class MultiViewCalendarWithoutContext extends React_2.Component<M
|
|
|
3170
3229
|
defaultActiveView: ActiveView;
|
|
3171
3230
|
defaultValue: null;
|
|
3172
3231
|
topView: ActiveView;
|
|
3232
|
+
weekDaysFormat: string;
|
|
3173
3233
|
tabIndex: number;
|
|
3174
3234
|
bottomView: ActiveView;
|
|
3175
3235
|
views: number;
|
|
3176
3236
|
allowReverse: boolean;
|
|
3237
|
+
showOtherMonthDays: boolean;
|
|
3177
3238
|
};
|
|
3178
3239
|
protected dates: any[];
|
|
3179
3240
|
private lastView;
|
|
@@ -3250,6 +3311,7 @@ export declare class MultiViewCalendarWithoutContext extends React_2.Component<M
|
|
|
3250
3311
|
private handleNextButtonClick;
|
|
3251
3312
|
private handleKeyDown;
|
|
3252
3313
|
private handleViewChange;
|
|
3314
|
+
private handleWeekSelection;
|
|
3253
3315
|
private handleDateChange;
|
|
3254
3316
|
}
|
|
3255
3317
|
|
|
@@ -3931,7 +3993,7 @@ export declare class TimePickerWithoutContext extends React_2.Component<TimePick
|
|
|
3931
3993
|
second: PropTypes.Requireable<string>;
|
|
3932
3994
|
timeZoneName: PropTypes.Requireable<string>;
|
|
3933
3995
|
}> | null | undefined>>;
|
|
3934
|
-
formatPlaceholder: PropTypes.Requireable<NonNullable<"
|
|
3996
|
+
formatPlaceholder: PropTypes.Requireable<NonNullable<"short" | "narrow" | "wide" | "formatPattern" | PropTypes.InferProps<{
|
|
3935
3997
|
year: PropTypes.Requireable<string>;
|
|
3936
3998
|
month: PropTypes.Requireable<string>;
|
|
3937
3999
|
day: PropTypes.Requireable<string>;
|
|
@@ -4281,11 +4343,13 @@ export declare class ViewList extends React_2.Component<ViewListProps, ViewListS
|
|
|
4281
4343
|
value: PropTypes.Requireable<Date>;
|
|
4282
4344
|
viewHeight: PropTypes.Requireable<number>;
|
|
4283
4345
|
viewOffset: PropTypes.Requireable<number>;
|
|
4346
|
+
weekDaysFormat: PropTypes.Requireable<string>;
|
|
4284
4347
|
tabIndex: PropTypes.Requireable<number>;
|
|
4285
4348
|
};
|
|
4286
4349
|
static defaultProps: {
|
|
4287
4350
|
take: number;
|
|
4288
4351
|
showWeekNumbers: boolean;
|
|
4352
|
+
weekDaysFormat: string;
|
|
4289
4353
|
smoothScroll: boolean;
|
|
4290
4354
|
};
|
|
4291
4355
|
virtualization: Virtualization | null;
|
|
@@ -4302,6 +4366,7 @@ export declare class ViewList extends React_2.Component<ViewListProps, ViewListS
|
|
|
4302
4366
|
private shouldScroll;
|
|
4303
4367
|
private indexToScroll?;
|
|
4304
4368
|
private lastFocus;
|
|
4369
|
+
private weekService;
|
|
4305
4370
|
get element(): HTMLDivElement | null;
|
|
4306
4371
|
protected get weekNames(): string[];
|
|
4307
4372
|
protected get weekNumber(): boolean;
|
|
@@ -4353,11 +4418,14 @@ declare interface ViewListProps {
|
|
|
4353
4418
|
showWeekNumbers?: boolean;
|
|
4354
4419
|
smoothScroll?: boolean;
|
|
4355
4420
|
take?: number;
|
|
4421
|
+
weekDaysFormat?: WeekDaysFormat;
|
|
4356
4422
|
value: Date | null;
|
|
4357
4423
|
viewHeight?: number;
|
|
4358
4424
|
viewOffset?: number;
|
|
4359
4425
|
weekCell?: React_2.ComponentType<CalendarWeekCellProps>;
|
|
4426
|
+
showOtherMonthDays?: boolean;
|
|
4360
4427
|
headerTitle?: React_2.ComponentType<CalendarHeaderTitleProps>;
|
|
4428
|
+
header?: React_2.ComponentType<CalendarHeaderProps>;
|
|
4361
4429
|
shouldScroll?: () => boolean;
|
|
4362
4430
|
tabIndex?: number;
|
|
4363
4431
|
}
|
|
@@ -4488,13 +4556,18 @@ declare interface VirtualizationProps {
|
|
|
4488
4556
|
children?: React_2.ReactNode;
|
|
4489
4557
|
}
|
|
4490
4558
|
|
|
4559
|
+
/**
|
|
4560
|
+
* Specifies the possible format options for the displayed Calendar week days' names.
|
|
4561
|
+
*/
|
|
4562
|
+
declare type WeekDaysFormat = 'short' | 'narrow' | 'abbreviated';
|
|
4563
|
+
|
|
4491
4564
|
/**
|
|
4492
4565
|
* @hidden
|
|
4493
4566
|
*/
|
|
4494
4567
|
export declare class WeekNamesService {
|
|
4495
4568
|
private intl;
|
|
4496
4569
|
constructor(intl: IntlService);
|
|
4497
|
-
getWeekNames(includeWeekNumber?: boolean): string[];
|
|
4570
|
+
getWeekNames(includeWeekNumber?: boolean, weekDaysFormat?: WeekDaysFormat): string[];
|
|
4498
4571
|
}
|
|
4499
4572
|
|
|
4500
4573
|
/**
|
package/messages/index.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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="multiviewcalendar.prevView",t="multiviewcalendar.nextView",a="dateinput.increment",c="dateinput.decrement",i="calendar.today",
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="multiviewcalendar.prevView",t="multiviewcalendar.nextView",a="dateinput.increment",c="dateinput.decrement",i="dateinput.clear",r="calendar.today",n="datepicker.toggleCalendar",o="daterangepicker.swapStartEnd",l="daterangepicker.start",s="daterangepicker.end",d="daterangepicker.separator",g="datetimepicker.toggleDateTimeSelector",m="timepicker.now",k="timepicker.selectNow",p="timepicker.cancel",S="timepicker.set",w="timepicker.toggleTimeSelector",T="timepicker.toggleClock",u="datetimepicker.date",C="datetimepicker.time",v="datetimepicker.cancel",P="datetimepicker.set",V="daterangepicker.cancel",N="daterangepicker.set",y={[r]:"Today",[m]:"NOW",[S]:"Set",[p]:"Cancel",[u]:"Date",[C]:"Time",[v]:"Cancel",[P]:"Set",[V]:"Cancel",[N]:"Set",[l]:"Start",[s]:"End",[d]:" ",[k]:"Select Now",[w]:"Toggle TimeSelector",[T]:"Toggle Clock",[a]:"Increase value",[c]:"Decrease value",[i]:"clear",[n]:"Toggle calendar",[e]:"Navigate to previous view",[t]:"Navigate to next view",[o]:"Swap start and end values",[g]:"Toggle date-time selector"};exports.clear=i;exports.date=u;exports.dateRangePickerCancel=V;exports.dateRangePickerSet=N;exports.dateTimePickerCancel=v;exports.dateTimePickerSet=P;exports.decreaseValue=c;exports.end=s;exports.increaseValue=a;exports.messages=y;exports.nextView=t;exports.now=m;exports.prevView=e;exports.selectNow=k;exports.separator=d;exports.start=l;exports.swapStartEnd=o;exports.time=C;exports.timePickerCancel=p;exports.timePickerSet=S;exports.today=r;exports.toggleCalendar=n;exports.toggleClock=T;exports.toggleDateTimeSelector=g;exports.toggleTimeSelector=w;
|
package/messages/index.mjs
CHANGED
|
@@ -6,54 +6,56 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
const e = "multiviewcalendar.prevView", t = "multiviewcalendar.nextView", a = "dateinput.increment", c = "dateinput.decrement", n = "calendar.today",
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
9
|
+
const e = "multiviewcalendar.prevView", t = "multiviewcalendar.nextView", a = "dateinput.increment", c = "dateinput.decrement", n = "dateinput.clear", i = "calendar.today", r = "datepicker.toggleCalendar", o = "daterangepicker.swapStartEnd", l = "daterangepicker.start", s = "daterangepicker.end", d = "daterangepicker.separator", g = "datetimepicker.toggleDateTimeSelector", p = "timepicker.now", m = "timepicker.selectNow", k = "timepicker.cancel", w = "timepicker.set", S = "timepicker.toggleTimeSelector", T = "timepicker.toggleClock", u = "datetimepicker.date", v = "datetimepicker.time", C = "datetimepicker.cancel", N = "datetimepicker.set", P = "daterangepicker.cancel", V = "daterangepicker.set", x = {
|
|
10
|
+
[i]: "Today",
|
|
11
|
+
[p]: "NOW",
|
|
12
|
+
[w]: "Set",
|
|
13
|
+
[k]: "Cancel",
|
|
14
|
+
[u]: "Date",
|
|
15
15
|
[v]: "Time",
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[
|
|
19
|
-
[
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
[
|
|
16
|
+
[C]: "Cancel",
|
|
17
|
+
[N]: "Set",
|
|
18
|
+
[P]: "Cancel",
|
|
19
|
+
[V]: "Set",
|
|
20
|
+
[l]: "Start",
|
|
21
|
+
[s]: "End",
|
|
22
|
+
[d]: " ",
|
|
23
23
|
[m]: "Select Now",
|
|
24
|
-
[
|
|
25
|
-
[
|
|
24
|
+
[S]: "Toggle TimeSelector",
|
|
25
|
+
[T]: "Toggle Clock",
|
|
26
26
|
[a]: "Increase value",
|
|
27
27
|
[c]: "Decrease value",
|
|
28
|
-
[
|
|
28
|
+
[n]: "clear",
|
|
29
|
+
[r]: "Toggle calendar",
|
|
29
30
|
[e]: "Navigate to previous view",
|
|
30
31
|
[t]: "Navigate to next view",
|
|
31
|
-
[
|
|
32
|
-
[
|
|
32
|
+
[o]: "Swap start and end values",
|
|
33
|
+
[g]: "Toggle date-time selector"
|
|
33
34
|
};
|
|
34
35
|
export {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
P as
|
|
38
|
-
|
|
39
|
-
C as
|
|
36
|
+
n as clear,
|
|
37
|
+
u as date,
|
|
38
|
+
P as dateRangePickerCancel,
|
|
39
|
+
V as dateRangePickerSet,
|
|
40
|
+
C as dateTimePickerCancel,
|
|
41
|
+
N as dateTimePickerSet,
|
|
40
42
|
c as decreaseValue,
|
|
41
|
-
|
|
43
|
+
s as end,
|
|
42
44
|
a as increaseValue,
|
|
43
|
-
|
|
45
|
+
x as messages,
|
|
44
46
|
t as nextView,
|
|
45
|
-
|
|
47
|
+
p as now,
|
|
46
48
|
e as prevView,
|
|
47
49
|
m as selectNow,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
d as separator,
|
|
51
|
+
l as start,
|
|
52
|
+
o as swapStartEnd,
|
|
51
53
|
v as time,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
k as timePickerCancel,
|
|
55
|
+
w as timePickerSet,
|
|
56
|
+
i as today,
|
|
57
|
+
r as toggleCalendar,
|
|
58
|
+
T as toggleClock,
|
|
59
|
+
g as toggleDateTimeSelector,
|
|
60
|
+
S as toggleTimeSelector
|
|
59
61
|
};
|
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: 1715583212,
|
|
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": "
|
|
3
|
+
"version": "8.0.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",
|
|
@@ -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": "
|
|
28
|
-
"@progress/kendo-react-common": "
|
|
29
|
-
"@progress/kendo-react-intl": "
|
|
30
|
-
"@progress/kendo-react-labels": "
|
|
31
|
-
"@progress/kendo-react-layout": "
|
|
32
|
-
"@progress/kendo-react-popup": "
|
|
33
|
-
"@progress/kendo-svg-icons": "^
|
|
27
|
+
"@progress/kendo-react-buttons": "8.0.0-develop.1",
|
|
28
|
+
"@progress/kendo-react-common": "8.0.0-develop.1",
|
|
29
|
+
"@progress/kendo-react-intl": "8.0.0-develop.1",
|
|
30
|
+
"@progress/kendo-react-labels": "8.0.0-develop.1",
|
|
31
|
+
"@progress/kendo-react-layout": "8.0.0-develop.1",
|
|
32
|
+
"@progress/kendo-react-popup": "8.0.0-develop.1",
|
|
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;
|
|
@@ -1,50 +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";
|
|
9
|
-
const o = (i, t, s) => [
|
|
10
|
-
...i.slice(0, t + 1),
|
|
11
|
-
...i.slice(t + 1).map((e) => e + s)
|
|
12
|
-
];
|
|
13
|
-
class g {
|
|
14
|
-
constructor(t = 0, s, e) {
|
|
15
|
-
this.total = t, this.rowHeight = s, this.detailRowHeight = e, this.offsets = [], this.heights = [];
|
|
16
|
-
let h = 0;
|
|
17
|
-
for (let f = 0; f < t; f++)
|
|
18
|
-
this.offsets.push(h), h += s, this.heights.push(s);
|
|
19
|
-
}
|
|
20
|
-
height(t) {
|
|
21
|
-
return this.heights[t];
|
|
22
|
-
}
|
|
23
|
-
expandDetail(t) {
|
|
24
|
-
this.height(t) === this.rowHeight && this.updateRowHeight(t, this.detailRowHeight);
|
|
25
|
-
}
|
|
26
|
-
collapseDetail(t) {
|
|
27
|
-
this.height(t) > this.rowHeight && this.updateRowHeight(t, this.detailRowHeight * -1);
|
|
28
|
-
}
|
|
29
|
-
index(t) {
|
|
30
|
-
for (let s = 0; s < this.offsets.length; s++) {
|
|
31
|
-
if (t === this.offsets[s])
|
|
32
|
-
return s;
|
|
33
|
-
if (t < this.offsets[s])
|
|
34
|
-
return s - 1;
|
|
35
|
-
}
|
|
36
|
-
return this.total - 1;
|
|
37
|
-
}
|
|
38
|
-
offset(t) {
|
|
39
|
-
return this.offsets[t];
|
|
40
|
-
}
|
|
41
|
-
totalHeight() {
|
|
42
|
-
return this.heights.reduce((t, s) => t + s, 0);
|
|
43
|
-
}
|
|
44
|
-
updateRowHeight(t, s) {
|
|
45
|
-
this.heights[t] += s, this.offsets = o(this.offsets, t, s);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
export {
|
|
49
|
-
g as RowHeightService
|
|
50
|
-
};
|