@react-stately/datepicker 3.0.0-nightly.1847 → 3.0.0-nightly.1852
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/dist/main.js +3 -12
- package/dist/main.js.map +1 -1
- package/dist/module.js +3 -12
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +2 -14
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/useDateFieldState.ts +2 -10
- package/src/useDatePickerState.ts +4 -12
- package/src/useDateRangePickerState.ts +2 -10
package/dist/main.js
CHANGED
|
@@ -96,7 +96,6 @@ function $aaab7a647e17e1fd$export$87194bb378cc3ac2(props) {
|
|
|
96
96
|
var ref;
|
|
97
97
|
let overlayState = $h2qOe$reactstatelyoverlays.useOverlayTriggerState(props);
|
|
98
98
|
let [value, setValue] = $h2qOe$reactstatelyutils.useControlledState(props.value, props.defaultValue || null, props.onChange);
|
|
99
|
-
let [isFocused, setFocused] = $h2qOe$react.useState(false);
|
|
100
99
|
let v = value || props.placeholderValue;
|
|
101
100
|
let [granularity, defaultTimeZone] = $50d5d6a623389320$export$2440da353cedad43(v, props.granularity);
|
|
102
101
|
let dateValue = value != null ? value.toDate(defaultTimeZone !== null && defaultTimeZone !== void 0 ? defaultTimeZone : 'UTC') : null;
|
|
@@ -157,9 +156,7 @@ function $aaab7a647e17e1fd$export$87194bb378cc3ac2(props) {
|
|
|
157
156
|
});
|
|
158
157
|
let formatter = new $h2qOe$internationalizeddate.DateFormatter(locale, formatOptions);
|
|
159
158
|
return formatter.format(dateValue);
|
|
160
|
-
}
|
|
161
|
-
isFocused: isFocused,
|
|
162
|
-
setFocused: setFocused
|
|
159
|
+
}
|
|
163
160
|
};
|
|
164
161
|
}
|
|
165
162
|
|
|
@@ -585,7 +582,6 @@ function $596a1f0f523d6752$export$60e84778edff6d26(props) {
|
|
|
585
582
|
let v1 = props.value || props.defaultValue || props.placeholderValue;
|
|
586
583
|
let [granularity, defaultTimeZone] = $50d5d6a623389320$export$2440da353cedad43(v1, props.granularity);
|
|
587
584
|
let timeZone = defaultTimeZone || 'UTC';
|
|
588
|
-
let [isFocused, setFocused] = $h2qOe$react.useState(false);
|
|
589
585
|
// props.granularity must actually exist in the value if one is provided.
|
|
590
586
|
if (v1 && !(granularity in v1)) throw new Error('Invalid granularity ' + granularity + ' for value ' + v1.toString());
|
|
591
587
|
let defaultFormatter = $h2qOe$react.useMemo(()=>new $h2qOe$internationalizeddate.DateFormatter(locale)
|
|
@@ -822,9 +818,7 @@ function $596a1f0f523d6752$export$60e84778edff6d26(props) {
|
|
|
822
818
|
let formatOptions = $50d5d6a623389320$export$7e319ea407e63bc0(fieldOptions, formatOpts);
|
|
823
819
|
let formatter = new $h2qOe$internationalizeddate.DateFormatter(locale, formatOptions);
|
|
824
820
|
return formatter.format(dateValue);
|
|
825
|
-
}
|
|
826
|
-
isFocused: isFocused,
|
|
827
|
-
setFocused: setFocused
|
|
821
|
+
}
|
|
828
822
|
};
|
|
829
823
|
}
|
|
830
824
|
function $596a1f0f523d6752$var$getSegmentLimits(date, type, options) {
|
|
@@ -975,7 +969,6 @@ function $7072d26f58deb33b$export$e50a61c1de9f574(props) {
|
|
|
975
969
|
end: null
|
|
976
970
|
}
|
|
977
971
|
);
|
|
978
|
-
let [isFocused, setFocused] = $h2qOe$react.useState(false);
|
|
979
972
|
// Reset the placeholder if the value prop is set to null.
|
|
980
973
|
if (controlledValue == null && placeholderValue.start && placeholderValue.end) {
|
|
981
974
|
placeholderValue = {
|
|
@@ -1123,9 +1116,7 @@ function $7072d26f58deb33b$export$e50a61c1de9f574(props) {
|
|
|
1123
1116
|
start: startFormatter.format(startDate),
|
|
1124
1117
|
end: endFormatter.format(endDate)
|
|
1125
1118
|
};
|
|
1126
|
-
}
|
|
1127
|
-
isFocused: isFocused,
|
|
1128
|
-
setFocused: setFocused
|
|
1119
|
+
}
|
|
1129
1120
|
};
|
|
1130
1121
|
}
|
|
1131
1122
|
|
package/dist/main.js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AAC,QAAQ,IAAG,QAAQ,GAAI,CAAC;QAC1B,QAAQ,CAAC,CAAC,IAAI,CAAK,QAAI,CAAC,GAAG,QAAQ,GAAG,QAAQ,IAAI,mCAAM,CAAC,QAAQ;IACnE,CAAC;IAED,MAAM,CAAC,yCAAiB,CAAC,CAAC;WACrB,KAAK;QACR,KAAK,EAAE,QAAQ;QACf,YAAY,EAAE,SAAS;QACvB,QAAQ,EAAE,OAAO;QACjB,QAAQ,EAAE,OAAO;kBACjB,QAAQ;QACR,WAAW,EAAE,WAAW,IAAI,CAAQ;QACpC,cAAc,EAAE,CAAM;QACtB,gBAAgB,EAAE,eAAe;QACjC,EAA8C,AAA9C,4CAA8C;QAC9C,cAAc,MAAQ,GAAG,CAAC,8CAAiB;IAC7C,CAAC;AACH,CAAC;SAEQ,kCAAY,CAAC,KAAgB,EAAE,IAAe,GAAG,kCAAK,CAAC,6CAAgB,KAAK,CAAC;IACpF,EAAE,GAAG,KAAK,EACR,MAAM,CAAC,IAAI;IAGb,EAAE,EAAE,CAAK,QAAI,KAAK,EAChB,MAAM,CAAC,KAAK;IAGd,MAAM,CAAC,+CAAkB,CAAC,IAAI,EAAE,KAAK;AACvC,CAAC;;","sources":["packages/@react-stately/datepicker/src/index.ts","packages/@react-stately/datepicker/src/useDatePickerState.ts","packages/@react-stately/datepicker/src/utils.ts","packages/@react-stately/datepicker/src/useDateFieldState.ts","packages/@react-stately/datepicker/src/placeholders.ts","packages/@react-stately/datepicker/src/useDateRangePickerState.ts","packages/@react-stately/datepicker/src/useTimeFieldState.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {useDatePickerState} from './useDatePickerState';\nexport {useDateFieldState} from './useDateFieldState';\nexport {useDateRangePickerState} from './useDateRangePickerState';\nexport {useTimeFieldState} from './useTimeFieldState';\n\nexport type {DateFieldStateOptions, DateFieldState, DateSegment, SegmentType} from './useDateFieldState';\nexport type {DatePickerStateOptions, DatePickerState} from './useDatePickerState';\nexport type {DateRangePickerStateOptions, DateRangePickerState} from './useDateRangePickerState';\nexport type {TimeFieldStateOptions} from './useTimeFieldState';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarDate, DateFormatter, toCalendarDate, toCalendarDateTime} from '@internationalized/date';\nimport {DatePickerProps, DateValue, Granularity, TimeValue} from '@react-types/datepicker';\nimport {FieldOptions, getFormatOptions, getPlaceholderTime, useDefaultProps} from './utils';\nimport {isInvalid} from './utils';\nimport {OverlayTriggerState, useOverlayTriggerState} from '@react-stately/overlays';\nimport {useControlledState} from '@react-stately/utils';\nimport {useState} from 'react';\nimport {ValidationState} from '@react-types/shared';\n\nexport interface DatePickerStateOptions extends DatePickerProps<DateValue> {\n /**\n * Determines whether the date picker popover should close automatically when a date is selected.\n * @default true\n */\n shouldCloseOnSelect?: boolean | (() => boolean)\n}\n\nexport interface DatePickerState extends OverlayTriggerState {\n /** The currently selected date. */\n value: DateValue,\n /** Sets the selected date. */\n setValue(value: DateValue): void,\n /**\n * The date portion of the value. This may be set prior to `value` if the user has\n * selected a date but has not yet selected a time.\n */\n dateValue: DateValue,\n /** Sets the date portion of the value. */\n setDateValue(value: CalendarDate): void,\n /**\n * The time portion of the value. This may be set prior to `value` if the user has\n * selected a time but has not yet selected a date.\n */\n timeValue: TimeValue,\n /** Sets the time portion of the value. */\n setTimeValue(value: TimeValue): void,\n /** The granularity for the field, based on the `granularity` prop and current value. */\n granularity: Granularity,\n /** Whether the date picker supports selecting a time, according to the `granularity` prop and current value. */\n hasTime: boolean,\n /** Whether the calendar popover is currently open. */\n isOpen: boolean,\n /** Sets whether the calendar popover is open. */\n setOpen(isOpen: boolean): void,\n /** The current validation state of the date picker, based on the `validationState`, `minValue`, and `maxValue` props. */\n validationState: ValidationState,\n /** Formats the selected value using the given options. */\n formatValue(locale: string, fieldOptions: FieldOptions): string,\n /** Whether the date picker is currently focused. */\n readonly isFocused: boolean,\n /** Sets whether the date picker is focused. */\n setFocused(isFocused: boolean): void\n}\n\n/**\n * Provides state management for a date picker component.\n * A date picker combines a DateField and a Calendar popover to allow users to enter or select a date and time value.\n */\nexport function useDatePickerState(props: DatePickerStateOptions): DatePickerState {\n let overlayState = useOverlayTriggerState(props);\n let [value, setValue] = useControlledState<DateValue>(props.value, props.defaultValue || null, props.onChange);\n\n let [isFocused, setFocused] = useState(false);\n\n let v = (value || props.placeholderValue);\n let [granularity, defaultTimeZone] = useDefaultProps(v, props.granularity);\n let dateValue = value != null ? value.toDate(defaultTimeZone ?? 'UTC') : null;\n let hasTime = granularity === 'hour' || granularity === 'minute' || granularity === 'second';\n let shouldCloseOnSelect = props.shouldCloseOnSelect ?? true;\n\n let [selectedDate, setSelectedDate] = useState<DateValue>(null);\n let [selectedTime, setSelectedTime] = useState<TimeValue>(null);\n\n if (value) {\n selectedDate = value;\n if ('hour' in value) {\n selectedTime = value;\n }\n }\n\n // props.granularity must actually exist in the value if one is provided.\n if (v && !(granularity in v)) {\n throw new Error('Invalid granularity ' + granularity + ' for value ' + v.toString());\n }\n\n let commitValue = (date: DateValue, time: TimeValue) => {\n setValue('timeZone' in time ? time.set(toCalendarDate(date)) : toCalendarDateTime(date, time));\n };\n\n // Intercept setValue to make sure the Time section is not changed by date selection in Calendar\n let selectDate = (newValue: CalendarDate) => {\n let shouldClose = typeof shouldCloseOnSelect === 'function' ? shouldCloseOnSelect() : shouldCloseOnSelect;\n if (hasTime) {\n if (selectedTime || shouldClose) {\n commitValue(newValue, selectedTime || getPlaceholderTime(props.placeholderValue));\n } else {\n setSelectedDate(newValue);\n }\n } else {\n setValue(newValue);\n }\n\n if (shouldClose) {\n overlayState.setOpen(false);\n }\n };\n\n let selectTime = (newValue: TimeValue) => {\n if (selectedDate) {\n commitValue(selectedDate, newValue);\n } else {\n setSelectedTime(newValue);\n }\n };\n\n let validationState: ValidationState = props.validationState ||\n (isInvalid(value, props.minValue, props.maxValue) ? 'invalid' : null) ||\n (value && props.isDateUnavailable?.(value) ? 'invalid' : null);\n\n return {\n value,\n setValue,\n dateValue: selectedDate,\n timeValue: selectedTime,\n setDateValue: selectDate,\n setTimeValue: selectTime,\n granularity,\n hasTime,\n ...overlayState,\n setOpen(isOpen) {\n // Commit the selected date when the calendar is closed. Use a placeholder time if one wasn't set.\n // If only the time was set and not the date, don't commit. The state will be preserved until\n // the user opens the popover again.\n if (!isOpen && !value && selectedDate && hasTime) {\n commitValue(selectedDate, selectedTime || getPlaceholderTime(props.placeholderValue));\n }\n\n overlayState.setOpen(isOpen);\n },\n validationState,\n formatValue(locale, fieldOptions) {\n if (!dateValue) {\n return '';\n }\n\n let formatOptions = getFormatOptions(fieldOptions, {\n granularity,\n timeZone: defaultTimeZone,\n hideTimeZone: props.hideTimeZone,\n hourCycle: props.hourCycle,\n showEra: value.calendar.identifier === 'gregory' && value.era === 'BC'\n });\n\n let formatter = new DateFormatter(locale, formatOptions);\n return formatter.format(dateValue);\n },\n isFocused,\n setFocused\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Calendar, now, Time, toCalendar, toCalendarDate, toCalendarDateTime} from '@internationalized/date';\nimport {DatePickerProps, DateValue, Granularity, TimeValue} from '@react-types/datepicker';\nimport {useRef} from 'react';\n\nexport function isInvalid(value: DateValue, minValue: DateValue, maxValue: DateValue) {\n return value != null && (\n (minValue != null && value.compare(minValue) < 0) ||\n (maxValue != null && value.compare(maxValue) > 0)\n );\n}\n\nexport type FieldOptions = Pick<Intl.DateTimeFormatOptions, 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second'>;\ninterface FormatterOptions {\n timeZone?: string,\n hideTimeZone?: boolean,\n granularity?: DatePickerProps<any>['granularity'],\n maxGranularity?: 'year' | 'month' | DatePickerProps<any>['granularity'],\n hourCycle?: 12 | 24,\n showEra?: boolean\n}\n\nconst DEFAULT_FIELD_OPTIONS: FieldOptions = {\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n hour: 'numeric',\n minute: '2-digit',\n second: '2-digit'\n};\n\nexport function getFormatOptions(\n fieldOptions: FieldOptions,\n options: FormatterOptions\n): Intl.DateTimeFormatOptions {\n fieldOptions = {...DEFAULT_FIELD_OPTIONS, ...fieldOptions};\n let granularity = options.granularity || 'minute';\n let keys = Object.keys(fieldOptions);\n let startIdx = keys.indexOf(options.maxGranularity ?? 'year');\n if (startIdx < 0) {\n startIdx = 0;\n }\n\n let endIdx = keys.indexOf(granularity);\n if (endIdx < 0) {\n endIdx = 2;\n }\n\n if (startIdx > endIdx) {\n throw new Error('maxGranularity must be greater than granularity');\n }\n\n let opts: Intl.DateTimeFormatOptions = keys.slice(startIdx, endIdx + 1).reduce((opts, key) => {\n opts[key] = fieldOptions[key];\n return opts;\n }, {});\n\n if (options.hourCycle != null) {\n opts.hour12 = options.hourCycle === 12;\n }\n\n opts.timeZone = options.timeZone || 'UTC';\n\n let hasTime = granularity === 'hour' || granularity === 'minute' || granularity === 'second';\n if (hasTime && options.timeZone && !options.hideTimeZone) {\n opts.timeZoneName = 'short';\n }\n\n if (options.showEra && startIdx === 0) {\n opts.era = 'short';\n }\n\n return opts;\n}\n\nexport function getPlaceholderTime(placeholderValue: DateValue): TimeValue {\n if (placeholderValue && 'hour' in placeholderValue) {\n return placeholderValue;\n }\n\n return new Time();\n}\n\nexport function convertValue(value: DateValue, calendar: Calendar): DateValue {\n if (value === null) {\n return null;\n }\n\n if (!value) {\n return undefined;\n }\n\n return toCalendar(value, calendar);\n}\n\n\nexport function createPlaceholderDate(placeholderValue: DateValue, granularity: string, calendar: Calendar, timeZone: string) {\n if (placeholderValue) {\n return convertValue(placeholderValue, calendar);\n }\n\n let date = toCalendar(now(timeZone).set({\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0\n }), calendar);\n\n if (granularity === 'year' || granularity === 'month' || granularity === 'day') {\n return toCalendarDate(date);\n }\n\n if (!timeZone) {\n return toCalendarDateTime(date);\n }\n\n return date;\n}\n\nexport function useDefaultProps(v: DateValue, granularity: Granularity): [Granularity, string] {\n // Compute default granularity and time zone from the value. If the value becomes null, keep the last values.\n let lastValue = useRef(v);\n if (v) {\n lastValue.current = v;\n }\n\n v = lastValue.current;\n let defaultTimeZone = (v && 'timeZone' in v ? v.timeZone : undefined);\n granularity = granularity || (v && 'minute' in v ? 'minute' : 'day');\n\n // props.granularity must actually exist in the value if one is provided.\n if (v && !(granularity in v)) {\n throw new Error('Invalid granularity ' + granularity + ' for value ' + v.toString());\n }\n\n return [granularity, defaultTimeZone];\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Calendar, DateFormatter, getMinimumDayInMonth, getMinimumMonthInYear, GregorianCalendar, toCalendar} from '@internationalized/date';\nimport {convertValue, createPlaceholderDate, FieldOptions, getFormatOptions, isInvalid, useDefaultProps} from './utils';\nimport {DatePickerProps, DateValue, Granularity} from '@react-types/datepicker';\nimport {getPlaceholder} from './placeholders';\nimport {useControlledState} from '@react-stately/utils';\nimport {useEffect, useMemo, useRef, useState} from 'react';\nimport {ValidationState} from '@react-types/shared';\n\nexport type SegmentType = 'era' | 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second' | 'dayPeriod' | 'literal' | 'timeZoneName';\nexport interface DateSegment {\n /** The type of segment. */\n type: SegmentType,\n /** The formatted text for the segment. */\n text: string,\n /** The numeric value for the segment, if applicable. */\n value?: number,\n /** The minimum numeric value for the segment, if applicable. */\n minValue?: number,\n /** The maximum numeric value for the segment, if applicable. */\n maxValue?: number,\n /** Whether the value is a placeholder. */\n isPlaceholder: boolean,\n /** A placeholder string for the segment. */\n placeholder: string,\n /** Whether the segment is editable. */\n isEditable: boolean\n}\n\nexport interface DateFieldState {\n /** The current field value. */\n value: DateValue,\n /** The current value, converted to a native JavaScript `Date` object. */\n dateValue: Date,\n /** The calendar system currently in use. */\n calendar: Calendar,\n /** Sets the field's value. */\n setValue(value: DateValue): void,\n /** A list of segments for the current value. */\n segments: DateSegment[],\n /** A date formatter configured for the current locale and format. */\n dateFormatter: DateFormatter,\n /** The current validation state of the date field, based on the `validationState`, `minValue`, and `maxValue` props. */\n validationState: ValidationState,\n /** The granularity for the field, based on the `granularity` prop and current value. */\n granularity: Granularity,\n /** The maximum date or time unit that is displayed in the field. */\n maxGranularity: 'year' | 'month' | Granularity,\n /** Whether the field is disabled. */\n isDisabled: boolean,\n /** Whether the field is read only. */\n isReadOnly: boolean,\n /** Whether the field is required. */\n isRequired: boolean,\n /** Increments the given segment. Upon reaching the minimum or maximum value, the value wraps around to the opposite limit. */\n increment(type: SegmentType): void,\n /** Decrements the given segment. Upon reaching the minimum or maximum value, the value wraps around to the opposite limit. */\n decrement(type: SegmentType): void,\n /**\n * Increments the given segment by a larger amount, rounding it to the nearest increment.\n * The amount to increment by depends on the field, for example 15 minutes, 7 days, and 5 years.\n * Upon reaching the minimum or maximum value, the value wraps around to the opposite limit.\n */\n incrementPage(type: SegmentType): void,\n /**\n * Decrements the given segment by a larger amount, rounding it to the nearest increment.\n * The amount to decrement by depends on the field, for example 15 minutes, 7 days, and 5 years.\n * Upon reaching the minimum or maximum value, the value wraps around to the opposite limit.\n */\n decrementPage(type: SegmentType): void,\n /** Sets the value of the given segment. */\n setSegment(type: 'era', value: string): void,\n setSegment(type: SegmentType, value: number): void,\n /** Updates the remaining unfilled segments with the placeholder value. */\n confirmPlaceholder(): void,\n /** Clears the value of the given segment, reverting it to the placeholder. */\n clearSegment(type: SegmentType): void,\n /** Formats the current date value using the given options. */\n formatValue(fieldOptions: FieldOptions): string,\n /** Whether the date field is currently focused. */\n readonly isFocused: boolean,\n /** Sets whether the date field is focused. */\n setFocused(isFocused: boolean): void\n}\n\nconst EDITABLE_SEGMENTS = {\n year: true,\n month: true,\n day: true,\n hour: true,\n minute: true,\n second: true,\n dayPeriod: true,\n era: true\n};\n\nconst PAGE_STEP = {\n year: 5,\n month: 2,\n day: 7,\n hour: 2,\n minute: 15,\n second: 15\n};\n\n// Node seems to convert everything to lowercase...\nconst TYPE_MAPPING = {\n dayperiod: 'dayPeriod'\n};\n\nexport interface DateFieldStateOptions extends DatePickerProps<DateValue> {\n /**\n * The maximum unit to display in the date field.\n * @default 'year'\n */\n maxGranularity?: 'year' | 'month' | Granularity,\n /** The locale to display and edit the value according to. */\n locale: string,\n /**\n * A function that creates a [Calendar](../internationalized/date/Calendar.html)\n * object for a given calendar identifier. Such a function may be imported from the\n * `@internationalized/date` package, or manually implemented to include support for\n * only certain calendars.\n */\n createCalendar: (name: string) => Calendar\n}\n\n/**\n * Provides state management for a date field component.\n * A date field allows users to enter and edit date and time values using a keyboard.\n * Each part of a date value is displayed in an individually editable segment.\n */\nexport function useDateFieldState(props: DateFieldStateOptions): DateFieldState {\n let {\n locale,\n createCalendar,\n hideTimeZone,\n isDisabled,\n isReadOnly,\n isRequired\n } = props;\n\n let v: DateValue = (props.value || props.defaultValue || props.placeholderValue);\n let [granularity, defaultTimeZone] = useDefaultProps(v, props.granularity);\n let timeZone = defaultTimeZone || 'UTC';\n\n let [isFocused, setFocused] = useState(false);\n\n // props.granularity must actually exist in the value if one is provided.\n if (v && !(granularity in v)) {\n throw new Error('Invalid granularity ' + granularity + ' for value ' + v.toString());\n }\n\n let defaultFormatter = useMemo(() => new DateFormatter(locale), [locale]);\n let calendar = useMemo(() => createCalendar(defaultFormatter.resolvedOptions().calendar), [createCalendar, defaultFormatter]);\n\n let [value, setDate] = useControlledState<DateValue>(\n props.value,\n props.defaultValue,\n props.onChange\n );\n\n let calendarValue = useMemo(() => convertValue(value, calendar), [value, calendar]);\n\n // We keep track of the placeholder date separately in state so that onChange is not called\n // until all segments are set. If the value === null (not undefined), then assume the component\n // is controlled, so use the placeholder as the value until all segments are entered so it doesn't\n // change from uncontrolled to controlled and emit a warning.\n let [placeholderDate, setPlaceholderDate] = useState(\n () => createPlaceholderDate(props.placeholderValue, granularity, calendar, defaultTimeZone)\n );\n\n let val = calendarValue || placeholderDate;\n let showEra = calendar.identifier === 'gregory' && val.era === 'BC';\n let formatOpts = useMemo(() => ({\n granularity,\n maxGranularity: props.maxGranularity ?? 'year',\n timeZone: defaultTimeZone,\n hideTimeZone,\n hourCycle: props.hourCycle,\n showEra\n }), [props.maxGranularity, granularity, props.hourCycle, defaultTimeZone, hideTimeZone, showEra]);\n let opts = useMemo(() => getFormatOptions({}, formatOpts), [formatOpts]);\n\n let dateFormatter = useMemo(() => new DateFormatter(locale, opts), [locale, opts]);\n let resolvedOptions = useMemo(() => dateFormatter.resolvedOptions(), [dateFormatter]);\n\n // Determine how many editable segments there are for validation purposes.\n // The result is cached for performance.\n let allSegments: Partial<typeof EDITABLE_SEGMENTS> = useMemo(() =>\n dateFormatter.formatToParts(new Date())\n .filter(seg => EDITABLE_SEGMENTS[seg.type])\n .reduce((p, seg) => (p[seg.type] = true, p), {})\n , [dateFormatter]);\n\n let [validSegments, setValidSegments] = useState<Partial<typeof EDITABLE_SEGMENTS>>(\n () => props.value || props.defaultValue ? {...allSegments} : {}\n );\n\n // Reset placeholder when calendar changes\n let lastCalendarIdentifier = useRef(calendar.identifier);\n useEffect(() => {\n if (calendar.identifier !== lastCalendarIdentifier.current) {\n lastCalendarIdentifier.current = calendar.identifier;\n setPlaceholderDate(placeholder =>\n Object.keys(validSegments).length > 0\n ? toCalendar(placeholder, calendar)\n : createPlaceholderDate(props.placeholderValue, granularity, calendar, defaultTimeZone)\n );\n }\n }, [calendar, granularity, validSegments, defaultTimeZone, props.placeholderValue]);\n\n // If there is a value prop, and some segments were previously placeholders, mark them all as valid.\n if (value && Object.keys(validSegments).length < Object.keys(allSegments).length) {\n validSegments = {...allSegments};\n setValidSegments(validSegments);\n }\n\n // If the value is set to null and all segments are valid, reset the placeholder.\n if (value == null && Object.keys(validSegments).length === Object.keys(allSegments).length) {\n validSegments = {};\n setValidSegments(validSegments);\n setPlaceholderDate(createPlaceholderDate(props.placeholderValue, granularity, calendar, defaultTimeZone));\n }\n\n // If all segments are valid, use the date from state, otherwise use the placeholder date.\n let displayValue = calendarValue && Object.keys(validSegments).length >= Object.keys(allSegments).length ? calendarValue : placeholderDate;\n let setValue = (newValue: DateValue) => {\n if (props.isDisabled || props.isReadOnly) {\n return;\n }\n\n if (Object.keys(validSegments).length >= Object.keys(allSegments).length) {\n // The display calendar should not have any effect on the emitted value.\n // Emit dates in the same calendar as the original value, if any, otherwise gregorian.\n newValue = toCalendar(newValue, v?.calendar || new GregorianCalendar());\n setDate(newValue);\n } else {\n setPlaceholderDate(newValue);\n }\n };\n\n let dateValue = useMemo(() => displayValue.toDate(timeZone), [displayValue, timeZone]);\n let segments = useMemo(() =>\n dateFormatter.formatToParts(dateValue)\n .map(segment => {\n let isEditable = EDITABLE_SEGMENTS[segment.type];\n if (segment.type === 'era' && calendar.getEras().length === 1) {\n isEditable = false;\n }\n\n let isPlaceholder = EDITABLE_SEGMENTS[segment.type] && !validSegments[segment.type];\n let placeholder = EDITABLE_SEGMENTS[segment.type] ? getPlaceholder(segment.type, segment.value, locale) : null;\n return {\n type: TYPE_MAPPING[segment.type] || segment.type,\n text: isPlaceholder ? placeholder : segment.value,\n ...getSegmentLimits(displayValue, segment.type, resolvedOptions),\n isPlaceholder,\n placeholder,\n isEditable\n } as DateSegment;\n })\n , [dateValue, validSegments, dateFormatter, resolvedOptions, displayValue, calendar, locale]);\n\n // When the era field appears, mark it valid if the year field is already valid.\n // If the era field disappears, remove it from the valid segments.\n if (allSegments.era && validSegments.year && !validSegments.era) {\n validSegments.era = true;\n setValidSegments({...validSegments});\n } else if (!allSegments.era && validSegments.era) {\n delete validSegments.era;\n setValidSegments({...validSegments});\n }\n\n let markValid = (part: Intl.DateTimeFormatPartTypes) => {\n validSegments[part] = true;\n if (part === 'year' && allSegments.era) {\n validSegments.era = true;\n }\n setValidSegments({...validSegments});\n };\n\n let adjustSegment = (type: Intl.DateTimeFormatPartTypes, amount: number) => {\n if (!validSegments[type]) {\n markValid(type);\n if (Object.keys(validSegments).length >= Object.keys(allSegments).length) {\n setValue(displayValue);\n }\n } else {\n setValue(addSegment(displayValue, type, amount, resolvedOptions));\n }\n };\n\n let validationState: ValidationState = props.validationState ||\n (isInvalid(calendarValue, props.minValue, props.maxValue) ? 'invalid' : null);\n\n return {\n value: calendarValue,\n dateValue,\n calendar,\n setValue,\n segments,\n dateFormatter,\n validationState,\n granularity,\n maxGranularity: props.maxGranularity ?? 'year',\n isDisabled,\n isReadOnly,\n isRequired,\n increment(part) {\n adjustSegment(part, 1);\n },\n decrement(part) {\n adjustSegment(part, -1);\n },\n incrementPage(part) {\n adjustSegment(part, PAGE_STEP[part] || 1);\n },\n decrementPage(part) {\n adjustSegment(part, -(PAGE_STEP[part] || 1));\n },\n setSegment(part, v) {\n markValid(part);\n setValue(setSegment(displayValue, part, v, resolvedOptions));\n },\n confirmPlaceholder() {\n if (props.isDisabled || props.isReadOnly) {\n return;\n }\n\n // Confirm the placeholder if only the day period is not filled in.\n let validKeys = Object.keys(validSegments);\n let allKeys = Object.keys(allSegments);\n if (validKeys.length === allKeys.length - 1 && allSegments.dayPeriod && !validSegments.dayPeriod) {\n validSegments = {...allSegments};\n setValidSegments(validSegments);\n setValue(displayValue.copy());\n }\n },\n clearSegment(part) {\n delete validSegments[part];\n setValidSegments({...validSegments});\n\n let placeholder = createPlaceholderDate(props.placeholderValue, granularity, calendar, defaultTimeZone);\n let value = displayValue;\n\n // Reset day period to default without changing the hour.\n if (part === 'dayPeriod' && 'hour' in displayValue && 'hour' in placeholder) {\n let isPM = displayValue.hour >= 12;\n let shouldBePM = placeholder.hour >= 12;\n if (isPM && !shouldBePM) {\n value = displayValue.set({hour: displayValue.hour - 12});\n } else if (!isPM && shouldBePM) {\n value = displayValue.set({hour: displayValue.hour + 12});\n }\n } else if (part in displayValue) {\n value = displayValue.set({[part]: placeholder[part]});\n }\n\n setDate(null);\n setValue(value);\n },\n formatValue(fieldOptions: FieldOptions) {\n if (!calendarValue) {\n return '';\n }\n\n let formatOptions = getFormatOptions(fieldOptions, formatOpts);\n let formatter = new DateFormatter(locale, formatOptions);\n return formatter.format(dateValue);\n },\n isFocused,\n setFocused\n };\n}\n\nfunction getSegmentLimits(date: DateValue, type: string, options: Intl.ResolvedDateTimeFormatOptions) {\n switch (type) {\n case 'era': {\n let eras = date.calendar.getEras();\n return {\n value: eras.indexOf(date.era),\n minValue: 0,\n maxValue: eras.length - 1\n };\n }\n case 'year':\n return {\n value: date.year,\n minValue: 1,\n maxValue: date.calendar.getYearsInEra(date)\n };\n case 'month':\n return {\n value: date.month,\n minValue: getMinimumMonthInYear(date),\n maxValue: date.calendar.getMonthsInYear(date)\n };\n case 'day':\n return {\n value: date.day,\n minValue: getMinimumDayInMonth(date),\n maxValue: date.calendar.getDaysInMonth(date)\n };\n }\n\n if ('hour' in date) {\n switch (type) {\n case 'dayPeriod':\n return {\n value: date.hour >= 12 ? 12 : 0,\n minValue: 0,\n maxValue: 12\n };\n case 'hour':\n if (options.hour12) {\n let isPM = date.hour >= 12;\n return {\n value: date.hour,\n minValue: isPM ? 12 : 0,\n maxValue: isPM ? 23 : 11\n };\n }\n\n return {\n value: date.hour,\n minValue: 0,\n maxValue: 23\n };\n case 'minute':\n return {\n value: date.minute,\n minValue: 0,\n maxValue: 59\n };\n case 'second':\n return {\n value: date.second,\n minValue: 0,\n maxValue: 59\n };\n }\n }\n\n return {};\n}\n\nfunction addSegment(value: DateValue, part: string, amount: number, options: Intl.ResolvedDateTimeFormatOptions) {\n switch (part) {\n case 'era':\n case 'year':\n case 'month':\n case 'day':\n return value.cycle(part, amount, {round: part === 'year'});\n }\n\n if ('hour' in value) {\n switch (part) {\n case 'dayPeriod': {\n let hours = value.hour;\n let isPM = hours >= 12;\n return value.set({hour: isPM ? hours - 12 : hours + 12});\n }\n case 'hour':\n case 'minute':\n case 'second':\n return value.cycle(part, amount, {\n round: part !== 'hour',\n hourCycle: options.hour12 ? 12 : 24\n });\n }\n }\n}\n\nfunction setSegment(value: DateValue, part: string, segmentValue: number, options: Intl.ResolvedDateTimeFormatOptions) {\n switch (part) {\n case 'day':\n case 'month':\n case 'year':\n case 'era':\n return value.set({[part]: segmentValue});\n }\n\n if ('hour' in value) {\n switch (part) {\n case 'dayPeriod': {\n let hours = value.hour;\n let wasPM = hours >= 12;\n let isPM = segmentValue >= 12;\n if (isPM === wasPM) {\n return value;\n }\n return value.set({hour: wasPM ? hours - 12 : hours + 12});\n }\n case 'hour':\n // In 12 hour time, ensure that AM/PM does not change\n if (options.hour12) {\n let hours = value.hour;\n let wasPM = hours >= 12;\n if (!wasPM && segmentValue === 12) {\n segmentValue = 0;\n }\n if (wasPM && segmentValue < 12) {\n segmentValue += 12;\n }\n }\n // fallthrough\n case 'minute':\n case 'second':\n return value.set({[part]: segmentValue});\n }\n }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {LocalizedStringDictionary} from '@internationalized/string';\n\n// These placeholders are based on the strings used by the <input type=\"date\">\n// implementations in Chrome and Firefox. Additional languages are supported\n// here than React Spectrum's typical translations.\nconst placeholders = new LocalizedStringDictionary({\n ach: {year: 'mwaka', month: 'dwe', day: 'nino'},\n af: {year: 'jjjj', month: 'mm', day: 'dd'},\n am: {year: 'ዓዓዓዓ', month: 'ሚሜ', day: 'ቀቀ'},\n an: {year: 'aaaa', month: 'mm', day: 'dd'},\n ar: {year: 'سنة', month: 'شهر', day: 'يوم'},\n ast: {year: 'aaaa', month: 'mm', day: 'dd'},\n az: {year: 'iiii', month: 'aa', day: 'gg'},\n be: {year: 'гггг', month: 'мм', day: 'дд'},\n bg: {year: 'гггг', month: 'мм', day: 'дд'},\n bn: {year: 'yyyy', month: 'মিমি', day: 'dd'},\n br: {year: 'bbbb', month: 'mm', day: 'dd'},\n bs: {year: 'gggg', month: 'mm', day: 'dd'},\n ca: {year: 'aaaa', month: 'mm', day: 'dd'},\n cak: {year: 'jjjj', month: 'ii', day: \"q'q'\"},\n ckb: {year: 'ساڵ', month: 'مانگ', day: 'ڕۆژ'},\n cs: {year: 'rrrr', month: 'mm', day: 'dd'},\n cy: {year: 'bbbb', month: 'mm', day: 'dd'},\n da: {year: 'åååå', month: 'mm', day: 'dd'},\n de: {year: 'jjjj', month: 'mm', day: 'tt'},\n dsb: {year: 'llll', month: 'mm', day: 'źź'},\n el: {year: 'εεεε', month: 'μμ', day: 'ηη'},\n en: {year: 'yyyy', month: 'mm', day: 'dd'},\n eo: {year: 'jjjj', month: 'mm', day: 'tt'},\n es: {year: 'aaaa', month: 'mm', day: 'dd'},\n et: {year: 'aaaa', month: 'kk', day: 'pp'},\n eu: {year: 'uuuu', month: 'hh', day: 'ee'},\n fa: {year: 'سال', month: 'ماه', day: 'روز'},\n ff: {year: 'hhhh', month: 'll', day: 'ññ'},\n fi: {year: 'vvvv', month: 'kk', day: 'pp'},\n fr: {year: 'aaaa', month: 'mm', day: 'jj'},\n fy: {year: 'jjjj', month: 'mm', day: 'dd'},\n ga: {year: 'bbbb', month: 'mm', day: 'll'},\n gd: {year: 'bbbb', month: 'mm', day: 'll'},\n gl: {year: 'aaaa', month: 'mm', day: 'dd'},\n he: {year: 'שנה', month: 'חודש', day: 'יום'},\n hr: {year: 'gggg', month: 'mm', day: 'dd'},\n hsb: {year: 'llll', month: 'mm', day: 'dd'},\n hu: {year: 'éééé', month: 'hh', day: 'nn'},\n ia: {year: 'aaaa', month: 'mm', day: 'dd'},\n id: {year: 'tttt', month: 'bb', day: 'hh'},\n it: {year: 'aaaa', month: 'mm', day: 'gg'},\n ja: {year: ' 年 ', month: '月', day: '日'},\n ka: {year: 'წწწწ', month: 'თთ', day: 'რრ'},\n kk: {year: 'жжжж', month: 'аа', day: 'кк'},\n kn: {year: 'ವವವವ', month: 'ಮಿಮೀ', day: 'ದಿದಿ'},\n ko: {year: '연도', month: '월', day: '일'},\n lb: {year: 'jjjj', month: 'mm', day: 'dd'},\n lo: {year: 'ປປປປ', month: 'ດດ', day: 'ວວ'},\n lt: {year: 'mmmm', month: 'mm', day: 'dd'},\n lv: {year: 'gggg', month: 'mm', day: 'dd'},\n meh: {year: 'aaaa', month: 'mm', day: 'dd'},\n ml: {year: 'വർഷം', month: 'മാസം', day: 'തീയതി'},\n ms: {year: 'tttt', month: 'mm', day: 'hh'},\n nl: {year: 'jjjj', month: 'mm', day: 'dd'},\n nn: {year: 'åååå', month: 'mm', day: 'dd'},\n no: {year: 'åååå', month: 'mm', day: 'dd'},\n oc: {year: 'aaaa', month: 'mm', day: 'jj'},\n pl: {year: 'rrrr', month: 'mm', day: 'dd'},\n pt: {year: 'aaaa', month: 'mm', day: 'dd'},\n rm: {year: 'oooo', month: 'mm', day: 'dd'},\n ro: {year: 'aaaa', month: 'll', day: 'zz'},\n ru: {year: 'гггг', month: 'мм', day: 'дд'},\n sc: {year: 'aaaa', month: 'mm', day: 'dd'},\n scn: {year: 'aaaa', month: 'mm', day: 'jj'},\n sk: {year: 'rrrr', month: 'mm', day: 'dd'},\n sl: {year: 'llll', month: 'mm', day: 'dd'},\n sr: {year: 'гггг', month: 'мм', day: 'дд'},\n sv: {year: 'åååå', month: 'mm', day: 'dd'},\n szl: {year: 'rrrr', month: 'mm', day: 'dd'},\n tg: {year: 'сссс', month: 'мм', day: 'рр'},\n th: {year: 'ปปปป', month: 'ดด', day: 'วว'},\n tr: {year: 'yyyy', month: 'aa', day: 'gg'},\n uk: {year: 'рррр', month: 'мм', day: 'дд'},\n 'zh-CN': {year: '年', month: '月', day: '日'},\n 'zh-TW': {year: '年', month: '月', day: '日'}\n}, 'en');\n\nexport function getPlaceholder(field: string, value: string, locale: string) {\n // Use the actual placeholder value for the era and day period fields.\n if (field === 'era' || field === 'dayPeriod') {\n return value;\n }\n\n if (field === 'year' || field === 'month' || field === 'day') {\n return placeholders.getStringForLocale(field, locale);\n }\n\n // For time fields (e.g. hour, minute, etc.), use two dashes as the placeholder.\n return '––';\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DateFormatter, toCalendarDate, toCalendarDateTime} from '@internationalized/date';\nimport {DateRange, DateRangePickerProps, DateValue, Granularity, TimeValue} from '@react-types/datepicker';\nimport {FieldOptions, getFormatOptions, getPlaceholderTime, isInvalid, useDefaultProps} from './utils';\nimport {OverlayTriggerState, useOverlayTriggerState} from '@react-stately/overlays';\nimport {RangeValue, ValidationState} from '@react-types/shared';\nimport {useControlledState} from '@react-stately/utils';\nimport {useState} from 'react';\n\nexport interface DateRangePickerStateOptions extends DateRangePickerProps<DateValue> {\n /**\n * Determines whether the date picker popover should close automatically when a date is selected.\n * @default true\n */\n shouldCloseOnSelect?: boolean | (() => boolean)\n}\n\ntype TimeRange = RangeValue<TimeValue>;\nexport interface DateRangePickerState extends OverlayTriggerState {\n /** The currently selected date range. */\n value: DateRange,\n /** Sets the selected date range. */\n setValue(value: DateRange): void,\n /**\n * The date portion of the selected range. This may be set prior to `value` if the user has\n * selected a date range but has not yet selected a time range.\n */\n dateRange: DateRange,\n /** Sets the date portion of the selected range. */\n setDateRange(value: DateRange): void,\n /**\n * The time portion of the selected range. This may be set prior to `value` if the user has\n * selected a time range but has not yet selected a date range.\n */\n timeRange: TimeRange,\n /** Sets the time portion of the selected range. */\n setTimeRange(value: TimeRange): void,\n /** Sets the date portion of either the start or end of the selected range. */\n setDate(part: 'start' | 'end', value: DateValue): void,\n /** Sets the time portion of either the start or end of the selected range. */\n setTime(part: 'start' | 'end', value: TimeValue): void,\n /** Sets the date and time of either the start or end of the selected range. */\n setDateTime(part: 'start' | 'end', value: DateValue): void,\n /** The granularity for the field, based on the `granularity` prop and current value. */\n granularity: Granularity,\n /** Whether the date range picker supports selecting times, according to the `granularity` prop and current value. */\n hasTime: boolean,\n /** Whether the calendar popover is currently open. */\n isOpen: boolean,\n /** Sets whether the calendar popover is open. */\n setOpen(isOpen: boolean): void,\n /** The current validation state of the date picker, based on the `validationState`, `minValue`, and `maxValue` props. */\n validationState: ValidationState,\n /** Formats the selected range using the given options. */\n formatValue(locale: string, fieldOptions: FieldOptions): {start: string, end: string},\n /** Whether the date range picker is currently focused. */\n readonly isFocused: boolean,\n /** Sets whether the date range picker is focused. */\n setFocused(isFocused: boolean): void\n}\n\n/**\n * Provides state management for a date range picker component.\n * A date range picker combines two DateFields and a RangeCalendar popover to allow\n * users to enter or select a date and time range.\n */\nexport function useDateRangePickerState(props: DateRangePickerStateOptions): DateRangePickerState {\n let overlayState = useOverlayTriggerState(props);\n let [controlledValue, setControlledValue] = useControlledState<DateRange>(props.value, props.defaultValue || null, props.onChange);\n let [placeholderValue, setPlaceholderValue] = useState(() => controlledValue || {start: null, end: null});\n\n let [isFocused, setFocused] = useState(false);\n\n // Reset the placeholder if the value prop is set to null.\n if (controlledValue == null && placeholderValue.start && placeholderValue.end) {\n placeholderValue = {start: null, end: null};\n setPlaceholderValue(placeholderValue);\n }\n\n let value = controlledValue || placeholderValue;\n\n let setValue = (value: DateRange) => {\n setPlaceholderValue(value);\n if (value?.start && value.end) {\n setControlledValue(value);\n } else {\n setControlledValue(null);\n }\n };\n\n let v = (value?.start || value?.end || props.placeholderValue);\n let [granularity] = useDefaultProps(v, props.granularity);\n let hasTime = granularity === 'hour' || granularity === 'minute' || granularity === 'second';\n let shouldCloseOnSelect = props.shouldCloseOnSelect ?? true;\n\n let [dateRange, setSelectedDateRange] = useState<DateRange>(null);\n let [timeRange, setSelectedTimeRange] = useState<TimeRange>(null);\n\n if (value && value.start && value.end) {\n dateRange = value;\n if ('hour' in value.start) {\n timeRange = value as TimeRange;\n }\n }\n\n let commitValue = (dateRange: DateRange, timeRange: TimeRange) => {\n setValue({\n start: 'timeZone' in timeRange.start ? timeRange.start.set(toCalendarDate(dateRange.start)) : toCalendarDateTime(dateRange.start, timeRange.start),\n end: 'timeZone' in timeRange.end ? timeRange.end.set(toCalendarDate(dateRange.end)) : toCalendarDateTime(dateRange.end, timeRange.end)\n });\n };\n\n // Intercept setValue to make sure the Time section is not changed by date selection in Calendar\n let setDateRange = (range: DateRange) => {\n let shouldClose = typeof shouldCloseOnSelect === 'function' ? shouldCloseOnSelect() : shouldCloseOnSelect;\n if (hasTime) {\n if (shouldClose || (range.start && range.end && timeRange?.start && timeRange?.end)) {\n commitValue(range, {\n start: timeRange?.start || getPlaceholderTime(props.placeholderValue),\n end: timeRange?.end || getPlaceholderTime(props.placeholderValue)\n });\n } else {\n setSelectedDateRange(range);\n }\n } else if (range.start && range.end) {\n setValue(range);\n } else {\n setSelectedDateRange(range);\n }\n\n if (shouldClose) {\n overlayState.setOpen(false);\n }\n };\n\n let setTimeRange = (range: TimeRange) => {\n if (dateRange?.start && dateRange?.end && range.start && range.end) {\n commitValue(dateRange, range);\n } else {\n setSelectedTimeRange(range);\n }\n };\n\n let validationState: ValidationState = props.validationState\n || (value != null && (\n isInvalid(value.start, props.minValue, props.maxValue) ||\n isInvalid(value.end, props.minValue, props.maxValue) ||\n (value.end != null && value.start != null && value.end.compare(value.start) < 0) ||\n (value?.start && props.isDateUnavailable?.(value.start)) ||\n (value?.end && props.isDateUnavailable?.(value.end))\n ) ? 'invalid' : null);\n\n return {\n value,\n setValue,\n dateRange,\n timeRange,\n granularity,\n hasTime,\n setDate(part, date) {\n setDateRange({...dateRange, [part]: date});\n },\n setTime(part, time) {\n setTimeRange({...timeRange, [part]: time});\n },\n setDateTime(part, dateTime) {\n setValue({...value, [part]: dateTime});\n },\n setDateRange,\n setTimeRange,\n ...overlayState,\n setOpen(isOpen) {\n // Commit the selected date range when the calendar is closed. Use a placeholder time if one wasn't set.\n // If only the time range was set and not the date range, don't commit. The state will be preserved until\n // the user opens the popover again.\n if (!isOpen && !(value?.start && value?.end) && dateRange?.start && dateRange?.end && hasTime) {\n commitValue(dateRange, {\n start: timeRange?.start || getPlaceholderTime(props.placeholderValue),\n end: timeRange?.end || getPlaceholderTime(props.placeholderValue)\n });\n }\n\n overlayState.setOpen(isOpen);\n },\n validationState,\n formatValue(locale, fieldOptions) {\n if (!value || !value.start || !value.end) {\n return null;\n }\n\n let startTimeZone = 'timeZone' in value.start ? value.start.timeZone : undefined;\n let startGranularity = props.granularity || (value.start && 'minute' in value.start ? 'minute' : 'day');\n let endTimeZone = 'timeZone' in value.end ? value.end.timeZone : undefined;\n let endGranularity = props.granularity || (value.end && 'minute' in value.end ? 'minute' : 'day');\n\n let startOptions = getFormatOptions(fieldOptions, {\n granularity: startGranularity,\n timeZone: startTimeZone,\n hideTimeZone: props.hideTimeZone,\n hourCycle: props.hourCycle,\n showEra: (value.start.calendar.identifier === 'gregory' && value.start.era === 'BC') ||\n (value.end.calendar.identifier === 'gregory' && value.end.era === 'BC')\n });\n\n let startDate = value.start.toDate(startTimeZone || 'UTC');\n let endDate = value.end.toDate(endTimeZone || 'UTC');\n\n let startFormatter = new DateFormatter(locale, startOptions);\n let endFormatter: Intl.DateTimeFormat;\n if (startTimeZone === endTimeZone && startGranularity === endGranularity && value.start.compare(value.end) !== 0) {\n // Use formatRange, as it results in shorter output when some of the fields\n // are shared between the start and end dates (e.g. the same month).\n // Formatting will fail if the end date is before the start date. Fall back below when that happens.\n try {\n let parts = startFormatter.formatRangeToParts(startDate, endDate);\n\n // Find the separator between the start and end date. This is determined\n // by finding the last shared literal before the end range.\n let separatorIndex = -1;\n for (let i = 0; i < parts.length; i++) {\n let part = parts[i];\n if (part.source === 'shared' && part.type === 'literal') {\n separatorIndex = i;\n } else if (part.source === 'endRange') {\n break;\n }\n }\n\n // Now we can combine the parts into start and end strings.\n let start = '';\n let end = '';\n for (let i = 0; i < parts.length; i++) {\n if (i < separatorIndex) {\n start += parts[i].value;\n } else if (i > separatorIndex) {\n end += parts[i].value;\n }\n }\n\n return {start, end};\n } catch (e) {\n // ignore\n }\n\n endFormatter = startFormatter;\n } else {\n let endOptions = getFormatOptions(fieldOptions, {\n granularity: endGranularity,\n timeZone: endTimeZone,\n hideTimeZone: props.hideTimeZone,\n hourCycle: props.hourCycle\n });\n\n endFormatter = new DateFormatter(locale, endOptions);\n }\n\n return {\n start: startFormatter.format(startDate),\n end: endFormatter.format(endDate)\n };\n },\n isFocused,\n setFocused\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the 'License');\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DateFieldState, useDateFieldState} from '.';\nimport {DateValue, TimePickerProps, TimeValue} from '@react-types/datepicker';\nimport {getLocalTimeZone, GregorianCalendar, Time, toCalendarDateTime, today, toTime} from '@internationalized/date';\nimport {useControlledState} from '@react-stately/utils';\nimport {useMemo} from 'react';\n\nexport interface TimeFieldStateOptions extends TimePickerProps<TimeValue> {\n /** The locale to display and edit the value according to. */\n locale: string\n}\n\n/**\n * Provides state management for a time field component.\n * A time field allows users to enter and edit time values using a keyboard.\n * Each part of a time value is displayed in an individually editable segment.\n */\nexport function useTimeFieldState(props: TimeFieldStateOptions): DateFieldState {\n let {\n placeholderValue = new Time(),\n minValue,\n maxValue,\n granularity\n } = props;\n\n let [value, setValue] = useControlledState<TimeValue>(\n props.value,\n props.defaultValue,\n props.onChange\n );\n\n let v = value || placeholderValue;\n let day = v && 'day' in v ? v : undefined;\n let placeholderDate = useMemo(() => convertValue(placeholderValue), [placeholderValue]);\n let minDate = useMemo(() => convertValue(minValue, day), [minValue, day]);\n let maxDate = useMemo(() => convertValue(maxValue, day), [maxValue, day]);\n\n let dateTime = useMemo(() => value == null ? null : convertValue(value), [value]);\n let onChange = newValue => {\n setValue(v && 'day' in v ? newValue : newValue && toTime(newValue));\n };\n\n return useDateFieldState({\n ...props,\n value: dateTime,\n defaultValue: undefined,\n minValue: minDate,\n maxValue: maxDate,\n onChange,\n granularity: granularity || 'minute',\n maxGranularity: 'hour',\n placeholderValue: placeholderDate,\n // Calendar should not matter for time fields.\n createCalendar: () => new GregorianCalendar()\n });\n}\n\nfunction convertValue(value: TimeValue, date: DateValue = today(getLocalTimeZone())) {\n if (!value) {\n return null;\n }\n\n if ('day' in value) {\n return value;\n }\n\n return toCalendarDateTime(date, value);\n}\n"],"names":[],"version":3,"file":"main.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;SEgBgB,yCAAS,CAAC,KAAgB,EAAE,QAAmB,EAAE,QAAmB,EAAE,CAAC;IACrF,MAAM,CAAC,KAAK,IAAI,IAAI,KACjB,QAAQ,IAAI,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,IAAI,CAAC,IAC/C,QAAQ,IAAI,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,IAAI,CAAC;AAEpD,CAAC;AAYD,KAAK,CAAC,2CAAqB,GAAiB,CAAC;IAC3C,IAAI,EAAE,CAAS;IACf,KAAK,EAAE,CAAS;IAChB,GAAG,EAAE,CAAS;IACd,IAAI,EAAE,CAAS;IACf,MAAM,EAAE,CAAS;IACjB,MAAM,EAAE,CAAS;AACnB,CAAC;SAEe,yCAAgB,CAC9B,YAA0B,EAC1B,OAAyB,EACG,CAAC;IAC7B,YAAY,GAAG,CAAC;WAAG,2CAAqB;WAAK,YAAY;IAAA,CAAC;IAC1D,GAAG,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,CAAQ;IACjD,GAAG,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY;QACP,eAAsB;IAAlD,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,EAAC,eAAsB,GAAtB,OAAO,CAAC,cAAc,cAAtB,eAAsB,cAAtB,eAAsB,GAAI,CAAM;IAC5D,EAAE,EAAE,QAAQ,GAAG,CAAC,EACd,QAA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AAG,CAAC,QAAQ,IAAG,QAAQ,GAAI,CAAC;QAC1B,QAAQ,CAAC,CAAC,IAAI,CAAK,QAAI,CAAC,GAAG,QAAQ,GAAG,QAAQ,IAAI,mCAAM,CAAC,QAAQ;IACnE,CAAC;IAED,MAAM,CAAC,yCAAiB,CAAC,CAAC;WACrB,KAAK;QACR,KAAK,EAAE,QAAQ;QACf,YAAY,EAAE,SAAS;QACvB,QAAQ,EAAE,OAAO;QACjB,QAAQ,EAAE,OAAO;kBACjB,QAAQ;QACR,WAAW,EAAE,WAAW,IAAI,CAAQ;QACpC,cAAc,EAAE,CAAM;QACtB,gBAAgB,EAAE,eAAe;QACjC,EAA8C,AAA9C,4CAA8C;QAC9C,cAAc,MAAQ,GAAG,CAAC,8CAAiB;IAC7C,CAAC;AACH,CAAC;SAEQ,kCAAY,CAAC,KAAgB,EAAE,IAAe,GAAG,kCAAK,CAAC,6CAAgB,KAAK,CAAC;IACpF,EAAE,GAAG,KAAK,EACR,MAAM,CAAC,IAAI;IAGb,EAAE,EAAE,CAAK,QAAI,KAAK,EAChB,MAAM,CAAC,KAAK;IAGd,MAAM,CAAC,+CAAkB,CAAC,IAAI,EAAE,KAAK;AACvC,CAAC;;","sources":["packages/@react-stately/datepicker/src/index.ts","packages/@react-stately/datepicker/src/useDatePickerState.ts","packages/@react-stately/datepicker/src/utils.ts","packages/@react-stately/datepicker/src/useDateFieldState.ts","packages/@react-stately/datepicker/src/placeholders.ts","packages/@react-stately/datepicker/src/useDateRangePickerState.ts","packages/@react-stately/datepicker/src/useTimeFieldState.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {useDatePickerState} from './useDatePickerState';\nexport {useDateFieldState} from './useDateFieldState';\nexport {useDateRangePickerState} from './useDateRangePickerState';\nexport {useTimeFieldState} from './useTimeFieldState';\n\nexport type {DateFieldStateOptions, DateFieldState, DateSegment, SegmentType} from './useDateFieldState';\nexport type {DatePickerStateOptions, DatePickerState} from './useDatePickerState';\nexport type {DateRangePickerStateOptions, DateRangePickerState} from './useDateRangePickerState';\nexport type {TimeFieldStateOptions} from './useTimeFieldState';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarDate, DateFormatter, toCalendarDate, toCalendarDateTime} from '@internationalized/date';\nimport {DatePickerProps, DateValue, Granularity, TimeValue} from '@react-types/datepicker';\nimport {FieldOptions, getFormatOptions, getPlaceholderTime, useDefaultProps} from './utils';\nimport {isInvalid} from './utils';\nimport {OverlayTriggerState, useOverlayTriggerState} from '@react-stately/overlays';\nimport {useControlledState} from '@react-stately/utils';\nimport {useState} from 'react';\nimport {ValidationState} from '@react-types/shared';\n\nexport interface DatePickerStateOptions<T extends DateValue> extends DatePickerProps<T> {\n /**\n * Determines whether the date picker popover should close automatically when a date is selected.\n * @default true\n */\n shouldCloseOnSelect?: boolean | (() => boolean)\n}\n\nexport interface DatePickerState extends OverlayTriggerState {\n /** The currently selected date. */\n value: DateValue,\n /** Sets the selected date. */\n setValue(value: DateValue): void,\n /**\n * The date portion of the value. This may be set prior to `value` if the user has\n * selected a date but has not yet selected a time.\n */\n dateValue: DateValue,\n /** Sets the date portion of the value. */\n setDateValue(value: CalendarDate): void,\n /**\n * The time portion of the value. This may be set prior to `value` if the user has\n * selected a time but has not yet selected a date.\n */\n timeValue: TimeValue,\n /** Sets the time portion of the value. */\n setTimeValue(value: TimeValue): void,\n /** The granularity for the field, based on the `granularity` prop and current value. */\n granularity: Granularity,\n /** Whether the date picker supports selecting a time, according to the `granularity` prop and current value. */\n hasTime: boolean,\n /** Whether the calendar popover is currently open. */\n isOpen: boolean,\n /** Sets whether the calendar popover is open. */\n setOpen(isOpen: boolean): void,\n /** The current validation state of the date picker, based on the `validationState`, `minValue`, and `maxValue` props. */\n validationState: ValidationState,\n /** Formats the selected value using the given options. */\n formatValue(locale: string, fieldOptions: FieldOptions): string\n}\n\n/**\n * Provides state management for a date picker component.\n * A date picker combines a DateField and a Calendar popover to allow users to enter or select a date and time value.\n */\nexport function useDatePickerState<T extends DateValue = DateValue>(props: DatePickerStateOptions<T>): DatePickerState {\n let overlayState = useOverlayTriggerState(props);\n let [value, setValue] = useControlledState<DateValue>(props.value, props.defaultValue || null, props.onChange);\n\n let v = (value || props.placeholderValue);\n let [granularity, defaultTimeZone] = useDefaultProps(v, props.granularity);\n let dateValue = value != null ? value.toDate(defaultTimeZone ?? 'UTC') : null;\n let hasTime = granularity === 'hour' || granularity === 'minute' || granularity === 'second';\n let shouldCloseOnSelect = props.shouldCloseOnSelect ?? true;\n\n let [selectedDate, setSelectedDate] = useState<DateValue>(null);\n let [selectedTime, setSelectedTime] = useState<TimeValue>(null);\n\n if (value) {\n selectedDate = value;\n if ('hour' in value) {\n selectedTime = value;\n }\n }\n\n // props.granularity must actually exist in the value if one is provided.\n if (v && !(granularity in v)) {\n throw new Error('Invalid granularity ' + granularity + ' for value ' + v.toString());\n }\n\n let commitValue = (date: DateValue, time: TimeValue) => {\n setValue('timeZone' in time ? time.set(toCalendarDate(date)) : toCalendarDateTime(date, time));\n };\n\n // Intercept setValue to make sure the Time section is not changed by date selection in Calendar\n let selectDate = (newValue: CalendarDate) => {\n let shouldClose = typeof shouldCloseOnSelect === 'function' ? shouldCloseOnSelect() : shouldCloseOnSelect;\n if (hasTime) {\n if (selectedTime || shouldClose) {\n commitValue(newValue, selectedTime || getPlaceholderTime(props.placeholderValue));\n } else {\n setSelectedDate(newValue);\n }\n } else {\n setValue(newValue);\n }\n\n if (shouldClose) {\n overlayState.setOpen(false);\n }\n };\n\n let selectTime = (newValue: TimeValue) => {\n if (selectedDate) {\n commitValue(selectedDate, newValue);\n } else {\n setSelectedTime(newValue);\n }\n };\n\n let validationState: ValidationState = props.validationState ||\n (isInvalid(value, props.minValue, props.maxValue) ? 'invalid' : null) ||\n (value && props.isDateUnavailable?.(value) ? 'invalid' : null);\n\n return {\n value,\n setValue,\n dateValue: selectedDate,\n timeValue: selectedTime,\n setDateValue: selectDate,\n setTimeValue: selectTime,\n granularity,\n hasTime,\n ...overlayState,\n setOpen(isOpen) {\n // Commit the selected date when the calendar is closed. Use a placeholder time if one wasn't set.\n // If only the time was set and not the date, don't commit. The state will be preserved until\n // the user opens the popover again.\n if (!isOpen && !value && selectedDate && hasTime) {\n commitValue(selectedDate, selectedTime || getPlaceholderTime(props.placeholderValue));\n }\n\n overlayState.setOpen(isOpen);\n },\n validationState,\n formatValue(locale, fieldOptions) {\n if (!dateValue) {\n return '';\n }\n\n let formatOptions = getFormatOptions(fieldOptions, {\n granularity,\n timeZone: defaultTimeZone,\n hideTimeZone: props.hideTimeZone,\n hourCycle: props.hourCycle,\n showEra: value.calendar.identifier === 'gregory' && value.era === 'BC'\n });\n\n let formatter = new DateFormatter(locale, formatOptions);\n return formatter.format(dateValue);\n }\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Calendar, now, Time, toCalendar, toCalendarDate, toCalendarDateTime} from '@internationalized/date';\nimport {DatePickerProps, DateValue, Granularity, TimeValue} from '@react-types/datepicker';\nimport {useRef} from 'react';\n\nexport function isInvalid(value: DateValue, minValue: DateValue, maxValue: DateValue) {\n return value != null && (\n (minValue != null && value.compare(minValue) < 0) ||\n (maxValue != null && value.compare(maxValue) > 0)\n );\n}\n\nexport type FieldOptions = Pick<Intl.DateTimeFormatOptions, 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second'>;\ninterface FormatterOptions {\n timeZone?: string,\n hideTimeZone?: boolean,\n granularity?: DatePickerProps<any>['granularity'],\n maxGranularity?: 'year' | 'month' | DatePickerProps<any>['granularity'],\n hourCycle?: 12 | 24,\n showEra?: boolean\n}\n\nconst DEFAULT_FIELD_OPTIONS: FieldOptions = {\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n hour: 'numeric',\n minute: '2-digit',\n second: '2-digit'\n};\n\nexport function getFormatOptions(\n fieldOptions: FieldOptions,\n options: FormatterOptions\n): Intl.DateTimeFormatOptions {\n fieldOptions = {...DEFAULT_FIELD_OPTIONS, ...fieldOptions};\n let granularity = options.granularity || 'minute';\n let keys = Object.keys(fieldOptions);\n let startIdx = keys.indexOf(options.maxGranularity ?? 'year');\n if (startIdx < 0) {\n startIdx = 0;\n }\n\n let endIdx = keys.indexOf(granularity);\n if (endIdx < 0) {\n endIdx = 2;\n }\n\n if (startIdx > endIdx) {\n throw new Error('maxGranularity must be greater than granularity');\n }\n\n let opts: Intl.DateTimeFormatOptions = keys.slice(startIdx, endIdx + 1).reduce((opts, key) => {\n opts[key] = fieldOptions[key];\n return opts;\n }, {});\n\n if (options.hourCycle != null) {\n opts.hour12 = options.hourCycle === 12;\n }\n\n opts.timeZone = options.timeZone || 'UTC';\n\n let hasTime = granularity === 'hour' || granularity === 'minute' || granularity === 'second';\n if (hasTime && options.timeZone && !options.hideTimeZone) {\n opts.timeZoneName = 'short';\n }\n\n if (options.showEra && startIdx === 0) {\n opts.era = 'short';\n }\n\n return opts;\n}\n\nexport function getPlaceholderTime(placeholderValue: DateValue): TimeValue {\n if (placeholderValue && 'hour' in placeholderValue) {\n return placeholderValue;\n }\n\n return new Time();\n}\n\nexport function convertValue(value: DateValue, calendar: Calendar): DateValue {\n if (value === null) {\n return null;\n }\n\n if (!value) {\n return undefined;\n }\n\n return toCalendar(value, calendar);\n}\n\n\nexport function createPlaceholderDate(placeholderValue: DateValue, granularity: string, calendar: Calendar, timeZone: string) {\n if (placeholderValue) {\n return convertValue(placeholderValue, calendar);\n }\n\n let date = toCalendar(now(timeZone).set({\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0\n }), calendar);\n\n if (granularity === 'year' || granularity === 'month' || granularity === 'day') {\n return toCalendarDate(date);\n }\n\n if (!timeZone) {\n return toCalendarDateTime(date);\n }\n\n return date;\n}\n\nexport function useDefaultProps(v: DateValue, granularity: Granularity): [Granularity, string] {\n // Compute default granularity and time zone from the value. If the value becomes null, keep the last values.\n let lastValue = useRef(v);\n if (v) {\n lastValue.current = v;\n }\n\n v = lastValue.current;\n let defaultTimeZone = (v && 'timeZone' in v ? v.timeZone : undefined);\n granularity = granularity || (v && 'minute' in v ? 'minute' : 'day');\n\n // props.granularity must actually exist in the value if one is provided.\n if (v && !(granularity in v)) {\n throw new Error('Invalid granularity ' + granularity + ' for value ' + v.toString());\n }\n\n return [granularity, defaultTimeZone];\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Calendar, DateFormatter, getMinimumDayInMonth, getMinimumMonthInYear, GregorianCalendar, toCalendar} from '@internationalized/date';\nimport {convertValue, createPlaceholderDate, FieldOptions, getFormatOptions, isInvalid, useDefaultProps} from './utils';\nimport {DatePickerProps, DateValue, Granularity} from '@react-types/datepicker';\nimport {getPlaceholder} from './placeholders';\nimport {useControlledState} from '@react-stately/utils';\nimport {useEffect, useMemo, useRef, useState} from 'react';\nimport {ValidationState} from '@react-types/shared';\n\nexport type SegmentType = 'era' | 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second' | 'dayPeriod' | 'literal' | 'timeZoneName';\nexport interface DateSegment {\n /** The type of segment. */\n type: SegmentType,\n /** The formatted text for the segment. */\n text: string,\n /** The numeric value for the segment, if applicable. */\n value?: number,\n /** The minimum numeric value for the segment, if applicable. */\n minValue?: number,\n /** The maximum numeric value for the segment, if applicable. */\n maxValue?: number,\n /** Whether the value is a placeholder. */\n isPlaceholder: boolean,\n /** A placeholder string for the segment. */\n placeholder: string,\n /** Whether the segment is editable. */\n isEditable: boolean\n}\n\nexport interface DateFieldState {\n /** The current field value. */\n value: DateValue,\n /** The current value, converted to a native JavaScript `Date` object. */\n dateValue: Date,\n /** The calendar system currently in use. */\n calendar: Calendar,\n /** Sets the field's value. */\n setValue(value: DateValue): void,\n /** A list of segments for the current value. */\n segments: DateSegment[],\n /** A date formatter configured for the current locale and format. */\n dateFormatter: DateFormatter,\n /** The current validation state of the date field, based on the `validationState`, `minValue`, and `maxValue` props. */\n validationState: ValidationState,\n /** The granularity for the field, based on the `granularity` prop and current value. */\n granularity: Granularity,\n /** The maximum date or time unit that is displayed in the field. */\n maxGranularity: 'year' | 'month' | Granularity,\n /** Whether the field is disabled. */\n isDisabled: boolean,\n /** Whether the field is read only. */\n isReadOnly: boolean,\n /** Whether the field is required. */\n isRequired: boolean,\n /** Increments the given segment. Upon reaching the minimum or maximum value, the value wraps around to the opposite limit. */\n increment(type: SegmentType): void,\n /** Decrements the given segment. Upon reaching the minimum or maximum value, the value wraps around to the opposite limit. */\n decrement(type: SegmentType): void,\n /**\n * Increments the given segment by a larger amount, rounding it to the nearest increment.\n * The amount to increment by depends on the field, for example 15 minutes, 7 days, and 5 years.\n * Upon reaching the minimum or maximum value, the value wraps around to the opposite limit.\n */\n incrementPage(type: SegmentType): void,\n /**\n * Decrements the given segment by a larger amount, rounding it to the nearest increment.\n * The amount to decrement by depends on the field, for example 15 minutes, 7 days, and 5 years.\n * Upon reaching the minimum or maximum value, the value wraps around to the opposite limit.\n */\n decrementPage(type: SegmentType): void,\n /** Sets the value of the given segment. */\n setSegment(type: 'era', value: string): void,\n setSegment(type: SegmentType, value: number): void,\n /** Updates the remaining unfilled segments with the placeholder value. */\n confirmPlaceholder(): void,\n /** Clears the value of the given segment, reverting it to the placeholder. */\n clearSegment(type: SegmentType): void,\n /** Formats the current date value using the given options. */\n formatValue(fieldOptions: FieldOptions): string\n}\n\nconst EDITABLE_SEGMENTS = {\n year: true,\n month: true,\n day: true,\n hour: true,\n minute: true,\n second: true,\n dayPeriod: true,\n era: true\n};\n\nconst PAGE_STEP = {\n year: 5,\n month: 2,\n day: 7,\n hour: 2,\n minute: 15,\n second: 15\n};\n\n// Node seems to convert everything to lowercase...\nconst TYPE_MAPPING = {\n dayperiod: 'dayPeriod'\n};\n\nexport interface DateFieldStateOptions extends DatePickerProps<DateValue> {\n /**\n * The maximum unit to display in the date field.\n * @default 'year'\n */\n maxGranularity?: 'year' | 'month' | Granularity,\n /** The locale to display and edit the value according to. */\n locale: string,\n /**\n * A function that creates a [Calendar](../internationalized/date/Calendar.html)\n * object for a given calendar identifier. Such a function may be imported from the\n * `@internationalized/date` package, or manually implemented to include support for\n * only certain calendars.\n */\n createCalendar: (name: string) => Calendar\n}\n\n/**\n * Provides state management for a date field component.\n * A date field allows users to enter and edit date and time values using a keyboard.\n * Each part of a date value is displayed in an individually editable segment.\n */\nexport function useDateFieldState(props: DateFieldStateOptions): DateFieldState {\n let {\n locale,\n createCalendar,\n hideTimeZone,\n isDisabled,\n isReadOnly,\n isRequired\n } = props;\n\n let v: DateValue = (props.value || props.defaultValue || props.placeholderValue);\n let [granularity, defaultTimeZone] = useDefaultProps(v, props.granularity);\n let timeZone = defaultTimeZone || 'UTC';\n\n // props.granularity must actually exist in the value if one is provided.\n if (v && !(granularity in v)) {\n throw new Error('Invalid granularity ' + granularity + ' for value ' + v.toString());\n }\n\n let defaultFormatter = useMemo(() => new DateFormatter(locale), [locale]);\n let calendar = useMemo(() => createCalendar(defaultFormatter.resolvedOptions().calendar), [createCalendar, defaultFormatter]);\n\n let [value, setDate] = useControlledState<DateValue>(\n props.value,\n props.defaultValue,\n props.onChange\n );\n\n let calendarValue = useMemo(() => convertValue(value, calendar), [value, calendar]);\n\n // We keep track of the placeholder date separately in state so that onChange is not called\n // until all segments are set. If the value === null (not undefined), then assume the component\n // is controlled, so use the placeholder as the value until all segments are entered so it doesn't\n // change from uncontrolled to controlled and emit a warning.\n let [placeholderDate, setPlaceholderDate] = useState(\n () => createPlaceholderDate(props.placeholderValue, granularity, calendar, defaultTimeZone)\n );\n\n let val = calendarValue || placeholderDate;\n let showEra = calendar.identifier === 'gregory' && val.era === 'BC';\n let formatOpts = useMemo(() => ({\n granularity,\n maxGranularity: props.maxGranularity ?? 'year',\n timeZone: defaultTimeZone,\n hideTimeZone,\n hourCycle: props.hourCycle,\n showEra\n }), [props.maxGranularity, granularity, props.hourCycle, defaultTimeZone, hideTimeZone, showEra]);\n let opts = useMemo(() => getFormatOptions({}, formatOpts), [formatOpts]);\n\n let dateFormatter = useMemo(() => new DateFormatter(locale, opts), [locale, opts]);\n let resolvedOptions = useMemo(() => dateFormatter.resolvedOptions(), [dateFormatter]);\n\n // Determine how many editable segments there are for validation purposes.\n // The result is cached for performance.\n let allSegments: Partial<typeof EDITABLE_SEGMENTS> = useMemo(() =>\n dateFormatter.formatToParts(new Date())\n .filter(seg => EDITABLE_SEGMENTS[seg.type])\n .reduce((p, seg) => (p[seg.type] = true, p), {})\n , [dateFormatter]);\n\n let [validSegments, setValidSegments] = useState<Partial<typeof EDITABLE_SEGMENTS>>(\n () => props.value || props.defaultValue ? {...allSegments} : {}\n );\n\n // Reset placeholder when calendar changes\n let lastCalendarIdentifier = useRef(calendar.identifier);\n useEffect(() => {\n if (calendar.identifier !== lastCalendarIdentifier.current) {\n lastCalendarIdentifier.current = calendar.identifier;\n setPlaceholderDate(placeholder =>\n Object.keys(validSegments).length > 0\n ? toCalendar(placeholder, calendar)\n : createPlaceholderDate(props.placeholderValue, granularity, calendar, defaultTimeZone)\n );\n }\n }, [calendar, granularity, validSegments, defaultTimeZone, props.placeholderValue]);\n\n // If there is a value prop, and some segments were previously placeholders, mark them all as valid.\n if (value && Object.keys(validSegments).length < Object.keys(allSegments).length) {\n validSegments = {...allSegments};\n setValidSegments(validSegments);\n }\n\n // If the value is set to null and all segments are valid, reset the placeholder.\n if (value == null && Object.keys(validSegments).length === Object.keys(allSegments).length) {\n validSegments = {};\n setValidSegments(validSegments);\n setPlaceholderDate(createPlaceholderDate(props.placeholderValue, granularity, calendar, defaultTimeZone));\n }\n\n // If all segments are valid, use the date from state, otherwise use the placeholder date.\n let displayValue = calendarValue && Object.keys(validSegments).length >= Object.keys(allSegments).length ? calendarValue : placeholderDate;\n let setValue = (newValue: DateValue) => {\n if (props.isDisabled || props.isReadOnly) {\n return;\n }\n\n if (Object.keys(validSegments).length >= Object.keys(allSegments).length) {\n // The display calendar should not have any effect on the emitted value.\n // Emit dates in the same calendar as the original value, if any, otherwise gregorian.\n newValue = toCalendar(newValue, v?.calendar || new GregorianCalendar());\n setDate(newValue);\n } else {\n setPlaceholderDate(newValue);\n }\n };\n\n let dateValue = useMemo(() => displayValue.toDate(timeZone), [displayValue, timeZone]);\n let segments = useMemo(() =>\n dateFormatter.formatToParts(dateValue)\n .map(segment => {\n let isEditable = EDITABLE_SEGMENTS[segment.type];\n if (segment.type === 'era' && calendar.getEras().length === 1) {\n isEditable = false;\n }\n\n let isPlaceholder = EDITABLE_SEGMENTS[segment.type] && !validSegments[segment.type];\n let placeholder = EDITABLE_SEGMENTS[segment.type] ? getPlaceholder(segment.type, segment.value, locale) : null;\n return {\n type: TYPE_MAPPING[segment.type] || segment.type,\n text: isPlaceholder ? placeholder : segment.value,\n ...getSegmentLimits(displayValue, segment.type, resolvedOptions),\n isPlaceholder,\n placeholder,\n isEditable\n } as DateSegment;\n })\n , [dateValue, validSegments, dateFormatter, resolvedOptions, displayValue, calendar, locale]);\n\n // When the era field appears, mark it valid if the year field is already valid.\n // If the era field disappears, remove it from the valid segments.\n if (allSegments.era && validSegments.year && !validSegments.era) {\n validSegments.era = true;\n setValidSegments({...validSegments});\n } else if (!allSegments.era && validSegments.era) {\n delete validSegments.era;\n setValidSegments({...validSegments});\n }\n\n let markValid = (part: Intl.DateTimeFormatPartTypes) => {\n validSegments[part] = true;\n if (part === 'year' && allSegments.era) {\n validSegments.era = true;\n }\n setValidSegments({...validSegments});\n };\n\n let adjustSegment = (type: Intl.DateTimeFormatPartTypes, amount: number) => {\n if (!validSegments[type]) {\n markValid(type);\n if (Object.keys(validSegments).length >= Object.keys(allSegments).length) {\n setValue(displayValue);\n }\n } else {\n setValue(addSegment(displayValue, type, amount, resolvedOptions));\n }\n };\n\n let validationState: ValidationState = props.validationState ||\n (isInvalid(calendarValue, props.minValue, props.maxValue) ? 'invalid' : null);\n\n return {\n value: calendarValue,\n dateValue,\n calendar,\n setValue,\n segments,\n dateFormatter,\n validationState,\n granularity,\n maxGranularity: props.maxGranularity ?? 'year',\n isDisabled,\n isReadOnly,\n isRequired,\n increment(part) {\n adjustSegment(part, 1);\n },\n decrement(part) {\n adjustSegment(part, -1);\n },\n incrementPage(part) {\n adjustSegment(part, PAGE_STEP[part] || 1);\n },\n decrementPage(part) {\n adjustSegment(part, -(PAGE_STEP[part] || 1));\n },\n setSegment(part, v) {\n markValid(part);\n setValue(setSegment(displayValue, part, v, resolvedOptions));\n },\n confirmPlaceholder() {\n if (props.isDisabled || props.isReadOnly) {\n return;\n }\n\n // Confirm the placeholder if only the day period is not filled in.\n let validKeys = Object.keys(validSegments);\n let allKeys = Object.keys(allSegments);\n if (validKeys.length === allKeys.length - 1 && allSegments.dayPeriod && !validSegments.dayPeriod) {\n validSegments = {...allSegments};\n setValidSegments(validSegments);\n setValue(displayValue.copy());\n }\n },\n clearSegment(part) {\n delete validSegments[part];\n setValidSegments({...validSegments});\n\n let placeholder = createPlaceholderDate(props.placeholderValue, granularity, calendar, defaultTimeZone);\n let value = displayValue;\n\n // Reset day period to default without changing the hour.\n if (part === 'dayPeriod' && 'hour' in displayValue && 'hour' in placeholder) {\n let isPM = displayValue.hour >= 12;\n let shouldBePM = placeholder.hour >= 12;\n if (isPM && !shouldBePM) {\n value = displayValue.set({hour: displayValue.hour - 12});\n } else if (!isPM && shouldBePM) {\n value = displayValue.set({hour: displayValue.hour + 12});\n }\n } else if (part in displayValue) {\n value = displayValue.set({[part]: placeholder[part]});\n }\n\n setDate(null);\n setValue(value);\n },\n formatValue(fieldOptions: FieldOptions) {\n if (!calendarValue) {\n return '';\n }\n\n let formatOptions = getFormatOptions(fieldOptions, formatOpts);\n let formatter = new DateFormatter(locale, formatOptions);\n return formatter.format(dateValue);\n }\n };\n}\n\nfunction getSegmentLimits(date: DateValue, type: string, options: Intl.ResolvedDateTimeFormatOptions) {\n switch (type) {\n case 'era': {\n let eras = date.calendar.getEras();\n return {\n value: eras.indexOf(date.era),\n minValue: 0,\n maxValue: eras.length - 1\n };\n }\n case 'year':\n return {\n value: date.year,\n minValue: 1,\n maxValue: date.calendar.getYearsInEra(date)\n };\n case 'month':\n return {\n value: date.month,\n minValue: getMinimumMonthInYear(date),\n maxValue: date.calendar.getMonthsInYear(date)\n };\n case 'day':\n return {\n value: date.day,\n minValue: getMinimumDayInMonth(date),\n maxValue: date.calendar.getDaysInMonth(date)\n };\n }\n\n if ('hour' in date) {\n switch (type) {\n case 'dayPeriod':\n return {\n value: date.hour >= 12 ? 12 : 0,\n minValue: 0,\n maxValue: 12\n };\n case 'hour':\n if (options.hour12) {\n let isPM = date.hour >= 12;\n return {\n value: date.hour,\n minValue: isPM ? 12 : 0,\n maxValue: isPM ? 23 : 11\n };\n }\n\n return {\n value: date.hour,\n minValue: 0,\n maxValue: 23\n };\n case 'minute':\n return {\n value: date.minute,\n minValue: 0,\n maxValue: 59\n };\n case 'second':\n return {\n value: date.second,\n minValue: 0,\n maxValue: 59\n };\n }\n }\n\n return {};\n}\n\nfunction addSegment(value: DateValue, part: string, amount: number, options: Intl.ResolvedDateTimeFormatOptions) {\n switch (part) {\n case 'era':\n case 'year':\n case 'month':\n case 'day':\n return value.cycle(part, amount, {round: part === 'year'});\n }\n\n if ('hour' in value) {\n switch (part) {\n case 'dayPeriod': {\n let hours = value.hour;\n let isPM = hours >= 12;\n return value.set({hour: isPM ? hours - 12 : hours + 12});\n }\n case 'hour':\n case 'minute':\n case 'second':\n return value.cycle(part, amount, {\n round: part !== 'hour',\n hourCycle: options.hour12 ? 12 : 24\n });\n }\n }\n}\n\nfunction setSegment(value: DateValue, part: string, segmentValue: number, options: Intl.ResolvedDateTimeFormatOptions) {\n switch (part) {\n case 'day':\n case 'month':\n case 'year':\n case 'era':\n return value.set({[part]: segmentValue});\n }\n\n if ('hour' in value) {\n switch (part) {\n case 'dayPeriod': {\n let hours = value.hour;\n let wasPM = hours >= 12;\n let isPM = segmentValue >= 12;\n if (isPM === wasPM) {\n return value;\n }\n return value.set({hour: wasPM ? hours - 12 : hours + 12});\n }\n case 'hour':\n // In 12 hour time, ensure that AM/PM does not change\n if (options.hour12) {\n let hours = value.hour;\n let wasPM = hours >= 12;\n if (!wasPM && segmentValue === 12) {\n segmentValue = 0;\n }\n if (wasPM && segmentValue < 12) {\n segmentValue += 12;\n }\n }\n // fallthrough\n case 'minute':\n case 'second':\n return value.set({[part]: segmentValue});\n }\n }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {LocalizedStringDictionary} from '@internationalized/string';\n\n// These placeholders are based on the strings used by the <input type=\"date\">\n// implementations in Chrome and Firefox. Additional languages are supported\n// here than React Spectrum's typical translations.\nconst placeholders = new LocalizedStringDictionary({\n ach: {year: 'mwaka', month: 'dwe', day: 'nino'},\n af: {year: 'jjjj', month: 'mm', day: 'dd'},\n am: {year: 'ዓዓዓዓ', month: 'ሚሜ', day: 'ቀቀ'},\n an: {year: 'aaaa', month: 'mm', day: 'dd'},\n ar: {year: 'سنة', month: 'شهر', day: 'يوم'},\n ast: {year: 'aaaa', month: 'mm', day: 'dd'},\n az: {year: 'iiii', month: 'aa', day: 'gg'},\n be: {year: 'гггг', month: 'мм', day: 'дд'},\n bg: {year: 'гггг', month: 'мм', day: 'дд'},\n bn: {year: 'yyyy', month: 'মিমি', day: 'dd'},\n br: {year: 'bbbb', month: 'mm', day: 'dd'},\n bs: {year: 'gggg', month: 'mm', day: 'dd'},\n ca: {year: 'aaaa', month: 'mm', day: 'dd'},\n cak: {year: 'jjjj', month: 'ii', day: \"q'q'\"},\n ckb: {year: 'ساڵ', month: 'مانگ', day: 'ڕۆژ'},\n cs: {year: 'rrrr', month: 'mm', day: 'dd'},\n cy: {year: 'bbbb', month: 'mm', day: 'dd'},\n da: {year: 'åååå', month: 'mm', day: 'dd'},\n de: {year: 'jjjj', month: 'mm', day: 'tt'},\n dsb: {year: 'llll', month: 'mm', day: 'źź'},\n el: {year: 'εεεε', month: 'μμ', day: 'ηη'},\n en: {year: 'yyyy', month: 'mm', day: 'dd'},\n eo: {year: 'jjjj', month: 'mm', day: 'tt'},\n es: {year: 'aaaa', month: 'mm', day: 'dd'},\n et: {year: 'aaaa', month: 'kk', day: 'pp'},\n eu: {year: 'uuuu', month: 'hh', day: 'ee'},\n fa: {year: 'سال', month: 'ماه', day: 'روز'},\n ff: {year: 'hhhh', month: 'll', day: 'ññ'},\n fi: {year: 'vvvv', month: 'kk', day: 'pp'},\n fr: {year: 'aaaa', month: 'mm', day: 'jj'},\n fy: {year: 'jjjj', month: 'mm', day: 'dd'},\n ga: {year: 'bbbb', month: 'mm', day: 'll'},\n gd: {year: 'bbbb', month: 'mm', day: 'll'},\n gl: {year: 'aaaa', month: 'mm', day: 'dd'},\n he: {year: 'שנה', month: 'חודש', day: 'יום'},\n hr: {year: 'gggg', month: 'mm', day: 'dd'},\n hsb: {year: 'llll', month: 'mm', day: 'dd'},\n hu: {year: 'éééé', month: 'hh', day: 'nn'},\n ia: {year: 'aaaa', month: 'mm', day: 'dd'},\n id: {year: 'tttt', month: 'bb', day: 'hh'},\n it: {year: 'aaaa', month: 'mm', day: 'gg'},\n ja: {year: ' 年 ', month: '月', day: '日'},\n ka: {year: 'წწწწ', month: 'თთ', day: 'რრ'},\n kk: {year: 'жжжж', month: 'аа', day: 'кк'},\n kn: {year: 'ವವವವ', month: 'ಮಿಮೀ', day: 'ದಿದಿ'},\n ko: {year: '연도', month: '월', day: '일'},\n lb: {year: 'jjjj', month: 'mm', day: 'dd'},\n lo: {year: 'ປປປປ', month: 'ດດ', day: 'ວວ'},\n lt: {year: 'mmmm', month: 'mm', day: 'dd'},\n lv: {year: 'gggg', month: 'mm', day: 'dd'},\n meh: {year: 'aaaa', month: 'mm', day: 'dd'},\n ml: {year: 'വർഷം', month: 'മാസം', day: 'തീയതി'},\n ms: {year: 'tttt', month: 'mm', day: 'hh'},\n nl: {year: 'jjjj', month: 'mm', day: 'dd'},\n nn: {year: 'åååå', month: 'mm', day: 'dd'},\n no: {year: 'åååå', month: 'mm', day: 'dd'},\n oc: {year: 'aaaa', month: 'mm', day: 'jj'},\n pl: {year: 'rrrr', month: 'mm', day: 'dd'},\n pt: {year: 'aaaa', month: 'mm', day: 'dd'},\n rm: {year: 'oooo', month: 'mm', day: 'dd'},\n ro: {year: 'aaaa', month: 'll', day: 'zz'},\n ru: {year: 'гггг', month: 'мм', day: 'дд'},\n sc: {year: 'aaaa', month: 'mm', day: 'dd'},\n scn: {year: 'aaaa', month: 'mm', day: 'jj'},\n sk: {year: 'rrrr', month: 'mm', day: 'dd'},\n sl: {year: 'llll', month: 'mm', day: 'dd'},\n sr: {year: 'гггг', month: 'мм', day: 'дд'},\n sv: {year: 'åååå', month: 'mm', day: 'dd'},\n szl: {year: 'rrrr', month: 'mm', day: 'dd'},\n tg: {year: 'сссс', month: 'мм', day: 'рр'},\n th: {year: 'ปปปป', month: 'ดด', day: 'วว'},\n tr: {year: 'yyyy', month: 'aa', day: 'gg'},\n uk: {year: 'рррр', month: 'мм', day: 'дд'},\n 'zh-CN': {year: '年', month: '月', day: '日'},\n 'zh-TW': {year: '年', month: '月', day: '日'}\n}, 'en');\n\nexport function getPlaceholder(field: string, value: string, locale: string) {\n // Use the actual placeholder value for the era and day period fields.\n if (field === 'era' || field === 'dayPeriod') {\n return value;\n }\n\n if (field === 'year' || field === 'month' || field === 'day') {\n return placeholders.getStringForLocale(field, locale);\n }\n\n // For time fields (e.g. hour, minute, etc.), use two dashes as the placeholder.\n return '––';\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DateFormatter, toCalendarDate, toCalendarDateTime} from '@internationalized/date';\nimport {DateRange, DateRangePickerProps, DateValue, Granularity, TimeValue} from '@react-types/datepicker';\nimport {FieldOptions, getFormatOptions, getPlaceholderTime, isInvalid, useDefaultProps} from './utils';\nimport {OverlayTriggerState, useOverlayTriggerState} from '@react-stately/overlays';\nimport {RangeValue, ValidationState} from '@react-types/shared';\nimport {useControlledState} from '@react-stately/utils';\nimport {useState} from 'react';\n\nexport interface DateRangePickerStateOptions extends DateRangePickerProps<DateValue> {\n /**\n * Determines whether the date picker popover should close automatically when a date is selected.\n * @default true\n */\n shouldCloseOnSelect?: boolean | (() => boolean)\n}\n\ntype TimeRange = RangeValue<TimeValue>;\nexport interface DateRangePickerState extends OverlayTriggerState {\n /** The currently selected date range. */\n value: DateRange,\n /** Sets the selected date range. */\n setValue(value: DateRange): void,\n /**\n * The date portion of the selected range. This may be set prior to `value` if the user has\n * selected a date range but has not yet selected a time range.\n */\n dateRange: DateRange,\n /** Sets the date portion of the selected range. */\n setDateRange(value: DateRange): void,\n /**\n * The time portion of the selected range. This may be set prior to `value` if the user has\n * selected a time range but has not yet selected a date range.\n */\n timeRange: TimeRange,\n /** Sets the time portion of the selected range. */\n setTimeRange(value: TimeRange): void,\n /** Sets the date portion of either the start or end of the selected range. */\n setDate(part: 'start' | 'end', value: DateValue): void,\n /** Sets the time portion of either the start or end of the selected range. */\n setTime(part: 'start' | 'end', value: TimeValue): void,\n /** Sets the date and time of either the start or end of the selected range. */\n setDateTime(part: 'start' | 'end', value: DateValue): void,\n /** The granularity for the field, based on the `granularity` prop and current value. */\n granularity: Granularity,\n /** Whether the date range picker supports selecting times, according to the `granularity` prop and current value. */\n hasTime: boolean,\n /** Whether the calendar popover is currently open. */\n isOpen: boolean,\n /** Sets whether the calendar popover is open. */\n setOpen(isOpen: boolean): void,\n /** The current validation state of the date picker, based on the `validationState`, `minValue`, and `maxValue` props. */\n validationState: ValidationState,\n /** Formats the selected range using the given options. */\n formatValue(locale: string, fieldOptions: FieldOptions): {start: string, end: string}\n}\n\n/**\n * Provides state management for a date range picker component.\n * A date range picker combines two DateFields and a RangeCalendar popover to allow\n * users to enter or select a date and time range.\n */\nexport function useDateRangePickerState(props: DateRangePickerStateOptions): DateRangePickerState {\n let overlayState = useOverlayTriggerState(props);\n let [controlledValue, setControlledValue] = useControlledState<DateRange>(props.value, props.defaultValue || null, props.onChange);\n let [placeholderValue, setPlaceholderValue] = useState(() => controlledValue || {start: null, end: null});\n\n // Reset the placeholder if the value prop is set to null.\n if (controlledValue == null && placeholderValue.start && placeholderValue.end) {\n placeholderValue = {start: null, end: null};\n setPlaceholderValue(placeholderValue);\n }\n\n let value = controlledValue || placeholderValue;\n\n let setValue = (value: DateRange) => {\n setPlaceholderValue(value);\n if (value?.start && value.end) {\n setControlledValue(value);\n } else {\n setControlledValue(null);\n }\n };\n\n let v = (value?.start || value?.end || props.placeholderValue);\n let [granularity] = useDefaultProps(v, props.granularity);\n let hasTime = granularity === 'hour' || granularity === 'minute' || granularity === 'second';\n let shouldCloseOnSelect = props.shouldCloseOnSelect ?? true;\n\n let [dateRange, setSelectedDateRange] = useState<DateRange>(null);\n let [timeRange, setSelectedTimeRange] = useState<TimeRange>(null);\n\n if (value && value.start && value.end) {\n dateRange = value;\n if ('hour' in value.start) {\n timeRange = value as TimeRange;\n }\n }\n\n let commitValue = (dateRange: DateRange, timeRange: TimeRange) => {\n setValue({\n start: 'timeZone' in timeRange.start ? timeRange.start.set(toCalendarDate(dateRange.start)) : toCalendarDateTime(dateRange.start, timeRange.start),\n end: 'timeZone' in timeRange.end ? timeRange.end.set(toCalendarDate(dateRange.end)) : toCalendarDateTime(dateRange.end, timeRange.end)\n });\n };\n\n // Intercept setValue to make sure the Time section is not changed by date selection in Calendar\n let setDateRange = (range: DateRange) => {\n let shouldClose = typeof shouldCloseOnSelect === 'function' ? shouldCloseOnSelect() : shouldCloseOnSelect;\n if (hasTime) {\n if (shouldClose || (range.start && range.end && timeRange?.start && timeRange?.end)) {\n commitValue(range, {\n start: timeRange?.start || getPlaceholderTime(props.placeholderValue),\n end: timeRange?.end || getPlaceholderTime(props.placeholderValue)\n });\n } else {\n setSelectedDateRange(range);\n }\n } else if (range.start && range.end) {\n setValue(range);\n } else {\n setSelectedDateRange(range);\n }\n\n if (shouldClose) {\n overlayState.setOpen(false);\n }\n };\n\n let setTimeRange = (range: TimeRange) => {\n if (dateRange?.start && dateRange?.end && range.start && range.end) {\n commitValue(dateRange, range);\n } else {\n setSelectedTimeRange(range);\n }\n };\n\n let validationState: ValidationState = props.validationState\n || (value != null && (\n isInvalid(value.start, props.minValue, props.maxValue) ||\n isInvalid(value.end, props.minValue, props.maxValue) ||\n (value.end != null && value.start != null && value.end.compare(value.start) < 0) ||\n (value?.start && props.isDateUnavailable?.(value.start)) ||\n (value?.end && props.isDateUnavailable?.(value.end))\n ) ? 'invalid' : null);\n\n return {\n value,\n setValue,\n dateRange,\n timeRange,\n granularity,\n hasTime,\n setDate(part, date) {\n setDateRange({...dateRange, [part]: date});\n },\n setTime(part, time) {\n setTimeRange({...timeRange, [part]: time});\n },\n setDateTime(part, dateTime) {\n setValue({...value, [part]: dateTime});\n },\n setDateRange,\n setTimeRange,\n ...overlayState,\n setOpen(isOpen) {\n // Commit the selected date range when the calendar is closed. Use a placeholder time if one wasn't set.\n // If only the time range was set and not the date range, don't commit. The state will be preserved until\n // the user opens the popover again.\n if (!isOpen && !(value?.start && value?.end) && dateRange?.start && dateRange?.end && hasTime) {\n commitValue(dateRange, {\n start: timeRange?.start || getPlaceholderTime(props.placeholderValue),\n end: timeRange?.end || getPlaceholderTime(props.placeholderValue)\n });\n }\n\n overlayState.setOpen(isOpen);\n },\n validationState,\n formatValue(locale, fieldOptions) {\n if (!value || !value.start || !value.end) {\n return null;\n }\n\n let startTimeZone = 'timeZone' in value.start ? value.start.timeZone : undefined;\n let startGranularity = props.granularity || (value.start && 'minute' in value.start ? 'minute' : 'day');\n let endTimeZone = 'timeZone' in value.end ? value.end.timeZone : undefined;\n let endGranularity = props.granularity || (value.end && 'minute' in value.end ? 'minute' : 'day');\n\n let startOptions = getFormatOptions(fieldOptions, {\n granularity: startGranularity,\n timeZone: startTimeZone,\n hideTimeZone: props.hideTimeZone,\n hourCycle: props.hourCycle,\n showEra: (value.start.calendar.identifier === 'gregory' && value.start.era === 'BC') ||\n (value.end.calendar.identifier === 'gregory' && value.end.era === 'BC')\n });\n\n let startDate = value.start.toDate(startTimeZone || 'UTC');\n let endDate = value.end.toDate(endTimeZone || 'UTC');\n\n let startFormatter = new DateFormatter(locale, startOptions);\n let endFormatter: Intl.DateTimeFormat;\n if (startTimeZone === endTimeZone && startGranularity === endGranularity && value.start.compare(value.end) !== 0) {\n // Use formatRange, as it results in shorter output when some of the fields\n // are shared between the start and end dates (e.g. the same month).\n // Formatting will fail if the end date is before the start date. Fall back below when that happens.\n try {\n let parts = startFormatter.formatRangeToParts(startDate, endDate);\n\n // Find the separator between the start and end date. This is determined\n // by finding the last shared literal before the end range.\n let separatorIndex = -1;\n for (let i = 0; i < parts.length; i++) {\n let part = parts[i];\n if (part.source === 'shared' && part.type === 'literal') {\n separatorIndex = i;\n } else if (part.source === 'endRange') {\n break;\n }\n }\n\n // Now we can combine the parts into start and end strings.\n let start = '';\n let end = '';\n for (let i = 0; i < parts.length; i++) {\n if (i < separatorIndex) {\n start += parts[i].value;\n } else if (i > separatorIndex) {\n end += parts[i].value;\n }\n }\n\n return {start, end};\n } catch (e) {\n // ignore\n }\n\n endFormatter = startFormatter;\n } else {\n let endOptions = getFormatOptions(fieldOptions, {\n granularity: endGranularity,\n timeZone: endTimeZone,\n hideTimeZone: props.hideTimeZone,\n hourCycle: props.hourCycle\n });\n\n endFormatter = new DateFormatter(locale, endOptions);\n }\n\n return {\n start: startFormatter.format(startDate),\n end: endFormatter.format(endDate)\n };\n }\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the 'License');\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DateFieldState, useDateFieldState} from '.';\nimport {DateValue, TimePickerProps, TimeValue} from '@react-types/datepicker';\nimport {getLocalTimeZone, GregorianCalendar, Time, toCalendarDateTime, today, toTime} from '@internationalized/date';\nimport {useControlledState} from '@react-stately/utils';\nimport {useMemo} from 'react';\n\nexport interface TimeFieldStateOptions extends TimePickerProps<TimeValue> {\n /** The locale to display and edit the value according to. */\n locale: string\n}\n\n/**\n * Provides state management for a time field component.\n * A time field allows users to enter and edit time values using a keyboard.\n * Each part of a time value is displayed in an individually editable segment.\n */\nexport function useTimeFieldState(props: TimeFieldStateOptions): DateFieldState {\n let {\n placeholderValue = new Time(),\n minValue,\n maxValue,\n granularity\n } = props;\n\n let [value, setValue] = useControlledState<TimeValue>(\n props.value,\n props.defaultValue,\n props.onChange\n );\n\n let v = value || placeholderValue;\n let day = v && 'day' in v ? v : undefined;\n let placeholderDate = useMemo(() => convertValue(placeholderValue), [placeholderValue]);\n let minDate = useMemo(() => convertValue(minValue, day), [minValue, day]);\n let maxDate = useMemo(() => convertValue(maxValue, day), [maxValue, day]);\n\n let dateTime = useMemo(() => value == null ? null : convertValue(value), [value]);\n let onChange = newValue => {\n setValue(v && 'day' in v ? newValue : newValue && toTime(newValue));\n };\n\n return useDateFieldState({\n ...props,\n value: dateTime,\n defaultValue: undefined,\n minValue: minDate,\n maxValue: maxDate,\n onChange,\n granularity: granularity || 'minute',\n maxGranularity: 'hour',\n placeholderValue: placeholderDate,\n // Calendar should not matter for time fields.\n createCalendar: () => new GregorianCalendar()\n });\n}\n\nfunction convertValue(value: TimeValue, date: DateValue = today(getLocalTimeZone())) {\n if (!value) {\n return null;\n }\n\n if ('day' in value) {\n return value;\n }\n\n return toCalendarDateTime(date, value);\n}\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -88,7 +88,6 @@ function $ab5bf3f618090389$export$87194bb378cc3ac2(props) {
|
|
|
88
88
|
var ref;
|
|
89
89
|
let overlayState = $7UzoM$useOverlayTriggerState(props);
|
|
90
90
|
let [value, setValue] = $7UzoM$useControlledState(props.value, props.defaultValue || null, props.onChange);
|
|
91
|
-
let [isFocused, setFocused] = $7UzoM$useState(false);
|
|
92
91
|
let v = value || props.placeholderValue;
|
|
93
92
|
let [granularity, defaultTimeZone] = $35a22f14a1f04b11$export$2440da353cedad43(v, props.granularity);
|
|
94
93
|
let dateValue = value != null ? value.toDate(defaultTimeZone !== null && defaultTimeZone !== void 0 ? defaultTimeZone : 'UTC') : null;
|
|
@@ -149,9 +148,7 @@ function $ab5bf3f618090389$export$87194bb378cc3ac2(props) {
|
|
|
149
148
|
});
|
|
150
149
|
let formatter = new $7UzoM$DateFormatter(locale, formatOptions);
|
|
151
150
|
return formatter.format(dateValue);
|
|
152
|
-
}
|
|
153
|
-
isFocused: isFocused,
|
|
154
|
-
setFocused: setFocused
|
|
151
|
+
}
|
|
155
152
|
};
|
|
156
153
|
}
|
|
157
154
|
|
|
@@ -577,7 +574,6 @@ function $3c0fc76039f1c516$export$60e84778edff6d26(props) {
|
|
|
577
574
|
let v1 = props.value || props.defaultValue || props.placeholderValue;
|
|
578
575
|
let [granularity, defaultTimeZone] = $35a22f14a1f04b11$export$2440da353cedad43(v1, props.granularity);
|
|
579
576
|
let timeZone = defaultTimeZone || 'UTC';
|
|
580
|
-
let [isFocused, setFocused] = $7UzoM$useState(false);
|
|
581
577
|
// props.granularity must actually exist in the value if one is provided.
|
|
582
578
|
if (v1 && !(granularity in v1)) throw new Error('Invalid granularity ' + granularity + ' for value ' + v1.toString());
|
|
583
579
|
let defaultFormatter = $7UzoM$useMemo(()=>new $7UzoM$DateFormatter(locale)
|
|
@@ -814,9 +810,7 @@ function $3c0fc76039f1c516$export$60e84778edff6d26(props) {
|
|
|
814
810
|
let formatOptions = $35a22f14a1f04b11$export$7e319ea407e63bc0(fieldOptions, formatOpts);
|
|
815
811
|
let formatter = new $7UzoM$DateFormatter(locale, formatOptions);
|
|
816
812
|
return formatter.format(dateValue);
|
|
817
|
-
}
|
|
818
|
-
isFocused: isFocused,
|
|
819
|
-
setFocused: setFocused
|
|
813
|
+
}
|
|
820
814
|
};
|
|
821
815
|
}
|
|
822
816
|
function $3c0fc76039f1c516$var$getSegmentLimits(date, type, options) {
|
|
@@ -967,7 +961,6 @@ function $93c38a5e28be6249$export$e50a61c1de9f574(props) {
|
|
|
967
961
|
end: null
|
|
968
962
|
}
|
|
969
963
|
);
|
|
970
|
-
let [isFocused, setFocused] = $7UzoM$useState(false);
|
|
971
964
|
// Reset the placeholder if the value prop is set to null.
|
|
972
965
|
if (controlledValue == null && placeholderValue.start && placeholderValue.end) {
|
|
973
966
|
placeholderValue = {
|
|
@@ -1115,9 +1108,7 @@ function $93c38a5e28be6249$export$e50a61c1de9f574(props) {
|
|
|
1115
1108
|
start: startFormatter.format(startDate),
|
|
1116
1109
|
end: endFormatter.format(endDate)
|
|
1117
1110
|
};
|
|
1118
|
-
}
|
|
1119
|
-
isFocused: isFocused,
|
|
1120
|
-
setFocused: setFocused
|
|
1111
|
+
}
|
|
1121
1112
|
};
|
|
1122
1113
|
}
|
|
1123
1114
|
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;SEgBgB,yCAAS,CAAC,KAAgB,EAAE,QAAmB,EAAE,QAAmB,EAAE,CAAC;IACrF,MAAM,CAAC,KAAK,IAAI,IAAI,KACjB,QAAQ,IAAI,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,IAAI,CAAC,IAC/C,QAAQ,IAAI,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,IAAI,CAAC;AAEpD,CAAC;AAYD,KAAK,CAAC,2CAAqB,GAAiB,CAAC;IAC3C,IAAI,EAAE,CAAS;IACf,KAAK,EAAE,CAAS;IAChB,GAAG,EAAE,C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AC;AACH,CAAC;SAEQ,kCAAY,CAAC,KAAgB,EAAE,IAAe,GAAG,YAAK,CAAC,uBAAgB,KAAK,CAAC;IACpF,EAAE,GAAG,KAAK,EACR,MAAM,CAAC,IAAI;IAGb,EAAE,EAAE,CAAK,QAAI,KAAK,EAChB,MAAM,CAAC,KAAK;IAGd,MAAM,CAAC,yBAAkB,CAAC,IAAI,EAAE,KAAK;AACvC,CAAC;;","sources":["packages/@react-stately/datepicker/src/index.ts","packages/@react-stately/datepicker/src/useDatePickerState.ts","packages/@react-stately/datepicker/src/utils.ts","packages/@react-stately/datepicker/src/useDateFieldState.ts","packages/@react-stately/datepicker/src/placeholders.ts","packages/@react-stately/datepicker/src/useDateRangePickerState.ts","packages/@react-stately/datepicker/src/useTimeFieldState.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {useDatePickerState} from './useDatePickerState';\nexport {useDateFieldState} from './useDateFieldState';\nexport {useDateRangePickerState} from './useDateRangePickerState';\nexport {useTimeFieldState} from './useTimeFieldState';\n\nexport type {DateFieldStateOptions, DateFieldState, DateSegment, SegmentType} from './useDateFieldState';\nexport type {DatePickerStateOptions, DatePickerState} from './useDatePickerState';\nexport type {DateRangePickerStateOptions, DateRangePickerState} from './useDateRangePickerState';\nexport type {TimeFieldStateOptions} from './useTimeFieldState';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarDate, DateFormatter, toCalendarDate, toCalendarDateTime} from '@internationalized/date';\nimport {DatePickerProps, DateValue, Granularity, TimeValue} from '@react-types/datepicker';\nimport {FieldOptions, getFormatOptions, getPlaceholderTime, useDefaultProps} from './utils';\nimport {isInvalid} from './utils';\nimport {OverlayTriggerState, useOverlayTriggerState} from '@react-stately/overlays';\nimport {useControlledState} from '@react-stately/utils';\nimport {useState} from 'react';\nimport {ValidationState} from '@react-types/shared';\n\nexport interface DatePickerStateOptions extends DatePickerProps<DateValue> {\n /**\n * Determines whether the date picker popover should close automatically when a date is selected.\n * @default true\n */\n shouldCloseOnSelect?: boolean | (() => boolean)\n}\n\nexport interface DatePickerState extends OverlayTriggerState {\n /** The currently selected date. */\n value: DateValue,\n /** Sets the selected date. */\n setValue(value: DateValue): void,\n /**\n * The date portion of the value. This may be set prior to `value` if the user has\n * selected a date but has not yet selected a time.\n */\n dateValue: DateValue,\n /** Sets the date portion of the value. */\n setDateValue(value: CalendarDate): void,\n /**\n * The time portion of the value. This may be set prior to `value` if the user has\n * selected a time but has not yet selected a date.\n */\n timeValue: TimeValue,\n /** Sets the time portion of the value. */\n setTimeValue(value: TimeValue): void,\n /** The granularity for the field, based on the `granularity` prop and current value. */\n granularity: Granularity,\n /** Whether the date picker supports selecting a time, according to the `granularity` prop and current value. */\n hasTime: boolean,\n /** Whether the calendar popover is currently open. */\n isOpen: boolean,\n /** Sets whether the calendar popover is open. */\n setOpen(isOpen: boolean): void,\n /** The current validation state of the date picker, based on the `validationState`, `minValue`, and `maxValue` props. */\n validationState: ValidationState,\n /** Formats the selected value using the given options. */\n formatValue(locale: string, fieldOptions: FieldOptions): string,\n /** Whether the date picker is currently focused. */\n readonly isFocused: boolean,\n /** Sets whether the date picker is focused. */\n setFocused(isFocused: boolean): void\n}\n\n/**\n * Provides state management for a date picker component.\n * A date picker combines a DateField and a Calendar popover to allow users to enter or select a date and time value.\n */\nexport function useDatePickerState(props: DatePickerStateOptions): DatePickerState {\n let overlayState = useOverlayTriggerState(props);\n let [value, setValue] = useControlledState<DateValue>(props.value, props.defaultValue || null, props.onChange);\n\n let [isFocused, setFocused] = useState(false);\n\n let v = (value || props.placeholderValue);\n let [granularity, defaultTimeZone] = useDefaultProps(v, props.granularity);\n let dateValue = value != null ? value.toDate(defaultTimeZone ?? 'UTC') : null;\n let hasTime = granularity === 'hour' || granularity === 'minute' || granularity === 'second';\n let shouldCloseOnSelect = props.shouldCloseOnSelect ?? true;\n\n let [selectedDate, setSelectedDate] = useState<DateValue>(null);\n let [selectedTime, setSelectedTime] = useState<TimeValue>(null);\n\n if (value) {\n selectedDate = value;\n if ('hour' in value) {\n selectedTime = value;\n }\n }\n\n // props.granularity must actually exist in the value if one is provided.\n if (v && !(granularity in v)) {\n throw new Error('Invalid granularity ' + granularity + ' for value ' + v.toString());\n }\n\n let commitValue = (date: DateValue, time: TimeValue) => {\n setValue('timeZone' in time ? time.set(toCalendarDate(date)) : toCalendarDateTime(date, time));\n };\n\n // Intercept setValue to make sure the Time section is not changed by date selection in Calendar\n let selectDate = (newValue: CalendarDate) => {\n let shouldClose = typeof shouldCloseOnSelect === 'function' ? shouldCloseOnSelect() : shouldCloseOnSelect;\n if (hasTime) {\n if (selectedTime || shouldClose) {\n commitValue(newValue, selectedTime || getPlaceholderTime(props.placeholderValue));\n } else {\n setSelectedDate(newValue);\n }\n } else {\n setValue(newValue);\n }\n\n if (shouldClose) {\n overlayState.setOpen(false);\n }\n };\n\n let selectTime = (newValue: TimeValue) => {\n if (selectedDate) {\n commitValue(selectedDate, newValue);\n } else {\n setSelectedTime(newValue);\n }\n };\n\n let validationState: ValidationState = props.validationState ||\n (isInvalid(value, props.minValue, props.maxValue) ? 'invalid' : null) ||\n (value && props.isDateUnavailable?.(value) ? 'invalid' : null);\n\n return {\n value,\n setValue,\n dateValue: selectedDate,\n timeValue: selectedTime,\n setDateValue: selectDate,\n setTimeValue: selectTime,\n granularity,\n hasTime,\n ...overlayState,\n setOpen(isOpen) {\n // Commit the selected date when the calendar is closed. Use a placeholder time if one wasn't set.\n // If only the time was set and not the date, don't commit. The state will be preserved until\n // the user opens the popover again.\n if (!isOpen && !value && selectedDate && hasTime) {\n commitValue(selectedDate, selectedTime || getPlaceholderTime(props.placeholderValue));\n }\n\n overlayState.setOpen(isOpen);\n },\n validationState,\n formatValue(locale, fieldOptions) {\n if (!dateValue) {\n return '';\n }\n\n let formatOptions = getFormatOptions(fieldOptions, {\n granularity,\n timeZone: defaultTimeZone,\n hideTimeZone: props.hideTimeZone,\n hourCycle: props.hourCycle,\n showEra: value.calendar.identifier === 'gregory' && value.era === 'BC'\n });\n\n let formatter = new DateFormatter(locale, formatOptions);\n return formatter.format(dateValue);\n },\n isFocused,\n setFocused\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Calendar, now, Time, toCalendar, toCalendarDate, toCalendarDateTime} from '@internationalized/date';\nimport {DatePickerProps, DateValue, Granularity, TimeValue} from '@react-types/datepicker';\nimport {useRef} from 'react';\n\nexport function isInvalid(value: DateValue, minValue: DateValue, maxValue: DateValue) {\n return value != null && (\n (minValue != null && value.compare(minValue) < 0) ||\n (maxValue != null && value.compare(maxValue) > 0)\n );\n}\n\nexport type FieldOptions = Pick<Intl.DateTimeFormatOptions, 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second'>;\ninterface FormatterOptions {\n timeZone?: string,\n hideTimeZone?: boolean,\n granularity?: DatePickerProps<any>['granularity'],\n maxGranularity?: 'year' | 'month' | DatePickerProps<any>['granularity'],\n hourCycle?: 12 | 24,\n showEra?: boolean\n}\n\nconst DEFAULT_FIELD_OPTIONS: FieldOptions = {\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n hour: 'numeric',\n minute: '2-digit',\n second: '2-digit'\n};\n\nexport function getFormatOptions(\n fieldOptions: FieldOptions,\n options: FormatterOptions\n): Intl.DateTimeFormatOptions {\n fieldOptions = {...DEFAULT_FIELD_OPTIONS, ...fieldOptions};\n let granularity = options.granularity || 'minute';\n let keys = Object.keys(fieldOptions);\n let startIdx = keys.indexOf(options.maxGranularity ?? 'year');\n if (startIdx < 0) {\n startIdx = 0;\n }\n\n let endIdx = keys.indexOf(granularity);\n if (endIdx < 0) {\n endIdx = 2;\n }\n\n if (startIdx > endIdx) {\n throw new Error('maxGranularity must be greater than granularity');\n }\n\n let opts: Intl.DateTimeFormatOptions = keys.slice(startIdx, endIdx + 1).reduce((opts, key) => {\n opts[key] = fieldOptions[key];\n return opts;\n }, {});\n\n if (options.hourCycle != null) {\n opts.hour12 = options.hourCycle === 12;\n }\n\n opts.timeZone = options.timeZone || 'UTC';\n\n let hasTime = granularity === 'hour' || granularity === 'minute' || granularity === 'second';\n if (hasTime && options.timeZone && !options.hideTimeZone) {\n opts.timeZoneName = 'short';\n }\n\n if (options.showEra && startIdx === 0) {\n opts.era = 'short';\n }\n\n return opts;\n}\n\nexport function getPlaceholderTime(placeholderValue: DateValue): TimeValue {\n if (placeholderValue && 'hour' in placeholderValue) {\n return placeholderValue;\n }\n\n return new Time();\n}\n\nexport function convertValue(value: DateValue, calendar: Calendar): DateValue {\n if (value === null) {\n return null;\n }\n\n if (!value) {\n return undefined;\n }\n\n return toCalendar(value, calendar);\n}\n\n\nexport function createPlaceholderDate(placeholderValue: DateValue, granularity: string, calendar: Calendar, timeZone: string) {\n if (placeholderValue) {\n return convertValue(placeholderValue, calendar);\n }\n\n let date = toCalendar(now(timeZone).set({\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0\n }), calendar);\n\n if (granularity === 'year' || granularity === 'month' || granularity === 'day') {\n return toCalendarDate(date);\n }\n\n if (!timeZone) {\n return toCalendarDateTime(date);\n }\n\n return date;\n}\n\nexport function useDefaultProps(v: DateValue, granularity: Granularity): [Granularity, string] {\n // Compute default granularity and time zone from the value. If the value becomes null, keep the last values.\n let lastValue = useRef(v);\n if (v) {\n lastValue.current = v;\n }\n\n v = lastValue.current;\n let defaultTimeZone = (v && 'timeZone' in v ? v.timeZone : undefined);\n granularity = granularity || (v && 'minute' in v ? 'minute' : 'day');\n\n // props.granularity must actually exist in the value if one is provided.\n if (v && !(granularity in v)) {\n throw new Error('Invalid granularity ' + granularity + ' for value ' + v.toString());\n }\n\n return [granularity, defaultTimeZone];\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Calendar, DateFormatter, getMinimumDayInMonth, getMinimumMonthInYear, GregorianCalendar, toCalendar} from '@internationalized/date';\nimport {convertValue, createPlaceholderDate, FieldOptions, getFormatOptions, isInvalid, useDefaultProps} from './utils';\nimport {DatePickerProps, DateValue, Granularity} from '@react-types/datepicker';\nimport {getPlaceholder} from './placeholders';\nimport {useControlledState} from '@react-stately/utils';\nimport {useEffect, useMemo, useRef, useState} from 'react';\nimport {ValidationState} from '@react-types/shared';\n\nexport type SegmentType = 'era' | 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second' | 'dayPeriod' | 'literal' | 'timeZoneName';\nexport interface DateSegment {\n /** The type of segment. */\n type: SegmentType,\n /** The formatted text for the segment. */\n text: string,\n /** The numeric value for the segment, if applicable. */\n value?: number,\n /** The minimum numeric value for the segment, if applicable. */\n minValue?: number,\n /** The maximum numeric value for the segment, if applicable. */\n maxValue?: number,\n /** Whether the value is a placeholder. */\n isPlaceholder: boolean,\n /** A placeholder string for the segment. */\n placeholder: string,\n /** Whether the segment is editable. */\n isEditable: boolean\n}\n\nexport interface DateFieldState {\n /** The current field value. */\n value: DateValue,\n /** The current value, converted to a native JavaScript `Date` object. */\n dateValue: Date,\n /** The calendar system currently in use. */\n calendar: Calendar,\n /** Sets the field's value. */\n setValue(value: DateValue): void,\n /** A list of segments for the current value. */\n segments: DateSegment[],\n /** A date formatter configured for the current locale and format. */\n dateFormatter: DateFormatter,\n /** The current validation state of the date field, based on the `validationState`, `minValue`, and `maxValue` props. */\n validationState: ValidationState,\n /** The granularity for the field, based on the `granularity` prop and current value. */\n granularity: Granularity,\n /** The maximum date or time unit that is displayed in the field. */\n maxGranularity: 'year' | 'month' | Granularity,\n /** Whether the field is disabled. */\n isDisabled: boolean,\n /** Whether the field is read only. */\n isReadOnly: boolean,\n /** Whether the field is required. */\n isRequired: boolean,\n /** Increments the given segment. Upon reaching the minimum or maximum value, the value wraps around to the opposite limit. */\n increment(type: SegmentType): void,\n /** Decrements the given segment. Upon reaching the minimum or maximum value, the value wraps around to the opposite limit. */\n decrement(type: SegmentType): void,\n /**\n * Increments the given segment by a larger amount, rounding it to the nearest increment.\n * The amount to increment by depends on the field, for example 15 minutes, 7 days, and 5 years.\n * Upon reaching the minimum or maximum value, the value wraps around to the opposite limit.\n */\n incrementPage(type: SegmentType): void,\n /**\n * Decrements the given segment by a larger amount, rounding it to the nearest increment.\n * The amount to decrement by depends on the field, for example 15 minutes, 7 days, and 5 years.\n * Upon reaching the minimum or maximum value, the value wraps around to the opposite limit.\n */\n decrementPage(type: SegmentType): void,\n /** Sets the value of the given segment. */\n setSegment(type: 'era', value: string): void,\n setSegment(type: SegmentType, value: number): void,\n /** Updates the remaining unfilled segments with the placeholder value. */\n confirmPlaceholder(): void,\n /** Clears the value of the given segment, reverting it to the placeholder. */\n clearSegment(type: SegmentType): void,\n /** Formats the current date value using the given options. */\n formatValue(fieldOptions: FieldOptions): string,\n /** Whether the date field is currently focused. */\n readonly isFocused: boolean,\n /** Sets whether the date field is focused. */\n setFocused(isFocused: boolean): void\n}\n\nconst EDITABLE_SEGMENTS = {\n year: true,\n month: true,\n day: true,\n hour: true,\n minute: true,\n second: true,\n dayPeriod: true,\n era: true\n};\n\nconst PAGE_STEP = {\n year: 5,\n month: 2,\n day: 7,\n hour: 2,\n minute: 15,\n second: 15\n};\n\n// Node seems to convert everything to lowercase...\nconst TYPE_MAPPING = {\n dayperiod: 'dayPeriod'\n};\n\nexport interface DateFieldStateOptions extends DatePickerProps<DateValue> {\n /**\n * The maximum unit to display in the date field.\n * @default 'year'\n */\n maxGranularity?: 'year' | 'month' | Granularity,\n /** The locale to display and edit the value according to. */\n locale: string,\n /**\n * A function that creates a [Calendar](../internationalized/date/Calendar.html)\n * object for a given calendar identifier. Such a function may be imported from the\n * `@internationalized/date` package, or manually implemented to include support for\n * only certain calendars.\n */\n createCalendar: (name: string) => Calendar\n}\n\n/**\n * Provides state management for a date field component.\n * A date field allows users to enter and edit date and time values using a keyboard.\n * Each part of a date value is displayed in an individually editable segment.\n */\nexport function useDateFieldState(props: DateFieldStateOptions): DateFieldState {\n let {\n locale,\n createCalendar,\n hideTimeZone,\n isDisabled,\n isReadOnly,\n isRequired\n } = props;\n\n let v: DateValue = (props.value || props.defaultValue || props.placeholderValue);\n let [granularity, defaultTimeZone] = useDefaultProps(v, props.granularity);\n let timeZone = defaultTimeZone || 'UTC';\n\n let [isFocused, setFocused] = useState(false);\n\n // props.granularity must actually exist in the value if one is provided.\n if (v && !(granularity in v)) {\n throw new Error('Invalid granularity ' + granularity + ' for value ' + v.toString());\n }\n\n let defaultFormatter = useMemo(() => new DateFormatter(locale), [locale]);\n let calendar = useMemo(() => createCalendar(defaultFormatter.resolvedOptions().calendar), [createCalendar, defaultFormatter]);\n\n let [value, setDate] = useControlledState<DateValue>(\n props.value,\n props.defaultValue,\n props.onChange\n );\n\n let calendarValue = useMemo(() => convertValue(value, calendar), [value, calendar]);\n\n // We keep track of the placeholder date separately in state so that onChange is not called\n // until all segments are set. If the value === null (not undefined), then assume the component\n // is controlled, so use the placeholder as the value until all segments are entered so it doesn't\n // change from uncontrolled to controlled and emit a warning.\n let [placeholderDate, setPlaceholderDate] = useState(\n () => createPlaceholderDate(props.placeholderValue, granularity, calendar, defaultTimeZone)\n );\n\n let val = calendarValue || placeholderDate;\n let showEra = calendar.identifier === 'gregory' && val.era === 'BC';\n let formatOpts = useMemo(() => ({\n granularity,\n maxGranularity: props.maxGranularity ?? 'year',\n timeZone: defaultTimeZone,\n hideTimeZone,\n hourCycle: props.hourCycle,\n showEra\n }), [props.maxGranularity, granularity, props.hourCycle, defaultTimeZone, hideTimeZone, showEra]);\n let opts = useMemo(() => getFormatOptions({}, formatOpts), [formatOpts]);\n\n let dateFormatter = useMemo(() => new DateFormatter(locale, opts), [locale, opts]);\n let resolvedOptions = useMemo(() => dateFormatter.resolvedOptions(), [dateFormatter]);\n\n // Determine how many editable segments there are for validation purposes.\n // The result is cached for performance.\n let allSegments: Partial<typeof EDITABLE_SEGMENTS> = useMemo(() =>\n dateFormatter.formatToParts(new Date())\n .filter(seg => EDITABLE_SEGMENTS[seg.type])\n .reduce((p, seg) => (p[seg.type] = true, p), {})\n , [dateFormatter]);\n\n let [validSegments, setValidSegments] = useState<Partial<typeof EDITABLE_SEGMENTS>>(\n () => props.value || props.defaultValue ? {...allSegments} : {}\n );\n\n // Reset placeholder when calendar changes\n let lastCalendarIdentifier = useRef(calendar.identifier);\n useEffect(() => {\n if (calendar.identifier !== lastCalendarIdentifier.current) {\n lastCalendarIdentifier.current = calendar.identifier;\n setPlaceholderDate(placeholder =>\n Object.keys(validSegments).length > 0\n ? toCalendar(placeholder, calendar)\n : createPlaceholderDate(props.placeholderValue, granularity, calendar, defaultTimeZone)\n );\n }\n }, [calendar, granularity, validSegments, defaultTimeZone, props.placeholderValue]);\n\n // If there is a value prop, and some segments were previously placeholders, mark them all as valid.\n if (value && Object.keys(validSegments).length < Object.keys(allSegments).length) {\n validSegments = {...allSegments};\n setValidSegments(validSegments);\n }\n\n // If the value is set to null and all segments are valid, reset the placeholder.\n if (value == null && Object.keys(validSegments).length === Object.keys(allSegments).length) {\n validSegments = {};\n setValidSegments(validSegments);\n setPlaceholderDate(createPlaceholderDate(props.placeholderValue, granularity, calendar, defaultTimeZone));\n }\n\n // If all segments are valid, use the date from state, otherwise use the placeholder date.\n let displayValue = calendarValue && Object.keys(validSegments).length >= Object.keys(allSegments).length ? calendarValue : placeholderDate;\n let setValue = (newValue: DateValue) => {\n if (props.isDisabled || props.isReadOnly) {\n return;\n }\n\n if (Object.keys(validSegments).length >= Object.keys(allSegments).length) {\n // The display calendar should not have any effect on the emitted value.\n // Emit dates in the same calendar as the original value, if any, otherwise gregorian.\n newValue = toCalendar(newValue, v?.calendar || new GregorianCalendar());\n setDate(newValue);\n } else {\n setPlaceholderDate(newValue);\n }\n };\n\n let dateValue = useMemo(() => displayValue.toDate(timeZone), [displayValue, timeZone]);\n let segments = useMemo(() =>\n dateFormatter.formatToParts(dateValue)\n .map(segment => {\n let isEditable = EDITABLE_SEGMENTS[segment.type];\n if (segment.type === 'era' && calendar.getEras().length === 1) {\n isEditable = false;\n }\n\n let isPlaceholder = EDITABLE_SEGMENTS[segment.type] && !validSegments[segment.type];\n let placeholder = EDITABLE_SEGMENTS[segment.type] ? getPlaceholder(segment.type, segment.value, locale) : null;\n return {\n type: TYPE_MAPPING[segment.type] || segment.type,\n text: isPlaceholder ? placeholder : segment.value,\n ...getSegmentLimits(displayValue, segment.type, resolvedOptions),\n isPlaceholder,\n placeholder,\n isEditable\n } as DateSegment;\n })\n , [dateValue, validSegments, dateFormatter, resolvedOptions, displayValue, calendar, locale]);\n\n // When the era field appears, mark it valid if the year field is already valid.\n // If the era field disappears, remove it from the valid segments.\n if (allSegments.era && validSegments.year && !validSegments.era) {\n validSegments.era = true;\n setValidSegments({...validSegments});\n } else if (!allSegments.era && validSegments.era) {\n delete validSegments.era;\n setValidSegments({...validSegments});\n }\n\n let markValid = (part: Intl.DateTimeFormatPartTypes) => {\n validSegments[part] = true;\n if (part === 'year' && allSegments.era) {\n validSegments.era = true;\n }\n setValidSegments({...validSegments});\n };\n\n let adjustSegment = (type: Intl.DateTimeFormatPartTypes, amount: number) => {\n if (!validSegments[type]) {\n markValid(type);\n if (Object.keys(validSegments).length >= Object.keys(allSegments).length) {\n setValue(displayValue);\n }\n } else {\n setValue(addSegment(displayValue, type, amount, resolvedOptions));\n }\n };\n\n let validationState: ValidationState = props.validationState ||\n (isInvalid(calendarValue, props.minValue, props.maxValue) ? 'invalid' : null);\n\n return {\n value: calendarValue,\n dateValue,\n calendar,\n setValue,\n segments,\n dateFormatter,\n validationState,\n granularity,\n maxGranularity: props.maxGranularity ?? 'year',\n isDisabled,\n isReadOnly,\n isRequired,\n increment(part) {\n adjustSegment(part, 1);\n },\n decrement(part) {\n adjustSegment(part, -1);\n },\n incrementPage(part) {\n adjustSegment(part, PAGE_STEP[part] || 1);\n },\n decrementPage(part) {\n adjustSegment(part, -(PAGE_STEP[part] || 1));\n },\n setSegment(part, v) {\n markValid(part);\n setValue(setSegment(displayValue, part, v, resolvedOptions));\n },\n confirmPlaceholder() {\n if (props.isDisabled || props.isReadOnly) {\n return;\n }\n\n // Confirm the placeholder if only the day period is not filled in.\n let validKeys = Object.keys(validSegments);\n let allKeys = Object.keys(allSegments);\n if (validKeys.length === allKeys.length - 1 && allSegments.dayPeriod && !validSegments.dayPeriod) {\n validSegments = {...allSegments};\n setValidSegments(validSegments);\n setValue(displayValue.copy());\n }\n },\n clearSegment(part) {\n delete validSegments[part];\n setValidSegments({...validSegments});\n\n let placeholder = createPlaceholderDate(props.placeholderValue, granularity, calendar, defaultTimeZone);\n let value = displayValue;\n\n // Reset day period to default without changing the hour.\n if (part === 'dayPeriod' && 'hour' in displayValue && 'hour' in placeholder) {\n let isPM = displayValue.hour >= 12;\n let shouldBePM = placeholder.hour >= 12;\n if (isPM && !shouldBePM) {\n value = displayValue.set({hour: displayValue.hour - 12});\n } else if (!isPM && shouldBePM) {\n value = displayValue.set({hour: displayValue.hour + 12});\n }\n } else if (part in displayValue) {\n value = displayValue.set({[part]: placeholder[part]});\n }\n\n setDate(null);\n setValue(value);\n },\n formatValue(fieldOptions: FieldOptions) {\n if (!calendarValue) {\n return '';\n }\n\n let formatOptions = getFormatOptions(fieldOptions, formatOpts);\n let formatter = new DateFormatter(locale, formatOptions);\n return formatter.format(dateValue);\n },\n isFocused,\n setFocused\n };\n}\n\nfunction getSegmentLimits(date: DateValue, type: string, options: Intl.ResolvedDateTimeFormatOptions) {\n switch (type) {\n case 'era': {\n let eras = date.calendar.getEras();\n return {\n value: eras.indexOf(date.era),\n minValue: 0,\n maxValue: eras.length - 1\n };\n }\n case 'year':\n return {\n value: date.year,\n minValue: 1,\n maxValue: date.calendar.getYearsInEra(date)\n };\n case 'month':\n return {\n value: date.month,\n minValue: getMinimumMonthInYear(date),\n maxValue: date.calendar.getMonthsInYear(date)\n };\n case 'day':\n return {\n value: date.day,\n minValue: getMinimumDayInMonth(date),\n maxValue: date.calendar.getDaysInMonth(date)\n };\n }\n\n if ('hour' in date) {\n switch (type) {\n case 'dayPeriod':\n return {\n value: date.hour >= 12 ? 12 : 0,\n minValue: 0,\n maxValue: 12\n };\n case 'hour':\n if (options.hour12) {\n let isPM = date.hour >= 12;\n return {\n value: date.hour,\n minValue: isPM ? 12 : 0,\n maxValue: isPM ? 23 : 11\n };\n }\n\n return {\n value: date.hour,\n minValue: 0,\n maxValue: 23\n };\n case 'minute':\n return {\n value: date.minute,\n minValue: 0,\n maxValue: 59\n };\n case 'second':\n return {\n value: date.second,\n minValue: 0,\n maxValue: 59\n };\n }\n }\n\n return {};\n}\n\nfunction addSegment(value: DateValue, part: string, amount: number, options: Intl.ResolvedDateTimeFormatOptions) {\n switch (part) {\n case 'era':\n case 'year':\n case 'month':\n case 'day':\n return value.cycle(part, amount, {round: part === 'year'});\n }\n\n if ('hour' in value) {\n switch (part) {\n case 'dayPeriod': {\n let hours = value.hour;\n let isPM = hours >= 12;\n return value.set({hour: isPM ? hours - 12 : hours + 12});\n }\n case 'hour':\n case 'minute':\n case 'second':\n return value.cycle(part, amount, {\n round: part !== 'hour',\n hourCycle: options.hour12 ? 12 : 24\n });\n }\n }\n}\n\nfunction setSegment(value: DateValue, part: string, segmentValue: number, options: Intl.ResolvedDateTimeFormatOptions) {\n switch (part) {\n case 'day':\n case 'month':\n case 'year':\n case 'era':\n return value.set({[part]: segmentValue});\n }\n\n if ('hour' in value) {\n switch (part) {\n case 'dayPeriod': {\n let hours = value.hour;\n let wasPM = hours >= 12;\n let isPM = segmentValue >= 12;\n if (isPM === wasPM) {\n return value;\n }\n return value.set({hour: wasPM ? hours - 12 : hours + 12});\n }\n case 'hour':\n // In 12 hour time, ensure that AM/PM does not change\n if (options.hour12) {\n let hours = value.hour;\n let wasPM = hours >= 12;\n if (!wasPM && segmentValue === 12) {\n segmentValue = 0;\n }\n if (wasPM && segmentValue < 12) {\n segmentValue += 12;\n }\n }\n // fallthrough\n case 'minute':\n case 'second':\n return value.set({[part]: segmentValue});\n }\n }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {LocalizedStringDictionary} from '@internationalized/string';\n\n// These placeholders are based on the strings used by the <input type=\"date\">\n// implementations in Chrome and Firefox. Additional languages are supported\n// here than React Spectrum's typical translations.\nconst placeholders = new LocalizedStringDictionary({\n ach: {year: 'mwaka', month: 'dwe', day: 'nino'},\n af: {year: 'jjjj', month: 'mm', day: 'dd'},\n am: {year: 'ዓዓዓዓ', month: 'ሚሜ', day: 'ቀቀ'},\n an: {year: 'aaaa', month: 'mm', day: 'dd'},\n ar: {year: 'سنة', month: 'شهر', day: 'يوم'},\n ast: {year: 'aaaa', month: 'mm', day: 'dd'},\n az: {year: 'iiii', month: 'aa', day: 'gg'},\n be: {year: 'гггг', month: 'мм', day: 'дд'},\n bg: {year: 'гггг', month: 'мм', day: 'дд'},\n bn: {year: 'yyyy', month: 'মিমি', day: 'dd'},\n br: {year: 'bbbb', month: 'mm', day: 'dd'},\n bs: {year: 'gggg', month: 'mm', day: 'dd'},\n ca: {year: 'aaaa', month: 'mm', day: 'dd'},\n cak: {year: 'jjjj', month: 'ii', day: \"q'q'\"},\n ckb: {year: 'ساڵ', month: 'مانگ', day: 'ڕۆژ'},\n cs: {year: 'rrrr', month: 'mm', day: 'dd'},\n cy: {year: 'bbbb', month: 'mm', day: 'dd'},\n da: {year: 'åååå', month: 'mm', day: 'dd'},\n de: {year: 'jjjj', month: 'mm', day: 'tt'},\n dsb: {year: 'llll', month: 'mm', day: 'źź'},\n el: {year: 'εεεε', month: 'μμ', day: 'ηη'},\n en: {year: 'yyyy', month: 'mm', day: 'dd'},\n eo: {year: 'jjjj', month: 'mm', day: 'tt'},\n es: {year: 'aaaa', month: 'mm', day: 'dd'},\n et: {year: 'aaaa', month: 'kk', day: 'pp'},\n eu: {year: 'uuuu', month: 'hh', day: 'ee'},\n fa: {year: 'سال', month: 'ماه', day: 'روز'},\n ff: {year: 'hhhh', month: 'll', day: 'ññ'},\n fi: {year: 'vvvv', month: 'kk', day: 'pp'},\n fr: {year: 'aaaa', month: 'mm', day: 'jj'},\n fy: {year: 'jjjj', month: 'mm', day: 'dd'},\n ga: {year: 'bbbb', month: 'mm', day: 'll'},\n gd: {year: 'bbbb', month: 'mm', day: 'll'},\n gl: {year: 'aaaa', month: 'mm', day: 'dd'},\n he: {year: 'שנה', month: 'חודש', day: 'יום'},\n hr: {year: 'gggg', month: 'mm', day: 'dd'},\n hsb: {year: 'llll', month: 'mm', day: 'dd'},\n hu: {year: 'éééé', month: 'hh', day: 'nn'},\n ia: {year: 'aaaa', month: 'mm', day: 'dd'},\n id: {year: 'tttt', month: 'bb', day: 'hh'},\n it: {year: 'aaaa', month: 'mm', day: 'gg'},\n ja: {year: ' 年 ', month: '月', day: '日'},\n ka: {year: 'წწწწ', month: 'თთ', day: 'რრ'},\n kk: {year: 'жжжж', month: 'аа', day: 'кк'},\n kn: {year: 'ವವವವ', month: 'ಮಿಮೀ', day: 'ದಿದಿ'},\n ko: {year: '연도', month: '월', day: '일'},\n lb: {year: 'jjjj', month: 'mm', day: 'dd'},\n lo: {year: 'ປປປປ', month: 'ດດ', day: 'ວວ'},\n lt: {year: 'mmmm', month: 'mm', day: 'dd'},\n lv: {year: 'gggg', month: 'mm', day: 'dd'},\n meh: {year: 'aaaa', month: 'mm', day: 'dd'},\n ml: {year: 'വർഷം', month: 'മാസം', day: 'തീയതി'},\n ms: {year: 'tttt', month: 'mm', day: 'hh'},\n nl: {year: 'jjjj', month: 'mm', day: 'dd'},\n nn: {year: 'åååå', month: 'mm', day: 'dd'},\n no: {year: 'åååå', month: 'mm', day: 'dd'},\n oc: {year: 'aaaa', month: 'mm', day: 'jj'},\n pl: {year: 'rrrr', month: 'mm', day: 'dd'},\n pt: {year: 'aaaa', month: 'mm', day: 'dd'},\n rm: {year: 'oooo', month: 'mm', day: 'dd'},\n ro: {year: 'aaaa', month: 'll', day: 'zz'},\n ru: {year: 'гггг', month: 'мм', day: 'дд'},\n sc: {year: 'aaaa', month: 'mm', day: 'dd'},\n scn: {year: 'aaaa', month: 'mm', day: 'jj'},\n sk: {year: 'rrrr', month: 'mm', day: 'dd'},\n sl: {year: 'llll', month: 'mm', day: 'dd'},\n sr: {year: 'гггг', month: 'мм', day: 'дд'},\n sv: {year: 'åååå', month: 'mm', day: 'dd'},\n szl: {year: 'rrrr', month: 'mm', day: 'dd'},\n tg: {year: 'сссс', month: 'мм', day: 'рр'},\n th: {year: 'ปปปป', month: 'ดด', day: 'วว'},\n tr: {year: 'yyyy', month: 'aa', day: 'gg'},\n uk: {year: 'рррр', month: 'мм', day: 'дд'},\n 'zh-CN': {year: '年', month: '月', day: '日'},\n 'zh-TW': {year: '年', month: '月', day: '日'}\n}, 'en');\n\nexport function getPlaceholder(field: string, value: string, locale: string) {\n // Use the actual placeholder value for the era and day period fields.\n if (field === 'era' || field === 'dayPeriod') {\n return value;\n }\n\n if (field === 'year' || field === 'month' || field === 'day') {\n return placeholders.getStringForLocale(field, locale);\n }\n\n // For time fields (e.g. hour, minute, etc.), use two dashes as the placeholder.\n return '––';\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DateFormatter, toCalendarDate, toCalendarDateTime} from '@internationalized/date';\nimport {DateRange, DateRangePickerProps, DateValue, Granularity, TimeValue} from '@react-types/datepicker';\nimport {FieldOptions, getFormatOptions, getPlaceholderTime, isInvalid, useDefaultProps} from './utils';\nimport {OverlayTriggerState, useOverlayTriggerState} from '@react-stately/overlays';\nimport {RangeValue, ValidationState} from '@react-types/shared';\nimport {useControlledState} from '@react-stately/utils';\nimport {useState} from 'react';\n\nexport interface DateRangePickerStateOptions extends DateRangePickerProps<DateValue> {\n /**\n * Determines whether the date picker popover should close automatically when a date is selected.\n * @default true\n */\n shouldCloseOnSelect?: boolean | (() => boolean)\n}\n\ntype TimeRange = RangeValue<TimeValue>;\nexport interface DateRangePickerState extends OverlayTriggerState {\n /** The currently selected date range. */\n value: DateRange,\n /** Sets the selected date range. */\n setValue(value: DateRange): void,\n /**\n * The date portion of the selected range. This may be set prior to `value` if the user has\n * selected a date range but has not yet selected a time range.\n */\n dateRange: DateRange,\n /** Sets the date portion of the selected range. */\n setDateRange(value: DateRange): void,\n /**\n * The time portion of the selected range. This may be set prior to `value` if the user has\n * selected a time range but has not yet selected a date range.\n */\n timeRange: TimeRange,\n /** Sets the time portion of the selected range. */\n setTimeRange(value: TimeRange): void,\n /** Sets the date portion of either the start or end of the selected range. */\n setDate(part: 'start' | 'end', value: DateValue): void,\n /** Sets the time portion of either the start or end of the selected range. */\n setTime(part: 'start' | 'end', value: TimeValue): void,\n /** Sets the date and time of either the start or end of the selected range. */\n setDateTime(part: 'start' | 'end', value: DateValue): void,\n /** The granularity for the field, based on the `granularity` prop and current value. */\n granularity: Granularity,\n /** Whether the date range picker supports selecting times, according to the `granularity` prop and current value. */\n hasTime: boolean,\n /** Whether the calendar popover is currently open. */\n isOpen: boolean,\n /** Sets whether the calendar popover is open. */\n setOpen(isOpen: boolean): void,\n /** The current validation state of the date picker, based on the `validationState`, `minValue`, and `maxValue` props. */\n validationState: ValidationState,\n /** Formats the selected range using the given options. */\n formatValue(locale: string, fieldOptions: FieldOptions): {start: string, end: string},\n /** Whether the date range picker is currently focused. */\n readonly isFocused: boolean,\n /** Sets whether the date range picker is focused. */\n setFocused(isFocused: boolean): void\n}\n\n/**\n * Provides state management for a date range picker component.\n * A date range picker combines two DateFields and a RangeCalendar popover to allow\n * users to enter or select a date and time range.\n */\nexport function useDateRangePickerState(props: DateRangePickerStateOptions): DateRangePickerState {\n let overlayState = useOverlayTriggerState(props);\n let [controlledValue, setControlledValue] = useControlledState<DateRange>(props.value, props.defaultValue || null, props.onChange);\n let [placeholderValue, setPlaceholderValue] = useState(() => controlledValue || {start: null, end: null});\n\n let [isFocused, setFocused] = useState(false);\n\n // Reset the placeholder if the value prop is set to null.\n if (controlledValue == null && placeholderValue.start && placeholderValue.end) {\n placeholderValue = {start: null, end: null};\n setPlaceholderValue(placeholderValue);\n }\n\n let value = controlledValue || placeholderValue;\n\n let setValue = (value: DateRange) => {\n setPlaceholderValue(value);\n if (value?.start && value.end) {\n setControlledValue(value);\n } else {\n setControlledValue(null);\n }\n };\n\n let v = (value?.start || value?.end || props.placeholderValue);\n let [granularity] = useDefaultProps(v, props.granularity);\n let hasTime = granularity === 'hour' || granularity === 'minute' || granularity === 'second';\n let shouldCloseOnSelect = props.shouldCloseOnSelect ?? true;\n\n let [dateRange, setSelectedDateRange] = useState<DateRange>(null);\n let [timeRange, setSelectedTimeRange] = useState<TimeRange>(null);\n\n if (value && value.start && value.end) {\n dateRange = value;\n if ('hour' in value.start) {\n timeRange = value as TimeRange;\n }\n }\n\n let commitValue = (dateRange: DateRange, timeRange: TimeRange) => {\n setValue({\n start: 'timeZone' in timeRange.start ? timeRange.start.set(toCalendarDate(dateRange.start)) : toCalendarDateTime(dateRange.start, timeRange.start),\n end: 'timeZone' in timeRange.end ? timeRange.end.set(toCalendarDate(dateRange.end)) : toCalendarDateTime(dateRange.end, timeRange.end)\n });\n };\n\n // Intercept setValue to make sure the Time section is not changed by date selection in Calendar\n let setDateRange = (range: DateRange) => {\n let shouldClose = typeof shouldCloseOnSelect === 'function' ? shouldCloseOnSelect() : shouldCloseOnSelect;\n if (hasTime) {\n if (shouldClose || (range.start && range.end && timeRange?.start && timeRange?.end)) {\n commitValue(range, {\n start: timeRange?.start || getPlaceholderTime(props.placeholderValue),\n end: timeRange?.end || getPlaceholderTime(props.placeholderValue)\n });\n } else {\n setSelectedDateRange(range);\n }\n } else if (range.start && range.end) {\n setValue(range);\n } else {\n setSelectedDateRange(range);\n }\n\n if (shouldClose) {\n overlayState.setOpen(false);\n }\n };\n\n let setTimeRange = (range: TimeRange) => {\n if (dateRange?.start && dateRange?.end && range.start && range.end) {\n commitValue(dateRange, range);\n } else {\n setSelectedTimeRange(range);\n }\n };\n\n let validationState: ValidationState = props.validationState\n || (value != null && (\n isInvalid(value.start, props.minValue, props.maxValue) ||\n isInvalid(value.end, props.minValue, props.maxValue) ||\n (value.end != null && value.start != null && value.end.compare(value.start) < 0) ||\n (value?.start && props.isDateUnavailable?.(value.start)) ||\n (value?.end && props.isDateUnavailable?.(value.end))\n ) ? 'invalid' : null);\n\n return {\n value,\n setValue,\n dateRange,\n timeRange,\n granularity,\n hasTime,\n setDate(part, date) {\n setDateRange({...dateRange, [part]: date});\n },\n setTime(part, time) {\n setTimeRange({...timeRange, [part]: time});\n },\n setDateTime(part, dateTime) {\n setValue({...value, [part]: dateTime});\n },\n setDateRange,\n setTimeRange,\n ...overlayState,\n setOpen(isOpen) {\n // Commit the selected date range when the calendar is closed. Use a placeholder time if one wasn't set.\n // If only the time range was set and not the date range, don't commit. The state will be preserved until\n // the user opens the popover again.\n if (!isOpen && !(value?.start && value?.end) && dateRange?.start && dateRange?.end && hasTime) {\n commitValue(dateRange, {\n start: timeRange?.start || getPlaceholderTime(props.placeholderValue),\n end: timeRange?.end || getPlaceholderTime(props.placeholderValue)\n });\n }\n\n overlayState.setOpen(isOpen);\n },\n validationState,\n formatValue(locale, fieldOptions) {\n if (!value || !value.start || !value.end) {\n return null;\n }\n\n let startTimeZone = 'timeZone' in value.start ? value.start.timeZone : undefined;\n let startGranularity = props.granularity || (value.start && 'minute' in value.start ? 'minute' : 'day');\n let endTimeZone = 'timeZone' in value.end ? value.end.timeZone : undefined;\n let endGranularity = props.granularity || (value.end && 'minute' in value.end ? 'minute' : 'day');\n\n let startOptions = getFormatOptions(fieldOptions, {\n granularity: startGranularity,\n timeZone: startTimeZone,\n hideTimeZone: props.hideTimeZone,\n hourCycle: props.hourCycle,\n showEra: (value.start.calendar.identifier === 'gregory' && value.start.era === 'BC') ||\n (value.end.calendar.identifier === 'gregory' && value.end.era === 'BC')\n });\n\n let startDate = value.start.toDate(startTimeZone || 'UTC');\n let endDate = value.end.toDate(endTimeZone || 'UTC');\n\n let startFormatter = new DateFormatter(locale, startOptions);\n let endFormatter: Intl.DateTimeFormat;\n if (startTimeZone === endTimeZone && startGranularity === endGranularity && value.start.compare(value.end) !== 0) {\n // Use formatRange, as it results in shorter output when some of the fields\n // are shared between the start and end dates (e.g. the same month).\n // Formatting will fail if the end date is before the start date. Fall back below when that happens.\n try {\n let parts = startFormatter.formatRangeToParts(startDate, endDate);\n\n // Find the separator between the start and end date. This is determined\n // by finding the last shared literal before the end range.\n let separatorIndex = -1;\n for (let i = 0; i < parts.length; i++) {\n let part = parts[i];\n if (part.source === 'shared' && part.type === 'literal') {\n separatorIndex = i;\n } else if (part.source === 'endRange') {\n break;\n }\n }\n\n // Now we can combine the parts into start and end strings.\n let start = '';\n let end = '';\n for (let i = 0; i < parts.length; i++) {\n if (i < separatorIndex) {\n start += parts[i].value;\n } else if (i > separatorIndex) {\n end += parts[i].value;\n }\n }\n\n return {start, end};\n } catch (e) {\n // ignore\n }\n\n endFormatter = startFormatter;\n } else {\n let endOptions = getFormatOptions(fieldOptions, {\n granularity: endGranularity,\n timeZone: endTimeZone,\n hideTimeZone: props.hideTimeZone,\n hourCycle: props.hourCycle\n });\n\n endFormatter = new DateFormatter(locale, endOptions);\n }\n\n return {\n start: startFormatter.format(startDate),\n end: endFormatter.format(endDate)\n };\n },\n isFocused,\n setFocused\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the 'License');\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DateFieldState, useDateFieldState} from '.';\nimport {DateValue, TimePickerProps, TimeValue} from '@react-types/datepicker';\nimport {getLocalTimeZone, GregorianCalendar, Time, toCalendarDateTime, today, toTime} from '@internationalized/date';\nimport {useControlledState} from '@react-stately/utils';\nimport {useMemo} from 'react';\n\nexport interface TimeFieldStateOptions extends TimePickerProps<TimeValue> {\n /** The locale to display and edit the value according to. */\n locale: string\n}\n\n/**\n * Provides state management for a time field component.\n * A time field allows users to enter and edit time values using a keyboard.\n * Each part of a time value is displayed in an individually editable segment.\n */\nexport function useTimeFieldState(props: TimeFieldStateOptions): DateFieldState {\n let {\n placeholderValue = new Time(),\n minValue,\n maxValue,\n granularity\n } = props;\n\n let [value, setValue] = useControlledState<TimeValue>(\n props.value,\n props.defaultValue,\n props.onChange\n );\n\n let v = value || placeholderValue;\n let day = v && 'day' in v ? v : undefined;\n let placeholderDate = useMemo(() => convertValue(placeholderValue), [placeholderValue]);\n let minDate = useMemo(() => convertValue(minValue, day), [minValue, day]);\n let maxDate = useMemo(() => convertValue(maxValue, day), [maxValue, day]);\n\n let dateTime = useMemo(() => value == null ? null : convertValue(value), [value]);\n let onChange = newValue => {\n setValue(v && 'day' in v ? newValue : newValue && toTime(newValue));\n };\n\n return useDateFieldState({\n ...props,\n value: dateTime,\n defaultValue: undefined,\n minValue: minDate,\n maxValue: maxDate,\n onChange,\n granularity: granularity || 'minute',\n maxGranularity: 'hour',\n placeholderValue: placeholderDate,\n // Calendar should not matter for time fields.\n createCalendar: () => new GregorianCalendar()\n });\n}\n\nfunction convertValue(value: TimeValue, date: DateValue = today(getLocalTimeZone())) {\n if (!value) {\n return null;\n }\n\n if ('day' in value) {\n return value;\n }\n\n return toCalendarDateTime(date, value);\n}\n"],"names":[],"version":3,"file":"module.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;SEgBgB,yCAAS,CAAC,KAAgB,EAAE,QAAmB,EAAE,QAAmB,EAAE,CAAC;IACrF,MAAM,CAAC,KAAK,IAAI,IAAI,KACjB,QAAQ,IAAI,IAAI,IAAI,KAAK,CAAC,OA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AgB,EAAE,IAAe,GAAG,YAAK,CAAC,uBAAgB,KAAK,CAAC;IACpF,EAAE,GAAG,KAAK,EACR,MAAM,CAAC,IAAI;IAGb,EAAE,EAAE,CAAK,QAAI,KAAK,EAChB,MAAM,CAAC,KAAK;IAGd,MAAM,CAAC,yBAAkB,CAAC,IAAI,EAAE,KAAK;AACvC,CAAC;;","sources":["packages/@react-stately/datepicker/src/index.ts","packages/@react-stately/datepicker/src/useDatePickerState.ts","packages/@react-stately/datepicker/src/utils.ts","packages/@react-stately/datepicker/src/useDateFieldState.ts","packages/@react-stately/datepicker/src/placeholders.ts","packages/@react-stately/datepicker/src/useDateRangePickerState.ts","packages/@react-stately/datepicker/src/useTimeFieldState.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {useDatePickerState} from './useDatePickerState';\nexport {useDateFieldState} from './useDateFieldState';\nexport {useDateRangePickerState} from './useDateRangePickerState';\nexport {useTimeFieldState} from './useTimeFieldState';\n\nexport type {DateFieldStateOptions, DateFieldState, DateSegment, SegmentType} from './useDateFieldState';\nexport type {DatePickerStateOptions, DatePickerState} from './useDatePickerState';\nexport type {DateRangePickerStateOptions, DateRangePickerState} from './useDateRangePickerState';\nexport type {TimeFieldStateOptions} from './useTimeFieldState';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarDate, DateFormatter, toCalendarDate, toCalendarDateTime} from '@internationalized/date';\nimport {DatePickerProps, DateValue, Granularity, TimeValue} from '@react-types/datepicker';\nimport {FieldOptions, getFormatOptions, getPlaceholderTime, useDefaultProps} from './utils';\nimport {isInvalid} from './utils';\nimport {OverlayTriggerState, useOverlayTriggerState} from '@react-stately/overlays';\nimport {useControlledState} from '@react-stately/utils';\nimport {useState} from 'react';\nimport {ValidationState} from '@react-types/shared';\n\nexport interface DatePickerStateOptions<T extends DateValue> extends DatePickerProps<T> {\n /**\n * Determines whether the date picker popover should close automatically when a date is selected.\n * @default true\n */\n shouldCloseOnSelect?: boolean | (() => boolean)\n}\n\nexport interface DatePickerState extends OverlayTriggerState {\n /** The currently selected date. */\n value: DateValue,\n /** Sets the selected date. */\n setValue(value: DateValue): void,\n /**\n * The date portion of the value. This may be set prior to `value` if the user has\n * selected a date but has not yet selected a time.\n */\n dateValue: DateValue,\n /** Sets the date portion of the value. */\n setDateValue(value: CalendarDate): void,\n /**\n * The time portion of the value. This may be set prior to `value` if the user has\n * selected a time but has not yet selected a date.\n */\n timeValue: TimeValue,\n /** Sets the time portion of the value. */\n setTimeValue(value: TimeValue): void,\n /** The granularity for the field, based on the `granularity` prop and current value. */\n granularity: Granularity,\n /** Whether the date picker supports selecting a time, according to the `granularity` prop and current value. */\n hasTime: boolean,\n /** Whether the calendar popover is currently open. */\n isOpen: boolean,\n /** Sets whether the calendar popover is open. */\n setOpen(isOpen: boolean): void,\n /** The current validation state of the date picker, based on the `validationState`, `minValue`, and `maxValue` props. */\n validationState: ValidationState,\n /** Formats the selected value using the given options. */\n formatValue(locale: string, fieldOptions: FieldOptions): string\n}\n\n/**\n * Provides state management for a date picker component.\n * A date picker combines a DateField and a Calendar popover to allow users to enter or select a date and time value.\n */\nexport function useDatePickerState<T extends DateValue = DateValue>(props: DatePickerStateOptions<T>): DatePickerState {\n let overlayState = useOverlayTriggerState(props);\n let [value, setValue] = useControlledState<DateValue>(props.value, props.defaultValue || null, props.onChange);\n\n let v = (value || props.placeholderValue);\n let [granularity, defaultTimeZone] = useDefaultProps(v, props.granularity);\n let dateValue = value != null ? value.toDate(defaultTimeZone ?? 'UTC') : null;\n let hasTime = granularity === 'hour' || granularity === 'minute' || granularity === 'second';\n let shouldCloseOnSelect = props.shouldCloseOnSelect ?? true;\n\n let [selectedDate, setSelectedDate] = useState<DateValue>(null);\n let [selectedTime, setSelectedTime] = useState<TimeValue>(null);\n\n if (value) {\n selectedDate = value;\n if ('hour' in value) {\n selectedTime = value;\n }\n }\n\n // props.granularity must actually exist in the value if one is provided.\n if (v && !(granularity in v)) {\n throw new Error('Invalid granularity ' + granularity + ' for value ' + v.toString());\n }\n\n let commitValue = (date: DateValue, time: TimeValue) => {\n setValue('timeZone' in time ? time.set(toCalendarDate(date)) : toCalendarDateTime(date, time));\n };\n\n // Intercept setValue to make sure the Time section is not changed by date selection in Calendar\n let selectDate = (newValue: CalendarDate) => {\n let shouldClose = typeof shouldCloseOnSelect === 'function' ? shouldCloseOnSelect() : shouldCloseOnSelect;\n if (hasTime) {\n if (selectedTime || shouldClose) {\n commitValue(newValue, selectedTime || getPlaceholderTime(props.placeholderValue));\n } else {\n setSelectedDate(newValue);\n }\n } else {\n setValue(newValue);\n }\n\n if (shouldClose) {\n overlayState.setOpen(false);\n }\n };\n\n let selectTime = (newValue: TimeValue) => {\n if (selectedDate) {\n commitValue(selectedDate, newValue);\n } else {\n setSelectedTime(newValue);\n }\n };\n\n let validationState: ValidationState = props.validationState ||\n (isInvalid(value, props.minValue, props.maxValue) ? 'invalid' : null) ||\n (value && props.isDateUnavailable?.(value) ? 'invalid' : null);\n\n return {\n value,\n setValue,\n dateValue: selectedDate,\n timeValue: selectedTime,\n setDateValue: selectDate,\n setTimeValue: selectTime,\n granularity,\n hasTime,\n ...overlayState,\n setOpen(isOpen) {\n // Commit the selected date when the calendar is closed. Use a placeholder time if one wasn't set.\n // If only the time was set and not the date, don't commit. The state will be preserved until\n // the user opens the popover again.\n if (!isOpen && !value && selectedDate && hasTime) {\n commitValue(selectedDate, selectedTime || getPlaceholderTime(props.placeholderValue));\n }\n\n overlayState.setOpen(isOpen);\n },\n validationState,\n formatValue(locale, fieldOptions) {\n if (!dateValue) {\n return '';\n }\n\n let formatOptions = getFormatOptions(fieldOptions, {\n granularity,\n timeZone: defaultTimeZone,\n hideTimeZone: props.hideTimeZone,\n hourCycle: props.hourCycle,\n showEra: value.calendar.identifier === 'gregory' && value.era === 'BC'\n });\n\n let formatter = new DateFormatter(locale, formatOptions);\n return formatter.format(dateValue);\n }\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Calendar, now, Time, toCalendar, toCalendarDate, toCalendarDateTime} from '@internationalized/date';\nimport {DatePickerProps, DateValue, Granularity, TimeValue} from '@react-types/datepicker';\nimport {useRef} from 'react';\n\nexport function isInvalid(value: DateValue, minValue: DateValue, maxValue: DateValue) {\n return value != null && (\n (minValue != null && value.compare(minValue) < 0) ||\n (maxValue != null && value.compare(maxValue) > 0)\n );\n}\n\nexport type FieldOptions = Pick<Intl.DateTimeFormatOptions, 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second'>;\ninterface FormatterOptions {\n timeZone?: string,\n hideTimeZone?: boolean,\n granularity?: DatePickerProps<any>['granularity'],\n maxGranularity?: 'year' | 'month' | DatePickerProps<any>['granularity'],\n hourCycle?: 12 | 24,\n showEra?: boolean\n}\n\nconst DEFAULT_FIELD_OPTIONS: FieldOptions = {\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n hour: 'numeric',\n minute: '2-digit',\n second: '2-digit'\n};\n\nexport function getFormatOptions(\n fieldOptions: FieldOptions,\n options: FormatterOptions\n): Intl.DateTimeFormatOptions {\n fieldOptions = {...DEFAULT_FIELD_OPTIONS, ...fieldOptions};\n let granularity = options.granularity || 'minute';\n let keys = Object.keys(fieldOptions);\n let startIdx = keys.indexOf(options.maxGranularity ?? 'year');\n if (startIdx < 0) {\n startIdx = 0;\n }\n\n let endIdx = keys.indexOf(granularity);\n if (endIdx < 0) {\n endIdx = 2;\n }\n\n if (startIdx > endIdx) {\n throw new Error('maxGranularity must be greater than granularity');\n }\n\n let opts: Intl.DateTimeFormatOptions = keys.slice(startIdx, endIdx + 1).reduce((opts, key) => {\n opts[key] = fieldOptions[key];\n return opts;\n }, {});\n\n if (options.hourCycle != null) {\n opts.hour12 = options.hourCycle === 12;\n }\n\n opts.timeZone = options.timeZone || 'UTC';\n\n let hasTime = granularity === 'hour' || granularity === 'minute' || granularity === 'second';\n if (hasTime && options.timeZone && !options.hideTimeZone) {\n opts.timeZoneName = 'short';\n }\n\n if (options.showEra && startIdx === 0) {\n opts.era = 'short';\n }\n\n return opts;\n}\n\nexport function getPlaceholderTime(placeholderValue: DateValue): TimeValue {\n if (placeholderValue && 'hour' in placeholderValue) {\n return placeholderValue;\n }\n\n return new Time();\n}\n\nexport function convertValue(value: DateValue, calendar: Calendar): DateValue {\n if (value === null) {\n return null;\n }\n\n if (!value) {\n return undefined;\n }\n\n return toCalendar(value, calendar);\n}\n\n\nexport function createPlaceholderDate(placeholderValue: DateValue, granularity: string, calendar: Calendar, timeZone: string) {\n if (placeholderValue) {\n return convertValue(placeholderValue, calendar);\n }\n\n let date = toCalendar(now(timeZone).set({\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0\n }), calendar);\n\n if (granularity === 'year' || granularity === 'month' || granularity === 'day') {\n return toCalendarDate(date);\n }\n\n if (!timeZone) {\n return toCalendarDateTime(date);\n }\n\n return date;\n}\n\nexport function useDefaultProps(v: DateValue, granularity: Granularity): [Granularity, string] {\n // Compute default granularity and time zone from the value. If the value becomes null, keep the last values.\n let lastValue = useRef(v);\n if (v) {\n lastValue.current = v;\n }\n\n v = lastValue.current;\n let defaultTimeZone = (v && 'timeZone' in v ? v.timeZone : undefined);\n granularity = granularity || (v && 'minute' in v ? 'minute' : 'day');\n\n // props.granularity must actually exist in the value if one is provided.\n if (v && !(granularity in v)) {\n throw new Error('Invalid granularity ' + granularity + ' for value ' + v.toString());\n }\n\n return [granularity, defaultTimeZone];\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Calendar, DateFormatter, getMinimumDayInMonth, getMinimumMonthInYear, GregorianCalendar, toCalendar} from '@internationalized/date';\nimport {convertValue, createPlaceholderDate, FieldOptions, getFormatOptions, isInvalid, useDefaultProps} from './utils';\nimport {DatePickerProps, DateValue, Granularity} from '@react-types/datepicker';\nimport {getPlaceholder} from './placeholders';\nimport {useControlledState} from '@react-stately/utils';\nimport {useEffect, useMemo, useRef, useState} from 'react';\nimport {ValidationState} from '@react-types/shared';\n\nexport type SegmentType = 'era' | 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second' | 'dayPeriod' | 'literal' | 'timeZoneName';\nexport interface DateSegment {\n /** The type of segment. */\n type: SegmentType,\n /** The formatted text for the segment. */\n text: string,\n /** The numeric value for the segment, if applicable. */\n value?: number,\n /** The minimum numeric value for the segment, if applicable. */\n minValue?: number,\n /** The maximum numeric value for the segment, if applicable. */\n maxValue?: number,\n /** Whether the value is a placeholder. */\n isPlaceholder: boolean,\n /** A placeholder string for the segment. */\n placeholder: string,\n /** Whether the segment is editable. */\n isEditable: boolean\n}\n\nexport interface DateFieldState {\n /** The current field value. */\n value: DateValue,\n /** The current value, converted to a native JavaScript `Date` object. */\n dateValue: Date,\n /** The calendar system currently in use. */\n calendar: Calendar,\n /** Sets the field's value. */\n setValue(value: DateValue): void,\n /** A list of segments for the current value. */\n segments: DateSegment[],\n /** A date formatter configured for the current locale and format. */\n dateFormatter: DateFormatter,\n /** The current validation state of the date field, based on the `validationState`, `minValue`, and `maxValue` props. */\n validationState: ValidationState,\n /** The granularity for the field, based on the `granularity` prop and current value. */\n granularity: Granularity,\n /** The maximum date or time unit that is displayed in the field. */\n maxGranularity: 'year' | 'month' | Granularity,\n /** Whether the field is disabled. */\n isDisabled: boolean,\n /** Whether the field is read only. */\n isReadOnly: boolean,\n /** Whether the field is required. */\n isRequired: boolean,\n /** Increments the given segment. Upon reaching the minimum or maximum value, the value wraps around to the opposite limit. */\n increment(type: SegmentType): void,\n /** Decrements the given segment. Upon reaching the minimum or maximum value, the value wraps around to the opposite limit. */\n decrement(type: SegmentType): void,\n /**\n * Increments the given segment by a larger amount, rounding it to the nearest increment.\n * The amount to increment by depends on the field, for example 15 minutes, 7 days, and 5 years.\n * Upon reaching the minimum or maximum value, the value wraps around to the opposite limit.\n */\n incrementPage(type: SegmentType): void,\n /**\n * Decrements the given segment by a larger amount, rounding it to the nearest increment.\n * The amount to decrement by depends on the field, for example 15 minutes, 7 days, and 5 years.\n * Upon reaching the minimum or maximum value, the value wraps around to the opposite limit.\n */\n decrementPage(type: SegmentType): void,\n /** Sets the value of the given segment. */\n setSegment(type: 'era', value: string): void,\n setSegment(type: SegmentType, value: number): void,\n /** Updates the remaining unfilled segments with the placeholder value. */\n confirmPlaceholder(): void,\n /** Clears the value of the given segment, reverting it to the placeholder. */\n clearSegment(type: SegmentType): void,\n /** Formats the current date value using the given options. */\n formatValue(fieldOptions: FieldOptions): string\n}\n\nconst EDITABLE_SEGMENTS = {\n year: true,\n month: true,\n day: true,\n hour: true,\n minute: true,\n second: true,\n dayPeriod: true,\n era: true\n};\n\nconst PAGE_STEP = {\n year: 5,\n month: 2,\n day: 7,\n hour: 2,\n minute: 15,\n second: 15\n};\n\n// Node seems to convert everything to lowercase...\nconst TYPE_MAPPING = {\n dayperiod: 'dayPeriod'\n};\n\nexport interface DateFieldStateOptions extends DatePickerProps<DateValue> {\n /**\n * The maximum unit to display in the date field.\n * @default 'year'\n */\n maxGranularity?: 'year' | 'month' | Granularity,\n /** The locale to display and edit the value according to. */\n locale: string,\n /**\n * A function that creates a [Calendar](../internationalized/date/Calendar.html)\n * object for a given calendar identifier. Such a function may be imported from the\n * `@internationalized/date` package, or manually implemented to include support for\n * only certain calendars.\n */\n createCalendar: (name: string) => Calendar\n}\n\n/**\n * Provides state management for a date field component.\n * A date field allows users to enter and edit date and time values using a keyboard.\n * Each part of a date value is displayed in an individually editable segment.\n */\nexport function useDateFieldState(props: DateFieldStateOptions): DateFieldState {\n let {\n locale,\n createCalendar,\n hideTimeZone,\n isDisabled,\n isReadOnly,\n isRequired\n } = props;\n\n let v: DateValue = (props.value || props.defaultValue || props.placeholderValue);\n let [granularity, defaultTimeZone] = useDefaultProps(v, props.granularity);\n let timeZone = defaultTimeZone || 'UTC';\n\n // props.granularity must actually exist in the value if one is provided.\n if (v && !(granularity in v)) {\n throw new Error('Invalid granularity ' + granularity + ' for value ' + v.toString());\n }\n\n let defaultFormatter = useMemo(() => new DateFormatter(locale), [locale]);\n let calendar = useMemo(() => createCalendar(defaultFormatter.resolvedOptions().calendar), [createCalendar, defaultFormatter]);\n\n let [value, setDate] = useControlledState<DateValue>(\n props.value,\n props.defaultValue,\n props.onChange\n );\n\n let calendarValue = useMemo(() => convertValue(value, calendar), [value, calendar]);\n\n // We keep track of the placeholder date separately in state so that onChange is not called\n // until all segments are set. If the value === null (not undefined), then assume the component\n // is controlled, so use the placeholder as the value until all segments are entered so it doesn't\n // change from uncontrolled to controlled and emit a warning.\n let [placeholderDate, setPlaceholderDate] = useState(\n () => createPlaceholderDate(props.placeholderValue, granularity, calendar, defaultTimeZone)\n );\n\n let val = calendarValue || placeholderDate;\n let showEra = calendar.identifier === 'gregory' && val.era === 'BC';\n let formatOpts = useMemo(() => ({\n granularity,\n maxGranularity: props.maxGranularity ?? 'year',\n timeZone: defaultTimeZone,\n hideTimeZone,\n hourCycle: props.hourCycle,\n showEra\n }), [props.maxGranularity, granularity, props.hourCycle, defaultTimeZone, hideTimeZone, showEra]);\n let opts = useMemo(() => getFormatOptions({}, formatOpts), [formatOpts]);\n\n let dateFormatter = useMemo(() => new DateFormatter(locale, opts), [locale, opts]);\n let resolvedOptions = useMemo(() => dateFormatter.resolvedOptions(), [dateFormatter]);\n\n // Determine how many editable segments there are for validation purposes.\n // The result is cached for performance.\n let allSegments: Partial<typeof EDITABLE_SEGMENTS> = useMemo(() =>\n dateFormatter.formatToParts(new Date())\n .filter(seg => EDITABLE_SEGMENTS[seg.type])\n .reduce((p, seg) => (p[seg.type] = true, p), {})\n , [dateFormatter]);\n\n let [validSegments, setValidSegments] = useState<Partial<typeof EDITABLE_SEGMENTS>>(\n () => props.value || props.defaultValue ? {...allSegments} : {}\n );\n\n // Reset placeholder when calendar changes\n let lastCalendarIdentifier = useRef(calendar.identifier);\n useEffect(() => {\n if (calendar.identifier !== lastCalendarIdentifier.current) {\n lastCalendarIdentifier.current = calendar.identifier;\n setPlaceholderDate(placeholder =>\n Object.keys(validSegments).length > 0\n ? toCalendar(placeholder, calendar)\n : createPlaceholderDate(props.placeholderValue, granularity, calendar, defaultTimeZone)\n );\n }\n }, [calendar, granularity, validSegments, defaultTimeZone, props.placeholderValue]);\n\n // If there is a value prop, and some segments were previously placeholders, mark them all as valid.\n if (value && Object.keys(validSegments).length < Object.keys(allSegments).length) {\n validSegments = {...allSegments};\n setValidSegments(validSegments);\n }\n\n // If the value is set to null and all segments are valid, reset the placeholder.\n if (value == null && Object.keys(validSegments).length === Object.keys(allSegments).length) {\n validSegments = {};\n setValidSegments(validSegments);\n setPlaceholderDate(createPlaceholderDate(props.placeholderValue, granularity, calendar, defaultTimeZone));\n }\n\n // If all segments are valid, use the date from state, otherwise use the placeholder date.\n let displayValue = calendarValue && Object.keys(validSegments).length >= Object.keys(allSegments).length ? calendarValue : placeholderDate;\n let setValue = (newValue: DateValue) => {\n if (props.isDisabled || props.isReadOnly) {\n return;\n }\n\n if (Object.keys(validSegments).length >= Object.keys(allSegments).length) {\n // The display calendar should not have any effect on the emitted value.\n // Emit dates in the same calendar as the original value, if any, otherwise gregorian.\n newValue = toCalendar(newValue, v?.calendar || new GregorianCalendar());\n setDate(newValue);\n } else {\n setPlaceholderDate(newValue);\n }\n };\n\n let dateValue = useMemo(() => displayValue.toDate(timeZone), [displayValue, timeZone]);\n let segments = useMemo(() =>\n dateFormatter.formatToParts(dateValue)\n .map(segment => {\n let isEditable = EDITABLE_SEGMENTS[segment.type];\n if (segment.type === 'era' && calendar.getEras().length === 1) {\n isEditable = false;\n }\n\n let isPlaceholder = EDITABLE_SEGMENTS[segment.type] && !validSegments[segment.type];\n let placeholder = EDITABLE_SEGMENTS[segment.type] ? getPlaceholder(segment.type, segment.value, locale) : null;\n return {\n type: TYPE_MAPPING[segment.type] || segment.type,\n text: isPlaceholder ? placeholder : segment.value,\n ...getSegmentLimits(displayValue, segment.type, resolvedOptions),\n isPlaceholder,\n placeholder,\n isEditable\n } as DateSegment;\n })\n , [dateValue, validSegments, dateFormatter, resolvedOptions, displayValue, calendar, locale]);\n\n // When the era field appears, mark it valid if the year field is already valid.\n // If the era field disappears, remove it from the valid segments.\n if (allSegments.era && validSegments.year && !validSegments.era) {\n validSegments.era = true;\n setValidSegments({...validSegments});\n } else if (!allSegments.era && validSegments.era) {\n delete validSegments.era;\n setValidSegments({...validSegments});\n }\n\n let markValid = (part: Intl.DateTimeFormatPartTypes) => {\n validSegments[part] = true;\n if (part === 'year' && allSegments.era) {\n validSegments.era = true;\n }\n setValidSegments({...validSegments});\n };\n\n let adjustSegment = (type: Intl.DateTimeFormatPartTypes, amount: number) => {\n if (!validSegments[type]) {\n markValid(type);\n if (Object.keys(validSegments).length >= Object.keys(allSegments).length) {\n setValue(displayValue);\n }\n } else {\n setValue(addSegment(displayValue, type, amount, resolvedOptions));\n }\n };\n\n let validationState: ValidationState = props.validationState ||\n (isInvalid(calendarValue, props.minValue, props.maxValue) ? 'invalid' : null);\n\n return {\n value: calendarValue,\n dateValue,\n calendar,\n setValue,\n segments,\n dateFormatter,\n validationState,\n granularity,\n maxGranularity: props.maxGranularity ?? 'year',\n isDisabled,\n isReadOnly,\n isRequired,\n increment(part) {\n adjustSegment(part, 1);\n },\n decrement(part) {\n adjustSegment(part, -1);\n },\n incrementPage(part) {\n adjustSegment(part, PAGE_STEP[part] || 1);\n },\n decrementPage(part) {\n adjustSegment(part, -(PAGE_STEP[part] || 1));\n },\n setSegment(part, v) {\n markValid(part);\n setValue(setSegment(displayValue, part, v, resolvedOptions));\n },\n confirmPlaceholder() {\n if (props.isDisabled || props.isReadOnly) {\n return;\n }\n\n // Confirm the placeholder if only the day period is not filled in.\n let validKeys = Object.keys(validSegments);\n let allKeys = Object.keys(allSegments);\n if (validKeys.length === allKeys.length - 1 && allSegments.dayPeriod && !validSegments.dayPeriod) {\n validSegments = {...allSegments};\n setValidSegments(validSegments);\n setValue(displayValue.copy());\n }\n },\n clearSegment(part) {\n delete validSegments[part];\n setValidSegments({...validSegments});\n\n let placeholder = createPlaceholderDate(props.placeholderValue, granularity, calendar, defaultTimeZone);\n let value = displayValue;\n\n // Reset day period to default without changing the hour.\n if (part === 'dayPeriod' && 'hour' in displayValue && 'hour' in placeholder) {\n let isPM = displayValue.hour >= 12;\n let shouldBePM = placeholder.hour >= 12;\n if (isPM && !shouldBePM) {\n value = displayValue.set({hour: displayValue.hour - 12});\n } else if (!isPM && shouldBePM) {\n value = displayValue.set({hour: displayValue.hour + 12});\n }\n } else if (part in displayValue) {\n value = displayValue.set({[part]: placeholder[part]});\n }\n\n setDate(null);\n setValue(value);\n },\n formatValue(fieldOptions: FieldOptions) {\n if (!calendarValue) {\n return '';\n }\n\n let formatOptions = getFormatOptions(fieldOptions, formatOpts);\n let formatter = new DateFormatter(locale, formatOptions);\n return formatter.format(dateValue);\n }\n };\n}\n\nfunction getSegmentLimits(date: DateValue, type: string, options: Intl.ResolvedDateTimeFormatOptions) {\n switch (type) {\n case 'era': {\n let eras = date.calendar.getEras();\n return {\n value: eras.indexOf(date.era),\n minValue: 0,\n maxValue: eras.length - 1\n };\n }\n case 'year':\n return {\n value: date.year,\n minValue: 1,\n maxValue: date.calendar.getYearsInEra(date)\n };\n case 'month':\n return {\n value: date.month,\n minValue: getMinimumMonthInYear(date),\n maxValue: date.calendar.getMonthsInYear(date)\n };\n case 'day':\n return {\n value: date.day,\n minValue: getMinimumDayInMonth(date),\n maxValue: date.calendar.getDaysInMonth(date)\n };\n }\n\n if ('hour' in date) {\n switch (type) {\n case 'dayPeriod':\n return {\n value: date.hour >= 12 ? 12 : 0,\n minValue: 0,\n maxValue: 12\n };\n case 'hour':\n if (options.hour12) {\n let isPM = date.hour >= 12;\n return {\n value: date.hour,\n minValue: isPM ? 12 : 0,\n maxValue: isPM ? 23 : 11\n };\n }\n\n return {\n value: date.hour,\n minValue: 0,\n maxValue: 23\n };\n case 'minute':\n return {\n value: date.minute,\n minValue: 0,\n maxValue: 59\n };\n case 'second':\n return {\n value: date.second,\n minValue: 0,\n maxValue: 59\n };\n }\n }\n\n return {};\n}\n\nfunction addSegment(value: DateValue, part: string, amount: number, options: Intl.ResolvedDateTimeFormatOptions) {\n switch (part) {\n case 'era':\n case 'year':\n case 'month':\n case 'day':\n return value.cycle(part, amount, {round: part === 'year'});\n }\n\n if ('hour' in value) {\n switch (part) {\n case 'dayPeriod': {\n let hours = value.hour;\n let isPM = hours >= 12;\n return value.set({hour: isPM ? hours - 12 : hours + 12});\n }\n case 'hour':\n case 'minute':\n case 'second':\n return value.cycle(part, amount, {\n round: part !== 'hour',\n hourCycle: options.hour12 ? 12 : 24\n });\n }\n }\n}\n\nfunction setSegment(value: DateValue, part: string, segmentValue: number, options: Intl.ResolvedDateTimeFormatOptions) {\n switch (part) {\n case 'day':\n case 'month':\n case 'year':\n case 'era':\n return value.set({[part]: segmentValue});\n }\n\n if ('hour' in value) {\n switch (part) {\n case 'dayPeriod': {\n let hours = value.hour;\n let wasPM = hours >= 12;\n let isPM = segmentValue >= 12;\n if (isPM === wasPM) {\n return value;\n }\n return value.set({hour: wasPM ? hours - 12 : hours + 12});\n }\n case 'hour':\n // In 12 hour time, ensure that AM/PM does not change\n if (options.hour12) {\n let hours = value.hour;\n let wasPM = hours >= 12;\n if (!wasPM && segmentValue === 12) {\n segmentValue = 0;\n }\n if (wasPM && segmentValue < 12) {\n segmentValue += 12;\n }\n }\n // fallthrough\n case 'minute':\n case 'second':\n return value.set({[part]: segmentValue});\n }\n }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {LocalizedStringDictionary} from '@internationalized/string';\n\n// These placeholders are based on the strings used by the <input type=\"date\">\n// implementations in Chrome and Firefox. Additional languages are supported\n// here than React Spectrum's typical translations.\nconst placeholders = new LocalizedStringDictionary({\n ach: {year: 'mwaka', month: 'dwe', day: 'nino'},\n af: {year: 'jjjj', month: 'mm', day: 'dd'},\n am: {year: 'ዓዓዓዓ', month: 'ሚሜ', day: 'ቀቀ'},\n an: {year: 'aaaa', month: 'mm', day: 'dd'},\n ar: {year: 'سنة', month: 'شهر', day: 'يوم'},\n ast: {year: 'aaaa', month: 'mm', day: 'dd'},\n az: {year: 'iiii', month: 'aa', day: 'gg'},\n be: {year: 'гггг', month: 'мм', day: 'дд'},\n bg: {year: 'гггг', month: 'мм', day: 'дд'},\n bn: {year: 'yyyy', month: 'মিমি', day: 'dd'},\n br: {year: 'bbbb', month: 'mm', day: 'dd'},\n bs: {year: 'gggg', month: 'mm', day: 'dd'},\n ca: {year: 'aaaa', month: 'mm', day: 'dd'},\n cak: {year: 'jjjj', month: 'ii', day: \"q'q'\"},\n ckb: {year: 'ساڵ', month: 'مانگ', day: 'ڕۆژ'},\n cs: {year: 'rrrr', month: 'mm', day: 'dd'},\n cy: {year: 'bbbb', month: 'mm', day: 'dd'},\n da: {year: 'åååå', month: 'mm', day: 'dd'},\n de: {year: 'jjjj', month: 'mm', day: 'tt'},\n dsb: {year: 'llll', month: 'mm', day: 'źź'},\n el: {year: 'εεεε', month: 'μμ', day: 'ηη'},\n en: {year: 'yyyy', month: 'mm', day: 'dd'},\n eo: {year: 'jjjj', month: 'mm', day: 'tt'},\n es: {year: 'aaaa', month: 'mm', day: 'dd'},\n et: {year: 'aaaa', month: 'kk', day: 'pp'},\n eu: {year: 'uuuu', month: 'hh', day: 'ee'},\n fa: {year: 'سال', month: 'ماه', day: 'روز'},\n ff: {year: 'hhhh', month: 'll', day: 'ññ'},\n fi: {year: 'vvvv', month: 'kk', day: 'pp'},\n fr: {year: 'aaaa', month: 'mm', day: 'jj'},\n fy: {year: 'jjjj', month: 'mm', day: 'dd'},\n ga: {year: 'bbbb', month: 'mm', day: 'll'},\n gd: {year: 'bbbb', month: 'mm', day: 'll'},\n gl: {year: 'aaaa', month: 'mm', day: 'dd'},\n he: {year: 'שנה', month: 'חודש', day: 'יום'},\n hr: {year: 'gggg', month: 'mm', day: 'dd'},\n hsb: {year: 'llll', month: 'mm', day: 'dd'},\n hu: {year: 'éééé', month: 'hh', day: 'nn'},\n ia: {year: 'aaaa', month: 'mm', day: 'dd'},\n id: {year: 'tttt', month: 'bb', day: 'hh'},\n it: {year: 'aaaa', month: 'mm', day: 'gg'},\n ja: {year: ' 年 ', month: '月', day: '日'},\n ka: {year: 'წწწწ', month: 'თთ', day: 'რრ'},\n kk: {year: 'жжжж', month: 'аа', day: 'кк'},\n kn: {year: 'ವವವವ', month: 'ಮಿಮೀ', day: 'ದಿದಿ'},\n ko: {year: '연도', month: '월', day: '일'},\n lb: {year: 'jjjj', month: 'mm', day: 'dd'},\n lo: {year: 'ປປປປ', month: 'ດດ', day: 'ວວ'},\n lt: {year: 'mmmm', month: 'mm', day: 'dd'},\n lv: {year: 'gggg', month: 'mm', day: 'dd'},\n meh: {year: 'aaaa', month: 'mm', day: 'dd'},\n ml: {year: 'വർഷം', month: 'മാസം', day: 'തീയതി'},\n ms: {year: 'tttt', month: 'mm', day: 'hh'},\n nl: {year: 'jjjj', month: 'mm', day: 'dd'},\n nn: {year: 'åååå', month: 'mm', day: 'dd'},\n no: {year: 'åååå', month: 'mm', day: 'dd'},\n oc: {year: 'aaaa', month: 'mm', day: 'jj'},\n pl: {year: 'rrrr', month: 'mm', day: 'dd'},\n pt: {year: 'aaaa', month: 'mm', day: 'dd'},\n rm: {year: 'oooo', month: 'mm', day: 'dd'},\n ro: {year: 'aaaa', month: 'll', day: 'zz'},\n ru: {year: 'гггг', month: 'мм', day: 'дд'},\n sc: {year: 'aaaa', month: 'mm', day: 'dd'},\n scn: {year: 'aaaa', month: 'mm', day: 'jj'},\n sk: {year: 'rrrr', month: 'mm', day: 'dd'},\n sl: {year: 'llll', month: 'mm', day: 'dd'},\n sr: {year: 'гггг', month: 'мм', day: 'дд'},\n sv: {year: 'åååå', month: 'mm', day: 'dd'},\n szl: {year: 'rrrr', month: 'mm', day: 'dd'},\n tg: {year: 'сссс', month: 'мм', day: 'рр'},\n th: {year: 'ปปปป', month: 'ดด', day: 'วว'},\n tr: {year: 'yyyy', month: 'aa', day: 'gg'},\n uk: {year: 'рррр', month: 'мм', day: 'дд'},\n 'zh-CN': {year: '年', month: '月', day: '日'},\n 'zh-TW': {year: '年', month: '月', day: '日'}\n}, 'en');\n\nexport function getPlaceholder(field: string, value: string, locale: string) {\n // Use the actual placeholder value for the era and day period fields.\n if (field === 'era' || field === 'dayPeriod') {\n return value;\n }\n\n if (field === 'year' || field === 'month' || field === 'day') {\n return placeholders.getStringForLocale(field, locale);\n }\n\n // For time fields (e.g. hour, minute, etc.), use two dashes as the placeholder.\n return '––';\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DateFormatter, toCalendarDate, toCalendarDateTime} from '@internationalized/date';\nimport {DateRange, DateRangePickerProps, DateValue, Granularity, TimeValue} from '@react-types/datepicker';\nimport {FieldOptions, getFormatOptions, getPlaceholderTime, isInvalid, useDefaultProps} from './utils';\nimport {OverlayTriggerState, useOverlayTriggerState} from '@react-stately/overlays';\nimport {RangeValue, ValidationState} from '@react-types/shared';\nimport {useControlledState} from '@react-stately/utils';\nimport {useState} from 'react';\n\nexport interface DateRangePickerStateOptions extends DateRangePickerProps<DateValue> {\n /**\n * Determines whether the date picker popover should close automatically when a date is selected.\n * @default true\n */\n shouldCloseOnSelect?: boolean | (() => boolean)\n}\n\ntype TimeRange = RangeValue<TimeValue>;\nexport interface DateRangePickerState extends OverlayTriggerState {\n /** The currently selected date range. */\n value: DateRange,\n /** Sets the selected date range. */\n setValue(value: DateRange): void,\n /**\n * The date portion of the selected range. This may be set prior to `value` if the user has\n * selected a date range but has not yet selected a time range.\n */\n dateRange: DateRange,\n /** Sets the date portion of the selected range. */\n setDateRange(value: DateRange): void,\n /**\n * The time portion of the selected range. This may be set prior to `value` if the user has\n * selected a time range but has not yet selected a date range.\n */\n timeRange: TimeRange,\n /** Sets the time portion of the selected range. */\n setTimeRange(value: TimeRange): void,\n /** Sets the date portion of either the start or end of the selected range. */\n setDate(part: 'start' | 'end', value: DateValue): void,\n /** Sets the time portion of either the start or end of the selected range. */\n setTime(part: 'start' | 'end', value: TimeValue): void,\n /** Sets the date and time of either the start or end of the selected range. */\n setDateTime(part: 'start' | 'end', value: DateValue): void,\n /** The granularity for the field, based on the `granularity` prop and current value. */\n granularity: Granularity,\n /** Whether the date range picker supports selecting times, according to the `granularity` prop and current value. */\n hasTime: boolean,\n /** Whether the calendar popover is currently open. */\n isOpen: boolean,\n /** Sets whether the calendar popover is open. */\n setOpen(isOpen: boolean): void,\n /** The current validation state of the date picker, based on the `validationState`, `minValue`, and `maxValue` props. */\n validationState: ValidationState,\n /** Formats the selected range using the given options. */\n formatValue(locale: string, fieldOptions: FieldOptions): {start: string, end: string}\n}\n\n/**\n * Provides state management for a date range picker component.\n * A date range picker combines two DateFields and a RangeCalendar popover to allow\n * users to enter or select a date and time range.\n */\nexport function useDateRangePickerState(props: DateRangePickerStateOptions): DateRangePickerState {\n let overlayState = useOverlayTriggerState(props);\n let [controlledValue, setControlledValue] = useControlledState<DateRange>(props.value, props.defaultValue || null, props.onChange);\n let [placeholderValue, setPlaceholderValue] = useState(() => controlledValue || {start: null, end: null});\n\n // Reset the placeholder if the value prop is set to null.\n if (controlledValue == null && placeholderValue.start && placeholderValue.end) {\n placeholderValue = {start: null, end: null};\n setPlaceholderValue(placeholderValue);\n }\n\n let value = controlledValue || placeholderValue;\n\n let setValue = (value: DateRange) => {\n setPlaceholderValue(value);\n if (value?.start && value.end) {\n setControlledValue(value);\n } else {\n setControlledValue(null);\n }\n };\n\n let v = (value?.start || value?.end || props.placeholderValue);\n let [granularity] = useDefaultProps(v, props.granularity);\n let hasTime = granularity === 'hour' || granularity === 'minute' || granularity === 'second';\n let shouldCloseOnSelect = props.shouldCloseOnSelect ?? true;\n\n let [dateRange, setSelectedDateRange] = useState<DateRange>(null);\n let [timeRange, setSelectedTimeRange] = useState<TimeRange>(null);\n\n if (value && value.start && value.end) {\n dateRange = value;\n if ('hour' in value.start) {\n timeRange = value as TimeRange;\n }\n }\n\n let commitValue = (dateRange: DateRange, timeRange: TimeRange) => {\n setValue({\n start: 'timeZone' in timeRange.start ? timeRange.start.set(toCalendarDate(dateRange.start)) : toCalendarDateTime(dateRange.start, timeRange.start),\n end: 'timeZone' in timeRange.end ? timeRange.end.set(toCalendarDate(dateRange.end)) : toCalendarDateTime(dateRange.end, timeRange.end)\n });\n };\n\n // Intercept setValue to make sure the Time section is not changed by date selection in Calendar\n let setDateRange = (range: DateRange) => {\n let shouldClose = typeof shouldCloseOnSelect === 'function' ? shouldCloseOnSelect() : shouldCloseOnSelect;\n if (hasTime) {\n if (shouldClose || (range.start && range.end && timeRange?.start && timeRange?.end)) {\n commitValue(range, {\n start: timeRange?.start || getPlaceholderTime(props.placeholderValue),\n end: timeRange?.end || getPlaceholderTime(props.placeholderValue)\n });\n } else {\n setSelectedDateRange(range);\n }\n } else if (range.start && range.end) {\n setValue(range);\n } else {\n setSelectedDateRange(range);\n }\n\n if (shouldClose) {\n overlayState.setOpen(false);\n }\n };\n\n let setTimeRange = (range: TimeRange) => {\n if (dateRange?.start && dateRange?.end && range.start && range.end) {\n commitValue(dateRange, range);\n } else {\n setSelectedTimeRange(range);\n }\n };\n\n let validationState: ValidationState = props.validationState\n || (value != null && (\n isInvalid(value.start, props.minValue, props.maxValue) ||\n isInvalid(value.end, props.minValue, props.maxValue) ||\n (value.end != null && value.start != null && value.end.compare(value.start) < 0) ||\n (value?.start && props.isDateUnavailable?.(value.start)) ||\n (value?.end && props.isDateUnavailable?.(value.end))\n ) ? 'invalid' : null);\n\n return {\n value,\n setValue,\n dateRange,\n timeRange,\n granularity,\n hasTime,\n setDate(part, date) {\n setDateRange({...dateRange, [part]: date});\n },\n setTime(part, time) {\n setTimeRange({...timeRange, [part]: time});\n },\n setDateTime(part, dateTime) {\n setValue({...value, [part]: dateTime});\n },\n setDateRange,\n setTimeRange,\n ...overlayState,\n setOpen(isOpen) {\n // Commit the selected date range when the calendar is closed. Use a placeholder time if one wasn't set.\n // If only the time range was set and not the date range, don't commit. The state will be preserved until\n // the user opens the popover again.\n if (!isOpen && !(value?.start && value?.end) && dateRange?.start && dateRange?.end && hasTime) {\n commitValue(dateRange, {\n start: timeRange?.start || getPlaceholderTime(props.placeholderValue),\n end: timeRange?.end || getPlaceholderTime(props.placeholderValue)\n });\n }\n\n overlayState.setOpen(isOpen);\n },\n validationState,\n formatValue(locale, fieldOptions) {\n if (!value || !value.start || !value.end) {\n return null;\n }\n\n let startTimeZone = 'timeZone' in value.start ? value.start.timeZone : undefined;\n let startGranularity = props.granularity || (value.start && 'minute' in value.start ? 'minute' : 'day');\n let endTimeZone = 'timeZone' in value.end ? value.end.timeZone : undefined;\n let endGranularity = props.granularity || (value.end && 'minute' in value.end ? 'minute' : 'day');\n\n let startOptions = getFormatOptions(fieldOptions, {\n granularity: startGranularity,\n timeZone: startTimeZone,\n hideTimeZone: props.hideTimeZone,\n hourCycle: props.hourCycle,\n showEra: (value.start.calendar.identifier === 'gregory' && value.start.era === 'BC') ||\n (value.end.calendar.identifier === 'gregory' && value.end.era === 'BC')\n });\n\n let startDate = value.start.toDate(startTimeZone || 'UTC');\n let endDate = value.end.toDate(endTimeZone || 'UTC');\n\n let startFormatter = new DateFormatter(locale, startOptions);\n let endFormatter: Intl.DateTimeFormat;\n if (startTimeZone === endTimeZone && startGranularity === endGranularity && value.start.compare(value.end) !== 0) {\n // Use formatRange, as it results in shorter output when some of the fields\n // are shared between the start and end dates (e.g. the same month).\n // Formatting will fail if the end date is before the start date. Fall back below when that happens.\n try {\n let parts = startFormatter.formatRangeToParts(startDate, endDate);\n\n // Find the separator between the start and end date. This is determined\n // by finding the last shared literal before the end range.\n let separatorIndex = -1;\n for (let i = 0; i < parts.length; i++) {\n let part = parts[i];\n if (part.source === 'shared' && part.type === 'literal') {\n separatorIndex = i;\n } else if (part.source === 'endRange') {\n break;\n }\n }\n\n // Now we can combine the parts into start and end strings.\n let start = '';\n let end = '';\n for (let i = 0; i < parts.length; i++) {\n if (i < separatorIndex) {\n start += parts[i].value;\n } else if (i > separatorIndex) {\n end += parts[i].value;\n }\n }\n\n return {start, end};\n } catch (e) {\n // ignore\n }\n\n endFormatter = startFormatter;\n } else {\n let endOptions = getFormatOptions(fieldOptions, {\n granularity: endGranularity,\n timeZone: endTimeZone,\n hideTimeZone: props.hideTimeZone,\n hourCycle: props.hourCycle\n });\n\n endFormatter = new DateFormatter(locale, endOptions);\n }\n\n return {\n start: startFormatter.format(startDate),\n end: endFormatter.format(endDate)\n };\n }\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the 'License');\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DateFieldState, useDateFieldState} from '.';\nimport {DateValue, TimePickerProps, TimeValue} from '@react-types/datepicker';\nimport {getLocalTimeZone, GregorianCalendar, Time, toCalendarDateTime, today, toTime} from '@internationalized/date';\nimport {useControlledState} from '@react-stately/utils';\nimport {useMemo} from 'react';\n\nexport interface TimeFieldStateOptions extends TimePickerProps<TimeValue> {\n /** The locale to display and edit the value according to. */\n locale: string\n}\n\n/**\n * Provides state management for a time field component.\n * A time field allows users to enter and edit time values using a keyboard.\n * Each part of a time value is displayed in an individually editable segment.\n */\nexport function useTimeFieldState(props: TimeFieldStateOptions): DateFieldState {\n let {\n placeholderValue = new Time(),\n minValue,\n maxValue,\n granularity\n } = props;\n\n let [value, setValue] = useControlledState<TimeValue>(\n props.value,\n props.defaultValue,\n props.onChange\n );\n\n let v = value || placeholderValue;\n let day = v && 'day' in v ? v : undefined;\n let placeholderDate = useMemo(() => convertValue(placeholderValue), [placeholderValue]);\n let minDate = useMemo(() => convertValue(minValue, day), [minValue, day]);\n let maxDate = useMemo(() => convertValue(maxValue, day), [maxValue, day]);\n\n let dateTime = useMemo(() => value == null ? null : convertValue(value), [value]);\n let onChange = newValue => {\n setValue(v && 'day' in v ? newValue : newValue && toTime(newValue));\n };\n\n return useDateFieldState({\n ...props,\n value: dateTime,\n defaultValue: undefined,\n minValue: minDate,\n maxValue: maxDate,\n onChange,\n granularity: granularity || 'minute',\n maxGranularity: 'hour',\n placeholderValue: placeholderDate,\n // Calendar should not matter for time fields.\n createCalendar: () => new GregorianCalendar()\n });\n}\n\nfunction convertValue(value: TimeValue, date: DateValue = today(getLocalTimeZone())) {\n if (!value) {\n return null;\n }\n\n if ('day' in value) {\n return value;\n }\n\n return toCalendarDateTime(date, value);\n}\n"],"names":[],"version":3,"file":"module.js.map"}
|
package/dist/types.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { DatePickerProps, DateValue, Granularity, TimeValue, DateRange, DateRang
|
|
|
3
3
|
import { OverlayTriggerState } from "@react-stately/overlays";
|
|
4
4
|
import { ValidationState, RangeValue } from "@react-types/shared";
|
|
5
5
|
type FieldOptions = Pick<Intl.DateTimeFormatOptions, 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second'>;
|
|
6
|
-
export interface DatePickerStateOptions extends DatePickerProps<
|
|
6
|
+
export interface DatePickerStateOptions<T extends DateValue> extends DatePickerProps<T> {
|
|
7
7
|
/**
|
|
8
8
|
* Determines whether the date picker popover should close automatically when a date is selected.
|
|
9
9
|
* @default true
|
|
@@ -41,16 +41,12 @@ export interface DatePickerState extends OverlayTriggerState {
|
|
|
41
41
|
validationState: ValidationState;
|
|
42
42
|
/** Formats the selected value using the given options. */
|
|
43
43
|
formatValue(locale: string, fieldOptions: FieldOptions): string;
|
|
44
|
-
/** Whether the date picker is currently focused. */
|
|
45
|
-
readonly isFocused: boolean;
|
|
46
|
-
/** Sets whether the date picker is focused. */
|
|
47
|
-
setFocused(isFocused: boolean): void;
|
|
48
44
|
}
|
|
49
45
|
/**
|
|
50
46
|
* Provides state management for a date picker component.
|
|
51
47
|
* A date picker combines a DateField and a Calendar popover to allow users to enter or select a date and time value.
|
|
52
48
|
*/
|
|
53
|
-
export function useDatePickerState(props: DatePickerStateOptions): DatePickerState;
|
|
49
|
+
export function useDatePickerState<T extends DateValue = DateValue>(props: DatePickerStateOptions<T>): DatePickerState;
|
|
54
50
|
export type SegmentType = 'era' | 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second' | 'dayPeriod' | 'literal' | 'timeZoneName';
|
|
55
51
|
export interface DateSegment {
|
|
56
52
|
/** The type of segment. */
|
|
@@ -120,10 +116,6 @@ export interface DateFieldState {
|
|
|
120
116
|
clearSegment(type: SegmentType): void;
|
|
121
117
|
/** Formats the current date value using the given options. */
|
|
122
118
|
formatValue(fieldOptions: FieldOptions): string;
|
|
123
|
-
/** Whether the date field is currently focused. */
|
|
124
|
-
readonly isFocused: boolean;
|
|
125
|
-
/** Sets whether the date field is focused. */
|
|
126
|
-
setFocused(isFocused: boolean): void;
|
|
127
119
|
}
|
|
128
120
|
export interface DateFieldStateOptions extends DatePickerProps<DateValue> {
|
|
129
121
|
/**
|
|
@@ -195,10 +187,6 @@ export interface DateRangePickerState extends OverlayTriggerState {
|
|
|
195
187
|
start: string;
|
|
196
188
|
end: string;
|
|
197
189
|
};
|
|
198
|
-
/** Whether the date range picker is currently focused. */
|
|
199
|
-
readonly isFocused: boolean;
|
|
200
|
-
/** Sets whether the date range picker is focused. */
|
|
201
|
-
setFocused(isFocused: boolean): void;
|
|
202
190
|
}
|
|
203
191
|
/**
|
|
204
192
|
* Provides state management for a date range picker component.
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
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icker/src/utils.ts","packages/@react-stately/datepicker/src/packages/@react-stately/datepicker/src/useDatePickerState.ts","packages/@react-stately/datepicker/src/packages/@react-stately/datepicker/src/placeholders.ts","packages/@react-stately/datepicker/src/packages/@react-stately/datepicker/src/useDateFieldState.ts","packages/@react-stately/datepicker/src/packages/@react-stately/datepicker/src/useDateRangePickerState.ts","packages/@react-stately/datepicker/src/packages/@react-stately/datepicker/src/useTimeFieldState.ts","packages/@react-stately/datepicker/src/packages/@react-stately/datepicker/src/index.ts","packages/@react-stately/datepicker/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {useDatePickerState} from './useDatePickerState';\nexport {useDateFieldState} from './useDateFieldState';\nexport {useDateRangePickerState} from './useDateRangePickerState';\nexport {useTimeFieldState} from './useTimeFieldState';\n\nexport type {DateFieldStateOptions, DateFieldState, DateSegment, SegmentType} from './useDateFieldState';\nexport type {DatePickerStateOptions, DatePickerState} from './useDatePickerState';\nexport type {DateRangePickerStateOptions, DateRangePickerState} from './useDateRangePickerState';\nexport type {TimeFieldStateOptions} from './useTimeFieldState';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-stately/datepicker",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.1852+286dbcdab",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@babel/runtime": "^7.6.2",
|
|
21
|
-
"@internationalized/date": "3.0.2-nightly.
|
|
22
|
-
"@internationalized/string": "3.0.1-nightly.
|
|
23
|
-
"@react-stately/overlays": "3.4.3-nightly.
|
|
24
|
-
"@react-stately/utils": "3.0.0-nightly.
|
|
25
|
-
"@react-types/datepicker": "3.0.0-nightly.
|
|
26
|
-
"@react-types/shared": "3.0.0-nightly.
|
|
21
|
+
"@internationalized/date": "3.0.2-nightly.3552+286dbcdab",
|
|
22
|
+
"@internationalized/string": "3.0.1-nightly.3552+286dbcdab",
|
|
23
|
+
"@react-stately/overlays": "3.4.3-nightly.3552+286dbcdab",
|
|
24
|
+
"@react-stately/utils": "3.0.0-nightly.1852+286dbcdab",
|
|
25
|
+
"@react-types/datepicker": "3.0.0-nightly.1852+286dbcdab",
|
|
26
|
+
"@react-types/shared": "3.0.0-nightly.1852+286dbcdab"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "286dbcdabf60102d05a95ef00bc3fed06af91d98"
|
|
35
35
|
}
|
package/src/useDateFieldState.ts
CHANGED
|
@@ -87,11 +87,7 @@ export interface DateFieldState {
|
|
|
87
87
|
/** Clears the value of the given segment, reverting it to the placeholder. */
|
|
88
88
|
clearSegment(type: SegmentType): void,
|
|
89
89
|
/** Formats the current date value using the given options. */
|
|
90
|
-
formatValue(fieldOptions: FieldOptions): string
|
|
91
|
-
/** Whether the date field is currently focused. */
|
|
92
|
-
readonly isFocused: boolean,
|
|
93
|
-
/** Sets whether the date field is focused. */
|
|
94
|
-
setFocused(isFocused: boolean): void
|
|
90
|
+
formatValue(fieldOptions: FieldOptions): string
|
|
95
91
|
}
|
|
96
92
|
|
|
97
93
|
const EDITABLE_SEGMENTS = {
|
|
@@ -155,8 +151,6 @@ export function useDateFieldState(props: DateFieldStateOptions): DateFieldState
|
|
|
155
151
|
let [granularity, defaultTimeZone] = useDefaultProps(v, props.granularity);
|
|
156
152
|
let timeZone = defaultTimeZone || 'UTC';
|
|
157
153
|
|
|
158
|
-
let [isFocused, setFocused] = useState(false);
|
|
159
|
-
|
|
160
154
|
// props.granularity must actually exist in the value if one is provided.
|
|
161
155
|
if (v && !(granularity in v)) {
|
|
162
156
|
throw new Error('Invalid granularity ' + granularity + ' for value ' + v.toString());
|
|
@@ -379,9 +373,7 @@ export function useDateFieldState(props: DateFieldStateOptions): DateFieldState
|
|
|
379
373
|
let formatOptions = getFormatOptions(fieldOptions, formatOpts);
|
|
380
374
|
let formatter = new DateFormatter(locale, formatOptions);
|
|
381
375
|
return formatter.format(dateValue);
|
|
382
|
-
}
|
|
383
|
-
isFocused,
|
|
384
|
-
setFocused
|
|
376
|
+
}
|
|
385
377
|
};
|
|
386
378
|
}
|
|
387
379
|
|
|
@@ -19,7 +19,7 @@ import {useControlledState} from '@react-stately/utils';
|
|
|
19
19
|
import {useState} from 'react';
|
|
20
20
|
import {ValidationState} from '@react-types/shared';
|
|
21
21
|
|
|
22
|
-
export interface DatePickerStateOptions extends DatePickerProps<
|
|
22
|
+
export interface DatePickerStateOptions<T extends DateValue> extends DatePickerProps<T> {
|
|
23
23
|
/**
|
|
24
24
|
* Determines whether the date picker popover should close automatically when a date is selected.
|
|
25
25
|
* @default true
|
|
@@ -57,23 +57,17 @@ export interface DatePickerState extends OverlayTriggerState {
|
|
|
57
57
|
/** The current validation state of the date picker, based on the `validationState`, `minValue`, and `maxValue` props. */
|
|
58
58
|
validationState: ValidationState,
|
|
59
59
|
/** Formats the selected value using the given options. */
|
|
60
|
-
formatValue(locale: string, fieldOptions: FieldOptions): string
|
|
61
|
-
/** Whether the date picker is currently focused. */
|
|
62
|
-
readonly isFocused: boolean,
|
|
63
|
-
/** Sets whether the date picker is focused. */
|
|
64
|
-
setFocused(isFocused: boolean): void
|
|
60
|
+
formatValue(locale: string, fieldOptions: FieldOptions): string
|
|
65
61
|
}
|
|
66
62
|
|
|
67
63
|
/**
|
|
68
64
|
* Provides state management for a date picker component.
|
|
69
65
|
* A date picker combines a DateField and a Calendar popover to allow users to enter or select a date and time value.
|
|
70
66
|
*/
|
|
71
|
-
export function useDatePickerState(props: DatePickerStateOptions): DatePickerState {
|
|
67
|
+
export function useDatePickerState<T extends DateValue = DateValue>(props: DatePickerStateOptions<T>): DatePickerState {
|
|
72
68
|
let overlayState = useOverlayTriggerState(props);
|
|
73
69
|
let [value, setValue] = useControlledState<DateValue>(props.value, props.defaultValue || null, props.onChange);
|
|
74
70
|
|
|
75
|
-
let [isFocused, setFocused] = useState(false);
|
|
76
|
-
|
|
77
71
|
let v = (value || props.placeholderValue);
|
|
78
72
|
let [granularity, defaultTimeZone] = useDefaultProps(v, props.granularity);
|
|
79
73
|
let dateValue = value != null ? value.toDate(defaultTimeZone ?? 'UTC') : null;
|
|
@@ -165,8 +159,6 @@ export function useDatePickerState(props: DatePickerStateOptions): DatePickerSta
|
|
|
165
159
|
|
|
166
160
|
let formatter = new DateFormatter(locale, formatOptions);
|
|
167
161
|
return formatter.format(dateValue);
|
|
168
|
-
}
|
|
169
|
-
isFocused,
|
|
170
|
-
setFocused
|
|
162
|
+
}
|
|
171
163
|
};
|
|
172
164
|
}
|
|
@@ -63,11 +63,7 @@ export interface DateRangePickerState extends OverlayTriggerState {
|
|
|
63
63
|
/** The current validation state of the date picker, based on the `validationState`, `minValue`, and `maxValue` props. */
|
|
64
64
|
validationState: ValidationState,
|
|
65
65
|
/** Formats the selected range using the given options. */
|
|
66
|
-
formatValue(locale: string, fieldOptions: FieldOptions): {start: string, end: string}
|
|
67
|
-
/** Whether the date range picker is currently focused. */
|
|
68
|
-
readonly isFocused: boolean,
|
|
69
|
-
/** Sets whether the date range picker is focused. */
|
|
70
|
-
setFocused(isFocused: boolean): void
|
|
66
|
+
formatValue(locale: string, fieldOptions: FieldOptions): {start: string, end: string}
|
|
71
67
|
}
|
|
72
68
|
|
|
73
69
|
/**
|
|
@@ -80,8 +76,6 @@ export function useDateRangePickerState(props: DateRangePickerStateOptions): Dat
|
|
|
80
76
|
let [controlledValue, setControlledValue] = useControlledState<DateRange>(props.value, props.defaultValue || null, props.onChange);
|
|
81
77
|
let [placeholderValue, setPlaceholderValue] = useState(() => controlledValue || {start: null, end: null});
|
|
82
78
|
|
|
83
|
-
let [isFocused, setFocused] = useState(false);
|
|
84
|
-
|
|
85
79
|
// Reset the placeholder if the value prop is set to null.
|
|
86
80
|
if (controlledValue == null && placeholderValue.start && placeholderValue.end) {
|
|
87
81
|
placeholderValue = {start: null, end: null};
|
|
@@ -269,8 +263,6 @@ export function useDateRangePickerState(props: DateRangePickerStateOptions): Dat
|
|
|
269
263
|
start: startFormatter.format(startDate),
|
|
270
264
|
end: endFormatter.format(endDate)
|
|
271
265
|
};
|
|
272
|
-
}
|
|
273
|
-
isFocused,
|
|
274
|
-
setFocused
|
|
266
|
+
}
|
|
275
267
|
};
|
|
276
268
|
}
|