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