UNPKG

@skyux/core

Version:

This library was generated with [Nx](https://nx.dev).

1,447 lines (1,362 loc) 60.8 kB
import * as i0 from '@angular/core'; import { RendererFactory2, ElementRef, Renderer2, NgZone, OnDestroy, OnInit, OnChanges, EventEmitter, SimpleChanges, StaticProvider, Type, ViewContainerRef, EnvironmentInjector, ApplicationRef, ComponentRef, InjectionToken, Provider, Injector, PipeTransform, ChangeDetectorRef, TemplateRef, EmbeddedViewRef, AfterViewInit } from '@angular/core'; import { ViewportRuler } from '@angular/cdk/overlay'; import { Observable, ReplaySubject, Subscription } from 'rxjs'; import * as i1 from '@skyux/i18n'; import { SkyLibResourcesService, SkyAppLocaleProvider } from '@skyux/i18n'; import { Title } from '@angular/platform-browser'; /** * @deprecated The `SkyCoreAdapterService` no longer needs the `SkyCoreAdapterModule`. * The `SkyCoreAdapterModule` can be removed from your project. */ declare class SkyCoreAdapterModule { static ɵfac: i0.ɵɵFactoryDeclaration<SkyCoreAdapterModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<SkyCoreAdapterModule, never, never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<SkyCoreAdapterModule>; } /** * A list of all breakpoints. * @internal */ declare const SKY_BREAKPOINTS: readonly ["xs", "sm", "md", "lg"]; /** * The name of a viewport or container breakpoint. */ type SkyBreakpoint = (typeof SKY_BREAKPOINTS)[number]; /** * Represents all available media breakpoints. * @deprecated Use `SkyBreakpoint` instead. */ declare enum SkyMediaBreakpoints { /** * Screen widths of 767px or less. */ xs = 1, /** * Screen widths of 768px to 991px. */ sm = 2, /** * Screen widths of 992px to 1199px. */ md = 3, /** * Screen widths of 1200px or greater. */ lg = 4 } /** * Options for getting focusable children. */ interface SkyFocusableChildrenOptions { /** * By default, the `getFocusableChildren()` function will filter out elements with * a `tabIndex` of `-1`. Setting `ignoreTabIndex = true` will ignore this filter. */ ignoreTabIndex?: boolean; /** * By default, the `getFocusableChildren()` function will only return visible elements. * Setting `ignoreVisibility = true` will ignore this filter. */ ignoreVisibility?: boolean; } declare class SkyCoreAdapterService { #private; constructor(rendererFactory: RendererFactory2); /** * Set the responsive container CSS class for a given element. * * @param elementRef - The element that will receive the new CSS class. * @param breakpoint - The breakpoint to determine which class gets set. * For example a breakpoint of "xs" will set a CSS class of "sky-responsive-container-xs". * @deprecated Use the `SkyResponsiveHostDirective` instead. */ setResponsiveContainerClass(elementRef: ElementRef, breakpoint: SkyBreakpoint | SkyMediaBreakpoints): void; /** * This method temporarily enables/disables pointer events. * This is helpful to prevent iFrames from interfering with drag events. * * @param enable - Set to `true` to enable pointer events. Set to `false` to disable. */ toggleIframePointerEvents(enable: boolean): void; /** * Focuses on the first element found with an `autofocus` attribute inside the supplied `elementRef`. * * @param elementRef - The element to search within. * @return Returns `true` if a child element with autofocus is found. */ applyAutoFocus(elementRef?: ElementRef): boolean; /** * Sets focus on the first focusable child of the `elementRef` parameter. * If no focusable children are found, and `focusOnContainerIfNoChildrenFound` is `true`, * focus will be set on the container element. * * @param elementRef - The element to search within. * @param containerSelector - A CSS selector indicating the container that should * receive focus if no focusable children are found. * @param focusOnContainerIfNoChildrenFound - It set to `true`, the container will * receive focus if no focusable children are found. */ getFocusableChildrenAndApplyFocus(elementRef: ElementRef, containerSelector?: string, focusOnContainerIfNoChildrenFound?: boolean): void; /** * Returns an array of all focusable children of provided `element`. * * @param element - The HTMLElement to search within. * @param options - Options for getting focusable children. */ getFocusableChildren(element?: HTMLElement, options?: SkyFocusableChildrenOptions): HTMLElement[]; /** * Returns the clientWidth of the provided elementRef. * @param elementRef - The element to calculate width from. */ getWidth(elementRef: ElementRef): number; /** * Checks if an event target has a higher z-index than a given element. * @param target The event target element. * @param element The element to test against. A z-index must be explicitly set for this element. */ isTargetAboveElement(target: EventTarget, element: HTMLElement): boolean; /** * Remove inline height styles from the provided elements. * @param elementRef - The element to search within. * @param selector - The CSS selector to use when finding elements for removing height. */ resetHeight(elementRef: ElementRef, selector: string): void; /** * Sets all element heights to match the height of the tallest element. * @param elementRef - The element to search within. * @param selector - The CSS selector to use when finding elements for syncing height. */ syncMaxHeight(elementRef: ElementRef, selector: string): void; static ɵfac: i0.ɵɵFactoryDeclaration<SkyCoreAdapterService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<SkyCoreAdapterService>; } declare enum SkyAffixAutoFitContext { /** * Auto-fit functionality will respect the nearest overflow parent element's dimensions. */ OverflowParent = 0, /** * Auto-fit functionality will respect the browser viewport dimensions. */ Viewport = 1 } /** * The horizontal alignment of the affixed element to the base element. */ type SkyAffixHorizontalAlignment = 'left' | 'center' | 'right'; /** * Offset values used by the affixer. */ interface SkyAffixOffset { bottom?: number; left?: number; right?: number; top?: number; } /** * The placement of the affixed element around the base element. */ type SkyAffixPlacement = 'above' | 'below' | 'left' | 'right'; type SkyAffixPosition = 'absolute' | 'fixed'; /** * The vertical alignment of the affixed element to the base element. */ type SkyAffixVerticalAlignment = 'top' | 'middle' | 'bottom'; interface SkyAffixConfig { /** * Which parent element is used by the auto-fit functionality. */ autoFitContext?: SkyAffixAutoFitContext; /** * This optional offset is added to (or subtracted from) the [[SkyAffixAutoFitContext]] element's * offset during an auto-fit placement calculation. This value is useful if you need to consider * another `position: fixed` element on the page (such as a navbar) when the auto-fit * functionality attempts to find the best possible placement. * (In the case of a navbar, you would add a `top` value equal to the navbar's height in pixels.) */ autoFitOverflowOffset?: SkyAffixOffset; /** * Whether the affix service tries to find the best placement for the affixed element * if the element would be hidden otherwise. If this setting is disabled, the affix service * forces the placement of the affixed element. */ enableAutoFit?: boolean; /** * The horizontal alignment of the affixed element to the base element. */ horizontalAlignment?: SkyAffixHorizontalAlignment; /** * Whether the affixed element remains affixed to the base element when the window is scrolled or resized. */ isSticky?: boolean; /** * The placement of the affixed element around the base element. */ placement?: SkyAffixPlacement; /** * The vertical alignment of the affixed element to the base element. */ verticalAlignment?: SkyAffixVerticalAlignment; /** * The position of the element being affixed. */ position?: SkyAffixPosition; } /** * The arguments supplied to the affix offset change event listener. */ interface SkyAffixOffsetChange { offset?: SkyAffixOffset; } interface SkyAffixPlacementChange { /** * The changed placement value. */ placement: SkyAffixPlacement | null; } declare class SkyAffixer { #private; /** * Fires when the affixed element's offset changes. */ get offsetChange(): Observable<SkyAffixOffsetChange>; /** * Fires when the base element's nearest overflow parent is scrolling. This is useful if you need * to perform an additional action during the scroll event but don't want to generate another * event listener. */ get overflowScroll(): Observable<void>; /** * Fires when the placement value changes. A `null` value indicates that a suitable * placement could not be found. */ get placementChange(): Observable<SkyAffixPlacementChange>; constructor(affixedElement: HTMLElement, renderer: Renderer2, viewportRuler: ViewportRuler, zone: NgZone, layoutViewport: HTMLElement); /** * Affixes an element to a base element. * @param baseElement The base element. * @param config Configuration for the affix action. */ affixTo(baseElement: HTMLElement, config?: SkyAffixConfig): void; getConfig(): SkyAffixConfig; /** * Re-runs the affix calculation. */ reaffix(): void; /** * Destroys the affixer. */ destroy(): void; } declare class SkyAffixService implements OnDestroy { #private; ngOnDestroy(): void; /** * Creates an instance of [[SkyAffixer]]. * @param affixed The element to be affixed. */ createAffixer(affixed: ElementRef): SkyAffixer; static ɵfac: i0.ɵɵFactoryDeclaration<SkyAffixService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<SkyAffixService>; } /** * Affixes the host element to a base element. */ declare class SkyAffixDirective implements OnInit, OnChanges, OnDestroy { #private; /** * The base element to affix the host element. */ skyAffixTo: HTMLElement | undefined; /** * Sets the `autoFitContext` property of [[SkyAffixConfig]]. */ affixAutoFitContext: SkyAffixAutoFitContext | undefined; /** * Sets the `autoFitOverflowOffset` property of [[SkyAffixConfig]]. */ affixAutoFitOverflowOffset: SkyAffixOffset | undefined; /** * Sets the `enableAutoFit` property of [[SkyAffixConfig]]. */ affixEnableAutoFit: boolean | undefined; /** * Sets the `horizontalAlignment` property of [[SkyAffixConfig]]. */ affixHorizontalAlignment: SkyAffixHorizontalAlignment | undefined; /** * Sets the `isSticky` property of [[SkyAffixConfig]]. */ affixIsSticky: boolean | undefined; /** * Sets the `placement` property of [[SkyAffixConfig]]. */ affixPlacement: SkyAffixPlacement | undefined; /** * Sets the `position` property of [[SkyAffixConfig]]. */ affixPosition: SkyAffixPosition | undefined; /** * Sets the `verticalAlignment` property of [[SkyAffixConfig]]. */ affixVerticalAlignment: SkyAffixVerticalAlignment | undefined; /** * Fires when the affixed element's offset changes. */ affixOffsetChange: EventEmitter<SkyAffixOffsetChange>; /** * Fires when the affixed element's overflow container is scrolled. */ affixOverflowScroll: EventEmitter<void>; /** * Fires when the placement value changes. */ affixPlacementChange: EventEmitter<SkyAffixPlacementChange>; constructor(elementRef: ElementRef, affixService: SkyAffixService); ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<SkyAffixDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<SkyAffixDirective, "[skyAffixTo]", never, { "skyAffixTo": { "alias": "skyAffixTo"; "required": false; }; "affixAutoFitContext": { "alias": "affixAutoFitContext"; "required": false; }; "affixAutoFitOverflowOffset": { "alias": "affixAutoFitOverflowOffset"; "required": false; }; "affixEnableAutoFit": { "alias": "affixEnableAutoFit"; "required": false; }; "affixHorizontalAlignment": { "alias": "affixHorizontalAlignment"; "required": false; }; "affixIsSticky": { "alias": "affixIsSticky"; "required": false; }; "affixPlacement": { "alias": "affixPlacement"; "required": false; }; "affixPosition": { "alias": "affixPosition"; "required": false; }; "affixVerticalAlignment": { "alias": "affixVerticalAlignment"; "required": false; }; }, { "affixOffsetChange": "affixOffsetChange"; "affixOverflowScroll": "affixOverflowScroll"; "affixPlacementChange": "affixPlacementChange"; }, never, never, true, never>; } declare class SkyAffixModule { static ɵfac: i0.ɵɵFactoryDeclaration<SkyAffixModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<SkyAffixModule, never, [typeof SkyAffixDirective], [typeof SkyAffixDirective]>; static ɵinj: i0.ɵɵInjectorDeclaration<SkyAffixModule>; } /** * Text or an element that describes the content a consumer renders in a component. * * @internal */ interface SkyContentInfoDescriptor { /** * A descriptor of type `text` is an already localized string that describes a parent's content, i.e. constituent. * A descriptor of type `elementId` is an HTML Element ID of an element that describes a parent's content, i.e. the ID to a box header. */ type: 'text' | 'elementId'; /** * A value of the given type. */ value: string; } /** * Information about the content a consumer is rendering within a component. * * @internal */ interface SkyContentInfo { /** * Information that describes the content within a parent component a consumer has rendered, i.e. "constituents". * Provided as localized text or an element ID pointing to text that is the descriptor. */ descriptor?: SkyContentInfoDescriptor; } /** * @internal * An API to provide information about a parent component's content to child components. * For example, toolbar can use this to provide its child components with a list * descriptor they can use to construct aria labels, or tree view can provide the node * name to its context menus. */ declare class SkyContentInfoProvider { #private; patchInfo(value: SkyContentInfo): void; getInfo(): Observable<SkyContentInfo>; static ɵfac: i0.ɵɵFactoryDeclaration<SkyContentInfoProvider, never>; static ɵprov: i0.ɵɵInjectableDeclaration<SkyContentInfoProvider>; } /** * @internal * An API to provide default Angular component input values to child components. */ declare class SkyDefaultInputProvider { #private; setValue<T>(componentName: string, inputName: string, value: T): void; getValue<T>(componentName: string, inputName: string): Observable<T> | undefined; } /** * Configuration to be used by the docking action. */ interface SkyDockItemConfig { /** * The stack order of the item. The higher the number, the higher * the item will be placed in the dock. By default, new items will be placed at * the top of the stack. */ stackOrder?: number; } interface SkyDockInsertComponentConfig extends SkyDockItemConfig { /** * Static providers to inject into the item's component. */ providers?: StaticProvider[]; } /** * Represents a single item added to the dock. */ declare class SkyDockItem<T> { #private; readonly componentInstance: T; readonly stackOrder: number; /** * An event that emits when the item is removed from the dock. */ get destroyed(): Observable<void>; /** * @param componentInstance The item's component instance. * @param stackOrder The assigned stack order of the docked item. */ constructor(componentInstance: T, stackOrder: number); /** * Removes the item from the dock. */ destroy(): void; } /** * The location on the page where the dock component should be rendered. */ declare enum SkyDockLocation { /** * Renders the dock component before a given element. */ BeforeElement = 0, /** * Renders the dock component as the last element inside the BODY element. */ BodyBottom = 1, /** * Renders the dock component as the last element inside a given element. */ ElementBottom = 2 } /** * Options for adding a dock component to the page. */ interface SkyDockOptions { /** * The location on the page where the dock component should be rendered. */ location?: SkyDockLocation; /** * The reference element used when using the `BeforeElement` or `ElementBottom` locations. */ referenceEl?: HTMLElement; /** * The z-index for the dock element */ zIndex?: number; } /** * @deprecated The `SkyDockModule` is no longer needed and can be removed from your application. * @internal */ declare class SkyDockModule { static ɵfac: i0.ɵɵFactoryDeclaration<SkyDockModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<SkyDockModule, never, never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<SkyDockModule>; } /** * This service docks components to specific areas on the page. */ declare class SkyDockService { #private; private static dockRef; private static _items; /** * Returns all docked items. */ get items(): SkyDockItem<any>[]; /** * Docks a component to the bottom of the page. * @param component The component to dock. * @param config Options that affect the docking action. */ insertComponent<T>(component: Type<T>, config?: SkyDockInsertComponentConfig): SkyDockItem<T>; /** * Sets options for the positioning and styling of the dock component. Since the dock service is a * singleton instance, these options will be applied to all components inserted into the dock. In * order to create a separate dock with different options, consumers should provide a different * instance of the dock service. * @param options The options for positioning and styling */ setDockOptions(options: SkyDockOptions): void; static ɵfac: i0.ɵɵFactoryDeclaration<SkyDockService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<SkyDockService>; } /** * The location on the page where the dynamic component should be rendered. */ declare enum SkyDynamicComponentLocation { /** * Renders the dynamic component before a given element. */ BeforeElement = 0, /** * Renders the dynamic component as the last element inside the BODY element. */ BodyBottom = 1, /** * Renders the dynamic component as the first element inside the BODY element. */ BodyTop = 2, /** * Renders the dynamic component as the last element inside a given element. */ ElementBottom = 3, /** * Renders the dynamic component as the first element inside a given element. */ ElementTop = 4 } /** * Options for adding a dynamic component to the page. */ interface SkyDynamicComponentOptions { /** * The location on the page where the dynamic component should be rendered. */ location?: SkyDynamicComponentLocation; /** * Providers to inject into the new component. */ providers?: StaticProvider[]; /** * The reference element used when using the `ElementTop` or `ElementBottom` locations. */ referenceEl?: HTMLElement; /** * The view container reference where the new component should be appended. */ viewContainerRef?: ViewContainerRef; /** * The environment injector to use instead of the dynamic component service's injector. */ environmentInjector?: EnvironmentInjector; /** * A class to add to the created component */ className?: string; } /** * Provides services required to create dynamic components on the page. * @deprecated The `SkyDynamicComponentService` no longer needs the `SkyDynamicComponentModule`. * The `SkyDynamicComponentModule` can be removed from your project. */ declare class SkyDynamicComponentModule { static ɵfac: i0.ɵɵFactoryDeclaration<SkyDynamicComponentModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<SkyDynamicComponentModule, never, never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<SkyDynamicComponentModule>; } /** * The application window reference service references the global window variable. * After users inject SkyAppWindowRef into a component, they can use the service to interact with * window properties and event handlers by referencing its nativeWindow property. */ declare class SkyAppWindowRef { /** * The global `window` variable. */ get nativeWindow(): any; static ɵfac: i0.ɵɵFactoryDeclaration<SkyAppWindowRef, never>; static ɵprov: i0.ɵɵInjectableDeclaration<SkyAppWindowRef>; } /** * Angular service for creating and rendering a dynamic component. * @internal */ declare class SkyDynamicComponentService { #private; constructor(applicationRef: ApplicationRef, windowRef: SkyAppWindowRef, rendererFactory: RendererFactory2); /** * Creates an instance of the specified component and adds it to the specified location * on the page. */ createComponent<T>(componentType: Type<T>, options?: SkyDynamicComponentOptions): ComponentRef<T>; /** * Removes a component ref from the page * @param componentRef Component ref for the component being removed */ removeComponent<T>(componentRef: ComponentRef<T> | undefined): void; static ɵfac: i0.ɵɵFactoryDeclaration<SkyDynamicComponentService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<SkyDynamicComponentService>; } /** * Angular service for creating and rendering a dynamic component. * @internal * @deprecated Use `SkyDynamicComponentService` to create a standalone component instead. */ declare class SkyDynamicComponentLegacyService extends SkyDynamicComponentService { static ɵfac: i0.ɵɵFactoryDeclaration<SkyDynamicComponentLegacyService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<SkyDynamicComponentLegacyService>; } /** * Wraps the FileReader API so it can be mocked in tests. * @internal */ declare class SkyFileReaderService { readAsDataURL(file: File): Promise<string>; static ɵfac: i0.ɵɵFactoryDeclaration<SkyFileReaderService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<SkyFileReaderService>; } declare class SkyAppFormat { formatText(format: string, ...args: any[]): string; static ɵfac: i0.ɵɵFactoryDeclaration<SkyAppFormat, never>; static ɵprov: i0.ɵɵInjectableDeclaration<SkyAppFormat>; } /** * Options to apply to all components that invoke global help. */ interface SkyHelpGlobalOptions { /** * The ID of the element that is displayed when the invoking component is clicked. */ ariaControls?: string; /** * The type of popup triggered by the invoking component. */ ariaHaspopup?: 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'; } /** * Injection token for specifying and retrieving global help options. */ declare const SKY_HELP_GLOBAL_OPTIONS: InjectionToken<SkyHelpGlobalOptions>; /** * Options for displaying a globally accessible help dialog. */ interface SkyHelpOpenArgs { /** * A unique key that identifies the help content to display. * */ helpKey: string; } /** * Options for updating a globally accessible help dialog. */ interface SkyHelpUpdateArgs { /** * A unique key that identifies the current help content to display. If set to `undefined`, the page's default help content will be displayed. */ helpKey?: string; /** * A unique key that identifies the page's default help content to display. Set this property to `undefined` to unset the current page default help key. * */ pageDefaultHelpKey?: string; } /** * Provides methods for opening and updating a globally accessible help dialog. */ declare abstract class SkyHelpService { /** * Emits when the help widget ready state changes. */ get widgetReadyStateChange(): Observable<boolean>; /** * Opens a globally accessible help dialog. * @param args The options for opening the help dialog. */ abstract openHelp(args?: SkyHelpOpenArgs): void; /** * Updates a globally accessible help dialog. * @param args The options for updating the help dialog. */ abstract updateHelp(args: SkyHelpUpdateArgs): void; static ɵfac: i0.ɵɵFactoryDeclaration<SkyHelpService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<SkyHelpService>; } /** * Generates unique IDs to be used with HTML elements. */ declare class SkyIdService { generateId(): string; static ɵfac: i0.ɵɵFactoryDeclaration<SkyIdService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<SkyIdService>; } /** * Sets the element's `id` attribute to a unique ID. To reference this unique ID on other elements, * such as in a `label` element's `for` attribute, assign this directive to a template reference * variable, then use its `id` property. */ declare class SkyIdDirective { #private; get id(): string; constructor(elRef: ElementRef, renderer: Renderer2, idSvc: SkyIdService); static ɵfac: i0.ɵɵFactoryDeclaration<SkyIdDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<SkyIdDirective, "[skyId]", ["skyId"], {}, {}, never, never, true, never>; } declare class SkyIdModule { static ɵfac: i0.ɵɵFactoryDeclaration<SkyIdModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<SkyIdModule, never, [typeof SkyIdDirective], [typeof SkyIdDirective]>; static ɵinj: i0.ɵɵInjectorDeclaration<SkyIdModule>; } interface SkyLayoutHostForChildArgs { layout: string; } /** * @internal */ declare class SkyLayoutHostDirective<T = 'none' | 'fit'> { #private; readonly layout: i0.InputSignal<T | undefined>; constructor(); static ɵfac: i0.ɵɵFactoryDeclaration<SkyLayoutHostDirective<any>, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<SkyLayoutHostDirective<any>, "[skyLayoutHost]", never, { "layout": { "alias": "layout"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>; } /** * @internal */ declare class SkyLayoutHostService { #private; get hostLayoutForChild(): Observable<SkyLayoutHostForChildArgs>; setHostLayoutForChild(layout: SkyLayoutHostForChildArgs): void; static ɵfac: i0.ɵɵFactoryDeclaration<SkyLayoutHostService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<SkyLayoutHostService>; } /** * Possible politeness levels for messages announced via the `SkyLiveAnnouncerService`. * @internal */ type SkyLiveAnnouncerPoliteness = 'off' | 'polite' | 'assertive'; /** * Options used when announcing messages to screen readers via the `SkyLiveAnnouncerService` * @internal */ interface SkyLiveAnnouncerArgs { politeness?: SkyLiveAnnouncerPoliteness; /** * Sets how long the live announcer text persists in DOM. */ duration?: number; } /** * Allows for announcing messages to screen reader users through the use of a common `aria-live` element. * @internal */ declare class SkyLiveAnnouncerService implements OnDestroy { #private; announcerElementChanged: ReplaySubject<HTMLElement | undefined>; constructor(); /** * Announces a message to screen readers. * @param message Message to be announced to the screen reader. * @param args Options for the announcement of the message. */ announce(message: string, args?: SkyLiveAnnouncerArgs): void; /** * Clears the current text from the announcer element. Can be used to prevent * screen readers from reading the text out again while the user is going * through the page landmarks. */ clear(): void; /** * @internal */ ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<SkyLiveAnnouncerService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<SkyLiveAnnouncerService>; } /** * @deprecated The `SkyLogService` no longer needs the `SkyLogModule`. * The `SkyLogModule` can be removed from your project. */ declare class SkyLogModule { static ɵfac: i0.ɵɵFactoryDeclaration<SkyLogModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<SkyLogModule, never, never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<SkyLogModule>; } /** * @internal */ declare enum SkyLogLevel { Info = 1, Warn = 2, Error = 3 } /** * @internal * Arguments used when logging that a class, property, function, etc. is deprecated. */ interface SkyLogDeprecatedArgs { /** * The major version which deprecated the feature. */ deprecationMajorVersion?: number; /** * The log level for the console logging. The `SkyLogService` will assume `SkyLogLevel.Warn` if this is not provided. */ logLevel?: SkyLogLevel; /** * A URL which gives more information about the deprecation or the replacement recommendation. */ moreInfoUrl?: string; /** * The major version which will remove the deprecated feature. */ removalMajorVersion?: number; /** * The recommendation for how to replace the deprecated feature. */ replacementRecommendation?: string; } /** * Logs information to the console based on the application's log level as * provided by the `SKY_LOG_LEVEL` injection token. If no token is provided, * only `error` logs will be shown. * @internal */ declare class SkyLogService { #private; constructor(formatter: SkyAppFormat, applicationLogLevel?: SkyLogLevel); /** * Clears previously-logged messages. Primarily used for unit * testing this service. */ static clearPreviousLogs(): void; /** * Logs a deprecation warning for a class, property, function, etc. This will * be logged as a console warning unless a different log level is given in the * `args` parameter. * @param name The name of the deprecated class, property, function, etc. * @param args Information about the deprecation and replacement recommendations. */ deprecated(name: string, args?: SkyLogDeprecatedArgs): void; /** * Logs a console error if the application's log level is `SkyLogLevel.Error`. * @param message The error message * @param params Optional parameters for the error message. */ error(message: string, params?: unknown[]): void; /** * Logs console information if the application's log level is `SkyLogLevel.Info` or above. * @param message The informational message * @param params Optional parameters for the informational message. */ info(message: string, params?: unknown[]): void; /** * Logs a console warning if the application's log level is `SkyLogLevel.Warn` or above. * @param message The warning message * @param params Optional parameters for the warning message. */ warn(message: string, params?: unknown[]): void; static ɵfac: i0.ɵɵFactoryDeclaration<SkyLogService, [null, { optional: true; }]>; static ɵprov: i0.ɵɵInjectableDeclaration<SkyLogService>; } /** * @internal */ declare const SKY_LOG_LEVEL: InjectionToken<SkyLogLevel>; /** * @internal */ interface SkyBreakpointObserver { get breakpointChange(): Observable<SkyBreakpoint>; destroy(): void; } /** * Used to override a breakpoint observer for specific execution contexts. * @internal */ declare const SKY_BREAKPOINT_OBSERVER: InjectionToken<SkyBreakpointObserver>; /** * Emits when the width of the host container changes. * @internal */ declare class SkyContainerBreakpointObserver implements OnDestroy, SkyBreakpointObserver { #private; get breakpointChange(): Observable<SkyBreakpoint>; constructor(); ngOnDestroy(): void; destroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<SkyContainerBreakpointObserver, never>; static ɵprov: i0.ɵɵInjectableDeclaration<SkyContainerBreakpointObserver>; } /** * Emits when the viewport width changes. * @internal */ declare class SkyMediaBreakpointObserver implements OnDestroy, SkyBreakpointObserver { #private; get breakpointChange(): Observable<SkyBreakpoint>; constructor(); ngOnDestroy(): void; destroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<SkyMediaBreakpointObserver, never>; static ɵprov: i0.ɵɵInjectableDeclaration<SkyMediaBreakpointObserver>; } /** * Overrides the default media breakpoint observer with the given observer. * @internal */ declare function provideSkyBreakpointObserver(observer: Type<SkyBreakpointObserver>): Provider[]; /** * Overrides the `SkyMediaQueryService` to emit breakpoint changes when the host * container is resized. This directive also adds SKY UX CSS classes to the * host element to allow for responsive styles. */ declare class SkyResponsiveHostDirective { #private; /** * Emits when the breakpoint changes. */ get breakpointChange(): Observable<SkyBreakpoint>; /** * The injector of the responsive host. Useful when displaying child components * via `ngTemplateOutlet`. * @example``` * <my-container #responsiveHost="skyResponsiveHost"> * <ng-container * [ngTemplateOutlet]="myTemplate" * [ngTemplateOutletInjector]="responsiveHost.injector" * /> * </my-container> * ``` */ get injector(): Injector; constructor(); static ɵfac: i0.ɵɵFactoryDeclaration<SkyResponsiveHostDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<SkyResponsiveHostDirective, "[skyResponsiveHost]", ["skyResponsiveHost"], {}, {}, never, never, true, never>; } /** * The function that is called when the breakpoints change. It is called * with a `SkyMediaBreakpoints` argument, which is an enum that represents the new breakpoint. * @deprecated Subscribe to the `breakpointChange` observable instead. */ type SkyMediaQueryListener = (args: SkyMediaBreakpoints) => void; /** * @deprecated The `SkyMediaQueryService` no longer needs the `SkyMediaQueryModule`. * The `SkyMediaQueryModule` can be removed from your project. */ declare class SkyMediaQueryModule { static ɵfac: i0.ɵɵFactoryDeclaration<SkyMediaQueryModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<SkyMediaQueryModule, never, never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<SkyMediaQueryModule>; } /** * Utility used to subscribe to viewport and container breakpoint changes. */ declare class SkyMediaQueryService implements OnDestroy { #private; /** * Emits when the breakpoint changes. */ get breakpointChange(): Observable<SkyBreakpoint>; /** * The size for the `xs` breakpoint. * @default "(max-width: 767px)" */ static xs: string; /** * The size for the `sm` breakpoint. * @default "(min-width: 768px) and (max-width: 991px)" */ static sm: string; /** * The size for the `md` breakpoint. * @default "(min-width: 992px) and (max-width: 1199px)" */ static md: string; /** * The size for the `lg` breakpoint. * @default "(min-width: 1200px)" */ static lg: string; /** * Returns the current breakpoint. * @deprecated Subscribe to the `breakpointChange` observable instead. */ get current(): SkyMediaBreakpoints; constructor(_zone?: NgZone); ngOnDestroy(): void; /** * @internal */ destroy(): void; /** * Subscribes to screen size changes. * @param listener Specifies a function that is called when breakpoints change. * @deprecated Subscribe to the `breakpointChange` observable instead. */ subscribe(listener: SkyMediaQueryListener): Subscription; static ɵfac: i0.ɵɵFactoryDeclaration<SkyMediaQueryService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<SkyMediaQueryService>; } /** * @internal */ declare class SkyMutationObserverService { create(callback: MutationCallback): MutationObserver; static ɵfac: i0.ɵɵFactoryDeclaration<SkyMutationObserverService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<SkyMutationObserverService>; } /** * @internal */ interface SkyNumericSymbol { value: number; label: string; } /** * Import into any component library module that needs to use resource strings. */ declare class SkyCoreResourcesModule { static ɵfac: i0.ɵɵFactoryDeclaration<SkyCoreResourcesModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<SkyCoreResourcesModule, never, never, [typeof i1.SkyI18nModule]>; static ɵinj: i0.ɵɵInjectorDeclaration<SkyCoreResourcesModule>; } /** * Provides arguments for the number to format. */ interface SkyNumericOptions { /** * Specifies the maximum number of digits after the decimal separator. */ digits?: number; /** * Specifies how to format the number. Options are `currency` or `number`. */ format?: string; /** * Specifies the format of the currency. */ currencySign?: 'accounting' | 'standard'; /** * Specifies the display of the currency. Defaults to 'symbol'. */ currencyDisplay?: 'code' | 'symbol' | 'narrowSymbol' | 'name'; /** * Specifies the ISO4217 currency code to use for currency formatting. */ iso?: string; /** * Specifies the locale code to use when formatting. */ locale?: string; /** * Specifies the minimum number of digits after the decimal separator. This property only applies * when the `truncate` property is set to `false`. If `digits` specifies a maximum number of * digits, then `minDigits` must be less than that value. */ minDigits?: number; /** * Indicates whether to shorten numbers to rounded numbers and abbreviation characters * such as K for thousands, M for millions, B for billions, and T for trillions. */ truncate?: boolean; /** * Specifies the minimum value at which numbers are shortened to rounded numbers and abbreviation characters. Values less than `1000` are not truncated. */ truncateAfter?: number; } /** * Provides arguments for the number to format. * @deprecated Use the `SkyNumericOptions` interface instead. * @internal */ declare class NumericOptions implements SkyNumericOptions { digits?: number; format?: string; currencySign?: 'accounting' | 'standard'; currencyDisplay?: 'code' | 'symbol' | 'narrowSymbol' | 'name'; iso?: string; locale?: string; minDigits?: number; truncate?: boolean; truncateAfter?: number; constructor(); } declare class SkyNumericService { #private; /** * The browser's current locale. * @internal */ currentLocale: string; /** * @internal */ shortSymbol: string; constructor(resourcesSvc: SkyLibResourcesService); /** * Formats a number based on the provided options. * @param value The number to format. * @param options Format options. */ formatNumber(value: number | undefined | null, options: SkyNumericOptions): string; static ɵfac: i0.ɵɵFactoryDeclaration<SkyNumericService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<SkyNumericService>; } /** * Shortens numbers to rounded numbers and abbreviation characters such as K for thousands, * M for millions, B for billions, and T for trillions. The pipe also formats for currency. * Be sure you have a space after the two curly brackets opening the pipe and * a space before the two curly brackets closing the pipe or it will not work. */ declare class SkyNumericPipe implements PipeTransform, OnDestroy { #private; constructor(localeProvider: SkyAppLocaleProvider, numericSvc: SkyNumericService, changeDetector: ChangeDetectorRef); ngOnDestroy(): void; /** * Formats a number based on the provided options. */ transform(value: number | undefined | null, config?: SkyNumericOptions): string; static ɵfac: i0.ɵɵFactoryDeclaration<SkyNumericPipe, never>; static ɵpipe: i0.ɵɵPipeDeclaration<SkyNumericPipe, "skyNumeric", true>; } declare class SkyNumericModule { static ɵfac: i0.ɵɵFactoryDeclaration<SkyNumericModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<SkyNumericModule, never, [typeof SkyCoreResourcesModule, typeof SkyNumericPipe], [typeof SkyNumericPipe]>; static ɵinj: i0.ɵɵInjectorDeclaration<SkyNumericModule>; } type SkyOverlayPosition = 'absolute' | 'fixed'; interface SkyOverlayConfig { /** * Whether the overlay closes after a navigation change. */ closeOnNavigation?: boolean; /** * Whether the overlay closes when a user clicks outside the overlay's content. */ enableClose?: boolean; /** * Whether mouse interactions are allowed below the backdrop. */ enablePointerEvents?: boolean; /** * Whether window scrolling is enabled when the overlay is opened. */ enableScroll?: boolean; /** * The environment injector for the overlay component. */ environmentInjector?: EnvironmentInjector; /** * Whether the overlay's backdrop is visible. */ showBackdrop?: boolean; /** * Extra CSS classes to add to the overlay's wrapper element. */ wrapperClass?: string; /** * The position of the overlay instance. */ position?: SkyOverlayPosition; /** * Hides the overlay's siblings from screen readers so users can't interact * with content behind the overlay with assistive technology. */ hideOthersFromScreenReaders?: boolean; } /** * @internal */ declare class SkyOverlayComponent implements OnInit, OnDestroy { #private; wrapperClass: string; get backdropClick(): Observable<void>; get closed(): Observable<void>; enablePointerEvents: boolean; id: string; showBackdrop: boolean; zIndex: string; protected clipPath$: ReplaySubject<string | undefined>; protected position: SkyOverlayPosition; overlayContentRef: ElementRef | undefined; overlayRef: ElementRef | undefined; targetRef: ViewContainerRef | undefined; constructor(); ngOnInit(): void; ngOnDestroy(): void; attachComponent<C>(component: Type<C>, providers?: StaticProvider[]): ComponentRef<C>; attachTemplate<T>(templateRef: TemplateRef<T>, context: T): EmbeddedViewRef<T>; updateClipPath(clipPath: string | undefined): void; static ɵfac: i0.ɵɵFactoryDeclaration<SkyOverlayComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<SkyOverlayComponent, "sky-overlay", never, {}, {}, never, never, true, never>; } /** * Represents a new overlay instance. It is used to manage the "closed" state of the overlay, * and access any public members on the appended content component instance. */ declare class SkyOverlayInstance { #private; /** * The configuration for the overlay. */ readonly config: SkyOverlayConfig; readonly componentRef: ComponentRef<SkyOverlayComponent>; /** * Emits when the overlay is clicked (but not its content). */ get backdropClick(): Observable<void>; /** * Emits after the overlay is closed. */ get closed(): Observable<void>; id: string; constructor( /** * The configuration for the overlay. */ config: SkyOverlayConfig, componentRef: ComponentRef<SkyOverlayComponent>); /** * Creates and attaches a component to the overlay. * @param component The component to attach. * @param providers Custom providers to apply to the component. */ attachComponent<C>(component: Type<C>, providers?: StaticProvider[]): C; /** * Attaches a `TemplateRef` to the overlay. * @param templateRef The `TemplateRef` to attach. * @param context The context to provide to the template. */ attachTemplate<T>(templateRef: TemplateRef<T>, context?: T): void; } /** * @deprecated The `SkyOverlayModule` is no longer needed and can be removed from your application. * @internal */ declare class SkyOverlayModule { static ɵfac: i0.ɵɵFactoryDeclaration<SkyOverlayModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<SkyOverlayModule, never, never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<SkyOverlayModule>; } /** * This service is used to create new overlays. * @internal */ declare class SkyOverlayService { #private; private static overlays; constructor(dynamicComponentSvc: SkyDynamicComponentService); /** * Creates an empty overlay. Use the returned `SkyOverlayInstance` to append content. * @param config Configuration for the overlay. */ create(config?: SkyOverlayConfig): SkyOverlayInstance; /** * Closes (and destroys) an overlay instance. * @param instance The instance to close. */ close(instance: SkyOverlayInstance): void; /** * Closes all overlay instances. */ closeAll(): void; static ɵfac: i0.ɵɵFactoryDeclaration<SkyOverlayService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<SkyOverlayService>; } /** * This service is used to create new overlays. * @internal * @deprecated Use `SkyOverlayService` to open a standalone component instead. */ declare class SkyOverlayLegacyService extends SkyOverlayService { constructor(dynamicComponentSvc: SkyDynamicComponentLegacyService); static ɵfac: i0.ɵɵFactoryDeclaration<SkyOverlayLegacyService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<SkyOverlayLegacyService>; } declare class SkyPercentPipe implements OnDestroy, PipeTransform { #private; get defaultLocale(): string; constructor(localeProvider: SkyAppLocaleProvider); ngOnDestroy(): void; transform(value: string, format?: string, locale?: string): string; static ɵfac: i0.ɵɵFactoryDeclaration<SkyPercentPipe, never>; static ɵpipe: i0.ɵɵPipeDeclaration<SkyPercentPipe, "skyPercent", true>; } declare class SkyPercentPipeModule { static ɵfac: i0.ɵɵFactoryDeclaration<SkyPercentPipeModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<SkyPercentPipeModule, never, [typeof SkyCoreResourcesModule, typeof SkyPercentPipe], [typeof SkyPercentPipe]>; static ɵinj: i0.ɵɵInjectorDeclaration<SkyPercentPipeModule>; } /** * Acts like `SkyMediaQueryService` for a container element, emitting the same responsive breakpoints. * @deprecated Use the `SkyResponsiveHostDirective` instead. */ declare class SkyResizeObserverMediaQueryService extends SkyMediaQueryService implements OnDestroy { #private; /** * Emits when the breakpoint changes. */ get breakpointChange(): Observable<SkyBreakpoint>; /** * Returns the current breakpoint. * @deprecated Subscribe to the `breakpointChange` observable instead. */ get current(): SkyMediaBreakpoints; ngOnDestroy(): void; /** * @internal */ destroy(): void; /** * Sets the container element to watch. The `SkyResizeObserverMediaQueryService` will only observe one element at a * time. Any previous subscriptions will be unsubscribed when a new element is observed. */ observe(element: ElementRef, options?: { updateResponsiveClasses?: boolean; }): SkyResizeObserverMediaQueryService; /** * Stop watching the container element and remove any added classes. */ unobserve(): void; /** * Subscribes to element size changes that cross breakpoints. */ subscribe(listener: SkyMediaQueryListener): Subscription; static ɵfac: i0.ɵɵFactoryDeclaration<SkyResizeObserverMediaQueryService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<SkyResizeObserverMediaQueryService>; } /** * Service to create rxjs observables for changes to the content box dimensions of elements. */ declare class SkyResizeObserverService implements OnDestroy { #private; constructor(); ngOnDestroy(): void; /** * Create rxjs observable to get size changes for an element ref. */ observe(element: ElementRef): Observable<ResizeObserverEntry>; static ɵfac: i0.ɵɵFactoryDeclaration<SkyResizeObserverService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<SkyResizeObserverService>; } /** * Adds the element to a screen reader only section of the body. * This prevents components' DOM from including text only intended for screen readers. * * @internal */ declare class SkyScreenReaderLabelDirective implements OnDestroy { #private; ngOnDestroy(): void; /** * Indicates if the label should be created in the DOM. * @default false */ set createLabel(value: boolean | undefined); get createLabel(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration<SkyScreenReaderLabelDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<SkyScreenReaderLabelDirective, "[skyScreenReaderLabel]", never, { "createLabel": { "alias": "createLabel"; "required": false; }; }, {}, never, never, true, never>; } /** * @internal */ interface SkyScrollShadowEventArgs { bottomShadow: string; topShadow: string; } /** * Raises an event when the box shadow for a component's header or footer should be adjusted * based on the scroll position of the host element. * @internal */ declare class SkyScrollShadowDirective implements OnDestroy { #private; set skyScrollShadowEnabled(value: boolean); get skyScrollShadowEnabled(): boolean; skyScrollShadow: EventEmitter<SkyScrollShadowEventArgs>; windowResize(): void; scroll(): void; ngOnDestroy(): void;