@forgeroute/ui 0.4.96 → 0.4.98
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
package/types/forgeroute-ui.d.ts
CHANGED
|
@@ -3178,10 +3178,21 @@ export declare function issueToErrors(issue: FieldIssue | null): ValidationError
|
|
|
3178
3178
|
export declare function requiredIssue(label: string): FieldIssue;
|
|
3179
3179
|
/** "Too long (max N characters)." when the trimmed text is longer than `max`. */
|
|
3180
3180
|
export declare function maxLengthIssue(text: string, max: number | undefined | null): FieldIssue | null;
|
|
3181
|
+
/**
|
|
3182
|
+
* An overlay that keeps the fields projected into it ALIVE while it is closed (`ui-side-panel`, `ui-modal`: Angular creates projected content with the host's template,
|
|
3183
|
+
* whether or not the overlay renders it). It provides this token, and every field (through [createFieldReveal]) forgets that it was blurred each time the overlay opens or
|
|
3184
|
+
* closes, so a field the user left before pressing Cancel / the close button is clean again when the overlay is opened the next time.
|
|
3185
|
+
*/
|
|
3186
|
+
export interface UiFieldRevealHost {
|
|
3187
|
+
readonly open: Signal<boolean>;
|
|
3188
|
+
}
|
|
3189
|
+
export declare const UI_FIELD_REVEAL_HOST: InjectionToken<UiFieldRevealHost>;
|
|
3181
3190
|
/**
|
|
3182
3191
|
* Touched / reveal bookkeeping shared by the inputs. Messages (built-in AND a host `[error]`) are shown only once the user
|
|
3183
3192
|
* interacted with the field itself (blurred it) OR the host sets `showErrors` (a failed Save / submit click), which reveals an untouched field at once.
|
|
3184
|
-
* Switching `showErrors` from true back to false (the host closing / re-initialising its form) clears the touched state again, so no red field is left.
|
|
3193
|
+
* Switching `showErrors` from true back to false (the host closing / re-initialising its form) clears the touched state again, so no red field is left.
|
|
3194
|
+
* A field inside a `ui-side-panel` / `ui-modal` ([UI_FIELD_REVEAL_HOST]) also clears the touched state whenever that overlay opens or closes: a message never shows on open,
|
|
3195
|
+
* on close or after Cancel for a field the user did not leave in THIS visit. Must be called from an injection context.
|
|
3185
3196
|
*/
|
|
3186
3197
|
export declare function createFieldReveal(showErrors: Signal<boolean>): {
|
|
3187
3198
|
touched: WritableSignal<boolean>;
|
|
@@ -5472,7 +5483,7 @@ export declare class AudioPlayerComponent {
|
|
|
5472
5483
|
/** Accessible name of the player. */
|
|
5473
5484
|
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
5474
5485
|
/** How much to load before play: 'metadata' (default), 'auto' or 'none'. */
|
|
5475
|
-
readonly preload: import("@angular/core").InputSignal<"
|
|
5486
|
+
readonly preload: import("@angular/core").InputSignal<"auto" | "none" | "metadata">;
|
|
5476
5487
|
/** Fires when the browser can't load or decode the source. */
|
|
5477
5488
|
readonly playbackError: import("@angular/core").OutputEmitterRef<void>;
|
|
5478
5489
|
protected readonly failed: import("@angular/core").WritableSignal<boolean>;
|
|
@@ -10150,7 +10161,7 @@ export declare class DropdownComponent {
|
|
|
10150
10161
|
readonly loader: import("@angular/core").InputSignal<(() => Promise<DropdownItem[]>) | null>;
|
|
10151
10162
|
readonly active: import("@angular/core").InputSignal<boolean>;
|
|
10152
10163
|
readonly activeValue: import("@angular/core").InputSignal<string>;
|
|
10153
|
-
readonly variant: import("@angular/core").InputSignal<"
|
|
10164
|
+
readonly variant: import("@angular/core").InputSignal<"badge" | "button">;
|
|
10154
10165
|
/** Trigger size for `variant="button"`: `sm` (default, the compact toolbar look) or `md` (same padding and type as a medium `ui-button`). */
|
|
10155
10166
|
readonly size: import("@angular/core").InputSignal<"sm" | "md">;
|
|
10156
10167
|
readonly menuWidth: import("@angular/core").InputSignal<string>;
|
|
@@ -10483,7 +10494,7 @@ export declare class FormRowComponent {
|
|
|
10483
10494
|
* child simply takes the full width. Keep a numeric span within the row's `cols` (use `all` for the whole row).
|
|
10484
10495
|
*/
|
|
10485
10496
|
export declare class FormColSpanDirective {
|
|
10486
|
-
readonly uiColSpan: import("@angular/core").InputSignal<"" | 2 |
|
|
10497
|
+
readonly uiColSpan: import("@angular/core").InputSignal<"" | 2 | "2" | "3" | 3 | "all">;
|
|
10487
10498
|
protected readonly _class: import("@angular/core").Signal<string>;
|
|
10488
10499
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormColSpanDirective, never>;
|
|
10489
10500
|
static ɵdir: i0.ɵɵDirectiveDeclaration<FormColSpanDirective, "[uiColSpan]", never, {
|
|
@@ -11920,6 +11931,21 @@ export interface UsStateOption {
|
|
|
11920
11931
|
export declare const US_STATES: UsStateOption[];
|
|
11921
11932
|
/** The name of a state in the app's active language (`usState.<code>` labels); the given English name when the code is unknown. */
|
|
11922
11933
|
export declare function usStateName(code: string, fallback?: string): string;
|
|
11934
|
+
/**
|
|
11935
|
+
* THE State select options for every app, so every State dropdown shows the same names in the same order: the 50 states (+ DC only with `includeDc: true`),
|
|
11936
|
+
* each labelled with the state NAME (in the app's active language when the `usState.<code>` labels have one, else English), sorted A to Z by that label.
|
|
11937
|
+
* `store` is what the form saves: `'code'` (default) = the two-letter code, `'name'` = the English state name. `label` overrides how a state is worded
|
|
11938
|
+
* (an app that keeps its own translations of the names). Pass the result to `<ui-select [options]>` or `<ui-address-input [states]>`.
|
|
11939
|
+
*/
|
|
11940
|
+
export declare function usStateSelectOptions(opts?: {
|
|
11941
|
+
store?: 'code' | 'name';
|
|
11942
|
+
includeDc?: boolean;
|
|
11943
|
+
label?: (state: UsStateOption) => string;
|
|
11944
|
+
locale?: string;
|
|
11945
|
+
}): {
|
|
11946
|
+
value: string;
|
|
11947
|
+
label: string;
|
|
11948
|
+
}[];
|
|
11923
11949
|
/**
|
|
11924
11950
|
* The 50 US states (no DC) with their major cities, keyed by two-letter state code: `US_LOCATIONS['TX']` -> `['Abilene', ...]`. Cities are unique and
|
|
11925
11951
|
* trimmed per state. Use it for a city picker that follows a state select (the state names are in `US_STATES`).
|