@progress/kendo-react-dateinputs 15.0.0 → 15.0.1-develop.10
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/CalendarMcpWrapper.d.ts +3 -1
- package/DateRangePickerMcpWrapper.d.ts +3 -1
- package/DateTimePickerMcpWrapper.d.ts +3 -1
- package/TimePickerMcpWrapper.d.ts +3 -1
- package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
- package/index.d.mts +9 -13
- package/index.d.ts +9 -13
- package/index.js +1 -1
- package/index.mjs +109 -110
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +8 -8
- package/timepicker/TimePicker.js +1 -1
- package/timepicker/TimePicker.mjs +7 -7
- package/timepicker/services/DayPeriodService.js +1 -1
- package/timepicker/services/DayPeriodService.mjs +11 -11
package/index.d.mts
CHANGED
|
@@ -5,19 +5,23 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
8
|
+
import { CalendarWithoutContext, CalendarProps, CalendarPropsContext, CalendarHandle, CalendarChangeEvent } from './calendar/components/Calendar.js';
|
|
9
|
+
import { CalendarWrapper } from './CalendarMcpWrapper.js';
|
|
9
10
|
import { DateInput, DateInputProps, DateInputPropsContext, DateInputHandle, dateInputDefaultProps, DateInputChangeEvent } from './dateinput/DateInput.js';
|
|
10
11
|
import { DatePicker, datePickerDefaultProps, DatePickerProps, DatePickerPropsContext, DatePickerHandle, DatePickerChangeEvent, DatePickerOpenEvent, DatePickerCloseEvent } from './datepicker/DatePicker.js';
|
|
11
|
-
import {
|
|
12
|
+
import { TimePickerWithoutContext, TimePickerProps, TimePickerPropsContext, TimePickerHandle, TimePickerChangeEvent, TimePickerOpenEvent, TimePickerCloseEvent } from './timepicker/TimePicker.js';
|
|
13
|
+
import { TimePickerWrapper } from './TimePickerMcpWrapper.js';
|
|
12
14
|
import { MultiViewCalendar, MultiViewCalendarWithoutContext, MultiViewCalendarProps, MultiViewCalendarPropsContext, MultiViewCalendarHandle, MultiViewCalendarChangeEvent } from './calendar/components/MultiViewCalendar.js';
|
|
13
|
-
import {
|
|
15
|
+
import { DateRangePickerWithoutContext, DateRangePickerProps, DateRangePickerPropsContext, DateRangePickerHandle, DateRangePickerChangeEvent, DateRangePickerOpenEvent, DateRangePickerCloseEvent } from './daterangepicker/DateRangePicker.js';
|
|
16
|
+
import { DateRangePickerWrapper } from './DateRangePickerMcpWrapper.js';
|
|
14
17
|
import { CalendarCell, CalendarCellProps } from './calendar/components/CalendarCell.js';
|
|
15
18
|
import { CalendarWeekCell, CalendarWeekCellProps } from './calendar/components/CalendarWeekCell.js';
|
|
16
19
|
import { CalendarHeaderTitle, CalendarHeaderTitleProps } from './calendar/components/CalendarHeaderTitle.js';
|
|
17
20
|
import { CalendarNavigationItem, CalendarNavigationItemProps } from './calendar/components/CalendarNavigationItem.js';
|
|
18
21
|
import { ActiveView, SelectionRange, CalendarSettings, CalendarViewEnum, MultiViewCalendarMode, MultiViewCalendarSettings } from './calendar/models/index.js';
|
|
19
22
|
import { DateInputSettings, DateInputIncrementalSteps, DateInputFormatPlaceholder, DateInputCustomFormatPlaceholder } from './dateinput/models/index.js';
|
|
20
|
-
import {
|
|
23
|
+
import { DateTimePickerWithoutContext, DateTimePickerProps, DateTimePickerPropsContext, DateTimePickerHandle, DateTimePickerChangeEvent, DateTimePickerOpenEvent, DateTimePickerCloseEvent } from './datetimepicker/DateTimePicker.js';
|
|
24
|
+
import { DateTimePickerWrapper } from './DateTimePickerMcpWrapper.js';
|
|
21
25
|
import { DatePickerSettings } from './datepicker/models/index.js';
|
|
22
26
|
import { DateTimePickerSettings } from './datetimepicker/models/index.js';
|
|
23
27
|
import { TimePickerSettings } from './timepicker/models/index.js';
|
|
@@ -34,17 +38,9 @@ import { Virtualization } from './virtualization/Virtualization.js';
|
|
|
34
38
|
import { HorizontalViewList, HorizontalViewListProps } from './calendar/components/HorizontalViewList.js';
|
|
35
39
|
import { TimeSelector } from './timepicker/TimeSelector.js';
|
|
36
40
|
import { DateInputsPopupSettings } from './PopupSettings';
|
|
37
|
-
declare const Calendar: import('react').ForwardRefExoticComponent<CalendarProps<any> & import('react').RefAttributes<CalendarHandle>>;
|
|
38
|
-
type Calendar = CalendarClassComponent;
|
|
39
|
-
declare const TimePicker: import('react').ForwardRefExoticComponent<TimePickerProps & import('react').RefAttributes<TimePickerHandle>>;
|
|
40
|
-
type TimePicker = TimePickerClassComponent;
|
|
41
|
-
declare const DateRangePicker: import('react').ForwardRefExoticComponent<DateRangePickerProps & import('react').RefAttributes<DateRangePickerHandle>>;
|
|
42
|
-
type DateRangePicker = DateRangePickerClassComponent;
|
|
43
|
-
declare const DateTimePicker: import('react').ForwardRefExoticComponent<DateTimePickerProps & import('react').RefAttributes<DateTimePickerHandle>>;
|
|
44
|
-
type DateTimePicker = DateTimePickerClassComponent;
|
|
45
41
|
export * from './calendar/services/index.js';
|
|
46
42
|
export { DayPeriodService, HoursService, MinutesService, SecondsService } from './timepicker/services/index.js';
|
|
47
43
|
export * from './calendar/models/index.js';
|
|
48
44
|
export { getToday, MIN_DATE, MAX_DATE, MAX_TIME, MIN_TIME } from './utils.js';
|
|
49
45
|
export { getNow } from './timepicker/utils.js';
|
|
50
|
-
export { dateInputsMessages, today, increaseValue, decreaseValue, toggleCalendar, swapStartEnd, separator, start, end, toggleDateTimeSelector, TimeSelector, ViewList, Virtualization, Header, TodayCommand, CalendarWithoutContext, TimePickerWithoutContext, DateRangePickerWithoutContext, MultiViewCalendarWithoutContext, DateTimePickerWithoutContext, HorizontalViewList, HorizontalViewListProps, TimeList, TimePart, ToggleButton, ToggleButtonProps, ActiveView, Calendar, CalendarProps, CalendarPropsContext, CalendarHandle, CalendarSettings, CalendarViewEnum, CalendarChangeEvent, CalendarCell, CalendarCellProps, CalendarWeekCell, CalendarWeekCellProps, CalendarHeaderTitle, CalendarHeaderTitleProps, CalendarNavigationItem, CalendarNavigationItemProps, DateInput, dateInputDefaultProps, DateInputProps, DateInputPropsContext, DateInputHandle, DateInputSettings, DateInputChangeEvent, DateInputIncrementalSteps, DateInputFormatPlaceholder, DateInputCustomFormatPlaceholder, DatePicker, datePickerDefaultProps, DatePickerProps, DatePickerPropsContext, DatePickerHandle, DatePickerSettings, DatePickerChangeEvent, DatePickerOpenEvent, DatePickerCloseEvent, TimePicker, TimePickerProps, TimePickerPropsContext, TimePickerHandle, TimePickerSettings, TimePickerChangeEvent, TimePickerOpenEvent, TimePickerCloseEvent, MultiViewCalendar, MultiViewCalendarProps, MultiViewCalendarPropsContext, MultiViewCalendarHandle, MultiViewCalendarSettings, MultiViewCalendarMode, MultiViewCalendarChangeEvent, DateRangePicker, DateRangePickerProps, DateRangePickerPropsContext, DateRangePickerHandle, DateRangePickerSettings, DateRangePickerCalendarSettings, DateRangePickerDateInputSettings, DateRangePickerPopupSettings, DateRangePickerChangeEvent, DateRangePickerOpenEvent, DateRangePickerCloseEvent, DateTimePicker, DateTimePickerProps, DateTimePickerPropsContext, DateTimePickerHandle, DateTimePickerSettings, DateTimePickerChangeEvent, DateTimePickerOpenEvent, DateTimePickerCloseEvent, SelectionRange, FormComponentValidity, DateInputsPopupSettings };
|
|
46
|
+
export { dateInputsMessages, today, increaseValue, decreaseValue, toggleCalendar, swapStartEnd, separator, start, end, toggleDateTimeSelector, TimeSelector, ViewList, Virtualization, Header, TodayCommand, CalendarWithoutContext, TimePickerWithoutContext, DateRangePickerWithoutContext, MultiViewCalendarWithoutContext, DateTimePickerWithoutContext, HorizontalViewList, HorizontalViewListProps, TimeList, TimePart, ToggleButton, ToggleButtonProps, ActiveView, CalendarWrapper as Calendar, CalendarProps, CalendarPropsContext, CalendarHandle, CalendarSettings, CalendarViewEnum, CalendarChangeEvent, CalendarCell, CalendarCellProps, CalendarWeekCell, CalendarWeekCellProps, CalendarHeaderTitle, CalendarHeaderTitleProps, CalendarNavigationItem, CalendarNavigationItemProps, DateInput, dateInputDefaultProps, DateInputProps, DateInputPropsContext, DateInputHandle, DateInputSettings, DateInputChangeEvent, DateInputIncrementalSteps, DateInputFormatPlaceholder, DateInputCustomFormatPlaceholder, DatePicker, datePickerDefaultProps, DatePickerProps, DatePickerPropsContext, DatePickerHandle, DatePickerSettings, DatePickerChangeEvent, DatePickerOpenEvent, DatePickerCloseEvent, TimePickerWrapper as TimePicker, TimePickerProps, TimePickerPropsContext, TimePickerHandle, TimePickerSettings, TimePickerChangeEvent, TimePickerOpenEvent, TimePickerCloseEvent, MultiViewCalendar, MultiViewCalendarProps, MultiViewCalendarPropsContext, MultiViewCalendarHandle, MultiViewCalendarSettings, MultiViewCalendarMode, MultiViewCalendarChangeEvent, DateRangePickerWrapper as DateRangePicker, DateRangePickerProps, DateRangePickerPropsContext, DateRangePickerHandle, DateRangePickerSettings, DateRangePickerCalendarSettings, DateRangePickerDateInputSettings, DateRangePickerPopupSettings, DateRangePickerChangeEvent, DateRangePickerOpenEvent, DateRangePickerCloseEvent, DateTimePickerWrapper as DateTimePicker, DateTimePickerProps, DateTimePickerPropsContext, DateTimePickerHandle, DateTimePickerSettings, DateTimePickerChangeEvent, DateTimePickerOpenEvent, DateTimePickerCloseEvent, SelectionRange, FormComponentValidity, DateInputsPopupSettings };
|
package/index.d.ts
CHANGED
|
@@ -5,19 +5,23 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
8
|
+
import { CalendarWithoutContext, CalendarProps, CalendarPropsContext, CalendarHandle, CalendarChangeEvent } from './calendar/components/Calendar.js';
|
|
9
|
+
import { CalendarWrapper } from './CalendarMcpWrapper.js';
|
|
9
10
|
import { DateInput, DateInputProps, DateInputPropsContext, DateInputHandle, dateInputDefaultProps, DateInputChangeEvent } from './dateinput/DateInput.js';
|
|
10
11
|
import { DatePicker, datePickerDefaultProps, DatePickerProps, DatePickerPropsContext, DatePickerHandle, DatePickerChangeEvent, DatePickerOpenEvent, DatePickerCloseEvent } from './datepicker/DatePicker.js';
|
|
11
|
-
import {
|
|
12
|
+
import { TimePickerWithoutContext, TimePickerProps, TimePickerPropsContext, TimePickerHandle, TimePickerChangeEvent, TimePickerOpenEvent, TimePickerCloseEvent } from './timepicker/TimePicker.js';
|
|
13
|
+
import { TimePickerWrapper } from './TimePickerMcpWrapper.js';
|
|
12
14
|
import { MultiViewCalendar, MultiViewCalendarWithoutContext, MultiViewCalendarProps, MultiViewCalendarPropsContext, MultiViewCalendarHandle, MultiViewCalendarChangeEvent } from './calendar/components/MultiViewCalendar.js';
|
|
13
|
-
import {
|
|
15
|
+
import { DateRangePickerWithoutContext, DateRangePickerProps, DateRangePickerPropsContext, DateRangePickerHandle, DateRangePickerChangeEvent, DateRangePickerOpenEvent, DateRangePickerCloseEvent } from './daterangepicker/DateRangePicker.js';
|
|
16
|
+
import { DateRangePickerWrapper } from './DateRangePickerMcpWrapper.js';
|
|
14
17
|
import { CalendarCell, CalendarCellProps } from './calendar/components/CalendarCell.js';
|
|
15
18
|
import { CalendarWeekCell, CalendarWeekCellProps } from './calendar/components/CalendarWeekCell.js';
|
|
16
19
|
import { CalendarHeaderTitle, CalendarHeaderTitleProps } from './calendar/components/CalendarHeaderTitle.js';
|
|
17
20
|
import { CalendarNavigationItem, CalendarNavigationItemProps } from './calendar/components/CalendarNavigationItem.js';
|
|
18
21
|
import { ActiveView, SelectionRange, CalendarSettings, CalendarViewEnum, MultiViewCalendarMode, MultiViewCalendarSettings } from './calendar/models/index.js';
|
|
19
22
|
import { DateInputSettings, DateInputIncrementalSteps, DateInputFormatPlaceholder, DateInputCustomFormatPlaceholder } from './dateinput/models/index.js';
|
|
20
|
-
import {
|
|
23
|
+
import { DateTimePickerWithoutContext, DateTimePickerProps, DateTimePickerPropsContext, DateTimePickerHandle, DateTimePickerChangeEvent, DateTimePickerOpenEvent, DateTimePickerCloseEvent } from './datetimepicker/DateTimePicker.js';
|
|
24
|
+
import { DateTimePickerWrapper } from './DateTimePickerMcpWrapper.js';
|
|
21
25
|
import { DatePickerSettings } from './datepicker/models/index.js';
|
|
22
26
|
import { DateTimePickerSettings } from './datetimepicker/models/index.js';
|
|
23
27
|
import { TimePickerSettings } from './timepicker/models/index.js';
|
|
@@ -34,17 +38,9 @@ import { Virtualization } from './virtualization/Virtualization.js';
|
|
|
34
38
|
import { HorizontalViewList, HorizontalViewListProps } from './calendar/components/HorizontalViewList.js';
|
|
35
39
|
import { TimeSelector } from './timepicker/TimeSelector.js';
|
|
36
40
|
import { DateInputsPopupSettings } from './PopupSettings';
|
|
37
|
-
declare const Calendar: import('react').ForwardRefExoticComponent<CalendarProps<any> & import('react').RefAttributes<CalendarHandle>>;
|
|
38
|
-
type Calendar = CalendarClassComponent;
|
|
39
|
-
declare const TimePicker: import('react').ForwardRefExoticComponent<TimePickerProps & import('react').RefAttributes<TimePickerHandle>>;
|
|
40
|
-
type TimePicker = TimePickerClassComponent;
|
|
41
|
-
declare const DateRangePicker: import('react').ForwardRefExoticComponent<DateRangePickerProps & import('react').RefAttributes<DateRangePickerHandle>>;
|
|
42
|
-
type DateRangePicker = DateRangePickerClassComponent;
|
|
43
|
-
declare const DateTimePicker: import('react').ForwardRefExoticComponent<DateTimePickerProps & import('react').RefAttributes<DateTimePickerHandle>>;
|
|
44
|
-
type DateTimePicker = DateTimePickerClassComponent;
|
|
45
41
|
export * from './calendar/services/index.js';
|
|
46
42
|
export { DayPeriodService, HoursService, MinutesService, SecondsService } from './timepicker/services/index.js';
|
|
47
43
|
export * from './calendar/models/index.js';
|
|
48
44
|
export { getToday, MIN_DATE, MAX_DATE, MAX_TIME, MIN_TIME } from './utils.js';
|
|
49
45
|
export { getNow } from './timepicker/utils.js';
|
|
50
|
-
export { dateInputsMessages, today, increaseValue, decreaseValue, toggleCalendar, swapStartEnd, separator, start, end, toggleDateTimeSelector, TimeSelector, ViewList, Virtualization, Header, TodayCommand, CalendarWithoutContext, TimePickerWithoutContext, DateRangePickerWithoutContext, MultiViewCalendarWithoutContext, DateTimePickerWithoutContext, HorizontalViewList, HorizontalViewListProps, TimeList, TimePart, ToggleButton, ToggleButtonProps, ActiveView, Calendar, CalendarProps, CalendarPropsContext, CalendarHandle, CalendarSettings, CalendarViewEnum, CalendarChangeEvent, CalendarCell, CalendarCellProps, CalendarWeekCell, CalendarWeekCellProps, CalendarHeaderTitle, CalendarHeaderTitleProps, CalendarNavigationItem, CalendarNavigationItemProps, DateInput, dateInputDefaultProps, DateInputProps, DateInputPropsContext, DateInputHandle, DateInputSettings, DateInputChangeEvent, DateInputIncrementalSteps, DateInputFormatPlaceholder, DateInputCustomFormatPlaceholder, DatePicker, datePickerDefaultProps, DatePickerProps, DatePickerPropsContext, DatePickerHandle, DatePickerSettings, DatePickerChangeEvent, DatePickerOpenEvent, DatePickerCloseEvent, TimePicker, TimePickerProps, TimePickerPropsContext, TimePickerHandle, TimePickerSettings, TimePickerChangeEvent, TimePickerOpenEvent, TimePickerCloseEvent, MultiViewCalendar, MultiViewCalendarProps, MultiViewCalendarPropsContext, MultiViewCalendarHandle, MultiViewCalendarSettings, MultiViewCalendarMode, MultiViewCalendarChangeEvent, DateRangePicker, DateRangePickerProps, DateRangePickerPropsContext, DateRangePickerHandle, DateRangePickerSettings, DateRangePickerCalendarSettings, DateRangePickerDateInputSettings, DateRangePickerPopupSettings, DateRangePickerChangeEvent, DateRangePickerOpenEvent, DateRangePickerCloseEvent, DateTimePicker, DateTimePickerProps, DateTimePickerPropsContext, DateTimePickerHandle, DateTimePickerSettings, DateTimePickerChangeEvent, DateTimePickerOpenEvent, DateTimePickerCloseEvent, SelectionRange, FormComponentValidity, DateInputsPopupSettings };
|
|
46
|
+
export { dateInputsMessages, today, increaseValue, decreaseValue, toggleCalendar, swapStartEnd, separator, start, end, toggleDateTimeSelector, TimeSelector, ViewList, Virtualization, Header, TodayCommand, CalendarWithoutContext, TimePickerWithoutContext, DateRangePickerWithoutContext, MultiViewCalendarWithoutContext, DateTimePickerWithoutContext, HorizontalViewList, HorizontalViewListProps, TimeList, TimePart, ToggleButton, ToggleButtonProps, ActiveView, CalendarWrapper as Calendar, CalendarProps, CalendarPropsContext, CalendarHandle, CalendarSettings, CalendarViewEnum, CalendarChangeEvent, CalendarCell, CalendarCellProps, CalendarWeekCell, CalendarWeekCellProps, CalendarHeaderTitle, CalendarHeaderTitleProps, CalendarNavigationItem, CalendarNavigationItemProps, DateInput, dateInputDefaultProps, DateInputProps, DateInputPropsContext, DateInputHandle, DateInputSettings, DateInputChangeEvent, DateInputIncrementalSteps, DateInputFormatPlaceholder, DateInputCustomFormatPlaceholder, DatePicker, datePickerDefaultProps, DatePickerProps, DatePickerPropsContext, DatePickerHandle, DatePickerSettings, DatePickerChangeEvent, DatePickerOpenEvent, DatePickerCloseEvent, TimePickerWrapper as TimePicker, TimePickerProps, TimePickerPropsContext, TimePickerHandle, TimePickerSettings, TimePickerChangeEvent, TimePickerOpenEvent, TimePickerCloseEvent, MultiViewCalendar, MultiViewCalendarProps, MultiViewCalendarPropsContext, MultiViewCalendarHandle, MultiViewCalendarSettings, MultiViewCalendarMode, MultiViewCalendarChangeEvent, DateRangePickerWrapper as DateRangePicker, DateRangePickerProps, DateRangePickerPropsContext, DateRangePickerHandle, DateRangePickerSettings, DateRangePickerCalendarSettings, DateRangePickerDateInputSettings, DateRangePickerPopupSettings, DateRangePickerChangeEvent, DateRangePickerOpenEvent, DateRangePickerCloseEvent, DateTimePickerWrapper as DateTimePicker, DateTimePickerProps, DateTimePickerPropsContext, DateTimePickerHandle, DateTimePickerSettings, DateTimePickerChangeEvent, DateTimePickerOpenEvent, DateTimePickerCloseEvent, SelectionRange, FormComponentValidity, DateInputsPopupSettings };
|
package/index.js
CHANGED
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./calendar/components/Calendar.js"),u=require("./CalendarMcpWrapper.js"),t=require("./dateinput/DateInput.js"),i=require("./datepicker/DatePicker.js"),o=require("./timepicker/TimePicker.js"),l=require("./TimePickerMcpWrapper.js"),a=require("./calendar/components/MultiViewCalendar.js"),c=require("./daterangepicker/DateRangePicker.js"),d=require("./DateRangePickerMcpWrapper.js"),C=require("./calendar/components/CalendarCell.js"),
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./calendar/components/Calendar.js"),u=require("./CalendarMcpWrapper.js"),t=require("./dateinput/DateInput.js"),i=require("./datepicker/DatePicker.js"),o=require("./timepicker/TimePicker.js"),l=require("./TimePickerMcpWrapper.js"),a=require("./calendar/components/MultiViewCalendar.js"),c=require("./daterangepicker/DateRangePicker.js"),d=require("./DateRangePickerMcpWrapper.js"),C=require("./calendar/components/CalendarCell.js"),S=require("./calendar/components/CalendarWeekCell.js"),P=require("./calendar/components/CalendarHeaderTitle.js"),p=require("./calendar/components/CalendarNavigationItem.js"),T=require("./calendar/models/NavigationAction.js"),v=require("./calendar/models/CalendarViewEnum.js"),D=require("./calendar/models/SelectionRange.js"),s=require("./datetimepicker/DateTimePicker.js"),m=require("./DateTimePickerMcpWrapper.js"),q=require("./datepicker/ToggleButton.js"),g=require("./calendar/components/Header.js"),V=require("./timepicker/TimeList.js"),k=require("./timepicker/TimePart.js"),M=require("./calendar/components/TodayCommand.js"),e=require("./messages/index.js"),w=require("./calendar/components/ViewList.js"),x=require("./virtualization/Virtualization.js"),W=require("./calendar/components/HorizontalViewList.js"),E=require("./timepicker/TimeSelector.js"),r=require("./utils.js"),I=require("./timepicker/utils.js"),N=require("./calendar/services/BusViewService.js"),y=require("./calendar/services/CenturyViewService.js"),h=require("./calendar/services/DOMService.js"),A=require("./timepicker/services/DayPeriodService.js"),H=require("./calendar/services/DecadeViewService.js"),L=require("./timepicker/services/HoursService.js"),R=require("./timepicker/services/MinutesService.js"),_=require("./calendar/services/MonthViewService.js"),z=require("./calendar/services/NavigationService.js"),B=require("./calendar/services/ScrollSyncService.js"),O=require("./timepicker/services/SecondsService.js"),f=require("./calendar/services/WeekNamesService.js"),Y=require("./calendar/services/YearViewService.js");exports.CalendarPropsContext=n.CalendarPropsContext;exports.CalendarWithoutContext=n.CalendarWithoutContext;exports.Calendar=u.CalendarWrapper;exports.DateInput=t.DateInput;exports.DateInputPropsContext=t.DateInputPropsContext;exports.dateInputDefaultProps=t.dateInputDefaultProps;exports.DatePicker=i.DatePicker;exports.DatePickerPropsContext=i.DatePickerPropsContext;exports.datePickerDefaultProps=i.datePickerDefaultProps;exports.TimePickerPropsContext=o.TimePickerPropsContext;exports.TimePickerWithoutContext=o.TimePickerWithoutContext;exports.TimePicker=l.TimePickerWrapper;exports.MultiViewCalendar=a.MultiViewCalendar;exports.MultiViewCalendarPropsContext=a.MultiViewCalendarPropsContext;exports.MultiViewCalendarWithoutContext=a.MultiViewCalendarWithoutContext;exports.DateRangePickerPropsContext=c.DateRangePickerPropsContext;exports.DateRangePickerWithoutContext=c.DateRangePickerWithoutContext;exports.DateRangePicker=d.DateRangePickerWrapper;exports.CalendarCell=C.CalendarCell;exports.CalendarWeekCell=S.CalendarWeekCell;exports.CalendarHeaderTitle=P.CalendarHeaderTitle;exports.CalendarNavigationItem=p.CalendarNavigationItem;exports.Action=T.Action;exports.CalendarViewEnum=v.CalendarViewEnum;exports.EMPTY_SELECTIONRANGE=D.EMPTY_SELECTIONRANGE;exports.DateTimePickerPropsContext=s.DateTimePickerPropsContext;exports.DateTimePickerWithoutContext=s.DateTimePickerWithoutContext;exports.DateTimePicker=m.DateTimePickerWrapper;exports.ToggleButton=q.ToggleButton;exports.Header=g.Header;exports.TimeList=V.TimeList;exports.TimePart=k.TimePart;exports.TodayCommand=M.TodayCommand;exports.dateInputsMessages=e.messages;exports.decreaseValue=e.decreaseValue;exports.end=e.end;exports.increaseValue=e.increaseValue;exports.separator=e.separator;exports.start=e.start;exports.swapStartEnd=e.swapStartEnd;exports.today=e.today;exports.toggleCalendar=e.toggleCalendar;exports.toggleDateTimeSelector=e.toggleDateTimeSelector;exports.ViewList=w.ViewList;exports.Virtualization=x.Virtualization;exports.HorizontalViewList=W.HorizontalViewList;exports.TimeSelector=E.TimeSelector;exports.MAX_DATE=r.MAX_DATE;exports.MAX_TIME=r.MAX_TIME;exports.MIN_DATE=r.MIN_DATE;exports.MIN_TIME=r.MIN_TIME;exports.getToday=r.getToday;exports.getNow=I.getNow;exports.BusViewService=N.BusViewService;exports.CenturyViewService=y.CenturyViewService;exports.DOMService=h.DOMService;exports.DayPeriodService=A.DayPeriodService;exports.DecadeViewService=H.DecadeViewService;exports.HoursService=L.HoursService;exports.MinutesService=R.MinutesService;exports.MonthViewService=_.MonthViewService;exports.NavigationService=z.NavigationService;exports.ScrollSyncService=B.ScrollSyncService;exports.SecondsService=O.SecondsService;exports.WeekNamesService=f.WeekNamesService;exports.YearViewService=Y.YearViewService;
|
package/index.mjs
CHANGED
|
@@ -6,115 +6,114 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import { CalendarPropsContext as
|
|
10
|
-
import { CalendarWrapper as
|
|
11
|
-
import { DateInput as
|
|
12
|
-
import { DatePicker as
|
|
13
|
-
import { TimePickerPropsContext as
|
|
14
|
-
import { TimePickerWrapper as
|
|
15
|
-
import { MultiViewCalendar as
|
|
16
|
-
import { DateRangePickerPropsContext as
|
|
17
|
-
import { DateRangePickerWrapper as
|
|
18
|
-
import { CalendarCell as
|
|
19
|
-
import { CalendarWeekCell as
|
|
20
|
-
import { CalendarHeaderTitle as
|
|
21
|
-
import { CalendarNavigationItem as
|
|
22
|
-
import { Action as
|
|
23
|
-
import { CalendarViewEnum as
|
|
24
|
-
import { EMPTY_SELECTIONRANGE as
|
|
25
|
-
import { DateTimePickerPropsContext as
|
|
26
|
-
import { DateTimePickerWrapper as
|
|
27
|
-
import { ToggleButton as
|
|
28
|
-
import { Header as
|
|
29
|
-
import { TimeList as
|
|
30
|
-
import { TimePart as
|
|
31
|
-
import { TodayCommand as
|
|
32
|
-
import { messages as
|
|
33
|
-
import { ViewList as
|
|
34
|
-
import { Virtualization as
|
|
35
|
-
import { HorizontalViewList as
|
|
36
|
-
import { TimeSelector as
|
|
37
|
-
import { MAX_DATE as
|
|
38
|
-
import { getNow as
|
|
39
|
-
import { BusViewService as
|
|
40
|
-
import { CenturyViewService as
|
|
41
|
-
import { DOMService as
|
|
42
|
-
import { DayPeriodService as
|
|
43
|
-
import { DecadeViewService as
|
|
44
|
-
import { HoursService as
|
|
45
|
-
import { MinutesService as
|
|
46
|
-
import { MonthViewService as
|
|
47
|
-
import { NavigationService as
|
|
48
|
-
import { ScrollSyncService as
|
|
49
|
-
import { SecondsService as
|
|
50
|
-
import { WeekNamesService as
|
|
51
|
-
import { YearViewService as
|
|
52
|
-
const n = e, x = r, f = o, c = t;
|
|
9
|
+
import { CalendarPropsContext as o, CalendarWithoutContext as t } from "./calendar/components/Calendar.mjs";
|
|
10
|
+
import { CalendarWrapper as i } from "./CalendarMcpWrapper.mjs";
|
|
11
|
+
import { DateInput as m, DateInputPropsContext as x, dateInputDefaultProps as n } from "./dateinput/DateInput.mjs";
|
|
12
|
+
import { DatePicker as c, DatePickerPropsContext as l, datePickerDefaultProps as s } from "./datepicker/DatePicker.mjs";
|
|
13
|
+
import { TimePickerPropsContext as d, TimePickerWithoutContext as P } from "./timepicker/TimePicker.mjs";
|
|
14
|
+
import { TimePickerWrapper as T } from "./TimePickerMcpWrapper.mjs";
|
|
15
|
+
import { MultiViewCalendar as S, MultiViewCalendarPropsContext as k, MultiViewCalendarWithoutContext as g } from "./calendar/components/MultiViewCalendar.mjs";
|
|
16
|
+
import { DateRangePickerPropsContext as M, DateRangePickerWithoutContext as V } from "./daterangepicker/DateRangePicker.mjs";
|
|
17
|
+
import { DateRangePickerWrapper as W } from "./DateRangePickerMcpWrapper.mjs";
|
|
18
|
+
import { CalendarCell as I } from "./calendar/components/CalendarCell.mjs";
|
|
19
|
+
import { CalendarWeekCell as h } from "./calendar/components/CalendarWeekCell.mjs";
|
|
20
|
+
import { CalendarHeaderTitle as A } from "./calendar/components/CalendarHeaderTitle.mjs";
|
|
21
|
+
import { CalendarNavigationItem as _ } from "./calendar/components/CalendarNavigationItem.mjs";
|
|
22
|
+
import { Action as L } from "./calendar/models/NavigationAction.mjs";
|
|
23
|
+
import { CalendarViewEnum as B } from "./calendar/models/CalendarViewEnum.mjs";
|
|
24
|
+
import { EMPTY_SELECTIONRANGE as X } from "./calendar/models/SelectionRange.mjs";
|
|
25
|
+
import { DateTimePickerPropsContext as G, DateTimePickerWithoutContext as b } from "./datetimepicker/DateTimePicker.mjs";
|
|
26
|
+
import { DateTimePickerWrapper as q } from "./DateTimePickerMcpWrapper.mjs";
|
|
27
|
+
import { ToggleButton as J } from "./datepicker/ToggleButton.mjs";
|
|
28
|
+
import { Header as Q } from "./calendar/components/Header.mjs";
|
|
29
|
+
import { TimeList as Z } from "./timepicker/TimeList.mjs";
|
|
30
|
+
import { TimePart as ee } from "./timepicker/TimePart.mjs";
|
|
31
|
+
import { TodayCommand as oe } from "./calendar/components/TodayCommand.mjs";
|
|
32
|
+
import { messages as ae, decreaseValue as ie, end as pe, increaseValue as me, separator as xe, start as ne, swapStartEnd as fe, today as ce, toggleCalendar as le, toggleDateTimeSelector as se } from "./messages/index.mjs";
|
|
33
|
+
import { ViewList as de } from "./calendar/components/ViewList.mjs";
|
|
34
|
+
import { Virtualization as ue } from "./virtualization/Virtualization.mjs";
|
|
35
|
+
import { HorizontalViewList as De } from "./calendar/components/HorizontalViewList.mjs";
|
|
36
|
+
import { TimeSelector as ke } from "./timepicker/TimeSelector.mjs";
|
|
37
|
+
import { MAX_DATE as ve, MAX_TIME as Me, MIN_DATE as Ve, MIN_TIME as we, getToday as We } from "./utils.mjs";
|
|
38
|
+
import { getNow as Ie } from "./timepicker/utils.mjs";
|
|
39
|
+
import { BusViewService as he } from "./calendar/services/BusViewService.mjs";
|
|
40
|
+
import { CenturyViewService as Ae } from "./calendar/services/CenturyViewService.mjs";
|
|
41
|
+
import { DOMService as _e } from "./calendar/services/DOMService.mjs";
|
|
42
|
+
import { DayPeriodService as Le } from "./timepicker/services/DayPeriodService.mjs";
|
|
43
|
+
import { DecadeViewService as Be } from "./calendar/services/DecadeViewService.mjs";
|
|
44
|
+
import { HoursService as Xe } from "./timepicker/services/HoursService.mjs";
|
|
45
|
+
import { MinutesService as Ge } from "./timepicker/services/MinutesService.mjs";
|
|
46
|
+
import { MonthViewService as je } from "./calendar/services/MonthViewService.mjs";
|
|
47
|
+
import { NavigationService as Fe } from "./calendar/services/NavigationService.mjs";
|
|
48
|
+
import { ScrollSyncService as Ke } from "./calendar/services/ScrollSyncService.mjs";
|
|
49
|
+
import { SecondsService as Ue } from "./timepicker/services/SecondsService.mjs";
|
|
50
|
+
import { WeekNamesService as $e } from "./calendar/services/WeekNamesService.mjs";
|
|
51
|
+
import { YearViewService as rr } from "./calendar/services/YearViewService.mjs";
|
|
53
52
|
export {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
53
|
+
L as Action,
|
|
54
|
+
he as BusViewService,
|
|
55
|
+
i as Calendar,
|
|
56
|
+
I as CalendarCell,
|
|
57
|
+
A as CalendarHeaderTitle,
|
|
58
|
+
_ as CalendarNavigationItem,
|
|
59
|
+
o as CalendarPropsContext,
|
|
60
|
+
B as CalendarViewEnum,
|
|
61
|
+
h as CalendarWeekCell,
|
|
62
|
+
t as CalendarWithoutContext,
|
|
63
|
+
Ae as CenturyViewService,
|
|
64
|
+
_e as DOMService,
|
|
65
|
+
m as DateInput,
|
|
66
|
+
x as DateInputPropsContext,
|
|
67
|
+
c as DatePicker,
|
|
68
|
+
l as DatePickerPropsContext,
|
|
69
|
+
W as DateRangePicker,
|
|
70
|
+
M as DateRangePickerPropsContext,
|
|
71
|
+
V as DateRangePickerWithoutContext,
|
|
72
|
+
q as DateTimePicker,
|
|
73
|
+
G as DateTimePickerPropsContext,
|
|
74
|
+
b as DateTimePickerWithoutContext,
|
|
75
|
+
Le as DayPeriodService,
|
|
76
|
+
Be as DecadeViewService,
|
|
77
|
+
X as EMPTY_SELECTIONRANGE,
|
|
78
|
+
Q as Header,
|
|
79
|
+
De as HorizontalViewList,
|
|
80
|
+
Xe as HoursService,
|
|
81
|
+
ve as MAX_DATE,
|
|
82
|
+
Me as MAX_TIME,
|
|
83
|
+
Ve as MIN_DATE,
|
|
84
|
+
we as MIN_TIME,
|
|
85
|
+
Ge as MinutesService,
|
|
86
|
+
je as MonthViewService,
|
|
87
|
+
S as MultiViewCalendar,
|
|
88
|
+
k as MultiViewCalendarPropsContext,
|
|
89
|
+
g as MultiViewCalendarWithoutContext,
|
|
90
|
+
Fe as NavigationService,
|
|
91
|
+
Ke as ScrollSyncService,
|
|
92
|
+
Ue as SecondsService,
|
|
93
|
+
Z as TimeList,
|
|
94
|
+
ee as TimePart,
|
|
95
|
+
T as TimePicker,
|
|
96
|
+
d as TimePickerPropsContext,
|
|
97
|
+
P as TimePickerWithoutContext,
|
|
98
|
+
ke as TimeSelector,
|
|
99
|
+
oe as TodayCommand,
|
|
100
|
+
J as ToggleButton,
|
|
101
|
+
de as ViewList,
|
|
102
|
+
ue as Virtualization,
|
|
103
|
+
$e as WeekNamesService,
|
|
104
|
+
rr as YearViewService,
|
|
105
|
+
n as dateInputDefaultProps,
|
|
106
|
+
ae as dateInputsMessages,
|
|
107
|
+
s as datePickerDefaultProps,
|
|
108
|
+
ie as decreaseValue,
|
|
109
|
+
pe as end,
|
|
110
|
+
Ie as getNow,
|
|
111
|
+
We as getToday,
|
|
112
|
+
me as increaseValue,
|
|
113
|
+
xe as separator,
|
|
114
|
+
ne as start,
|
|
115
|
+
fe as swapStartEnd,
|
|
116
|
+
ce as today,
|
|
117
|
+
le as toggleCalendar,
|
|
118
|
+
se as toggleDateTimeSelector
|
|
120
119
|
};
|
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: 1780564964,version:"15.0.1-develop.10",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: '15.0.
|
|
9
|
+
publishDate: 1780564964,
|
|
10
|
+
version: '15.0.1-develop.10',
|
|
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": "15.0.
|
|
3
|
+
"version": "15.0.1-develop.10",
|
|
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": "15.0.
|
|
32
|
-
"@progress/kendo-react-common": "15.0.
|
|
33
|
-
"@progress/kendo-react-intl": "15.0.
|
|
34
|
-
"@progress/kendo-react-labels": "15.0.
|
|
35
|
-
"@progress/kendo-react-layout": "15.0.
|
|
36
|
-
"@progress/kendo-react-popup": "15.0.
|
|
31
|
+
"@progress/kendo-react-buttons": "15.0.1-develop.10",
|
|
32
|
+
"@progress/kendo-react-common": "15.0.1-develop.10",
|
|
33
|
+
"@progress/kendo-react-intl": "15.0.1-develop.10",
|
|
34
|
+
"@progress/kendo-react-labels": "15.0.1-develop.10",
|
|
35
|
+
"@progress/kendo-react-layout": "15.0.1-develop.10",
|
|
36
|
+
"@progress/kendo-react-popup": "15.0.1-develop.10",
|
|
37
37
|
"@progress/kendo-svg-icons": "^4.9.0 || ^5.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": 1780564964,
|
|
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/TimePicker.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 Z=require("react"),e=require("prop-types"),$=require("@progress/kendo-react-popup"),y=require("@progress/kendo-date-math"),n=require("@progress/kendo-react-common"),J=require("@progress/kendo-svg-icons"),P=require("@progress/kendo-react-intl"),T=require("../package-metadata.js"),a=require("../messages/index.js"),Q=require("../dateinput/DateInput.js"),Y=require("./TimeSelector.js"),p=require("../utils.js"),g=require("./utils.js"),ee=require("../hooks/usePickerFloatingLabel.js"),te=require("@progress/kendo-react-buttons"),ie=require("../common/AdaptiveMode.js"),se=require("@progress/kendo-react-layout");function oe(c){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const t in c)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(c,t);Object.defineProperty(s,t,i.get?i:{enumerable:!0,get:()=>c[t]})}}return s.default=c,Object.freeze(s)}const r=oe(Z),l=class l extends r.Component{constructor(s){super(s),this._element=null,this._dateInput=r.createRef(),this._timeSelector=null,this.shouldFocusDateInput=!1,this.prevShow=!1,this.showLicenseWatermark=!1,this.handleKendoPasteValue=t=>{if(t instanceof Date&&!isNaN(t.getTime())){this.applyKendoPasteTime(t);return}const i=t!=null?String(t):"";if(!i)return;const o=new Date(i);isNaN(o.getTime())||this.applyKendoPasteTime(o)},this.applyKendoPasteTime=t=>{const i=this.normalizeTime(t);if(!g.isInRange(i,this.min,this.max))return;const o=new Event("change",{bubbles:!0}),h={target:this._element,currentTarget:this._element,nativeEvent:o};this.handleValueChange({syntheticEvent:h,nativeEvent:o,value:i})},this.focus=()=>{this.dateInput&&this.dateInput.focus()},this.renderTimeSelector=()=>{const{smoothScroll:t,cancelButton:i,nowButton:o,disabled:h,format:d,steps:u,unstyled:f}=this.props;return r.createElement(Y.TimeSelector,{ref:this.setTimeSelectorRef,mobileMode:this.mobileMode,show:this.show,cancelButton:i,disabled:h,nowButton:o,format:d,min:this.min,max:this.max,steps:u,smoothScroll:t,value:this.value,footer:!this.mobileMode,handleTimeChange:this.mobileMode&&this.handleTimeChange,onChange:this.handleValueChange,onReject:this.handleValueReject,unstyled:f})},this.renderPopup=()=>{const{popupClass:t,...i}=this.popupSettings,{unstyled:o}=this.props,h=o&&o.uTimePicker,d=n.classNames(t),u={popupClass:n.uTimePicker.popup({c:h}),show:this.show,animate:this.element!==null,anchor:this.element,className:d,id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...i};return this.props.popup?r.createElement(this.props.popup,{...u},this.renderTimeSelector()):r.createElement($.Popup,{...u},this.renderTimeSelector())},this.renderAdaptivePopup=()=>{const{windowWidth:t=0}=this.state,i={expand:this.show,onClose:this.handleBlur,title:this.props.adaptiveTitle||this.props.label,subTitle:this.props.adaptiveSubtitle,windowWidth:t,footer:{cancelText:this.localizationService.toLanguageString(a.toggleClock,a.messages[a.timePickerCancel]),onCancel:this.handleValueReject,applyText:this.localizationService.toLanguageString(a.timePickerSet,a.messages[a.timePickerSet]),onApply:o=>this.handleValueChange(o)}};return r.createElement(ie.AdaptiveMode,{...i},r.createElement(se.ActionSheetContent,null,this.renderTimeSelector()))},this.setTimeSelectorRef=t=>{this._timeSelector=t},this.nextValue=(t,i)=>t.value!==void 0?t.value:i.value,this.nextShow=(t,i)=>t.show!==void 0?t.show:i.show,this.handleInputValueChange=t=>{const i=this.mergeTime(t.value);this.handleValueChange({...t,value:i})},this.handleTimeChange=t=>{this.setState({candidate:t.time})},this.handleValueChange=t=>{this.setState({value:y.cloneDate(t.value||this.state.candidate)}),this.valueDuringOnChange=t.value,this.showDuringOnChange=!1,this.mobileMode||(this.shouldFocusDateInput=!0);const{onChange:i}=this.props,o=this.valueDuringOnChange!==void 0?this.value:this.state.candidate||this.value;i&&i.call(void 0,{syntheticEvent:t.syntheticEvent,nativeEvent:t.nativeEvent,value:o,show:this.show,target:this}),this.valueDuringOnChange=void 0,this.showDuringOnChange=void 0,this.setState({candidate:null}),this.setShow(!1)},this.handleFocus=()=>{this.setState({focused:!0})},this.handleBlur=()=>{this.setState({focused:!1}),this.setShow(!1)},this.handleValueReject=t=>{this.setShow(!1)},this.handleClick=t=>{this.props.disabled||(this.shouldFocusDateInput=!0,this.setShow(!this.show))},this.handleIconMouseDown=t=>{t.preventDefault()},this.handleKeyDown=t=>{const{altKey:i,keyCode:o}=t;if(o===n.Keys.esc){this.shouldFocusDateInput=!0,this.setShow(!1);return}i&&(o===n.Keys.up||o===n.Keys.down)&&(t.preventDefault(),t.stopPropagation(),this.shouldFocusDateInput=o===n.Keys.up,this.setShow(o===n.Keys.down))},this.showLicenseWatermark=!n.validatePackage(T.packageMetadata,{component:"TimePicker"}),this.licenseMessage=n.getLicenseMessage(T.packageMetadata),this.state={value:this.props.defaultValue||l.defaultProps.defaultValue,show:this.props.defaultShow||l.defaultProps.defaultShow,focused:!1,candidate:null},this.normalizeTime=this.normalizeTime.bind(this),this.setShow=this.setShow.bind(this),this.mergeTime=this.mergeTime.bind(this)}get _popupId(){return this.props.id+"-popup-id"}get document(){if(n.canUseDOM)return this.element&&this.element.ownerDocument||document}get element(){return this._element}get dateInput(){return this._dateInput.current}get timeSelector(){return this._timeSelector}get value(){const s=this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value;return s!==null?y.cloneDate(s):null}get show(){return this.showDuringOnChange!==void 0?this.showDuringOnChange:this.props.show!==void 0?this.props.show:this.state.show}get name(){return this.props.name}get validity(){const s=this.value&&this.normalizeTime(this.value),t=this.normalizeTime(this.min),i=this.normalizeTime(this.max),o=g.isInRange(s,t,i),h=this.props.validationMessage!==void 0,d=(!this.required||this.value!==null)&&o,u=this.props.valid!==void 0?this.props.valid:d;return{customError:h,rangeOverflow:g.isBiggerThanMax(s,i),rangeUnderflow:g.isSmallerThanMin(s,t),valid:u,valueMissing:this.value===null}}get mobileMode(){var t;return!!(this.state.windowWidth&&this.props._adaptiveMode&&this.state.windowWidth<=((t=this.props._adaptiveMode)==null?void 0:t.medium)&&this.props.adaptive)}get validityStyles(){return this.props.validityStyles!==void 0?this.props.validityStyles:l.defaultProps.validityStyles}get required(){return this.props.required!==void 0?this.props.required:!1}get popupSettings(){return this.props.popupSettings||l.defaultProps.popupSettings}get min(){return this.props.min!==void 0?this.props.min:l.defaultProps.min}get max(){return this.props.max!==void 0?this.props.max:l.defaultProps.max}get dateInputComp(){return this.props.dateInput||l.defaultProps.dateInput}get localizationService(){return P.provideLocalizationService(this)}componentDidMount(){var t;this.observerResize=n.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.show&&this.forceUpdate(),(t=this.document)!=null&&t.body&&this.observerResize&&this.observerResize.observe(this.document.body);const s=this.props.name||this.props.id;this.KendoPasteSubscription=n.subscribeToKendoPaste(this._element,{fieldName:s,onValueChange:i=>{this.handleKendoPasteValue(i)}})}componentDidUpdate(){this._timeSelector&&this.show&&!this.prevShow&&this._timeSelector.focusActiveList(),this.mobileMode&&this.show&&!this.prevShow&&setTimeout(()=>{this._timeSelector&&this._timeSelector.focusActiveList()},300),this.dateInput&&this.dateInput.element&&!this.show&&this.shouldFocusDateInput&&this.dateInput.element.focus({preventScroll:!0}),this.prevShow=this.show,this.shouldFocusDateInput=!1}componentWillUnmount(){var s,t;(s=this.document)!=null&&s.body&&this.observerResize&&this.observerResize.disconnect(),(t=this.KendoPasteSubscription)==null||t.unsubscribe()}render(){const{size:s=l.defaultProps.size,rounded:t=l.defaultProps.rounded,fillMode:i=l.defaultProps.fillMode,disabled:o,tabIndex:h,title:d,id:u,className:f,format:I,formatPlaceholder:k,width:D,name:O,steps:z,validationMessage:x,required:R,validityStyles:q,ariaLabelledBy:E,ariaDescribedBy:L,unstyled:v,enableMouseWheel:N,autoCorrectParts:B,autoSwitchParts:K,autoSwitchKeys:V,allowCaretMode:A,inputAttributes:F}=this.props,b=v&&v.uTimePicker,w=!this.validityStyles||this.validity.valid,_=this.localizationService.toLanguageString(a.selectTime,a.messages[a.selectTime]),j={disabled:o,format:I,formatPlaceholder:k,id:u,ariaLabelledBy:E,ariaDescribedBy:L,ariaLabel:_,max:this.normalizeTime(this.max),min:this.normalizeTime(this.min),name:O,onChange:this.handleInputValueChange,required:R,steps:z,tabIndex:this.show?-1:h,title:d,valid:this.validity.valid,validationMessage:x,validityStyles:q,value:this.value&&this.normalizeTime(this.value),label:void 0,placeholder:this.state.focused?null:this.props.placeholder,ariaHasPopup:"dialog",ariaExpanded:this.show,enableMouseWheel:N,autoCorrectParts:B,autoSwitchParts:K,autoSwitchKeys:V,allowCaretMode:A,inputAttributes:F},W=this.localizationService.toLanguageString(a.toggleClock,a.messages[a.toggleClock]),U=this.localizationService.toLanguageString(a.toggleTimeSelector,a.messages[a.toggleTimeSelector]),S=r.createElement(n.AsyncFocusBlur,{onFocus:this.handleFocus,onBlur:this.mobileMode?void 0:this.handleBlur,onSyncBlur:this.props.onBlur,onSyncFocus:this.props.onFocus},({onFocus:H,onBlur:G})=>r.createElement(r.Fragment,null,r.createElement("span",{ref:X=>{this._element=X},className:n.classNames(n.uTimePicker.wrapper({c:b,size:s,rounded:t,fillMode:i,invalid:!w,required:this.required,disabled:o}),{"k-focus":this.state.focused},f),onKeyDown:this.handleKeyDown,style:{width:D},onFocus:this.mobileMode?this.handleClick:H,onBlur:G,onClick:this.mobileMode?this.handleClick:void 0},r.createElement(this.dateInputComp,{_ref:this._dateInput,ariaRole:"combobox",ariaControls:this.show?this._popupId:void 0,...j}),r.createElement(te.Button,{tabIndex:-1,type:"button",icon:"clock",svgIcon:J.clockIcon,onMouseDown:this.handleIconMouseDown,onClick:this.mobileMode?void 0:this.handleClick,title:U,className:n.classNames(n.uTimePicker.inputButton({c:b})),fillMode:i,"aria-label":W}),!this.mobileMode&&this.renderPopup()),this.mobileMode&&this.renderAdaptivePopup(),this.showLicenseWatermark&&r.createElement(n.WatermarkOverlay,{message:this.licenseMessage})));return this.props.label?r.createElement(ee.PickerFloatingLabel,{dateInput:this._dateInput,label:this.props.label,editorId:u,editorValid:w,editorDisabled:this.props.disabled,children:S,style:{width:this.props.width}}):S}normalizeTime(s){return p.setTime(p.MIDNIGHT_DATE,s)}setShow(s){const{onOpen:t,onClose:i}=this.props;this.show!==s&&(this.setState({show:s}),s&&t&&t.call(void 0,{target:this}),!s&&i&&i.call(void 0,{target:this}))}mergeTime(s){return this.value&&s?p.setTime(this.value,s):s}calculateMedia(s){for(const t of s)this.setState({windowWidth:t.target.clientWidth})}};l.displayName="TimePicker",l.propTypes={className:e.string,cancelButton:e.bool,nowButton:e.bool,defaultShow:e.bool,defaultValue:e.instanceOf(Date),disabled:e.bool,format:e.oneOfType([e.string,e.shape({skeleton:e.string,pattern:e.string,date:e.oneOf(["short","medium","long","full"]),time:e.oneOf(["short","medium","long","full"]),datetime:e.oneOf(["short","medium","long","full"]),era:e.oneOf(["narrow","short","long"]),year:e.oneOf(["numeric","2-digit"]),month:e.oneOf(["numeric","2-digit","narrow","short","long"]),day:e.oneOf(["numeric","2-digit"]),weekday:e.oneOf(["narrow","short","long"]),hour:e.oneOf(["numeric","2-digit"]),hour12:e.bool,minute:e.oneOf(["numeric","2-digit"]),second:e.oneOf(["numeric","2-digit"]),timeZoneName:e.oneOf(["short","long"])})]),formatPlaceholder:e.oneOfType([e.oneOf(["wide","narrow","short","formatPattern"]),e.shape({year:e.string,month:e.string,day:e.string,hour:e.string,minute:e.string,second:e.string})]),id:e.string,ariaLabelledBy:e.string,ariaDescribedBy:e.string,min:e.instanceOf(Date),max:e.instanceOf(Date),name:e.string,popupSettings:e.shape({animate:e.bool,appendTo:e.any,popupClass:e.string}),dateInput:e.elementType,show:e.bool,steps:e.shape({hour:e.number,minute:e.number,second:e.number}),smoothScroll:e.bool,tabIndex:e.number,title:e.string,value:e.instanceOf(Date),width:e.oneOfType([e.number,e.string]),validationMessage:e.string,required:e.bool,validate:e.bool,valid:e.bool,size:e.oneOf(["small","medium","large"]),rounded:e.oneOf(["small","medium","large","full","none"]),fillMode:e.oneOf(["solid","flat","outline"]),inputAttributes:e.object},l.defaultProps={defaultShow:!1,defaultValue:null,disabled:!1,format:"t",max:p.MAX_TIME,min:p.MIN_TIME,popupSettings:{},tabIndex:0,steps:{},validityStyles:!0,dateInput:Q.DateInputInner,size:void 0,rounded:void 0,fillMode:void 0};let m=l;const C=n.createPropsContext(),M=n.withIdHOC(n.withPropsContext(C,n.withUnstyledHOC(n.withAdaptiveModeContext(m))));M.displayName="KendoReactTimePicker";P.registerForLocalization(m);exports.TimePicker=M;exports.TimePickerPropsContext=C;exports.TimePickerWithoutContext=m;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Z=require("react"),e=require("prop-types"),$=require("@progress/kendo-react-popup"),y=require("@progress/kendo-date-math"),n=require("@progress/kendo-react-common"),J=require("@progress/kendo-svg-icons"),P=require("@progress/kendo-react-intl"),T=require("../package-metadata.js"),a=require("../messages/index.js"),Q=require("../dateinput/DateInput.js"),Y=require("./TimeSelector.js"),p=require("../utils.js"),g=require("./utils.js"),ee=require("../hooks/usePickerFloatingLabel.js"),te=require("@progress/kendo-react-buttons"),ie=require("../common/AdaptiveMode.js"),se=require("@progress/kendo-react-layout");function oe(c){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const t in c)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(c,t);Object.defineProperty(s,t,i.get?i:{enumerable:!0,get:()=>c[t]})}}return s.default=c,Object.freeze(s)}const r=oe(Z),l=class l extends r.Component{constructor(s){super(s),this._element=null,this._dateInput=r.createRef(),this._timeSelector=null,this.shouldFocusDateInput=!1,this.prevShow=!1,this.showLicenseWatermark=!1,this.handleKendoPasteValue=t=>{if(t instanceof Date&&!isNaN(t.getTime())){this.applyKendoPasteTime(t);return}const i=t!=null?String(t):"";if(!i)return;const o=new Date(i);isNaN(o.getTime())||this.applyKendoPasteTime(o)},this.applyKendoPasteTime=t=>{const i=this.normalizeTime(t);if(!g.isInRange(i,this.min,this.max))return;const o=new Event("change",{bubbles:!0}),h={target:this._element,currentTarget:this._element,nativeEvent:o};this.handleValueChange({syntheticEvent:h,nativeEvent:o,value:i})},this.focus=()=>{this.dateInput&&this.dateInput.focus()},this.renderTimeSelector=()=>{const{smoothScroll:t,cancelButton:i,nowButton:o,disabled:h,format:d,steps:u,unstyled:f}=this.props;return r.createElement(Y.TimeSelector,{ref:this.setTimeSelectorRef,mobileMode:this.mobileMode,show:this.show,cancelButton:i,disabled:h,nowButton:o,format:d,min:this.min,max:this.max,steps:u,smoothScroll:t,value:this.value,footer:!this.mobileMode,handleTimeChange:this.mobileMode&&this.handleTimeChange,onChange:this.handleValueChange,onReject:this.handleValueReject,unstyled:f})},this.renderPopup=()=>{const{popupClass:t,...i}=this.popupSettings,{unstyled:o}=this.props,h=o&&o.uTimePicker,d=n.classNames(t),u={popupClass:n.uTimePicker.popup({c:h}),show:this.show,animate:this.element!==null,anchor:this.element,className:d,id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...i};return this.props.popup?r.createElement(this.props.popup,{...u},this.renderTimeSelector()):r.createElement($.Popup,{...u},this.renderTimeSelector())},this.renderAdaptivePopup=()=>{const{windowWidth:t=0}=this.state,i={expand:this.show,onClose:this.handleBlur,title:this.props.adaptiveTitle||this.props.label,subTitle:this.props.adaptiveSubtitle,windowWidth:t,footer:{cancelText:this.localizationService.toLanguageString(a.toggleClock,a.messages[a.timePickerCancel]),onCancel:this.handleValueReject,applyText:this.localizationService.toLanguageString(a.timePickerSet,a.messages[a.timePickerSet]),onApply:o=>this.handleValueChange(o)}};return r.createElement(ie.AdaptiveMode,{...i},r.createElement(se.ActionSheetContent,null,this.renderTimeSelector()))},this.setTimeSelectorRef=t=>{this._timeSelector=t},this.nextValue=(t,i)=>t.value!==void 0?t.value:i.value,this.nextShow=(t,i)=>t.show!==void 0?t.show:i.show,this.handleInputValueChange=t=>{const i=this.mergeTime(t.value);this.handleValueChange({...t,value:i})},this.handleTimeChange=t=>{this.setState({candidate:t.time})},this.handleValueChange=t=>{this.setState({value:y.cloneDate(t.value||this.state.candidate)}),this.valueDuringOnChange=t.value,this.showDuringOnChange=!1,this.mobileMode||(this.shouldFocusDateInput=!0);const{onChange:i}=this.props,o=this.valueDuringOnChange!==void 0?this.value:this.state.candidate||this.value;i&&i.call(void 0,{syntheticEvent:t.syntheticEvent,nativeEvent:t.nativeEvent,value:o,show:this.show,target:this}),this.valueDuringOnChange=void 0,this.showDuringOnChange=void 0,this.setState({candidate:null}),this.setShow(!1)},this.handleFocus=()=>{this.setState({focused:!0})},this.handleBlur=()=>{this.setState({focused:!1}),this.setShow(!1)},this.handleValueReject=t=>{this.mobileMode||(this.shouldFocusDateInput=!0),this.setShow(!1)},this.handleClick=t=>{this.props.disabled||(this.shouldFocusDateInput=!0,this.setShow(!this.show))},this.handleIconMouseDown=t=>{t.preventDefault()},this.handleKeyDown=t=>{const{altKey:i,keyCode:o}=t;if(o===n.Keys.esc){this.shouldFocusDateInput=!0,this.setShow(!1);return}i&&(o===n.Keys.up||o===n.Keys.down)&&(t.preventDefault(),t.stopPropagation(),this.shouldFocusDateInput=o===n.Keys.up,this.setShow(o===n.Keys.down))},this.showLicenseWatermark=!n.validatePackage(T.packageMetadata,{component:"TimePicker"}),this.licenseMessage=n.getLicenseMessage(T.packageMetadata),this.state={value:this.props.defaultValue||l.defaultProps.defaultValue,show:this.props.defaultShow||l.defaultProps.defaultShow,focused:!1,candidate:null},this.normalizeTime=this.normalizeTime.bind(this),this.setShow=this.setShow.bind(this),this.mergeTime=this.mergeTime.bind(this)}get _popupId(){return this.props.id+"-popup-id"}get document(){if(n.canUseDOM)return this.element&&this.element.ownerDocument||document}get element(){return this._element}get dateInput(){return this._dateInput.current}get timeSelector(){return this._timeSelector}get value(){const s=this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value;return s!==null?y.cloneDate(s):null}get show(){return this.showDuringOnChange!==void 0?this.showDuringOnChange:this.props.show!==void 0?this.props.show:this.state.show}get name(){return this.props.name}get validity(){const s=this.value&&this.normalizeTime(this.value),t=this.normalizeTime(this.min),i=this.normalizeTime(this.max),o=g.isInRange(s,t,i),h=this.props.validationMessage!==void 0,d=(!this.required||this.value!==null)&&o,u=this.props.valid!==void 0?this.props.valid:d;return{customError:h,rangeOverflow:g.isBiggerThanMax(s,i),rangeUnderflow:g.isSmallerThanMin(s,t),valid:u,valueMissing:this.value===null}}get mobileMode(){var t;return!!(this.state.windowWidth&&this.props._adaptiveMode&&this.state.windowWidth<=((t=this.props._adaptiveMode)==null?void 0:t.medium)&&this.props.adaptive)}get validityStyles(){return this.props.validityStyles!==void 0?this.props.validityStyles:l.defaultProps.validityStyles}get required(){return this.props.required!==void 0?this.props.required:!1}get popupSettings(){return this.props.popupSettings||l.defaultProps.popupSettings}get min(){return this.props.min!==void 0?this.props.min:l.defaultProps.min}get max(){return this.props.max!==void 0?this.props.max:l.defaultProps.max}get dateInputComp(){return this.props.dateInput||l.defaultProps.dateInput}get localizationService(){return P.provideLocalizationService(this)}componentDidMount(){var t;this.observerResize=n.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.show&&this.forceUpdate(),(t=this.document)!=null&&t.body&&this.observerResize&&this.observerResize.observe(this.document.body);const s=this.props.name||this.props.id;this.KendoPasteSubscription=n.subscribeToKendoPaste(this._element,{fieldName:s,onValueChange:i=>{this.handleKendoPasteValue(i)}})}componentDidUpdate(){this._timeSelector&&this.show&&!this.prevShow&&this._timeSelector.focusActiveList(),this.mobileMode&&this.show&&!this.prevShow&&setTimeout(()=>{this._timeSelector&&this._timeSelector.focusActiveList()},300),this.dateInput&&this.dateInput.element&&!this.show&&this.shouldFocusDateInput&&this.dateInput.element.focus({preventScroll:!0}),this.prevShow=this.show,this.shouldFocusDateInput=!1}componentWillUnmount(){var s,t;(s=this.document)!=null&&s.body&&this.observerResize&&this.observerResize.disconnect(),(t=this.KendoPasteSubscription)==null||t.unsubscribe()}render(){const{size:s=l.defaultProps.size,rounded:t=l.defaultProps.rounded,fillMode:i=l.defaultProps.fillMode,disabled:o,tabIndex:h,title:d,id:u,className:f,format:I,formatPlaceholder:D,width:k,name:O,steps:z,validationMessage:x,required:R,validityStyles:q,ariaLabelledBy:E,ariaDescribedBy:L,unstyled:v,enableMouseWheel:N,autoCorrectParts:B,autoSwitchParts:F,autoSwitchKeys:K,allowCaretMode:V,inputAttributes:A}=this.props,b=v&&v.uTimePicker,w=!this.validityStyles||this.validity.valid,_=this.localizationService.toLanguageString(a.selectTime,a.messages[a.selectTime]),j={disabled:o,format:I,formatPlaceholder:D,id:u,ariaLabelledBy:E,ariaDescribedBy:L,ariaLabel:_,max:this.normalizeTime(this.max),min:this.normalizeTime(this.min),name:O,onChange:this.handleInputValueChange,required:R,steps:z,tabIndex:this.show?-1:h,title:d,valid:this.validity.valid,validationMessage:x,validityStyles:q,value:this.value&&this.normalizeTime(this.value),label:void 0,placeholder:this.state.focused?null:this.props.placeholder,ariaHasPopup:"dialog",ariaExpanded:this.show,enableMouseWheel:N,autoCorrectParts:B,autoSwitchParts:F,autoSwitchKeys:K,allowCaretMode:V,inputAttributes:A},W=this.localizationService.toLanguageString(a.toggleClock,a.messages[a.toggleClock]),U=this.localizationService.toLanguageString(a.toggleTimeSelector,a.messages[a.toggleTimeSelector]),S=r.createElement(n.AsyncFocusBlur,{onFocus:this.handleFocus,onBlur:this.mobileMode?void 0:this.handleBlur,onSyncBlur:this.props.onBlur,onSyncFocus:this.props.onFocus},({onFocus:H,onBlur:G})=>r.createElement(r.Fragment,null,r.createElement("span",{ref:X=>{this._element=X},className:n.classNames(n.uTimePicker.wrapper({c:b,size:s,rounded:t,fillMode:i,invalid:!w,required:this.required,disabled:o}),{"k-focus":this.state.focused},f),onKeyDown:this.handleKeyDown,style:{width:k},onFocus:this.mobileMode?this.handleClick:H,onBlur:G,onClick:this.mobileMode?this.handleClick:void 0},r.createElement(this.dateInputComp,{_ref:this._dateInput,ariaRole:"combobox",ariaControls:this.show?this._popupId:void 0,...j}),r.createElement(te.Button,{tabIndex:-1,type:"button",icon:"clock",svgIcon:J.clockIcon,onMouseDown:this.handleIconMouseDown,onClick:this.mobileMode?void 0:this.handleClick,title:U,className:n.classNames(n.uTimePicker.inputButton({c:b})),fillMode:i,"aria-label":W}),!this.mobileMode&&this.renderPopup()),this.mobileMode&&this.renderAdaptivePopup(),this.showLicenseWatermark&&r.createElement(n.WatermarkOverlay,{message:this.licenseMessage})));return this.props.label?r.createElement(ee.PickerFloatingLabel,{dateInput:this._dateInput,label:this.props.label,editorId:u,editorValid:w,editorDisabled:this.props.disabled,children:S,style:{width:this.props.width}}):S}normalizeTime(s){return p.setTime(p.MIDNIGHT_DATE,s)}setShow(s){const{onOpen:t,onClose:i}=this.props;this.show!==s&&(this.setState({show:s}),s&&t&&t.call(void 0,{target:this}),!s&&i&&i.call(void 0,{target:this}))}mergeTime(s){return this.value&&s?p.setTime(this.value,s):s}calculateMedia(s){for(const t of s)this.setState({windowWidth:t.target.clientWidth})}};l.displayName="TimePicker",l.propTypes={className:e.string,cancelButton:e.bool,nowButton:e.bool,defaultShow:e.bool,defaultValue:e.instanceOf(Date),disabled:e.bool,format:e.oneOfType([e.string,e.shape({skeleton:e.string,pattern:e.string,date:e.oneOf(["short","medium","long","full"]),time:e.oneOf(["short","medium","long","full"]),datetime:e.oneOf(["short","medium","long","full"]),era:e.oneOf(["narrow","short","long"]),year:e.oneOf(["numeric","2-digit"]),month:e.oneOf(["numeric","2-digit","narrow","short","long"]),day:e.oneOf(["numeric","2-digit"]),weekday:e.oneOf(["narrow","short","long"]),hour:e.oneOf(["numeric","2-digit"]),hour12:e.bool,minute:e.oneOf(["numeric","2-digit"]),second:e.oneOf(["numeric","2-digit"]),timeZoneName:e.oneOf(["short","long"])})]),formatPlaceholder:e.oneOfType([e.oneOf(["wide","narrow","short","formatPattern"]),e.shape({year:e.string,month:e.string,day:e.string,hour:e.string,minute:e.string,second:e.string})]),id:e.string,ariaLabelledBy:e.string,ariaDescribedBy:e.string,min:e.instanceOf(Date),max:e.instanceOf(Date),name:e.string,popupSettings:e.shape({animate:e.bool,appendTo:e.any,popupClass:e.string}),dateInput:e.elementType,show:e.bool,steps:e.shape({hour:e.number,minute:e.number,second:e.number}),smoothScroll:e.bool,tabIndex:e.number,title:e.string,value:e.instanceOf(Date),width:e.oneOfType([e.number,e.string]),validationMessage:e.string,required:e.bool,validate:e.bool,valid:e.bool,size:e.oneOf(["small","medium","large"]),rounded:e.oneOf(["small","medium","large","full","none"]),fillMode:e.oneOf(["solid","flat","outline"]),inputAttributes:e.object},l.defaultProps={defaultShow:!1,defaultValue:null,disabled:!1,format:"t",max:p.MAX_TIME,min:p.MIN_TIME,popupSettings:{},tabIndex:0,steps:{},validityStyles:!0,dateInput:Q.DateInputInner,size:void 0,rounded:void 0,fillMode:void 0};let m=l;const C=n.createPropsContext(),M=n.withIdHOC(n.withPropsContext(C,n.withUnstyledHOC(n.withAdaptiveModeContext(m))));M.displayName="KendoReactTimePicker";P.registerForLocalization(m);exports.TimePicker=M;exports.TimePickerPropsContext=C;exports.TimePickerWithoutContext=m;
|
|
@@ -132,7 +132,7 @@ const a = class a extends n.Component {
|
|
|
132
132
|
}, this.handleBlur = () => {
|
|
133
133
|
this.setState({ focused: !1 }), this.setShow(!1);
|
|
134
134
|
}, this.handleValueReject = (t) => {
|
|
135
|
-
this.setShow(!1);
|
|
135
|
+
this.mobileMode || (this.shouldFocusDateInput = !0), this.setShow(!1);
|
|
136
136
|
}, this.handleClick = (t) => {
|
|
137
137
|
this.props.disabled || (this.shouldFocusDateInput = !0, this.setShow(!this.show));
|
|
138
138
|
}, this.handleIconMouseDown = (t) => {
|
|
@@ -291,9 +291,9 @@ const a = class a extends n.Component {
|
|
|
291
291
|
steps: R,
|
|
292
292
|
validationMessage: V,
|
|
293
293
|
required: B,
|
|
294
|
-
validityStyles:
|
|
295
|
-
ariaLabelledBy:
|
|
296
|
-
ariaDescribedBy:
|
|
294
|
+
validityStyles: F,
|
|
295
|
+
ariaLabelledBy: L,
|
|
296
|
+
ariaDescribedBy: A,
|
|
297
297
|
unstyled: v,
|
|
298
298
|
enableMouseWheel: N,
|
|
299
299
|
autoCorrectParts: K,
|
|
@@ -306,8 +306,8 @@ const a = class a extends n.Component {
|
|
|
306
306
|
format: z,
|
|
307
307
|
formatPlaceholder: k,
|
|
308
308
|
id: l,
|
|
309
|
-
ariaLabelledBy:
|
|
310
|
-
ariaDescribedBy:
|
|
309
|
+
ariaLabelledBy: L,
|
|
310
|
+
ariaDescribedBy: A,
|
|
311
311
|
ariaLabel: j,
|
|
312
312
|
max: this.normalizeTime(this.max),
|
|
313
313
|
min: this.normalizeTime(this.min),
|
|
@@ -319,7 +319,7 @@ const a = class a extends n.Component {
|
|
|
319
319
|
title: h,
|
|
320
320
|
valid: this.validity.valid,
|
|
321
321
|
validationMessage: V,
|
|
322
|
-
validityStyles:
|
|
322
|
+
validityStyles: F,
|
|
323
323
|
value: this.value && this.normalizeTime(this.value),
|
|
324
324
|
label: void 0,
|
|
325
325
|
placeholder: this.state.focused ? null : this.props.placeholder,
|
|
@@ -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 l=require("@progress/kendo-date-math"),u=(s,t)=>{const n=l.cloneDate(s);return n.setHours(t),n},h=s=>s!==null&&s<12,c=s=>s!==null&&s>=12,g=(s,t,n)=>t==null&&n==null||s>=t&&s<=n,d=(s,t,n)=>t==null&&n==null||s>=t||s<=n;class H{constructor(t){this.intl=t,this.min=null,this.max=null,this.part=null}apply(t,n){const e=t.getHours(),i=h(e),r=h(n.getHours());if(i&&r||!i&&!r)return t;const[a,o=24]=this.normalizedRange(),m=e+(r?-12:12);return u(t,Math.min(Math.max(a,m),o!=null?o:24))}configure(t){const{min:n=this.min,max:e=this.max,part:i=this.part}=t;this.min=n,this.max=e,this.part=i}data(t){const n=this.part&&this.part.names;if(!n||!this.min)return[];const e=[],[i,r]=this.normalizedRange(),a=this.intl.dateFormatNames(n);return h(i)&&e.push({text:a.am,value:u(this.min,i)}),c(r)&&e.push({text:a.pm,value:u(this.min,Math.max(12,r))}),this.min.getHours()!==i?e.reverse():e}isRangeChanged(t,n){return!1}limitRange(t,n,e){return[t,n]}total(){const[t,n]=this.normalizedRange();return t==null&&n==null?2:t>11||n<12?1:2}selectedIndex(t){if(!this.valueInList(t)||!this.min)return-1;const n=Math.floor(t.getHours()/12);return this.min.getHours()===this.normalizedRange()[0]?n:n===0?1:0}valueInList(t){return!this.min||!this.max?!1:(this.min.getHours()!==this.normalizedRange()[0]?d:g)(t.getHours(),this.min.getHours(),this.max.getHours())}normalizedRange(){const t=this.min.getHours(),n=this.max.getHours();return[Math.min(t,n),Math.max(t,n)]}}exports.DayPeriodService=H;
|