@spscommerce/ds-react 7.15.1 → 7.16.0
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/lib/dateTimeRangePicker/SpsDateTimeRangePicker.d.ts +2 -1
- package/lib/datepicker/utils.d.ts +6 -3
- package/lib/index.cjs.js +215 -132
- package/lib/index.d.ts +1 -0
- package/lib/index.es.js +6558 -6339
- package/lib/time-input/SpsTimeInput.d.ts +11 -0
- package/lib/time-input/SpsTimeInput.examples.d.ts +2 -0
- package/lib/time-input/index.d.ts +2 -0
- package/package.json +12 -12
|
@@ -11,6 +11,7 @@ export type SpsDateTimeRangePickerProps = React.PropsWithChildren<SpsGlobalPropT
|
|
|
11
11
|
presets?: DateTimePreset[];
|
|
12
12
|
value?: SimpleMomentRange;
|
|
13
13
|
showTwoMonths?: boolean;
|
|
14
|
+
twentyFourHour?: boolean;
|
|
14
15
|
}> & React.HTMLAttributes<HTMLInputElement>;
|
|
15
16
|
export declare const DEFAULT_DATETIME_PRESETS: DateTimePreset[];
|
|
16
|
-
export declare function SpsDateTimeRangePicker({ className, disabled, formMeta, id, maxDate, minDate, onChange, presets, value, showTwoMonths, "data-testid": testId, }: SpsDateTimeRangePickerProps): JSX.Element;
|
|
17
|
+
export declare function SpsDateTimeRangePicker({ className, disabled, formMeta, id, maxDate, minDate, onChange, presets, value, showTwoMonths, twentyFourHour, "data-testid": testId, }: SpsDateTimeRangePickerProps): JSX.Element;
|
|
@@ -2,6 +2,7 @@ import type { SimpleDate, SimpleDateRange, DatePreset, DateTimePreset, SimpleMom
|
|
|
2
2
|
import type { Moment } from "moment-timezone";
|
|
3
3
|
export declare const FORMAT = "MM/DD/YYYY";
|
|
4
4
|
export declare const FORMAT_WITH_TIME = "MM/DD/YYYY hh:mm A";
|
|
5
|
+
export declare const FORMAT_WITH_TIME_24 = "MM/DD/YYYY HH:mm";
|
|
5
6
|
export declare const FORMAT_PATTERN: RegExp;
|
|
6
7
|
export declare const SYMBOL_DATE_PARSE_ERROR: unique symbol;
|
|
7
8
|
export declare const SimpleDateUtils: Readonly<{
|
|
@@ -13,8 +14,8 @@ export declare const SimpleDateUtils: Readonly<{
|
|
|
13
14
|
toMoment(date?: Moment | SimpleDate | null): Moment | null;
|
|
14
15
|
toString(date?: Moment | SimpleDate | null): string;
|
|
15
16
|
toStringRange(dateRange: SimpleDateRange): string;
|
|
16
|
-
toDateTimeString(dateMoment: Moment | null): string;
|
|
17
|
-
toDateTimeStringRange(dateRange: SimpleMomentRange): string;
|
|
17
|
+
toDateTimeString(dateMoment: Moment | null, twentyFourHourFormat?: boolean): string;
|
|
18
|
+
toDateTimeStringRange(dateRange: SimpleMomentRange, twentyFourHourFormat?: boolean): string;
|
|
18
19
|
create(): SimpleDate;
|
|
19
20
|
isSameDate(d1: SimpleDate, d2: SimpleDate): boolean;
|
|
20
21
|
isSameMonth(d1: SimpleDate, d2: SimpleDate): boolean;
|
|
@@ -25,6 +26,8 @@ export declare const SimpleDateUtils: Readonly<{
|
|
|
25
26
|
nextMonth(date: SimpleDate): SimpleDate;
|
|
26
27
|
createRangeFromPreset(preset: DatePreset): SimpleDateRange;
|
|
27
28
|
createDateTimeRangeFromPreset(preset: DateTimePreset): SimpleMomentRange;
|
|
28
|
-
splitMomentInDateTimeParts(dateMoment?: Moment | null): [string, string, string];
|
|
29
|
+
splitMomentInDateTimeParts(dateMoment?: Moment | null, twentyFourHourFormat?: boolean): [string, string, string | undefined];
|
|
29
30
|
getCurrentMoment(): Moment;
|
|
31
|
+
validateTimeString(timeString?: string, twentyFourHourFormat?: boolean): boolean;
|
|
32
|
+
padIncompleteTimeString(timeString?: string): string;
|
|
30
33
|
}>;
|