import * as i0 from '@angular/core'; import { ValueEqualityFn, InjectionToken, DestroyRef, Signal, OnDestroy, AfterViewChecked, EventEmitter, QueryList, PipeTransform, ElementRef } from '@angular/core'; import * as rxjs from 'rxjs'; import { Observable, Subject, Subscribable } from 'rxjs'; import { FocusableOption, FocusOrigin } from '@angular/cdk/a11y'; import { BooleanInput } from '@angular/cdk/coercion'; interface Action { pretitle?: string; title?: string; subtitle?: string; icon?: string; image?: string; disabled?: boolean; loading?: boolean; color?: 'neutral' | 'positive' | 'warning' | 'negative' | 'accent'; kind?: 'primary' | 'secondary' | 'tertiary'; action?($event: MouseEvent): void; actions?: Action[] | Action[][]; } declare function collapseActions(actions: Action[] | Action[][]): Action[] | Action[][]; declare class AnimationCurves { static STANDARD_CURVE: string; static DECELERATION_CURVE: string; static ACCELERATION_CURVE: string; static SHARP_CURVE: string; } declare class AnimationDurations { static COMPLEX: string; static ENTERING: string; static EXITING: string; } type Theme = 'dark' | 'light'; declare class ThemeProvider { private static _theme; static theme: i0.Signal; static setTheme(theme: Theme): Theme; } type Locale = 'da' | 'en' | 'de' | 'sv' | 'nb'; declare class Translator { private static locales; private static language; static locale(language?: string): string; static defineLocale(language: Locale, config: any): void; static translate(path: string | string[], ...replacements: string[]): string; } interface RGB { r: number; g: number; b: number; } interface RGBA extends RGB { a: number; } declare function hex2rgb(hex: string): RGB; declare function rgb2hex(rgb: RGB): string; declare function string2hex(color: string): string; declare function string2rgb(color: string): { rgb: RGB; type: 'HEX' | 'RGB' | 'RGBSUBSET'; }; declare function fixContrastRatio(fcolor: string, bcolor?: string, target?: number): string; declare function invertColor(color: string, threshold?: number): string; declare function lightenDarkenColor(color: string, percentage: number): string; /** * Interpolate between two colors * @param color1 Hex start color * @param color2 Hex end color * @param factor Interpolation factor * @returns Interpolated color as hex */ declare function interpolateColorHex(color1: string, color2: string, factor?: number): string; /** Converts color to flat color */ declare function flattenColor(color: string): string; /** * Return true if color string is of HEX format * @param color string to test */ declare function isHEX(color: string): boolean; /** * Return true if color string is of RGB format * @param color string to test */ declare function isRGB(color: string): boolean; /** * Return true if color string is of RGB subset format * @param color string to test */ declare function isRGBSubset(color: string): boolean; interface MapParams { /** Destination address */ daddr?: string; /** Start address */ saddr?: string; /** * Route-type: * - 'd' = driving * - 'w' = walking * - 'r' = transit * - 'b' = bicycling (not official Apple param, but accepted by Google) */ dirflg?: string; /** * Optional query / search term. * If provided, it will be used as a search query in Google Maps. * If no destination is specified, this will be the main query. */ q?: string; /** Latitude/Longitude (center). */ ll?: string; } declare class MapService { private readonly platform; getUrl(params: MapParams): URL; private buildGoogleMapsUrl; private buildAppleMapsUrl; private mapTravelMode; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class ProblemDocument { status: number; title: string; type: string; detail?: string; instance?: string; context?: T; /** Base implementation of RFC7807 Problem Documents */ constructor(error: unknown, context?: T); get(key: K): T[K] | undefined; private handleProblem; } declare const catchAsError: rxjs.OperatorFunction; declare const asError: (value: unknown) => Error; interface SelectConfig { equal?: ValueEqualityFn; } declare const INITIAL_STATE_TOKEN: InjectionToken; /** Generic class used for multiple layout services to enable communication between components. */ declare class StateStoreService { protected readonly destroyRef: DestroyRef; private readonly stateSubject; private readonly state; private readonly observedSubject; readonly observedSignal: Signal; constructor(initialState: S); /** Callback function invoked when store is observed using select() or selectSignal(). Only invoked once. */ observed(callback: () => void): void; selectSignal(): Signal; selectSignal(key: K): Signal; /** Returns an observable for a property of the state. */ select(): Observable; /** * Returns an observable for a property of the state. * Use when the consumer needs the stream of changes. * @param key the key of the property to be retreived */ select(key: K): Observable; /** Select a snapshot from the state. */ selectSnapshot(): S; /** * Select a snapshot from the state. * @param selector the function to retrieve the property */ selectSnapshot(selector: (selector: S) => R): R; /** * Get the current state of a property. * Use when the consumer needs just the current state. * @param selector the key of the property to be retrieved */ selectSnapshot(selector: K): S[K]; set(selector: K, data: S[K]): void; set(selector: K, data: (value: S[K]) => S[K]): void; /** * Sets values for multiple properties of the state. * This is used when there is a need to update multiple properties simultaneously. * @param partialState the partial state that includes the new values to be saved */ setState(partialState: Partial): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵprov: i0.ɵɵInjectableDeclaration>; } declare abstract class StoreConnectionService { private readonly connections; connect(destroyRef?: DestroyRef): void; protected abstract connected(): void; protected abstract disconnected(): void; } declare const OPTGROUP: InjectionToken; declare class OptionGroupComponent implements OnDestroy { private changeDetectorRef; /** Emits whenever the component is destroyed. */ private readonly destroy; /** Label for the option group. */ label: string | null; /** Whether the option group is disabled. */ disabled: boolean; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_disabled: unknown; } /** * Describes a parent component that manages a list of options. * Contains properties that the options can inherit. */ interface OptionParentComponent { multiple?: boolean; } /** * Injection token used to provide the parent component to options. */ declare const OPTION_PARENT_COMPONENT: InjectionToken; /** Event object emitted by Option when selected or deselected. */ declare class OptionSelectionChange { /** Reference to the option that emitted the event. */ source: OptionComponent; /** Whether the change in the option's value was a result of a user action. */ isUserInput: boolean; constructor( /** Reference to the option that emitted the event. */ source: OptionComponent, /** Whether the change in the option's value was a result of a user action. */ isUserInput?: boolean); } declare class OptionComponent implements FocusableOption, AfterViewChecked, OnDestroy { private readonly changeDetectorRef; private readonly elementRef; /** Emits whenever the component is destroyed. */ private readonly destroy; /** Emits when the state of the option changes and any parents have to be notified. */ readonly stateChanges: Subject; private _selected; private _active; private _disabled; private _mostRecentViewValue; private readonly parent; readonly group: OptionGroupComponent | null; /** Whether the wrapping component is in multiple selection mode. */ get multiple(): boolean; /** Whether or not the option is currently selected. */ get selected(): boolean; /** The displayed value of the option. It is necessary to show the selected option in the select's trigger. */ get viewValue(): string; /** * Whether or not the option is currently active and ready to be selected. * An active option displays styles as if it is focused, but the * focus is actually retained somewhere else. This comes in handy * for components like autocomplete where focus must remain on the input. */ get active(): boolean; /** The form value of the option. */ value: T; /** The unique ID of the option. */ id: string; /** Whether the option is disabled. */ get disabled(): boolean; set disabled(value: BooleanInput); /** Event emitted when the option is selected or deselected. */ readonly onSelectionChange: EventEmitter>; keydown(event: KeyboardEvent): void; ngAfterViewChecked(): void; ngOnDestroy(): void; /** Selects the option. */ select(emitEvent?: boolean): void; /** Deselects the option. */ deselect(emitEvent?: boolean): void; /** Sets focus onto this option. */ focus(_origin?: FocusOrigin, options?: FocusOptions): void; /** * This method sets display styles on the option to make it appear * active. This is used by the ActiveDescendantKeyManager so key * events will display the proper options as active on arrow key events. */ setActiveStyles(): void; /** * This method removes display styles on the option that made it appear * active. This is used by the ActiveDescendantKeyManager so key * events will display the proper options as active on arrow key events. */ setInactiveStyles(): void; /** Gets the label to be used when determining whether the option should be focused. */ getLabel(): string; /** Ensures the option is selected when activated from the keyboard. */ handleKeydown(event: KeyboardEvent): void; /** * Gets the `aria-selected` value for the option. We explicitly omit the `aria-selected` * attribute from single-selection, unselected options. Including the `aria-selected="false"` * attributes adds a significant amount of noise to screen-reader users without providing useful * information. */ getAriaSelected(): boolean | null; /** Returns the correct tabindex for the option depending on disabled state. */ getTabIndex(): string; /** Gets the host DOM element. */ getHostElement(): HTMLElement; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "csc-option", never, { "value": { "alias": "value"; "required": false; }; "id": { "alias": "id"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "onSelectionChange": "onSelectionChange"; }, never, ["*"], true, never>; } /** * Counts the amount of option group labels that precede the specified option. * @param optionIndex Index of the option at which to start counting. * @param options Flat list of all of the options. * @param optionGroups Flat list of all of the option groups. */ declare function countGroupLabelsBeforeOption(optionIndex: number, options: QueryList, optionGroups: QueryList): number; /** * Determines the position to which to scroll a panel in order for an option to be into view. * @param optionOffset Offset of the option from the top of the panel. * @param optionHeight Height of the options. * @param currentScrollPosition Current scroll position of the panel. * @param panelHeight Height of the panel. */ declare function getOptionScrollPosition(optionOffset: number, optionHeight: number, currentScrollPosition: number, panelHeight: number): number; declare class CustomDatePipe implements PipeTransform { transform(value: string | number | Date, pattern?: string): string | null; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare function coerceArray(params: any | any[]): any[]; declare function customFormatDate(value?: string | number | Date, pattern?: string, locale?: string): string | null; declare class IntersectionObserverService { createAndObserve(element: ElementRef, options?: IntersectionObserverInit): Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * Determine if the argument is shaped like a Promise */ declare function isPromise(obj: any): obj is Promise; /** * Determine if the argument is a Subscribable */ declare function isSubscribable(obj: any | Subscribable): obj is Subscribable; /** * Determine if the argument is an Observable * * Strictly this tests that the `obj` is `Subscribable`, since `Observable` * types need additional methods, such as `lift()`. But it is adequate for our * needs since within the Angular framework code we only ever need to use the * `subscribe()` method, and RxJS has mechanisms to wrap `Subscribable` objects * into `Observable` as needed. */ declare const isObservable: ((obj: any | Observable) => obj is Observable); /** * Formats a number as text, with group sizing, separator, and other * parameters based on the locale. */ declare function customFormatNumber(value: number, digitsInfo?: string, locale?: string): string | null; type Platform = 'apple' | 'pc'; declare function hostPlatform(): Platform; declare function normalizeKeys(keys: string, platform: Platform): string; /** * Returns an Observable that mirrors the source Observable except with an error. * If the source Observable calls error, rather than propagating * the error call this method will resubscribe to the source Observable with * exponentially increasing interval and up to a maximum of count * re-subscriptions (if provided). Retrying can be cancelled at any point if * shouldRetry returns false. */ declare function retryBackoff(config: number | { initialInterval: number; maxRetries?: number; maxInterval?: number; resetOnSuccess?: boolean; shouldRetry?: (error: any) => boolean; backoffDelay?: (iteration: number, initialInterval: number) => number; }): (source: Observable) => Observable; export { AnimationCurves, AnimationDurations, CustomDatePipe, INITIAL_STATE_TOKEN, IntersectionObserverService, MapService, OPTGROUP, OPTION_PARENT_COMPONENT, OptionComponent, OptionGroupComponent, OptionSelectionChange, ProblemDocument, StateStoreService, StoreConnectionService, ThemeProvider, Translator, asError, catchAsError, coerceArray, collapseActions, countGroupLabelsBeforeOption, customFormatDate, customFormatNumber, fixContrastRatio, flattenColor, getOptionScrollPosition, hex2rgb, hostPlatform, interpolateColorHex, invertColor, isHEX, isObservable, isPromise, isRGB, isRGBSubset, isSubscribable, lightenDarkenColor, normalizeKeys, retryBackoff, rgb2hex, string2hex, string2rgb }; export type { Action, MapParams, OptionParentComponent, Platform, RGB, RGBA, SelectConfig };