@progress/kendo-react-dateinputs 8.3.0-develop.1 → 8.3.0-develop.10
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 +2 -2
- package/calendar/components/Calendar.mjs +123 -115
- package/calendar/components/CalendarCell.js +1 -1
- package/calendar/components/CalendarCell.mjs +37 -39
- package/calendar/components/CalendarHeaderTitle.js +1 -1
- package/calendar/components/CalendarHeaderTitle.mjs +6 -12
- package/calendar/components/CalendarNavigationItem.js +1 -1
- package/calendar/components/CalendarNavigationItem.mjs +15 -19
- package/calendar/components/CalendarWeekCell.js +1 -1
- package/calendar/components/CalendarWeekCell.mjs +10 -15
- package/calendar/components/Header.js +1 -1
- package/calendar/components/Header.mjs +30 -40
- package/calendar/components/Navigation.js +1 -1
- package/calendar/components/Navigation.mjs +52 -49
- package/calendar/components/TodayCommand.js +1 -1
- package/calendar/components/TodayCommand.mjs +21 -25
- package/calendar/components/View.js +1 -1
- package/calendar/components/View.mjs +48 -42
- package/calendar/components/ViewList.js +1 -1
- package/calendar/components/ViewList.mjs +99 -94
- package/common/ClearButton.js +1 -1
- package/common/ClearButton.mjs +25 -31
- package/dateinput/DateInput.js +1 -1
- package/dateinput/DateInput.mjs +113 -110
- package/dateinput/utils.js +1 -1
- package/dateinput/utils.mjs +22 -23
- package/datepicker/DatePicker.js +1 -1
- package/datepicker/DatePicker.mjs +20 -14
- package/daterangepicker/DateRangePicker.js +1 -1
- package/daterangepicker/DateRangePicker.mjs +5 -5
- package/datetimepicker/DateTimePicker.js +1 -1
- package/datetimepicker/DateTimePicker.mjs +95 -90
- package/datetimepicker/DateTimeSelector.js +1 -1
- package/datetimepicker/DateTimeSelector.mjs +83 -81
- package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
- package/index.d.mts +41 -29
- package/index.d.ts +41 -29
- package/package-metadata.mjs +1 -1
- package/package.json +7 -7
- package/timepicker/TimeList.js +3 -3
- package/timepicker/TimeList.mjs +83 -81
- package/timepicker/TimePart.js +1 -1
- package/timepicker/TimePart.mjs +74 -68
- package/timepicker/TimePicker.js +1 -1
- package/timepicker/TimePicker.mjs +112 -107
- package/timepicker/TimeSelector.js +1 -1
- package/timepicker/TimeSelector.mjs +66 -59
- package/virtualization/Virtualization.js +1 -1
- package/virtualization/Virtualization.mjs +49 -48
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),_=require("@progress/kendo-react-intl"),l=require("../messages/index.js"),p=require("@progress/kendo-react-buttons"),N=require("../calendar/components/Calendar.js"),B=require("../timepicker/TimePart.js"),r=require("../utils.js"),y=require("@progress/kendo-date-math"),a=require("@progress/kendo-react-common"),b=require("../timepicker/utils.js");function V(d){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(d){for(const e in d)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(d,e);Object.defineProperty(s,e,t.get?t:{enumerable:!0,get:()=>d[e]})}}return s.default=d,Object.freeze(s)}const n=V(E),D=class D extends n.Component{constructor(s){super(s),this._calendar=null,this._timePart=null,this._cancelButton=null,this._acceptButton=null,this._dateButtonRef=null,this._calendarWrap=null,this.shouldFocusPart=!1,this.focus=e=>{Promise.resolve().then(()=>{this.state.tab==="time"&&this._timePart&&this._timePart.focus(e);const t=this.calendarElement();this.state.tab==="date"&&t&&t.focus(e)})},this.calendarElement=()=>this._calendar&&this._calendar.element||this._calendarWrap&&this._calendarWrap.querySelector(".k-calendar"),this.move=e=>{if(e==="right"&&this.state.tab==="time"||e==="left"&&this.state.tab==="date")return;const t=e==="left"?"date":"time";this.shouldFocusPart=!0,this.setState({tab:t})},this.dateTimeFooter=()=>{const{cancelButton:e,unstyled:t}=this.props,i=t&&t.uDateTimePicker,c=this.localizationService.toLanguageString(l.dateTimePickerCancel,l.messages[l.dateTimePickerCancel]),h=this.localizationService.toLanguageString(l.dateTimePickerSet,l.messages[l.dateTimePickerSet]);return n.createElement("div",{className:a.classNames(a.uDateTimePicker.timeFooter({c:i}))},e&&n.createElement(p.Button,{type:"button",ref:o=>{this._cancelButton=o},className:a.classNames(a.uTime.cancel({c:i})),onClick:this.handleReject,onKeyDown:this.handleCancelKeyDown,title:c,"aria-label":c},c),n.createElement(p.Button,{type:"button",themeColor:"primary",ref:o=>{this._acceptButton=o},className:a.classNames(a.uTime.accept({c:i})),disabled:!this.hasDateValue,onClick:this.handleAccept,onKeyDown:this.handleSetKeyDown,title:h,"aria-label":h},h))},this.handleReject=e=>{this.setState({dateValue:this.props.value,timeValue:this.props.value||r.MIDNIGHT_DATE});const t=this.mergeDate(this.props.value,this.props.value||r.MIDNIGHT_DATE);if(this.props.onReject){const i={nativeEvent:e.nativeEvent,syntheticEvent:e,target:this,value:t};this.props.onReject.call(void 0,i)}},this.handleAccept=(e,t)=>{if(!this.state.dateValue||!this.state.timeValue||!this.hasDateValue)return;const i=this.mergeDate(this.state.dateValue,t||this.state.timeValue);this.props.onChange.call(void 0,{syntheticEvent:e,nativeEvent:e.nativeEvent,value:i,target:this})},this.handleNowClick=e=>{this.setState({timeValue:b.getNow()}),this.handleAccept(e,b.getNow())},this.handleCalendarValueChange=e=>{e.syntheticEvent.stopPropagation(),this.setState({dateValue:e.value,tab:"time"}),this.shouldFocusPart=!0},this.handleTimeListContainerChange=e=>{this.setState({timeValue:e})},this.handleDateClick=e=>{e.stopPropagation(),this.move("left")},this.handleTimeClick=e=>{e.stopPropagation(),this.move("right")},this.handleKeyDown=e=>{const{keyCode:t,altKey:i}=e;if(!this.props.disabled)switch(t){case a.Keys.enter:!this.hasActiveButton()&&this.hasDateValue&&this.handleAccept(e);return;case a.Keys.left:if(!i)return;this.move("left");return;case a.Keys.right:if(!i)return;this.move("right");return;default:return}},this.handleCancelKeyDown=e=>{const{keyCode:t}=e;t===a.Keys.tab&&this._dateButtonRef&&this._dateButtonRef.element&&!this.hasDateValue&&(e.preventDefault(),this._dateButtonRef.element.focus())},this.handleSetKeyDown=e=>{const{keyCode:t}=e;t===a.Keys.tab&&this._dateButtonRef&&this._dateButtonRef.element&&(e.preventDefault(),this._dateButtonRef.element.focus())},this.handleDateKeyDown=e=>{var c,h,o,g;const{keyCode:t,shiftKey:i}=e;i&&t===a.Keys.tab&&(e.stopPropagation(),this.hasDateValue?(g=(o=this._acceptButton)==null?void 0:o.element)==null||g.focus():(h=(c=this._cancelButton)==null?void 0:c.element)==null||h.focus()),t===a.Keys.enter&&(e.stopPropagation(),this.move("left"))},this.handleTimeKeyDown=e=>{const{keyCode:t}=e;t===a.Keys.enter&&(e.stopPropagation(),this.move("right"))},this.handleTimePartMount=e=>{this.setState({timeValue:e})},this.state={tab:"date",dateValue:this.props.value,timeValue:this.props.value||r.MIDNIGHT_DATE}}get calendar(){return this._calendar}get timePart(){return this._timePart}get hasDateValue(){return this.state.dateValue!==null}get localizationService(){return _.provideLocalizationService(this)}componentDidUpdate(s,e){var t,i;this.shouldFocusPart&&this.focus({preventScroll:!0}),(((t=s.value)==null?void 0:t.getTime())!==((i=this.props.value)==null?void 0:i.getTime())||this.state.tab!==e.tab&&this.props.value)&&this.setState({dateValue:s.value&&this.props.value&&y.isEqualDate(s.value,this.props.value)?this.state.dateValue:this.props.value,timeValue:this.props.value||r.MIDNIGHT_DATE}),this.shouldFocusPart=!1}render(){const{disabled:s,min:e,max:t,weekNumber:i,focusedDate:c,format:h,mobileMode:o,footerActions:g,unstyled:v}=this.props,m=v&&v.uDateTimePicker,k=a.classNames(a.uDateTimePicker.wrap({c:m,date:this.state.tab==="date",time:this.state.tab==="time",disabled:s})),C=this.localizationService.toLanguageString(l.date,l.messages[l.date]),P=this.localizationService.toLanguageString(l.time,l.messages[l.time]),T={min:e,max:t,weekNumber:i,focusedDate:c,disabled:s||this.state.tab!=="date",value:this.state.dateValue,onChange:this.handleCalendarValueChange,navigation:!1,tabIndex:s||this.state.tab!=="date"?-1:void 0,mobileMode:o};return n.createElement("div",{onKeyDown:this.handleKeyDown,className:k,tabIndex:-1},n.createElement("div",{className:a.classNames(a.uDateTimePicker.buttonGroup({c:m}))},n.createElement(p.ButtonGroup,{width:"100%"},n.createElement(p.Button,{ref:u=>this._dateButtonRef=u,type:"button",selected:this.state.tab==="date",togglable:!0,onClick:this.handleDateClick,onKeyDown:this.handleDateKeyDown},C),n.createElement(p.Button,{type:"button",selected:this.state.tab==="time",togglable:!0,onClick:this.handleTimeClick,onKeyDown:this.handleTimeKeyDown},P))),n.createElement("div",{className:a.classNames(a.uDateTimePicker.selector({c:m}))},n.createElement("div",{className:a.classNames(a.uDateTimePicker.calendarWrap({c:m})),ref:u=>this._calendarWrap=u},this.props.calendar?n.createElement(this.props.calendar,{key:this.state.tab,...T}):n.createElement(N.Calendar,{key:this.state.tab,ref:u=>{this._calendar=u},...T})),n.createElement("div",{className:a.classNames(a.uDateTimePicker.timeWrap({c:m}))},n.createElement("div",{className:a.classNames(a.uDateTimePicker.timeSelector({c:m,mobileMode:o}))},n.createElement(B.TimePart,{key:1,onNowClick:this.handleNowClick,disabled:s||this.state.tab!=="time",ref:u=>{this._timePart=u},min:this.minTime||r.MIN_TIME,max:this.maxTime||r.MAX_TIME,steps:this.props.steps,value:this.state.timeValue,format:h,onChange:this.handleTimeListContainerChange,onMount:this.handleTimePartMount,mobileMode:o,unstyled:v})))),g&&this.dateTimeFooter())}get minTime(){return this.props.minTime!==void 0?this.props.minTime:this.normalizeRange(this.props.min,this.state.dateValue)}get maxTime(){return this.props.maxTime!==void 0?this.props.maxTime:this.normalizeRange(this.props.max,this.state.dateValue)}normalizeRange(s,e){return y.isEqualDate(s,e||r.getToday())?s:null}hasActiveButton(){if(!this._acceptButton)return!1;const s=a.getActiveElement(document);return this._acceptButton&&s===this._acceptButton.element||this._cancelButton&&s===this._cancelButton.element}mergeTime(s,e){return s&&e?r.setTime(e,s):e}mergeDate(s,e){return s?r.setTime(s||r.getToday(),e):e}};D.defaultProps={footerActions:!0};let f=D;_.registerForLocalization(f);exports.DateTimeSelector=f;
|
|
@@ -7,16 +7,16 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as i from "react";
|
|
10
|
-
import { provideLocalizationService as
|
|
11
|
-
import { dateTimePickerCancel as
|
|
12
|
-
import { Button as
|
|
13
|
-
import { Calendar as
|
|
14
|
-
import { TimePart as
|
|
15
|
-
import { MIDNIGHT_DATE as
|
|
16
|
-
import { isEqualDate as
|
|
17
|
-
import {
|
|
18
|
-
import { getNow as
|
|
19
|
-
const
|
|
10
|
+
import { provideLocalizationService as R, registerForLocalization as M } from "@progress/kendo-react-intl";
|
|
11
|
+
import { dateTimePickerCancel as D, messages as p, dateTimePickerSet as _, date as T, time as E } from "../messages/index.mjs";
|
|
12
|
+
import { Button as f, ButtonGroup as x } from "@progress/kendo-react-buttons";
|
|
13
|
+
import { Calendar as A } from "../calendar/components/Calendar.mjs";
|
|
14
|
+
import { TimePart as z } from "../timepicker/TimePart.mjs";
|
|
15
|
+
import { MIDNIGHT_DATE as g, MIN_TIME as F, MAX_TIME as L, getToday as V, setTime as P } from "../utils.mjs";
|
|
16
|
+
import { isEqualDate as k } from "@progress/kendo-date-math";
|
|
17
|
+
import { classNames as o, uDateTimePicker as u, uTime as B, Keys as h, getActiveElement as I } from "@progress/kendo-react-common";
|
|
18
|
+
import { getNow as w } from "../timepicker/utils.mjs";
|
|
19
|
+
const y = class y extends i.Component {
|
|
20
20
|
constructor(a) {
|
|
21
21
|
super(a), this._calendar = null, this._timePart = null, this._cancelButton = null, this._acceptButton = null, this._dateButtonRef = null, this._calendarWrap = null, this.shouldFocusPart = !1, this.focus = (t) => {
|
|
22
22
|
Promise.resolve().then(() => {
|
|
@@ -24,47 +24,47 @@ const f = class f extends i.Component {
|
|
|
24
24
|
const e = this.calendarElement();
|
|
25
25
|
this.state.tab === "date" && e && e.focus(t);
|
|
26
26
|
});
|
|
27
|
-
}, this.calendarElement = () => this._calendar && this._calendar.element || this._calendarWrap && this._calendarWrap.querySelector(".k-
|
|
27
|
+
}, this.calendarElement = () => this._calendar && this._calendar.element || this._calendarWrap && this._calendarWrap.querySelector(".k-calendar"), this.move = (t) => {
|
|
28
28
|
if (t === "right" && this.state.tab === "time" || t === "left" && this.state.tab === "date")
|
|
29
29
|
return;
|
|
30
30
|
const e = t === "left" ? "date" : "time";
|
|
31
31
|
this.shouldFocusPart = !0, this.setState({ tab: e });
|
|
32
32
|
}, this.dateTimeFooter = () => {
|
|
33
|
-
const { cancelButton: t } = this.props, e = this.localizationService.toLanguageString(
|
|
34
|
-
return /* @__PURE__ */ i.createElement("div", { className:
|
|
35
|
-
|
|
33
|
+
const { cancelButton: t, unstyled: e } = this.props, s = e && e.uDateTimePicker, l = this.localizationService.toLanguageString(D, p[D]), r = this.localizationService.toLanguageString(_, p[_]);
|
|
34
|
+
return /* @__PURE__ */ i.createElement("div", { className: o(u.timeFooter({ c: s })) }, t && /* @__PURE__ */ i.createElement(
|
|
35
|
+
f,
|
|
36
36
|
{
|
|
37
37
|
type: "button",
|
|
38
38
|
ref: (n) => {
|
|
39
39
|
this._cancelButton = n;
|
|
40
40
|
},
|
|
41
|
-
className:
|
|
41
|
+
className: o(B.cancel({ c: s })),
|
|
42
42
|
onClick: this.handleReject,
|
|
43
43
|
onKeyDown: this.handleCancelKeyDown,
|
|
44
|
-
title:
|
|
45
|
-
"aria-label":
|
|
44
|
+
title: l,
|
|
45
|
+
"aria-label": l
|
|
46
46
|
},
|
|
47
|
-
|
|
47
|
+
l
|
|
48
48
|
), /* @__PURE__ */ i.createElement(
|
|
49
|
-
|
|
49
|
+
f,
|
|
50
50
|
{
|
|
51
51
|
type: "button",
|
|
52
52
|
themeColor: "primary",
|
|
53
53
|
ref: (n) => {
|
|
54
54
|
this._acceptButton = n;
|
|
55
55
|
},
|
|
56
|
-
className:
|
|
56
|
+
className: o(B.accept({ c: s })),
|
|
57
57
|
disabled: !this.hasDateValue,
|
|
58
58
|
onClick: this.handleAccept,
|
|
59
59
|
onKeyDown: this.handleSetKeyDown,
|
|
60
|
-
title:
|
|
61
|
-
"aria-label":
|
|
60
|
+
title: r,
|
|
61
|
+
"aria-label": r
|
|
62
62
|
},
|
|
63
|
-
|
|
63
|
+
r
|
|
64
64
|
));
|
|
65
65
|
}, this.handleReject = (t) => {
|
|
66
|
-
this.setState({ dateValue: this.props.value, timeValue: this.props.value ||
|
|
67
|
-
const e = this.mergeDate(this.props.value, this.props.value ||
|
|
66
|
+
this.setState({ dateValue: this.props.value, timeValue: this.props.value || g });
|
|
67
|
+
const e = this.mergeDate(this.props.value, this.props.value || g);
|
|
68
68
|
if (this.props.onReject) {
|
|
69
69
|
const s = {
|
|
70
70
|
nativeEvent: t.nativeEvent,
|
|
@@ -85,7 +85,7 @@ const f = class f extends i.Component {
|
|
|
85
85
|
target: this
|
|
86
86
|
});
|
|
87
87
|
}, this.handleNowClick = (t) => {
|
|
88
|
-
this.setState({ timeValue:
|
|
88
|
+
this.setState({ timeValue: w() }), this.handleAccept(t, w());
|
|
89
89
|
}, this.handleCalendarValueChange = (t) => {
|
|
90
90
|
t.syntheticEvent.stopPropagation(), this.setState({ dateValue: t.value, tab: "time" }), this.shouldFocusPart = !0;
|
|
91
91
|
}, this.handleTimeListContainerChange = (t) => {
|
|
@@ -98,15 +98,15 @@ const f = class f extends i.Component {
|
|
|
98
98
|
const { keyCode: e, altKey: s } = t;
|
|
99
99
|
if (!this.props.disabled)
|
|
100
100
|
switch (e) {
|
|
101
|
-
case
|
|
101
|
+
case h.enter:
|
|
102
102
|
!this.hasActiveButton() && this.hasDateValue && this.handleAccept(t);
|
|
103
103
|
return;
|
|
104
|
-
case
|
|
104
|
+
case h.left:
|
|
105
105
|
if (!s)
|
|
106
106
|
return;
|
|
107
107
|
this.move("left");
|
|
108
108
|
return;
|
|
109
|
-
case
|
|
109
|
+
case h.right:
|
|
110
110
|
if (!s)
|
|
111
111
|
return;
|
|
112
112
|
this.move("right");
|
|
@@ -116,23 +116,23 @@ const f = class f extends i.Component {
|
|
|
116
116
|
}
|
|
117
117
|
}, this.handleCancelKeyDown = (t) => {
|
|
118
118
|
const { keyCode: e } = t;
|
|
119
|
-
e ===
|
|
119
|
+
e === h.tab && this._dateButtonRef && this._dateButtonRef.element && !this.hasDateValue && (t.preventDefault(), this._dateButtonRef.element.focus());
|
|
120
120
|
}, this.handleSetKeyDown = (t) => {
|
|
121
121
|
const { keyCode: e } = t;
|
|
122
|
-
e ===
|
|
122
|
+
e === h.tab && this._dateButtonRef && this._dateButtonRef.element && (t.preventDefault(), this._dateButtonRef.element.focus());
|
|
123
123
|
}, this.handleDateKeyDown = (t) => {
|
|
124
|
-
var
|
|
124
|
+
var l, r, n, d;
|
|
125
125
|
const { keyCode: e, shiftKey: s } = t;
|
|
126
|
-
s && e ===
|
|
126
|
+
s && e === h.tab && (t.stopPropagation(), this.hasDateValue ? (d = (n = this._acceptButton) == null ? void 0 : n.element) == null || d.focus() : (r = (l = this._cancelButton) == null ? void 0 : l.element) == null || r.focus()), e === h.enter && (t.stopPropagation(), this.move("left"));
|
|
127
127
|
}, this.handleTimeKeyDown = (t) => {
|
|
128
128
|
const { keyCode: e } = t;
|
|
129
|
-
e ===
|
|
129
|
+
e === h.enter && (t.stopPropagation(), this.move("right"));
|
|
130
130
|
}, this.handleTimePartMount = (t) => {
|
|
131
131
|
this.setState({ timeValue: t });
|
|
132
132
|
}, this.state = {
|
|
133
133
|
tab: "date",
|
|
134
134
|
dateValue: this.props.value,
|
|
135
|
-
timeValue: this.props.value ||
|
|
135
|
+
timeValue: this.props.value || g
|
|
136
136
|
};
|
|
137
137
|
}
|
|
138
138
|
get calendar() {
|
|
@@ -145,13 +145,13 @@ const f = class f extends i.Component {
|
|
|
145
145
|
return this.state.dateValue !== null;
|
|
146
146
|
}
|
|
147
147
|
get localizationService() {
|
|
148
|
-
return
|
|
148
|
+
return R(this);
|
|
149
149
|
}
|
|
150
150
|
componentDidUpdate(a, t) {
|
|
151
151
|
var e, s;
|
|
152
152
|
this.shouldFocusPart && this.focus({ preventScroll: !0 }), (((e = a.value) == null ? void 0 : e.getTime()) !== ((s = this.props.value) == null ? void 0 : s.getTime()) || this.state.tab !== t.tab && this.props.value) && this.setState({
|
|
153
|
-
dateValue: a.value && this.props.value &&
|
|
154
|
-
timeValue: this.props.value ||
|
|
153
|
+
dateValue: a.value && this.props.value && k(a.value, this.props.value) ? this.state.dateValue : this.props.value,
|
|
154
|
+
timeValue: this.props.value || g
|
|
155
155
|
}), this.shouldFocusPart = !1;
|
|
156
156
|
}
|
|
157
157
|
render() {
|
|
@@ -160,49 +160,50 @@ const f = class f extends i.Component {
|
|
|
160
160
|
min: t,
|
|
161
161
|
max: e,
|
|
162
162
|
weekNumber: s,
|
|
163
|
-
focusedDate:
|
|
164
|
-
format:
|
|
165
|
-
mobileMode:
|
|
166
|
-
footerActions:
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
"
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
163
|
+
focusedDate: l,
|
|
164
|
+
format: r,
|
|
165
|
+
mobileMode: n,
|
|
166
|
+
footerActions: d,
|
|
167
|
+
unstyled: v
|
|
168
|
+
} = this.props, m = v && v.uDateTimePicker, S = o(
|
|
169
|
+
u.wrap({
|
|
170
|
+
c: m,
|
|
171
|
+
date: this.state.tab === "date",
|
|
172
|
+
time: this.state.tab === "time",
|
|
173
|
+
disabled: a
|
|
174
|
+
})
|
|
175
|
+
), K = this.localizationService.toLanguageString(T, p[T]), N = this.localizationService.toLanguageString(E, p[E]), C = {
|
|
175
176
|
min: t,
|
|
176
177
|
max: e,
|
|
177
178
|
weekNumber: s,
|
|
178
|
-
focusedDate:
|
|
179
|
+
focusedDate: l,
|
|
179
180
|
disabled: a || this.state.tab !== "date",
|
|
180
181
|
value: this.state.dateValue,
|
|
181
182
|
onChange: this.handleCalendarValueChange,
|
|
182
183
|
navigation: !1,
|
|
183
184
|
tabIndex: a || this.state.tab !== "date" ? -1 : void 0,
|
|
184
|
-
mobileMode:
|
|
185
|
+
mobileMode: n
|
|
185
186
|
};
|
|
186
187
|
return /* @__PURE__ */ i.createElement(
|
|
187
188
|
"div",
|
|
188
189
|
{
|
|
189
190
|
onKeyDown: this.handleKeyDown,
|
|
190
|
-
className:
|
|
191
|
+
className: S,
|
|
191
192
|
tabIndex: -1
|
|
192
193
|
},
|
|
193
|
-
/* @__PURE__ */ i.createElement("div", { className:
|
|
194
|
-
|
|
194
|
+
/* @__PURE__ */ i.createElement("div", { className: o(u.buttonGroup({ c: m })) }, /* @__PURE__ */ i.createElement(x, { width: "100%" }, /* @__PURE__ */ i.createElement(
|
|
195
|
+
f,
|
|
195
196
|
{
|
|
196
|
-
ref: (
|
|
197
|
+
ref: (c) => this._dateButtonRef = c,
|
|
197
198
|
type: "button",
|
|
198
199
|
selected: this.state.tab === "date",
|
|
199
200
|
togglable: !0,
|
|
200
201
|
onClick: this.handleDateClick,
|
|
201
202
|
onKeyDown: this.handleDateKeyDown
|
|
202
203
|
},
|
|
203
|
-
|
|
204
|
+
K
|
|
204
205
|
), /* @__PURE__ */ i.createElement(
|
|
205
|
-
|
|
206
|
+
f,
|
|
206
207
|
{
|
|
207
208
|
type: "button",
|
|
208
209
|
selected: this.state.tab === "time",
|
|
@@ -210,37 +211,38 @@ const f = class f extends i.Component {
|
|
|
210
211
|
onClick: this.handleTimeClick,
|
|
211
212
|
onKeyDown: this.handleTimeKeyDown
|
|
212
213
|
},
|
|
213
|
-
|
|
214
|
+
N
|
|
214
215
|
))),
|
|
215
|
-
/* @__PURE__ */ i.createElement("div", { className:
|
|
216
|
-
|
|
216
|
+
/* @__PURE__ */ i.createElement("div", { className: o(u.selector({ c: m })) }, /* @__PURE__ */ i.createElement("div", { className: o(u.calendarWrap({ c: m })), ref: (c) => this._calendarWrap = c }, this.props.calendar ? /* @__PURE__ */ i.createElement(this.props.calendar, { key: this.state.tab, ...C }) : /* @__PURE__ */ i.createElement(
|
|
217
|
+
A,
|
|
217
218
|
{
|
|
218
219
|
key: this.state.tab,
|
|
219
|
-
ref: (
|
|
220
|
-
this._calendar =
|
|
220
|
+
ref: (c) => {
|
|
221
|
+
this._calendar = c;
|
|
221
222
|
},
|
|
222
|
-
...
|
|
223
|
+
...C
|
|
223
224
|
}
|
|
224
|
-
)), /* @__PURE__ */ i.createElement("div", { className:
|
|
225
|
-
|
|
225
|
+
)), /* @__PURE__ */ i.createElement("div", { className: o(u.timeWrap({ c: m })) }, /* @__PURE__ */ i.createElement("div", { className: o(u.timeSelector({ c: m, mobileMode: n })) }, /* @__PURE__ */ i.createElement(
|
|
226
|
+
z,
|
|
226
227
|
{
|
|
227
228
|
key: 1,
|
|
228
229
|
onNowClick: this.handleNowClick,
|
|
229
230
|
disabled: a || this.state.tab !== "time",
|
|
230
|
-
ref: (
|
|
231
|
-
this._timePart =
|
|
231
|
+
ref: (c) => {
|
|
232
|
+
this._timePart = c;
|
|
232
233
|
},
|
|
233
|
-
min: this.minTime ||
|
|
234
|
-
max: this.maxTime ||
|
|
234
|
+
min: this.minTime || F,
|
|
235
|
+
max: this.maxTime || L,
|
|
235
236
|
steps: this.props.steps,
|
|
236
237
|
value: this.state.timeValue,
|
|
237
|
-
format:
|
|
238
|
+
format: r,
|
|
238
239
|
onChange: this.handleTimeListContainerChange,
|
|
239
240
|
onMount: this.handleTimePartMount,
|
|
240
|
-
mobileMode:
|
|
241
|
+
mobileMode: n,
|
|
242
|
+
unstyled: v
|
|
241
243
|
}
|
|
242
244
|
)))),
|
|
243
|
-
|
|
245
|
+
d && this.dateTimeFooter()
|
|
244
246
|
);
|
|
245
247
|
}
|
|
246
248
|
get minTime() {
|
|
@@ -250,26 +252,26 @@ const f = class f extends i.Component {
|
|
|
250
252
|
return this.props.maxTime !== void 0 ? this.props.maxTime : this.normalizeRange(this.props.max, this.state.dateValue);
|
|
251
253
|
}
|
|
252
254
|
normalizeRange(a, t) {
|
|
253
|
-
return
|
|
255
|
+
return k(a, t || V()) ? a : null;
|
|
254
256
|
}
|
|
255
257
|
hasActiveButton() {
|
|
256
258
|
if (!this._acceptButton)
|
|
257
259
|
return !1;
|
|
258
|
-
const a =
|
|
260
|
+
const a = I(document);
|
|
259
261
|
return this._acceptButton && a === this._acceptButton.element || this._cancelButton && a === this._cancelButton.element;
|
|
260
262
|
}
|
|
261
263
|
mergeTime(a, t) {
|
|
262
|
-
return a && t ?
|
|
264
|
+
return a && t ? P(t, a) : t;
|
|
263
265
|
}
|
|
264
266
|
mergeDate(a, t) {
|
|
265
|
-
return a ?
|
|
267
|
+
return a ? P(a || V(), t) : t;
|
|
266
268
|
}
|
|
267
269
|
};
|
|
268
|
-
|
|
270
|
+
y.defaultProps = {
|
|
269
271
|
footerActions: !0
|
|
270
272
|
};
|
|
271
|
-
let
|
|
272
|
-
|
|
273
|
+
let b = y;
|
|
274
|
+
M(b);
|
|
273
275
|
export {
|
|
274
|
-
|
|
276
|
+
b as DateTimeSelector
|
|
275
277
|
};
|