@progress/kendo-react-dateinputs 15.1.1-develop.3 → 15.2.0-develop.2
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/Calendar.js +1 -1
- package/calendar/components/Calendar.mjs +1 -1
- package/calendar/components/CalendarHeaderTitle.js +1 -1
- package/calendar/components/CalendarHeaderTitle.mjs +17 -5
- package/calendar/components/HorizontalViewList.js +1 -1
- package/calendar/components/HorizontalViewList.mjs +29 -29
- package/calendar/components/MultiViewCalendar.js +1 -1
- package/calendar/components/MultiViewCalendar.mjs +131 -128
- package/calendar/components/TodayCommand.js +1 -1
- package/calendar/components/TodayCommand.mjs +21 -32
- package/calendar/components/View.js +1 -1
- package/calendar/components/View.mjs +66 -66
- package/calendar/components/ViewList.js +1 -1
- package/calendar/components/ViewList.mjs +135 -125
- package/calendar/models/WeekDaysFormat.d.ts +1 -1
- package/common/AdaptiveMode.js +1 -1
- package/common/AdaptiveMode.mjs +30 -31
- package/dateinput/DateInput.js +1 -1
- package/dateinput/DateInput.mjs +35 -36
- package/datepicker/DatePicker.js +1 -1
- package/datepicker/DatePicker.mjs +184 -183
- package/daterangepicker/DateRangePicker.js +1 -1
- package/daterangepicker/DateRangePicker.mjs +61 -63
- package/datetimepicker/DateTimePicker.d.ts +1 -0
- package/datetimepicker/DateTimePicker.js +1 -1
- package/datetimepicker/DateTimePicker.mjs +117 -118
- package/datetimepicker/models/DateTimePickerSettings.d.ts +7 -0
- package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
- package/messages/index.d.ts +5 -0
- package/messages/index.js +1 -1
- package/messages/index.mjs +46 -44
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +9 -9
- package/timepicker/TimeList.js +2 -2
- package/timepicker/TimeList.mjs +51 -47
- package/timepicker/TimePart.js +1 -1
- package/timepicker/TimePart.mjs +57 -68
- package/timepicker/TimePicker.d.ts +8 -0
- package/timepicker/TimePicker.js +1 -1
- package/timepicker/TimePicker.mjs +122 -118
- package/timepicker/TimeSelector.js +1 -1
- package/timepicker/TimeSelector.mjs +56 -57
- package/timepicker/models/TimePickerSettings.d.ts +7 -0
package/common/AdaptiveMode.mjs
CHANGED
|
@@ -6,57 +6,57 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as t from "react";
|
|
9
|
-
import { ActionSheet as
|
|
10
|
-
import { checkIcon as
|
|
9
|
+
import { ActionSheet as v, ActionSheetFooter as C } from "@progress/kendo-react-layout";
|
|
10
|
+
import { checkIcon as g } from "@progress/kendo-svg-icons";
|
|
11
11
|
import { Button as o } from "@progress/kendo-react-buttons";
|
|
12
|
-
import { useAdaptiveModeContext as
|
|
13
|
-
const
|
|
12
|
+
import { useAdaptiveModeContext as y } from "@progress/kendo-react-common";
|
|
13
|
+
const T = (i) => {
|
|
14
14
|
const {
|
|
15
15
|
footer: e,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
id: r,
|
|
17
|
+
windowWidth: n = 0,
|
|
18
|
+
mobileFilter: c,
|
|
18
19
|
children: s,
|
|
19
|
-
navigatable:
|
|
20
|
-
navigatableElements:
|
|
20
|
+
navigatable: m,
|
|
21
|
+
navigatableElements: p,
|
|
21
22
|
expand: d,
|
|
22
|
-
animation:
|
|
23
|
-
title:
|
|
24
|
-
subTitle:
|
|
25
|
-
onClose:
|
|
26
|
-
} =
|
|
23
|
+
animation: b,
|
|
24
|
+
title: f,
|
|
25
|
+
subTitle: h,
|
|
26
|
+
onClose: l
|
|
27
|
+
} = i, u = () => /* @__PURE__ */ t.createElement(
|
|
27
28
|
o,
|
|
28
29
|
{
|
|
29
30
|
tabIndex: 0,
|
|
30
31
|
"aria-label": "Cancel",
|
|
31
|
-
"aria-disabled": "false",
|
|
32
32
|
type: "button",
|
|
33
33
|
fillMode: "flat",
|
|
34
34
|
size: "large",
|
|
35
35
|
themeColor: "primary",
|
|
36
|
-
svgIcon:
|
|
37
|
-
onClick:
|
|
36
|
+
svgIcon: g,
|
|
37
|
+
onClick: l
|
|
38
38
|
}
|
|
39
|
-
), a =
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
), a = y(), x = {
|
|
40
|
+
id: r,
|
|
41
|
+
navigatable: m || !1,
|
|
42
|
+
navigatableElements: p || [],
|
|
42
43
|
expand: d,
|
|
43
|
-
animation:
|
|
44
|
-
suffixActions:
|
|
45
|
-
filter:
|
|
46
|
-
onClose:
|
|
47
|
-
animationStyles: a &&
|
|
48
|
-
title:
|
|
49
|
-
subTitle:
|
|
44
|
+
animation: b !== !1,
|
|
45
|
+
suffixActions: u(),
|
|
46
|
+
filter: c,
|
|
47
|
+
onClose: l,
|
|
48
|
+
animationStyles: a && n <= a.small ? { top: 0, width: "100%", height: "100%" } : void 0,
|
|
49
|
+
title: f,
|
|
50
|
+
subTitle: h,
|
|
50
51
|
className: "k-adaptive-actionsheet",
|
|
51
|
-
position: a &&
|
|
52
|
+
position: a && n <= a.small ? "fullscreen" : void 0
|
|
52
53
|
};
|
|
53
|
-
return /* @__PURE__ */ t.createElement(
|
|
54
|
+
return /* @__PURE__ */ t.createElement(v, { ...x }, s, e && /* @__PURE__ */ t.createElement(C, null, /* @__PURE__ */ t.createElement(
|
|
54
55
|
o,
|
|
55
56
|
{
|
|
56
57
|
size: "large",
|
|
57
58
|
tabIndex: 0,
|
|
58
59
|
"aria-label": e.cancelText,
|
|
59
|
-
"aria-disabled": "false",
|
|
60
60
|
type: "button",
|
|
61
61
|
onClick: e.onCancel
|
|
62
62
|
},
|
|
@@ -68,7 +68,6 @@ const I = (n) => {
|
|
|
68
68
|
themeColor: "primary",
|
|
69
69
|
size: "large",
|
|
70
70
|
"aria-label": e.applyText,
|
|
71
|
-
"aria-disabled": "false",
|
|
72
71
|
type: "button",
|
|
73
72
|
onClick: e.onApply
|
|
74
73
|
},
|
|
@@ -76,5 +75,5 @@ const I = (n) => {
|
|
|
76
75
|
)));
|
|
77
76
|
};
|
|
78
77
|
export {
|
|
79
|
-
|
|
78
|
+
T as AdaptiveMode
|
|
80
79
|
};
|
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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Fe=require("react"),t=require("prop-types"),E=require("@progress/kendo-date-math"),re=require("@progress/kendo-react-buttons"),le=require("@progress/kendo-svg-icons"),ue=require("@progress/kendo-react-intl"),o=require("@progress/kendo-react-common"),He=require("@progress/kendo-react-labels"),ze=require("@progress/kendo-dateinputs-common"),B=require("./utils.js"),i=require("../utils.js"),c=require("../messages/index.js"),Ke=require("../timepicker/utils.js"),Ue=require("../common/ClearButton.js"),We=require("./dateInputIntl.js");function Je(e){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const g in e)if(g!=="default"){const C=Object.getOwnPropertyDescriptor(e,g);Object.defineProperty(d,g,C.get?C:{enumerable:!0,get:()=>e[g]})}}return d.default=e,Object.freeze(d)}const a=Je(Fe),Ye="Please enter a valid value!";function ie(e,d){var ne,ae;const g=o.useId(e.id),C=ue.useInternationalization(),x=ue.useLocalization(),se=o.useUnstyled(),H=o.usePropsContext(j,e).unstyled||se,{format:p=u.format,defaultValue:ce=u.defaultValue,size:de=u.size,rounded:fe=u.rounded,fillMode:me=u.fillMode,formatPlaceholder:ge=u.formatPlaceholder,spinners:ve=u.spinners,disabled:w=u.disabled,min:be=u.min,max:ye=u.max,minTime:he=u.minTime,maxTime:Ie=u.maxTime,validityStyles:De=u.validityStyles,validationMessage:z=u.validationMessage,placeholder:y=u.placeholder,enableMouseWheel:Oe=u.enableMouseWheel,autoCorrectParts:Ee=u.autoCorrectParts,autoSwitchParts:Ce=u.autoSwitchParts,allowCaretMode:xe=u.allowCaretMode,twoDigitYearMax:we=u.twoDigitYearMax,ariaHasPopup:Te=u.ariaHasPopup,autoFocus:h=u.autoFocus}=o.usePropsContext(j,e),T=n=>{Ae(r=>({...r,...n}))},v=()=>q.value?q.value:R.current!==void 0?R.current:l.current&&l.current.value,K=()=>{const n=l.current&&l.current.currentText||"",r=v();return y!=null&&!q.focused&&!r?y:n},U=()=>e.required!==void 0?e.required:!1,V=()=>{const n=v()||e.value,r=be,O=ye,k=B.isInRange(n,r,O)&&Ke.isInTimeRange(n,he,Ie),A=z!==void 0,_=(!U()||n!=null)&&k,je=e.valid!==void 0?e.valid:_;return{customError:A,rangeOverflow:n&&O.getTime()<n.getTime()||!1,rangeUnderflow:n&&n.getTime()<r.getTime()||!1,valid:je,valueMissing:n===null}},Se=()=>{s.current&&s.current.focus()},W=()=>new We.DateInputIntl(C),S=()=>{const n=v();return{format:p,steps:e.steps,formatPlaceholder:ge,placeholder:y,selectPreviousSegmentOnBackspace:!0,value:e.value!==void 0?e.value:n,intlService:W(),autoFill:e.autoFill!==void 0?e.autoFill:!1,enableMouseWheel:Oe,autoCorrectParts:Ee,autoSwitchParts:Ce,autoSwitchKeys:e.autoSwitchKeys||[],twoDigitYearMax:we,allowCaretMode:xe}},Me=n=>{f.current&&f.current.classList.add("k-focus"),T({focused:!0}),h&&$(!0)},Pe=n=>{f.current&&f.current.classList.remove("k-focus"),T({focused:!1})},Re=(n,r)=>typeof n!=typeof r?!0:typeof n=="string"&&typeof r=="string"?n!==r:typeof n=="object"&&typeof r=="object"?JSON.stringify(n)!==JSON.stringify(r):!1,pe=n=>typeof n=="string"?n:{inputFormat:n,displayFormat:n},J=n=>{R.current=v(),e.value===void 0&&T({value:n.value!==void 0?n.value:null}),_e(),b.current=n,R.current=void 0},Y=n=>{e.onChange&&e.onChange(n)},X=n=>{o.getActiveElement(document)===s.current&&n.preventDefault()},Ve=()=>new ze.DateInput(s.current,{...S(),format:pe(S().format),events:{focus:Me,blur:Pe,valueChange:J,click:Y}}),Z=()=>{s.current&&s.current.setCustomValidity&&s.current.setCustomValidity(V().valid?"":z||u.validationMessage)},$=a.useCallback(n=>{var r;if(s.current&&h&&n){const O=(l==null?void 0:l.current).currentText,k=(l==null?void 0:l.current).currentText.search(/[^a-zA-Z]/),A=O[k],_=O.split(A)[0].length;f.current&&f.current.classList.add("k-focus"),(r=l==null?void 0:l.current)==null||r.selectNearestSegment(_)}},[h]),Ne=n=>{!s.current||!l.current||J(n)},qe=n=>{n.preventDefault();const r=o.getActiveElement(document);s.current&&r!==s.current&&s.current.focus({preventScroll:!0})},m=n=>{const r=v();b.current&&e.onChange&&!E.isEqual(b.current.oldValue,r)&&e.onChange.call(void 0,{syntheticEvent:n,nativeEvent:b.current.event,value:b.current.value,target:M.current}),b.current=null},Le=n=>{var r;(r=l.current)==null||r.modifyDateSegmentValue(1),m(n)},ke=n=>{var r;(r=l.current)==null||r.modifyDateSegmentValue(-1),m(n)},M=a.useRef(null),s=a.useRef(null),f=a.useRef(null);a.useImperativeHandle(M,()=>({props:e,get options(){return S()},get text(){return K()},get element(){return s.current},get name(){return e.name},get value(){return v()},get validity(){return V()},focus:Se,updateOnPaste:Ne})),a.useImperativeHandle(d,()=>M.current);const l=a.useRef(null),P=a.useRef(null),N=a.useRef(!1),R=a.useRef(null),b=a.useRef(null),I=a.useRef(e),[q,Ae]=a.useState({value:e.value===void 0?ce:null,focused:!1}),[,_e]=a.useReducer(n=>n+1,0);a.useLayoutEffect(()=>{N.current||(l.current=Ve(),P.current=l.current.dateObject,N.current=!0)},[]),a.useEffect(()=>{Z();const n=f.current||s.current;return N.current||n&&n.addEventListener("wheel",X,{passive:!1}),h&&(T({focused:!0}),$(!0)),()=>{n&&n.removeEventListener("wheel",X)}},[]),a.useEffect(()=>{Z(),l.current&&(P.current=l.current.dateObject,(Re(I.current.format,p)||I.current.readonly!==e.readonly||JSON.stringify(I.current.steps)!==JSON.stringify(e.steps)||W().locale!==l.current.options.intlService.locale)&&l.current.setOptions(S(),!0),I.current.value!==e.value&&(P.current.getValue()!==null||e.value!==null)&&P.current.setValue(e.value),e.ariaExpanded!==void 0&&e.ariaExpanded&&(l.current.options.placeholder=null),e.ariaExpanded!==void 0&&!e.ariaExpanded&&(l.current.options.placeholder=y),l.current.refreshElementValue(),I.current={format:p,readonly:e.readonly,ariaExpanded:e.ariaExpanded,steps:e.steps,value:e.value})});const G=e.id||g+"-accessibility-id",D=H&&H.uDateInput,Q=K(),L=!De||V().valid;a.useImperativeHandle(e._ref,()=>M.current);const ee=a.createElement("input",{ref:n=>{s.current=n},role:e.ariaRole||void 0,readOnly:e.readonly,tabIndex:e.tabIndex||0,disabled:w,title:(ne=e.title)!=null?ne:Q,type:"text",spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoFocus:h,className:o.classNames(o.uDateInput.inputInner({c:D})),id:G,value:Q,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledBy,"aria-describedby":e.ariaDescribedBy,"aria-haspopup":Te,"aria-disabled":w||void 0,"aria-expanded":e.ariaExpanded,"aria-controls":e.ariaControls,"aria-required":e.required,"aria-invalid":!L||void 0,onKeyDown:m,onChange:m,onWheel:m,onInput:m,onClick:m,name:e.name,...e.inputAttributes}),te=a.createElement("span",{ref:n=>{f.current=n},style:e.label?void 0:{width:e.width},dir:e.dir,className:o.classNames(o.uDateInput.wrapper({c:D,size:de,fillMode:me,rounded:fe,disabled:w,required:U(),invalid:!L}),e.className)},ee,e.children,e.clearButton&&e.value&&a.createElement(Ue,{onClick:Y,key:"clearbutton"}),ve&&a.createElement("span",{className:o.classNames(o.uDateInput.inputSpinner({c:D})),onMouseDown:qe},a.createElement(re.Button,{tabIndex:-1,type:"button",className:o.classNames(o.uDateInput.spinnerIncrease({c:D})),icon:"chevron-up",svgIcon:le.chevronUpIcon,"aria-label":x.toLanguageString(c.increaseValue,c.messages[c.increaseValue]),title:x.toLanguageString(c.increaseValue,c.messages[c.increaseValue]),onClick:Le}),a.createElement(re.Button,{tabIndex:-1,type:"button",className:o.classNames(o.uDateInput.spinnerDecrease({c:D})),icon:"chevron-down",svgIcon:le.chevronDownIcon,"aria-label":x.toLanguageString(c.decreaseValue,c.messages[c.decreaseValue]),title:x.toLanguageString(c.decreaseValue,c.messages[c.decreaseValue]),onClick:ke}))),Be=e.label?a.createElement(He.FloatingLabel,{label:e.label,editorId:G,editorValue:(ae=s.current)==null?void 0:ae.value,editorValid:L,editorDisabled:w,children:te,style:{width:e.width}}):te;return{inputElement:ee,wrappedElement:Be}}const F=a.forwardRef((e,d)=>ie(e,d).wrappedElement),oe=a.forwardRef((e,d)=>ie(e,d).inputElement);oe.displayName="KendoReactDateInputInner";F.propTypes={value:t.instanceOf(Date),format:t.oneOfType([i.nullable(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([i.nullable(t.oneOf(["wide","narrow","short","formatPattern"])),t.shape({year:i.nullable(t.string),month:i.nullable(t.string),day:i.nullable(t.string),hour:i.nullable(t.string),minute:i.nullable(t.string),second:i.nullable(t.string)})]),width:t.oneOfType([t.string,t.number]),tabIndex:t.number,title:t.string,steps:t.shape({year:i.nullable(t.number),month:i.nullable(t.number),day:i.nullable(t.number),hour:i.nullable(t.number),minute:i.nullable(t.number),second:i.nullable(t.number)}),min:t.instanceOf(Date),max:t.instanceOf(Date),disabled:t.bool,spinners:t.bool,name:t.string,dir:t.string,label:t.node,id:t.string,ariaLabelledBy:t.string,ariaDescribedBy:t.string,ariaLabel:t.string,ariaRole:t.string,ariaHasPopup:t.oneOfType([t.bool,t.oneOf(["grid","dialog"])]),ariaExpanded:t.oneOfType([t.bool]),onChange:t.func,validationMessage:t.string,required:t.bool,valid:t.bool,size:t.oneOf(["small","medium","large"]),rounded:t.oneOf(["small","medium","large","full","none"]),fillMode:t.oneOf(["solid","flat","outline"]),autoFocus:t.bool,inputAttributes:t.object};const u={format:B.DEFAULT_FORMAT,defaultValue:null,size:void 0,rounded:void 0,fillMode:void 0,formatPlaceholder:B.DEFAULT_FORMAT_PLACEHOLDER,spinners:!1,disabled:!1,max:E.cloneDate(i.MAX_DATE),min:E.cloneDate(i.MIN_DATE),minTime:E.cloneDate(i.MIN_TIME),maxTime:E.cloneDate(i.MAX_TIME),validityStyles:!0,validationMessage:Ye,placeholder:null,enableMouseWheel:!0,autoCorrectParts:!0,autoSwitchParts:!0,allowCaretMode:!1,twoDigitYearMax:68,ariaHasPopup:void 0,autoFocus:!1},j=o.createPropsContext();F.displayName="KendoReactDateInput";exports.DateInput=F;exports.DateInputInner=oe;exports.DateInputPropsContext=j;exports.dateInputDefaultProps=u;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Fe=require("react"),t=require("prop-types"),E=require("@progress/kendo-date-math"),re=require("@progress/kendo-react-buttons"),le=require("@progress/kendo-svg-icons"),ue=require("@progress/kendo-react-intl"),o=require("@progress/kendo-react-common"),He=require("@progress/kendo-react-labels"),ze=require("@progress/kendo-dateinputs-common"),B=require("./utils.js"),i=require("../utils.js"),c=require("../messages/index.js"),Ke=require("../timepicker/utils.js"),Ue=require("../common/ClearButton.js"),We=require("./dateInputIntl.js");function Je(e){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const g in e)if(g!=="default"){const C=Object.getOwnPropertyDescriptor(e,g);Object.defineProperty(d,g,C.get?C:{enumerable:!0,get:()=>e[g]})}}return d.default=e,Object.freeze(d)}const a=Je(Fe),Ye="Please enter a valid value!";function ie(e,d){var ne,ae;const g=o.useId(e.id),C=ue.useInternationalization(),x=ue.useLocalization(),se=o.useUnstyled(),H=o.usePropsContext(j,e).unstyled||se,{format:R=u.format,defaultValue:ce=u.defaultValue,size:de=u.size,rounded:fe=u.rounded,fillMode:me=u.fillMode,formatPlaceholder:ge=u.formatPlaceholder,spinners:ve=u.spinners,disabled:p=u.disabled,min:be=u.min,max:ye=u.max,minTime:he=u.minTime,maxTime:Ie=u.maxTime,validityStyles:De=u.validityStyles,validationMessage:z=u.validationMessage,placeholder:y=u.placeholder,enableMouseWheel:Oe=u.enableMouseWheel,autoCorrectParts:Ee=u.autoCorrectParts,autoSwitchParts:Ce=u.autoSwitchParts,allowCaretMode:xe=u.allowCaretMode,twoDigitYearMax:we=u.twoDigitYearMax,ariaHasPopup:Te=u.ariaHasPopup,autoFocus:h=u.autoFocus}=o.usePropsContext(j,e),w=n=>{Ae(r=>({...r,...n}))},v=()=>q.value?q.value:P.current!==void 0?P.current:l.current&&l.current.value,K=()=>{const n=l.current&&l.current.currentText||"",r=v();return y!=null&&!q.focused&&!r?y:n},U=()=>e.required!==void 0?e.required:!1,V=()=>{const n=v()||e.value,r=be,O=ye,k=B.isInRange(n,r,O)&&Ke.isInTimeRange(n,he,Ie),A=z!==void 0,_=(!U()||n!=null)&&k,je=e.valid!==void 0?e.valid:_;return{customError:A,rangeOverflow:n&&O.getTime()<n.getTime()||!1,rangeUnderflow:n&&n.getTime()<r.getTime()||!1,valid:je,valueMissing:n===null}},Se=()=>{s.current&&s.current.focus()},W=()=>new We.DateInputIntl(C),T=()=>{const n=v();return{format:R,steps:e.steps,formatPlaceholder:ge,placeholder:y,selectPreviousSegmentOnBackspace:!0,value:e.value!==void 0?e.value:n,intlService:W(),autoFill:e.autoFill!==void 0?e.autoFill:!1,enableMouseWheel:Oe,autoCorrectParts:Ee,autoSwitchParts:Ce,autoSwitchKeys:e.autoSwitchKeys||[],twoDigitYearMax:we,allowCaretMode:xe}},Me=n=>{f.current&&f.current.classList.add("k-focus"),w({focused:!0}),h&&$(!0)},Pe=n=>{f.current&&f.current.classList.remove("k-focus"),w({focused:!1})},Re=(n,r)=>typeof n!=typeof r?!0:typeof n=="string"&&typeof r=="string"?n!==r:typeof n=="object"&&typeof r=="object"?JSON.stringify(n)!==JSON.stringify(r):!1,pe=n=>typeof n=="string"?n:{inputFormat:n,displayFormat:n},J=n=>{P.current=v(),e.value===void 0&&w({value:n.value!==void 0?n.value:null}),_e(),b.current=n,P.current=void 0},Y=n=>{e.onChange&&e.onChange(n)},X=n=>{o.getActiveElement(document)===s.current&&n.preventDefault()},Ve=()=>new ze.DateInput(s.current,{...T(),format:pe(T().format),events:{focus:Me,blur:Pe,valueChange:J,click:Y}}),Z=()=>{s.current&&s.current.setCustomValidity&&s.current.setCustomValidity(V().valid?"":z||u.validationMessage)},$=a.useCallback(n=>{var r;if(s.current&&h&&n){const O=(l==null?void 0:l.current).currentText,k=(l==null?void 0:l.current).currentText.search(/[^a-zA-Z]/),A=O[k],_=O.split(A)[0].length;f.current&&f.current.classList.add("k-focus"),(r=l==null?void 0:l.current)==null||r.selectNearestSegment(_)}},[h]),Ne=n=>{!s.current||!l.current||J(n)},qe=n=>{n.preventDefault();const r=o.getActiveElement(document);s.current&&r!==s.current&&s.current.focus({preventScroll:!0})},m=n=>{const r=v();b.current&&e.onChange&&!E.isEqual(b.current.oldValue,r)&&e.onChange.call(void 0,{syntheticEvent:n,nativeEvent:b.current.event,value:b.current.value,target:S.current}),b.current=null},Le=n=>{var r;(r=l.current)==null||r.modifyDateSegmentValue(1),m(n)},ke=n=>{var r;(r=l.current)==null||r.modifyDateSegmentValue(-1),m(n)},S=a.useRef(null),s=a.useRef(null),f=a.useRef(null);a.useImperativeHandle(S,()=>({props:e,get options(){return T()},get text(){return K()},get element(){return s.current},get name(){return e.name},get value(){return v()},get validity(){return V()},focus:Se,updateOnPaste:Ne})),a.useImperativeHandle(d,()=>S.current);const l=a.useRef(null),M=a.useRef(null),N=a.useRef(!1),P=a.useRef(null),b=a.useRef(null),I=a.useRef(e),[q,Ae]=a.useState({value:e.value===void 0?ce:null,focused:!1}),[,_e]=a.useReducer(n=>n+1,0);a.useLayoutEffect(()=>{N.current||(l.current=Ve(),M.current=l.current.dateObject,N.current=!0)},[]),a.useEffect(()=>{Z();const n=f.current||s.current;return N.current||n&&n.addEventListener("wheel",X,{passive:!1}),h&&(w({focused:!0}),$(!0)),()=>{n&&n.removeEventListener("wheel",X)}},[]),a.useEffect(()=>{Z(),l.current&&(M.current=l.current.dateObject,(Re(I.current.format,R)||I.current.readonly!==e.readonly||JSON.stringify(I.current.steps)!==JSON.stringify(e.steps)||W().locale!==l.current.options.intlService.locale)&&l.current.setOptions(T(),!0),I.current.value!==e.value&&(M.current.getValue()!==null||e.value!==null)&&M.current.setValue(e.value),e.ariaExpanded!==void 0&&e.ariaExpanded&&(l.current.options.placeholder=null),e.ariaExpanded!==void 0&&!e.ariaExpanded&&(l.current.options.placeholder=y),l.current.refreshElementValue(),I.current={format:R,readonly:e.readonly,ariaExpanded:e.ariaExpanded,steps:e.steps,value:e.value})});const G=e.id||g+"-accessibility-id",D=H&&H.uDateInput,Q=K(),L=!De||V().valid;a.useImperativeHandle(e._ref,()=>S.current);const ee=a.createElement("input",{ref:n=>{s.current=n},role:e.ariaRole||void 0,readOnly:e.readonly,tabIndex:e.tabIndex||0,disabled:p,title:(ne=e.title)!=null?ne:Q,type:"text",spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoFocus:h,className:o.classNames(o.uDateInput.inputInner({c:D})),id:G,value:Q,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledBy,"aria-describedby":e.ariaDescribedBy,"aria-haspopup":Te,"aria-expanded":e.ariaExpanded,"aria-controls":e.ariaControls,"aria-required":e.required,"aria-invalid":!L||void 0,onKeyDown:m,onChange:m,onWheel:m,onInput:m,onClick:m,name:e.name,...e.inputAttributes}),te=a.createElement("span",{ref:n=>{f.current=n},style:e.label?void 0:{width:e.width},dir:e.dir,className:o.classNames(o.uDateInput.wrapper({c:D,size:de,fillMode:me,rounded:fe,disabled:p,required:U(),invalid:!L}),e.className)},ee,e.children,e.clearButton&&e.value&&a.createElement(Ue,{onClick:Y,key:"clearbutton"}),ve&&a.createElement("span",{className:o.classNames(o.uDateInput.inputSpinner({c:D})),onMouseDown:qe},a.createElement(re.Button,{tabIndex:-1,type:"button",className:o.classNames(o.uDateInput.spinnerIncrease({c:D})),icon:"chevron-up",svgIcon:le.chevronUpIcon,"aria-label":x.toLanguageString(c.increaseValue,c.messages[c.increaseValue]),title:x.toLanguageString(c.increaseValue,c.messages[c.increaseValue]),onClick:Le}),a.createElement(re.Button,{tabIndex:-1,type:"button",className:o.classNames(o.uDateInput.spinnerDecrease({c:D})),icon:"chevron-down",svgIcon:le.chevronDownIcon,"aria-label":x.toLanguageString(c.decreaseValue,c.messages[c.decreaseValue]),title:x.toLanguageString(c.decreaseValue,c.messages[c.decreaseValue]),onClick:ke}))),Be=e.label?a.createElement(He.FloatingLabel,{label:e.label,editorId:G,editorValue:(ae=s.current)==null?void 0:ae.value,editorValid:L,editorDisabled:p,children:te,style:{width:e.width}}):te;return{inputElement:ee,wrappedElement:Be}}const F=a.forwardRef((e,d)=>ie(e,d).wrappedElement),oe=a.forwardRef((e,d)=>ie(e,d).inputElement);oe.displayName="KendoReactDateInputInner";F.propTypes={value:t.instanceOf(Date),format:t.oneOfType([i.nullable(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([i.nullable(t.oneOf(["wide","narrow","short","formatPattern"])),t.shape({year:i.nullable(t.string),month:i.nullable(t.string),day:i.nullable(t.string),hour:i.nullable(t.string),minute:i.nullable(t.string),second:i.nullable(t.string)})]),width:t.oneOfType([t.string,t.number]),tabIndex:t.number,title:t.string,steps:t.shape({year:i.nullable(t.number),month:i.nullable(t.number),day:i.nullable(t.number),hour:i.nullable(t.number),minute:i.nullable(t.number),second:i.nullable(t.number)}),min:t.instanceOf(Date),max:t.instanceOf(Date),disabled:t.bool,spinners:t.bool,name:t.string,dir:t.string,label:t.node,id:t.string,ariaLabelledBy:t.string,ariaDescribedBy:t.string,ariaLabel:t.string,ariaRole:t.string,ariaHasPopup:t.oneOfType([t.bool,t.oneOf(["grid","dialog"])]),ariaExpanded:t.oneOfType([t.bool]),onChange:t.func,validationMessage:t.string,required:t.bool,valid:t.bool,size:t.oneOf(["small","medium","large"]),rounded:t.oneOf(["small","medium","large","full","none"]),fillMode:t.oneOf(["solid","flat","outline"]),autoFocus:t.bool,inputAttributes:t.object};const u={format:B.DEFAULT_FORMAT,defaultValue:null,size:void 0,rounded:void 0,fillMode:void 0,formatPlaceholder:B.DEFAULT_FORMAT_PLACEHOLDER,spinners:!1,disabled:!1,max:E.cloneDate(i.MAX_DATE),min:E.cloneDate(i.MIN_DATE),minTime:E.cloneDate(i.MIN_TIME),maxTime:E.cloneDate(i.MAX_TIME),validityStyles:!0,validationMessage:Ye,placeholder:null,enableMouseWheel:!0,autoCorrectParts:!0,autoSwitchParts:!0,allowCaretMode:!1,twoDigitYearMax:68,ariaHasPopup:void 0,autoFocus:!1},j=o.createPropsContext();F.displayName="KendoReactDateInput";exports.DateInput=F;exports.DateInputInner=oe;exports.DateInputPropsContext=j;exports.dateInputDefaultProps=u;
|
package/dateinput/DateInput.mjs
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as a from "react";
|
|
9
9
|
import e from "prop-types";
|
|
10
|
-
import { cloneDate as
|
|
10
|
+
import { cloneDate as M, isEqual as ze } from "@progress/kendo-date-math";
|
|
11
11
|
import { Button as ne } from "@progress/kendo-react-buttons";
|
|
12
12
|
import { chevronUpIcon as je, chevronDownIcon as Ke } from "@progress/kendo-svg-icons";
|
|
13
13
|
import { useInternationalization as Ue, useLocalization as We } from "@progress/kendo-react-intl";
|
|
@@ -16,7 +16,7 @@ import { FloatingLabel as Ze } from "@progress/kendo-react-labels";
|
|
|
16
16
|
import { DateInput as Ge } from "@progress/kendo-dateinputs-common";
|
|
17
17
|
import { DEFAULT_FORMAT_PLACEHOLDER as $e, DEFAULT_FORMAT as Qe, isInRange as et } from "./utils.mjs";
|
|
18
18
|
import { MAX_TIME as tt, MIN_TIME as nt, MIN_DATE as at, MAX_DATE as rt, nullable as u } from "../utils.mjs";
|
|
19
|
-
import { increaseValue as
|
|
19
|
+
import { increaseValue as S, messages as p, decreaseValue as P } from "../messages/index.mjs";
|
|
20
20
|
import { isInTimeRange as it } from "../timepicker/utils.mjs";
|
|
21
21
|
import lt from "../common/ClearButton.mjs";
|
|
22
22
|
import { DateInputIntl as ot } from "./dateInputIntl.mjs";
|
|
@@ -24,14 +24,14 @@ const ut = "Please enter a valid value!";
|
|
|
24
24
|
function le(t, m) {
|
|
25
25
|
var ee, te;
|
|
26
26
|
const ue = Ye(t.id), se = Ue(), O = We(), ce = Xe(), H = ae(ie, t).unstyled || ce, {
|
|
27
|
-
format:
|
|
27
|
+
format: R = l.format,
|
|
28
28
|
defaultValue: de = l.defaultValue,
|
|
29
29
|
size: fe = l.size,
|
|
30
30
|
rounded: me = l.rounded,
|
|
31
31
|
fillMode: ge = l.fillMode,
|
|
32
32
|
formatPlaceholder: ve = l.formatPlaceholder,
|
|
33
33
|
spinners: he = l.spinners,
|
|
34
|
-
disabled:
|
|
34
|
+
disabled: L = l.disabled,
|
|
35
35
|
min: ye = l.min,
|
|
36
36
|
max: be = l.max,
|
|
37
37
|
minTime: Ie = l.minTime,
|
|
@@ -46,9 +46,9 @@ function le(t, m) {
|
|
|
46
46
|
twoDigitYearMax: Te = l.twoDigitYearMax,
|
|
47
47
|
ariaHasPopup: Me = l.ariaHasPopup,
|
|
48
48
|
autoFocus: v = l.autoFocus
|
|
49
|
-
} = ae(ie, t),
|
|
49
|
+
} = ae(ie, t), w = (n) => {
|
|
50
50
|
Fe((r) => ({ ...r, ...n }));
|
|
51
|
-
}, d = () => A.value ? A.value :
|
|
51
|
+
}, d = () => A.value ? A.value : T.current !== void 0 ? T.current : i.current && i.current.value, z = () => {
|
|
52
52
|
const n = i.current && i.current.currentText || "", r = d();
|
|
53
53
|
return g != null && !A.focused && !r ? g : n;
|
|
54
54
|
}, j = () => t.required !== void 0 ? t.required : !1, V = () => {
|
|
@@ -62,10 +62,10 @@ function le(t, m) {
|
|
|
62
62
|
};
|
|
63
63
|
}, Se = () => {
|
|
64
64
|
o.current && o.current.focus();
|
|
65
|
-
}, K = () => new ot(se),
|
|
65
|
+
}, K = () => new ot(se), x = () => {
|
|
66
66
|
const n = d();
|
|
67
67
|
return {
|
|
68
|
-
format:
|
|
68
|
+
format: R,
|
|
69
69
|
steps: t.steps,
|
|
70
70
|
formatPlaceholder: ve,
|
|
71
71
|
placeholder: g,
|
|
@@ -81,21 +81,21 @@ function le(t, m) {
|
|
|
81
81
|
allowCaretMode: De
|
|
82
82
|
};
|
|
83
83
|
}, pe = (n) => {
|
|
84
|
-
s.current && s.current.classList.add("k-focus"),
|
|
84
|
+
s.current && s.current.classList.add("k-focus"), w({ focused: !0 }), v && X(!0);
|
|
85
85
|
}, Pe = (n) => {
|
|
86
|
-
s.current && s.current.classList.remove("k-focus"),
|
|
86
|
+
s.current && s.current.classList.remove("k-focus"), w({ focused: !1 });
|
|
87
87
|
}, Re = (n, r) => typeof n != typeof r ? !0 : typeof n == "string" && typeof r == "string" ? n !== r : typeof n == "object" && typeof r == "object" ? JSON.stringify(n) !== JSON.stringify(r) : !1, Le = (n) => typeof n == "string" ? n : {
|
|
88
88
|
inputFormat: n,
|
|
89
89
|
displayFormat: n
|
|
90
90
|
}, U = (n) => {
|
|
91
|
-
|
|
91
|
+
T.current = d(), t.value === void 0 && w({ value: n.value !== void 0 ? n.value : null }), Be(), f.current = n, T.current = void 0;
|
|
92
92
|
}, W = (n) => {
|
|
93
93
|
t.onChange && t.onChange(n);
|
|
94
94
|
}, J = (n) => {
|
|
95
95
|
re(document) === o.current && n.preventDefault();
|
|
96
96
|
}, Ve = () => new Ge(o.current, {
|
|
97
|
-
...
|
|
98
|
-
format: Le(
|
|
97
|
+
...x(),
|
|
98
|
+
format: Le(x().format),
|
|
99
99
|
events: {
|
|
100
100
|
focus: pe,
|
|
101
101
|
blur: Pe,
|
|
@@ -127,7 +127,7 @@ function le(t, m) {
|
|
|
127
127
|
syntheticEvent: n,
|
|
128
128
|
nativeEvent: f.current.event,
|
|
129
129
|
value: f.current.value,
|
|
130
|
-
target:
|
|
130
|
+
target: C.current
|
|
131
131
|
}), f.current = null;
|
|
132
132
|
}, ke = (n) => {
|
|
133
133
|
var r;
|
|
@@ -135,13 +135,13 @@ function le(t, m) {
|
|
|
135
135
|
}, _e = (n) => {
|
|
136
136
|
var r;
|
|
137
137
|
(r = i.current) == null || r.modifyDateSegmentValue(-1), c(n);
|
|
138
|
-
},
|
|
138
|
+
}, C = a.useRef(null), o = a.useRef(null), s = a.useRef(null);
|
|
139
139
|
a.useImperativeHandle(
|
|
140
|
-
|
|
140
|
+
C,
|
|
141
141
|
() => ({
|
|
142
142
|
props: t,
|
|
143
143
|
get options() {
|
|
144
|
-
return
|
|
144
|
+
return x();
|
|
145
145
|
},
|
|
146
146
|
get text() {
|
|
147
147
|
return z();
|
|
@@ -162,22 +162,22 @@ function le(t, m) {
|
|
|
162
162
|
focus: Se,
|
|
163
163
|
updateOnPaste: Ne
|
|
164
164
|
})
|
|
165
|
-
), a.useImperativeHandle(m, () =>
|
|
166
|
-
const i = a.useRef(null),
|
|
165
|
+
), a.useImperativeHandle(m, () => C.current);
|
|
166
|
+
const i = a.useRef(null), D = a.useRef(null), N = a.useRef(!1), T = a.useRef(null), f = a.useRef(null), h = a.useRef(t), [A, Fe] = a.useState({
|
|
167
167
|
value: t.value === void 0 ? de : null,
|
|
168
168
|
focused: !1
|
|
169
169
|
}), [, Be] = a.useReducer((n) => n + 1, 0);
|
|
170
170
|
a.useLayoutEffect(() => {
|
|
171
|
-
N.current || (i.current = Ve(),
|
|
171
|
+
N.current || (i.current = Ve(), D.current = i.current.dateObject, N.current = !0);
|
|
172
172
|
}, []), a.useEffect(() => {
|
|
173
173
|
Y();
|
|
174
174
|
const n = s.current || o.current;
|
|
175
|
-
return N.current || n && n.addEventListener("wheel", J, { passive: !1 }), v && (
|
|
175
|
+
return N.current || n && n.addEventListener("wheel", J, { passive: !1 }), v && (w({ focused: !0 }), X(!0)), () => {
|
|
176
176
|
n && n.removeEventListener("wheel", J);
|
|
177
177
|
};
|
|
178
178
|
}, []), a.useEffect(() => {
|
|
179
|
-
Y(), i.current && (
|
|
180
|
-
format:
|
|
179
|
+
Y(), i.current && (D.current = i.current.dateObject, (Re(h.current.format, R) || h.current.readonly !== t.readonly || JSON.stringify(h.current.steps) !== JSON.stringify(t.steps) || K().locale !== i.current.options.intlService.locale) && i.current.setOptions(x(), !0), h.current.value !== t.value && (D.current.getValue() !== null || t.value !== null) && D.current.setValue(t.value), t.ariaExpanded !== void 0 && t.ariaExpanded && (i.current.options.placeholder = null), t.ariaExpanded !== void 0 && !t.ariaExpanded && (i.current.options.placeholder = g), i.current.refreshElementValue(), h.current = {
|
|
180
|
+
format: R,
|
|
181
181
|
readonly: t.readonly,
|
|
182
182
|
ariaExpanded: t.ariaExpanded,
|
|
183
183
|
steps: t.steps,
|
|
@@ -185,7 +185,7 @@ function le(t, m) {
|
|
|
185
185
|
});
|
|
186
186
|
});
|
|
187
187
|
const Z = t.id || ue + "-accessibility-id", y = H && H.uDateInput, G = z(), k = !Oe || V().valid;
|
|
188
|
-
a.useImperativeHandle(t._ref, () =>
|
|
188
|
+
a.useImperativeHandle(t._ref, () => C.current);
|
|
189
189
|
const $ = /* @__PURE__ */ a.createElement(
|
|
190
190
|
"input",
|
|
191
191
|
{
|
|
@@ -195,7 +195,7 @@ function le(t, m) {
|
|
|
195
195
|
role: t.ariaRole || void 0,
|
|
196
196
|
readOnly: t.readonly,
|
|
197
197
|
tabIndex: t.tabIndex || 0,
|
|
198
|
-
disabled:
|
|
198
|
+
disabled: L,
|
|
199
199
|
title: (ee = t.title) != null ? ee : G,
|
|
200
200
|
type: "text",
|
|
201
201
|
spellCheck: !1,
|
|
@@ -209,7 +209,6 @@ function le(t, m) {
|
|
|
209
209
|
"aria-labelledby": t.ariaLabelledBy,
|
|
210
210
|
"aria-describedby": t.ariaDescribedBy,
|
|
211
211
|
"aria-haspopup": Me,
|
|
212
|
-
"aria-disabled": w || void 0,
|
|
213
212
|
"aria-expanded": t.ariaExpanded,
|
|
214
213
|
"aria-controls": t.ariaControls,
|
|
215
214
|
"aria-required": t.required,
|
|
@@ -236,7 +235,7 @@ function le(t, m) {
|
|
|
236
235
|
size: fe,
|
|
237
236
|
fillMode: ge,
|
|
238
237
|
rounded: me,
|
|
239
|
-
disabled:
|
|
238
|
+
disabled: L,
|
|
240
239
|
required: j(),
|
|
241
240
|
invalid: !k
|
|
242
241
|
}),
|
|
@@ -254,8 +253,8 @@ function le(t, m) {
|
|
|
254
253
|
className: I(E.spinnerIncrease({ c: y })),
|
|
255
254
|
icon: "chevron-up",
|
|
256
255
|
svgIcon: je,
|
|
257
|
-
"aria-label": O.toLanguageString(
|
|
258
|
-
title: O.toLanguageString(
|
|
256
|
+
"aria-label": O.toLanguageString(S, p[S]),
|
|
257
|
+
title: O.toLanguageString(S, p[S]),
|
|
259
258
|
onClick: ke
|
|
260
259
|
}
|
|
261
260
|
), /* @__PURE__ */ a.createElement(
|
|
@@ -266,8 +265,8 @@ function le(t, m) {
|
|
|
266
265
|
className: I(E.spinnerDecrease({ c: y })),
|
|
267
266
|
icon: "chevron-down",
|
|
268
267
|
svgIcon: Ke,
|
|
269
|
-
"aria-label": O.toLanguageString(
|
|
270
|
-
title: O.toLanguageString(
|
|
268
|
+
"aria-label": O.toLanguageString(P, p[P]),
|
|
269
|
+
title: O.toLanguageString(P, p[P]),
|
|
271
270
|
onClick: _e
|
|
272
271
|
}
|
|
273
272
|
))
|
|
@@ -278,7 +277,7 @@ function le(t, m) {
|
|
|
278
277
|
editorId: Z,
|
|
279
278
|
editorValue: (te = o.current) == null ? void 0 : te.value,
|
|
280
279
|
editorValid: k,
|
|
281
|
-
editorDisabled:
|
|
280
|
+
editorDisabled: L,
|
|
282
281
|
children: Q,
|
|
283
282
|
style: { width: t.width }
|
|
284
283
|
}
|
|
@@ -369,10 +368,10 @@ const l = {
|
|
|
369
368
|
formatPlaceholder: $e,
|
|
370
369
|
spinners: !1,
|
|
371
370
|
disabled: !1,
|
|
372
|
-
max:
|
|
373
|
-
min:
|
|
374
|
-
minTime:
|
|
375
|
-
maxTime:
|
|
371
|
+
max: M(rt),
|
|
372
|
+
min: M(at),
|
|
373
|
+
minTime: M(nt),
|
|
374
|
+
maxTime: M(tt),
|
|
376
375
|
validityStyles: !0,
|
|
377
376
|
validationMessage: ut,
|
|
378
377
|
placeholder: null,
|
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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const st=require("react"),t=require("prop-types"),ct=require("@progress/kendo-react-popup"),H=require("@progress/kendo-date-math"),u=require("@progress/kendo-react-common"),dt=require("@progress/kendo-svg-icons"),ft=require("../dateinput/DateInput.js"),mt=require("../calendar/components/Calendar.js"),r=require("../utils.js"),D=require("../messages/index.js"),gt=require("@progress/kendo-react-intl"),pt=require("./ToggleButton.js"),bt=require("../hooks/usePickerFloatingLabel.js"),ht=require("@progress/kendo-react-layout"),vt=require("../common/AdaptiveMode.js");function wt(n){const k=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const f in n)if(f!=="default"){const C=Object.getOwnPropertyDescriptor(n,f);Object.defineProperty(k,f,C.get?C:{enumerable:!0,get:()=>n[f]})}}return k.default=n,Object.freeze(k)}const o=wt(st),U=o.forwardRef((n,k)=>{const f=u.useId(n.id),C=gt.useLocalization(),P=u.useAdaptiveModeContext(),{defaultShow:me=l.defaultShow,defaultValue:ge=l.defaultValue,dateInput:pe=l.dateInput,calendar:be=l.calendar,toggleButton:he=l.toggleButton,popup:ve=l.popup,disabled:p=l.disabled,format:we=l.format,max:O=l.max,min:M=l.min,popupSettings:R=l.popupSettings,tabIndex:ye=l.tabIndex,weekNumber:De=l.weekNumber,validityStyles:Y=l.validityStyles,size:E=l.size,rounded:x=l.rounded,fillMode:q=l.fillMode,autoFocus:ke=l.autoFocus,show:$,autoSwitchParts:Ce,autoSwitchKeys:Pe,twoDigitYearMax:Oe,ariaLabel:Me,adaptive:yt,adaptiveTitle:Re=n.label||void 0,adaptiveSubtitle:Se,formatPlaceholder:Ie,inputAttributes:_e,validationMessage:X,visited:Dt,value:N,touched:kt,modified:Ct,_adaptiveMode:Pt=P,valid:Z,focusedDate:Te,id:Be,ariaLabelledBy:Ee,ariaDescribedBy:xe,placeholder:qe,onChange:G,onOpen:J,onClose:Q,...ee}=u.usePropsContext(fe,n),A=()=>{if(u.canUseDOM)return m.current&&m.current.ownerDocument||window.document},c=()=>!!(b.windowWidth&&P&&b.windowWidth<=(P==null?void 0:P.medium)&&n.adaptive),h=()=>{const e=_.current!==void 0?_.current:N!==void 0?N:b.value;return e!==null?H.cloneDate(e):null},i=()=>T.current!==void 0?T.current:$!==void 0?$:b.show,Ne=()=>pe||l.dateInput,Ae=()=>he||l.toggleButton,Fe=()=>be||l.calendar,Le=()=>ve||l.popup,te=()=>n.required!==void 0?n.required:!1,F=()=>{const e=h()||N||null,a=M,s=O,B=r.isInDateRange(e,a,s),V=X!==void 0,W=(!te()||e!=null)&&B,j=Z!==void 0?Z:W;return{customError:V,rangeOverflow:e&&s.getTime()<e.getTime()||!1,rangeUnderflow:e&&e.getTime()<a.getTime()||!1,valid:j,valueMissing:e===null}},ze=e=>{for(const a of e)I({windowWidth:a.target.clientWidth})},Ke=()=>{d.current&&d.current.focus()},ne=e=>{g.current=e},v=e=>{i()!==e&&(I({show:e}),e&&J&&J({target:w.current}),!e&&Q&&Q({target:w.current}))},Ve=e=>{const a=h();return a&&e?r.setTime(e,a):e},We=e=>{R!=null&&R.onMouseDownOutside&&R.onMouseDownOutside(e)},L=(e,a)=>{I({value:H.cloneDate(e||void 0)}),_.current=e,T.current=!1,c()||(y.current=!0),G&&G({syntheticEvent:a.syntheticEvent,nativeEvent:a.nativeEvent,value:h(),show:i(),target:w.current}),_.current=void 0,T.current=void 0,v(!1)},je=e=>{const a=Ve(e.value);L(a,e)},ae=()=>{const{popupClass:e,...a}=R,s=i(),B=h(),V=B&&H.getDate(B),W=u.classNames(e),j={popupClass:"k-datepicker-popup",show:s,anchor:m.current,className:W,id:le,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...a,onMouseDownOutside:We},ce={disabled:p,value:V,min:M,max:O,weekNumber:De,focusedDate:Te,className:c()?"k-calendar-lg":"",navigation:!c(),onChange:je},de=Fe(),it=Le();return c()?o.createElement(de,{_ref:ne,...ce}):o.createElement(it,{...j},o.createElement(de,{_ref:ne,...ce}))},oe=()=>{I({focused:!1}),v(!1)},He=()=>{const{windowWidth:e=0}=b,a={expand:i(),onClose:oe,title:Re,subTitle:Se,windowWidth:e};return o.createElement(vt.AdaptiveMode,{...a},o.createElement(ht.ActionSheetContent,null,ae()))},Ue=e=>{L(e.value,e)},Ye=()=>{I({focused:!0})},$e=()=>{v(!i())},z=()=>{p||(y.current=!0,v(!i()))},Xe=e=>{e.preventDefault()},Ze=e=>{const{altKey:a,keyCode:s}=e;if(s===u.Keys.esc&&i()){y.current=!0,v(!1);return}a&&(s===u.Keys.up||s===u.Keys.down)&&(e.preventDefault(),e.stopPropagation(),y.current=s===u.Keys.up,v(s===u.Keys.down))},w=o.useRef(null),m=o.useRef(null),d=o.useRef(null),g=o.useRef(null);o.useImperativeHandle(w,()=>({props:n,get element(){return m.current},get calendar(){return g.current},get dateInput(){return d.current},get name(){return n.name},get show(){return i()},get validity(){return F()},get value(){return h()},get mobileMode(){return c()},togglePopup:$e,focus:Ke})),o.useImperativeHandle(k,()=>w.current),u.useWebMcpRegister("datepicker",w,n,n.webMcp);const _=o.useRef(void 0),T=o.useRef(void 0),Ge=o.useRef(null),y=o.useRef(!1),K=o.useRef(!1),S=o.useRef(null),[b,Je]=o.useState({value:ge,show:me,focused:!1}),[,Qe]=o.useReducer(e=>e,!0),re=n.name||f||void 0,et=o.useCallback(e=>{if(p)return;let a=null;if(e!=null){if(e instanceof Date)a=e;else if(typeof e=="string"||typeof e=="number"){const s=new Date(e);isNaN(s.getTime())||(a=s)}}if(a&&r.isInDateRange(a,M,O)){const s={target:m.current,currentTarget:m.current};L(a,{syntheticEvent:s})}},[p,M,O]);u.useKendoPaste(m,{fieldName:re,onValueChange:et,enabled:!!re});const I=e=>{Je(a=>({...a,...e}))};o.useEffect(()=>{g.current&&g.current.element&&i()&&!K.current&&g.current.element.focus({preventScroll:!0}),c()&&i()&&!K.current&&setTimeout(()=>{g.current&&g.current.element&&g.current.element.focus({preventScroll:!0})},300),d.current&&d.current.element&&!i()&&y.current&&d.current.element.focus({preventScroll:!0}),K.current=i(),y.current=!1}),o.useEffect(()=>{var e;return S.current=u.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(a=>ze(a)),i()&&Qe(),(e=A())!=null&&e.body&&S.current&&S.current.observe(A().body),()=>{var a;clearTimeout(Ge.current),(a=A())!=null&&a.body&&S.current&&S.current.disconnect()}},[]);const le=f+"-popup-id",tt=ae(),nt=Ne(),at=h(),ot=Ae(),rt=He(),ue=!Y||F().valid,ie=C.toLanguageString(D.toggleCalendar,D.messages[D.toggleCalendar]),lt=Me||C.toLanguageString(D.selectDate,D.messages[D.selectDate]),ut={disabled:p,format:we,formatPlaceholder:Ie,id:Be,ariaLabelledBy:Ee,ariaDescribedBy:xe,ariaLabel:lt,max:O,min:M,name:n.name,onChange:Ue,required:n.required,_ref:d,tabIndex:i()?-1:ye,title:n.title,valid:F().valid,validationMessage:X,validityStyles:Y,value:at,label:void 0,placeholder:b.focused?null:qe,ariaExpanded:i(),autoFill:n.autoFill,twoDigitYearMax:Oe,enableMouseWheel:n.enableMouseWheel,autoCorrectParts:n.autoCorrectParts,autoSwitchParts:Ce,autoSwitchKeys:Pe,allowCaretMode:n.allowCaretMode,inputAttributes:_e},se=o.createElement(u.AsyncFocusBlur,{onFocus:Ye,onBlur:c()?void 0:oe,onSyncBlur:n.onBlur,onSyncFocus:n.onFocus},e=>o.createElement(o.Fragment,null,o.createElement("span",{...n.label?{}:ee,ref:m,className:u.classNames("k-input","k-datepicker",{[`k-input-${u.kendoThemeMaps.sizeMap[E]||E}`]:E,[`k-rounded-${u.kendoThemeMaps.roundedMap[x]||x}`]:x,[`k-input-${q}`]:q,"k-invalid":!ue,"k-required":te(),"k-disabled":p,"k-focus":b.focused},n.className),onKeyDown:Ze,style:{width:n.width},onFocus:c()?z:e.onFocus,onBlur:e.onBlur,onClick:c()?z:void 0},o.createElement(nt,{_ref:d,ariaRole:"combobox",ariaHasPopup:"grid",ariaExpanded:i(),ariaControls:i()?le:void 0,autoFocus:ke,...ut}),o.createElement(ot,{type:"button",icon:"calendar",svgIcon:dt.calendarIcon,title:ie,className:"k-input-button",onClick:c()?void 0:z,"aria-label":ie,fillMode:q,onMouseDown:Xe}),!c()&&tt),c()&&rt));return n.label?o.createElement(bt.PickerFloatingLabel,{dateInput:d,label:n.label,editorId:f,editorValid:ue,editorDisabled:p,children:se,style:{width:n.width},...ee}):se});U.propTypes={className:t.string,defaultShow:t.bool,defaultValue:t.instanceOf(Date),disabled:t.bool,focusedDate:t.instanceOf(Date),format:t.oneOfType([t.string,t.shape({skeleton:r.nullable(t.string),pattern:r.nullable(t.string),date:r.nullable(t.oneOf(["short","medium","long","full"])),time:r.nullable(t.oneOf(["short","medium","long","full"])),datetime:r.nullable(t.oneOf(["short","medium","long","full"])),era:r.nullable(t.oneOf(["narrow","short","long"])),year:r.nullable(t.oneOf(["numeric","2-digit"])),month:r.nullable(t.oneOf(["numeric","2-digit","narrow","short","long"])),day:r.nullable(t.oneOf(["numeric","2-digit"])),weekday:r.nullable(t.oneOf(["narrow","short","long"])),hour:r.nullable(t.oneOf(["numeric","2-digit"])),hour12:r.nullable(t.bool),minute:r.nullable(t.oneOf(["numeric","2-digit"])),second:r.nullable(t.oneOf(["numeric","2-digit"])),timeZoneName:r.nullable(t.oneOf(["short","long"]))})]),formatPlaceholder:t.oneOfType([r.nullable(t.oneOf(["wide","narrow","short","formatPattern"])),t.shape({year:r.nullable(t.string),month:r.nullable(t.string),day:r.nullable(t.string),hour:r.nullable(t.string),minute:r.nullable(t.string),second:r.nullable(t.string)})]),id:t.string,ariaLabelledBy:t.string,ariaDescribedBy:t.string,ariaLabel:t.string,min:t.instanceOf(Date),max:t.instanceOf(Date),name:t.string,popupSettings:t.shape({animate:r.nullable(t.bool),appendTo:r.nullable(t.any),popupClass:r.nullable(t.string)}),show:t.bool,tabIndex:t.number,title:t.string,value:t.instanceOf(Date),weekNumber:t.bool,width:t.oneOfType([t.number,t.string]),validationMessage:t.string,required:t.bool,valid:t.bool,size:t.oneOf(["small","medium","large"]),rounded:t.oneOf(["small","medium","large","full","none"]),fillMode:t.oneOf(["solid","flat","outline"]),adaptive:t.bool,adaptiveTitle:t.string,adaptiveSubtitle:t.string,autoFocus:t.bool,inputAttributes:t.object};const l={defaultShow:!1,defaultValue:null,dateInput:ft.DateInputInner,calendar:mt.Calendar,toggleButton:pt.ToggleButton,popup:ct.Popup,disabled:!1,format:"d",max:r.MAX_DATE,min:r.MIN_DATE,popupSettings:{},tabIndex:0,weekNumber:!1,validityStyles:!0,size:void 0,rounded:void 0,fillMode:void 0,autoFocus:!1},fe=u.createPropsContext();U.displayName="KendoReactDatePicker";exports.DatePicker=U;exports.DatePickerPropsContext=fe;exports.datePickerDefaultProps=l;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const it=require("react"),t=require("prop-types"),st=require("@progress/kendo-react-popup"),j=require("@progress/kendo-date-math"),u=require("@progress/kendo-react-common"),ct=require("@progress/kendo-svg-icons"),dt=require("../dateinput/DateInput.js"),ft=require("../calendar/components/Calendar.js"),r=require("../utils.js"),H=require("../messages/index.js"),mt=require("@progress/kendo-react-intl"),pt=require("./ToggleButton.js"),gt=require("../hooks/usePickerFloatingLabel.js"),bt=require("@progress/kendo-react-layout"),ht=require("../common/AdaptiveMode.js");function vt(n){const D=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const f in n)if(f!=="default"){const I=Object.getOwnPropertyDescriptor(n,f);Object.defineProperty(D,f,I.get?I:{enumerable:!0,get:()=>n[f]})}}return D.default=n,Object.freeze(D)}const o=vt(it),U=o.forwardRef((n,D)=>{const f=u.useId(n.id),I=mt.useLocalization(),k=u.useAdaptiveModeContext(),{defaultShow:me=l.defaultShow,defaultValue:pe=l.defaultValue,dateInput:ge=l.dateInput,calendar:be=l.calendar,toggleButton:he=l.toggleButton,popup:ve=l.popup,disabled:m=l.disabled,format:we=l.format,max:C=l.max,min:P=l.min,popupSettings:O=l.popupSettings,tabIndex:ye=l.tabIndex,weekNumber:De=l.weekNumber,validityStyles:Y=l.validityStyles,size:B=l.size,rounded:E=l.rounded,fillMode:x=l.fillMode,autoFocus:ke=l.autoFocus,show:$,autoSwitchParts:Ce,autoSwitchKeys:Pe,twoDigitYearMax:Oe,ariaLabel:Me,adaptive:wt,adaptiveTitle:Re=n.label||void 0,adaptiveSubtitle:Ie,formatPlaceholder:Se,inputAttributes:_e,validationMessage:X,visited:yt,value:q,touched:Dt,modified:kt,_adaptiveMode:Ct=k,valid:Z,focusedDate:Te,id:Be,ariaLabelledBy:Ee,ariaDescribedBy:xe,placeholder:qe,onChange:G,onOpen:J,onClose:Q,...ee}=u.usePropsContext(fe,n),N=()=>{if(u.canUseDOM)return p.current&&p.current.ownerDocument||window.document},c=()=>!!(b.windowWidth&&k&&b.windowWidth<=(k==null?void 0:k.medium)&&n.adaptive),h=()=>{const e=S.current!==void 0?S.current:q!==void 0?q:b.value;return e!==null?j.cloneDate(e):null},i=()=>_.current!==void 0?_.current:$!==void 0?$:b.show,Ne=()=>ge||l.dateInput,Ae=()=>he||l.toggleButton,Fe=()=>be||l.calendar,Le=()=>ve||l.popup,te=()=>n.required!==void 0?n.required:!1,A=()=>{const e=h()||q||null,a=P,s=C,T=r.isInDateRange(e,a,s),K=X!==void 0,V=(!te()||e!=null)&&T,W=Z!==void 0?Z:V;return{customError:K,rangeOverflow:e&&s.getTime()<e.getTime()||!1,rangeUnderflow:e&&e.getTime()<a.getTime()||!1,valid:W,valueMissing:e===null}},ze=e=>{for(const a of e)R({windowWidth:a.target.clientWidth})},Ke=()=>{d.current&&d.current.focus()},ne=e=>{g.current=e},v=e=>{i()!==e&&(R({show:e}),e&&J&&J({target:w.current}),!e&&Q&&Q({target:w.current}))},Ve=e=>{const a=h();return a&&e?r.setTime(e,a):e},We=e=>{O!=null&&O.onMouseDownOutside&&O.onMouseDownOutside(e)},F=(e,a)=>{R({value:j.cloneDate(e||void 0)}),S.current=e,_.current=!1,c()||(y.current=!0),G&&G({syntheticEvent:a.syntheticEvent,nativeEvent:a.nativeEvent,value:h(),show:i(),target:w.current}),S.current=void 0,_.current=void 0,v(!1)},je=e=>{const a=Ve(e.value);F(a,e)},ae=()=>{const{popupClass:e,...a}=O,s=i(),T=h(),K=T&&j.getDate(T),V=u.classNames(e),W={popupClass:"k-datepicker-popup",show:s,anchor:p.current,className:V,id:le,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...a,onMouseDownOutside:We},ce={disabled:m,value:K,min:P,max:C,weekNumber:De,focusedDate:Te,className:c()?"k-calendar-lg":"",navigation:!c(),onChange:je},de=Fe(),ut=Le();return c()?o.createElement(de,{_ref:ne,...ce}):o.createElement(ut,{...W},o.createElement(de,{_ref:ne,...ce}))},oe=()=>{R({focused:!1}),v(!1)},He=()=>{const{windowWidth:e=0}=b,a={expand:i(),onClose:oe,title:Re,subTitle:Ie,windowWidth:e};return o.createElement(ht.AdaptiveMode,{...a},o.createElement(bt.ActionSheetContent,null,ae()))},Ue=e=>{F(e.value,e)},Ye=()=>{R({focused:!0})},$e=()=>{v(!i())},L=()=>{m||(y.current=!0,v(!i()))},Xe=e=>{e.preventDefault()},Ze=e=>{const{altKey:a,keyCode:s}=e;if(s===u.Keys.esc&&i()){y.current=!0,v(!1);return}a&&(s===u.Keys.up||s===u.Keys.down)&&(e.preventDefault(),e.stopPropagation(),y.current=s===u.Keys.up,v(s===u.Keys.down))},w=o.useRef(null),p=o.useRef(null),d=o.useRef(null),g=o.useRef(null);o.useImperativeHandle(w,()=>({props:n,get element(){return p.current},get calendar(){return g.current},get dateInput(){return d.current},get name(){return n.name},get show(){return i()},get validity(){return A()},get value(){return h()},get mobileMode(){return c()},togglePopup:$e,focus:Ke})),o.useImperativeHandle(D,()=>w.current),u.useWebMcpRegister("datepicker",w,n,n.webMcp);const S=o.useRef(void 0),_=o.useRef(void 0),Ge=o.useRef(null),y=o.useRef(!1),z=o.useRef(!1),M=o.useRef(null),[b,Je]=o.useState({value:pe,show:me,focused:!1}),[,Qe]=o.useReducer(e=>e,!0),re=n.name||f||void 0,et=o.useCallback(e=>{if(m)return;let a=null;if(e!=null){if(e instanceof Date)a=e;else if(typeof e=="string"||typeof e=="number"){const s=new Date(e);isNaN(s.getTime())||(a=s)}}if(a&&r.isInDateRange(a,P,C)){const s={target:p.current,currentTarget:p.current};F(a,{syntheticEvent:s})}},[m,P,C]);u.useKendoPaste(p,{fieldName:re,onValueChange:et,enabled:!!re});const R=e=>{Je(a=>({...a,...e}))};o.useEffect(()=>{g.current&&g.current.element&&i()&&!z.current&&g.current.element.focus({preventScroll:!0}),c()&&i()&&!z.current&&setTimeout(()=>{g.current&&g.current.element&&g.current.element.focus({preventScroll:!0})},300),d.current&&d.current.element&&!i()&&y.current&&d.current.element.focus({preventScroll:!0}),z.current=i(),y.current=!1}),o.useEffect(()=>{var e;return M.current=u.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(a=>ze(a)),i()&&Qe(),(e=N())!=null&&e.body&&M.current&&M.current.observe(N().body),()=>{var a;clearTimeout(Ge.current),(a=N())!=null&&a.body&&M.current&&M.current.disconnect()}},[]);const le=f+"-popup-id",tt=ae(),nt=Ne(),at=h(),ot=Ae(),rt=He(),ue=!Y||A().valid,ie=I.toLanguageString(H.toggleCalendar,H.messages[H.toggleCalendar]),lt={disabled:m,format:we,formatPlaceholder:Se,id:Be,ariaLabelledBy:Ee,ariaDescribedBy:xe,ariaLabel:Me,max:C,min:P,name:n.name,onChange:Ue,required:n.required,_ref:d,tabIndex:i()?-1:ye,title:n.title,valid:A().valid,validationMessage:X,validityStyles:Y,value:at,label:void 0,placeholder:b.focused?null:qe,ariaExpanded:i(),autoFill:n.autoFill,twoDigitYearMax:Oe,enableMouseWheel:n.enableMouseWheel,autoCorrectParts:n.autoCorrectParts,autoSwitchParts:Ce,autoSwitchKeys:Pe,allowCaretMode:n.allowCaretMode,inputAttributes:_e},se=o.createElement(u.AsyncFocusBlur,{onFocus:Ye,onBlur:c()?void 0:oe,onSyncBlur:n.onBlur,onSyncFocus:n.onFocus},e=>o.createElement(o.Fragment,null,o.createElement("span",{...n.label?{}:ee,ref:p,className:u.classNames("k-input","k-datepicker",{[`k-input-${u.kendoThemeMaps.sizeMap[B]||B}`]:B,[`k-rounded-${u.kendoThemeMaps.roundedMap[E]||E}`]:E,[`k-input-${x}`]:x,"k-invalid":!ue,"k-required":te(),"k-disabled":m,"k-focus":b.focused},n.className),onKeyDown:Ze,style:{width:n.width},onFocus:c()?L:e.onFocus,onBlur:e.onBlur,onClick:c()?L:void 0},o.createElement(nt,{_ref:d,ariaRole:"combobox",ariaHasPopup:"grid",ariaExpanded:i(),ariaControls:i()?le:void 0,autoFocus:ke,...lt}),o.createElement(ot,{type:"button",icon:"calendar",svgIcon:ct.calendarIcon,title:ie,disabled:m,className:"k-input-button",onClick:c()?void 0:L,"aria-label":ie,fillMode:x,onMouseDown:Xe}),!c()&&tt),c()&&rt));return n.label?o.createElement(gt.PickerFloatingLabel,{dateInput:d,label:n.label,editorId:f,editorValid:ue,editorDisabled:m,children:se,style:{width:n.width},...ee}):se});U.propTypes={className:t.string,defaultShow:t.bool,defaultValue:t.instanceOf(Date),disabled:t.bool,focusedDate:t.instanceOf(Date),format:t.oneOfType([t.string,t.shape({skeleton:r.nullable(t.string),pattern:r.nullable(t.string),date:r.nullable(t.oneOf(["short","medium","long","full"])),time:r.nullable(t.oneOf(["short","medium","long","full"])),datetime:r.nullable(t.oneOf(["short","medium","long","full"])),era:r.nullable(t.oneOf(["narrow","short","long"])),year:r.nullable(t.oneOf(["numeric","2-digit"])),month:r.nullable(t.oneOf(["numeric","2-digit","narrow","short","long"])),day:r.nullable(t.oneOf(["numeric","2-digit"])),weekday:r.nullable(t.oneOf(["narrow","short","long"])),hour:r.nullable(t.oneOf(["numeric","2-digit"])),hour12:r.nullable(t.bool),minute:r.nullable(t.oneOf(["numeric","2-digit"])),second:r.nullable(t.oneOf(["numeric","2-digit"])),timeZoneName:r.nullable(t.oneOf(["short","long"]))})]),formatPlaceholder:t.oneOfType([r.nullable(t.oneOf(["wide","narrow","short","formatPattern"])),t.shape({year:r.nullable(t.string),month:r.nullable(t.string),day:r.nullable(t.string),hour:r.nullable(t.string),minute:r.nullable(t.string),second:r.nullable(t.string)})]),id:t.string,ariaLabelledBy:t.string,ariaDescribedBy:t.string,ariaLabel:t.string,min:t.instanceOf(Date),max:t.instanceOf(Date),name:t.string,popupSettings:t.shape({animate:r.nullable(t.bool),appendTo:r.nullable(t.any),popupClass:r.nullable(t.string)}),show:t.bool,tabIndex:t.number,title:t.string,value:t.instanceOf(Date),weekNumber:t.bool,width:t.oneOfType([t.number,t.string]),validationMessage:t.string,required:t.bool,valid:t.bool,size:t.oneOf(["small","medium","large"]),rounded:t.oneOf(["small","medium","large","full","none"]),fillMode:t.oneOf(["solid","flat","outline"]),adaptive:t.bool,adaptiveTitle:t.string,adaptiveSubtitle:t.string,autoFocus:t.bool,inputAttributes:t.object};const l={defaultShow:!1,defaultValue:null,dateInput:dt.DateInputInner,calendar:ft.Calendar,toggleButton:pt.ToggleButton,popup:st.Popup,disabled:!1,format:"d",max:r.MAX_DATE,min:r.MIN_DATE,popupSettings:{},tabIndex:0,weekNumber:!1,validityStyles:!0,size:void 0,rounded:void 0,fillMode:void 0,autoFocus:!1},fe=u.createPropsContext();U.displayName="KendoReactDatePicker";exports.DatePicker=U;exports.DatePickerPropsContext=fe;exports.datePickerDefaultProps=l;
|