| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027 |
- /**
- * @license Angular v16.0.4
- * (c) 2010-2022 Google LLC. https://angular.io/
- * License: MIT
- */
- import { ApplicationConfig as ApplicationConfig_2 } from '@angular/core';
- import { ApplicationRef } from '@angular/core';
- import { ComponentRef } from '@angular/core';
- import { DebugElement } from '@angular/core';
- import { DebugNode } from '@angular/core';
- import { EnvironmentProviders } from '@angular/core';
- import { GetTestability } from '@angular/core';
- import * as i0 from '@angular/core';
- import * as i1 from '@angular/common';
- import { InjectionToken } from '@angular/core';
- import { makeStateKey as makeStateKey_2 } from '@angular/core';
- import { ModuleWithProviders } from '@angular/core';
- import { NgZone } from '@angular/core';
- import { OnDestroy } from '@angular/core';
- import { PlatformRef } from '@angular/core';
- import { Predicate } from '@angular/core';
- import { Provider } from '@angular/core';
- import { Renderer2 } from '@angular/core';
- import { RendererFactory2 } from '@angular/core';
- import { RendererType2 } from '@angular/core';
- import { Sanitizer } from '@angular/core';
- import { SecurityContext } from '@angular/core';
- import { StateKey as StateKey_2 } from '@angular/core';
- import { StaticProvider } from '@angular/core';
- import { Testability } from '@angular/core';
- import { TestabilityRegistry } from '@angular/core';
- import { TransferState as TransferState_2 } from '@angular/core';
- import { Type } from '@angular/core';
- import { Version } from '@angular/core';
- import { ɵConsole } from '@angular/core';
- import { ɵDomAdapter } from '@angular/common';
- import { ɵgetDOM } from '@angular/common';
- /**
- * Set of config options available during the application bootstrap operation.
- *
- * @publicApi
- *
- * @deprecated
- * `ApplicationConfig` has moved, please import `ApplicationConfig` from `@angular/core` instead.
- */
- export declare type ApplicationConfig = ApplicationConfig_2;
- /**
- * Bootstraps an instance of an Angular application and renders a standalone component as the
- * application's root component. More information about standalone components can be found in [this
- * guide](guide/standalone-components).
- *
- * @usageNotes
- * The root component passed into this function *must* be a standalone one (should have the
- * `standalone: true` flag in the `@Component` decorator config).
- *
- * ```typescript
- * @Component({
- * standalone: true,
- * template: 'Hello world!'
- * })
- * class RootComponent {}
- *
- * const appRef: ApplicationRef = await bootstrapApplication(RootComponent);
- * ```
- *
- * You can add the list of providers that should be available in the application injector by
- * specifying the `providers` field in an object passed as the second argument:
- *
- * ```typescript
- * await bootstrapApplication(RootComponent, {
- * providers: [
- * {provide: BACKEND_URL, useValue: 'https://yourdomain.com/api'}
- * ]
- * });
- * ```
- *
- * The `importProvidersFrom` helper method can be used to collect all providers from any
- * existing NgModule (and transitively from all NgModules that it imports):
- *
- * ```typescript
- * await bootstrapApplication(RootComponent, {
- * providers: [
- * importProvidersFrom(SomeNgModule)
- * ]
- * });
- * ```
- *
- * Note: the `bootstrapApplication` method doesn't include [Testability](api/core/Testability) by
- * default. You can add [Testability](api/core/Testability) by getting the list of necessary
- * providers using `provideProtractorTestingSupport()` function and adding them into the `providers`
- * array, for example:
- *
- * ```typescript
- * import {provideProtractorTestingSupport} from '@angular/platform-browser';
- *
- * await bootstrapApplication(RootComponent, {providers: [provideProtractorTestingSupport()]});
- * ```
- *
- * @param rootComponent A reference to a standalone component that should be rendered.
- * @param options Extra configuration for the bootstrap operation, see `ApplicationConfig` for
- * additional info.
- * @returns A promise that returns an `ApplicationRef` instance once resolved.
- *
- * @publicApi
- */
- export declare function bootstrapApplication(rootComponent: Type<unknown>, options?: ApplicationConfig): Promise<ApplicationRef>;
- /**
- * Exports required infrastructure for all Angular apps.
- * Included by default in all Angular apps created with the CLI
- * `new` command.
- * Re-exports `CommonModule` and `ApplicationModule`, making their
- * exports and providers available to all apps.
- *
- * @publicApi
- */
- export declare class BrowserModule {
- constructor(providersAlreadyPresent: boolean | null);
- /**
- * Configures a browser-based app to transition from a server-rendered app, if
- * one is present on the page.
- *
- * @param params An object containing an identifier for the app to transition.
- * The ID must match between the client and server versions of the app.
- * @returns The reconfigured `BrowserModule` to import into the app's root `AppModule`.
- *
- * @deprecated Use {@link APP_ID} instead to set the application ID.
- */
- static withServerTransition(params: {
- appId: string;
- }): ModuleWithProviders<BrowserModule>;
- static ɵfac: i0.ɵɵFactoryDeclaration<BrowserModule, [{ optional: true; skipSelf: true; }]>;
- static ɵmod: i0.ɵɵNgModuleDeclaration<BrowserModule, never, never, [typeof i1.CommonModule, typeof i0.ApplicationModule]>;
- static ɵinj: i0.ɵɵInjectorDeclaration<BrowserModule>;
- }
- /**
- * Predicates for use with {@link DebugElement}'s query functions.
- *
- * @publicApi
- */
- export declare class By {
- /**
- * Match all nodes.
- *
- * @usageNotes
- * ### Example
- *
- * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}
- */
- static all(): Predicate<DebugNode>;
- /**
- * Match elements by the given CSS selector.
- *
- * @usageNotes
- * ### Example
- *
- * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}
- */
- static css(selector: string): Predicate<DebugElement>;
- /**
- * Match nodes that have the given directive present.
- *
- * @usageNotes
- * ### Example
- *
- * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}
- */
- static directive(type: Type<any>): Predicate<DebugNode>;
- }
- /**
- * Create an instance of an Angular application without bootstrapping any components. This is useful
- * for the situation where one wants to decouple application environment creation (a platform and
- * associated injectors) from rendering components on a screen. Components can be subsequently
- * bootstrapped on the returned `ApplicationRef`.
- *
- * @param options Extra configuration for the application environment, see `ApplicationConfig` for
- * additional info.
- * @returns A promise that returns an `ApplicationRef` instance once resolved.
- *
- * @publicApi
- */
- export declare function createApplication(options?: ApplicationConfig): Promise<ApplicationRef>;
- /**
- * Disables Angular tools.
- *
- * @publicApi
- */
- export declare function disableDebugTools(): void;
- /**
- * DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing
- * values to be safe to use in the different DOM contexts.
- *
- * For example, when binding a URL in an `<a [href]="someValue">` hyperlink, `someValue` will be
- * sanitized so that an attacker cannot inject e.g. a `javascript:` URL that would execute code on
- * the website.
- *
- * In specific situations, it might be necessary to disable sanitization, for example if the
- * application genuinely needs to produce a `javascript:` style link with a dynamic value in it.
- * Users can bypass security by constructing a value with one of the `bypassSecurityTrust...`
- * methods, and then binding to that value from the template.
- *
- * These situations should be very rare, and extraordinary care must be taken to avoid creating a
- * Cross Site Scripting (XSS) security bug!
- *
- * When using `bypassSecurityTrust...`, make sure to call the method as early as possible and as
- * close as possible to the source of the value, to make it easy to verify no security bug is
- * created by its use.
- *
- * It is not required (and not recommended) to bypass security if the value is safe, e.g. a URL that
- * does not start with a suspicious protocol, or an HTML snippet that does not contain dangerous
- * code. The sanitizer leaves safe values intact.
- *
- * @security Calling any of the `bypassSecurityTrust...` APIs disables Angular's built-in
- * sanitization for the value passed in. Carefully check and audit all values and code paths going
- * into this call. Make sure any user data is appropriately escaped for this security context.
- * For more detail, see the [Security Guide](https://g.co/ng/security).
- *
- * @publicApi
- */
- export declare abstract class DomSanitizer implements Sanitizer {
- /**
- * Gets a safe value from either a known safe value or a value with unknown safety.
- *
- * If the given value is already a `SafeValue`, this method returns the unwrapped value.
- * If the security context is HTML and the given value is a plain string, this method
- * sanitizes the string, removing any potentially unsafe content.
- * For any other security context, this method throws an error if provided
- * with a plain string.
- */
- abstract sanitize(context: SecurityContext, value: SafeValue | string | null): string | null;
- /**
- * Bypass security and trust the given value to be safe HTML. Only use this when the bound HTML
- * is unsafe (e.g. contains `<script>` tags) and the code should be executed. The sanitizer will
- * leave safe HTML intact, so in most situations this method should not be used.
- *
- * **WARNING:** calling this method with untrusted user data exposes your application to XSS
- * security risks!
- */
- abstract bypassSecurityTrustHtml(value: string): SafeHtml;
- /**
- * Bypass security and trust the given value to be safe style value (CSS).
- *
- * **WARNING:** calling this method with untrusted user data exposes your application to XSS
- * security risks!
- */
- abstract bypassSecurityTrustStyle(value: string): SafeStyle;
- /**
- * Bypass security and trust the given value to be safe JavaScript.
- *
- * **WARNING:** calling this method with untrusted user data exposes your application to XSS
- * security risks!
- */
- abstract bypassSecurityTrustScript(value: string): SafeScript;
- /**
- * Bypass security and trust the given value to be a safe style URL, i.e. a value that can be used
- * in hyperlinks or `<img src>`.
- *
- * **WARNING:** calling this method with untrusted user data exposes your application to XSS
- * security risks!
- */
- abstract bypassSecurityTrustUrl(value: string): SafeUrl;
- /**
- * Bypass security and trust the given value to be a safe resource URL, i.e. a location that may
- * be used to load executable code from, like `<script src>`, or `<iframe src>`.
- *
- * **WARNING:** calling this method with untrusted user data exposes your application to XSS
- * security risks!
- */
- abstract bypassSecurityTrustResourceUrl(value: string): SafeResourceUrl;
- static ɵfac: i0.ɵɵFactoryDeclaration<DomSanitizer, never>;
- static ɵprov: i0.ɵɵInjectableDeclaration<DomSanitizer>;
- }
- /**
- * Enabled Angular debug tools that are accessible via your browser's
- * developer console.
- *
- * Usage:
- *
- * 1. Open developer console (e.g. in Chrome Ctrl + Shift + j)
- * 1. Type `ng.` (usually the console will show auto-complete suggestion)
- * 1. Try the change detection profiler `ng.profiler.timeChangeDetection()`
- * then hit Enter.
- *
- * @publicApi
- */
- export declare function enableDebugTools<T>(ref: ComponentRef<T>): ComponentRef<T>;
- /**
- * The injection token for the event-manager plug-in service.
- *
- * @publicApi
- */
- export declare const EVENT_MANAGER_PLUGINS: InjectionToken<EventManagerPlugin[]>;
- /**
- * An injectable service that provides event management for Angular
- * through a browser plug-in.
- *
- * @publicApi
- */
- export declare class EventManager {
- private _zone;
- private _plugins;
- private _eventNameToPlugin;
- /**
- * Initializes an instance of the event-manager service.
- */
- constructor(plugins: EventManagerPlugin[], _zone: NgZone);
- /**
- * Registers a handler for a specific element and event.
- *
- * @param element The HTML element to receive event notifications.
- * @param eventName The name of the event to listen for.
- * @param handler A function to call when the notification occurs. Receives the
- * event object as an argument.
- * @returns A callback function that can be used to remove the handler.
- */
- addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;
- /**
- * Retrieves the compilation zone in which event listeners are registered.
- */
- getZone(): NgZone;
- static ɵfac: i0.ɵɵFactoryDeclaration<EventManager, never>;
- static ɵprov: i0.ɵɵInjectableDeclaration<EventManager>;
- }
- declare abstract class EventManagerPlugin {
- private _doc;
- constructor(_doc: any);
- manager: EventManager;
- abstract supports(eventName: string): boolean;
- abstract addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;
- }
- /**
- * Provides DOM operations in any browser environment.
- *
- * @security Tread carefully! Interacting with the DOM directly is dangerous and
- * can introduce XSS risks.
- */
- declare abstract class GenericBrowserDomAdapter extends ɵDomAdapter {
- readonly supportsDOMEvents: boolean;
- }
- /**
- * DI token for providing [HammerJS](https://hammerjs.github.io/) support to Angular.
- * @see `HammerGestureConfig`
- *
- * @ngModule HammerModule
- * @publicApi
- */
- export declare const HAMMER_GESTURE_CONFIG: InjectionToken<HammerGestureConfig>;
- /**
- * Injection token used to provide a {@link HammerLoader} to Angular.
- *
- * @publicApi
- */
- export declare const HAMMER_LOADER: InjectionToken<HammerLoader>;
- /**
- * An injectable [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)
- * for gesture recognition. Configures specific event recognition.
- * @publicApi
- */
- export declare class HammerGestureConfig {
- /**
- * A set of supported event names for gestures to be used in Angular.
- * Angular supports all built-in recognizers, as listed in
- * [HammerJS documentation](https://hammerjs.github.io/).
- */
- events: string[];
- /**
- * Maps gesture event names to a set of configuration options
- * that specify overrides to the default values for specific properties.
- *
- * The key is a supported event name to be configured,
- * and the options object contains a set of properties, with override values
- * to be applied to the named recognizer event.
- * For example, to disable recognition of the rotate event, specify
- * `{"rotate": {"enable": false}}`.
- *
- * Properties that are not present take the HammerJS default values.
- * For information about which properties are supported for which events,
- * and their allowed and default values, see
- * [HammerJS documentation](https://hammerjs.github.io/).
- *
- */
- overrides: {
- [key: string]: Object;
- };
- /**
- * Properties whose default values can be overridden for a given event.
- * Different sets of properties apply to different events.
- * For information about which properties are supported for which events,
- * and their allowed and default values, see
- * [HammerJS documentation](https://hammerjs.github.io/).
- */
- options?: {
- cssProps?: any;
- domEvents?: boolean;
- enable?: boolean | ((manager: any) => boolean);
- preset?: any[];
- touchAction?: string;
- recognizers?: any[];
- inputClass?: any;
- inputTarget?: EventTarget;
- };
- /**
- * Creates a [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)
- * and attaches it to a given HTML element.
- * @param element The element that will recognize gestures.
- * @returns A HammerJS event-manager object.
- */
- buildHammer(element: HTMLElement): HammerInstance;
- static ɵfac: i0.ɵɵFactoryDeclaration<HammerGestureConfig, never>;
- static ɵprov: i0.ɵɵInjectableDeclaration<HammerGestureConfig>;
- }
- declare interface HammerInstance {
- on(eventName: string, callback?: Function): void;
- off(eventName: string, callback?: Function): void;
- destroy?(): void;
- }
- /**
- * Function that loads HammerJS, returning a promise that is resolved once HammerJs is loaded.
- *
- * @publicApi
- */
- export declare type HammerLoader = () => Promise<void>;
- /**
- * Adds support for HammerJS.
- *
- * Import this module at the root of your application so that Angular can work with
- * HammerJS to detect gesture events.
- *
- * Note that applications still need to include the HammerJS script itself. This module
- * simply sets up the coordination layer between HammerJS and Angular's EventManager.
- *
- * @publicApi
- */
- export declare class HammerModule {
- static ɵfac: i0.ɵɵFactoryDeclaration<HammerModule, never>;
- static ɵmod: i0.ɵɵNgModuleDeclaration<HammerModule, never, never, never>;
- static ɵinj: i0.ɵɵInjectorDeclaration<HammerModule>;
- }
- /**
- * Helper type to represent a Hydration feature.
- *
- * @publicApi
- * @developerPreview
- */
- export declare interface HydrationFeature<FeatureKind extends HydrationFeatureKind> {
- ɵkind: FeatureKind;
- ɵproviders: Provider[];
- }
- /**
- * The list of features as an enum to uniquely type each `HydrationFeature`.
- * @see HydrationFeature
- *
- * @publicApi
- * @developerPreview
- */
- export declare const enum HydrationFeatureKind {
- NoDomReuseFeature = 0,
- NoHttpTransferCache = 1
- }
- /**
- * Create a `StateKey<T>` that can be used to store value of type T with `TransferState`.
- *
- * Example:
- *
- * ```
- * const COUNTER_KEY = makeStateKey<number>('counter');
- * let value = 10;
- *
- * transferState.set(COUNTER_KEY, value);
- * ```
- *
- * @publicApi
- * @deprecated `makeStateKey` has moved, please import `makeStateKey` from `@angular/core` instead.
- */
- export declare const makeStateKey: typeof makeStateKey_2;
- /**
- * A service for managing HTML `<meta>` tags.
- *
- * Properties of the `MetaDefinition` object match the attributes of the
- * HTML `<meta>` tag. These tags define document metadata that is important for
- * things like configuring a Content Security Policy, defining browser compatibility
- * and security settings, setting HTTP Headers, defining rich content for social sharing,
- * and Search Engine Optimization (SEO).
- *
- * To identify specific `<meta>` tags in a document, use an attribute selection
- * string in the format `"tag_attribute='value string'"`.
- * For example, an `attrSelector` value of `"name='description'"` matches a tag
- * whose `name` attribute has the value `"description"`.
- * Selectors are used with the `querySelector()` Document method,
- * in the format `meta[{attrSelector}]`.
- *
- * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta)
- * @see [Document.querySelector()](https://developer.mozilla.org/docs/Web/API/Document/querySelector)
- *
- *
- * @publicApi
- */
- export declare class Meta {
- private _doc;
- private _dom;
- constructor(_doc: any);
- /**
- * Retrieves or creates a specific `<meta>` tag element in the current HTML document.
- * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute
- * values in the provided tag definition, and verifies that all other attribute values are equal.
- * If an existing element is found, it is returned and is not modified in any way.
- * @param tag The definition of a `<meta>` element to match or create.
- * @param forceCreation True to create a new element without checking whether one already exists.
- * @returns The existing element with the same attributes and values if found,
- * the new element if no match is found, or `null` if the tag parameter is not defined.
- */
- addTag(tag: MetaDefinition, forceCreation?: boolean): HTMLMetaElement | null;
- /**
- * Retrieves or creates a set of `<meta>` tag elements in the current HTML document.
- * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute
- * values in the provided tag definition, and verifies that all other attribute values are equal.
- * @param tags An array of tag definitions to match or create.
- * @param forceCreation True to create new elements without checking whether they already exist.
- * @returns The matching elements if found, or the new elements.
- */
- addTags(tags: MetaDefinition[], forceCreation?: boolean): HTMLMetaElement[];
- /**
- * Retrieves a `<meta>` tag element in the current HTML document.
- * @param attrSelector The tag attribute and value to match against, in the format
- * `"tag_attribute='value string'"`.
- * @returns The matching element, if any.
- */
- getTag(attrSelector: string): HTMLMetaElement | null;
- /**
- * Retrieves a set of `<meta>` tag elements in the current HTML document.
- * @param attrSelector The tag attribute and value to match against, in the format
- * `"tag_attribute='value string'"`.
- * @returns The matching elements, if any.
- */
- getTags(attrSelector: string): HTMLMetaElement[];
- /**
- * Modifies an existing `<meta>` tag element in the current HTML document.
- * @param tag The tag description with which to replace the existing tag content.
- * @param selector A tag attribute and value to match against, to identify
- * an existing tag. A string in the format `"tag_attribute=`value string`"`.
- * If not supplied, matches a tag with the same `name` or `property` attribute value as the
- * replacement tag.
- * @return The modified element.
- */
- updateTag(tag: MetaDefinition, selector?: string): HTMLMetaElement | null;
- /**
- * Removes an existing `<meta>` tag element from the current HTML document.
- * @param attrSelector A tag attribute and value to match against, to identify
- * an existing tag. A string in the format `"tag_attribute=`value string`"`.
- */
- removeTag(attrSelector: string): void;
- /**
- * Removes an existing `<meta>` tag element from the current HTML document.
- * @param meta The tag definition to match against to identify an existing tag.
- */
- removeTagElement(meta: HTMLMetaElement): void;
- private _getOrCreateElement;
- private _setMetaElementAttributes;
- private _parseSelector;
- private _containsAttributes;
- private _getMetaKeyMap;
- static ɵfac: i0.ɵɵFactoryDeclaration<Meta, never>;
- static ɵprov: i0.ɵɵInjectableDeclaration<Meta>;
- }
- /**
- * Represents the attributes of an HTML `<meta>` element. The element itself is
- * represented by the internal `HTMLMetaElement`.
- *
- * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta)
- * @see `Meta`
- *
- * @publicApi
- */
- export declare type MetaDefinition = {
- charset?: string;
- content?: string;
- httpEquiv?: string;
- id?: string;
- itemprop?: string;
- name?: string;
- property?: string;
- scheme?: string;
- url?: string;
- } & {
- [prop: string]: string;
- };
- /**
- * A factory function that returns a `PlatformRef` instance associated with browser service
- * providers.
- *
- * @publicApi
- */
- export declare const platformBrowser: (extraProviders?: StaticProvider[]) => PlatformRef;
- /**
- * Sets up providers necessary to enable hydration functionality for the application.
- * By default, the function enables the recommended set of features for the optimal
- * performance for most of the applications. You can enable/disable features by
- * passing special functions (from the `HydrationFeatures` set) as arguments to the
- * `provideClientHydration` function.
- *
- * @usageNotes
- *
- * Basic example of how you can enable hydration in your application when
- * `bootstrapApplication` function is used:
- * ```
- * bootstrapApplication(AppComponent, {
- * providers: [provideClientHydration()]
- * });
- * ```
- *
- * Alternatively if you are using NgModules, you would add `provideClientHydration`
- * to your root app module's provider list.
- * ```
- * @NgModule({
- * declarations: [RootCmp],
- * bootstrap: [RootCmp],
- * providers: [provideClientHydration()],
- * })
- * export class AppModule {}
- * ```
- *
- * @see `withNoDomReuse`
- * @see `withNoHttpTransferCache`
- *
- * @param features Optional features to configure additional router behaviors.
- * @returns A set of providers to enable hydration.
- *
- * @publicApi
- * @developerPreview
- */
- export declare function provideClientHydration(...features: HydrationFeature<HydrationFeatureKind>[]): EnvironmentProviders;
- /**
- * Returns a set of providers required to setup [Testability](api/core/Testability) for an
- * application bootstrapped using the `bootstrapApplication` function. The set of providers is
- * needed to support testing an application with Protractor (which relies on the Testability APIs
- * to be present).
- *
- * @returns An array of providers required to setup Testability for an application and make it
- * available for testing using Protractor.
- *
- * @publicApi
- */
- export declare function provideProtractorTestingSupport(): Provider[];
- /**
- * A [DI token](guide/glossary#di-token "DI token definition") that indicates whether styles
- * of destroyed components should be removed from DOM.
- *
- * By default, the value is set to `false`. This will be changed in the next major version.
- * @publicApi
- */
- export declare const REMOVE_STYLES_ON_COMPONENT_DESTROY: InjectionToken<boolean>;
- /**
- * Marker interface for a value that's safe to use as HTML.
- *
- * @publicApi
- */
- export declare interface SafeHtml extends SafeValue {
- }
- /**
- * Marker interface for a value that's safe to use as a URL to load executable code from.
- *
- * @publicApi
- */
- export declare interface SafeResourceUrl extends SafeValue {
- }
- /**
- * Marker interface for a value that's safe to use as JavaScript.
- *
- * @publicApi
- */
- export declare interface SafeScript extends SafeValue {
- }
- /**
- * Marker interface for a value that's safe to use as style (CSS).
- *
- * @publicApi
- */
- export declare interface SafeStyle extends SafeValue {
- }
- /**
- * Marker interface for a value that's safe to use as a URL linking to a document.
- *
- * @publicApi
- */
- export declare interface SafeUrl extends SafeValue {
- }
- /**
- * Marker interface for a value that's safe to use in a particular context.
- *
- * @publicApi
- */
- export declare interface SafeValue {
- }
- /**
- * A type-safe key to use with `TransferState`.
- *
- * Example:
- *
- * ```
- * const COUNTER_KEY = makeStateKey<number>('counter');
- * let value = 10;
- *
- * transferState.set(COUNTER_KEY, value);
- * ```
- * @publicApi
- *
- * @deprecated `StateKey` has moved, please import `StateKey` from `@angular/core` instead.
- */
- export declare type StateKey<T> = StateKey_2<T>;
- /**
- * A service that can be used to get and set the title of a current HTML document.
- *
- * Since an Angular application can't be bootstrapped on the entire HTML document (`<html>` tag)
- * it is not possible to bind to the `text` property of the `HTMLTitleElement` elements
- * (representing the `<title>` tag). Instead, this service can be used to set and get the current
- * title value.
- *
- * @publicApi
- */
- export declare class Title {
- private _doc;
- constructor(_doc: any);
- /**
- * Get the title of the current HTML document.
- */
- getTitle(): string;
- /**
- * Set the title of the current HTML document.
- * @param newTitle
- */
- setTitle(newTitle: string): void;
- static ɵfac: i0.ɵɵFactoryDeclaration<Title, never>;
- static ɵprov: i0.ɵɵInjectableDeclaration<Title>;
- }
- /**
- *
- * A key value store that is transferred from the application on the server side to the application
- * on the client side.
- *
- * The `TransferState` is available as an injectable token.
- * On the client, just inject this token using DI and use it, it will be lazily initialized.
- * On the server it's already included if `renderApplication` function is used. Otherwise, import
- * the `ServerTransferStateModule` module to make the `TransferState` available.
- *
- * The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only
- * boolean, number, string, null and non-class objects will be serialized and deserialized in a
- * non-lossy manner.
- *
- * @publicApi
- *
- * @deprecated `TransferState` has moved, please import `TransferState` from `@angular/core`
- * instead.
- */
- export declare type TransferState = TransferState_2;
- export declare const TransferState: {
- new (): TransferState_2;
- };
- /**
- * @publicApi
- */
- export declare const VERSION: Version;
- /**
- * Disables DOM nodes reuse during hydration. Effectively makes
- * Angular re-render an application from scratch on the client.
- *
- * When this option is enabled, make sure that the initial navigation
- * option is configured for the Router as `enabledBlocking` by using the
- * `withEnabledBlockingInitialNavigation` in the `provideRouter` call:
- *
- * ```
- * bootstrapApplication(RootComponent, {
- * providers: [
- * provideRouter(
- * // ... other features ...
- * withEnabledBlockingInitialNavigation()
- * ),
- * provideClientHydration(withNoDomReuse())
- * ]
- * });
- * ```
- *
- * This would ensure that the application is rerendered after all async
- * operations in the Router (such as lazy-loading of components,
- * waiting for async guards and resolvers) are completed to avoid
- * clearing the DOM on the client too soon, thus causing content flicker.
- *
- * @see `provideRouter`
- * @see `withEnabledBlockingInitialNavigation`
- *
- * @publicApi
- * @developerPreview
- */
- export declare function withNoDomReuse(): HydrationFeature<HydrationFeatureKind.NoDomReuseFeature>;
- /**
- * Disables HTTP transfer cache. Effectively causes HTTP requests to be performed twice: once on the
- * server and other one on the browser.
- *
- * @publicApi
- * @developerPreview
- */
- export declare function withNoHttpTransferCache(): HydrationFeature<HydrationFeatureKind.NoHttpTransferCache>;
- /**
- * A `DomAdapter` powered by full browser DOM APIs.
- *
- * @security Tread carefully! Interacting with the DOM directly is dangerous and
- * can introduce XSS risks.
- */
- export declare class ɵBrowserDomAdapter extends GenericBrowserDomAdapter {
- static makeCurrent(): void;
- onAndCancel(el: Node, evt: any, listener: any): Function;
- dispatchEvent(el: Node, evt: any): void;
- remove(node: Node): void;
- createElement(tagName: string, doc?: Document): HTMLElement;
- createHtmlDocument(): Document;
- getDefaultDocument(): Document;
- isElementNode(node: Node): boolean;
- isShadowRoot(node: any): boolean;
- /** @deprecated No longer being used in Ivy code. To be removed in version 14. */
- getGlobalEventTarget(doc: Document, target: string): EventTarget | null;
- getBaseHref(doc: Document): string | null;
- resetBaseElement(): void;
- getUserAgent(): string;
- getCookie(name: string): string | null;
- }
- export declare class ɵBrowserGetTestability implements GetTestability {
- addToWindow(registry: TestabilityRegistry): void;
- findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean): Testability | null;
- }
- export declare class ɵDomEventsPlugin extends EventManagerPlugin {
- constructor(doc: any);
- supports(eventName: string): boolean;
- addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;
- removeEventListener(target: any, eventName: string, callback: Function): void;
- static ɵfac: i0.ɵɵFactoryDeclaration<ɵDomEventsPlugin, never>;
- static ɵprov: i0.ɵɵInjectableDeclaration<ɵDomEventsPlugin>;
- }
- export declare class ɵDomRendererFactory2 implements RendererFactory2, OnDestroy {
- private readonly eventManager;
- private readonly sharedStylesHost;
- private readonly appId;
- private removeStylesOnCompDestory;
- private readonly doc;
- readonly platformId: Object;
- readonly ngZone: NgZone;
- private readonly nonce;
- private readonly rendererByCompId;
- private readonly defaultRenderer;
- private readonly platformIsServer;
- constructor(eventManager: EventManager, sharedStylesHost: ɵSharedStylesHost, appId: string, removeStylesOnCompDestory: boolean, doc: Document, platformId: Object, ngZone: NgZone, nonce?: string | null);
- createRenderer(element: any, type: RendererType2 | null): Renderer2;
- private getOrCreateRenderer;
- ngOnDestroy(): void;
- static ɵfac: i0.ɵɵFactoryDeclaration<ɵDomRendererFactory2, never>;
- static ɵprov: i0.ɵɵInjectableDeclaration<ɵDomRendererFactory2>;
- }
- export declare class ɵDomSanitizerImpl extends DomSanitizer {
- private _doc;
- constructor(_doc: any);
- sanitize(ctx: SecurityContext, value: SafeValue | string | null): string | null;
- bypassSecurityTrustHtml(value: string): SafeHtml;
- bypassSecurityTrustStyle(value: string): SafeStyle;
- bypassSecurityTrustScript(value: string): SafeScript;
- bypassSecurityTrustUrl(value: string): SafeUrl;
- bypassSecurityTrustResourceUrl(value: string): SafeResourceUrl;
- static ɵfac: i0.ɵɵFactoryDeclaration<ɵDomSanitizerImpl, never>;
- static ɵprov: i0.ɵɵInjectableDeclaration<ɵDomSanitizerImpl>;
- }
- export { ɵgetDOM }
- /**
- * Event plugin that adds Hammer support to an application.
- *
- * @ngModule HammerModule
- */
- export declare class ɵHammerGesturesPlugin extends EventManagerPlugin {
- private _config;
- private console;
- private loader?;
- private _loaderPromise;
- constructor(doc: any, _config: HammerGestureConfig, console: ɵConsole, loader?: HammerLoader | null | undefined);
- supports(eventName: string): boolean;
- addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;
- isCustomEvent(eventName: string): boolean;
- static ɵfac: i0.ɵɵFactoryDeclaration<ɵHammerGesturesPlugin, [null, null, null, { optional: true; }]>;
- static ɵprov: i0.ɵɵInjectableDeclaration<ɵHammerGesturesPlugin>;
- }
- export declare function ɵinitDomAdapter(): void;
- export declare const ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS: StaticProvider[];
- /**
- * @publicApi
- * A browser plug-in that provides support for handling of key events in Angular.
- */
- export declare class ɵKeyEventsPlugin extends EventManagerPlugin {
- /**
- * Initializes an instance of the browser plug-in.
- * @param doc The document in which key events will be detected.
- */
- constructor(doc: any);
- /**
- * Reports whether a named key event is supported.
- * @param eventName The event name to query.
- * @return True if the named key event is supported.
- */
- supports(eventName: string): boolean;
- /**
- * Registers a handler for a specific element and key event.
- * @param element The HTML element to receive event notifications.
- * @param eventName The name of the key event to listen for.
- * @param handler A function to call when the notification occurs. Receives the
- * event object as an argument.
- * @returns The key event that was registered.
- */
- addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;
- /**
- * Parses the user provided full keyboard event definition and normalizes it for
- * later internal use. It ensures the string is all lowercase, converts special
- * characters to a standard spelling, and orders all the values consistently.
- *
- * @param eventName The name of the key event to listen for.
- * @returns an object with the full, normalized string, and the dom event name
- * or null in the case when the event doesn't match a keyboard event.
- */
- static parseEventName(eventName: string): {
- fullKey: string;
- domEventName: string;
- } | null;
- /**
- * Determines whether the actual keys pressed match the configured key code string.
- * The `fullKeyCode` event is normalized in the `parseEventName` method when the
- * event is attached to the DOM during the `addEventListener` call. This is unseen
- * by the end user and is normalized for internal consistency and parsing.
- *
- * @param event The keyboard event.
- * @param fullKeyCode The normalized user defined expected key event string
- * @returns boolean.
- */
- static matchEventFullKeyCode(event: KeyboardEvent, fullKeyCode: string): boolean;
- /**
- * Configures a handler callback for a key event.
- * @param fullKey The event name that combines all simultaneous keystrokes.
- * @param handler The function that responds to the key event.
- * @param zone The zone in which the event occurred.
- * @returns A callback function.
- */
- static eventCallback(fullKey: string, handler: Function, zone: NgZone): Function;
- static ɵfac: i0.ɵɵFactoryDeclaration<ɵKeyEventsPlugin, never>;
- static ɵprov: i0.ɵɵInjectableDeclaration<ɵKeyEventsPlugin>;
- }
- export declare class ɵSharedStylesHost implements OnDestroy {
- private readonly doc;
- private readonly appId;
- private nonce?;
- readonly platformId: object;
- private readonly styleRef;
- private readonly hostNodes;
- private readonly styleNodesInDOM;
- private readonly platformIsServer;
- constructor(doc: Document, appId: string, nonce?: string | null | undefined, platformId?: object);
- addStyles(styles: string[]): void;
- removeStyles(styles: string[]): void;
- ngOnDestroy(): void;
- addHost(hostNode: Node): void;
- removeHost(hostNode: Node): void;
- private getAllStyles;
- private onStyleAdded;
- private onStyleRemoved;
- private collectServerRenderedStyles;
- private changeUsageCount;
- private getStyleElement;
- private addStyleToHost;
- private resetHostNodes;
- static ɵfac: i0.ɵɵFactoryDeclaration<ɵSharedStylesHost, [null, null, { optional: true; }, null]>;
- static ɵprov: i0.ɵɵInjectableDeclaration<ɵSharedStylesHost>;
- }
- export { }
|