@progress/kendo-react-dateinputs 11.0.0-develop.2 → 11.0.0-develop.20
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/codemods/utils.js +9 -0
- package/codemods/v11/dateinput-handle.js +9 -0
- package/codemods/v11/datepicker-handle.js +9 -0
- package/common/AdaptiveMode.js +1 -1
- package/common/AdaptiveMode.mjs +14 -13
- package/dateinput/DateInput.js +1 -1
- package/dateinput/DateInput.mjs +1 -1
- package/datepicker/DatePicker.js +1 -1
- package/datepicker/DatePicker.mjs +166 -159
- package/daterangepicker/DateRangePicker.js +1 -1
- package/daterangepicker/DateRangePicker.mjs +17 -15
- package/datetimepicker/DateTimePicker.js +1 -1
- package/datetimepicker/DateTimePicker.mjs +49 -46
- package/datetimepicker/DateTimeSelector.js +1 -1
- package/datetimepicker/DateTimeSelector.mjs +23 -21
- package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
- package/index.d.mts +63 -26
- package/index.d.ts +63 -26
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +29 -9
- package/timepicker/TimePicker.js +1 -1
- package/timepicker/TimePicker.mjs +39 -37
- package/timepicker/TimeSelector.js +1 -1
- package/timepicker/TimeSelector.mjs +49 -48
- package/utils.js +1 -1
- package/utils.mjs +3 -1
- package/virtualization/Virtualization.js +1 -1
- package/virtualization/Virtualization.mjs +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=(e,r,i,o)=>{const s=r.find(e.ImportDeclaration,{source:{value:o}});if(s.size()>0){const t=s.get(0).node.specifiers;t.some(n=>n.type==="ImportSpecifier"&&n.imported.name===i)||t.push(e.importSpecifier(e.identifier(i)))}else{const t=e.importDeclaration([e.importSpecifier(e.identifier(i))],e.literal(o));r.get().node.program.body.unshift(t)}};exports.ensureImportExists=p;
|
|
9
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2thZ2VzL2RhdGVpbnB1dHMvY29kZW1vZHMvdXRpbHMudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSlNDb2Rlc2hpZnQgfSBmcm9tICdqc2NvZGVzaGlmdCc7XG5cbmV4cG9ydCBjb25zdCBlbnN1cmVJbXBvcnRFeGlzdHMgPSAoajogSlNDb2Rlc2hpZnQsIHJvb3Q6IGFueSwgaW1wb3J0TmFtZTogc3RyaW5nLCBzb3VyY2U6IHN0cmluZykgPT4ge1xuICAgIGNvbnN0IGltcG9ydERlY2xhcmF0aW9uID0gcm9vdC5maW5kKGouSW1wb3J0RGVjbGFyYXRpb24sIHtcbiAgICAgICAgc291cmNlOiB7IHZhbHVlOiBzb3VyY2UgfVxuICAgIH0pO1xuXG4gICAgaWYgKGltcG9ydERlY2xhcmF0aW9uLnNpemUoKSA+IDApIHtcbiAgICAgICAgY29uc3Qgc3BlY2lmaWVycyA9IGltcG9ydERlY2xhcmF0aW9uLmdldCgwKS5ub2RlLnNwZWNpZmllcnM7XG4gICAgICAgIGNvbnN0IGFscmVhZHlJbXBvcnRlZCA9IHNwZWNpZmllcnMuc29tZShcbiAgICAgICAgICAgIChzcGVjaWZpZXI6IGFueSkgPT4gc3BlY2lmaWVyLnR5cGUgPT09ICdJbXBvcnRTcGVjaWZpZXInICYmIHNwZWNpZmllci5pbXBvcnRlZC5uYW1lID09PSBpbXBvcnROYW1lXG4gICAgICAgICk7XG5cbiAgICAgICAgaWYgKCFhbHJlY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GtCQUFrQixDQUFDQSxFQUFFLGdCQUFnQkEsRUFBRSxXQUFXRSxDQUFVLENBQUMsQ0FBQyxFQUFHRixFQUFFLFFBQVFHLENBQU0sQ0FBQyxFQUN0R0YsRUFBSyxNQUFNLEtBQUssUUFBUSxLQUFLLFFBQVFNLENBQVMsQ0FDbEQsQ0FDSiJ9
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";const p=require("../utils.js");function a(r,c){const s=c.jscodeshift,t=s(r.source);if(!(r.path.endsWith(".ts")||r.path.endsWith(".tsx")))return t.toSource();let o=!1;const i=e=>{e&&e.type==="Identifier"&&e.name==="DateInput"&&(e.name="DateInputHandle",o=!0)};return t.find(s.TSTypeReference).forEach(e=>{const{typeName:n}=e.node;i(n)}),t.find(s.TSAsExpression).forEach(e=>{const{typeAnnotation:n}=e.node;n&&n.type==="TSTypeReference"&&i(n.typeName)}),o&&p.ensureImportExists(s,t,"DateInputHandle","@progress/kendo-react-dateinputs"),t.toSource()}module.exports=a;
|
|
9
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZWlucHV0LWhhbmRsZS5qcyIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvZGF0ZWlucHV0cy9jb2RlbW9kcy92MTEvZGF0ZWlucHV0LWhhbmRsZS50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBBUEksIEZpbGVJbmZvLCBKU0NvZGVzaGlmdCB9IGZyb20gJ2pzY29kZXNoaWZ0JztcbmltcG9ydCB7IGVuc3VyZUltcG9ydEV4aXN0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iLCJoYXNDaGFuZ2VzIiwicmVwbGFjZVR5cGVOYW1lIiwidHlwZU5hbWUiLCJwYXRoIiwidHlwZUFubm90YXRpb24iLCJlbnN1cmVJbXBvcnRFeGlzdHMiXSwibWFwcGluZ3MiOiI0Q0FHQSxTQUFBQSxFQUF5QkMsRUFBb0JDLEVBQVUsQ0FDbkQsTUFBTUMsRUFBaUJELEVBQUksWUFDckJFLEVBQU9ELEVBQUVGLEVBQVMsTUFBTSxFQUk5QixHQUFJLEVBRGlCQSxFQUFTLEtBQUssU0FBUyxLQUFLLEdBQUtBLEVBQVMsS0FBSyxTQUFTLE1BQU0sR0FFL0UsT0FBT0csRUFBSyxXQUdoQixJQUFJQyxFQUFhLEdBR1gsTUFBQUMsRUFBbUJDLEdBQWtCLENBQ25DQSxHQUFZQSxFQUFTLE9BQVMsY0FBZ0JBLEVBQVMsT0FBUyxjQUNoRUEsRUFBUyxLQUFPLGtCQUNIRixFQUFBLEdBQ2pCLEVBSUosT0FBQUQsRUFBSyxLQUFLRCxFQUFFLGVBQWUsRUFBRSxRQUFTSyxHQUFTLENBQ3JDLEtBQUEsQ0FBRSxTQUFBRCxDQUFTLEVBQUlDLEVBQUssS0FDMUJGLEVBQWdCQyxDQUFRLENBQUEsQ0FDM0IsRUFHREgsRUFBSyxLQUFLRCxFQUFFLGNBQWMsRUFBRSxRQUFTSyxHQUFTLENBQ3BDLEtBQUEsQ0FBRSxlQUFBQyxDQUFlLEVBQUlELEVBQUssS0FDNUJDLEdBQWtCQSxFQUFlLE9BQVMsbUJBQzFDSCxFQUFnQkcsRUFBZSxRQUFRLENBQzNDLENBQ0gsRUFHR0osR0FDbUJLLEVBQUFBLG1CQUFBUCxFQUFHQyxFQUFNLGtCQUFtQixrQ0FBa0MsRUFHOUVBLEVBQUssVUFDaEIifQ==
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";const a=require("../utils.js");function p(r,o){const n=o.jscodeshift,t=n(r.source);if(!(r.path.endsWith(".ts")||r.path.endsWith(".tsx")))return t.toSource();let c=!1;const i=e=>{e&&e.type==="Identifier"&&e.name==="DatePicker"&&(e.name="DatePickerHandle",c=!0)};return t.find(n.TSTypeReference).forEach(e=>{const{typeName:s}=e.node;i(s)}),t.find(n.TSAsExpression).forEach(e=>{const{typeAnnotation:s}=e.node;s&&s.type==="TSTypeReference"&&i(s.typeName)}),c&&a.ensureImportExists(n,t,"DatePickerHandle","@progress/kendo-react-dateinputs"),t.toSource()}module.exports=p;
|
|
9
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZXBpY2tlci1oYW5kbGUuanMiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2RhdGVpbnB1dHMvY29kZW1vZHMvdjExL2RhdGVwaWNrZXItaGFuZGxlLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEFQSSwgRmlsZUluZm8sIEpTQ29kZXNoaWZ0IH0gZnJvbSAnanNjb2Rlc2hpZnQnO1xuaW1wb3J0IHsgZW5zdXJlSW1wb3J0RXhpc3RzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiAoZmlsZUluZm86IEZpbGVJbmZvLCBhcGk6IEFQSSkge1xuICAgIGNvbnN0IGo6IEpTQ29kZXNoaWZ0ID0gYXBpLmpzY29kZXNoaWZ0O1xuICAgIGNvbnN0IHJvb3QgPSBqKGZpbGVJbmZvLnNvdXJjZSk7XG5cbiAgICAvLyBDaGVjayBpZiB0aGUgZmlsZSBpcyBUeXBlU2NyaX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TLEtBQUssU0FBUyxLQUFLLEdBQUtBLEVBQVMsS0FBSyxTQUFTLE1BQU0sR0FFL0UsT0FBT0csRUFBSyxXQUdoQixJQUFJQyxFQUFhLEdBR1gsTUFBQUMsRUFBbUJDLEdBQWtCLENBQ25DQSxHQUFZQSxFQUFTLE9BQVMsY0FBZ0JBLEVBQVMsT0FBUyxlQUNoRUEsRUFBUyxLQUFPLG1CQUNIRixFQUFBLEdBQ2pCLEVBSUosT0FBQUQsRUFBSyxLQUFLRCxFQUFFLGVBQWUsRUFBRSxRQUFTSyxHQUFTLENBQ3JDLEtBQUEsQ0FBRSxTQUFBRCxDQUFTLEVBQUlDLEVBQUssS0FDMUJGLEVBQWdCQyxDQUFRLENBQUEsQ0FDM0IsRUFHREgsRUFBSyxLQUFLRCxFQUFFLGNBQWMsRUFBRSxRQUFTSyxHQUFTLENBQ3BDLEtBQUEsQ0FBRSxlQUFBQyxDQUFlLEVBQUlELEVBQUssS0FDNUJDLEdBQWtCQSxFQUFlLE9BQVMsbUJBQzFDSCxFQUFnQkcsRUFBZSxRQUFRLENBQzNDLENBQ0gsRUFHR0osR0FDbUJLLEVBQUFBLG1CQUFBUCxFQUFHQyxFQUFNLG1CQUFvQixrQ0FBa0MsRUFHL0VBLEVBQUssVUFDaEIifQ==
|
package/common/AdaptiveMode.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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react"),c=require("@progress/kendo-react-layout"),h=require("@progress/kendo-svg-icons"),i=require("@progress/kendo-react-buttons"),k=require("@progress/kendo-react-common");function x(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>t[a]})}}return e.default=t,Object.freeze(e)}const n=x(v),C=t=>{const{footer:e,windowWidth:a=0,mobileFilter:o,children:s,navigatable:d,navigatableElements:u,expand:b,animation:m,title:p,subTitle:f,onClose:r}=t,g=()=>n.createElement(i.Button,{tabIndex:0,"aria-label":"Cancel","aria-disabled":"false",type:"button",fillMode:"flat",size:"large",themeColor:"primary",svgIcon:h.checkIcon,onClick:r}),l=k.useAdaptiveModeContext(),y={navigatable:d||!1,navigatableElements:u||[],expand:b,animation:m!==!1,suffixActions:g(),filter:o,onClose:r,animationStyles:l&&a<=l.small?{top:0,width:"100%",height:"100%"}:void 0,title:p,subTitle:f,className:"k-adaptive-actionsheet",position:l&&a<=l.small?"fullscreen":void 0};return n.createElement(c.ActionSheet,{...y},s,e&&n.createElement(c.ActionSheetFooter,{className:"k-actions k-actions-stretched"},n.createElement(i.Button,{size:"large",tabIndex:0,"aria-label":e.cancelText,"aria-disabled":"false",type:"button",onClick:e.onCancel},e.cancelText),n.createElement(i.Button,{tabIndex:0,themeColor:"primary",size:"large","aria-label":e.applyText,"aria-disabled":"false",type:"button",onClick:e.onApply},e.applyText)))};exports.AdaptiveMode=C;
|
package/common/AdaptiveMode.mjs
CHANGED
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as t from "react";
|
|
9
9
|
import { ActionSheet as u, ActionSheetFooter as v } from "@progress/kendo-react-layout";
|
|
10
|
-
import {
|
|
10
|
+
import { checkIcon as C } from "@progress/kendo-svg-icons";
|
|
11
11
|
import { Button as o } from "@progress/kendo-react-buttons";
|
|
12
12
|
import { useAdaptiveModeContext as g } from "@progress/kendo-react-common";
|
|
13
|
-
const I = (
|
|
13
|
+
const I = (n) => {
|
|
14
14
|
const {
|
|
15
15
|
footer: e,
|
|
16
|
-
windowWidth:
|
|
16
|
+
windowWidth: l = 0,
|
|
17
17
|
mobileFilter: r,
|
|
18
18
|
children: s,
|
|
19
19
|
navigatable: c,
|
|
@@ -22,8 +22,8 @@ const I = (i) => {
|
|
|
22
22
|
animation: p,
|
|
23
23
|
title: b,
|
|
24
24
|
subTitle: f,
|
|
25
|
-
onClose:
|
|
26
|
-
} =
|
|
25
|
+
onClose: i
|
|
26
|
+
} = n, h = () => /* @__PURE__ */ t.createElement(
|
|
27
27
|
o,
|
|
28
28
|
{
|
|
29
29
|
tabIndex: 0,
|
|
@@ -31,25 +31,26 @@ const I = (i) => {
|
|
|
31
31
|
"aria-disabled": "false",
|
|
32
32
|
type: "button",
|
|
33
33
|
fillMode: "flat",
|
|
34
|
-
|
|
34
|
+
size: "large",
|
|
35
|
+
themeColor: "primary",
|
|
35
36
|
svgIcon: C,
|
|
36
|
-
onClick:
|
|
37
|
+
onClick: i
|
|
37
38
|
}
|
|
38
|
-
), a = g(),
|
|
39
|
+
), a = g(), x = {
|
|
39
40
|
navigatable: c || !1,
|
|
40
41
|
navigatableElements: m || [],
|
|
41
42
|
expand: d,
|
|
42
43
|
animation: p !== !1,
|
|
43
|
-
suffixActions:
|
|
44
|
+
suffixActions: h(),
|
|
44
45
|
filter: r,
|
|
45
|
-
onClose:
|
|
46
|
-
animationStyles: a &&
|
|
46
|
+
onClose: i,
|
|
47
|
+
animationStyles: a && l <= a.small ? { top: 0, width: "100%", height: "100%" } : void 0,
|
|
47
48
|
title: b,
|
|
48
49
|
subTitle: f,
|
|
49
50
|
className: "k-adaptive-actionsheet",
|
|
50
|
-
position: a &&
|
|
51
|
+
position: a && l <= a.small ? "fullscreen" : void 0
|
|
51
52
|
};
|
|
52
|
-
return /* @__PURE__ */ t.createElement(u, { ...
|
|
53
|
+
return /* @__PURE__ */ t.createElement(u, { ...x }, s, e && /* @__PURE__ */ t.createElement(v, { className: "k-actions k-actions-stretched" }, /* @__PURE__ */ t.createElement(
|
|
53
54
|
o,
|
|
54
55
|
{
|
|
55
56
|
size: "large",
|
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 Ve=require("react"),e=require("prop-types"),I=require("@progress/kendo-date-math"),$=require("@progress/kendo-react-buttons"),G=require("@progress/kendo-svg-icons"),Z=require("@progress/kendo-react-intl"),i=require("@progress/kendo-react-common"),Le=require("@progress/kendo-react-labels"),Ne=require("@progress/kendo-dateinputs-common"),q=require("./utils.js"),u=require("../utils.js"),c=require("../messages/index.js"),pe=require("../timepicker/utils.js"),Ae=require("../common/ClearButton.js"),_e=require("./dateInputIntl.js");function Be(t){const b=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const m in t)if(m!=="default"){const O=Object.getOwnPropertyDescriptor(t,m);Object.defineProperty(b,m,O.get?O:{enumerable:!0,get:()=>t[m]})}}return b.default=t,Object.freeze(b)}const a=Be(Ve),je="Please enter a valid value!",L=a.forwardRef((t,b)=>{var Y;const m=i.useId(t.id),O=Z.useInternationalization(),E=Z.useLocalization(),Q=i.useUnstyled(),N=i.usePropsContext(V,t).unstyled||Q,{format:R=r.format,size:ee=r.size,rounded:te=r.rounded,fillMode:ne=r.fillMode,formatPlaceholder:ae=r.formatPlaceholder,spinners:re=r.spinners,disabled:C=r.disabled,min:le=r.min,max:ue=r.max,minTime:ie=r.minTime,maxTime:oe=r.maxTime,validityStyles:se=r.validityStyles,validationMessage:p=r.validationMessage,placeholder:y=r.placeholder,enableMouseWheel:ce=r.enableMouseWheel,autoCorrectParts:de=r.autoCorrectParts,autoSwitchParts:fe=r.autoSwitchParts,allowCaretMode:me=r.allowCaretMode,twoDigitYearMax:ge=r.twoDigitYearMax,ariaHasPopup:ve=r.ariaHasPopup,autoFocus:be=r.autoFocus}=i.usePropsContext(V,t),g=()=>M.current!==void 0?M.current:o.current&&o.current.value,A=()=>{const n=o.current&&o.current.currentText||"",l=g();return y!=null&&!Re.focused&&!l?y:n},_=()=>t.required!==void 0?t.required:!1,P=()=>{const n=g()||t.value,l=le,X=ue,Te=q.isInRange(n,l,X)&&pe.isInTimeRange(n,ie,oe),Se=p!==void 0,ke=(!_()||n!=null)&&Te,qe=t.valid!==void 0?t.valid:ke;return{customError:Se,rangeOverflow:n&&X.getTime()<n.getTime()||!1,rangeUnderflow:n&&n.getTime()<l.getTime()||!1,valid:qe,valueMissing:n===null}},ye=()=>{s.current&&s.current.focus()},B=()=>new _e.DateInputIntl(O),x=()=>{const n=g();return{format:R,steps:t.steps,formatPlaceholder:ae,placeholder:y,selectPreviousSegmentOnBackspace:!0,value:t.value||n,intlService:B(),autoFill:t.autoFill!==void 0?t.autoFill:!1,enableMouseWheel:ce,autoCorrectParts:de,autoSwitchParts:fe,autoSwitchKeys:t.autoSwitchKeys||[],twoDigitYearMax:ge,allowCaretMode:me}},he=n=>{d.current&&d.current.classList.add("k-focus"),U({focused:!0})},De=n=>{d.current&&d.current.classList.remove("k-focus"),U({focused:!1})},Ie=(n,l)=>typeof n!=typeof l?!0:typeof n=="string"&&typeof l=="string"?n!==l:typeof n=="object"&&typeof l=="object"?JSON.stringify(n)!==JSON.stringify(l):!1,Oe=n=>typeof n=="string"?n:{inputFormat:n,displayFormat:n},j=n=>{M.current=g(),Pe(),v.current=n,M.current=void 0},F=n=>{t.onChange&&t.onChange(n)},H=n=>{i.getActiveElement(document)===s.current&&n.preventDefault()},Ee=()=>new Ne.DateInput(s.current,{...x(),format:Oe(x().format),events:{focus:he,blur:De,valueChange:j,click:F}}),z=()=>{s.current&&s.current.setCustomValidity&&s.current.setCustomValidity(P().valid?"":p||r.validationMessage)},Ce=n=>{!s.current||!o.current||j(n)},xe=n=>{n.preventDefault();const l=i.getActiveElement(document);s.current&&l!==s.current&&s.current.focus({preventScroll:!0})},f=n=>{const l=g();v.current&&t.onChange&&!I.isEqual(v.current.oldValue,l)&&t.onChange.call(void 0,{syntheticEvent:n,nativeEvent:v.current.event,value:v.current.value,target:w.current}),v.current=null},we=n=>{var l;(l=o.current)==null||l.modifyDateSegmentValue(1),f(n)},Me=n=>{var l;(l=o.current)==null||l.modifyDateSegmentValue(-1),f(n)},w=a.useRef(null),s=a.useRef(null),d=a.useRef(null);a.useImperativeHandle(w,()=>({props:t,get options(){return x()},get text(){return A()},get element(){return s.current},get name(){return t.name},get value(){return g()},get validity(){return P()},focus:ye,updateOnPaste:Ce})),a.useImperativeHandle(b,()=>w.current);const o=a.useRef(null),T=a.useRef(null),S=a.useRef(!1),M=a.useRef(null),v=a.useRef(null),h=a.useRef(t),[Re,U]=a.useState({focused:!1}),[,Pe]=a.useReducer(n=>n+1,0);a.useLayoutEffect(()=>{S.current||(o.current=Ee(),T.current=o.current.dateObject,S.current=!0)},[]),a.useEffect(()=>(z(),S.current||d.current&&d.current.addEventListener("wheel",H,{passive:!1}),()=>{d.current&&d.current.removeEventListener("wheel",H)}),[]),a.useEffect(()=>{z(),o.current&&((Ie(h.current.format,R)||h.current.readonly!==t.readonly||JSON.stringify(h.current.steps)!==JSON.stringify(t.steps)||B().locale!==o.current.options.intlService.locale)&&o.current.setOptions(x(),!0),h.current.value!==t.value&&(T.current.getValue()!==null||t.value!==null)&&T.current.setValue(t.value),t.ariaExpanded!==void 0&&t.ariaExpanded&&(o.current.options.placeholder=null),t.ariaExpanded!==void 0&&!t.ariaExpanded&&(o.current.options.placeholder=y),o.current.refreshElementValue(),h.current={format:R,readonly:t.readonly,ariaExpanded:t.ariaExpanded,steps:t.steps,value:t.value})});const W=t.id||m+"-accessibility-id",D=N&&N.uDateInput,K=A(),k=!se||P().valid;a.useImperativeHandle(t._ref,()=>w.current);const J=a.createElement("span",{ref:n=>{d.current=n},style:t.label?void 0:{width:t.width},dir:t.dir,className:i.classNames(i.uDateInput.wrapper({c:D,size:ee,fillMode:ne,rounded:te,disabled:C,required:_(),invalid:!k}),t.className)},a.createElement("input",{ref:n=>{s.current=n},role:t.ariaRole||"textbox",readOnly:t.readonly,tabIndex:t.tabIndex||0,disabled:C,title:t.title!==void 0?t.title:K,type:"text",spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoFocus:be,className:i.classNames(i.uDateInput.inputInner({c:D})),id:W,value:K,"aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledBy,"aria-describedby":t.ariaDescribedBy,"aria-haspopup":ve,"aria-disabled":C,"aria-expanded":t.ariaExpanded,"aria-controls":t.ariaControls,"aria-required":t.required,"aria-invalid":!k,onKeyDown:f,onChange:f,onWheel:f,onInput:f,onClick:f,name:t.name,...t.inputAttributes}),t.children,t.clearButton&&t.value&&a.createElement(Ae,{onClick:F,key:"clearbutton"}),re&&a.createElement("span",{className:i.classNames(i.uDateInput.inputSpinner({c:D})),onMouseDown:xe},a.createElement($.Button,{tabIndex:-1,type:"button",rounded:null,className:i.classNames(i.uDateInput.spinnerIncrease({c:D})),icon:"caret-alt-up",svgIcon:G.caretAltUpIcon,"aria-label":E.toLanguageString(c.increaseValue,c.messages[c.increaseValue]),title:E.toLanguageString(c.increaseValue,c.messages[c.increaseValue]),onClick:we}),a.createElement($.Button,{tabIndex:-1,type:"button",rounded:null,className:i.classNames(i.uDateInput.spinnerDecrease({c:D})),icon:"caret-alt-down",svgIcon:G.caretAltDownIcon,"aria-label":E.toLanguageString(c.decreaseValue,c.messages[c.decreaseValue]),title:E.toLanguageString(c.decreaseValue,c.messages[c.decreaseValue]),onClick:Me})));return t.label?a.createElement(Le.FloatingLabel,{label:t.label,editorId:W,editorValue:(Y=s.current)==null?void 0:Y.value,editorValid:k,editorDisabled:C,children:J,style:{width:t.width}}):J});L.propTypes={value:e.instanceOf(Date),format:e.oneOfType([u.nullable(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([u.nullable(e.oneOf(["wide","narrow","short","formatPattern"])),e.shape({year:u.nullable(e.string),month:u.nullable(e.string),day:u.nullable(e.string),hour:u.nullable(e.string),minute:u.nullable(e.string),second:u.nullable(e.string)})]),width:e.oneOfType([e.string,e.number]),tabIndex:e.number,title:e.string,steps:e.shape({year:u.nullable(e.number),month:u.nullable(e.number),day:u.nullable(e.number),hour:u.nullable(e.number),minute:u.nullable(e.number),second:u.nullable(e.number)}),min:e.instanceOf(Date),max:e.instanceOf(Date),disabled:e.bool,spinners:e.bool,name:e.string,dir:e.string,label:e.
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ve=require("react"),e=require("prop-types"),I=require("@progress/kendo-date-math"),$=require("@progress/kendo-react-buttons"),G=require("@progress/kendo-svg-icons"),Z=require("@progress/kendo-react-intl"),i=require("@progress/kendo-react-common"),Le=require("@progress/kendo-react-labels"),Ne=require("@progress/kendo-dateinputs-common"),q=require("./utils.js"),u=require("../utils.js"),c=require("../messages/index.js"),pe=require("../timepicker/utils.js"),Ae=require("../common/ClearButton.js"),_e=require("./dateInputIntl.js");function Be(t){const b=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const m in t)if(m!=="default"){const O=Object.getOwnPropertyDescriptor(t,m);Object.defineProperty(b,m,O.get?O:{enumerable:!0,get:()=>t[m]})}}return b.default=t,Object.freeze(b)}const a=Be(Ve),je="Please enter a valid value!",L=a.forwardRef((t,b)=>{var Y;const m=i.useId(t.id),O=Z.useInternationalization(),E=Z.useLocalization(),Q=i.useUnstyled(),N=i.usePropsContext(V,t).unstyled||Q,{format:R=r.format,size:ee=r.size,rounded:te=r.rounded,fillMode:ne=r.fillMode,formatPlaceholder:ae=r.formatPlaceholder,spinners:re=r.spinners,disabled:C=r.disabled,min:le=r.min,max:ue=r.max,minTime:ie=r.minTime,maxTime:oe=r.maxTime,validityStyles:se=r.validityStyles,validationMessage:p=r.validationMessage,placeholder:y=r.placeholder,enableMouseWheel:ce=r.enableMouseWheel,autoCorrectParts:de=r.autoCorrectParts,autoSwitchParts:fe=r.autoSwitchParts,allowCaretMode:me=r.allowCaretMode,twoDigitYearMax:ge=r.twoDigitYearMax,ariaHasPopup:ve=r.ariaHasPopup,autoFocus:be=r.autoFocus}=i.usePropsContext(V,t),g=()=>M.current!==void 0?M.current:o.current&&o.current.value,A=()=>{const n=o.current&&o.current.currentText||"",l=g();return y!=null&&!Re.focused&&!l?y:n},_=()=>t.required!==void 0?t.required:!1,P=()=>{const n=g()||t.value,l=le,X=ue,Te=q.isInRange(n,l,X)&&pe.isInTimeRange(n,ie,oe),Se=p!==void 0,ke=(!_()||n!=null)&&Te,qe=t.valid!==void 0?t.valid:ke;return{customError:Se,rangeOverflow:n&&X.getTime()<n.getTime()||!1,rangeUnderflow:n&&n.getTime()<l.getTime()||!1,valid:qe,valueMissing:n===null}},ye=()=>{s.current&&s.current.focus()},B=()=>new _e.DateInputIntl(O),x=()=>{const n=g();return{format:R,steps:t.steps,formatPlaceholder:ae,placeholder:y,selectPreviousSegmentOnBackspace:!0,value:t.value||n,intlService:B(),autoFill:t.autoFill!==void 0?t.autoFill:!1,enableMouseWheel:ce,autoCorrectParts:de,autoSwitchParts:fe,autoSwitchKeys:t.autoSwitchKeys||[],twoDigitYearMax:ge,allowCaretMode:me}},he=n=>{d.current&&d.current.classList.add("k-focus"),U({focused:!0})},De=n=>{d.current&&d.current.classList.remove("k-focus"),U({focused:!1})},Ie=(n,l)=>typeof n!=typeof l?!0:typeof n=="string"&&typeof l=="string"?n!==l:typeof n=="object"&&typeof l=="object"?JSON.stringify(n)!==JSON.stringify(l):!1,Oe=n=>typeof n=="string"?n:{inputFormat:n,displayFormat:n},j=n=>{M.current=g(),Pe(),v.current=n,M.current=void 0},F=n=>{t.onChange&&t.onChange(n)},H=n=>{i.getActiveElement(document)===s.current&&n.preventDefault()},Ee=()=>new Ne.DateInput(s.current,{...x(),format:Oe(x().format),events:{focus:he,blur:De,valueChange:j,click:F}}),z=()=>{s.current&&s.current.setCustomValidity&&s.current.setCustomValidity(P().valid?"":p||r.validationMessage)},Ce=n=>{!s.current||!o.current||j(n)},xe=n=>{n.preventDefault();const l=i.getActiveElement(document);s.current&&l!==s.current&&s.current.focus({preventScroll:!0})},f=n=>{const l=g();v.current&&t.onChange&&!I.isEqual(v.current.oldValue,l)&&t.onChange.call(void 0,{syntheticEvent:n,nativeEvent:v.current.event,value:v.current.value,target:w.current}),v.current=null},we=n=>{var l;(l=o.current)==null||l.modifyDateSegmentValue(1),f(n)},Me=n=>{var l;(l=o.current)==null||l.modifyDateSegmentValue(-1),f(n)},w=a.useRef(null),s=a.useRef(null),d=a.useRef(null);a.useImperativeHandle(w,()=>({props:t,get options(){return x()},get text(){return A()},get element(){return s.current},get name(){return t.name},get value(){return g()},get validity(){return P()},focus:ye,updateOnPaste:Ce})),a.useImperativeHandle(b,()=>w.current);const o=a.useRef(null),T=a.useRef(null),S=a.useRef(!1),M=a.useRef(null),v=a.useRef(null),h=a.useRef(t),[Re,U]=a.useState({focused:!1}),[,Pe]=a.useReducer(n=>n+1,0);a.useLayoutEffect(()=>{S.current||(o.current=Ee(),T.current=o.current.dateObject,S.current=!0)},[]),a.useEffect(()=>(z(),S.current||d.current&&d.current.addEventListener("wheel",H,{passive:!1}),()=>{d.current&&d.current.removeEventListener("wheel",H)}),[]),a.useEffect(()=>{z(),o.current&&((Ie(h.current.format,R)||h.current.readonly!==t.readonly||JSON.stringify(h.current.steps)!==JSON.stringify(t.steps)||B().locale!==o.current.options.intlService.locale)&&o.current.setOptions(x(),!0),h.current.value!==t.value&&(T.current.getValue()!==null||t.value!==null)&&T.current.setValue(t.value),t.ariaExpanded!==void 0&&t.ariaExpanded&&(o.current.options.placeholder=null),t.ariaExpanded!==void 0&&!t.ariaExpanded&&(o.current.options.placeholder=y),o.current.refreshElementValue(),h.current={format:R,readonly:t.readonly,ariaExpanded:t.ariaExpanded,steps:t.steps,value:t.value})});const W=t.id||m+"-accessibility-id",D=N&&N.uDateInput,K=A(),k=!se||P().valid;a.useImperativeHandle(t._ref,()=>w.current);const J=a.createElement("span",{ref:n=>{d.current=n},style:t.label?void 0:{width:t.width},dir:t.dir,className:i.classNames(i.uDateInput.wrapper({c:D,size:ee,fillMode:ne,rounded:te,disabled:C,required:_(),invalid:!k}),t.className)},a.createElement("input",{ref:n=>{s.current=n},role:t.ariaRole||"textbox",readOnly:t.readonly,tabIndex:t.tabIndex||0,disabled:C,title:t.title!==void 0?t.title:K,type:"text",spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoFocus:be,className:i.classNames(i.uDateInput.inputInner({c:D})),id:W,value:K,"aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledBy,"aria-describedby":t.ariaDescribedBy,"aria-haspopup":ve,"aria-disabled":C,"aria-expanded":t.ariaExpanded,"aria-controls":t.ariaControls,"aria-required":t.required,"aria-invalid":!k,onKeyDown:f,onChange:f,onWheel:f,onInput:f,onClick:f,name:t.name,...t.inputAttributes}),t.children,t.clearButton&&t.value&&a.createElement(Ae,{onClick:F,key:"clearbutton"}),re&&a.createElement("span",{className:i.classNames(i.uDateInput.inputSpinner({c:D})),onMouseDown:xe},a.createElement($.Button,{tabIndex:-1,type:"button",rounded:null,className:i.classNames(i.uDateInput.spinnerIncrease({c:D})),icon:"caret-alt-up",svgIcon:G.caretAltUpIcon,"aria-label":E.toLanguageString(c.increaseValue,c.messages[c.increaseValue]),title:E.toLanguageString(c.increaseValue,c.messages[c.increaseValue]),onClick:we}),a.createElement($.Button,{tabIndex:-1,type:"button",rounded:null,className:i.classNames(i.uDateInput.spinnerDecrease({c:D})),icon:"caret-alt-down",svgIcon:G.caretAltDownIcon,"aria-label":E.toLanguageString(c.decreaseValue,c.messages[c.decreaseValue]),title:E.toLanguageString(c.decreaseValue,c.messages[c.decreaseValue]),onClick:Me})));return t.label?a.createElement(Le.FloatingLabel,{label:t.label,editorId:W,editorValue:(Y=s.current)==null?void 0:Y.value,editorValid:k,editorDisabled:C,children:J,style:{width:t.width}}):J});L.propTypes={value:e.instanceOf(Date),format:e.oneOfType([u.nullable(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([u.nullable(e.oneOf(["wide","narrow","short","formatPattern"])),e.shape({year:u.nullable(e.string),month:u.nullable(e.string),day:u.nullable(e.string),hour:u.nullable(e.string),minute:u.nullable(e.string),second:u.nullable(e.string)})]),width:e.oneOfType([e.string,e.number]),tabIndex:e.number,title:e.string,steps:e.shape({year:u.nullable(e.number),month:u.nullable(e.number),day:u.nullable(e.number),hour:u.nullable(e.number),minute:u.nullable(e.number),second:u.nullable(e.number)}),min:e.instanceOf(Date),max:e.instanceOf(Date),disabled:e.bool,spinners:e.bool,name:e.string,dir:e.string,label:e.node,id:e.string,ariaLabelledBy:e.string,ariaDescribedBy:e.string,ariaLabel:e.string,ariaRole:e.string,ariaHasPopup:e.oneOfType([e.bool,e.oneOf(["grid","dialog"])]),ariaExpanded:e.oneOfType([e.bool]),onChange:e.func,validationMessage:e.string,required: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,inputAttributes:e.object};const r={format:q.DEFAULT_FORMAT,size:"medium",rounded:"medium",fillMode:"solid",formatPlaceholder:q.DEFAULT_FORMAT_PLACEHOLDER,spinners:!1,disabled:!1,max:I.cloneDate(u.MAX_DATE),min:I.cloneDate(u.MIN_DATE),minTime:I.cloneDate(u.MIN_TIME),maxTime:I.cloneDate(u.MAX_TIME),validityStyles:!0,validationMessage:je,placeholder:null,enableMouseWheel:!0,autoCorrectParts:!0,autoSwitchParts:!0,allowCaretMode:!1,twoDigitYearMax:68,ariaHasPopup:"grid",autoFocus:!1},V=i.createPropsContext();L.displayName="KendoReactDateInput";exports.DateInput=L;exports.DateInputPropsContext=V;exports.dateInputDefaultProps=r;
|
package/dateinput/DateInput.mjs
CHANGED
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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const at=require("react"),e=require("prop-types"),ot=require("@progress/kendo-react-popup"),W=require("@progress/kendo-date-math"),i=require("@progress/kendo-react-common"),rt=require("@progress/kendo-svg-icons"),lt=require("../dateinput/DateInput.js"),ut=require("../calendar/components/Calendar.js"),o=require("../utils.js"),j=require("../messages/index.js"),it=require("@progress/kendo-react-intl"),st=require("./ToggleButton.js"),ct=require("../common/PickerWrap.js"),dt=require("../hooks/usePickerFloatingLabel.js"),ft=require("@progress/kendo-react-layout"),mt=require("../common/AdaptiveMode.js");function pt(n){const v=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const m in n)if(m!=="default"){const M=Object.getOwnPropertyDescriptor(n,m);Object.defineProperty(v,m,M.get?M:{enumerable:!0,get:()=>n[m]})}}return v.default=n,Object.freeze(v)}const a=pt(at),U=a.forwardRef((n,v)=>{const m=i.useId(n.id),M=it.useLocalization(),w=i.useAdaptiveModeContext(),{defaultShow:se=l.defaultShow,defaultValue:ce=l.defaultValue,dateInput:de=l.dateInput,calendar:fe=l.calendar,toggleButton:me=l.toggleButton,popup:pe=l.popup,pickerWrap:gt=l.pickerWrap,disabled:y=l.disabled,format:ge=l.format,max:_=l.max,min:T=l.min,popupSettings:k=l.popupSettings,tabIndex:be=l.tabIndex,weekNumber:he=l.weekNumber,validityStyles:H=l.validityStyles,size:B=l.size,rounded:E=l.rounded,fillMode:x=l.fillMode,autoFocus:ve=l.autoFocus,show:Y,autoSwitchParts:we,autoSwitchKeys:ye,twoDigitYearMax:ke,ariaLabel:De,adaptive:bt,adaptiveTitle:Ce=n.label||void 0,adaptiveSubtitle:Pe,formatPlaceholder:Oe,inputAttributes:Me,validationMessage:$,visited:ht,value:q,touched:vt,modified:wt,_adaptiveMode:yt=w,valid:X,focusedDate:Re,id:Se,ariaLabelledBy:Ie,ariaDescribedBy:_e,placeholder:Te,...Z}=i.usePropsContext(ie,n),A=()=>{if(i.canUseDOM)return C.current&&C.current.ownerDocument||window.document},s=()=>!!(h.windowWidth&&w&&h.windowWidth<=(w==null?void 0:w.medium)&&n.adaptive),p=()=>{const t=R.current!==void 0?R.current:q!==void 0?q:h.value;return t!==null?W.cloneDate(t):null},u=()=>S.current!==void 0?S.current:Y!==void 0?Y:h.show,Be=()=>de||l.dateInput,Ee=()=>me||l.toggleButton,xe=()=>fe||l.calendar,qe=()=>pe||l.popup,G=()=>n.required!==void 0?n.required:!1,N=()=>{const t=p()||q||null,r=T,c=_,I=o.isInDateRange(t,r,c),z=$!==void 0,L=(!G()||t!=null)&&I,K=X!==void 0?X:L;return{customError:z,rangeOverflow:t&&c.getTime()<t.getTime()||!1,rangeUnderflow:t&&t.getTime()<r.getTime()||!1,valid:K,valueMissing:t===null}},Ae=t=>{for(const r of t)O({windowWidth:r.target.clientWidth})},Ne=()=>{d.current&&d.current.focus()},J=t=>{f.current=t},g=t=>{u()!==t&&(O({show:t}),t&&n.onOpen&&n.onOpen.call(void 0,{target:D.current}),!t&&n.onClose&&n.onClose.call(void 0,{target:D.current}))},Fe=t=>{const r=p();return r&&t?o.setTime(t,r):t},Ve=t=>{k!=null&&k.onMouseDownOutside&&k.onMouseDownOutside.call(void 0,t)},Q=(t,r)=>{O({value:W.cloneDate(t||void 0)}),R.current=t,S.current=!1,s()||(b.current=!0),n.onChange&&n.onChange.call(void 0,{syntheticEvent:r.syntheticEvent,nativeEvent:r.nativeEvent,value:p(),show:u(),target:D.current}),R.current=void 0,S.current=void 0,g(!1)},ze=t=>{const r=Fe(t.value);Q(r,t)},ee=()=>{const{popupClass:t,...r}=k,c=u(),I=p(),z=I&&W.getDate(I),L=i.classNames(t),K={popupClass:"k-datepicker-popup",show:c,anchor:C.current,className:L,id:ne,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...r,onMouseDownOutside:Ve},le={disabled:y,value:z,min:T,max:_,weekNumber:he,focusedDate:Re,className:s()?"k-calendar-lg":"",navigation:!s(),onChange:ze},ue=xe(),nt=qe();return s()?a.createElement(ue,{_ref:J,...le}):a.createElement(nt,{...K},a.createElement(ue,{_ref:J,...le}))},te=()=>{O({focused:!1}),g(!1)},Le=()=>{const{windowWidth:t=0}=h,r={expand:u(),onClose:te,title:Ce,subTitle:Pe,windowWidth:t};return a.createElement(mt.AdaptiveMode,{...r},a.createElement(ft.ActionSheetContent,null,ee()))},Ke=t=>{Q(t.value,t)},We=()=>{O({focused:!0})},je=()=>{g(!u())},F=()=>{y||(b.current=!0,g(!u()))},Ue=t=>{t.preventDefault()},He=t=>{const{altKey:r,keyCode:c}=t;if(c===i.Keys.esc&&u()){b.current=!0,g(!1);return}r&&(c===i.Keys.up||c===i.Keys.down)&&(t.preventDefault(),t.stopPropagation(),b.current=c===i.Keys.up,g(c===i.Keys.down))},D=a.useRef(null),C=a.useRef(null),d=a.useRef(null),f=a.useRef(null);a.useImperativeHandle(D,()=>({props:n,get element(){return C.current},get calendar(){return f.current},get dateInput(){return d.current},get name(){return n.name},get show(){return u()},get validity(){return N()},get value(){return p()},get mobileMode(){return s()},togglePopup:je,focus:Ne})),a.useImperativeHandle(v,()=>D.current);const R=a.useRef(void 0),S=a.useRef(void 0),Ye=a.useRef(null),b=a.useRef(!1),V=a.useRef(!1),P=a.useRef(null),[h,$e]=a.useState({value:ce,show:se,focused:!1}),[,Xe]=a.useReducer(t=>t,!0),O=t=>{$e(r=>({...r,...t}))};a.useEffect(()=>{f.current&&f.current.element&&u()&&!V.current&&f.current.element.focus({preventScroll:!0}),s()&&u()&&!V.current&&setTimeout(()=>{f.current&&f.current.element&&f.current.element.focus({preventScroll:!0})},300),d.current&&d.current.element&&!u()&&b.current&&d.current.element.focus({preventScroll:!0}),V.current=u(),b.current=!1}),a.useEffect(()=>{var t;return P.current=i.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(r=>Ae(r)),u()&&Xe(),(t=A())!=null&&t.body&&P.current&&P.current.observe(A().body),()=>{var r;clearTimeout(Ye.current),(r=A())!=null&&r.body&&P.current&&P.current.disconnect()}},[]);const ne=m+"-popup-id",Ze=ee(),Ge=Be(),Je=p(),Qe=Ee(),et=Le(),ae=!H||N().valid,oe=M.toLanguageString(j.toggleCalendar,j.messages[j.toggleCalendar]),tt={disabled:y,format:ge,formatPlaceholder:Oe,id:Se,ariaLabelledBy:Ie,ariaDescribedBy:_e,ariaLabel:De,max:_,min:T,name:n.name,onChange:Ke,required:n.required,_ref:d,tabIndex:u()?-1:be,title:n.title,valid:N().valid,validationMessage:$,validityStyles:H,value:Je,label:void 0,placeholder:h.focused?null:Te,ariaExpanded:u(),size:null,fillMode:null,rounded:null,autoFill:n.autoFill,twoDigitYearMax:ke,enableMouseWheel:n.enableMouseWheel,autoCorrectParts:n.autoCorrectParts,autoSwitchParts:we,autoSwitchKeys:ye,allowCaretMode:n.allowCaretMode,inputAttributes:Me},re=a.createElement(i.AsyncFocusBlur,{onFocus:We,onBlur:s()?void 0:te,onSyncBlur:n.onBlur,onSyncFocus:n.onFocus},t=>a.createElement(a.Fragment,null,a.createElement("span",{...n.label?{}:Z,ref:C,className:i.classNames("k-input","k-datepicker",{[`k-input-${i.kendoThemeMaps.sizeMap[B]||B}`]:B,[`k-rounded-${i.kendoThemeMaps.roundedMap[E]||E}`]:E,[`k-input-${x}`]:x,"k-invalid":!ae,"k-required":G(),"k-disabled":y},n.className),onKeyDown:He,style:{width:n.width},onFocus:s()?F:t.onFocus,onBlur:t.onBlur,onClick:s()?F:void 0},a.createElement(Ge,{_ref:d,ariaRole:"combobox",ariaExpanded:u(),ariaControls:ne,autoFocus:ve,...tt}),a.createElement(Qe,{type:"button",icon:"calendar",svgIcon:rt.calendarIcon,title:oe,className:"k-input-button",rounded:null,onClick:s()?void 0:F,"aria-label":oe,fillMode:x,onMouseDown:Ue}),!s()&&Ze),s()&&et));return n.label?a.createElement(dt.PickerFloatingLabel,{dateInput:d,label:n.label,editorId:m,editorValid:ae,editorDisabled:y,children:re,style:{width:n.width},...Z}):re});U.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:o.nullable(e.string),pattern:o.nullable(e.string),date:o.nullable(e.oneOf(["short","medium","long","full"])),time:o.nullable(e.oneOf(["short","medium","long","full"])),datetime:o.nullable(e.oneOf(["short","medium","long","full"])),era:o.nullable(e.oneOf(["narrow","short","long"])),year:o.nullable(e.oneOf(["numeric","2-digit"])),month:o.nullable(e.oneOf(["numeric","2-digit","narrow","short","long"])),day:o.nullable(e.oneOf(["numeric","2-digit"])),weekday:o.nullable(e.oneOf(["narrow","short","long"])),hour:o.nullable(e.oneOf(["numeric","2-digit"])),hour12:o.nullable(e.bool),minute:o.nullable(e.oneOf(["numeric","2-digit"])),second:o.nullable(e.oneOf(["numeric","2-digit"])),timeZoneName:o.nullable(e.oneOf(["short","long"]))})]),formatPlaceholder:e.oneOfType([o.nullable(e.oneOf(["wide","narrow","short","formatPattern"])),e.shape({year:o.nullable(e.string),month:o.nullable(e.string),day:o.nullable(e.string),hour:o.nullable(e.string),minute:o.nullable(e.string),second:o.nullable(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:o.nullable(e.bool),appendTo:o.nullable(e.any),popupClass:o.nullable(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,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,adaptiveSubtitle:e.string,autoFocus:e.bool,inputAttributes:e.object};const l={defaultShow:!1,defaultValue:null,dateInput:lt.DateInput,calendar:ut.Calendar,toggleButton:st.ToggleButton,popup:ot.Popup,pickerWrap:ct.PickerWrap,disabled:!1,format:"d",max:o.MAX_DATE,min:o.MIN_DATE,popupSettings:{},tabIndex:0,weekNumber:!1,validityStyles:!0,size:"medium",rounded:"medium",fillMode:"solid",autoFocus:!1},ie=i.createPropsContext();U.displayName="KendoReactDatePicker";exports.DatePicker=U;exports.DatePickerPropsContext=ie;exports.datePickerDefaultProps=l;
|