@progress/kendo-react-dateinputs 9.0.0-develop.4 → 9.0.0-develop.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dateinput/DateInput.js +1 -1
- package/dateinput/DateInput.mjs +252 -323
- package/dateinput/dateInputIntl.js +8 -0
- package/dateinput/dateInputIntl.mjs +20 -0
- package/dateinput/utils.js +1 -1
- package/dateinput/utils.mjs +4 -27
- package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
- package/hooks/usePickerFloatingLabel.js +1 -1
- package/hooks/usePickerFloatingLabel.mjs +6 -5
- package/index.d.mts +72 -35
- package/index.d.ts +72 -35
- package/package-metadata.mjs +1 -1
- package/package.json +8 -7
- package/dateinput/models/kendo-date.js +0 -8
- package/dateinput/models/kendo-date.mjs +0 -234
- package/dateinput/models/mask.js +0 -8
- package/dateinput/models/mask.mjs +0 -16
|
@@ -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 l=require("react"),s=require("@progress/kendo-react-labels");function i(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const o=i(l),a=e=>{const[n,t]=o.useState(!1),r=()=>{var c;e.current&&t(!!((c=e.current.element)!=null&&c.value||e.current.text))};return o.useEffect(r),{editorValue:n}},u=e=>{const{dateInput:n,...t}=e,r=a(n);return o.createElement(s.FloatingLabel,{...t,...r})};exports.PickerFloatingLabel=u;exports.usePickerFloatingLabel=a;
|
|
@@ -7,19 +7,20 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as n from "react";
|
|
10
|
-
import { FloatingLabel as
|
|
10
|
+
import { FloatingLabel as c } from "@progress/kendo-react-labels";
|
|
11
11
|
const a = (e) => {
|
|
12
12
|
const [t, o] = n.useState(!1), r = () => {
|
|
13
|
-
|
|
13
|
+
var s;
|
|
14
|
+
e.current && o(!!((s = e.current.element) != null && s.value || e.current.text));
|
|
14
15
|
};
|
|
15
16
|
return n.useEffect(r), {
|
|
16
17
|
editorValue: t
|
|
17
18
|
};
|
|
18
|
-
},
|
|
19
|
+
}, i = (e) => {
|
|
19
20
|
const { dateInput: t, ...o } = e, r = a(t);
|
|
20
|
-
return /* @__PURE__ */ n.createElement(
|
|
21
|
+
return /* @__PURE__ */ n.createElement(c, { ...o, ...r });
|
|
21
22
|
};
|
|
22
23
|
export {
|
|
23
|
-
|
|
24
|
+
i as PickerFloatingLabel,
|
|
24
25
|
a as usePickerFloatingLabel
|
|
25
26
|
};
|
package/index.d.mts
CHANGED
|
@@ -5,20 +5,26 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
8
|
+
import { ButtonHandle } from '@progress/kendo-react-buttons';
|
|
9
9
|
import { ButtonProps } from '@progress/kendo-react-buttons';
|
|
10
|
+
import { DateFieldNameOptions } from '@progress/kendo-intl';
|
|
10
11
|
import { DateFormatOptions } from '@progress/kendo-react-intl';
|
|
12
|
+
import { DateFormatOptions as DateFormatOptions_2 } from '@progress/kendo-intl';
|
|
11
13
|
import { DateFormatPart } from '@progress/kendo-react-intl';
|
|
14
|
+
import { DateFormatPart as DateFormatPart_2 } from '@progress/kendo-intl';
|
|
12
15
|
import { DateInputsClassStructure } from '@progress/kendo-react-common';
|
|
13
16
|
import { FormComponent } from '@progress/kendo-react-common';
|
|
14
17
|
import { FormComponentProps } from '@progress/kendo-react-common';
|
|
15
18
|
import { FormComponentValidity } from '@progress/kendo-react-common';
|
|
19
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
16
20
|
import { IntlService } from '@progress/kendo-react-intl';
|
|
17
21
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
18
22
|
import { LocalizationService } from '@progress/kendo-react-intl';
|
|
23
|
+
import { NumberFormatOptions } from '@progress/kendo-intl';
|
|
19
24
|
import { PopupProps } from '@progress/kendo-react-popup';
|
|
20
25
|
import PropTypes from 'prop-types';
|
|
21
26
|
import * as React_2 from 'react';
|
|
27
|
+
import { RefAttributes } from 'react';
|
|
22
28
|
|
|
23
29
|
/**
|
|
24
30
|
* @hidden
|
|
@@ -637,6 +643,25 @@ export declare interface DateInputIncrementalSteps {
|
|
|
637
643
|
second?: number;
|
|
638
644
|
}
|
|
639
645
|
|
|
646
|
+
declare class DateInputIntl {
|
|
647
|
+
private service;
|
|
648
|
+
format: (format: string, ...values: any[]) => string;
|
|
649
|
+
toString: (value: any, format: any, localeId?: string) => string;
|
|
650
|
+
formatDate: (value: Date, format?: string | DateFormatOptions_2, localeId?: string) => string;
|
|
651
|
+
parseDate: (value: string, format?: string | DateFormatOptions_2 | string[] | DateFormatOptions_2[], localeId?: string) => Date;
|
|
652
|
+
parseNumber: (value: string, format?: string | NumberFormatOptions, localeId?: string) => number;
|
|
653
|
+
formatNumber: (value: number, format: string | NumberFormatOptions, localeId?: string) => string;
|
|
654
|
+
splitDateFormat: (format: string | DateFormatOptions_2, localeId?: string) => DateFormatPart_2[];
|
|
655
|
+
numberSymbols: (localeId?: string) => void;
|
|
656
|
+
firstDay: (localeId?: string) => number;
|
|
657
|
+
weekendRange: (localeId?: string) => any;
|
|
658
|
+
dateFieldName: (options: DateFieldNameOptions, localeId?: string) => string;
|
|
659
|
+
dateFormatNames: (localeId: any, options: any) => any;
|
|
660
|
+
cldr: any;
|
|
661
|
+
localeId: string;
|
|
662
|
+
constructor(service: IntlService);
|
|
663
|
+
}
|
|
664
|
+
|
|
640
665
|
/**
|
|
641
666
|
* Represents the props of the [KendoReact DateInput component]({% slug overview_dateinput %}). The generic argument is passed to the `onChange` property and is used as a target in the [`DateInputChangeEvent`]({% slug api_dateinputs_dateinputchangeevent %}) interface.
|
|
642
667
|
*/
|
|
@@ -983,30 +1008,14 @@ export declare class DateInputWithoutContext extends React_2.Component<DateInput
|
|
|
983
1008
|
autoFocus: boolean;
|
|
984
1009
|
};
|
|
985
1010
|
private kendoDate;
|
|
986
|
-
private
|
|
1011
|
+
private kendoDateObject;
|
|
1012
|
+
private mounted;
|
|
987
1013
|
private valueDuringOnChange;
|
|
988
|
-
private paste;
|
|
989
1014
|
private _element;
|
|
990
1015
|
private _wrapper;
|
|
1016
|
+
private _nativeEvent;
|
|
991
1017
|
private get _inputId();
|
|
992
|
-
private _lastSelectedSymbol;
|
|
993
1018
|
constructor(props: DateInputProps);
|
|
994
|
-
/**
|
|
995
|
-
* @hidden
|
|
996
|
-
*/
|
|
997
|
-
componentDidMount(): void;
|
|
998
|
-
/**
|
|
999
|
-
* @hidden
|
|
1000
|
-
*/
|
|
1001
|
-
componentDidUpdate(_: any, prevState: any): void;
|
|
1002
|
-
/**
|
|
1003
|
-
* @hidden
|
|
1004
|
-
*/
|
|
1005
|
-
componentWillUnmount(): void;
|
|
1006
|
-
/**
|
|
1007
|
-
* @hidden
|
|
1008
|
-
*/
|
|
1009
|
-
render(): any;
|
|
1010
1019
|
/**
|
|
1011
1020
|
* Gets the value of the DateInput.
|
|
1012
1021
|
*/
|
|
@@ -1017,6 +1026,7 @@ export declare class DateInputWithoutContext extends React_2.Component<DateInput
|
|
|
1017
1026
|
get name(): string | undefined;
|
|
1018
1027
|
protected get min(): Date;
|
|
1019
1028
|
protected get max(): Date;
|
|
1029
|
+
protected get isInSegmentSelection(): Date;
|
|
1020
1030
|
/**
|
|
1021
1031
|
* @hidden
|
|
1022
1032
|
*/
|
|
@@ -1073,34 +1083,64 @@ export declare class DateInputWithoutContext extends React_2.Component<DateInput
|
|
|
1073
1083
|
* @hidden
|
|
1074
1084
|
*/
|
|
1075
1085
|
protected get wrapper(): HTMLSpanElement | null;
|
|
1086
|
+
/**
|
|
1087
|
+
* @hidden
|
|
1088
|
+
*/
|
|
1089
|
+
get options(): {
|
|
1090
|
+
format: string | DateFormatOptions | undefined;
|
|
1091
|
+
steps: DateInputIncrementalSteps | undefined;
|
|
1092
|
+
formatPlaceholder: string;
|
|
1093
|
+
placeholder: string | null | undefined;
|
|
1094
|
+
selectPreviousSegmentOnBackspace: boolean;
|
|
1095
|
+
allowCaretMode: boolean;
|
|
1096
|
+
value: Date | null;
|
|
1097
|
+
intlService: DateInputIntl;
|
|
1098
|
+
enableMouseWheel: boolean;
|
|
1099
|
+
autoCorrectParts: boolean;
|
|
1100
|
+
autoSwitchParts: boolean;
|
|
1101
|
+
autoSwitchKeys: never[];
|
|
1102
|
+
twoDigitYearMax: number;
|
|
1103
|
+
};
|
|
1104
|
+
/**
|
|
1105
|
+
* @hidden
|
|
1106
|
+
*/
|
|
1107
|
+
componentDidMount(): void;
|
|
1108
|
+
/**
|
|
1109
|
+
* @hidden
|
|
1110
|
+
*/
|
|
1111
|
+
componentDidUpdate(prevProps: DateInputProps): void;
|
|
1112
|
+
/**
|
|
1113
|
+
* @hidden
|
|
1114
|
+
*/
|
|
1115
|
+
componentWillUnmount(): void;
|
|
1116
|
+
/**
|
|
1117
|
+
* @hidden
|
|
1118
|
+
*/
|
|
1119
|
+
render(): any;
|
|
1076
1120
|
/**
|
|
1077
1121
|
* @hidden
|
|
1078
1122
|
*/
|
|
1079
1123
|
intl(): IntlService;
|
|
1124
|
+
/**
|
|
1125
|
+
* @hidden
|
|
1126
|
+
*/
|
|
1127
|
+
private intlProvider;
|
|
1128
|
+
get intlCommon(): IntlService;
|
|
1080
1129
|
/**
|
|
1081
1130
|
* @hidden
|
|
1082
1131
|
*/
|
|
1083
1132
|
protected setValidity: () => void;
|
|
1084
1133
|
protected updateOnPaste: (event: React_2.SyntheticEvent<HTMLInputElement>) => void;
|
|
1085
1134
|
private spinnersMouseDown;
|
|
1086
|
-
private handlePaste;
|
|
1087
1135
|
private handleClick;
|
|
1088
|
-
private elementChange;
|
|
1089
|
-
private elementClick;
|
|
1090
1136
|
private nativeWheel;
|
|
1091
|
-
private wheel;
|
|
1092
1137
|
private increasePart;
|
|
1093
1138
|
private decreasePart;
|
|
1094
|
-
private elementKeyDown;
|
|
1095
1139
|
private elementOnFocus;
|
|
1096
1140
|
private elementOnBlur;
|
|
1097
|
-
private get selection();
|
|
1098
|
-
private setSelection;
|
|
1099
1141
|
private triggerChange;
|
|
1100
|
-
private
|
|
1101
|
-
private
|
|
1102
|
-
private switchDateSegment;
|
|
1103
|
-
private modifyDateSegmentValue;
|
|
1142
|
+
private onChange;
|
|
1143
|
+
private initKendoDate;
|
|
1104
1144
|
}
|
|
1105
1145
|
|
|
1106
1146
|
/** @hidden */
|
|
@@ -1939,9 +1979,6 @@ export declare class DateRangePickerWithoutContext extends React_2.Component<Dat
|
|
|
1939
1979
|
disabled: PropTypes.Requireable<boolean>;
|
|
1940
1980
|
spinners: PropTypes.Requireable<boolean>;
|
|
1941
1981
|
name: PropTypes.Requireable<string>;
|
|
1942
|
-
/**
|
|
1943
|
-
* @hidden
|
|
1944
|
-
*/
|
|
1945
1982
|
dir: PropTypes.Requireable<string>;
|
|
1946
1983
|
label: PropTypes.Requireable<string>;
|
|
1947
1984
|
id: PropTypes.Requireable<string>;
|
|
@@ -4353,7 +4390,7 @@ declare interface TodayCommandProps {
|
|
|
4353
4390
|
/**
|
|
4354
4391
|
* Represents the default `toggleButton` component rendered by the [KendoReact Scheduler DatePicker]({% slug overview_datepicker %}).
|
|
4355
4392
|
*/
|
|
4356
|
-
export declare const ToggleButton:
|
|
4393
|
+
export declare const ToggleButton: ForwardRefExoticComponent<ButtonProps & RefAttributes<ButtonHandle | null>>;
|
|
4357
4394
|
|
|
4358
4395
|
/**
|
|
4359
4396
|
* Represents the props of the KendoReact [Toggle Button]({% slug api_dateinputs_togglebutton %}) component.
|
package/index.d.ts
CHANGED
|
@@ -5,20 +5,26 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
8
|
+
import { ButtonHandle } from '@progress/kendo-react-buttons';
|
|
9
9
|
import { ButtonProps } from '@progress/kendo-react-buttons';
|
|
10
|
+
import { DateFieldNameOptions } from '@progress/kendo-intl';
|
|
10
11
|
import { DateFormatOptions } from '@progress/kendo-react-intl';
|
|
12
|
+
import { DateFormatOptions as DateFormatOptions_2 } from '@progress/kendo-intl';
|
|
11
13
|
import { DateFormatPart } from '@progress/kendo-react-intl';
|
|
14
|
+
import { DateFormatPart as DateFormatPart_2 } from '@progress/kendo-intl';
|
|
12
15
|
import { DateInputsClassStructure } from '@progress/kendo-react-common';
|
|
13
16
|
import { FormComponent } from '@progress/kendo-react-common';
|
|
14
17
|
import { FormComponentProps } from '@progress/kendo-react-common';
|
|
15
18
|
import { FormComponentValidity } from '@progress/kendo-react-common';
|
|
19
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
16
20
|
import { IntlService } from '@progress/kendo-react-intl';
|
|
17
21
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
18
22
|
import { LocalizationService } from '@progress/kendo-react-intl';
|
|
23
|
+
import { NumberFormatOptions } from '@progress/kendo-intl';
|
|
19
24
|
import { PopupProps } from '@progress/kendo-react-popup';
|
|
20
25
|
import PropTypes from 'prop-types';
|
|
21
26
|
import * as React_2 from 'react';
|
|
27
|
+
import { RefAttributes } from 'react';
|
|
22
28
|
|
|
23
29
|
/**
|
|
24
30
|
* @hidden
|
|
@@ -637,6 +643,25 @@ export declare interface DateInputIncrementalSteps {
|
|
|
637
643
|
second?: number;
|
|
638
644
|
}
|
|
639
645
|
|
|
646
|
+
declare class DateInputIntl {
|
|
647
|
+
private service;
|
|
648
|
+
format: (format: string, ...values: any[]) => string;
|
|
649
|
+
toString: (value: any, format: any, localeId?: string) => string;
|
|
650
|
+
formatDate: (value: Date, format?: string | DateFormatOptions_2, localeId?: string) => string;
|
|
651
|
+
parseDate: (value: string, format?: string | DateFormatOptions_2 | string[] | DateFormatOptions_2[], localeId?: string) => Date;
|
|
652
|
+
parseNumber: (value: string, format?: string | NumberFormatOptions, localeId?: string) => number;
|
|
653
|
+
formatNumber: (value: number, format: string | NumberFormatOptions, localeId?: string) => string;
|
|
654
|
+
splitDateFormat: (format: string | DateFormatOptions_2, localeId?: string) => DateFormatPart_2[];
|
|
655
|
+
numberSymbols: (localeId?: string) => void;
|
|
656
|
+
firstDay: (localeId?: string) => number;
|
|
657
|
+
weekendRange: (localeId?: string) => any;
|
|
658
|
+
dateFieldName: (options: DateFieldNameOptions, localeId?: string) => string;
|
|
659
|
+
dateFormatNames: (localeId: any, options: any) => any;
|
|
660
|
+
cldr: any;
|
|
661
|
+
localeId: string;
|
|
662
|
+
constructor(service: IntlService);
|
|
663
|
+
}
|
|
664
|
+
|
|
640
665
|
/**
|
|
641
666
|
* Represents the props of the [KendoReact DateInput component]({% slug overview_dateinput %}). The generic argument is passed to the `onChange` property and is used as a target in the [`DateInputChangeEvent`]({% slug api_dateinputs_dateinputchangeevent %}) interface.
|
|
642
667
|
*/
|
|
@@ -983,30 +1008,14 @@ export declare class DateInputWithoutContext extends React_2.Component<DateInput
|
|
|
983
1008
|
autoFocus: boolean;
|
|
984
1009
|
};
|
|
985
1010
|
private kendoDate;
|
|
986
|
-
private
|
|
1011
|
+
private kendoDateObject;
|
|
1012
|
+
private mounted;
|
|
987
1013
|
private valueDuringOnChange;
|
|
988
|
-
private paste;
|
|
989
1014
|
private _element;
|
|
990
1015
|
private _wrapper;
|
|
1016
|
+
private _nativeEvent;
|
|
991
1017
|
private get _inputId();
|
|
992
|
-
private _lastSelectedSymbol;
|
|
993
1018
|
constructor(props: DateInputProps);
|
|
994
|
-
/**
|
|
995
|
-
* @hidden
|
|
996
|
-
*/
|
|
997
|
-
componentDidMount(): void;
|
|
998
|
-
/**
|
|
999
|
-
* @hidden
|
|
1000
|
-
*/
|
|
1001
|
-
componentDidUpdate(_: any, prevState: any): void;
|
|
1002
|
-
/**
|
|
1003
|
-
* @hidden
|
|
1004
|
-
*/
|
|
1005
|
-
componentWillUnmount(): void;
|
|
1006
|
-
/**
|
|
1007
|
-
* @hidden
|
|
1008
|
-
*/
|
|
1009
|
-
render(): any;
|
|
1010
1019
|
/**
|
|
1011
1020
|
* Gets the value of the DateInput.
|
|
1012
1021
|
*/
|
|
@@ -1017,6 +1026,7 @@ export declare class DateInputWithoutContext extends React_2.Component<DateInput
|
|
|
1017
1026
|
get name(): string | undefined;
|
|
1018
1027
|
protected get min(): Date;
|
|
1019
1028
|
protected get max(): Date;
|
|
1029
|
+
protected get isInSegmentSelection(): Date;
|
|
1020
1030
|
/**
|
|
1021
1031
|
* @hidden
|
|
1022
1032
|
*/
|
|
@@ -1073,34 +1083,64 @@ export declare class DateInputWithoutContext extends React_2.Component<DateInput
|
|
|
1073
1083
|
* @hidden
|
|
1074
1084
|
*/
|
|
1075
1085
|
protected get wrapper(): HTMLSpanElement | null;
|
|
1086
|
+
/**
|
|
1087
|
+
* @hidden
|
|
1088
|
+
*/
|
|
1089
|
+
get options(): {
|
|
1090
|
+
format: string | DateFormatOptions | undefined;
|
|
1091
|
+
steps: DateInputIncrementalSteps | undefined;
|
|
1092
|
+
formatPlaceholder: string;
|
|
1093
|
+
placeholder: string | null | undefined;
|
|
1094
|
+
selectPreviousSegmentOnBackspace: boolean;
|
|
1095
|
+
allowCaretMode: boolean;
|
|
1096
|
+
value: Date | null;
|
|
1097
|
+
intlService: DateInputIntl;
|
|
1098
|
+
enableMouseWheel: boolean;
|
|
1099
|
+
autoCorrectParts: boolean;
|
|
1100
|
+
autoSwitchParts: boolean;
|
|
1101
|
+
autoSwitchKeys: never[];
|
|
1102
|
+
twoDigitYearMax: number;
|
|
1103
|
+
};
|
|
1104
|
+
/**
|
|
1105
|
+
* @hidden
|
|
1106
|
+
*/
|
|
1107
|
+
componentDidMount(): void;
|
|
1108
|
+
/**
|
|
1109
|
+
* @hidden
|
|
1110
|
+
*/
|
|
1111
|
+
componentDidUpdate(prevProps: DateInputProps): void;
|
|
1112
|
+
/**
|
|
1113
|
+
* @hidden
|
|
1114
|
+
*/
|
|
1115
|
+
componentWillUnmount(): void;
|
|
1116
|
+
/**
|
|
1117
|
+
* @hidden
|
|
1118
|
+
*/
|
|
1119
|
+
render(): any;
|
|
1076
1120
|
/**
|
|
1077
1121
|
* @hidden
|
|
1078
1122
|
*/
|
|
1079
1123
|
intl(): IntlService;
|
|
1124
|
+
/**
|
|
1125
|
+
* @hidden
|
|
1126
|
+
*/
|
|
1127
|
+
private intlProvider;
|
|
1128
|
+
get intlCommon(): IntlService;
|
|
1080
1129
|
/**
|
|
1081
1130
|
* @hidden
|
|
1082
1131
|
*/
|
|
1083
1132
|
protected setValidity: () => void;
|
|
1084
1133
|
protected updateOnPaste: (event: React_2.SyntheticEvent<HTMLInputElement>) => void;
|
|
1085
1134
|
private spinnersMouseDown;
|
|
1086
|
-
private handlePaste;
|
|
1087
1135
|
private handleClick;
|
|
1088
|
-
private elementChange;
|
|
1089
|
-
private elementClick;
|
|
1090
1136
|
private nativeWheel;
|
|
1091
|
-
private wheel;
|
|
1092
1137
|
private increasePart;
|
|
1093
1138
|
private decreasePart;
|
|
1094
|
-
private elementKeyDown;
|
|
1095
1139
|
private elementOnFocus;
|
|
1096
1140
|
private elementOnBlur;
|
|
1097
|
-
private get selection();
|
|
1098
|
-
private setSelection;
|
|
1099
1141
|
private triggerChange;
|
|
1100
|
-
private
|
|
1101
|
-
private
|
|
1102
|
-
private switchDateSegment;
|
|
1103
|
-
private modifyDateSegmentValue;
|
|
1142
|
+
private onChange;
|
|
1143
|
+
private initKendoDate;
|
|
1104
1144
|
}
|
|
1105
1145
|
|
|
1106
1146
|
/** @hidden */
|
|
@@ -1939,9 +1979,6 @@ export declare class DateRangePickerWithoutContext extends React_2.Component<Dat
|
|
|
1939
1979
|
disabled: PropTypes.Requireable<boolean>;
|
|
1940
1980
|
spinners: PropTypes.Requireable<boolean>;
|
|
1941
1981
|
name: PropTypes.Requireable<string>;
|
|
1942
|
-
/**
|
|
1943
|
-
* @hidden
|
|
1944
|
-
*/
|
|
1945
1982
|
dir: PropTypes.Requireable<string>;
|
|
1946
1983
|
label: PropTypes.Requireable<string>;
|
|
1947
1984
|
id: PropTypes.Requireable<string>;
|
|
@@ -4353,7 +4390,7 @@ declare interface TodayCommandProps {
|
|
|
4353
4390
|
/**
|
|
4354
4391
|
* Represents the default `toggleButton` component rendered by the [KendoReact Scheduler DatePicker]({% slug overview_datepicker %}).
|
|
4355
4392
|
*/
|
|
4356
|
-
export declare const ToggleButton:
|
|
4393
|
+
export declare const ToggleButton: ForwardRefExoticComponent<ButtonProps & RefAttributes<ButtonHandle | null>>;
|
|
4357
4394
|
|
|
4358
4395
|
/**
|
|
4359
4396
|
* Represents the props of the KendoReact [Toggle Button]({% slug api_dateinputs_togglebutton %}) component.
|
package/package-metadata.mjs
CHANGED
|
@@ -10,7 +10,7 @@ const e = {
|
|
|
10
10
|
name: "@progress/kendo-react-dateinputs",
|
|
11
11
|
productName: "KendoReact",
|
|
12
12
|
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
13
|
-
publishDate:
|
|
13
|
+
publishDate: 1729606819,
|
|
14
14
|
version: "",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"
|
|
16
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-dateinputs",
|
|
3
|
-
"version": "9.0.0-develop.
|
|
3
|
+
"version": "9.0.0-develop.6",
|
|
4
4
|
"description": "React DateInput is a perfect input component for handling quick and efficient date values. KendoReact Date Inputs package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -24,12 +24,13 @@
|
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@progress/kendo-date-math": "^1.4.0",
|
|
26
26
|
"@progress/kendo-licensing": "^1.3.4",
|
|
27
|
-
"@progress/kendo-
|
|
28
|
-
"@progress/kendo-react-
|
|
29
|
-
"@progress/kendo-react-
|
|
30
|
-
"@progress/kendo-react-
|
|
31
|
-
"@progress/kendo-react-
|
|
32
|
-
"@progress/kendo-react-
|
|
27
|
+
"@progress/kendo-dateinputs-common": "0.3.5",
|
|
28
|
+
"@progress/kendo-react-buttons": "9.0.0-develop.6",
|
|
29
|
+
"@progress/kendo-react-common": "9.0.0-develop.6",
|
|
30
|
+
"@progress/kendo-react-intl": "9.0.0-develop.6",
|
|
31
|
+
"@progress/kendo-react-labels": "9.0.0-develop.6",
|
|
32
|
+
"@progress/kendo-react-layout": "9.0.0-develop.6",
|
|
33
|
+
"@progress/kendo-react-popup": "9.0.0-develop.6",
|
|
33
34
|
"@progress/kendo-svg-icons": "^3.0.0",
|
|
34
35
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0",
|
|
35
36
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2024 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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@progress/kendo-date-math"),p=require("./mask.js"),M=require("../utils.js");class y{constructor(t,e,s){this.year=!0,this.month=!0,this.date=!0,this.hours=!0,this.minutes=!0,this.seconds=!0,this.milliseconds=!0,this.leadingZero=null,this.typedMonthPart="",this.knownParts="adHhmMsEy",this.symbols={E:"E",H:"H",M:"M",a:"a",d:"d",h:"h",m:"m",s:"s",y:"y"},this._value=r.getDate(new Date),this.intlProvider=t,this.formatPlaceholder=e,this.format=s,this.monthNames=this.allFormatedMonths()}get intl(){return this.intlProvider()}get value(){return this._value}setValue(t){t?r.isEqual(t,this._value)||(this._value=r.cloneDate(t),this.modifyExisting(!0)):(this._value=r.getDate(new Date),this.modifyExisting(!1))}hasValue(){const t=(e,s)=>e||s.type!=="literal"&&s.type!=="dayperiod"&&this.getExisting(s.pattern[0]);return this.intl.splitDateFormat(this.format).reduce(t,!1)}getDateObject(){for(let t=0;t<this.knownParts.length;t++)if(!this.getExisting(this.knownParts[t]))return null;return r.cloneDate(this.value)}getTextAndFormat(){return this.merge(this.intl.formatDate(this.value,this.format),this.dateFormatString(this.value,this.format))}modifyExisting(t){const e=this.dateFormatString(this.value,this.format).symbols;for(let s=0;s<e.length;s++)this.setExisting(e[s],t)}getExisting(t){switch(t){case"y":return this.year;case"M":case"L":return this.month;case"d":return this.date;case"E":return this.date&&this.month&&this.year;case"h":case"H":return this.hours;case"m":return this.minutes;case"s":return this.seconds;default:return!0}}setExisting(t,e){switch(t){case"y":this.year=e,e===!1&&this._value.setFullYear(2e3);break;case"M":this.month=e,e===!1&&this._value.setMonth(0);break;case"d":this.date=e;break;case"h":case"H":this.hours=e;break;case"m":this.minutes=e;break;case"s":this.seconds=e;break;default:return}}modifyPart(t,e){let s=r.cloneDate(this.value);switch(t){case"y":s.setFullYear(s.getFullYear()+e);break;case"M":s=r.addMonths(this.value,e);break;case"d":case"E":s.setDate(s.getDate()+e);break;case"h":case"H":s.setHours(s.getHours()+e);break;case"m":s.setMinutes(s.getMinutes()+e);break;case"s":s.setSeconds(s.getSeconds()+e);break;case"a":s.setHours(s.getHours()+12*e);break}this.setExisting(t,!0),this._value=s}parsePart(t,e){if(this.resetLeadingZero(),!e)return this.setExisting(t,!1),{value:null};const s=this.intl.formatDate(this.value,this.format),n=this.dateFormatString(this.value,this.format),h=n.symbols;let i=!1,l="",o="",m="";for(let u=0;u<s.length;u++)h[u]===t?(o+=this.getExisting(t)?s[u]:"0",i=!0):i?m+=s[u]:l+=s[u];let a=null;const c=this.matchMonth(e);for(;o.length>0&&o.charAt(0)==="0";)o=o.slice(1);o.length>=4&&(o="");for(let u=0;u<2;u++){const g=o+e,f=parseInt(g,10);if(a=this.intl.parseDate(l+g+m,this.format),!a&&!isNaN(f)&&!isNaN(parseInt(e,10))){if(t==="M"&&!c){const d=f-1;d>-1&&d<12&&(a=r.cloneDate(this.value),a.setMonth(d),a.getMonth()!==d&&(a=r.lastDayOfMonth(r.addMonths(a,-1))))}t==="y"&&(a=r.createDate(parseInt(g,10),this.month?this.value.getMonth():0,this.date?this.value.getDate():1,this.hours?this.value.getHours():0,this.minutes?this.value.getMinutes():0,this.seconds?this.value.getSeconds():0,this.milliseconds?this.value.getMilliseconds():0),this.date&&a.getDate()!==this.value.getDate()&&(a=r.lastDayOfMonth(r.addMonths(a,-1))))}if(a)return this._value=a,this.setExisting(t,!0),{value:this.value};o=""}return c&&(a=this.intl.parseDate(l+c+m,this.format),a)?(this._value=a,this.setExisting(t,!0),{value:this.value}):(e==="0"&&(this.leadingZero=this.isAbbrMonth(n.partMap,t)?null:{[t]:!0},this.setExisting(t,!1)),{value:null})}symbolMap(t){return this.intl.splitDateFormat(this.format).reduce(M.dateSymbolMap,{})[t]}resetLeadingZero(){const t=this.leadingZero!==null;return this.leadingZero=null,t}isAbbrMonth(t,e){const s=this.partPattern(t,e);return s.type==="month"&&s.names}partPattern(t,e){return t.filter(s=>s.pattern.indexOf(e)!==-1)[0]}matchMonth(t){if(this.typedMonthPart+=t.toLowerCase(),this.monthNames.length===0)return"";for(;this.typedMonthPart.length>0;){for(let s=0;s<this.monthNames.length;s++)if(this.monthNames[s].toLowerCase().indexOf(this.typedMonthPart)===0)return this.monthNames[s];const e=parseInt(this.typedMonthPart,10);if(e>=1&&e<=12&&e.toString()===this.typedMonthPart)return this.monthNames[e-1];this.typedMonthPart=this.typedMonthPart.substring(1,this.typedMonthPart.length)}return""}allFormatedMonths(){const t=this.intl.splitDateFormat(this.format);for(let e=0;e<t.length;e++)if(t[e].type==="month"&&t[e].names)return this.intl.dateFormatNames(t[e].names);return[]}dateFormatString(t,e){const s=this.intl.splitDateFormat(e),n=[],h=[];for(let l=0;l<s.length;l++){let o=this.intl.formatDate(t,{pattern:s[l].pattern}).length;for(;o>0;)n.push(this.symbols[s[l].pattern[0]]||"_"),h.push(s[l]),o--}const i=new p.Mask;return i.symbols=n.join(""),i.partMap=h,i}merge(t,e){let s="",n="";const h=e.symbols;for(let i=h.length-1;i>=0;i--)if(this.knownParts.indexOf(h[i])===-1||this.getExisting(h[i]))s=t[i]+s,n=h[i]+n;else{const l=h[i];for(;i>=0&&l===h[i];)i--;for(i++,this.leadingZero&&this.leadingZero[l]?s="0"+s:s=this.dateFieldName(e.partMap[i])+s;n.length<s.length;)n=h[i]+n}return{text:s,format:n}}dateFieldName(t){const e=this.formatPlaceholder||"wide";return e[t.type]?e[t.type]:e==="formatPattern"?t.pattern:this.intl.dateFieldName(Object.assign(t,{nameType:e}))}}exports.KendoDate=y;
|