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