@progress/kendo-react-dateinputs 9.2.0-develop.4 → 9.2.0-develop.5
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/common/AdaptiveMode.js +1 -1
- package/common/AdaptiveMode.mjs +27 -27
- package/datepicker/DatePicker.js +1 -1
- package/datepicker/DatePicker.mjs +74 -69
- package/daterangepicker/DateRangePicker.js +1 -1
- package/daterangepicker/DateRangePicker.mjs +20 -19
- package/datetimepicker/DateTimePicker.js +1 -1
- package/datetimepicker/DateTimePicker.mjs +60 -57
- package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
- package/index.d.mts +22 -1
- package/index.d.ts +22 -1
- package/package-metadata.mjs +1 -1
- package/package.json +7 -7
- package/timepicker/TimePicker.js +1 -1
- package/timepicker/TimePicker.mjs +35 -34
package/index.d.mts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
+
import { AdaptiveModeContextType } from '@progress/kendo-react-common';
|
|
8
9
|
import { ButtonHandle } from '@progress/kendo-react-buttons';
|
|
9
10
|
import { ButtonProps } from '@progress/kendo-react-buttons';
|
|
10
11
|
import { DateFieldNameOptions } from '@progress/kendo-intl';
|
|
@@ -1391,6 +1392,11 @@ export declare interface DatePickerProps extends DatePickerSettings, FormCompone
|
|
|
1391
1392
|
* Attributes which are essential for certain component functionalities cannot be changed.
|
|
1392
1393
|
*/
|
|
1393
1394
|
inputAttributes?: React_2.InputHTMLAttributes<HTMLInputElement>;
|
|
1395
|
+
/**
|
|
1396
|
+
* @hidden
|
|
1397
|
+
* This prop is provided by the withAdaptiveModeContext HOC to subscribe to AdaptiveModeContext.
|
|
1398
|
+
*/
|
|
1399
|
+
_adaptiveMode?: AdaptiveModeContextType;
|
|
1394
1400
|
}
|
|
1395
1401
|
|
|
1396
1402
|
/**
|
|
@@ -1881,6 +1887,11 @@ export declare interface DateRangePickerProps extends DateRangePickerSettings {
|
|
|
1881
1887
|
* Attributes which are essential for certain component functionalities cannot be changed.
|
|
1882
1888
|
*/
|
|
1883
1889
|
inputAttributes?: React_2.InputHTMLAttributes<HTMLInputElement>;
|
|
1890
|
+
/**
|
|
1891
|
+
* @hidden
|
|
1892
|
+
* This prop is provided by the withAdaptiveModeContext HOC to subscribe to AdaptiveModeContext.
|
|
1893
|
+
*/
|
|
1894
|
+
_adaptiveMode?: AdaptiveModeContextType;
|
|
1884
1895
|
}
|
|
1885
1896
|
|
|
1886
1897
|
/**
|
|
@@ -2413,6 +2424,11 @@ export declare interface DateTimePickerProps extends DateTimePickerSettings, For
|
|
|
2413
2424
|
* Attributes which are essential for certain component functionalities cannot be changed.
|
|
2414
2425
|
*/
|
|
2415
2426
|
inputAttributes?: React_2.InputHTMLAttributes<HTMLInputElement>;
|
|
2427
|
+
/**
|
|
2428
|
+
* @hidden
|
|
2429
|
+
* This prop is provided by the withAdaptiveModeContext HOC to subscribe to AdaptiveModeContext.
|
|
2430
|
+
*/
|
|
2431
|
+
_adaptiveMode?: AdaptiveModeContextType;
|
|
2416
2432
|
}
|
|
2417
2433
|
|
|
2418
2434
|
/**
|
|
@@ -2695,7 +2711,7 @@ export declare class DateTimePickerWithoutContext extends React_2.Component<Date
|
|
|
2695
2711
|
*/
|
|
2696
2712
|
get name(): string | undefined;
|
|
2697
2713
|
/**
|
|
2698
|
-
* The mobile mode of the
|
|
2714
|
+
* The mobile mode of the DateTimePicker.
|
|
2699
2715
|
*/
|
|
2700
2716
|
get mobileMode(): boolean;
|
|
2701
2717
|
protected get min(): Date;
|
|
@@ -4032,6 +4048,11 @@ export declare interface TimePickerProps extends TimePickerSettings, FormCompone
|
|
|
4032
4048
|
* Attributes which are essential for certain component functionalities cannot be changed.
|
|
4033
4049
|
*/
|
|
4034
4050
|
inputAttributes?: React_2.InputHTMLAttributes<HTMLInputElement>;
|
|
4051
|
+
/**
|
|
4052
|
+
* @hidden
|
|
4053
|
+
* This prop is provided by the withAdaptiveModeContext HOC to subscribe to AdaptiveModeContext.
|
|
4054
|
+
*/
|
|
4055
|
+
_adaptiveMode?: AdaptiveModeContextType;
|
|
4035
4056
|
}
|
|
4036
4057
|
|
|
4037
4058
|
/**
|
package/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
+
import { AdaptiveModeContextType } from '@progress/kendo-react-common';
|
|
8
9
|
import { ButtonHandle } from '@progress/kendo-react-buttons';
|
|
9
10
|
import { ButtonProps } from '@progress/kendo-react-buttons';
|
|
10
11
|
import { DateFieldNameOptions } from '@progress/kendo-intl';
|
|
@@ -1391,6 +1392,11 @@ export declare interface DatePickerProps extends DatePickerSettings, FormCompone
|
|
|
1391
1392
|
* Attributes which are essential for certain component functionalities cannot be changed.
|
|
1392
1393
|
*/
|
|
1393
1394
|
inputAttributes?: React_2.InputHTMLAttributes<HTMLInputElement>;
|
|
1395
|
+
/**
|
|
1396
|
+
* @hidden
|
|
1397
|
+
* This prop is provided by the withAdaptiveModeContext HOC to subscribe to AdaptiveModeContext.
|
|
1398
|
+
*/
|
|
1399
|
+
_adaptiveMode?: AdaptiveModeContextType;
|
|
1394
1400
|
}
|
|
1395
1401
|
|
|
1396
1402
|
/**
|
|
@@ -1881,6 +1887,11 @@ export declare interface DateRangePickerProps extends DateRangePickerSettings {
|
|
|
1881
1887
|
* Attributes which are essential for certain component functionalities cannot be changed.
|
|
1882
1888
|
*/
|
|
1883
1889
|
inputAttributes?: React_2.InputHTMLAttributes<HTMLInputElement>;
|
|
1890
|
+
/**
|
|
1891
|
+
* @hidden
|
|
1892
|
+
* This prop is provided by the withAdaptiveModeContext HOC to subscribe to AdaptiveModeContext.
|
|
1893
|
+
*/
|
|
1894
|
+
_adaptiveMode?: AdaptiveModeContextType;
|
|
1884
1895
|
}
|
|
1885
1896
|
|
|
1886
1897
|
/**
|
|
@@ -2413,6 +2424,11 @@ export declare interface DateTimePickerProps extends DateTimePickerSettings, For
|
|
|
2413
2424
|
* Attributes which are essential for certain component functionalities cannot be changed.
|
|
2414
2425
|
*/
|
|
2415
2426
|
inputAttributes?: React_2.InputHTMLAttributes<HTMLInputElement>;
|
|
2427
|
+
/**
|
|
2428
|
+
* @hidden
|
|
2429
|
+
* This prop is provided by the withAdaptiveModeContext HOC to subscribe to AdaptiveModeContext.
|
|
2430
|
+
*/
|
|
2431
|
+
_adaptiveMode?: AdaptiveModeContextType;
|
|
2416
2432
|
}
|
|
2417
2433
|
|
|
2418
2434
|
/**
|
|
@@ -2695,7 +2711,7 @@ export declare class DateTimePickerWithoutContext extends React_2.Component<Date
|
|
|
2695
2711
|
*/
|
|
2696
2712
|
get name(): string | undefined;
|
|
2697
2713
|
/**
|
|
2698
|
-
* The mobile mode of the
|
|
2714
|
+
* The mobile mode of the DateTimePicker.
|
|
2699
2715
|
*/
|
|
2700
2716
|
get mobileMode(): boolean;
|
|
2701
2717
|
protected get min(): Date;
|
|
@@ -4032,6 +4048,11 @@ export declare interface TimePickerProps extends TimePickerSettings, FormCompone
|
|
|
4032
4048
|
* Attributes which are essential for certain component functionalities cannot be changed.
|
|
4033
4049
|
*/
|
|
4034
4050
|
inputAttributes?: React_2.InputHTMLAttributes<HTMLInputElement>;
|
|
4051
|
+
/**
|
|
4052
|
+
* @hidden
|
|
4053
|
+
* This prop is provided by the withAdaptiveModeContext HOC to subscribe to AdaptiveModeContext.
|
|
4054
|
+
*/
|
|
4055
|
+
_adaptiveMode?: AdaptiveModeContextType;
|
|
4035
4056
|
}
|
|
4036
4057
|
|
|
4037
4058
|
/**
|
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: 1736756852,
|
|
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": "9.2.0-develop.
|
|
3
|
+
"version": "9.2.0-develop.5",
|
|
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",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"@progress/kendo-date-math": "^1.4.0",
|
|
26
26
|
"@progress/kendo-licensing": "^1.3.4",
|
|
27
27
|
"@progress/kendo-dateinputs-common": "0.4.0",
|
|
28
|
-
"@progress/kendo-react-buttons": "9.2.0-develop.
|
|
29
|
-
"@progress/kendo-react-common": "9.2.0-develop.
|
|
30
|
-
"@progress/kendo-react-intl": "9.2.0-develop.
|
|
31
|
-
"@progress/kendo-react-labels": "9.2.0-develop.
|
|
32
|
-
"@progress/kendo-react-layout": "9.2.0-develop.
|
|
33
|
-
"@progress/kendo-react-popup": "9.2.0-develop.
|
|
28
|
+
"@progress/kendo-react-buttons": "9.2.0-develop.5",
|
|
29
|
+
"@progress/kendo-react-common": "9.2.0-develop.5",
|
|
30
|
+
"@progress/kendo-react-intl": "9.2.0-develop.5",
|
|
31
|
+
"@progress/kendo-react-labels": "9.2.0-develop.5",
|
|
32
|
+
"@progress/kendo-react-layout": "9.2.0-develop.5",
|
|
33
|
+
"@progress/kendo-react-popup": "9.2.0-develop.5",
|
|
34
34
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
35
35
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
36
36
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
|
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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("react"),e=require("prop-types"),X=require("@progress/kendo-react-popup"),y=require("@progress/kendo-date-math"),o=require("@progress/kendo-react-common"),Z=require("@progress/kendo-svg-icons"),I=require("@progress/kendo-react-intl"),$=require("../package-metadata.js"),l=require("../messages/index.js"),J=require("../dateinput/DateInput.js"),Q=require("./TimeSelector.js"),p=require("../utils.js"),f=require("./utils.js"),Y=require("../hooks/usePickerFloatingLabel.js"),ee=require("@progress/kendo-react-buttons"),te=require("../common/AdaptiveMode.js"),ie=require("@progress/kendo-react-layout");function se(c){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const t in c)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(c,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:()=>c[t]})}}return i.default=c,Object.freeze(i)}const r=se(G),a=class a extends r.Component{constructor(i){super(i),this._element=null,this._dateInput=r.createRef(),this._timeSelector=null,this.shouldFocusDateInput=!1,this.prevShow=!1,this.focus=()=>{this.dateInput&&this.dateInput.focus()},this.renderTimeSelector=()=>{const{smoothScroll:t,cancelButton:s,nowButton:n,disabled:u,format:d,steps:h,unstyled:g}=this.props;return r.createElement(Q.TimeSelector,{ref:this.setTimeSelectorRef,mobileMode:this.mobileMode,show:this.show,cancelButton:s,disabled:u,nowButton:n,format:d,min:this.min,max:this.max,steps:h,smoothScroll:t,value:this.value,footer:!this.mobileMode,handleTimeChange:this.mobileMode&&this.handleTimeChange,onChange:this.handleValueChange,onReject:this.handleValueReject,unstyled:g})},this.renderPopup=()=>{const{popupClass:t,...s}=this.popupSettings,{unstyled:n}=this.props,u=n&&n.uTimePicker,d=o.classNames(t),h={popupClass:o.uTimePicker.popup({c:u}),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"},...s};return this.props.popup?r.createElement(this.props.popup,{...h},this.renderTimeSelector()):r.createElement(X.Popup,{...h},this.renderTimeSelector())},this.renderAdaptivePopup=()=>{const{windowWidth:t=0}=this.state,s={expand:this.show,onClose:this.handleBlur,title:this.props.adaptiveTitle,windowWidth:t,footer:{cancelText:this.localizationService.toLanguageString(l.toggleClock,l.messages[l.timePickerCancel]),onCancel:this.handleValueReject,applyText:this.localizationService.toLanguageString(l.timePickerSet,l.messages[l.timePickerSet]),onApply:n=>this.handleValueChange(n)}};return r.createElement(te.AdaptiveMode,{...s},r.createElement(ie.ActionSheetContent,{overflowHidden:!0},this.renderTimeSelector()))},this.setTimeSelectorRef=t=>{this._timeSelector=t},this.nextValue=(t,s)=>t.value!==void 0?t.value:s.value,this.nextShow=(t,s)=>t.show!==void 0?t.show:s.show,this.handleInputValueChange=t=>{const s=this.mergeTime(t.value);this.handleValueChange({...t,value:s})},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.shouldFocusDateInput=!0;const{onChange:s}=this.props,n=this.state.candidate||this.value;s&&s.call(void 0,{syntheticEvent:t.syntheticEvent,nativeEvent:t.nativeEvent,value:n,show:this.show,target:this}),this.valueDuringOnChange=void 0,this.showDuringOnChange=void 0,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.handleIconClick=t=>{this.props.disabled||(this.shouldFocusDateInput=!0,this.setShow(!this.show))},this.handleIconMouseDown=t=>{t.preventDefault()},this.handleKeyDown=t=>{const{altKey:s,keyCode:n}=t;if(n===o.Keys.esc){this.shouldFocusDateInput=!0,this.setShow(!1);return}s&&(n===o.Keys.up||n===o.Keys.down)&&(t.preventDefault(),t.stopPropagation(),this.shouldFocusDateInput=n===o.Keys.up,this.setShow(n===o.Keys.down))},o.validatePackage($.packageMetadata),this.state={value:this.props.defaultValue||a.defaultProps.defaultValue,show:this.props.defaultShow||a.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(o.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 i=this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value;return i!==null?y.cloneDate(i):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 i=this.value&&this.normalizeTime(this.value),t=this.normalizeTime(this.min),s=this.normalizeTime(this.max),n=f.isInRange(i,t,s),u=this.props.validationMessage!==void 0,d=(!this.required||this.value!==null)&&n,h=this.props.valid!==void 0?this.props.valid:d;return{customError:u,rangeOverflow:f.isBiggerThanMax(i,s),rangeUnderflow:f.isSmallerThanMin(i,t),valid:h,valueMissing:this.value===null}}get mobileMode(){return!!(this.state.windowWidth&&this.state.windowWidth<=o.ADAPTIVE_MEDIUM_BREAKPOINT&&this.props.adaptive)}get validityStyles(){return this.props.validityStyles!==void 0?this.props.validityStyles:a.defaultProps.validityStyles}get required(){return this.props.required!==void 0?this.props.required:!1}get popupSettings(){return this.props.popupSettings||a.defaultProps.popupSettings}get min(){return this.props.min!==void 0?this.props.min:a.defaultProps.min}get max(){return this.props.max!==void 0?this.props.max:a.defaultProps.max}get dateInputComp(){return this.props.dateInput||a.defaultProps.dateInput}get localizationService(){return I.provideLocalizationService(this)}componentDidMount(){var i;this.observerResize=o.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.show&&this.forceUpdate(),(i=this.document)!=null&&i.body&&this.observerResize&&this.observerResize.observe(this.document.body)}componentDidUpdate(){this._timeSelector&&this.show&&!this.prevShow?this._timeSelector.focusActiveList():this.dateInput&&this.dateInput.element&&!this.show&&this.shouldFocusDateInput&&this.dateInput.element.focus({preventScroll:!0}),this.prevShow=this.show,this.shouldFocusDateInput=!1}componentWillUnmount(){var i;(i=this.document)!=null&&i.body&&this.observerResize&&this.observerResize.disconnect()}render(){const{size:i=a.defaultProps.size,rounded:t=a.defaultProps.rounded,fillMode:s=a.defaultProps.fillMode,disabled:n,tabIndex:u,title:d,id:h,className:g,format:P,formatPlaceholder:M,width:D,name:O,steps:k,validationMessage:z,required:x,validityStyles:R,ariaLabelledBy:q,ariaDescribedBy:E,unstyled:v,enableMouseWheel:B,autoCorrectParts:A,autoSwitchParts:V,autoSwitchKeys:F,allowCaretMode:N,inputAttributes:_}=this.props,w=v&&v.uTimePicker,b=!this.validityStyles||this.validity.valid,K={disabled:n,format:P,formatPlaceholder:M,id:h,ariaLabelledBy:q,ariaDescribedBy:E,max:this.normalizeTime(this.max),min:this.normalizeTime(this.min),name:O,onChange:this.handleInputValueChange,required:x,steps:k,tabIndex:this.show?-1:u,title:d,valid:this.validity.valid,validationMessage:z,validityStyles:R,value:this.value&&this.normalizeTime(this.value),label:void 0,placeholder:this.state.focused?null:this.props.placeholder,ariaHasPopup:"dialog",ariaExpanded:this.show,size:null,fillMode:null,rounded:null,enableMouseWheel:B,autoCorrectParts:A,autoSwitchParts:V,autoSwitchKeys:F,allowCaretMode:N,inputAttributes:_},L=this.localizationService.toLanguageString(l.toggleClock,l.messages[l.toggleClock]),j=this.localizationService.toLanguageString(l.toggleTimeSelector,l.messages[l.toggleTimeSelector]),S=r.createElement(o.AsyncFocusBlur,{onFocus:this.handleFocus,onBlur:this.mobileMode?void 0:this.handleBlur,onSyncBlur:this.props.onBlur,onSyncFocus:this.props.onFocus},({onFocus:U,onBlur:H})=>r.createElement(r.Fragment,null,r.createElement("span",{id:this.props.id,ref:W=>{this._element=W},className:o.classNames(o.uTimePicker.wrapper({c:w,size:i,rounded:t,fillMode:s,invalid:!b,required:this.required,disabled:n}),g),onKeyDown:this.handleKeyDown,style:{width:D},onFocus:U,onBlur:H,onClick:this.mobileMode?this.handleIconClick:void 0},r.createElement(this.dateInputComp,{_ref:this._dateInput,ariaRole:"combobox",ariaControls:this._popupId,...K}),r.createElement(ee.Button,{tabIndex:-1,type:"button",icon:"clock",svgIcon:Z.clockIcon,onMouseDown:this.handleIconMouseDown,onClick:this.mobileMode?void 0:this.handleIconClick,title:j,className:o.classNames(o.uTimePicker.inputButton({c:w})),rounded:null,fillMode:s,"aria-label":L}),!this.mobileMode&&this.renderPopup()),this.mobileMode&&this.renderAdaptivePopup()));return this.props.label?r.createElement(Y.PickerFloatingLabel,{dateInput:this._dateInput,label:this.props.label,editorId:h,editorValid:b,editorDisabled:this.props.disabled,children:S,style:{width:this.props.width}}):S}normalizeTime(i){return p.setTime(p.MIDNIGHT_DATE,i)}setShow(i){const{onOpen:t,onClose:s}=this.props;this.show!==i&&(this.setState({show:i}),i&&t&&t.call(void 0,{target:this}),!i&&s&&s.call(void 0,{target:this}))}mergeTime(i){return this.value&&i?p.setTime(this.value,i):i}calculateMedia(i){for(const t of i)this.setState({windowWidth:t.target.clientWidth})}};a.displayName="TimePicker",a.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}),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([null,"small","medium","large"]),rounded:e.oneOf([null,"small","medium","large","full"]),fillMode:e.oneOf([null,"solid","flat","outline"]),inputAttributes:e.object},a.defaultProps={defaultShow:!1,defaultValue:null,disabled:!1,format:"t",max:p.MAX_TIME,min:p.MIN_TIME,popupSettings:{},tabIndex:0,steps:{},validityStyles:!0,dateInput:J.DateInput,size:"medium",rounded:"medium",fillMode:"solid"};let m=a;const T=o.createPropsContext(),C=o.withIdHOC(o.withPropsContext(T,o.withUnstyledHOC(m)));C.displayName="KendoReactTimePicker";I.registerForLocalization(m);exports.TimePicker=C;exports.TimePickerPropsContext=T;exports.TimePickerWithoutContext=m;
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("react"),e=require("prop-types"),X=require("@progress/kendo-react-popup"),y=require("@progress/kendo-date-math"),o=require("@progress/kendo-react-common"),Z=require("@progress/kendo-svg-icons"),T=require("@progress/kendo-react-intl"),$=require("../package-metadata.js"),l=require("../messages/index.js"),J=require("../dateinput/DateInput.js"),Q=require("./TimeSelector.js"),c=require("../utils.js"),f=require("./utils.js"),Y=require("../hooks/usePickerFloatingLabel.js"),ee=require("@progress/kendo-react-buttons"),te=require("../common/AdaptiveMode.js"),ie=require("@progress/kendo-react-layout");function se(p){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const t in p)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(p,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:()=>p[t]})}}return i.default=p,Object.freeze(i)}const r=se(G),a=class a extends r.Component{constructor(i){super(i),this._element=null,this._dateInput=r.createRef(),this._timeSelector=null,this.shouldFocusDateInput=!1,this.prevShow=!1,this.focus=()=>{this.dateInput&&this.dateInput.focus()},this.renderTimeSelector=()=>{const{smoothScroll:t,cancelButton:s,nowButton:n,disabled:u,format:d,steps:h,unstyled:g}=this.props;return r.createElement(Q.TimeSelector,{ref:this.setTimeSelectorRef,mobileMode:this.mobileMode,show:this.show,cancelButton:s,disabled:u,nowButton:n,format:d,min:this.min,max:this.max,steps:h,smoothScroll:t,value:this.value,footer:!this.mobileMode,handleTimeChange:this.mobileMode&&this.handleTimeChange,onChange:this.handleValueChange,onReject:this.handleValueReject,unstyled:g})},this.renderPopup=()=>{const{popupClass:t,...s}=this.popupSettings,{unstyled:n}=this.props,u=n&&n.uTimePicker,d=o.classNames(t),h={popupClass:o.uTimePicker.popup({c:u}),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"},...s};return this.props.popup?r.createElement(this.props.popup,{...h},this.renderTimeSelector()):r.createElement(X.Popup,{...h},this.renderTimeSelector())},this.renderAdaptivePopup=()=>{const{windowWidth:t=0}=this.state,s={expand:this.show,onClose:this.handleBlur,title:this.props.adaptiveTitle,windowWidth:t,footer:{cancelText:this.localizationService.toLanguageString(l.toggleClock,l.messages[l.timePickerCancel]),onCancel:this.handleValueReject,applyText:this.localizationService.toLanguageString(l.timePickerSet,l.messages[l.timePickerSet]),onApply:n=>this.handleValueChange(n)}};return r.createElement(te.AdaptiveMode,{...s},r.createElement(ie.ActionSheetContent,{overflowHidden:!0},this.renderTimeSelector()))},this.setTimeSelectorRef=t=>{this._timeSelector=t},this.nextValue=(t,s)=>t.value!==void 0?t.value:s.value,this.nextShow=(t,s)=>t.show!==void 0?t.show:s.show,this.handleInputValueChange=t=>{const s=this.mergeTime(t.value);this.handleValueChange({...t,value:s})},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.shouldFocusDateInput=!0;const{onChange:s}=this.props,n=this.state.candidate||this.value;s&&s.call(void 0,{syntheticEvent:t.syntheticEvent,nativeEvent:t.nativeEvent,value:n,show:this.show,target:this}),this.valueDuringOnChange=void 0,this.showDuringOnChange=void 0,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.handleIconClick=t=>{this.props.disabled||(this.shouldFocusDateInput=!0,this.setShow(!this.show))},this.handleIconMouseDown=t=>{t.preventDefault()},this.handleKeyDown=t=>{const{altKey:s,keyCode:n}=t;if(n===o.Keys.esc){this.shouldFocusDateInput=!0,this.setShow(!1);return}s&&(n===o.Keys.up||n===o.Keys.down)&&(t.preventDefault(),t.stopPropagation(),this.shouldFocusDateInput=n===o.Keys.up,this.setShow(n===o.Keys.down))},o.validatePackage($.packageMetadata),this.state={value:this.props.defaultValue||a.defaultProps.defaultValue,show:this.props.defaultShow||a.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(o.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 i=this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value;return i!==null?y.cloneDate(i):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 i=this.value&&this.normalizeTime(this.value),t=this.normalizeTime(this.min),s=this.normalizeTime(this.max),n=f.isInRange(i,t,s),u=this.props.validationMessage!==void 0,d=(!this.required||this.value!==null)&&n,h=this.props.valid!==void 0?this.props.valid:d;return{customError:u,rangeOverflow:f.isBiggerThanMax(i,s),rangeUnderflow:f.isSmallerThanMin(i,t),valid:h,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:a.defaultProps.validityStyles}get required(){return this.props.required!==void 0?this.props.required:!1}get popupSettings(){return this.props.popupSettings||a.defaultProps.popupSettings}get min(){return this.props.min!==void 0?this.props.min:a.defaultProps.min}get max(){return this.props.max!==void 0?this.props.max:a.defaultProps.max}get dateInputComp(){return this.props.dateInput||a.defaultProps.dateInput}get localizationService(){return T.provideLocalizationService(this)}componentDidMount(){var i;this.observerResize=o.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.show&&this.forceUpdate(),(i=this.document)!=null&&i.body&&this.observerResize&&this.observerResize.observe(this.document.body)}componentDidUpdate(){this._timeSelector&&this.show&&!this.prevShow?this._timeSelector.focusActiveList():this.dateInput&&this.dateInput.element&&!this.show&&this.shouldFocusDateInput&&this.dateInput.element.focus({preventScroll:!0}),this.prevShow=this.show,this.shouldFocusDateInput=!1}componentWillUnmount(){var i;(i=this.document)!=null&&i.body&&this.observerResize&&this.observerResize.disconnect()}render(){const{size:i=a.defaultProps.size,rounded:t=a.defaultProps.rounded,fillMode:s=a.defaultProps.fillMode,disabled:n,tabIndex:u,title:d,id:h,className:g,format:M,formatPlaceholder:P,width:O,name:D,steps:k,validationMessage:z,required:x,validityStyles:q,ariaLabelledBy:R,ariaDescribedBy:E,unstyled:v,enableMouseWheel:B,autoCorrectParts:A,autoSwitchParts:F,autoSwitchKeys:V,allowCaretMode:N,inputAttributes:_}=this.props,w=v&&v.uTimePicker,b=!this.validityStyles||this.validity.valid,L={disabled:n,format:M,formatPlaceholder:P,id:h,ariaLabelledBy:R,ariaDescribedBy:E,max:this.normalizeTime(this.max),min:this.normalizeTime(this.min),name:D,onChange:this.handleInputValueChange,required:x,steps:k,tabIndex:this.show?-1:u,title:d,valid:this.validity.valid,validationMessage:z,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,size:null,fillMode:null,rounded:null,enableMouseWheel:B,autoCorrectParts:A,autoSwitchParts:F,autoSwitchKeys:V,allowCaretMode:N,inputAttributes:_},K=this.localizationService.toLanguageString(l.toggleClock,l.messages[l.toggleClock]),j=this.localizationService.toLanguageString(l.toggleTimeSelector,l.messages[l.toggleTimeSelector]),S=r.createElement(o.AsyncFocusBlur,{onFocus:this.handleFocus,onBlur:this.mobileMode?void 0:this.handleBlur,onSyncBlur:this.props.onBlur,onSyncFocus:this.props.onFocus},({onFocus:U,onBlur:H})=>r.createElement(r.Fragment,null,r.createElement("span",{id:this.props.id,ref:W=>{this._element=W},className:o.classNames(o.uTimePicker.wrapper({c:w,size:i,rounded:t,fillMode:s,invalid:!b,required:this.required,disabled:n}),g),onKeyDown:this.handleKeyDown,style:{width:O},onFocus:U,onBlur:H,onClick:this.mobileMode?this.handleIconClick:void 0},r.createElement(this.dateInputComp,{_ref:this._dateInput,ariaRole:"combobox",ariaControls:this._popupId,...L}),r.createElement(ee.Button,{tabIndex:-1,type:"button",icon:"clock",svgIcon:Z.clockIcon,onMouseDown:this.handleIconMouseDown,onClick:this.mobileMode?void 0:this.handleIconClick,title:j,className:o.classNames(o.uTimePicker.inputButton({c:w})),rounded:null,fillMode:s,"aria-label":K}),!this.mobileMode&&this.renderPopup()),this.mobileMode&&this.renderAdaptivePopup()));return this.props.label?r.createElement(Y.PickerFloatingLabel,{dateInput:this._dateInput,label:this.props.label,editorId:h,editorValid:b,editorDisabled:this.props.disabled,children:S,style:{width:this.props.width}}):S}normalizeTime(i){return c.setTime(c.MIDNIGHT_DATE,i)}setShow(i){const{onOpen:t,onClose:s}=this.props;this.show!==i&&(this.setState({show:i}),i&&t&&t.call(void 0,{target:this}),!i&&s&&s.call(void 0,{target:this}))}mergeTime(i){return this.value&&i?c.setTime(this.value,i):i}calculateMedia(i){for(const t of i)this.setState({windowWidth:t.target.clientWidth})}};a.displayName="TimePicker",a.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}),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([null,"small","medium","large"]),rounded:e.oneOf([null,"small","medium","large","full"]),fillMode:e.oneOf([null,"solid","flat","outline"]),inputAttributes:e.object},a.defaultProps={defaultShow:!1,defaultValue:null,disabled:!1,format:"t",max:c.MAX_TIME,min:c.MIN_TIME,popupSettings:{},tabIndex:0,steps:{},validityStyles:!0,dateInput:J.DateInput,size:"medium",rounded:"medium",fillMode:"solid"};let m=a;const I=o.createPropsContext(),C=o.withIdHOC(o.withPropsContext(I,o.withUnstyledHOC(o.withAdaptiveModeContext(m))));C.displayName="KendoReactTimePicker";T.registerForLocalization(m);exports.TimePicker=C;exports.TimePickerPropsContext=I;exports.TimePickerWithoutContext=m;
|
|
@@ -10,15 +10,15 @@ import * as a from "react";
|
|
|
10
10
|
import e from "prop-types";
|
|
11
11
|
import { Popup as X } from "@progress/kendo-react-popup";
|
|
12
12
|
import { cloneDate as y } from "@progress/kendo-date-math";
|
|
13
|
-
import { classNames as
|
|
13
|
+
import { classNames as c, uTimePicker as g, Keys as d, validatePackage as Z, canUseDOM as I, AsyncFocusBlur as J, createPropsContext as Q, withIdHOC as Y, withPropsContext as $, withUnstyledHOC as ee, withAdaptiveModeContext as te } from "@progress/kendo-react-common";
|
|
14
14
|
import { clockIcon as ie } from "@progress/kendo-svg-icons";
|
|
15
15
|
import { provideLocalizationService as se, registerForLocalization as oe } from "@progress/kendo-react-intl";
|
|
16
16
|
import { packageMetadata as ne } from "../package-metadata.mjs";
|
|
17
|
-
import { toggleClock as f, messages as
|
|
17
|
+
import { toggleClock as f, messages as u, timePickerCancel as ae, timePickerSet as C, toggleTimeSelector as T } from "../messages/index.mjs";
|
|
18
18
|
import { DateInput as re } from "../dateinput/DateInput.mjs";
|
|
19
19
|
import { TimeSelector as le } from "./TimeSelector.mjs";
|
|
20
|
-
import { MAX_TIME as he, MIN_TIME as
|
|
21
|
-
import { isInRange as pe, isBiggerThanMax as
|
|
20
|
+
import { MAX_TIME as he, MIN_TIME as de, setTime as M, MIDNIGHT_DATE as ue } from "../utils.mjs";
|
|
21
|
+
import { isInRange as pe, isBiggerThanMax as me, isSmallerThanMin as ce } from "./utils.mjs";
|
|
22
22
|
import { PickerFloatingLabel as ge } from "../hooks/usePickerFloatingLabel.mjs";
|
|
23
23
|
import { Button as fe } from "@progress/kendo-react-buttons";
|
|
24
24
|
import { AdaptiveMode as ve } from "../common/AdaptiveMode.mjs";
|
|
@@ -28,7 +28,7 @@ const n = class n extends a.Component {
|
|
|
28
28
|
super(i), this._element = null, this._dateInput = a.createRef(), this._timeSelector = null, this.shouldFocusDateInput = !1, this.prevShow = !1, this.focus = () => {
|
|
29
29
|
this.dateInput && this.dateInput.focus();
|
|
30
30
|
}, this.renderTimeSelector = () => {
|
|
31
|
-
const { smoothScroll: t, cancelButton: s, nowButton: o, disabled: l, format: h, steps: r, unstyled:
|
|
31
|
+
const { smoothScroll: t, cancelButton: s, nowButton: o, disabled: l, format: h, steps: r, unstyled: m } = this.props;
|
|
32
32
|
return /* @__PURE__ */ a.createElement(
|
|
33
33
|
le,
|
|
34
34
|
{
|
|
@@ -48,11 +48,11 @@ const n = class n extends a.Component {
|
|
|
48
48
|
handleTimeChange: this.mobileMode && this.handleTimeChange,
|
|
49
49
|
onChange: this.handleValueChange,
|
|
50
50
|
onReject: this.handleValueReject,
|
|
51
|
-
unstyled:
|
|
51
|
+
unstyled: m
|
|
52
52
|
}
|
|
53
53
|
);
|
|
54
54
|
}, this.renderPopup = () => {
|
|
55
|
-
const { popupClass: t, ...s } = this.popupSettings, { unstyled: o } = this.props, l = o && o.uTimePicker, h =
|
|
55
|
+
const { popupClass: t, ...s } = this.popupSettings, { unstyled: o } = this.props, l = o && o.uTimePicker, h = c(t), r = {
|
|
56
56
|
popupClass: g.popup({ c: l }),
|
|
57
57
|
show: this.show,
|
|
58
58
|
animate: this.element !== null,
|
|
@@ -77,9 +77,9 @@ const n = class n extends a.Component {
|
|
|
77
77
|
title: this.props.adaptiveTitle,
|
|
78
78
|
windowWidth: t,
|
|
79
79
|
footer: {
|
|
80
|
-
cancelText: this.localizationService.toLanguageString(f,
|
|
80
|
+
cancelText: this.localizationService.toLanguageString(f, u[ae]),
|
|
81
81
|
onCancel: this.handleValueReject,
|
|
82
|
-
applyText: this.localizationService.toLanguageString(C,
|
|
82
|
+
applyText: this.localizationService.toLanguageString(C, u[C]),
|
|
83
83
|
onApply: (o) => this.handleValueChange(o)
|
|
84
84
|
}
|
|
85
85
|
};
|
|
@@ -115,11 +115,11 @@ const n = class n extends a.Component {
|
|
|
115
115
|
t.preventDefault();
|
|
116
116
|
}, this.handleKeyDown = (t) => {
|
|
117
117
|
const { altKey: s, keyCode: o } = t;
|
|
118
|
-
if (o ===
|
|
118
|
+
if (o === d.esc) {
|
|
119
119
|
this.shouldFocusDateInput = !0, this.setShow(!1);
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
|
-
s && (o ===
|
|
122
|
+
s && (o === d.up || o === d.down) && (t.preventDefault(), t.stopPropagation(), this.shouldFocusDateInput = o === d.up, this.setShow(o === d.down));
|
|
123
123
|
}, Z(ne), this.state = {
|
|
124
124
|
value: this.props.defaultValue || n.defaultProps.defaultValue,
|
|
125
125
|
show: this.props.defaultShow || n.defaultProps.defaultShow,
|
|
@@ -178,8 +178,8 @@ const n = class n extends a.Component {
|
|
|
178
178
|
const i = this.value && this.normalizeTime(this.value), t = this.normalizeTime(this.min), s = this.normalizeTime(this.max), o = pe(i, t, s), l = this.props.validationMessage !== void 0, h = (!this.required || this.value !== null) && o, r = this.props.valid !== void 0 ? this.props.valid : h;
|
|
179
179
|
return {
|
|
180
180
|
customError: l,
|
|
181
|
-
rangeOverflow:
|
|
182
|
-
rangeUnderflow:
|
|
181
|
+
rangeOverflow: me(i, s),
|
|
182
|
+
rangeUnderflow: ce(i, t),
|
|
183
183
|
valid: r,
|
|
184
184
|
valueMissing: this.value === null
|
|
185
185
|
};
|
|
@@ -188,7 +188,8 @@ const n = class n extends a.Component {
|
|
|
188
188
|
* The mobile mode of the ComboBox.
|
|
189
189
|
*/
|
|
190
190
|
get mobileMode() {
|
|
191
|
-
|
|
191
|
+
var t;
|
|
192
|
+
return !!(this.state.windowWidth && this.props._adaptiveMode && this.state.windowWidth <= ((t = this.props._adaptiveMode) == null ? void 0 : t.medium) && this.props.adaptive);
|
|
192
193
|
}
|
|
193
194
|
/**
|
|
194
195
|
* @hidden
|
|
@@ -249,19 +250,19 @@ const n = class n extends a.Component {
|
|
|
249
250
|
tabIndex: l,
|
|
250
251
|
title: h,
|
|
251
252
|
id: r,
|
|
252
|
-
className:
|
|
253
|
+
className: m,
|
|
253
254
|
format: D,
|
|
254
255
|
formatPlaceholder: O,
|
|
255
256
|
width: P,
|
|
256
257
|
name: z,
|
|
257
258
|
steps: x,
|
|
258
|
-
validationMessage:
|
|
259
|
-
required:
|
|
259
|
+
validationMessage: k,
|
|
260
|
+
required: E,
|
|
260
261
|
validityStyles: R,
|
|
261
262
|
ariaLabelledBy: B,
|
|
262
|
-
ariaDescribedBy:
|
|
263
|
+
ariaDescribedBy: V,
|
|
263
264
|
unstyled: v,
|
|
264
|
-
enableMouseWheel:
|
|
265
|
+
enableMouseWheel: A,
|
|
265
266
|
autoCorrectParts: F,
|
|
266
267
|
autoSwitchParts: N,
|
|
267
268
|
autoSwitchKeys: L,
|
|
@@ -273,17 +274,17 @@ const n = class n extends a.Component {
|
|
|
273
274
|
formatPlaceholder: O,
|
|
274
275
|
id: r,
|
|
275
276
|
ariaLabelledBy: B,
|
|
276
|
-
ariaDescribedBy:
|
|
277
|
+
ariaDescribedBy: V,
|
|
277
278
|
max: this.normalizeTime(this.max),
|
|
278
279
|
min: this.normalizeTime(this.min),
|
|
279
280
|
name: z,
|
|
280
281
|
onChange: this.handleInputValueChange,
|
|
281
|
-
required:
|
|
282
|
+
required: E,
|
|
282
283
|
steps: x,
|
|
283
284
|
tabIndex: this.show ? -1 : l,
|
|
284
285
|
title: h,
|
|
285
286
|
valid: this.validity.valid,
|
|
286
|
-
validationMessage:
|
|
287
|
+
validationMessage: k,
|
|
287
288
|
validityStyles: R,
|
|
288
289
|
value: this.value && this.normalizeTime(this.value),
|
|
289
290
|
label: void 0,
|
|
@@ -293,17 +294,17 @@ const n = class n extends a.Component {
|
|
|
293
294
|
size: null,
|
|
294
295
|
fillMode: null,
|
|
295
296
|
rounded: null,
|
|
296
|
-
enableMouseWheel:
|
|
297
|
+
enableMouseWheel: A,
|
|
297
298
|
autoCorrectParts: F,
|
|
298
299
|
autoSwitchParts: N,
|
|
299
300
|
autoSwitchKeys: L,
|
|
300
301
|
allowCaretMode: _,
|
|
301
302
|
inputAttributes: q
|
|
302
|
-
}, U = this.localizationService.toLanguageString(f,
|
|
303
|
+
}, U = this.localizationService.toLanguageString(f, u[f]), j = this.localizationService.toLanguageString(
|
|
303
304
|
T,
|
|
304
|
-
|
|
305
|
+
u[T]
|
|
305
306
|
), b = /* @__PURE__ */ a.createElement(
|
|
306
|
-
|
|
307
|
+
J,
|
|
307
308
|
{
|
|
308
309
|
onFocus: this.handleFocus,
|
|
309
310
|
onBlur: this.mobileMode ? void 0 : this.handleBlur,
|
|
@@ -317,7 +318,7 @@ const n = class n extends a.Component {
|
|
|
317
318
|
ref: (G) => {
|
|
318
319
|
this._element = G;
|
|
319
320
|
},
|
|
320
|
-
className:
|
|
321
|
+
className: c(
|
|
321
322
|
g.wrapper({
|
|
322
323
|
c: w,
|
|
323
324
|
size: i,
|
|
@@ -327,7 +328,7 @@ const n = class n extends a.Component {
|
|
|
327
328
|
required: this.required,
|
|
328
329
|
disabled: o
|
|
329
330
|
}),
|
|
330
|
-
|
|
331
|
+
m
|
|
331
332
|
),
|
|
332
333
|
onKeyDown: this.handleKeyDown,
|
|
333
334
|
style: { width: P },
|
|
@@ -354,7 +355,7 @@ const n = class n extends a.Component {
|
|
|
354
355
|
onMouseDown: this.handleIconMouseDown,
|
|
355
356
|
onClick: this.mobileMode ? void 0 : this.handleIconClick,
|
|
356
357
|
title: j,
|
|
357
|
-
className:
|
|
358
|
+
className: c(g.inputButton({ c: w })),
|
|
358
359
|
rounded: null,
|
|
359
360
|
fillMode: s,
|
|
360
361
|
"aria-label": U
|
|
@@ -377,7 +378,7 @@ const n = class n extends a.Component {
|
|
|
377
378
|
) : b;
|
|
378
379
|
}
|
|
379
380
|
normalizeTime(i) {
|
|
380
|
-
return M(
|
|
381
|
+
return M(ue, i);
|
|
381
382
|
}
|
|
382
383
|
setShow(i) {
|
|
383
384
|
const { onOpen: t, onClose: s } = this.props;
|
|
@@ -474,7 +475,7 @@ n.displayName = "TimePicker", n.propTypes = {
|
|
|
474
475
|
disabled: !1,
|
|
475
476
|
format: "t",
|
|
476
477
|
max: he,
|
|
477
|
-
min:
|
|
478
|
+
min: de,
|
|
478
479
|
popupSettings: {},
|
|
479
480
|
tabIndex: 0,
|
|
480
481
|
steps: {},
|
|
@@ -485,10 +486,10 @@ n.displayName = "TimePicker", n.propTypes = {
|
|
|
485
486
|
fillMode: "solid"
|
|
486
487
|
};
|
|
487
488
|
let p = n;
|
|
488
|
-
const Se =
|
|
489
|
-
|
|
489
|
+
const Se = Q(), be = Y(
|
|
490
|
+
$(
|
|
490
491
|
Se,
|
|
491
|
-
te(p)
|
|
492
|
+
ee(te(p))
|
|
492
493
|
)
|
|
493
494
|
);
|
|
494
495
|
be.displayName = "KendoReactTimePicker";
|