@progress/kendo-react-dateinputs 11.4.0-develop.6 → 11.4.0-develop.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/calendar/components/MultiViewCalendar.js +1 -1
- package/calendar/components/MultiViewCalendar.mjs +38 -38
- package/daterangepicker/DateRangePicker.js +1 -1
- package/daterangepicker/DateRangePicker.mjs +46 -46
- package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
- package/index.d.mts +3 -0
- package/index.d.ts +3 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +9 -9
- package/timepicker/TimePicker.js +1 -1
- package/timepicker/TimePicker.mjs +84 -84
package/index.d.mts
CHANGED
|
@@ -2162,6 +2162,7 @@ export declare class DateRangePickerWithoutContext extends React_2.Component<Dat
|
|
|
2162
2162
|
private shouldFocusCalendar;
|
|
2163
2163
|
private observerResize?;
|
|
2164
2164
|
private readonly showLicenseWatermark;
|
|
2165
|
+
private readonly licenseMessage?;
|
|
2165
2166
|
constructor(props: DateRangePickerProps);
|
|
2166
2167
|
/**
|
|
2167
2168
|
* Gets the wrapping element of the DateRangePicker.
|
|
@@ -3492,6 +3493,7 @@ export declare class MultiViewCalendarWithoutContext extends React_2.Component<M
|
|
|
3492
3493
|
protected get activeRange(): SelectionRangeEnd;
|
|
3493
3494
|
protected get todayIsInRange(): boolean;
|
|
3494
3495
|
private readonly showLicenseWatermark;
|
|
3496
|
+
private readonly licenseMessage?;
|
|
3495
3497
|
constructor(props: MultiViewCalendarProps);
|
|
3496
3498
|
/**
|
|
3497
3499
|
* @hidden
|
|
@@ -4314,6 +4316,7 @@ export declare class TimePickerWithoutContext extends React_2.Component<TimePick
|
|
|
4314
4316
|
private observerResize?;
|
|
4315
4317
|
private get document();
|
|
4316
4318
|
private readonly showLicenseWatermark;
|
|
4319
|
+
private readonly licenseMessage?;
|
|
4317
4320
|
constructor(props: TimePickerProps);
|
|
4318
4321
|
/**
|
|
4319
4322
|
* Gets the wrapping element of the TimePicker.
|
package/index.d.ts
CHANGED
|
@@ -2162,6 +2162,7 @@ export declare class DateRangePickerWithoutContext extends React_2.Component<Dat
|
|
|
2162
2162
|
private shouldFocusCalendar;
|
|
2163
2163
|
private observerResize?;
|
|
2164
2164
|
private readonly showLicenseWatermark;
|
|
2165
|
+
private readonly licenseMessage?;
|
|
2165
2166
|
constructor(props: DateRangePickerProps);
|
|
2166
2167
|
/**
|
|
2167
2168
|
* Gets the wrapping element of the DateRangePicker.
|
|
@@ -3492,6 +3493,7 @@ export declare class MultiViewCalendarWithoutContext extends React_2.Component<M
|
|
|
3492
3493
|
protected get activeRange(): SelectionRangeEnd;
|
|
3493
3494
|
protected get todayIsInRange(): boolean;
|
|
3494
3495
|
private readonly showLicenseWatermark;
|
|
3496
|
+
private readonly licenseMessage?;
|
|
3495
3497
|
constructor(props: MultiViewCalendarProps);
|
|
3496
3498
|
/**
|
|
3497
3499
|
* @hidden
|
|
@@ -4314,6 +4316,7 @@ export declare class TimePickerWithoutContext extends React_2.Component<TimePick
|
|
|
4314
4316
|
private observerResize?;
|
|
4315
4317
|
private get document();
|
|
4316
4318
|
private readonly showLicenseWatermark;
|
|
4319
|
+
private readonly licenseMessage?;
|
|
4317
4320
|
constructor(props: TimePickerProps);
|
|
4318
4321
|
/**
|
|
4319
4322
|
* Gets the wrapping element of the TimePicker.
|
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={name:"@progress/kendo-react-dateinputs",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-dateinputs",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1754569027,version:"11.4.0-develop.7",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
|
@@ -10,8 +10,8 @@ const e = {
|
|
|
10
10
|
productName: "KendoReact",
|
|
11
11
|
productCode: "KENDOUIREACT",
|
|
12
12
|
productCodes: ["KENDOUIREACT"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "11.4.0-develop.
|
|
13
|
+
publishDate: 1754569027,
|
|
14
|
+
version: "11.4.0-develop.7",
|
|
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
|
};
|
|
17
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-dateinputs",
|
|
3
|
-
"version": "11.4.0-develop.
|
|
3
|
+
"version": "11.4.0-develop.7",
|
|
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",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@progress/kendo-date-math": "^1.4.0",
|
|
29
|
-
"@progress/kendo-licensing": "^1.
|
|
29
|
+
"@progress/kendo-licensing": "^1.7.0",
|
|
30
30
|
"@progress/kendo-dateinputs-common": "^0.4.0",
|
|
31
|
-
"@progress/kendo-react-buttons": "11.4.0-develop.
|
|
32
|
-
"@progress/kendo-react-common": "11.4.0-develop.
|
|
33
|
-
"@progress/kendo-react-intl": "11.4.0-develop.
|
|
34
|
-
"@progress/kendo-react-labels": "11.4.0-develop.
|
|
35
|
-
"@progress/kendo-react-layout": "11.4.0-develop.
|
|
36
|
-
"@progress/kendo-react-popup": "11.4.0-develop.
|
|
31
|
+
"@progress/kendo-react-buttons": "11.4.0-develop.7",
|
|
32
|
+
"@progress/kendo-react-common": "11.4.0-develop.7",
|
|
33
|
+
"@progress/kendo-react-intl": "11.4.0-develop.7",
|
|
34
|
+
"@progress/kendo-react-labels": "11.4.0-develop.7",
|
|
35
|
+
"@progress/kendo-react-layout": "11.4.0-develop.7",
|
|
36
|
+
"@progress/kendo-react-popup": "11.4.0-develop.7",
|
|
37
37
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
38
38
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
39
39
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"package": {
|
|
90
90
|
"productName": "KendoReact",
|
|
91
91
|
"productCode": "KENDOUIREACT",
|
|
92
|
-
"publishDate":
|
|
92
|
+
"publishDate": 1754569027,
|
|
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 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 a=se(G),r=class r extends a.Component{constructor(i){super(i),this._element=null,this._dateInput=a.createRef(),this._timeSelector=null,this.shouldFocusDateInput=!1,this.prevShow=!1,this.showLicenseWatermark=!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 a.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?a.createElement(this.props.popup,{...h},this.renderTimeSelector()):a.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||this.props.label,subTitle:this.props.adaptiveSubtitle,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 a.createElement(te.AdaptiveMode,{...s},a.createElement(ie.ActionSheetContent,null,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.handleClick=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))},this.showLicenseWatermark=!o.validatePackage($.packageMetadata,{component:"TimePicker"}),this.state={value:this.props.defaultValue||r.defaultProps.defaultValue,show:this.props.defaultShow||r.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:r.defaultProps.validityStyles}get required(){return this.props.required!==void 0?this.props.required:!1}get popupSettings(){return this.props.popupSettings||r.defaultProps.popupSettings}get min(){return this.props.min!==void 0?this.props.min:r.defaultProps.min}get max(){return this.props.max!==void 0?this.props.max:r.defaultProps.max}get dateInputComp(){return this.props.dateInput||r.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.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 i;(i=this.document)!=null&&i.body&&this.observerResize&&this.observerResize.disconnect()}render(){const{size:i=r.defaultProps.size,rounded:t=r.defaultProps.rounded,fillMode:s=r.defaultProps.fillMode,disabled:n,tabIndex:u,title:d,id:h,className:g,format:M,formatPlaceholder:P,width:O,name:k,steps:D,validationMessage:z,required:x,validityStyles:q,ariaLabelledBy:R,ariaDescribedBy:E,unstyled:v,enableMouseWheel:B,autoCorrectParts:A,autoSwitchParts:F,autoSwitchKeys:V,allowCaretMode:L,inputAttributes:N}=this.props,w=v&&v.uTimePicker,b=!this.validityStyles||this.validity.valid,_={disabled:n,format:M,formatPlaceholder:P,id:h,ariaLabelledBy:R,ariaDescribedBy:E,max:this.normalizeTime(this.max),min:this.normalizeTime(this.min),name:k,onChange:this.handleInputValueChange,required:x,steps:D,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:L,inputAttributes:N},K=this.localizationService.toLanguageString(l.toggleClock,l.messages[l.toggleClock]),j=this.localizationService.toLanguageString(l.toggleTimeSelector,l.messages[l.toggleTimeSelector]),S=a.createElement(o.AsyncFocusBlur,{onFocus:this.handleFocus,onBlur:this.mobileMode?void 0:this.handleBlur,onSyncBlur:this.props.onBlur,onSyncFocus:this.props.onFocus},({onFocus:W,onBlur:U})=>a.createElement(a.Fragment,null,a.createElement("span",{ref:H=>{this._element=H},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:this.mobileMode?this.handleClick:W,onBlur:U,onClick:this.mobileMode?this.handleClick:void 0},a.createElement(this.dateInputComp,{_ref:this._dateInput,ariaRole:"combobox",ariaControls:this._popupId,..._}),a.createElement(ee.Button,{tabIndex:-1,type:"button",icon:"clock",svgIcon:Z.clockIcon,onMouseDown:this.handleIconMouseDown,onClick:this.mobileMode?void 0:this.handleClick,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(),this.showLicenseWatermark&&a.createElement(o.WatermarkOverlay,null)));return this.props.label?a.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})}};r.displayName="TimePicker",r.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},r.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=r;const C=o.createPropsContext(),I=o.withIdHOC(o.withPropsContext(C,o.withUnstyledHOC(o.withAdaptiveModeContext(m))));I.displayName="KendoReactTimePicker";T.registerForLocalization(m);exports.TimePicker=I;exports.TimePickerPropsContext=C;exports.TimePickerWithoutContext=m;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const X=require("react"),e=require("prop-types"),Z=require("@progress/kendo-react-popup"),y=require("@progress/kendo-date-math"),o=require("@progress/kendo-react-common"),$=require("@progress/kendo-svg-icons"),M=require("@progress/kendo-react-intl"),T=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 a=se(X),r=class r extends a.Component{constructor(i){super(i),this._element=null,this._dateInput=a.createRef(),this._timeSelector=null,this.shouldFocusDateInput=!1,this.prevShow=!1,this.showLicenseWatermark=!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 a.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?a.createElement(this.props.popup,{...h},this.renderTimeSelector()):a.createElement(Z.Popup,{...h},this.renderTimeSelector())},this.renderAdaptivePopup=()=>{const{windowWidth:t=0}=this.state,s={expand:this.show,onClose:this.handleBlur,title:this.props.adaptiveTitle||this.props.label,subTitle:this.props.adaptiveSubtitle,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 a.createElement(te.AdaptiveMode,{...s},a.createElement(ie.ActionSheetContent,null,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.handleClick=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))},this.showLicenseWatermark=!o.validatePackage(T.packageMetadata,{component:"TimePicker"}),this.licenseMessage=o.getLicenseMessage(T.packageMetadata),this.state={value:this.props.defaultValue||r.defaultProps.defaultValue,show:this.props.defaultShow||r.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:r.defaultProps.validityStyles}get required(){return this.props.required!==void 0?this.props.required:!1}get popupSettings(){return this.props.popupSettings||r.defaultProps.popupSettings}get min(){return this.props.min!==void 0?this.props.min:r.defaultProps.min}get max(){return this.props.max!==void 0?this.props.max:r.defaultProps.max}get dateInputComp(){return this.props.dateInput||r.defaultProps.dateInput}get localizationService(){return M.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.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 i;(i=this.document)!=null&&i.body&&this.observerResize&&this.observerResize.disconnect()}render(){const{size:i=r.defaultProps.size,rounded:t=r.defaultProps.rounded,fillMode:s=r.defaultProps.fillMode,disabled:n,tabIndex:u,title:d,id:h,className:g,format:P,formatPlaceholder:k,width:O,name:D,steps:z,validationMessage:x,required:q,validityStyles:R,ariaLabelledBy:E,ariaDescribedBy:B,unstyled:v,enableMouseWheel:A,autoCorrectParts:F,autoSwitchParts:L,autoSwitchKeys:V,allowCaretMode:N,inputAttributes:_}=this.props,w=v&&v.uTimePicker,b=!this.validityStyles||this.validity.valid,K={disabled:n,format:P,formatPlaceholder:k,id:h,ariaLabelledBy:E,ariaDescribedBy:B,max:this.normalizeTime(this.max),min:this.normalizeTime(this.min),name:D,onChange:this.handleInputValueChange,required:q,steps:z,tabIndex:this.show?-1:u,title:d,valid:this.validity.valid,validationMessage:x,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:A,autoCorrectParts:F,autoSwitchParts:L,autoSwitchKeys:V,allowCaretMode:N,inputAttributes:_},j=this.localizationService.toLanguageString(l.toggleClock,l.messages[l.toggleClock]),W=this.localizationService.toLanguageString(l.toggleTimeSelector,l.messages[l.toggleTimeSelector]),S=a.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})=>a.createElement(a.Fragment,null,a.createElement("span",{ref:G=>{this._element=G},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:this.mobileMode?this.handleClick:U,onBlur:H,onClick:this.mobileMode?this.handleClick:void 0},a.createElement(this.dateInputComp,{_ref:this._dateInput,ariaRole:"combobox",ariaControls:this._popupId,...K}),a.createElement(ee.Button,{tabIndex:-1,type:"button",icon:"clock",svgIcon:$.clockIcon,onMouseDown:this.handleIconMouseDown,onClick:this.mobileMode?void 0:this.handleClick,title:W,className:o.classNames(o.uTimePicker.inputButton({c:w})),rounded:null,fillMode:s,"aria-label":j}),!this.mobileMode&&this.renderPopup()),this.mobileMode&&this.renderAdaptivePopup(),this.showLicenseWatermark&&a.createElement(o.WatermarkOverlay,{message:this.licenseMessage})));return this.props.label?a.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})}};r.displayName="TimePicker",r.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},r.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=r;const C=o.createPropsContext(),I=o.withIdHOC(o.withPropsContext(C,o.withUnstyledHOC(o.withAdaptiveModeContext(m))));I.displayName="KendoReactTimePicker";M.registerForLocalization(m);exports.TimePicker=I;exports.TimePickerPropsContext=C;exports.TimePickerWithoutContext=m;
|
|
@@ -7,21 +7,21 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as n from "react";
|
|
9
9
|
import e from "prop-types";
|
|
10
|
-
import { Popup as
|
|
10
|
+
import { Popup as Z } from "@progress/kendo-react-popup";
|
|
11
11
|
import { cloneDate as y } from "@progress/kendo-date-math";
|
|
12
|
-
import { classNames as c, uTimePicker as g, Keys as u, validatePackage as
|
|
13
|
-
import { clockIcon as
|
|
14
|
-
import { provideLocalizationService as
|
|
15
|
-
import { packageMetadata as
|
|
16
|
-
import { toggleClock as f, messages as d, timePickerCancel as
|
|
17
|
-
import { DateInput as
|
|
18
|
-
import { TimeSelector as
|
|
19
|
-
import { MAX_TIME as
|
|
20
|
-
import { isInRange as
|
|
21
|
-
import { PickerFloatingLabel as
|
|
22
|
-
import { Button as
|
|
23
|
-
import { AdaptiveMode as
|
|
24
|
-
import { ActionSheetContent as
|
|
12
|
+
import { classNames as c, uTimePicker as g, Keys as u, validatePackage as J, getLicenseMessage as Q, canUseDOM as C, AsyncFocusBlur as Y, WatermarkOverlay as $, createPropsContext as ee, withIdHOC as te, withPropsContext as ie, withUnstyledHOC as se, withAdaptiveModeContext as oe } from "@progress/kendo-react-common";
|
|
13
|
+
import { clockIcon as ne } from "@progress/kendo-svg-icons";
|
|
14
|
+
import { provideLocalizationService as ae, registerForLocalization as re } from "@progress/kendo-react-intl";
|
|
15
|
+
import { packageMetadata as I } from "../package-metadata.mjs";
|
|
16
|
+
import { toggleClock as f, messages as d, timePickerCancel as le, timePickerSet as M, toggleTimeSelector as T } from "../messages/index.mjs";
|
|
17
|
+
import { DateInput as he } from "../dateinput/DateInput.mjs";
|
|
18
|
+
import { TimeSelector as ue } from "./TimeSelector.mjs";
|
|
19
|
+
import { MAX_TIME as de, MIN_TIME as pe, setTime as O, MIDNIGHT_DATE as me } from "../utils.mjs";
|
|
20
|
+
import { isInRange as ce, isBiggerThanMax as ge, isSmallerThanMin as fe } from "./utils.mjs";
|
|
21
|
+
import { PickerFloatingLabel as ve } from "../hooks/usePickerFloatingLabel.mjs";
|
|
22
|
+
import { Button as we } from "@progress/kendo-react-buttons";
|
|
23
|
+
import { AdaptiveMode as be } from "../common/AdaptiveMode.mjs";
|
|
24
|
+
import { ActionSheetContent as Se } from "@progress/kendo-react-layout";
|
|
25
25
|
const a = class a extends n.Component {
|
|
26
26
|
constructor(i) {
|
|
27
27
|
super(i), this._element = null, this._dateInput = n.createRef(), this._timeSelector = null, this.shouldFocusDateInput = !1, this.prevShow = !1, this.showLicenseWatermark = !1, this.focus = () => {
|
|
@@ -29,7 +29,7 @@ const a = class a extends n.Component {
|
|
|
29
29
|
}, this.renderTimeSelector = () => {
|
|
30
30
|
const { smoothScroll: t, cancelButton: s, nowButton: o, disabled: l, format: h, steps: r, unstyled: m } = this.props;
|
|
31
31
|
return /* @__PURE__ */ n.createElement(
|
|
32
|
-
|
|
32
|
+
ue,
|
|
33
33
|
{
|
|
34
34
|
ref: this.setTimeSelectorRef,
|
|
35
35
|
mobileMode: this.mobileMode,
|
|
@@ -68,7 +68,7 @@ const a = class a extends n.Component {
|
|
|
68
68
|
},
|
|
69
69
|
...s
|
|
70
70
|
};
|
|
71
|
-
return this.props.popup ? /* @__PURE__ */ n.createElement(this.props.popup, { ...r }, this.renderTimeSelector()) : /* @__PURE__ */ n.createElement(
|
|
71
|
+
return this.props.popup ? /* @__PURE__ */ n.createElement(this.props.popup, { ...r }, this.renderTimeSelector()) : /* @__PURE__ */ n.createElement(Z, { ...r }, this.renderTimeSelector());
|
|
72
72
|
}, this.renderAdaptivePopup = () => {
|
|
73
73
|
const { windowWidth: t = 0 } = this.state, s = {
|
|
74
74
|
expand: this.show,
|
|
@@ -77,13 +77,13 @@ const a = class a extends n.Component {
|
|
|
77
77
|
subTitle: this.props.adaptiveSubtitle,
|
|
78
78
|
windowWidth: t,
|
|
79
79
|
footer: {
|
|
80
|
-
cancelText: this.localizationService.toLanguageString(f, d[
|
|
80
|
+
cancelText: this.localizationService.toLanguageString(f, d[le]),
|
|
81
81
|
onCancel: this.handleValueReject,
|
|
82
|
-
applyText: this.localizationService.toLanguageString(
|
|
82
|
+
applyText: this.localizationService.toLanguageString(M, d[M]),
|
|
83
83
|
onApply: (o) => this.handleValueChange(o)
|
|
84
84
|
}
|
|
85
85
|
};
|
|
86
|
-
return /* @__PURE__ */ n.createElement(
|
|
86
|
+
return /* @__PURE__ */ n.createElement(be, { ...s }, /* @__PURE__ */ n.createElement(Se, null, this.renderTimeSelector()));
|
|
87
87
|
}, this.setTimeSelectorRef = (t) => {
|
|
88
88
|
this._timeSelector = t;
|
|
89
89
|
}, 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) => {
|
|
@@ -120,7 +120,7 @@ const a = class a extends n.Component {
|
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
122
|
s && (o === u.up || o === u.down) && (t.preventDefault(), t.stopPropagation(), this.shouldFocusDateInput = o === u.up, this.setShow(o === u.down));
|
|
123
|
-
}, this.showLicenseWatermark = !
|
|
123
|
+
}, this.showLicenseWatermark = !J(I, { component: "TimePicker" }), this.licenseMessage = Q(I), this.state = {
|
|
124
124
|
value: this.props.defaultValue || a.defaultProps.defaultValue,
|
|
125
125
|
show: this.props.defaultShow || a.defaultProps.defaultShow,
|
|
126
126
|
focused: !1,
|
|
@@ -175,11 +175,11 @@ const a = class a extends n.Component {
|
|
|
175
175
|
* Represents the validity state into which the TimePicker is set.
|
|
176
176
|
*/
|
|
177
177
|
get validity() {
|
|
178
|
-
const i = this.value && this.normalizeTime(this.value), t = this.normalizeTime(this.min), s = this.normalizeTime(this.max), o =
|
|
178
|
+
const i = this.value && this.normalizeTime(this.value), t = this.normalizeTime(this.min), s = this.normalizeTime(this.max), o = ce(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: ge(i, s),
|
|
182
|
+
rangeUnderflow: fe(i, t),
|
|
183
183
|
valid: r,
|
|
184
184
|
valueMissing: this.value === null
|
|
185
185
|
};
|
|
@@ -216,7 +216,7 @@ const a = class a extends n.Component {
|
|
|
216
216
|
return this.props.dateInput || a.defaultProps.dateInput;
|
|
217
217
|
}
|
|
218
218
|
get localizationService() {
|
|
219
|
-
return
|
|
219
|
+
return ae(this);
|
|
220
220
|
}
|
|
221
221
|
/**
|
|
222
222
|
* @hidden
|
|
@@ -253,41 +253,41 @@ const a = class a extends n.Component {
|
|
|
253
253
|
title: h,
|
|
254
254
|
id: r,
|
|
255
255
|
className: m,
|
|
256
|
-
format:
|
|
257
|
-
formatPlaceholder:
|
|
258
|
-
width:
|
|
259
|
-
name:
|
|
260
|
-
steps:
|
|
261
|
-
validationMessage:
|
|
262
|
-
required:
|
|
263
|
-
validityStyles:
|
|
264
|
-
ariaLabelledBy:
|
|
265
|
-
ariaDescribedBy:
|
|
256
|
+
format: D,
|
|
257
|
+
formatPlaceholder: P,
|
|
258
|
+
width: z,
|
|
259
|
+
name: k,
|
|
260
|
+
steps: x,
|
|
261
|
+
validationMessage: E,
|
|
262
|
+
required: R,
|
|
263
|
+
validityStyles: B,
|
|
264
|
+
ariaLabelledBy: A,
|
|
265
|
+
ariaDescribedBy: F,
|
|
266
266
|
unstyled: v,
|
|
267
|
-
enableMouseWheel:
|
|
268
|
-
autoCorrectParts:
|
|
269
|
-
autoSwitchParts:
|
|
270
|
-
autoSwitchKeys:
|
|
271
|
-
allowCaretMode:
|
|
272
|
-
inputAttributes:
|
|
273
|
-
} = this.props, w = v && v.uTimePicker, b = !this.validityStyles || this.validity.valid,
|
|
267
|
+
enableMouseWheel: V,
|
|
268
|
+
autoCorrectParts: L,
|
|
269
|
+
autoSwitchParts: N,
|
|
270
|
+
autoSwitchKeys: _,
|
|
271
|
+
allowCaretMode: q,
|
|
272
|
+
inputAttributes: K
|
|
273
|
+
} = this.props, w = v && v.uTimePicker, b = !this.validityStyles || this.validity.valid, W = {
|
|
274
274
|
disabled: o,
|
|
275
|
-
format:
|
|
276
|
-
formatPlaceholder:
|
|
275
|
+
format: D,
|
|
276
|
+
formatPlaceholder: P,
|
|
277
277
|
id: r,
|
|
278
|
-
ariaLabelledBy:
|
|
279
|
-
ariaDescribedBy:
|
|
278
|
+
ariaLabelledBy: A,
|
|
279
|
+
ariaDescribedBy: F,
|
|
280
280
|
max: this.normalizeTime(this.max),
|
|
281
281
|
min: this.normalizeTime(this.min),
|
|
282
|
-
name:
|
|
282
|
+
name: k,
|
|
283
283
|
onChange: this.handleInputValueChange,
|
|
284
|
-
required:
|
|
285
|
-
steps:
|
|
284
|
+
required: R,
|
|
285
|
+
steps: x,
|
|
286
286
|
tabIndex: this.show ? -1 : l,
|
|
287
287
|
title: h,
|
|
288
288
|
valid: this.validity.valid,
|
|
289
|
-
validationMessage:
|
|
290
|
-
validityStyles:
|
|
289
|
+
validationMessage: E,
|
|
290
|
+
validityStyles: B,
|
|
291
291
|
value: this.value && this.normalizeTime(this.value),
|
|
292
292
|
label: void 0,
|
|
293
293
|
placeholder: this.state.focused ? null : this.props.placeholder,
|
|
@@ -296,28 +296,28 @@ const a = class a extends n.Component {
|
|
|
296
296
|
size: null,
|
|
297
297
|
fillMode: null,
|
|
298
298
|
rounded: null,
|
|
299
|
-
enableMouseWheel:
|
|
300
|
-
autoCorrectParts:
|
|
301
|
-
autoSwitchParts:
|
|
302
|
-
autoSwitchKeys:
|
|
303
|
-
allowCaretMode:
|
|
304
|
-
inputAttributes:
|
|
305
|
-
},
|
|
299
|
+
enableMouseWheel: V,
|
|
300
|
+
autoCorrectParts: L,
|
|
301
|
+
autoSwitchParts: N,
|
|
302
|
+
autoSwitchKeys: _,
|
|
303
|
+
allowCaretMode: q,
|
|
304
|
+
inputAttributes: K
|
|
305
|
+
}, U = this.localizationService.toLanguageString(f, d[f]), j = this.localizationService.toLanguageString(
|
|
306
306
|
T,
|
|
307
307
|
d[T]
|
|
308
308
|
), S = /* @__PURE__ */ n.createElement(
|
|
309
|
-
|
|
309
|
+
Y,
|
|
310
310
|
{
|
|
311
311
|
onFocus: this.handleFocus,
|
|
312
312
|
onBlur: this.mobileMode ? void 0 : this.handleBlur,
|
|
313
313
|
onSyncBlur: this.props.onBlur,
|
|
314
314
|
onSyncFocus: this.props.onFocus
|
|
315
315
|
},
|
|
316
|
-
({ onFocus:
|
|
316
|
+
({ onFocus: H, onBlur: G }) => /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(
|
|
317
317
|
"span",
|
|
318
318
|
{
|
|
319
|
-
ref: (
|
|
320
|
-
this._element =
|
|
319
|
+
ref: (X) => {
|
|
320
|
+
this._element = X;
|
|
321
321
|
},
|
|
322
322
|
className: c(
|
|
323
323
|
g.wrapper({
|
|
@@ -332,9 +332,9 @@ const a = class a extends n.Component {
|
|
|
332
332
|
m
|
|
333
333
|
),
|
|
334
334
|
onKeyDown: this.handleKeyDown,
|
|
335
|
-
style: { width:
|
|
336
|
-
onFocus: this.mobileMode ? this.handleClick :
|
|
337
|
-
onBlur:
|
|
335
|
+
style: { width: z },
|
|
336
|
+
onFocus: this.mobileMode ? this.handleClick : H,
|
|
337
|
+
onBlur: G,
|
|
338
338
|
onClick: this.mobileMode ? this.handleClick : void 0
|
|
339
339
|
},
|
|
340
340
|
/* @__PURE__ */ n.createElement(
|
|
@@ -343,30 +343,30 @@ const a = class a extends n.Component {
|
|
|
343
343
|
_ref: this._dateInput,
|
|
344
344
|
ariaRole: "combobox",
|
|
345
345
|
ariaControls: this._popupId,
|
|
346
|
-
...
|
|
346
|
+
...W
|
|
347
347
|
}
|
|
348
348
|
),
|
|
349
349
|
/* @__PURE__ */ n.createElement(
|
|
350
|
-
|
|
350
|
+
we,
|
|
351
351
|
{
|
|
352
352
|
tabIndex: -1,
|
|
353
353
|
type: "button",
|
|
354
354
|
icon: "clock",
|
|
355
|
-
svgIcon:
|
|
355
|
+
svgIcon: ne,
|
|
356
356
|
onMouseDown: this.handleIconMouseDown,
|
|
357
357
|
onClick: this.mobileMode ? void 0 : this.handleClick,
|
|
358
|
-
title:
|
|
358
|
+
title: j,
|
|
359
359
|
className: c(g.inputButton({ c: w })),
|
|
360
360
|
rounded: null,
|
|
361
361
|
fillMode: s,
|
|
362
|
-
"aria-label":
|
|
362
|
+
"aria-label": U
|
|
363
363
|
}
|
|
364
364
|
),
|
|
365
365
|
!this.mobileMode && this.renderPopup()
|
|
366
|
-
), this.mobileMode && this.renderAdaptivePopup(), this.showLicenseWatermark && /* @__PURE__ */ n.createElement(
|
|
366
|
+
), this.mobileMode && this.renderAdaptivePopup(), this.showLicenseWatermark && /* @__PURE__ */ n.createElement($, { message: this.licenseMessage }))
|
|
367
367
|
);
|
|
368
368
|
return this.props.label ? /* @__PURE__ */ n.createElement(
|
|
369
|
-
|
|
369
|
+
ve,
|
|
370
370
|
{
|
|
371
371
|
dateInput: this._dateInput,
|
|
372
372
|
label: this.props.label,
|
|
@@ -379,7 +379,7 @@ const a = class a extends n.Component {
|
|
|
379
379
|
) : S;
|
|
380
380
|
}
|
|
381
381
|
normalizeTime(i) {
|
|
382
|
-
return
|
|
382
|
+
return O(me, i);
|
|
383
383
|
}
|
|
384
384
|
setShow(i) {
|
|
385
385
|
const { onOpen: t, onClose: s } = this.props;
|
|
@@ -390,7 +390,7 @@ const a = class a extends n.Component {
|
|
|
390
390
|
}));
|
|
391
391
|
}
|
|
392
392
|
mergeTime(i) {
|
|
393
|
-
return this.value && i ?
|
|
393
|
+
return this.value && i ? O(this.value, i) : i;
|
|
394
394
|
}
|
|
395
395
|
calculateMedia(i) {
|
|
396
396
|
for (const t of i)
|
|
@@ -475,28 +475,28 @@ a.displayName = "TimePicker", a.propTypes = {
|
|
|
475
475
|
defaultValue: null,
|
|
476
476
|
disabled: !1,
|
|
477
477
|
format: "t",
|
|
478
|
-
max:
|
|
479
|
-
min:
|
|
478
|
+
max: de,
|
|
479
|
+
min: pe,
|
|
480
480
|
popupSettings: {},
|
|
481
481
|
tabIndex: 0,
|
|
482
482
|
steps: {},
|
|
483
483
|
validityStyles: !0,
|
|
484
|
-
dateInput:
|
|
484
|
+
dateInput: he,
|
|
485
485
|
size: "medium",
|
|
486
486
|
rounded: "medium",
|
|
487
487
|
fillMode: "solid"
|
|
488
488
|
};
|
|
489
489
|
let p = a;
|
|
490
|
-
const
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
490
|
+
const ye = ee(), Ce = te(
|
|
491
|
+
ie(
|
|
492
|
+
ye,
|
|
493
|
+
se(oe(p))
|
|
494
494
|
)
|
|
495
495
|
);
|
|
496
|
-
|
|
497
|
-
|
|
496
|
+
Ce.displayName = "KendoReactTimePicker";
|
|
497
|
+
re(p);
|
|
498
498
|
export {
|
|
499
|
-
|
|
500
|
-
|
|
499
|
+
Ce as TimePicker,
|
|
500
|
+
ye as TimePickerPropsContext,
|
|
501
501
|
p as TimePickerWithoutContext
|
|
502
502
|
};
|