@progress/kendo-react-dateinputs 9.0.0-develop.4 → 9.0.0-develop.6

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.
@@ -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 _=require("react"),t=require("prop-types"),g=require("@progress/kendo-date-math"),F=require("@progress/kendo-react-buttons"),I=require("@progress/kendo-svg-icons"),v=require("@progress/kendo-react-intl"),N=require("./models/kendo-date.js"),o=require("@progress/kendo-react-common"),A=require("@progress/kendo-react-labels"),L=require("../package-metadata.js"),y=require("./utils.js"),b=require("../utils.js"),h=require("../messages/index.js"),R=require("../timepicker/utils.js"),z=require("../common/ClearButton.js");function j(f){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(f){for(const e in f)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(f,e);Object.defineProperty(s,e,i.get?i:{enumerable:!0,get:()=>f[e]})}}return s.default=f,Object.freeze(s)}const c=j(_),K="Please enter a valid value!",l=class l extends c.Component{constructor(s){super(s),this.kendoDate=null,this.currentFormat="",this.paste=!1,this._element=null,this._wrapper=null,this._lastSelectedSymbol="",this.focus=()=>{this._element&&this._element.focus()},this.setValidity=()=>{this.element&&this.element.setCustomValidity&&this.element.setCustomValidity(this.validity.valid?"":this.props.validationMessage||l.defaultProps.validationMessage)},this.updateOnPaste=e=>{if(!this.element||!this.kendoDate)return;const i=v.provideIntlService(this).parseDate(this.element.value,this.props.format)||this.value,a=this.value;this.kendoDate.setValue(i),this.triggerChange(e,a)},this.spinnersMouseDown=e=>{e.preventDefault();const i=o.getActiveElement(document);this.element&&i!==this.element&&this.element.focus({preventScroll:!0})},this.handlePaste=()=>{this.paste=!0},this.handleClick=e=>{this.props.onChange&&this.props.onChange(e)},this.elementChange=e=>{if(!this.element||!this.kendoDate)return;if(this.paste){this.updateOnPaste(e),this.paste=!1;return}const{text:i,format:a}=this.kendoDate.getTextAndFormat();this.currentFormat=a;const r=this.value,n=y.approximateStringMatching(i,this.currentFormat,this.element.value,this.selection.start),u=n.length===1&&n[0][1]==="_";if(!u)for(let d=0;d<n.length;d++)this.kendoDate.parsePart(n[d][0],n[d][1]);n.length&&n[0][0]!=="_"&&this.setSelection(this.selectionBySymbol(n[0][0])),u&&this.switchDateSegment(1),this.triggerChange(e,r)},this.elementClick=e=>{this.setSelection(this.selectionByIndex(this.selection.start))},this.nativeWheel=e=>{o.getActiveElement(document)===this.element&&e.preventDefault()},this.wheel=e=>{o.getActiveElement(document)===this.element&&(e.nativeEvent.deltaY<0&&this.increasePart(e),e.nativeEvent.deltaY>0&&this.decreasePart(e))},this.increasePart=e=>{this.modifyDateSegmentValue(1,e)},this.decreasePart=e=>{this.modifyDateSegmentValue(-1,e)},this.elementKeyDown=e=>{if(!e.altKey){switch(e.keyCode){case 37:this.switchDateSegment(-1);break;case 38:this.modifyDateSegmentValue(1,e);break;case 39:this.switchDateSegment(1);break;case 40:this.modifyDateSegmentValue(-1,e);break;default:return}e.preventDefault()}},this.elementOnFocus=e=>{this.wrapper&&this.wrapper.classList.add("k-focus"),this.setState({focused:!0})},this.elementOnBlur=e=>{this.wrapper&&this.wrapper.classList.remove("k-focus"),this.setState({focused:!1})},o.validatePackage(L.packageMetadata),this.state={focused:!1}}get _inputId(){return this.props.id+"-accessibility-id"}componentDidMount(){this.setValidity(),this.wrapper&&this.wrapper.addEventListener("wheel",this.nativeWheel,{passive:!1})}componentDidUpdate(s,e){this._lastSelectedSymbol&&e.focused===this.state.focused?this.setSelection(this.selectionBySymbol(this._lastSelectedSymbol)):this.props.placeholder!==void 0&&this.selection.start===this.selection.end&&this.setSelection({start:0,end:this.currentFormat.length}),this.setValidity()}componentWillUnmount(){this.wrapper&&this.wrapper.removeEventListener("wheel",this.nativeWheel)}render(){const{size:s=l.defaultProps.size,fillMode:e=l.defaultProps.fillMode,rounded:i=l.defaultProps.rounded,autoFocus:a=l.defaultProps.autoFocus,unstyled:r}=this.props,n=r&&r.uDateInput;this.props._ref&&(this.props._ref.current=this);const u=v.provideLocalizationService(this),d={...l.defaultProps,...this.props},{name:E,label:D,id:x,disabled:V}=d,p=this.text,M=p===this.props.placeholder?"":p,T=p===this.props.placeholder?p:void 0,O=x||this._inputId,S=!this.validityStyles||this.validity.valid,P=c.createElement(o.AsyncFocusBlur,{onFocus:this.elementOnFocus,onBlur:this.elementOnBlur},({onFocus:q,onBlur:B})=>c.createElement("span",{ref:k=>{this._wrapper=k},style:D?void 0:{width:this.props.width},dir:this.props.dir,className:o.classNames(o.uDateInput.wrapper({c:n,size:s,fillMode:e,rounded:i,disabled:V,required:this.required,invalid:!S}),this.props.className),onFocus:q,onBlur:B},c.createElement("input",{role:this.props.ariaRole||"textbox",readOnly:this.props.readonly,tabIndex:this.props.tabIndex,disabled:this.props.disabled,title:this.props.title!==void 0?this.props.title:p,type:"text",spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoFocus:a,className:o.classNames(o.uDateInput.inputInner({c:n})),id:O,"aria-label":this.props.ariaLabel,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,"aria-haspopup":this.props.ariaHasPopup,"aria-disabled":this.props.disabled,"aria-expanded":this.props.ariaExpanded,"aria-controls":this.props.ariaControls,"aria-required":this.props.required,"aria-invalid":!S,onWheel:this.wheel,onClick:this.elementClick,onInput:this.elementChange,onPaste:this.handlePaste,onKeyDown:this.elementKeyDown,onChange:o.noop,value:M,placeholder:T,name:E,ref:k=>this._element=k}),this.props.children,this.props.clearButton&&this.props.value&&c.createElement(z,{onClick:this.handleClick,key:"clearbutton"}),this.props.spinners&&c.createElement("span",{className:o.classNames(o.uDateInput.inputSpinner({c:n})),onMouseDown:this.spinnersMouseDown},c.createElement(F.Button,{tabIndex:-1,type:"button",rounded:null,className:o.classNames(o.uDateInput.spinnerIncrease({c:n})),icon:"caret-alt-up",svgIcon:I.caretAltUpIcon,"aria-label":u.toLanguageString(h.increaseValue,h.messages[h.increaseValue]),title:u.toLanguageString(h.increaseValue,h.messages[h.increaseValue]),onClick:this.increasePart}),c.createElement(F.Button,{tabIndex:-1,type:"button",rounded:null,className:o.classNames(o.uDateInput.spinnerDecrease({c:n})),icon:"caret-alt-down",svgIcon:I.caretAltDownIcon,"aria-label":u.toLanguageString(h.decreaseValue,h.messages[h.decreaseValue]),title:u.toLanguageString(h.decreaseValue,h.messages[h.decreaseValue]),onClick:this.decreasePart}))));return D?c.createElement(A.FloatingLabel,{label:D,editorId:O,editorValue:p,editorValid:S,editorDisabled:this.props.disabled,children:P,style:{width:this.props.width}}):P}get value(){return this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.kendoDate&&this.kendoDate.getDateObject()}get name(){return this.props.name}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 text(){const s={...w.defaultProps,...this.props},{formatPlaceholder:e=l.defaultProps.formatPlaceholder,format:i=l.defaultProps.format,value:a,defaultValue:r}=s;this.kendoDate===null?(this.kendoDate=new N.KendoDate(this.intl.bind(this),e,i),this.kendoDate.setValue(a||r||null)):(this.kendoDate.format=i,this.kendoDate.formatPlaceholder=e),a!==void 0&&this.value!==a&&this.kendoDate.setValue(a);const{text:n,format:u}=this.kendoDate.getTextAndFormat();return this.currentFormat=u,s.placeholder!==null&&s.placeholder!==void 0&&!this.state.focused&&!this.kendoDate.hasValue()?s.placeholder:n}get validity(){const s=y.isInRange(this.value,this.min,this.max)&&R.isInTimeRange(this.value,this.props.minTime,this.props.maxTime),e=this.props.validationMessage!==void 0,i=(!this.required||this.value!==null)&&s,a=this.props.valid!==void 0?this.props.valid:i;return{customError:e,rangeOverflow:this.value&&this.max.getTime()<this.value.getTime()||!1,rangeUnderflow:this.value&&this.value.getTime()<this.min.getTime()||!1,valid:a,valueMissing:this.value===null}}get element(){return this._element}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 wrapper(){return this._wrapper}intl(){return v.provideIntlService(this)}get selection(){let s={start:0,end:0};return this.element!==null&&this.element.selectionStart!==void 0&&(s={start:this.element.selectionStart,end:this.element.selectionEnd}),s}setSelection(s){this._lastSelectedSymbol=this.currentFormat[s.start],window.requestAnimationFrame(()=>{const e=o.getActiveElement(document);this.element&&e===this.element&&!this.props.disableSelection&&this.element.setSelectionRange(s.start,s.end)})}triggerChange(s,e){this.valueDuringOnChange=this.value,this.forceUpdate(),this.props.onChange&&!g.isEqual(e,this.value)&&this.props.onChange.call(void 0,{syntheticEvent:s,nativeEvent:s.nativeEvent,value:this.value,target:this}),this.valueDuringOnChange=void 0}selectionBySymbol(s){let e=-1,i=0;for(let a=0;a<this.currentFormat.length;a++)this.currentFormat[a]===s&&(i=a+1,e===-1&&(e=a));return e<0&&(e=0),{start:e,end:i}}selectionByIndex(s){let e={start:s,end:s};for(let i=s,a=s-1;i<this.currentFormat.length||a>=0;i++,a--){if(i<this.currentFormat.length&&this.currentFormat[i]!=="_"){e=this.selectionBySymbol(this.currentFormat[i]);break}if(a>=0&&this.currentFormat[a]!=="_"){e=this.selectionBySymbol(this.currentFormat[a]);break}}return e}switchDateSegment(s){const{start:e,end:i}=this.selection;if(e<i&&this.currentFormat[e]!==this.currentFormat[i-1]){this.setSelection(this.selectionByIndex(s>0?e:i-1));return}const a=this.currentFormat[e];let r=e+s;for(;r>0&&r<this.currentFormat.length&&!(this.currentFormat[r]!==a&&this.currentFormat[r]!=="_");)r+=s;if(this.currentFormat[r]==="_")return;let n=r;for(;n>=0&&n<this.currentFormat.length&&this.currentFormat[n]===this.currentFormat[r];)n+=s;r>n&&(n+1!==e||r+1!==i)?this.setSelection({start:n+1,end:r+1}):r<n&&(r!==e||n!==i)&&this.setSelection({start:r,end:n})}modifyDateSegmentValue(s,e){if(!this.kendoDate)return;const i=this.value,a=this.currentFormat[this.selection.start],r=this.kendoDate.symbolMap(a),n=((this.props.steps||{})[r]||1)*s;this.kendoDate.modifyPart(a,n),this.triggerChange(e,i)}};l.displayName="DateInput",l.propTypes={value:t.instanceOf(Date),format:t.oneOfType([t.string,t.shape({skeleton:t.string,pattern:t.string,date:t.oneOf(["short","medium","long","full"]),time:t.oneOf(["short","medium","long","full"]),datetime:t.oneOf(["short","medium","long","full"]),era:t.oneOf(["narrow","short","long"]),year:t.oneOf(["numeric","2-digit"]),month:t.oneOf(["numeric","2-digit","narrow","short","long"]),day:t.oneOf(["numeric","2-digit"]),weekday:t.oneOf(["narrow","short","long"]),hour:t.oneOf(["numeric","2-digit"]),hour12:t.bool,minute:t.oneOf(["numeric","2-digit"]),second:t.oneOf(["numeric","2-digit"]),timeZoneName:t.oneOf(["short","long"])})]),formatPlaceholder:t.oneOfType([t.oneOf(["wide","narrow","short","formatPattern"]),t.shape({year:t.string,month:t.string,day:t.string,hour:t.string,minute:t.string,second:t.string})]),width:t.oneOfType([t.string,t.number]),tabIndex:t.number,title:t.string,steps:t.shape({year:t.number,month:t.number,day:t.number,hour:t.number,minute:t.number,second:t.number}),min:t.instanceOf(Date),max:t.instanceOf(Date),disabled:t.bool,spinners:t.bool,name:t.string,dir:t.string,label:t.string,id:t.string,ariaLabelledBy:t.string,ariaDescribedBy:t.string,ariaLabel:t.string,ariaRole:t.string,ariaHasPopup:t.oneOfType([t.bool,t.string]),ariaExpanded:t.oneOfType([t.bool]),onChange:t.func,validationMessage:t.string,required:t.bool,validate:t.bool,valid:t.bool,size:t.oneOf([null,"small","medium","large"]),rounded:t.oneOf([null,"small","medium","large","full"]),fillMode:t.oneOf([null,"solid","flat","outline"]),autoFocus:t.bool},l.defaultProps={format:y.defaultFormat,size:"medium",rounded:"medium",fillMode:"solid",formatPlaceholder:y.defaultFormatPlaceholder,spinners:!1,disabled:!1,max:g.cloneDate(b.MAX_DATE),min:g.cloneDate(b.MIN_DATE),minTime:g.cloneDate(b.MIN_TIME),maxTime:g.cloneDate(b.MAX_TIME),validityStyles:!0,validationMessage:K,placeholder:null,ariaHasPopup:"grid",autoFocus:!1};let m=l;const C=o.createPropsContext(),w=o.withIdHOC(o.withPropsContext(C,o.withUnstyledHOC(m)));w.displayName="KendoReactDateInput";v.registerForIntl(m);v.registerForLocalization(m);exports.DateInput=w;exports.DateInputPropsContext=C;exports.DateInputWithoutContext=m;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("react"),e=require("prop-types"),c=require("@progress/kendo-date-math"),I=require("@progress/kendo-react-buttons"),E=require("@progress/kendo-svg-icons"),m=require("@progress/kendo-react-intl"),n=require("@progress/kendo-react-common"),V=require("@progress/kendo-react-labels"),_=require("@progress/kendo-dateinputs-common"),f=require("./utils.js"),A=require("../package-metadata.js"),v=require("../utils.js"),r=require("../messages/index.js"),N=require("../timepicker/utils.js"),R=require("../common/ClearButton.js"),F=require("./dateInputIntl.js");function B(h){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(h){for(const t in h)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(h,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:()=>h[t]})}}return i.default=h,Object.freeze(i)}const l=B(L),j="Please enter a valid value!",a=class a extends l.Component{constructor(i){super(i),this.kendoDate=null,this.kendoDateObject=null,this.mounted=!1,this._element=null,this._wrapper=null,this._nativeEvent=null,this.focus=()=>{this._element&&this._element.focus()},this.setValidity=()=>{this.element&&this.element.setCustomValidity&&this.element.setCustomValidity(this.validity.valid?"":this.props.validationMessage||a.defaultProps.validationMessage)},this.updateOnPaste=t=>{!this.element||!this.kendoDate||this.triggerChange(t)},this.spinnersMouseDown=t=>{t.preventDefault();const s=n.getActiveElement(document);this.element&&s!==this.element&&this.element.focus({preventScroll:!0})},this.handleClick=t=>{this.props.onChange&&this.props.onChange(t)},this.nativeWheel=t=>{n.getActiveElement(document)===this.element&&t.preventDefault()},this.increasePart=t=>{var s;(s=this.kendoDate)==null||s.modifyDateSegmentValue(1),this.onChange(t)},this.decreasePart=t=>{var s;(s=this.kendoDate)==null||s.modifyDateSegmentValue(-1),this.onChange(t)},this.elementOnFocus=t=>{this.wrapper&&this.wrapper.classList.add("k-focus"),this.setState({focused:!0})},this.elementOnBlur=t=>{this.wrapper&&this.wrapper.classList.remove("k-focus"),this.setState({focused:!1})},n.validatePackage(A.packageMetadata),this.state={focused:!1}}get _inputId(){return this.props.id+"-accessibility-id"}get value(){return this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.kendoDate&&this.kendoDate.value}get name(){return this.props.name}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 isInSegmentSelection(){const{year:i,month:t,day:s,hours:d,minutes:p,seconds:o}=this.kendoDateObject;return(!i||!t||!s||!d||!p||!o)&&(i||t||s||d||p||o)}get text(){const{placeholder:i}=this.props,t=this.kendoDate&&this.kendoDate.currentText||"";return i!=null&&!this.state.focused&&!this.value?i:t}get validity(){const i=f.isInRange(this.value,this.min,this.max)&&N.isInTimeRange(this.value,this.props.minTime,this.props.maxTime),t=this.props.validationMessage!==void 0,s=(!this.required||this.value!==null)&&i,d=this.props.valid!==void 0?this.props.valid:s;return{customError:t,rangeOverflow:this.value&&this.max.getTime()<this.value.getTime()||!1,rangeUnderflow:this.value&&this.value.getTime()<this.min.getTime()||!1,valid:d,valueMissing:this.value===null}}get element(){return this._element}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 wrapper(){return this._wrapper}get options(){return{format:this.props.format,steps:this.props.steps,formatPlaceholder:f.DEFAULT_FORMAT_PLACEHOLDER,placeholder:this.props.placeholder,selectPreviousSegmentOnBackspace:!0,allowCaretMode:!1,value:this.props.value||this.value,intlService:new F.DateInputIntl(m.provideIntlService(this)),enableMouseWheel:!0,autoCorrectParts:!0,autoSwitchParts:!0,autoSwitchKeys:[],twoDigitYearMax:68}}componentDidMount(){this.setValidity(),this.mounted||(this.wrapper&&this.wrapper.addEventListener("wheel",this.nativeWheel,{passive:!1}),this.kendoDate=this.initKendoDate(),this.kendoDateObject=this.kendoDate.dateObject,this.mounted=!0)}componentDidUpdate(i){this.setValidity(),this.kendoDate&&((i.format!==this.props.format||i.readonly!==this.props.readonly||i.steps!==this.props.steps)&&this.kendoDate.setOptions(this.options,!0),i.value!==this.props.value&&(this.kendoDateObject.getValue()!==null||this.isInSegmentSelection&&this.props.value!==null)&&this.kendoDateObject.setValue(this.props.value),this.props.ariaExpanded!==void 0&&this.props.ariaExpanded&&(this.kendoDate.options.placeholder=null),this.props.ariaExpanded!==void 0&&!this.props.ariaExpanded&&(this.kendoDate.options.placeholder=this.props.placeholder),this.kendoDate.refreshElementValue())}componentWillUnmount(){this.wrapper&&this.wrapper.removeEventListener("wheel",this.nativeWheel)}render(){var k;const{size:i=a.defaultProps.size,fillMode:t=a.defaultProps.fillMode,rounded:s=a.defaultProps.rounded,autoFocus:d=a.defaultProps.autoFocus,unstyled:p}=this.props,o=p&&p.uDateInput;this.props._ref&&(this.props._ref.current=this);const g=m.provideLocalizationService(this),S={...a.defaultProps,...this.props},{name:x,label:b,id:M,disabled:T}=S,q=this.text,O=M||this._inputId,D=!this.validityStyles||this.validity.valid,C=l.createElement("span",{ref:y=>{this._wrapper=y},style:b?void 0:{width:this.props.width},dir:this.props.dir,className:n.classNames(n.uDateInput.wrapper({c:o,size:i,fillMode:t,rounded:s,disabled:T,required:this.required,invalid:!D}),this.props.className)},l.createElement("input",{role:this.props.ariaRole||"textbox",readOnly:this.props.readonly,tabIndex:this.props.tabIndex||0,disabled:this.props.disabled,title:this.props.title!==void 0?this.props.title:q,type:"text",spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoFocus:d,className:n.classNames(n.uDateInput.inputInner({c:o})),id:O,"aria-label":this.props.ariaLabel,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,"aria-haspopup":this.props.ariaHasPopup,"aria-disabled":this.props.disabled,"aria-expanded":this.props.ariaExpanded,"aria-controls":this.props.ariaControls,"aria-required":this.props.required,"aria-invalid":!D,onKeyDown:this.onChange.bind(this),onChange:this.onChange.bind(this),onWheel:this.onChange.bind(this),onInput:this.onChange.bind(this),onClick:this.onChange.bind(this),name:x,ref:y=>this._element=y}),this.props.children,this.props.clearButton&&this.props.value&&l.createElement(R,{onClick:this.handleClick,key:"clearbutton"}),this.props.spinners&&l.createElement("span",{className:n.classNames(n.uDateInput.inputSpinner({c:o})),onMouseDown:this.spinnersMouseDown},l.createElement(I.Button,{tabIndex:-1,type:"button",rounded:null,className:n.classNames(n.uDateInput.spinnerIncrease({c:o})),icon:"caret-alt-up",svgIcon:E.caretAltUpIcon,"aria-label":g.toLanguageString(r.increaseValue,r.messages[r.increaseValue]),title:g.toLanguageString(r.increaseValue,r.messages[r.increaseValue]),onClick:this.increasePart}),l.createElement(I.Button,{tabIndex:-1,type:"button",rounded:null,className:n.classNames(n.uDateInput.spinnerDecrease({c:o})),icon:"caret-alt-down",svgIcon:E.caretAltDownIcon,"aria-label":g.toLanguageString(r.decreaseValue,r.messages[r.decreaseValue]),title:g.toLanguageString(r.decreaseValue,r.messages[r.decreaseValue]),onClick:this.decreasePart})));return b?l.createElement(V.FloatingLabel,{label:b,editorId:O,editorValue:(k=this._element)==null?void 0:k.value,editorValid:D,editorDisabled:this.props.disabled,children:C,style:{width:this.props.width}}):C}intl(){return m.provideIntlService(this)}get intlCommon(){return this.intlProvider()}triggerChange(i){this.valueDuringOnChange=this.value,this.forceUpdate(),this._nativeEvent=i,this.valueDuringOnChange=void 0}onChange(i){this._nativeEvent&&this.props.onChange&&!c.isEqual(this._nativeEvent.oldValue,this.value)&&this.props.onChange.call(void 0,{syntheticEvent:i,nativeEvent:this._nativeEvent.event,value:this._nativeEvent.value,target:this}),this._nativeEvent=null}initKendoDate(){return new _.DateInput(this._element,{...this.options,events:{focus:this.elementOnFocus.bind(this),blur:this.elementOnBlur.bind(this),valueChange:this.triggerChange.bind(this),click:this.handleClick.bind(this)}})}};a.displayName="DateInput",a.propTypes={value:e.instanceOf(Date),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})]),width:e.oneOfType([e.string,e.number]),tabIndex:e.number,title:e.string,steps:e.shape({year:e.number,month:e.number,day:e.number,hour:e.number,minute:e.number,second:e.number}),min:e.instanceOf(Date),max:e.instanceOf(Date),disabled:e.bool,spinners:e.bool,name:e.string,dir:e.string,label:e.string,id:e.string,ariaLabelledBy:e.string,ariaDescribedBy:e.string,ariaLabel:e.string,ariaRole:e.string,ariaHasPopup:e.oneOfType([e.bool,e.string]),ariaExpanded:e.oneOfType([e.bool]),onChange:e.func,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"]),autoFocus:e.bool},a.defaultProps={format:f.DEFAULT_FORMAT,size:"medium",rounded:"medium",fillMode:"solid",formatPlaceholder:f.DEFAULT_FORMAT_PLACEHOLDER,spinners:!1,disabled:!1,max:c.cloneDate(v.MAX_DATE),min:c.cloneDate(v.MIN_DATE),minTime:c.cloneDate(v.MIN_TIME),maxTime:c.cloneDate(v.MAX_TIME),validityStyles:!0,validationMessage:j,placeholder:null,ariaHasPopup:"grid",autoFocus:!1};let u=a;const w=n.createPropsContext(),P=n.withIdHOC(n.withPropsContext(w,n.withUnstyledHOC(u)));P.displayName="KendoReactDateInput";m.registerForIntl(u);m.registerForLocalization(u);exports.DateInput=P;exports.DateInputPropsContext=w;exports.DateInputWithoutContext=u;