@progress/kendo-react-dateinputs 9.0.0-develop.9 → 9.0.0
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/dateinput/DateInput.js +1 -1
- package/dateinput/DateInput.mjs +107 -93
- package/datepicker/DatePicker.js +1 -1
- package/datepicker/DatePicker.mjs +97 -83
- package/datetimepicker/DateTimePicker.js +1 -1
- package/datetimepicker/DateTimePicker.mjs +82 -68
- package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
- package/index.d.mts +111 -10
- package/index.d.ts +111 -10
- package/package-metadata.mjs +1 -1
- package/package.json +9 -9
- package/timepicker/TimePicker.js +1 -1
- package/timepicker/TimePicker.mjs +78 -68
package/dateinput/DateInput.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 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;
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("react"),e=require("prop-types"),g=require("@progress/kendo-date-math"),P=require("@progress/kendo-react-buttons"),S=require("@progress/kendo-svg-icons"),f=require("@progress/kendo-react-intl"),n=require("@progress/kendo-react-common"),V=require("@progress/kendo-react-labels"),_=require("@progress/kendo-dateinputs-common"),v=require("./utils.js"),A=require("../package-metadata.js"),b=require("../utils.js"),r=require("../messages/index.js"),N=require("../timepicker/utils.js"),F=require("../common/ClearButton.js"),R=require("./dateInputIntl.js");function B(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 d=B(L),j="Please enter a valid value!",a=class a extends d.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:l,minutes:u,seconds:o}=this.kendoDateObject;return(!i||!t||!s||!l||!u||!o)&&(i||t||s||l||u||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=v.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,l=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:l,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(){const{format:i,steps:t,placeholder:s,value:l,autoFill:u,enableMouseWheel:o,autoCorrectParts:h,autoSwitchParts:D,autoSwitchKeys:y,twoDigitYearMax:m,allowCaretMode:O}=this.props;return{format:i,steps:t,formatPlaceholder:v.DEFAULT_FORMAT_PLACEHOLDER,placeholder:s,selectPreviousSegmentOnBackspace:!0,value:l||this.value,intlService:new R.DateInputIntl(f.provideIntlService(this)),autoFill:u!==void 0?u:!1,enableMouseWheel:o,autoCorrectParts:h,autoSwitchParts:D,autoSwitchKeys:y||[],twoDigitYearMax:m,allowCaretMode:O}}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 E;const{size:i=a.defaultProps.size,fillMode:t=a.defaultProps.fillMode,rounded:s=a.defaultProps.rounded,autoFocus:l=a.defaultProps.autoFocus,unstyled:u}=this.props,o=u&&u.uDateInput;this.props._ref&&(this.props._ref.current=this);const h=f.provideLocalizationService(this),D={...a.defaultProps,...this.props},{name:y,label:m,id:O,disabled:T}=D,q=this.text,w=O||this._inputId,C=!this.validityStyles||this.validity.valid,I=d.createElement("span",{ref:k=>{this._wrapper=k},style:m?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:!C}),this.props.className)},d.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:l,className:n.classNames(n.uDateInput.inputInner({c:o})),id:w,"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":!C,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:y,ref:k=>this._element=k}),this.props.children,this.props.clearButton&&this.props.value&&d.createElement(F,{onClick:this.handleClick,key:"clearbutton"}),this.props.spinners&&d.createElement("span",{className:n.classNames(n.uDateInput.inputSpinner({c:o})),onMouseDown:this.spinnersMouseDown},d.createElement(P.Button,{tabIndex:-1,type:"button",rounded:null,className:n.classNames(n.uDateInput.spinnerIncrease({c:o})),icon:"caret-alt-up",svgIcon:S.caretAltUpIcon,"aria-label":h.toLanguageString(r.increaseValue,r.messages[r.increaseValue]),title:h.toLanguageString(r.increaseValue,r.messages[r.increaseValue]),onClick:this.increasePart}),d.createElement(P.Button,{tabIndex:-1,type:"button",rounded:null,className:n.classNames(n.uDateInput.spinnerDecrease({c:o})),icon:"caret-alt-down",svgIcon:S.caretAltDownIcon,"aria-label":h.toLanguageString(r.decreaseValue,r.messages[r.decreaseValue]),title:h.toLanguageString(r.decreaseValue,r.messages[r.decreaseValue]),onClick:this.decreasePart})));return m?d.createElement(V.FloatingLabel,{label:m,editorId:w,editorValue:(E=this._element)==null?void 0:E.value,editorValid:C,editorDisabled:this.props.disabled,children:I,style:{width:this.props.width}}):I}intl(){return f.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&&!g.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:v.DEFAULT_FORMAT,size:"medium",rounded:"medium",fillMode:"solid",formatPlaceholder:v.DEFAULT_FORMAT_PLACEHOLDER,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:j,placeholder:null,enableMouseWheel:!0,autoCorrectParts:!0,autoSwitchParts:!0,allowCaretMode:!1,twoDigitYearMax:68,ariaHasPopup:"grid",autoFocus:!1};let p=a;const x=n.createPropsContext(),M=n.withIdHOC(n.withPropsContext(x,n.withUnstyledHOC(p)));M.displayName="KendoReactDateInput";f.registerForIntl(p);f.registerForLocalization(p);exports.DateInput=M;exports.DateInputPropsContext=x;exports.DateInputWithoutContext=p;
|
package/dateinput/DateInput.mjs
CHANGED
|
@@ -6,40 +6,40 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
9
|
+
import * as l from "react";
|
|
10
10
|
import e from "prop-types";
|
|
11
|
-
import { cloneDate as
|
|
12
|
-
import { Button as
|
|
11
|
+
import { cloneDate as c, isEqual as L } from "@progress/kendo-date-math";
|
|
12
|
+
import { Button as I } from "@progress/kendo-react-buttons";
|
|
13
13
|
import { caretAltUpIcon as _, caretAltDownIcon as V } from "@progress/kendo-svg-icons";
|
|
14
|
-
import { provideIntlService as
|
|
15
|
-
import { getActiveElement as
|
|
14
|
+
import { provideIntlService as x, provideLocalizationService as A, registerForIntl as F, registerForLocalization as N } from "@progress/kendo-react-intl";
|
|
15
|
+
import { getActiveElement as P, validatePackage as q, classNames as p, uDateInput as u, createPropsContext as B, withIdHOC as R, withPropsContext as U, withUnstyledHOC as z } from "@progress/kendo-react-common";
|
|
16
16
|
import { FloatingLabel as j } from "@progress/kendo-react-labels";
|
|
17
17
|
import { DateInput as H } from "@progress/kendo-dateinputs-common";
|
|
18
|
-
import { DEFAULT_FORMAT as K, DEFAULT_FORMAT_PLACEHOLDER as
|
|
18
|
+
import { DEFAULT_FORMAT as K, DEFAULT_FORMAT_PLACEHOLDER as S, isInRange as W } from "./utils.mjs";
|
|
19
19
|
import { packageMetadata as X } from "../package-metadata.mjs";
|
|
20
|
-
import { MAX_DATE as
|
|
21
|
-
import { increaseValue as
|
|
20
|
+
import { MAX_DATE as Y, MIN_DATE as G, MIN_TIME as Z, MAX_TIME as $ } from "../utils.mjs";
|
|
21
|
+
import { increaseValue as g, messages as f, decreaseValue as v } from "../messages/index.mjs";
|
|
22
22
|
import { isInTimeRange as J } from "../timepicker/utils.mjs";
|
|
23
23
|
import Q from "../common/ClearButton.mjs";
|
|
24
24
|
import { DateInputIntl as ee } from "./dateInputIntl.mjs";
|
|
25
|
-
const te = "Please enter a valid value!",
|
|
25
|
+
const te = "Please enter a valid value!", a = class a extends l.Component {
|
|
26
26
|
constructor(t) {
|
|
27
27
|
super(t), this.kendoDate = null, this.kendoDateObject = null, this.mounted = !1, this._element = null, this._wrapper = null, this._nativeEvent = null, this.focus = () => {
|
|
28
28
|
this._element && this._element.focus();
|
|
29
29
|
}, this.setValidity = () => {
|
|
30
30
|
this.element && this.element.setCustomValidity && this.element.setCustomValidity(
|
|
31
|
-
this.validity.valid ? "" : this.props.validationMessage ||
|
|
31
|
+
this.validity.valid ? "" : this.props.validationMessage || a.defaultProps.validationMessage
|
|
32
32
|
);
|
|
33
33
|
}, this.updateOnPaste = (i) => {
|
|
34
34
|
!this.element || !this.kendoDate || this.triggerChange(i);
|
|
35
35
|
}, this.spinnersMouseDown = (i) => {
|
|
36
36
|
i.preventDefault();
|
|
37
|
-
const s =
|
|
37
|
+
const s = P(document);
|
|
38
38
|
this.element && s !== this.element && this.element.focus({ preventScroll: !0 });
|
|
39
39
|
}, this.handleClick = (i) => {
|
|
40
40
|
this.props.onChange && this.props.onChange(i);
|
|
41
41
|
}, this.nativeWheel = (i) => {
|
|
42
|
-
|
|
42
|
+
P(document) === this.element && i.preventDefault();
|
|
43
43
|
}, this.increasePart = (i) => {
|
|
44
44
|
var s;
|
|
45
45
|
(s = this.kendoDate) == null || s.modifyDateSegmentValue(1), this.onChange(i);
|
|
@@ -71,14 +71,14 @@ const te = "Please enter a valid value!", n = class n extends r.Component {
|
|
|
71
71
|
return this.props.name;
|
|
72
72
|
}
|
|
73
73
|
get min() {
|
|
74
|
-
return this.props.min !== void 0 ? this.props.min :
|
|
74
|
+
return this.props.min !== void 0 ? this.props.min : a.defaultProps.min;
|
|
75
75
|
}
|
|
76
76
|
get max() {
|
|
77
|
-
return this.props.max !== void 0 ? this.props.max :
|
|
77
|
+
return this.props.max !== void 0 ? this.props.max : a.defaultProps.max;
|
|
78
78
|
}
|
|
79
79
|
get isInSegmentSelection() {
|
|
80
|
-
const { year: t, month: i, day: s, hours:
|
|
81
|
-
return (!t || !i || !s || !
|
|
80
|
+
const { year: t, month: i, day: s, hours: r, minutes: o, seconds: n } = this.kendoDateObject;
|
|
81
|
+
return (!t || !i || !s || !r || !o || !n) && (t || i || s || r || o || n);
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
84
|
* @hidden
|
|
@@ -91,12 +91,12 @@ const te = "Please enter a valid value!", n = class n extends r.Component {
|
|
|
91
91
|
* Represents the validity state into which the DateInput is set.
|
|
92
92
|
*/
|
|
93
93
|
get validity() {
|
|
94
|
-
const t = W(this.value, this.min, this.max) && J(this.value, this.props.minTime, this.props.maxTime), i = this.props.validationMessage !== void 0, s = (!this.required || this.value !== null) && t,
|
|
94
|
+
const t = W(this.value, this.min, this.max) && J(this.value, this.props.minTime, this.props.maxTime), i = this.props.validationMessage !== void 0, s = (!this.required || this.value !== null) && t, r = this.props.valid !== void 0 ? this.props.valid : s;
|
|
95
95
|
return {
|
|
96
96
|
customError: i,
|
|
97
97
|
rangeOverflow: this.value && this.max.getTime() < this.value.getTime() || !1,
|
|
98
98
|
rangeUnderflow: this.value && this.value.getTime() < this.min.getTime() || !1,
|
|
99
|
-
valid:
|
|
99
|
+
valid: r,
|
|
100
100
|
valueMissing: this.value === null
|
|
101
101
|
};
|
|
102
102
|
}
|
|
@@ -138,7 +138,7 @@ const te = "Please enter a valid value!", n = class n extends r.Component {
|
|
|
138
138
|
* @hidden
|
|
139
139
|
*/
|
|
140
140
|
get validityStyles() {
|
|
141
|
-
return this.props.validityStyles !== void 0 ? this.props.validityStyles :
|
|
141
|
+
return this.props.validityStyles !== void 0 ? this.props.validityStyles : a.defaultProps.validityStyles;
|
|
142
142
|
}
|
|
143
143
|
/**
|
|
144
144
|
* @hidden
|
|
@@ -156,25 +156,34 @@ const te = "Please enter a valid value!", n = class n extends r.Component {
|
|
|
156
156
|
* @hidden
|
|
157
157
|
*/
|
|
158
158
|
get options() {
|
|
159
|
+
const {
|
|
160
|
+
format: t,
|
|
161
|
+
steps: i,
|
|
162
|
+
placeholder: s,
|
|
163
|
+
value: r,
|
|
164
|
+
autoFill: o,
|
|
165
|
+
enableMouseWheel: n,
|
|
166
|
+
autoCorrectParts: h,
|
|
167
|
+
autoSwitchParts: b,
|
|
168
|
+
autoSwitchKeys: y,
|
|
169
|
+
twoDigitYearMax: d,
|
|
170
|
+
allowCaretMode: D
|
|
171
|
+
} = this.props;
|
|
159
172
|
return {
|
|
160
|
-
format:
|
|
161
|
-
steps:
|
|
162
|
-
formatPlaceholder:
|
|
163
|
-
placeholder:
|
|
173
|
+
format: t,
|
|
174
|
+
steps: i,
|
|
175
|
+
formatPlaceholder: S,
|
|
176
|
+
placeholder: s,
|
|
164
177
|
selectPreviousSegmentOnBackspace: !0,
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
enableMouseWheel:
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
autoSwitchKeys: [],
|
|
175
|
-
// TODO: extract as an option
|
|
176
|
-
twoDigitYearMax: 68
|
|
177
|
-
// TODO: extract as an option
|
|
178
|
+
value: r || this.value,
|
|
179
|
+
intlService: new ee(x(this)),
|
|
180
|
+
autoFill: o !== void 0 ? o : !1,
|
|
181
|
+
enableMouseWheel: n,
|
|
182
|
+
autoCorrectParts: h,
|
|
183
|
+
autoSwitchParts: b,
|
|
184
|
+
autoSwitchKeys: y || [],
|
|
185
|
+
twoDigitYearMax: d,
|
|
186
|
+
allowCaretMode: D
|
|
178
187
|
};
|
|
179
188
|
}
|
|
180
189
|
/**
|
|
@@ -199,51 +208,51 @@ const te = "Please enter a valid value!", n = class n extends r.Component {
|
|
|
199
208
|
* @hidden
|
|
200
209
|
*/
|
|
201
210
|
render() {
|
|
202
|
-
var
|
|
211
|
+
var k;
|
|
203
212
|
const {
|
|
204
|
-
size: t =
|
|
205
|
-
fillMode: i =
|
|
206
|
-
rounded: s =
|
|
207
|
-
autoFocus:
|
|
208
|
-
unstyled:
|
|
209
|
-
} = this.props,
|
|
213
|
+
size: t = a.defaultProps.size,
|
|
214
|
+
fillMode: i = a.defaultProps.fillMode,
|
|
215
|
+
rounded: s = a.defaultProps.rounded,
|
|
216
|
+
autoFocus: r = a.defaultProps.autoFocus,
|
|
217
|
+
unstyled: o
|
|
218
|
+
} = this.props, n = o && o.uDateInput;
|
|
210
219
|
this.props._ref && (this.props._ref.current = this);
|
|
211
|
-
const
|
|
220
|
+
const h = A(this), b = { ...a.defaultProps, ...this.props }, { name: y, label: d, id: D, disabled: M } = b, T = this.text, C = D || this._inputId, O = !this.validityStyles || this.validity.valid, E = /* @__PURE__ */ l.createElement(
|
|
212
221
|
"span",
|
|
213
222
|
{
|
|
214
|
-
ref: (
|
|
215
|
-
this._wrapper =
|
|
223
|
+
ref: (w) => {
|
|
224
|
+
this._wrapper = w;
|
|
216
225
|
},
|
|
217
|
-
style:
|
|
226
|
+
style: d ? void 0 : { width: this.props.width },
|
|
218
227
|
dir: this.props.dir,
|
|
219
|
-
className:
|
|
220
|
-
|
|
221
|
-
c:
|
|
228
|
+
className: p(
|
|
229
|
+
u.wrapper({
|
|
230
|
+
c: n,
|
|
222
231
|
size: t,
|
|
223
232
|
fillMode: i,
|
|
224
233
|
rounded: s,
|
|
225
|
-
disabled:
|
|
234
|
+
disabled: M,
|
|
226
235
|
required: this.required,
|
|
227
|
-
invalid: !
|
|
236
|
+
invalid: !O
|
|
228
237
|
}),
|
|
229
238
|
this.props.className
|
|
230
239
|
)
|
|
231
240
|
},
|
|
232
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ l.createElement(
|
|
233
242
|
"input",
|
|
234
243
|
{
|
|
235
244
|
role: this.props.ariaRole || "textbox",
|
|
236
245
|
readOnly: this.props.readonly,
|
|
237
246
|
tabIndex: this.props.tabIndex || 0,
|
|
238
247
|
disabled: this.props.disabled,
|
|
239
|
-
title: this.props.title !== void 0 ? this.props.title :
|
|
248
|
+
title: this.props.title !== void 0 ? this.props.title : T,
|
|
240
249
|
type: "text",
|
|
241
250
|
spellCheck: !1,
|
|
242
251
|
autoComplete: "off",
|
|
243
252
|
autoCorrect: "off",
|
|
244
|
-
autoFocus:
|
|
245
|
-
className:
|
|
246
|
-
id:
|
|
253
|
+
autoFocus: r,
|
|
254
|
+
className: p(u.inputInner({ c: n })),
|
|
255
|
+
id: C,
|
|
247
256
|
"aria-label": this.props.ariaLabel,
|
|
248
257
|
"aria-labelledby": this.props.ariaLabelledBy,
|
|
249
258
|
"aria-describedby": this.props.ariaDescribedBy,
|
|
@@ -252,72 +261,72 @@ const te = "Please enter a valid value!", n = class n extends r.Component {
|
|
|
252
261
|
"aria-expanded": this.props.ariaExpanded,
|
|
253
262
|
"aria-controls": this.props.ariaControls,
|
|
254
263
|
"aria-required": this.props.required,
|
|
255
|
-
"aria-invalid": !
|
|
264
|
+
"aria-invalid": !O,
|
|
256
265
|
onKeyDown: this.onChange.bind(this),
|
|
257
266
|
onChange: this.onChange.bind(this),
|
|
258
267
|
onWheel: this.onChange.bind(this),
|
|
259
268
|
onInput: this.onChange.bind(this),
|
|
260
269
|
onClick: this.onChange.bind(this),
|
|
261
|
-
name:
|
|
262
|
-
ref: (
|
|
270
|
+
name: y,
|
|
271
|
+
ref: (w) => this._element = w
|
|
263
272
|
}
|
|
264
273
|
),
|
|
265
274
|
this.props.children,
|
|
266
|
-
this.props.clearButton && this.props.value && /* @__PURE__ */
|
|
267
|
-
this.props.spinners && /* @__PURE__ */
|
|
275
|
+
this.props.clearButton && this.props.value && /* @__PURE__ */ l.createElement(Q, { onClick: this.handleClick, key: "clearbutton" }),
|
|
276
|
+
this.props.spinners && /* @__PURE__ */ l.createElement(
|
|
268
277
|
"span",
|
|
269
278
|
{
|
|
270
|
-
className:
|
|
279
|
+
className: p(u.inputSpinner({ c: n })),
|
|
271
280
|
onMouseDown: this.spinnersMouseDown
|
|
272
281
|
},
|
|
273
|
-
/* @__PURE__ */
|
|
274
|
-
|
|
282
|
+
/* @__PURE__ */ l.createElement(
|
|
283
|
+
I,
|
|
275
284
|
{
|
|
276
285
|
tabIndex: -1,
|
|
277
286
|
type: "button",
|
|
278
287
|
rounded: null,
|
|
279
|
-
className:
|
|
288
|
+
className: p(u.spinnerIncrease({ c: n })),
|
|
280
289
|
icon: "caret-alt-up",
|
|
281
290
|
svgIcon: _,
|
|
282
|
-
"aria-label":
|
|
283
|
-
title:
|
|
291
|
+
"aria-label": h.toLanguageString(g, f[g]),
|
|
292
|
+
title: h.toLanguageString(g, f[g]),
|
|
284
293
|
onClick: this.increasePart
|
|
285
294
|
}
|
|
286
295
|
),
|
|
287
|
-
/* @__PURE__ */
|
|
288
|
-
|
|
296
|
+
/* @__PURE__ */ l.createElement(
|
|
297
|
+
I,
|
|
289
298
|
{
|
|
290
299
|
tabIndex: -1,
|
|
291
300
|
type: "button",
|
|
292
301
|
rounded: null,
|
|
293
|
-
className:
|
|
302
|
+
className: p(u.spinnerDecrease({ c: n })),
|
|
294
303
|
icon: "caret-alt-down",
|
|
295
304
|
svgIcon: V,
|
|
296
|
-
"aria-label":
|
|
297
|
-
title:
|
|
305
|
+
"aria-label": h.toLanguageString(v, f[v]),
|
|
306
|
+
title: h.toLanguageString(v, f[v]),
|
|
298
307
|
onClick: this.decreasePart
|
|
299
308
|
}
|
|
300
309
|
)
|
|
301
310
|
)
|
|
302
311
|
);
|
|
303
|
-
return
|
|
312
|
+
return d ? /* @__PURE__ */ l.createElement(
|
|
304
313
|
j,
|
|
305
314
|
{
|
|
306
|
-
label:
|
|
307
|
-
editorId:
|
|
308
|
-
editorValue: (
|
|
309
|
-
editorValid:
|
|
315
|
+
label: d,
|
|
316
|
+
editorId: C,
|
|
317
|
+
editorValue: (k = this._element) == null ? void 0 : k.value,
|
|
318
|
+
editorValid: O,
|
|
310
319
|
editorDisabled: this.props.disabled,
|
|
311
|
-
children:
|
|
320
|
+
children: E,
|
|
312
321
|
style: { width: this.props.width }
|
|
313
322
|
}
|
|
314
|
-
) :
|
|
323
|
+
) : E;
|
|
315
324
|
}
|
|
316
325
|
/**
|
|
317
326
|
* @hidden
|
|
318
327
|
*/
|
|
319
328
|
intl() {
|
|
320
|
-
return
|
|
329
|
+
return x(this);
|
|
321
330
|
}
|
|
322
331
|
get intlCommon() {
|
|
323
332
|
return this.intlProvider();
|
|
@@ -346,7 +355,7 @@ const te = "Please enter a valid value!", n = class n extends r.Component {
|
|
|
346
355
|
});
|
|
347
356
|
}
|
|
348
357
|
};
|
|
349
|
-
|
|
358
|
+
a.displayName = "DateInput", a.propTypes = {
|
|
350
359
|
value: e.instanceOf(Date),
|
|
351
360
|
format: e.oneOfType([
|
|
352
361
|
e.string,
|
|
@@ -418,37 +427,42 @@ n.displayName = "DateInput", n.propTypes = {
|
|
|
418
427
|
rounded: e.oneOf([null, "small", "medium", "large", "full"]),
|
|
419
428
|
fillMode: e.oneOf([null, "solid", "flat", "outline"]),
|
|
420
429
|
autoFocus: e.bool
|
|
421
|
-
},
|
|
430
|
+
}, a.defaultProps = {
|
|
422
431
|
format: K,
|
|
423
432
|
size: "medium",
|
|
424
433
|
rounded: "medium",
|
|
425
434
|
fillMode: "solid",
|
|
426
|
-
formatPlaceholder:
|
|
435
|
+
formatPlaceholder: S,
|
|
427
436
|
spinners: !1,
|
|
428
437
|
disabled: !1,
|
|
429
|
-
max:
|
|
430
|
-
min:
|
|
431
|
-
minTime:
|
|
432
|
-
maxTime:
|
|
438
|
+
max: c(Y),
|
|
439
|
+
min: c(G),
|
|
440
|
+
minTime: c(Z),
|
|
441
|
+
maxTime: c($),
|
|
433
442
|
validityStyles: !0,
|
|
434
443
|
validationMessage: te,
|
|
435
444
|
placeholder: null,
|
|
445
|
+
enableMouseWheel: !0,
|
|
446
|
+
autoCorrectParts: !0,
|
|
447
|
+
autoSwitchParts: !0,
|
|
448
|
+
allowCaretMode: !1,
|
|
449
|
+
twoDigitYearMax: 68,
|
|
436
450
|
// the rest of the properties are undefined by default
|
|
437
451
|
ariaHasPopup: "grid",
|
|
438
452
|
autoFocus: !1
|
|
439
453
|
};
|
|
440
|
-
let
|
|
454
|
+
let m = a;
|
|
441
455
|
const ie = B(), se = R(
|
|
442
456
|
U(
|
|
443
457
|
ie,
|
|
444
|
-
z(
|
|
458
|
+
z(m)
|
|
445
459
|
)
|
|
446
460
|
);
|
|
447
461
|
se.displayName = "KendoReactDateInput";
|
|
448
|
-
F(
|
|
449
|
-
N(
|
|
462
|
+
F(m);
|
|
463
|
+
N(m);
|
|
450
464
|
export {
|
|
451
465
|
se as DateInput,
|
|
452
466
|
ie as DateInputPropsContext,
|
|
453
|
-
|
|
467
|
+
m as DateInputWithoutContext
|
|
454
468
|
};
|
package/datepicker/DatePicker.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 W=require("react"),e=require("prop-types"),U=require("@progress/kendo-react-popup"),I=require("@progress/kendo-date-math"),a=require("@progress/kendo-react-common"),j=require("@progress/kendo-svg-icons"),$=require("../package-metadata.js"),H=require("../dateinput/DateInput.js"),X=require("../calendar/components/Calendar.js"),m=require("../utils.js"),k=require("../messages/index.js"),q=require("@progress/kendo-react-intl"),Z=require("./ToggleButton.js"),G=require("../common/PickerWrap.js"),J=require("../hooks/usePickerFloatingLabel.js"),Q=require("@progress/kendo-react-layout"),Y=require("../common/AdaptiveMode.js"),ee=require("../common/constants.js");function te(l){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const t in l)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(l,t);Object.defineProperty(s,t,i.get?i:{enumerable:!0,get:()=>l[t]})}}return s.default=l,Object.freeze(s)}const r=te(W),o=class o extends r.Component{constructor(s){super(s),this._element=null,this._dateInput=r.createRef(),this._calendar=null,this.shouldFocusDateInput=!1,this.prevShow=!1,this.focus=()=>{this.dateInput&&this.dateInput.focus()},this.setCalendarRef=t=>{this._calendar=t},this.nextValue=(t,i)=>t.value!==void 0?t.value:i.value,this.nextShow=(t,i)=>t.show!==void 0?t.show:i.show,this.renderPopup=()=>{const{disabled:t,min:i,max:n,weekNumber:g,focusedDate:f,popupSettings:d}=this.props,{popupClass:v,...w}=d,b=this.show,h=this.value,y=h&&I.getDate(h),p=a.classNames(v),D={popupClass:"k-datepicker-popup",show:b,anchor:this._element,className:p,id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...w,onMouseDownOutside:this.handleMouseDownOutside},c={disabled:t,value:y,min:i,max:n,weekNumber:g,focusedDate:f,className:this.mobileMode?"k-calendar-lg":"",navigation:!this.mobileMode,onChange:this.handleCalendarValueChange};return this.mobileMode?r.createElement(this.calendarComp,{_ref:this.setCalendarRef,...c}):r.createElement(this.popupComp,{...D},r.createElement(this.calendarComp,{_ref:this.setCalendarRef,...c}))},this.renderAdaptivePopup=()=>{const{windowWidth:t=0}=this.state,i={expand:this.show,onClose:this.handleBlur,adaptiveTitle:this.props.adaptiveTitle,windowWidth:t};return r.createElement(Y.AdaptiveMode,{...i},r.createElement(Q.ActionSheetContent,{overflowHidden:!0},this.renderPopup()))},this.handleInputValueChange=t=>{this.handleValueChange(t.value,t)},this.handleCalendarValueChange=t=>{const i=this.mergeTime(t.value);this.handleValueChange(i,t)},this.handleValueChange=(t,i)=>{this.setState({value:I.cloneDate(t||void 0)}),this.valueDuringOnChange=t,this.showDuringOnChange=!1,this.mobileMode||(this.shouldFocusDateInput=!0);const{onChange:n}=this.props;n&&n.call(void 0,{syntheticEvent:i.syntheticEvent,nativeEvent:i.nativeEvent,value:this.value,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.togglePopup=()=>{this.setShow(!this.show)},this.handleMouseDownOutside=t=>{var i;(i=this.props.popupSettings)!=null&&i.onMouseDownOutside&&this.props.popupSettings.onMouseDownOutside.call(void 0,t)},this.handleIconClick=()=>{this.props.disabled||(this.shouldFocusDateInput=!0,this.setShow(!this.show))},this.handleIconMouseDown=t=>{t.preventDefault()},this.handleKeyDown=t=>{const{altKey:i,keyCode:n}=t;if(n===a.Keys.esc&&this.show){this.shouldFocusDateInput=!0,this.setShow(!1);return}i&&(n===a.Keys.up||n===a.Keys.down)&&(t.preventDefault(),t.stopPropagation(),this.shouldFocusDateInput=n===a.Keys.up,this.setShow(n===a.Keys.down))},a.validatePackage($.packageMetadata),this.state={value:this.props.defaultValue||o.defaultProps.defaultValue,show:this.props.defaultShow||o.defaultProps.defaultShow,focused:!1}}get _popupId(){return this.props.id+"-popup-id"}get document(){if(a.canUseDOM)return this.element&&this.element.ownerDocument||document}get element(){return this._element}get mobileMode(){return!!(this.state.windowWidth&&this.state.windowWidth<=ee.MOBILE_MEDIUM_DEVISE&&this.props.adaptive)}get dateInput(){return this._dateInput.current}get calendar(){return this._calendar}get value(){const s=this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value;return s!==null?I.cloneDate(s):null}get show(){return this.showDuringOnChange!==void 0?this.showDuringOnChange:this.props.show!==void 0?this.props.show:this.state.show}get name(){return this.props.name}get min(){return this.props.min!==void 0?this.props.min:o.defaultProps.min}get max(){return this.props.max!==void 0?this.props.max:o.defaultProps.max}get dateInputComp(){return this.props.dateInput||o.defaultProps.dateInput}get toggleButtonComp(){return this.props.toggleButton||o.defaultProps.toggleButton}get calendarComp(){return this.props.calendar||o.defaultProps.calendar}get popupComp(){return this.props.popup||o.defaultProps.popup}get pickerWrapComp(){return this.props.pickerWrap||o.defaultProps.pickerWrap}get validity(){const s=m.isInDateRange(this.value,this.min,this.max),t=this.props.validationMessage!==void 0,i=(!this.required||this.value!==null)&&s,n=this.props.valid!==void 0?this.props.valid:i;return{customError:t,rangeOverflow:this.value&&this.max.getTime()<this.value.getTime()||!1,rangeUnderflow:this.value&&this.value.getTime()<this.min.getTime()||!1,valid:n,valueMissing:this.value===null}}get validityStyles(){return this.props.validityStyles!==void 0?this.props.validityStyles:o.defaultProps.validityStyles}get required(){return this.props.required!==void 0?this.props.required:!1}componentDidMount(){var s;this.observerResize=a.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.show&&this.forceUpdate(),(s=this.document)!=null&&s.body&&this.observerResize&&this.observerResize.observe(this.document.body)}componentDidUpdate(){this._calendar&&this._calendar.element&&this.show&&!this.prevShow&&this._calendar.element.focus({preventScroll:!0}),this.dateInput&&this.dateInput.element&&!this.show&&this.shouldFocusDateInput&&this.dateInput.element.focus({preventScroll:!0}),this.prevShow=this.show,this.shouldFocusDateInput=!1}componentWillUnmount(){var s;clearTimeout(this.nextTickId),(s=this.document)!=null&&s.body&&this.observerResize&&this.observerResize.disconnect()}render(){const{size:s=o.defaultProps.size,rounded:t=o.defaultProps.rounded,fillMode:i=o.defaultProps.fillMode,disabled:n,tabIndex:g,title:f,id:d,format:v,formatPlaceholder:w,min:b,max:h,className:y,width:p,name:D,validationMessage:c,required:E,validityStyles:F,ariaLabelledBy:R,ariaDescribedBy:z,ariaLabel:V,placeholder:N,label:C,popupSettings:se,defaultValue:ie,defaultShow:oe,value:ne,popup:ae,weekNumber:re,dateInput:le,calendar:ue,toggleButton:de,onChange:he,onBlur:pe,onFocus:ce,show:me,onOpen:ge,pickerWrap:fe,adaptive:ve,adaptiveTitle:we,valid:be,autoFocus:A,visited:ye,touched:De,modified:Ce,...O}=this.props,L=this.value,M=!this.validityStyles||this.validity.valid,_={disabled:n,format:v,formatPlaceholder:w,id:d,ariaLabelledBy:R,ariaDescribedBy:z,ariaLabel:V,max:h,min:b,name:D,onChange:this.handleInputValueChange,required:E,tabIndex:this.show?-1:g,title:f,valid:this.validity.valid,validationMessage:c,validityStyles:F,value:L,label:void 0,placeholder:this.state.focused?null:N,ariaExpanded:this.show,size:null,fillMode:null,rounded:null},S=q.provideLocalizationService(this).toLanguageString(k.toggleCalendar,k.messages[k.toggleCalendar]),P=r.createElement(a.AsyncFocusBlur,{onFocus:this.handleFocus,onBlur:this.mobileMode?void 0:this.handleBlur,onSyncBlur:this.props.onBlur,onSyncFocus:this.props.onFocus},T=>r.createElement(r.Fragment,null,r.createElement("span",{...C?{}:O,ref:K=>{this._element=K},className:a.classNames("k-input","k-datepicker",{[`k-input-${a.kendoThemeMaps.sizeMap[s]||s}`]:s,[`k-rounded-${a.kendoThemeMaps.roundedMap[t]||t}`]:t,[`k-input-${i}`]:i,"k-invalid":!M,"k-required":this.required,"k-disabled":n},y),onKeyDown:this.handleKeyDown,style:{width:p},onFocus:T.onFocus,onBlur:T.onBlur,onClick:this.mobileMode?this.handleIconClick:void 0},r.createElement(this.dateInputComp,{_ref:this._dateInput,ariaRole:"combobox",readonly:this.mobileMode,ariaExpanded:this.show,ariaControls:this._popupId,autoFocus:A,..._}),r.createElement(this.toggleButtonComp,{type:"button",icon:"calendar",svgIcon:j.calendarIcon,title:S,className:"k-input-button",rounded:null,onClick:this.mobileMode?void 0:this.handleIconClick,"aria-label":S,fillMode:i,onMouseDown:this.handleIconMouseDown}),!this.mobileMode&&this.renderPopup()),this.mobileMode&&this.renderAdaptivePopup()));return C?r.createElement(J.PickerFloatingLabel,{dateInput:this._dateInput,label:C,editorId:d,editorValid:M,editorDisabled:n,children:P,style:{width:p},...O}):P}setShow(s){const{onOpen:t,onClose:i}=this.props;this.show!==s&&(this.setState({show:s}),s&&t&&t.call(void 0,{target:this}),!s&&i&&i.call(void 0,{target:this}))}mergeTime(s){return this.value&&s?m.setTime(s,this.value):s}nextTick(s){clearTimeout(this.nextTickId),this.nextTickId=window.setTimeout(()=>s())}calculateMedia(s){for(const t of s)this.setState({windowWidth:t.target.clientWidth})}};o.displayName="DatePicker",o.propTypes={className:e.string,defaultShow:e.bool,defaultValue:e.instanceOf(Date),disabled:e.bool,focusedDate: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})]),id:e.string,ariaLabelledBy:e.string,ariaDescribedBy:e.string,ariaLabel: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,tabIndex:e.number,title:e.string,value:e.instanceOf(Date),weekNumber:e.bool,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"]),adaptive:e.bool,adaptiveTitle:e.string,autoFocus:e.bool},o.defaultProps={defaultShow:!1,defaultValue:null,dateInput:H.DateInput,calendar:X.Calendar,toggleButton:Z.ToggleButton,popup:U.Popup,pickerWrap:G.PickerWrap,disabled:!1,format:"d",max:m.MAX_DATE,min:m.MIN_DATE,popupSettings:{},tabIndex:0,weekNumber:!1,validityStyles:!0,size:"medium",rounded:"medium",fillMode:"solid",autoFocus:!1};let u=o;const x=a.createPropsContext(),B=a.withIdHOC(a.withPropsContext(x,u));B.displayName="KendoReactDatePicker";q.registerForLocalization(u);exports.DatePicker=B;exports.DatePickerPropsContext=x;exports.DatePickerWithoutContext=u;
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Z=require("react"),e=require("prop-types"),G=require("@progress/kendo-react-popup"),I=require("@progress/kendo-date-math"),n=require("@progress/kendo-react-common"),J=require("@progress/kendo-svg-icons"),Q=require("../package-metadata.js"),ee=require("../dateinput/DateInput.js"),te=require("../calendar/components/Calendar.js"),m=require("../utils.js"),k=require("../messages/index.js"),q=require("@progress/kendo-react-intl"),se=require("./ToggleButton.js"),ie=require("../common/PickerWrap.js"),oe=require("../hooks/usePickerFloatingLabel.js"),ae=require("@progress/kendo-react-layout"),ne=require("../common/AdaptiveMode.js"),re=require("../common/constants.js");function le(l){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const t in l)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(l,t);Object.defineProperty(s,t,i.get?i:{enumerable:!0,get:()=>l[t]})}}return s.default=l,Object.freeze(s)}const r=le(Z),o=class o extends r.Component{constructor(s){super(s),this._element=null,this._dateInput=r.createRef(),this._calendar=null,this.shouldFocusDateInput=!1,this.prevShow=!1,this.focus=()=>{this.dateInput&&this.dateInput.focus()},this.setCalendarRef=t=>{this._calendar=t},this.nextValue=(t,i)=>t.value!==void 0?t.value:i.value,this.nextShow=(t,i)=>t.show!==void 0?t.show:i.show,this.renderPopup=()=>{const{disabled:t,min:i,max:a,weekNumber:g,focusedDate:f,popupSettings:d}=this.props,{popupClass:v,...w}=d,b=this.show,h=this.value,y=h&&I.getDate(h),p=n.classNames(v),D={popupClass:"k-datepicker-popup",show:b,anchor:this._element,className:p,id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...w,onMouseDownOutside:this.handleMouseDownOutside},c={disabled:t,value:y,min:i,max:a,weekNumber:g,focusedDate:f,className:this.mobileMode?"k-calendar-lg":"",navigation:!this.mobileMode,onChange:this.handleCalendarValueChange};return this.mobileMode?r.createElement(this.calendarComp,{_ref:this.setCalendarRef,...c}):r.createElement(this.popupComp,{...D},r.createElement(this.calendarComp,{_ref:this.setCalendarRef,...c}))},this.renderAdaptivePopup=()=>{const{windowWidth:t=0}=this.state,i={expand:this.show,onClose:this.handleBlur,adaptiveTitle:this.props.adaptiveTitle,windowWidth:t};return r.createElement(ne.AdaptiveMode,{...i},r.createElement(ae.ActionSheetContent,{overflowHidden:!0},this.renderPopup()))},this.handleInputValueChange=t=>{this.handleValueChange(t.value,t)},this.handleCalendarValueChange=t=>{const i=this.mergeTime(t.value);this.handleValueChange(i,t)},this.handleValueChange=(t,i)=>{this.setState({value:I.cloneDate(t||void 0)}),this.valueDuringOnChange=t,this.showDuringOnChange=!1,this.mobileMode||(this.shouldFocusDateInput=!0);const{onChange:a}=this.props;a&&a.call(void 0,{syntheticEvent:i.syntheticEvent,nativeEvent:i.nativeEvent,value:this.value,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.togglePopup=()=>{this.setShow(!this.show)},this.handleMouseDownOutside=t=>{var i;(i=this.props.popupSettings)!=null&&i.onMouseDownOutside&&this.props.popupSettings.onMouseDownOutside.call(void 0,t)},this.handleIconClick=()=>{this.props.disabled||(this.shouldFocusDateInput=!0,this.setShow(!this.show))},this.handleIconMouseDown=t=>{t.preventDefault()},this.handleKeyDown=t=>{const{altKey:i,keyCode:a}=t;if(a===n.Keys.esc&&this.show){this.shouldFocusDateInput=!0,this.setShow(!1);return}i&&(a===n.Keys.up||a===n.Keys.down)&&(t.preventDefault(),t.stopPropagation(),this.shouldFocusDateInput=a===n.Keys.up,this.setShow(a===n.Keys.down))},n.validatePackage(Q.packageMetadata),this.state={value:this.props.defaultValue||o.defaultProps.defaultValue,show:this.props.defaultShow||o.defaultProps.defaultShow,focused:!1}}get _popupId(){return this.props.id+"-popup-id"}get document(){if(n.canUseDOM)return this.element&&this.element.ownerDocument||document}get element(){return this._element}get mobileMode(){return!!(this.state.windowWidth&&this.state.windowWidth<=re.MOBILE_MEDIUM_DEVISE&&this.props.adaptive)}get dateInput(){return this._dateInput.current}get calendar(){return this._calendar}get value(){const s=this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value;return s!==null?I.cloneDate(s):null}get show(){return this.showDuringOnChange!==void 0?this.showDuringOnChange:this.props.show!==void 0?this.props.show:this.state.show}get name(){return this.props.name}get min(){return this.props.min!==void 0?this.props.min:o.defaultProps.min}get max(){return this.props.max!==void 0?this.props.max:o.defaultProps.max}get dateInputComp(){return this.props.dateInput||o.defaultProps.dateInput}get toggleButtonComp(){return this.props.toggleButton||o.defaultProps.toggleButton}get calendarComp(){return this.props.calendar||o.defaultProps.calendar}get popupComp(){return this.props.popup||o.defaultProps.popup}get pickerWrapComp(){return this.props.pickerWrap||o.defaultProps.pickerWrap}get validity(){const s=m.isInDateRange(this.value,this.min,this.max),t=this.props.validationMessage!==void 0,i=(!this.required||this.value!==null)&&s,a=this.props.valid!==void 0?this.props.valid:i;return{customError:t,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 validityStyles(){return this.props.validityStyles!==void 0?this.props.validityStyles:o.defaultProps.validityStyles}get required(){return this.props.required!==void 0?this.props.required:!1}componentDidMount(){var s;this.observerResize=n.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.show&&this.forceUpdate(),(s=this.document)!=null&&s.body&&this.observerResize&&this.observerResize.observe(this.document.body)}componentDidUpdate(){this._calendar&&this._calendar.element&&this.show&&!this.prevShow&&this._calendar.element.focus({preventScroll:!0}),this.dateInput&&this.dateInput.element&&!this.show&&this.shouldFocusDateInput&&this.dateInput.element.focus({preventScroll:!0}),this.prevShow=this.show,this.shouldFocusDateInput=!1}componentWillUnmount(){var s;clearTimeout(this.nextTickId),(s=this.document)!=null&&s.body&&this.observerResize&&this.observerResize.disconnect()}render(){const{size:s=o.defaultProps.size,rounded:t=o.defaultProps.rounded,fillMode:i=o.defaultProps.fillMode,disabled:a,tabIndex:g,title:f,id:d,format:v,formatPlaceholder:w,min:b,max:h,className:y,width:p,name:D,validationMessage:c,required:E,validityStyles:F,ariaLabelledBy:R,ariaDescribedBy:z,ariaLabel:V,placeholder:N,label:C,popupSettings:ue,defaultValue:de,defaultShow:he,value:pe,popup:ce,weekNumber:me,dateInput:ge,calendar:fe,toggleButton:ve,onChange:we,onBlur:be,onFocus:ye,show:De,onOpen:Ce,pickerWrap:Ie,adaptive:ke,adaptiveTitle:Me,valid:Oe,autoFocus:A,visited:Se,touched:Pe,modified:Te,autoFill:K,twoDigitYearMax:L,enableMouseWheel:W,autoCorrectParts:_,autoSwitchParts:U,autoSwitchKeys:j,allowCaretMode:$,...M}=this.props,H=this.value,O=!this.validityStyles||this.validity.valid,X={disabled:a,format:v,formatPlaceholder:w,id:d,ariaLabelledBy:R,ariaDescribedBy:z,ariaLabel:V,max:h,min:b,name:D,onChange:this.handleInputValueChange,required:E,tabIndex:this.show?-1:g,title:f,valid:this.validity.valid,validationMessage:c,validityStyles:F,value:H,label:void 0,placeholder:this.state.focused?null:N,ariaExpanded:this.show,size:null,fillMode:null,rounded:null,autoFill:K,twoDigitYearMax:L,enableMouseWheel:W,autoCorrectParts:_,autoSwitchParts:U,autoSwitchKeys:j,allowCaretMode:$},S=q.provideLocalizationService(this).toLanguageString(k.toggleCalendar,k.messages[k.toggleCalendar]),P=r.createElement(n.AsyncFocusBlur,{onFocus:this.handleFocus,onBlur:this.mobileMode?void 0:this.handleBlur,onSyncBlur:this.props.onBlur,onSyncFocus:this.props.onFocus},T=>r.createElement(r.Fragment,null,r.createElement("span",{...C?{}:M,ref:Y=>{this._element=Y},className:n.classNames("k-input","k-datepicker",{[`k-input-${n.kendoThemeMaps.sizeMap[s]||s}`]:s,[`k-rounded-${n.kendoThemeMaps.roundedMap[t]||t}`]:t,[`k-input-${i}`]:i,"k-invalid":!O,"k-required":this.required,"k-disabled":a},y),onKeyDown:this.handleKeyDown,style:{width:p},onFocus:T.onFocus,onBlur:T.onBlur,onClick:this.mobileMode?this.handleIconClick:void 0},r.createElement(this.dateInputComp,{_ref:this._dateInput,ariaRole:"combobox",readonly:this.mobileMode,ariaExpanded:this.show,ariaControls:this._popupId,autoFocus:A,...X}),r.createElement(this.toggleButtonComp,{type:"button",icon:"calendar",svgIcon:J.calendarIcon,title:S,className:"k-input-button",rounded:null,onClick:this.mobileMode?void 0:this.handleIconClick,"aria-label":S,fillMode:i,onMouseDown:this.handleIconMouseDown}),!this.mobileMode&&this.renderPopup()),this.mobileMode&&this.renderAdaptivePopup()));return C?r.createElement(oe.PickerFloatingLabel,{dateInput:this._dateInput,label:C,editorId:d,editorValid:O,editorDisabled:a,children:P,style:{width:p},...M}):P}setShow(s){const{onOpen:t,onClose:i}=this.props;this.show!==s&&(this.setState({show:s}),s&&t&&t.call(void 0,{target:this}),!s&&i&&i.call(void 0,{target:this}))}mergeTime(s){return this.value&&s?m.setTime(s,this.value):s}nextTick(s){clearTimeout(this.nextTickId),this.nextTickId=window.setTimeout(()=>s())}calculateMedia(s){for(const t of s)this.setState({windowWidth:t.target.clientWidth})}};o.displayName="DatePicker",o.propTypes={className:e.string,defaultShow:e.bool,defaultValue:e.instanceOf(Date),disabled:e.bool,focusedDate: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})]),id:e.string,ariaLabelledBy:e.string,ariaDescribedBy:e.string,ariaLabel: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,tabIndex:e.number,title:e.string,value:e.instanceOf(Date),weekNumber:e.bool,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"]),adaptive:e.bool,adaptiveTitle:e.string,autoFocus:e.bool},o.defaultProps={defaultShow:!1,defaultValue:null,dateInput:ee.DateInput,calendar:te.Calendar,toggleButton:se.ToggleButton,popup:G.Popup,pickerWrap:ie.PickerWrap,disabled:!1,format:"d",max:m.MAX_DATE,min:m.MIN_DATE,popupSettings:{},tabIndex:0,weekNumber:!1,validityStyles:!0,size:"medium",rounded:"medium",fillMode:"solid",autoFocus:!1};let u=o;const x=n.createPropsContext(),B=n.withIdHOC(n.withPropsContext(x,u));B.displayName="KendoReactDatePicker";q.registerForLocalization(u);exports.DatePicker=B;exports.DatePickerPropsContext=x;exports.DatePickerWithoutContext=u;
|