1 | /**
|
2 | * @license Angular v15.1.2
|
3 | * (c) 2010-2022 Google LLC. https://angular.io/
|
4 | * License: MIT
|
5 | */
|
6 |
|
7 |
|
8 | import { ApplicationRef } from '@angular/core';
|
9 | import { ComponentRef } from '@angular/core';
|
10 | import { DebugElement } from '@angular/core';
|
11 | import { DebugNode } from '@angular/core';
|
12 | import { EnvironmentProviders } from '@angular/core';
|
13 | import { GetTestability } from '@angular/core';
|
14 | import * as i0 from '@angular/core';
|
15 | import * as i1 from '@angular/common';
|
16 | import { InjectionToken } from '@angular/core';
|
17 | import { ModuleWithProviders } from '@angular/core';
|
18 | import { NgZone } from '@angular/core';
|
19 | import { OnDestroy } from '@angular/core';
|
20 | import { PlatformRef } from '@angular/core';
|
21 | import { Predicate } from '@angular/core';
|
22 | import { Provider } from '@angular/core';
|
23 | import { Renderer2 } from '@angular/core';
|
24 | import { RendererFactory2 } from '@angular/core';
|
25 | import { RendererType2 } from '@angular/core';
|
26 | import { Sanitizer } from '@angular/core';
|
27 | import { SecurityContext } from '@angular/core';
|
28 | import { StaticProvider } from '@angular/core';
|
29 | import { Testability } from '@angular/core';
|
30 | import { TestabilityRegistry } from '@angular/core';
|
31 | import { Type } from '@angular/core';
|
32 | import { Version } from '@angular/core';
|
33 | import { ɵConsole } from '@angular/core';
|
34 | import { ɵDomAdapter } from '@angular/common';
|
35 | import { ɵgetDOM } from '@angular/common';
|
36 |
|
37 | /**
|
38 | * Set of config options available during the application bootstrap operation.
|
39 | *
|
40 | * @publicApi
|
41 | */
|
42 | export declare interface ApplicationConfig {
|
43 | /**
|
44 | * List of providers that should be available to the root component and all its children.
|
45 | */
|
46 | providers: Array<Provider | EnvironmentProviders>;
|
47 | }
|
48 |
|
49 | /**
|
50 | * Bootstraps an instance of an Angular application and renders a standalone component as the
|
51 | * application's root component. More information about standalone components can be found in [this
|
52 | * guide](guide/standalone-components).
|
53 | *
|
54 | * @usageNotes
|
55 | * The root component passed into this function *must* be a standalone one (should have the
|
56 | * `standalone: true` flag in the `@Component` decorator config).
|
57 | *
|
58 | * ```typescript
|
59 | * @Component({
|
60 | * standalone: true,
|
61 | * template: 'Hello world!'
|
62 | * })
|
63 | * class RootComponent {}
|
64 | *
|
65 | * const appRef: ApplicationRef = await bootstrapApplication(RootComponent);
|
66 | * ```
|
67 | *
|
68 | * You can add the list of providers that should be available in the application injector by
|
69 | * specifying the `providers` field in an object passed as the second argument:
|
70 | *
|
71 | * ```typescript
|
72 | * await bootstrapApplication(RootComponent, {
|
73 | * providers: [
|
74 | * {provide: BACKEND_URL, useValue: 'https://yourdomain.com/api'}
|
75 | * ]
|
76 | * });
|
77 | * ```
|
78 | *
|
79 | * The `importProvidersFrom` helper method can be used to collect all providers from any
|
80 | * existing NgModule (and transitively from all NgModules that it imports):
|
81 | *
|
82 | * ```typescript
|
83 | * await bootstrapApplication(RootComponent, {
|
84 | * providers: [
|
85 | * importProvidersFrom(SomeNgModule)
|
86 | * ]
|
87 | * });
|
88 | * ```
|
89 | *
|
90 | * Note: the `bootstrapApplication` method doesn't include [Testability](api/core/Testability) by
|
91 | * default. You can add [Testability](api/core/Testability) by getting the list of necessary
|
92 | * providers using `provideProtractorTestingSupport()` function and adding them into the `providers`
|
93 | * array, for example:
|
94 | *
|
95 | * ```typescript
|
96 | * import {provideProtractorTestingSupport} from '@angular/platform-browser';
|
97 | *
|
98 | * await bootstrapApplication(RootComponent, {providers: [provideProtractorTestingSupport()]});
|
99 | * ```
|
100 | *
|
101 | * @param rootComponent A reference to a standalone component that should be rendered.
|
102 | * @param options Extra configuration for the bootstrap operation, see `ApplicationConfig` for
|
103 | * additional info.
|
104 | * @returns A promise that returns an `ApplicationRef` instance once resolved.
|
105 | *
|
106 | * @publicApi
|
107 | */
|
108 | export declare function bootstrapApplication(rootComponent: Type<unknown>, options?: ApplicationConfig): Promise<ApplicationRef>;
|
109 |
|
110 | /**
|
111 | * Exports required infrastructure for all Angular apps.
|
112 | * Included by default in all Angular apps created with the CLI
|
113 | * `new` command.
|
114 | * Re-exports `CommonModule` and `ApplicationModule`, making their
|
115 | * exports and providers available to all apps.
|
116 | *
|
117 | * @publicApi
|
118 | */
|
119 | export declare class BrowserModule {
|
120 | constructor(providersAlreadyPresent: boolean | null);
|
121 | /**
|
122 | * Configures a browser-based app to transition from a server-rendered app, if
|
123 | * one is present on the page.
|
124 | *
|
125 | * @param params An object containing an identifier for the app to transition.
|
126 | * The ID must match between the client and server versions of the app.
|
127 | * @returns The reconfigured `BrowserModule` to import into the app's root `AppModule`.
|
128 | */
|
129 | static withServerTransition(params: {
|
130 | appId: string;
|
131 | }): ModuleWithProviders<BrowserModule>;
|
132 | static ɵfac: i0.ɵɵFactoryDeclaration<BrowserModule, [{ optional: true; skipSelf: true; }]>;
|
133 | static ɵmod: i0.ɵɵNgModuleDeclaration<BrowserModule, never, never, [typeof i1.CommonModule, typeof i0.ApplicationModule]>;
|
134 | static ɵinj: i0.ɵɵInjectorDeclaration<BrowserModule>;
|
135 | }
|
136 |
|
137 | /**
|
138 | * NgModule to install on the client side while using the `TransferState` to transfer state from
|
139 | * server to client.
|
140 | *
|
141 | * @publicApi
|
142 | * @deprecated no longer needed, you can inject the `TransferState` in an app without providing
|
143 | * this module.
|
144 | */
|
145 | export declare class BrowserTransferStateModule {
|
146 | static ɵfac: i0.ɵɵFactoryDeclaration<BrowserTransferStateModule, never>;
|
147 | static ɵmod: i0.ɵɵNgModuleDeclaration<BrowserTransferStateModule, never, never, never>;
|
148 | static ɵinj: i0.ɵɵInjectorDeclaration<BrowserTransferStateModule>;
|
149 | }
|
150 |
|
151 | /**
|
152 | * Predicates for use with {@link DebugElement}'s query functions.
|
153 | *
|
154 | * @publicApi
|
155 | */
|
156 | export declare class By {
|
157 | /**
|
158 | * Match all nodes.
|
159 | *
|
160 | * @usageNotes
|
161 | * ### Example
|
162 | *
|
163 | * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}
|
164 | */
|
165 | static all(): Predicate<DebugNode>;
|
166 | /**
|
167 | * Match elements by the given CSS selector.
|
168 | *
|
169 | * @usageNotes
|
170 | * ### Example
|
171 | *
|
172 | * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}
|
173 | */
|
174 | static css(selector: string): Predicate<DebugElement>;
|
175 | /**
|
176 | * Match nodes that have the given directive present.
|
177 | *
|
178 | * @usageNotes
|
179 | * ### Example
|
180 | *
|
181 | * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}
|
182 | */
|
183 | static directive(type: Type<any>): Predicate<DebugNode>;
|
184 | }
|
185 |
|
186 | /**
|
187 | * Create an instance of an Angular application without bootstrapping any components. This is useful
|
188 | * for the situation where one wants to decouple application environment creation (a platform and
|
189 | * associated injectors) from rendering components on a screen. Components can be subsequently
|
190 | * bootstrapped on the returned `ApplicationRef`.
|
191 | *
|
192 | * @param options Extra configuration for the application environment, see `ApplicationConfig` for
|
193 | * additional info.
|
194 | * @returns A promise that returns an `ApplicationRef` instance once resolved.
|
195 | *
|
196 | * @publicApi
|
197 | */
|
198 | export declare function createApplication(options?: ApplicationConfig): Promise<ApplicationRef>;
|
199 |
|
200 | /**
|
201 | * Disables Angular tools.
|
202 | *
|
203 | * @publicApi
|
204 | */
|
205 | export declare function disableDebugTools(): void;
|
206 |
|
207 | /**
|
208 | * DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing
|
209 | * values to be safe to use in the different DOM contexts.
|
210 | *
|
211 | * For example, when binding a URL in an `<a [href]="someValue">` hyperlink, `someValue` will be
|
212 | * sanitized so that an attacker cannot inject e.g. a `javascript:` URL that would execute code on
|
213 | * the website.
|
214 | *
|
215 | * In specific situations, it might be necessary to disable sanitization, for example if the
|
216 | * application genuinely needs to produce a `javascript:` style link with a dynamic value in it.
|
217 | * Users can bypass security by constructing a value with one of the `bypassSecurityTrust...`
|
218 | * methods, and then binding to that value from the template.
|
219 | *
|
220 | * These situations should be very rare, and extraordinary care must be taken to avoid creating a
|
221 | * Cross Site Scripting (XSS) security bug!
|
222 | *
|
223 | * When using `bypassSecurityTrust...`, make sure to call the method as early as possible and as
|
224 | * close as possible to the source of the value, to make it easy to verify no security bug is
|
225 | * created by its use.
|
226 | *
|
227 | * It is not required (and not recommended) to bypass security if the value is safe, e.g. a URL that
|
228 | * does not start with a suspicious protocol, or an HTML snippet that does not contain dangerous
|
229 | * code. The sanitizer leaves safe values intact.
|
230 | *
|
231 | * @security Calling any of the `bypassSecurityTrust...` APIs disables Angular's built-in
|
232 | * sanitization for the value passed in. Carefully check and audit all values and code paths going
|
233 | * into this call. Make sure any user data is appropriately escaped for this security context.
|
234 | * For more detail, see the [Security Guide](https://g.co/ng/security).
|
235 | *
|
236 | * @publicApi
|
237 | */
|
238 | export declare abstract class DomSanitizer implements Sanitizer {
|
239 | /**
|
240 | * Sanitizes a value for use in the given SecurityContext.
|
241 | *
|
242 | * If value is trusted for the context, this method will unwrap the contained safe value and use
|
243 | * it directly. Otherwise, value will be sanitized to be safe in the given context, for example
|
244 | * by replacing URLs that have an unsafe protocol part (such as `javascript:`). The implementation
|
245 | * is responsible to make sure that the value can definitely be safely used in the given context.
|
246 | */
|
247 | abstract sanitize(context: SecurityContext, value: SafeValue | string | null): string | null;
|
248 | /**
|
249 | * Bypass security and trust the given value to be safe HTML. Only use this when the bound HTML
|
250 | * is unsafe (e.g. contains `<script>` tags) and the code should be executed. The sanitizer will
|
251 | * leave safe HTML intact, so in most situations this method should not be used.
|
252 | *
|
253 | * **WARNING:** calling this method with untrusted user data exposes your application to XSS
|
254 | * security risks!
|
255 | */
|
256 | abstract bypassSecurityTrustHtml(value: string): SafeHtml;
|
257 | /**
|
258 | * Bypass security and trust the given value to be safe style value (CSS).
|
259 | *
|
260 | * **WARNING:** calling this method with untrusted user data exposes your application to XSS
|
261 | * security risks!
|
262 | */
|
263 | abstract bypassSecurityTrustStyle(value: string): SafeStyle;
|
264 | /**
|
265 | * Bypass security and trust the given value to be safe JavaScript.
|
266 | *
|
267 | * **WARNING:** calling this method with untrusted user data exposes your application to XSS
|
268 | * security risks!
|
269 | */
|
270 | abstract bypassSecurityTrustScript(value: string): SafeScript;
|
271 | /**
|
272 | * Bypass security and trust the given value to be a safe style URL, i.e. a value that can be used
|
273 | * in hyperlinks or `<img src>`.
|
274 | *
|
275 | * **WARNING:** calling this method with untrusted user data exposes your application to XSS
|
276 | * security risks!
|
277 | */
|
278 | abstract bypassSecurityTrustUrl(value: string): SafeUrl;
|
279 | /**
|
280 | * Bypass security and trust the given value to be a safe resource URL, i.e. a location that may
|
281 | * be used to load executable code from, like `<script src>`, or `<iframe src>`.
|
282 | *
|
283 | * **WARNING:** calling this method with untrusted user data exposes your application to XSS
|
284 | * security risks!
|
285 | */
|
286 | abstract bypassSecurityTrustResourceUrl(value: string): SafeResourceUrl;
|
287 | static ɵfac: i0.ɵɵFactoryDeclaration<DomSanitizer, never>;
|
288 | static ɵprov: i0.ɵɵInjectableDeclaration<DomSanitizer>;
|
289 | }
|
290 |
|
291 | /**
|
292 | * Enabled Angular debug tools that are accessible via your browser's
|
293 | * developer console.
|
294 | *
|
295 | * Usage:
|
296 | *
|
297 | * 1. Open developer console (e.g. in Chrome Ctrl + Shift + j)
|
298 | * 1. Type `ng.` (usually the console will show auto-complete suggestion)
|
299 | * 1. Try the change detection profiler `ng.profiler.timeChangeDetection()`
|
300 | * then hit Enter.
|
301 | *
|
302 | * @publicApi
|
303 | */
|
304 | export declare function enableDebugTools<T>(ref: ComponentRef<T>): ComponentRef<T>;
|
305 |
|
306 | /**
|
307 | * The injection token for the event-manager plug-in service.
|
308 | *
|
309 | * @publicApi
|
310 | */
|
311 | export declare const EVENT_MANAGER_PLUGINS: InjectionToken<EventManagerPlugin[]>;
|
312 |
|
313 | /**
|
314 | * An injectable service that provides event management for Angular
|
315 | * through a browser plug-in.
|
316 | *
|
317 | * @publicApi
|
318 | */
|
319 | export declare class EventManager {
|
320 | private _zone;
|
321 | private _plugins;
|
322 | private _eventNameToPlugin;
|
323 | /**
|
324 | * Initializes an instance of the event-manager service.
|
325 | */
|
326 | constructor(plugins: EventManagerPlugin[], _zone: NgZone);
|
327 | /**
|
328 | * Registers a handler for a specific element and event.
|
329 | *
|
330 | * @param element The HTML element to receive event notifications.
|
331 | * @param eventName The name of the event to listen for.
|
332 | * @param handler A function to call when the notification occurs. Receives the
|
333 | * event object as an argument.
|
334 | * @returns A callback function that can be used to remove the handler.
|
335 | */
|
336 | addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;
|
337 | /**
|
338 | * Registers a global handler for an event in a target view.
|
339 | *
|
340 | * @param target A target for global event notifications. One of "window", "document", or "body".
|
341 | * @param eventName The name of the event to listen for.
|
342 | * @param handler A function to call when the notification occurs. Receives the
|
343 | * event object as an argument.
|
344 | * @returns A callback function that can be used to remove the handler.
|
345 | * @deprecated No longer being used in Ivy code. To be removed in version 14.
|
346 | */
|
347 | addGlobalEventListener(target: string, eventName: string, handler: Function): Function;
|
348 | /**
|
349 | * Retrieves the compilation zone in which event listeners are registered.
|
350 | */
|
351 | getZone(): NgZone;
|
352 | static ɵfac: i0.ɵɵFactoryDeclaration<EventManager, never>;
|
353 | static ɵprov: i0.ɵɵInjectableDeclaration<EventManager>;
|
354 | }
|
355 |
|
356 | declare abstract class EventManagerPlugin {
|
357 | private _doc;
|
358 | constructor(_doc: any);
|
359 | manager: EventManager;
|
360 | abstract supports(eventName: string): boolean;
|
361 | abstract addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;
|
362 | addGlobalEventListener(element: string, eventName: string, handler: Function): Function;
|
363 | }
|
364 |
|
365 | /**
|
366 | * Provides DOM operations in any browser environment.
|
367 | *
|
368 | * @security Tread carefully! Interacting with the DOM directly is dangerous and
|
369 | * can introduce XSS risks.
|
370 | */
|
371 | declare abstract class GenericBrowserDomAdapter extends ɵDomAdapter {
|
372 | readonly supportsDOMEvents: boolean;
|
373 | }
|
374 |
|
375 | /**
|
376 | * DI token for providing [HammerJS](https://hammerjs.github.io/) support to Angular.
|
377 | * @see `HammerGestureConfig`
|
378 | *
|
379 | * @ngModule HammerModule
|
380 | * @publicApi
|
381 | */
|
382 | export declare const HAMMER_GESTURE_CONFIG: InjectionToken<HammerGestureConfig>;
|
383 |
|
384 | /**
|
385 | * Injection token used to provide a {@link HammerLoader} to Angular.
|
386 | *
|
387 | * @publicApi
|
388 | */
|
389 | export declare const HAMMER_LOADER: InjectionToken<HammerLoader>;
|
390 |
|
391 | /**
|
392 | * An injectable [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)
|
393 | * for gesture recognition. Configures specific event recognition.
|
394 | * @publicApi
|
395 | */
|
396 | export declare class HammerGestureConfig {
|
397 | /**
|
398 | * A set of supported event names for gestures to be used in Angular.
|
399 | * Angular supports all built-in recognizers, as listed in
|
400 | * [HammerJS documentation](https://hammerjs.github.io/).
|
401 | */
|
402 | events: string[];
|
403 | /**
|
404 | * Maps gesture event names to a set of configuration options
|
405 | * that specify overrides to the default values for specific properties.
|
406 | *
|
407 | * The key is a supported event name to be configured,
|
408 | * and the options object contains a set of properties, with override values
|
409 | * to be applied to the named recognizer event.
|
410 | * For example, to disable recognition of the rotate event, specify
|
411 | * `{"rotate": {"enable": false}}`.
|
412 | *
|
413 | * Properties that are not present take the HammerJS default values.
|
414 | * For information about which properties are supported for which events,
|
415 | * and their allowed and default values, see
|
416 | * [HammerJS documentation](https://hammerjs.github.io/).
|
417 | *
|
418 | */
|
419 | overrides: {
|
420 | [key: string]: Object;
|
421 | };
|
422 | /**
|
423 | * Properties whose default values can be overridden for a given event.
|
424 | * Different sets of properties apply to different events.
|
425 | * For information about which properties are supported for which events,
|
426 | * and their allowed and default values, see
|
427 | * [HammerJS documentation](https://hammerjs.github.io/).
|
428 | */
|
429 | options?: {
|
430 | cssProps?: any;
|
431 | domEvents?: boolean;
|
432 | enable?: boolean | ((manager: any) => boolean);
|
433 | preset?: any[];
|
434 | touchAction?: string;
|
435 | recognizers?: any[];
|
436 | inputClass?: any;
|
437 | inputTarget?: EventTarget;
|
438 | };
|
439 | /**
|
440 | * Creates a [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)
|
441 | * and attaches it to a given HTML element.
|
442 | * @param element The element that will recognize gestures.
|
443 | * @returns A HammerJS event-manager object.
|
444 | */
|
445 | buildHammer(element: HTMLElement): HammerInstance;
|
446 | static ɵfac: i0.ɵɵFactoryDeclaration<HammerGestureConfig, never>;
|
447 | static ɵprov: i0.ɵɵInjectableDeclaration<HammerGestureConfig>;
|
448 | }
|
449 |
|
450 | declare interface HammerInstance {
|
451 | on(eventName: string, callback?: Function): void;
|
452 | off(eventName: string, callback?: Function): void;
|
453 | destroy?(): void;
|
454 | }
|
455 |
|
456 | /**
|
457 | * Function that loads HammerJS, returning a promise that is resolved once HammerJs is loaded.
|
458 | *
|
459 | * @publicApi
|
460 | */
|
461 | export declare type HammerLoader = () => Promise<void>;
|
462 |
|
463 | /**
|
464 | * Adds support for HammerJS.
|
465 | *
|
466 | * Import this module at the root of your application so that Angular can work with
|
467 | * HammerJS to detect gesture events.
|
468 | *
|
469 | * Note that applications still need to include the HammerJS script itself. This module
|
470 | * simply sets up the coordination layer between HammerJS and Angular's EventManager.
|
471 | *
|
472 | * @publicApi
|
473 | */
|
474 | export declare class HammerModule {
|
475 | static ɵfac: i0.ɵɵFactoryDeclaration<HammerModule, never>;
|
476 | static ɵmod: i0.ɵɵNgModuleDeclaration<HammerModule, never, never, never>;
|
477 | static ɵinj: i0.ɵɵInjectorDeclaration<HammerModule>;
|
478 | }
|
479 |
|
480 | /**
|
481 | * Create a `StateKey<T>` that can be used to store value of type T with `TransferState`.
|
482 | *
|
483 | * Example:
|
484 | *
|
485 | * ```
|
486 | * const COUNTER_KEY = makeStateKey<number>('counter');
|
487 | * let value = 10;
|
488 | *
|
489 | * transferState.set(COUNTER_KEY, value);
|
490 | * ```
|
491 | *
|
492 | * @publicApi
|
493 | */
|
494 | export declare function makeStateKey<T = void>(key: string): StateKey<T>;
|
495 |
|
496 | /**
|
497 | * A service for managing HTML `<meta>` tags.
|
498 | *
|
499 | * Properties of the `MetaDefinition` object match the attributes of the
|
500 | * HTML `<meta>` tag. These tags define document metadata that is important for
|
501 | * things like configuring a Content Security Policy, defining browser compatibility
|
502 | * and security settings, setting HTTP Headers, defining rich content for social sharing,
|
503 | * and Search Engine Optimization (SEO).
|
504 | *
|
505 | * To identify specific `<meta>` tags in a document, use an attribute selection
|
506 | * string in the format `"tag_attribute='value string'"`.
|
507 | * For example, an `attrSelector` value of `"name='description'"` matches a tag
|
508 | * whose `name` attribute has the value `"description"`.
|
509 | * Selectors are used with the `querySelector()` Document method,
|
510 | * in the format `meta[{attrSelector}]`.
|
511 | *
|
512 | * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta)
|
513 | * @see [Document.querySelector()](https://developer.mozilla.org/docs/Web/API/Document/querySelector)
|
514 | *
|
515 | *
|
516 | * @publicApi
|
517 | */
|
518 | export declare class Meta {
|
519 | private _doc;
|
520 | private _dom;
|
521 | constructor(_doc: any);
|
522 | /**
|
523 | * Retrieves or creates a specific `<meta>` tag element in the current HTML document.
|
524 | * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute
|
525 | * values in the provided tag definition, and verifies that all other attribute values are equal.
|
526 | * If an existing element is found, it is returned and is not modified in any way.
|
527 | * @param tag The definition of a `<meta>` element to match or create.
|
528 | * @param forceCreation True to create a new element without checking whether one already exists.
|
529 | * @returns The existing element with the same attributes and values if found,
|
530 | * the new element if no match is found, or `null` if the tag parameter is not defined.
|
531 | */
|
532 | addTag(tag: MetaDefinition, forceCreation?: boolean): HTMLMetaElement | null;
|
533 | /**
|
534 | * Retrieves or creates a set of `<meta>` tag elements in the current HTML document.
|
535 | * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute
|
536 | * values in the provided tag definition, and verifies that all other attribute values are equal.
|
537 | * @param tags An array of tag definitions to match or create.
|
538 | * @param forceCreation True to create new elements without checking whether they already exist.
|
539 | * @returns The matching elements if found, or the new elements.
|
540 | */
|
541 | addTags(tags: MetaDefinition[], forceCreation?: boolean): HTMLMetaElement[];
|
542 | /**
|
543 | * Retrieves a `<meta>` tag element in the current HTML document.
|
544 | * @param attrSelector The tag attribute and value to match against, in the format
|
545 | * `"tag_attribute='value string'"`.
|
546 | * @returns The matching element, if any.
|
547 | */
|
548 | getTag(attrSelector: string): HTMLMetaElement | null;
|
549 | /**
|
550 | * Retrieves a set of `<meta>` tag elements in the current HTML document.
|
551 | * @param attrSelector The tag attribute and value to match against, in the format
|
552 | * `"tag_attribute='value string'"`.
|
553 | * @returns The matching elements, if any.
|
554 | */
|
555 | getTags(attrSelector: string): HTMLMetaElement[];
|
556 | /**
|
557 | * Modifies an existing `<meta>` tag element in the current HTML document.
|
558 | * @param tag The tag description with which to replace the existing tag content.
|
559 | * @param selector A tag attribute and value to match against, to identify
|
560 | * an existing tag. A string in the format `"tag_attribute=`value string`"`.
|
561 | * If not supplied, matches a tag with the same `name` or `property` attribute value as the
|
562 | * replacement tag.
|
563 | * @return The modified element.
|
564 | */
|
565 | updateTag(tag: MetaDefinition, selector?: string): HTMLMetaElement | null;
|
566 | /**
|
567 | * Removes an existing `<meta>` tag element from the current HTML document.
|
568 | * @param attrSelector A tag attribute and value to match against, to identify
|
569 | * an existing tag. A string in the format `"tag_attribute=`value string`"`.
|
570 | */
|
571 | removeTag(attrSelector: string): void;
|
572 | /**
|
573 | * Removes an existing `<meta>` tag element from the current HTML document.
|
574 | * @param meta The tag definition to match against to identify an existing tag.
|
575 | */
|
576 | removeTagElement(meta: HTMLMetaElement): void;
|
577 | private _getOrCreateElement;
|
578 | private _setMetaElementAttributes;
|
579 | private _parseSelector;
|
580 | private _containsAttributes;
|
581 | private _getMetaKeyMap;
|
582 | static ɵfac: i0.ɵɵFactoryDeclaration<Meta, never>;
|
583 | static ɵprov: i0.ɵɵInjectableDeclaration<Meta>;
|
584 | }
|
585 |
|
586 | /**
|
587 | * Represents the attributes of an HTML `<meta>` element. The element itself is
|
588 | * represented by the internal `HTMLMetaElement`.
|
589 | *
|
590 | * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta)
|
591 | * @see `Meta`
|
592 | *
|
593 | * @publicApi
|
594 | */
|
595 | export declare type MetaDefinition = {
|
596 | charset?: string;
|
597 | content?: string;
|
598 | httpEquiv?: string;
|
599 | id?: string;
|
600 | itemprop?: string;
|
601 | name?: string;
|
602 | property?: string;
|
603 | scheme?: string;
|
604 | url?: string;
|
605 | } & {
|
606 | [prop: string]: string;
|
607 | };
|
608 |
|
609 | /**
|
610 | * A factory function that returns a `PlatformRef` instance associated with browser service
|
611 | * providers.
|
612 | *
|
613 | * @publicApi
|
614 | */
|
615 | export declare const platformBrowser: (extraProviders?: StaticProvider[]) => PlatformRef;
|
616 |
|
617 | /**
|
618 | * Returns a set of providers required to setup [Testability](api/core/Testability) for an
|
619 | * application bootstrapped using the `bootstrapApplication` function. The set of providers is
|
620 | * needed to support testing an application with Protractor (which relies on the Testability APIs
|
621 | * to be present).
|
622 | *
|
623 | * @returns An array of providers required to setup Testability for an application and make it
|
624 | * available for testing using Protractor.
|
625 | *
|
626 | * @publicApi
|
627 | */
|
628 | export declare function provideProtractorTestingSupport(): Provider[];
|
629 |
|
630 | /**
|
631 | * Marker interface for a value that's safe to use as HTML.
|
632 | *
|
633 | * @publicApi
|
634 | */
|
635 | export declare interface SafeHtml extends SafeValue {
|
636 | }
|
637 |
|
638 | /**
|
639 | * Marker interface for a value that's safe to use as a URL to load executable code from.
|
640 | *
|
641 | * @publicApi
|
642 | */
|
643 | export declare interface SafeResourceUrl extends SafeValue {
|
644 | }
|
645 |
|
646 | /**
|
647 | * Marker interface for a value that's safe to use as JavaScript.
|
648 | *
|
649 | * @publicApi
|
650 | */
|
651 | export declare interface SafeScript extends SafeValue {
|
652 | }
|
653 |
|
654 | /**
|
655 | * Marker interface for a value that's safe to use as style (CSS).
|
656 | *
|
657 | * @publicApi
|
658 | */
|
659 | export declare interface SafeStyle extends SafeValue {
|
660 | }
|
661 |
|
662 | /**
|
663 | * Marker interface for a value that's safe to use as a URL linking to a document.
|
664 | *
|
665 | * @publicApi
|
666 | */
|
667 | export declare interface SafeUrl extends SafeValue {
|
668 | }
|
669 |
|
670 | /**
|
671 | * Marker interface for a value that's safe to use in a particular context.
|
672 | *
|
673 | * @publicApi
|
674 | */
|
675 | export declare interface SafeValue {
|
676 | }
|
677 |
|
678 | /**
|
679 | * A type-safe key to use with `TransferState`.
|
680 | *
|
681 | * Example:
|
682 | *
|
683 | * ```
|
684 | * const COUNTER_KEY = makeStateKey<number>('counter');
|
685 | * let value = 10;
|
686 | *
|
687 | * transferState.set(COUNTER_KEY, value);
|
688 | * ```
|
689 | *
|
690 | * @publicApi
|
691 | */
|
692 | export declare type StateKey<T> = string & {
|
693 | __not_a_string: never;
|
694 | __value_type?: T;
|
695 | };
|
696 |
|
697 | /**
|
698 | * A service that can be used to get and set the title of a current HTML document.
|
699 | *
|
700 | * Since an Angular application can't be bootstrapped on the entire HTML document (`<html>` tag)
|
701 | * it is not possible to bind to the `text` property of the `HTMLTitleElement` elements
|
702 | * (representing the `<title>` tag). Instead, this service can be used to set and get the current
|
703 | * title value.
|
704 | *
|
705 | * @publicApi
|
706 | */
|
707 | export declare class Title {
|
708 | private _doc;
|
709 | constructor(_doc: any);
|
710 | /**
|
711 | * Get the title of the current HTML document.
|
712 | */
|
713 | getTitle(): string;
|
714 | /**
|
715 | * Set the title of the current HTML document.
|
716 | * @param newTitle
|
717 | */
|
718 | setTitle(newTitle: string): void;
|
719 | static ɵfac: i0.ɵɵFactoryDeclaration<Title, never>;
|
720 | static ɵprov: i0.ɵɵInjectableDeclaration<Title>;
|
721 | }
|
722 |
|
723 | /**
|
724 | * A key value store that is transferred from the application on the server side to the application
|
725 | * on the client side.
|
726 | *
|
727 | * The `TransferState` is available as an injectable token.
|
728 | * On the client, just inject this token using DI and use it, it will be lazily initialized.
|
729 | * On the server it's already included if `renderApplication` function is used. Otherwise, import
|
730 | * the `ServerTransferStateModule` module to make the `TransferState` available.
|
731 | *
|
732 | * The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only
|
733 | * boolean, number, string, null and non-class objects will be serialized and deserialized in a
|
734 | * non-lossy manner.
|
735 | *
|
736 | * @publicApi
|
737 | */
|
738 | export declare class TransferState {
|
739 | private store;
|
740 | private onSerializeCallbacks;
|
741 | /**
|
742 | * Get the value corresponding to a key. Return `defaultValue` if key is not found.
|
743 | */
|
744 | get<T>(key: StateKey<T>, defaultValue: T): T;
|
745 | /**
|
746 | * Set the value corresponding to a key.
|
747 | */
|
748 | set<T>(key: StateKey<T>, value: T): void;
|
749 | /**
|
750 | * Remove a key from the store.
|
751 | */
|
752 | remove<T>(key: StateKey<T>): void;
|
753 | /**
|
754 | * Test whether a key exists in the store.
|
755 | */
|
756 | hasKey<T>(key: StateKey<T>): boolean;
|
757 | /**
|
758 | * Indicates whether the state is empty.
|
759 | */
|
760 | get isEmpty(): boolean;
|
761 | /**
|
762 | * Register a callback to provide the value for a key when `toJson` is called.
|
763 | */
|
764 | onSerialize<T>(key: StateKey<T>, callback: () => T): void;
|
765 | /**
|
766 | * Serialize the current state of the store to JSON.
|
767 | */
|
768 | toJson(): string;
|
769 | static ɵfac: i0.ɵɵFactoryDeclaration<TransferState, never>;
|
770 | static ɵprov: i0.ɵɵInjectableDeclaration<TransferState>;
|
771 | }
|
772 |
|
773 | /**
|
774 | * @publicApi
|
775 | */
|
776 | export declare const VERSION: Version;
|
777 |
|
778 | /**
|
779 | * A `DomAdapter` powered by full browser DOM APIs.
|
780 | *
|
781 | * @security Tread carefully! Interacting with the DOM directly is dangerous and
|
782 | * can introduce XSS risks.
|
783 | */
|
784 | export declare class ɵBrowserDomAdapter extends GenericBrowserDomAdapter {
|
785 | static makeCurrent(): void;
|
786 | onAndCancel(el: Node, evt: any, listener: any): Function;
|
787 | dispatchEvent(el: Node, evt: any): void;
|
788 | remove(node: Node): void;
|
789 | createElement(tagName: string, doc?: Document): HTMLElement;
|
790 | createHtmlDocument(): Document;
|
791 | getDefaultDocument(): Document;
|
792 | isElementNode(node: Node): boolean;
|
793 | isShadowRoot(node: any): boolean;
|
794 | /** @deprecated No longer being used in Ivy code. To be removed in version 14. */
|
795 | getGlobalEventTarget(doc: Document, target: string): EventTarget | null;
|
796 | getBaseHref(doc: Document): string | null;
|
797 | resetBaseElement(): void;
|
798 | getUserAgent(): string;
|
799 | getCookie(name: string): string | null;
|
800 | }
|
801 |
|
802 | export declare class ɵBrowserGetTestability implements GetTestability {
|
803 | addToWindow(registry: TestabilityRegistry): void;
|
804 | findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean): Testability | null;
|
805 | }
|
806 |
|
807 | export declare class ɵDomEventsPlugin extends EventManagerPlugin {
|
808 | constructor(doc: any);
|
809 | supports(eventName: string): boolean;
|
810 | addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;
|
811 | removeEventListener(target: any, eventName: string, callback: Function): void;
|
812 | static ɵfac: i0.ɵɵFactoryDeclaration<ɵDomEventsPlugin, never>;
|
813 | static ɵprov: i0.ɵɵInjectableDeclaration<ɵDomEventsPlugin>;
|
814 | }
|
815 |
|
816 | export declare class ɵDomRendererFactory2 implements RendererFactory2 {
|
817 | private eventManager;
|
818 | private sharedStylesHost;
|
819 | private appId;
|
820 | private rendererByCompId;
|
821 | private defaultRenderer;
|
822 | constructor(eventManager: EventManager, sharedStylesHost: ɵDomSharedStylesHost, appId: string);
|
823 | createRenderer(element: any, type: RendererType2 | null): Renderer2;
|
824 | begin(): void;
|
825 | end(): void;
|
826 | static ɵfac: i0.ɵɵFactoryDeclaration<ɵDomRendererFactory2, never>;
|
827 | static ɵprov: i0.ɵɵInjectableDeclaration<ɵDomRendererFactory2>;
|
828 | }
|
829 |
|
830 | export declare class ɵDomSanitizerImpl extends DomSanitizer {
|
831 | private _doc;
|
832 | constructor(_doc: any);
|
833 | sanitize(ctx: SecurityContext, value: SafeValue | string | null): string | null;
|
834 | bypassSecurityTrustHtml(value: string): SafeHtml;
|
835 | bypassSecurityTrustStyle(value: string): SafeStyle;
|
836 | bypassSecurityTrustScript(value: string): SafeScript;
|
837 | bypassSecurityTrustUrl(value: string): SafeUrl;
|
838 | bypassSecurityTrustResourceUrl(value: string): SafeResourceUrl;
|
839 | static ɵfac: i0.ɵɵFactoryDeclaration<ɵDomSanitizerImpl, never>;
|
840 | static ɵprov: i0.ɵɵInjectableDeclaration<ɵDomSanitizerImpl>;
|
841 | }
|
842 |
|
843 | export declare class ɵDomSharedStylesHost extends ɵSharedStylesHost implements OnDestroy {
|
844 | private _doc;
|
845 | private _hostNodes;
|
846 | constructor(_doc: any);
|
847 | private _addStylesToHost;
|
848 | addHost(hostNode: Node): void;
|
849 | removeHost(hostNode: Node): void;
|
850 | onStylesAdded(additions: Set<string>): void;
|
851 | ngOnDestroy(): void;
|
852 | static ɵfac: i0.ɵɵFactoryDeclaration<ɵDomSharedStylesHost, never>;
|
853 | static ɵprov: i0.ɵɵInjectableDeclaration<ɵDomSharedStylesHost>;
|
854 | }
|
855 |
|
856 | export declare function ɵescapeHtml(text: string): string;
|
857 |
|
858 | export declare function ɵflattenStyles(compId: string, styles: Array<string | string[]>): string[];
|
859 |
|
860 | export { ɵgetDOM }
|
861 |
|
862 | /**
|
863 | * Event plugin that adds Hammer support to an application.
|
864 | *
|
865 | * @ngModule HammerModule
|
866 | */
|
867 | export declare class ɵHammerGesturesPlugin extends EventManagerPlugin {
|
868 | private _config;
|
869 | private console;
|
870 | private loader?;
|
871 | private _loaderPromise;
|
872 | constructor(doc: any, _config: HammerGestureConfig, console: ɵConsole, loader?: HammerLoader | null | undefined);
|
873 | supports(eventName: string): boolean;
|
874 | addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;
|
875 | isCustomEvent(eventName: string): boolean;
|
876 | static ɵfac: i0.ɵɵFactoryDeclaration<ɵHammerGesturesPlugin, [null, null, null, { optional: true; }]>;
|
877 | static ɵprov: i0.ɵɵInjectableDeclaration<ɵHammerGesturesPlugin>;
|
878 | }
|
879 |
|
880 | export declare function ɵinitDomAdapter(): void;
|
881 |
|
882 | export declare const ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS: StaticProvider[];
|
883 |
|
884 | /**
|
885 | * @publicApi
|
886 | * A browser plug-in that provides support for handling of key events in Angular.
|
887 | */
|
888 | export declare class ɵKeyEventsPlugin extends EventManagerPlugin {
|
889 | /**
|
890 | * Initializes an instance of the browser plug-in.
|
891 | * @param doc The document in which key events will be detected.
|
892 | */
|
893 | constructor(doc: any);
|
894 | /**
|
895 | * Reports whether a named key event is supported.
|
896 | * @param eventName The event name to query.
|
897 | * @return True if the named key event is supported.
|
898 | */
|
899 | supports(eventName: string): boolean;
|
900 | /**
|
901 | * Registers a handler for a specific element and key event.
|
902 | * @param element The HTML element to receive event notifications.
|
903 | * @param eventName The name of the key event to listen for.
|
904 | * @param handler A function to call when the notification occurs. Receives the
|
905 | * event object as an argument.
|
906 | * @returns The key event that was registered.
|
907 | */
|
908 | addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;
|
909 | /**
|
910 | * Parses the user provided full keyboard event definition and normalizes it for
|
911 | * later internal use. It ensures the string is all lowercase, converts special
|
912 | * characters to a standard spelling, and orders all the values consistently.
|
913 | *
|
914 | * @param eventName The name of the key event to listen for.
|
915 | * @returns an object with the full, normalized string, and the dom event name
|
916 | * or null in the case when the event doesn't match a keyboard event.
|
917 | */
|
918 | static parseEventName(eventName: string): {
|
919 | fullKey: string;
|
920 | domEventName: string;
|
921 | } | null;
|
922 | /**
|
923 | * Determines whether the actual keys pressed match the configured key code string.
|
924 | * The `fullKeyCode` event is normalized in the `parseEventName` method when the
|
925 | * event is attached to the DOM during the `addEventListener` call. This is unseen
|
926 | * by the end user and is normalized for internal consistency and parsing.
|
927 | *
|
928 | * @param event The keyboard event.
|
929 | * @param fullKeyCode The normalized user defined expected key event string
|
930 | * @returns boolean.
|
931 | */
|
932 | static matchEventFullKeyCode(event: KeyboardEvent, fullKeyCode: string): boolean;
|
933 | /**
|
934 | * Configures a handler callback for a key event.
|
935 | * @param fullKey The event name that combines all simultaneous keystrokes.
|
936 | * @param handler The function that responds to the key event.
|
937 | * @param zone The zone in which the event occurred.
|
938 | * @returns A callback function.
|
939 | */
|
940 | static eventCallback(fullKey: string, handler: Function, zone: NgZone): Function;
|
941 | static ɵfac: i0.ɵɵFactoryDeclaration<ɵKeyEventsPlugin, never>;
|
942 | static ɵprov: i0.ɵɵInjectableDeclaration<ɵKeyEventsPlugin>;
|
943 | }
|
944 |
|
945 | export declare const ɵNAMESPACE_URIS: {
|
946 | [ns: string]: string;
|
947 | };
|
948 |
|
949 | export declare class ɵSharedStylesHost {
|
950 | addStyles(styles: string[]): void;
|
951 | onStylesAdded(additions: Set<string>): void;
|
952 | getAllStyles(): string[];
|
953 | static ɵfac: i0.ɵɵFactoryDeclaration<ɵSharedStylesHost, never>;
|
954 | static ɵprov: i0.ɵɵInjectableDeclaration<ɵSharedStylesHost>;
|
955 | }
|
956 |
|
957 | export declare function ɵshimContentAttribute(componentShortId: string): string;
|
958 |
|
959 | export declare function ɵshimHostAttribute(componentShortId: string): string;
|
960 |
|
961 | /**
|
962 | * An id that identifies a particular application being bootstrapped, that should
|
963 | * match across the client/server boundary.
|
964 | */
|
965 | export declare const ɵTRANSITION_ID: InjectionToken<unknown>;
|
966 |
|
967 | export { }
|
968 |
|
\ | No newline at end of file |