@progress/kendo-react-dateinputs 9.4.0-develop.2 → 9.4.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/NOTICE.txt +40 -51
- package/calendar/components/Calendar.js +1 -1
- package/calendar/components/Calendar.mjs +0 -1
- package/calendar/components/CalendarCell.js +1 -1
- package/calendar/components/CalendarCell.mjs +12 -13
- package/calendar/components/CalendarHeaderTitle.js +1 -1
- package/calendar/components/CalendarHeaderTitle.mjs +3 -4
- package/calendar/components/CalendarNavigationItem.js +1 -1
- package/calendar/components/CalendarNavigationItem.mjs +2 -3
- package/calendar/components/CalendarWeekCell.js +1 -1
- package/calendar/components/CalendarWeekCell.mjs +8 -9
- package/calendar/components/Header.js +1 -1
- package/calendar/components/Header.mjs +0 -1
- package/calendar/components/HorizontalViewList.js +1 -1
- package/calendar/components/HorizontalViewList.mjs +0 -1
- package/calendar/components/MultiViewCalendar.js +1 -1
- package/calendar/components/MultiViewCalendar.mjs +0 -1
- package/calendar/components/Navigation.js +1 -1
- package/calendar/components/Navigation.mjs +0 -1
- package/calendar/components/TodayCommand.js +1 -1
- package/calendar/components/TodayCommand.mjs +0 -1
- package/calendar/components/View.js +1 -1
- package/calendar/components/View.mjs +0 -1
- package/calendar/components/ViewList.js +1 -1
- package/calendar/components/ViewList.mjs +0 -1
- package/calendar/models/CalendarViewEnum.js +1 -1
- package/calendar/models/CalendarViewEnum.mjs +0 -1
- package/calendar/models/NavigationAction.js +1 -1
- package/calendar/models/NavigationAction.mjs +0 -1
- package/calendar/models/SelectionRange.js +1 -1
- package/calendar/models/SelectionRange.mjs +0 -1
- package/calendar/services/BusViewService.js +1 -1
- package/calendar/services/BusViewService.mjs +0 -1
- package/calendar/services/CenturyViewService.js +1 -1
- package/calendar/services/CenturyViewService.mjs +0 -1
- package/calendar/services/DOMService.js +1 -1
- package/calendar/services/DOMService.mjs +0 -1
- package/calendar/services/DecadeViewService.js +1 -1
- package/calendar/services/DecadeViewService.mjs +0 -1
- package/calendar/services/MonthViewService.js +1 -1
- package/calendar/services/MonthViewService.mjs +0 -1
- package/calendar/services/NavigationService.js +1 -1
- package/calendar/services/NavigationService.mjs +18 -19
- package/calendar/services/ScrollSyncService.js +1 -1
- package/calendar/services/ScrollSyncService.mjs +0 -1
- package/calendar/services/WeekNamesService.js +1 -1
- package/calendar/services/WeekNamesService.mjs +5 -6
- package/calendar/services/YearViewService.js +1 -1
- package/calendar/services/YearViewService.mjs +0 -1
- package/common/AdaptiveMode.js +1 -1
- package/common/AdaptiveMode.mjs +7 -8
- package/common/ClearButton.js +1 -1
- package/common/ClearButton.mjs +7 -8
- package/common/PickerWrap.js +1 -1
- package/common/PickerWrap.mjs +3 -4
- package/dateinput/DateInput.js +1 -1
- package/dateinput/DateInput.mjs +69 -68
- package/dateinput/dateInputIntl.js +1 -1
- package/dateinput/dateInputIntl.mjs +3 -4
- package/dateinput/utils.js +1 -1
- package/dateinput/utils.mjs +4 -5
- package/datepicker/DatePicker.js +1 -1
- package/datepicker/DatePicker.mjs +203 -197
- package/datepicker/ToggleButton.js +1 -1
- package/datepicker/ToggleButton.mjs +3 -4
- package/daterangepicker/DateRangePicker.js +1 -1
- package/daterangepicker/DateRangePicker.mjs +0 -1
- package/datetimepicker/DateTimePicker.js +1 -1
- package/datetimepicker/DateTimePicker.mjs +0 -1
- package/datetimepicker/DateTimeSelector.js +1 -1
- package/datetimepicker/DateTimeSelector.mjs +0 -1
- package/dist/cdn/js/kendo-react-dateinputs.js +8 -1
- package/hooks/usePickerFloatingLabel.js +1 -1
- package/hooks/usePickerFloatingLabel.mjs +5 -6
- package/index.js +2 -1
- package/messages/index.js +1 -1
- package/messages/index.mjs +5 -6
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -3
- package/package.json +8 -8
- package/timepicker/TimeList.js +1 -1
- package/timepicker/TimeList.mjs +16 -17
- package/timepicker/TimePart.js +1 -1
- package/timepicker/TimePart.mjs +0 -1
- package/timepicker/TimePicker.js +1 -1
- package/timepicker/TimePicker.mjs +0 -1
- package/timepicker/TimeSelector.js +1 -1
- package/timepicker/TimeSelector.mjs +0 -1
- package/timepicker/models/TimePart.js +1 -1
- package/timepicker/models/TimePart.mjs +2 -3
- package/timepicker/services/DOMService.js +1 -1
- package/timepicker/services/DOMService.mjs +0 -1
- package/timepicker/services/DayPeriodService.js +1 -1
- package/timepicker/services/DayPeriodService.mjs +3 -4
- package/timepicker/services/HoursService.js +1 -1
- package/timepicker/services/HoursService.mjs +3 -4
- package/timepicker/services/MinutesService.js +1 -1
- package/timepicker/services/MinutesService.mjs +5 -6
- package/timepicker/services/SecondsService.js +1 -1
- package/timepicker/services/SecondsService.mjs +0 -1
- package/timepicker/utils.js +1 -1
- package/timepicker/utils.mjs +0 -1
- package/utils.js +1 -1
- package/utils.mjs +18 -19
- package/virtualization/Virtualization.js +1 -1
- package/virtualization/Virtualization.mjs +0 -1
- package/virtualization/services/ScrollerService.js +1 -1
- package/virtualization/services/ScrollerService.mjs +0 -1
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
|
|
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"),u=require("@progress/kendo-react-common"),pe=require("@progress/kendo-react-labels"),Le=require("@progress/kendo-dateinputs-common"),q=require("./utils.js"),Ne=require("../package-metadata.js"),i=require("../utils.js"),c=require("../messages/index.js"),Ae=require("../timepicker/utils.js"),_e=require("../common/ClearButton.js"),Be=require("./dateInputIntl.js");function je(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=je(Ve),Fe="Please enter a valid value!",p=a.forwardRef((t,b)=>{var J;u.validatePackage(Ne.packageMetadata);const m=u.useId(t.id),O=Z.useInternationalization(),E=Z.useLocalization(),Q=u.useUnstyled(),L=u.usePropsContext(V,t).unstyled||Q,{format:P=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:N=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}=u.usePropsContext(V,t),g=()=>w.current!==void 0?w.current:o.current&&o.current.value,A=()=>{const n=o.current&&o.current.currentText||"",l=g();return y!=null&&!Pe.focused&&!l?y:n},_=()=>t.required!==void 0?t.required:!1,R=()=>{const n=g()||t.value,l=le,X=ue,Te=q.isInRange(n,l,X)&&Ae.isInTimeRange(n,ie,oe),Se=N!==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 Be.DateInputIntl(O),x=()=>{const n=g();return{format:P,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=>{w.current=g(),Re(),v.current=n,w.current=void 0},F=n=>{t.onChange&&t.onChange(n)},H=n=>{u.getActiveElement(document)===s.current&&n.preventDefault()},Ee=()=>new Le.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(R().valid?"":N||r.validationMessage)},Ce=n=>{!s.current||!o.current||j(n)},xe=n=>{n.preventDefault();const l=u.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:M.current}),v.current=null},Me=n=>{var l;(l=o.current)==null||l.modifyDateSegmentValue(1),f(n)},we=n=>{var l;(l=o.current)==null||l.modifyDateSegmentValue(-1),f(n)},M=a.useRef(null),s=a.useRef(null),d=a.useRef(null);a.useImperativeHandle(M,()=>({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 R()},focus:ye,updateOnPaste:Ce})),a.useImperativeHandle(b,()=>M.current);const o=a.useRef(null),T=a.useRef(null),S=a.useRef(!1),w=a.useRef(null),v=a.useRef(null),h=a.useRef(t),[Pe,U]=a.useState({focused:!1}),[,Re]=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,P)||h.current.readonly!==t.readonly||h.current.steps!==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:P,readonly:t.readonly,ariaExpanded:t.ariaExpanded,steps:t.steps,value:t.value})});const W=t.id||m+"-accessibility-id",D=L&&L.uDateInput,K=A(),k=!se||R().valid;a.useImperativeHandle(t._ref,()=>M.current);const Y=a.createElement("span",{ref:n=>d.current=n,style:t.label?void 0:{width:t.width},dir:t.dir,className:u.classNames(u.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:u.classNames(u.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(_e,{onClick:F,key:"clearbutton"}),re&&a.createElement("span",{className:u.classNames(u.uDateInput.inputSpinner({c:D})),onMouseDown:xe},a.createElement($.Button,{tabIndex:-1,type:"button",rounded:null,className:u.classNames(u.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:Me}),a.createElement($.Button,{tabIndex:-1,type:"button",rounded:null,className:u.classNames(u.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:we})));return t.label?a.createElement(pe.FloatingLabel,{label:t.label,editorId:W,editorValue:(J=s.current)==null?void 0:J.value,editorValid:k,editorDisabled:C,children:Y,style:{width:t.width}}):Y});p.propTypes={value:e.instanceOf(Date),format:e.oneOfType([i.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([i.nullable(e.oneOf(["wide","narrow","short","formatPattern"])),e.shape({year:i.nullable(e.string),month:i.nullable(e.string),day:i.nullable(e.string),hour:i.nullable(e.string),minute:i.nullable(e.string),second:i.nullable(e.string)})]),width:e.oneOfType([e.string,e.number]),tabIndex:e.number,title:e.string,steps:e.shape({year:i.nullable(e.number),month:i.nullable(e.number),day:i.nullable(e.number),hour:i.nullable(e.number),minute:i.nullable(e.number),second:i.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.string,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(i.MAX_DATE),min:I.cloneDate(i.MIN_DATE),minTime:I.cloneDate(i.MIN_TIME),maxTime:I.cloneDate(i.MAX_TIME),validityStyles:!0,validationMessage:Fe,placeholder:null,enableMouseWheel:!0,autoCorrectParts:!0,autoSwitchParts:!0,allowCaretMode:!1,twoDigitYearMax:68,ariaHasPopup:"grid",autoFocus:!1},V=u.createPropsContext();p.displayName="KendoReactDateInput";exports.DateInput=p;exports.DateInputPropsContext=V;exports.dateInputDefaultProps=r;
|
package/dateinput/DateInput.mjs
CHANGED
|
@@ -5,28 +5,27 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as a from "react";
|
|
10
9
|
import e from "prop-types";
|
|
11
10
|
import { cloneDate as x, isEqual as Ve } from "@progress/kendo-date-math";
|
|
12
11
|
import { Button as Y } from "@progress/kendo-react-buttons";
|
|
13
|
-
import { caretAltUpIcon as
|
|
14
|
-
import { useInternationalization as
|
|
15
|
-
import { validatePackage as
|
|
12
|
+
import { caretAltUpIcon as Ne, caretAltDownIcon as _e } from "@progress/kendo-svg-icons";
|
|
13
|
+
import { useInternationalization as Fe, useLocalization as He } from "@progress/kendo-react-intl";
|
|
14
|
+
import { validatePackage as Be, useId as qe, useUnstyled as ze, usePropsContext as J, classNames as y, uDateInput as b, createPropsContext as Ue, getActiveElement as X } from "@progress/kendo-react-common";
|
|
16
15
|
import { FloatingLabel as We } from "@progress/kendo-react-labels";
|
|
17
16
|
import { DateInput as je } from "@progress/kendo-dateinputs-common";
|
|
18
17
|
import { DEFAULT_FORMAT as Ke, DEFAULT_FORMAT_PLACEHOLDER as Ye, isInRange as Je } from "./utils.mjs";
|
|
19
18
|
import { packageMetadata as Xe } from "../package-metadata.mjs";
|
|
20
|
-
import { nullable as
|
|
21
|
-
import { increaseValue as C, messages as
|
|
19
|
+
import { nullable as u, MAX_DATE as Ge, MIN_DATE as Ze, MIN_TIME as $e, MAX_TIME as Qe } from "../utils.mjs";
|
|
20
|
+
import { increaseValue as C, messages as w, decreaseValue as M } from "../messages/index.mjs";
|
|
22
21
|
import { isInTimeRange as et } from "../timepicker/utils.mjs";
|
|
23
22
|
import tt from "../common/ClearButton.mjs";
|
|
24
23
|
import { DateInputIntl as nt } from "./dateInputIntl.mjs";
|
|
25
24
|
const at = "Please enter a valid value!", Z = a.forwardRef((t, $) => {
|
|
26
25
|
var j;
|
|
27
|
-
|
|
28
|
-
const Q =
|
|
29
|
-
format:
|
|
26
|
+
Be(Xe);
|
|
27
|
+
const Q = qe(t.id), ee = Fe(), h = He(), te = ze(), p = J(G, t).unstyled || te, {
|
|
28
|
+
format: T = r.format,
|
|
30
29
|
size: ne = r.size,
|
|
31
30
|
rounded: ae = r.rounded,
|
|
32
31
|
fillMode: re = r.fillMode,
|
|
@@ -50,7 +49,7 @@ const at = "Please enter a valid value!", Z = a.forwardRef((t, $) => {
|
|
|
50
49
|
} = J(G, t), d = () => D.current !== void 0 ? D.current : l.current && l.current.value, A = () => {
|
|
51
50
|
const n = l.current && l.current.currentText || "", i = d();
|
|
52
51
|
return f != null && !Pe.focused && !i ? f : n;
|
|
53
|
-
}, V = () => t.required !== void 0 ? t.required : !1,
|
|
52
|
+
}, V = () => t.required !== void 0 ? t.required : !1, R = () => {
|
|
54
53
|
const n = d() || t.value, i = oe, K = ue, ke = Je(n, i, K) && et(n, se, ce), pe = L !== void 0, Le = (!V() || n != null) && ke, Ae = t.valid !== void 0 ? t.valid : Le;
|
|
55
54
|
return {
|
|
56
55
|
customError: pe,
|
|
@@ -61,16 +60,16 @@ const at = "Please enter a valid value!", Z = a.forwardRef((t, $) => {
|
|
|
61
60
|
};
|
|
62
61
|
}, Ee = () => {
|
|
63
62
|
o.current && o.current.focus();
|
|
64
|
-
},
|
|
63
|
+
}, N = () => new nt(ee), I = () => {
|
|
65
64
|
const n = d();
|
|
66
65
|
return {
|
|
67
|
-
format:
|
|
66
|
+
format: T,
|
|
68
67
|
steps: t.steps,
|
|
69
68
|
formatPlaceholder: ie,
|
|
70
69
|
placeholder: f,
|
|
71
70
|
selectPreviousSegmentOnBackspace: !0,
|
|
72
71
|
value: t.value || n,
|
|
73
|
-
intlService:
|
|
72
|
+
intlService: N(),
|
|
74
73
|
autoFill: t.autoFill !== void 0 ? t.autoFill : !1,
|
|
75
74
|
enableMouseWheel: me,
|
|
76
75
|
autoCorrectParts: fe,
|
|
@@ -80,17 +79,17 @@ const at = "Please enter a valid value!", Z = a.forwardRef((t, $) => {
|
|
|
80
79
|
allowCaretMode: ve
|
|
81
80
|
};
|
|
82
81
|
}, Ie = (n) => {
|
|
83
|
-
|
|
82
|
+
s.current && s.current.classList.add("k-focus"), q({ focused: !0 });
|
|
84
83
|
}, Oe = (n) => {
|
|
85
|
-
|
|
84
|
+
s.current && s.current.classList.remove("k-focus"), q({ focused: !1 });
|
|
86
85
|
}, De = (n, i) => typeof n != typeof i ? !0 : typeof n == "string" && typeof i == "string" ? n !== i : typeof n == "object" && typeof i == "object" ? JSON.stringify(n) !== JSON.stringify(i) : !1, xe = (n) => typeof n == "string" ? n : {
|
|
87
86
|
inputFormat: n,
|
|
88
87
|
displayFormat: n
|
|
89
|
-
}, N = (n) => {
|
|
90
|
-
D.current = d(), Se(), m.current = n, D.current = void 0;
|
|
91
88
|
}, _ = (n) => {
|
|
92
|
-
|
|
89
|
+
D.current = d(), Se(), m.current = n, D.current = void 0;
|
|
93
90
|
}, F = (n) => {
|
|
91
|
+
t.onChange && t.onChange(n);
|
|
92
|
+
}, H = (n) => {
|
|
94
93
|
X(document) === o.current && n.preventDefault();
|
|
95
94
|
}, Ce = () => new je(o.current, {
|
|
96
95
|
...I(),
|
|
@@ -98,20 +97,20 @@ const at = "Please enter a valid value!", Z = a.forwardRef((t, $) => {
|
|
|
98
97
|
events: {
|
|
99
98
|
focus: Ie,
|
|
100
99
|
blur: Oe,
|
|
101
|
-
valueChange:
|
|
102
|
-
click:
|
|
100
|
+
valueChange: _,
|
|
101
|
+
click: F
|
|
103
102
|
}
|
|
104
|
-
}),
|
|
103
|
+
}), B = () => {
|
|
105
104
|
o.current && o.current.setCustomValidity && o.current.setCustomValidity(
|
|
106
|
-
|
|
105
|
+
R().valid ? "" : L || r.validationMessage
|
|
107
106
|
);
|
|
108
|
-
}, Re = (n) => {
|
|
109
|
-
!o.current || !l.current || N(n);
|
|
110
107
|
}, we = (n) => {
|
|
108
|
+
!o.current || !l.current || _(n);
|
|
109
|
+
}, Me = (n) => {
|
|
111
110
|
n.preventDefault();
|
|
112
111
|
const i = X(document);
|
|
113
112
|
o.current && i !== o.current && o.current.focus({ preventScroll: !0 });
|
|
114
|
-
},
|
|
113
|
+
}, c = (n) => {
|
|
115
114
|
const i = d();
|
|
116
115
|
m.current && t.onChange && !Ve(m.current.oldValue, i) && t.onChange.call(void 0, {
|
|
117
116
|
syntheticEvent: n,
|
|
@@ -119,13 +118,13 @@ const at = "Please enter a valid value!", Z = a.forwardRef((t, $) => {
|
|
|
119
118
|
value: m.current.value,
|
|
120
119
|
target: O.current
|
|
121
120
|
}), m.current = null;
|
|
122
|
-
}, Me = (n) => {
|
|
123
|
-
var i;
|
|
124
|
-
(i = l.current) == null || i.modifyDateSegmentValue(1), s(n);
|
|
125
121
|
}, Te = (n) => {
|
|
126
122
|
var i;
|
|
127
|
-
(i = l.current) == null || i.modifyDateSegmentValue(
|
|
128
|
-
},
|
|
123
|
+
(i = l.current) == null || i.modifyDateSegmentValue(1), c(n);
|
|
124
|
+
}, Re = (n) => {
|
|
125
|
+
var i;
|
|
126
|
+
(i = l.current) == null || i.modifyDateSegmentValue(-1), c(n);
|
|
127
|
+
}, O = a.useRef(null), o = a.useRef(null), s = a.useRef(null);
|
|
129
128
|
a.useImperativeHandle(
|
|
130
129
|
O,
|
|
131
130
|
() => ({
|
|
@@ -146,33 +145,33 @@ const at = "Please enter a valid value!", Z = a.forwardRef((t, $) => {
|
|
|
146
145
|
return d();
|
|
147
146
|
},
|
|
148
147
|
get validity() {
|
|
149
|
-
return
|
|
148
|
+
return R();
|
|
150
149
|
},
|
|
151
150
|
// hidden methods
|
|
152
151
|
focus: Ee,
|
|
153
|
-
updateOnPaste:
|
|
152
|
+
updateOnPaste: we
|
|
154
153
|
})
|
|
155
154
|
), a.useImperativeHandle($, () => O.current);
|
|
156
|
-
const l = a.useRef(null), P = a.useRef(null), S = a.useRef(!1), D = a.useRef(null), m = a.useRef(null), g = a.useRef(t), [Pe,
|
|
155
|
+
const l = a.useRef(null), P = a.useRef(null), S = a.useRef(!1), D = a.useRef(null), m = a.useRef(null), g = a.useRef(t), [Pe, q] = a.useState({ focused: !1 }), [, Se] = a.useReducer((n) => n + 1, 0);
|
|
157
156
|
a.useLayoutEffect(() => {
|
|
158
157
|
S.current || (l.current = Ce(), P.current = l.current.dateObject, S.current = !0);
|
|
159
|
-
}, []), a.useEffect(() => (
|
|
160
|
-
|
|
158
|
+
}, []), a.useEffect(() => (B(), S.current || s.current && s.current.addEventListener("wheel", H, { passive: !1 }), () => {
|
|
159
|
+
s.current && s.current.removeEventListener("wheel", H);
|
|
161
160
|
}), []), a.useEffect(() => {
|
|
162
|
-
|
|
163
|
-
format:
|
|
161
|
+
B(), l.current && ((De(g.current.format, T) || g.current.readonly !== t.readonly || g.current.steps !== t.steps || N().locale !== l.current.options.intlService.locale) && l.current.setOptions(I(), !0), g.current.value !== t.value && (P.current.getValue() !== null || t.value !== null) && P.current.setValue(t.value), t.ariaExpanded !== void 0 && t.ariaExpanded && (l.current.options.placeholder = null), t.ariaExpanded !== void 0 && !t.ariaExpanded && (l.current.options.placeholder = f), l.current.refreshElementValue(), g.current = {
|
|
162
|
+
format: T,
|
|
164
163
|
readonly: t.readonly,
|
|
165
164
|
ariaExpanded: t.ariaExpanded,
|
|
166
165
|
steps: t.steps,
|
|
167
166
|
value: t.value
|
|
168
167
|
});
|
|
169
168
|
});
|
|
170
|
-
const z = t.id || Q + "-accessibility-id", v = p && p.uDateInput, U = A(), k = !de ||
|
|
169
|
+
const z = t.id || Q + "-accessibility-id", v = p && p.uDateInput, U = A(), k = !de || R().valid;
|
|
171
170
|
a.useImperativeHandle(t._ref, () => O.current);
|
|
172
171
|
const W = /* @__PURE__ */ a.createElement(
|
|
173
172
|
"span",
|
|
174
173
|
{
|
|
175
|
-
ref: (n) =>
|
|
174
|
+
ref: (n) => s.current = n,
|
|
176
175
|
style: t.label ? void 0 : { width: t.width },
|
|
177
176
|
dir: t.dir,
|
|
178
177
|
className: y(
|
|
@@ -214,18 +213,18 @@ const at = "Please enter a valid value!", Z = a.forwardRef((t, $) => {
|
|
|
214
213
|
"aria-controls": t.ariaControls,
|
|
215
214
|
"aria-required": t.required,
|
|
216
215
|
"aria-invalid": !k,
|
|
217
|
-
onKeyDown:
|
|
218
|
-
onChange:
|
|
219
|
-
onWheel:
|
|
220
|
-
onInput:
|
|
221
|
-
onClick:
|
|
216
|
+
onKeyDown: c,
|
|
217
|
+
onChange: c,
|
|
218
|
+
onWheel: c,
|
|
219
|
+
onInput: c,
|
|
220
|
+
onClick: c,
|
|
222
221
|
name: t.name,
|
|
223
222
|
...t.inputAttributes
|
|
224
223
|
}
|
|
225
224
|
),
|
|
226
225
|
t.children,
|
|
227
|
-
t.clearButton && t.value && /* @__PURE__ */ a.createElement(tt, { onClick:
|
|
228
|
-
le && /* @__PURE__ */ a.createElement("span", { className: y(b.inputSpinner({ c: v })), onMouseDown:
|
|
226
|
+
t.clearButton && t.value && /* @__PURE__ */ a.createElement(tt, { onClick: F, key: "clearbutton" }),
|
|
227
|
+
le && /* @__PURE__ */ a.createElement("span", { className: y(b.inputSpinner({ c: v })), onMouseDown: Me }, /* @__PURE__ */ a.createElement(
|
|
229
228
|
Y,
|
|
230
229
|
{
|
|
231
230
|
tabIndex: -1,
|
|
@@ -233,10 +232,10 @@ const at = "Please enter a valid value!", Z = a.forwardRef((t, $) => {
|
|
|
233
232
|
rounded: null,
|
|
234
233
|
className: y(b.spinnerIncrease({ c: v })),
|
|
235
234
|
icon: "caret-alt-up",
|
|
236
|
-
svgIcon:
|
|
237
|
-
"aria-label": h.toLanguageString(C,
|
|
238
|
-
title: h.toLanguageString(C,
|
|
239
|
-
onClick:
|
|
235
|
+
svgIcon: Ne,
|
|
236
|
+
"aria-label": h.toLanguageString(C, w[C]),
|
|
237
|
+
title: h.toLanguageString(C, w[C]),
|
|
238
|
+
onClick: Te
|
|
240
239
|
}
|
|
241
240
|
), /* @__PURE__ */ a.createElement(
|
|
242
241
|
Y,
|
|
@@ -246,10 +245,10 @@ const at = "Please enter a valid value!", Z = a.forwardRef((t, $) => {
|
|
|
246
245
|
rounded: null,
|
|
247
246
|
className: y(b.spinnerDecrease({ c: v })),
|
|
248
247
|
icon: "caret-alt-down",
|
|
249
|
-
svgIcon:
|
|
250
|
-
"aria-label": h.toLanguageString(
|
|
251
|
-
title: h.toLanguageString(
|
|
252
|
-
onClick:
|
|
248
|
+
svgIcon: _e,
|
|
249
|
+
"aria-label": h.toLanguageString(M, w[M]),
|
|
250
|
+
title: h.toLanguageString(M, w[M]),
|
|
251
|
+
onClick: Re
|
|
253
252
|
}
|
|
254
253
|
))
|
|
255
254
|
);
|
|
@@ -269,7 +268,7 @@ const at = "Please enter a valid value!", Z = a.forwardRef((t, $) => {
|
|
|
269
268
|
Z.propTypes = {
|
|
270
269
|
value: e.instanceOf(Date),
|
|
271
270
|
format: e.oneOfType([
|
|
272
|
-
|
|
271
|
+
u(e.string),
|
|
273
272
|
e.shape({
|
|
274
273
|
skeleton: e.string,
|
|
275
274
|
pattern: e.string,
|
|
@@ -289,26 +288,28 @@ Z.propTypes = {
|
|
|
289
288
|
})
|
|
290
289
|
]),
|
|
291
290
|
formatPlaceholder: e.oneOfType([
|
|
292
|
-
|
|
291
|
+
u(
|
|
292
|
+
e.oneOf(["wide", "narrow", "short", "formatPattern"])
|
|
293
|
+
),
|
|
293
294
|
e.shape({
|
|
294
|
-
year: e.string
|
|
295
|
-
month: e.string
|
|
296
|
-
day: e.string
|
|
297
|
-
hour: e.string
|
|
298
|
-
minute: e.string
|
|
299
|
-
second: e.string
|
|
295
|
+
year: u(e.string),
|
|
296
|
+
month: u(e.string),
|
|
297
|
+
day: u(e.string),
|
|
298
|
+
hour: u(e.string),
|
|
299
|
+
minute: u(e.string),
|
|
300
|
+
second: u(e.string)
|
|
300
301
|
})
|
|
301
302
|
]),
|
|
302
303
|
width: e.oneOfType([e.string, e.number]),
|
|
303
304
|
tabIndex: e.number,
|
|
304
305
|
title: e.string,
|
|
305
306
|
steps: e.shape({
|
|
306
|
-
year:
|
|
307
|
-
month:
|
|
308
|
-
day:
|
|
309
|
-
hour:
|
|
310
|
-
minute:
|
|
311
|
-
second:
|
|
307
|
+
year: u(e.number),
|
|
308
|
+
month: u(e.number),
|
|
309
|
+
day: u(e.number),
|
|
310
|
+
hour: u(e.number),
|
|
311
|
+
minute: u(e.number),
|
|
312
|
+
second: u(e.number)
|
|
312
313
|
}),
|
|
313
314
|
min: e.instanceOf(Date),
|
|
314
315
|
max: e.instanceOf(Date),
|
|
@@ -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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@progress/kendo-intl");class s{constructor(t){this.service=t,this.cldr={},this.locale=t.locale,this.format=t.format,this.toString=t.toString,this.formatDate=t.formatDate,this.parseDate=t.parseDate,this.parseNumber=t.parseNumber,this.formatNumber=t.formatNumber,this.splitDateFormat=t.splitDateFormat,this.numberSymbols=t.numberSymbols,this.firstDay=t.firstDay,this.dateFieldName=t.dateFieldName,this.dateFormatNames=(e,o)=>this.service.dateFormatNames(o),this.weekendRange=e=>{};const a=l.localeInfo(this.locale);this.cldr[a.name]=a}}exports.DateInputIntl=s;
|
|
@@ -5,13 +5,12 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
import { localeInfo as l } from "@progress/kendo-intl";
|
|
8
|
+
import { localeInfo as s } from "@progress/kendo-intl";
|
|
10
9
|
class r {
|
|
11
10
|
constructor(t) {
|
|
12
|
-
this.service = t, this.cldr = {}, this.locale = t.locale, this.format = t.format, this.toString = t.toString, this.formatDate = t.formatDate, this.parseDate = t.parseDate, this.parseNumber = t.parseNumber, this.formatNumber = t.formatNumber, this.splitDateFormat = t.splitDateFormat, this.numberSymbols = t.numberSymbols, this.firstDay = t.firstDay, this.dateFieldName = t.dateFieldName, this.dateFormatNames = (o,
|
|
11
|
+
this.service = t, this.cldr = {}, this.locale = t.locale, this.format = t.format, this.toString = t.toString, this.formatDate = t.formatDate, this.parseDate = t.parseDate, this.parseNumber = t.parseNumber, this.formatNumber = t.formatNumber, this.splitDateFormat = t.splitDateFormat, this.numberSymbols = t.numberSymbols, this.firstDay = t.firstDay, this.dateFieldName = t.dateFieldName, this.dateFormatNames = (o, m) => this.service.dateFormatNames(m), this.weekendRange = (o) => {
|
|
13
12
|
};
|
|
14
|
-
const a =
|
|
13
|
+
const a = s(this.locale);
|
|
15
14
|
this.cldr[a.name] = a;
|
|
16
15
|
}
|
|
17
16
|
}
|
package/dateinput/utils.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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E="d",F="wide",L=(A,T,e)=>A===null||!(T&&T>A||e&&e<A);exports.DEFAULT_FORMAT=E;exports.DEFAULT_FORMAT_PLACEHOLDER=F;exports.isInRange=L;
|
package/dateinput/utils.mjs
CHANGED
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"
|
|
9
|
-
const o = "d", E = "wide", F = (s, A, n) => s === null || !(A && A > s || n && n < s);
|
|
8
|
+
const E = "d", F = "wide", L = (A, o, s) => A === null || !(o && o > A || s && s < A);
|
|
10
9
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
E as DEFAULT_FORMAT,
|
|
11
|
+
F as DEFAULT_FORMAT_PLACEHOLDER,
|
|
12
|
+
L as isInRange
|
|
14
13
|
};
|
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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Je=require("react"),e=require("prop-types"),Qe=require("@progress/kendo-react-popup"),K=require("@progress/kendo-date-math"),u=require("@progress/kendo-react-common"),et=require("@progress/kendo-svg-icons"),tt=require("../package-metadata.js"),nt=require("../dateinput/DateInput.js"),at=require("../calendar/components/Calendar.js"),o=require("../utils.js"),L=require("../messages/index.js"),ot=require("@progress/kendo-react-intl"),rt=require("./ToggleButton.js"),lt=require("../common/PickerWrap.js"),ut=require("../hooks/usePickerFloatingLabel.js"),it=require("@progress/kendo-react-layout"),st=require("../common/AdaptiveMode.js");function ct(n){const h=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const f in n)if(f!=="default"){const R=Object.getOwnPropertyDescriptor(n,f);Object.defineProperty(h,f,R.get?R:{enumerable:!0,get:()=>n[f]})}}return h.default=n,Object.freeze(h)}const a=ct(Je),W=a.forwardRef((n,h)=>{u.validatePackage(tt.packageMetadata);const f=u.useId(n.id),R=ot.useLocalization(),v=u.useAdaptiveModeContext(),{defaultShow:se=l.defaultShow,defaultValue:ce=l.defaultValue,dateInput:de=l.dateInput,calendar:fe=l.calendar,toggleButton:me=l.toggleButton,popup:ge=l.popup,pickerWrap:dt=l.pickerWrap,disabled:w=l.disabled,format:pe=l.format,max:_=l.max,min:E=l.min,popupSettings:y=l.popupSettings,tabIndex:be=l.tabIndex,weekNumber:he=l.weekNumber,validityStyles:j=l.validityStyles,size:T=l.size,rounded:q=l.rounded,fillMode:x=l.fillMode,autoFocus:ve=l.autoFocus,show:H,autoSwitchParts:we,autoSwitchKeys:ye,twoDigitYearMax:ke,ariaLabel:De,adaptive:ft,adaptiveTitle:Ce,inputAttributes:Pe,validationMessage:U,visited:mt,value:B,touched:gt,modified:pt,_adaptiveMode:bt=v,valid:Y,focusedDate:Oe,id:Me,...$}=u.usePropsContext(ie,n),A=()=>{if(u.canUseDOM)return D.current&&D.current.ownerDocument||window.document},c=()=>!!(b.windowWidth&&v&&b.windowWidth<=(v==null?void 0:v.medium)&&n.adaptive),m=()=>{const t=P.current!==void 0&&P.current!==null?P.current:B!==void 0?B:b.value;return t!==null?K.cloneDate(t):null},i=()=>I.current!==void 0?I.current:H!==void 0?H:b.show,Re=()=>de||l.dateInput,Ie=()=>me||l.toggleButton,Se=()=>fe||l.calendar,_e=()=>ge||l.popup,X=()=>n.required!==void 0?n.required:!1,N=()=>{const t=m()||B||null,r=E,s=_,S=o.isInDateRange(t,r,s),F=U!==void 0,V=(!X()||t!=null)&&S,z=Y!==void 0?Y:V;return{customError:F,rangeOverflow:t&&s.getTime()<t.getTime()||!1,rangeUnderflow:t&&t.getTime()<r.getTime()||!1,valid:z,valueMissing:t===null}},Ee=t=>{for(const r of t)M({windowWidth:r.target.clientWidth})},Te=()=>{d.current&&d.current.focus()},Z=t=>{C.current=t},g=t=>{i()!==t&&(M({show:t}),t&&n.onOpen&&n.onOpen.call(void 0,{target:k.current}),!t&&n.onClose&&n.onClose.call(void 0,{target:k.current}))},qe=t=>{const r=m();return r&&t?o.setTime(t,r):t},xe=t=>{y!=null&&y.onMouseDownOutside&&y.onMouseDownOutside.call(void 0,t)},G=(t,r)=>{M({value:K.cloneDate(t||void 0)}),P.current=t,I.current=!1,c()||(p.current=!0),n.onChange&&n.onChange.call(void 0,{syntheticEvent:r.syntheticEvent,nativeEvent:r.nativeEvent,value:m(),show:i(),target:k.current}),P.current=void 0,I.current=void 0,g(!1)},Be=t=>{const r=qe(t.value);G(r,t)},J=()=>{const{popupClass:t,...r}=y,s=i(),S=m(),F=S&&K.getDate(S),V=u.classNames(t),z={popupClass:"k-datepicker-popup",show:s,anchor:D.current,className:V,id:ne,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...r,onMouseDownOutside:xe},le={disabled:w,value:F,min:E,max:_,weekNumber:he,focusedDate:Oe,className:c()?"k-calendar-lg":"",navigation:!c(),onChange:Be},ue=Se(),Ge=_e();return c()?a.createElement(ue,{_ref:Z,...le}):a.createElement(Ge,{...z},a.createElement(ue,{_ref:Z,...le}))},Q=()=>{M({focused:!1}),g(!1)},Ae=()=>{const{windowWidth:t=0}=b,r={expand:i(),onClose:Q,adaptiveTitle:Ce,windowWidth:t},s=J();return a.createElement(st.AdaptiveMode,{...r},a.createElement(it.ActionSheetContent,{overflowHidden:!0},s))},Ne=t=>{G(t.value,t)},Fe=()=>{M({focused:!0})},Ve=()=>{g(!i())},ee=()=>{w||(p.current=!0,g(!i()))},ze=t=>{t.preventDefault()},Ke=t=>{const{altKey:r,keyCode:s}=t;if(s===u.Keys.esc&&i()){p.current=!0,g(!1);return}r&&(s===u.Keys.up||s===u.Keys.down)&&(t.preventDefault(),t.stopPropagation(),p.current=s===u.Keys.up,g(s===u.Keys.down))},k=a.useRef(null),D=a.useRef(null),d=a.useRef(null),C=a.useRef(null);a.useImperativeHandle(k,()=>({props:n,get element(){return D.current},get calendar(){return C.current},get dateInput(){return d.current},get name(){return n.name},get show(){return i()},get validity(){return N()},get value(){return m()},get mobileMode(){return c()},togglePopup:Ve,focus:Te})),a.useImperativeHandle(h,()=>k.current);const P=a.useRef(null),I=a.useRef(void 0),Le=a.useRef(null),p=a.useRef(!1),te=a.useRef(!1),O=a.useRef(null),[b,We]=a.useState({value:ce,show:se,focused:!1}),[,je]=a.useReducer(t=>t,!0),M=t=>{We(r=>({...r,...t}))};a.useEffect(()=>{C.current&&C.current.element&&i()&&!te.current&&C.current.element.focus({preventScroll:!0}),d.current&&d.current.element&&!i()&&p.current&&d.current.element.focus({preventScroll:!0}),te.current=i(),p.current=!1}),a.useEffect(()=>{var t;return O.current=u.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(r=>Ee(r)),i()&&je(),(t=A())!=null&&t.body&&O.current&&O.current.observe(A().body),()=>{var r;clearTimeout(Le.current),(r=A())!=null&&r.body&&O.current&&O.current.disconnect()}},[]);const ne=f+"-popup-id",He=J(),Ue=Re(),Ye=m(),$e=Ie(),Xe=Ae(),ae=!j||N().valid,oe=R.toLanguageString(L.toggleCalendar,L.messages[L.toggleCalendar]),Ze={disabled:w,format:pe,formatPlaceholder:n.formatPlaceholder,id:Me,ariaLabelledBy:n.ariaLabelledBy,ariaDescribedBy:n.ariaDescribedBy,ariaLabel:De,max:_,min:E,name:n.name,onChange:Ne,required:n.required,_ref:d,tabIndex:i()?-1:be,title:n.title,valid:N().valid,validationMessage:U,validityStyles:j,value:Ye,label:void 0,placeholder:b.focused?null:n.placeholder,ariaExpanded:i(),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:Pe},re=a.createElement(u.AsyncFocusBlur,{onFocus:Fe,onBlur:c()?void 0:Q,onSyncBlur:n.onBlur,onSyncFocus:n.onFocus},t=>a.createElement(a.Fragment,null,a.createElement("span",{...n.label?{}:$,ref:D,className:u.classNames("k-input","k-datepicker",{[`k-input-${u.kendoThemeMaps.sizeMap[T]||T}`]:T,[`k-rounded-${u.kendoThemeMaps.roundedMap[q]||q}`]:q,[`k-input-${x}`]:x,"k-invalid":!ae,"k-required":X(),"k-disabled":w},n.className),onKeyDown:Ke,style:{width:n.width},onFocus:t.onFocus,onBlur:t.onBlur,onClick:c()?ee:void 0},a.createElement(Ue,{_ref:d,ariaRole:"combobox",ariaExpanded:i(),ariaControls:ne,autoFocus:ve,...Ze}),a.createElement($e,{type:"button",icon:"calendar",svgIcon:et.calendarIcon,title:oe,className:"k-input-button",rounded:null,onClick:c()?void 0:ee,"aria-label":oe,fillMode:x,onMouseDown:ze}),!c()&&He),c()&&Xe));return n.label?a.createElement(ut.PickerFloatingLabel,{dateInput:d,label:n.label,editorId:f,editorValid:ae,editorDisabled:w,children:re,style:{width:n.width},...$}):re});W.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,autoFocus:e.bool,inputAttributes:e.object};const l={defaultShow:!1,defaultValue:null,dateInput:nt.DateInput,calendar:at.Calendar,toggleButton:rt.ToggleButton,popup:Qe.Popup,pickerWrap:lt.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=u.createPropsContext();W.displayName="KendoReactDatePicker";exports.DatePicker=W;exports.DatePickerPropsContext=ie;exports.datePickerDefaultProps=l;
|