@gravionlabs/helix-ui 22.2.8 → 22.2.9
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/README.md +1 -0
- package/fesm2022/gravionlabs-helix-ui.mjs +2057 -87
- package/fesm2022/gravionlabs-helix-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/styles.css +222 -6
- package/types/gravionlabs-helix-ui.d.ts +570 -8
|
@@ -1864,6 +1864,39 @@ export declare class HxDataTable implements OnInit {
|
|
|
1864
1864
|
"expandedRowKeys": "expandedRowKeysChange";
|
|
1865
1865
|
}, ["cellTemplates", "columnHeaderTemplates", "headerTemplate", "bodyTemplate", "footerTemplate", "captionTemplate", "expansionTemplate", "emptyTemplate"], never, true, never>;
|
|
1866
1866
|
}
|
|
1867
|
+
/** A relative range in the popup's preset list; `from` and `to` are read when it is chosen (`now` stays current). */
|
|
1868
|
+
interface HxDateTimeRangePreset {
|
|
1869
|
+
label: string;
|
|
1870
|
+
/** Called with the picker's settings, so a calendar range can follow its `firstDayOfWeek`. */
|
|
1871
|
+
from: (context?: HxDateTimeRangePresetContext) => Date;
|
|
1872
|
+
to: (context?: HxDateTimeRangePresetContext) => Date;
|
|
1873
|
+
}
|
|
1874
|
+
interface HxDateTimeRangePresetContext {
|
|
1875
|
+
firstDayOfWeek: number;
|
|
1876
|
+
}
|
|
1877
|
+
/** The ends of a preset as a picker takes them: `null` for an empty end, `undefined` when the picker refuses one. */
|
|
1878
|
+
type HxPresetFit = (date: Date, side: 'from' | 'to') => Date | null | undefined;
|
|
1879
|
+
/**
|
|
1880
|
+
* Reads a preset against the current time and fits each end with `fit` (the day only without a time, refused on a
|
|
1881
|
+
* disabled day, ...); ends that come out reversed are ordered. `undefined` when `fit` refuses an end.
|
|
1882
|
+
*/
|
|
1883
|
+
declare function hxResolvePreset(preset: HxDateTimeRangePreset, context: HxDateTimeRangePresetContext, fit: HxPresetFit): {
|
|
1884
|
+
from: Date | null;
|
|
1885
|
+
to: Date | null;
|
|
1886
|
+
} | undefined;
|
|
1887
|
+
/** The ids of the built-in presets; `hxDateRangePresets` takes a label per id. */
|
|
1888
|
+
type HxDateRangePresetId = 'last15Minutes' | 'last1Hour' | 'last6Hours' | 'last24Hours' | 'last7Days' | 'last30Days' | 'today' | 'yesterday' | 'thisWeek' | 'thisMonth';
|
|
1889
|
+
/**
|
|
1890
|
+
* The built-in presets with `labels` in place of the English ones (any id may be left out). `Today`, `Yesterday`,
|
|
1891
|
+
* `This week`, `This month` and the day-based `Last 7 days` / `Last 30 days` (calendar days: they start at midnight
|
|
1892
|
+
* of the first day, not 7 x 24 hours ago) start at midnight, so they also fit a picker without time pickers;
|
|
1893
|
+
* `today` and `Last N days` end now, `yesterday` and the `this ...` ranges end at 23:59:59.999 of their last day.
|
|
1894
|
+
*/
|
|
1895
|
+
export declare function hxDateRangePresets(labels?: Partial<Record<HxDateRangePresetId, string>>): HxDateTimeRangePreset[];
|
|
1896
|
+
/** All built-in presets with English labels (a fresh list per call is `hxDateRangePresets()`). */
|
|
1897
|
+
export declare const HX_DATE_RANGE_PRESETS: readonly HxDateTimeRangePreset[];
|
|
1898
|
+
/** The day-based built-in presets (no time of day) for a picker without time pickers: Today, Last 7 days, This month. */
|
|
1899
|
+
export declare const HX_DATE_RANGE_DAY_PRESETS: readonly HxDateTimeRangePreset[];
|
|
1867
1900
|
type CalendarView = 'day' | 'month' | 'year';
|
|
1868
1901
|
interface DisabledRules {
|
|
1869
1902
|
min?: Date | null;
|
|
@@ -1907,6 +1940,16 @@ type HxDatePickerValue = Date | Date[] | null;
|
|
|
1907
1940
|
*
|
|
1908
1941
|
* Keyboard in the day grid: arrows move by a day or a week, Home and End to the start and end of the week,
|
|
1909
1942
|
* Page Up and Page Down by a month (with Shift by a year), Enter or Space selects.
|
|
1943
|
+
*
|
|
1944
|
+
* With `selectionMode="range"`, `presets` lists ready-made ranges above the calendar (as buttons, or with
|
|
1945
|
+
* `presetDisplay="select"` in a select), for example `HX_DATE_RANGE_DAY_PRESETS` (Today, Last 7 days, This month).
|
|
1946
|
+
* Choosing one sets the value at once to the days of its ends (midnight, in order; moved into `minDate`..`maxDate`)
|
|
1947
|
+
* and closes the popup. A preset with an end on a disabled day, or one that lies wholly outside
|
|
1948
|
+
* `minDate`..`maxDate`, is refused with an inline message (`presetRefusedLabel`, `role="alert"`).
|
|
1949
|
+
*
|
|
1950
|
+
* ```html
|
|
1951
|
+
* <hx-date-picker selectionMode="range" [presets]="dayPresets" presetDisplay="select" [(ngModel)]="stay" />
|
|
1952
|
+
* ```
|
|
1910
1953
|
*/
|
|
1911
1954
|
export declare class HxDatePicker implements ControlValueAccessor, FormValueControl<HxDatePickerValue> {
|
|
1912
1955
|
#private;
|
|
@@ -1939,6 +1982,14 @@ export declare class HxDatePicker implements ControlValueAccessor, FormValueCont
|
|
|
1939
1982
|
readonly locale: import("@angular/core").InputSignal<string | undefined>;
|
|
1940
1983
|
readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
1941
1984
|
readonly ariaLabelledby: import("@angular/core").InputSignal<string | undefined>;
|
|
1985
|
+
/** Ready-made ranges above the calendar, only with `selectionMode="range"`; choosing one sets the value. */
|
|
1986
|
+
readonly presets: import("@angular/core").InputSignal<readonly HxDateTimeRangePreset[]>;
|
|
1987
|
+
/** The presets as a row of `buttons` (default) or in a compact `select`. */
|
|
1988
|
+
readonly presetDisplay: import("@angular/core").InputSignal<"select" | "buttons">;
|
|
1989
|
+
/** The name of the group of preset buttons, and of the preset select. */
|
|
1990
|
+
readonly presetsLabel: import("@angular/core").InputSignal<string>;
|
|
1991
|
+
/** The message shown when a preset cannot be chosen (a disabled day, outside `minDate`..`maxDate`). */
|
|
1992
|
+
readonly presetRefusedLabel: import("@angular/core").InputSignal<string>;
|
|
1942
1993
|
readonly value: import("@angular/core").ModelSignal<HxDatePickerValue>;
|
|
1943
1994
|
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
1944
1995
|
readonly invalid: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
@@ -1949,6 +2000,16 @@ export declare class HxDatePicker implements ControlValueAccessor, FormValueCont
|
|
|
1949
2000
|
protected readonly positions: ConnectedPosition[];
|
|
1950
2001
|
private readonly field;
|
|
1951
2002
|
private readonly calendar;
|
|
2003
|
+
/** The presets shown: range mode only. */
|
|
2004
|
+
protected readonly shownPresets: import("@angular/core").Signal<readonly HxDateTimeRangePreset[]>;
|
|
2005
|
+
/**
|
|
2006
|
+
* The preset the select shows: the chosen one while the value still holds its days, looked up by label in the
|
|
2007
|
+
* current list (a new `presets` array with the same entries keeps it).
|
|
2008
|
+
*/
|
|
2009
|
+
protected readonly selectedPreset: import("@angular/core").Signal<HxDateTimeRangePreset | null>;
|
|
2010
|
+
/** A preset was refused: the message under the presets, until the next choice or edit. */
|
|
2011
|
+
protected readonly presetError: import("@angular/core").WritableSignal<boolean>;
|
|
2012
|
+
protected readonly presetErrorId: string;
|
|
1952
2013
|
protected readonly view: import("@angular/core").WritableSignal<CalendarView>;
|
|
1953
2014
|
protected readonly isDisabled: import("@angular/core").Signal<boolean>;
|
|
1954
2015
|
/** The day with the focus in the grid, and the month the grid shows. */
|
|
@@ -1966,6 +2027,12 @@ export declare class HxDatePicker implements ControlValueAccessor, FormValueCont
|
|
|
1966
2027
|
protected isDateDisabled(date: Date): boolean;
|
|
1967
2028
|
protected isSelected(date: Date): boolean;
|
|
1968
2029
|
protected pick(date: Date): void;
|
|
2030
|
+
/**
|
|
2031
|
+
* Sets the value to the days of a preset (midnight, in order, inside `minDate`..`maxDate`) and closes the popup.
|
|
2032
|
+
* A preset with an end on a disabled day, or wholly outside `minDate`..`maxDate` (both ends before `minDate` or
|
|
2033
|
+
* both after `maxDate`), changes nothing and shows the inline message; one that overlaps the limits is cut to them.
|
|
2034
|
+
*/
|
|
2035
|
+
protected applyPreset(preset: HxDateTimeRangePreset): void;
|
|
1969
2036
|
protected show(): void;
|
|
1970
2037
|
protected toggle(): void;
|
|
1971
2038
|
protected close(refocus?: boolean): void;
|
|
@@ -2067,6 +2134,26 @@ export declare class HxDatePicker implements ControlValueAccessor, FormValueCont
|
|
|
2067
2134
|
"required": false;
|
|
2068
2135
|
"isSignal": true;
|
|
2069
2136
|
};
|
|
2137
|
+
"presets": {
|
|
2138
|
+
"alias": "presets";
|
|
2139
|
+
"required": false;
|
|
2140
|
+
"isSignal": true;
|
|
2141
|
+
};
|
|
2142
|
+
"presetDisplay": {
|
|
2143
|
+
"alias": "presetDisplay";
|
|
2144
|
+
"required": false;
|
|
2145
|
+
"isSignal": true;
|
|
2146
|
+
};
|
|
2147
|
+
"presetsLabel": {
|
|
2148
|
+
"alias": "presetsLabel";
|
|
2149
|
+
"required": false;
|
|
2150
|
+
"isSignal": true;
|
|
2151
|
+
};
|
|
2152
|
+
"presetRefusedLabel": {
|
|
2153
|
+
"alias": "presetRefusedLabel";
|
|
2154
|
+
"required": false;
|
|
2155
|
+
"isSignal": true;
|
|
2156
|
+
};
|
|
2070
2157
|
"value": {
|
|
2071
2158
|
"alias": "value";
|
|
2072
2159
|
"required": false;
|
|
@@ -2087,6 +2174,463 @@ export declare class HxDatePicker implements ControlValueAccessor, FormValueCont
|
|
|
2087
2174
|
"touch": "touch";
|
|
2088
2175
|
}, never, never, true, never>;
|
|
2089
2176
|
}
|
|
2177
|
+
/** A date math unit: second, minute, hour, day, week, Month (capital M, as in Kibana), year. */
|
|
2178
|
+
type HxDateMathUnit = 's' | 'm' | 'h' | 'd' | 'w' | 'M' | 'y';
|
|
2179
|
+
/** Options for {@link hxParseDateMath}. */
|
|
2180
|
+
interface HxDateMathOptions {
|
|
2181
|
+
/** The instant `now` resolves to. Defaults to the current time. */
|
|
2182
|
+
now?: Date;
|
|
2183
|
+
/** The weekday a week starts on for `/w` (0 = Sunday, the default; 1 = Monday). */
|
|
2184
|
+
firstDayOfWeek?: number;
|
|
2185
|
+
/** Round `/unit` up to the last millisecond of the unit instead of down to its start (use for a range's end). */
|
|
2186
|
+
roundUp?: boolean;
|
|
2187
|
+
}
|
|
2188
|
+
/**
|
|
2189
|
+
* Resolves a Kibana-style date math expression to a Date, or returns `null` when it is invalid (never throws).
|
|
2190
|
+
*
|
|
2191
|
+
* The expression is `now` followed by any number of adjustments: `+N<unit>` / `-N<unit>` shift by N units and
|
|
2192
|
+
* `/<unit>` rounds down to the start of the unit (or up to its last millisecond with `roundUp`). Units are
|
|
2193
|
+
* `s m h d w M y`, case-sensitive (`m` is minutes, `M` is months). Examples: `now`, `now-15m`, `now+2d`, `now/d`,
|
|
2194
|
+
* `now/w`, `now-1d/d`. Surrounding whitespace is ignored; the anchor must be `now`, amounts are non-negative
|
|
2195
|
+
* integers. Day, week, month and year shifts are calendar based (DST-safe); a month shift that overshoots clamps to
|
|
2196
|
+
* the last day of the target month (31 Mar - 1M = 28/29 Feb). `/w` honors `firstDayOfWeek`.
|
|
2197
|
+
*/
|
|
2198
|
+
export declare function hxParseDateMath(expression: string, options?: HxDateMathOptions): Date | null;
|
|
2199
|
+
/**
|
|
2200
|
+
* The from/to expressions of a "Last N" or "Next N" range: `{ from: 'now-15m', to: 'now' }` for
|
|
2201
|
+
* `('last', 15, 'm')`, `{ from: 'now', to: 'now+2d' }` for `('next', 2, 'd')`. The amount must be a positive
|
|
2202
|
+
* safe integer, otherwise `null` is returned.
|
|
2203
|
+
*/
|
|
2204
|
+
export declare function hxRelativeRangeExpressions(direction: 'last' | 'next', amount: number, unit: HxDateMathUnit): {
|
|
2205
|
+
from: string;
|
|
2206
|
+
to: string;
|
|
2207
|
+
} | null;
|
|
2208
|
+
/** A range as two expressions: date math (`now-15m`, `now/d`) or an ISO date-time for an absolute side. */
|
|
2209
|
+
interface HxDateRangeExpression {
|
|
2210
|
+
from: string;
|
|
2211
|
+
to: string;
|
|
2212
|
+
}
|
|
2213
|
+
/** An entry of the quick select's "Commonly used" list. */
|
|
2214
|
+
interface HxQuickSelectRange extends HxDateRangeExpression {
|
|
2215
|
+
label: string;
|
|
2216
|
+
}
|
|
2217
|
+
/** The texts of the quick select; `{n}` and `{unit}` are replaced where a text names them. */
|
|
2218
|
+
interface HxQuickSelectLabels {
|
|
2219
|
+
quickSelect: string;
|
|
2220
|
+
last: string;
|
|
2221
|
+
next: string;
|
|
2222
|
+
amount: string;
|
|
2223
|
+
unit: string;
|
|
2224
|
+
direction: string;
|
|
2225
|
+
apply: string;
|
|
2226
|
+
commonlyUsed: string;
|
|
2227
|
+
recentlyUsed: string;
|
|
2228
|
+
start: string;
|
|
2229
|
+
end: string;
|
|
2230
|
+
absolute: string;
|
|
2231
|
+
relative: string;
|
|
2232
|
+
now: string;
|
|
2233
|
+
/** The text of the Now tab. */
|
|
2234
|
+
nowHint: string;
|
|
2235
|
+
/**
|
|
2236
|
+
* Shown when a range cannot be applied (a relative side next to an empty absolute side, a Relative tab with an
|
|
2237
|
+
* empty or invalid amount, a refused day, a typed date that cannot be read).
|
|
2238
|
+
*/
|
|
2239
|
+
incompleteRange: string;
|
|
2240
|
+
/** The label of the typed date on the Absolute tab. */
|
|
2241
|
+
date: string;
|
|
2242
|
+
/** `Round to the {unit}` (with the singular unit name). */
|
|
2243
|
+
roundTo: string;
|
|
2244
|
+
/** `Last {n} {unit}` / `Next {n} {unit}` in the Recently used list. */
|
|
2245
|
+
lastRange: string;
|
|
2246
|
+
nextRange: string;
|
|
2247
|
+
/** The name of the start/end summary lines (`hx-date-range-quick-select`). */
|
|
2248
|
+
range: string;
|
|
2249
|
+
/** The summary of a side: `now`, `~ {n} {unit} ago`, `~ {n} {unit} from now`, with `rounded to the {unit}`. */
|
|
2250
|
+
nowSummary: string;
|
|
2251
|
+
agoSummary: string;
|
|
2252
|
+
fromNowSummary: string;
|
|
2253
|
+
roundedSummary: string;
|
|
2254
|
+
/** The summary of an empty side. */
|
|
2255
|
+
emptySide: string;
|
|
2256
|
+
/** `Resolves to {date}`: the date a relative or now side stands for at this moment (the side editor). */
|
|
2257
|
+
resolvesTo: string;
|
|
2258
|
+
/** The plural unit names (`minutes`) and the singular ones (`minute`, for `{n}` = 1 and `roundTo`). */
|
|
2259
|
+
units: Record<HxDateMathUnit, string>;
|
|
2260
|
+
unitsOne: Record<HxDateMathUnit, string>;
|
|
2261
|
+
/** The unit options of the Relative tab: `Minutes ago`, `Minutes from now`. */
|
|
2262
|
+
unitsAgo: Record<HxDateMathUnit, string>;
|
|
2263
|
+
unitsFromNow: Record<HxDateMathUnit, string>;
|
|
2264
|
+
}
|
|
2265
|
+
declare const QUICK_SELECT_UNITS: readonly HxDateMathUnit[];
|
|
2266
|
+
/** The English texts of the quick select (the default of `quickSelectLabels`). */
|
|
2267
|
+
export declare const HX_QUICK_SELECT_LABELS: HxQuickSelectLabels;
|
|
2268
|
+
/** The default "Commonly used" list (as in Kibana). */
|
|
2269
|
+
export declare const HX_QUICK_SELECT_COMMONLY_USED: readonly HxQuickSelectRange[];
|
|
2270
|
+
/** How many ranges the "Recently used" list keeps. */
|
|
2271
|
+
declare const RECENT_MAX = 5;
|
|
2272
|
+
/** The state of one side (start or end) in the quick select: its tab and the fields of the Relative tab. */
|
|
2273
|
+
interface QuickSelectSide {
|
|
2274
|
+
mode: 'absolute' | 'relative' | 'now';
|
|
2275
|
+
/** The amount of the Relative tab; `null` while its field is empty. */
|
|
2276
|
+
amount: number | null;
|
|
2277
|
+
unit: HxDateMathUnit;
|
|
2278
|
+
/** `ago` subtracts the amount (`now-15m`), `fromNow` adds it (`now+15m`). */
|
|
2279
|
+
direction: 'ago' | 'fromNow';
|
|
2280
|
+
/** Rounds to the unit (`now-15m/m`). */
|
|
2281
|
+
round: boolean;
|
|
2282
|
+
/** An expression from outside that the fields cannot show (`now-1d/d+2h`); used as is until a field changes. */
|
|
2283
|
+
raw: string | null;
|
|
2284
|
+
}
|
|
2285
|
+
declare const DEFAULT_SIDE: QuickSelectSide;
|
|
2286
|
+
/** A side of the range: `from` (Start) or `to` (End). */
|
|
2287
|
+
type Side = 'from' | 'to';
|
|
2288
|
+
type SideMode = QuickSelectSide['mode'];
|
|
2289
|
+
/** The tabs of a side, in their order. */
|
|
2290
|
+
declare const SIDE_MODES: readonly SideMode[];
|
|
2291
|
+
declare const ABSOLUTE_SIDES: Readonly<Record<Side, QuickSelectSide>>;
|
|
2292
|
+
/**
|
|
2293
|
+
* The side state for an expression: `now` is the Now tab, `now-15m`, `now+2d/d` or `now/w` the Relative tab,
|
|
2294
|
+
* another valid date math expression the Relative tab with `raw`; anything else (an ISO date) is absolute.
|
|
2295
|
+
*/
|
|
2296
|
+
declare function sideFromExpression(expression: string): QuickSelectSide;
|
|
2297
|
+
/**
|
|
2298
|
+
* The date math expression of a relative or now side (`now-15m`, `now+2d/d`); `null` for an absolute side and for
|
|
2299
|
+
* a relative side whose amount is empty, not a number or negative (it is not taken as `now`).
|
|
2300
|
+
*/
|
|
2301
|
+
declare function sideExpression(side: QuickSelectSide): string | null;
|
|
2302
|
+
/**
|
|
2303
|
+
* Resolves one side: date math against `now` (rounding up for the end), else an ISO date-time; a date-only ISO
|
|
2304
|
+
* text (`2026-10-14`) is local midnight, as `new Date(2026, 9, 14)`, not UTC. `null` when unreadable.
|
|
2305
|
+
*/
|
|
2306
|
+
export declare function hxResolveRangeSide(expression: string, options?: {
|
|
2307
|
+
now?: Date;
|
|
2308
|
+
firstDayOfWeek?: number;
|
|
2309
|
+
roundUp?: boolean;
|
|
2310
|
+
}): Date | null;
|
|
2311
|
+
/**
|
|
2312
|
+
* Resolves a range expression (as the picker's `expression` model holds it) against the current time: `from`
|
|
2313
|
+
* rounds down, `to` rounds up (`now/d` to `now/d` is today from 00:00 to 23:59:59.999).
|
|
2314
|
+
*/
|
|
2315
|
+
export declare function hxResolveRangeExpression(range: HxDateRangeExpression, options?: {
|
|
2316
|
+
now?: Date;
|
|
2317
|
+
firstDayOfWeek?: number;
|
|
2318
|
+
}): {
|
|
2319
|
+
from: Date | null;
|
|
2320
|
+
to: Date | null;
|
|
2321
|
+
};
|
|
2322
|
+
/**
|
|
2323
|
+
* The one-line summary of a relative or now side (`~ 15 minutes ago`, `now`, `~ 2 days from now, rounded to the
|
|
2324
|
+
* day`); a raw expression as is, `emptySide` for an amount that gives no expression. `null` for an absolute side.
|
|
2325
|
+
*/
|
|
2326
|
+
declare function describeSide(side: QuickSelectSide, labels: HxQuickSelectLabels): string | null;
|
|
2327
|
+
/**
|
|
2328
|
+
* A label for a range: the label of a commonly used range with the same expressions, `Last 15 minutes` /
|
|
2329
|
+
* `Next 2 days`, else both sides (`now-1d/d - now`, absolute sides through `formatDate`).
|
|
2330
|
+
*/
|
|
2331
|
+
declare function describeRange(range: HxDateRangeExpression, labels: HxQuickSelectLabels, common: readonly HxQuickSelectRange[], formatDate: (date: Date) => string, separator?: string): string;
|
|
2332
|
+
/**
|
|
2333
|
+
* The recently used ranges stored under `key`: empty when nothing (valid) is stored, `null` when there is no key
|
|
2334
|
+
* or the storage cannot be read (blocked), so the caller can keep its in-memory list.
|
|
2335
|
+
*/
|
|
2336
|
+
declare function readRecentRanges(key: string | null): HxDateRangeExpression[] | null;
|
|
2337
|
+
/** Stores the recently used ranges; does nothing when storage is blocked or full. */
|
|
2338
|
+
declare function writeRecentRanges(key: string | null, ranges: readonly HxDateRangeExpression[]): void;
|
|
2339
|
+
/** Puts `range` first, drops an equal older entry and keeps at most `max` entries. */
|
|
2340
|
+
declare function addRecentRange(ranges: readonly HxDateRangeExpression[], range: HxDateRangeExpression, max?: number): HxDateRangeExpression[];
|
|
2341
|
+
/** The value of `hx-date-range-quick-select`: the resolved start and end (`null` while a side is empty). */
|
|
2342
|
+
interface HxDateRangeQuickSelectValue {
|
|
2343
|
+
from: Date | null;
|
|
2344
|
+
to: Date | null;
|
|
2345
|
+
}
|
|
2346
|
+
/**
|
|
2347
|
+
* A Kibana-style quick select for a date range: one read-only field with a button that opens a compact popup with
|
|
2348
|
+
* *Quick select* (Last/Next N unit, Apply), *Commonly used*, *Recently used* (the last five applied ranges, kept in
|
|
2349
|
+
* `localStorage` under `recentStorageKey`) and one summary line each for the start and the end.
|
|
2350
|
+
*
|
|
2351
|
+
* ```html
|
|
2352
|
+
* <hx-date-range-quick-select [(ngModel)]="range" [(expression)]="expression" />
|
|
2353
|
+
* ```
|
|
2354
|
+
*
|
|
2355
|
+
* A click on the start or the end opens the editor of that side alone: the tabs *Absolute* (a typed date and the
|
|
2356
|
+
* calendar), *Relative* (amount, unit, round to the unit, the resolved date) and *Now*. Escape closes the innermost
|
|
2357
|
+
* open layer: the side editor first, then the popup.
|
|
2358
|
+
*
|
|
2359
|
+
* Apply and a click on a commonly or recently used range commit the range at once and close the popup; an edit in
|
|
2360
|
+
* the side editor commits that side at once and keeps the popup open (the range is added to *Recently used* when
|
|
2361
|
+
* the popup closes). An edit that puts the start after the end swaps the ends (the editor follows the edited side),
|
|
2362
|
+
* as Apply and the lists do. An edit that cannot be applied (an empty amount, an unreadable date) keeps the last
|
|
2363
|
+
* applied range and shows the inline message until the side changes or its editor closes. Date math
|
|
2364
|
+
* (`now-15m`, `now/d`) is resolved against the current time when the range is applied; the value is
|
|
2365
|
+
* `{ from, to }` (moved into `minDate`..`maxDate`) and the expressions are in the `expression` model (`null` for an
|
|
2366
|
+
* absolute range). A range that cannot be applied (an amount out of range, an unreadable side) keeps the popup open
|
|
2367
|
+
* with an inline message. It works with `ngModel`, reactive forms and signal forms (`[formField]`). To restore a
|
|
2368
|
+
* persisted `expression`, bind the value resolved from it (`hxResolveRangeExpression`) with it: a value written from
|
|
2369
|
+
* outside keeps the expression only when it has the same times (see `expression`).
|
|
2370
|
+
*/
|
|
2371
|
+
export declare class HxDateRangeQuickSelect implements ControlValueAccessor, FormValueControl<HxDateRangeQuickSelectValue> {
|
|
2372
|
+
#private;
|
|
2373
|
+
/** The texts of the quick select; any text left out stays English. */
|
|
2374
|
+
readonly labels: import("@angular/core").InputSignal<Partial<HxQuickSelectLabels>>;
|
|
2375
|
+
/** The "Commonly used" ranges. */
|
|
2376
|
+
readonly commonlyUsed: import("@angular/core").InputSignal<readonly HxQuickSelectRange[]>;
|
|
2377
|
+
/** The `localStorage` key of the "Recently used" list; `null` keeps the list only while the control lives. */
|
|
2378
|
+
readonly recentStorageKey: import("@angular/core").InputSignal<string | null>;
|
|
2379
|
+
/**
|
|
2380
|
+
* The applied range as expressions (`{ from: 'now-15m', to: 'now' }`, an absolute side as an ISO date-time);
|
|
2381
|
+
* `null` for an absolute range, and when `value` is set from outside (`writeValue`, a form's `setValue`/`reset`, a
|
|
2382
|
+
* new `[value]`) to a different range without a new expression with it. A value written with the same times as the
|
|
2383
|
+
* last one, or with the times the expression resolves to now (within a second, as `hxResolveRangeExpression` gives
|
|
2384
|
+
* them), keeps the expression: a persisted expression with `[(ngModel)]` survives ngModel's later `writeValue` when
|
|
2385
|
+
* the model holds the range resolved from it. Setting it from outside does not change `value` (resolve it yourself
|
|
2386
|
+
* with `hxResolveRangeExpression`); it changes the field's text and the summary. When the resolved ends come out
|
|
2387
|
+
* reversed (`now+1d` to `now`), the value is ordered and the expression is swapped with it.
|
|
2388
|
+
*/
|
|
2389
|
+
readonly expression: import("@angular/core").ModelSignal<HxDateRangeExpression | null>;
|
|
2390
|
+
readonly minDate: import("@angular/core").InputSignal<Date | null>;
|
|
2391
|
+
readonly maxDate: import("@angular/core").InputSignal<Date | null>;
|
|
2392
|
+
readonly firstDayOfWeek: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
2393
|
+
readonly locale: import("@angular/core").InputSignal<string | undefined>;
|
|
2394
|
+
/** The format of absolute dates in the field, the summary and the Recently used list. */
|
|
2395
|
+
readonly dateFormat: import("@angular/core").InputSignal<Intl.DateTimeFormatOptions | undefined>;
|
|
2396
|
+
/** The text between the two dates. */
|
|
2397
|
+
readonly separator: import("@angular/core").InputSignal<string>;
|
|
2398
|
+
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
2399
|
+
readonly chooseLabel: import("@angular/core").InputSignal<string>;
|
|
2400
|
+
/** The `id` of the text field, for a `<label for>`. */
|
|
2401
|
+
readonly inputId: import("@angular/core").InputSignal<string | undefined>;
|
|
2402
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
2403
|
+
readonly ariaLabelledby: import("@angular/core").InputSignal<string | undefined>;
|
|
2404
|
+
readonly value: import("@angular/core").ModelSignal<HxDateRangeQuickSelectValue>;
|
|
2405
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2406
|
+
readonly invalid: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2407
|
+
readonly touch: import("@angular/core").OutputEmitterRef<void>;
|
|
2408
|
+
readonly open: import("@angular/core").WritableSignal<boolean>;
|
|
2409
|
+
protected readonly popupId: string;
|
|
2410
|
+
protected readonly positions: ConnectedPosition[];
|
|
2411
|
+
/** Last/Next N unit. */
|
|
2412
|
+
protected readonly quickDirection: import("@angular/core").WritableSignal<"next" | "last">;
|
|
2413
|
+
/** The amount as typed: an emptied field stays empty (it does not turn into `0`). */
|
|
2414
|
+
protected readonly quickAmount: import("@angular/core").WritableSignal<string>;
|
|
2415
|
+
protected readonly quickUnit: import("@angular/core").WritableSignal<HxDateMathUnit>;
|
|
2416
|
+
protected readonly recent: import("@angular/core").WritableSignal<HxDateRangeExpression[]>;
|
|
2417
|
+
/** A range could not be applied; shown under the lists and named by the Apply button. */
|
|
2418
|
+
protected readonly quickError: import("@angular/core").WritableSignal<boolean>;
|
|
2419
|
+
protected readonly quickErrorId: string;
|
|
2420
|
+
/** The two sides of the summary, Start then End. */
|
|
2421
|
+
protected readonly sideKeys: readonly Side[];
|
|
2422
|
+
protected readonly sideModes: readonly ("now" | "absolute" | "relative")[];
|
|
2423
|
+
/** The side whose editor (tabs Absolute / Relative / Now) is open under the summary; one at a time. */
|
|
2424
|
+
protected readonly openSide: import("@angular/core").WritableSignal<Side | null>;
|
|
2425
|
+
/** The tab and the Relative fields of each side as edited; may hold an edit that was refused. */
|
|
2426
|
+
protected readonly sides: import("@angular/core").WritableSignal<Record<Side, QuickSelectSide>>;
|
|
2427
|
+
/** An edit in the side editor was refused; the same message as `quickError`, named by the edited side. */
|
|
2428
|
+
protected readonly sideError: import("@angular/core").WritableSignal<boolean>;
|
|
2429
|
+
/** The calendar of the Absolute tab: the focused day, the view and today. */
|
|
2430
|
+
protected readonly calendarFocus: import("@angular/core").WritableSignal<Date>;
|
|
2431
|
+
protected readonly calendarView: import("@angular/core").WritableSignal<CalendarView>;
|
|
2432
|
+
protected readonly today: import("@angular/core").WritableSignal<Date>;
|
|
2433
|
+
protected readonly calendarTitleId: string;
|
|
2434
|
+
protected readonly texts: import("@angular/core").Signal<HxQuickSelectLabels>;
|
|
2435
|
+
protected readonly directionOptions: import("@angular/core").Signal<{
|
|
2436
|
+
label: string;
|
|
2437
|
+
value: string;
|
|
2438
|
+
}[]>;
|
|
2439
|
+
protected readonly unitOptions: import("@angular/core").Signal<{
|
|
2440
|
+
label: string;
|
|
2441
|
+
value: HxDateMathUnit;
|
|
2442
|
+
}[]>;
|
|
2443
|
+
/** The unit and direction of a relative side in one select (`Minutes ago`, `Minutes from now`). */
|
|
2444
|
+
protected readonly relativeOptions: import("@angular/core").Signal<{
|
|
2445
|
+
label: string;
|
|
2446
|
+
value: string;
|
|
2447
|
+
}[]>;
|
|
2448
|
+
protected readonly recentItems: import("@angular/core").Signal<{
|
|
2449
|
+
range: HxDateRangeExpression;
|
|
2450
|
+
label: string;
|
|
2451
|
+
}[]>;
|
|
2452
|
+
protected readonly isDisabled: import("@angular/core").Signal<boolean>;
|
|
2453
|
+
/** The field: the label of the expression (`Last 15 minutes`), else the two dates. */
|
|
2454
|
+
protected readonly text: import("@angular/core").Signal<string>;
|
|
2455
|
+
private readonly field;
|
|
2456
|
+
private readonly quickFirst;
|
|
2457
|
+
/** The summary buttons and the tabs live in the overlay, outside the host: found through the view, not the document. */
|
|
2458
|
+
private readonly sideButtons;
|
|
2459
|
+
private readonly sideTabs;
|
|
2460
|
+
constructor();
|
|
2461
|
+
writeValue(value: HxDateRangeQuickSelectValue | null): void;
|
|
2462
|
+
registerOnChange(fn: (value: HxDateRangeQuickSelectValue) => void): void;
|
|
2463
|
+
registerOnTouched(fn: () => void): void;
|
|
2464
|
+
setDisabledState(disabled: boolean): void;
|
|
2465
|
+
/** Focuses the field (signal forms call this to focus the control). */
|
|
2466
|
+
focus(): void;
|
|
2467
|
+
/** Opening the popup: the recently used list from storage, no message, no side editor, no refused edit. */
|
|
2468
|
+
protected show(): void;
|
|
2469
|
+
protected toggle(): void;
|
|
2470
|
+
/**
|
|
2471
|
+
* Closes the popup, also when the overlay detaches itself (`detach`): a refused edit goes back, the side editor
|
|
2472
|
+
* closes and the range of the side editor is added to Recently used.
|
|
2473
|
+
*/
|
|
2474
|
+
protected close(refocus?: boolean): void;
|
|
2475
|
+
protected onAttach(): void;
|
|
2476
|
+
/** The read-only field opens with Enter, Space, Arrow Down or Alt+Arrow Up. */
|
|
2477
|
+
protected onFieldKeydown(event: KeyboardEvent): void;
|
|
2478
|
+
/** Escape closes the innermost open layer: the side editor first, then the popup. */
|
|
2479
|
+
protected onOverlayKeydown(event: KeyboardEvent): void;
|
|
2480
|
+
protected onOutsideClick(event: MouseEvent): void;
|
|
2481
|
+
protected setQuickDirection(direction: unknown): void;
|
|
2482
|
+
protected setQuickAmount(event: Event): void;
|
|
2483
|
+
protected setQuickUnit(unit: unknown): void;
|
|
2484
|
+
/**
|
|
2485
|
+
* Applies *Last/Next N unit* at once; an amount that is not a positive safe integer, or one whose date is out of
|
|
2486
|
+
* the range of `Date`, shows the inline message instead.
|
|
2487
|
+
*/
|
|
2488
|
+
protected applyQuick(): void;
|
|
2489
|
+
/** A commonly or recently used range is applied at once; a refused one shows the inline message. */
|
|
2490
|
+
protected applyRange(range: HxDateRangeExpression): void;
|
|
2491
|
+
/**
|
|
2492
|
+
* The summary line of a side as applied: a relative or now side (`~ 15 minutes ago`, `now`), else the date of the
|
|
2493
|
+
* value, else `Not set`.
|
|
2494
|
+
*/
|
|
2495
|
+
protected sideSummary(side: Side): string;
|
|
2496
|
+
protected sideButtonId(side: Side): string;
|
|
2497
|
+
protected editorId(side: Side): string;
|
|
2498
|
+
protected tabId(side: Side, mode: SideMode): string;
|
|
2499
|
+
protected panelId(side: Side): string;
|
|
2500
|
+
/** A click on the start or the end opens the editor of that side and focuses its tab; a second click closes it. */
|
|
2501
|
+
protected toggleSide(side: Side): void;
|
|
2502
|
+
/** Closes the side editor (a refused edit goes back to the applied side) and focuses its summary button. */
|
|
2503
|
+
protected closeSide(): void;
|
|
2504
|
+
/** A tab chosen: the side becomes absolute (its current date), relative or now, and is applied at once. */
|
|
2505
|
+
protected setSideMode(side: Side, mode: SideMode): void;
|
|
2506
|
+
/** Arrow Left/Right move between the tabs of a side (wrapping), Home and End go to the first and last. */
|
|
2507
|
+
protected onTabKeydown(side: Side, event: KeyboardEvent): void;
|
|
2508
|
+
/** The amount of a Relative tab; an emptied field is `null` (refused, and shown empty), not `0` (`now`). */
|
|
2509
|
+
protected setSideAmount(side: Side, event: Event): void;
|
|
2510
|
+
protected setSideUnit(side: Side, value: unknown): void;
|
|
2511
|
+
protected setSideRound(side: Side, event: Event): void;
|
|
2512
|
+
protected sideUnitValue(side: Side): string;
|
|
2513
|
+
protected sideRoundLabel(side: Side): string;
|
|
2514
|
+
protected sideExpressionText(side: Side): string;
|
|
2515
|
+
/** `Resolves to <date>`: a relative or now side as it would be applied at this moment (inside the limits). */
|
|
2516
|
+
protected sideResolvedText(side: Side): string;
|
|
2517
|
+
/** The date of an absolute side in its text field. */
|
|
2518
|
+
protected sideText(side: Side): string;
|
|
2519
|
+
/** The days of the calendar that are selected: the date of the side. */
|
|
2520
|
+
protected sideDays(side: Side): Date[];
|
|
2521
|
+
/**
|
|
2522
|
+
* The date typed on an Absolute tab (a date with a time, or a date at midnight; empty clears the side); an
|
|
2523
|
+
* unreadable date or one outside `minDate`..`maxDate` is refused with the inline message. Enter and the `change`
|
|
2524
|
+
* that follows it commit once: a text that shows the applied date is no edit.
|
|
2525
|
+
*/
|
|
2526
|
+
protected setAbsoluteSide(side: Side, event: Event): void;
|
|
2527
|
+
/**
|
|
2528
|
+
* A day picked in the calendar of an Absolute tab keeps the side's time (an empty start takes 00:00, an empty end
|
|
2529
|
+
* 23:59:59.999), inside `minDate`..`maxDate`; a disabled day is ignored.
|
|
2530
|
+
*/
|
|
2531
|
+
protected pickDay(side: Side, day: Date): void;
|
|
2532
|
+
/** The focus left the control (field, button and popup): the popup closes and the control is touched. */
|
|
2533
|
+
protected onHostFocusOut(event: FocusEvent): void;
|
|
2534
|
+
protected onPopupFocusOut(event: FocusEvent): void;
|
|
2535
|
+
protected markTouched(): void;
|
|
2536
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HxDateRangeQuickSelect, never>;
|
|
2537
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HxDateRangeQuickSelect, "hx-date-range-quick-select", never, {
|
|
2538
|
+
"labels": {
|
|
2539
|
+
"alias": "labels";
|
|
2540
|
+
"required": false;
|
|
2541
|
+
"isSignal": true;
|
|
2542
|
+
};
|
|
2543
|
+
"commonlyUsed": {
|
|
2544
|
+
"alias": "commonlyUsed";
|
|
2545
|
+
"required": false;
|
|
2546
|
+
"isSignal": true;
|
|
2547
|
+
};
|
|
2548
|
+
"recentStorageKey": {
|
|
2549
|
+
"alias": "recentStorageKey";
|
|
2550
|
+
"required": false;
|
|
2551
|
+
"isSignal": true;
|
|
2552
|
+
};
|
|
2553
|
+
"expression": {
|
|
2554
|
+
"alias": "expression";
|
|
2555
|
+
"required": false;
|
|
2556
|
+
"isSignal": true;
|
|
2557
|
+
};
|
|
2558
|
+
"minDate": {
|
|
2559
|
+
"alias": "minDate";
|
|
2560
|
+
"required": false;
|
|
2561
|
+
"isSignal": true;
|
|
2562
|
+
};
|
|
2563
|
+
"maxDate": {
|
|
2564
|
+
"alias": "maxDate";
|
|
2565
|
+
"required": false;
|
|
2566
|
+
"isSignal": true;
|
|
2567
|
+
};
|
|
2568
|
+
"firstDayOfWeek": {
|
|
2569
|
+
"alias": "firstDayOfWeek";
|
|
2570
|
+
"required": false;
|
|
2571
|
+
"isSignal": true;
|
|
2572
|
+
};
|
|
2573
|
+
"locale": {
|
|
2574
|
+
"alias": "locale";
|
|
2575
|
+
"required": false;
|
|
2576
|
+
"isSignal": true;
|
|
2577
|
+
};
|
|
2578
|
+
"dateFormat": {
|
|
2579
|
+
"alias": "dateFormat";
|
|
2580
|
+
"required": false;
|
|
2581
|
+
"isSignal": true;
|
|
2582
|
+
};
|
|
2583
|
+
"separator": {
|
|
2584
|
+
"alias": "separator";
|
|
2585
|
+
"required": false;
|
|
2586
|
+
"isSignal": true;
|
|
2587
|
+
};
|
|
2588
|
+
"placeholder": {
|
|
2589
|
+
"alias": "placeholder";
|
|
2590
|
+
"required": false;
|
|
2591
|
+
"isSignal": true;
|
|
2592
|
+
};
|
|
2593
|
+
"chooseLabel": {
|
|
2594
|
+
"alias": "chooseLabel";
|
|
2595
|
+
"required": false;
|
|
2596
|
+
"isSignal": true;
|
|
2597
|
+
};
|
|
2598
|
+
"inputId": {
|
|
2599
|
+
"alias": "inputId";
|
|
2600
|
+
"required": false;
|
|
2601
|
+
"isSignal": true;
|
|
2602
|
+
};
|
|
2603
|
+
"ariaLabel": {
|
|
2604
|
+
"alias": "ariaLabel";
|
|
2605
|
+
"required": false;
|
|
2606
|
+
"isSignal": true;
|
|
2607
|
+
};
|
|
2608
|
+
"ariaLabelledby": {
|
|
2609
|
+
"alias": "ariaLabelledby";
|
|
2610
|
+
"required": false;
|
|
2611
|
+
"isSignal": true;
|
|
2612
|
+
};
|
|
2613
|
+
"value": {
|
|
2614
|
+
"alias": "value";
|
|
2615
|
+
"required": false;
|
|
2616
|
+
"isSignal": true;
|
|
2617
|
+
};
|
|
2618
|
+
"disabled": {
|
|
2619
|
+
"alias": "disabled";
|
|
2620
|
+
"required": false;
|
|
2621
|
+
"isSignal": true;
|
|
2622
|
+
};
|
|
2623
|
+
"invalid": {
|
|
2624
|
+
"alias": "invalid";
|
|
2625
|
+
"required": false;
|
|
2626
|
+
"isSignal": true;
|
|
2627
|
+
};
|
|
2628
|
+
}, {
|
|
2629
|
+
"expression": "expressionChange";
|
|
2630
|
+
"value": "valueChange";
|
|
2631
|
+
"touch": "touch";
|
|
2632
|
+
}, never, never, true, never>;
|
|
2633
|
+
}
|
|
2090
2634
|
type TimeUnit = 'hour' | 'minute' | 'second' | 'period';
|
|
2091
2635
|
interface TimeColumn {
|
|
2092
2636
|
unit: TimeUnit;
|
|
@@ -2650,12 +3194,6 @@ interface HxDateTimeRangeValue {
|
|
|
2650
3194
|
from: Date | null;
|
|
2651
3195
|
to: Date | null;
|
|
2652
3196
|
}
|
|
2653
|
-
/** A relative range in the popup's preset list; `from` and `to` are read when it is chosen (`now` stays current). */
|
|
2654
|
-
interface HxDateTimeRangePreset {
|
|
2655
|
-
label: string;
|
|
2656
|
-
from: () => Date;
|
|
2657
|
-
to: () => Date;
|
|
2658
|
-
}
|
|
2659
3197
|
/**
|
|
2660
3198
|
* A from and a to date-time range in one field with one button. The field shows the range as one text
|
|
2661
3199
|
* (`1/1/2026 00:00 - 1/2/2026 00:15`); the popup holds one calendar (an inline range `hx-date-picker`) and a time picker for each end,
|
|
@@ -2686,6 +3224,8 @@ export declare class HxDateTimeRangePicker implements ControlValueAccessor, Form
|
|
|
2686
3224
|
readonly presetsLabel: import("@angular/core").InputSignal<string>;
|
|
2687
3225
|
/** Ready-made ranges listed in the popup; choosing one fills the draft, Submit applies it. */
|
|
2688
3226
|
readonly presets: import("@angular/core").InputSignal<readonly HxDateTimeRangePreset[]>;
|
|
3227
|
+
/** The presets as a row of `buttons` (default) or in a compact `select`. */
|
|
3228
|
+
readonly presetDisplay: import("@angular/core").InputSignal<"select" | "buttons">;
|
|
2689
3229
|
readonly clearLabel: import("@angular/core").InputSignal<string>;
|
|
2690
3230
|
readonly cancelLabel: import("@angular/core").InputSignal<string>;
|
|
2691
3231
|
readonly submitLabel: import("@angular/core").InputSignal<string>;
|
|
@@ -2720,6 +3260,8 @@ export declare class HxDateTimeRangePicker implements ControlValueAccessor, Form
|
|
|
2720
3260
|
readonly open: import("@angular/core").WritableSignal<boolean>;
|
|
2721
3261
|
/** The range being edited in the popup; Submit makes it the value, Cancel drops it. */
|
|
2722
3262
|
protected readonly draft: import("@angular/core").WritableSignal<HxDateTimeRangeValue>;
|
|
3263
|
+
/** The preset chosen in the select (shown until the draft changes otherwise or the popup opens again). */
|
|
3264
|
+
protected readonly selectedPreset: import("@angular/core").WritableSignal<HxDateTimeRangePreset | null>;
|
|
2723
3265
|
protected readonly popupId: string;
|
|
2724
3266
|
protected readonly positions: ConnectedPosition[];
|
|
2725
3267
|
private readonly field;
|
|
@@ -2753,9 +3295,12 @@ export declare class HxDateTimeRangePicker implements ControlValueAccessor, Form
|
|
|
2753
3295
|
protected commitTyping(): void;
|
|
2754
3296
|
protected onOverlayKeydown(event: KeyboardEvent): void;
|
|
2755
3297
|
protected onOutsideClick(event: MouseEvent): void;
|
|
3298
|
+
/** Empties the draft; Submit applies the empty range. */
|
|
2756
3299
|
protected clear(): void;
|
|
3300
|
+
/** A preset chosen (a button or the select): fills the draft; the select shows it (staging resets it, so set after). */
|
|
3301
|
+
protected selectPreset(preset: HxDateTimeRangePreset): void;
|
|
2757
3302
|
/** Puts a preset into the draft (the calendar and the time pickers show it); Submit commits it. */
|
|
2758
|
-
protected applyPreset(preset: HxDateTimeRangePreset):
|
|
3303
|
+
protected applyPreset(preset: HxDateTimeRangePreset): boolean;
|
|
2759
3304
|
protected submit(): void;
|
|
2760
3305
|
/** The focus left the control (field, button and popup): the popup closes and the control is touched. */
|
|
2761
3306
|
protected onHostFocusOut(event: FocusEvent): void;
|
|
@@ -2801,6 +3346,11 @@ export declare class HxDateTimeRangePicker implements ControlValueAccessor, Form
|
|
|
2801
3346
|
"required": false;
|
|
2802
3347
|
"isSignal": true;
|
|
2803
3348
|
};
|
|
3349
|
+
"presetDisplay": {
|
|
3350
|
+
"alias": "presetDisplay";
|
|
3351
|
+
"required": false;
|
|
3352
|
+
"isSignal": true;
|
|
3353
|
+
};
|
|
2804
3354
|
"clearLabel": {
|
|
2805
3355
|
"alias": "clearLabel";
|
|
2806
3356
|
"required": false;
|
|
@@ -5127,6 +5677,10 @@ export declare class HxRating implements ControlValueAccessor, FormValueControl<
|
|
|
5127
5677
|
}
|
|
5128
5678
|
type HxSelectSize = 'small' | 'medium' | 'large';
|
|
5129
5679
|
type HxSelectVariant = 'outlined' | 'filled';
|
|
5680
|
+
/** The class of the select's list overlay (the CDK pane): a popup holding a select treats it as its own. */
|
|
5681
|
+
declare const HX_SELECT_OVERLAY_CLASS = "hx-select-overlay";
|
|
5682
|
+
/** Whether `target` lies in the list overlay of an `hx-select` (a click or a focus move into an open list). */
|
|
5683
|
+
declare function isInSelectOverlay(target: EventTarget | null | undefined): boolean;
|
|
5130
5684
|
/** An option as the select works with it, after `optionLabel`/`optionValue`/`optionDisabled` are applied. */
|
|
5131
5685
|
type HxSelectItem<V = unknown> = HxOption<V>;
|
|
5132
5686
|
/**
|
|
@@ -5147,6 +5701,7 @@ type HxSelectItem<V = unknown> = HxOption<V>;
|
|
|
5147
5701
|
*/
|
|
5148
5702
|
export declare class HxSelect<V = unknown> implements ControlValueAccessor, FormValueControl<V | null> {
|
|
5149
5703
|
#private;
|
|
5704
|
+
protected readonly overlayClass = "hx-select-overlay";
|
|
5150
5705
|
/** The options: primitives or objects. */
|
|
5151
5706
|
readonly options: import("@angular/core").InputSignal<readonly unknown[]>;
|
|
5152
5707
|
readonly optionLabel: import("@angular/core").InputSignal<Accessor<never, string>>;
|
|
@@ -5170,6 +5725,8 @@ export declare class HxSelect<V = unknown> implements ControlValueAccessor, Form
|
|
|
5170
5725
|
readonly inputId: import("@angular/core").InputSignal<string | undefined>;
|
|
5171
5726
|
readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
5172
5727
|
readonly ariaLabelledby: import("@angular/core").InputSignal<string | undefined>;
|
|
5728
|
+
/** The `id` of a text that describes the select (a message about the last choice). */
|
|
5729
|
+
readonly ariaDescribedby: import("@angular/core").InputSignal<string | null | undefined>;
|
|
5173
5730
|
/** How values are compared to find the selected option (default: `Object.is`). */
|
|
5174
5731
|
readonly compareWith: import("@angular/core").InputSignal<(a: unknown, b: unknown) => boolean>;
|
|
5175
5732
|
readonly value: import("@angular/core").ModelSignal<V | null>;
|
|
@@ -5295,6 +5852,11 @@ export declare class HxSelect<V = unknown> implements ControlValueAccessor, Form
|
|
|
5295
5852
|
"required": false;
|
|
5296
5853
|
"isSignal": true;
|
|
5297
5854
|
};
|
|
5855
|
+
"ariaDescribedby": {
|
|
5856
|
+
"alias": "ariaDescribedby";
|
|
5857
|
+
"required": false;
|
|
5858
|
+
"isSignal": true;
|
|
5859
|
+
};
|
|
5298
5860
|
"compareWith": {
|
|
5299
5861
|
"alias": "compareWith";
|
|
5300
5862
|
"required": false;
|
|
@@ -6715,4 +7277,4 @@ export declare class HxTree {
|
|
|
6715
7277
|
"nodeCollapse": "nodeCollapse";
|
|
6716
7278
|
}, ["template"], never, true, never>;
|
|
6717
7279
|
}
|
|
6718
|
-
export type { HxAccordionValue, HxAutoCompleteEvent, HxAutoCompleteSize, HxAvatarShape, HxAvatarSize, HxBadgeSeverity, HxBadgeSize, HxBreadcrumbItem, HxButtonSeverity, HxButtonSize, HxButtonVariant, HxCarouselItemContext, HxCarouselOrientation, HxCarouselResponsiveOption, HxCellContext, HxCheckboxSize, HxColumn, HxColumnAlign, HxColumnHeaderContext, HxConfirmation, HxDatePickerSelectionMode, HxDatePickerValue, HxDateTimePickerValue, HxDateTimeRangePreset, HxDateTimeRangeValue, HxDialogConfig, HxDialogPosition, HxDividerAlign, HxDividerLayout, HxDividerType, HxDrawerPosition, HxFileUploadMode, HxFloatLabelVariant, HxGalleriaItem, HxGalleriaItemContext, HxGalleriaThumbnailsPosition, HxIconPosition, HxInputNumberButtonLayout, HxInputNumberMode, HxInputNumberSize, HxInputNumberVariant, HxInputSize, HxInputVariant, HxLazyLoadEvent, HxMenuItem, HxMenuItemCommandEvent, HxMessageSeverity, HxMessageSize, HxMessageVariant, HxMultiSelectDisplay, HxMultiSelectSize, HxMultiSelectVariant, HxPageEvent, HxPrimaryColor, HxProgressMode, HxRadioSize, HxRowClass, HxSelectButtonSize, HxSelectItem, HxSelectSize, HxSelectVariant, HxSelectionMode, HxSkeletonAnimation, HxSkeletonShape, HxSliderOrientation, HxSliderValue, HxSortFirstOrder, HxSortFunction, HxSortMeta, HxSortMode, HxStepContentContext, HxStepValue, HxSurface, HxTableColumnsContext, HxTableRowContext, HxTableSize, HxTagSeverity, HxThemeOptions, HxTimePickerValue, HxTimelineAlign, HxTimelineContext, HxTimelineLayout, HxToastMessage, HxToastMessageInput, HxToastPosition, HxToastSeverity, HxToggleButtonSize, HxTooltipEvent, HxTooltipPosition, HxTreeFilterMode, HxTreeNode, HxTreeNodeContext, HxTreeNodeEvent, HxTreeSelection, HxTreeSelectionMode };
|
|
7280
|
+
export type { HxAccordionValue, HxAutoCompleteEvent, HxAutoCompleteSize, HxAvatarShape, HxAvatarSize, HxBadgeSeverity, HxBadgeSize, HxBreadcrumbItem, HxButtonSeverity, HxButtonSize, HxButtonVariant, HxCarouselItemContext, HxCarouselOrientation, HxCarouselResponsiveOption, HxCellContext, HxCheckboxSize, HxColumn, HxColumnAlign, HxColumnHeaderContext, HxConfirmation, HxDateMathOptions, HxDateMathUnit, HxDatePickerSelectionMode, HxDatePickerValue, HxDateRangeExpression, HxDateRangePresetId, HxDateRangeQuickSelectValue, HxDateTimePickerValue, HxDateTimeRangePreset, HxDateTimeRangePresetContext, HxDateTimeRangeValue, HxDialogConfig, HxDialogPosition, HxDividerAlign, HxDividerLayout, HxDividerType, HxDrawerPosition, HxFileUploadMode, HxFloatLabelVariant, HxGalleriaItem, HxGalleriaItemContext, HxGalleriaThumbnailsPosition, HxIconPosition, HxInputNumberButtonLayout, HxInputNumberMode, HxInputNumberSize, HxInputNumberVariant, HxInputSize, HxInputVariant, HxLazyLoadEvent, HxMenuItem, HxMenuItemCommandEvent, HxMessageSeverity, HxMessageSize, HxMessageVariant, HxMultiSelectDisplay, HxMultiSelectSize, HxMultiSelectVariant, HxPageEvent, HxPrimaryColor, HxProgressMode, HxQuickSelectLabels, HxQuickSelectRange, HxRadioSize, HxRowClass, HxSelectButtonSize, HxSelectItem, HxSelectSize, HxSelectVariant, HxSelectionMode, HxSkeletonAnimation, HxSkeletonShape, HxSliderOrientation, HxSliderValue, HxSortFirstOrder, HxSortFunction, HxSortMeta, HxSortMode, HxStepContentContext, HxStepValue, HxSurface, HxTableColumnsContext, HxTableRowContext, HxTableSize, HxTagSeverity, HxThemeOptions, HxTimePickerValue, HxTimelineAlign, HxTimelineContext, HxTimelineLayout, HxToastMessage, HxToastMessageInput, HxToastPosition, HxToastSeverity, HxToggleButtonSize, HxTooltipEvent, HxTooltipPosition, HxTreeFilterMode, HxTreeNode, HxTreeNodeContext, HxTreeNodeEvent, HxTreeSelection, HxTreeSelectionMode };
|