@rivet-health/design-system 41.1.4 → 41.2.1
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/package.json
CHANGED
|
@@ -957,8 +957,15 @@ declare namespace LocalStorage {
|
|
|
957
957
|
} | Serializable[];
|
|
958
958
|
}
|
|
959
959
|
export declare class DateRangeComponent extends InputLabelComponent {
|
|
960
|
+
private readonly host;
|
|
960
961
|
readonly TODAY: Date;
|
|
961
962
|
readonly STORAGE_KEY = "date-range.default";
|
|
963
|
+
/**
|
|
964
|
+
* Id the combobox `aria-controls` points at, worn by the lazily rendered
|
|
965
|
+
* calendar popup.
|
|
966
|
+
*/
|
|
967
|
+
readonly calendarId: string;
|
|
968
|
+
constructor(host: ElementRef<HTMLElement>);
|
|
962
969
|
private readonly showPresets$;
|
|
963
970
|
set showPresets(v: boolean);
|
|
964
971
|
get showPresets(): boolean;
|
|
@@ -983,6 +990,7 @@ export declare class DateRangeComponent extends InputLabelComponent {
|
|
|
983
990
|
}>;
|
|
984
991
|
customTriggerButton?: ElementRef;
|
|
985
992
|
standardTriggerButton?: ElementRef;
|
|
993
|
+
inputElement?: ElementRef<HTMLInputElement>;
|
|
986
994
|
getTrigger(): Element | null;
|
|
987
995
|
readonly alternativePresetList$: BehaviorSubject<DateRangeComponent.PresetType[]>;
|
|
988
996
|
set alternativePresetList(v: DateRangeComponent.PresetType[]);
|
|
@@ -990,6 +998,7 @@ export declare class DateRangeComponent extends InputLabelComponent {
|
|
|
990
998
|
readonly open$: BehaviorSubject<boolean>;
|
|
991
999
|
readonly userSelectedPreset$: Subject<DateRangeComponent.Preset | null>;
|
|
992
1000
|
readonly userSelectedDate$: Subject<Date | undefined>;
|
|
1001
|
+
readonly userTypedRange$: Subject<[Date, Date]>;
|
|
993
1002
|
readonly selectedValue$: Observable<Date | [Date, Date] | undefined>;
|
|
994
1003
|
readonly filteredPresetOptions$: Observable<DateRangeComponent.Preset[]>;
|
|
995
1004
|
readonly selectedPreset$: Observable<DateRangeComponent.Preset | null>;
|
|
@@ -1005,9 +1014,34 @@ export declare class DateRangeComponent extends InputLabelComponent {
|
|
|
1005
1014
|
readonly rightActiveYearMonth$: Observable<Date>;
|
|
1006
1015
|
readonly rightMin$: Observable<Date>;
|
|
1007
1016
|
readonly leftOmitRange$: Observable<[Date, Date]>;
|
|
1008
|
-
readonly userInteracted$: Observable<Date | DateRangeComponent.Preset | null | undefined>;
|
|
1017
|
+
readonly userInteracted$: Observable<Date | [Date, Date] | DateRangeComponent.Preset | null | undefined>;
|
|
1009
1018
|
readonly valueChange: Observable<[Date, Date] | undefined>;
|
|
1010
1019
|
readonly displayValue$: Observable<string | undefined>;
|
|
1020
|
+
/**
|
|
1021
|
+
* Text the user has typed but not yet committed. `null` means the input
|
|
1022
|
+
* shows the current value, so external value changes never stomp typing.
|
|
1023
|
+
*/
|
|
1024
|
+
readonly typedText$: BehaviorSubject<string | null>;
|
|
1025
|
+
readonly inputText$: Observable<string>;
|
|
1026
|
+
onInputFocus(): void;
|
|
1027
|
+
onInputChange(text: string): void;
|
|
1028
|
+
onInputBlur(event?: FocusEvent): void;
|
|
1029
|
+
onInputEnter(): void;
|
|
1030
|
+
toggleCalendar(): void;
|
|
1031
|
+
/**
|
|
1032
|
+
* Escape closes the popup and, from inside it, returns focus to the input.
|
|
1033
|
+
* It claims the Escape so an enclosing dialog stays open, and leaves alone
|
|
1034
|
+
* one a child (e.g. the presets dropdown) has already claimed.
|
|
1035
|
+
*/
|
|
1036
|
+
onEscape(event: Event): void;
|
|
1037
|
+
/** ArrowDown (with or without Alt) opens the popup and moves focus into it. */
|
|
1038
|
+
onInputArrowDown(): void;
|
|
1039
|
+
closeOnFocusLeaving(event?: FocusEvent): void;
|
|
1040
|
+
/** Closes the calendar, restoring the value over a half-picked range. */
|
|
1041
|
+
closeCalendar(): void;
|
|
1042
|
+
onDocumentMouseDown(target: EventTarget | null): void;
|
|
1043
|
+
private isInsidePicker;
|
|
1044
|
+
private commitTypedText;
|
|
1011
1045
|
static ɵfac: i0.ɵɵFactoryDeclaration<DateRangeComponent, never>;
|
|
1012
1046
|
static ɵcmp: i0.ɵɵComponentDeclaration<DateRangeComponent, "riv-date-range", never, {
|
|
1013
1047
|
"showPresets": {
|
|
@@ -1043,6 +1077,15 @@ export declare class DateRangeComponent extends InputLabelComponent {
|
|
|
1043
1077
|
}, ["triggerTemplate"], never, false, never>;
|
|
1044
1078
|
}
|
|
1045
1079
|
export declare namespace DateRangeComponent {
|
|
1080
|
+
/** Elements keyboard focus can land on inside the calendar popup. */
|
|
1081
|
+
const focusableSelector = "button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1082
|
+
/**
|
|
1083
|
+
* Parses typed text like `1/1/26 - 1/5/26` or `2026-01-01 to 01-05-2026`
|
|
1084
|
+
* into a range within min and max. Each date accepts any format
|
|
1085
|
+
* `DateComponent.parseDate` does. A single date is a one-day range, and a
|
|
1086
|
+
* reversed range is swapped.
|
|
1087
|
+
*/
|
|
1088
|
+
function parseDateRange(text: string, min: Date, max: Date): [Date, Date] | undefined;
|
|
1046
1089
|
enum PresetType {
|
|
1047
1090
|
TODAY = "today",
|
|
1048
1091
|
YESTERDAY = "yesterday",
|