1 | /**
|
2 | * @license Angular v12.1.4
|
3 | * (c) 2010-2021 Google LLC. https://angular.io/
|
4 | * License: MIT
|
5 | */
|
6 |
|
7 | import { Observable } from 'rxjs';
|
8 | import { Subject } from 'rxjs';
|
9 | import { Subscribable } from 'rxjs';
|
10 | import { Subscription } from 'rxjs';
|
11 |
|
12 | /**
|
13 | * @description
|
14 | *
|
15 | * Represents an abstract class `T`, if applied to a concrete class it would stop being
|
16 | * instantiable.
|
17 | *
|
18 | * @publicApi
|
19 | */
|
20 | export declare interface AbstractType<T> extends Function {
|
21 | prototype: T;
|
22 | }
|
23 |
|
24 | /**
|
25 | * @description
|
26 | * A lifecycle hook that is called after the default change detector has
|
27 | * completed checking all content of a directive.
|
28 | *
|
29 | * @see `AfterViewChecked`
|
30 | * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
|
31 | *
|
32 | * @usageNotes
|
33 | * The following snippet shows how a component can implement this interface to
|
34 | * define its own after-check functionality.
|
35 | *
|
36 | * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterContentChecked'}
|
37 | *
|
38 | * @publicApi
|
39 | */
|
40 | export declare interface AfterContentChecked {
|
41 | /**
|
42 | * A callback method that is invoked immediately after the
|
43 | * default change detector has completed checking all of the directive's
|
44 | * content.
|
45 | */
|
46 | ngAfterContentChecked(): void;
|
47 | }
|
48 |
|
49 | /**
|
50 | * @description
|
51 | * A lifecycle hook that is called after Angular has fully initialized
|
52 | * all content of a directive.
|
53 | * Define an `ngAfterContentInit()` method to handle any additional initialization tasks.
|
54 | *
|
55 | * @see `OnInit`
|
56 | * @see `AfterViewInit`
|
57 | * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
|
58 | *
|
59 | * @usageNotes
|
60 | * The following snippet shows how a component can implement this interface to
|
61 | * define its own content initialization method.
|
62 | *
|
63 | * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterContentInit'}
|
64 | *
|
65 | * @publicApi
|
66 | */
|
67 | export declare interface AfterContentInit {
|
68 | /**
|
69 | * A callback method that is invoked immediately after
|
70 | * Angular has completed initialization of all of the directive's
|
71 | * content.
|
72 | * It is invoked only once when the directive is instantiated.
|
73 | */
|
74 | ngAfterContentInit(): void;
|
75 | }
|
76 |
|
77 | /**
|
78 | * @description
|
79 | * A lifecycle hook that is called after the default change detector has
|
80 | * completed checking a component's view for changes.
|
81 | *
|
82 | * @see `AfterContentChecked`
|
83 | * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
|
84 | *
|
85 | * @usageNotes
|
86 | * The following snippet shows how a component can implement this interface to
|
87 | * define its own after-check functionality.
|
88 | *
|
89 | * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterViewChecked'}
|
90 | *
|
91 | * @publicApi
|
92 | */
|
93 | export declare interface AfterViewChecked {
|
94 | /**
|
95 | * A callback method that is invoked immediately after the
|
96 | * default change detector has completed one change-check cycle
|
97 | * for a component's view.
|
98 | */
|
99 | ngAfterViewChecked(): void;
|
100 | }
|
101 |
|
102 | /**
|
103 | * @description
|
104 | * A lifecycle hook that is called after Angular has fully initialized
|
105 | * a component's view.
|
106 | * Define an `ngAfterViewInit()` method to handle any additional initialization tasks.
|
107 | *
|
108 | * @see `OnInit`
|
109 | * @see `AfterContentInit`
|
110 | * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
|
111 | *
|
112 | * @usageNotes
|
113 | * The following snippet shows how a component can implement this interface to
|
114 | * define its own view initialization method.
|
115 | *
|
116 | * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterViewInit'}
|
117 | *
|
118 | * @publicApi
|
119 | */
|
120 | export declare interface AfterViewInit {
|
121 | /**
|
122 | * A callback method that is invoked immediately after
|
123 | * Angular has completed initialization of a component's view.
|
124 | * It is invoked only once when the view is instantiated.
|
125 | *
|
126 | */
|
127 | ngAfterViewInit(): void;
|
128 | }
|
129 |
|
130 | /**
|
131 | * A DI token that you can use to create a virtual [provider](guide/glossary#provider)
|
132 | * that will populate the `entryComponents` field of components and NgModules
|
133 | * based on its `useValue` property value.
|
134 | * All components that are referenced in the `useValue` value (either directly
|
135 | * or in a nested array or map) are added to the `entryComponents` property.
|
136 | *
|
137 | * @usageNotes
|
138 | *
|
139 | * The following example shows how the router can populate the `entryComponents`
|
140 | * field of an NgModule based on a router configuration that refers
|
141 | * to components.
|
142 | *
|
143 | * ```typescript
|
144 | * // helper function inside the router
|
145 | * function provideRoutes(routes) {
|
146 | * return [
|
147 | * {provide: ROUTES, useValue: routes},
|
148 | * {provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: routes, multi: true}
|
149 | * ];
|
150 | * }
|
151 | *
|
152 | * // user code
|
153 | * let routes = [
|
154 | * {path: '/root', component: RootComp},
|
155 | * {path: '/teams', component: TeamsComp}
|
156 | * ];
|
157 | *
|
158 | * @NgModule({
|
159 | * providers: [provideRoutes(routes)]
|
160 | * })
|
161 | * class ModuleWithRoutes {}
|
162 | * ```
|
163 | *
|
164 | * @publicApi
|
165 | * @deprecated Since 9.0.0. With Ivy, this property is no longer necessary.
|
166 | */
|
167 | export declare const ANALYZE_FOR_ENTRY_COMPONENTS: InjectionToken<any>;
|
168 |
|
169 | /**
|
170 | * A [DI token](guide/glossary#di-token "DI token definition") that provides a set of callbacks to
|
171 | * be called for every component that is bootstrapped.
|
172 | *
|
173 | * Each callback must take a `ComponentRef` instance and return nothing.
|
174 | *
|
175 | * `(componentRef: ComponentRef) => void`
|
176 | *
|
177 | * @publicApi
|
178 | */
|
179 | export declare const APP_BOOTSTRAP_LISTENER: InjectionToken<((compRef: ComponentRef<any>) => void)[]>;
|
180 |
|
181 | /**
|
182 | * A [DI token](guide/glossary#di-token "DI token definition") representing a unique string ID, used
|
183 | * primarily for prefixing application attributes and CSS styles when
|
184 | * {@link ViewEncapsulation#Emulated ViewEncapsulation.Emulated} is being used.
|
185 | *
|
186 | * BY default, the value is randomly generated and assigned to the application by Angular.
|
187 | * To provide a custom ID value, use a DI provider <!-- TODO: provider --> to configure
|
188 | * the root {@link Injector} that uses this token.
|
189 | *
|
190 | * @publicApi
|
191 | */
|
192 | export declare const APP_ID: InjectionToken<string>;
|
193 |
|
194 | /**
|
195 | * A [DI token](guide/glossary#di-token "DI token definition") that you can use to provide
|
196 | * one or more initialization functions.
|
197 | *
|
198 | * The provided functions are injected at application startup and executed during
|
199 | * app initialization. If any of these functions returns a Promise or an Observable, initialization
|
200 | * does not complete until the Promise is resolved or the Observable is completed.
|
201 | *
|
202 | * You can, for example, create a factory function that loads language data
|
203 | * or an external configuration, and provide that function to the `APP_INITIALIZER` token.
|
204 | * The function is executed during the application bootstrap process,
|
205 | * and the needed data is available on startup.
|
206 | *
|
207 | * @see `ApplicationInitStatus`
|
208 | *
|
209 | * @usageNotes
|
210 | *
|
211 | * The following example illustrates how to configure a multi-provider using `APP_INITIALIZER` token
|
212 | * and a function returning a promise.
|
213 | *
|
214 | * ```
|
215 | * function initializeApp(): Promise<any> {
|
216 | * return new Promise((resolve, reject) => {
|
217 | * // Do some asynchronous stuff
|
218 | * resolve();
|
219 | * });
|
220 | * }
|
221 | *
|
222 | * @NgModule({
|
223 | * imports: [BrowserModule],
|
224 | * declarations: [AppComponent],
|
225 | * bootstrap: [AppComponent],
|
226 | * providers: [{
|
227 | * provide: APP_INITIALIZER,
|
228 | * useFactory: () => initializeApp,
|
229 | * multi: true
|
230 | * }]
|
231 | * })
|
232 | * export class AppModule {}
|
233 | * ```
|
234 | *
|
235 | * It's also possible to configure a multi-provider using `APP_INITIALIZER` token and a function
|
236 | * returning an observable, see an example below. Note: the `HttpClient` in this example is used for
|
237 | * demo purposes to illustrate how the factory function can work with other providers available
|
238 | * through DI.
|
239 | *
|
240 | * ```
|
241 | * function initializeAppFactory(httpClient: HttpClient): () => Observable<any> {
|
242 | * return () => httpClient.get("https://someUrl.com/api/user")
|
243 | * .pipe(
|
244 | * tap(user => { ... })
|
245 | * );
|
246 | * }
|
247 | *
|
248 | * ({
|
249 | * imports: [BrowserModule, HttpClientModule],
|
250 | * declarations: [AppComponent],
|
251 | * bootstrap: [AppComponent],
|
252 | * providers: [{
|
253 | * provide: APP_INITIALIZER,
|
254 | * useFactory: initializeAppFactory,
|
255 | * deps: [HttpClient],
|
256 | * multi: true
|
257 | * }]
|
258 | * })
|
259 | * export class AppModule {}
|
260 | * ```
|
261 | *
|
262 | * @publicApi
|
263 | */
|
264 | export declare const APP_INITIALIZER: InjectionToken<readonly (() => Observable<unknown> | Promise<unknown> | void)[]>;
|
265 |
|
266 | /**
|
267 | * A class that reflects the state of running {@link APP_INITIALIZER} functions.
|
268 | *
|
269 | * @publicApi
|
270 | */
|
271 | export declare class ApplicationInitStatus {
|
272 | private readonly appInits;
|
273 | private resolve;
|
274 | private reject;
|
275 | private initialized;
|
276 | readonly donePromise: Promise<any>;
|
277 | readonly done = false;
|
278 | constructor(appInits: ReadonlyArray<() => Observable<unknown> | Promise<unknown> | void>);
|
279 | }
|
280 |
|
281 | /**
|
282 | * Configures the root injector for an app with
|
283 | * providers of ` /core` dependencies that `ApplicationRef` needs
|
284 | * to bootstrap components.
|
285 | *
|
286 | * Re-exported by `BrowserModule`, which is included automatically in the root
|
287 | * `AppModule` when you create a new app with the CLI `new` command.
|
288 | *
|
289 | * @publicApi
|
290 | */
|
291 | export declare class ApplicationModule {
|
292 | constructor(appRef: ApplicationRef);
|
293 | }
|
294 |
|
295 | /**
|
296 | * A reference to an Angular application running on a page.
|
297 | *
|
298 | * @usageNotes
|
299 | *
|
300 | * {@a is-stable-examples}
|
301 | * ### isStable examples and caveats
|
302 | *
|
303 | * Note two important points about `isStable`, demonstrated in the examples below:
|
304 | * - the application will never be stable if you start any kind
|
305 | * of recurrent asynchronous task when the application starts
|
306 | * (for example for a polling process, started with a `setInterval`, a `setTimeout`
|
307 | * or using RxJS operators like `interval`);
|
308 | * - the `isStable` Observable runs outside of the Angular zone.
|
309 | *
|
310 | * Let's imagine that you start a recurrent task
|
311 | * (here incrementing a counter, using RxJS `interval`),
|
312 | * and at the same time subscribe to `isStable`.
|
313 | *
|
314 | * ```
|
315 | * constructor(appRef: ApplicationRef) {
|
316 | * appRef.isStable.pipe(
|
317 | * filter(stable => stable)
|
318 | * ).subscribe(() => console.log('App is stable now');
|
319 | * interval(1000).subscribe(counter => console.log(counter));
|
320 | * }
|
321 | * ```
|
322 | * In this example, `isStable` will never emit `true`,
|
323 | * and the trace "App is stable now" will never get logged.
|
324 | *
|
325 | * If you want to execute something when the app is stable,
|
326 | * you have to wait for the application to be stable
|
327 | * before starting your polling process.
|
328 | *
|
329 | * ```
|
330 | * constructor(appRef: ApplicationRef) {
|
331 | * appRef.isStable.pipe(
|
332 | * first(stable => stable),
|
333 | * tap(stable => console.log('App is stable now')),
|
334 | * switchMap(() => interval(1000))
|
335 | * ).subscribe(counter => console.log(counter));
|
336 | * }
|
337 | * ```
|
338 | * In this example, the trace "App is stable now" will be logged
|
339 | * and then the counter starts incrementing every second.
|
340 | *
|
341 | * Note also that this Observable runs outside of the Angular zone,
|
342 | * which means that the code in the subscription
|
343 | * to this Observable will not trigger the change detection.
|
344 | *
|
345 | * Let's imagine that instead of logging the counter value,
|
346 | * you update a field of your component
|
347 | * and display it in its template.
|
348 | *
|
349 | * ```
|
350 | * constructor(appRef: ApplicationRef) {
|
351 | * appRef.isStable.pipe(
|
352 | * first(stable => stable),
|
353 | * switchMap(() => interval(1000))
|
354 | * ).subscribe(counter => this.value = counter);
|
355 | * }
|
356 | * ```
|
357 | * As the `isStable` Observable runs outside the zone,
|
358 | * the `value` field will be updated properly,
|
359 | * but the template will not be refreshed!
|
360 | *
|
361 | * You'll have to manually trigger the change detection to update the template.
|
362 | *
|
363 | * ```
|
364 | * constructor(appRef: ApplicationRef, cd: ChangeDetectorRef) {
|
365 | * appRef.isStable.pipe(
|
366 | * first(stable => stable),
|
367 | * switchMap(() => interval(1000))
|
368 | * ).subscribe(counter => {
|
369 | * this.value = counter;
|
370 | * cd.detectChanges();
|
371 | * });
|
372 | * }
|
373 | * ```
|
374 | *
|
375 | * Or make the subscription callback run inside the zone.
|
376 | *
|
377 | * ```
|
378 | * constructor(appRef: ApplicationRef, zone: NgZone) {
|
379 | * appRef.isStable.pipe(
|
380 | * first(stable => stable),
|
381 | * switchMap(() => interval(1000))
|
382 | * ).subscribe(counter => zone.run(() => this.value = counter));
|
383 | * }
|
384 | * ```
|
385 | *
|
386 | * @publicApi
|
387 | */
|
388 | export declare class ApplicationRef {
|
389 | private _zone;
|
390 | private _injector;
|
391 | private _exceptionHandler;
|
392 | private _componentFactoryResolver;
|
393 | private _initStatus;
|
394 | private _views;
|
395 | private _runningTick;
|
396 | private _stable;
|
397 | private _onMicrotaskEmptySubscription;
|
398 | /**
|
399 | * Get a list of component types registered to this application.
|
400 | * This list is populated even before the component is created.
|
401 | */
|
402 | readonly componentTypes: Type<any>[];
|
403 | /**
|
404 | * Get a list of components registered to this application.
|
405 | */
|
406 | readonly components: ComponentRef<any>[];
|
407 | /**
|
408 | * Returns an Observable that indicates when the application is stable or unstable.
|
409 | *
|
410 | * @see [Usage notes](#is-stable-examples) for examples and caveats when using this API.
|
411 | */
|
412 | readonly isStable: Observable<boolean>;
|
413 | /**
|
414 | * Bootstrap a component onto the element identified by its selector or, optionally, to a
|
415 | * specified element.
|
416 | *
|
417 | * @usageNotes
|
418 | * ### Bootstrap process
|
419 | *
|
420 | * When bootstrapping a component, Angular mounts it onto a target DOM element
|
421 | * and kicks off automatic change detection. The target DOM element can be
|
422 | * provided using the `rootSelectorOrNode` argument.
|
423 | *
|
424 | * If the target DOM element is not provided, Angular tries to find one on a page
|
425 | * using the `selector` of the component that is being bootstrapped
|
426 | * (first matched element is used).
|
427 | *
|
428 | * ### Example
|
429 | *
|
430 | * Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,
|
431 | * but it requires us to know the component while writing the application code.
|
432 | *
|
433 | * Imagine a situation where we have to wait for an API call to decide about the component to
|
434 | * bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to
|
435 | * dynamically bootstrap a component.
|
436 | *
|
437 | * {@example core/ts/platform/platform.ts region='componentSelector'}
|
438 | *
|
439 | * Optionally, a component can be mounted onto a DOM element that does not match the
|
440 | * selector of the bootstrapped component.
|
441 | *
|
442 | * In the following example, we are providing a CSS selector to match the target element.
|
443 | *
|
444 | * {@example core/ts/platform/platform.ts region='cssSelector'}
|
445 | *
|
446 | * While in this example, we are providing reference to a DOM node.
|
447 | *
|
448 | * {@example core/ts/platform/platform.ts region='domNode'}
|
449 | */
|
450 | bootstrap<C>(componentOrFactory: ComponentFactory<C> | Type<C>, rootSelectorOrNode?: string | any): ComponentRef<C>;
|
451 | /**
|
452 | * Invoke this method to explicitly process change detection and its side-effects.
|
453 | *
|
454 | * In development mode, `tick()` also performs a second change detection cycle to ensure that no
|
455 | * further changes are detected. If additional changes are picked up during this second cycle,
|
456 | * bindings in the app have side-effects that cannot be resolved in a single change detection
|
457 | * pass.
|
458 | * In this case, Angular throws an error, since an Angular application can only have one change
|
459 | * detection pass during which all change detection must complete.
|
460 | */
|
461 | tick(): void;
|
462 | /**
|
463 | * Attaches a view so that it will be dirty checked.
|
464 | * The view will be automatically detached when it is destroyed.
|
465 | * This will throw if the view is already attached to a ViewContainer.
|
466 | */
|
467 | attachView(viewRef: ViewRef): void;
|
468 | /**
|
469 | * Detaches a view from dirty checking again.
|
470 | */
|
471 | detachView(viewRef: ViewRef): void;
|
472 | private _loadComponent;
|
473 | /**
|
474 | * Returns the number of attached views.
|
475 | */
|
476 | get viewCount(): number;
|
477 | }
|
478 |
|
479 | /**
|
480 | * @publicApi
|
481 | */
|
482 | export declare function asNativeElements(debugEls: DebugElement[]): any;
|
483 |
|
484 | /**
|
485 | * Checks that there is currently a platform that contains the given token as a provider.
|
486 | *
|
487 | * @publicApi
|
488 | */
|
489 | export declare function assertPlatform(requiredToken: any): PlatformRef;
|
490 |
|
491 | /**
|
492 | * Type of the Attribute metadata.
|
493 | *
|
494 | * @publicApi
|
495 | */
|
496 | export declare interface Attribute {
|
497 | /**
|
498 | * The name of the attribute whose value can be injected.
|
499 | */
|
500 | attributeName: string;
|
501 | }
|
502 |
|
503 | /**
|
504 | * Attribute decorator and metadata.
|
505 | *
|
506 | * @Annotation
|
507 | * @publicApi
|
508 | */
|
509 | export declare const Attribute: AttributeDecorator;
|
510 |
|
511 |
|
512 | /**
|
513 | * Type of the Attribute decorator / constructor function.
|
514 | *
|
515 | * @publicApi
|
516 | */
|
517 | export declare interface AttributeDecorator {
|
518 | /**
|
519 | * Parameter decorator for a directive constructor that designates
|
520 | * a host-element attribute whose value is injected as a constant string literal.
|
521 | *
|
522 | * @usageNotes
|
523 | *
|
524 | * Suppose we have an `<input>` element and want to know its `type`.
|
525 | *
|
526 | * ```html
|
527 | * <input type="text">
|
528 | * ```
|
529 | *
|
530 | * The following example uses the decorator to inject the string literal `text` in a directive.
|
531 | *
|
532 | * {@example core/ts/metadata/metadata.ts region='attributeMetadata'}
|
533 | *
|
534 | * The following example uses the decorator in a component constructor.
|
535 | *
|
536 | * {@example core/ts/metadata/metadata.ts region='attributeFactory'}
|
537 | *
|
538 | */
|
539 | (name: string): any;
|
540 | new (name: string): Attribute;
|
541 | }
|
542 |
|
543 | declare interface BindingDef {
|
544 | flags: ɵBindingFlags;
|
545 | ns: string | null;
|
546 | name: string | null;
|
547 | nonMinifiedName: string | null;
|
548 | securityContext: SecurityContext | null;
|
549 | suffix: string | null;
|
550 | }
|
551 |
|
552 | /**
|
553 | * Provides additional options to the bootstraping process.
|
554 | *
|
555 | *
|
556 | */
|
557 | declare interface BootstrapOptions {
|
558 | /**
|
559 | * Optionally specify which `NgZone` should be used.
|
560 | *
|
561 | * - Provide your own `NgZone` instance.
|
562 | * - `zone.js` - Use default `NgZone` which requires `Zone.js`.
|
563 | * - `noop` - Use `NoopNgZone` which does nothing.
|
564 | */
|
565 | ngZone?: NgZone | 'zone.js' | 'noop';
|
566 | /**
|
567 | * Optionally specify coalescing event change detections or not.
|
568 | * Consider the following case.
|
569 | *
|
570 | * <div (click)="doSomething()">
|
571 | * <button (click)="doSomethingElse()"></button>
|
572 | * </div>
|
573 | *
|
574 | * When button is clicked, because of the event bubbling, both
|
575 | * event handlers will be called and 2 change detections will be
|
576 | * triggered. We can colesce such kind of events to only trigger
|
577 | * change detection only once.
|
578 | *
|
579 | * By default, this option will be false. So the events will not be
|
580 | * coalesced and the change detection will be triggered multiple times.
|
581 | * And if this option be set to true, the change detection will be
|
582 | * triggered async by scheduling a animation frame. So in the case above,
|
583 | * the change detection will only be triggered once.
|
584 | */
|
585 | ngZoneEventCoalescing?: boolean;
|
586 | /**
|
587 | * Optionally specify if `NgZone#run()` method invocations should be coalesced
|
588 | * into a single change detection.
|
589 | *
|
590 | * Consider the following case.
|
591 | *
|
592 | * for (let i = 0; i < 10; i ++) {
|
593 | * ngZone.run(() => {
|
594 | * // do something
|
595 | * });
|
596 | * }
|
597 | *
|
598 | * This case triggers the change detection multiple times.
|
599 | * With ngZoneRunCoalescing options, all change detections in an event loop trigger only once.
|
600 | * In addition, the change detection executes in requestAnimation.
|
601 | *
|
602 | */
|
603 | ngZoneRunCoalescing?: boolean;
|
604 | }
|
605 |
|
606 |
|
607 | /**
|
608 | * The strategy that the default change detector uses to detect changes.
|
609 | * When set, takes effect the next time change detection is triggered.
|
610 | *
|
611 | * @see {@link ChangeDetectorRef#usage-notes Change detection usage}
|
612 | *
|
613 | * @publicApi
|
614 | */
|
615 | export declare enum ChangeDetectionStrategy {
|
616 | /**
|
617 | * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated
|
618 | * until reactivated by setting the strategy to `Default` (`CheckAlways`).
|
619 | * Change detection can still be explicitly invoked.
|
620 | * This strategy applies to all child directives and cannot be overridden.
|
621 | */
|
622 | OnPush = 0,
|
623 | /**
|
624 | * Use the default `CheckAlways` strategy, in which change detection is automatic until
|
625 | * explicitly deactivated.
|
626 | */
|
627 | Default = 1
|
628 | }
|
629 |
|
630 | declare type ChangeDetectionStrategy_2 = number;
|
631 |
|
632 | /**
|
633 | * Base class that provides change detection functionality.
|
634 | * A change-detection tree collects all views that are to be checked for changes.
|
635 | * Use the methods to add and remove views from the tree, initiate change-detection,
|
636 | * and explicitly mark views as _dirty_, meaning that they have changed and need to be re-rendered.
|
637 | *
|
638 | * @see [Using change detection hooks](guide/lifecycle-hooks#using-change-detection-hooks)
|
639 | * @see [Defining custom change detection](guide/lifecycle-hooks#defining-custom-change-detection)
|
640 | *
|
641 | * @usageNotes
|
642 | *
|
643 | * The following examples demonstrate how to modify default change-detection behavior
|
644 | * to perform explicit detection when needed.
|
645 | *
|
646 | * ### Use `markForCheck()` with `CheckOnce` strategy
|
647 | *
|
648 | * The following example sets the `OnPush` change-detection strategy for a component
|
649 | * (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check
|
650 | * after an interval. See [live demo](https://plnkr.co/edit/GC512b?p=preview).
|
651 | *
|
652 | * <code-example path="core/ts/change_detect/change-detection.ts"
|
653 | * region="mark-for-check"></code-example>
|
654 | *
|
655 | * ### Detach change detector to limit how often check occurs
|
656 | *
|
657 | * The following example defines a component with a large list of read-only data
|
658 | * that is expected to change constantly, many times per second.
|
659 | * To improve performance, we want to check and update the list
|
660 | * less often than the changes actually occur. To do that, we detach
|
661 | * the component's change detector and perform an explicit local check every five seconds.
|
662 | *
|
663 | * <code-example path="core/ts/change_detect/change-detection.ts" region="detach"></code-example>
|
664 | *
|
665 | *
|
666 | * ### Reattaching a detached component
|
667 | *
|
668 | * The following example creates a component displaying live data.
|
669 | * The component detaches its change detector from the main change detector tree
|
670 | * when the `live` property is set to false, and reattaches it when the property
|
671 | * becomes true.
|
672 | *
|
673 | * <code-example path="core/ts/change_detect/change-detection.ts" region="reattach"></code-example>
|
674 | *
|
675 | * @publicApi
|
676 | */
|
677 | export declare abstract class ChangeDetectorRef {
|
678 | /**
|
679 | * When a view uses the {@link ChangeDetectionStrategy#OnPush OnPush} (checkOnce)
|
680 | * change detection strategy, explicitly marks the view as changed so that
|
681 | * it can be checked again.
|
682 | *
|
683 | * Components are normally marked as dirty (in need of rerendering) when inputs
|
684 | * have changed or events have fired in the view. Call this method to ensure that
|
685 | * a component is checked even if these triggers have not occured.
|
686 | *
|
687 | * <!-- TODO: Add a link to a chapter on OnPush components -->
|
688 | *
|
689 | */
|
690 | abstract markForCheck(): void;
|
691 | /**
|
692 | * Detaches this view from the change-detection tree.
|
693 | * A detached view is not checked until it is reattached.
|
694 | * Use in combination with `detectChanges()` to implement local change detection checks.
|
695 | *
|
696 | * Detached views are not checked during change detection runs until they are
|
697 | * re-attached, even if they are marked as dirty.
|
698 | *
|
699 | * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
|
700 | * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
|
701 | *
|
702 | */
|
703 | abstract detach(): void;
|
704 | /**
|
705 | * Checks this view and its children. Use in combination with {@link ChangeDetectorRef#detach
|
706 | * detach}
|
707 | * to implement local change detection checks.
|
708 | *
|
709 | * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
|
710 | * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
|
711 | *
|
712 | */
|
713 | abstract detectChanges(): void;
|
714 | /**
|
715 | * Checks the change detector and its children, and throws if any changes are detected.
|
716 | *
|
717 | * Use in development mode to verify that running change detection doesn't introduce
|
718 | * other changes.
|
719 | */
|
720 | abstract checkNoChanges(): void;
|
721 | /**
|
722 | * Re-attaches the previously detached view to the change detection tree.
|
723 | * Views are attached to the tree by default.
|
724 | *
|
725 | * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
|
726 | *
|
727 | */
|
728 | abstract reattach(): void;
|
729 | }
|
730 |
|
731 | declare const CHILD_HEAD = 13;
|
732 |
|
733 | declare const CHILD_TAIL = 14;
|
734 |
|
735 | /**
|
736 | * Configures the `Injector` to return an instance of `useClass` for a token.
|
737 | * @see ["Dependency Injection Guide"](guide/dependency-injection).
|
738 | *
|
739 | * @usageNotes
|
740 | *
|
741 | * {@example core/di/ts/provider_spec.ts region='ClassProvider'}
|
742 | *
|
743 | * Note that following two providers are not equal:
|
744 | *
|
745 | * {@example core/di/ts/provider_spec.ts region='ClassProviderDifference'}
|
746 | *
|
747 | * ### Multi-value example
|
748 | *
|
749 | * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
750 | *
|
751 | * @publicApi
|
752 | */
|
753 | export declare interface ClassProvider extends ClassSansProvider {
|
754 | /**
|
755 | * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).
|
756 | */
|
757 | provide: any;
|
758 | /**
|
759 | * When true, injector returns an array of instances. This is useful to allow multiple
|
760 | * providers spread across many files to provide configuration information to a common token.
|
761 | */
|
762 | multi?: boolean;
|
763 | }
|
764 |
|
765 | /**
|
766 | * Configures the `Injector` to return a value by invoking a `useClass` function.
|
767 | * Base for `ClassProvider` decorator.
|
768 | *
|
769 | * @see ["Dependency Injection Guide"](guide/dependency-injection).
|
770 | *
|
771 | * @publicApi
|
772 | */
|
773 | export declare interface ClassSansProvider {
|
774 | /**
|
775 | * Class to instantiate for the `token`.
|
776 | */
|
777 | useClass: Type<any>;
|
778 | }
|
779 |
|
780 | declare const CLEANUP = 7;
|
781 |
|
782 | /**
|
783 | * Compile an Angular injectable according to its `Injectable` metadata, and patch the resulting
|
784 | * injectable def (`ɵprov`) onto the injectable type.
|
785 | */
|
786 | declare function compileInjectable(type: Type<any>, meta?: Injectable): void;
|
787 |
|
788 | /**
|
789 | * Low-level service for running the angular compiler during runtime
|
790 | * to create {@link ComponentFactory}s, which
|
791 | * can later be used to create and render a Component instance.
|
792 | *
|
793 | * Each `` provides an own `Compiler` to its injector,
|
794 | * that will use the directives/pipes of the ng module for compilation
|
795 | * of components.
|
796 | *
|
797 | * @publicApi
|
798 | */
|
799 | export declare class Compiler {
|
800 | /**
|
801 | * Compiles the given NgModule and all of its components. All templates of the components listed
|
802 | * in `entryComponents` have to be inlined.
|
803 | */
|
804 | compileModuleSync: <T>(moduleType: Type<T>) => NgModuleFactory<T>;
|
805 | /**
|
806 | * Compiles the given NgModule and all of its components
|
807 | */
|
808 | compileModuleAsync: <T>(moduleType: Type<T>) => Promise<NgModuleFactory<T>>;
|
809 | /**
|
810 | * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.
|
811 | */
|
812 | compileModuleAndAllComponentsSync: <T>(moduleType: Type<T>) => ModuleWithComponentFactories<T>;
|
813 | /**
|
814 | * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.
|
815 | */
|
816 | compileModuleAndAllComponentsAsync: <T>(moduleType: Type<T>) => Promise<ModuleWithComponentFactories<T>>;
|
817 | /**
|
818 | * Clears all caches.
|
819 | */
|
820 | clearCache(): void;
|
821 | /**
|
822 | * Clears the cache for the given component/ngModule.
|
823 | */
|
824 | clearCacheFor(type: Type<any>): void;
|
825 | /**
|
826 | * Returns the id for a given NgModule, if one is defined and known to the compiler.
|
827 | */
|
828 | getModuleId(moduleType: Type<any>): string | undefined;
|
829 | }
|
830 |
|
831 | /**
|
832 | * Token to provide CompilerOptions in the platform injector.
|
833 | *
|
834 | * @publicApi
|
835 | */
|
836 | export declare const COMPILER_OPTIONS: InjectionToken<CompilerOptions[]>;
|
837 |
|
838 | /**
|
839 | * A factory for creating a Compiler
|
840 | *
|
841 | * @publicApi
|
842 | */
|
843 | export declare abstract class CompilerFactory {
|
844 | abstract createCompiler(options?: CompilerOptions[]): Compiler;
|
845 | }
|
846 |
|
847 | /**
|
848 | * Options for creating a compiler
|
849 | *
|
850 | * @publicApi
|
851 | */
|
852 | export declare type CompilerOptions = {
|
853 | useJit?: boolean;
|
854 | defaultEncapsulation?: ViewEncapsulation;
|
855 | providers?: StaticProvider[];
|
856 | missingTranslation?: MissingTranslationStrategy;
|
857 | preserveWhitespaces?: boolean;
|
858 | };
|
859 |
|
860 | /**
|
861 | * Supplies configuration metadata for an Angular component.
|
862 | *
|
863 | * @publicApi
|
864 | */
|
865 | export declare interface Component extends Directive {
|
866 | /**
|
867 | * The change-detection strategy to use for this component.
|
868 | *
|
869 | * When a component is instantiated, Angular creates a change detector,
|
870 | * which is responsible for propagating the component's bindings.
|
871 | * The strategy is one of:
|
872 | * - `ChangeDetectionStrategy#OnPush` sets the strategy to `CheckOnce` (on demand).
|
873 | * - `ChangeDetectionStrategy#Default` sets the strategy to `CheckAlways`.
|
874 | */
|
875 | changeDetection?: ChangeDetectionStrategy;
|
876 | /**
|
877 | * Defines the set of injectable objects that are visible to its view DOM children.
|
878 | * See [example](#injecting-a-class-with-a-view-provider).
|
879 | *
|
880 | */
|
881 | viewProviders?: Provider[];
|
882 | /**
|
883 | * The module ID of the module that contains the component.
|
884 | * The component must be able to resolve relative URLs for templates and styles.
|
885 | * SystemJS exposes the `__moduleName` variable within each module.
|
886 | * In CommonJS, this can be set to `module.id`.
|
887 | *
|
888 | */
|
889 | moduleId?: string;
|
890 | /**
|
891 | * The relative path or absolute URL of a template file for an Angular component.
|
892 | * If provided, do not supply an inline template using `template`.
|
893 | *
|
894 | */
|
895 | templateUrl?: string;
|
896 | /**
|
897 | * An inline template for an Angular component. If provided,
|
898 | * do not supply a template file using `templateUrl`.
|
899 | *
|
900 | */
|
901 | template?: string;
|
902 | /**
|
903 | * One or more relative paths or absolute URLs for files containing CSS stylesheets to use
|
904 | * in this component.
|
905 | */
|
906 | styleUrls?: string[];
|
907 | /**
|
908 | * One or more inline CSS stylesheets to use
|
909 | * in this component.
|
910 | */
|
911 | styles?: string[];
|
912 | /**
|
913 | * One or more animation `trigger()` calls, containing
|
914 | * `state()` and `transition()` definitions.
|
915 | * See the [Animations guide](/guide/animations) and animations API documentation.
|
916 | *
|
917 | */
|
918 | animations?: any[];
|
919 | /**
|
920 | * An encapsulation policy for the template and CSS styles. One of:
|
921 | * - `ViewEncapsulation.Emulated`: Use shimmed CSS that
|
922 | * emulates the native behavior.
|
923 | * - `ViewEncapsulation.None`: Use global CSS without any
|
924 | * encapsulation.
|
925 | * - `ViewEncapsulation.ShadowDom`: Use Shadow DOM v1 to encapsulate styles.
|
926 | *
|
927 | * If not supplied, the value is taken from `CompilerOptions`. The default compiler option is
|
928 | * `ViewEncapsulation.Emulated`.
|
929 | *
|
930 | * If the policy is set to `ViewEncapsulation.Emulated` and the component has no `styles`
|
931 | * or `styleUrls` specified, the policy is automatically switched to `ViewEncapsulation.None`.
|
932 | */
|
933 | encapsulation?: ViewEncapsulation;
|
934 | /**
|
935 | * Overrides the default interpolation start and end delimiters (`{{` and `}}`).
|
936 | */
|
937 | interpolation?: [string, string];
|
938 | /**
|
939 | * A set of components that should be compiled along with
|
940 | * this component. For each component listed here,
|
941 | * Angular creates a {@link ComponentFactory} and stores it in the
|
942 | * {@link ComponentFactoryResolver}.
|
943 | * @deprecated Since 9.0.0. With Ivy, this property is no longer necessary.
|
944 | */
|
945 | entryComponents?: Array<Type<any> | any[]>;
|
946 | /**
|
947 | * True to preserve or false to remove potentially superfluous whitespace characters
|
948 | * from the compiled template. Whitespace characters are those matching the `\s`
|
949 | * character class in JavaScript regular expressions. Default is false, unless
|
950 | * overridden in compiler options.
|
951 | */
|
952 | preserveWhitespaces?: boolean;
|
953 | }
|
954 |
|
955 | /**
|
956 | * Component decorator and metadata.
|
957 | *
|
958 | * @Annotation
|
959 | * @publicApi
|
960 | */
|
961 | export declare const Component: ComponentDecorator;
|
962 |
|
963 | /**
|
964 | * Component decorator interface
|
965 | *
|
966 | * @publicApi
|
967 | */
|
968 | export declare interface ComponentDecorator {
|
969 | /**
|
970 | * Decorator that marks a class as an Angular component and provides configuration
|
971 | * metadata that determines how the component should be processed,
|
972 | * instantiated, and used at runtime.
|
973 | *
|
974 | * Components are the most basic UI building block of an Angular app.
|
975 | * An Angular app contains a tree of Angular components.
|
976 | *
|
977 | * Angular components are a subset of directives, always associated with a template.
|
978 | * Unlike other directives, only one component can be instantiated for a given element in a
|
979 | * template.
|
980 | *
|
981 | * A component must belong to an NgModule in order for it to be available
|
982 | * to another component or application. To make it a member of an NgModule,
|
983 | * list it in the `declarations` field of the `NgModule` metadata.
|
984 | *
|
985 | * Note that, in addition to these options for configuring a directive,
|
986 | * you can control a component's runtime behavior by implementing
|
987 | * life-cycle hooks. For more information, see the
|
988 | * [Lifecycle Hooks](guide/lifecycle-hooks) guide.
|
989 | *
|
990 | * @usageNotes
|
991 | *
|
992 | * ### Setting component inputs
|
993 | *
|
994 | * The following example creates a component with two data-bound properties,
|
995 | * specified by the `inputs` value.
|
996 | *
|
997 | * <code-example path="core/ts/metadata/directives.ts" region="component-input"></code-example>
|
998 | *
|
999 | *
|
1000 | * ### Setting component outputs
|
1001 | *
|
1002 | * The following example shows two event emitters that emit on an interval. One
|
1003 | * emits an output every second, while the other emits every five seconds.
|
1004 | *
|
1005 | * {@example core/ts/metadata/directives.ts region='component-output-interval'}
|
1006 | *
|
1007 | * ### Injecting a class with a view provider
|
1008 | *
|
1009 | * The following simple example injects a class into a component
|
1010 | * using the view provider specified in component metadata:
|
1011 | *
|
1012 | * ```ts
|
1013 | * class Greeter {
|
1014 | * greet(name:string) {
|
1015 | * return 'Hello ' + name + '!';
|
1016 | * }
|
1017 | * }
|
1018 | *
|
1019 | * ({
|
1020 | * selector: 'needs-greeter'
|
1021 | * })
|
1022 | * class NeedsGreeter {
|
1023 | * greeter:Greeter;
|
1024 | *
|
1025 | * constructor(greeter:Greeter) {
|
1026 | * this.greeter = greeter;
|
1027 | * }
|
1028 | * }
|
1029 | *
|
1030 | * ({
|
1031 | * selector: 'greet',
|
1032 | * viewProviders: [
|
1033 | * Greeter
|
1034 | * ],
|
1035 | * template: `<needs-greeter></needs-greeter>`
|
1036 | * })
|
1037 | * class HelloWorld {
|
1038 | * }
|
1039 | *
|
1040 | * ```
|
1041 | *
|
1042 | * ### Preserving whitespace
|
1043 | *
|
1044 | * Removing whitespace can greatly reduce AOT-generated code size and speed up view creation.
|
1045 | * As of Angular 6, the default for `preserveWhitespaces` is false (whitespace is removed).
|
1046 | * To change the default setting for all components in your application, set
|
1047 | * the `preserveWhitespaces` option of the AOT compiler.
|
1048 | *
|
1049 | * By default, the AOT compiler removes whitespace characters as follows:
|
1050 | * * Trims all whitespaces at the beginning and the end of a template.
|
1051 | * * Removes whitespace-only text nodes. For example,
|
1052 | *
|
1053 | * ```html
|
1054 | * <button>Action 1</button> <button>Action 2</button>
|
1055 | * ```
|
1056 | *
|
1057 | * becomes:
|
1058 | *
|
1059 | * ```html
|
1060 | * <button>Action 1</button><button>Action 2</button>
|
1061 | * ```
|
1062 | *
|
1063 | * * Replaces a series of whitespace characters in text nodes with a single space.
|
1064 | * For example, `<span>\n some text\n</span>` becomes `<span> some text </span>`.
|
1065 | * * Does NOT alter text nodes inside HTML tags such as `<pre>` or `<textarea>`,
|
1066 | * where whitespace characters are significant.
|
1067 | *
|
1068 | * Note that these transformations can influence DOM nodes layout, although impact
|
1069 | * should be minimal.
|
1070 | *
|
1071 | * You can override the default behavior to preserve whitespace characters
|
1072 | * in certain fragments of a template. For example, you can exclude an entire
|
1073 | * DOM sub-tree by using the `ngPreserveWhitespaces` attribute:
|
1074 | *
|
1075 | * ```html
|
1076 | * <div ngPreserveWhitespaces>
|
1077 | * whitespaces are preserved here
|
1078 | * <span> and here </span>
|
1079 | * </div>
|
1080 | * ```
|
1081 | *
|
1082 | * You can force a single space to be preserved in a text node by using `&ngsp;`,
|
1083 | * which is replaced with a space character by Angular's template
|
1084 | * compiler:
|
1085 | *
|
1086 | * ```html
|
1087 | * <a>Spaces</a>&ngsp;<a>between</a>&ngsp;<a>links.</a>
|
1088 | * <!-- compiled to be equivalent to:
|
1089 | * <a>Spaces</a> <a>between</a> <a>links.</a> -->
|
1090 | * ```
|
1091 | *
|
1092 | * Note that sequences of `&ngsp;` are still collapsed to just one space character when
|
1093 | * the `preserveWhitespaces` option is set to `false`.
|
1094 | *
|
1095 | * ```html
|
1096 | * <a>before</a>&ngsp;&ngsp;&ngsp;<a>after</a>
|
1097 | * <!-- compiled to be equivalent to:
|
1098 | * <a>before</a> <a>after</a> -->
|
1099 | * ```
|
1100 | *
|
1101 | * To preserve sequences of whitespace characters, use the
|
1102 | * `ngPreserveWhitespaces` attribute.
|
1103 | *
|
1104 | * @Annotation
|
1105 | */
|
1106 | (obj: Component): TypeDecorator;
|
1107 | /**
|
1108 | * See the `Component` decorator.
|
1109 | */
|
1110 | new (obj: Component): Component;
|
1111 | }
|
1112 |
|
1113 | declare interface ComponentDefFeature {
|
1114 | <T>(componentDef: ɵComponentDef<T>): void;
|
1115 | /**
|
1116 | * Marks a feature as something that {@link InheritDefinitionFeature} will execute
|
1117 | * during inheritance.
|
1118 | *
|
1119 | * NOTE: DO NOT SET IN ROOT OF MODULE! Doing so will result in tree-shakers/bundlers
|
1120 | * identifying the change as a side effect, and the feature will be included in
|
1121 | * every bundle.
|
1122 | */
|
1123 | ngInherit?: true;
|
1124 | }
|
1125 |
|
1126 | /**
|
1127 | * Base class for a factory that can create a component dynamically.
|
1128 | * Instantiate a factory for a given type of component with `resolveComponentFactory()`.
|
1129 | * Use the resulting `ComponentFactory.create()` method to create a component of that type.
|
1130 | *
|
1131 | * @see [Dynamic Components](guide/dynamic-component-loader)
|
1132 | *
|
1133 | * @publicApi
|
1134 | */
|
1135 | declare abstract class ComponentFactory<C> {
|
1136 | /**
|
1137 | * The component's HTML selector.
|
1138 | */
|
1139 | abstract get selector(): string;
|
1140 | /**
|
1141 | * The type of component the factory will create.
|
1142 | */
|
1143 | abstract get componentType(): Type<any>;
|
1144 | /**
|
1145 | * Selector for all <ng-content> elements in the component.
|
1146 | */
|
1147 | abstract get ngContentSelectors(): string[];
|
1148 | /**
|
1149 | * The inputs of the component.
|
1150 | */
|
1151 | abstract get inputs(): {
|
1152 | propName: string;
|
1153 | templateName: string;
|
1154 | }[];
|
1155 | /**
|
1156 | * The outputs of the component.
|
1157 | */
|
1158 | abstract get outputs(): {
|
1159 | propName: string;
|
1160 | templateName: string;
|
1161 | }[];
|
1162 | /**
|
1163 | * Creates a new component.
|
1164 | */
|
1165 | abstract create(injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string | any, ngModule?: NgModuleRef<any>): ComponentRef<C>;
|
1166 | }
|
1167 | export { ComponentFactory }
|
1168 | export { ComponentFactory as ɵComponentFactory }
|
1169 |
|
1170 | /**
|
1171 | * A simple registry that maps `Components` to generated `ComponentFactory` classes
|
1172 | * that can be used to create instances of components.
|
1173 | * Use to obtain the factory for a given component type,
|
1174 | * then use the factory's `create()` method to create a component of that type.
|
1175 | *
|
1176 | * @see [Dynamic Components](guide/dynamic-component-loader)
|
1177 | * @see [Usage Example](guide/dynamic-component-loader#resolving-components)
|
1178 | * @see <live-example name="dynamic-component-loader" noDownload></live-example>
|
1179 | of the code in this cookbook
|
1180 | * @publicApi
|
1181 | */
|
1182 | export declare abstract class ComponentFactoryResolver {
|
1183 | static NULL: ComponentFactoryResolver;
|
1184 | /**
|
1185 | * Retrieves the factory object that creates a component of the given type.
|
1186 | * @param component The component type.
|
1187 | */
|
1188 | abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;
|
1189 | }
|
1190 |
|
1191 | declare class ComponentFactoryResolver_2 extends ComponentFactoryResolver {
|
1192 | private ngModule?;
|
1193 | /**
|
1194 | * @param ngModule The NgModuleRef to which all resolved factories are bound.
|
1195 | */
|
1196 | constructor(ngModule?: NgModuleRef<any> | undefined);
|
1197 | resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;
|
1198 | }
|
1199 |
|
1200 | declare type ComponentInstance = {};
|
1201 |
|
1202 | /**
|
1203 | * Represents a component created by a `ComponentFactory`.
|
1204 | * Provides access to the component instance and related objects,
|
1205 | * and provides the means of destroying the instance.
|
1206 | *
|
1207 | * @publicApi
|
1208 | */
|
1209 | export declare abstract class ComponentRef<C> {
|
1210 | /**
|
1211 | * The host or anchor [element](guide/glossary#element) for this component instance.
|
1212 | */
|
1213 | abstract get location(): ElementRef;
|
1214 | /**
|
1215 | * The [dependency injector](guide/glossary#injector) for this component instance.
|
1216 | */
|
1217 | abstract get injector(): Injector;
|
1218 | /**
|
1219 | * This component instance.
|
1220 | */
|
1221 | abstract get instance(): C;
|
1222 | /**
|
1223 | * The [host view](guide/glossary#view-tree) defined by the template
|
1224 | * for this component instance.
|
1225 | */
|
1226 | abstract get hostView(): ViewRef;
|
1227 | /**
|
1228 | * The change detector for this component instance.
|
1229 | */
|
1230 | abstract get changeDetectorRef(): ChangeDetectorRef;
|
1231 | /**
|
1232 | * The type of this component (as created by a `ComponentFactory` class).
|
1233 | */
|
1234 | abstract get componentType(): Type<any>;
|
1235 | /**
|
1236 | * Destroys the component instance and all of the data structures associated with it.
|
1237 | */
|
1238 | abstract destroy(): void;
|
1239 | /**
|
1240 | * A lifecycle hook that provides additional developer-defined cleanup
|
1241 | * functionality for the component.
|
1242 | * @param callback A handler function that cleans up developer-defined data
|
1243 | * associated with this component. Called when the `destroy()` method is invoked.
|
1244 | */
|
1245 | abstract onDestroy(callback: Function): void;
|
1246 | }
|
1247 |
|
1248 | /**
|
1249 | * Definition of what a template rendering function should look like for a component.
|
1250 | */
|
1251 | declare type ComponentTemplate<T> = {
|
1252 | <U extends T>(rf: ɵRenderFlags, ctx: T | U): void;
|
1253 | };
|
1254 |
|
1255 | /**
|
1256 | * Configures the `Injector` to return an instance of a token.
|
1257 | *
|
1258 | * @see ["Dependency Injection Guide"](guide/dependency-injection).
|
1259 | *
|
1260 | * @usageNotes
|
1261 | *
|
1262 | * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
|
1263 | *
|
1264 | * ### Multi-value example
|
1265 | *
|
1266 | * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
1267 | *
|
1268 | * @publicApi
|
1269 | */
|
1270 | export declare interface ConstructorProvider extends ConstructorSansProvider {
|
1271 | /**
|
1272 | * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
|
1273 | */
|
1274 | provide: Type<any>;
|
1275 | /**
|
1276 | * When true, injector returns an array of instances. This is useful to allow multiple
|
1277 | * providers spread across many files to provide configuration information to a common token.
|
1278 | */
|
1279 | multi?: boolean;
|
1280 | }
|
1281 |
|
1282 | /**
|
1283 | * Configures the `Injector` to return an instance of a token.
|
1284 | *
|
1285 | * @see ["Dependency Injection Guide"](guide/dependency-injection).
|
1286 | *
|
1287 | * @usageNotes
|
1288 | *
|
1289 | * ```ts
|
1290 | * (SomeModule, {deps: []})
|
1291 | * class MyService {}
|
1292 | * ```
|
1293 | *
|
1294 | * @publicApi
|
1295 | */
|
1296 | export declare interface ConstructorSansProvider {
|
1297 | /**
|
1298 | * A list of `token`s to be resolved by the injector.
|
1299 | */
|
1300 | deps?: any[];
|
1301 | }
|
1302 |
|
1303 | /**
|
1304 | * Type of the ContentChild metadata.
|
1305 | *
|
1306 | * @publicApi
|
1307 | */
|
1308 | export declare type ContentChild = Query;
|
1309 |
|
1310 | /**
|
1311 | * ContentChild decorator and metadata.
|
1312 | *
|
1313 | *
|
1314 | * @Annotation
|
1315 | *
|
1316 | * @publicApi
|
1317 | */
|
1318 | export declare const ContentChild: ContentChildDecorator;
|
1319 |
|
1320 | /**
|
1321 | * Type of the ContentChild decorator / constructor function.
|
1322 | *
|
1323 | * @publicApi
|
1324 | */
|
1325 | export declare interface ContentChildDecorator {
|
1326 | /**
|
1327 | * Parameter decorator that configures a content query.
|
1328 | *
|
1329 | * Use to get the first element or the directive matching the selector from the content DOM.
|
1330 | * If the content DOM changes, and a new child matches the selector,
|
1331 | * the property will be updated.
|
1332 | *
|
1333 | * Content queries are set before the `ngAfterContentInit` callback is called.
|
1334 | *
|
1335 | * Does not retrieve elements or directives that are in other components' templates,
|
1336 | * since a component's template is always a black box to its ancestors.
|
1337 | *
|
1338 | * **Metadata Properties**:
|
1339 | *
|
1340 | * * **selector** - The directive type or the name used for querying.
|
1341 | * * **read** - Used to read a different token from the queried element.
|
1342 | * * **static** - True to resolve query results before change detection runs,
|
1343 | * false to resolve after change detection. Defaults to false.
|
1344 | *
|
1345 | * The following selectors are supported.
|
1346 | * * Any class with the `` or `` decorator
|
1347 | * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
|
1348 | * with `@ContentChild('cmp')`)
|
1349 | * * Any provider defined in the child component tree of the current component (e.g.
|
1350 | * `@ContentChild(SomeService) someService: SomeService`)
|
1351 | * * Any provider defined through a string token (e.g. `@ContentChild('someToken') someTokenVal:
|
1352 | * any`)
|
1353 | * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ContentChild(TemplateRef)
|
1354 | * template;`)
|
1355 | *
|
1356 | * The following values are supported by `read`:
|
1357 | * * Any class with the `@Component` or `@Directive` decorator
|
1358 | * * Any provider defined on the injector of the component that is matched by the `selector` of
|
1359 | * this query
|
1360 | * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)
|
1361 | * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`
|
1362 | *
|
1363 | *
|
1364 | *
|
1365 | * {'HowTo'}
core/di/ts/contentChild/content_child_howto.ts region= |
1366 | *
|
1367 | * ### Example
|
1368 | *
|
1369 | * {'Component'}
core/di/ts/contentChild/content_child_example.ts region= |
1370 | *
|
1371 | *
|
1372 | */
|
1373 | (selector: ProviderToken<unknown> | Function | string, opts?: {
|
1374 | read?: any;
|
1375 | static?: boolean;
|
1376 | }): any;
|
1377 | new (selector: ProviderToken<unknown> | Function | string, opts?: {
|
1378 | read?: any;
|
1379 | static?: boolean;
|
1380 | }): ContentChild;
|
1381 | }
|
1382 |
|
1383 | /**
|
1384 | * Type of the ContentChildren metadata.
|
1385 | *
|
1386 | *
|
1387 | * @Annotation
|
1388 | * @publicApi
|
1389 | */
|
1390 | export declare type ContentChildren = Query;
|
1391 |
|
1392 | /**
|
1393 | * ContentChildren decorator and metadata.
|
1394 | *
|
1395 | *
|
1396 | * @Annotation
|
1397 | * @publicApi
|
1398 | */
|
1399 | export declare const ContentChildren: ContentChildrenDecorator;
|
1400 |
|
1401 | /**
|
1402 | * Type of the ContentChildren decorator / constructor function.
|
1403 | *
|
1404 | * @see `ContentChildren`.
|
1405 | * @publicApi
|
1406 | */
|
1407 | export declare interface ContentChildrenDecorator {
|
1408 | /**
|
1409 | * Parameter decorator that configures a content query.
|
1410 | *
|
1411 | * Use to get the `QueryList` of elements or directives from the content DOM.
|
1412 | * Any time a child element is added, removed, or moved, the query list will be
|
1413 | * updated, and the changes observable of the query list will emit a new value.
|
1414 | *
|
1415 | * Content queries are set before the `ngAfterContentInit` callback is called.
|
1416 | *
|
1417 | * Does not retrieve elements or directives that are in other components' templates,
|
1418 | * since a component's template is always a black box to its ancestors.
|
1419 | *
|
1420 | * **Metadata Properties**:
|
1421 | *
|
1422 | * * **selector** - The directive type or the name used for querying.
|
1423 | * * **descendants** - If `true` include all descendants of the element. If `false` then only
|
1424 | * query direct children of the element.
|
1425 | * * **emitDistinctChangesOnly** - The ` QueryList#changes` observable will emit new values only
|
1426 | * if the QueryList result has changed. When `false` the `changes` observable might emit even
|
1427 | * if the QueryList has not changed.
|
1428 | * ** Note: *** This config option is **deprecated**, it will be permanently set to `true` and
|
1429 | * removed in future versions of Angular.
|
1430 | * * **read** - Used to read a different token from the queried elements.
|
1431 | *
|
1432 | * The following selectors are supported.
|
1433 | * * Any class with the `@Component` or `@Directive` decorator
|
1434 | * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
|
1435 | * with `@ContentChildren('cmp')`)
|
1436 | * * Any provider defined in the child component tree of the current component (e.g.
|
1437 | * `@ContentChildren(SomeService) someService: SomeService`)
|
1438 | * * Any provider defined through a string token (e.g. `@ContentChildren('someToken')
|
1439 | * someTokenVal: any`)
|
1440 | * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with
|
1441 | * `@ContentChildren(TemplateRef) template;`)
|
1442 | *
|
1443 | * In addition, multiple string selectors can be separated with a comma (e.g.
|
1444 | * `@ContentChildren('cmp1,cmp2')`)
|
1445 | *
|
1446 | * The following values are supported by `read`:
|
1447 | * * Any class with the `@Component` or `@Directive` decorator
|
1448 | * * Any provider defined on the injector of the component that is matched by the `selector` of
|
1449 | * this query
|
1450 | * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)
|
1451 | * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`
|
1452 | *
|
1453 | * @usageNotes
|
1454 | *
|
1455 | * Here is a simple demonstration of how the `ContentChildren` decorator can be used.
|
1456 | *
|
1457 | * {@example core/di/ts/contentChildren/content_children_howto.ts region='HowTo'}
|
1458 | *
|
1459 | * ### Tab-pane example
|
1460 | *
|
1461 | * Here is a slightly more realistic example that shows how `ContentChildren` decorators
|
1462 | * can be used to implement a tab pane component.
|
1463 | *
|
1464 | * {@example core/di/ts/contentChildren/content_children_example.ts region='Component'}
|
1465 | *
|
1466 | * @Annotation
|
1467 | */
|
1468 | (selector: ProviderToken<unknown> | Function | string, opts?: {
|
1469 | descendants?: boolean;
|
1470 | emitDistinctChangesOnly?: boolean;
|
1471 | read?: any;
|
1472 | }): any;
|
1473 | new (selector: ProviderToken<unknown> | Function | string, opts?: {
|
1474 | descendants?: boolean;
|
1475 | emitDistinctChangesOnly?: boolean;
|
1476 | read?: any;
|
1477 | }): Query;
|
1478 | }
|
1479 |
|
1480 | /**
|
1481 | * Definition of what a content queries function should look like.
|
1482 | */
|
1483 | declare type ContentQueriesFunction<T> = <U extends T>(rf: ɵRenderFlags, ctx: U, directiveIndex: number) => void;
|
1484 |
|
1485 | declare const CONTEXT = 8;
|
1486 |
|
1487 | /** Options that control how the component should be bootstrapped. */
|
1488 | declare interface CreateComponentOptions {
|
1489 | /** Which renderer factory to use. */
|
1490 | rendererFactory?: RendererFactory3;
|
1491 | /** A custom sanitizer instance */
|
1492 | sanitizer?: Sanitizer;
|
1493 | /** A custom animation player handler */
|
1494 | playerHandler?: ɵPlayerHandler;
|
1495 | /**
|
1496 | * Host element on which the component will be bootstrapped. If not specified,
|
1497 | * the component definition's `tag` is used to query the existing DOM for the
|
1498 | * element to bootstrap.
|
1499 | */
|
1500 | host?: RElement | string;
|
1501 | /** Module injector for the component. If unspecified, the injector will be NULL_INJECTOR. */
|
1502 | injector?: Injector;
|
1503 | /**
|
1504 | * List of features to be applied to the created component. Features are simply
|
1505 | * functions that decorate a component with a certain behavior.
|
1506 | *
|
1507 | * Typically, the features in this list are features that cannot be added to the
|
1508 | * other features list in the component definition because they rely on other factors.
|
1509 | *
|
1510 | * Example: `LifecycleHooksFeature` is a function that adds lifecycle hook capabilities
|
1511 | * to root components in a tree-shakable way. It cannot be added to the component
|
1512 | * features list because there's no way of knowing when the component will be used as
|
1513 | * a root component.
|
1514 | */
|
1515 | hostFeatures?: HostFeature[];
|
1516 | /**
|
1517 | * A function which is used to schedule change detection work in the future.
|
1518 | *
|
1519 | * When marking components as dirty, it is necessary to schedule the work of
|
1520 | * change detection in the future. This is done to coalesce multiple
|
1521 | * {@link markDirty} calls into a single changed detection processing.
|
1522 | *
|
1523 | * The default value of the scheduler is the `requestAnimationFrame` function.
|
1524 | *
|
1525 | * It is also useful to override this function for testing purposes.
|
1526 | */
|
1527 | scheduler?: (work: () => void) => void;
|
1528 | }
|
1529 |
|
1530 | /**
|
1531 | * Creates a platform.
|
1532 | * Platforms must be created on launch using this function.
|
1533 | *
|
1534 | * @publicApi
|
1535 | */
|
1536 | export declare function createPlatform(injector: Injector): PlatformRef;
|
1537 |
|
1538 | /**
|
1539 | * Creates a factory for a platform. Can be used to provide or override `Providers` specific to
|
1540 | * your application's runtime needs, such as `PLATFORM_INITIALIZER` and `PLATFORM_ID`.
|
1541 | * @param parentPlatformFactory Another platform factory to modify. Allows you to compose factories
|
1542 | * to build up configurations that might be required by different libraries or parts of the
|
1543 | * application.
|
1544 | * @param name Identifies the new platform factory.
|
1545 | * @param providers A set of dependency providers for platforms created with the new factory.
|
1546 | *
|
1547 | * @publicApi
|
1548 | */
|
1549 | export declare function createPlatformFactory(parentPlatformFactory: ((extraProviders?: StaticProvider[]) => PlatformRef) | null, name: string, providers?: StaticProvider[]): (extraProviders?: StaticProvider[]) => PlatformRef;
|
1550 |
|
1551 |
|
1552 | /**
|
1553 | * Expresses a single CSS Selector.
|
1554 | *
|
1555 | * Beginning of array
|
1556 | * - First index: element name
|
1557 | * - Subsequent odd indices: attr keys
|
1558 | * - Subsequent even indices: attr values
|
1559 | *
|
1560 | * After SelectorFlags.CLASS flag
|
1561 | * - Class name values
|
1562 | *
|
1563 | * SelectorFlags.NOT flag
|
1564 | * - Changes the mode to NOT
|
1565 | * - Can be combined with other flags to set the element / attr / class mode
|
1566 | *
|
1567 | * e.g. SelectorFlags.NOT | SelectorFlags.ELEMENT
|
1568 | *
|
1569 | * Example:
|
1570 | * Original: `div.foo.bar[attr1=val1][attr2]`
|
1571 | * Parsed: ['div', 'attr1', 'val1', 'attr2', '', SelectorFlags.CLASS, 'foo', 'bar']
|
1572 | *
|
1573 | * Original: 'div[attr1]:not(.foo[attr2])
|
1574 | * Parsed: [
|
1575 | * 'div', 'attr1', '',
|
1576 | * SelectorFlags.NOT | SelectorFlags.ATTRIBUTE 'attr2', '', SelectorFlags.CLASS, 'foo'
|
1577 | * ]
|
1578 | *
|
1579 | * See more examples in node_selector_matcher_spec.ts
|
1580 | */
|
1581 | declare type CssSelector = (string | SelectorFlags)[];
|
1582 |
|
1583 | /**
|
1584 | * An object literal of this type is used to represent the metadata of a constructor dependency.
|
1585 | * The type itself is never referred to from generated code.
|
1586 | *
|
1587 | * @publicApi
|
1588 | */
|
1589 | declare type CtorDependency = {
|
1590 | /**
|
1591 | * If an `@Attribute` decorator is used, this represents the injected attribute's name. If the
|
1592 | * attribute name is a dynamic expression instead of a string literal, this will be the unknown
|
1593 | * type.
|
1594 | */
|
1595 | attribute?: string | unknown;
|
1596 | /**
|
1597 | * If `@Optional()` is used, this key is set to true.
|
1598 | */
|
1599 | optional?: true;
|
1600 | /**
|
1601 | * If `@Host` is used, this key is set to true.
|
1602 | */
|
1603 | host?: true;
|
1604 | /**
|
1605 | * If `@Self` is used, this key is set to true.
|
1606 | */
|
1607 | self?: true;
|
1608 | /**
|
1609 | * If `@SkipSelf` is used, this key is set to true.
|
1610 | */
|
1611 | skipSelf?: true;
|
1612 | } | null;
|
1613 |
|
1614 | /**
|
1615 | * Defines a schema that allows an NgModule to contain the following:
|
1616 | * - Non-Angular elements named with dash case (`-`).
|
1617 | * - Element properties named with dash case (`-`).
|
1618 | * Dash case is the naming convention for custom elements.
|
1619 | *
|
1620 | * @publicApi
|
1621 | */
|
1622 | export declare const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata;
|
1623 |
|
1624 | /**
|
1625 | * @publicApi
|
1626 | *
|
1627 | * @see [Component testing scenarios](guide/testing-components-scenarios)
|
1628 | * @see [Basics of testing components](guide/testing-components-basics)
|
1629 | * @see [Testing utility APIs](guide/testing-utility-apis)
|
1630 | */
|
1631 | export declare interface DebugElement extends DebugNode {
|
1632 | /**
|
1633 | * The element tag name, if it is an element.
|
1634 | */
|
1635 | readonly name: string;
|
1636 | /**
|
1637 | * A map of property names to property values for an element.
|
1638 | *
|
1639 | * This map includes:
|
1640 | * - Regular property bindings (e.g. `[id]="id"`)
|
1641 | * - Host property bindings (e.g. `host: { '[id]': "id" }`)
|
1642 | * - Interpolated property bindings (e.g. `id="{{ value }}")
|
1643 | *
|
1644 | * It does not include:
|
1645 | * - input property bindings (e.g. `[myCustomInput]="value"`)
|
1646 | * - attribute bindings (e.g. `[attr.role]="menu"`)
|
1647 | */
|
1648 | readonly properties: {
|
1649 | [key: string]: any;
|
1650 | };
|
1651 | /**
|
1652 | * A map of attribute names to attribute values for an element.
|
1653 | */
|
1654 | readonly attributes: {
|
1655 | [key: string]: string | null;
|
1656 | };
|
1657 | /**
|
1658 | * A map containing the class names on the element as keys.
|
1659 | *
|
1660 | * This map is derived from the `className` property of the DOM element.
|
1661 | *
|
1662 | * Note: The values of this object will always be `true`. The class key will not appear in the KV
|
1663 | * object if it does not exist on the element.
|
1664 | *
|
1665 | * @see [Element.className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className)
|
1666 | */
|
1667 | readonly classes: {
|
1668 | [key: string]: boolean;
|
1669 | };
|
1670 | /**
|
1671 | * The inline styles of the DOM element.
|
1672 | *
|
1673 | * Will be `null` if there is no `style` property on the underlying DOM element.
|
1674 | *
|
1675 | * @see [ElementCSSInlineStyle](https://developer.mozilla.org/en-US/docs/Web/API/ElementCSSInlineStyle/style)
|
1676 | */
|
1677 | readonly styles: {
|
1678 | [key: string]: string | null;
|
1679 | };
|
1680 | /**
|
1681 | * The `childNodes` of the DOM element as a `DebugNode` array.
|
1682 | *
|
1683 | * @see [Node.childNodes](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes)
|
1684 | */
|
1685 | readonly childNodes: DebugNode[];
|
1686 | /**
|
1687 | * The underlying DOM element at the root of the component.
|
1688 | */
|
1689 | readonly nativeElement: any;
|
1690 | /**
|
1691 | * The immediate `DebugElement` children. Walk the tree by descending through `children`.
|
1692 | */
|
1693 | readonly children: DebugElement[];
|
1694 | /**
|
1695 | * @returns the first `DebugElement` that matches the predicate at any depth in the subtree.
|
1696 | */
|
1697 | query(predicate: Predicate<DebugElement>): DebugElement;
|
1698 | /**
|
1699 | * @returns All `DebugElement` matches for the predicate at any depth in the subtree.
|
1700 | */
|
1701 | queryAll(predicate: Predicate<DebugElement>): DebugElement[];
|
1702 | /**
|
1703 | * @returns All `DebugNode` matches for the predicate at any depth in the subtree.
|
1704 | */
|
1705 | queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[];
|
1706 | /**
|
1707 | * Triggers the event by its name if there is a corresponding listener in the element's
|
1708 | * `listeners` collection.
|
1709 | *
|
1710 | * If the event lacks a listener or there's some other problem, consider
|
1711 | * calling `nativeElement.dispatchEvent(eventObject)`.
|
1712 | *
|
1713 | * @param eventName The name of the event to trigger
|
1714 | * @param eventObj The _event object_ expected by the handler
|
1715 | *
|
1716 | * @see [Testing components scenarios](guide/testing-components-scenarios#trigger-event-handler)
|
1717 | */
|
1718 | triggerEventHandler(eventName: string, eventObj: any): void;
|
1719 | }
|
1720 |
|
1721 | /**
|
1722 | * @publicApi
|
1723 | */
|
1724 | export declare const DebugElement: {
|
1725 | new (...args: any[]): DebugElement;
|
1726 | };
|
1727 |
|
1728 | declare class DebugElement__POST_R3__ extends DebugNode__POST_R3__ implements DebugElement {
|
1729 | constructor(nativeNode: Element);
|
1730 | get nativeElement(): Element | null;
|
1731 | get name(): string;
|
1732 | /**
|
1733 | * Gets a map of property names to property values for an element.
|
1734 | *
|
1735 | * This map includes:
|
1736 | * - Regular property bindings (e.g. `[id]="id"`)
|
1737 | * - Host property bindings (e.g. `host: { '[id]': "id" }`)
|
1738 | * - Interpolated property bindings (e.g. `id="{{ value }}")
|
1739 | *
|
1740 | * It does not include:
|
1741 | * - input property bindings (e.g. `[myCustomInput]="value"`)
|
1742 | * - attribute bindings (e.g. `[attr.role]="menu"`)
|
1743 | */
|
1744 | get properties(): {
|
1745 | [key: string]: any;
|
1746 | };
|
1747 | get attributes(): {
|
1748 | [key: string]: string | null;
|
1749 | };
|
1750 | get styles(): {
|
1751 | [key: string]: string | null;
|
1752 | };
|
1753 | get classes(): {
|
1754 | [key: string]: boolean;
|
1755 | };
|
1756 | get childNodes(): DebugNode[];
|
1757 | get children(): DebugElement[];
|
1758 | query(predicate: Predicate<DebugElement>): DebugElement;
|
1759 | queryAll(predicate: Predicate<DebugElement>): DebugElement[];
|
1760 | queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[];
|
1761 | triggerEventHandler(eventName: string, eventObj: any): void;
|
1762 | }
|
1763 |
|
1764 | /**
|
1765 | * @publicApi
|
1766 | */
|
1767 | export declare class DebugEventListener {
|
1768 | name: string;
|
1769 | callback: Function;
|
1770 | constructor(name: string, callback: Function);
|
1771 | }
|
1772 |
|
1773 | /**
|
1774 | * @publicApi
|
1775 | */
|
1776 | export declare interface DebugNode {
|
1777 | /**
|
1778 | * The callbacks attached to the component's @Output properties and/or the element's event
|
1779 | * properties.
|
1780 | */
|
1781 | readonly listeners: DebugEventListener[];
|
1782 | /**
|
1783 | * The `DebugElement` parent. Will be `null` if this is the root element.
|
1784 | */
|
1785 | readonly parent: DebugElement | null;
|
1786 | /**
|
1787 | * The underlying DOM node.
|
1788 | */
|
1789 | readonly nativeNode: any;
|
1790 | /**
|
1791 | * The host dependency injector. For example, the root element's component instance injector.
|
1792 | */
|
1793 | readonly injector: Injector;
|
1794 | /**
|
1795 | * The element's own component instance, if it has one.
|
1796 | */
|
1797 | readonly componentInstance: any;
|
1798 | /**
|
1799 | * An object that provides parent context for this element. Often an ancestor component instance
|
1800 | * that governs this element.
|
1801 | *
|
1802 | * When an element is repeated within *ngFor, the context is an `NgForOf` whose `$implicit`
|
1803 | * property is the value of the row instance value. For example, the `hero` in `*ngFor="let hero
|
1804 | * of heroes"`.
|
1805 | */
|
1806 | readonly context: any;
|
1807 | /**
|
1808 | * Dictionary of objects associated with template local variables (e.g. #foo), keyed by the local
|
1809 | * variable name.
|
1810 | */
|
1811 | readonly references: {
|
1812 | [key: string]: any;
|
1813 | };
|
1814 | /**
|
1815 | * This component's injector lookup tokens. Includes the component itself plus the tokens that the
|
1816 | * component lists in its providers metadata.
|
1817 | */
|
1818 | readonly providerTokens: any[];
|
1819 | }
|
1820 |
|
1821 | /**
|
1822 | * @publicApi
|
1823 | */
|
1824 | export declare const DebugNode: {
|
1825 | new (...args: any[]): DebugNode;
|
1826 | };
|
1827 |
|
1828 | /**
|
1829 | * A logical node which comprise into `LView`s.
|
1830 | *
|
1831 | */
|
1832 | declare interface DebugNode_2 {
|
1833 | /**
|
1834 | * HTML representation of the node.
|
1835 | */
|
1836 | html: string | null;
|
1837 | /**
|
1838 | * Associated `TNode`
|
1839 | */
|
1840 | tNode: TNode;
|
1841 | /**
|
1842 | * Human readable node type.
|
1843 | */
|
1844 | type: string;
|
1845 | /**
|
1846 | * DOM native node.
|
1847 | */
|
1848 | native: Node;
|
1849 | /**
|
1850 | * Child nodes
|
1851 | */
|
1852 | children: DebugNode_2[];
|
1853 | /**
|
1854 | * A list of Component/Directive types which need to be instantiated an this location.
|
1855 | */
|
1856 | factories: Type<unknown>[];
|
1857 | /**
|
1858 | * A list of Component/Directive instances which were instantiated an this location.
|
1859 | */
|
1860 | instances: unknown[];
|
1861 | /**
|
1862 | * NodeInjector information.
|
1863 | */
|
1864 | injector: NodeInjectorDebug;
|
1865 | /**
|
1866 | * Injector resolution path.
|
1867 | */
|
1868 | injectorResolutionPath: any;
|
1869 | }
|
1870 |
|
1871 | declare class DebugNode__POST_R3__ implements DebugNode {
|
1872 | readonly nativeNode: Node;
|
1873 | constructor(nativeNode: Node);
|
1874 | get parent(): DebugElement | null;
|
1875 | get injector(): Injector;
|
1876 | get componentInstance(): any;
|
1877 | get context(): any;
|
1878 | get listeners(): DebugEventListener[];
|
1879 | get references(): {
|
1880 | [key: string]: any;
|
1881 | };
|
1882 | get providerTokens(): any[];
|
1883 | }
|
1884 |
|
1885 | declare const DECLARATION_COMPONENT_VIEW = 16;
|
1886 |
|
1887 | declare const DECLARATION_LCONTAINER = 17;
|
1888 |
|
1889 | declare const DECLARATION_VIEW = 15;
|
1890 |
|
1891 | /**
|
1892 | * Provide this token to set the default currency code your application uses for
|
1893 | * CurrencyPipe when there is no currency code passed into it. This is only used by
|
1894 | * CurrencyPipe and has no relation to locale currency. Defaults to USD if not configured.
|
1895 | *
|
1896 | * See the [i18n guide](guide/i18n#setting-up-locale) for more information.
|
1897 | *
|
1898 | * <div class="alert is-helpful">
|
1899 | *
|
1900 | * **Deprecation notice:**
|
1901 | *
|
1902 | * The default currency code is currently always `USD` but this is deprecated from v9.
|
1903 | *
|
1904 | * **In v10 the default currency code will be taken from the current locale.**
|
1905 | *
|
1906 | * If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in
|
1907 | * your application `NgModule`:
|
1908 | *
|
1909 | * ```ts
|
1910 | * {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}
|
1911 | * ```
|
1912 | *
|
1913 | * </div>
|
1914 | *
|
1915 | * @usageNotes
|
1916 | * ### Example
|
1917 | *
|
1918 | * ```typescript
|
1919 | * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
1920 | * import { AppModule } from './app/app.module';
|
1921 | *
|
1922 | * platformBrowserDynamic().bootstrapModule(AppModule, {
|
1923 | * providers: [{provide: DEFAULT_CURRENCY_CODE, useValue: 'EUR' }]
|
1924 | * });
|
1925 | * ```
|
1926 | *
|
1927 | * @publicApi
|
1928 | */
|
1929 | export declare const DEFAULT_CURRENCY_CODE: InjectionToken<string>;
|
1930 |
|
1931 | /**
|
1932 | * @deprecated v4.0.0 - Should not be part of public API.
|
1933 | * @publicApi
|
1934 | */
|
1935 | export declare class DefaultIterableDiffer<V> implements IterableDiffer<V>, IterableChanges<V> {
|
1936 | readonly length: number;
|
1937 | readonly collection: V[] | Iterable<V> | null;
|
1938 | private _linkedRecords;
|
1939 | private _unlinkedRecords;
|
1940 | private _previousItHead;
|
1941 | private _itHead;
|
1942 | private _itTail;
|
1943 | private _additionsHead;
|
1944 | private _additionsTail;
|
1945 | private _movesHead;
|
1946 | private _movesTail;
|
1947 | private _removalsHead;
|
1948 | private _removalsTail;
|
1949 | private _identityChangesHead;
|
1950 | private _identityChangesTail;
|
1951 | private _trackByFn;
|
1952 | constructor(trackByFn?: TrackByFunction<V>);
|
1953 | forEachItem(fn: (record: IterableChangeRecord_<V>) => void): void;
|
1954 | forEachOperation(fn: (item: IterableChangeRecord<V>, previousIndex: number | null, currentIndex: number | null) => void): void;
|
1955 | forEachPreviousItem(fn: (record: IterableChangeRecord_<V>) => void): void;
|
1956 | forEachAddedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
|
1957 | forEachMovedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
|
1958 | forEachRemovedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
|
1959 | forEachIdentityChange(fn: (record: IterableChangeRecord_<V>) => void): void;
|
1960 | diff(collection: NgIterable<V> | null | undefined): DefaultIterableDiffer<V> | null;
|
1961 | onDestroy(): void;
|
1962 | check(collection: NgIterable<V>): boolean;
|
1963 | get isDirty(): boolean;
|
1964 | private _addToRemovals;
|
1965 | }
|
1966 |
|
1967 | /**
|
1968 | * @deprecated in v8, delete after v10. This API should be used only by generated code, and that
|
1969 | * code should now use ɵɵdefineInjectable instead.
|
1970 | * @publicApi
|
1971 | */
|
1972 | export declare const defineInjectable: typeof ɵɵdefineInjectable;
|
1973 |
|
1974 | declare interface Definition<DF extends DefinitionFactory<any>> {
|
1975 | factory: DF | null;
|
1976 | }
|
1977 |
|
1978 | /**
|
1979 | * Factory for ViewDefinitions/NgModuleDefinitions.
|
1980 | * We use a function so we can reexeute it in case an error happens and use the given logger
|
1981 | * function to log the error from the definition of the node, which is shown in all browser
|
1982 | * logs.
|
1983 | */
|
1984 | declare interface DefinitionFactory<D extends Definition<any>> {
|
1985 | (logger: NodeLogger): D;
|
1986 | }
|
1987 |
|
1988 | declare interface DepDef {
|
1989 | flags: ɵDepFlags;
|
1990 | token: any;
|
1991 | tokenKey: string;
|
1992 | }
|
1993 |
|
1994 | /**
|
1995 | * Array of destroy hooks that should be executed for a view and their directive indices.
|
1996 | *
|
1997 | * The array is set up as a series of number/function or number/(number|function)[]:
|
1998 | * - Even indices represent the context with which hooks should be called.
|
1999 | * - Odd indices are the hook functions themselves. If a value at an odd index is an array,
|
2000 | * it represents the destroy hooks of a `multi` provider where:
|
2001 | * - Even indices represent the index of the provider for which we've registered a destroy hook,
|
2002 | * inside of the `multi` provider array.
|
2003 | * - Odd indices are the destroy hook functions.
|
2004 | * For example:
|
2005 | * LView: `[0, 1, 2, AService, 4, [BService, CService, DService]]`
|
2006 | * destroyHooks: `[3, AService.ngOnDestroy, 5, [0, BService.ngOnDestroy, 2, DService.ngOnDestroy]]`
|
2007 | *
|
2008 | * In the example above `AService` is a type provider with an `ngOnDestroy`, whereas `BService`,
|
2009 | * `CService` and `DService` are part of a `multi` provider where only `BService` and `DService`
|
2010 | * have an `ngOnDestroy` hook.
|
2011 | */
|
2012 | declare type DestroyHookData = (HookEntry | HookData)[];
|
2013 |
|
2014 | /**
|
2015 | * Destroys the current Angular platform and all Angular applications on the page.
|
2016 | * Destroys all modules and listeners registered with the platform.
|
2017 | *
|
2018 | * @publicApi
|
2019 | */
|
2020 | export declare function destroyPlatform(): void;
|
2021 |
|
2022 | /**
|
2023 | * Directive decorator and metadata.
|
2024 | *
|
2025 | * @Annotation
|
2026 | * @publicApi
|
2027 | */
|
2028 | export declare interface Directive {
|
2029 | /**
|
2030 | * The CSS selector that identifies this directive in a template
|
2031 | * and triggers instantiation of the directive.
|
2032 | *
|
2033 | * Declare as one of the following:
|
2034 | *
|
2035 | * - `element-name`: Select by element name.
|
2036 | * - `.class`: Select by class name.
|
2037 | * - `[attribute]`: Select by attribute name.
|
2038 | * - `[attribute=value]`: Select by attribute name and value.
|
2039 | * - `:not(sub_selector)`: Select only if the element does not match the `sub_selector`.
|
2040 | * - `selector1, selector2`: Select if either `selector1` or `selector2` matches.
|
2041 | *
|
2042 | * Angular only allows directives to apply on CSS selectors that do not cross
|
2043 | * element boundaries.
|
2044 | *
|
2045 | * For the following template HTML, a directive with an `input[type=text]` selector,
|
2046 | * would be instantiated only on the `<input type="text">` element.
|
2047 | *
|
2048 | * ```html
|
2049 | * <form>
|
2050 | * <input type="text">
|
2051 | * <input type="radio">
|
2052 | * <form>
|
2053 | * ```
|
2054 | *
|
2055 | */
|
2056 | selector?: string;
|
2057 | /**
|
2058 | * Enumerates the set of data-bound input properties for a directive
|
2059 | *
|
2060 | * Angular automatically updates input properties during change detection.
|
2061 | * The `inputs` property defines a set of `directiveProperty` to `bindingProperty`
|
2062 | * configuration:
|
2063 | *
|
2064 | * - `directiveProperty` specifies the component property where the value is written.
|
2065 | * - `bindingProperty` specifies the DOM property where the value is read from.
|
2066 | *
|
2067 | * When `bindingProperty` is not provided, it is assumed to be equal to `directiveProperty`.
|
2068 | *
|
2069 | * @usageNotes
|
2070 | *
|
2071 | * The following example creates a component with two data-bound properties.
|
2072 | *
|
2073 | * ```typescript
|
2074 | * @Component({
|
2075 | * selector: 'bank-account',
|
2076 | * inputs: ['bankName', 'id: account-id'],
|
2077 | * template: `
|
2078 | * Bank Name: {{bankName}}
|
2079 | * Account Id: {{id}}
|
2080 | * `
|
2081 | * })
|
2082 | * class BankAccount {
|
2083 | * bankName: string;
|
2084 | * id: string;
|
2085 | * }
|
2086 | * ```
|
2087 | *
|
2088 | */
|
2089 | inputs?: string[];
|
2090 | /**
|
2091 | * Enumerates the set of event-bound output properties.
|
2092 | *
|
2093 | * When an output property emits an event, an event handler attached to that event
|
2094 | * in the template is invoked.
|
2095 | *
|
2096 | * The `outputs` property defines a set of `directiveProperty` to `bindingProperty`
|
2097 | * configuration:
|
2098 | *
|
2099 | * - `directiveProperty` specifies the component property that emits events.
|
2100 | * - `bindingProperty` specifies the DOM property the event handler is attached to.
|
2101 | *
|
2102 | * @usageNotes
|
2103 | *
|
2104 | * ```typescript
|
2105 | * @Component({
|
2106 | * selector: 'child-dir',
|
2107 | * outputs: [ 'bankNameChange' ]
|
2108 | * template: `<input (input)="bankNameChange.emit($event.target.value)" />`
|
2109 | * })
|
2110 | * class ChildDir {
|
2111 | * bankNameChange: EventEmitter<string> = new EventEmitter<string>();
|
2112 | * }
|
2113 | *
|
2114 | * @Component({
|
2115 | * selector: 'main',
|
2116 | * template: `
|
2117 | * {{ bankName }} <child-dir (bankNameChange)="onBankNameChange($event)"></child-dir>
|
2118 | * `
|
2119 | * })
|
2120 | * class MainComponent {
|
2121 | * bankName: string;
|
2122 | *
|
2123 | * onBankNameChange(bankName: string) {
|
2124 | * this.bankName = bankName;
|
2125 | * }
|
2126 | * }
|
2127 | * ```
|
2128 | *
|
2129 | */
|
2130 | outputs?: string[];
|
2131 | /**
|
2132 | * Configures the [injector](guide/glossary#injector) of this
|
2133 | * directive or component with a [token](guide/glossary#di-token)
|
2134 | * that maps to a [provider](guide/glossary#provider) of a dependency.
|
2135 | */
|
2136 | providers?: Provider[];
|
2137 | /**
|
2138 | * Defines the name that can be used in the template to assign this directive to a variable.
|
2139 | *
|
2140 | * @usageNotes
|
2141 | *
|
2142 | * ```ts
|
2143 | * @Directive({
|
2144 | * selector: 'child-dir',
|
2145 | * exportAs: 'child'
|
2146 | * })
|
2147 | * class ChildDir {
|
2148 | * }
|
2149 | *
|
2150 | * @Component({
|
2151 | * selector: 'main',
|
2152 | * template: `<child-dir #c="child"></child-dir>`
|
2153 | * })
|
2154 | * class MainComponent {
|
2155 | * }
|
2156 | * ```
|
2157 | *
|
2158 | */
|
2159 | exportAs?: string;
|
2160 | /**
|
2161 | * Configures the queries that will be injected into the directive.
|
2162 | *
|
2163 | * Content queries are set before the `ngAfterContentInit` callback is called.
|
2164 | * View queries are set before the `ngAfterViewInit` callback is called.
|
2165 | *
|
2166 | * @usageNotes
|
2167 | *
|
2168 | * The following example shows how queries are defined
|
2169 | * and when their results are available in lifecycle hooks:
|
2170 | *
|
2171 | * ```ts
|
2172 | * @Component({
|
2173 | * selector: 'someDir',
|
2174 | * queries: {
|
2175 | * contentChildren: new ContentChildren(ChildDirective),
|
2176 | * viewChildren: new ViewChildren(ChildDirective)
|
2177 | * },
|
2178 | * template: '<child-directive></child-directive>'
|
2179 | * })
|
2180 | * class SomeDir {
|
2181 | * contentChildren: QueryList<ChildDirective>,
|
2182 | * viewChildren: QueryList<ChildDirective>
|
2183 | *
|
2184 | * ngAfterContentInit() {
|
2185 | * // contentChildren is set
|
2186 | * }
|
2187 | *
|
2188 | * ngAfterViewInit() {
|
2189 | * // viewChildren is set
|
2190 | * }
|
2191 | * }
|
2192 | * ```
|
2193 | *
|
2194 | * @Annotation
|
2195 | */
|
2196 | queries?: {
|
2197 | [key: string]: any;
|
2198 | };
|
2199 | /**
|
2200 | * Maps class properties to host element bindings for properties,
|
2201 | * attributes, and events, using a set of key-value pairs.
|
2202 | *
|
2203 | * Angular automatically checks host property bindings during change detection.
|
2204 | * If a binding changes, Angular updates the directive's host element.
|
2205 | *
|
2206 | * When the key is a property of the host element, the property value is
|
2207 | * the propagated to the specified DOM property.
|
2208 | *
|
2209 | * When the key is a static attribute in the DOM, the attribute value
|
2210 | * is propagated to the specified property in the host element.
|
2211 | *
|
2212 | * For event handling:
|
2213 | * - The key is the DOM event that the directive listens to.
|
2214 | * To listen to global events, add the target to the event name.
|
2215 | * The target can be `window`, `document` or `body`.
|
2216 | * - The value is the statement to execute when the event occurs. If the
|
2217 | * statement evaluates to `false`, then `preventDefault` is applied on the DOM
|
2218 | * event. A handler method can refer to the `$event` local variable.
|
2219 | *
|
2220 | */
|
2221 | host?: {
|
2222 | [key: string]: string;
|
2223 | };
|
2224 | /**
|
2225 | * When present, this directive/component is ignored by the AOT compiler.
|
2226 | * It remains in distributed code, and the JIT compiler attempts to compile it
|
2227 | * at run time, in the browser.
|
2228 | * To ensure the correct behavior, the app must import `@angular/compiler`.
|
2229 | */
|
2230 | jit?: true;
|
2231 | }
|
2232 |
|
2233 | /**
|
2234 | * Type of the Directive metadata.
|
2235 | *
|
2236 | * @publicApi
|
2237 | */
|
2238 | export declare const Directive: DirectiveDecorator;
|
2239 |
|
2240 | /**
|
2241 | * Type of the Directive decorator / constructor function.
|
2242 | * @publicApi
|
2243 | */
|
2244 | export declare interface DirectiveDecorator {
|
2245 | /**
|
2246 | * Decorator that marks a class as an Angular directive.
|
2247 | * You can define your own directives to attach custom behavior to elements in the DOM.
|
2248 | *
|
2249 | * The options provide configuration metadata that determines
|
2250 | * how the directive should be processed, instantiated and used at
|
2251 | * runtime.
|
2252 | *
|
2253 | * Directive classes, like component classes, can implement
|
2254 | * [life-cycle hooks](guide/lifecycle-hooks) to influence their configuration and behavior.
|
2255 | *
|
2256 | *
|
2257 | * @usageNotes
|
2258 | * To define a directive, mark the class with the decorator and provide metadata.
|
2259 | *
|
2260 | * ```ts
|
2261 | * import {Directive} from '@angular/core';
|
2262 | *
|
2263 | * @Directive({
|
2264 | * selector: 'my-directive',
|
2265 | * })
|
2266 | * export class MyDirective {
|
2267 | * ...
|
2268 | * }
|
2269 | * ```
|
2270 | *
|
2271 | * ### Declaring directives
|
2272 | *
|
2273 | * Directives are [declarables](guide/glossary#declarable).
|
2274 | * They must be declared by an NgModule
|
2275 | * in order to be usable in an app.
|
2276 | *
|
2277 | * A directive must belong to exactly one NgModule. Do not re-declare
|
2278 | * a directive imported from another module.
|
2279 | * List the directive class in the `declarations` field of an NgModule.
|
2280 | *
|
2281 | * ```ts
|
2282 | * declarations: [
|
2283 | * AppComponent,
|
2284 | * MyDirective
|
2285 | * ],
|
2286 | * ```
|
2287 | *
|
2288 | * @Annotation
|
2289 | */
|
2290 | (obj?: Directive): TypeDecorator;
|
2291 | /**
|
2292 | * See the `Directive` decorator.
|
2293 | */
|
2294 | new (obj?: Directive): Directive;
|
2295 | }
|
2296 |
|
2297 | declare interface DirectiveDefFeature {
|
2298 | <T>(directiveDef: ɵDirectiveDef<T>): void;
|
2299 | /**
|
2300 | * Marks a feature as something that {@link InheritDefinitionFeature} will execute
|
2301 | * during inheritance.
|
2302 | *
|
2303 | * NOTE: DO NOT SET IN ROOT OF MODULE! Doing so will result in tree-shakers/bundlers
|
2304 | * identifying the change as a side effect, and the feature will be included in
|
2305 | * every bundle.
|
2306 | */
|
2307 | ngInherit?: true;
|
2308 | }
|
2309 |
|
2310 | declare type DirectiveDefList = (ɵDirectiveDef<any> | ɵComponentDef<any>)[];
|
2311 |
|
2312 | /**
|
2313 | * Type used for directiveDefs on component definition.
|
2314 | *
|
2315 | * The function is necessary to be able to support forward declarations.
|
2316 | */
|
2317 | declare type DirectiveDefListOrFactory = (() => DirectiveDefList) | DirectiveDefList;
|
2318 |
|
2319 | declare type DirectiveInstance = {};
|
2320 |
|
2321 | declare type DirectiveTypeList = (ɵDirectiveType<any> | ɵComponentType<any> | Type<any>)[];
|
2322 |
|
2323 | declare type DirectiveTypesOrFactory = (() => DirectiveTypeList) | DirectiveTypeList;
|
2324 |
|
2325 | declare interface DisposableFn {
|
2326 | (): void;
|
2327 | }
|
2328 |
|
2329 | /**
|
2330 | * @description
|
2331 | * Hook for manual bootstrapping of the application instead of using `bootstrap` array in @NgModule
|
2332 | * annotation. This hook is invoked only when the `bootstrap` array is empty or not provided.
|
2333 | *
|
2334 | * Reference to the current application is provided as a parameter.
|
2335 | *
|
2336 | * See ["Bootstrapping"](guide/bootstrapping) and ["Entry components"](guide/entry-components).
|
2337 | *
|
2338 | * @usageNotes
|
2339 | * The example below uses `ApplicationRef.bootstrap()` to render the
|
2340 | * `AppComponent` on the page.
|
2341 | *
|
2342 | * ```typescript
|
2343 | * class AppModule implements DoBootstrap {
|
2344 | * ngDoBootstrap(appRef: ApplicationRef) {
|
2345 | * appRef.bootstrap(AppComponent); // Or some other component
|
2346 | * }
|
2347 | * }
|
2348 | * ```
|
2349 | *
|
2350 | * @publicApi
|
2351 | */
|
2352 | export declare interface DoBootstrap {
|
2353 | ngDoBootstrap(appRef: ApplicationRef): void;
|
2354 | }
|
2355 |
|
2356 | /**
|
2357 | * A lifecycle hook that invokes a custom change-detection function for a directive,
|
2358 | * in addition to the check performed by the default change-detector.
|
2359 | *
|
2360 | * The default change-detection algorithm looks for differences by comparing
|
2361 | * bound-property values by reference across change detection runs. You can use this
|
2362 | * hook to check for and respond to changes by some other means.
|
2363 | *
|
2364 | * When the default change detector detects changes, it invokes `ngOnChanges()` if supplied,
|
2365 | * regardless of whether you perform additional change detection.
|
2366 | * Typically, you should not use both `DoCheck` and `OnChanges` to respond to
|
2367 | * changes on the same input.
|
2368 | *
|
2369 | * @see `OnChanges`
|
2370 | * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
|
2371 | *
|
2372 | * @usageNotes
|
2373 | * The following snippet shows how a component can implement this interface
|
2374 | * to invoke it own change-detection cycle.
|
2375 | *
|
2376 | * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='DoCheck'}
|
2377 | *
|
2378 | * For a more complete example and discussion, see
|
2379 | * [Defining custom change detection](guide/lifecycle-hooks#defining-custom-change-detection).
|
2380 | *
|
2381 | * @publicApi
|
2382 | */
|
2383 | export declare interface DoCheck {
|
2384 | /**
|
2385 | * A callback method that performs change-detection, invoked
|
2386 | * after the default change-detector runs.
|
2387 | * See `KeyValueDiffers` and `IterableDiffers` for implementing
|
2388 | * custom change checking for collections.
|
2389 | *
|
2390 | */
|
2391 | ngDoCheck(): void;
|
2392 | }
|
2393 |
|
2394 | /**
|
2395 | * Marks that the next string is an element name.
|
2396 | *
|
2397 | * See `I18nMutateOpCodes` documentation.
|
2398 | */
|
2399 | declare const ELEMENT_MARKER: ELEMENT_MARKER;
|
2400 |
|
2401 | declare interface ELEMENT_MARKER {
|
2402 | marker: 'element';
|
2403 | }
|
2404 |
|
2405 | declare interface ElementDef {
|
2406 | name: string | null;
|
2407 | ns: string | null;
|
2408 | /** ns, name, value */
|
2409 | attrs: [string, string, string][] | null;
|
2410 | template: ɵViewDefinition | null;
|
2411 | componentProvider: NodeDef | null;
|
2412 | componentRendererType: RendererType2 | null;
|
2413 | componentView: ViewDefinitionFactory | null;
|
2414 | /**
|
2415 | * visible public providers for DI in the view,
|
2416 | * as see from this element. This does not include private providers.
|
2417 | */
|
2418 | publicProviders: {
|
2419 | [tokenKey: string]: NodeDef;
|
2420 | } | null;
|
2421 | /**
|
2422 | * same as visiblePublicProviders, but also includes private providers
|
2423 | * that are located on this element.
|
2424 | */
|
2425 | allProviders: {
|
2426 | [tokenKey: string]: NodeDef;
|
2427 | } | null;
|
2428 | handleEvent: ElementHandleEventFn | null;
|
2429 | }
|
2430 |
|
2431 | declare interface ElementHandleEventFn {
|
2432 | (view: ViewData, eventName: string, event: any): boolean;
|
2433 | }
|
2434 |
|
2435 | /**
|
2436 | * A wrapper around a native element inside of a View.
|
2437 | *
|
2438 | * An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM
|
2439 | * element.
|
2440 | *
|
2441 | * @security Permitting direct access to the DOM can make your application more vulnerable to
|
2442 | * XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the
|
2443 | * [Security Guide](https://g.co/ng/security).
|
2444 | *
|
2445 | * @publicApi
|
2446 | */
|
2447 | export declare class ElementRef<T = any> {
|
2448 | /**
|
2449 | * The underlying native element or `null` if direct access to native elements is not supported
|
2450 | * (e.g. when the application runs in a web worker).
|
2451 | *
|
2452 | * <div class="callout is-critical">
|
2453 | * <header>Use with caution</header>
|
2454 | * <p>
|
2455 | * Use this API as the last resort when direct access to DOM is needed. Use templating and
|
2456 | * data-binding provided by Angular instead. Alternatively you can take a look at {@link
|
2457 | * Renderer2}
|
2458 | * which provides API that can safely be used even when direct access to native elements is not
|
2459 | * supported.
|
2460 | * </p>
|
2461 | * <p>
|
2462 | * Relying on direct DOM access creates tight coupling between your application and rendering
|
2463 | * layers which will make it impossible to separate the two and deploy your application into a
|
2464 | * web worker.
|
2465 | * </p>
|
2466 | * </div>
|
2467 | *
|
2468 | */
|
2469 | nativeElement: T;
|
2470 | constructor(nativeElement: T);
|
2471 | }
|
2472 |
|
2473 | /**
|
2474 | * Represents an Angular [view](guide/glossary#view) in a view container.
|
2475 | * An [embedded view](guide/glossary#view-tree) can be referenced from a component
|
2476 | * other than the hosting component whose template defines it, or it can be defined
|
2477 | * independently by a `TemplateRef`.
|
2478 | *
|
2479 | * Properties of elements in a view can change, but the structure (number and order) of elements in
|
2480 | * a view cannot. Change the structure of elements by inserting, moving, or
|
2481 | * removing nested views in a view container.
|
2482 | *
|
2483 | * @see `ViewContainerRef`
|
2484 | *
|
2485 | * @usageNotes
|
2486 | *
|
2487 | * The following template breaks down into two separate `TemplateRef` instances,
|
2488 | * an outer one and an inner one.
|
2489 | *
|
2490 | * ```
|
2491 | * Count: {{items.length}}
|
2492 | * <ul>
|
2493 | * <li *ngFor="let item of items">{{item}}</li>
|
2494 | * </ul>
|
2495 | * ```
|
2496 | *
|
2497 | * This is the outer `TemplateRef`:
|
2498 | *
|
2499 | * ```
|
2500 | * Count: {{items.length}}
|
2501 | * <ul>
|
2502 | * <ng-template ngFor let-item [ngForOf]="items"></ng-template>
|
2503 | * </ul>
|
2504 | * ```
|
2505 | *
|
2506 | * This is the inner `TemplateRef`:
|
2507 | *
|
2508 | * ```
|
2509 | * <li>{{item}}</li>
|
2510 | * ```
|
2511 | *
|
2512 | * The outer and inner `TemplateRef` instances are assembled into views as follows:
|
2513 | *
|
2514 | * ```
|
2515 | * <!-- ViewRef: outer-0 -->
|
2516 | * Count: 2
|
2517 | * <ul>
|
2518 | * <ng-template view-container-ref></ng-template>
|
2519 | * <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->
|
2520 | * <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->
|
2521 | * </ul>
|
2522 | * <!-- /ViewRef: outer-0 -->
|
2523 | * ```
|
2524 | * @publicApi
|
2525 | */
|
2526 | export declare abstract class EmbeddedViewRef<C> extends ViewRef {
|
2527 | /**
|
2528 | * The context for this view, inherited from the anchor element.
|
2529 | */
|
2530 | abstract context: C;
|
2531 | /**
|
2532 | * The root nodes for this embedded view.
|
2533 | */
|
2534 | abstract get rootNodes(): any[];
|
2535 | }
|
2536 |
|
2537 | /**
|
2538 | * Disable Angular's development mode, which turns off assertions and other
|
2539 | * checks within the framework.
|
2540 | *
|
2541 | * One important assertion this disables verifies that a change detection pass
|
2542 | * does not result in additional changes to any bindings (also known as
|
2543 | * unidirectional data flow).
|
2544 | *
|
2545 | * @publicApi
|
2546 | */
|
2547 | export declare function enableProdMode(): void;
|
2548 |
|
2549 |
|
2550 | /**
|
2551 | * Provides a hook for centralized exception handling.
|
2552 | *
|
2553 | * The default implementation of `ErrorHandler` prints error messages to the `console`. To
|
2554 | * intercept error handling, write a custom exception handler that replaces this default as
|
2555 | * appropriate for your app.
|
2556 | *
|
2557 | * @usageNotes
|
2558 | * ### Example
|
2559 | *
|
2560 | * ```
|
2561 | * class MyErrorHandler implements ErrorHandler {
|
2562 | * handleError(error) {
|
2563 | * // do something with the exception
|
2564 | * }
|
2565 | * }
|
2566 | *
|
2567 | * @NgModule({
|
2568 | * providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]
|
2569 | * })
|
2570 | * class MyModule {}
|
2571 | * ```
|
2572 | *
|
2573 | * @publicApi
|
2574 | */
|
2575 | export declare class ErrorHandler {
|
2576 | handleError(error: any): void;
|
2577 | }
|
2578 |
|
2579 | /**
|
2580 | * Use in components with the `@Output` directive to emit custom events
|
2581 | * synchronously or asynchronously, and register handlers for those events
|
2582 | * by subscribing to an instance.
|
2583 | *
|
2584 | * @usageNotes
|
2585 | *
|
2586 | * Extends
|
2587 | * [RxJS `Subject`](https://rxjs.dev/api/index/class/Subject)
|
2588 | * for Angular by adding the `emit()` method.
|
2589 | *
|
2590 | * In the following example, a component defines two output properties
|
2591 | * that create event emitters. When the title is clicked, the emitter
|
2592 | * emits an open or close event to toggle the current visibility state.
|
2593 | *
|
2594 | * ```html
|
2595 | * @Component({
|
2596 | * selector: 'zippy',
|
2597 | * template: `
|
2598 | * <div class="zippy">
|
2599 | * <div (click)="toggle()">Toggle</div>
|
2600 | * <div [hidden]="!visible">
|
2601 | * <ng-content></ng-content>
|
2602 | * </div>
|
2603 | * </div>`})
|
2604 | * export class Zippy {
|
2605 | * visible: boolean = true;
|
2606 | * @Output() open: EventEmitter<any> = new EventEmitter();
|
2607 | * @Output() close: EventEmitter<any> = new EventEmitter();
|
2608 | *
|
2609 | * toggle() {
|
2610 | * this.visible = !this.visible;
|
2611 | * if (this.visible) {
|
2612 | * this.open.emit(null);
|
2613 | * } else {
|
2614 | * this.close.emit(null);
|
2615 | * }
|
2616 | * }
|
2617 | * }
|
2618 | * ```
|
2619 | *
|
2620 | * Access the event object with the `$event` argument passed to the output event
|
2621 | * handler:
|
2622 | *
|
2623 | * ```html
|
2624 | * <zippy (open)="onOpen($event)" (close)="onClose($event)"></zippy>
|
2625 | * ```
|
2626 | *
|
2627 | * @see [Observables in Angular](guide/observables-in-angular)
|
2628 | * @publicApi
|
2629 | */
|
2630 | export declare interface EventEmitter<T> extends Subject<T> {
|
2631 | /**
|
2632 | * Creates an instance of this class that can
|
2633 | * deliver events synchronously or asynchronously.
|
2634 | *
|
2635 | * @param [isAsync=false] When true, deliver events asynchronously.
|
2636 | *
|
2637 | */
|
2638 | new (isAsync?: boolean): EventEmitter<T>;
|
2639 | /**
|
2640 | * Emits an event containing a given value.
|
2641 | * @param value The value to emit.
|
2642 | */
|
2643 | emit(value?: T): void;
|
2644 | /**
|
2645 | * Registers handlers for events emitted by this instance.
|
2646 | * @param next When supplied, a custom handler for emitted events.
|
2647 | * @param error When supplied, a custom handler for an error notification from this emitter.
|
2648 | * @param complete When supplied, a custom handler for a completion notification from this
|
2649 | * emitter.
|
2650 | */
|
2651 | subscribe(next?: (value: T) => void, error?: (error: any) => void, complete?: () => void): Subscription;
|
2652 | /**
|
2653 | * Registers handlers for events emitted by this instance.
|
2654 | * @param observerOrNext When supplied, a custom handler for emitted events, or an observer
|
2655 | * object.
|
2656 | * @param error When supplied, a custom handler for an error notification from this emitter.
|
2657 | * @param complete When supplied, a custom handler for a completion notification from this
|
2658 | * emitter.
|
2659 | */
|
2660 | subscribe(observerOrNext?: any, error?: any, complete?: any): Subscription;
|
2661 | }
|
2662 |
|
2663 | /**
|
2664 | * @publicApi
|
2665 | */
|
2666 | export declare const EventEmitter: {
|
2667 | new (isAsync?: boolean): EventEmitter<any>;
|
2668 | new <T>(isAsync?: boolean): EventEmitter<T>;
|
2669 | readonly prototype: EventEmitter<any>;
|
2670 | };
|
2671 |
|
2672 | /**
|
2673 | * Configures the `Injector` to return a value of another `useExisting` token.
|
2674 | *
|
2675 | * @see ["Dependency Injection Guide"](guide/dependency-injection).
|
2676 | *
|
2677 | * @usageNotes
|
2678 | *
|
2679 | * {@example core/di/ts/provider_spec.ts region='ExistingProvider'}
|
2680 | *
|
2681 | * ### Multi-value example
|
2682 | *
|
2683 | * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
2684 | *
|
2685 | * @publicApi
|
2686 | */
|
2687 | export declare interface ExistingProvider extends ExistingSansProvider {
|
2688 | /**
|
2689 | * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
|
2690 | */
|
2691 | provide: any;
|
2692 | /**
|
2693 | * When true, injector returns an array of instances. This is useful to allow multiple
|
2694 | * providers spread across many files to provide configuration information to a common token.
|
2695 | */
|
2696 | multi?: boolean;
|
2697 | }
|
2698 |
|
2699 | /**
|
2700 | * Configures the `Injector` to return a value of another `useExisting` token.
|
2701 | *
|
2702 | * @see `ExistingProvider`
|
2703 | * @see ["Dependency Injection Guide"](guide/dependency-injection).
|
2704 | *
|
2705 | * @publicApi
|
2706 | */
|
2707 | export declare interface ExistingSansProvider {
|
2708 | /**
|
2709 | * Existing `token` to return. (Equivalent to `injector.get(useExisting)`)
|
2710 | */
|
2711 | useExisting: any;
|
2712 | }
|
2713 |
|
2714 | /**
|
2715 | * Definition of what a factory function should look like.
|
2716 | */
|
2717 | declare type FactoryFn<T> = {
|
2718 | /**
|
2719 | * Subclasses without an explicit constructor call through to the factory of their base
|
2720 | * definition, providing it with their own constructor to instantiate.
|
2721 | */
|
2722 | <U extends T>(t?: Type<U>): U;
|
2723 | /**
|
2724 | * If no constructor to instantiate is provided, an instance of type T itself is created.
|
2725 | */
|
2726 | (t?: undefined): T;
|
2727 | };
|
2728 |
|
2729 | /**
|
2730 | * Configures the `Injector` to return a value by invoking a `useFactory` function.
|
2731 | * @see ["Dependency Injection Guide"](guide/dependency-injection).
|
2732 | *
|
2733 | * @usageNotes
|
2734 | *
|
2735 | * {@example core/di/ts/provider_spec.ts region='FactoryProvider'}
|
2736 | *
|
2737 | * Dependencies can also be marked as optional:
|
2738 | *
|
2739 | * {@example core/di/ts/provider_spec.ts region='FactoryProviderOptionalDeps'}
|
2740 | *
|
2741 | * ### Multi-value example
|
2742 | *
|
2743 | * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
2744 | *
|
2745 | * @publicApi
|
2746 | */
|
2747 | export declare interface FactoryProvider extends FactorySansProvider {
|
2748 | /**
|
2749 | * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).
|
2750 | */
|
2751 | provide: any;
|
2752 | /**
|
2753 | * When true, injector returns an array of instances. This is useful to allow multiple
|
2754 | * providers spread across many files to provide configuration information to a common token.
|
2755 | */
|
2756 | multi?: boolean;
|
2757 | }
|
2758 |
|
2759 | /**
|
2760 | * Configures the `Injector` to return a value by invoking a `useFactory` function.
|
2761 | *
|
2762 | * @see `FactoryProvider`
|
2763 | * @see ["Dependency Injection Guide"](guide/dependency-injection).
|
2764 | *
|
2765 | * @publicApi
|
2766 | */
|
2767 | export declare interface FactorySansProvider {
|
2768 | /**
|
2769 | * A function to invoke to create a value for this `token`. The function is invoked with
|
2770 | * resolved values of `token`s in the `deps` field.
|
2771 | */
|
2772 | useFactory: Function;
|
2773 | /**
|
2774 | * A list of `token`s to be resolved by the injector. The list of values is then
|
2775 | * used as arguments to the `useFactory` function.
|
2776 | */
|
2777 | deps?: any[];
|
2778 | }
|
2779 |
|
2780 | declare const FLAGS = 2;
|
2781 |
|
2782 | /**
|
2783 | * Allows to refer to references which are not yet defined.
|
2784 | *
|
2785 | * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of
|
2786 | * DI is declared, but not yet defined. It is also used when the `token` which we use when creating
|
2787 | * a query is not yet defined.
|
2788 | *
|
2789 | * @usageNotes
|
2790 | * ### Example
|
2791 | * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}
|
2792 | * @publicApi
|
2793 | */
|
2794 | export declare function forwardRef(forwardRefFn: ForwardRefFn): Type<any>;
|
2795 |
|
2796 | /**
|
2797 | * An interface that a function passed into {@link forwardRef} has to implement.
|
2798 | *
|
2799 | * @usageNotes
|
2800 | * ### Example
|
2801 | *
|
2802 | * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref_fn'}
|
2803 | * @publicApi
|
2804 | */
|
2805 | export declare interface ForwardRefFn {
|
2806 | (): any;
|
2807 | }
|
2808 |
|
2809 | /**
|
2810 | * @publicApi
|
2811 | */
|
2812 | export declare const getDebugNode: (nativeNode: any) => DebugNode | null;
|
2813 |
|
2814 | /**
|
2815 | * Returns the NgModuleFactory with the given id, if it exists and has been loaded.
|
2816 | * Factories for modules that do not specify an `id` cannot be retrieved. Throws if the module
|
2817 | * cannot be found.
|
2818 | * @publicApi
|
2819 | */
|
2820 | export declare const getModuleFactory: (id: string) => NgModuleFactory<any>;
|
2821 |
|
2822 | /**
|
2823 | * Returns the current platform.
|
2824 | *
|
2825 | * @publicApi
|
2826 | */
|
2827 | export declare function getPlatform(): PlatformRef | null;
|
2828 |
|
2829 | /**
|
2830 | * Adapter interface for retrieving the `Testability` service associated for a
|
2831 | * particular context.
|
2832 | *
|
2833 | * @publicApi
|
2834 | */
|
2835 | export declare interface GetTestability {
|
2836 | addToWindow(registry: TestabilityRegistry): void;
|
2837 | findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean): Testability | null;
|
2838 | }
|
2839 |
|
2840 | declare type GlobalTargetName = 'document' | 'window' | 'body';
|
2841 |
|
2842 | declare type GlobalTargetResolver = (element: any) => EventTarget;
|
2843 |
|
2844 | /**
|
2845 | * Flag to signify that this `LContainer` may have transplanted views which need to be change
|
2846 | * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.
|
2847 | *
|
2848 | * This flag, once set, is never unset for the `LContainer`. This means that when unset we can skip
|
2849 | * a lot of work in `refreshEmbeddedViews`. But when set we still need to verify
|
2850 | * that the `MOVED_VIEWS` are transplanted and on-push.
|
2851 | */
|
2852 | declare const HAS_TRANSPLANTED_VIEWS = 2;
|
2853 |
|
2854 | /**
|
2855 | * Array of hooks that should be executed for a view and their directive indices.
|
2856 | *
|
2857 | * For each node of the view, the following data is stored:
|
2858 | * 1) Node index (optional)
|
2859 | * 2) A series of number/function pairs where:
|
2860 | * - even indices are directive indices
|
2861 | * - odd indices are hook functions
|
2862 | *
|
2863 | * Special cases:
|
2864 | * - a negative directive index flags an init hook (ngOnInit, ngAfterContentInit, ngAfterViewInit)
|
2865 | */
|
2866 | declare type HookData = HookEntry[];
|
2867 |
|
2868 | /**
|
2869 | * Information necessary to call a hook. E.g. the callback that
|
2870 | * needs to invoked and the index at which to find its context.
|
2871 | */
|
2872 | declare type HookEntry = number | HookFn;
|
2873 |
|
2874 | /** Single hook callback function. */
|
2875 | declare type HookFn = () => void;
|
2876 |
|
2877 | declare const HOST = 0;
|
2878 |
|
2879 | /**
|
2880 | * Type of the Host metadata.
|
2881 | *
|
2882 | * @publicApi
|
2883 | */
|
2884 | export declare interface Host {
|
2885 | }
|
2886 |
|
2887 | /**
|
2888 | * Host decorator and metadata.
|
2889 | *
|
2890 | * @Annotation
|
2891 | * @publicApi
|
2892 | */
|
2893 | export declare const Host: HostDecorator;
|
2894 |
|
2895 | /**
|
2896 | * Type of the HostBinding metadata.
|
2897 | *
|
2898 | * @publicApi
|
2899 | */
|
2900 | export declare interface HostBinding {
|
2901 | /**
|
2902 | * The DOM property that is bound to a data property.
|
2903 | */
|
2904 | hostPropertyName?: string;
|
2905 | }
|
2906 |
|
2907 | /**
|
2908 | * @Annotation
|
2909 | * @publicApi
|
2910 | */
|
2911 | export declare const HostBinding: HostBindingDecorator;
|
2912 |
|
2913 | /**
|
2914 | * Type of the HostBinding decorator / constructor function.
|
2915 | *
|
2916 | * @publicApi
|
2917 | */
|
2918 | export declare interface HostBindingDecorator {
|
2919 | /**
|
2920 | * Decorator that marks a DOM property as a host-binding property and supplies configuration
|
2921 | * metadata.
|
2922 | * Angular automatically checks host property bindings during change detection, and
|
2923 | * if a binding changes it updates the host element of the directive.
|
2924 | *
|
2925 | * @usageNotes
|
2926 | *
|
2927 | * The following example creates a directive that sets the `valid` and `invalid`
|
2928 | * properties on the DOM element that has an `ngModel` directive on it.
|
2929 | *
|
2930 | * ```typescript
|
2931 | * @Directive({selector: '[ngModel]'})
|
2932 | * class NgModelStatus {
|
2933 | * constructor(public control: NgModel) {}
|
2934 | * @HostBinding('class.valid') get valid() { return this.control.valid; }
|
2935 | * @HostBinding('class.invalid') get invalid() { return this.control.invalid; }
|
2936 | * }
|
2937 | *
|
2938 | * @Component({
|
2939 | * selector: 'app',
|
2940 | * template: `<input [(ngModel)]="prop">`,
|
2941 | * })
|
2942 | * class App {
|
2943 | * prop;
|
2944 | * }
|
2945 | * ```
|
2946 | *
|
2947 | */
|
2948 | (hostPropertyName?: string): any;
|
2949 | new (hostPropertyName?: string): any;
|
2950 | }
|
2951 |
|
2952 | /**
|
2953 | * Stores a set of OpCodes to process `HostBindingsFunction` associated with a current view.
|
2954 | *
|
2955 | * In order to invoke `HostBindingsFunction` we need:
|
2956 | * 1. 'elementIdx`: Index to the element associated with the `HostBindingsFunction`.
|
2957 | * 2. 'directiveIdx`: Index to the directive associated with the `HostBindingsFunction`. (This will
|
2958 | * become the context for the `HostBindingsFunction` invocation.)
|
2959 | * 3. `bindingRootIdx`: Location where the bindings for the `HostBindingsFunction` start. Internally
|
2960 | * `HostBindingsFunction` binding indexes start from `0` so we need to add `bindingRootIdx` to
|
2961 | * it.
|
2962 | * 4. `HostBindingsFunction`: A host binding function to execute.
|
2963 | *
|
2964 | * The above information needs to be encoded into the `HostBindingOpCodes` in an efficient manner.
|
2965 | *
|
2966 | * 1. `elementIdx` is encoded into the `HostBindingOpCodes` as `~elementIdx` (so a negative number);
|
2967 | * 2. `directiveIdx`
|
2968 | * 3. `bindingRootIdx`
|
2969 | * 4. `HostBindingsFunction` is passed in as is.
|
2970 | *
|
2971 | * The `HostBindingOpCodes` array contains:
|
2972 | * - negative number to select the element index.
|
2973 | * - followed by 1 or more of:
|
2974 | * - a number to select the directive index
|
2975 | * - a number to select the bindingRoot index
|
2976 | * - and a function to invoke.
|
2977 | *
|
2978 | * ## Example
|
2979 | *
|
2980 | * ```
|
2981 | * const hostBindingOpCodes = [
|
2982 | * ~30, // Select element 30
|
2983 | * 40, 45, MyDir.ɵdir.hostBindings // Invoke host bindings on MyDir on element 30;
|
2984 | * // directiveIdx = 40; bindingRootIdx = 45;
|
2985 | * 50, 55, OtherDir.ɵdir.hostBindings // Invoke host bindings on OtherDire on element 30
|
2986 | * // directiveIdx = 50; bindingRootIdx = 55;
|
2987 | * ]
|
2988 | * ```
|
2989 | *
|
2990 | * ## Pseudocode
|
2991 | * ```
|
2992 | * const hostBindingOpCodes = tView.hostBindingOpCodes;
|
2993 | * if (hostBindingOpCodes === null) return;
|
2994 | * for (let i = 0; i < hostBindingOpCodes.length; i++) {
|
2995 | * const opCode = hostBindingOpCodes[i] as number;
|
2996 | * if (opCode < 0) {
|
2997 | * // Negative numbers are element indexes.
|
2998 | * setSelectedIndex(~opCode);
|
2999 | * } else {
|
3000 | * // Positive numbers are NumberTuple which store bindingRootIndex and directiveIndex.
|
3001 | * const directiveIdx = opCode;
|
3002 | * const bindingRootIndx = hostBindingOpCodes[++i] as number;
|
3003 | * const hostBindingFn = hostBindingOpCodes[++i] as HostBindingsFunction<any>;
|
3004 | * setBindingRootForHostBindings(bindingRootIndx, directiveIdx);
|
3005 | * const context = lView[directiveIdx];
|
3006 | * hostBindingFn(RenderFlags.Update, context);
|
3007 | * }
|
3008 | * }
|
3009 | * ```
|
3010 | *
|
3011 | */
|
3012 | declare interface HostBindingOpCodes extends Array<number | HostBindingsFunction<any>> {
|
3013 | __brand__: 'HostBindingOpCodes';
|
3014 | debug?: string[];
|
3015 | }
|
3016 |
|
3017 | declare type HostBindingsFunction<T> = <U extends T>(rf: ɵRenderFlags, ctx: U) => void;
|
3018 |
|
3019 | /**
|
3020 | * Type of the `Host` decorator / constructor function.
|
3021 | *
|
3022 | * @publicApi
|
3023 | */
|
3024 | export declare interface HostDecorator {
|
3025 | /**
|
3026 | * Parameter decorator on a view-provider parameter of a class constructor
|
3027 | * that tells the DI framework to resolve the view by checking injectors of child
|
3028 | * elements, and stop when reaching the host element of the current component.
|
3029 | *
|
3030 | * @usageNotes
|
3031 | *
|
3032 | * The following shows use with the `@Optional` decorator, and allows for a `null` result.
|
3033 | *
|
3034 | * <code-example path="core/di/ts/metadata_spec.ts" region="Host">
|
3035 | * </code-example>
|
3036 | *
|
3037 | * For an extended example, see ["Dependency Injection
|
3038 | * Guide"](guide/dependency-injection-in-action#optional).
|
3039 | */
|
3040 | (): any;
|
3041 | new (): Host;
|
3042 | }
|
3043 |
|
3044 | /** See CreateComponentOptions.hostFeatures */
|
3045 | declare type HostFeature = (<T>(component: T, componentDef: ɵComponentDef<T>) => void);
|
3046 |
|
3047 | /**
|
3048 | * Type of the HostListener metadata.
|
3049 | *
|
3050 | * @publicApi
|
3051 | */
|
3052 | export declare interface HostListener {
|
3053 | /**
|
3054 | * The DOM event to listen for.
|
3055 | */
|
3056 | eventName?: string;
|
3057 | /**
|
3058 | * A set of arguments to pass to the handler method when the event occurs.
|
3059 | */
|
3060 | args?: string[];
|
3061 | }
|
3062 |
|
3063 | /**
|
3064 | * Decorator that binds a DOM event to a host listener and supplies configuration metadata.
|
3065 | * Angular invokes the supplied handler method when the host element emits the specified event,
|
3066 | * and updates the bound element with the result.
|
3067 | *
|
3068 | * If the handler method returns false, applies `preventDefault` on the bound element.
|
3069 | *
|
3070 | * @usageNotes
|
3071 | *
|
3072 | * The following example declares a directive
|
3073 | * that attaches a click listener to a button and counts clicks.
|
3074 | *
|
3075 | * ```ts
|
3076 | * @Directive({selector: 'button[counting]'})
|
3077 | * class CountClicks {
|
3078 | * numberOfClicks = 0;
|
3079 | *
|
3080 | * @HostListener('click', ['$event.target'])
|
3081 | * onClick(btn) {
|
3082 | * console.log('button', btn, 'number of clicks:', this.numberOfClicks++);
|
3083 | * }
|
3084 | * }
|
3085 | *
|
3086 | * @Component({
|
3087 | * selector: 'app',
|
3088 | * template: '<button counting>Increment</button>',
|
3089 | * })
|
3090 | * class App {}
|
3091 | *
|
3092 | * ```
|
3093 | *
|
3094 | * The following example registers another DOM event handler that listens for key-press events.
|
3095 | * ``` ts
|
3096 | * import { HostListener, Component } from "@angular/core";
|
3097 | *
|
3098 | * @Component({
|
3099 | * selector: 'app',
|
3100 | * template: `<h1>Hello, you have pressed keys {{counter}} number of times!</h1> Press any key to
|
3101 | * increment the counter.
|
3102 | * <button (click)="resetCounter()">Reset Counter</button>`
|
3103 | * })
|
3104 | * class AppComponent {
|
3105 | * counter = 0;
|
3106 | * @HostListener('window:keydown', ['$event'])
|
3107 | * handleKeyDown(event: KeyboardEvent) {
|
3108 | * this.counter++;
|
3109 | * }
|
3110 | * resetCounter() {
|
3111 | * this.counter = 0;
|
3112 | * }
|
3113 | * }
|
3114 | * ```
|
3115 | *
|
3116 | * @Annotation
|
3117 | * @publicApi
|
3118 | */
|
3119 | export declare const HostListener: HostListenerDecorator;
|
3120 |
|
3121 | /**
|
3122 | * Type of the HostListener decorator / constructor function.
|
3123 | *
|
3124 | * @publicApi
|
3125 | */
|
3126 | export declare interface HostListenerDecorator {
|
3127 | /**
|
3128 | * Decorator that declares a DOM event to listen for,
|
3129 | * and provides a handler method to run when that event occurs.
|
3130 | *
|
3131 | * Angular invokes the supplied handler method when the host element emits the specified event,
|
3132 | * and updates the bound element with the result.
|
3133 | *
|
3134 | * If the handler method returns false, applies `preventDefault` on the bound element.
|
3135 | */
|
3136 | (eventName: string, args?: string[]): any;
|
3137 | new (eventName: string, args?: string[]): any;
|
3138 | }
|
3139 |
|
3140 | /**
|
3141 | * Array storing OpCode for dynamically creating `i18n` translation DOM elements.
|
3142 | *
|
3143 | * This array creates a sequence of `Text` and `Comment` (as ICU anchor) DOM elements. It consists
|
3144 | * of a pair of `number` and `string` pairs which encode the operations for the creation of the
|
3145 | * translated block.
|
3146 | *
|
3147 | * The number is shifted and encoded according to `I18nCreateOpCode`
|
3148 | *
|
3149 | * Pseudocode:
|
3150 | * ```
|
3151 | * const i18nCreateOpCodes = [
|
3152 | * 10 << I18nCreateOpCode.SHIFT, "Text Node add to DOM",
|
3153 | * 11 << I18nCreateOpCode.SHIFT | I18nCreateOpCode.COMMENT, "Comment Node add to DOM",
|
3154 | * 12 << I18nCreateOpCode.SHIFT | I18nCreateOpCode.APPEND_LATER, "Text Node added later"
|
3155 | * ];
|
3156 | *
|
3157 | * for(var i=0; i<i18nCreateOpCodes.length; i++) {
|
3158 | * const opcode = i18NCreateOpCodes[i++];
|
3159 | * const index = opcode >> I18nCreateOpCode.SHIFT;
|
3160 | * const text = i18NCreateOpCodes[i];
|
3161 | * let node: Text|Comment;
|
3162 | * if (opcode & I18nCreateOpCode.COMMENT === I18nCreateOpCode.COMMENT) {
|
3163 | * node = lView[~index] = document.createComment(text);
|
3164 | * } else {
|
3165 | * node = lView[index] = document.createText(text);
|
3166 | * }
|
3167 | * if (opcode & I18nCreateOpCode.APPEND_EAGERLY !== I18nCreateOpCode.APPEND_EAGERLY) {
|
3168 | * parentNode.appendChild(node);
|
3169 | * }
|
3170 | * }
|
3171 | * ```
|
3172 | */
|
3173 | declare interface I18nCreateOpCodes extends Array<number | string>, I18nDebug {
|
3174 | __brand__: 'I18nCreateOpCodes';
|
3175 | }
|
3176 |
|
3177 | declare interface I18nDebug {
|
3178 | /**
|
3179 | * Human readable representation of the OpCode arrays.
|
3180 | *
|
3181 | * NOTE: This property only exists if `ngDevMode` is set to `true` and it is not present in
|
3182 | * production. Its presence is purely to help debug issue in development, and should not be relied
|
3183 | * on in production application.
|
3184 | */
|
3185 | debug?: string[];
|
3186 | }
|
3187 |
|
3188 | /**
|
3189 | * Stores a list of nodes which need to be removed.
|
3190 | *
|
3191 | * Numbers are indexes into the `LView`
|
3192 | * - index > 0: `removeRNode(lView[0])`
|
3193 | * - index < 0: `removeICU(~lView[0])`
|
3194 | */
|
3195 | declare interface I18nRemoveOpCodes extends Array<number> {
|
3196 | __brand__: 'I18nRemoveOpCodes';
|
3197 | }
|
3198 |
|
3199 | /**
|
3200 | * Stores DOM operations which need to be applied to update DOM render tree due to changes in
|
3201 | * expressions.
|
3202 | *
|
3203 | * The basic idea is that `i18nExp` OpCodes capture expression changes and update a change
|
3204 | * mask bit. (Bit 1 for expression 1, bit 2 for expression 2 etc..., bit 32 for expression 32 and
|
3205 | * higher.) The OpCodes then compare its own change mask against the expression change mask to
|
3206 | * determine if the OpCodes should execute.
|
3207 | *
|
3208 | * NOTE: 32nd bit is special as it says 32nd or higher. This way if we have more than 32 bindings
|
3209 | * the code still works, but with lower efficiency. (it is unlikely that a translation would have
|
3210 | * more than 32 bindings.)
|
3211 | *
|
3212 | * These OpCodes can be used by both the i18n block as well as ICU sub-block.
|
3213 | *
|
3214 | * ## Example
|
3215 | *
|
3216 | * Assume
|
3217 | * ```ts
|
3218 | * if (rf & RenderFlags.Update) {
|
3219 | * i18nExp(ctx.exp1); // If changed set mask bit 1
|
3220 | * i18nExp(ctx.exp2); // If changed set mask bit 2
|
3221 | * i18nExp(ctx.exp3); // If changed set mask bit 3
|
3222 | * i18nExp(ctx.exp4); // If changed set mask bit 4
|
3223 | * i18nApply(0); // Apply all changes by executing the OpCodes.
|
3224 | * }
|
3225 | * ```
|
3226 | * We can assume that each call to `i18nExp` sets an internal `changeMask` bit depending on the
|
3227 | * index of `i18nExp`.
|
3228 | *
|
3229 | * ### OpCodes
|
3230 | * ```ts
|
3231 | * <I18nUpdateOpCodes>[
|
3232 | * // The following OpCodes represent: `<div i18n-title="pre{{exp1}}in{{exp2}}post">`
|
3233 | * // If `changeMask & 0b11`
|
3234 | * // has changed then execute update OpCodes.
|
3235 | * // has NOT changed then skip `8` values and start processing next OpCodes.
|
3236 | * 0b11, 8,
|
3237 | * // Concatenate `newValue = 'pre'+lView[bindIndex-4]+'in'+lView[bindIndex-3]+'post';`.
|
3238 | * 'pre', -4, 'in', -3, 'post',
|
3239 | * // Update attribute: `elementAttribute(1, 'title', sanitizerFn(newValue));`
|
3240 | * 1 << SHIFT_REF | Attr, 'title', sanitizerFn,
|
3241 | *
|
3242 | * // The following OpCodes represent: `<div i18n>Hello {{exp3}}!">`
|
3243 | * // If `changeMask & 0b100`
|
3244 | * // has changed then execute update OpCodes.
|
3245 | * // has NOT changed then skip `4` values and start processing next OpCodes.
|
3246 | * 0b100, 4,
|
3247 | * // Concatenate `newValue = 'Hello ' + lView[bindIndex -2] + '!';`.
|
3248 | * 'Hello ', -2, '!',
|
3249 | * // Update text: `lView[1].textContent = newValue;`
|
3250 | * 1 << SHIFT_REF | Text,
|
3251 | *
|
3252 | * // The following OpCodes represent: `<div i18n>{exp4, plural, ... }">`
|
3253 | * // If `changeMask & 0b1000`
|
3254 | * // has changed then execute update OpCodes.
|
3255 | * // has NOT changed then skip `2` values and start processing next OpCodes.
|
3256 | * 0b1000, 2,
|
3257 | * // Concatenate `newValue = lView[bindIndex -1];`.
|
3258 | * -1,
|
3259 | * // Switch ICU: `icuSwitchCase(lView[1], 0, newValue);`
|
3260 | * 0 << SHIFT_ICU | 1 << SHIFT_REF | IcuSwitch,
|
3261 | *
|
3262 | * // Note `changeMask & -1` is always true, so the IcuUpdate will always execute.
|
3263 | * -1, 1,
|
3264 | * // Update ICU: `icuUpdateCase(lView[1], 0);`
|
3265 | * 0 << SHIFT_ICU | 1 << SHIFT_REF | IcuUpdate,
|
3266 | *
|
3267 | * ];
|
3268 | * ```
|
3269 | *
|
3270 | */
|
3271 | declare interface I18nUpdateOpCodes extends Array<string | number | SanitizerFn | null>, I18nDebug {
|
3272 | __brand__: 'I18nUpdateOpCodes';
|
3273 | }
|
3274 |
|
3275 | /**
|
3276 | * Marks that the next string is comment text need for ICU.
|
3277 | *
|
3278 | * See `I18nMutateOpCodes` documentation.
|
3279 | */
|
3280 | declare const ICU_MARKER: ICU_MARKER;
|
3281 |
|
3282 | declare interface ICU_MARKER {
|
3283 | marker: 'ICU';
|
3284 | }
|
3285 |
|
3286 | /**
|
3287 | * Array storing OpCode for dynamically creating `i18n` blocks.
|
3288 | *
|
3289 | * Example:
|
3290 | * ```ts
|
3291 | * <I18nCreateOpCode>[
|
3292 | * // For adding text nodes
|
3293 | * // ---------------------
|
3294 | * // Equivalent to:
|
3295 | * // lView[1].appendChild(lView[0] = document.createTextNode('xyz'));
|
3296 | * 'xyz', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,
|
3297 | *
|
3298 | * // For adding element nodes
|
3299 | * // ---------------------
|
3300 | * // Equivalent to:
|
3301 | * // lView[1].appendChild(lView[0] = document.createElement('div'));
|
3302 | * ELEMENT_MARKER, 'div', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,
|
3303 | *
|
3304 | * // For adding comment nodes
|
3305 | * // ---------------------
|
3306 | * // Equivalent to:
|
3307 | * // lView[1].appendChild(lView[0] = document.createComment(''));
|
3308 | * ICU_MARKER, '', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,
|
3309 | *
|
3310 | * // For moving existing nodes to a different location
|
3311 | * // --------------------------------------------------
|
3312 | * // Equivalent to:
|
3313 | * // const node = lView[1];
|
3314 | * // lView[2].appendChild(node);
|
3315 | * 1 << SHIFT_REF | Select, 2 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,
|
3316 | *
|
3317 | * // For removing existing nodes
|
3318 | * // --------------------------------------------------
|
3319 | * // const node = lView[1];
|
3320 | * // removeChild(tView.data(1), node, lView);
|
3321 | * 1 << SHIFT_REF | Remove,
|
3322 | *
|
3323 | * // For writing attributes
|
3324 | * // --------------------------------------------------
|
3325 | * // const node = lView[1];
|
3326 | * // node.setAttribute('attr', 'value');
|
3327 | * 1 << SHIFT_REF | Attr, 'attr', 'value'
|
3328 | * ];
|
3329 | * ```
|
3330 | */
|
3331 | declare interface IcuCreateOpCodes extends Array<number | string | ELEMENT_MARKER | ICU_MARKER | null>, I18nDebug {
|
3332 | __brand__: 'I18nCreateOpCodes';
|
3333 | }
|
3334 |
|
3335 | /**
|
3336 | * Defines the ICU type of `select` or `plural`
|
3337 | */
|
3338 | declare const enum IcuType {
|
3339 | select = 0,
|
3340 | plural = 1
|
3341 | }
|
3342 |
|
3343 | /**
|
3344 | * This array contains information about input properties that
|
3345 | * need to be set once from attribute data. It's ordered by
|
3346 | * directive index (relative to element) so it's simple to
|
3347 | * look up a specific directive's initial input data.
|
3348 | *
|
3349 | * Within each sub-array:
|
3350 | *
|
3351 | * i+0: attribute name
|
3352 | * i+1: minified/internal input name
|
3353 | * i+2: initial value
|
3354 | *
|
3355 | * If a directive on a node does not have any input properties
|
3356 | * that should be set from attributes, its index is set to null
|
3357 | * to avoid a sparse array.
|
3358 | *
|
3359 | * e.g. [null, ['role-min', 'minified-input', 'button']]
|
3360 | */
|
3361 | declare type InitialInputData = (InitialInputs | null)[];
|
3362 |
|
3363 | /**
|
3364 | * Used by InitialInputData to store input properties
|
3365 | * that should be set once from attributes.
|
3366 | *
|
3367 | * i+0: attribute name
|
3368 | * i+1: minified/internal input name
|
3369 | * i+2: initial value
|
3370 | *
|
3371 | * e.g. ['role-min', 'minified-input', 'button']
|
3372 | */
|
3373 | declare type InitialInputs = string[];
|
3374 |
|
3375 | /**
|
3376 | * Type of the Inject metadata.
|
3377 | *
|
3378 | * @publicApi
|
3379 | */
|
3380 | export declare interface Inject {
|
3381 | /**
|
3382 | * A [DI token](guide/glossary#di-token) that maps to the dependency to be injected.
|
3383 | */
|
3384 | token: any;
|
3385 | }
|
3386 |
|
3387 | /**
|
3388 | * Inject decorator and metadata.
|
3389 | *
|
3390 | * @Annotation
|
3391 | * @publicApi
|
3392 | */
|
3393 | export declare const Inject: InjectDecorator;
|
3394 |
|
3395 | /**
|
3396 | * Injects a token from the currently active injector.
|
3397 | *
|
3398 | * Must be used in the context of a factory function such as one defined for an
|
3399 | * `InjectionToken`. Throws an error if not called from such a context.
|
3400 | *
|
3401 | * Within such a factory function, using this function to request injection of a dependency
|
3402 | * is faster and more type-safe than providing an additional array of dependencies
|
3403 | * (as has been common with `useFactory` providers).
|
3404 | *
|
3405 | * @param token The injection token for the dependency to be injected.
|
3406 | * @param flags Optional flags that control how injection is executed.
|
3407 | * The flags correspond to injection strategies that can be specified with
|
3408 | * parameter decorators `@Host`, `@Self`, `@SkipSef`, and `@Optional`.
|
3409 | * @returns the injected value if injection is successful, `null` otherwise.
|
3410 | *
|
3411 | * @usageNotes
|
3412 | *
|
3413 | * ### Example
|
3414 | *
|
3415 | * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}
|
3416 | *
|
3417 | * @publicApi
|
3418 | */
|
3419 | export declare const inject: typeof ɵɵinject;
|
3420 |
|
3421 | /**
|
3422 | * Type of the Injectable metadata.
|
3423 | *
|
3424 | * @publicApi
|
3425 | */
|
3426 | export declare interface Injectable {
|
3427 | /**
|
3428 | * Determines which injectors will provide the injectable.
|
3429 | *
|
3430 | * - `Type<any>` - associates the injectable with an `@NgModule` or other `InjectorType`,
|
3431 | * - 'null' : Equivalent to `undefined`. The injectable is not provided in any scope automatically
|
3432 | * and must be added to a `providers` array of an [@NgModule](api/core/NgModule#providers),
|
3433 | * [@Component](api/core/Directive#providers) or [@Directive](api/core/Directive#providers).
|
3434 | *
|
3435 | * The following options specify that this injectable should be provided in one of the following
|
3436 | * injectors:
|
3437 | * - 'root' : The application-level injector in most apps.
|
3438 | * - 'platform' : A special singleton platform injector shared by all
|
3439 | * applications on the page.
|
3440 | * - 'any' : Provides a unique instance in each lazy loaded module while all eagerly loaded
|
3441 | * modules share one instance.
|
3442 | *
|
3443 | */
|
3444 | providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
|
3445 | }
|
3446 |
|
3447 | /**
|
3448 | * Injectable decorator and metadata.
|
3449 | *
|
3450 | * @Annotation
|
3451 | * @publicApi
|
3452 | */
|
3453 | export declare const Injectable: InjectableDecorator;
|
3454 |
|
3455 | /**
|
3456 | * Type of the Injectable decorator / constructor function.
|
3457 | *
|
3458 | * @publicApi
|
3459 | */
|
3460 | export declare interface InjectableDecorator {
|
3461 | /**
|
3462 | * Decorator that marks a class as available to be
|
3463 | * provided and injected as a dependency.
|
3464 | *
|
3465 | * @see [Introduction to Services and DI](guide/architecture-services)
|
3466 | * @see [Dependency Injection Guide](guide/dependency-injection)
|
3467 | *
|
3468 | * @usageNotes
|
3469 | *
|
3470 | * Marking a class with `@Injectable` ensures that the compiler
|
3471 | * will generate the necessary metadata to create the class's
|
3472 | * dependencies when the class is injected.
|
3473 | *
|
3474 | * The following example shows how a service class is properly
|
3475 | * marked so that a supporting service can be injected upon creation.
|
3476 | *
|
3477 | * <code-example path="core/di/ts/metadata_spec.ts" region="Injectable"></code-example>
|
3478 | *
|
3479 | */
|
3480 | (): TypeDecorator;
|
3481 | (options?: {
|
3482 | providedIn: Type<any> | 'root' | 'platform' | 'any' | null;
|
3483 | } & InjectableProvider): TypeDecorator;
|
3484 | new (): Injectable;
|
3485 | new (options?: {
|
3486 | providedIn: Type<any> | 'root' | 'platform' | 'any' | null;
|
3487 | } & InjectableProvider): Injectable;
|
3488 | }
|
3489 |
|
3490 | /**
|
3491 | * Injectable providers used in `@Injectable` decorator.
|
3492 | *
|
3493 | * @publicApi
|
3494 | */
|
3495 | export declare type InjectableProvider = ValueSansProvider | ExistingSansProvider | StaticClassSansProvider | ConstructorSansProvider | FactorySansProvider | ClassSansProvider;
|
3496 |
|
3497 | /**
|
3498 | * A `Type` which has a `ɵprov: ɵɵInjectableDeclaration` static field.
|
3499 | *
|
3500 | * `InjectableType`s contain their own Dependency Injection metadata and are usable in an
|
3501 | * `InjectorDef`-based `StaticInjector.
|
3502 | *
|
3503 | * @publicApi
|
3504 | */
|
3505 | export declare interface InjectableType<T> extends Type<T> {
|
3506 | /**
|
3507 | * Opaque type whose structure is highly version dependent. Do not rely on any properties.
|
3508 | */
|
3509 | ɵprov: unknown;
|
3510 | }
|
3511 |
|
3512 |
|
3513 | /**
|
3514 | * Type of the Inject decorator / constructor function.
|
3515 | *
|
3516 | * @publicApi
|
3517 | */
|
3518 | export declare interface InjectDecorator {
|
3519 | /**
|
3520 | * Parameter decorator on a dependency parameter of a class constructor
|
3521 | * that specifies a custom provider of the dependency.
|
3522 | *
|
3523 | * @usageNotes
|
3524 | * The following example shows a class constructor that specifies a
|
3525 | * custom provider of a dependency using the parameter decorator.
|
3526 | *
|
3527 | * When `@Inject()` is not present, the injector uses the type annotation of the
|
3528 | * parameter as the provider.
|
3529 | *
|
3530 | * <code-example path="core/di/ts/metadata_spec.ts" region="InjectWithoutDecorator">
|
3531 | * </code-example>
|
3532 | *
|
3533 | * @see ["Dependency Injection Guide"](guide/dependency-injection)
|
3534 | *
|
3535 | */
|
3536 | (token: any): any;
|
3537 | new (token: any): Inject;
|
3538 | }
|
3539 |
|
3540 | /**
|
3541 | * Injection flags for DI.
|
3542 | *
|
3543 | * @publicApi
|
3544 | */
|
3545 | export declare enum InjectFlags {
|
3546 | /** Check self and check parent injector if needed */
|
3547 | Default = 0,
|
3548 | /**
|
3549 | * Specifies that an injector should retrieve a dependency from any injector until reaching the
|
3550 | * host element of the current component. (Only used with Element Injector)
|
3551 | */
|
3552 | Host = 1,
|
3553 | /** Don't ascend to ancestors of the node requesting injection. */
|
3554 | Self = 2,
|
3555 | /** Skip the node that is requesting injection. */
|
3556 | SkipSelf = 4,
|
3557 | /** Inject `defaultValue` instead if token not found. */
|
3558 | Optional = 8
|
3559 | }
|
3560 |
|
3561 | /**
|
3562 | * Creates a token that can be used in a DI Provider.
|
3563 | *
|
3564 | * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a
|
3565 | * runtime representation) such as when injecting an interface, callable type, array or
|
3566 | * parameterized type.
|
3567 | *
|
3568 | * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by
|
3569 | * the `Injector`. This provides additional level of type safety.
|
3570 | *
|
3571 | * ```
|
3572 | * interface MyInterface {...}
|
3573 | * var myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken'));
|
3574 | * // myInterface is inferred to be MyInterface.
|
3575 | * ```
|
3576 | *
|
3577 | * When creating an `InjectionToken`, you can optionally specify a factory function which returns
|
3578 | * (possibly by creating) a default value of the parameterized type `T`. This sets up the
|
3579 | * `InjectionToken` using this factory as a provider as if it was defined explicitly in the
|
3580 | * application's root injector. If the factory function, which takes zero arguments, needs to inject
|
3581 | * dependencies, it can do so using the `inject` function. See below for an example.
|
3582 | *
|
3583 | * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which
|
3584 | * overrides the above behavior and marks the token as belonging to a particular `@NgModule`. As
|
3585 | * mentioned above, `'root'` is the default value for `providedIn`.
|
3586 | *
|
3587 | * @usageNotes
|
3588 | * ### Basic Example
|
3589 | *
|
3590 | * ### Plain InjectionToken
|
3591 | *
|
3592 | * {@example core/di/ts/injector_spec.ts region='InjectionToken'}
|
3593 | *
|
3594 | * ### Tree-shakable InjectionToken
|
3595 | *
|
3596 | * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}
|
3597 | *
|
3598 | *
|
3599 | * @publicApi
|
3600 | */
|
3601 | export declare class InjectionToken<T> {
|
3602 | protected _desc: string;
|
3603 | readonly ɵprov: unknown;
|
3604 | constructor(_desc: string, options?: {
|
3605 | providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
|
3606 | factory: () => T;
|
3607 | });
|
3608 | toString(): string;
|
3609 | }
|
3610 |
|
3611 | /**
|
3612 | * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.
|
3613 | *
|
3614 | * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a
|
3615 | * project.
|
3616 | *
|
3617 | * @publicApi
|
3618 | */
|
3619 | export declare const INJECTOR: InjectionToken<Injector>;
|
3620 |
|
3621 | /**
|
3622 | * Concrete injectors implement this interface. Injectors are configured
|
3623 | * with [providers](guide/glossary#provider) that associate
|
3624 | * dependencies of various types with [injection tokens](guide/glossary#di-token).
|
3625 | *
|
3626 | * @see ["DI Providers"](guide/dependency-injection-providers).
|
3627 | * @see `StaticProvider`
|
3628 | *
|
3629 | * @usageNotes
|
3630 | *
|
3631 | * The following example creates a service injector instance.
|
3632 | *
|
3633 | * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
|
3634 | *
|
3635 | * ### Usage example
|
3636 | *
|
3637 | * {@example core/di/ts/injector_spec.ts region='Injector'}
|
3638 | *
|
3639 | * `Injector` returns itself when given `Injector` as a token:
|
3640 | *
|
3641 | * {@example core/di/ts/injector_spec.ts region='injectInjector'}
|
3642 | *
|
3643 | * @publicApi
|
3644 | */
|
3645 | export declare abstract class Injector {
|
3646 | static THROW_IF_NOT_FOUND: {};
|
3647 | static NULL: Injector;
|
3648 | /**
|
3649 | * Retrieves an instance from the injector based on the provided token.
|
3650 | * @returns The instance from the injector if defined, otherwise the `notFoundValue`.
|
3651 | * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.
|
3652 | */
|
3653 | abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;
|
3654 | /**
|
3655 | * @deprecated from v4.0.0 use ProviderToken<T>
|
3656 | * @suppress {duplicate}
|
3657 | */
|
3658 | abstract get(token: any, notFoundValue?: any): any;
|
3659 | /**
|
3660 | * @deprecated from v5 use the new signature Injector.create(options)
|
3661 | */
|
3662 | static create(providers: StaticProvider[], parent?: Injector): Injector;
|
3663 | /**
|
3664 | * Creates a new injector instance that provides one or more dependencies,
|
3665 | * according to a given type or types of `StaticProvider`.
|
3666 | *
|
3667 | * @param options An object with the following properties:
|
3668 | * * `providers`: An array of providers of the [StaticProvider type](api/core/StaticProvider).
|
3669 | * * `parent`: (optional) A parent injector.
|
3670 | * * `name`: (optional) A developer-defined identifying name for the new injector.
|
3671 | *
|
3672 | * @returns The new injector instance.
|
3673 | *
|
3674 | */
|
3675 | static create(options: {
|
3676 | providers: StaticProvider[];
|
3677 | parent?: Injector;
|
3678 | name?: string;
|
3679 | }): Injector;
|
3680 | /** @nocollapse */
|
3681 | static ɵprov: unknown;
|
3682 | }
|
3683 |
|
3684 | declare const INJECTOR_2 = 9;
|
3685 |
|
3686 | /**
|
3687 | * A type which has an `InjectorDef` static field.
|
3688 | *
|
3689 | * `InjectorTypes` can be used to configure a `StaticInjector`.
|
3690 | *
|
3691 | * This is an opaque type whose structure is highly version dependent. Do not rely on any
|
3692 | * properties.
|
3693 | *
|
3694 | * @publicApi
|
3695 | */
|
3696 | export declare interface InjectorType<T> extends Type<T> {
|
3697 | ɵfac?: unknown;
|
3698 | ɵinj: unknown;
|
3699 | }
|
3700 |
|
3701 | /**
|
3702 | * Describes the `InjectorDef` equivalent of a `ModuleWithProviders`, an `InjectorType` with an
|
3703 | * associated array of providers.
|
3704 | *
|
3705 | * Objects of this type can be listed in the imports section of an `InjectorDef`.
|
3706 | *
|
3707 | * NOTE: This is a private type and should not be exported
|
3708 | */
|
3709 | declare interface InjectorTypeWithProviders<T> {
|
3710 | ngModule: InjectorType<T>;
|
3711 | providers?: (Type<any> | ValueProvider | ExistingProvider | FactoryProvider | ConstructorProvider | StaticClassProvider | ClassProvider | any[])[];
|
3712 | }
|
3713 |
|
3714 | /**
|
3715 | * Type of metadata for an `Input` property.
|
3716 | *
|
3717 | * @publicApi
|
3718 | */
|
3719 | export declare interface Input {
|
3720 | /**
|
3721 | * The name of the DOM property to which the input property is bound.
|
3722 | */
|
3723 | bindingPropertyName?: string;
|
3724 | }
|
3725 |
|
3726 | /**
|
3727 | * @Annotation
|
3728 | * @publicApi
|
3729 | */
|
3730 | export declare const Input: InputDecorator;
|
3731 |
|
3732 | /**
|
3733 | * @publicApi
|
3734 | */
|
3735 | export declare interface InputDecorator {
|
3736 | /**
|
3737 | * Decorator that marks a class field as an input property and supplies configuration metadata.
|
3738 | * The input property is bound to a DOM property in the template. During change detection,
|
3739 | * Angular automatically updates the data property with the DOM property's value.
|
3740 | *
|
3741 | * @usageNotes
|
3742 | *
|
3743 | * You can supply an optional name to use in templates when the
|
3744 | * component is instantiated, that maps to the
|
3745 | * name of the bound property. By default, the original
|
3746 | * name of the bound property is used for input binding.
|
3747 | *
|
3748 | * The following example creates a component with two input properties,
|
3749 | * one of which is given a special binding name.
|
3750 | *
|
3751 | * ```typescript
|
3752 | * @Component({
|
3753 | * selector: 'bank-account',
|
3754 | * template: `
|
3755 | * Bank Name: {{bankName}}
|
3756 | * Account Id: {{id}}
|
3757 | * `
|
3758 | * })
|
3759 | * class BankAccount {
|
3760 | * // This property is bound using its original name.
|
3761 | * @Input() bankName: string;
|
3762 | * // this property value is bound to a different property name
|
3763 | * // when this component is instantiated in a template.
|
3764 | * @Input('account-id') id: string;
|
3765 | *
|
3766 | * // this property is not bound, and is not automatically updated by Angular
|
3767 | * normalizedBankName: string;
|
3768 | * }
|
3769 | *
|
3770 | * @Component({
|
3771 | * selector: 'app',
|
3772 | * template: `
|
3773 | * <bank-account bankName="RBC" account-id="4747"></bank-account>
|
3774 | * `
|
3775 | * })
|
3776 | * class App {}
|
3777 | * ```
|
3778 | *
|
3779 | * @see [Input and Output properties](guide/inputs-outputs)
|
3780 | */
|
3781 | (bindingPropertyName?: string): any;
|
3782 | new (bindingPropertyName?: string): any;
|
3783 | }
|
3784 |
|
3785 | /**
|
3786 | * See `TNode.insertBeforeIndex`
|
3787 | */
|
3788 | declare type InsertBeforeIndex = null | number | number[];
|
3789 |
|
3790 | declare interface InternalNgModuleRef<T> extends NgModuleRef<T> {
|
3791 | _bootstrapComponents: Type<any>[];
|
3792 | }
|
3793 |
|
3794 | declare interface InternalViewRef extends ViewRef {
|
3795 | detachFromAppRef(): void;
|
3796 | attachToAppRef(appRef: ViewRefTracker): void;
|
3797 | }
|
3798 |
|
3799 |
|
3800 | /**
|
3801 | * Returns whether Angular is in development mode. After called once,
|
3802 | * the value is locked and won't change any more.
|
3803 | *
|
3804 | * By default, this is true, unless a user calls `enableProdMode` before calling this.
|
3805 | *
|
3806 | * @publicApi
|
3807 | */
|
3808 | export declare function isDevMode(): boolean;
|
3809 |
|
3810 | /**
|
3811 | * Record representing the item change information.
|
3812 | *
|
3813 | * @publicApi
|
3814 | */
|
3815 | export declare interface IterableChangeRecord<V> {
|
3816 | /** Current index of the item in `Iterable` or null if removed. */
|
3817 | readonly currentIndex: number | null;
|
3818 | /** Previous index of the item in `Iterable` or null if added. */
|
3819 | readonly previousIndex: number | null;
|
3820 | /** The item. */
|
3821 | readonly item: V;
|
3822 | /** Track by identity as computed by the `TrackByFunction`. */
|
3823 | readonly trackById: any;
|
3824 | }
|
3825 |
|
3826 | declare class IterableChangeRecord_<V> implements IterableChangeRecord<V> {
|
3827 | item: V;
|
3828 | trackById: any;
|
3829 | currentIndex: number | null;
|
3830 | previousIndex: number | null;
|
3831 | constructor(item: V, trackById: any);
|
3832 | }
|
3833 |
|
3834 | /**
|
3835 | * An object describing the changes in the `Iterable` collection since last time
|
3836 | * `IterableDiffer#diff()` was invoked.
|
3837 | *
|
3838 | * @publicApi
|
3839 | */
|
3840 | export declare interface IterableChanges<V> {
|
3841 | /**
|
3842 | * Iterate over all changes. `IterableChangeRecord` will contain information about changes
|
3843 | * to each item.
|
3844 | */
|
3845 | forEachItem(fn: (record: IterableChangeRecord<V>) => void): void;
|
3846 | /**
|
3847 | * Iterate over a set of operations which when applied to the original `Iterable` will produce the
|
3848 | * new `Iterable`.
|
3849 | *
|
3850 | * NOTE: These are not necessarily the actual operations which were applied to the original
|
3851 | * `Iterable`, rather these are a set of computed operations which may not be the same as the
|
3852 | * ones applied.
|
3853 | *
|
3854 | * @param record A change which needs to be applied
|
3855 | * @param previousIndex The `IterableChangeRecord#previousIndex` of the `record` refers to the
|
3856 | * original `Iterable` location, where as `previousIndex` refers to the transient location
|
3857 | * of the item, after applying the operations up to this point.
|
3858 | * @param currentIndex The `IterableChangeRecord#currentIndex` of the `record` refers to the
|
3859 | * original `Iterable` location, where as `currentIndex` refers to the transient location
|
3860 | * of the item, after applying the operations up to this point.
|
3861 | */
|
3862 | forEachOperation(fn: (record: IterableChangeRecord<V>, previousIndex: number | null, currentIndex: number | null) => void): void;
|
3863 | /**
|
3864 | * Iterate over changes in the order of original `Iterable` showing where the original items
|
3865 | * have moved.
|
3866 | */
|
3867 | forEachPreviousItem(fn: (record: IterableChangeRecord<V>) => void): void;
|
3868 | /** Iterate over all added items. */
|
3869 | forEachAddedItem(fn: (record: IterableChangeRecord<V>) => void): void;
|
3870 | /** Iterate over all moved items. */
|
3871 | forEachMovedItem(fn: (record: IterableChangeRecord<V>) => void): void;
|
3872 | /** Iterate over all removed items. */
|
3873 | forEachRemovedItem(fn: (record: IterableChangeRecord<V>) => void): void;
|
3874 | /**
|
3875 | * Iterate over all items which had their identity (as computed by the `TrackByFunction`)
|
3876 | * changed.
|
3877 | */
|
3878 | forEachIdentityChange(fn: (record: IterableChangeRecord<V>) => void): void;
|
3879 | }
|
3880 |
|
3881 | /**
|
3882 | * A strategy for tracking changes over time to an iterable. Used by {@link NgForOf} to
|
3883 | * respond to changes in an iterable by effecting equivalent changes in the DOM.
|
3884 | *
|
3885 | * @publicApi
|
3886 | */
|
3887 | export declare interface IterableDiffer<V> {
|
3888 | /**
|
3889 | * Compute a difference between the previous state and the new `object` state.
|
3890 | *
|
3891 | * @param object containing the new value.
|
3892 | * @returns an object describing the difference. The return value is only valid until the next
|
3893 | * `diff()` invocation.
|
3894 | */
|
3895 | diff(object: NgIterable<V> | undefined | null): IterableChanges<V> | null;
|
3896 | }
|
3897 |
|
3898 | /**
|
3899 | * Provides a factory for {@link IterableDiffer}.
|
3900 | *
|
3901 | * @publicApi
|
3902 | */
|
3903 | export declare interface IterableDifferFactory {
|
3904 | supports(objects: any): boolean;
|
3905 | create<V>(trackByFn?: TrackByFunction<V>): IterableDiffer<V>;
|
3906 | }
|
3907 |
|
3908 | /**
|
3909 | * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.
|
3910 | *
|
3911 | * @publicApi
|
3912 | */
|
3913 | export declare class IterableDiffers {
|
3914 | /** @nocollapse */
|
3915 | static ɵprov: unknown;
|
3916 | /**
|
3917 | * @deprecated v4.0.0 - Should be private
|
3918 | */
|
3919 | factories: IterableDifferFactory[];
|
3920 | constructor(factories: IterableDifferFactory[]);
|
3921 | static create(factories: IterableDifferFactory[], parent?: IterableDiffers): IterableDiffers;
|
3922 | /**
|
3923 | * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the
|
3924 | * inherited {@link IterableDiffers} instance with the provided factories and return a new
|
3925 | * {@link IterableDiffers} instance.
|
3926 | *
|
3927 | * @usageNotes
|
3928 | * ### Example
|
3929 | *
|
3930 | * The following example shows how to extend an existing list of factories,
|
3931 | * which will only be applied to the injector for this component and its children.
|
3932 | * This step is all that's required to make a new {@link IterableDiffer} available.
|
3933 | *
|
3934 | * ```
|
3935 | * @Component({
|
3936 | * viewProviders: [
|
3937 | * IterableDiffers.extend([new ImmutableListDiffer()])
|
3938 | * ]
|
3939 | * })
|
3940 | * ```
|
3941 | */
|
3942 | static extend(factories: IterableDifferFactory[]): StaticProvider;
|
3943 | find(iterable: any): IterableDifferFactory;
|
3944 | }
|
3945 |
|
3946 | /**
|
3947 | * `KeyValueArray` is an array where even positions contain keys and odd positions contain values.
|
3948 | *
|
3949 | * `KeyValueArray` provides a very efficient way of iterating over its contents. For small
|
3950 | * sets (~10) the cost of binary searching an `KeyValueArray` has about the same performance
|
3951 | * characteristics that of a `Map` with significantly better memory footprint.
|
3952 | *
|
3953 | * If used as a `Map` the keys are stored in alphabetical order so that they can be binary searched
|
3954 | * for retrieval.
|
3955 | *
|
3956 | * See: `keyValueArraySet`, `keyValueArrayGet`, `keyValueArrayIndexOf`, `keyValueArrayDelete`.
|
3957 | */
|
3958 | declare interface KeyValueArray<VALUE> extends Array<VALUE | string> {
|
3959 | __brand__: 'array-map';
|
3960 | }
|
3961 |
|
3962 | /**
|
3963 | * Record representing the item change information.
|
3964 | *
|
3965 | * @publicApi
|
3966 | */
|
3967 | export declare interface KeyValueChangeRecord<K, V> {
|
3968 | /**
|
3969 | * Current key in the Map.
|
3970 | */
|
3971 | readonly key: K;
|
3972 | /**
|
3973 | * Current value for the key or `null` if removed.
|
3974 | */
|
3975 | readonly currentValue: V | null;
|
3976 | /**
|
3977 | * Previous value for the key or `null` if added.
|
3978 | */
|
3979 | readonly previousValue: V | null;
|
3980 | }
|
3981 |
|
3982 | /**
|
3983 | * An object describing the changes in the `Map` or `{[k:string]: string}` since last time
|
3984 | * `KeyValueDiffer#diff()` was invoked.
|
3985 | *
|
3986 | * @publicApi
|
3987 | */
|
3988 | export declare interface KeyValueChanges<K, V> {
|
3989 | /**
|
3990 | * Iterate over all changes. `KeyValueChangeRecord` will contain information about changes
|
3991 | * to each item.
|
3992 | */
|
3993 | forEachItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
|
3994 | /**
|
3995 | * Iterate over changes in the order of original Map showing where the original items
|
3996 | * have moved.
|
3997 | */
|
3998 | forEachPreviousItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
|
3999 | /**
|
4000 | * Iterate over all keys for which values have changed.
|
4001 | */
|
4002 | forEachChangedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
|
4003 | /**
|
4004 | * Iterate over all added items.
|
4005 | */
|
4006 | forEachAddedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
|
4007 | /**
|
4008 | * Iterate over all removed items.
|
4009 | */
|
4010 | forEachRemovedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
|
4011 | }
|
4012 |
|
4013 | /**
|
4014 | * A differ that tracks changes made to an object over time.
|
4015 | *
|
4016 | * @publicApi
|
4017 | */
|
4018 | export declare interface KeyValueDiffer<K, V> {
|
4019 | /**
|
4020 | * Compute a difference between the previous state and the new `object` state.
|
4021 | *
|
4022 | * @param object containing the new value.
|
4023 | * @returns an object describing the difference. The return value is only valid until the next
|
4024 | * `diff()` invocation.
|
4025 | */
|
4026 | diff(object: Map<K, V>): KeyValueChanges<K, V> | null;
|
4027 | /**
|
4028 | * Compute a difference between the previous state and the new `object` state.
|
4029 | *
|
4030 | * @param object containing the new value.
|
4031 | * @returns an object describing the difference. The return value is only valid until the next
|
4032 | * `diff()` invocation.
|
4033 | */
|
4034 | diff(object: {
|
4035 | [key: string]: V;
|
4036 | }): KeyValueChanges<string, V> | null;
|
4037 | }
|
4038 |
|
4039 | /**
|
4040 | * Provides a factory for {@link KeyValueDiffer}.
|
4041 | *
|
4042 | * @publicApi
|
4043 | */
|
4044 | export declare interface KeyValueDifferFactory {
|
4045 | /**
|
4046 | * Test to see if the differ knows how to diff this kind of object.
|
4047 | */
|
4048 | supports(objects: any): boolean;
|
4049 | /**
|
4050 | * Create a `KeyValueDiffer`.
|
4051 | */
|
4052 | create<K, V>(): KeyValueDiffer<K, V>;
|
4053 | }
|
4054 |
|
4055 | /**
|
4056 | * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.
|
4057 | *
|
4058 | * @publicApi
|
4059 | */
|
4060 | export declare class KeyValueDiffers {
|
4061 | /** @nocollapse */
|
4062 | static ɵprov: unknown;
|
4063 | /**
|
4064 | * @deprecated v4.0.0 - Should be private.
|
4065 | */
|
4066 | factories: KeyValueDifferFactory[];
|
4067 | constructor(factories: KeyValueDifferFactory[]);
|
4068 | static create<S>(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers): KeyValueDiffers;
|
4069 | /**
|
4070 | * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the
|
4071 | * inherited {@link KeyValueDiffers} instance with the provided factories and return a new
|
4072 | * {@link KeyValueDiffers} instance.
|
4073 | *
|
4074 | * @usageNotes
|
4075 | * ### Example
|
4076 | *
|
4077 | * The following example shows how to extend an existing list of factories,
|
4078 | * which will only be applied to the injector for this component and its children.
|
4079 | * This step is all that's required to make a new {@link KeyValueDiffer} available.
|
4080 | *
|
4081 | * ```
|
4082 | * @Component({
|
4083 | * viewProviders: [
|
4084 | * KeyValueDiffers.extend([new ImmutableMapDiffer()])
|
4085 | * ]
|
4086 | * })
|
4087 | * ```
|
4088 | */
|
4089 | static extend<S>(factories: KeyValueDifferFactory[]): StaticProvider;
|
4090 | find(kv: any): KeyValueDifferFactory;
|
4091 | }
|
4092 |
|
4093 | /**
|
4094 | * The state associated with a container.
|
4095 | *
|
4096 | * This is an array so that its structure is closer to LView. This helps
|
4097 | * when traversing the view tree (which is a mix of containers and component
|
4098 | * views), so we can jump to viewOrContainer[NEXT] in the same way regardless
|
4099 | * of type.
|
4100 | */
|
4101 | declare interface LContainer extends Array<any> {
|
4102 | /**
|
4103 | * The host element of this LContainer.
|
4104 | *
|
4105 | * The host could be an LView if this container is on a component node.
|
4106 | * In that case, the component LView is its HOST.
|
4107 | */
|
4108 | readonly [HOST]: RElement | RComment | ɵangular_packages_core_core_ca;
|
4109 | /**
|
4110 | * This is a type field which allows us to differentiate `LContainer` from `StylingContext` in an
|
4111 | * efficient way. The value is always set to `true`
|
4112 | */
|
4113 | [TYPE]: true;
|
4114 | /**
|
4115 | * Flag to signify that this `LContainer` may have transplanted views which need to be change
|
4116 | * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.
|
4117 | *
|
4118 | * This flag, once set, is never unset for the `LContainer`.
|
4119 | */
|
4120 | [HAS_TRANSPLANTED_VIEWS]: boolean;
|
4121 | /**
|
4122 | * Access to the parent view is necessary so we can propagate back
|
4123 | * up from inside a container to parent[NEXT].
|
4124 | */
|
4125 | [PARENT]: ɵangular_packages_core_core_ca;
|
4126 | /**
|
4127 | * This allows us to jump from a container to a sibling container or component
|
4128 | * view with the same parent, so we can remove listeners efficiently.
|
4129 | */
|
4130 | [NEXT]: ɵangular_packages_core_core_ca | LContainer | null;
|
4131 | /**
|
4132 | * The number of direct transplanted views which need a refresh or have descendants themselves
|
4133 | * that need a refresh but have not marked their ancestors as Dirty. This tells us that during
|
4134 | * change detection we should still descend to find those children to refresh, even if the parents
|
4135 | * are not `Dirty`/`CheckAlways`.
|
4136 | */
|
4137 | [TRANSPLANTED_VIEWS_TO_REFRESH]: number;
|
4138 | /**
|
4139 | * A collection of views created based on the underlying `<ng-template>` element but inserted into
|
4140 | * a different `LContainer`. We need to track views created from a given declaration point since
|
4141 | * queries collect matches from the embedded view declaration point and _not_ the insertion point.
|
4142 | */
|
4143 | [MOVED_VIEWS]: ɵangular_packages_core_core_ca[] | null;
|
4144 | /**
|
4145 | * Pointer to the `TNode` which represents the host of the container.
|
4146 | */
|
4147 | [T_HOST]: TNode;
|
4148 | /** The comment element that serves as an anchor for this LContainer. */
|
4149 | readonly [NATIVE]: RComment;
|
4150 | /**
|
4151 | * Array of `ViewRef`s used by any `ViewContainerRef`s that point to this container.
|
4152 | *
|
4153 | * This is lazily initialized by `ViewContainerRef` when the first view is inserted.
|
4154 | *
|
4155 | * NOTE: This is stored as `any[]` because render3 should really not be aware of `ViewRef` and
|
4156 | * doing so creates circular dependency.
|
4157 | */
|
4158 | [VIEW_REFS]: unknown[] | null;
|
4159 | }
|
4160 |
|
4161 | /**
|
4162 | * Human readable version of the `LContainer`
|
4163 | *
|
4164 | * `LContainer` is a data structure used internally to keep track of child views. The `LContainer`
|
4165 | * is designed for efficiency and so at times it is difficult to read or write tests which assert on
|
4166 | * its values. For this reason when `ngDevMode` is true we patch a `LContainer.debug` property which
|
4167 | * points to `LContainerDebug` for easier debugging and test writing. It is the intent of
|
4168 | * `LContainerDebug` to be used in tests.
|
4169 | */
|
4170 | declare interface LContainerDebug {
|
4171 | readonly native: RComment;
|
4172 | /**
|
4173 | * Child `LView`s.
|
4174 | */
|
4175 | readonly views: LViewDebug[];
|
4176 | readonly parent: LViewDebug | null;
|
4177 | readonly movedViews: ɵangular_packages_core_core_ca[] | null;
|
4178 | readonly host: RElement | RComment | ɵangular_packages_core_core_ca;
|
4179 | readonly next: LViewDebug | LContainerDebug | null;
|
4180 | readonly hasTransplantedViews: boolean;
|
4181 | }
|
4182 |
|
4183 | /**
|
4184 | * Provide this token to set the locale of your application.
|
4185 | * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,
|
4186 | * DecimalPipe and PercentPipe) and by ICU expressions.
|
4187 | *
|
4188 | * See the [i18n guide](guide/i18n#setting-up-locale) for more information.
|
4189 | *
|
4190 | * @usageNotes
|
4191 | * ### Example
|
4192 | *
|
4193 | * ```typescript
|
4194 | * import { LOCALE_ID } from '@angular/core';
|
4195 | * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
4196 | * import { AppModule } from './app/app.module';
|
4197 | *
|
4198 | * platformBrowserDynamic().bootstrapModule(AppModule, {
|
4199 | * providers: [{provide: LOCALE_ID, useValue: 'en-US' }]
|
4200 | * });
|
4201 | * ```
|
4202 | *
|
4203 | * @publicApi
|
4204 | */
|
4205 | export declare const LOCALE_ID: InjectionToken<string>;
|
4206 |
|
4207 | /**
|
4208 | * Type for a function that extracts a value for a local refs.
|
4209 | * Example:
|
4210 | * - `<div #nativeDivEl>` - `nativeDivEl` should point to the native `<div>` element;
|
4211 | * - `<ng-template #tplRef>` - `tplRef` should point to the `TemplateRef` instance;
|
4212 | */
|
4213 | declare type LocalRefExtractor = (tNode: TNodeWithLocalRefs, currentView: ɵangular_packages_core_core_ca) => any;
|
4214 |
|
4215 | /**
|
4216 | * lQueries represent a collection of individual LQuery objects tracked in a given view.
|
4217 | */
|
4218 | declare interface LQueries {
|
4219 | /**
|
4220 | * A collection of queries tracked in a given view.
|
4221 | */
|
4222 | queries: LQuery<any>[];
|
4223 | /**
|
4224 | * A method called when a new embedded view is created. As a result a set of LQueries applicable
|
4225 | * for a new embedded view is instantiated (cloned) from the declaration view.
|
4226 | * @param tView
|
4227 | */
|
4228 | createEmbeddedView(tView: TView): LQueries | null;
|
4229 | /**
|
4230 | * A method called when an embedded view is inserted into a container. As a result all impacted
|
4231 | * `LQuery` objects (and associated `QueryList`) are marked as dirty.
|
4232 | * @param tView
|
4233 | */
|
4234 | insertView(tView: TView): void;
|
4235 | /**
|
4236 | * A method called when an embedded view is detached from a container. As a result all impacted
|
4237 | * `LQuery` objects (and associated `QueryList`) are marked as dirty.
|
4238 | * @param tView
|
4239 | */
|
4240 | detachView(tView: TView): void;
|
4241 | }
|
4242 |
|
4243 | /**
|
4244 | * An interface that represents query-related information specific to a view instance. Most notably
|
4245 | * it contains:
|
4246 | * - materialized query matches;
|
4247 | * - a pointer to a QueryList where materialized query results should be reported.
|
4248 | */
|
4249 | declare interface LQuery<T> {
|
4250 | /**
|
4251 | * Materialized query matches for a given view only (!). Results are initialized lazily so the
|
4252 | * array of matches is set to `null` initially.
|
4253 | */
|
4254 | matches: (T | null)[] | null;
|
4255 | /**
|
4256 | * A QueryList where materialized query results should be reported.
|
4257 | */
|
4258 | queryList: QueryList<T>;
|
4259 | /**
|
4260 | * Clones an LQuery for an embedded view. A cloned query shares the same `QueryList` but has a
|
4261 | * separate collection of materialized matches.
|
4262 | */
|
4263 | clone(): LQuery<T>;
|
4264 | /**
|
4265 | * Called when an embedded view, impacting results of this query, is inserted or removed.
|
4266 | */
|
4267 | setDirty(): void;
|
4268 | }
|
4269 |
|
4270 | /**
|
4271 | * Human readable version of the `LView`.
|
4272 | *
|
4273 | * `LView` is a data structure used internally to keep track of views. The `LView` is designed for
|
4274 | * efficiency and so at times it is difficult to read or write tests which assert on its values. For
|
4275 | * this reason when `ngDevMode` is true we patch a `LView.debug` property which points to
|
4276 | * `LViewDebug` for easier debugging and test writing. It is the intent of `LViewDebug` to be used
|
4277 | * in tests.
|
4278 | */
|
4279 | declare interface LViewDebug {
|
4280 | /**
|
4281 | * Flags associated with the `LView` unpacked into a more readable state.
|
4282 | *
|
4283 | * See `LViewFlags` for the flag meanings.
|
4284 | */
|
4285 | readonly flags: {
|
4286 | initPhaseState: number;
|
4287 | creationMode: boolean;
|
4288 | firstViewPass: boolean;
|
4289 | checkAlways: boolean;
|
4290 | dirty: boolean;
|
4291 | attached: boolean;
|
4292 | destroyed: boolean;
|
4293 | isRoot: boolean;
|
4294 | indexWithinInitPhase: number;
|
4295 | };
|
4296 | /**
|
4297 | * Associated TView
|
4298 | */
|
4299 | readonly tView: TView;
|
4300 | /**
|
4301 | * Parent view (or container)
|
4302 | */
|
4303 | readonly parent: LViewDebug | LContainerDebug | null;
|
4304 | /**
|
4305 | * Next sibling to the `LView`.
|
4306 | */
|
4307 | readonly next: LViewDebug | LContainerDebug | null;
|
4308 | /**
|
4309 | * The context used for evaluation of the `LView`
|
4310 | *
|
4311 | * (Usually the component)
|
4312 | */
|
4313 | readonly context: {} | null;
|
4314 | /**
|
4315 | * Hierarchical tree of nodes.
|
4316 | */
|
4317 | readonly nodes: DebugNode_2[];
|
4318 | /**
|
4319 | * Template structure (no instance data).
|
4320 | * (Shows how TNodes are connected)
|
4321 | */
|
4322 | readonly template: string;
|
4323 | /**
|
4324 | * HTML representation of the `LView`.
|
4325 | *
|
4326 | * This is only approximate to actual HTML as child `LView`s are removed.
|
4327 | */
|
4328 | readonly html: string;
|
4329 | /**
|
4330 | * The host element to which this `LView` is attached.
|
4331 | */
|
4332 | readonly hostHTML: string | null;
|
4333 | /**
|
4334 | * Child `LView`s
|
4335 | */
|
4336 | readonly childViews: Array<LViewDebug | LContainerDebug>;
|
4337 | /**
|
4338 | * Sub range of `LView` containing decls (DOM elements).
|
4339 | */
|
4340 | readonly decls: LViewDebugRange;
|
4341 | /**
|
4342 | * Sub range of `LView` containing vars (bindings).
|
4343 | */
|
4344 | readonly vars: LViewDebugRange;
|
4345 | /**
|
4346 | * Sub range of `LView` containing expando (used by DI).
|
4347 | */
|
4348 | readonly expando: LViewDebugRange;
|
4349 | }
|
4350 |
|
4351 | /**
|
4352 | * `LView` is subdivided to ranges where the actual data is stored. Some of these ranges such as
|
4353 | * `decls` and `vars` are known at compile time. Other such as `i18n` and `expando` are runtime only
|
4354 | * concepts.
|
4355 | */
|
4356 | declare interface LViewDebugRange {
|
4357 | /**
|
4358 | * The starting index in `LView` where the range begins. (Inclusive)
|
4359 | */
|
4360 | start: number;
|
4361 | /**
|
4362 | * The ending index in `LView` where the range ends. (Exclusive)
|
4363 | */
|
4364 | end: number;
|
4365 | /**
|
4366 | * The length of the range
|
4367 | */
|
4368 | length: number;
|
4369 | /**
|
4370 | * The merged content of the range. `t` contains data from `TView.data` and `l` contains `LView`
|
4371 | * data at an index.
|
4372 | */
|
4373 | content: LViewDebugRangeContent[];
|
4374 | }
|
4375 |
|
4376 | /**
|
4377 | * For convenience the static and instance portions of `TView` and `LView` are merged into a single
|
4378 | * object in `LViewRange`.
|
4379 | */
|
4380 | declare interface LViewDebugRangeContent {
|
4381 | /**
|
4382 | * Index into original `LView` or `TView.data`.
|
4383 | */
|
4384 | index: number;
|
4385 | /**
|
4386 | * Value from the `TView.data[index]` location.
|
4387 | */
|
4388 | t: any;
|
4389 | /**
|
4390 | * Value from the `LView[index]` location.
|
4391 | */
|
4392 | l: any;
|
4393 | }
|
4394 |
|
4395 | /** Flags associated with an LView (saved in LView[FLAGS]) */
|
4396 | declare const enum LViewFlags {
|
4397 | /** The state of the init phase on the first 2 bits */
|
4398 | InitPhaseStateIncrementer = 1,
|
4399 | InitPhaseStateMask = 3,
|
4400 | /**
|
4401 | * Whether or not the view is in creationMode.
|
4402 | *
|
4403 | * This must be stored in the view rather than using `data` as a marker so that
|
4404 | * we can properly support embedded views. Otherwise, when exiting a child view
|
4405 | * back into the parent view, `data` will be defined and `creationMode` will be
|
4406 | * improperly reported as false.
|
4407 | */
|
4408 | CreationMode = 4,
|
4409 | /**
|
4410 | * Whether or not this LView instance is on its first processing pass.
|
4411 | *
|
4412 | * An LView instance is considered to be on its "first pass" until it
|
4413 | * has completed one creation mode run and one update mode run. At this
|
4414 | * time, the flag is turned off.
|
4415 | */
|
4416 | FirstLViewPass = 8,
|
4417 | /** Whether this view has default change detection strategy (checks always) or onPush */
|
4418 | CheckAlways = 16,
|
4419 | /**
|
4420 | * Whether or not manual change detection is turned on for onPush components.
|
4421 | *
|
4422 | * This is a special mode that only marks components dirty in two cases:
|
4423 | * 1) There has been a change to an @Input property
|
4424 | * 2) `markDirty()` has been called manually by the user
|
4425 | *
|
4426 | * Note that in this mode, the firing of events does NOT mark components
|
4427 | * dirty automatically.
|
4428 | *
|
4429 | * Manual mode is turned off by default for backwards compatibility, as events
|
4430 | * automatically mark OnPush components dirty in View Engine.
|
4431 | *
|
4432 | * TODO: Add a public API to ChangeDetectionStrategy to turn this mode on
|
4433 | */
|
4434 | ManualOnPush = 32,
|
4435 | /** Whether or not this view is currently dirty (needing check) */
|
4436 | Dirty = 64,
|
4437 | /** Whether or not this view is currently attached to change detection tree. */
|
4438 | Attached = 128,
|
4439 | /** Whether or not this view is destroyed. */
|
4440 | Destroyed = 256,
|
4441 | /** Whether or not this view is the root view */
|
4442 | IsRoot = 512,
|
4443 | /**
|
4444 | * Whether this moved LView was needs to be refreshed at the insertion location because the
|
4445 | * declaration was dirty.
|
4446 | */
|
4447 | RefreshTransplantedView = 1024,
|
4448 | /**
|
4449 | * Index of the current init phase on last 21 bits
|
4450 | */
|
4451 | IndexWithinInitPhaseIncrementer = 2048,
|
4452 | IndexWithinInitPhaseShift = 11,
|
4453 | IndexWithinInitPhaseReset = 2047
|
4454 | }
|
4455 |
|
4456 | /**
|
4457 | * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy
|
4458 | * that the compiler should use in case of missing translations:
|
4459 | * - Error: throw if you have missing translations.
|
4460 | * - Warning (default): show a warning in the console and/or shell.
|
4461 | * - Ignore: do nothing.
|
4462 | *
|
4463 | * See the [i18n guide](guide/i18n#missing-translation) for more information.
|
4464 | *
|
4465 | * @usageNotes
|
4466 | * ### Example
|
4467 | * ```typescript
|
4468 | * import { MissingTranslationStrategy } from '@angular/core';
|
4469 | * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
4470 | * import { AppModule } from './app/app.module';
|
4471 | *
|
4472 | * platformBrowserDynamic().bootstrapModule(AppModule, {
|
4473 | * missingTranslation: MissingTranslationStrategy.Error
|
4474 | * });
|
4475 | * ```
|
4476 | *
|
4477 | * @publicApi
|
4478 | */
|
4479 | export declare enum MissingTranslationStrategy {
|
4480 | Error = 0,
|
4481 | Warning = 1,
|
4482 | Ignore = 2
|
4483 | }
|
4484 |
|
4485 | /**
|
4486 | * Combination of NgModuleFactory and ComponentFactories.
|
4487 | *
|
4488 | * @publicApi
|
4489 | */
|
4490 | export declare class ModuleWithComponentFactories<T> {
|
4491 | ngModuleFactory: NgModuleFactory<T>;
|
4492 | componentFactories: ComponentFactory<any>[];
|
4493 | constructor(ngModuleFactory: NgModuleFactory<T>, componentFactories: ComponentFactory<any>[]);
|
4494 | }
|
4495 |
|
4496 | /**
|
4497 | * A wrapper around an NgModule that associates it with [providers](guide/glossary#provider
|
4498 | * "Definition"). Usage without a generic type is deprecated.
|
4499 | *
|
4500 | * @see [Deprecations](guide/deprecations#modulewithproviders-type-without-a-generic)
|
4501 | *
|
4502 | * @publicApi
|
4503 | */
|
4504 | export declare interface ModuleWithProviders<T> {
|
4505 | ngModule: Type<T>;
|
4506 | providers?: Provider[];
|
4507 | }
|
4508 |
|
4509 | declare const MOVED_VIEWS = 9;
|
4510 |
|
4511 | declare const NATIVE = 7;
|
4512 |
|
4513 | declare const NEXT = 4;
|
4514 |
|
4515 | declare interface NgContentDef {
|
4516 | /**
|
4517 | * this index is checked against NodeDef.ngContentIndex to find the nodes
|
4518 | * that are matched by this ng-content.
|
4519 | * Note that a NodeDef with an ng-content can be reprojected, i.e.
|
4520 | * have a ngContentIndex on its own.
|
4521 | */
|
4522 | index: number;
|
4523 | }
|
4524 |
|
4525 | /**
|
4526 | * A type describing supported iterable types.
|
4527 | *
|
4528 | * @publicApi
|
4529 | */
|
4530 | export declare type NgIterable<T> = Array<T> | Iterable<T>;
|
4531 |
|
4532 | /**
|
4533 | * Type of the NgModule metadata.
|
4534 | *
|
4535 | * @publicApi
|
4536 | */
|
4537 | export declare interface NgModule {
|
4538 | /**
|
4539 | * The set of injectable objects that are available in the injector
|
4540 | * of this module.
|
4541 | *
|
4542 | * @see [Dependency Injection guide](guide/dependency-injection)
|
4543 | * @see [NgModule guide](guide/providers)
|
4544 | *
|
4545 | * @usageNotes
|
4546 | *
|
4547 | * Dependencies whose providers are listed here become available for injection
|
4548 | * into any component, directive, pipe or service that is a child of this injector.
|
4549 | * The NgModule used for bootstrapping uses the root injector, and can provide dependencies
|
4550 | * to any part of the app.
|
4551 | *
|
4552 | * A lazy-loaded module has its own injector, typically a child of the app root injector.
|
4553 | * Lazy-loaded services are scoped to the lazy-loaded module's injector.
|
4554 | * If a lazy-loaded module also provides the `UserService`, any component created
|
4555 | * within that module's context (such as by router navigation) gets the local instance
|
4556 | * of the service, not the instance in the root injector.
|
4557 | * Components in external modules continue to receive the instance provided by their injectors.
|
4558 | *
|
4559 | * ### Example
|
4560 | *
|
4561 | * The following example defines a class that is injected in
|
4562 | * the HelloWorld NgModule:
|
4563 | *
|
4564 | * ```
|
4565 | * class Greeter {
|
4566 | * greet(name:string) {
|
4567 | * return 'Hello ' + name + '!';
|
4568 | * }
|
4569 | * }
|
4570 | *
|
4571 | * @NgModule({
|
4572 | * providers: [
|
4573 | * Greeter
|
4574 | * ]
|
4575 | * })
|
4576 | * class HelloWorld {
|
4577 | * greeter:Greeter;
|
4578 | *
|
4579 | * constructor(greeter:Greeter) {
|
4580 | * this.greeter = greeter;
|
4581 | * }
|
4582 | * }
|
4583 | * ```
|
4584 | */
|
4585 | providers?: Provider[];
|
4586 | /**
|
4587 | * The set of components, directives, and pipes ([declarables](guide/glossary#declarable))
|
4588 | * that belong to this module.
|
4589 | *
|
4590 | * @usageNotes
|
4591 | *
|
4592 | * The set of selectors that are available to a template include those declared here, and
|
4593 | * those that are exported from imported NgModules.
|
4594 | *
|
4595 | * Declarables must belong to exactly one module.
|
4596 | * The compiler emits an error if you try to declare the same class in more than one module.
|
4597 | * Be careful not to declare a class that is imported from another module.
|
4598 | *
|
4599 | * ### Example
|
4600 | *
|
4601 | * The following example allows the CommonModule to use the `NgFor`
|
4602 | * directive.
|
4603 | *
|
4604 | * ```javascript
|
4605 | * @NgModule({
|
4606 | * declarations: [NgFor]
|
4607 | * })
|
4608 | * class CommonModule {
|
4609 | * }
|
4610 | * ```
|
4611 | */
|
4612 | declarations?: Array<Type<any> | any[]>;
|
4613 | /**
|
4614 | * The set of NgModules whose exported [declarables](guide/glossary#declarable)
|
4615 | * are available to templates in this module.
|
4616 | *
|
4617 | * @usageNotes
|
4618 | *
|
4619 | * A template can use exported declarables from any
|
4620 | * imported module, including those from modules that are imported indirectly
|
4621 | * and re-exported.
|
4622 | * For example, `ModuleA` imports `ModuleB`, and also exports
|
4623 | * it, which makes the declarables from `ModuleB` available
|
4624 | * wherever `ModuleA` is imported.
|
4625 | *
|
4626 | * ### Example
|
4627 | *
|
4628 | * The following example allows MainModule to use anything exported by
|
4629 | * `CommonModule`:
|
4630 | *
|
4631 | * ```javascript
|
4632 | * @NgModule({
|
4633 | * imports: [CommonModule]
|
4634 | * })
|
4635 | * class MainModule {
|
4636 | * }
|
4637 | * ```
|
4638 | *
|
4639 | */
|
4640 | imports?: Array<Type<any> | ModuleWithProviders<{}> | any[]>;
|
4641 | /**
|
4642 | * The set of components, directives, and pipes declared in this
|
4643 | * NgModule that can be used in the template of any component that is part of an
|
4644 | * NgModule that imports this NgModule. Exported declarations are the module's public API.
|
4645 | *
|
4646 | * A declarable belongs to one and only one NgModule.
|
4647 | * A module can list another module among its exports, in which case all of that module's
|
4648 | * public declaration are exported.
|
4649 | *
|
4650 | * @usageNotes
|
4651 | *
|
4652 | * Declarations are private by default.
|
4653 | * If this ModuleA does not export UserComponent, then only the components within this
|
4654 | * ModuleA can use UserComponent.
|
4655 | *
|
4656 | * ModuleA can import ModuleB and also export it, making exports from ModuleB
|
4657 | * available to an NgModule that imports ModuleA.
|
4658 | *
|
4659 | * ### Example
|
4660 | *
|
4661 | * The following example exports the `NgFor` directive from CommonModule.
|
4662 | *
|
4663 | * ```javascript
|
4664 | * @NgModule({
|
4665 | * exports: [NgFor]
|
4666 | * })
|
4667 | * class CommonModule {
|
4668 | * }
|
4669 | * ```
|
4670 | */
|
4671 | exports?: Array<Type<any> | any[]>;
|
4672 | /**
|
4673 | * The set of components to compile when this NgModule is defined,
|
4674 | * so that they can be dynamically loaded into the view.
|
4675 | *
|
4676 | * For each component listed here, Angular creates a `ComponentFactory`
|
4677 | * and stores it in the `ComponentFactoryResolver`.
|
4678 | *
|
4679 | * Angular automatically adds components in the module's bootstrap
|
4680 | * and route definitions into the `entryComponents` list. Use this
|
4681 | * option to add components that are bootstrapped
|
4682 | * using one of the imperative techniques, such as `ViewContainerRef.createComponent()`.
|
4683 | *
|
4684 | * @see [Entry Components](guide/entry-components)
|
4685 | * @deprecated
|
4686 | * Since 9.0.0. With Ivy, this property is no longer necessary.
|
4687 | * (You may need to keep these if building a library that will be consumed by a View Engine
|
4688 | * application.)
|
4689 | */
|
4690 | entryComponents?: Array<Type<any> | any[]>;
|
4691 | /**
|
4692 | * The set of components that are bootstrapped when
|
4693 | * this module is bootstrapped. The components listed here
|
4694 | * are automatically added to `entryComponents`.
|
4695 | */
|
4696 | bootstrap?: Array<Type<any> | any[]>;
|
4697 | /**
|
4698 | * The set of schemas that declare elements to be allowed in the NgModule.
|
4699 | * Elements and properties that are neither Angular components nor directives
|
4700 | * must be declared in a schema.
|
4701 | *
|
4702 | * Allowed value are `NO_ERRORS_SCHEMA` and `CUSTOM_ELEMENTS_SCHEMA`.
|
4703 | *
|
4704 | * @security When using one of `NO_ERRORS_SCHEMA` or `CUSTOM_ELEMENTS_SCHEMA`
|
4705 | * you must ensure that allowed elements and properties securely escape inputs.
|
4706 | */
|
4707 | schemas?: Array<SchemaMetadata | any[]>;
|
4708 | /**
|
4709 | * A name or path that uniquely identifies this NgModule in `getModuleFactory`.
|
4710 | * If left `undefined`, the NgModule is not registered with
|
4711 | * `getModuleFactory`.
|
4712 | */
|
4713 | id?: string;
|
4714 | /**
|
4715 | * When present, this module is ignored by the AOT compiler.
|
4716 | * It remains in distributed code, and the JIT compiler attempts to compile it
|
4717 | * at run time, in the browser.
|
4718 | * To ensure the correct behavior, the app must import `@angular/compiler`.
|
4719 | */
|
4720 | jit?: true;
|
4721 | }
|
4722 |
|
4723 | /**
|
4724 | * @Annotation
|
4725 | * @publicApi
|
4726 | */
|
4727 | export declare const NgModule: NgModuleDecorator;
|
4728 |
|
4729 | /**
|
4730 | * Type of the NgModule decorator / constructor function.
|
4731 | *
|
4732 | * @publicApi
|
4733 | */
|
4734 | export declare interface NgModuleDecorator {
|
4735 | /**
|
4736 | * Decorator that marks a class as an NgModule and supplies configuration metadata.
|
4737 | */
|
4738 | (obj?: NgModule): TypeDecorator;
|
4739 | new (obj?: NgModule): NgModule;
|
4740 | }
|
4741 |
|
4742 | declare interface NgModuleDefinition extends Definition<NgModuleDefinitionFactory> {
|
4743 | providers: NgModuleProviderDef[];
|
4744 | providersByKey: {
|
4745 | [tokenKey: string]: NgModuleProviderDef;
|
4746 | };
|
4747 | modules: any[];
|
4748 | scope: 'root' | 'platform' | null;
|
4749 | }
|
4750 |
|
4751 | declare interface NgModuleDefinitionFactory extends DefinitionFactory<NgModuleDefinition> {
|
4752 | }
|
4753 |
|
4754 | /**
|
4755 | * @publicApi
|
4756 | */
|
4757 | export declare abstract class NgModuleFactory<T> {
|
4758 | abstract get moduleType(): Type<T>;
|
4759 | abstract create(parentInjector: Injector | null): NgModuleRef<T>;
|
4760 | }
|
4761 |
|
4762 | /**
|
4763 | * Used to load ng module factories.
|
4764 | *
|
4765 | * @publicApi
|
4766 | * @deprecated the `string` form of `loadChildren` is deprecated, and `NgModuleFactoryLoader` is
|
4767 | * part of its implementation. See `LoadChildren` for more details.
|
4768 | */
|
4769 | export declare abstract class NgModuleFactoryLoader {
|
4770 | abstract load(path: string): Promise<NgModuleFactory<any>>;
|
4771 | }
|
4772 |
|
4773 | declare interface NgModuleProviderDef {
|
4774 | flags: ɵNodeFlags;
|
4775 | index: number;
|
4776 | token: any;
|
4777 | value: any;
|
4778 | deps: DepDef[];
|
4779 | }
|
4780 |
|
4781 | /**
|
4782 | * Represents an instance of an `NgModule` created by an `NgModuleFactory`.
|
4783 | * Provides access to the `NgModule` instance and related objects.
|
4784 | *
|
4785 | * @publicApi
|
4786 | */
|
4787 | export declare abstract class NgModuleRef<T> {
|
4788 | /**
|
4789 | * The injector that contains all of the providers of the `NgModule`.
|
4790 | */
|
4791 | abstract get injector(): Injector;
|
4792 | /**
|
4793 | * The resolver that can retrieve the component factories
|
4794 | * declared in the `entryComponents` property of the module.
|
4795 | */
|
4796 | abstract get componentFactoryResolver(): ComponentFactoryResolver;
|
4797 | /**
|
4798 | * The `NgModule` instance.
|
4799 | */
|
4800 | abstract get instance(): T;
|
4801 | /**
|
4802 | * Destroys the module instance and all of the data structures associated with it.
|
4803 | */
|
4804 | abstract destroy(): void;
|
4805 | /**
|
4806 | * Registers a callback to be executed when the module is destroyed.
|
4807 | */
|
4808 | abstract onDestroy(callback: () => void): void;
|
4809 | }
|
4810 |
|
4811 | /**
|
4812 | * A token for third-party components that can register themselves with NgProbe.
|
4813 | *
|
4814 | * @publicApi
|
4815 | */
|
4816 | export declare class NgProbeToken {
|
4817 | name: string;
|
4818 | token: any;
|
4819 | constructor(name: string, token: any);
|
4820 | }
|
4821 |
|
4822 | /**
|
4823 | * An injectable service for executing work inside or outside of the Angular zone.
|
4824 | *
|
4825 | * The most common use of this service is to optimize performance when starting a work consisting of
|
4826 | * one or more asynchronous tasks that don't require UI updates or error handling to be handled by
|
4827 | * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks
|
4828 | * can reenter the Angular zone via {@link #run}.
|
4829 | *
|
4830 | * <!-- TODO: add/fix links to:
|
4831 | * - docs explaining zones and the use of zones in Angular and change-detection
|
4832 | * - link to runOutsideAngular/run (throughout this file!)
|
4833 | * -->
|
4834 | *
|
4835 | * @usageNotes
|
4836 | * ### Example
|
4837 | *
|
4838 | * ```
|
4839 | * import {Component, NgZone} from '@angular/core';
|
4840 | * import {NgIf} from '@angular/common';
|
4841 | *
|
4842 | * @Component({
|
4843 | * selector: 'ng-zone-demo',
|
4844 | * template: `
|
4845 | * <h2>Demo: NgZone</h2>
|
4846 | *
|
4847 | * <p>Progress: {{progress}}%</p>
|
4848 | * <p *ngIf="progress >= 100">Done processing {{label}} of Angular zone!</p>
|
4849 | *
|
4850 | * <button (click)="processWithinAngularZone()">Process within Angular zone</button>
|
4851 | * <button (click)="processOutsideOfAngularZone()">Process outside of Angular zone</button>
|
4852 | * `,
|
4853 | * })
|
4854 | * export class NgZoneDemo {
|
4855 | * progress: number = 0;
|
4856 | * label: string;
|
4857 | *
|
4858 | * constructor(private _ngZone: NgZone) {}
|
4859 | *
|
4860 | * // Loop inside the Angular zone
|
4861 | * // so the UI DOES refresh after each setTimeout cycle
|
4862 | * processWithinAngularZone() {
|
4863 | * this.label = 'inside';
|
4864 | * this.progress = 0;
|
4865 | * this._increaseProgress(() => console.log('Inside Done!'));
|
4866 | * }
|
4867 | *
|
4868 | * // Loop outside of the Angular zone
|
4869 | * // so the UI DOES NOT refresh after each setTimeout cycle
|
4870 | * processOutsideOfAngularZone() {
|
4871 | * this.label = 'outside';
|
4872 | * this.progress = 0;
|
4873 | * this._ngZone.runOutsideAngular(() => {
|
4874 | * this._increaseProgress(() => {
|
4875 | * // reenter the Angular zone and display done
|
4876 | * this._ngZone.run(() => { console.log('Outside Done!'); });
|
4877 | * });
|
4878 | * });
|
4879 | * }
|
4880 | *
|
4881 | * _increaseProgress(doneCallback: () => void) {
|
4882 | * this.progress += 1;
|
4883 | * console.log(`Current progress: ${this.progress}%`);
|
4884 | *
|
4885 | * if (this.progress < 100) {
|
4886 | * window.setTimeout(() => this._increaseProgress(doneCallback), 10);
|
4887 | * } else {
|
4888 | * doneCallback();
|
4889 | * }
|
4890 | * }
|
4891 | * }
|
4892 | * ```
|
4893 | *
|
4894 | * @publicApi
|
4895 | */
|
4896 | export declare class NgZone {
|
4897 | readonly hasPendingMacrotasks: boolean;
|
4898 | readonly hasPendingMicrotasks: boolean;
|
4899 | /**
|
4900 | * Whether there are no outstanding microtasks or macrotasks.
|
4901 | */
|
4902 | readonly isStable: boolean;
|
4903 | /**
|
4904 | * Notifies when code enters Angular Zone. This gets fired first on VM Turn.
|
4905 | */
|
4906 | readonly onUnstable: EventEmitter<any>;
|
4907 | /**
|
4908 | * Notifies when there is no more microtasks enqueued in the current VM Turn.
|
4909 | * This is a hint for Angular to do change detection, which may enqueue more microtasks.
|
4910 | * For this reason this event can fire multiple times per VM Turn.
|
4911 | */
|
4912 | readonly onMicrotaskEmpty: EventEmitter<any>;
|
4913 | /**
|
4914 | * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which
|
4915 | * implies we are about to relinquish VM turn.
|
4916 | * This event gets called just once.
|
4917 | */
|
4918 | readonly onStable: EventEmitter<any>;
|
4919 | /**
|
4920 | * Notifies that an error has been delivered.
|
4921 | */
|
4922 | readonly onError: EventEmitter<any>;
|
4923 | constructor({ enableLongStackTrace, shouldCoalesceEventChangeDetection, shouldCoalesceRunChangeDetection }: {
|
4924 | enableLongStackTrace?: boolean | undefined;
|
4925 | shouldCoalesceEventChangeDetection?: boolean | undefined;
|
4926 | shouldCoalesceRunChangeDetection?: boolean | undefined;
|
4927 | });
|
4928 | static isInAngularZone(): boolean;
|
4929 | static assertInAngularZone(): void;
|
4930 | static assertNotInAngularZone(): void;
|
4931 | /**
|
4932 | * Executes the `fn` function synchronously within the Angular zone and returns value returned by
|
4933 | * the function.
|
4934 | *
|
4935 | * Running functions via `run` allows you to reenter Angular zone from a task that was executed
|
4936 | * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
|
4937 | *
|
4938 | * Any future tasks or microtasks scheduled from within this function will continue executing from
|
4939 | * within the Angular zone.
|
4940 | *
|
4941 | * If a synchronous error happens it will be rethrown and not reported via `onError`.
|
4942 | */
|
4943 | run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T;
|
4944 | /**
|
4945 | * Executes the `fn` function synchronously within the Angular zone as a task and returns value
|
4946 | * returned by the function.
|
4947 | *
|
4948 | * Running functions via `run` allows you to reenter Angular zone from a task that was executed
|
4949 | * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
|
4950 | *
|
4951 | * Any future tasks or microtasks scheduled from within this function will continue executing from
|
4952 | * within the Angular zone.
|
4953 | *
|
4954 | * If a synchronous error happens it will be rethrown and not reported via `onError`.
|
4955 | */
|
4956 | runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[], name?: string): T;
|
4957 | /**
|
4958 | * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not
|
4959 | * rethrown.
|
4960 | */
|
4961 | runGuarded<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T;
|
4962 | /**
|
4963 | * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by
|
4964 | * the function.
|
4965 | *
|
4966 | * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do
|
4967 | * work that
|
4968 | * doesn't trigger Angular change-detection or is subject to Angular's error handling.
|
4969 | *
|
4970 | * Any future tasks or microtasks scheduled from within this function will continue executing from
|
4971 | * outside of the Angular zone.
|
4972 | *
|
4973 | * Use {@link #run} to reenter the Angular zone and do work that updates the application model.
|
4974 | */
|
4975 | runOutsideAngular<T>(fn: (...args: any[]) => T): T;
|
4976 | }
|
4977 |
|
4978 | /**
|
4979 | * Defines a schema that allows any property on any element.
|
4980 | *
|
4981 | * This schema allows you to ignore the errors related to any unknown elements or properties in a
|
4982 | * template. The usage of this schema is generally discouraged because it prevents useful validation
|
4983 | * and may hide real errors in your template. Consider using the `CUSTOM_ELEMENTS_SCHEMA` instead.
|
4984 | *
|
4985 | * @publicApi
|
4986 | */
|
4987 | export declare const NO_ERRORS_SCHEMA: SchemaMetadata;
|
4988 |
|
4989 | declare interface NodeCheckFn {
|
4990 | (view: ViewData, nodeIndex: number, argStyle: ɵArgumentType.Dynamic, values: any[]): any;
|
4991 | (view: ViewData, nodeIndex: number, argStyle: ɵArgumentType.Inline, v0?: any, v1?: any, v2?: any, v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): any;
|
4992 | }
|
4993 |
|
4994 | /**
|
4995 | * Node instance data.
|
4996 | *
|
4997 | * We have a separate type per NodeType to save memory
|
4998 | * (TextData | ElementData | ProviderData | PureExpressionData | QueryList<any>)
|
4999 | *
|
5000 | * To keep our code monomorphic,
|
5001 | * we prohibit using `NodeData` directly but enforce the use of accessors (`asElementData`, ...).
|
5002 | * This way, no usage site can get a `NodeData` from view.nodes and then use it for different
|
5003 | * purposes.
|
5004 | */
|
5005 | declare class NodeData {
|
5006 | private __brand;
|
5007 | }
|
5008 |
|
5009 | /**
|
5010 | * A node definition in the view.
|
5011 | *
|
5012 | * Note: We use one type for all nodes so that loops that loop over all nodes
|
5013 | * of a ViewDefinition stay monomorphic!
|
5014 | */
|
5015 | declare interface NodeDef {
|
5016 | flags: ɵNodeFlags;
|
5017 | nodeIndex: number;
|
5018 | checkIndex: number;
|
5019 | parent: NodeDef | null;
|
5020 | renderParent: NodeDef | null;
|
5021 | /** this is checked against NgContentDef.index to find matched nodes */
|
5022 | ngContentIndex: number | null;
|
5023 | /** number of transitive children */
|
5024 | childCount: number;
|
5025 | /** aggregated NodeFlags for all transitive children (does not include self) **/
|
5026 | childFlags: ɵNodeFlags;
|
5027 | /** aggregated NodeFlags for all direct children (does not include self) **/
|
5028 | directChildFlags: ɵNodeFlags;
|
5029 | bindingIndex: number;
|
5030 | bindings: BindingDef[];
|
5031 | bindingFlags: ɵBindingFlags;
|
5032 | outputIndex: number;
|
5033 | outputs: OutputDef[];
|
5034 | /**
|
5035 | * references that the user placed on the element
|
5036 | */
|
5037 | references: {
|
5038 | [refId: string]: ɵQueryValueType;
|
5039 | };
|
5040 | /**
|
5041 | * ids and value types of all queries that are matched by this node.
|
5042 | */
|
5043 | matchedQueries: {
|
5044 | [queryId: number]: ɵQueryValueType;
|
5045 | };
|
5046 | /** Binary or of all matched query ids of this node. */
|
5047 | matchedQueryIds: number;
|
5048 | /**
|
5049 | * Binary or of all query ids that are matched by one of the children.
|
5050 | * This includes query ids from templates as well.
|
5051 | * Used as a bloom filter.
|
5052 | */
|
5053 | childMatchedQueries: number;
|
5054 | element: ElementDef | null;
|
5055 | provider: ProviderDef | null;
|
5056 | text: TextDef | null;
|
5057 | query: QueryDef | null;
|
5058 | ngContent: NgContentDef | null;
|
5059 | }
|
5060 |
|
5061 | declare interface NodeInjectorDebug {
|
5062 | /**
|
5063 | * Instance bloom. Does the current injector have a provider with a given bloom mask.
|
5064 | */
|
5065 | bloom: string;
|
5066 | /**
|
5067 | * Cumulative bloom. Do any of the above injectors have a provider with a given bloom mask.
|
5068 | */
|
5069 | cumulativeBloom: string;
|
5070 | /**
|
5071 | * A list of providers associated with this injector.
|
5072 | */
|
5073 | providers: (Type<unknown> | ɵDirectiveDef<unknown> | ɵComponentDef<unknown>)[];
|
5074 | /**
|
5075 | * A list of providers associated with this injector visible to the view of the component only.
|
5076 | */
|
5077 | viewProviders: Type<unknown>[];
|
5078 | /**
|
5079 | * Location of the parent `TNode`.
|
5080 | */
|
5081 | parentInjectorIndex: number;
|
5082 | }
|
5083 |
|
5084 | /**
|
5085 | * Function to call console.error at the right source location. This is an indirection
|
5086 | * via another function as browser will log the location that actually called
|
5087 | * `console.error`.
|
5088 | */
|
5089 | declare interface NodeLogger {
|
5090 | (): () => void;
|
5091 | }
|
5092 |
|
5093 | /**
|
5094 | * Object Oriented style of API needed to create elements and text nodes.
|
5095 | *
|
5096 | * This is the native browser API style, e.g. operations are methods on individual objects
|
5097 | * like HTMLElement. With this style, no additional code is needed as a facade
|
5098 | * (reducing payload size).
|
5099 | * */
|
5100 | declare interface ObjectOrientedRenderer3 {
|
5101 | createComment(data: string): RComment;
|
5102 | createElement(tagName: string): RElement;
|
5103 | createElementNS(namespace: string, tagName: string): RElement;
|
5104 | createTextNode(data: string): RText;
|
5105 | querySelector(selectors: string): RElement | null;
|
5106 | }
|
5107 |
|
5108 | /**
|
5109 | * @description
|
5110 | * A lifecycle hook that is called when any data-bound property of a directive changes.
|
5111 | * Define an `ngOnChanges()` method to handle the changes.
|
5112 | *
|
5113 | * @see `DoCheck`
|
5114 | * @see `OnInit`
|
5115 | * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
|
5116 | *
|
5117 | * @usageNotes
|
5118 | * The following snippet shows how a component can implement this interface to
|
5119 | * define an on-changes handler for an input property.
|
5120 | *
|
5121 | * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnChanges'}
|
5122 | *
|
5123 | * @publicApi
|
5124 | */
|
5125 | export declare interface OnChanges {
|
5126 | /**
|
5127 | * A callback method that is invoked immediately after the
|
5128 | * default change detector has checked data-bound properties
|
5129 | * if at least one has changed, and before the view and content
|
5130 | * children are checked.
|
5131 | * @param changes The changed properties.
|
5132 | */
|
5133 | ngOnChanges(changes: SimpleChanges): void;
|
5134 | }
|
5135 |
|
5136 | /**
|
5137 | * A lifecycle hook that is called when a directive, pipe, or service is destroyed.
|
5138 | * Use for any custom cleanup that needs to occur when the
|
5139 | * instance is destroyed.
|
5140 | * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
|
5141 | *
|
5142 | * @usageNotes
|
5143 | * The following snippet shows how a component can implement this interface
|
5144 | * to define its own custom clean-up method.
|
5145 | *
|
5146 | * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnDestroy'}
|
5147 | *
|
5148 | * @publicApi
|
5149 | */
|
5150 | export declare interface OnDestroy {
|
5151 | /**
|
5152 | * A callback method that performs custom clean-up, invoked immediately
|
5153 | * before a directive, pipe, or service instance is destroyed.
|
5154 | */
|
5155 | ngOnDestroy(): void;
|
5156 | }
|
5157 |
|
5158 | /**
|
5159 | * @description
|
5160 | * A lifecycle hook that is called after Angular has initialized
|
5161 | * all data-bound properties of a directive.
|
5162 | * Define an `ngOnInit()` method to handle any additional initialization tasks.
|
5163 | *
|
5164 | * @see `AfterContentInit`
|
5165 | * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
|
5166 | *
|
5167 | * @usageNotes
|
5168 | * The following snippet shows how a component can implement this interface to
|
5169 | * define its own initialization method.
|
5170 | *
|
5171 | * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnInit'}
|
5172 | *
|
5173 | * @publicApi
|
5174 | */
|
5175 | export declare interface OnInit {
|
5176 | /**
|
5177 | * A callback method that is invoked immediately after the
|
5178 | * default change detector has checked the directive's
|
5179 | * data-bound properties for the first time,
|
5180 | * and before any of the view or content children have been checked.
|
5181 | * It is invoked only once when the directive is instantiated.
|
5182 | */
|
5183 | ngOnInit(): void;
|
5184 | }
|
5185 |
|
5186 | declare type OpaqueValue = unknown;
|
5187 |
|
5188 | declare interface OpaqueViewState {
|
5189 | '__brand__': 'Brand for OpaqueViewState that nothing will match';
|
5190 | }
|
5191 |
|
5192 | /**
|
5193 | * Type of the Optional metadata.
|
5194 | *
|
5195 | * @publicApi
|
5196 | */
|
5197 | export declare interface Optional {
|
5198 | }
|
5199 |
|
5200 | /**
|
5201 | * Optional decorator and metadata.
|
5202 | *
|
5203 | * @Annotation
|
5204 | * @publicApi
|
5205 | */
|
5206 | export declare const Optional: OptionalDecorator;
|
5207 |
|
5208 | /**
|
5209 | * Type of the Optional decorator / constructor function.
|
5210 | *
|
5211 | * @publicApi
|
5212 | */
|
5213 | export declare interface OptionalDecorator {
|
5214 | /**
|
5215 | * Parameter decorator to be used on constructor parameters,
|
5216 | * which marks the parameter as being an optional dependency.
|
5217 | * The DI framework provides `null` if the dependency is not found.
|
5218 | *
|
5219 | * Can be used together with other parameter decorators
|
5220 | * that modify how dependency injection operates.
|
5221 | *
|
5222 | * @usageNotes
|
5223 | *
|
5224 | * The following code allows the possibility of a `null` result:
|
5225 | *
|
5226 | * <code-example path="core/di/ts/metadata_spec.ts" region="Optional">
|
5227 | * </code-example>
|
5228 | *
|
5229 | * @see ["Dependency Injection Guide"](guide/dependency-injection).
|
5230 | */
|
5231 | (): any;
|
5232 | new (): Optional;
|
5233 | }
|
5234 |
|
5235 | /**
|
5236 | * Type of the Output metadata.
|
5237 | *
|
5238 | * @publicApi
|
5239 | */
|
5240 | export declare interface Output {
|
5241 | /**
|
5242 | * The name of the DOM property to which the output property is bound.
|
5243 | */
|
5244 | bindingPropertyName?: string;
|
5245 | }
|
5246 |
|
5247 | /**
|
5248 | * @Annotation
|
5249 | * @publicApi
|
5250 | */
|
5251 | export declare const Output: OutputDecorator;
|
5252 |
|
5253 | /**
|
5254 | * Type of the Output decorator / constructor function.
|
5255 | *
|
5256 | * @publicApi
|
5257 | */
|
5258 | export declare interface OutputDecorator {
|
5259 | /**
|
5260 | * Decorator that marks a class field as an output property and supplies configuration metadata.
|
5261 | * The DOM property bound to the output property is automatically updated during change detection.
|
5262 | *
|
5263 | * @usageNotes
|
5264 | *
|
5265 | * You can supply an optional name to use in templates when the
|
5266 | * component is instantiated, that maps to the
|
5267 | * name of the bound property. By default, the original
|
5268 | * name of the bound property is used for output binding.
|
5269 | *
|
5270 | * See `Input` decorator for an example of providing a binding name.
|
5271 | *
|
5272 | * @see [Input and Output properties](guide/inputs-outputs)
|
5273 | *
|
5274 | */
|
5275 | (bindingPropertyName?: string): any;
|
5276 | new (bindingPropertyName?: string): any;
|
5277 | }
|
5278 |
|
5279 | declare interface OutputDef {
|
5280 | type: OutputType;
|
5281 | target: 'window' | 'document' | 'body' | 'component' | null;
|
5282 | eventName: string;
|
5283 | propName: string | null;
|
5284 | }
|
5285 |
|
5286 | declare const enum OutputType {
|
5287 | ElementOutput = 0,
|
5288 | DirectiveOutput = 1
|
5289 | }
|
5290 |
|
5291 | /**
|
5292 | * A [DI token](guide/glossary#di-token "DI token definition") that indicates the root directory of
|
5293 | * the application
|
5294 | * @publicApi
|
5295 | */
|
5296 | export declare const PACKAGE_ROOT_URL: InjectionToken<string>;
|
5297 |
|
5298 | declare const PARENT = 3;
|
5299 |
|
5300 | /**
|
5301 | * Type of the Pipe metadata.
|
5302 | *
|
5303 | * @publicApi
|
5304 | */
|
5305 | export declare interface Pipe {
|
5306 | /**
|
5307 | * The pipe name to use in template bindings.
|
5308 | * Typically uses [lowerCamelCase](guide/glossary#case-types)
|
5309 | * because the name cannot contain hyphens.
|
5310 | */
|
5311 | name: string;
|
5312 | /**
|
5313 | * When true, the pipe is pure, meaning that the
|
5314 | * `transform()` method is invoked only when its input arguments
|
5315 | * change. Pipes are pure by default.
|
5316 | *
|
5317 | * If the pipe has internal state (that is, the result
|
5318 | * depends on state other than its arguments), set `pure` to false.
|
5319 | * In this case, the pipe is invoked on each change-detection cycle,
|
5320 | * even if the arguments have not changed.
|
5321 | */
|
5322 | pure?: boolean;
|
5323 | }
|
5324 |
|
5325 | /**
|
5326 | * @Annotation
|
5327 | * @publicApi
|
5328 | */
|
5329 | export declare const Pipe: PipeDecorator;
|
5330 |
|
5331 | /**
|
5332 | * Type of the Pipe decorator / constructor function.
|
5333 | *
|
5334 | * @publicApi
|
5335 | */
|
5336 | export declare interface PipeDecorator {
|
5337 | /**
|
5338 | *
|
5339 | * Decorator that marks a class as pipe and supplies configuration metadata.
|
5340 | *
|
5341 | * A pipe class must implement the `PipeTransform` interface.
|
5342 | * For example, if the name is "myPipe", use a template binding expression
|
5343 | * such as the following:
|
5344 | *
|
5345 | * ```
|
5346 | * {{ exp | myPipe }}
|
5347 | * ```
|
5348 | *
|
5349 | * The result of the expression is passed to the pipe's `transform()` method.
|
5350 | *
|
5351 | * A pipe must belong to an NgModule in order for it to be available
|
5352 | * to a template. To make it a member of an NgModule,
|
5353 | * list it in the `declarations` field of the `NgModule` metadata.
|
5354 | *
|
5355 | * @see [Style Guide: Pipe Names](guide/styleguide#02-09)
|
5356 | *
|
5357 | */
|
5358 | (obj: Pipe): TypeDecorator;
|
5359 | /**
|
5360 | * See the `Pipe` decorator.
|
5361 | */
|
5362 | new (obj: Pipe): Pipe;
|
5363 | }
|
5364 |
|
5365 | declare type PipeDefList = ɵPipeDef<any>[];
|
5366 |
|
5367 | /**
|
5368 | * Type used for PipeDefs on component definition.
|
5369 | *
|
5370 | * The function is necessary to be able to support forward declarations.
|
5371 | */
|
5372 | declare type PipeDefListOrFactory = (() => PipeDefList) | PipeDefList;
|
5373 |
|
5374 |
|
5375 | /**
|
5376 | * An interface that is implemented by pipes in order to perform a transformation.
|
5377 | * Angular invokes the `transform` method with the value of a binding
|
5378 | * as the first argument, and any parameters as the second argument in list form.
|
5379 | *
|
5380 | * @usageNotes
|
5381 | *
|
5382 | * In the following example, `TruncatePipe` returns the shortened value with an added ellipses.
|
5383 | *
|
5384 | * <code-example path="core/ts/pipes/simple_truncate.ts" header="simple_truncate.ts"></code-example>
|
5385 | *
|
5386 | * Invoking `{{ 'It was the best of times' | truncate }}` in a template will produce `It was...`.
|
5387 | *
|
5388 | * In the following example, `TruncatePipe` takes parameters that sets the truncated length and the
|
5389 | * string to append with.
|
5390 | *
|
5391 | * <code-example path="core/ts/pipes/truncate.ts" header="truncate.ts"></code-example>
|
5392 | *
|
5393 | * Invoking `{{ 'It was the best of times' | truncate:4:'....' }}` in a template will produce `It
|
5394 | * was the best....`.
|
5395 | *
|
5396 | * @publicApi
|
5397 | */
|
5398 | export declare interface PipeTransform {
|
5399 | transform(value: any, ...args: any[]): any;
|
5400 | }
|
5401 |
|
5402 | /**
|
5403 | * A subclass of `Type` which has a static `ɵpipe`:`PipeDef` field making it
|
5404 | * consumable for rendering.
|
5405 | */
|
5406 | declare interface PipeType<T> extends Type<T> {
|
5407 | ɵpipe: unknown;
|
5408 | }
|
5409 |
|
5410 | declare type PipeTypeList = (PipeType<any> | Type<any>)[];
|
5411 |
|
5412 | declare type PipeTypesOrFactory = (() => PipeTypeList) | PipeTypeList;
|
5413 |
|
5414 | /**
|
5415 | * A token that indicates an opaque platform ID.
|
5416 | * @publicApi
|
5417 | */
|
5418 | export declare const PLATFORM_ID: InjectionToken<Object>;
|
5419 |
|
5420 | /**
|
5421 | * A function that is executed when a platform is initialized.
|
5422 | * @publicApi
|
5423 | */
|
5424 | export declare const PLATFORM_INITIALIZER: InjectionToken<(() => void)[]>;
|
5425 |
|
5426 | /**
|
5427 | * This platform has to be included in any other platform
|
5428 | *
|
5429 | * @publicApi
|
5430 | */
|
5431 | export declare const platformCore: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
|
5432 |
|
5433 | /**
|
5434 | * The Angular platform is the entry point for Angular on a web page.
|
5435 | * Each page has exactly one platform. Services (such as reflection) which are common
|
5436 | * to every Angular application running on the page are bound in its scope.
|
5437 | * A page's platform is initialized implicitly when a platform is created using a platform
|
5438 | * factory such as `PlatformBrowser`, or explicitly by calling the `createPlatform()` function.
|
5439 | *
|
5440 | * @publicApi
|
5441 | */
|
5442 | export declare class PlatformRef {
|
5443 | private _injector;
|
5444 | private _modules;
|
5445 | private _destroyListeners;
|
5446 | private _destroyed;
|
5447 | /**
|
5448 | * Creates an instance of an `@NgModule` for the given platform for offline compilation.
|
5449 | *
|
5450 | * @usageNotes
|
5451 | *
|
5452 | * The following example creates the NgModule for a browser platform.
|
5453 | *
|
5454 | * ```typescript
|
5455 | * my_module.ts:
|
5456 | *
|
5457 | * @NgModule({
|
5458 | * imports: [BrowserModule]
|
5459 | * })
|
5460 | * class MyModule {}
|
5461 | *
|
5462 | * main.ts:
|
5463 | * import {MyModuleNgFactory} from './my_module.ngfactory';
|
5464 | * import {platformBrowser} from '@angular/platform-browser';
|
5465 | *
|
5466 | * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);
|
5467 | * ```
|
5468 | */
|
5469 | bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>, options?: BootstrapOptions): Promise<NgModuleRef<M>>;
|
5470 | /**
|
5471 | * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.
|
5472 | *
|
5473 | * @usageNotes
|
5474 | * ### Simple Example
|
5475 | *
|
5476 | * ```typescript
|
5477 | * @NgModule({
|
5478 | * imports: [BrowserModule]
|
5479 | * })
|
5480 | * class MyModule {}
|
5481 | *
|
5482 | * let moduleRef = platformBrowser().bootstrapModule(MyModule);
|
5483 | * ```
|
5484 | *
|
5485 | */
|
5486 | bootstrapModule<M>(moduleType: Type<M>, compilerOptions?: (CompilerOptions & BootstrapOptions) | Array<CompilerOptions & BootstrapOptions>): Promise<NgModuleRef<M>>;
|
5487 | private _moduleDoBootstrap;
|
5488 | /**
|
5489 | * Registers a listener to be called when the platform is destroyed.
|
5490 | */
|
5491 | onDestroy(callback: () => void): void;
|
5492 | /**
|
5493 | * Retrieves the platform {@link Injector}, which is the parent injector for
|
5494 | * every Angular application on the page and provides singleton providers.
|
5495 | */
|
5496 | get injector(): Injector;
|
5497 | /**
|
5498 | * Destroys the current Angular platform and all Angular applications on the page.
|
5499 | * Destroys all modules and listeners registered with the platform.
|
5500 | */
|
5501 | destroy(): void;
|
5502 | get destroyed(): boolean;
|
5503 | }
|
5504 |
|
5505 | declare interface PlatformReflectionCapabilities {
|
5506 | isReflectionEnabled(): boolean;
|
5507 | factory(type: Type<any>): Function;
|
5508 | hasLifecycleHook(type: any, lcProperty: string): boolean;
|
5509 | guards(type: any): {
|
5510 | [key: string]: any;
|
5511 | };
|
5512 | /**
|
5513 | * Return a list of annotations/types for constructor parameters
|
5514 | */
|
5515 | parameters(type: Type<any>): any[][];
|
5516 | /**
|
5517 | * Return a list of annotations declared on the class
|
5518 | */
|
5519 | annotations(type: Type<any>): any[];
|
5520 | /**
|
5521 | * Return a object literal which describes the annotations on Class fields/properties.
|
5522 | */
|
5523 | propMetadata(typeOrFunc: Type<any>): {
|
5524 | [key: string]: any[];
|
5525 | };
|
5526 | getter(name: string): ɵGetterFn;
|
5527 | setter(name: string): ɵSetterFn;
|
5528 | method(name: string): ɵMethodFn;
|
5529 | importUri(type: Type<any>): string;
|
5530 | resourceUri(type: Type<any>): string;
|
5531 | resolveIdentifier(name: string, moduleUrl: string, members: string[], runtime: any): any;
|
5532 | resolveEnum(enumIdentifier: any, name: string): any;
|
5533 | }
|
5534 |
|
5535 | /**
|
5536 | * A boolean-valued function over a value, possibly including context information
|
5537 | * regarding that value's position in an array.
|
5538 | *
|
5539 | * @publicApi
|
5540 | */
|
5541 | export declare interface Predicate<T> {
|
5542 | (value: T): boolean;
|
5543 | }
|
5544 |
|
5545 | declare const PREORDER_HOOK_FLAGS = 18;
|
5546 |
|
5547 | /** More flags associated with an LView (saved in LView[PREORDER_HOOK_FLAGS]) */
|
5548 | declare const enum PreOrderHookFlags {
|
5549 | /**
|
5550 | The index of the next pre-order hook to be called in the hooks array, on the first 16
|
5551 | bits
|
5552 | */
|
5553 | IndexOfTheNextPreOrderHookMaskMask = 65535,
|
5554 | /**
|
5555 | * The number of init hooks that have already been called, on the last 16 bits
|
5556 | */
|
5557 | NumberOfInitHooksCalledIncrementer = 65536,
|
5558 | NumberOfInitHooksCalledShift = 16,
|
5559 | NumberOfInitHooksCalledMask = 4294901760
|
5560 | }
|
5561 |
|
5562 | /**
|
5563 | * Procedural style of API needed to create elements and text nodes.
|
5564 | *
|
5565 | * In non-native browser environments (e.g. platforms such as web-workers), this is the
|
5566 | * facade that enables element manipulation. This also facilitates backwards compatibility
|
5567 | * with Renderer2.
|
5568 | */
|
5569 | declare interface ProceduralRenderer3 {
|
5570 | destroy(): void;
|
5571 | createComment(value: string): RComment;
|
5572 | createElement(name: string, namespace?: string | null): RElement;
|
5573 | createText(value: string): RText;
|
5574 | /**
|
5575 | * This property is allowed to be null / undefined,
|
5576 | * in which case the view engine won't call it.
|
5577 | * This is used as a performance optimization for production mode.
|
5578 | */
|
5579 | destroyNode?: ((node: RNode) => void) | null;
|
5580 | appendChild(parent: RElement, newChild: RNode): void;
|
5581 | insertBefore(parent: RNode, newChild: RNode, refChild: RNode | null, isMove?: boolean): void;
|
5582 | removeChild(parent: RElement, oldChild: RNode, isHostElement?: boolean): void;
|
5583 | selectRootElement(selectorOrNode: string | any, preserveContent?: boolean): RElement;
|
5584 | parentNode(node: RNode): RElement | null;
|
5585 | nextSibling(node: RNode): RNode | null;
|
5586 | setAttribute(el: RElement, name: string, value: string | TrustedHTML | TrustedScript | TrustedScriptURL, namespace?: string | null): void;
|
5587 | removeAttribute(el: RElement, name: string, namespace?: string | null): void;
|
5588 | addClass(el: RElement, name: string): void;
|
5589 | removeClass(el: RElement, name: string): void;
|
5590 | setStyle(el: RElement, style: string, value: any, flags?: RendererStyleFlags2 | RendererStyleFlags3): void;
|
5591 | removeStyle(el: RElement, style: string, flags?: RendererStyleFlags2 | RendererStyleFlags3): void;
|
5592 | setProperty(el: RElement, name: string, value: any): void;
|
5593 | setValue(node: RText | RComment, value: string): void;
|
5594 | listen(target: GlobalTargetName | RNode, eventName: string, callback: (event: any) => boolean | void): () => void;
|
5595 | }
|
5596 |
|
5597 | /**
|
5598 | * Describes a function that is used to process provider lists (such as provider
|
5599 | * overrides).
|
5600 | */
|
5601 | declare type ProcessProvidersFunction = (providers: Provider[]) => Provider[];
|
5602 |
|
5603 | /**
|
5604 | * List of slots for a projection. A slot can be either based on a parsed CSS selector
|
5605 | * which will be used to determine nodes which are projected into that slot.
|
5606 | *
|
5607 | * When set to "*", the slot is reserved and can be used for multi-slot projection
|
5608 | * using {@link ViewContainerRef#createComponent}. The last slot that specifies the
|
5609 | * wildcard selector will retrieve all projectable nodes which do not match any selector.
|
5610 | */
|
5611 | declare type ProjectionSlots = (ɵCssSelectorList | '*')[];
|
5612 |
|
5613 | /**
|
5614 | * This mapping is necessary so we can set input properties and output listeners
|
5615 | * properly at runtime when property names are minified or aliased.
|
5616 | *
|
5617 | * Key: unminified / public input or output name
|
5618 | * Value: array containing minified / internal name and related directive index
|
5619 | *
|
5620 | * The value must be an array to support inputs and outputs with the same name
|
5621 | * on the same node.
|
5622 | */
|
5623 | declare type PropertyAliases = {
|
5624 | [key: string]: PropertyAliasValue;
|
5625 | };
|
5626 |
|
5627 | /**
|
5628 | * Store the runtime input or output names for all the directives.
|
5629 | *
|
5630 | * i+0: directive instance index
|
5631 | * i+1: privateName
|
5632 | *
|
5633 | * e.g. [0, 'change-minified']
|
5634 | */
|
5635 | declare type PropertyAliasValue = (number | string)[];
|
5636 |
|
5637 | /**
|
5638 | * Describes how the `Injector` should be configured.
|
5639 | * @see ["Dependency Injection Guide"](guide/dependency-injection).
|
5640 | *
|
5641 | * @see `StaticProvider`
|
5642 | *
|
5643 | * @publicApi
|
5644 | */
|
5645 | export declare type Provider = TypeProvider | ValueProvider | ClassProvider | ConstructorProvider | ExistingProvider | FactoryProvider | any[];
|
5646 |
|
5647 | declare interface ProviderDef {
|
5648 | token: any;
|
5649 | value: any;
|
5650 | deps: DepDef[];
|
5651 | }
|
5652 |
|
5653 | declare interface ProviderOverride {
|
5654 | token: any;
|
5655 | flags: ɵNodeFlags;
|
5656 | value: any;
|
5657 | deps: ([ɵDepFlags, any] | any)[];
|
5658 | deprecatedBehavior: boolean;
|
5659 | }
|
5660 |
|
5661 | /**
|
5662 | * @description
|
5663 | *
|
5664 | * Token that can be used to retrieve an instance from an injector or through a query.
|
5665 | *
|
5666 | * @publicApi
|
5667 | */
|
5668 | export declare type ProviderToken<T> = Type<T> | AbstractType<T> | InjectionToken<T>;
|
5669 |
|
5670 | /**
|
5671 | * Testability API.
|
5672 | * `declare` keyword causes tsickle to generate externs, so these methods are
|
5673 | * not renamed by Closure Compiler.
|
5674 | * @publicApi
|
5675 | */
|
5676 | declare interface PublicTestability {
|
5677 | isStable(): boolean;
|
5678 | whenStable(callback: Function, timeout?: number, updateCallback?: Function): void;
|
5679 | findProviders(using: any, provider: string, exactMatch: boolean): any[];
|
5680 | }
|
5681 |
|
5682 | declare const QUERIES = 19;
|
5683 |
|
5684 | /**
|
5685 | * Type of the Query metadata.
|
5686 | *
|
5687 | * @publicApi
|
5688 | */
|
5689 | export declare interface Query {
|
5690 | descendants: boolean;
|
5691 | emitDistinctChangesOnly: boolean;
|
5692 | first: boolean;
|
5693 | read: any;
|
5694 | isViewQuery: boolean;
|
5695 | selector: any;
|
5696 | static?: boolean;
|
5697 | }
|
5698 |
|
5699 | /**
|
5700 | * Base class for query metadata.
|
5701 | *
|
5702 | * @see `ContentChildren`.
|
5703 | * @see `ContentChild`.
|
5704 | * @see `ViewChildren`.
|
5705 | * @see `ViewChild`.
|
5706 | *
|
5707 | * @publicApi
|
5708 | */
|
5709 | export declare abstract class Query {
|
5710 | }
|
5711 |
|
5712 | declare interface QueryBindingDef {
|
5713 | propName: string;
|
5714 | bindingType: ɵQueryBindingType;
|
5715 | }
|
5716 |
|
5717 | declare interface QueryDef {
|
5718 | id: number;
|
5719 | filterId: number;
|
5720 | bindings: QueryBindingDef[];
|
5721 | }
|
5722 |
|
5723 | /**
|
5724 | * A set of flags to be used with Queries.
|
5725 | *
|
5726 | * NOTE: Ensure changes here are reflected in `packages/compiler/src/render3/view/compiler.ts`
|
5727 | */
|
5728 | declare const enum QueryFlags {
|
5729 | /**
|
5730 | * No flags
|
5731 | */
|
5732 | none = 0,
|
5733 | /**
|
5734 | * Whether or not the query should descend into children.
|
5735 | */
|
5736 | descendants = 1,
|
5737 | /**
|
5738 | * The query can be computed statically and hence can be assigned eagerly.
|
5739 | *
|
5740 | * NOTE: Backwards compatibility with ViewEngine.
|
5741 | */
|
5742 | isStatic = 2,
|
5743 | /**
|
5744 | * If the `QueryList` should fire change event only if actual change to query was computed (vs old
|
5745 | * behavior where the change was fired whenever the query was recomputed, even if the recomputed
|
5746 | * query resulted in the same list.)
|
5747 | */
|
5748 | emitDistinctChangesOnly = 4
|
5749 | }
|
5750 |
|
5751 | /**
|
5752 | * An unmodifiable list of items that Angular keeps up to date when the state
|
5753 | * of the application changes.
|
5754 | *
|
5755 | * The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList}
|
5756 | * provide.
|
5757 | *
|
5758 | * Implements an iterable interface, therefore it can be used in both ES6
|
5759 | * javascript `for (var i of items)` loops as well as in Angular templates with
|
5760 | * `*ngFor="let i of myList"`.
|
5761 | *
|
5762 | * Changes can be observed by subscribing to the changes `Observable`.
|
5763 | *
|
5764 | * NOTE: In the future this class will implement an `Observable` interface.
|
5765 | *
|
5766 | * @usageNotes
|
5767 | * ### Example
|
5768 | * ```typescript
|
5769 | * @Component({...})
|
5770 | * class Container {
|
5771 | * @ViewChildren(Item) items:QueryList<Item>;
|
5772 | * }
|
5773 | * ```
|
5774 | *
|
5775 | * @publicApi
|
5776 | */
|
5777 | export declare class QueryList<T> implements Iterable<T> {
|
5778 | private _emitDistinctChangesOnly;
|
5779 | readonly dirty = true;
|
5780 | private _results;
|
5781 | private _changesDetected;
|
5782 | private _changes;
|
5783 | readonly length: number;
|
5784 | readonly first: T;
|
5785 | readonly last: T;
|
5786 | /**
|
5787 | * Returns `Observable` of `QueryList` notifying the subscriber of changes.
|
5788 | */
|
5789 | get changes(): Observable<any>;
|
5790 | /**
|
5791 | * @param emitDistinctChangesOnly Whether `QueryList.changes` should fire only when actual change
|
5792 | * has occurred. Or if it should fire when query is recomputed. (recomputing could resolve in
|
5793 | * the same result)
|
5794 | */
|
5795 | constructor(_emitDistinctChangesOnly?: boolean);
|
5796 | /**
|
5797 | * Returns the QueryList entry at `index`.
|
5798 | */
|
5799 | get(index: number): T | undefined;
|
5800 | /**
|
5801 | * See
|
5802 | * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
|
5803 | */
|
5804 | map<U>(fn: (item: T, index: number, array: T[]) => U): U[];
|
5805 | /**
|
5806 | * See
|
5807 | * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
|
5808 | */
|
5809 | filter(fn: (item: T, index: number, array: T[]) => boolean): T[];
|
5810 | /**
|
5811 | * See
|
5812 | * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
|
5813 | */
|
5814 | find(fn: (item: T, index: number, array: T[]) => boolean): T | undefined;
|
5815 | /**
|
5816 | * See
|
5817 | * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
|
5818 | */
|
5819 | reduce<U>(fn: (prevValue: U, curValue: T, curIndex: number, array: T[]) => U, init: U): U;
|
5820 | /**
|
5821 | * See
|
5822 | * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
|
5823 | */
|
5824 | forEach(fn: (item: T, index: number, array: T[]) => void): void;
|
5825 | /**
|
5826 | * See
|
5827 | * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
|
5828 | */
|
5829 | some(fn: (value: T, index: number, array: T[]) => boolean): boolean;
|
5830 | /**
|
5831 | * Returns a copy of the internal results list as an Array.
|
5832 | */
|
5833 | toArray(): T[];
|
5834 | toString(): string;
|
5835 | /**
|
5836 | * Updates the stored data of the query list, and resets the `dirty` flag to `false`, so that
|
5837 | * on change detection, it will not notify of changes to the queries, unless a new change
|
5838 | * occurs.
|
5839 | *
|
5840 | * @param resultsTree The query results to store
|
5841 | * @param identityAccessor Optional function for extracting stable object identity from a value
|
5842 | * in the array. This function is executed for each element of the query result list while
|
5843 | * comparing current query list with the new one (provided as a first argument of the `reset`
|
5844 | * function) to detect if the lists are different. If the function is not provided, elements
|
5845 | * are compared as is (without any pre-processing).
|
5846 | */
|
5847 | reset(resultsTree: Array<T | any[]>, identityAccessor?: (value: T) => unknown): void;
|
5848 | /**
|
5849 | * Triggers a change event by emitting on the `changes` {@link EventEmitter}.
|
5850 | */
|
5851 | notifyOnChanges(): void;
|
5852 | /** internal */
|
5853 | setDirty(): void;
|
5854 | /** internal */
|
5855 | destroy(): void;
|
5856 | [Symbol.iterator]: () => Iterator<T>;
|
5857 | }
|
5858 |
|
5859 | declare interface R3DeclareComponentFacade extends R3DeclareDirectiveFacade {
|
5860 | template: string;
|
5861 | isInline?: boolean;
|
5862 | styles?: string[];
|
5863 | components?: R3DeclareUsedDirectiveFacade[];
|
5864 | directives?: R3DeclareUsedDirectiveFacade[];
|
5865 | pipes?: {
|
5866 | [pipeName: string]: OpaqueValue | (() => OpaqueValue);
|
5867 | };
|
5868 | viewProviders?: OpaqueValue;
|
5869 | animations?: OpaqueValue;
|
5870 | changeDetection?: ChangeDetectionStrategy_2;
|
5871 | encapsulation?: ViewEncapsulation_2;
|
5872 | interpolation?: [string, string];
|
5873 | preserveWhitespaces?: boolean;
|
5874 | }
|
5875 |
|
5876 | declare interface R3DeclareDependencyMetadataFacade {
|
5877 | token: OpaqueValue;
|
5878 | attribute?: boolean;
|
5879 | host?: boolean;
|
5880 | optional?: boolean;
|
5881 | self?: boolean;
|
5882 | skipSelf?: boolean;
|
5883 | }
|
5884 |
|
5885 | declare interface R3DeclareDirectiveFacade {
|
5886 | selector?: string;
|
5887 | type: Type_2;
|
5888 | inputs?: {
|
5889 | [classPropertyName: string]: string | [string, string];
|
5890 | };
|
5891 | outputs?: {
|
5892 | [classPropertyName: string]: string;
|
5893 | };
|
5894 | host?: {
|
5895 | attributes?: {
|
5896 | [key: string]: OpaqueValue;
|
5897 | };
|
5898 | listeners?: {
|
5899 | [key: string]: string;
|
5900 | };
|
5901 | properties?: {
|
5902 | [key: string]: string;
|
5903 | };
|
5904 | classAttribute?: string;
|
5905 | styleAttribute?: string;
|
5906 | };
|
5907 | queries?: R3DeclareQueryMetadataFacade[];
|
5908 | viewQueries?: R3DeclareQueryMetadataFacade[];
|
5909 | providers?: OpaqueValue;
|
5910 | exportAs?: string[];
|
5911 | usesInheritance?: boolean;
|
5912 | usesOnChanges?: boolean;
|
5913 | }
|
5914 |
|
5915 | declare interface R3DeclareFactoryFacade {
|
5916 | type: Type_2;
|
5917 | deps: R3DeclareDependencyMetadataFacade[] | null;
|
5918 | target: ɵɵFactoryTarget;
|
5919 | }
|
5920 |
|
5921 | declare interface R3DeclareInjectableFacade {
|
5922 | type: Type_2;
|
5923 | providedIn?: Type_2 | 'root' | 'platform' | 'any' | null;
|
5924 | useClass?: OpaqueValue;
|
5925 | useFactory?: OpaqueValue;
|
5926 | useExisting?: OpaqueValue;
|
5927 | useValue?: OpaqueValue;
|
5928 | deps?: R3DeclareDependencyMetadataFacade[];
|
5929 | }
|
5930 |
|
5931 | declare interface R3DeclareInjectorFacade {
|
5932 | type: Type_2;
|
5933 | imports?: OpaqueValue[];
|
5934 | providers?: OpaqueValue[];
|
5935 | }
|
5936 |
|
5937 | declare interface R3DeclareNgModuleFacade {
|
5938 | type: Type_2;
|
5939 | bootstrap?: OpaqueValue[] | (() => OpaqueValue[]);
|
5940 | declarations?: OpaqueValue[] | (() => OpaqueValue[]);
|
5941 | imports?: OpaqueValue[] | (() => OpaqueValue[]);
|
5942 | exports?: OpaqueValue[] | (() => OpaqueValue[]);
|
5943 | schemas?: OpaqueValue[];
|
5944 | id?: OpaqueValue;
|
5945 | }
|
5946 |
|
5947 | declare interface R3DeclarePipeFacade {
|
5948 | type: Type_2;
|
5949 | name: string;
|
5950 | pure?: boolean;
|
5951 | }
|
5952 |
|
5953 | declare interface R3DeclareQueryMetadataFacade {
|
5954 | propertyName: string;
|
5955 | first?: boolean;
|
5956 | predicate: OpaqueValue | string[];
|
5957 | descendants?: boolean;
|
5958 | read?: OpaqueValue;
|
5959 | static?: boolean;
|
5960 | emitDistinctChangesOnly?: boolean;
|
5961 | }
|
5962 |
|
5963 | declare interface R3DeclareUsedDirectiveFacade {
|
5964 | selector: string;
|
5965 | type: OpaqueValue | (() => OpaqueValue);
|
5966 | inputs?: string[];
|
5967 | outputs?: string[];
|
5968 | exportAs?: string[];
|
5969 | }
|
5970 |
|
5971 | declare class R3Injector {
|
5972 | readonly parent: Injector;
|
5973 | /**
|
5974 | * Map of tokens to records which contain the instances of those tokens.
|
5975 | * - `null` value implies that we don't have the record. Used by tree-shakable injectors
|
5976 | * to prevent further searches.
|
5977 | */
|
5978 | private records;
|
5979 | /**
|
5980 | * The transitive set of `InjectorType`s which define this injector.
|
5981 | */
|
5982 | private injectorDefTypes;
|
5983 | /**
|
5984 | * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.
|
5985 | */
|
5986 | private onDestroy;
|
5987 | /**
|
5988 | * Flag indicating this injector provides the APP_ROOT_SCOPE token, and thus counts as the
|
5989 | * root scope.
|
5990 | */
|
5991 | private readonly scope;
|
5992 | readonly source: string | null;
|
5993 | /**
|
5994 | * Flag indicating that this injector was previously destroyed.
|
5995 | */
|
5996 | get destroyed(): boolean;
|
5997 | private _destroyed;
|
5998 | constructor(def: InjectorType<any>, additionalProviders: StaticProvider[] | null, parent: Injector, source?: string | null);
|
5999 | /**
|
6000 | * Destroy the injector and release references to every instance or provider associated with it.
|
6001 | *
|
6002 | * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a
|
6003 | * hook was found.
|
6004 | */
|
6005 | destroy(): void;
|
6006 | get<T>(token: ProviderToken<T>, notFoundValue?: any, flags?: InjectFlags): T;
|
6007 | toString(): string;
|
6008 | private assertNotDestroyed;
|
6009 | /**
|
6010 | * Add an `InjectorType` or `InjectorTypeWithProviders` and all of its transitive providers
|
6011 | * to this injector.
|
6012 | *
|
6013 | * If an `InjectorTypeWithProviders` that declares providers besides the type is specified,
|
6014 | * the function will return "true" to indicate that the providers of the type definition need
|
6015 | * to be processed. This allows us to process providers of injector types after all imports of
|
6016 | * an injector definition are processed. (following View Engine semantics: see FW-1349)
|
6017 | */
|
6018 | private processInjectorType;
|
6019 | /**
|
6020 | * Process a `SingleProvider` and add it.
|
6021 | */
|
6022 | private processProvider;
|
6023 | private hydrate;
|
6024 | private injectableDefInScope;
|
6025 | }
|
6026 |
|
6027 | declare interface RComment extends RNode {
|
6028 | textContent: string | null;
|
6029 | }
|
6030 |
|
6031 | declare interface RCssStyleDeclaration {
|
6032 | removeProperty(propertyName: string): string;
|
6033 | setProperty(propertyName: string, value: string | null, priority?: string): void;
|
6034 | }
|
6035 |
|
6036 | declare interface RDomTokenList {
|
6037 | add(token: string): void;
|
6038 | remove(token: string): void;
|
6039 | }
|
6040 |
|
6041 | /**
|
6042 | * A ReflectiveDependency injection container used for instantiating objects and resolving
|
6043 | * dependencies.
|
6044 | *
|
6045 | * An `Injector` is a replacement for a `new` operator, which can automatically resolve the
|
6046 | * constructor dependencies.
|
6047 | *
|
6048 | * In typical use, application code asks for the dependencies in the constructor and they are
|
6049 | * resolved by the `Injector`.
|
6050 | *
|
6051 | * @usageNotes
|
6052 | * ### Example
|
6053 | *
|
6054 | * The following example creates an `Injector` configured to create `Engine` and `Car`.
|
6055 | *
|
6056 | * ```typescript
|
6057 | * @Injectable()
|
6058 | * class Engine {
|
6059 | * }
|
6060 | *
|
6061 | * @Injectable()
|
6062 | * class Car {
|
6063 | * constructor(public engine:Engine) {}
|
6064 | * }
|
6065 | *
|
6066 | * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
|
6067 | * var car = injector.get(Car);
|
6068 | * expect(car instanceof Car).toBe(true);
|
6069 | * expect(car.engine instanceof Engine).toBe(true);
|
6070 | * ```
|
6071 | *
|
6072 | * Notice, we don't use the `new` operator because we explicitly want to have the `Injector`
|
6073 | * resolve all of the object's dependencies automatically.
|
6074 | *
|
6075 | * @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead.
|
6076 | * @publicApi
|
6077 | */
|
6078 | export declare abstract class ReflectiveInjector implements Injector {
|
6079 | /**
|
6080 | * Turns an array of provider definitions into an array of resolved providers.
|
6081 | *
|
6082 | * A resolution is a process of flattening multiple nested arrays and converting individual
|
6083 | * providers into an array of `ResolvedReflectiveProvider`s.
|
6084 | *
|
6085 | * @usageNotes
|
6086 | * ### Example
|
6087 | *
|
6088 | * ```typescript
|
6089 | * @Injectable()
|
6090 | * class Engine {
|
6091 | * }
|
6092 | *
|
6093 | * @Injectable()
|
6094 | * class Car {
|
6095 | * constructor(public engine:Engine) {}
|
6096 | * }
|
6097 | *
|
6098 | * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);
|
6099 | *
|
6100 | * expect(providers.length).toEqual(2);
|
6101 | *
|
6102 | * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);
|
6103 | * expect(providers[0].key.displayName).toBe("Car");
|
6104 | * expect(providers[0].dependencies.length).toEqual(1);
|
6105 | * expect(providers[0].factory).toBeDefined();
|
6106 | *
|
6107 | * expect(providers[1].key.displayName).toBe("Engine");
|
6108 | * });
|
6109 | * ```
|
6110 | *
|
6111 | */
|
6112 | static resolve(providers: Provider[]): ResolvedReflectiveProvider[];
|
6113 | /**
|
6114 | * Resolves an array of providers and creates an injector from those providers.
|
6115 | *
|
6116 | * The passed-in providers can be an array of `Type`, `Provider`,
|
6117 | * or a recursive array of more providers.
|
6118 | *
|
6119 | * @usageNotes
|
6120 | * ### Example
|
6121 | *
|
6122 | * ```typescript
|
6123 | * @Injectable()
|
6124 | * class Engine {
|
6125 | * }
|
6126 | *
|
6127 | * @Injectable()
|
6128 | * class Car {
|
6129 | * constructor(public engine:Engine) {}
|
6130 | * }
|
6131 | *
|
6132 | * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
|
6133 | * expect(injector.get(Car) instanceof Car).toBe(true);
|
6134 | * ```
|
6135 | */
|
6136 | static resolveAndCreate(providers: Provider[], parent?: Injector): ReflectiveInjector;
|
6137 | /**
|
6138 | * Creates an injector from previously resolved providers.
|
6139 | *
|
6140 | * This API is the recommended way to construct injectors in performance-sensitive parts.
|
6141 | *
|
6142 | * @usageNotes
|
6143 | * ### Example
|
6144 | *
|
6145 | * ```typescript
|
6146 | * @Injectable()
|
6147 | * class Engine {
|
6148 | * }
|
6149 | *
|
6150 | * @Injectable()
|
6151 | * class Car {
|
6152 | * constructor(public engine:Engine) {}
|
6153 | * }
|
6154 | *
|
6155 | * var providers = ReflectiveInjector.resolve([Car, Engine]);
|
6156 | * var injector = ReflectiveInjector.fromResolvedProviders(providers);
|
6157 | * expect(injector.get(Car) instanceof Car).toBe(true);
|
6158 | * ```
|
6159 | */
|
6160 | static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector): ReflectiveInjector;
|
6161 | /**
|
6162 | * Parent of this injector.
|
6163 | *
|
6164 | * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.
|
6165 | * -->
|
6166 | */
|
6167 | abstract get parent(): Injector | null;
|
6168 | /**
|
6169 | * Resolves an array of providers and creates a child injector from those providers.
|
6170 | *
|
6171 | * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.
|
6172 | * -->
|
6173 | *
|
6174 | * The passed-in providers can be an array of `Type`, `Provider`,
|
6175 | * or a recursive array of more providers.
|
6176 | *
|
6177 | * @usageNotes
|
6178 | * ### Example
|
6179 | *
|
6180 | * ```typescript
|
6181 | * class ParentProvider {}
|
6182 | * class ChildProvider {}
|
6183 | *
|
6184 | * var parent = ReflectiveInjector.resolveAndCreate([ParentProvider]);
|
6185 | * var child = parent.resolveAndCreateChild([ChildProvider]);
|
6186 | *
|
6187 | * expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);
|
6188 | * expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);
|
6189 | * expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));
|
6190 | * ```
|
6191 | */
|
6192 | abstract resolveAndCreateChild(providers: Provider[]): ReflectiveInjector;
|
6193 | /**
|
6194 | * Creates a child injector from previously resolved providers.
|
6195 | *
|
6196 | * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.
|
6197 | * -->
|
6198 | *
|
6199 | * This API is the recommended way to construct injectors in performance-sensitive parts.
|
6200 | *
|
6201 | * @usageNotes
|
6202 | * ### Example
|
6203 | *
|
6204 | * ```typescript
|
6205 | * class ParentProvider {}
|
6206 | * class ChildProvider {}
|
6207 | *
|
6208 | * var parentProviders = ReflectiveInjector.resolve([ParentProvider]);
|
6209 | * var childProviders = ReflectiveInjector.resolve([ChildProvider]);
|
6210 | *
|
6211 | * var parent = ReflectiveInjector.fromResolvedProviders(parentProviders);
|
6212 | * var child = parent.createChildFromResolved(childProviders);
|
6213 | *
|
6214 | * expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);
|
6215 | * expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);
|
6216 | * expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));
|
6217 | * ```
|
6218 | */
|
6219 | abstract createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector;
|
6220 | /**
|
6221 | * Resolves a provider and instantiates an object in the context of the injector.
|
6222 | *
|
6223 | * The created object does not get cached by the injector.
|
6224 | *
|
6225 | * @usageNotes
|
6226 | * ### Example
|
6227 | *
|
6228 | * ```typescript
|
6229 | * @Injectable()
|
6230 | * class Engine {
|
6231 | * }
|
6232 | *
|
6233 | * @Injectable()
|
6234 | * class Car {
|
6235 | * constructor(public engine:Engine) {}
|
6236 | * }
|
6237 | *
|
6238 | * var injector = ReflectiveInjector.resolveAndCreate([Engine]);
|
6239 | *
|
6240 | * var car = injector.resolveAndInstantiate(Car);
|
6241 | * expect(car.engine).toBe(injector.get(Engine));
|
6242 | * expect(car).not.toBe(injector.resolveAndInstantiate(Car));
|
6243 | * ```
|
6244 | */
|
6245 | abstract resolveAndInstantiate(provider: Provider): any;
|
6246 | /**
|
6247 | * Instantiates an object using a resolved provider in the context of the injector.
|
6248 | *
|
6249 | * The created object does not get cached by the injector.
|
6250 | *
|
6251 | * @usageNotes
|
6252 | * ### Example
|
6253 | *
|
6254 | * ```typescript
|
6255 | * @Injectable()
|
6256 | * class Engine {
|
6257 | * }
|
6258 | *
|
6259 | * @Injectable()
|
6260 | * class Car {
|
6261 | * constructor(public engine:Engine) {}
|
6262 | * }
|
6263 | *
|
6264 | * var injector = ReflectiveInjector.resolveAndCreate([Engine]);
|
6265 | * var carProvider = ReflectiveInjector.resolve([Car])[0];
|
6266 | * var car = injector.instantiateResolved(carProvider);
|
6267 | * expect(car.engine).toBe(injector.get(Engine));
|
6268 | * expect(car).not.toBe(injector.instantiateResolved(carProvider));
|
6269 | * ```
|
6270 | */
|
6271 | abstract instantiateResolved(provider: ResolvedReflectiveProvider): any;
|
6272 | abstract get(token: any, notFoundValue?: any): any;
|
6273 | }
|
6274 |
|
6275 |
|
6276 | /**
|
6277 | * A unique object used for retrieving items from the {@link ReflectiveInjector}.
|
6278 | *
|
6279 | * Keys have:
|
6280 | * - a system-wide unique `id`.
|
6281 | * - a `token`.
|
6282 | *
|
6283 | * `Key` is used internally by {@link ReflectiveInjector} because its system-wide unique `id` allows
|
6284 | * the
|
6285 | * injector to store created objects in a more efficient way.
|
6286 | *
|
6287 | * `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when
|
6288 | * resolving
|
6289 | * providers.
|
6290 | *
|
6291 | * @deprecated No replacement
|
6292 | * @publicApi
|
6293 | */
|
6294 | export declare class ReflectiveKey {
|
6295 | token: Object;
|
6296 | id: number;
|
6297 | readonly displayName: string;
|
6298 | /**
|
6299 | * Private
|
6300 | */
|
6301 | constructor(token: Object, id: number);
|
6302 | /**
|
6303 | * Retrieves a `Key` for a token.
|
6304 | */
|
6305 | static get(token: Object): ReflectiveKey;
|
6306 | /**
|
6307 | * @returns the number of keys registered in the system.
|
6308 | */
|
6309 | static get numberOfKeys(): number;
|
6310 | }
|
6311 |
|
6312 | /**
|
6313 | * Subset of API needed for writing attributes, properties, and setting up
|
6314 | * listeners on Element.
|
6315 | */
|
6316 | declare interface RElement extends RNode {
|
6317 | style: RCssStyleDeclaration;
|
6318 | classList: RDomTokenList;
|
6319 | className: string;
|
6320 | textContent: string | null;
|
6321 | setAttribute(name: string, value: string | TrustedHTML | TrustedScript | TrustedScriptURL): void;
|
6322 | removeAttribute(name: string): void;
|
6323 | setAttributeNS(namespaceURI: string, qualifiedName: string, value: string | TrustedHTML | TrustedScript | TrustedScriptURL): void;
|
6324 | addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;
|
6325 | removeEventListener(type: string, listener?: EventListener, options?: boolean): void;
|
6326 | setProperty?(name: string, value: any): void;
|
6327 | }
|
6328 |
|
6329 | /**
|
6330 | * This is a synthetic lifecycle hook which gets inserted into `TView.preOrderHooks` to simulate
|
6331 | * `ngOnChanges`.
|
6332 | *
|
6333 | * The hook reads the `NgSimpleChangesStore` data from the component instance and if changes are
|
6334 | * found it invokes `ngOnChanges` on the component instance.
|
6335 | *
|
6336 | * @param this Component instance. Because this function gets inserted into `TView.preOrderHooks`,
|
6337 | * it is guaranteed to be called with component instance.
|
6338 | */
|
6339 | declare function rememberChangeHistoryAndInvokeOnChangesHook(this: OnChanges): void;
|
6340 |
|
6341 | declare const RENDERER = 11;
|
6342 |
|
6343 | /**
|
6344 | * Extend this base class to implement custom rendering. By default, Angular
|
6345 | * renders a template into DOM. You can use custom rendering to intercept
|
6346 | * rendering calls, or to render to something other than DOM.
|
6347 | *
|
6348 | * Create your custom renderer using `RendererFactory2`.
|
6349 | *
|
6350 | * Use a custom renderer to bypass Angular's templating and
|
6351 | * make custom UI changes that can't be expressed declaratively.
|
6352 | * For example if you need to set a property or an attribute whose name is
|
6353 | * not statically known, use the `setProperty()` or
|
6354 | * `setAttribute()` method.
|
6355 | *
|
6356 | * @publicApi
|
6357 | */
|
6358 | export declare abstract class Renderer2 {
|
6359 | /**
|
6360 | * Use to store arbitrary developer-defined data on a renderer instance,
|
6361 | * as an object containing key-value pairs.
|
6362 | * This is useful for renderers that delegate to other renderers.
|
6363 | */
|
6364 | abstract get data(): {
|
6365 | [key: string]: any;
|
6366 | };
|
6367 | /**
|
6368 | * Implement this callback to destroy the renderer or the host element.
|
6369 | */
|
6370 | abstract destroy(): void;
|
6371 | /**
|
6372 | * Implement this callback to create an instance of the host element.
|
6373 | * @param name An identifying name for the new element, unique within the namespace.
|
6374 | * @param namespace The namespace for the new element.
|
6375 | * @returns The new element.
|
6376 | */
|
6377 | abstract createElement(name: string, namespace?: string | null): any;
|
6378 | /**
|
6379 | * Implement this callback to add a comment to the DOM of the host element.
|
6380 | * @param value The comment text.
|
6381 | * @returns The modified element.
|
6382 | */
|
6383 | abstract createComment(value: string): any;
|
6384 | /**
|
6385 | * Implement this callback to add text to the DOM of the host element.
|
6386 | * @param value The text string.
|
6387 | * @returns The modified element.
|
6388 | */
|
6389 | abstract createText(value: string): any;
|
6390 | /**
|
6391 | * If null or undefined, the view engine won't call it.
|
6392 | * This is used as a performance optimization for production mode.
|
6393 | */
|
6394 | destroyNode: ((node: any) => void) | null;
|
6395 | /**
|
6396 | * Appends a child to a given parent node in the host element DOM.
|
6397 | * @param parent The parent node.
|
6398 | * @param newChild The new child node.
|
6399 | */
|
6400 | abstract appendChild(parent: any, newChild: any): void;
|
6401 | /**
|
6402 | * Implement this callback to insert a child node at a given position in a parent node
|
6403 | * in the host element DOM.
|
6404 | * @param parent The parent node.
|
6405 | * @param newChild The new child nodes.
|
6406 | * @param refChild The existing child node before which `newChild` is inserted.
|
6407 | * @param isMove Optional argument which signifies if the current `insertBefore` is a result of a
|
6408 | * move. Animation uses this information to trigger move animations. In the past the Animation
|
6409 | * would always assume that any `insertBefore` is a move. This is not strictly true because
|
6410 | * with runtime i18n it is possible to invoke `insertBefore` as a result of i18n and it should
|
6411 | * not trigger an animation move.
|
6412 | */
|
6413 | abstract insertBefore(parent: any, newChild: any, refChild: any, isMove?: boolean): void;
|
6414 | /**
|
6415 | * Implement this callback to remove a child node from the host element's DOM.
|
6416 | * @param parent The parent node.
|
6417 | * @param oldChild The child node to remove.
|
6418 | * @param isHostElement Optionally signal to the renderer whether this element is a host element
|
6419 | * or not
|
6420 | */
|
6421 | abstract removeChild(parent: any, oldChild: any, isHostElement?: boolean): void;
|
6422 | /**
|
6423 | * Implement this callback to prepare an element to be bootstrapped
|
6424 | * as a root element, and return the element instance.
|
6425 | * @param selectorOrNode The DOM element.
|
6426 | * @param preserveContent Whether the contents of the root element
|
6427 | * should be preserved, or cleared upon bootstrap (default behavior).
|
6428 | * Use with `ViewEncapsulation.ShadowDom` to allow simple native
|
6429 | * content projection via `<slot>` elements.
|
6430 | * @returns The root element.
|
6431 | */
|
6432 | abstract selectRootElement(selectorOrNode: string | any, preserveContent?: boolean): any;
|
6433 | /**
|
6434 | * Implement this callback to get the parent of a given node
|
6435 | * in the host element's DOM.
|
6436 | * @param node The child node to query.
|
6437 | * @returns The parent node, or null if there is no parent.
|
6438 | * For WebWorkers, always returns true.
|
6439 | * This is because the check is synchronous,
|
6440 | * and the caller can't rely on checking for null.
|
6441 | */
|
6442 | abstract parentNode(node: any): any;
|
6443 | /**
|
6444 | * Implement this callback to get the next sibling node of a given node
|
6445 | * in the host element's DOM.
|
6446 | * @returns The sibling node, or null if there is no sibling.
|
6447 | * For WebWorkers, always returns a value.
|
6448 | * This is because the check is synchronous,
|
6449 | * and the caller can't rely on checking for null.
|
6450 | */
|
6451 | abstract nextSibling(node: any): any;
|
6452 | /**
|
6453 | * Implement this callback to set an attribute value for an element in the DOM.
|
6454 | * @param el The element.
|
6455 | * @param name The attribute name.
|
6456 | * @param value The new value.
|
6457 | * @param namespace The namespace.
|
6458 | */
|
6459 | abstract setAttribute(el: any, name: string, value: string, namespace?: string | null): void;
|
6460 | /**
|
6461 | * Implement this callback to remove an attribute from an element in the DOM.
|
6462 | * @param el The element.
|
6463 | * @param name The attribute name.
|
6464 | * @param namespace The namespace.
|
6465 | */
|
6466 | abstract removeAttribute(el: any, name: string, namespace?: string | null): void;
|
6467 | /**
|
6468 | * Implement this callback to add a class to an element in the DOM.
|
6469 | * @param el The element.
|
6470 | * @param name The class name.
|
6471 | */
|
6472 | abstract addClass(el: any, name: string): void;
|
6473 | /**
|
6474 | * Implement this callback to remove a class from an element in the DOM.
|
6475 | * @param el The element.
|
6476 | * @param name The class name.
|
6477 | */
|
6478 | abstract removeClass(el: any, name: string): void;
|
6479 | /**
|
6480 | * Implement this callback to set a CSS style for an element in the DOM.
|
6481 | * @param el The element.
|
6482 | * @param style The name of the style.
|
6483 | * @param value The new value.
|
6484 | * @param flags Flags for style variations. No flags are set by default.
|
6485 | */
|
6486 | abstract setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2): void;
|
6487 | /**
|
6488 | * Implement this callback to remove the value from a CSS style for an element in the DOM.
|
6489 | * @param el The element.
|
6490 | * @param style The name of the style.
|
6491 | * @param flags Flags for style variations to remove, if set. ???
|
6492 | */
|
6493 | abstract removeStyle(el: any, style: string, flags?: RendererStyleFlags2): void;
|
6494 | /**
|
6495 | * Implement this callback to set the value of a property of an element in the DOM.
|
6496 | * @param el The element.
|
6497 | * @param name The property name.
|
6498 | * @param value The new value.
|
6499 | */
|
6500 | abstract setProperty(el: any, name: string, value: any): void;
|
6501 | /**
|
6502 | * Implement this callback to set the value of a node in the host element.
|
6503 | * @param node The node.
|
6504 | * @param value The new value.
|
6505 | */
|
6506 | abstract setValue(node: any, value: string): void;
|
6507 | /**
|
6508 | * Implement this callback to start an event listener.
|
6509 | * @param target The context in which to listen for events. Can be
|
6510 | * the entire window or document, the body of the document, or a specific
|
6511 | * DOM element.
|
6512 | * @param eventName The event to listen for.
|
6513 | * @param callback A handler function to invoke when the event occurs.
|
6514 | * @returns An "unlisten" function for disposing of this handler.
|
6515 | */
|
6516 | abstract listen(target: 'window' | 'document' | 'body' | any, eventName: string, callback: (event: any) => boolean | void): () => void;
|
6517 | }
|
6518 |
|
6519 | declare type Renderer3 = ObjectOrientedRenderer3 | ProceduralRenderer3;
|
6520 |
|
6521 | declare const RENDERER_FACTORY = 10;
|
6522 |
|
6523 | /**
|
6524 | * Creates and initializes a custom renderer that implements the `Renderer2` base class.
|
6525 | *
|
6526 | * @publicApi
|
6527 | */
|
6528 | export declare abstract class RendererFactory2 {
|
6529 | /**
|
6530 | * Creates and initializes a custom renderer for a host DOM element.
|
6531 | * @param hostElement The element to render.
|
6532 | * @param type The base class to implement.
|
6533 | * @returns The new custom renderer instance.
|
6534 | */
|
6535 | abstract createRenderer(hostElement: any, type: RendererType2 | null): Renderer2;
|
6536 | /**
|
6537 | * A callback invoked when rendering has begun.
|
6538 | */
|
6539 | abstract begin?(): void;
|
6540 | /**
|
6541 | * A callback invoked when rendering has completed.
|
6542 | */
|
6543 | abstract end?(): void;
|
6544 | /**
|
6545 | * Use with animations test-only mode. Notifies the test when rendering has completed.
|
6546 | * @returns The asynchronous result of the developer-defined function.
|
6547 | */
|
6548 | abstract whenRenderingDone?(): Promise<any>;
|
6549 | }
|
6550 |
|
6551 | declare interface RendererFactory3 {
|
6552 | createRenderer(hostElement: RElement | null, rendererType: RendererType2 | null): Renderer3;
|
6553 | begin?(): void;
|
6554 | end?(): void;
|
6555 | }
|
6556 |
|
6557 | /**
|
6558 | * Flags for renderer-specific style modifiers.
|
6559 | * @publicApi
|
6560 | */
|
6561 | export declare enum RendererStyleFlags2 {
|
6562 | /**
|
6563 | * Marks a style as important.
|
6564 | */
|
6565 | Important = 1,
|
6566 | /**
|
6567 | * Marks a style as using dash case naming (this-is-dash-case).
|
6568 | */
|
6569 | DashCase = 2
|
6570 | }
|
6571 |
|
6572 | declare enum RendererStyleFlags3 {
|
6573 | Important = 1,
|
6574 | DashCase = 2
|
6575 | }
|
6576 |
|
6577 | /**
|
6578 | * Used by `RendererFactory2` to associate custom rendering data and styles
|
6579 | * with a rendering implementation.
|
6580 | * @publicApi
|
6581 | */
|
6582 | export declare interface RendererType2 {
|
6583 | /**
|
6584 | * A unique identifying string for the new renderer, used when creating
|
6585 | * unique styles for encapsulation.
|
6586 | */
|
6587 | id: string;
|
6588 | /**
|
6589 | * The view encapsulation type, which determines how styles are applied to
|
6590 | * DOM elements. One of
|
6591 | * - `Emulated` (default): Emulate native scoping of styles.
|
6592 | * - `Native`: Use the native encapsulation mechanism of the renderer.
|
6593 | * - `ShadowDom`: Use modern [Shadow
|
6594 | * DOM](https://w3c.github.io/webcomponents/spec/shadow/) and
|
6595 | * create a ShadowRoot for component's host element.
|
6596 | * - `None`: Do not provide any template or style encapsulation.
|
6597 | */
|
6598 | encapsulation: ViewEncapsulation;
|
6599 | /**
|
6600 | * Defines CSS styles to be stored on a renderer instance.
|
6601 | */
|
6602 | styles: (string | any[])[];
|
6603 | /**
|
6604 | * Defines arbitrary developer-defined data to be stored on a renderer instance.
|
6605 | * This is useful for renderers that delegate to other renderers.
|
6606 | */
|
6607 | data: {
|
6608 | [kind: string]: any;
|
6609 | };
|
6610 | }
|
6611 |
|
6612 | /**
|
6613 | * An internal resolved representation of a factory function created by resolving `Provider`.
|
6614 | * @publicApi
|
6615 | */
|
6616 | export declare class ResolvedReflectiveFactory {
|
6617 | /**
|
6618 | * Factory function which can return an instance of an object represented by a key.
|
6619 | */
|
6620 | factory: Function;
|
6621 | /**
|
6622 | * Arguments (dependencies) to the `factory` function.
|
6623 | */
|
6624 | dependencies: ɵangular_packages_core_core_e[];
|
6625 | constructor(
|
6626 | /**
|
6627 | * Factory function which can return an instance of an object represented by a key.
|
6628 | */
|
6629 | factory: Function,
|
6630 | /**
|
6631 | * Arguments (dependencies) to the `factory` function.
|
6632 | */
|
6633 | dependencies: ɵangular_packages_core_core_e[]);
|
6634 | }
|
6635 |
|
6636 | /**
|
6637 | * An internal resolved representation of a `Provider` used by the `Injector`.
|
6638 | *
|
6639 | * @usageNotes
|
6640 | * This is usually created automatically by `Injector.resolveAndCreate`.
|
6641 | *
|
6642 | * It can be created manually, as follows:
|
6643 | *
|
6644 | * ### Example
|
6645 | *
|
6646 | * ```typescript
|
6647 | * var resolvedProviders = Injector.resolve([{ provide: 'message', useValue: 'Hello' }]);
|
6648 | * var injector = Injector.fromResolvedProviders(resolvedProviders);
|
6649 | *
|
6650 | * expect(injector.get('message')).toEqual('Hello');
|
6651 | * ```
|
6652 | *
|
6653 | * @publicApi
|
6654 | */
|
6655 | export declare interface ResolvedReflectiveProvider {
|
6656 | /**
|
6657 | * A key, usually a `Type<any>`.
|
6658 | */
|
6659 | key: ReflectiveKey;
|
6660 | /**
|
6661 | * Factory function which can return an instance of an object represented by a key.
|
6662 | */
|
6663 | resolvedFactories: ResolvedReflectiveFactory[];
|
6664 | /**
|
6665 | * Indicates if the provider is a multi-provider or a regular provider.
|
6666 | */
|
6667 | multiProvider: boolean;
|
6668 | }
|
6669 |
|
6670 | /**
|
6671 | * Lazily retrieves the reference value from a forwardRef.
|
6672 | *
|
6673 | * Acts as the identity function when given a non-forward-ref value.
|
6674 | *
|
6675 | * @usageNotes
|
6676 | * ### Example
|
6677 | *
|
6678 | * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}
|
6679 | *
|
6680 | * @see `forwardRef`
|
6681 | * @publicApi
|
6682 | */
|
6683 | export declare function resolveForwardRef<T>(type: T): T;
|
6684 |
|
6685 | /**
|
6686 | * The goal here is to make sure that the browser DOM API is the Renderer.
|
6687 | * We do this by defining a subset of DOM API to be the renderer and then
|
6688 | * use that at runtime for rendering.
|
6689 | *
|
6690 | * At runtime we can then use the DOM api directly, in server or web-worker
|
6691 | * it will be easy to implement such API.
|
6692 | */
|
6693 | /** Subset of API needed for appending elements and text nodes. */
|
6694 | declare interface RNode {
|
6695 | /**
|
6696 | * Returns the parent Element, Document, or DocumentFragment
|
6697 | */
|
6698 | parentNode: RNode | null;
|
6699 | /**
|
6700 | * Returns the parent Element if there is one
|
6701 | */
|
6702 | parentElement: RElement | null;
|
6703 | /**
|
6704 | * Gets the Node immediately following this one in the parent's childNodes
|
6705 | */
|
6706 | nextSibling: RNode | null;
|
6707 | /**
|
6708 | * Removes a child from the current node and returns the removed node
|
6709 | * @param oldChild the child node to remove
|
6710 | */
|
6711 | removeChild(oldChild: RNode): RNode;
|
6712 | /**
|
6713 | * Insert a child node.
|
6714 | *
|
6715 | * Used exclusively for adding View root nodes into ViewAnchor location.
|
6716 | */
|
6717 | insertBefore(newChild: RNode, refChild: RNode | null, isViewRoot: boolean): void;
|
6718 | /**
|
6719 | * Append a child node.
|
6720 | *
|
6721 | * Used exclusively for building up DOM which are static (ie not View roots)
|
6722 | */
|
6723 | appendChild(newChild: RNode): RNode;
|
6724 | }
|
6725 |
|
6726 | /**
|
6727 | * RootContext contains information which is shared for all components which
|
6728 | * were bootstrapped with {@link renderComponent}.
|
6729 | */
|
6730 | declare interface RootContext {
|
6731 | /**
|
6732 | * A function used for scheduling change detection in the future. Usually
|
6733 | * this is `requestAnimationFrame`.
|
6734 | */
|
6735 | scheduler: (workFn: () => void) => void;
|
6736 | /**
|
6737 | * A promise which is resolved when all components are considered clean (not dirty).
|
6738 | *
|
6739 | * This promise is overwritten every time a first call to {@link markDirty} is invoked.
|
6740 | */
|
6741 | clean: Promise<null>;
|
6742 | /**
|
6743 | * RootComponents - The components that were instantiated by the call to
|
6744 | * {@link renderComponent}.
|
6745 | */
|
6746 | components: {}[];
|
6747 | /**
|
6748 | * The player flushing handler to kick off all animations
|
6749 | */
|
6750 | playerHandler: ɵPlayerHandler | null;
|
6751 | /**
|
6752 | * What render-related operations to run once a scheduler has been set
|
6753 | */
|
6754 | flags: RootContextFlags;
|
6755 | }
|
6756 |
|
6757 | declare const enum RootContextFlags {
|
6758 | Empty = 0,
|
6759 | DetectChanges = 1,
|
6760 | FlushPlayers = 2
|
6761 | }
|
6762 |
|
6763 | declare interface RootData {
|
6764 | injector: Injector;
|
6765 | ngModule: NgModuleRef<any>;
|
6766 | projectableNodes: any[][];
|
6767 | selectorOrNode: any;
|
6768 | renderer: Renderer2;
|
6769 | rendererFactory: RendererFactory2;
|
6770 | errorHandler: ErrorHandler;
|
6771 | sanitizer: Sanitizer;
|
6772 | }
|
6773 |
|
6774 | declare interface RText extends RNode {
|
6775 | textContent: string | null;
|
6776 | }
|
6777 |
|
6778 | declare const SANITIZER = 12;
|
6779 |
|
6780 | /**
|
6781 | * Sanitizer is used by the views to sanitize potentially dangerous values.
|
6782 | *
|
6783 | * @publicApi
|
6784 | */
|
6785 | export declare abstract class Sanitizer {
|
6786 | abstract sanitize(context: SecurityContext, value: {} | string | null): string | null;
|
6787 | /** @nocollapse */
|
6788 | static ɵprov: unknown;
|
6789 | }
|
6790 |
|
6791 | /**
|
6792 | * Function used to sanitize the value before writing it into the renderer.
|
6793 | */
|
6794 | declare type SanitizerFn = (value: any, tagName?: string, propName?: string) => string | TrustedHTML | TrustedScript | TrustedScriptURL;
|
6795 |
|
6796 |
|
6797 | /**
|
6798 | * A schema definition associated with an NgModule.
|
6799 | *
|
6800 | * @see `@NgModule`, `CUSTOM_ELEMENTS_SCHEMA`, `NO_ERRORS_SCHEMA`
|
6801 | *
|
6802 | * @param name The name of a defined schema.
|
6803 | *
|
6804 | * @publicApi
|
6805 | */
|
6806 | export declare interface SchemaMetadata {
|
6807 | name: string;
|
6808 | }
|
6809 |
|
6810 |
|
6811 | /**
|
6812 | * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property
|
6813 | * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly
|
6814 | * handled.
|
6815 | *
|
6816 | * See DomSanitizer for more details on security in Angular applications.
|
6817 | *
|
6818 | * @publicApi
|
6819 | */
|
6820 | export declare enum SecurityContext {
|
6821 | NONE = 0,
|
6822 | HTML = 1,
|
6823 | STYLE = 2,
|
6824 | SCRIPT = 3,
|
6825 | URL = 4,
|
6826 | RESOURCE_URL = 5
|
6827 | }
|
6828 |
|
6829 | /** Flags used to build up CssSelectors */
|
6830 | declare const enum SelectorFlags {
|
6831 | /** Indicates this is the beginning of a new negative selector */
|
6832 | NOT = 1,
|
6833 | /** Mode for matching attributes */
|
6834 | ATTRIBUTE = 2,
|
6835 | /** Mode for matching tag names */
|
6836 | ELEMENT = 4,
|
6837 | /** Mode for matching class names */
|
6838 | CLASS = 8
|
6839 | }
|
6840 |
|
6841 | /**
|
6842 | * Type of the Self metadata.
|
6843 | *
|
6844 | * @publicApi
|
6845 | */
|
6846 | export declare interface Self {
|
6847 | }
|
6848 |
|
6849 | /**
|
6850 | * Self decorator and metadata.
|
6851 | *
|
6852 | * @Annotation
|
6853 | * @publicApi
|
6854 | */
|
6855 | export declare const Self: SelfDecorator;
|
6856 |
|
6857 | /**
|
6858 | * Type of the Self decorator / constructor function.
|
6859 | *
|
6860 | * @publicApi
|
6861 | */
|
6862 | export declare interface SelfDecorator {
|
6863 | /**
|
6864 | * Parameter decorator to be used on constructor parameters,
|
6865 | * which tells the DI framework to start dependency resolution from the local injector.
|
6866 | *
|
6867 | * Resolution works upward through the injector hierarchy, so the children
|
6868 | * of this class must configure their own providers or be prepared for a `null` result.
|
6869 | *
|
6870 | * @usageNotes
|
6871 | *
|
6872 | * In the following example, the dependency can be resolved
|
6873 | * by the local injector when instantiating the class itself, but not
|
6874 | * when instantiating a child.
|
6875 | *
|
6876 | * <code-example path="core/di/ts/metadata_spec.ts" region="Self">
|
6877 | * </code-example>
|
6878 | *
|
6879 | * @see `SkipSelf`
|
6880 | * @see `Optional`
|
6881 | *
|
6882 | */
|
6883 | (): any;
|
6884 | new (): Self;
|
6885 | }
|
6886 |
|
6887 | /**
|
6888 | * Set the {@link GetTestability} implementation used by the Angular testing framework.
|
6889 | * @publicApi
|
6890 | */
|
6891 | export declare function setTestabilityGetter(getter: GetTestability): void;
|
6892 |
|
6893 |
|
6894 | /**
|
6895 | * Represents a basic change from a previous to a new value for a single
|
6896 | * property on a directive instance. Passed as a value in a
|
6897 | * {@link SimpleChanges} object to the `ngOnChanges` hook.
|
6898 | *
|
6899 | * @see `OnChanges`
|
6900 | *
|
6901 | * @publicApi
|
6902 | */
|
6903 | export declare class SimpleChange {
|
6904 | previousValue: any;
|
6905 | currentValue: any;
|
6906 | firstChange: boolean;
|
6907 | constructor(previousValue: any, currentValue: any, firstChange: boolean);
|
6908 | /**
|
6909 | * Check whether the new value is the first value assigned.
|
6910 | */
|
6911 | isFirstChange(): boolean;
|
6912 | }
|
6913 |
|
6914 | /**
|
6915 | * A hashtable of changes represented by {@link SimpleChange} objects stored
|
6916 | * at the declared property name they belong to on a Directive or Component. This is
|
6917 | * the type passed to the `ngOnChanges` hook.
|
6918 | *
|
6919 | * @see `OnChanges`
|
6920 | *
|
6921 | * @publicApi
|
6922 | */
|
6923 | export declare interface SimpleChanges {
|
6924 | [propName: string]: SimpleChange;
|
6925 | }
|
6926 |
|
6927 | /**
|
6928 | * Type of the `SkipSelf` metadata.
|
6929 | *
|
6930 | * @publicApi
|
6931 | */
|
6932 | export declare interface SkipSelf {
|
6933 | }
|
6934 |
|
6935 | /**
|
6936 | * `SkipSelf` decorator and metadata.
|
6937 | *
|
6938 | * @Annotation
|
6939 | * @publicApi
|
6940 | */
|
6941 | export declare const SkipSelf: SkipSelfDecorator;
|
6942 |
|
6943 | /**
|
6944 | * Type of the `SkipSelf` decorator / constructor function.
|
6945 | *
|
6946 | * @publicApi
|
6947 | */
|
6948 | export declare interface SkipSelfDecorator {
|
6949 | /**
|
6950 | * Parameter decorator to be used on constructor parameters,
|
6951 | * which tells the DI framework to start dependency resolution from the parent injector.
|
6952 | * Resolution works upward through the injector hierarchy, so the local injector
|
6953 | * is not checked for a provider.
|
6954 | *
|
6955 | * @usageNotes
|
6956 | *
|
6957 | * In the following example, the dependency can be resolved when
|
6958 | * instantiating a child, but not when instantiating the class itself.
|
6959 | *
|
6960 | * <code-example path="core/di/ts/metadata_spec.ts" region="SkipSelf">
|
6961 | * </code-example>
|
6962 | *
|
6963 | * @see [Dependency Injection guide](guide/dependency-injection-in-action#skip).
|
6964 | * @see `Self`
|
6965 | * @see `Optional`
|
6966 | *
|
6967 | */
|
6968 | (): any;
|
6969 | new (): SkipSelf;
|
6970 | }
|
6971 |
|
6972 | /**
|
6973 | * Configures the `Injector` to return an instance of `useClass` for a token.
|
6974 | * @see ["Dependency Injection Guide"](guide/dependency-injection).
|
6975 | *
|
6976 | * @usageNotes
|
6977 | *
|
6978 | * {@example core/di/ts/provider_spec.ts region='StaticClassProvider'}
|
6979 | *
|
6980 | * Note that following two providers are not equal:
|
6981 | *
|
6982 | * {@example core/di/ts/provider_spec.ts region='StaticClassProviderDifference'}
|
6983 | *
|
6984 | * ### Multi-value example
|
6985 | *
|
6986 | * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
6987 | *
|
6988 | * @publicApi
|
6989 | */
|
6990 | export declare interface StaticClassProvider extends StaticClassSansProvider {
|
6991 | /**
|
6992 | * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
|
6993 | */
|
6994 | provide: any;
|
6995 | /**
|
6996 | * When true, injector returns an array of instances. This is useful to allow multiple
|
6997 | * providers spread across many files to provide configuration information to a common token.
|
6998 | */
|
6999 | multi?: boolean;
|
7000 | }
|
7001 |
|
7002 | /**
|
7003 | * Configures the `Injector` to return an instance of `useClass` for a token.
|
7004 | * Base for `StaticClassProvider` decorator.
|
7005 | *
|
7006 | * @publicApi
|
7007 | */
|
7008 | export declare interface StaticClassSansProvider {
|
7009 | /**
|
7010 | * An optional class to instantiate for the `token`. By default, the `provide`
|
7011 | * class is instantiated.
|
7012 | */
|
7013 | useClass: Type<any>;
|
7014 | /**
|
7015 | * A list of `token`s to be resolved by the injector. The list of values is then
|
7016 | * used as arguments to the `useClass` constructor.
|
7017 | */
|
7018 | deps: any[];
|
7019 | }
|
7020 |
|
7021 | /**
|
7022 | * Describes how an `Injector` should be configured as static (that is, without reflection).
|
7023 | * A static provider provides tokens to an injector for various types of dependencies.
|
7024 | *
|
7025 | * @see `Injector.create()`.
|
7026 | * @see ["Dependency Injection Guide"](guide/dependency-injection-providers).
|
7027 | *
|
7028 | * @publicApi
|
7029 | */
|
7030 | export declare type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvider | ConstructorProvider | FactoryProvider | any[];
|
7031 |
|
7032 | /**
|
7033 | * NgModuleFactoryLoader that uses SystemJS to load NgModuleFactory
|
7034 | * @publicApi
|
7035 | * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoader` is
|
7036 | * part of its implementation. See `LoadChildren` for more details.
|
7037 | */
|
7038 | export declare class SystemJsNgModuleLoader implements NgModuleFactoryLoader {
|
7039 | private _compiler;
|
7040 | private _config;
|
7041 | constructor(_compiler: Compiler, config?: SystemJsNgModuleLoaderConfig);
|
7042 | load(path: string): Promise<NgModuleFactory<any>>;
|
7043 | private loadAndCompile;
|
7044 | private loadFactory;
|
7045 | }
|
7046 |
|
7047 | /**
|
7048 | * Configuration for SystemJsNgModuleLoader.
|
7049 | * token.
|
7050 | *
|
7051 | * @publicApi
|
7052 | * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoaderConfig`
|
7053 | * is part of its implementation. See `LoadChildren` for more details.
|
7054 | */
|
7055 | export declare abstract class SystemJsNgModuleLoaderConfig {
|
7056 | /**
|
7057 | * Prefix to add when computing the name of the factory module for a given module name.
|
7058 | */
|
7059 | factoryPathPrefix: string;
|
7060 | /**
|
7061 | * Suffix to add when computing the name of the factory module for a given module name.
|
7062 | */
|
7063 | factoryPathSuffix: string;
|
7064 | }
|
7065 |
|
7066 | declare const T_HOST = 6;
|
7067 |
|
7068 | /**
|
7069 | * A combination of:
|
7070 | * - Attribute names and values.
|
7071 | * - Special markers acting as flags to alter attributes processing.
|
7072 | * - Parsed ngProjectAs selectors.
|
7073 | */
|
7074 | declare type TAttributes = (string | ɵAttributeMarker | CssSelector)[];
|
7075 |
|
7076 | /**
|
7077 | * Constants that are associated with a view. Includes:
|
7078 | * - Attribute arrays.
|
7079 | * - Local definition arrays.
|
7080 | * - Translated messages (i18n).
|
7081 | */
|
7082 | declare type TConstants = (TAttributes | string)[];
|
7083 |
|
7084 | /**
|
7085 | * Factory function that returns an array of consts. Consts can be represented as a function in
|
7086 | * case any additional statements are required to define consts in the list. An example is i18n
|
7087 | * where additional i18n calls are generated, which should be executed when consts are requested
|
7088 | * for the first time.
|
7089 | */
|
7090 | declare type TConstantsFactory = () => TConstants;
|
7091 |
|
7092 | /**
|
7093 | * TConstants type that describes how the `consts` field is generated on ComponentDef: it can be
|
7094 | * either an array or a factory function that returns that array.
|
7095 | */
|
7096 | declare type TConstantsOrFactory = TConstants | TConstantsFactory;
|
7097 |
|
7098 | /** Static data for an LContainer */
|
7099 | declare interface TContainerNode extends TNode {
|
7100 | /**
|
7101 | * Index in the data[] array.
|
7102 | *
|
7103 | * If it's -1, this is a dynamically created container node that isn't stored in
|
7104 | * data[] (e.g. when you inject ViewContainerRef) .
|
7105 | */
|
7106 | index: number;
|
7107 | child: null;
|
7108 | /**
|
7109 | * Container nodes will have parents unless:
|
7110 | *
|
7111 | * - They are the first node of a component or embedded view
|
7112 | * - They are dynamically created
|
7113 | */
|
7114 | parent: ɵangular_packages_core_core_bk | TElementContainerNode | null;
|
7115 | tViews: TView | TView[] | null;
|
7116 | projection: null;
|
7117 | value: null;
|
7118 | }
|
7119 |
|
7120 | /**
|
7121 | * Static data that corresponds to the instance-specific data array on an LView.
|
7122 | *
|
7123 | * Each node's static data is stored in tData at the same index that it's stored
|
7124 | * in the data array. Any nodes that do not have static data store a null value in
|
7125 | * tData to avoid a sparse array.
|
7126 | *
|
7127 | * Each pipe's definition is stored here at the same index as its pipe instance in
|
7128 | * the data array.
|
7129 | *
|
7130 | * Each host property's name is stored here at the same index as its value in the
|
7131 | * data array.
|
7132 | *
|
7133 | * Each property binding name is stored here at the same index as its value in
|
7134 | * the data array. If the binding is an interpolation, the static string values
|
7135 | * are stored parallel to the dynamic values. Example:
|
7136 | *
|
7137 | * id="prefix {{ v0 }} a {{ v1 }} b {{ v2 }} suffix"
|
7138 | *
|
7139 | * LView | TView.data
|
7140 | *------------------------
|
7141 | * v0 value | 'a'
|
7142 | * v1 value | 'b'
|
7143 | * v2 value | id � prefix � suffix
|
7144 | *
|
7145 | * Injector bloom filters are also stored here.
|
7146 | */
|
7147 | declare type TData = (TNode | ɵPipeDef<any> | ɵDirectiveDef<any> | ɵComponentDef<any> | number | TStylingRange | TStylingKey | ProviderToken<any> | TI18n | I18nUpdateOpCodes | TIcu | null | string)[];
|
7148 |
|
7149 | /** Static data for an <ng-container> */
|
7150 | declare interface TElementContainerNode extends TNode {
|
7151 | /** Index in the LView[] array. */
|
7152 | index: number;
|
7153 | child: ɵangular_packages_core_core_bk | TTextNode | TContainerNode | TElementContainerNode | TProjectionNode | null;
|
7154 | parent: ɵangular_packages_core_core_bk | TElementContainerNode | null;
|
7155 | tViews: null;
|
7156 | projection: null;
|
7157 | }
|
7158 |
|
7159 | /**
|
7160 | * Represents an embedded template that can be used to instantiate embedded views.
|
7161 | * To instantiate embedded views based on a template, use the `ViewContainerRef`
|
7162 | * method `createEmbeddedView()`.
|
7163 | *
|
7164 | * Access a `TemplateRef` instance by placing a directive on an `<ng-template>`
|
7165 | * element (or directive prefixed with `*`). The `TemplateRef` for the embedded view
|
7166 | * is injected into the constructor of the directive,
|
7167 | * using the `TemplateRef` token.
|
7168 | *
|
7169 | * You can also use a `Query` to find a `TemplateRef` associated with
|
7170 | * a component or a directive.
|
7171 | *
|
7172 | * @see `ViewContainerRef`
|
7173 | * @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree)
|
7174 | *
|
7175 | * @publicApi
|
7176 | */
|
7177 | export declare abstract class TemplateRef<C> {
|
7178 | /**
|
7179 | * The anchor element in the parent view for this embedded view.
|
7180 | *
|
7181 | * The data-binding and injection contexts of embedded views created from this `TemplateRef`
|
7182 | * inherit from the contexts of this location.
|
7183 | *
|
7184 | * Typically new embedded views are attached to the view container of this location, but in
|
7185 | * advanced use-cases, the view can be attached to a different container while keeping the
|
7186 | * data-binding and injection context from the original location.
|
7187 | *
|
7188 | */
|
7189 | abstract get elementRef(): ElementRef;
|
7190 | /**
|
7191 | * Instantiates an embedded view based on this template,
|
7192 | * and attaches it to the view container.
|
7193 | * @param context The data-binding context of the embedded view, as declared
|
7194 | * in the `<ng-template>` usage.
|
7195 | * @returns The new embedded view object.
|
7196 | */
|
7197 | abstract createEmbeddedView(context: C): EmbeddedViewRef<C>;
|
7198 | }
|
7199 |
|
7200 | /**
|
7201 | * The Testability service provides testing hooks that can be accessed from
|
7202 | * the browser. Each bootstrapped Angular application on the page will have
|
7203 | * an instance of Testability.
|
7204 | * @publicApi
|
7205 | */
|
7206 | export declare class Testability implements PublicTestability {
|
7207 | private _ngZone;
|
7208 | private _pendingCount;
|
7209 | private _isZoneStable;
|
7210 | private _callbacks;
|
7211 | private taskTrackingZone;
|
7212 | constructor(_ngZone: NgZone);
|
7213 | private _watchAngularEvents;
|
7214 | /**
|
7215 | * Increases the number of pending request
|
7216 | * @deprecated pending requests are now tracked with zones.
|
7217 | */
|
7218 | increasePendingRequestCount(): number;
|
7219 | /**
|
7220 | * Decreases the number of pending request
|
7221 | * @deprecated pending requests are now tracked with zones
|
7222 | */
|
7223 | decreasePendingRequestCount(): number;
|
7224 | /**
|
7225 | * Whether an associated application is stable
|
7226 | */
|
7227 | isStable(): boolean;
|
7228 | private _runCallbacksIfReady;
|
7229 | private getPendingTasks;
|
7230 | private addCallback;
|
7231 | /**
|
7232 | * Wait for the application to be stable with a timeout. If the timeout is reached before that
|
7233 | * happens, the callback receives a list of the macro tasks that were pending, otherwise null.
|
7234 | *
|
7235 | * @param doneCb The callback to invoke when Angular is stable or the timeout expires
|
7236 | * whichever comes first.
|
7237 | * @param timeout Optional. The maximum time to wait for Angular to become stable. If not
|
7238 | * specified, whenStable() will wait forever.
|
7239 | * @param updateCb Optional. If specified, this callback will be invoked whenever the set of
|
7240 | * pending macrotasks changes. If this callback returns true doneCb will not be invoked
|
7241 | * and no further updates will be issued.
|
7242 | */
|
7243 | whenStable(doneCb: Function, timeout?: number, updateCb?: Function): void;
|
7244 | /**
|
7245 | * Get the number of pending requests
|
7246 | * @deprecated pending requests are now tracked with zones
|
7247 | */
|
7248 | getPendingRequestCount(): number;
|
7249 | /**
|
7250 | * Find providers by name
|
7251 | * @param using The root element to search from
|
7252 | * @param provider The name of binding variable
|
7253 | * @param exactMatch Whether using exactMatch
|
7254 | */
|
7255 | findProviders(using: any, provider: string, exactMatch: boolean): any[];
|
7256 | }
|
7257 |
|
7258 | /**
|
7259 | * A global registry of {@link Testability} instances for specific elements.
|
7260 | * @publicApi
|
7261 | */
|
7262 | export declare class TestabilityRegistry {
|
7263 | constructor();
|
7264 | /**
|
7265 | * Registers an application with a testability hook so that it can be tracked
|
7266 | * @param token token of application, root element
|
7267 | * @param testability Testability hook
|
7268 | */
|
7269 | registerApplication(token: any, testability: Testability): void;
|
7270 | /**
|
7271 | * Unregisters an application.
|
7272 | * @param token token of application, root element
|
7273 | */
|
7274 | unregisterApplication(token: any): void;
|
7275 | /**
|
7276 | * Unregisters all applications
|
7277 | */
|
7278 | unregisterAllApplications(): void;
|
7279 | /**
|
7280 | * Get a testability hook associated with the application
|
7281 | * @param elem root element
|
7282 | */
|
7283 | getTestability(elem: any): Testability | null;
|
7284 | /**
|
7285 | * Get all registered testabilities
|
7286 | */
|
7287 | getAllTestabilities(): Testability[];
|
7288 | /**
|
7289 | * Get all registered applications(root elements)
|
7290 | */
|
7291 | getAllRootElements(): any[];
|
7292 | /**
|
7293 | * Find testability of a node in the Tree
|
7294 | * @param elem node
|
7295 | * @param findInAncestors whether finding testability in ancestors if testability was not found in
|
7296 | * current node
|
7297 | */
|
7298 | findTestabilityInTree(elem: Node, findInAncestors?: boolean): Testability | null;
|
7299 | }
|
7300 |
|
7301 | declare interface TextDef {
|
7302 | prefix: string;
|
7303 | }
|
7304 |
|
7305 | /**
|
7306 | * Store information for the i18n translation block.
|
7307 | */
|
7308 | declare interface TI18n {
|
7309 | /**
|
7310 | * A set of OpCodes which will create the Text Nodes and ICU anchors for the translation blocks.
|
7311 | *
|
7312 | * NOTE: The ICU anchors are filled in with ICU Update OpCode.
|
7313 | */
|
7314 | create: I18nCreateOpCodes;
|
7315 | /**
|
7316 | * A set of OpCodes which will be executed on each change detection to determine if any changes to
|
7317 | * DOM are required.
|
7318 | */
|
7319 | update: I18nUpdateOpCodes;
|
7320 | }
|
7321 |
|
7322 | declare interface TIcu {
|
7323 | /**
|
7324 | * Defines the ICU type of `select` or `plural`
|
7325 | */
|
7326 | type: IcuType;
|
7327 | /**
|
7328 | * Index in `LView` where the anchor node is stored. `<!-- ICU 0:0 -->`
|
7329 | */
|
7330 | anchorIdx: number;
|
7331 | /**
|
7332 | * Currently selected ICU case pointer.
|
7333 | *
|
7334 | * `lView[currentCaseLViewIndex]` stores the currently selected case. This is needed to know how
|
7335 | * to clean up the current case when transitioning no the new case.
|
7336 | *
|
7337 | * If the value stored is:
|
7338 | * `null`: No current case selected.
|
7339 | * `<0`: A flag which means that the ICU just switched and that `icuUpdate` must be executed
|
7340 | * regardless of the `mask`. (After the execution the flag is cleared)
|
7341 | * `>=0` A currently selected case index.
|
7342 | */
|
7343 | currentCaseLViewIndex: number;
|
7344 | /**
|
7345 | * A list of case values which the current ICU will try to match.
|
7346 | *
|
7347 | * The last value is `other`
|
7348 | */
|
7349 | cases: any[];
|
7350 | /**
|
7351 | * A set of OpCodes to apply in order to build up the DOM render tree for the ICU
|
7352 | */
|
7353 | create: IcuCreateOpCodes[];
|
7354 | /**
|
7355 | * A set of OpCodes to apply in order to destroy the DOM render tree for the ICU.
|
7356 | */
|
7357 | remove: I18nRemoveOpCodes[];
|
7358 | /**
|
7359 | * A set of OpCodes to apply in order to update the DOM render tree for the ICU bindings.
|
7360 | */
|
7361 | update: I18nUpdateOpCodes[];
|
7362 | }
|
7363 |
|
7364 | /**
|
7365 | * Binding data (flyweight) for a particular node that is shared between all templates
|
7366 | * of a specific type.
|
7367 | *
|
7368 | * If a property is:
|
7369 | * - PropertyAliases: that property's data was generated and this is it
|
7370 | * - Null: that property's data was already generated and nothing was found.
|
7371 | * - Undefined: that property's data has not yet been generated
|
7372 | *
|
7373 | * see: https://en.wikipedia.org/wiki/Flyweight_pattern for more on the Flyweight pattern
|
7374 | */
|
7375 | declare interface TNode {
|
7376 | /** The type of the TNode. See TNodeType. */
|
7377 | type: TNodeType;
|
7378 | /**
|
7379 | * Index of the TNode in TView.data and corresponding native element in LView.
|
7380 | *
|
7381 | * This is necessary to get from any TNode to its corresponding native element when
|
7382 | * traversing the node tree.
|
7383 | *
|
7384 | * If index is -1, this is a dynamically created container node or embedded view node.
|
7385 | */
|
7386 | index: number;
|
7387 | /**
|
7388 | * Insert before existing DOM node index.
|
7389 | *
|
7390 | * When DOM nodes are being inserted, normally they are being appended as they are created.
|
7391 | * Under i18n case, the translated text nodes are created ahead of time as part of the
|
7392 | * `ɵɵi18nStart` instruction which means that this `TNode` can't just be appended and instead
|
7393 | * needs to be inserted using `insertBeforeIndex` semantics.
|
7394 | *
|
7395 | * Additionally sometimes it is necessary to insert new text nodes as a child of this `TNode`. In
|
7396 | * such a case the value stores an array of text nodes to insert.
|
7397 | *
|
7398 | * Example:
|
7399 | * ```
|
7400 | * <div i18n>
|
7401 | * Hello <span>World</span>!
|
7402 | * </div>
|
7403 | * ```
|
7404 | * In the above example the `ɵɵi18nStart` instruction can create `Hello `, `World` and `!` text
|
7405 | * nodes. It can also insert `Hello ` and `!` text node as a child of `<div>`, but it can't
|
7406 | * insert `World` because the `<span>` node has not yet been created. In such a case the
|
7407 | * `<span>` `TNode` will have an array which will direct the `<span>` to not only insert
|
7408 | * itself in front of `!` but also to insert the `World` (created by `ɵɵi18nStart`) into
|
7409 | * `<span>` itself.
|
7410 | *
|
7411 | * Pseudo code:
|
7412 | * ```
|
7413 | * if (insertBeforeIndex === null) {
|
7414 | * // append as normal
|
7415 | * } else if (Array.isArray(insertBeforeIndex)) {
|
7416 | * // First insert current `TNode` at correct location
|
7417 | * const currentNode = lView[this.index];
|
7418 | * parentNode.insertBefore(currentNode, lView[this.insertBeforeIndex[0]]);
|
7419 | * // Now append all of the children
|
7420 | * for(let i=1; i<this.insertBeforeIndex; i++) {
|
7421 | * currentNode.appendChild(lView[this.insertBeforeIndex[i]]);
|
7422 | * }
|
7423 | * } else {
|
7424 | * parentNode.insertBefore(lView[this.index], lView[this.insertBeforeIndex])
|
7425 | * }
|
7426 | * ```
|
7427 | * - null: Append as normal using `parentNode.appendChild`
|
7428 | * - `number`: Append using
|
7429 | * `parentNode.insertBefore(lView[this.index], lView[this.insertBeforeIndex])`
|
7430 | *
|
7431 | * *Initialization*
|
7432 | *
|
7433 | * Because `ɵɵi18nStart` executes before nodes are created, on `TView.firstCreatePass` it is not
|
7434 | * possible for `ɵɵi18nStart` to set the `insertBeforeIndex` value as the corresponding `TNode`
|
7435 | * has not yet been created. For this reason the `ɵɵi18nStart` creates a `TNodeType.Placeholder`
|
7436 | * `TNode` at that location. See `TNodeType.Placeholder` for more information.
|
7437 | */
|
7438 | insertBeforeIndex: InsertBeforeIndex;
|
7439 | /**
|
7440 | * The index of the closest injector in this node's LView.
|
7441 | *
|
7442 | * If the index === -1, there is no injector on this node or any ancestor node in this view.
|
7443 | *
|
7444 | * If the index !== -1, it is the index of this node's injector OR the index of a parent
|
7445 | * injector in the same view. We pass the parent injector index down the node tree of a view so
|
7446 | * it's possible to find the parent injector without walking a potentially deep node tree.
|
7447 | * Injector indices are not set across view boundaries because there could be multiple component
|
7448 | * hosts.
|
7449 | *
|
7450 | * If tNode.injectorIndex === tNode.parent.injectorIndex, then the index belongs to a parent
|
7451 | * injector.
|
7452 | */
|
7453 | injectorIndex: number;
|
7454 | /**
|
7455 | * Stores starting index of the directives.
|
7456 | *
|
7457 | * NOTE: The first directive is always component (if present).
|
7458 | */
|
7459 | directiveStart: number;
|
7460 | /**
|
7461 | * Stores final exclusive index of the directives.
|
7462 | *
|
7463 | * The area right behind the `directiveStart-directiveEnd` range is used to allocate the
|
7464 | * `HostBindingFunction` `vars` (or null if no bindings.) Therefore `directiveEnd` is used to set
|
7465 | * `LFrame.bindingRootIndex` before `HostBindingFunction` is executed.
|
7466 | */
|
7467 | directiveEnd: number;
|
7468 | /**
|
7469 | * Stores the last directive which had a styling instruction.
|
7470 | *
|
7471 | * Initial value of this is `-1` which means that no `hostBindings` styling instruction has
|
7472 | * executed. As `hostBindings` instructions execute they set the value to the index of the
|
7473 | * `DirectiveDef` which contained the last `hostBindings` styling instruction.
|
7474 | *
|
7475 | * Valid values are:
|
7476 | * - `-1` No `hostBindings` instruction has executed.
|
7477 | * - `directiveStart <= directiveStylingLast < directiveEnd`: Points to the `DirectiveDef` of
|
7478 | * the last styling instruction which executed in the `hostBindings`.
|
7479 | *
|
7480 | * This data is needed so that styling instructions know which static styling data needs to be
|
7481 | * collected from the `DirectiveDef.hostAttrs`. A styling instruction needs to collect all data
|
7482 | * since last styling instruction.
|
7483 | */
|
7484 | directiveStylingLast: number;
|
7485 | /**
|
7486 | * Stores indexes of property bindings. This field is only set in the ngDevMode and holds
|
7487 | * indexes of property bindings so TestBed can get bound property metadata for a given node.
|
7488 | */
|
7489 | propertyBindings: number[] | null;
|
7490 | /**
|
7491 | * Stores if Node isComponent, isProjected, hasContentQuery, hasClassInput and hasStyleInput
|
7492 | * etc.
|
7493 | */
|
7494 | flags: TNodeFlags;
|
7495 | /**
|
7496 | * This number stores two values using its bits:
|
7497 | *
|
7498 | * - the index of the first provider on that node (first 16 bits)
|
7499 | * - the count of view providers from the component on this node (last 16 bits)
|
7500 | */
|
7501 | providerIndexes: TNodeProviderIndexes;
|
7502 | /**
|
7503 | * The value name associated with this node.
|
7504 | * if type:
|
7505 | * `TNodeType.Text`: text value
|
7506 | * `TNodeType.Element`: tag name
|
7507 | * `TNodeType.ICUContainer`: `TIcu`
|
7508 | */
|
7509 | value: any;
|
7510 | /**
|
7511 | * Attributes associated with an element. We need to store attributes to support various
|
7512 | * use-cases (attribute injection, content projection with selectors, directives matching).
|
7513 | * Attributes are stored statically because reading them from the DOM would be way too slow for
|
7514 | * content projection and queries.
|
7515 | *
|
7516 | * Since attrs will always be calculated first, they will never need to be marked undefined by
|
7517 | * other instructions.
|
7518 | *
|
7519 | * For regular attributes a name of an attribute and its value alternate in the array.
|
7520 | * e.g. ['role', 'checkbox']
|
7521 | * This array can contain flags that will indicate "special attributes" (attributes with
|
7522 | * namespaces, attributes extracted from bindings and outputs).
|
7523 | */
|
7524 | attrs: TAttributes | null;
|
7525 | /**
|
7526 | * Same as `TNode.attrs` but contains merged data across all directive host bindings.
|
7527 | *
|
7528 | * We need to keep `attrs` as unmerged so that it can be used for attribute selectors.
|
7529 | * We merge attrs here so that it can be used in a performant way for initial rendering.
|
7530 | *
|
7531 | * The `attrs` are merged in first pass in following order:
|
7532 | * - Component's `hostAttrs`
|
7533 | * - Directives' `hostAttrs`
|
7534 | * - Template `TNode.attrs` associated with the current `TNode`.
|
7535 | */
|
7536 | mergedAttrs: TAttributes | null;
|
7537 | /**
|
7538 | * A set of local names under which a given element is exported in a template and
|
7539 | * visible to queries. An entry in this array can be created for different reasons:
|
7540 | * - an element itself is referenced, ex.: `<div #foo>`
|
7541 | * - a component is referenced, ex.: `<my-cmpt #foo>`
|
7542 | * - a directive is referenced, ex.: `<my-cmpt #foo="directiveExportAs">`.
|
7543 | *
|
7544 | * A given element might have different local names and those names can be associated
|
7545 | * with a directive. We store local names at even indexes while odd indexes are reserved
|
7546 | * for directive index in a view (or `-1` if there is no associated directive).
|
7547 | *
|
7548 | * Some examples:
|
7549 | * - `<div #foo>` => `["foo", -1]`
|
7550 | * - `<my-cmpt #foo>` => `["foo", myCmptIdx]`
|
7551 | * - `<my-cmpt #foo #bar="directiveExportAs">` => `["foo", myCmptIdx, "bar", directiveIdx]`
|
7552 | * - `<div #foo #bar="directiveExportAs">` => `["foo", -1, "bar", directiveIdx]`
|
7553 | */
|
7554 | localNames: (string | number)[] | null;
|
7555 | /** Information about input properties that need to be set once from attribute data. */
|
7556 | initialInputs: InitialInputData | null | undefined;
|
7557 | /**
|
7558 | * Input data for all directives on this node. `null` means that there are no directives with
|
7559 | * inputs on this node.
|
7560 | */
|
7561 | inputs: PropertyAliases | null;
|
7562 | /**
|
7563 | * Output data for all directives on this node. `null` means that there are no directives with
|
7564 | * outputs on this node.
|
7565 | */
|
7566 | outputs: PropertyAliases | null;
|
7567 | /**
|
7568 | * The TView or TViews attached to this node.
|
7569 | *
|
7570 | * If this TNode corresponds to an LContainer with inline views, the container will
|
7571 | * need to store separate static data for each of its view blocks (TView[]). Otherwise,
|
7572 | * nodes in inline views with the same index as nodes in their parent views will overwrite
|
7573 | * each other, as they are in the same template.
|
7574 | *
|
7575 | * Each index in this array corresponds to the static data for a certain
|
7576 | * view. So if you had V(0) and V(1) in a container, you might have:
|
7577 | *
|
7578 | * [
|
7579 | * [{tagName: 'div', attrs: ...}, null], // V(0) TView
|
7580 | * [{tagName: 'button', attrs ...}, null] // V(1) TView
|
7581 | *
|
7582 | * If this TNode corresponds to an LContainer with a template (e.g. structural
|
7583 | * directive), the template's TView will be stored here.
|
7584 | *
|
7585 | * If this TNode corresponds to an element, tViews will be null .
|
7586 | */
|
7587 | tViews: TView | TView[] | null;
|
7588 | /**
|
7589 | * The next sibling node. Necessary so we can propagate through the root nodes of a view
|
7590 | * to insert them or remove them from the DOM.
|
7591 | */
|
7592 | next: TNode | null;
|
7593 | /**
|
7594 | * The next projected sibling. Since in Angular content projection works on the node-by-node
|
7595 | * basis the act of projecting nodes might change nodes relationship at the insertion point
|
7596 | * (target view). At the same time we need to keep initial relationship between nodes as
|
7597 | * expressed in content view.
|
7598 | */
|
7599 | projectionNext: TNode | null;
|
7600 | /**
|
7601 | * First child of the current node.
|
7602 | *
|
7603 | * For component nodes, the child will always be a ContentChild (in same view).
|
7604 | * For embedded view nodes, the child will be in their child view.
|
7605 | */
|
7606 | child: TNode | null;
|
7607 | /**
|
7608 | * Parent node (in the same view only).
|
7609 | *
|
7610 | * We need a reference to a node's parent so we can append the node to its parent's native
|
7611 | * element at the appropriate time.
|
7612 | *
|
7613 | * If the parent would be in a different view (e.g. component host), this property will be null.
|
7614 | * It's important that we don't try to cross component boundaries when retrieving the parent
|
7615 | * because the parent will change (e.g. index, attrs) depending on where the component was
|
7616 | * used (and thus shouldn't be stored on TNode). In these cases, we retrieve the parent through
|
7617 | * LView.node instead (which will be instance-specific).
|
7618 | *
|
7619 | * If this is an inline view node (V), the parent will be its container.
|
7620 | */
|
7621 | parent: ɵangular_packages_core_core_bk | TContainerNode | null;
|
7622 | /**
|
7623 | * List of projected TNodes for a given component host element OR index into the said nodes.
|
7624 | *
|
7625 | * For easier discussion assume this example:
|
7626 | * `<parent>`'s view definition:
|
7627 | * ```
|
7628 | * <child id="c1">content1</child>
|
7629 | * <child id="c2"><span>content2</span></child>
|
7630 | * ```
|
7631 | * `<child>`'s view definition:
|
7632 | * ```
|
7633 | * <ng-content id="cont1"></ng-content>
|
7634 | * ```
|
7635 | *
|
7636 | * If `Array.isArray(projection)` then `TNode` is a host element:
|
7637 | * - `projection` stores the content nodes which are to be projected.
|
7638 | * - The nodes represent categories defined by the selector: For example:
|
7639 | * `<ng-content/><ng-content select="abc"/>` would represent the heads for `<ng-content/>`
|
7640 | * and `<ng-content select="abc"/>` respectively.
|
7641 | * - The nodes we store in `projection` are heads only, we used `.next` to get their
|
7642 | * siblings.
|
7643 | * - The nodes `.next` is sorted/rewritten as part of the projection setup.
|
7644 | * - `projection` size is equal to the number of projections `<ng-content>`. The size of
|
7645 | * `c1` will be `1` because `<child>` has only one `<ng-content>`.
|
7646 | * - we store `projection` with the host (`c1`, `c2`) rather than the `<ng-content>` (`cont1`)
|
7647 | * because the same component (`<child>`) can be used in multiple locations (`c1`, `c2`) and
|
7648 | * as a result have different set of nodes to project.
|
7649 | * - without `projection` it would be difficult to efficiently traverse nodes to be projected.
|
7650 | *
|
7651 | * If `typeof projection == 'number'` then `TNode` is a `<ng-content>` element:
|
7652 | * - `projection` is an index of the host's `projection`Nodes.
|
7653 | * - This would return the first head node to project:
|
7654 | * `getHost(currentTNode).projection[currentTNode.projection]`.
|
7655 | * - When projecting nodes the parent node retrieved may be a `<ng-content>` node, in which case
|
7656 | * the process is recursive in nature.
|
7657 | *
|
7658 | * If `projection` is of type `RNode[][]` than we have a collection of native nodes passed as
|
7659 | * projectable nodes during dynamic component creation.
|
7660 | */
|
7661 | projection: (TNode | RNode[])[] | number | null;
|
7662 | /**
|
7663 | * A collection of all `style` static values for an element (including from host).
|
7664 | *
|
7665 | * This field will be populated if and when:
|
7666 | *
|
7667 | * - There are one or more initial `style`s on an element (e.g. `<div style="width:200px;">`)
|
7668 | * - There are one or more initial `style`s on a directive/component host
|
7669 | * (e.g. `@Directive({host: {style: "width:200px;" } }`)
|
7670 | */
|
7671 | styles: string | null;
|
7672 | /**
|
7673 | * A collection of all `style` static values for an element excluding host sources.
|
7674 | *
|
7675 | * Populated when there are one or more initial `style`s on an element
|
7676 | * (e.g. `<div style="width:200px;">`)
|
7677 | * Must be stored separately from `tNode.styles` to facilitate setting directive
|
7678 | * inputs that shadow the `style` property. If we used `tNode.styles` as is for shadowed inputs,
|
7679 | * we would feed host styles back into directives as "inputs". If we used `tNode.attrs`, we
|
7680 | * would have to concatenate the attributes on every template pass. Instead, we process once on
|
7681 | * first create pass and store here.
|
7682 | */
|
7683 | stylesWithoutHost: string | null;
|
7684 | /**
|
7685 | * A `KeyValueArray` version of residual `styles`.
|
7686 | *
|
7687 | * When there are styling instructions than each instruction stores the static styling
|
7688 | * which is of lower priority than itself. This means that there may be a higher priority
|
7689 | * styling than the instruction.
|
7690 | *
|
7691 | * Imagine:
|
7692 | * ```
|
7693 | * <div style="color: highest;" my-dir>
|
7694 | *
|
7695 | * @Directive({
|
7696 | * host: {
|
7697 | * style: 'color: lowest; ',
|
7698 | * '[styles.color]': 'exp' // ɵɵstyleProp('color', ctx.exp);
|
7699 | * }
|
7700 | * })
|
7701 | * ```
|
7702 | *
|
7703 | * In the above case:
|
7704 | * - `color: lowest` is stored with `ɵɵstyleProp('color', ctx.exp);` instruction
|
7705 | * - `color: highest` is the residual and is stored here.
|
7706 | *
|
7707 | * - `undefined': not initialized.
|
7708 | * - `null`: initialized but `styles` is `null`
|
7709 | * - `KeyValueArray`: parsed version of `styles`.
|
7710 | */
|
7711 | residualStyles: KeyValueArray<any> | undefined | null;
|
7712 | /**
|
7713 | * A collection of all class static values for an element (including from host).
|
7714 | *
|
7715 | * This field will be populated if and when:
|
7716 | *
|
7717 | * - There are one or more initial classes on an element (e.g. `<div class="one two three">`)
|
7718 | * - There are one or more initial classes on an directive/component host
|
7719 | * (e.g. `@Directive({host: {class: "SOME_CLASS" } }`)
|
7720 | */
|
7721 | classes: string | null;
|
7722 | /**
|
7723 | * A collection of all class static values for an element excluding host sources.
|
7724 | *
|
7725 | * Populated when there are one or more initial classes on an element
|
7726 | * (e.g. `<div class="SOME_CLASS">`)
|
7727 | * Must be stored separately from `tNode.classes` to facilitate setting directive
|
7728 | * inputs that shadow the `class` property. If we used `tNode.classes` as is for shadowed
|
7729 | * inputs, we would feed host classes back into directives as "inputs". If we used
|
7730 | * `tNode.attrs`, we would have to concatenate the attributes on every template pass. Instead,
|
7731 | * we process once on first create pass and store here.
|
7732 | */
|
7733 | classesWithoutHost: string | null;
|
7734 | /**
|
7735 | * A `KeyValueArray` version of residual `classes`.
|
7736 | *
|
7737 | * Same as `TNode.residualStyles` but for classes.
|
7738 | *
|
7739 | * - `undefined': not initialized.
|
7740 | * - `null`: initialized but `classes` is `null`
|
7741 | * - `KeyValueArray`: parsed version of `classes`.
|
7742 | */
|
7743 | residualClasses: KeyValueArray<any> | undefined | null;
|
7744 | /**
|
7745 | * Stores the head/tail index of the class bindings.
|
7746 | *
|
7747 | * - If no bindings, the head and tail will both be 0.
|
7748 | * - If there are template bindings, stores the head/tail of the class bindings in the template.
|
7749 | * - If no template bindings but there are host bindings, the head value will point to the last
|
7750 | * host binding for "class" (not the head of the linked list), tail will be 0.
|
7751 | *
|
7752 | * See: `style_binding_list.ts` for details.
|
7753 | *
|
7754 | * This is used by `insertTStylingBinding` to know where the next styling binding should be
|
7755 | * inserted so that they can be sorted in priority order.
|
7756 | */
|
7757 | classBindings: TStylingRange;
|
7758 | /**
|
7759 | * Stores the head/tail index of the class bindings.
|
7760 | *
|
7761 | * - If no bindings, the head and tail will both be 0.
|
7762 | * - If there are template bindings, stores the head/tail of the style bindings in the template.
|
7763 | * - If no template bindings but there are host bindings, the head value will point to the last
|
7764 | * host binding for "style" (not the head of the linked list), tail will be 0.
|
7765 | *
|
7766 | * See: `style_binding_list.ts` for details.
|
7767 | *
|
7768 | * This is used by `insertTStylingBinding` to know where the next styling binding should be
|
7769 | * inserted so that they can be sorted in priority order.
|
7770 | */
|
7771 | styleBindings: TStylingRange;
|
7772 | }
|
7773 |
|
7774 | /**
|
7775 | * Corresponds to the TNode.flags property.
|
7776 | */
|
7777 | declare const enum TNodeFlags {
|
7778 | /** Bit #1 - This bit is set if the node is a host for any directive (including a component) */
|
7779 | isDirectiveHost = 1,
|
7780 | /**
|
7781 | * Bit #2 - This bit is set if the node is a host for a component.
|
7782 | *
|
7783 | * Setting this bit implies that the `isDirectiveHost` bit is set as well.
|
7784 | * */
|
7785 | isComponentHost = 2,
|
7786 | /** Bit #3 - This bit is set if the node has been projected */
|
7787 | isProjected = 4,
|
7788 | /** Bit #4 - This bit is set if any directive on this node has content queries */
|
7789 | hasContentQuery = 8,
|
7790 | /** Bit #5 - This bit is set if the node has any "class" inputs */
|
7791 | hasClassInput = 16,
|
7792 | /** Bit #6 - This bit is set if the node has any "style" inputs */
|
7793 | hasStyleInput = 32,
|
7794 | /** Bit #7 This bit is set if the node has been detached by i18n */
|
7795 | isDetached = 64,
|
7796 | /**
|
7797 | * Bit #8 - This bit is set if the node has directives with host bindings.
|
7798 | *
|
7799 | * This flags allows us to guard host-binding logic and invoke it only on nodes
|
7800 | * that actually have directives with host bindings.
|
7801 | */
|
7802 | hasHostBindings = 128
|
7803 | }
|
7804 |
|
7805 | /**
|
7806 | * Corresponds to the TNode.providerIndexes property.
|
7807 | */
|
7808 | declare const enum TNodeProviderIndexes {
|
7809 | /** The index of the first provider on this node is encoded on the least significant bits. */
|
7810 | ProvidersStartIndexMask = 1048575,
|
7811 | /**
|
7812 | * The count of view providers from the component on this node is
|
7813 | * encoded on the 20 most significant bits.
|
7814 | */
|
7815 | CptViewProvidersCountShift = 20,
|
7816 | CptViewProvidersCountShifter = 1048576
|
7817 | }
|
7818 |
|
7819 | /**
|
7820 | * TNodeType corresponds to the {@link TNode} `type` property.
|
7821 | *
|
7822 | * NOTE: type IDs are such that we use each bit to denote a type. This is done so that we can easily
|
7823 | * check if the `TNode` is of more than one type.
|
7824 | *
|
7825 | * `if (tNode.type === TNodeType.Text || tNode.type === TNode.Element)`
|
7826 | * can be written as:
|
7827 | * `if (tNode.type & (TNodeType.Text | TNodeType.Element))`
|
7828 | *
|
7829 | * However any given `TNode` can only be of one type.
|
7830 | */
|
7831 | declare const enum TNodeType {
|
7832 | /**
|
7833 | * The TNode contains information about a DOM element aka {@link RText}.
|
7834 | */
|
7835 | Text = 1,
|
7836 | /**
|
7837 | * The TNode contains information about a DOM element aka {@link RElement}.
|
7838 | */
|
7839 | Element = 2,
|
7840 | /**
|
7841 | * The TNode contains information about an {@link LContainer} for embedded views.
|
7842 | */
|
7843 | Container = 4,
|
7844 | /**
|
7845 | * The TNode contains information about an `<ng-container>` element {@link RNode}.
|
7846 | */
|
7847 | ElementContainer = 8,
|
7848 | /**
|
7849 | * The TNode contains information about an `<ng-content>` projection
|
7850 | */
|
7851 | Projection = 16,
|
7852 | /**
|
7853 | * The TNode contains information about an ICU comment used in `i18n`.
|
7854 | */
|
7855 | Icu = 32,
|
7856 | /**
|
7857 | * Special node type representing a placeholder for future `TNode` at this location.
|
7858 | *
|
7859 | * I18n translation blocks are created before the element nodes which they contain. (I18n blocks
|
7860 | * can span over many elements.) Because i18n `TNode`s (representing text) are created first they
|
7861 | * often may need to point to element `TNode`s which are not yet created. In such a case we create
|
7862 | * a `Placeholder` `TNode`. This allows the i18n to structurally link the `TNode`s together
|
7863 | * without knowing any information about the future nodes which will be at that location.
|
7864 | *
|
7865 | * On `firstCreatePass` When element instruction executes it will try to create a `TNode` at that
|
7866 | * location. Seeing a `Placeholder` `TNode` already there tells the system that it should reuse
|
7867 | * existing `TNode` (rather than create a new one) and just update the missing information.
|
7868 | */
|
7869 | Placeholder = 64,
|
7870 | AnyRNode = 3,
|
7871 | AnyContainer = 12
|
7872 | }
|
7873 |
|
7874 | /**
|
7875 | * Type representing a set of TNodes that can have local refs (`#foo`) placed on them.
|
7876 | */
|
7877 | declare type TNodeWithLocalRefs = TContainerNode | ɵangular_packages_core_core_bk | TElementContainerNode;
|
7878 |
|
7879 | /** Static data for an LProjectionNode */
|
7880 | declare interface TProjectionNode extends TNode {
|
7881 | /** Index in the data[] array */
|
7882 | child: null;
|
7883 | /**
|
7884 | * Projection nodes will have parents unless they are the first node of a component
|
7885 | * or embedded view (which means their parent is in a different view and must be
|
7886 | * retrieved using LView.node).
|
7887 | */
|
7888 | parent: ɵangular_packages_core_core_bk | TElementContainerNode | null;
|
7889 | tViews: null;
|
7890 | /** Index of the projection node. (See TNode.projection for more info.) */
|
7891 | projection: number;
|
7892 | value: null;
|
7893 | }
|
7894 |
|
7895 | /**
|
7896 | * TQueries represent a collection of individual TQuery objects tracked in a given view. Most of the
|
7897 | * methods on this interface are simple proxy methods to the corresponding functionality on TQuery.
|
7898 | */
|
7899 | declare interface TQueries {
|
7900 | /**
|
7901 | * Adds a new TQuery to a collection of queries tracked in a given view.
|
7902 | * @param tQuery
|
7903 | */
|
7904 | track(tQuery: TQuery): void;
|
7905 | /**
|
7906 | * Returns a TQuery instance for at the given index in the queries array.
|
7907 | * @param index
|
7908 | */
|
7909 | getByIndex(index: number): TQuery;
|
7910 | /**
|
7911 | * Returns the number of queries tracked in a given view.
|
7912 | */
|
7913 | length: number;
|
7914 | /**
|
7915 | * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding
|
7916 | * `elementStart` on each and every TQuery.
|
7917 | * @param tView
|
7918 | * @param tNode
|
7919 | */
|
7920 | elementStart(tView: TView, tNode: TNode): void;
|
7921 | /**
|
7922 | * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding
|
7923 | * `elementEnd` on each and every TQuery.
|
7924 | * @param tNode
|
7925 | */
|
7926 | elementEnd(tNode: TNode): void;
|
7927 | /**
|
7928 | * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding
|
7929 | * `template` on each and every TQuery.
|
7930 | * @param tView
|
7931 | * @param tNode
|
7932 | */
|
7933 | template(tView: TView, tNode: TNode): void;
|
7934 | /**
|
7935 | * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding
|
7936 | * `embeddedTView` on each and every TQuery.
|
7937 | * @param tNode
|
7938 | */
|
7939 | embeddedTView(tNode: TNode): TQueries | null;
|
7940 | }
|
7941 |
|
7942 | /**
|
7943 | * TQuery objects represent all the query-related data that remain the same from one view instance
|
7944 | * to another and can be determined on the very first template pass. Most notably TQuery holds all
|
7945 | * the matches for a given view.
|
7946 | */
|
7947 | declare interface TQuery {
|
7948 | /**
|
7949 | * Query metadata extracted from query annotations.
|
7950 | */
|
7951 | metadata: TQueryMetadata;
|
7952 | /**
|
7953 | * Index of a query in a declaration view in case of queries propagated to en embedded view, -1
|
7954 | * for queries declared in a given view. We are storing this index so we can find a parent query
|
7955 | * to clone for an embedded view (when an embedded view is created).
|
7956 | */
|
7957 | indexInDeclarationView: number;
|
7958 | /**
|
7959 | * Matches collected on the first template pass. Each match is a pair of:
|
7960 | * - TNode index;
|
7961 | * - match index;
|
7962 | *
|
7963 | * A TNode index can be either:
|
7964 | * - a positive number (the most common case) to indicate a matching TNode;
|
7965 | * - a negative number to indicate that a given query is crossing a <ng-template> element and
|
7966 | * results from views created based on TemplateRef should be inserted at this place.
|
7967 | *
|
7968 | * A match index is a number used to find an actual value (for a given node) when query results
|
7969 | * are materialized. This index can have one of the following values:
|
7970 | * - -2 - indicates that we need to read a special token (TemplateRef, ViewContainerRef etc.);
|
7971 | * - -1 - indicates that we need to read a default value based on the node type (TemplateRef for
|
7972 | * ng-template and ElementRef for other elements);
|
7973 | * - a positive number - index of an injectable to be read from the element injector.
|
7974 | */
|
7975 | matches: number[] | null;
|
7976 | /**
|
7977 | * A flag indicating if a given query crosses an <ng-template> element. This flag exists for
|
7978 | * performance reasons: we can notice that queries not crossing any <ng-template> elements will
|
7979 | * have matches from a given view only (and adapt processing accordingly).
|
7980 | */
|
7981 | crossesNgTemplate: boolean;
|
7982 | /**
|
7983 | * A method call when a given query is crossing an element (or element container). This is where a
|
7984 | * given TNode is matched against a query predicate.
|
7985 | * @param tView
|
7986 | * @param tNode
|
7987 | */
|
7988 | elementStart(tView: TView, tNode: TNode): void;
|
7989 | /**
|
7990 | * A method called when processing the elementEnd instruction - this is mostly useful to determine
|
7991 | * if a given content query should match any nodes past this point.
|
7992 | * @param tNode
|
7993 | */
|
7994 | elementEnd(tNode: TNode): void;
|
7995 | /**
|
7996 | * A method called when processing the template instruction. This is where a
|
7997 | * given TContainerNode is matched against a query predicate.
|
7998 | * @param tView
|
7999 | * @param tNode
|
8000 | */
|
8001 | template(tView: TView, tNode: TNode): void;
|
8002 | /**
|
8003 | * A query-related method called when an embedded TView is created based on the content of a
|
8004 | * <ng-template> element. We call this method to determine if a given query should be propagated
|
8005 | * to the embedded view and if so - return a cloned TQuery for this embedded view.
|
8006 | * @param tNode
|
8007 | * @param childQueryIndex
|
8008 | */
|
8009 | embeddedTView(tNode: TNode, childQueryIndex: number): TQuery | null;
|
8010 | }
|
8011 |
|
8012 | /**
|
8013 | * An object representing query metadata extracted from query annotations.
|
8014 | */
|
8015 | declare interface TQueryMetadata {
|
8016 | predicate: ProviderToken<unknown> | string[];
|
8017 | read: any;
|
8018 | flags: QueryFlags;
|
8019 | }
|
8020 |
|
8021 | /**
|
8022 | * A function optionally passed into the `NgForOf` directive to customize how `NgForOf` uniquely
|
8023 | * identifies items in an iterable.
|
8024 | *
|
8025 | * `NgForOf` needs to uniquely identify items in the iterable to correctly perform DOM updates
|
8026 | * when items in the iterable are reordered, new items are added, or existing items are removed.
|
8027 | *
|
8028 | *
|
8029 | * In all of these scenarios it is usually desirable to only update the DOM elements associated
|
8030 | * with the items affected by the change. This behavior is important to:
|
8031 | *
|
8032 | * - preserve any DOM-specific UI state (like cursor position, focus, text selection) when the
|
8033 | * iterable is modified
|
8034 | * - enable animation of item addition, removal, and iterable reordering
|
8035 | * - preserve the value of the `<select>` element when nested `<option>` elements are dynamically
|
8036 | * populated using `NgForOf` and the bound iterable is updated
|
8037 | *
|
8038 | * A common use for custom `trackBy` functions is when the model that `NgForOf` iterates over
|
8039 | * contains a property with a unique identifier. For example, given a model:
|
8040 | *
|
8041 | * ```ts
|
8042 | * class User {
|
8043 | * id: number;
|
8044 | * name: string;
|
8045 | * ...
|
8046 | * }
|
8047 | * ```
|
8048 | * a custom `trackBy` function could look like the following:
|
8049 | * ```ts
|
8050 | * function userTrackBy(index, user) {
|
8051 | * return user.id;
|
8052 | * }
|
8053 | * ```
|
8054 | *
|
8055 | * A custom `trackBy` function must have several properties:
|
8056 | *
|
8057 | * - be [idempotent](https://en.wikipedia.org/wiki/Idempotence) (be without side effects, and always
|
8058 | * return the same value for a given input)
|
8059 | * - return unique value for all unique inputs
|
8060 | * - be fast
|
8061 | *
|
8062 | * @see [`NgForOf#ngForTrackBy`](api/common/NgForOf#ngForTrackBy)
|
8063 | * @publicApi
|
8064 | */
|
8065 | export declare interface TrackByFunction<T> {
|
8066 | /**
|
8067 | * @param index The index of the item within the iterable.
|
8068 | * @param item The item in the iterable.
|
8069 | */
|
8070 | <U extends T>(index: number, item: T & U): any;
|
8071 | }
|
8072 |
|
8073 | /**
|
8074 | * Use this token at bootstrap to provide the content of your translation file (`xtb`,
|
8075 | * `xlf` or `xlf2`) when you want to translate your application in another language.
|
8076 | *
|
8077 | * See the [i18n guide](guide/i18n#merge) for more information.
|
8078 | *
|
8079 | * @usageNotes
|
8080 | * ### Example
|
8081 | *
|
8082 | * ```typescript
|
8083 | * import { TRANSLATIONS } from '@angular/core';
|
8084 | * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
8085 | * import { AppModule } from './app/app.module';
|
8086 | *
|
8087 | * // content of your translation file
|
8088 | * const translations = '....';
|
8089 | *
|
8090 | * platformBrowserDynamic().bootstrapModule(AppModule, {
|
8091 | * providers: [{provide: TRANSLATIONS, useValue: translations }]
|
8092 | * });
|
8093 | * ```
|
8094 | *
|
8095 | * @publicApi
|
8096 | */
|
8097 | export declare const TRANSLATIONS: InjectionToken<string>;
|
8098 |
|
8099 | /**
|
8100 | * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,
|
8101 | * `xlf` or `xlf2`.
|
8102 | *
|
8103 | * See the [i18n guide](guide/i18n#merge) for more information.
|
8104 | *
|
8105 | * @usageNotes
|
8106 | * ### Example
|
8107 | *
|
8108 | * ```typescript
|
8109 | * import { TRANSLATIONS_FORMAT } from '@angular/core';
|
8110 | * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
8111 | * import { AppModule } from './app/app.module';
|
8112 | *
|
8113 | * platformBrowserDynamic().bootstrapModule(AppModule, {
|
8114 | * providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]
|
8115 | * });
|
8116 | * ```
|
8117 | *
|
8118 | * @publicApi
|
8119 | */
|
8120 | export declare const TRANSLATIONS_FORMAT: InjectionToken<string>;
|
8121 |
|
8122 | declare const TRANSPLANTED_VIEWS_TO_REFRESH = 5;
|
8123 |
|
8124 |
|
8125 | /**
|
8126 | * @fileoverview
|
8127 | * While Angular only uses Trusted Types internally for the time being,
|
8128 | * references to Trusted Types could leak into our core.d.ts, which would force
|
8129 | * anyone compiling against @angular/core to provide the @types/trusted-types
|
8130 | * package in their compilation unit.
|
8131 | *
|
8132 | * Until https://github.com/microsoft/TypeScript/issues/30024 is resolved, we
|
8133 | * will keep Angular's public API surface free of references to Trusted Types.
|
8134 | * For internal and semi-private APIs that need to reference Trusted Types, the
|
8135 | * minimal type definitions for the Trusted Types API provided by this module
|
8136 | * should be used instead. They are marked as "declare" to prevent them from
|
8137 | * being renamed by compiler optimization.
|
8138 | *
|
8139 | * Adapted from
|
8140 | * https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/trusted-types/index.d.ts
|
8141 | * but restricted to the API surface used within Angular.
|
8142 | */
|
8143 | declare interface TrustedHTML {
|
8144 | __brand__: 'TrustedHTML';
|
8145 | }
|
8146 |
|
8147 | declare interface TrustedScript {
|
8148 | __brand__: 'TrustedScript';
|
8149 | }
|
8150 |
|
8151 | declare interface TrustedScriptURL {
|
8152 | __brand__: 'TrustedScriptURL';
|
8153 | }
|
8154 |
|
8155 | /**
|
8156 | * Value stored in the `TData` which is needed to re-concatenate the styling.
|
8157 | *
|
8158 | * See: `TStylingKeyPrimitive` and `TStylingStatic`
|
8159 | */
|
8160 | declare type TStylingKey = TStylingKeyPrimitive | TStylingStatic;
|
8161 |
|
8162 | /**
|
8163 | * The primitive portion (`TStylingStatic` removed) of the value stored in the `TData` which is
|
8164 | * needed to re-concatenate the styling.
|
8165 | *
|
8166 | * - `string`: Stores the property name. Used with `ɵɵstyleProp`/`ɵɵclassProp` instruction.
|
8167 | * - `null`: Represents map, so there is no name. Used with `ɵɵstyleMap`/`ɵɵclassMap`.
|
8168 | * - `false`: Represents an ignore case. This happens when `ɵɵstyleProp`/`ɵɵclassProp` instruction
|
8169 | * is combined with directive which shadows its input `@Input('class')`. That way the binding
|
8170 | * should not participate in the styling resolution.
|
8171 | */
|
8172 | declare type TStylingKeyPrimitive = string | null | false;
|
8173 |
|
8174 | /**
|
8175 | * This is a branded number which contains previous and next index.
|
8176 | *
|
8177 | * When we come across styling instructions we need to store the `TStylingKey` in the correct
|
8178 | * order so that we can re-concatenate the styling value in the desired priority.
|
8179 | *
|
8180 | * The insertion can happen either at the:
|
8181 | * - end of template as in the case of coming across additional styling instruction in the template
|
8182 | * - in front of the template in the case of coming across additional instruction in the
|
8183 | * `hostBindings`.
|
8184 | *
|
8185 | * We use `TStylingRange` to store the previous and next index into the `TData` where the template
|
8186 | * bindings can be found.
|
8187 | *
|
8188 | * - bit 0 is used to mark that the previous index has a duplicate for current value.
|
8189 | * - bit 1 is used to mark that the next index has a duplicate for the current value.
|
8190 | * - bits 2-16 are used to encode the next/tail of the template.
|
8191 | * - bits 17-32 are used to encode the previous/head of template.
|
8192 | *
|
8193 | * NODE: *duplicate* false implies that it is statically known that this binding will not collide
|
8194 | * with other bindings and therefore there is no need to check other bindings. For example the
|
8195 | * bindings in `<div [style.color]="exp" [style.width]="exp">` will never collide and will have
|
8196 | * their bits set accordingly. Previous duplicate means that we may need to check previous if the
|
8197 | * current binding is `null`. Next duplicate means that we may need to check next bindings if the
|
8198 | * current binding is not `null`.
|
8199 | *
|
8200 | * NOTE: `0` has special significance and represents `null` as in no additional pointer.
|
8201 | */
|
8202 | declare interface TStylingRange {
|
8203 | __brand__: 'TStylingRange';
|
8204 | }
|
8205 |
|
8206 | /**
|
8207 | * Store the static values for the styling binding.
|
8208 | *
|
8209 | * The `TStylingStatic` is just `KeyValueArray` where key `""` (stored at location 0) contains the
|
8210 | * `TStylingKey` (stored at location 1). In other words this wraps the `TStylingKey` such that the
|
8211 | * `""` contains the wrapped value.
|
8212 | *
|
8213 | * When instructions are resolving styling they may need to look forward or backwards in the linked
|
8214 | * list to resolve the value. For this reason we have to make sure that he linked list also contains
|
8215 | * the static values. However the list only has space for one item per styling instruction. For this
|
8216 | * reason we store the static values here as part of the `TStylingKey`. This means that the
|
8217 | * resolution function when looking for a value needs to first look at the binding value, and than
|
8218 | * at `TStylingKey` (if it exists).
|
8219 | *
|
8220 | * Imagine we have:
|
8221 | *
|
8222 | * ```
|
8223 | * <div class="TEMPLATE" my-dir>
|
8224 | *
|
8225 | * @Directive({
|
8226 | * host: {
|
8227 | * class: 'DIR',
|
8228 | * '[class.dynamic]': 'exp' // ɵɵclassProp('dynamic', ctx.exp);
|
8229 | * }
|
8230 | * })
|
8231 | * ```
|
8232 | *
|
8233 | * In the above case the linked list will contain one item:
|
8234 | *
|
8235 | * ```
|
8236 | * // assume binding location: 10 for `ɵɵclassProp('dynamic', ctx.exp);`
|
8237 | * tData[10] = <TStylingStatic>[
|
8238 | * '': 'dynamic', // This is the wrapped value of `TStylingKey`
|
8239 | * 'DIR': true, // This is the default static value of directive binding.
|
8240 | * ];
|
8241 | * tData[10 + 1] = 0; // We don't have prev/next.
|
8242 | *
|
8243 | * lView[10] = undefined; // assume `ctx.exp` is `undefined`
|
8244 | * lView[10 + 1] = undefined; // Just normalized `lView[10]`
|
8245 | * ```
|
8246 | *
|
8247 | * So when the function is resolving styling value, it first needs to look into the linked list
|
8248 | * (there is none) and than into the static `TStylingStatic` too see if there is a default value for
|
8249 | * `dynamic` (there is not). Therefore it is safe to remove it.
|
8250 | *
|
8251 | * If setting `true` case:
|
8252 | * ```
|
8253 | * lView[10] = true; // assume `ctx.exp` is `true`
|
8254 | * lView[10 + 1] = true; // Just normalized `lView[10]`
|
8255 | * ```
|
8256 | * So when the function is resolving styling value, it first needs to look into the linked list
|
8257 | * (there is none) and than into `TNode.residualClass` (TNode.residualStyle) which contains
|
8258 | * ```
|
8259 | * tNode.residualClass = [
|
8260 | * 'TEMPLATE': true,
|
8261 | * ];
|
8262 | * ```
|
8263 | *
|
8264 | * This means that it is safe to add class.
|
8265 | */
|
8266 | declare interface TStylingStatic extends KeyValueArray<any> {
|
8267 | }
|
8268 |
|
8269 | /** Static data for a text node */
|
8270 | declare interface TTextNode extends TNode {
|
8271 | /** Index in the data[] array */
|
8272 | index: number;
|
8273 | child: null;
|
8274 | /**
|
8275 | * Text nodes will have parents unless they are the first node of a component or
|
8276 | * embedded view (which means their parent is in a different view and must be
|
8277 | * retrieved using LView.node).
|
8278 | */
|
8279 | parent: ɵangular_packages_core_core_bk | TElementContainerNode | null;
|
8280 | tViews: null;
|
8281 | projection: null;
|
8282 | }
|
8283 |
|
8284 | declare const TVIEW = 1;
|
8285 |
|
8286 | /**
|
8287 | * The static data for an LView (shared between all templates of a
|
8288 | * given type).
|
8289 | *
|
8290 | * Stored on the `ComponentDef.tView`.
|
8291 | */
|
8292 | declare interface TView {
|
8293 | /**
|
8294 | * Type of `TView` (`Root`|`Component`|`Embedded`).
|
8295 | */
|
8296 | type: TViewType;
|
8297 | /**
|
8298 | * This is a blueprint used to generate LView instances for this TView. Copying this
|
8299 | * blueprint is faster than creating a new LView from scratch.
|
8300 | */
|
8301 | blueprint: ɵangular_packages_core_core_ca;
|
8302 | /**
|
8303 | * The template function used to refresh the view of dynamically created views
|
8304 | * and components. Will be null for inline views.
|
8305 | */
|
8306 | template: ComponentTemplate<{}> | null;
|
8307 | /**
|
8308 | * A function containing query-related instructions.
|
8309 | */
|
8310 | viewQuery: ViewQueriesFunction<{}> | null;
|
8311 | /**
|
8312 | * A `TNode` representing the declaration location of this `TView` (not part of this TView).
|
8313 | */
|
8314 | declTNode: TNode | null;
|
8315 | /** Whether or not this template has been processed in creation mode. */
|
8316 | firstCreatePass: boolean;
|
8317 | /**
|
8318 | * Whether or not this template has been processed in update mode (e.g. change detected)
|
8319 | *
|
8320 | * `firstUpdatePass` is used by styling to set up `TData` to contain metadata about the styling
|
8321 | * instructions. (Mainly to build up a linked list of styling priority order.)
|
8322 | *
|
8323 | * Typically this function gets cleared after first execution. If exception is thrown then this
|
8324 | * flag can remain turned un until there is first successful (no exception) pass. This means that
|
8325 | * individual styling instructions keep track of if they have already been added to the linked
|
8326 | * list to prevent double adding.
|
8327 | */
|
8328 | firstUpdatePass: boolean;
|
8329 | /** Static data equivalent of LView.data[]. Contains TNodes, PipeDefInternal or TI18n. */
|
8330 | data: TData;
|
8331 | /**
|
8332 | * The binding start index is the index at which the data array
|
8333 | * starts to store bindings only. Saving this value ensures that we
|
8334 | * will begin reading bindings at the correct point in the array when
|
8335 | * we are in update mode.
|
8336 | *
|
8337 | * -1 means that it has not been initialized.
|
8338 | */
|
8339 | bindingStartIndex: number;
|
8340 | /**
|
8341 | * The index where the "expando" section of `LView` begins. The expando
|
8342 | * section contains injectors, directive instances, and host binding values.
|
8343 | * Unlike the "decls" and "vars" sections of `LView`, the length of this
|
8344 | * section cannot be calculated at compile-time because directives are matched
|
8345 | * at runtime to preserve locality.
|
8346 | *
|
8347 | * We store this start index so we know where to start checking host bindings
|
8348 | * in `setHostBindings`.
|
8349 | */
|
8350 | expandoStartIndex: number;
|
8351 | /**
|
8352 | * Whether or not there are any static view queries tracked on this view.
|
8353 | *
|
8354 | * We store this so we know whether or not we should do a view query
|
8355 | * refresh after creation mode to collect static query results.
|
8356 | */
|
8357 | staticViewQueries: boolean;
|
8358 | /**
|
8359 | * Whether or not there are any static content queries tracked on this view.
|
8360 | *
|
8361 | * We store this so we know whether or not we should do a content query
|
8362 | * refresh after creation mode to collect static query results.
|
8363 | */
|
8364 | staticContentQueries: boolean;
|
8365 | /**
|
8366 | * A reference to the first child node located in the view.
|
8367 | */
|
8368 | firstChild: TNode | null;
|
8369 | /**
|
8370 | * Stores the OpCodes to be replayed during change-detection to process the `HostBindings`
|
8371 | *
|
8372 | * See `HostBindingOpCodes` for encoding details.
|
8373 | */
|
8374 | hostBindingOpCodes: HostBindingOpCodes | null;
|
8375 | /**
|
8376 | * Full registry of directives and components that may be found in this view.
|
8377 | *
|
8378 | * It's necessary to keep a copy of the full def list on the TView so it's possible
|
8379 | * to render template functions without a host component.
|
8380 | */
|
8381 | directiveRegistry: DirectiveDefList | null;
|
8382 | /**
|
8383 | * Full registry of pipes that may be found in this view.
|
8384 | *
|
8385 | * The property is either an array of `PipeDefs`s or a function which returns the array of
|
8386 | * `PipeDefs`s. The function is necessary to be able to support forward declarations.
|
8387 | *
|
8388 | * It's necessary to keep a copy of the full def list on the TView so it's possible
|
8389 | * to render template functions without a host component.
|
8390 | */
|
8391 | pipeRegistry: PipeDefList | null;
|
8392 | /**
|
8393 | * Array of ngOnInit, ngOnChanges and ngDoCheck hooks that should be executed for this view in
|
8394 | * creation mode.
|
8395 | *
|
8396 | * This array has a flat structure and contains TNode indices, directive indices (where an
|
8397 | * instance can be found in `LView`) and hook functions. TNode index is followed by the directive
|
8398 | * index and a hook function. If there are multiple hooks for a given TNode, the TNode index is
|
8399 | * not repeated and the next lifecycle hook information is stored right after the previous hook
|
8400 | * function. This is done so that at runtime the system can efficiently iterate over all of the
|
8401 | * functions to invoke without having to make any decisions/lookups.
|
8402 | */
|
8403 | preOrderHooks: HookData | null;
|
8404 | /**
|
8405 | * Array of ngOnChanges and ngDoCheck hooks that should be executed for this view in update mode.
|
8406 | *
|
8407 | * This array has the same structure as the `preOrderHooks` one.
|
8408 | */
|
8409 | preOrderCheckHooks: HookData | null;
|
8410 | /**
|
8411 | * Array of ngAfterContentInit and ngAfterContentChecked hooks that should be executed
|
8412 | * for this view in creation mode.
|
8413 | *
|
8414 | * Even indices: Directive index
|
8415 | * Odd indices: Hook function
|
8416 | */
|
8417 | contentHooks: HookData | null;
|
8418 | /**
|
8419 | * Array of ngAfterContentChecked hooks that should be executed for this view in update
|
8420 | * mode.
|
8421 | *
|
8422 | * Even indices: Directive index
|
8423 | * Odd indices: Hook function
|
8424 | */
|
8425 | contentCheckHooks: HookData | null;
|
8426 | /**
|
8427 | * Array of ngAfterViewInit and ngAfterViewChecked hooks that should be executed for
|
8428 | * this view in creation mode.
|
8429 | *
|
8430 | * Even indices: Directive index
|
8431 | * Odd indices: Hook function
|
8432 | */
|
8433 | viewHooks: HookData | null;
|
8434 | /**
|
8435 | * Array of ngAfterViewChecked hooks that should be executed for this view in
|
8436 | * update mode.
|
8437 | *
|
8438 | * Even indices: Directive index
|
8439 | * Odd indices: Hook function
|
8440 | */
|
8441 | viewCheckHooks: HookData | null;
|
8442 | /**
|
8443 | * Array of ngOnDestroy hooks that should be executed when this view is destroyed.
|
8444 | *
|
8445 | * Even indices: Directive index
|
8446 | * Odd indices: Hook function
|
8447 | */
|
8448 | destroyHooks: DestroyHookData | null;
|
8449 | /**
|
8450 | * When a view is destroyed, listeners need to be released and outputs need to be
|
8451 | * unsubscribed. This cleanup array stores both listener data (in chunks of 4)
|
8452 | * and output data (in chunks of 2) for a particular view. Combining the arrays
|
8453 | * saves on memory (70 bytes per array) and on a few bytes of code size (for two
|
8454 | * separate for loops).
|
8455 | *
|
8456 | * If it's a native DOM listener or output subscription being stored:
|
8457 | * 1st index is: event name `name = tView.cleanup[i+0]`
|
8458 | * 2nd index is: index of native element or a function that retrieves global target (window,
|
8459 | * document or body) reference based on the native element:
|
8460 | * `typeof idxOrTargetGetter === 'function'`: global target getter function
|
8461 | * `typeof idxOrTargetGetter === 'number'`: index of native element
|
8462 | *
|
8463 | * 3rd index is: index of listener function `listener = lView[CLEANUP][tView.cleanup[i+2]]`
|
8464 | * 4th index is: `useCaptureOrIndx = tView.cleanup[i+3]`
|
8465 | * `typeof useCaptureOrIndx == 'boolean' : useCapture boolean
|
8466 | * `typeof useCaptureOrIndx == 'number':
|
8467 | * `useCaptureOrIndx >= 0` `removeListener = LView[CLEANUP][useCaptureOrIndx]`
|
8468 | * `useCaptureOrIndx < 0` `subscription = LView[CLEANUP][-useCaptureOrIndx]`
|
8469 | *
|
8470 | * If it's an output subscription or query list destroy hook:
|
8471 | * 1st index is: output unsubscribe function / query list destroy function
|
8472 | * 2nd index is: index of function context in LView.cleanupInstances[]
|
8473 | * `tView.cleanup[i+0].call(lView[CLEANUP][tView.cleanup[i+1]])`
|
8474 | */
|
8475 | cleanup: any[] | null;
|
8476 | /**
|
8477 | * A list of element indices for child components that will need to be
|
8478 | * refreshed when the current view has finished its check. These indices have
|
8479 | * already been adjusted for the HEADER_OFFSET.
|
8480 | *
|
8481 | */
|
8482 | components: number[] | null;
|
8483 | /**
|
8484 | * A collection of queries tracked in a given view.
|
8485 | */
|
8486 | queries: TQueries | null;
|
8487 | /**
|
8488 | * An array of indices pointing to directives with content queries alongside with the
|
8489 | * corresponding query index. Each entry in this array is a tuple of:
|
8490 | * - index of the first content query index declared by a given directive;
|
8491 | * - index of a directive.
|
8492 | *
|
8493 | * We are storing those indexes so we can refresh content queries as part of a view refresh
|
8494 | * process.
|
8495 | */
|
8496 | contentQueries: number[] | null;
|
8497 | /**
|
8498 | * Set of schemas that declare elements to be allowed inside the view.
|
8499 | */
|
8500 | schemas: SchemaMetadata[] | null;
|
8501 | /**
|
8502 | * Array of constants for the view. Includes attribute arrays, local definition arrays etc.
|
8503 | * Used for directive matching, attribute bindings, local definitions and more.
|
8504 | */
|
8505 | consts: TConstants | null;
|
8506 | /**
|
8507 | * Indicates that there was an error before we managed to complete the first create pass of the
|
8508 | * view. This means that the view is likely corrupted and we should try to recover it.
|
8509 | */
|
8510 | incompleteFirstPass: boolean;
|
8511 | }
|
8512 |
|
8513 | /**
|
8514 | * Explicitly marks `TView` as a specific type in `ngDevMode`
|
8515 | *
|
8516 | * It is useful to know conceptually what time of `TView` we are dealing with when
|
8517 | * debugging an application (even if the runtime does not need it.) For this reason
|
8518 | * we store this information in the `ngDevMode` `TView` and than use it for
|
8519 | * better debugging experience.
|
8520 | */
|
8521 | declare const enum TViewType {
|
8522 | /**
|
8523 | * Root `TView` is the used to bootstrap components into. It is used in conjunction with
|
8524 | * `LView` which takes an existing DOM node not owned by Angular and wraps it in `TView`/`LView`
|
8525 | * so that other components can be loaded into it.
|
8526 | */
|
8527 | Root = 0,
|
8528 | /**
|
8529 | * `TView` associated with a Component. This would be the `TView` directly associated with the
|
8530 | * component view (as opposed an `Embedded` `TView` which would be a child of `Component` `TView`)
|
8531 | */
|
8532 | Component = 1,
|
8533 | /**
|
8534 | * `TView` associated with a template. Such as `*ngIf`, `<ng-template>` etc... A `Component`
|
8535 | * can have zero or more `Embedede` `TView`s.
|
8536 | */
|
8537 | Embedded = 2
|
8538 | }
|
8539 |
|
8540 | /**
|
8541 | * Special location which allows easy identification of type. If we have an array which was
|
8542 | * retrieved from the `LView` and that array has `true` at `TYPE` location, we know it is
|
8543 | * `LContainer`.
|
8544 | */
|
8545 | declare const TYPE = 1;
|
8546 |
|
8547 | /**
|
8548 | * @description
|
8549 | *
|
8550 | * Represents a type that a Component or other object is instances of.
|
8551 | *
|
8552 | * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is represented by
|
8553 | * the `MyCustomComponent` constructor function.
|
8554 | *
|
8555 | * @publicApi
|
8556 | */
|
8557 | export declare const Type: FunctionConstructor;
|
8558 |
|
8559 | export declare interface Type<T> extends Function {
|
8560 | new (...args: any[]): T;
|
8561 | }
|
8562 |
|
8563 | declare type Type_2 = Function;
|
8564 |
|
8565 | /**
|
8566 | * An interface implemented by all Angular type decorators, which allows them to be used as
|
8567 | * decorators as well as Angular syntax.
|
8568 | *
|
8569 | * ```
|
8570 | * @ng.Component({...})
|
8571 | * class MyClass {...}
|
8572 | * ```
|
8573 | *
|
8574 | * @publicApi
|
8575 | */
|
8576 | export declare interface TypeDecorator {
|
8577 | /**
|
8578 | * Invoke as decorator.
|
8579 | */
|
8580 | <T extends Type<any>>(type: T): T;
|
8581 | (target: Object, propertyKey?: string | symbol, parameterIndex?: number): void;
|
8582 | }
|
8583 |
|
8584 | /**
|
8585 | * Configures the `Injector` to return an instance of `Type` when `Type' is used as the token.
|
8586 | *
|
8587 | * Create an instance by invoking the `new` operator and supplying additional arguments.
|
8588 | * This form is a short form of `TypeProvider`;
|
8589 | *
|
8590 | * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
|
8591 | *
|
8592 | * @usageNotes
|
8593 | *
|
8594 | * {@example core/di/ts/provider_spec.ts region='TypeProvider'}
|
8595 | *
|
8596 | * @publicApi
|
8597 | */
|
8598 | export declare interface TypeProvider extends Type<any> {
|
8599 | }
|
8600 |
|
8601 | /**
|
8602 | * Configures the `Injector` to return a value for a token.
|
8603 | * @see ["Dependency Injection Guide"](guide/dependency-injection).
|
8604 | *
|
8605 | * @usageNotes
|
8606 | *
|
8607 | * ### Example
|
8608 | *
|
8609 | * {@example core/di/ts/provider_spec.ts region='ValueProvider'}
|
8610 | *
|
8611 | * ### Multi-value example
|
8612 | *
|
8613 | * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
8614 | *
|
8615 | * @publicApi
|
8616 | */
|
8617 | export declare interface ValueProvider extends ValueSansProvider {
|
8618 | /**
|
8619 | * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
|
8620 | */
|
8621 | provide: any;
|
8622 | /**
|
8623 | * When true, injector returns an array of instances. This is useful to allow multiple
|
8624 | * providers spread across many files to provide configuration information to a common token.
|
8625 | */
|
8626 | multi?: boolean;
|
8627 | }
|
8628 |
|
8629 | /**
|
8630 | * Configures the `Injector` to return a value for a token.
|
8631 | * Base for `ValueProvider` decorator.
|
8632 | *
|
8633 | * @publicApi
|
8634 | */
|
8635 | export declare interface ValueSansProvider {
|
8636 | /**
|
8637 | * The value to inject.
|
8638 | */
|
8639 | useValue: any;
|
8640 | }
|
8641 |
|
8642 | /**
|
8643 | * @publicApi
|
8644 | */
|
8645 | export declare const VERSION: Version;
|
8646 |
|
8647 |
|
8648 | /**
|
8649 | * @description Represents the version of Angular
|
8650 | *
|
8651 | * @publicApi
|
8652 | */
|
8653 | export declare class Version {
|
8654 | full: string;
|
8655 | readonly major: string;
|
8656 | readonly minor: string;
|
8657 | readonly patch: string;
|
8658 | constructor(full: string);
|
8659 | }
|
8660 |
|
8661 | declare const VIEW_REFS = 8;
|
8662 |
|
8663 | /**
|
8664 | * Type of the ViewChild metadata.
|
8665 | *
|
8666 | * @publicApi
|
8667 | */
|
8668 | export declare type ViewChild = Query;
|
8669 |
|
8670 | /**
|
8671 | * ViewChild decorator and metadata.
|
8672 | *
|
8673 | * @Annotation
|
8674 | * @publicApi
|
8675 | */
|
8676 | export declare const ViewChild: ViewChildDecorator;
|
8677 |
|
8678 | /**
|
8679 | * Type of the ViewChild decorator / constructor function.
|
8680 | *
|
8681 | * @see `ViewChild`.
|
8682 | * @publicApi
|
8683 | */
|
8684 | export declare interface ViewChildDecorator {
|
8685 | /**
|
8686 | * @description
|
8687 | * Property decorator that configures a view query.
|
8688 | * The change detector looks for the first element or the directive matching the selector
|
8689 | * in the view DOM. If the view DOM changes, and a new child matches the selector,
|
8690 | * the property is updated.
|
8691 | *
|
8692 | * View queries are set before the `ngAfterViewInit` callback is called.
|
8693 | *
|
8694 | * **Metadata Properties**:
|
8695 | *
|
8696 | * * **selector** - The directive type or the name used for querying.
|
8697 | * * **read** - Used to read a different token from the queried elements.
|
8698 | * * **static** - True to resolve query results before change detection runs,
|
8699 | * false to resolve after change detection. Defaults to false.
|
8700 | *
|
8701 | *
|
8702 | * The following selectors are supported.
|
8703 | * * Any class with the `@Component` or `@Directive` decorator
|
8704 | * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
|
8705 | * with `@ViewChild('cmp')`)
|
8706 | * * Any provider defined in the child component tree of the current component (e.g.
|
8707 | * `@ViewChild(SomeService) someService: SomeService`)
|
8708 | * * Any provider defined through a string token (e.g. `@ViewChild('someToken') someTokenVal:
|
8709 | * any`)
|
8710 | * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ViewChild(TemplateRef)
|
8711 | * template;`)
|
8712 | *
|
8713 | * The following values are supported by `read`:
|
8714 | * * Any class with the `@Component` or `@Directive` decorator
|
8715 | * * Any provider defined on the injector of the component that is matched by the `selector` of
|
8716 | * this query
|
8717 | * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)
|
8718 | * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`
|
8719 | *
|
8720 | * @usageNotes
|
8721 | *
|
8722 | * {@example core/di/ts/viewChild/view_child_example.ts region='Component'}
|
8723 | *
|
8724 | * ### Example 2
|
8725 | *
|
8726 | * {@example core/di/ts/viewChild/view_child_howto.ts region='HowTo'}
|
8727 | *
|
8728 | * @Annotation
|
8729 | */
|
8730 | (selector: ProviderToken<unknown> | Function | string, opts?: {
|
8731 | read?: any;
|
8732 | static?: boolean;
|
8733 | }): any;
|
8734 | new (selector: ProviderToken<unknown> | Function | string, opts?: {
|
8735 | read?: any;
|
8736 | static?: boolean;
|
8737 | }): ViewChild;
|
8738 | }
|
8739 |
|
8740 | /**
|
8741 | * Type of the ViewChildren metadata.
|
8742 | *
|
8743 | * @publicApi
|
8744 | */
|
8745 | export declare type ViewChildren = Query;
|
8746 |
|
8747 | /**
|
8748 | * ViewChildren decorator and metadata.
|
8749 | *
|
8750 | * @Annotation
|
8751 | * @publicApi
|
8752 | */
|
8753 | export declare const ViewChildren: ViewChildrenDecorator;
|
8754 |
|
8755 | /**
|
8756 | * Type of the ViewChildren decorator / constructor function.
|
8757 | *
|
8758 | * @see `ViewChildren`.
|
8759 | *
|
8760 | * @publicApi
|
8761 | */
|
8762 | export declare interface ViewChildrenDecorator {
|
8763 | /**
|
8764 | * Parameter decorator that configures a view query.
|
8765 | *
|
8766 | * Use to get the `QueryList` of elements or directives from the view DOM.
|
8767 | * Any time a child element is added, removed, or moved, the query list will be updated,
|
8768 | * and the changes observable of the query list will emit a new value.
|
8769 | *
|
8770 | * View queries are set before the `ngAfterViewInit` callback is called.
|
8771 | *
|
8772 | * **Metadata Properties**:
|
8773 | *
|
8774 | * * **selector** - The directive type or the name used for querying.
|
8775 | * * **read** - Used to read a different token from the queried elements.
|
8776 | * * **emitDistinctChangesOnly** - The ` QueryList#changes` observable will emit new values only
|
8777 | * if the QueryList result has changed. When `false` the `changes` observable might emit even
|
8778 | * if the QueryList has not changed.
|
8779 | * ** Note: *** This config option is **deprecated**, it will be permanently set to `true` and
|
8780 | * removed in future versions of Angular.
|
8781 | *
|
8782 | * The following selectors are supported.
|
8783 | * * Any class with the `@Component` or `@Directive` decorator
|
8784 | * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
|
8785 | * with `@ViewChildren('cmp')`)
|
8786 | * * Any provider defined in the child component tree of the current component (e.g.
|
8787 | * `@ViewChildren(SomeService) someService!: SomeService`)
|
8788 | * * Any provider defined through a string token (e.g. `@ViewChildren('someToken')
|
8789 | * someTokenVal!: any`)
|
8790 | * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ViewChildren(TemplateRef)
|
8791 | * template;`)
|
8792 | *
|
8793 | * In addition, multiple string selectors can be separated with a comma (e.g.
|
8794 | * `@ViewChildren('cmp1,cmp2')`)
|
8795 | *
|
8796 | * The following values are supported by `read`:
|
8797 | * * Any class with the `@Component` or `@Directive` decorator
|
8798 | * * Any provider defined on the injector of the component that is matched by the `selector` of
|
8799 | * this query
|
8800 | * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)
|
8801 | * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`
|
8802 | *
|
8803 | * @usageNotes
|
8804 | *
|
8805 | * {@example core/di/ts/viewChildren/view_children_howto.ts region='HowTo'}
|
8806 | *
|
8807 | * ### Another example
|
8808 | *
|
8809 | * {@example core/di/ts/viewChildren/view_children_example.ts region='Component'}
|
8810 | *
|
8811 | * @Annotation
|
8812 | */
|
8813 | (selector: ProviderToken<unknown> | Function | string, opts?: {
|
8814 | read?: any;
|
8815 | emitDistinctChangesOnly?: boolean;
|
8816 | }): any;
|
8817 | new (selector: ProviderToken<unknown> | Function | string, opts?: {
|
8818 | read?: any;
|
8819 | emitDistinctChangesOnly?: boolean;
|
8820 | }): ViewChildren;
|
8821 | }
|
8822 |
|
8823 | /**
|
8824 | * Represents a container where one or more views can be attached to a component.
|
8825 | *
|
8826 | * Can contain *host views* (created by instantiating a
|
8827 | * component with the `createComponent()` method), and *embedded views*
|
8828 | * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).
|
8829 | *
|
8830 | * A view container instance can contain other view containers,
|
8831 | * creating a [view hierarchy](guide/glossary#view-tree).
|
8832 | *
|
8833 | * @see `ComponentRef`
|
8834 | * @see `EmbeddedViewRef`
|
8835 | *
|
8836 | * @publicApi
|
8837 | */
|
8838 | export declare abstract class ViewContainerRef {
|
8839 | /**
|
8840 | * Anchor element that specifies the location of this container in the containing view.
|
8841 | * Each view container can have only one anchor element, and each anchor element
|
8842 | * can have only a single view container.
|
8843 | *
|
8844 | * Root elements of views attached to this container become siblings of the anchor element in
|
8845 | * the rendered view.
|
8846 | *
|
8847 | * Access the `ViewContainerRef` of an element by placing a `Directive` injected
|
8848 | * with `ViewContainerRef` on the element, or use a `ViewChild` query.
|
8849 | *
|
8850 | * <!-- TODO: rename to anchorElement -->
|
8851 | */
|
8852 | abstract get element(): ElementRef;
|
8853 | /**
|
8854 | * The [dependency injector](guide/glossary#injector) for this view container.
|
8855 | */
|
8856 | abstract get injector(): Injector;
|
8857 | /** @deprecated No replacement */
|
8858 | abstract get parentInjector(): Injector;
|
8859 | /**
|
8860 | * Destroys all views in this container.
|
8861 | */
|
8862 | abstract clear(): void;
|
8863 | /**
|
8864 | * Retrieves a view from this container.
|
8865 | * @param index The 0-based index of the view to retrieve.
|
8866 | * @returns The `ViewRef` instance, or null if the index is out of range.
|
8867 | */
|
8868 | abstract get(index: number): ViewRef | null;
|
8869 | /**
|
8870 | * Reports how many views are currently attached to this container.
|
8871 | * @returns The number of views.
|
8872 | */
|
8873 | abstract get length(): number;
|
8874 | /**
|
8875 | * Instantiates an embedded view and inserts it
|
8876 | * into this container.
|
8877 | * @param templateRef The HTML template that defines the view.
|
8878 | * @param context The data-binding context of the embedded view, as declared
|
8879 | * in the `<ng-template>` usage.
|
8880 | * @param index The 0-based index at which to insert the new view into this container.
|
8881 | * If not specified, appends the new view as the last entry.
|
8882 | *
|
8883 | * @returns The `ViewRef` instance for the newly created view.
|
8884 | */
|
8885 | abstract createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number): EmbeddedViewRef<C>;
|
8886 | /**
|
8887 | * Instantiates a single component and inserts its host view into this container.
|
8888 | *
|
8889 | * @param componentFactory The factory to use.
|
8890 | * @param index The index at which to insert the new component's host view into this container.
|
8891 | * If not specified, appends the new view as the last entry.
|
8892 | * @param injector The injector to use as the parent for the new component.
|
8893 | * @param projectableNodes
|
8894 | * @param ngModule
|
8895 | *
|
8896 | * @returns The new component instance, containing the host view.
|
8897 | *
|
8898 | */
|
8899 | abstract createComponent<C>(componentFactory: ComponentFactory<C>, index?: number, injector?: Injector, projectableNodes?: any[][], ngModule?: NgModuleRef<any>): ComponentRef<C>;
|
8900 | /**
|
8901 | * Inserts a view into this container.
|
8902 | * @param viewRef The view to insert.
|
8903 | * @param index The 0-based index at which to insert the view.
|
8904 | * If not specified, appends the new view as the last entry.
|
8905 | * @returns The inserted `ViewRef` instance.
|
8906 | *
|
8907 | */
|
8908 | abstract insert(viewRef: ViewRef, index?: number): ViewRef;
|
8909 | /**
|
8910 | * Moves a view to a new location in this container.
|
8911 | * @param viewRef The view to move.
|
8912 | * @param index The 0-based index of the new location.
|
8913 | * @returns The moved `ViewRef` instance.
|
8914 | */
|
8915 | abstract move(viewRef: ViewRef, currentIndex: number): ViewRef;
|
8916 | /**
|
8917 | * Returns the index of a view within the current container.
|
8918 | * @param viewRef The view to query.
|
8919 | * @returns The 0-based index of the view's position in this container,
|
8920 | * or `-1` if this container doesn't contain the view.
|
8921 | */
|
8922 | abstract indexOf(viewRef: ViewRef): number;
|
8923 | /**
|
8924 | * Destroys a view attached to this container
|
8925 | * @param index The 0-based index of the view to destroy.
|
8926 | * If not specified, the last view in the container is removed.
|
8927 | */
|
8928 | abstract remove(index?: number): void;
|
8929 | /**
|
8930 | * Detaches a view from this container without destroying it.
|
8931 | * Use along with `insert()` to move a view within the current container.
|
8932 | * @param index The 0-based index of the view to detach.
|
8933 | * If not specified, the last view in the container is detached.
|
8934 | */
|
8935 | abstract detach(index?: number): ViewRef | null;
|
8936 | }
|
8937 |
|
8938 | /**
|
8939 | * View instance data.
|
8940 | * Attention: Adding fields to this is performance sensitive!
|
8941 | */
|
8942 | declare interface ViewData {
|
8943 | def: ɵViewDefinition;
|
8944 | root: RootData;
|
8945 | renderer: Renderer2;
|
8946 | parentNodeDef: NodeDef | null;
|
8947 | parent: ViewData | null;
|
8948 | viewContainerParent: ViewData | null;
|
8949 | component: any;
|
8950 | context: any;
|
8951 | nodes: {
|
8952 | [key: number]: NodeData;
|
8953 | };
|
8954 | state: ViewState;
|
8955 | oldValues: any[];
|
8956 | disposables: DisposableFn[] | null;
|
8957 | initIndex: number;
|
8958 | }
|
8959 |
|
8960 | declare interface ViewDefinitionFactory extends DefinitionFactory<ɵViewDefinition> {
|
8961 | }
|
8962 |
|
8963 |
|
8964 | /**
|
8965 | * Defines template and style encapsulation options available for Component's {@link Component}.
|
8966 | *
|
8967 | * See {@link Component#encapsulation encapsulation}.
|
8968 | *
|
8969 | * @usageNotes
|
8970 | * ### Example
|
8971 | *
|
8972 | * {@example core/ts/metadata/encapsulation.ts region='longform'}
|
8973 | *
|
8974 | * @publicApi
|
8975 | */
|
8976 | export declare enum ViewEncapsulation {
|
8977 | /**
|
8978 | * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host
|
8979 | * Element and pre-processing the style rules provided via {@link Component#styles styles} or
|
8980 | * {@link Component#styleUrls styleUrls}, and adding the new Host Element attribute to all
|
8981 | * selectors.
|
8982 | *
|
8983 | * This is the default option.
|
8984 | */
|
8985 | Emulated = 0,
|
8986 | /**
|
8987 | * Don't provide any template or style encapsulation.
|
8988 | */
|
8989 | None = 2,
|
8990 | /**
|
8991 | * Use Shadow DOM to encapsulate styles.
|
8992 | *
|
8993 | * For the DOM this means using modern [Shadow
|
8994 | * DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) and
|
8995 | * creating a ShadowRoot for Component's Host Element.
|
8996 | */
|
8997 | ShadowDom = 3
|
8998 | }
|
8999 |
|
9000 | declare enum ViewEncapsulation_2 {
|
9001 | Emulated = 0,
|
9002 | None = 2,
|
9003 | ShadowDom = 3
|
9004 | }
|
9005 |
|
9006 | declare interface viewEngine_ChangeDetectorRef_interface extends ChangeDetectorRef {
|
9007 | }
|
9008 |
|
9009 | declare interface ViewHandleEventFn {
|
9010 | (view: ViewData, nodeIndex: number, eventName: string, event: any): boolean;
|
9011 | }
|
9012 |
|
9013 | /**
|
9014 | * Definition of what a view queries function should look like.
|
9015 | */
|
9016 | declare type ViewQueriesFunction<T> = <U extends T>(rf: ɵRenderFlags, ctx: U) => void;
|
9017 |
|
9018 | /**
|
9019 | * Represents an Angular [view](guide/glossary#view "Definition").
|
9020 | *
|
9021 | * @see {@link ChangeDetectorRef#usage-notes Change detection usage}
|
9022 | *
|
9023 | * @publicApi
|
9024 | */
|
9025 | export declare abstract class ViewRef extends ChangeDetectorRef {
|
9026 | /**
|
9027 | * Destroys this view and all of the data structures associated with it.
|
9028 | */
|
9029 | abstract destroy(): void;
|
9030 | /**
|
9031 | * Reports whether this view has been destroyed.
|
9032 | * @returns True after the `destroy()` method has been called, false otherwise.
|
9033 | */
|
9034 | abstract get destroyed(): boolean;
|
9035 | /**
|
9036 | * A lifecycle hook that provides additional developer-defined cleanup
|
9037 | * functionality for views.
|
9038 | * @param callback A handler function that cleans up developer-defined data
|
9039 | * associated with a view. Called when the `destroy()` method is invoked.
|
9040 | */
|
9041 | abstract onDestroy(callback: Function): any /** TODO #9100 */;
|
9042 | }
|
9043 |
|
9044 | declare class ViewRef_2<T> implements EmbeddedViewRef<T>, InternalViewRef, viewEngine_ChangeDetectorRef_interface {
|
9045 | /**
|
9046 | * This represents the `LView` associated with the point where `ChangeDetectorRef` was
|
9047 | * requested.
|
9048 | *
|
9049 | * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view.
|
9050 | */
|
9051 | private _cdRefInjectingView?;
|
9052 | private _appRef;
|
9053 | private _attachedToViewContainer;
|
9054 | get rootNodes(): any[];
|
9055 | constructor(
|
9056 | /**
|
9057 | * This represents `LView` associated with the component when ViewRef is a ChangeDetectorRef.
|
9058 | *
|
9059 | * When ViewRef is created for a dynamic component, this also represents the `LView` for the
|
9060 | * component.
|
9061 | *
|
9062 | * For a "regular" ViewRef created for an embedded view, this is the `LView` for the embedded
|
9063 | * view.
|
9064 | *
|
9065 | * @internal
|
9066 | */
|
9067 | _lView: ɵangular_packages_core_core_ca,
|
9068 | /**
|
9069 | * This represents the `LView` associated with the point where `ChangeDetectorRef` was
|
9070 | * requested.
|
9071 | *
|
9072 | * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view.
|
9073 | */
|
9074 | _cdRefInjectingView?: ɵangular_packages_core_core_ca | undefined);
|
9075 | get context(): T;
|
9076 | set context(value: T);
|
9077 | get destroyed(): boolean;
|
9078 | destroy(): void;
|
9079 | onDestroy(callback: Function): void;
|
9080 | /**
|
9081 | * Marks a view and all of its ancestors dirty.
|
9082 | *
|
9083 | * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is
|
9084 | * checked when it needs to be re-rendered but the two normal triggers haven't marked it
|
9085 | * dirty (i.e. inputs haven't changed and events haven't fired in the view).
|
9086 | *
|
9087 | * <!-- TODO: Add a link to a chapter on OnPush components -->
|
9088 | *
|
9089 | * @usageNotes
|
9090 | * ### Example
|
9091 | *
|
9092 | * ```typescript
|
9093 | * @Component({
|
9094 | * selector: 'app-root',
|
9095 | * template: `Number of ticks: {{numberOfTicks}}`
|
9096 | * changeDetection: ChangeDetectionStrategy.OnPush,
|
9097 | * })
|
9098 | * class AppComponent {
|
9099 | * numberOfTicks = 0;
|
9100 | *
|
9101 | * constructor(private ref: ChangeDetectorRef) {
|
9102 | * setInterval(() => {
|
9103 | * this.numberOfTicks++;
|
9104 | * // the following is required, otherwise the view will not be updated
|
9105 | * this.ref.markForCheck();
|
9106 | * }, 1000);
|
9107 | * }
|
9108 | * }
|
9109 | * ```
|
9110 | */
|
9111 | markForCheck(): void;
|
9112 | /**
|
9113 | * Detaches the view from the change detection tree.
|
9114 | *
|
9115 | * Detached views will not be checked during change detection runs until they are
|
9116 | * re-attached, even if they are dirty. `detach` can be used in combination with
|
9117 | * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change
|
9118 | * detection checks.
|
9119 | *
|
9120 | * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
|
9121 | * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
|
9122 | *
|
9123 | * @usageNotes
|
9124 | * ### Example
|
9125 | *
|
9126 | * The following example defines a component with a large list of readonly data.
|
9127 | * Imagine the data changes constantly, many times per second. For performance reasons,
|
9128 | * we want to check and update the list every five seconds. We can do that by detaching
|
9129 | * the component's change detector and doing a local check every five seconds.
|
9130 | *
|
9131 | * ```typescript
|
9132 | * class DataProvider {
|
9133 | * // in a real application the returned data will be different every time
|
9134 | * get data() {
|
9135 | * return [1,2,3,4,5];
|
9136 | * }
|
9137 | * }
|
9138 | *
|
9139 | * @Component({
|
9140 | * selector: 'giant-list',
|
9141 | * template: `
|
9142 | * <li *ngFor="let d of dataProvider.data">Data {{d}}</li>
|
9143 | * `,
|
9144 | * })
|
9145 | * class GiantList {
|
9146 | * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {
|
9147 | * ref.detach();
|
9148 | * setInterval(() => {
|
9149 | * this.ref.detectChanges();
|
9150 | * }, 5000);
|
9151 | * }
|
9152 | * }
|
9153 | *
|
9154 | * @Component({
|
9155 | * selector: 'app',
|
9156 | * providers: [DataProvider],
|
9157 | * template: `
|
9158 | * <giant-list><giant-list>
|
9159 | * `,
|
9160 | * })
|
9161 | * class App {
|
9162 | * }
|
9163 | * ```
|
9164 | */
|
9165 | detach(): void;
|
9166 | /**
|
9167 | * Re-attaches a view to the change detection tree.
|
9168 | *
|
9169 | * This can be used to re-attach views that were previously detached from the tree
|
9170 | * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.
|
9171 | *
|
9172 | * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
|
9173 | *
|
9174 | * @usageNotes
|
9175 | * ### Example
|
9176 | *
|
9177 | * The following example creates a component displaying `live` data. The component will detach
|
9178 | * its change detector from the main change detector tree when the component's live property
|
9179 | * is set to false.
|
9180 | *
|
9181 | * ```typescript
|
9182 | * class DataProvider {
|
9183 | * data = 1;
|
9184 | *
|
9185 | * constructor() {
|
9186 | * setInterval(() => {
|
9187 | * this.data = this.data * 2;
|
9188 | * }, 500);
|
9189 | * }
|
9190 | * }
|
9191 | *
|
9192 | * @Component({
|
9193 | * selector: 'live-data',
|
9194 | * inputs: ['live'],
|
9195 | * template: 'Data: {{dataProvider.data}}'
|
9196 | * })
|
9197 | * class LiveData {
|
9198 | * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}
|
9199 | *
|
9200 | * set live(value) {
|
9201 | * if (value) {
|
9202 | * this.ref.reattach();
|
9203 | * } else {
|
9204 | * this.ref.detach();
|
9205 | * }
|
9206 | * }
|
9207 | * }
|
9208 | *
|
9209 | * @Component({
|
9210 | * selector: 'app-root',
|
9211 | * providers: [DataProvider],
|
9212 | * template: `
|
9213 | * Live Update: <input type="checkbox" [(ngModel)]="live">
|
9214 | * <live-data [live]="live"><live-data>
|
9215 | * `,
|
9216 | * })
|
9217 | * class AppComponent {
|
9218 | * live = true;
|
9219 | * }
|
9220 | * ```
|
9221 | */
|
9222 | reattach(): void;
|
9223 | /**
|
9224 | * Checks the view and its children.
|
9225 | *
|
9226 | * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement
|
9227 | * local change detection checks.
|
9228 | *
|
9229 | * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
|
9230 | * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
|
9231 | *
|
9232 | * @usageNotes
|
9233 | * ### Example
|
9234 | *
|
9235 | * The following example defines a component with a large list of readonly data.
|
9236 | * Imagine, the data changes constantly, many times per second. For performance reasons,
|
9237 | * we want to check and update the list every five seconds.
|
9238 | *
|
9239 | * We can do that by detaching the component's change detector and doing a local change detection
|
9240 | * check every five seconds.
|
9241 | *
|
9242 | * See {@link ChangeDetectorRef#detach detach} for more information.
|
9243 | */
|
9244 | detectChanges(): void;
|
9245 | /**
|
9246 | * Checks the change detector and its children, and throws if any changes are detected.
|
9247 | *
|
9248 | * This is used in development mode to verify that running change detection doesn't
|
9249 | * introduce other changes.
|
9250 | */
|
9251 | checkNoChanges(): void;
|
9252 | attachToViewContainerRef(): void;
|
9253 | detachFromAppRef(): void;
|
9254 | attachToAppRef(appRef: ViewRefTracker): void;
|
9255 | }
|
9256 |
|
9257 | /**
|
9258 | * Interface for tracking root `ViewRef`s in `ApplicationRef`.
|
9259 | *
|
9260 | * NOTE: Importing `ApplicationRef` here directly creates circular dependency, which is why we have
|
9261 | * a subset of the `ApplicationRef` interface `ViewRefTracker` here.
|
9262 | */
|
9263 | declare interface ViewRefTracker {
|
9264 | detachView(viewRef: ViewRef): void;
|
9265 | }
|
9266 |
|
9267 | /**
|
9268 | * Bitmask of states
|
9269 | */
|
9270 | declare const enum ViewState {
|
9271 | BeforeFirstCheck = 1,
|
9272 | FirstCheck = 2,
|
9273 | Attached = 4,
|
9274 | ChecksEnabled = 8,
|
9275 | IsProjectedView = 16,
|
9276 | CheckProjectedView = 32,
|
9277 | CheckProjectedViews = 64,
|
9278 | Destroyed = 128,
|
9279 | InitState_Mask = 1792,
|
9280 | InitState_BeforeInit = 0,
|
9281 | InitState_CallingOnInit = 256,
|
9282 | InitState_CallingAfterContentInit = 512,
|
9283 | InitState_CallingAfterViewInit = 768,
|
9284 | InitState_AfterInit = 1024,
|
9285 | CatDetectChanges = 12,
|
9286 | CatInit = 13
|
9287 | }
|
9288 |
|
9289 | declare interface ViewUpdateFn {
|
9290 | (check: NodeCheckFn, view: ViewData): void;
|
9291 | }
|
9292 |
|
9293 | /**
|
9294 | * Indicates that the result of a {@link Pipe} transformation has changed even though the
|
9295 | * reference has not changed.
|
9296 | *
|
9297 | * Wrapped values are unwrapped automatically during the change detection, and the unwrapped value
|
9298 | * is stored.
|
9299 | *
|
9300 | * Example:
|
9301 | *
|
9302 | * ```
|
9303 | * if (this._latestValue === this._latestReturnedValue) {
|
9304 | * return this._latestReturnedValue;
|
9305 | * } else {
|
9306 | * this._latestReturnedValue = this._latestValue;
|
9307 | * return WrappedValue.wrap(this._latestValue); // this will force update
|
9308 | * }
|
9309 | * ```
|
9310 | *
|
9311 | * @publicApi
|
9312 | * @deprecated from v10 stop using. (No replacement, deemed unnecessary.)
|
9313 | */
|
9314 | export declare class WrappedValue {
|
9315 | /** @deprecated from 5.3, use `unwrap()` instead - will switch to protected */
|
9316 | wrapped: any;
|
9317 | constructor(value: any);
|
9318 | /** Creates a wrapped value. */
|
9319 | static wrap(value: any): WrappedValue;
|
9320 | /**
|
9321 | * Returns the underlying value of a wrapped value.
|
9322 | * Returns the given `value` when it is not wrapped.
|
9323 | **/
|
9324 | static unwrap(value: any): any;
|
9325 | /** Returns true if `value` is a wrapped value. */
|
9326 | static isWrapped(value: any): value is WrappedValue;
|
9327 | }
|
9328 |
|
9329 | /**
|
9330 | * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to
|
9331 | * the DOM in a browser environment.
|
9332 | */
|
9333 | export declare function ɵ_sanitizeHtml(defaultDoc: any, unsafeHtmlInput: string): TrustedHTML | string;
|
9334 |
|
9335 |
|
9336 | export declare function ɵ_sanitizeUrl(url: string): string;
|
9337 |
|
9338 | export declare const ɵALLOW_MULTIPLE_PLATFORMS: InjectionToken<boolean>;
|
9339 |
|
9340 | export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.Html): value is ɵSafeHtml;
|
9341 |
|
9342 | export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.ResourceUrl): value is ɵSafeResourceUrl;
|
9343 |
|
9344 | export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.Script): value is ɵSafeScript;
|
9345 |
|
9346 | export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.Style): value is ɵSafeStyle;
|
9347 |
|
9348 | export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.Url): value is ɵSafeUrl;
|
9349 |
|
9350 | export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType): boolean;
|
9351 |
|
9352 | export declare function ɵand(flags: ɵNodeFlags, matchedQueriesDsl: null | [string | number, ɵQueryValueType][], ngContentIndex: null | number, childCount: number, handleEvent?: null | ElementHandleEventFn, templateFactory?: ViewDefinitionFactory): NodeDef;
|
9353 |
|
9354 | /** Checks whether a function is wrapped by a `forwardRef`. */
|
9355 | export declare function ɵangular_packages_core_core_a(fn: any): fn is () => any;
|
9356 |
|
9357 | export declare function ɵangular_packages_core_core_b<T>(token: ProviderToken<T>): T;
|
9358 |
|
9359 | export declare function ɵangular_packages_core_core_b<T>(token: ProviderToken<T>, flags?: InjectFlags): T | null;
|
9360 |
|
9361 | /**
|
9362 | * Schedule work at next available slot.
|
9363 | *
|
9364 | * In Ivy this is just `requestAnimationFrame`. For compatibility reasons when bootstrapped
|
9365 | * using `platformRef.bootstrap` we need to use `NgZone.onStable` as the scheduling mechanism.
|
9366 | * This overrides the scheduling mechanism in Ivy to `NgZone.onStable`.
|
9367 | *
|
9368 | * @param ngZone NgZone to use for scheduling.
|
9369 | */
|
9370 | export declare function ɵangular_packages_core_core_ba(ngZone: NgZone): (fn: () => void) => void;
|
9371 |
|
9372 | /**
|
9373 | * USD currency code that the application uses by default for CurrencyPipe when no
|
9374 | * DEFAULT_CURRENCY_CODE is provided.
|
9375 | */
|
9376 | export declare const ɵangular_packages_core_core_bb = "USD";
|
9377 |
|
9378 | export declare function ɵangular_packages_core_core_bc(checkIndex: number, flags: ɵNodeFlags, matchedQueriesDsl: [string | number, ɵQueryValueType][] | null, childCount: number, token: any, value: any, deps: ([ɵDepFlags, any] | any)[], bindings?: BindingDef[], outputs?: OutputDef[]): NodeDef;
|
9379 |
|
9380 | export declare abstract class ɵangular_packages_core_core_bd {
|
9381 | abstract get view(): ViewData;
|
9382 | abstract get nodeIndex(): number | null;
|
9383 | abstract get injector(): Injector;
|
9384 | abstract get component(): any;
|
9385 | abstract get providerTokens(): any[];
|
9386 | abstract get references(): {
|
9387 | [key: string]: any;
|
9388 | };
|
9389 | abstract get context(): any;
|
9390 | abstract get componentRenderElement(): any;
|
9391 | abstract get renderNode(): any;
|
9392 | abstract logError(console: Console, ...values: any[]): void;
|
9393 | }
|
9394 |
|
9395 | export declare function ɵangular_packages_core_core_be<T>(definition: ɵDirectiveDef<T>): typeof rememberChangeHistoryAndInvokeOnChangesHook;
|
9396 |
|
9397 | /**
|
9398 | * A change detection scheduler token for {@link RootContext}. This token is the default value used
|
9399 | * for the default `RootContext` found in the {@link ROOT_CONTEXT} token.
|
9400 | */
|
9401 | export declare const ɵangular_packages_core_core_bf: InjectionToken<(fn: () => void) => void>;
|
9402 |
|
9403 | /**
|
9404 | * Inject static attribute value into directive constructor.
|
9405 | *
|
9406 | * This method is used with `factory` functions which are generated as part of
|
9407 | * `defineDirective` or `defineComponent`. The method retrieves the static value
|
9408 | * of an attribute. (Dynamic attributes are not supported since they are not resolved
|
9409 | * at the time of injection and can change over time.)
|
9410 | *
|
9411 | * # Example
|
9412 | * Given:
|
9413 | * ```
|
9414 | * @Component(...)
|
9415 | * class MyComponent {
|
9416 | * constructor(@Attribute('title') title: string) { ... }
|
9417 | * }
|
9418 | * ```
|
9419 | * When instantiated with
|
9420 | * ```
|
9421 | * <my-component title="Hello"></my-component>
|
9422 | * ```
|
9423 | *
|
9424 | * Then factory method generated is:
|
9425 | * ```
|
9426 | * MyComponent.ɵcmp = defineComponent({
|
9427 | * factory: () => new MyComponent(injectAttribute('title'))
|
9428 | * ...
|
9429 | * })
|
9430 | * ```
|
9431 | *
|
9432 | * @publicApi
|
9433 | */
|
9434 | export declare function ɵangular_packages_core_core_bg(tNode: TNode, attrNameToInject: string): string | null;
|
9435 |
|
9436 | /**
|
9437 | * Return the current `LView`.
|
9438 | */
|
9439 | export declare function ɵangular_packages_core_core_bh(): ɵangular_packages_core_core_ca;
|
9440 |
|
9441 | export declare function ɵangular_packages_core_core_bi(): number;
|
9442 |
|
9443 | export declare function ɵangular_packages_core_core_bj<T = any>(level: number): T;
|
9444 |
|
9445 | /** Static data for an element */
|
9446 | export declare interface ɵangular_packages_core_core_bk extends TNode {
|
9447 | /** Index in the data[] array */
|
9448 | index: number;
|
9449 | child: ɵangular_packages_core_core_bk | TTextNode | TElementContainerNode | TContainerNode | TProjectionNode | null;
|
9450 | /**
|
9451 | * Element nodes will have parents unless they are the first node of a component or
|
9452 | * embedded view (which means their parent is in a different view and must be
|
9453 | * retrieved using viewData[HOST_NODE]).
|
9454 | */
|
9455 | parent: ɵangular_packages_core_core_bk | TElementContainerNode | null;
|
9456 | tViews: null;
|
9457 | /**
|
9458 | * If this is a component TNode with projection, this will be an array of projected
|
9459 | * TNodes or native nodes (see TNode.projection for more info). If it's a regular element node
|
9460 | * or a component without projection, it will be null.
|
9461 | */
|
9462 | projection: (TNode | RNode[])[] | null;
|
9463 | /**
|
9464 | * Stores TagName
|
9465 | */
|
9466 | value: string;
|
9467 | }
|
9468 |
|
9469 | /**
|
9470 | * If the value of the provided exp has changed, calls the pure function to return
|
9471 | * an updated value. Or if the value has not changed, returns cached value.
|
9472 | *
|
9473 | * @param lView LView in which the function is being executed.
|
9474 | * @param bindingRoot Binding root index.
|
9475 | * @param slotOffset the offset from binding root to the reserved slot
|
9476 | * @param pureFn Function that returns an updated value
|
9477 | * @param exp Updated expression value
|
9478 | * @param thisArg Optional calling context of pureFn
|
9479 | * @returns Updated or cached value
|
9480 | */
|
9481 | export declare function ɵangular_packages_core_core_bl(lView: ɵangular_packages_core_core_ca, bindingRoot: number, slotOffset: number, pureFn: (v: any) => any, exp: any, thisArg?: any): any;
|
9482 |
|
9483 | /**
|
9484 | * If the value of any provided exp has changed, calls the pure function to return
|
9485 | * an updated value. Or if no values have changed, returns cached value.
|
9486 | *
|
9487 | * @param lView LView in which the function is being executed.
|
9488 | * @param bindingRoot Binding root index.
|
9489 | * @param slotOffset the offset from binding root to the reserved slot
|
9490 | * @param pureFn
|
9491 | * @param exp1
|
9492 | * @param exp2
|
9493 | * @param thisArg Optional calling context of pureFn
|
9494 | * @returns Updated or cached value
|
9495 | */
|
9496 | export declare function ɵangular_packages_core_core_bm(lView: ɵangular_packages_core_core_ca, bindingRoot: number, slotOffset: number, pureFn: (v1: any, v2: any) => any, exp1: any, exp2: any, thisArg?: any): any;
|
9497 |
|
9498 | /**
|
9499 | * If the value of any provided exp has changed, calls the pure function to return
|
9500 | * an updated value. Or if no values have changed, returns cached value.
|
9501 | *
|
9502 | * @param lView LView in which the function is being executed.
|
9503 | * @param bindingRoot Binding root index.
|
9504 | * @param slotOffset the offset from binding root to the reserved slot
|
9505 | * @param pureFn
|
9506 | * @param exp1
|
9507 | * @param exp2
|
9508 | * @param exp3
|
9509 | * @param thisArg Optional calling context of pureFn
|
9510 | * @returns Updated or cached value
|
9511 | */
|
9512 | export declare function ɵangular_packages_core_core_bn(lView: ɵangular_packages_core_core_ca, bindingRoot: number, slotOffset: number, pureFn: (v1: any, v2: any, v3: any) => any, exp1: any, exp2: any, exp3: any, thisArg?: any): any;
|
9513 |
|
9514 | /**
|
9515 | * If the value of any provided exp has changed, calls the pure function to return
|
9516 | * an updated value. Or if no values have changed, returns cached value.
|
9517 | *
|
9518 | * @param lView LView in which the function is being executed.
|
9519 | * @param bindingRoot Binding root index.
|
9520 | * @param slotOffset the offset from binding root to the reserved slot
|
9521 | * @param pureFn
|
9522 | * @param exp1
|
9523 | * @param exp2
|
9524 | * @param exp3
|
9525 | * @param exp4
|
9526 | * @param thisArg Optional calling context of pureFn
|
9527 | * @returns Updated or cached value
|
9528 | *
|
9529 | */
|
9530 | export declare function ɵangular_packages_core_core_bo(lView: ɵangular_packages_core_core_ca, bindingRoot: number, slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, thisArg?: any): any;
|
9531 |
|
9532 | /**
|
9533 | * pureFunction instruction that can support any number of bindings.
|
9534 | *
|
9535 | * If the value of any provided exp has changed, calls the pure function to return
|
9536 | * an updated value. Or if no values have changed, returns cached value.
|
9537 | *
|
9538 | * @param lView LView in which the function is being executed.
|
9539 | * @param bindingRoot Binding root index.
|
9540 | * @param slotOffset the offset from binding root to the reserved slot
|
9541 | * @param pureFn A pure function that takes binding values and builds an object or array
|
9542 | * containing those values.
|
9543 | * @param exps An array of binding values
|
9544 | * @param thisArg Optional calling context of pureFn
|
9545 | * @returns Updated or cached value
|
9546 | */
|
9547 | export declare function ɵangular_packages_core_core_bp(lView: ɵangular_packages_core_core_ca, bindingRoot: number, slotOffset: number, pureFn: (...v: any[]) => any, exps: any[], thisArg?: any): any;
|
9548 |
|
9549 | /**
|
9550 | * Detects which sanitizer to use for URL property, based on tag name and prop name.
|
9551 | *
|
9552 | * The rules are based on the RESOURCE_URL context config from
|
9553 | * `packages/compiler/src/schema/dom_security_schema.ts`.
|
9554 | * If tag and prop names don't match Resource URL schema, use URL sanitizer.
|
9555 | */
|
9556 | export declare function ɵangular_packages_core_core_bq(tag: string, prop: string): typeof ɵɵsanitizeResourceUrl;
|
9557 |
|
9558 | export declare function ɵangular_packages_core_core_br(name: string, props?: (...args: any[]) => any, parentClass?: any, additionalProcessing?: (target: any, name: string, ...args: any[]) => void): any;
|
9559 |
|
9560 | export declare function ɵangular_packages_core_core_bs(name: string, props?: (...args: any[]) => any, parentClass?: any): any;
|
9561 |
|
9562 |
|
9563 | /**
|
9564 | * Special flag indicating that a decorator is of type `Inject`. It's used to make `Inject`
|
9565 | * decorator tree-shakable (so we don't have to rely on the `instanceof` checks).
|
9566 | * Note: this flag is not included into the `InjectFlags` since it's an internal-only API.
|
9567 | */
|
9568 | export declare const enum ɵangular_packages_core_core_bt {
|
9569 | Inject = -1
|
9570 | }
|
9571 |
|
9572 | /**
|
9573 | * This enum is an exact copy of the `InjectFlags` enum above, but the difference is that this is a
|
9574 | * const enum, so actual enum values would be inlined in generated code. The `InjectFlags` enum can
|
9575 | * be turned into a const enum when ViewEngine is removed (see TODO at the `InjectFlags` enum
|
9576 | * above). The benefit of inlining is that we can use these flags at the top level without affecting
|
9577 | * tree-shaking (see "no-toplevel-property-access" tslint rule for more info).
|
9578 | * Keep this enum in sync with `InjectFlags` enum above.
|
9579 | */
|
9580 | export declare const enum ɵangular_packages_core_core_bu {
|
9581 | /** Check self and check parent injector if needed */
|
9582 | Default = 0,
|
9583 | /**
|
9584 | * Specifies that an injector should retrieve a dependency from any injector until reaching the
|
9585 | * host element of the current component. (Only used with Element Injector)
|
9586 | */
|
9587 | Host = 1,
|
9588 | /** Don't ascend to ancestors of the node requesting injection. */
|
9589 | Self = 2,
|
9590 | /** Skip the node that is requesting injection. */
|
9591 | SkipSelf = 4,
|
9592 | /** Inject `defaultValue` instead if token not found. */
|
9593 | Optional = 8,
|
9594 | /**
|
9595 | * This token is being injected into a pipe.
|
9596 | *
|
9597 | * This flag is intentionally not in the public facing `InjectFlags` because it is only added by
|
9598 | * the compiler and is not a developer applicable flag.
|
9599 | */
|
9600 | ForPipe = 16
|
9601 | }
|
9602 |
|
9603 |
|
9604 | export declare function ɵangular_packages_core_core_bv<T>(objWithPropertyToExtract: T): string;
|
9605 |
|
9606 | export declare class ɵangular_packages_core_core_bw implements Injector {
|
9607 | get(token: any, notFoundValue?: any): any;
|
9608 | }
|
9609 |
|
9610 | export declare function ɵangular_packages_core_core_bx(): (<T>(token: ProviderToken<T>, flags?: InjectFlags | undefined) => T | null) | undefined;
|
9611 |
|
9612 |
|
9613 | /**
|
9614 | * Special markers which can be left on `Type.__NG_ELEMENT_ID__` which are used by the Ivy's
|
9615 | * `NodeInjector`. Usually these markers contain factory functions. But in case of this special
|
9616 | * marker we can't leave behind a function because it would create tree shaking problem.
|
9617 | *
|
9618 | * Currently only `Injector` is special.
|
9619 | *
|
9620 | * NOTE: the numbers here must be negative, because positive numbers are used as IDs for bloom
|
9621 | * filter.
|
9622 | */
|
9623 | export declare const enum ɵangular_packages_core_core_by {
|
9624 | /**
|
9625 | * Marks that the current type is `Injector`
|
9626 | */
|
9627 | Injector = -1
|
9628 | }
|
9629 |
|
9630 | /**
|
9631 | * Retrieve an `RNode` for a given `TNode` and `LView`.
|
9632 | *
|
9633 | * This function guarantees in dev mode to retrieve a non-null `RNode`.
|
9634 | *
|
9635 | * @param tNode
|
9636 | * @param lView
|
9637 | */
|
9638 | export declare function ɵangular_packages_core_core_bz(tNode: TNode, lView: ɵangular_packages_core_core_ca): RNode;
|
9639 |
|
9640 | /**
|
9641 | * Attaches a given InjectFlag to a given decorator using monkey-patching.
|
9642 | * Since DI decorators can be used in providers `deps` array (when provider is configured using
|
9643 | * `useFactory`) without initialization (e.g. `Host`) and as an instance (e.g. `new Host()`), we
|
9644 | * attach the flag to make it available both as a static property and as a field on decorator
|
9645 | * instance.
|
9646 | *
|
9647 | * @param decorator Provided DI decorator.
|
9648 | * @param flag InjectFlag that should be applied.
|
9649 | */
|
9650 | export declare function ɵangular_packages_core_core_c(decorator: any, flag: ɵangular_packages_core_core_bu | ɵangular_packages_core_core_bt): any;
|
9651 |
|
9652 | /**
|
9653 | * `LView` stores all of the information needed to process the instructions as
|
9654 | * they are invoked from the template. Each embedded view and component view has its
|
9655 | * own `LView`. When processing a particular view, we set the `viewData` to that
|
9656 | * `LView`. When that view is done processing, the `viewData` is set back to
|
9657 | * whatever the original `viewData` was before (the parent `LView`).
|
9658 | *
|
9659 | * Keeping separate state for each view facilities view insertion / deletion, so we
|
9660 | * don't have to edit the data array based on which views are present.
|
9661 | */
|
9662 | export declare interface ɵangular_packages_core_core_ca extends Array<any> {
|
9663 | /**
|
9664 | * Human readable representation of the `LView`.
|
9665 | *
|
9666 | * NOTE: This property only exists if `ngDevMode` is set to `true` and it is not present in
|
9667 | * production. Its presence is purely to help debug issue in development, and should not be relied
|
9668 | * on in production application.
|
9669 | */
|
9670 | debug?: LViewDebug;
|
9671 | /**
|
9672 | * The node into which this `LView` is inserted.
|
9673 | */
|
9674 | [HOST]: RElement | null;
|
9675 | /**
|
9676 | * The static data for this view. We need a reference to this so we can easily walk up the
|
9677 | * node tree in DI and get the TView.data array associated with a node (where the
|
9678 | * directive defs are stored).
|
9679 | */
|
9680 | readonly [TVIEW]: TView;
|
9681 | /** Flags for this view. See LViewFlags for more info. */
|
9682 | [FLAGS]: LViewFlags;
|
9683 | /**
|
9684 | * This may store an {@link LView} or {@link LContainer}.
|
9685 | *
|
9686 | * `LView` - The parent view. This is needed when we exit the view and must restore the previous
|
9687 | * LView. Without this, the render method would have to keep a stack of
|
9688 | * views as it is recursively rendering templates.
|
9689 | *
|
9690 | * `LContainer` - The current view is part of a container, and is an embedded view.
|
9691 | */
|
9692 | [PARENT]: ɵangular_packages_core_core_ca | LContainer | null;
|
9693 | /**
|
9694 | *
|
9695 | * The next sibling LView or LContainer.
|
9696 | *
|
9697 | * Allows us to propagate between sibling view states that aren't in the same
|
9698 | * container. Embedded views already have a node.next, but it is only set for
|
9699 | * views in the same container. We need a way to link component views and views
|
9700 | * across containers as well.
|
9701 | */
|
9702 | [NEXT]: ɵangular_packages_core_core_ca | LContainer | null;
|
9703 | /** Queries active for this view - nodes from a view are reported to those queries. */
|
9704 | [QUERIES]: LQueries | null;
|
9705 | /**
|
9706 | * Store the `TNode` of the location where the current `LView` is inserted into.
|
9707 | *
|
9708 | * Given:
|
9709 | * ```
|
9710 | * <div>
|
9711 | * <ng-template><span></span></ng-template>
|
9712 | * </div>
|
9713 | * ```
|
9714 | *
|
9715 | * We end up with two `TView`s.
|
9716 | * - `parent` `TView` which contains `<div><!-- anchor --></div>`
|
9717 | * - `child` `TView` which contains `<span></span>`
|
9718 | *
|
9719 | * Typically the `child` is inserted into the declaration location of the `parent`, but it can be
|
9720 | * inserted anywhere. Because it can be inserted anywhere it is not possible to store the
|
9721 | * insertion information in the `TView` and instead we must store it in the `LView[T_HOST]`.
|
9722 | *
|
9723 | * So to determine where is our insertion parent we would execute:
|
9724 | * ```
|
9725 | * const parentLView = lView[PARENT];
|
9726 | * const parentTNode = lView[T_HOST];
|
9727 | * const insertionParent = parentLView[parentTNode.index];
|
9728 | * ```
|
9729 | *
|
9730 | *
|
9731 | * If `null`, this is the root view of an application (root component is in this view) and it has
|
9732 | * no parents.
|
9733 | */
|
9734 | [T_HOST]: TNode | null;
|
9735 | /**
|
9736 | * When a view is destroyed, listeners need to be released and outputs need to be
|
9737 | * unsubscribed. This context array stores both listener functions wrapped with
|
9738 | * their context and output subscription instances for a particular view.
|
9739 | *
|
9740 | * These change per LView instance, so they cannot be stored on TView. Instead,
|
9741 | * TView.cleanup saves an index to the necessary context in this array.
|
9742 | *
|
9743 | * After `LView` is created it is possible to attach additional instance specific functions at the
|
9744 | * end of the `lView[CLENUP]` because we know that no more `T` level cleanup functions will be
|
9745 | * addeded here.
|
9746 | */
|
9747 | [CLEANUP]: any[] | null;
|
9748 | /**
|
9749 | * - For dynamic views, this is the context with which to render the template (e.g.
|
9750 | * `NgForContext`), or `{}` if not defined explicitly.
|
9751 | * - For root view of the root component the context contains change detection data.
|
9752 | * - For non-root components, the context is the component instance,
|
9753 | * - For inline views, the context is null.
|
9754 | */
|
9755 | [CONTEXT]: {} | RootContext | null;
|
9756 | /** An optional Module Injector to be used as fall back after Element Injectors are consulted. */
|
9757 | readonly [INJECTOR_2]: Injector | null;
|
9758 | /** Factory to be used for creating Renderer. */
|
9759 | [RENDERER_FACTORY]: RendererFactory3;
|
9760 | /** Renderer to be used for this view. */
|
9761 | [RENDERER]: Renderer3;
|
9762 | /** An optional custom sanitizer. */
|
9763 | [SANITIZER]: Sanitizer | null;
|
9764 | /**
|
9765 | * Reference to the first LView or LContainer beneath this LView in
|
9766 | * the hierarchy.
|
9767 | *
|
9768 | * Necessary to store this so views can traverse through their nested views
|
9769 | * to remove listeners and call onDestroy callbacks.
|
9770 | */
|
9771 | [CHILD_HEAD]: ɵangular_packages_core_core_ca | LContainer | null;
|
9772 | /**
|
9773 | * The last LView or LContainer beneath this LView in the hierarchy.
|
9774 | *
|
9775 | * The tail allows us to quickly add a new state to the end of the view list
|
9776 | * without having to propagate starting from the first child.
|
9777 | */
|
9778 | [CHILD_TAIL]: ɵangular_packages_core_core_ca | LContainer | null;
|
9779 | /**
|
9780 | * View where this view's template was declared.
|
9781 | *
|
9782 | * The template for a dynamically created view may be declared in a different view than
|
9783 | * it is inserted. We already track the "insertion view" (view where the template was
|
9784 | * inserted) in LView[PARENT], but we also need access to the "declaration view"
|
9785 | * (view where the template was declared). Otherwise, we wouldn't be able to call the
|
9786 | * view's template function with the proper contexts. Context should be inherited from
|
9787 | * the declaration view tree, not the insertion view tree.
|
9788 | *
|
9789 | * Example (AppComponent template):
|
9790 | *
|
9791 | * <ng-template #foo></ng-template> <-- declared here -->
|
9792 | * <some-comp [tpl]="foo"></some-comp> <-- inserted inside this component -->
|
9793 | *
|
9794 | * The <ng-template> above is declared in the AppComponent template, but it will be passed into
|
9795 | * SomeComp and inserted there. In this case, the declaration view would be the AppComponent,
|
9796 | * but the insertion view would be SomeComp. When we are removing views, we would want to
|
9797 | * traverse through the insertion view to clean up listeners. When we are calling the
|
9798 | * template function during change detection, we need the declaration view to get inherited
|
9799 | * context.
|
9800 | */
|
9801 | [DECLARATION_VIEW]: ɵangular_packages_core_core_ca | null;
|
9802 | /**
|
9803 | * Points to the declaration component view, used to track transplanted `LView`s.
|
9804 | *
|
9805 | * See: `DECLARATION_VIEW` which points to the actual `LView` where it was declared, whereas
|
9806 | * `DECLARATION_COMPONENT_VIEW` points to the component which may not be same as
|
9807 | * `DECLARATION_VIEW`.
|
9808 | *
|
9809 | * Example:
|
9810 | * ```
|
9811 | * <#VIEW #myComp>
|
9812 | * <div *ngIf="true">
|
9813 | * <ng-template #myTmpl>...</ng-template>
|
9814 | * </div>
|
9815 | * </#VIEW>
|
9816 | * ```
|
9817 | * In the above case `DECLARATION_VIEW` for `myTmpl` points to the `LView` of `ngIf` whereas
|
9818 | * `DECLARATION_COMPONENT_VIEW` points to `LView` of the `myComp` which owns the template.
|
9819 | *
|
9820 | * The reason for this is that all embedded views are always check-always whereas the component
|
9821 | * view can be check-always or on-push. When we have a transplanted view it is important to
|
9822 | * determine if we have transplanted a view from check-always declaration to on-push insertion
|
9823 | * point. In such a case the transplanted view needs to be added to the `LContainer` in the
|
9824 | * declared `LView` and CD during the declared view CD (in addition to the CD at the insertion
|
9825 | * point.) (Any transplanted views which are intra Component are of no interest because the CD
|
9826 | * strategy of declaration and insertion will always be the same, because it is the same
|
9827 | * component.)
|
9828 | *
|
9829 | * Queries already track moved views in `LView[DECLARATION_LCONTAINER]` and
|
9830 | * `LContainer[MOVED_VIEWS]`. However the queries also track `LView`s which moved within the same
|
9831 | * component `LView`. Transplanted views are a subset of moved views, and we use
|
9832 | * `DECLARATION_COMPONENT_VIEW` to differentiate them. As in this example.
|
9833 | *
|
9834 | * Example showing intra component `LView` movement.
|
9835 | * ```
|
9836 | * <#VIEW #myComp>
|
9837 | * <div *ngIf="condition; then thenBlock else elseBlock"></div>
|
9838 | * <ng-template #thenBlock>Content to render when condition is true.</ng-template>
|
9839 | * <ng-template #elseBlock>Content to render when condition is false.</ng-template>
|
9840 | * </#VIEW>
|
9841 | * ```
|
9842 | * The `thenBlock` and `elseBlock` is moved but not transplanted.
|
9843 | *
|
9844 | * Example showing inter component `LView` movement (transplanted view).
|
9845 | * ```
|
9846 | * <#VIEW #myComp>
|
9847 | * <ng-template #myTmpl>...</ng-template>
|
9848 | * <insertion-component [template]="myTmpl"></insertion-component>
|
9849 | * </#VIEW>
|
9850 | * ```
|
9851 | * In the above example `myTmpl` is passed into a different component. If `insertion-component`
|
9852 | * instantiates `myTmpl` and `insertion-component` is on-push then the `LContainer` needs to be
|
9853 | * marked as containing transplanted views and those views need to be CD as part of the
|
9854 | * declaration CD.
|
9855 | *
|
9856 | *
|
9857 | * When change detection runs, it iterates over `[MOVED_VIEWS]` and CDs any child `LView`s where
|
9858 | * the `DECLARATION_COMPONENT_VIEW` of the current component and the child `LView` does not match
|
9859 | * (it has been transplanted across components.)
|
9860 | *
|
9861 | * Note: `[DECLARATION_COMPONENT_VIEW]` points to itself if the LView is a component view (the
|
9862 | * simplest / most common case).
|
9863 | *
|
9864 | * see also:
|
9865 | * - https://hackmd.io/@mhevery/rJUJsvv9H write up of the problem
|
9866 | * - `LContainer[HAS_TRANSPLANTED_VIEWS]` which marks which `LContainer` has transplanted views.
|
9867 | * - `LContainer[TRANSPLANT_HEAD]` and `LContainer[TRANSPLANT_TAIL]` storage for transplanted
|
9868 | * - `LView[DECLARATION_LCONTAINER]` similar problem for queries
|
9869 | * - `LContainer[MOVED_VIEWS]` similar problem for queries
|
9870 | */
|
9871 | [DECLARATION_COMPONENT_VIEW]: ɵangular_packages_core_core_ca;
|
9872 | /**
|
9873 | * A declaration point of embedded views (ones instantiated based on the content of a
|
9874 | * <ng-template>), null for other types of views.
|
9875 | *
|
9876 | * We need to track all embedded views created from a given declaration point so we can prepare
|
9877 | * query matches in a proper order (query matches are ordered based on their declaration point and
|
9878 | * _not_ the insertion point).
|
9879 | */
|
9880 | [DECLARATION_LCONTAINER]: LContainer | null;
|
9881 | /**
|
9882 | * More flags for this view. See PreOrderHookFlags for more info.
|
9883 | */
|
9884 | [PREORDER_HOOK_FLAGS]: PreOrderHookFlags;
|
9885 | /**
|
9886 | * The number of direct transplanted views which need a refresh or have descendants themselves
|
9887 | * that need a refresh but have not marked their ancestors as Dirty. This tells us that during
|
9888 | * change detection we should still descend to find those children to refresh, even if the parents
|
9889 | * are not `Dirty`/`CheckAlways`.
|
9890 | */
|
9891 | [TRANSPLANTED_VIEWS_TO_REFRESH]: number;
|
9892 | }
|
9893 |
|
9894 | /**
|
9895 | * Returns the `RootContext` instance that is associated with
|
9896 | * the application where the target is situated. It does this by walking the parent views until it
|
9897 | * gets to the root view, then getting the context off of that.
|
9898 | *
|
9899 | * @param viewOrComponent the `LView` or component to get the root context for.
|
9900 | */
|
9901 | export declare function ɵangular_packages_core_core_cb(viewOrComponent: ɵangular_packages_core_core_ca | {}): RootContext;
|
9902 |
|
9903 |
|
9904 | /**
|
9905 | * Handles message string post-processing for internationalization.
|
9906 | *
|
9907 | * Handles message string post-processing by transforming it from intermediate
|
9908 | * format (that might contain some markers that we need to replace) to the final
|
9909 | * form, consumable by i18nStart instruction. Post processing steps include:
|
9910 | *
|
9911 | * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])
|
9912 | * 2. Replace all ICU vars (like "VAR_PLURAL")
|
9913 | * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER}
|
9914 | * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)
|
9915 | * in case multiple ICUs have the same placeholder name
|
9916 | *
|
9917 | * @param message Raw translation string for post processing
|
9918 | * @param replacements Set of replacements that should be applied
|
9919 | *
|
9920 | * @returns Transformed string that can be consumed by i18nStart instruction
|
9921 | *
|
9922 | * @codeGenApi
|
9923 | */
|
9924 | export declare function ɵangular_packages_core_core_cc(message: string, replacements?: {
|
9925 | [key: string]: (string | string[]);
|
9926 | }): string;
|
9927 |
|
9928 | export declare class ɵangular_packages_core_core_d implements ReflectiveInjector {
|
9929 | private static INJECTOR_KEY;
|
9930 | readonly parent: Injector | null;
|
9931 | keyIds: number[];
|
9932 | objs: any[];
|
9933 | /**
|
9934 | * Private
|
9935 | */
|
9936 | constructor(_providers: ResolvedReflectiveProvider[], _parent?: Injector);
|
9937 | get(token: any, notFoundValue?: any): any;
|
9938 | resolveAndCreateChild(providers: Provider[]): ReflectiveInjector;
|
9939 | createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector;
|
9940 | resolveAndInstantiate(provider: Provider): any;
|
9941 | instantiateResolved(provider: ResolvedReflectiveProvider): any;
|
9942 | getProviderAtIndex(index: number): ResolvedReflectiveProvider;
|
9943 | private _getMaxNumberOfObjects;
|
9944 | private _instantiateProvider;
|
9945 | private _instantiate;
|
9946 | private _getByReflectiveDependency;
|
9947 | private _getByKey;
|
9948 | private _getObjByKeyId;
|
9949 | get displayName(): string;
|
9950 | toString(): string;
|
9951 | }
|
9952 |
|
9953 | /**
|
9954 | * `Dependency` is used by the framework to extend DI.
|
9955 | * This is internal to Angular and should not be used directly.
|
9956 | */
|
9957 | export declare class ɵangular_packages_core_core_e {
|
9958 | key: ReflectiveKey;
|
9959 | optional: boolean;
|
9960 | visibility: Self | SkipSelf | null;
|
9961 | constructor(key: ReflectiveKey, optional: boolean, visibility: Self | SkipSelf | null);
|
9962 | static fromKey(key: ReflectiveKey): ɵangular_packages_core_core_e;
|
9963 | }
|
9964 |
|
9965 | /**
|
9966 | * Resolve a list of Providers.
|
9967 | */
|
9968 | export declare function ɵangular_packages_core_core_f(providers: Provider[]): ResolvedReflectiveProvider[];
|
9969 |
|
9970 | export declare function ɵangular_packages_core_core_g(): string;
|
9971 |
|
9972 | /** Injects a Renderer2 for the current component. */
|
9973 | export declare function ɵangular_packages_core_core_h(): Renderer2;
|
9974 |
|
9975 | /**
|
9976 | * Creates an ElementRef from the most recent node.
|
9977 | *
|
9978 | * @returns The ElementRef instance to use
|
9979 | */
|
9980 | export declare function ɵangular_packages_core_core_i(): ElementRef;
|
9981 |
|
9982 | /**
|
9983 | * Creates an ElementRef given a node.
|
9984 | *
|
9985 | * @param tNode The node for which you'd like an ElementRef
|
9986 | * @param lView The view to which the node belongs
|
9987 | * @returns The ElementRef instance to use
|
9988 | */
|
9989 | export declare function ɵangular_packages_core_core_j(tNode: TNode, lView: ɵangular_packages_core_core_ca): ElementRef;
|
9990 |
|
9991 | export declare function ɵangular_packages_core_core_k(id: string): NgModuleFactory<any>;
|
9992 |
|
9993 | /**
|
9994 | * Creates a TemplateRef given a node.
|
9995 | *
|
9996 | * @returns The TemplateRef instance to use
|
9997 | */
|
9998 | export declare function ɵangular_packages_core_core_l<T>(): TemplateRef<T> | null;
|
9999 |
|
10000 | /**
|
10001 | * Creates a TemplateRef and stores it on the injector.
|
10002 | *
|
10003 | * @param hostTNode The node on which a TemplateRef is requested
|
10004 | * @param hostLView The `LView` to which the node belongs
|
10005 | * @returns The TemplateRef instance or null if we can't create a TemplateRef on a given node type
|
10006 | */
|
10007 | export declare function ɵangular_packages_core_core_m<T>(hostTNode: TNode, hostLView: ɵangular_packages_core_core_ca): TemplateRef<T> | null;
|
10008 |
|
10009 | /**
|
10010 | * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef
|
10011 | * already exists, retrieves the existing ViewContainerRef.
|
10012 | *
|
10013 | * @returns The ViewContainerRef instance to use
|
10014 | */
|
10015 | export declare function ɵangular_packages_core_core_n(): ViewContainerRef;
|
10016 |
|
10017 | export declare class ɵangular_packages_core_core_o {
|
10018 | readonly listeners: DebugEventListener[];
|
10019 | readonly parent: DebugElement | null;
|
10020 | readonly nativeNode: any;
|
10021 | private readonly _debugContext;
|
10022 | constructor(nativeNode: any, parent: DebugNode | null, _debugContext: ɵangular_packages_core_core_bd);
|
10023 | get injector(): Injector;
|
10024 | get componentInstance(): any;
|
10025 | get context(): any;
|
10026 | get references(): {
|
10027 | [key: string]: any;
|
10028 | };
|
10029 | get providerTokens(): any[];
|
10030 | }
|
10031 |
|
10032 | export declare class ɵangular_packages_core_core_p extends ɵangular_packages_core_core_o implements DebugElement {
|
10033 | readonly name: string;
|
10034 | readonly properties: {
|
10035 | [key: string]: any;
|
10036 | };
|
10037 | readonly attributes: {
|
10038 | [key: string]: string | null;
|
10039 | };
|
10040 | readonly classes: {
|
10041 | [key: string]: boolean;
|
10042 | };
|
10043 | readonly styles: {
|
10044 | [key: string]: string | null;
|
10045 | };
|
10046 | readonly childNodes: DebugNode[];
|
10047 | readonly nativeElement: any;
|
10048 | constructor(nativeNode: any, parent: any, _debugContext: ɵangular_packages_core_core_bd);
|
10049 | addChild(child: DebugNode): void;
|
10050 | removeChild(child: DebugNode): void;
|
10051 | insertChildrenAfter(child: DebugNode, newChildren: DebugNode[]): void;
|
10052 | insertBefore(refChild: DebugNode, newChild: DebugNode): void;
|
10053 | query(predicate: Predicate<DebugElement>): DebugElement;
|
10054 | queryAll(predicate: Predicate<DebugElement>): DebugElement[];
|
10055 | queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[];
|
10056 | get children(): DebugElement[];
|
10057 | triggerEventHandler(eventName: string, eventObj: any): void;
|
10058 | }
|
10059 |
|
10060 | export declare function ɵangular_packages_core_core_q(nativeNode: any): DebugNode | null;
|
10061 |
|
10062 | /** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */
|
10063 | export declare function ɵangular_packages_core_core_r(flags: InjectFlags): ChangeDetectorRef;
|
10064 |
|
10065 | export declare class ɵangular_packages_core_core_s implements IterableDifferFactory {
|
10066 | constructor();
|
10067 | supports(obj: Object | null | undefined): boolean;
|
10068 | create<V>(trackByFn?: TrackByFunction<V>): DefaultIterableDiffer<V>;
|
10069 | }
|
10070 |
|
10071 | export declare class ɵangular_packages_core_core_t<K, V> implements KeyValueDifferFactory {
|
10072 | constructor();
|
10073 | supports(obj: any): boolean;
|
10074 | create<K, V>(): KeyValueDiffer<K, V>;
|
10075 | }
|
10076 |
|
10077 | export declare function ɵangular_packages_core_core_u(): IterableDiffers;
|
10078 |
|
10079 | export declare function ɵangular_packages_core_core_v(): KeyValueDiffers;
|
10080 |
|
10081 | export declare function ɵangular_packages_core_core_w(): IterableDiffers;
|
10082 |
|
10083 | export declare function ɵangular_packages_core_core_x(): KeyValueDiffers;
|
10084 |
|
10085 | export declare function ɵangular_packages_core_core_y(locale?: string): string;
|
10086 |
|
10087 | /**
|
10088 | * A built-in [dependency injection token](guide/glossary#di-token)
|
10089 | * that is used to configure the root injector for bootstrapping.
|
10090 | */
|
10091 | export declare const ɵangular_packages_core_core_z: StaticProvider[];
|
10092 |
|
10093 | /**
|
10094 | * Providers that generate a random `APP_ID_TOKEN`.
|
10095 | * @publicApi
|
10096 | */
|
10097 | export declare const ɵAPP_ID_RANDOM_PROVIDER: {
|
10098 | provide: InjectionToken<string>;
|
10099 | useFactory: typeof ɵangular_packages_core_core_g;
|
10100 | deps: any[];
|
10101 | };
|
10102 |
|
10103 | export declare const enum ɵArgumentType {
|
10104 | Inline = 0,
|
10105 | Dynamic = 1
|
10106 | }
|
10107 |
|
10108 | /**
|
10109 | * A set of marker values to be used in the attributes arrays. These markers indicate that some
|
10110 | * items are not regular attributes and the processing should be adapted accordingly.
|
10111 | */
|
10112 | export declare const enum ɵAttributeMarker {
|
10113 | /**
|
10114 | * An implicit marker which indicates that the value in the array are of `attributeKey`,
|
10115 | * `attributeValue` format.
|
10116 | *
|
10117 | * NOTE: This is implicit as it is the type when no marker is present in array. We indicate that
|
10118 | * it should not be present at runtime by the negative number.
|
10119 | */
|
10120 | ImplicitAttributes = -1,
|
10121 | /**
|
10122 | * Marker indicates that the following 3 values in the attributes array are:
|
10123 | * namespaceUri, attributeName, attributeValue
|
10124 | * in that order.
|
10125 | */
|
10126 | NamespaceURI = 0,
|
10127 | /**
|
10128 | * Signals class declaration.
|
10129 | *
|
10130 | * Each value following `Classes` designates a class name to include on the element.
|
10131 | * ## Example:
|
10132 | *
|
10133 | * Given:
|
10134 | * ```
|
10135 | * <div class="foo bar baz">...<d/vi>
|
10136 | * ```
|
10137 | *
|
10138 | * the generated code is:
|
10139 | * ```
|
10140 | * var _c1 = [AttributeMarker.Classes, 'foo', 'bar', 'baz'];
|
10141 | * ```
|
10142 | */
|
10143 | Classes = 1,
|
10144 | /**
|
10145 | * Signals style declaration.
|
10146 | *
|
10147 | * Each pair of values following `Styles` designates a style name and value to include on the
|
10148 | * element.
|
10149 | * ## Example:
|
10150 | *
|
10151 | * Given:
|
10152 | * ```
|
10153 | * <div style="width:100px; height:200px; color:red">...</div>
|
10154 | * ```
|
10155 | *
|
10156 | * the generated code is:
|
10157 | * ```
|
10158 | * var _c1 = [AttributeMarker.Styles, 'width', '100px', 'height'. '200px', 'color', 'red'];
|
10159 | * ```
|
10160 | */
|
10161 | Styles = 2,
|
10162 | /**
|
10163 | * Signals that the following attribute names were extracted from input or output bindings.
|
10164 | *
|
10165 | * For example, given the following HTML:
|
10166 | *
|
10167 | * ```
|
10168 | * <div moo="car" [foo]="exp" (bar)="doSth()">
|
10169 | * ```
|
10170 | *
|
10171 | * the generated code is:
|
10172 | *
|
10173 | * ```
|
10174 | * var _c1 = ['moo', 'car', AttributeMarker.Bindings, 'foo', 'bar'];
|
10175 | * ```
|
10176 | */
|
10177 | Bindings = 3,
|
10178 | /**
|
10179 | * Signals that the following attribute names were hoisted from an inline-template declaration.
|
10180 | *
|
10181 | * For example, given the following HTML:
|
10182 | *
|
10183 | * ```
|
10184 | * <div *ngFor="let value of values; trackBy:trackBy" dirA [dirB]="value">
|
10185 | * ```
|
10186 | *
|
10187 | * the generated code for the `template()` instruction would include:
|
10188 | *
|
10189 | * ```
|
10190 | * ['dirA', '', AttributeMarker.Bindings, 'dirB', AttributeMarker.Template, 'ngFor', 'ngForOf',
|
10191 | * 'ngForTrackBy', 'let-value']
|
10192 | * ```
|
10193 | *
|
10194 | * while the generated code for the `element()` instruction inside the template function would
|
10195 | * include:
|
10196 | *
|
10197 | * ```
|
10198 | * ['dirA', '', AttributeMarker.Bindings, 'dirB']
|
10199 | * ```
|
10200 | */
|
10201 | Template = 4,
|
10202 | /**
|
10203 | * Signals that the following attribute is `ngProjectAs` and its value is a parsed
|
10204 | * `CssSelector`.
|
10205 | *
|
10206 | * For example, given the following HTML:
|
10207 | *
|
10208 | * ```
|
10209 | * <h1 attr="value" ngProjectAs="[title]">
|
10210 | * ```
|
10211 | *
|
10212 | * the generated code for the `element()` instruction would include:
|
10213 | *
|
10214 | * ```
|
10215 | * ['attr', 'value', AttributeMarker.ProjectAs, ['', 'title', '']]
|
10216 | * ```
|
10217 | */
|
10218 | ProjectAs = 5,
|
10219 | /**
|
10220 | * Signals that the following attribute will be translated by runtime i18n
|
10221 | *
|
10222 | * For example, given the following HTML:
|
10223 | *
|
10224 | * ```
|
10225 | * <div moo="car" foo="value" i18n-foo [bar]="binding" i18n-bar>
|
10226 | * ```
|
10227 | *
|
10228 | * the generated code is:
|
10229 | *
|
10230 | * ```
|
10231 | * var _c1 = ['moo', 'car', AttributeMarker.I18n, 'foo', 'bar'];
|
10232 | */
|
10233 | I18n = 6
|
10234 | }
|
10235 |
|
10236 | export declare const enum ɵBindingFlags {
|
10237 | TypeElementAttribute = 1,
|
10238 | TypeElementClass = 2,
|
10239 | TypeElementStyle = 4,
|
10240 | TypeProperty = 8,
|
10241 | SyntheticProperty = 16,
|
10242 | SyntheticHostProperty = 32,
|
10243 | CatSyntheticProperty = 48,
|
10244 | Types = 15
|
10245 | }
|
10246 |
|
10247 | /**
|
10248 | * Mark `html` string as trusted.
|
10249 | *
|
10250 | * This function wraps the trusted string in `String` and brands it in a way which makes it
|
10251 | * recognizable to {@link htmlSanitizer} to be trusted implicitly.
|
10252 | *
|
10253 | * @param trustedHtml `html` string which needs to be implicitly trusted.
|
10254 | * @returns a `html` which has been branded to be implicitly trusted.
|
10255 | */
|
10256 | export declare function ɵbypassSanitizationTrustHtml(trustedHtml: string): ɵSafeHtml;
|
10257 |
|
10258 | /**
|
10259 | * Mark `url` string as trusted.
|
10260 | *
|
10261 | * This function wraps the trusted string in `String` and brands it in a way which makes it
|
10262 | * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly.
|
10263 | *
|
10264 | * @param trustedResourceUrl `url` string which needs to be implicitly trusted.
|
10265 | * @returns a `url` which has been branded to be implicitly trusted.
|
10266 | */
|
10267 | export declare function ɵbypassSanitizationTrustResourceUrl(trustedResourceUrl: string): ɵSafeResourceUrl;
|
10268 |
|
10269 | /**
|
10270 | * Mark `script` string as trusted.
|
10271 | *
|
10272 | * This function wraps the trusted string in `String` and brands it in a way which makes it
|
10273 | * recognizable to {@link scriptSanitizer} to be trusted implicitly.
|
10274 | *
|
10275 | * @param trustedScript `script` string which needs to be implicitly trusted.
|
10276 | * @returns a `script` which has been branded to be implicitly trusted.
|
10277 | */
|
10278 | export declare function ɵbypassSanitizationTrustScript(trustedScript: string): ɵSafeScript;
|
10279 |
|
10280 | /**
|
10281 | * Mark `style` string as trusted.
|
10282 | *
|
10283 | * This function wraps the trusted string in `String` and brands it in a way which makes it
|
10284 | * recognizable to {@link styleSanitizer} to be trusted implicitly.
|
10285 | *
|
10286 | * @param trustedStyle `style` string which needs to be implicitly trusted.
|
10287 | * @returns a `style` hich has been branded to be implicitly trusted.
|
10288 | */
|
10289 | export declare function ɵbypassSanitizationTrustStyle(trustedStyle: string): ɵSafeStyle;
|
10290 |
|
10291 | /**
|
10292 | * Mark `url` string as trusted.
|
10293 | *
|
10294 | * This function wraps the trusted string in `String` and brands it in a way which makes it
|
10295 | * recognizable to {@link urlSanitizer} to be trusted implicitly.
|
10296 | *
|
10297 | * @param trustedUrl `url` string which needs to be implicitly trusted.
|
10298 | * @returns a `url` which has been branded to be implicitly trusted.
|
10299 | */
|
10300 | export declare function ɵbypassSanitizationTrustUrl(trustedUrl: string): ɵSafeUrl;
|
10301 |
|
10302 |
|
10303 | export declare const enum ɵBypassType {
|
10304 | Url = "URL",
|
10305 | Html = "HTML",
|
10306 | ResourceUrl = "ResourceURL",
|
10307 | Script = "Script",
|
10308 | Style = "Style"
|
10309 | }
|
10310 |
|
10311 | export declare function ɵccf(selector: string, componentType: Type<any>, viewDefFactory: ViewDefinitionFactory, inputs: {
|
10312 | [propName: string]: string;
|
10313 | } | null, outputs: {
|
10314 | [propName: string]: string;
|
10315 | }, ngContentSelectors: string[]): ComponentFactory<any>;
|
10316 |
|
10317 | /**
|
10318 | * Defines the possible states of the default change detector.
|
10319 | * @see `ChangeDetectorRef`
|
10320 | */
|
10321 | export declare enum ɵChangeDetectorStatus {
|
10322 | /**
|
10323 | * A state in which, after calling `detectChanges()`, the change detector
|
10324 | * state becomes `Checked`, and must be explicitly invoked or reactivated.
|
10325 | */
|
10326 | CheckOnce = 0,
|
10327 | /**
|
10328 | * A state in which change detection is skipped until the change detector mode
|
10329 | * becomes `CheckOnce`.
|
10330 | */
|
10331 | Checked = 1,
|
10332 | /**
|
10333 | * A state in which change detection continues automatically until explicitly
|
10334 | * deactivated.
|
10335 | */
|
10336 | CheckAlways = 2,
|
10337 | /**
|
10338 | * A state in which a change detector sub tree is not a part of the main tree and
|
10339 | * should be skipped.
|
10340 | */
|
10341 | Detached = 3,
|
10342 | /**
|
10343 | * Indicates that the change detector encountered an error checking a binding
|
10344 | * or calling a directive lifecycle method and is now in an inconsistent state. Change
|
10345 | * detectors in this state do not detect changes.
|
10346 | */
|
10347 | Errored = 4,
|
10348 | /**
|
10349 | * Indicates that the change detector has been destroyed.
|
10350 | */
|
10351 | Destroyed = 5
|
10352 | }
|
10353 |
|
10354 | export declare function ɵclearOverrides(): void;
|
10355 |
|
10356 | export declare function ɵclearResolutionOfComponentResourcesQueue(): Map<Type<any>, Component>;
|
10357 |
|
10358 | export declare function ɵcmf(ngModuleType: Type<any>, bootstrapComponents: Type<any>[], defFactory: NgModuleDefinitionFactory): NgModuleFactory<any>;
|
10359 |
|
10360 | export declare class ɵCodegenComponentFactoryResolver implements ComponentFactoryResolver {
|
10361 | private _parent;
|
10362 | private _ngModule;
|
10363 | private _factories;
|
10364 | constructor(factories: ComponentFactory<any>[], _parent: ComponentFactoryResolver, _ngModule: NgModuleRef<any>);
|
10365 | resolveComponentFactory<T>(component: {
|
10366 | new (...args: any[]): T;
|
10367 | }): ComponentFactory<T>;
|
10368 | }
|
10369 |
|
10370 | /**
|
10371 | * Compile an Angular component according to its decorator metadata, and patch the resulting
|
10372 | * component def (ɵcmp) onto the component type.
|
10373 | *
|
10374 | * Compilation may be asynchronous (due to the need to resolve URLs for the component template or
|
10375 | * other resources, for example). In the event that compilation is not immediate, `compileComponent`
|
10376 | * will enqueue resource resolution into a global queue and will fail to return the `ɵcmp`
|
10377 | * until the global queue has been resolved with a call to `resolveComponentResources`.
|
10378 | */
|
10379 | export declare function ɵcompileComponent(type: Type<any>, metadata: Component): void;
|
10380 |
|
10381 | /**
|
10382 | * Compile an Angular directive according to its decorator metadata, and patch the resulting
|
10383 | * directive def onto the component type.
|
10384 | *
|
10385 | * In the event that compilation is not immediate, `compileDirective` will return a `Promise` which
|
10386 | * will resolve when compilation completes and the directive becomes usable.
|
10387 | */
|
10388 | export declare function ɵcompileDirective(type: Type<any>, directive: Directive | null): void;
|
10389 |
|
10390 | /**
|
10391 | * Compiles a module in JIT mode.
|
10392 | *
|
10393 | * This function automatically gets called when a class has a `@NgModule` decorator.
|
10394 | */
|
10395 | export declare function ɵcompileNgModule(moduleType: Type<any>, ngModule?: NgModule): void;
|
10396 |
|
10397 | /**
|
10398 | * Compiles and adds the `ɵmod`, `ɵfac` and `ɵinj` properties to the module class.
|
10399 | *
|
10400 | * It's possible to compile a module via this API which will allow duplicate declarations in its
|
10401 | * root.
|
10402 | */
|
10403 | export declare function ɵcompileNgModuleDefs(moduleType: ɵNgModuleType, ngModule: NgModule, allowDuplicateDeclarationsInRoot?: boolean): void;
|
10404 |
|
10405 | export declare function ɵcompileNgModuleFactory__POST_R3__<M>(injector: Injector, options: CompilerOptions, moduleType: Type<M>): Promise<NgModuleFactory<M>>;
|
10406 |
|
10407 | export declare function ɵcompilePipe(type: Type<any>, meta: Pipe): void;
|
10408 |
|
10409 | export declare const ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__: <T>(moduleType: Type<T>) => Promise<ModuleWithComponentFactories<T>>;
|
10410 |
|
10411 | export declare const ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__: <T>(moduleType: Type<T>) => ModuleWithComponentFactories<T>;
|
10412 |
|
10413 | export declare const ɵCompiler_compileModuleAsync__POST_R3__: <T>(moduleType: Type<T>) => Promise<NgModuleFactory<T>>;
|
10414 |
|
10415 | export declare const ɵCompiler_compileModuleSync__POST_R3__: <T>(moduleType: Type<T>) => NgModuleFactory<T>;
|
10416 |
|
10417 | /**
|
10418 | * Runtime link information for Components.
|
10419 | *
|
10420 | * This is an internal data structure used by the render to link
|
10421 | * components into templates.
|
10422 | *
|
10423 | * NOTE: Always use `defineComponent` function to create this object,
|
10424 | * never create the object directly since the shape of this object
|
10425 | * can change between versions.
|
10426 | *
|
10427 | * See: {@link defineComponent}
|
10428 | */
|
10429 | export declare interface ɵComponentDef<T> extends ɵDirectiveDef<T> {
|
10430 | /**
|
10431 | * Runtime unique component ID.
|
10432 | */
|
10433 | readonly id: string;
|
10434 | /**
|
10435 | * The View template of the component.
|
10436 | */
|
10437 | readonly template: ComponentTemplate<T>;
|
10438 | /** Constants associated with the component's view. */
|
10439 | readonly consts: TConstantsOrFactory | null;
|
10440 | /**
|
10441 | * An array of `ngContent[selector]` values that were found in the template.
|
10442 | */
|
10443 | readonly ngContentSelectors?: string[];
|
10444 | /**
|
10445 | * A set of styles that the component needs to be present for component to render correctly.
|
10446 | */
|
10447 | readonly styles: string[];
|
10448 | /**
|
10449 | * The number of nodes, local refs, and pipes in this component template.
|
10450 | *
|
10451 | * Used to calculate the length of the component's LView array, so we
|
10452 | * can pre-fill the array and set the binding start index.
|
10453 | */
|
10454 | readonly decls: number;
|
10455 | /**
|
10456 | * The number of bindings in this component template (including pure fn bindings).
|
10457 | *
|
10458 | * Used to calculate the length of the component's LView array, so we
|
10459 | * can pre-fill the array and set the host binding start index.
|
10460 | */
|
10461 | readonly vars: number;
|
10462 | /**
|
10463 | * Query-related instructions for a component.
|
10464 | */
|
10465 | viewQuery: ViewQueriesFunction<T> | null;
|
10466 | /**
|
10467 | * The view encapsulation type, which determines how styles are applied to
|
10468 | * DOM elements. One of
|
10469 | * - `Emulated` (default): Emulate native scoping of styles.
|
10470 | * - `Native`: Use the native encapsulation mechanism of the renderer.
|
10471 | * - `ShadowDom`: Use modern [ShadowDOM](https://w3c.github.io/webcomponents/spec/shadow/) and
|
10472 | * create a ShadowRoot for component's host element.
|
10473 | * - `None`: Do not provide any template or style encapsulation.
|
10474 | */
|
10475 | readonly encapsulation: ViewEncapsulation;
|
10476 | /**
|
10477 | * Defines arbitrary developer-defined data to be stored on a renderer instance.
|
10478 | * This is useful for renderers that delegate to other renderers.
|
10479 | */
|
10480 | readonly data: {
|
10481 | [kind: string]: any;
|
10482 | };
|
10483 | /** Whether or not this component's ChangeDetectionStrategy is OnPush */
|
10484 | readonly onPush: boolean;
|
10485 | /**
|
10486 | * Registry of directives and components that may be found in this view.
|
10487 | *
|
10488 | * The property is either an array of `DirectiveDef`s or a function which returns the array of
|
10489 | * `DirectiveDef`s. The function is necessary to be able to support forward declarations.
|
10490 | */
|
10491 | directiveDefs: DirectiveDefListOrFactory | null;
|
10492 | /**
|
10493 | * Registry of pipes that may be found in this view.
|
10494 | *
|
10495 | * The property is either an array of `PipeDefs`s or a function which returns the array of
|
10496 | * `PipeDefs`s. The function is necessary to be able to support forward declarations.
|
10497 | */
|
10498 | pipeDefs: PipeDefListOrFactory | null;
|
10499 | /**
|
10500 | * The set of schemas that declare elements to be allowed in the component's template.
|
10501 | */
|
10502 | schemas: SchemaMetadata[] | null;
|
10503 | /**
|
10504 | * Ivy runtime uses this place to store the computed tView for the component. This gets filled on
|
10505 | * the first run of component.
|
10506 | */
|
10507 | tView: TView | null;
|
10508 | /**
|
10509 | * Used to store the result of `noSideEffects` function so that it is not removed by closure
|
10510 | * compiler. The property should never be read.
|
10511 | */
|
10512 | readonly _?: unknown;
|
10513 | }
|
10514 |
|
10515 | /**
|
10516 | * A subclass of `Type` which has a static `ɵcmp`:`ComponentDef` field making it
|
10517 | * consumable for rendering.
|
10518 | */
|
10519 | export declare interface ɵComponentType<T> extends Type<T> {
|
10520 | ɵcmp: unknown;
|
10521 | }
|
10522 |
|
10523 |
|
10524 | export declare class ɵConsole {
|
10525 | log(message: string): void;
|
10526 | warn(message: string): void;
|
10527 | }
|
10528 |
|
10529 | export declare function ɵCREATE_ATTRIBUTE_DECORATOR__POST_R3__(): AttributeDecorator;
|
10530 |
|
10531 | /**
|
10532 | * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.
|
10533 | *
|
10534 | * @publicApi
|
10535 | */
|
10536 | export declare function ɵcreateInjector(defType: any, parent?: Injector | null, additionalProviders?: StaticProvider[] | null, name?: string): Injector;
|
10537 |
|
10538 | export declare function ɵcrt(values: {
|
10539 | styles: (string | any[])[];
|
10540 | encapsulation: ViewEncapsulation;
|
10541 | data: {
|
10542 | [kind: string]: any[];
|
10543 | };
|
10544 | }): RendererType2;
|
10545 |
|
10546 | /**
|
10547 | * A list of CssSelectors.
|
10548 | *
|
10549 | * A directive or component can have multiple selectors. This type is used for
|
10550 | * directive defs so any of the selectors in the list will match that directive.
|
10551 | *
|
10552 | * Original: 'form, [ngForm]'
|
10553 | * Parsed: [['form'], ['', 'ngForm', '']]
|
10554 | */
|
10555 | export declare type ɵCssSelectorList = CssSelector[];
|
10556 |
|
10557 | /**
|
10558 | * Index of each value in currency data (used to describe CURRENCIES_EN in currencies.ts)
|
10559 | */
|
10560 | export declare const enum ɵCurrencyIndex {
|
10561 | Symbol = 0,
|
10562 | SymbolNarrow = 1,
|
10563 | NbOfDigits = 2
|
10564 | }
|
10565 |
|
10566 | /**
|
10567 | * The locale id that the application is using by default (for translations and ICU expressions).
|
10568 | */
|
10569 | export declare const ɵDEFAULT_LOCALE_ID = "en-US";
|
10570 |
|
10571 | export declare const ɵdefaultIterableDiffers: IterableDiffers;
|
10572 |
|
10573 | export declare const ɵdefaultKeyValueDiffers: KeyValueDiffers;
|
10574 |
|
10575 | /**
|
10576 | * Bitmask for DI flags
|
10577 | */
|
10578 | export declare const enum ɵDepFlags {
|
10579 | None = 0,
|
10580 | SkipSelf = 1,
|
10581 | Optional = 2,
|
10582 | Self = 4,
|
10583 | Value = 8
|
10584 | }
|
10585 |
|
10586 |
|
10587 | /**
|
10588 | * Synchronously perform change detection on a component (and possibly its sub-components).
|
10589 | *
|
10590 | * This function triggers change detection in a synchronous way on a component.
|
10591 | *
|
10592 | * @param component The component which the change detection should be performed on.
|
10593 | */
|
10594 | export declare function ɵdetectChanges(component: {}): void;
|
10595 |
|
10596 |
|
10597 | export declare function ɵdevModeEqual(a: any, b: any): boolean;
|
10598 |
|
10599 | export declare function ɵdid(checkIndex: number, flags: ɵNodeFlags, matchedQueries: null | [string | number, ɵQueryValueType][], childCount: number, ctor: any, deps: ([ɵDepFlags, any] | any)[], props?: null | {
|
10600 | [name: string]: [number, string];
|
10601 | }, outputs?: null | {
|
10602 | [name: string]: string;
|
10603 | }): NodeDef;
|
10604 |
|
10605 | /**
|
10606 | * Runtime link information for Directives.
|
10607 | *
|
10608 | * This is an internal data structure used by the render to link
|
10609 | * directives into templates.
|
10610 | *
|
10611 | * NOTE: Always use `defineDirective` function to create this object,
|
10612 | * never create the object directly since the shape of this object
|
10613 | * can change between versions.
|
10614 | *
|
10615 | * @param Selector type metadata specifying the selector of the directive or component
|
10616 | *
|
10617 | * See: {@link defineDirective}
|
10618 | */
|
10619 | export declare interface ɵDirectiveDef<T> {
|
10620 | /**
|
10621 | * A dictionary mapping the inputs' minified property names to their public API names, which
|
10622 | * are their aliases if any, or their original unminified property names
|
10623 | * (as in `@Input('alias') propertyName: any;`).
|
10624 | */
|
10625 | readonly inputs: {
|
10626 | [P in keyof T]: string;
|
10627 | };
|
10628 | /**
|
10629 | * @deprecated This is only here because `NgOnChanges` incorrectly uses declared name instead of
|
10630 | * public or minified name.
|
10631 | */
|
10632 | readonly declaredInputs: {
|
10633 | [P in keyof T]: string;
|
10634 | };
|
10635 | /**
|
10636 | * A dictionary mapping the outputs' minified property names to their public API names, which
|
10637 | * are their aliases if any, or their original unminified property names
|
10638 | * (as in `@Output('alias') propertyName: any;`).
|
10639 | */
|
10640 | readonly outputs: {
|
10641 | [P in keyof T]: string;
|
10642 | };
|
10643 | /**
|
10644 | * Function to create and refresh content queries associated with a given directive.
|
10645 | */
|
10646 | contentQueries: ContentQueriesFunction<T> | null;
|
10647 | /**
|
10648 | * Query-related instructions for a directive. Note that while directives don't have a
|
10649 | * view and as such view queries won't necessarily do anything, there might be
|
10650 | * components that extend the directive.
|
10651 | */
|
10652 | viewQuery: ViewQueriesFunction<T> | null;
|
10653 | /**
|
10654 | * Refreshes host bindings on the associated directive.
|
10655 | */
|
10656 | readonly hostBindings: HostBindingsFunction<T> | null;
|
10657 | /**
|
10658 | * The number of bindings in this directive `hostBindings` (including pure fn bindings).
|
10659 | *
|
10660 | * Used to calculate the length of the component's LView array, so we
|
10661 | * can pre-fill the array and set the host binding start index.
|
10662 | */
|
10663 | readonly hostVars: number;
|
10664 | /**
|
10665 | * Assign static attribute values to a host element.
|
10666 | *
|
10667 | * This property will assign static attribute values as well as class and style
|
10668 | * values to a host element. Since attribute values can consist of different types of values, the
|
10669 | * `hostAttrs` array must include the values in the following format:
|
10670 | *
|
10671 | * attrs = [
|
10672 | * // static attributes (like `title`, `name`, `id`...)
|
10673 | * attr1, value1, attr2, value,
|
10674 | *
|
10675 | * // a single namespace value (like `x:id`)
|
10676 | * NAMESPACE_MARKER, namespaceUri1, name1, value1,
|
10677 | *
|
10678 | * // another single namespace value (like `x:name`)
|
10679 | * NAMESPACE_MARKER, namespaceUri2, name2, value2,
|
10680 | *
|
10681 | * // a series of CSS classes that will be applied to the element (no spaces)
|
10682 | * CLASSES_MARKER, class1, class2, class3,
|
10683 | *
|
10684 | * // a series of CSS styles (property + value) that will be applied to the element
|
10685 | * STYLES_MARKER, prop1, value1, prop2, value2
|
10686 | * ]
|
10687 | *
|
10688 | * All non-class and non-style attributes must be defined at the start of the list
|
10689 | * first before all class and style values are set. When there is a change in value
|
10690 | * type (like when classes and styles are introduced) a marker must be used to separate
|
10691 | * the entries. The marker values themselves are set via entries found in the
|
10692 | * [AttributeMarker] enum.
|
10693 | */
|
10694 | readonly hostAttrs: TAttributes | null;
|
10695 | /** Token representing the directive. Used by DI. */
|
10696 | readonly type: Type<T>;
|
10697 | /** Function that resolves providers and publishes them into the DI system. */
|
10698 | providersResolver: (<U extends T>(def: ɵDirectiveDef<U>, processProvidersFn?: ProcessProvidersFunction) => void) | null;
|
10699 | /** The selectors that will be used to match nodes to this directive. */
|
10700 | readonly selectors: ɵCssSelectorList;
|
10701 | /**
|
10702 | * Name under which the directive is exported (for use with local references in template)
|
10703 | */
|
10704 | readonly exportAs: string[] | null;
|
10705 | /**
|
10706 | * Factory function used to create a new directive instance. Will be null initially.
|
10707 | * Populated when the factory is first requested by directive instantiation logic.
|
10708 | */
|
10709 | readonly factory: FactoryFn<T> | null;
|
10710 | /**
|
10711 | * The features applied to this directive
|
10712 | */
|
10713 | readonly features: DirectiveDefFeature[] | null;
|
10714 | setInput: (<U extends T>(this: ɵDirectiveDef<U>, instance: U, value: any, publicName: string, privateName: string) => void) | null;
|
10715 | }
|
10716 |
|
10717 | /**
|
10718 | * A subclass of `Type` which has a static `ɵdir`:`DirectiveDef` field making it
|
10719 | * consumable for rendering.
|
10720 | */
|
10721 | export declare interface ɵDirectiveType<T> extends Type<T> {
|
10722 | ɵdir: unknown;
|
10723 | ɵfac: unknown;
|
10724 | }
|
10725 |
|
10726 | export declare function ɵeld(checkIndex: number, flags: ɵNodeFlags, matchedQueriesDsl: null | [string | number, ɵQueryValueType][], ngContentIndex: null | number, childCount: number, namespaceAndName: string | null, fixedAttrs?: null | [string, string][], bindings?: null | [ɵBindingFlags, string, string | SecurityContext | null][], outputs?: null | ([string, string])[], handleEvent?: null | ElementHandleEventFn, componentView?: null | ViewDefinitionFactory, componentRendererType?: RendererType2 | null): NodeDef;
|
10727 |
|
10728 | export declare const ɵEMPTY_ARRAY: any[];
|
10729 |
|
10730 | export declare const ɵEMPTY_MAP: {
|
10731 | [key: string]: any;
|
10732 | };
|
10733 |
|
10734 | /**
|
10735 | * Index of each type of locale data from the extra locale data array
|
10736 | */
|
10737 | export declare const enum ɵExtraLocaleDataIndex {
|
10738 | ExtraDayPeriodFormats = 0,
|
10739 | ExtraDayPeriodStandalone = 1,
|
10740 | ExtraDayPeriodsRules = 2
|
10741 | }
|
10742 |
|
10743 | /**
|
10744 | * Finds the locale data for a given locale.
|
10745 | *
|
10746 | * @param locale The locale code.
|
10747 | * @returns The locale data.
|
10748 | * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
|
10749 | */
|
10750 | export declare function ɵfindLocaleData(locale: string): any;
|
10751 |
|
10752 | /**
|
10753 | * Loops over queued module definitions, if a given module definition has all of its
|
10754 | * declarations resolved, it dequeues that module definition and sets the scope on
|
10755 | * its declarations.
|
10756 | */
|
10757 | export declare function ɵflushModuleScopingQueueAsMuchAsPossible(): void;
|
10758 |
|
10759 | export declare function ɵgetComponentViewDefinitionFactory(componentFactory: ComponentFactory<any>): ViewDefinitionFactory;
|
10760 |
|
10761 | export declare function ɵgetDebugNode__POST_R3__(nativeNode: Element): DebugElement__POST_R3__;
|
10762 |
|
10763 | export declare function ɵgetDebugNode__POST_R3__(nativeNode: Node): DebugNode__POST_R3__;
|
10764 |
|
10765 | export declare function ɵgetDebugNode__POST_R3__(nativeNode: null): null;
|
10766 |
|
10767 | export declare const ɵgetDebugNodeR2: (nativeNode: any) => DebugNode | null;
|
10768 |
|
10769 | /**
|
10770 | * Retrieves directive instances associated with a given DOM node. Does not include
|
10771 | * component instances.
|
10772 | *
|
10773 | * @usageNotes
|
10774 | * Given the following DOM structure:
|
10775 | *
|
10776 | * ```html
|
10777 | * <app-root>
|
10778 | * <button my-button></button>
|
10779 | * <my-comp></my-comp>
|
10780 | * </app-root>
|
10781 | * ```
|
10782 | *
|
10783 | * Calling `getDirectives` on `<button>` will return an array with an instance of the `MyButton`
|
10784 | * directive that is associated with the DOM node.
|
10785 | *
|
10786 | * Calling `getDirectives` on `<my-comp>` will return an empty array.
|
10787 | *
|
10788 | * @param node DOM node for which to get the directives.
|
10789 | * @returns Array of directives associated with the node.
|
10790 | *
|
10791 | * @publicApi
|
10792 | * @globalApi ng
|
10793 | */
|
10794 | export declare function ɵgetDirectives(node: Node): {}[];
|
10795 |
|
10796 | /**
|
10797 | * Retrieves the host element of a component or directive instance.
|
10798 | * The host element is the DOM element that matched the selector of the directive.
|
10799 | *
|
10800 | * @param componentOrDirective Component or directive instance for which the host
|
10801 | * element should be retrieved.
|
10802 | * @returns Host element of the target.
|
10803 | *
|
10804 | * @publicApi
|
10805 | * @globalApi ng
|
10806 | */
|
10807 | export declare function ɵgetHostElement(componentOrDirective: {}): Element;
|
10808 |
|
10809 | /**
|
10810 | * Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading
|
10811 | * inherited value.
|
10812 | *
|
10813 | * @param type A type which may have its own (non-inherited) `ɵprov`.
|
10814 | */
|
10815 | export declare function ɵgetInjectableDef<T>(type: any): ɵɵInjectableDeclaration<T> | null;
|
10816 |
|
10817 | /**
|
10818 | * Returns the matching `LContext` data for a given DOM node, directive or component instance.
|
10819 | *
|
10820 | * This function will examine the provided DOM element, component, or directive instance\'s
|
10821 | * monkey-patched property to derive the `LContext` data. Once called then the monkey-patched
|
10822 | * value will be that of the newly created `LContext`.
|
10823 | *
|
10824 | * If the monkey-patched value is the `LView` instance then the context value for that
|
10825 | * target will be created and the monkey-patch reference will be updated. Therefore when this
|
10826 | * function is called it may mutate the provided element\'s, component\'s or any of the associated
|
10827 | * directive\'s monkey-patch values.
|
10828 | *
|
10829 | * If the monkey-patch value is not detected then the code will walk up the DOM until an element
|
10830 | * is found which contains a monkey-patch reference. When that occurs then the provided element
|
10831 | * will be updated with a new context (which is then returned). If the monkey-patch value is not
|
10832 | * detected for a component/directive instance then it will throw an error (all components and
|
10833 | * directives should be automatically monkey-patched by ivy).
|
10834 | *
|
10835 | * @param target Component, Directive or DOM Node.
|
10836 | */
|
10837 | export declare function ɵgetLContext(target: any): ɵLContext | null;
|
10838 |
|
10839 | /**
|
10840 | * Retrieves the default currency code for the given locale.
|
10841 | *
|
10842 | * The default is defined as the first currency which is still in use.
|
10843 | *
|
10844 | * @param locale The code of the locale whose currency code we want.
|
10845 | * @returns The code of the default currency for the given locale.
|
10846 | *
|
10847 | */
|
10848 | export declare function ɵgetLocaleCurrencyCode(locale: string): string | null;
|
10849 |
|
10850 | /**
|
10851 | * Retrieves the plural function used by ICU expressions to determine the plural case to use
|
10852 | * for a given locale.
|
10853 | * @param locale A locale code for the locale format rules to use.
|
10854 | * @returns The plural function for the locale.
|
10855 | * @see `NgPlural`
|
10856 | * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
|
10857 | */
|
10858 | export declare function ɵgetLocalePluralCase(locale: string): (value: number) => number;
|
10859 |
|
10860 | export declare function ɵgetModuleFactory__POST_R3__(id: string): NgModuleFactory<any>;
|
10861 |
|
10862 | export declare function ɵgetSanitizationBypassType(value: any): ɵBypassType | null;
|
10863 |
|
10864 | export declare type ɵGetterFn = (obj: any) => any;
|
10865 |
|
10866 |
|
10867 | export declare const ɵglobal: any;
|
10868 |
|
10869 | export declare function ɵinitServicesIfNeeded(): void;
|
10870 |
|
10871 | export declare function ɵINJECTOR_IMPL__POST_R3__(providers: StaticProvider[], parent: Injector | undefined, name: string): Injector;
|
10872 |
|
10873 | /**
|
10874 | * An internal token whose presence in an injector indicates that the injector should treat itself
|
10875 | * as a root scoped injector when processing requests for unknown tokens which may indicate
|
10876 | * they are provided in the root scope.
|
10877 | */
|
10878 | export declare const ɵINJECTOR_SCOPE: InjectionToken<"root" | "platform" | null>;
|
10879 |
|
10880 | export declare function ɵinlineInterpolate(valueCount: number, c0: string, a1: any, c1: string, a2?: any, c2?: string, a3?: any, c3?: string, a4?: any, c4?: string, a5?: any, c5?: string, a6?: any, c6?: string, a7?: any, c7?: string, a8?: any, c8?: string, a9?: any, c9?: string): string;
|
10881 |
|
10882 | export declare function ɵinterpolate(valueCount: number, constAndInterp: string[]): string;
|
10883 |
|
10884 | export declare function ɵisBoundToModule__POST_R3__<C>(cf: ComponentFactory<C>): boolean;
|
10885 |
|
10886 | /**
|
10887 | * Reports whether a given strategy is currently the default for change detection.
|
10888 | * @param changeDetectionStrategy The strategy to check.
|
10889 | * @returns True if the given strategy is the current default, false otherwise.
|
10890 | * @see `ChangeDetectorStatus`
|
10891 | * @see `ChangeDetectorRef`
|
10892 | */
|
10893 | export declare function ɵisDefaultChangeDetectionStrategy(changeDetectionStrategy: ChangeDetectionStrategy): boolean;
|
10894 |
|
10895 | export declare function ɵisListLikeIterable(obj: any): boolean;
|
10896 |
|
10897 | /**
|
10898 | * Determine if the argument is an Observable
|
10899 | *
|
10900 | * Strictly this tests that the `obj` is `Subscribable`, since `Observable`
|
10901 | * types need additional methods, such as `lift()`. But it is adequate for our
|
10902 | * needs since within the Angular framework code we only ever need to use the
|
10903 | * `subscribe()` method, and RxJS has mechanisms to wrap `Subscribable` objects
|
10904 | * into `Observable` as needed.
|
10905 | */
|
10906 | export declare const ɵisObservable: (obj: any | Observable<any>) => obj is Observable<any>;
|
10907 |
|
10908 | /**
|
10909 | * Determine if the argument is shaped like a Promise
|
10910 | */
|
10911 | export declare function ɵisPromise<T = any>(obj: any): obj is Promise<T>;
|
10912 |
|
10913 | /**
|
10914 | * Determine if the argument is a Subscribable
|
10915 | */
|
10916 | export declare function ɵisSubscribable(obj: any | Subscribable<any>): obj is Subscribable<any>;
|
10917 |
|
10918 | export declare const ɵivyEnabled = false;
|
10919 |
|
10920 | /**
|
10921 | * The internal view context which is specific to a given DOM element, directive or
|
10922 | * component instance. Each value in here (besides the LView and element node details)
|
10923 | * can be present, null or undefined. If undefined then it implies the value has not been
|
10924 | * looked up yet, otherwise, if null, then a lookup was executed and nothing was found.
|
10925 | *
|
10926 | * Each value will get filled when the respective value is examined within the getContext
|
10927 | * function. The component, element and each directive instance will share the same instance
|
10928 | * of the context.
|
10929 | */
|
10930 | export declare interface ɵLContext {
|
10931 | /**
|
10932 | * The component's parent view data.
|
10933 | */
|
10934 | lView: ɵangular_packages_core_core_ca;
|
10935 | /**
|
10936 | * The index instance of the node.
|
10937 | */
|
10938 | nodeIndex: number;
|
10939 | /**
|
10940 | * The instance of the DOM node that is attached to the lNode.
|
10941 | */
|
10942 | native: RNode;
|
10943 | /**
|
10944 | * The instance of the Component node.
|
10945 | */
|
10946 | component: {} | null | undefined;
|
10947 | /**
|
10948 | * The list of active directives that exist on this element.
|
10949 | */
|
10950 | directives: any[] | null | undefined;
|
10951 | /**
|
10952 | * The map of local references (local reference name => element or directive instance) that exist
|
10953 | * on this element.
|
10954 | */
|
10955 | localRefs: {
|
10956 | [key: string]: any;
|
10957 | } | null | undefined;
|
10958 | }
|
10959 |
|
10960 | /**
|
10961 | * Used to enable lifecycle hooks on the root component.
|
10962 | *
|
10963 | * Include this feature when calling `renderComponent` if the root component
|
10964 | * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't
|
10965 | * be called properly.
|
10966 | *
|
10967 | * Example:
|
10968 | *
|
10969 | * ```
|
10970 | * renderComponent(AppComponent, {hostFeatures: [LifecycleHooksFeature]});
|
10971 | * ```
|
10972 | */
|
10973 | export declare function ɵLifecycleHooksFeature(component: any, def: ɵComponentDef<any>): void;
|
10974 |
|
10975 | /**
|
10976 | * Index of each type of locale data from the locale data array
|
10977 | */
|
10978 | export declare enum ɵLocaleDataIndex {
|
10979 | LocaleId = 0,
|
10980 | DayPeriodsFormat = 1,
|
10981 | DayPeriodsStandalone = 2,
|
10982 | DaysFormat = 3,
|
10983 | DaysStandalone = 4,
|
10984 | MonthsFormat = 5,
|
10985 | MonthsStandalone = 6,
|
10986 | Eras = 7,
|
10987 | FirstDayOfWeek = 8,
|
10988 | WeekendRange = 9,
|
10989 | DateFormat = 10,
|
10990 | TimeFormat = 11,
|
10991 | DateTimeFormat = 12,
|
10992 | NumberSymbols = 13,
|
10993 | NumberFormats = 14,
|
10994 | CurrencyCode = 15,
|
10995 | CurrencySymbol = 16,
|
10996 | CurrencyName = 17,
|
10997 | Currencies = 18,
|
10998 | Directionality = 19,
|
10999 | PluralCase = 20,
|
11000 | ExtraData = 21
|
11001 | }
|
11002 |
|
11003 | /**
|
11004 | * @suppress {globalThis}
|
11005 | */
|
11006 | export declare function ɵmakeDecorator<T>(name: string, props?: (...args: any[]) => any, parentClass?: any, additionalProcessing?: (type: Type<T>) => void, typeFn?: (type: Type<T>, ...args: any[]) => void): {
|
11007 | new (...args: any[]): any;
|
11008 | (...args: any[]): any;
|
11009 | (...args: any[]): (cls: any) => any;
|
11010 | };
|
11011 |
|
11012 | /**
|
11013 | * Marks the component as dirty (needing change detection). Marking a component dirty will
|
11014 | * schedule a change detection on it at some point in the future.
|
11015 | *
|
11016 | * Marking an already dirty component as dirty won't do anything. Only one outstanding change
|
11017 | * detection can be scheduled per component tree.
|
11018 | *
|
11019 | * @param component Component to mark as dirty.
|
11020 | */
|
11021 | export declare function ɵmarkDirty(component: {}): void;
|
11022 |
|
11023 | export declare type ɵMethodFn = (obj: any, args: any[]) => any;
|
11024 |
|
11025 | export declare function ɵmod(providers: NgModuleProviderDef[]): NgModuleDefinition;
|
11026 |
|
11027 | export declare function ɵmpd(flags: ɵNodeFlags, token: any, value: any, deps: ([ɵDepFlags, any] | any)[]): NgModuleProviderDef;
|
11028 |
|
11029 | export declare function ɵncd(ngContentIndex: null | number, index: number): NodeDef;
|
11030 |
|
11031 |
|
11032 | export declare const ɵNG_COMP_DEF: string;
|
11033 |
|
11034 | export declare const ɵNG_DIR_DEF: string;
|
11035 |
|
11036 | /**
|
11037 | * If a directive is diPublic, bloomAdd sets a property on the type with this constant as
|
11038 | * the key and the directive's unique ID as the value. This allows us to map directives to their
|
11039 | * bloom filter bit for DI.
|
11040 | */
|
11041 | export declare const ɵNG_ELEMENT_ID: string;
|
11042 |
|
11043 | export declare const ɵNG_INJ_DEF: string;
|
11044 |
|
11045 | export declare const ɵNG_MOD_DEF: string;
|
11046 |
|
11047 | export declare const ɵNG_PIPE_DEF: string;
|
11048 |
|
11049 | export declare const ɵNG_PROV_DEF: string;
|
11050 |
|
11051 | /**
|
11052 | * Runtime link information for NgModules.
|
11053 | *
|
11054 | * This is the internal data structure used by the runtime to assemble components, directives,
|
11055 | * pipes, and injectors.
|
11056 | *
|
11057 | * NOTE: Always use `ɵɵdefineNgModule` function to create this object,
|
11058 | * never create the object directly since the shape of this object
|
11059 | * can change between versions.
|
11060 | */
|
11061 | export declare interface ɵNgModuleDef<T> {
|
11062 | /** Token representing the module. Used by DI. */
|
11063 | type: T;
|
11064 | /** List of components to bootstrap. */
|
11065 | bootstrap: Type<any>[] | (() => Type<any>[]);
|
11066 | /** List of components, directives, and pipes declared by this module. */
|
11067 | declarations: Type<any>[] | (() => Type<any>[]);
|
11068 | /** List of modules or `ModuleWithProviders` imported by this module. */
|
11069 | imports: Type<any>[] | (() => Type<any>[]);
|
11070 | /**
|
11071 | * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this
|
11072 | * module.
|
11073 | */
|
11074 | exports: Type<any>[] | (() => Type<any>[]);
|
11075 | /**
|
11076 | * Cached value of computed `transitiveCompileScopes` for this module.
|
11077 | *
|
11078 | * This should never be read directly, but accessed via `transitiveScopesFor`.
|
11079 | */
|
11080 | transitiveCompileScopes: ɵNgModuleTransitiveScopes | null;
|
11081 | /** The set of schemas that declare elements to be allowed in the NgModule. */
|
11082 | schemas: SchemaMetadata[] | null;
|
11083 | /** Unique ID for the module with which it should be registered. */
|
11084 | id: string | null;
|
11085 | }
|
11086 |
|
11087 | export declare class ɵNgModuleFactory<T> extends NgModuleFactory<T> {
|
11088 | moduleType: Type<T>;
|
11089 | constructor(moduleType: Type<T>);
|
11090 | create(parentInjector: Injector | null): NgModuleRef<T>;
|
11091 | }
|
11092 |
|
11093 | /**
|
11094 | * Represents the expansion of an `NgModule` into its scopes.
|
11095 | *
|
11096 | * A scope is a set of directives and pipes that are visible in a particular context. Each
|
11097 | * `NgModule` has two scopes. The `compilation` scope is the set of directives and pipes that will
|
11098 | * be recognized in the templates of components declared by the module. The `exported` scope is the
|
11099 | * set of directives and pipes exported by a module (that is, module B's exported scope gets added
|
11100 | * to module A's compilation scope when module A imports B).
|
11101 | */
|
11102 | export declare interface ɵNgModuleTransitiveScopes {
|
11103 | compilation: {
|
11104 | directives: Set<any>;
|
11105 | pipes: Set<any>;
|
11106 | };
|
11107 | exported: {
|
11108 | directives: Set<any>;
|
11109 | pipes: Set<any>;
|
11110 | };
|
11111 | schemas: SchemaMetadata[] | null;
|
11112 | }
|
11113 |
|
11114 | export declare interface ɵNgModuleType<T = any> extends Type<T> {
|
11115 | ɵmod: ɵNgModuleDef<T>;
|
11116 | }
|
11117 |
|
11118 |
|
11119 | export declare interface ɵNO_CHANGE {
|
11120 | __brand__: 'NO_CHANGE';
|
11121 | }
|
11122 |
|
11123 | /** A special value which designates that a value has not changed. */
|
11124 | export declare const ɵNO_CHANGE: ɵNO_CHANGE;
|
11125 |
|
11126 | /**
|
11127 | * Bitmask for NodeDef.flags.
|
11128 | * Naming convention:
|
11129 | * - `Type...`: flags that are mutually exclusive
|
11130 | * - `Cat...`: union of multiple `Type...` (short for category).
|
11131 | */
|
11132 | export declare const enum ɵNodeFlags {
|
11133 | None = 0,
|
11134 | TypeElement = 1,
|
11135 | TypeText = 2,
|
11136 | ProjectedTemplate = 4,
|
11137 | CatRenderNode = 3,
|
11138 | TypeNgContent = 8,
|
11139 | TypePipe = 16,
|
11140 | TypePureArray = 32,
|
11141 | TypePureObject = 64,
|
11142 | TypePurePipe = 128,
|
11143 | CatPureExpression = 224,
|
11144 | TypeValueProvider = 256,
|
11145 | TypeClassProvider = 512,
|
11146 | TypeFactoryProvider = 1024,
|
11147 | TypeUseExistingProvider = 2048,
|
11148 | LazyProvider = 4096,
|
11149 | PrivateProvider = 8192,
|
11150 | TypeDirective = 16384,
|
11151 | Component = 32768,
|
11152 | CatProviderNoDirective = 3840,
|
11153 | CatProvider = 20224,
|
11154 | OnInit = 65536,
|
11155 | OnDestroy = 131072,
|
11156 | DoCheck = 262144,
|
11157 | OnChanges = 524288,
|
11158 | AfterContentInit = 1048576,
|
11159 | AfterContentChecked = 2097152,
|
11160 | AfterViewInit = 4194304,
|
11161 | AfterViewChecked = 8388608,
|
11162 | EmbeddedViews = 16777216,
|
11163 | ComponentView = 33554432,
|
11164 | TypeContentQuery = 67108864,
|
11165 | TypeViewQuery = 134217728,
|
11166 | StaticQuery = 268435456,
|
11167 | DynamicQuery = 536870912,
|
11168 | TypeNgModule = 1073741824,
|
11169 | EmitDistinctChangesOnly = -2147483648,
|
11170 | CatQuery = 201326592,
|
11171 | Types = 201347067
|
11172 | }
|
11173 |
|
11174 | /**
|
11175 | * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls
|
11176 | * to framework to perform rendering.
|
11177 | */
|
11178 | export declare class ɵNoopNgZone implements NgZone {
|
11179 | readonly hasPendingMicrotasks: boolean;
|
11180 | readonly hasPendingMacrotasks: boolean;
|
11181 | readonly isStable: boolean;
|
11182 | readonly onUnstable: EventEmitter<any>;
|
11183 | readonly onMicrotaskEmpty: EventEmitter<any>;
|
11184 | readonly onStable: EventEmitter<any>;
|
11185 | readonly onError: EventEmitter<any>;
|
11186 | run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any): T;
|
11187 | runGuarded<T>(fn: (...args: any[]) => any, applyThis?: any, applyArgs?: any): T;
|
11188 | runOutsideAngular<T>(fn: (...args: any[]) => T): T;
|
11189 | runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any, name?: string): T;
|
11190 | }
|
11191 |
|
11192 |
|
11193 | /**
|
11194 | * Convince closure compiler that the wrapped function has no side-effects.
|
11195 | *
|
11196 | * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to
|
11197 | * allow us to execute a function but have closure compiler mark the call as no-side-effects.
|
11198 | * It is important that the return value for the `noSideEffects` function be assigned
|
11199 | * to something which is retained otherwise the call to `noSideEffects` will be removed by closure
|
11200 | * compiler.
|
11201 | */
|
11202 | export declare function ɵnoSideEffects<T>(fn: () => T): T;
|
11203 |
|
11204 | export declare const ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR: {};
|
11205 |
|
11206 | export declare function ɵnov(view: ViewData, index: number): any;
|
11207 |
|
11208 | export declare function ɵoverrideComponentView(comp: Type<any>, componentFactory: ComponentFactory<any>): void;
|
11209 |
|
11210 | export declare function ɵoverrideProvider(override: ProviderOverride): void;
|
11211 |
|
11212 | export declare function ɵpad(checkIndex: number, argCount: number): NodeDef;
|
11213 |
|
11214 | /**
|
11215 | * Patch the definition of a component with directives and pipes from the compilation scope of
|
11216 | * a given module.
|
11217 | */
|
11218 | export declare function ɵpatchComponentDefWithScope<C>(componentDef: ɵComponentDef<C>, transitiveScopes: ɵNgModuleTransitiveScopes): void;
|
11219 |
|
11220 | export declare function ɵpid(flags: ɵNodeFlags, ctor: any, deps: ([ɵDepFlags, any] | any)[]): NodeDef;
|
11221 |
|
11222 | /**
|
11223 | * Runtime link information for Pipes.
|
11224 | *
|
11225 | * This is an internal data structure used by the renderer to link
|
11226 | * pipes into templates.
|
11227 | *
|
11228 | * NOTE: Always use `definePipe` function to create this object,
|
11229 | * never create the object directly since the shape of this object
|
11230 | * can change between versions.
|
11231 | *
|
11232 | * See: {@link definePipe}
|
11233 | */
|
11234 | export declare interface ɵPipeDef<T> {
|
11235 | /** Token representing the pipe. */
|
11236 | type: Type<T>;
|
11237 | /**
|
11238 | * Pipe name.
|
11239 | *
|
11240 | * Used to resolve pipe in templates.
|
11241 | */
|
11242 | readonly name: string;
|
11243 | /**
|
11244 | * Factory function used to create a new pipe instance. Will be null initially.
|
11245 | * Populated when the factory is first requested by pipe instantiation logic.
|
11246 | */
|
11247 | factory: FactoryFn<T> | null;
|
11248 | /**
|
11249 | * Whether or not the pipe is pure.
|
11250 | *
|
11251 | * Pure pipes result only depends on the pipe input and not on internal
|
11252 | * state of the pipe.
|
11253 | */
|
11254 | readonly pure: boolean;
|
11255 | onDestroy: (() => void) | null;
|
11256 | }
|
11257 |
|
11258 |
|
11259 | /**
|
11260 | * A shared interface which contains an animation player
|
11261 | */
|
11262 | export declare interface ɵPlayer {
|
11263 | parent?: ɵPlayer | null;
|
11264 | state: ɵPlayState;
|
11265 | play(): void;
|
11266 | pause(): void;
|
11267 | finish(): void;
|
11268 | destroy(): void;
|
11269 | addEventListener(state: ɵPlayState | string, cb: (data?: any) => any): void;
|
11270 | }
|
11271 |
|
11272 | /**
|
11273 | * Used as a reference to build a player from a styling template binding
|
11274 | * (`[style]` and `[class]`).
|
11275 | *
|
11276 | * The `fn` function will be called once any styling-related changes are
|
11277 | * evaluated on an element and is expected to return a player that will
|
11278 | * be then run on the element.
|
11279 | *
|
11280 | * `[style]`, `[style.prop]`, `[class]` and `[class.name]` template bindings
|
11281 | * all accept a `PlayerFactory` as input and this player factories.
|
11282 | */
|
11283 | export declare interface ɵPlayerFactory {
|
11284 | '__brand__': 'Brand for PlayerFactory that nothing will match';
|
11285 | }
|
11286 |
|
11287 | /**
|
11288 | * Designed to be used as an injection service to capture all animation players.
|
11289 | *
|
11290 | * When present all animation players will be passed into the flush method below.
|
11291 | * This feature is designed to service application-wide animation testing, live
|
11292 | * debugging as well as custom animation choreographing tools.
|
11293 | */
|
11294 | export declare interface ɵPlayerHandler {
|
11295 | /**
|
11296 | * Designed to kick off the player at the end of change detection
|
11297 | */
|
11298 | flushPlayers(): void;
|
11299 | /**
|
11300 | * @param player The player that has been scheduled to run within the application.
|
11301 | * @param context The context as to where the player was bound to
|
11302 | */
|
11303 | queuePlayer(player: ɵPlayer, context: ComponentInstance | DirectiveInstance | HTMLElement): void;
|
11304 | }
|
11305 |
|
11306 | /**
|
11307 | * The state of a given player
|
11308 | *
|
11309 | * Do not change the increasing nature of the numbers since the player
|
11310 | * code may compare state by checking if a number is higher or lower than
|
11311 | * a certain numeric value.
|
11312 | */
|
11313 | export declare const enum ɵPlayState {
|
11314 | Pending = 0,
|
11315 | Running = 1,
|
11316 | Paused = 2,
|
11317 | Finished = 100,
|
11318 | Destroyed = 200
|
11319 | }
|
11320 |
|
11321 | export declare function ɵpod(checkIndex: number, propToIndex: {
|
11322 | [p: string]: number;
|
11323 | }): NodeDef;
|
11324 |
|
11325 | export declare function ɵppd(checkIndex: number, argCount: number): NodeDef;
|
11326 |
|
11327 | export declare function ɵprd(flags: ɵNodeFlags, matchedQueries: null | [string | number, ɵQueryValueType][], token: any, value: any, deps: ([ɵDepFlags, any] | any)[]): NodeDef;
|
11328 |
|
11329 | /**
|
11330 | * Profiler function which the runtime will invoke before and after user code.
|
11331 | */
|
11332 | export declare interface ɵProfiler {
|
11333 | (event: ɵProfilerEvent, instance: {} | null, hookOrListener?: (e?: any) => any): void;
|
11334 | }
|
11335 |
|
11336 |
|
11337 | /**
|
11338 | * Profiler events is an enum used by the profiler to distinguish between different calls of user
|
11339 | * code invoked throughout the application lifecycle.
|
11340 | */
|
11341 | export declare const enum ɵProfilerEvent {
|
11342 | /**
|
11343 | * Corresponds to the point in time before the runtime has called the template function of a
|
11344 | * component with `RenderFlags.Create`.
|
11345 | */
|
11346 | TemplateCreateStart = 0,
|
11347 | /**
|
11348 | * Corresponds to the point in time after the runtime has called the template function of a
|
11349 | * component with `RenderFlags.Create`.
|
11350 | */
|
11351 | TemplateCreateEnd = 1,
|
11352 | /**
|
11353 | * Corresponds to the point in time before the runtime has called the template function of a
|
11354 | * component with `RenderFlags.Update`.
|
11355 | */
|
11356 | TemplateUpdateStart = 2,
|
11357 | /**
|
11358 | * Corresponds to the point in time after the runtime has called the template function of a
|
11359 | * component with `RenderFlags.Update`.
|
11360 | */
|
11361 | TemplateUpdateEnd = 3,
|
11362 | /**
|
11363 | * Corresponds to the point in time before the runtime has called a lifecycle hook of a component
|
11364 | * or directive.
|
11365 | */
|
11366 | LifecycleHookStart = 4,
|
11367 | /**
|
11368 | * Corresponds to the point in time after the runtime has called a lifecycle hook of a component
|
11369 | * or directive.
|
11370 | */
|
11371 | LifecycleHookEnd = 5,
|
11372 | /**
|
11373 | * Corresponds to the point in time before the runtime has evaluated an expression associated with
|
11374 | * an event or an output.
|
11375 | */
|
11376 | OutputStart = 6,
|
11377 | /**
|
11378 | * Corresponds to the point in time after the runtime has evaluated an expression associated with
|
11379 | * an event or an output.
|
11380 | */
|
11381 | OutputEnd = 7
|
11382 | }
|
11383 |
|
11384 | /**
|
11385 | * Publishes a collection of default debug tools onto`window.ng`.
|
11386 | *
|
11387 | * These functions are available globally when Angular is in development
|
11388 | * mode and are automatically stripped away from prod mode is on.
|
11389 | */
|
11390 | export declare function ɵpublishDefaultGlobalUtils(): void;
|
11391 |
|
11392 | /**
|
11393 | * Publishes the given function to `window.ng` so that it can be
|
11394 | * used from the browser console when an application is not in production.
|
11395 | */
|
11396 | export declare function ɵpublishGlobalUtil(name: string, fn: Function): void;
|
11397 |
|
11398 | export declare function ɵqud(flags: ɵNodeFlags, id: number, bindings: {
|
11399 | [propName: string]: ɵQueryBindingType;
|
11400 | }): NodeDef;
|
11401 |
|
11402 | export declare const enum ɵQueryBindingType {
|
11403 | First = 0,
|
11404 | All = 1
|
11405 | }
|
11406 |
|
11407 | export declare const enum ɵQueryValueType {
|
11408 | ElementRef = 0,
|
11409 | RenderElement = 1,
|
11410 | TemplateRef = 2,
|
11411 | ViewContainerRef = 3,
|
11412 | Provider = 4
|
11413 | }
|
11414 |
|
11415 | export declare class ɵReflectionCapabilities implements PlatformReflectionCapabilities {
|
11416 | private _reflect;
|
11417 | constructor(reflect?: any);
|
11418 | isReflectionEnabled(): boolean;
|
11419 | factory<T>(t: Type<T>): (args: any[]) => T;
|
11420 | private _ownParameters;
|
11421 | parameters(type: Type<any>): any[][];
|
11422 | private _ownAnnotations;
|
11423 | annotations(typeOrFunc: Type<any>): any[];
|
11424 | private _ownPropMetadata;
|
11425 | propMetadata(typeOrFunc: any): {
|
11426 | [key: string]: any[];
|
11427 | };
|
11428 | ownPropMetadata(typeOrFunc: any): {
|
11429 | [key: string]: any[];
|
11430 | };
|
11431 | hasLifecycleHook(type: any, lcProperty: string): boolean;
|
11432 | guards(type: any): {
|
11433 | [key: string]: any;
|
11434 | };
|
11435 | getter(name: string): ɵGetterFn;
|
11436 | setter(name: string): ɵSetterFn;
|
11437 | method(name: string): ɵMethodFn;
|
11438 | importUri(type: any): string;
|
11439 | resourceUri(type: any): string;
|
11440 | resolveIdentifier(name: string, moduleUrl: string, members: string[], runtime: any): any;
|
11441 | resolveEnum(enumIdentifier: any, name: string): any;
|
11442 | }
|
11443 |
|
11444 | /**
|
11445 | * Register locale data to be used internally by Angular. See the
|
11446 | * ["I18n guide"](guide/i18n#i18n-pipes) to know how to import additional locale data.
|
11447 | *
|
11448 | * The signature `registerLocaleData(data: any, extraData?: any)` is deprecated since v5.1
|
11449 | */
|
11450 | export declare function ɵregisterLocaleData(data: any, localeId?: string | any, extraData?: any): void;
|
11451 |
|
11452 | /**
|
11453 | * Registers a loaded module. Should only be called from generated NgModuleFactory code.
|
11454 | * @publicApi
|
11455 | */
|
11456 | export declare function ɵregisterModuleFactory(id: string, factory: NgModuleFactory<any>): void;
|
11457 |
|
11458 | export declare function ɵregisterNgModuleType(ngModuleType: ɵNgModuleType): void;
|
11459 |
|
11460 | /**
|
11461 | * Render3 implementation of {@link viewEngine_ComponentFactory}.
|
11462 | */
|
11463 | export declare class ɵRender3ComponentFactory<T> extends ComponentFactory<T> {
|
11464 | private componentDef;
|
11465 | private ngModule?;
|
11466 | selector: string;
|
11467 | componentType: Type<any>;
|
11468 | ngContentSelectors: string[];
|
11469 | isBoundToModule: boolean;
|
11470 | get inputs(): {
|
11471 | propName: string;
|
11472 | templateName: string;
|
11473 | }[];
|
11474 | get outputs(): {
|
11475 | propName: string;
|
11476 | templateName: string;
|
11477 | }[];
|
11478 | /**
|
11479 | * @param componentDef The component definition.
|
11480 | * @param ngModule The NgModuleRef to which the factory is bound.
|
11481 | */
|
11482 | constructor(componentDef: ɵComponentDef<any>, ngModule?: NgModuleRef<any> | undefined);
|
11483 | create(injector: Injector, projectableNodes?: any[][] | undefined, rootSelectorOrNode?: any, ngModule?: NgModuleRef<any> | undefined): ComponentRef<T>;
|
11484 | }
|
11485 |
|
11486 | /**
|
11487 | * Represents an instance of a Component created via a {@link ComponentFactory}.
|
11488 | *
|
11489 | * `ComponentRef` provides access to the Component Instance as well other objects related to this
|
11490 | * Component Instance and allows you to destroy the Component Instance via the {@link #destroy}
|
11491 | * method.
|
11492 | *
|
11493 | */
|
11494 | export declare class ɵRender3ComponentRef<T> extends ComponentRef<T> {
|
11495 | location: ElementRef;
|
11496 | private _rootLView;
|
11497 | private _tNode;
|
11498 | instance: T;
|
11499 | hostView: ViewRef_2<T>;
|
11500 | changeDetectorRef: ChangeDetectorRef;
|
11501 | componentType: Type<T>;
|
11502 | constructor(componentType: Type<T>, instance: T, location: ElementRef, _rootLView: ɵangular_packages_core_core_ca, _tNode: ɵangular_packages_core_core_bk | TContainerNode | TElementContainerNode);
|
11503 | get injector(): Injector;
|
11504 | destroy(): void;
|
11505 | onDestroy(callback: () => void): void;
|
11506 | }
|
11507 |
|
11508 | export declare class ɵRender3NgModuleRef<T> extends NgModuleRef<T> implements InternalNgModuleRef<T> {
|
11509 | _parent: Injector | null;
|
11510 | _bootstrapComponents: Type<any>[];
|
11511 | _r3Injector: R3Injector;
|
11512 | injector: Injector;
|
11513 | instance: T;
|
11514 | destroyCbs: (() => void)[] | null;
|
11515 | readonly componentFactoryResolver: ComponentFactoryResolver_2;
|
11516 | constructor(ngModuleType: Type<T>, _parent: Injector | null);
|
11517 | get(token: any, notFoundValue?: any, injectFlags?: InjectFlags): any;
|
11518 | destroy(): void;
|
11519 | onDestroy(callback: () => void): void;
|
11520 | }
|
11521 |
|
11522 | /**
|
11523 | * Bootstraps a Component into an existing host element and returns an instance
|
11524 | * of the component.
|
11525 | *
|
11526 | * Use this function to bootstrap a component into the DOM tree. Each invocation
|
11527 | * of this function will create a separate tree of components, injectors and
|
11528 | * change detection cycles and lifetimes. To dynamically insert a new component
|
11529 | * into an existing tree such that it shares the same injection, change detection
|
11530 | * and object lifetime, use {@link ViewContainer#createComponent}.
|
11531 | *
|
11532 | * @param componentType Component to bootstrap
|
11533 | * @param options Optional parameters which control bootstrapping
|
11534 | */
|
11535 | export declare function ɵrenderComponent<T>(componentType: ɵComponentType<T> | Type<T>, opts?: CreateComponentOptions): T;
|
11536 |
|
11537 | /**
|
11538 | * Flags passed into template functions to determine which blocks (i.e. creation, update)
|
11539 | * should be executed.
|
11540 | *
|
11541 | * Typically, a template runs both the creation block and the update block on initialization and
|
11542 | * subsequent runs only execute the update block. However, dynamically created views require that
|
11543 | * the creation block be executed separately from the update block (for backwards compat).
|
11544 | */
|
11545 | export declare const enum ɵRenderFlags {
|
11546 | Create = 1,
|
11547 | Update = 2
|
11548 | }
|
11549 |
|
11550 | export declare function ɵresetCompiledComponents(): void;
|
11551 |
|
11552 | export declare function ɵresetJitOptions(): void;
|
11553 |
|
11554 | /**
|
11555 | * Used to resolve resource URLs on `@Component` when used with JIT compilation.
|
11556 | *
|
11557 | * Example:
|
11558 | * ```
|
11559 | * @Component({
|
11560 | * selector: 'my-comp',
|
11561 | * templateUrl: 'my-comp.html', // This requires asynchronous resolution
|
11562 | * })
|
11563 | * class MyComponent{
|
11564 | * }
|
11565 | *
|
11566 | * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process
|
11567 | * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously.
|
11568 | *
|
11569 | * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into
|
11570 | * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner.
|
11571 | *
|
11572 | * // Use browser's `fetch()` function as the default resource resolution strategy.
|
11573 | * resolveComponentResources(fetch).then(() => {
|
11574 | * // After resolution all URLs have been converted into `template` strings.
|
11575 | * renderComponent(MyComponent);
|
11576 | * });
|
11577 | *
|
11578 | * ```
|
11579 | *
|
11580 | * NOTE: In AOT the resolution happens during compilation, and so there should be no need
|
11581 | * to call this method outside JIT mode.
|
11582 | *
|
11583 | * @param resourceResolver a function which is responsible for returning a `Promise` to the
|
11584 | * contents of the resolved URL. Browser's `fetch()` method is a good default implementation.
|
11585 | */
|
11586 | export declare function ɵresolveComponentResources(resourceResolver: (url: string) => (Promise<string | {
|
11587 | text(): Promise<string>;
|
11588 | }>)): Promise<void>;
|
11589 |
|
11590 | export declare class ɵRuntimeError extends Error {
|
11591 | code: ɵRuntimeErrorCode;
|
11592 | constructor(code: ɵRuntimeErrorCode, message: string);
|
11593 | }
|
11594 |
|
11595 |
|
11596 | export declare const enum ɵRuntimeErrorCode {
|
11597 | EXPRESSION_CHANGED_AFTER_CHECKED = "100",
|
11598 | CYCLIC_DI_DEPENDENCY = "200",
|
11599 | PROVIDER_NOT_FOUND = "201",
|
11600 | MULTIPLE_COMPONENTS_MATCH = "300",
|
11601 | EXPORT_NOT_FOUND = "301",
|
11602 | PIPE_NOT_FOUND = "302",
|
11603 | UNKNOWN_BINDING = "303",
|
11604 | UNKNOWN_ELEMENT = "304",
|
11605 | TEMPLATE_STRUCTURE_ERROR = "305"
|
11606 | }
|
11607 |
|
11608 | /**
|
11609 | * Marker interface for a value that's safe to use as HTML.
|
11610 | *
|
11611 | * @publicApi
|
11612 | */
|
11613 | export declare interface ɵSafeHtml extends ɵSafeValue {
|
11614 | }
|
11615 |
|
11616 | /**
|
11617 | * Marker interface for a value that's safe to use as a URL to load executable code from.
|
11618 | *
|
11619 | * @publicApi
|
11620 | */
|
11621 | export declare interface ɵSafeResourceUrl extends ɵSafeValue {
|
11622 | }
|
11623 |
|
11624 | /**
|
11625 | * Marker interface for a value that's safe to use as JavaScript.
|
11626 | *
|
11627 | * @publicApi
|
11628 | */
|
11629 | export declare interface ɵSafeScript extends ɵSafeValue {
|
11630 | }
|
11631 |
|
11632 | /**
|
11633 | * Marker interface for a value that's safe to use as style (CSS).
|
11634 | *
|
11635 | * @publicApi
|
11636 | */
|
11637 | export declare interface ɵSafeStyle extends ɵSafeValue {
|
11638 | }
|
11639 |
|
11640 | /**
|
11641 | * Marker interface for a value that's safe to use as a URL linking to a document.
|
11642 | *
|
11643 | * @publicApi
|
11644 | */
|
11645 | export declare interface ɵSafeUrl extends ɵSafeValue {
|
11646 | }
|
11647 |
|
11648 | /**
|
11649 | * Marker interface for a value that's safe to use in a particular context.
|
11650 | *
|
11651 | * @publicApi
|
11652 | */
|
11653 | export declare interface ɵSafeValue {
|
11654 | }
|
11655 |
|
11656 | /**
|
11657 | * Adds decorator, constructor, and property metadata to a given type via static metadata fields
|
11658 | * on the type.
|
11659 | *
|
11660 | * These metadata fields can later be read with Angular's `ReflectionCapabilities` API.
|
11661 | *
|
11662 | * Calls to `setClassMetadata` can be guarded by ngDevMode, resulting in the metadata assignments
|
11663 | * being tree-shaken away during production builds.
|
11664 | */
|
11665 | export declare function ɵsetClassMetadata(type: Type<any>, decorators: any[] | null, ctorParameters: (() => any[]) | null, propDecorators: {
|
11666 | [field: string]: any;
|
11667 | } | null): void;
|
11668 |
|
11669 | export declare function ɵsetCurrentInjector(injector: Injector | null | undefined): Injector | undefined | null;
|
11670 |
|
11671 |
|
11672 | /**
|
11673 | * Tell ivy what the `document` is for this platform.
|
11674 | *
|
11675 | * It is only necessary to call this if the current platform is not a browser.
|
11676 | *
|
11677 | * @param document The object representing the global `document` in this environment.
|
11678 | */
|
11679 | export declare function ɵsetDocument(document: Document | undefined): void;
|
11680 |
|
11681 |
|
11682 | /**
|
11683 | * Sets the locale id that will be used for translations and ICU expressions.
|
11684 | * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine
|
11685 | * but is now defined as a global value.
|
11686 | *
|
11687 | * @param localeId
|
11688 | */
|
11689 | export declare function ɵsetLocaleId(localeId: string): void;
|
11690 |
|
11691 |
|
11692 | export declare type ɵSetterFn = (obj: any, value: any) => void;
|
11693 |
|
11694 | /** Store a value in the `data` at a given `index`. */
|
11695 | export declare function ɵstore<T>(tView: TView, lView: ɵangular_packages_core_core_ca, index: number, value: T): void;
|
11696 |
|
11697 |
|
11698 | export declare function ɵstringify(token: any): string;
|
11699 |
|
11700 | export declare const ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__: typeof ɵangular_packages_core_core_r;
|
11701 |
|
11702 | export declare const ɵSWITCH_COMPILE_COMPONENT__POST_R3__: typeof ɵcompileComponent;
|
11703 |
|
11704 | export declare const ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__: typeof ɵcompileDirective;
|
11705 |
|
11706 | export declare const ɵSWITCH_COMPILE_INJECTABLE__POST_R3__: typeof compileInjectable;
|
11707 |
|
11708 | export declare const ɵSWITCH_COMPILE_NGMODULE__POST_R3__: typeof ɵcompileNgModule;
|
11709 |
|
11710 | export declare const ɵSWITCH_COMPILE_PIPE__POST_R3__: typeof ɵcompilePipe;
|
11711 |
|
11712 | export declare const ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__: typeof ɵangular_packages_core_core_i;
|
11713 |
|
11714 |
|
11715 | export declare const ɵSWITCH_IVY_ENABLED__POST_R3__ = true;
|
11716 |
|
11717 | export declare const ɵSWITCH_RENDERER2_FACTORY__POST_R3__: typeof ɵangular_packages_core_core_h;
|
11718 |
|
11719 | export declare const ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__: typeof ɵangular_packages_core_core_l;
|
11720 |
|
11721 | export declare const ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__: typeof ɵangular_packages_core_core_n;
|
11722 |
|
11723 | export declare function ɵted(checkIndex: number, ngContentIndex: number | null, staticText: string[]): NodeDef;
|
11724 |
|
11725 | /**
|
11726 | * Compute the pair of transitive scopes (compilation scope and exported scope) for a given module.
|
11727 | *
|
11728 | * This operation is memoized and the result is cached on the module's definition. This function can
|
11729 | * be called on modules with components that have not fully compiled yet, but the result should not
|
11730 | * be used until they have.
|
11731 | *
|
11732 | * @param moduleType module that transitive scope should be calculated for.
|
11733 | */
|
11734 | export declare function ɵtransitiveScopesFor<T>(moduleType: Type<T>): ɵNgModuleTransitiveScopes;
|
11735 |
|
11736 | /**
|
11737 | * Helper function to remove all the locale data from `LOCALE_DATA`.
|
11738 | */
|
11739 | export declare function ɵunregisterLocaleData(): void;
|
11740 |
|
11741 | export declare function ɵunv(view: ViewData, nodeIdx: number, bindingIdx: number, value: any): any;
|
11742 |
|
11743 | export declare function ɵunwrapSafeValue(value: ɵSafeValue): string;
|
11744 |
|
11745 | export declare function ɵunwrapSafeValue<T>(value: T): T;
|
11746 |
|
11747 | export declare function ɵvid(flags: ɵViewFlags, nodes: NodeDef[], updateDirectives?: null | ViewUpdateFn, updateRenderer?: null | ViewUpdateFn): ɵViewDefinition;
|
11748 |
|
11749 | export declare interface ɵViewDefinition extends Definition<ViewDefinitionFactory> {
|
11750 | flags: ɵViewFlags;
|
11751 | updateDirectives: ViewUpdateFn;
|
11752 | updateRenderer: ViewUpdateFn;
|
11753 | handleEvent: ViewHandleEventFn;
|
11754 | /**
|
11755 | * Order: Depth first.
|
11756 | * Especially providers are before elements / anchors.
|
11757 | */
|
11758 | nodes: NodeDef[];
|
11759 | /** aggregated NodeFlags for all nodes **/
|
11760 | nodeFlags: ɵNodeFlags;
|
11761 | rootNodeFlags: ɵNodeFlags;
|
11762 | lastRenderRootNode: NodeDef | null;
|
11763 | bindingCount: number;
|
11764 | outputCount: number;
|
11765 | /**
|
11766 | * Binary or of all query ids that are matched by one of the nodes.
|
11767 | * This includes query ids from templates as well.
|
11768 | * Used as a bloom filter.
|
11769 | */
|
11770 | nodeMatchedQueries: number;
|
11771 | }
|
11772 |
|
11773 | /**
|
11774 | * Bitmask for ViewDefinition.flags.
|
11775 | */
|
11776 | export declare const enum ɵViewFlags {
|
11777 | None = 0,
|
11778 | OnPush = 2
|
11779 | }
|
11780 |
|
11781 | /**
|
11782 | * Wait on component until it is rendered.
|
11783 | *
|
11784 | * This function returns a `Promise` which is resolved when the component's
|
11785 | * change detection is executed. This is determined by finding the scheduler
|
11786 | * associated with the `component`'s render tree and waiting until the scheduler
|
11787 | * flushes. If nothing is scheduled, the function returns a resolved promise.
|
11788 | *
|
11789 | * Example:
|
11790 | * ```
|
11791 | * await whenRendered(myComponent);
|
11792 | * ```
|
11793 | *
|
11794 | * @param component Component to wait upon
|
11795 | * @returns Promise which resolves when the component is rendered.
|
11796 | */
|
11797 | export declare function ɵwhenRendered(component: any): Promise<null>;
|
11798 |
|
11799 | /**
|
11800 | * Advances to an element for later binding instructions.
|
11801 | *
|
11802 | * Used in conjunction with instructions like {@link property} to act on elements with specified
|
11803 | * indices, for example those created with {@link element} or {@link elementStart}.
|
11804 | *
|
11805 | * ```ts
|
11806 | * (rf: RenderFlags, ctx: any) => {
|
11807 | * if (rf & 1) {
|
11808 | * text(0, 'Hello');
|
11809 | * text(1, 'Goodbye')
|
11810 | * element(2, 'div');
|
11811 | * }
|
11812 | * if (rf & 2) {
|
11813 | * advance(2); // Advance twice to the <div>.
|
11814 | * property('title', 'test');
|
11815 | * }
|
11816 | * }
|
11817 | * ```
|
11818 | * @param delta Number of elements to advance forwards by.
|
11819 | *
|
11820 | * @codeGenApi
|
11821 | */
|
11822 | export declare function ɵɵadvance(delta: number): void;
|
11823 |
|
11824 | /**
|
11825 | * Updates the value of or removes a bound attribute on an Element.
|
11826 | *
|
11827 | * Used in the case of `[attr.title]="value"`
|
11828 | *
|
11829 | * @param name name The name of the attribute.
|
11830 | * @param value value The attribute is removed when value is `null` or `undefined`.
|
11831 | * Otherwise the attribute value is set to the stringified value.
|
11832 | * @param sanitizer An optional function used to sanitize the value.
|
11833 | * @param namespace Optional namespace to use when setting the attribute.
|
11834 | *
|
11835 | * @codeGenApi
|
11836 | */
|
11837 | export declare function ɵɵattribute(name: string, value: any, sanitizer?: SanitizerFn | null, namespace?: string): typeof ɵɵattribute;
|
11838 |
|
11839 | /**
|
11840 | *
|
11841 | * Update an interpolated attribute on an element with single bound value surrounded by text.
|
11842 | *
|
11843 | * Used when the value passed to a property has 1 interpolated value in it:
|
11844 | *
|
11845 | * ```html
|
11846 | * <div attr.title="prefix{{v0}}suffix"></div>
|
11847 | * ```
|
11848 | *
|
11849 | * Its compiled representation is::
|
11850 | *
|
11851 | * ```ts
|
11852 | * ɵɵattributeInterpolate1('title', 'prefix', v0, 'suffix');
|
11853 | * ```
|
11854 | *
|
11855 | * @param attrName The name of the attribute to update
|
11856 | * @param prefix Static value used for concatenation only.
|
11857 | * @param v0 Value checked for change.
|
11858 | * @param suffix Static value used for concatenation only.
|
11859 | * @param sanitizer An optional sanitizer function
|
11860 | * @returns itself, so that it may be chained.
|
11861 | * @codeGenApi
|
11862 | */
|
11863 | export declare function ɵɵattributeInterpolate1(attrName: string, prefix: string, v0: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate1;
|
11864 |
|
11865 | /**
|
11866 | *
|
11867 | * Update an interpolated attribute on an element with 2 bound values surrounded by text.
|
11868 | *
|
11869 | * Used when the value passed to a property has 2 interpolated values in it:
|
11870 | *
|
11871 | * ```html
|
11872 | * <div attr.title="prefix{{v0}}-{{v1}}suffix"></div>
|
11873 | * ```
|
11874 | *
|
11875 | * Its compiled representation is::
|
11876 | *
|
11877 | * ```ts
|
11878 | * ɵɵattributeInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');
|
11879 | * ```
|
11880 | *
|
11881 | * @param attrName The name of the attribute to update
|
11882 | * @param prefix Static value used for concatenation only.
|
11883 | * @param v0 Value checked for change.
|
11884 | * @param i0 Static value used for concatenation only.
|
11885 | * @param v1 Value checked for change.
|
11886 | * @param suffix Static value used for concatenation only.
|
11887 | * @param sanitizer An optional sanitizer function
|
11888 | * @returns itself, so that it may be chained.
|
11889 | * @codeGenApi
|
11890 | */
|
11891 | export declare function ɵɵattributeInterpolate2(attrName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate2;
|
11892 |
|
11893 | /**
|
11894 | *
|
11895 | * Update an interpolated attribute on an element with 3 bound values surrounded by text.
|
11896 | *
|
11897 | * Used when the value passed to a property has 3 interpolated values in it:
|
11898 | *
|
11899 | * ```html
|
11900 | * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
|
11901 | * ```
|
11902 | *
|
11903 | * Its compiled representation is::
|
11904 | *
|
11905 | * ```ts
|
11906 | * ɵɵattributeInterpolate3(
|
11907 | * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');
|
11908 | * ```
|
11909 | *
|
11910 | * @param attrName The name of the attribute to update
|
11911 | * @param prefix Static value used for concatenation only.
|
11912 | * @param v0 Value checked for change.
|
11913 | * @param i0 Static value used for concatenation only.
|
11914 | * @param v1 Value checked for change.
|
11915 | * @param i1 Static value used for concatenation only.
|
11916 | * @param v2 Value checked for change.
|
11917 | * @param suffix Static value used for concatenation only.
|
11918 | * @param sanitizer An optional sanitizer function
|
11919 | * @returns itself, so that it may be chained.
|
11920 | * @codeGenApi
|
11921 | */
|
11922 | export declare function ɵɵattributeInterpolate3(attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate3;
|
11923 |
|
11924 | /**
|
11925 | *
|
11926 | * Update an interpolated attribute on an element with 4 bound values surrounded by text.
|
11927 | *
|
11928 | * Used when the value passed to a property has 4 interpolated values in it:
|
11929 | *
|
11930 | * ```html
|
11931 | * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
|
11932 | * ```
|
11933 | *
|
11934 | * Its compiled representation is::
|
11935 | *
|
11936 | * ```ts
|
11937 | * ɵɵattributeInterpolate4(
|
11938 | * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
|
11939 | * ```
|
11940 | *
|
11941 | * @param attrName The name of the attribute to update
|
11942 | * @param prefix Static value used for concatenation only.
|
11943 | * @param v0 Value checked for change.
|
11944 | * @param i0 Static value used for concatenation only.
|
11945 | * @param v1 Value checked for change.
|
11946 | * @param i1 Static value used for concatenation only.
|
11947 | * @param v2 Value checked for change.
|
11948 | * @param i2 Static value used for concatenation only.
|
11949 | * @param v3 Value checked for change.
|
11950 | * @param suffix Static value used for concatenation only.
|
11951 | * @param sanitizer An optional sanitizer function
|
11952 | * @returns itself, so that it may be chained.
|
11953 | * @codeGenApi
|
11954 | */
|
11955 | export declare function ɵɵattributeInterpolate4(attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate4;
|
11956 |
|
11957 | /**
|
11958 | *
|
11959 | * Update an interpolated attribute on an element with 5 bound values surrounded by text.
|
11960 | *
|
11961 | * Used when the value passed to a property has 5 interpolated values in it:
|
11962 | *
|
11963 | * ```html
|
11964 | * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
|
11965 | * ```
|
11966 | *
|
11967 | * Its compiled representation is::
|
11968 | *
|
11969 | * ```ts
|
11970 | * ɵɵattributeInterpolate5(
|
11971 | * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
|
11972 | * ```
|
11973 | *
|
11974 | * @param attrName The name of the attribute to update
|
11975 | * @param prefix Static value used for concatenation only.
|
11976 | * @param v0 Value checked for change.
|
11977 | * @param i0 Static value used for concatenation only.
|
11978 | * @param v1 Value checked for change.
|
11979 | * @param i1 Static value used for concatenation only.
|
11980 | * @param v2 Value checked for change.
|
11981 | * @param i2 Static value used for concatenation only.
|
11982 | * @param v3 Value checked for change.
|
11983 | * @param i3 Static value used for concatenation only.
|
11984 | * @param v4 Value checked for change.
|
11985 | * @param suffix Static value used for concatenation only.
|
11986 | * @param sanitizer An optional sanitizer function
|
11987 | * @returns itself, so that it may be chained.
|
11988 | * @codeGenApi
|
11989 | */
|
11990 | export declare function ɵɵattributeInterpolate5(attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate5;
|
11991 |
|
11992 | /**
|
11993 | *
|
11994 | * Update an interpolated attribute on an element with 6 bound values surrounded by text.
|
11995 | *
|
11996 | * Used when the value passed to a property has 6 interpolated values in it:
|
11997 | *
|
11998 | * ```html
|
11999 | * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
|
12000 | * ```
|
12001 | *
|
12002 | * Its compiled representation is::
|
12003 | *
|
12004 | * ```ts
|
12005 | * ɵɵattributeInterpolate6(
|
12006 | * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
|
12007 | * ```
|
12008 | *
|
12009 | * @param attrName The name of the attribute to update
|
12010 | * @param prefix Static value used for concatenation only.
|
12011 | * @param v0 Value checked for change.
|
12012 | * @param i0 Static value used for concatenation only.
|
12013 | * @param v1 Value checked for change.
|
12014 | * @param i1 Static value used for concatenation only.
|
12015 | * @param v2 Value checked for change.
|
12016 | * @param i2 Static value used for concatenation only.
|
12017 | * @param v3 Value checked for change.
|
12018 | * @param i3 Static value used for concatenation only.
|
12019 | * @param v4 Value checked for change.
|
12020 | * @param i4 Static value used for concatenation only.
|
12021 | * @param v5 Value checked for change.
|
12022 | * @param suffix Static value used for concatenation only.
|
12023 | * @param sanitizer An optional sanitizer function
|
12024 | * @returns itself, so that it may be chained.
|
12025 | * @codeGenApi
|
12026 | */
|
12027 | export declare function ɵɵattributeInterpolate6(attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate6;
|
12028 |
|
12029 | /**
|
12030 | *
|
12031 | * Update an interpolated attribute on an element with 7 bound values surrounded by text.
|
12032 | *
|
12033 | * Used when the value passed to a property has 7 interpolated values in it:
|
12034 | *
|
12035 | * ```html
|
12036 | * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
|
12037 | * ```
|
12038 | *
|
12039 | * Its compiled representation is::
|
12040 | *
|
12041 | * ```ts
|
12042 | * ɵɵattributeInterpolate7(
|
12043 | * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
|
12044 | * ```
|
12045 | *
|
12046 | * @param attrName The name of the attribute to update
|
12047 | * @param prefix Static value used for concatenation only.
|
12048 | * @param v0 Value checked for change.
|
12049 | * @param i0 Static value used for concatenation only.
|
12050 | * @param v1 Value checked for change.
|
12051 | * @param i1 Static value used for concatenation only.
|
12052 | * @param v2 Value checked for change.
|
12053 | * @param i2 Static value used for concatenation only.
|
12054 | * @param v3 Value checked for change.
|
12055 | * @param i3 Static value used for concatenation only.
|
12056 | * @param v4 Value checked for change.
|
12057 | * @param i4 Static value used for concatenation only.
|
12058 | * @param v5 Value checked for change.
|
12059 | * @param i5 Static value used for concatenation only.
|
12060 | * @param v6 Value checked for change.
|
12061 | * @param suffix Static value used for concatenation only.
|
12062 | * @param sanitizer An optional sanitizer function
|
12063 | * @returns itself, so that it may be chained.
|
12064 | * @codeGenApi
|
12065 | */
|
12066 | export declare function ɵɵattributeInterpolate7(attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate7;
|
12067 |
|
12068 | /**
|
12069 | *
|
12070 | * Update an interpolated attribute on an element with 8 bound values surrounded by text.
|
12071 | *
|
12072 | * Used when the value passed to a property has 8 interpolated values in it:
|
12073 | *
|
12074 | * ```html
|
12075 | * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
|
12076 | * ```
|
12077 | *
|
12078 | * Its compiled representation is::
|
12079 | *
|
12080 | * ```ts
|
12081 | * ɵɵattributeInterpolate8(
|
12082 | * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
|
12083 | * ```
|
12084 | *
|
12085 | * @param attrName The name of the attribute to update
|
12086 | * @param prefix Static value used for concatenation only.
|
12087 | * @param v0 Value checked for change.
|
12088 | * @param i0 Static value used for concatenation only.
|
12089 | * @param v1 Value checked for change.
|
12090 | * @param i1 Static value used for concatenation only.
|
12091 | * @param v2 Value checked for change.
|
12092 | * @param i2 Static value used for concatenation only.
|
12093 | * @param v3 Value checked for change.
|
12094 | * @param i3 Static value used for concatenation only.
|
12095 | * @param v4 Value checked for change.
|
12096 | * @param i4 Static value used for concatenation only.
|
12097 | * @param v5 Value checked for change.
|
12098 | * @param i5 Static value used for concatenation only.
|
12099 | * @param v6 Value checked for change.
|
12100 | * @param i6 Static value used for concatenation only.
|
12101 | * @param v7 Value checked for change.
|
12102 | * @param suffix Static value used for concatenation only.
|
12103 | * @param sanitizer An optional sanitizer function
|
12104 | * @returns itself, so that it may be chained.
|
12105 | * @codeGenApi
|
12106 | */
|
12107 | export declare function ɵɵattributeInterpolate8(attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate8;
|
12108 |
|
12109 | /**
|
12110 | * Update an interpolated attribute on an element with 9 or more bound values surrounded by text.
|
12111 | *
|
12112 | * Used when the number of interpolated values exceeds 8.
|
12113 | *
|
12114 | * ```html
|
12115 | * <div
|
12116 | * title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div>
|
12117 | * ```
|
12118 | *
|
12119 | * Its compiled representation is::
|
12120 | *
|
12121 | * ```ts
|
12122 | * ɵɵattributeInterpolateV(
|
12123 | * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
|
12124 | * 'suffix']);
|
12125 | * ```
|
12126 | *
|
12127 | * @param attrName The name of the attribute to update.
|
12128 | * @param values The collection of values and the strings in-between those values, beginning with
|
12129 | * a string prefix and ending with a string suffix.
|
12130 | * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
|
12131 | * @param sanitizer An optional sanitizer function
|
12132 | * @returns itself, so that it may be chained.
|
12133 | * @codeGenApi
|
12134 | */
|
12135 | export declare function ɵɵattributeInterpolateV(attrName: string, values: any[], sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolateV;
|
12136 |
|
12137 | /**
|
12138 | * Update class bindings using an object literal or class-string on an element.
|
12139 | *
|
12140 | * This instruction is meant to apply styling via the `[class]="exp"` template bindings.
|
12141 | * When classes are applied to the element they will then be updated with
|
12142 | * respect to any styles/classes set via `classProp`. If any
|
12143 | * classes are set to falsy then they will be removed from the element.
|
12144 | *
|
12145 | * Note that the styling instruction will not be applied until `stylingApply` is called.
|
12146 | * Note that this will the provided classMap value to the host element if this function is called
|
12147 | * within a host binding.
|
12148 | *
|
12149 | * @param classes A key/value map or string of CSS classes that will be added to the
|
12150 | * given element. Any missing classes (that have already been applied to the element
|
12151 | * beforehand) will be removed (unset) from the element's list of CSS classes.
|
12152 | *
|
12153 | * @codeGenApi
|
12154 | */
|
12155 | export declare function ɵɵclassMap(classes: {
|
12156 | [className: string]: boolean | undefined | null;
|
12157 | } | string | undefined | null): void;
|
12158 |
|
12159 |
|
12160 | /**
|
12161 | *
|
12162 | * Update an interpolated class on an element with single bound value surrounded by text.
|
12163 | *
|
12164 | * Used when the value passed to a property has 1 interpolated value in it:
|
12165 | *
|
12166 | * ```html
|
12167 | * <div class="prefix{{v0}}suffix"></div>
|
12168 | * ```
|
12169 | *
|
12170 | * Its compiled representation is:
|
12171 | *
|
12172 | * ```ts
|
12173 | * ɵɵclassMapInterpolate1('prefix', v0, 'suffix');
|
12174 | * ```
|
12175 | *
|
12176 | * @param prefix Static value used for concatenation only.
|
12177 | * @param v0 Value checked for change.
|
12178 | * @param suffix Static value used for concatenation only.
|
12179 | * @codeGenApi
|
12180 | */
|
12181 | export declare function ɵɵclassMapInterpolate1(prefix: string, v0: any, suffix: string): void;
|
12182 |
|
12183 | /**
|
12184 | *
|
12185 | * Update an interpolated class on an element with 2 bound values surrounded by text.
|
12186 | *
|
12187 | * Used when the value passed to a property has 2 interpolated values in it:
|
12188 | *
|
12189 | * ```html
|
12190 | * <div class="prefix{{v0}}-{{v1}}suffix"></div>
|
12191 | * ```
|
12192 | *
|
12193 | * Its compiled representation is:
|
12194 | *
|
12195 | * ```ts
|
12196 | * ɵɵclassMapInterpolate2('prefix', v0, '-', v1, 'suffix');
|
12197 | * ```
|
12198 | *
|
12199 | * @param prefix Static value used for concatenation only.
|
12200 | * @param v0 Value checked for change.
|
12201 | * @param i0 Static value used for concatenation only.
|
12202 | * @param v1 Value checked for change.
|
12203 | * @param suffix Static value used for concatenation only.
|
12204 | * @codeGenApi
|
12205 | */
|
12206 | export declare function ɵɵclassMapInterpolate2(prefix: string, v0: any, i0: string, v1: any, suffix: string): void;
|
12207 |
|
12208 | /**
|
12209 | *
|
12210 | * Update an interpolated class on an element with 3 bound values surrounded by text.
|
12211 | *
|
12212 | * Used when the value passed to a property has 3 interpolated values in it:
|
12213 | *
|
12214 | * ```html
|
12215 | * <div class="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
|
12216 | * ```
|
12217 | *
|
12218 | * Its compiled representation is:
|
12219 | *
|
12220 | * ```ts
|
12221 | * ɵɵclassMapInterpolate3(
|
12222 | * 'prefix', v0, '-', v1, '-', v2, 'suffix');
|
12223 | * ```
|
12224 | *
|
12225 | * @param prefix Static value used for concatenation only.
|
12226 | * @param v0 Value checked for change.
|
12227 | * @param i0 Static value used for concatenation only.
|
12228 | * @param v1 Value checked for change.
|
12229 | * @param i1 Static value used for concatenation only.
|
12230 | * @param v2 Value checked for change.
|
12231 | * @param suffix Static value used for concatenation only.
|
12232 | * @codeGenApi
|
12233 | */
|
12234 | export declare function ɵɵclassMapInterpolate3(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): void;
|
12235 |
|
12236 | /**
|
12237 | *
|
12238 | * Update an interpolated class on an element with 4 bound values surrounded by text.
|
12239 | *
|
12240 | * Used when the value passed to a property has 4 interpolated values in it:
|
12241 | *
|
12242 | * ```html
|
12243 | * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
|
12244 | * ```
|
12245 | *
|
12246 | * Its compiled representation is:
|
12247 | *
|
12248 | * ```ts
|
12249 | * ɵɵclassMapInterpolate4(
|
12250 | * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
|
12251 | * ```
|
12252 | *
|
12253 | * @param prefix Static value used for concatenation only.
|
12254 | * @param v0 Value checked for change.
|
12255 | * @param i0 Static value used for concatenation only.
|
12256 | * @param v1 Value checked for change.
|
12257 | * @param i1 Static value used for concatenation only.
|
12258 | * @param v2 Value checked for change.
|
12259 | * @param i2 Static value used for concatenation only.
|
12260 | * @param v3 Value checked for change.
|
12261 | * @param suffix Static value used for concatenation only.
|
12262 | * @codeGenApi
|
12263 | */
|
12264 | export declare function ɵɵclassMapInterpolate4(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string): void;
|
12265 |
|
12266 | /**
|
12267 | *
|
12268 | * Update an interpolated class on an element with 5 bound values surrounded by text.
|
12269 | *
|
12270 | * Used when the value passed to a property has 5 interpolated values in it:
|
12271 | *
|
12272 | * ```html
|
12273 | * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
|
12274 | * ```
|
12275 | *
|
12276 | * Its compiled representation is:
|
12277 | *
|
12278 | * ```ts
|
12279 | * ɵɵclassMapInterpolate5(
|
12280 | * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
|
12281 | * ```
|
12282 | *
|
12283 | * @param prefix Static value used for concatenation only.
|
12284 | * @param v0 Value checked for change.
|
12285 | * @param i0 Static value used for concatenation only.
|
12286 | * @param v1 Value checked for change.
|
12287 | * @param i1 Static value used for concatenation only.
|
12288 | * @param v2 Value checked for change.
|
12289 | * @param i2 Static value used for concatenation only.
|
12290 | * @param v3 Value checked for change.
|
12291 | * @param i3 Static value used for concatenation only.
|
12292 | * @param v4 Value checked for change.
|
12293 | * @param suffix Static value used for concatenation only.
|
12294 | * @codeGenApi
|
12295 | */
|
12296 | export declare function ɵɵclassMapInterpolate5(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string): void;
|
12297 |
|
12298 | /**
|
12299 | *
|
12300 | * Update an interpolated class on an element with 6 bound values surrounded by text.
|
12301 | *
|
12302 | * Used when the value passed to a property has 6 interpolated values in it:
|
12303 | *
|
12304 | * ```html
|
12305 | * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
|
12306 | * ```
|
12307 | *
|
12308 | * Its compiled representation is:
|
12309 | *
|
12310 | * ```ts
|
12311 | * ɵɵclassMapInterpolate6(
|
12312 | * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
|
12313 | * ```
|
12314 | *
|
12315 | * @param prefix Static value used for concatenation only.
|
12316 | * @param v0 Value checked for change.
|
12317 | * @param i0 Static value used for concatenation only.
|
12318 | * @param v1 Value checked for change.
|
12319 | * @param i1 Static value used for concatenation only.
|
12320 | * @param v2 Value checked for change.
|
12321 | * @param i2 Static value used for concatenation only.
|
12322 | * @param v3 Value checked for change.
|
12323 | * @param i3 Static value used for concatenation only.
|
12324 | * @param v4 Value checked for change.
|
12325 | * @param i4 Static value used for concatenation only.
|
12326 | * @param v5 Value checked for change.
|
12327 | * @param suffix Static value used for concatenation only.
|
12328 | * @codeGenApi
|
12329 | */
|
12330 | export declare function ɵɵclassMapInterpolate6(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string): void;
|
12331 |
|
12332 | /**
|
12333 | *
|
12334 | * Update an interpolated class on an element with 7 bound values surrounded by text.
|
12335 | *
|
12336 | * Used when the value passed to a property has 7 interpolated values in it:
|
12337 | *
|
12338 | * ```html
|
12339 | * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
|
12340 | * ```
|
12341 | *
|
12342 | * Its compiled representation is:
|
12343 | *
|
12344 | * ```ts
|
12345 | * ɵɵclassMapInterpolate7(
|
12346 | * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
|
12347 | * ```
|
12348 | *
|
12349 | * @param prefix Static value used for concatenation only.
|
12350 | * @param v0 Value checked for change.
|
12351 | * @param i0 Static value used for concatenation only.
|
12352 | * @param v1 Value checked for change.
|
12353 | * @param i1 Static value used for concatenation only.
|
12354 | * @param v2 Value checked for change.
|
12355 | * @param i2 Static value used for concatenation only.
|
12356 | * @param v3 Value checked for change.
|
12357 | * @param i3 Static value used for concatenation only.
|
12358 | * @param v4 Value checked for change.
|
12359 | * @param i4 Static value used for concatenation only.
|
12360 | * @param v5 Value checked for change.
|
12361 | * @param i5 Static value used for concatenation only.
|
12362 | * @param v6 Value checked for change.
|
12363 | * @param suffix Static value used for concatenation only.
|
12364 | * @codeGenApi
|
12365 | */
|
12366 | export declare function ɵɵclassMapInterpolate7(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string): void;
|
12367 |
|
12368 | /**
|
12369 | *
|
12370 | * Update an interpolated class on an element with 8 bound values surrounded by text.
|
12371 | *
|
12372 | * Used when the value passed to a property has 8 interpolated values in it:
|
12373 | *
|
12374 | * ```html
|
12375 | * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
|
12376 | * ```
|
12377 | *
|
12378 | * Its compiled representation is:
|
12379 | *
|
12380 | * ```ts
|
12381 | * ɵɵclassMapInterpolate8(
|
12382 | * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
|
12383 | * ```
|
12384 | *
|
12385 | * @param prefix Static value used for concatenation only.
|
12386 | * @param v0 Value checked for change.
|
12387 | * @param i0 Static value used for concatenation only.
|
12388 | * @param v1 Value checked for change.
|
12389 | * @param i1 Static value used for concatenation only.
|
12390 | * @param v2 Value checked for change.
|
12391 | * @param i2 Static value used for concatenation only.
|
12392 | * @param v3 Value checked for change.
|
12393 | * @param i3 Static value used for concatenation only.
|
12394 | * @param v4 Value checked for change.
|
12395 | * @param i4 Static value used for concatenation only.
|
12396 | * @param v5 Value checked for change.
|
12397 | * @param i5 Static value used for concatenation only.
|
12398 | * @param v6 Value checked for change.
|
12399 | * @param i6 Static value used for concatenation only.
|
12400 | * @param v7 Value checked for change.
|
12401 | * @param suffix Static value used for concatenation only.
|
12402 | * @codeGenApi
|
12403 | */
|
12404 | export declare function ɵɵclassMapInterpolate8(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any, suffix: string): void;
|
12405 |
|
12406 | /**
|
12407 | * Update an interpolated class on an element with 9 or more bound values surrounded by text.
|
12408 | *
|
12409 | * Used when the number of interpolated values exceeds 8.
|
12410 | *
|
12411 | * ```html
|
12412 | * <div
|
12413 | * class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div>
|
12414 | * ```
|
12415 | *
|
12416 | * Its compiled representation is:
|
12417 | *
|
12418 | * ```ts
|
12419 | * ɵɵclassMapInterpolateV(
|
12420 | * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
|
12421 | * 'suffix']);
|
12422 | * ```
|
12423 | *.
|
12424 | * @param values The collection of values and the strings in-between those values, beginning with
|
12425 | * a string prefix and ending with a string suffix.
|
12426 | * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
|
12427 | * @codeGenApi
|
12428 | */
|
12429 | export declare function ɵɵclassMapInterpolateV(values: any[]): void;
|
12430 |
|
12431 | /**
|
12432 | * Update a class binding on an element with the provided value.
|
12433 | *
|
12434 | * This instruction is meant to handle the `[class.foo]="exp"` case and,
|
12435 | * therefore, the class binding itself must already be allocated using
|
12436 | * `styling` within the creation block.
|
12437 | *
|
12438 | * @param prop A valid CSS class (only one).
|
12439 | * @param value A true/false value which will turn the class on or off.
|
12440 | *
|
12441 | * Note that this will apply the provided class value to the host element if this function
|
12442 | * is called within a host binding function.
|
12443 | *
|
12444 | * @codeGenApi
|
12445 | */
|
12446 | export declare function ɵɵclassProp(className: string, value: boolean | undefined | null): typeof ɵɵclassProp;
|
12447 |
|
12448 | /**
|
12449 | * @publicApi
|
12450 | */
|
12451 | export declare type ɵɵComponentDeclaration<T, Selector extends String, ExportAs extends string[], InputMap extends {
|
12452 | [key: string]: string;
|
12453 | }, OutputMap extends {
|
12454 | [key: string]: string;
|
12455 | }, QueryFields extends string[], NgContentSelectors extends string[]> = unknown;
|
12456 |
|
12457 | /**
|
12458 | * Registers a QueryList, associated with a content query, for later refresh (part of a view
|
12459 | * refresh).
|
12460 | *
|
12461 | * @param directiveIndex Current directive index
|
12462 | * @param predicate The type for which the query will search
|
12463 | * @param flags Flags associated with the query
|
12464 | * @param read What to save in the query
|
12465 | * @returns QueryList<T>
|
12466 | *
|
12467 | * @codeGenApi
|
12468 | */
|
12469 | export declare function ɵɵcontentQuery<T>(directiveIndex: number, predicate: ProviderToken<unknown> | string[], flags: QueryFlags, read?: any): void;
|
12470 |
|
12471 | /**
|
12472 | * Copies the fields not handled by the `ɵɵInheritDefinitionFeature` from the supertype of a
|
12473 | * definition.
|
12474 | *
|
12475 | * This exists primarily to support ngcc migration of an existing View Engine pattern, where an
|
12476 | * entire decorator is inherited from a parent to a child class. When ngcc detects this case, it
|
12477 | * generates a skeleton definition on the child class, and applies this feature.
|
12478 | *
|
12479 | * The `ɵɵCopyDefinitionFeature` then copies any needed fields from the parent class' definition,
|
12480 | * including things like the component template function.
|
12481 | *
|
12482 | * @param definition The definition of a child class which inherits from a parent class with its
|
12483 | * own definition.
|
12484 | *
|
12485 | * @codeGenApi
|
12486 | */
|
12487 | export declare function ɵɵCopyDefinitionFeature(definition: ɵDirectiveDef<any> | ɵComponentDef<any>): void;
|
12488 |
|
12489 | /**
|
12490 | * Create a component definition object.
|
12491 | *
|
12492 | *
|
12493 | * # Example
|
12494 | * ```
|
12495 | * class MyDirective {
|
12496 | * // Generated by Angular Template Compiler
|
12497 | * // [Symbol] syntax will not be supported by TypeScript until v2.7
|
12498 | * static ɵcmp = defineComponent({
|
12499 | * ...
|
12500 | * });
|
12501 | * }
|
12502 | * ```
|
12503 | * @codeGenApi
|
12504 | */
|
12505 | export declare function ɵɵdefineComponent<T>(componentDefinition: {
|
12506 | /**
|
12507 | * Directive type, needed to configure the injector.
|
12508 | */
|
12509 | type: Type<T>;
|
12510 | /** The selectors that will be used to match nodes to this component. */
|
12511 | selectors?: ɵCssSelectorList;
|
12512 | /**
|
12513 | * The number of nodes, local refs, and pipes in this component template.
|
12514 | *
|
12515 | * Used to calculate the length of this component's LView array, so we
|
12516 | * can pre-fill the array and set the binding start index.
|
12517 | */
|
12518 | decls: number;
|
12519 | /**
|
12520 | * The number of bindings in this component template (including pure fn bindings).
|
12521 | *
|
12522 | * Used to calculate the length of this component's LView array, so we
|
12523 | * can pre-fill the array and set the host binding start index.
|
12524 | */
|
12525 | vars: number;
|
12526 | /**
|
12527 | * A map of input names.
|
12528 | *
|
12529 | * The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.
|
12530 | *
|
12531 | * Given:
|
12532 | * ```
|
12533 | * class MyComponent {
|
12534 | * @Input()
|
12535 | * publicInput1: string;
|
12536 | *
|
12537 | * @Input('publicInput2')
|
12538 | * declaredInput2: string;
|
12539 | * }
|
12540 | * ```
|
12541 | *
|
12542 | * is described as:
|
12543 | * ```
|
12544 | * {
|
12545 | * publicInput1: 'publicInput1',
|
12546 | * declaredInput2: ['publicInput2', 'declaredInput2'],
|
12547 | * }
|
12548 | * ```
|
12549 | *
|
12550 | * Which the minifier may translate to:
|
12551 | * ```
|
12552 | * {
|
12553 | * minifiedPublicInput1: 'publicInput1',
|
12554 | * minifiedDeclaredInput2: ['publicInput2', 'declaredInput2'],
|
12555 | * }
|
12556 | * ```
|
12557 | *
|
12558 | * This allows the render to re-construct the minified, public, and declared names
|
12559 | * of properties.
|
12560 | *
|
12561 | * NOTE:
|
12562 | * - Because declared and public name are usually same we only generate the array
|
12563 | * `['public', 'declared']` format when they differ.
|
12564 | * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has
|
12565 | * inconsistent behavior in that it uses declared names rather than minified or public. For
|
12566 | * this reason `NgOnChanges` will be deprecated and removed in future version and this
|
12567 | * API will be simplified to be consistent with `output`.
|
12568 | */
|
12569 | inputs?: {
|
12570 | [P in keyof T]?: string | [string, string];
|
12571 | };
|
12572 | /**
|
12573 | * A map of output names.
|
12574 | *
|
12575 | * The format is in: `{[actualPropertyName: string]:string}`.
|
12576 | *
|
12577 | * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.
|
12578 | *
|
12579 | * This allows the render to re-construct the minified and non-minified names
|
12580 | * of properties.
|
12581 | */
|
12582 | outputs?: {
|
12583 | [P in keyof T]?: string;
|
12584 | };
|
12585 | /**
|
12586 | * Function executed by the parent template to allow child directive to apply host bindings.
|
12587 | */
|
12588 | hostBindings?: HostBindingsFunction<T>;
|
12589 | /**
|
12590 | * The number of bindings in this directive `hostBindings` (including pure fn bindings).
|
12591 | *
|
12592 | * Used to calculate the length of the component's LView array, so we
|
12593 | * can pre-fill the array and set the host binding start index.
|
12594 | */
|
12595 | hostVars?: number;
|
12596 | /**
|
12597 | * Assign static attribute values to a host element.
|
12598 | *
|
12599 | * This property will assign static attribute values as well as class and style
|
12600 | * values to a host element. Since attribute values can consist of different types of values, the
|
12601 | * `hostAttrs` array must include the values in the following format:
|
12602 | *
|
12603 | * attrs = [
|
12604 | * // static attributes (like `title`, `name`, `id`...)
|
12605 | * attr1, value1, attr2, value,
|
12606 | *
|
12607 | * // a single namespace value (like `x:id`)
|
12608 | * NAMESPACE_MARKER, namespaceUri1, name1, value1,
|
12609 | *
|
12610 | * // another single namespace value (like `x:name`)
|
12611 | * NAMESPACE_MARKER, namespaceUri2, name2, value2,
|
12612 | *
|
12613 | * // a series of CSS classes that will be applied to the element (no spaces)
|
12614 | * CLASSES_MARKER, class1, class2, class3,
|
12615 | *
|
12616 | * // a series of CSS styles (property + value) that will be applied to the element
|
12617 | * STYLES_MARKER, prop1, value1, prop2, value2
|
12618 | * ]
|
12619 | *
|
12620 | * All non-class and non-style attributes must be defined at the start of the list
|
12621 | * first before all class and style values are set. When there is a change in value
|
12622 | * type (like when classes and styles are introduced) a marker must be used to separate
|
12623 | * the entries. The marker values themselves are set via entries found in the
|
12624 | * [AttributeMarker] enum.
|
12625 | */
|
12626 | hostAttrs?: TAttributes;
|
12627 | /**
|
12628 | * Function to create instances of content queries associated with a given directive.
|
12629 | */
|
12630 | contentQueries?: ContentQueriesFunction<T>;
|
12631 | /**
|
12632 | * Defines the name that can be used in the template to assign this directive to a variable.
|
12633 | *
|
12634 | * See: {@link Directive.exportAs}
|
12635 | */
|
12636 | exportAs?: string[];
|
12637 | /**
|
12638 | * Template function use for rendering DOM.
|
12639 | *
|
12640 | * This function has following structure.
|
12641 | *
|
12642 | * ```
|
12643 | * function Template<T>(ctx:T, creationMode: boolean) {
|
12644 | * if (creationMode) {
|
12645 | * // Contains creation mode instructions.
|
12646 | * }
|
12647 | * // Contains binding update instructions
|
12648 | * }
|
12649 | * ```
|
12650 | *
|
12651 | * Common instructions are:
|
12652 | * Creation mode instructions:
|
12653 | * - `elementStart`, `elementEnd`
|
12654 | * - `text`
|
12655 | * - `container`
|
12656 | * - `listener`
|
12657 | *
|
12658 | * Binding update instructions:
|
12659 | * - `bind`
|
12660 | * - `elementAttribute`
|
12661 | * - `elementProperty`
|
12662 | * - `elementClass`
|
12663 | * - `elementStyle`
|
12664 | *
|
12665 | */
|
12666 | template: ComponentTemplate<T>;
|
12667 | /**
|
12668 | * Constants for the nodes in the component's view.
|
12669 | * Includes attribute arrays, local definition arrays etc.
|
12670 | */
|
12671 | consts?: TConstantsOrFactory;
|
12672 | /**
|
12673 | * An array of `ngContent[selector]` values that were found in the template.
|
12674 | */
|
12675 | ngContentSelectors?: string[];
|
12676 | /**
|
12677 | * Additional set of instructions specific to view query processing. This could be seen as a
|
12678 | * set of instruction to be inserted into the template function.
|
12679 | *
|
12680 | * Query-related instructions need to be pulled out to a specific function as a timing of
|
12681 | * execution is different as compared to all other instructions (after change detection hooks but
|
12682 | * before view hooks).
|
12683 | */
|
12684 | viewQuery?: ViewQueriesFunction<T> | null;
|
12685 | /**
|
12686 | * A list of optional features to apply.
|
12687 | *
|
12688 | * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}
|
12689 | */
|
12690 | features?: ComponentDefFeature[];
|
12691 | /**
|
12692 | * Defines template and style encapsulation options available for Component's {@link Component}.
|
12693 | */
|
12694 | encapsulation?: ViewEncapsulation;
|
12695 | /**
|
12696 | * Defines arbitrary developer-defined data to be stored on a renderer instance.
|
12697 | * This is useful for renderers that delegate to other renderers.
|
12698 | *
|
12699 | * see: animation
|
12700 | */
|
12701 | data?: {
|
12702 | [kind: string]: any;
|
12703 | };
|
12704 | /**
|
12705 | * A set of styles that the component needs to be present for component to render correctly.
|
12706 | */
|
12707 | styles?: string[];
|
12708 | /**
|
12709 | * The strategy that the default change detector uses to detect changes.
|
12710 | * When set, takes effect the next time change detection is triggered.
|
12711 | */
|
12712 | changeDetection?: ChangeDetectionStrategy;
|
12713 | /**
|
12714 | * Registry of directives and components that may be found in this component's view.
|
12715 | *
|
12716 | * The property is either an array of `DirectiveDef`s or a function which returns the array of
|
12717 | * `DirectiveDef`s. The function is necessary to be able to support forward declarations.
|
12718 | */
|
12719 | directives?: DirectiveTypesOrFactory | null;
|
12720 | /**
|
12721 | * Registry of pipes that may be found in this component's view.
|
12722 | *
|
12723 | * The property is either an array of `PipeDefs`s or a function which returns the array of
|
12724 | * `PipeDefs`s. The function is necessary to be able to support forward declarations.
|
12725 | */
|
12726 | pipes?: PipeTypesOrFactory | null;
|
12727 | /**
|
12728 | * The set of schemas that declare elements to be allowed in the component's template.
|
12729 | */
|
12730 | schemas?: SchemaMetadata[] | null;
|
12731 | }): unknown;
|
12732 |
|
12733 | /**
|
12734 | * Create a directive definition object.
|
12735 | *
|
12736 | * # Example
|
12737 | * ```ts
|
12738 | * class MyDirective {
|
12739 | * // Generated by Angular Template Compiler
|
12740 | * // [Symbol] syntax will not be supported by TypeScript until v2.7
|
12741 | * static ɵdir = ɵɵdefineDirective({
|
12742 | * ...
|
12743 | * });
|
12744 | * }
|
12745 | * ```
|
12746 | *
|
12747 | * @codeGenApi
|
12748 | */
|
12749 | export declare const ɵɵdefineDirective: <T>(directiveDefinition: {
|
12750 | /**
|
12751 | * Directive type, needed to configure the injector.
|
12752 | */
|
12753 | type: Type<T>;
|
12754 | /** The selectors that will be used to match nodes to this directive. */
|
12755 | selectors?: ɵCssSelectorList | undefined;
|
12756 | /**
|
12757 | * A map of input names.
|
12758 | *
|
12759 | * The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.
|
12760 | *
|
12761 | * Given:
|
12762 | * ```
|
12763 | * class MyComponent {
|
12764 | * @Input()
|
12765 | * publicInput1: string;
|
12766 | *
|
12767 | * @Input('publicInput2')
|
12768 | * declaredInput2: string;
|
12769 | * }
|
12770 | * ```
|
12771 | *
|
12772 | * is described as:
|
12773 | * ```
|
12774 | * {
|
12775 | * publicInput1: 'publicInput1',
|
12776 | * declaredInput2: ['declaredInput2', 'publicInput2'],
|
12777 | * }
|
12778 | * ```
|
12779 | *
|
12780 | * Which the minifier may translate to:
|
12781 | * ```
|
12782 | * {
|
12783 | * minifiedPublicInput1: 'publicInput1',
|
12784 | * minifiedDeclaredInput2: [ 'publicInput2', 'declaredInput2'],
|
12785 | * }
|
12786 | * ```
|
12787 | *
|
12788 | * This allows the render to re-construct the minified, public, and declared names
|
12789 | * of properties.
|
12790 | *
|
12791 | * NOTE:
|
12792 | * - Because declared and public name are usually same we only generate the array
|
12793 | * `['declared', 'public']` format when they differ.
|
12794 | * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has
|
12795 | * inconsistent behavior in that it uses declared names rather than minified or public. For
|
12796 | * this reason `NgOnChanges` will be deprecated and removed in future version and this
|
12797 | * API will be simplified to be consistent with `output`.
|
12798 | */
|
12799 | inputs?: { [P in keyof T]?: string | [string, string] | undefined; } | undefined;
|
12800 | /**
|
12801 | * A map of output names.
|
12802 | *
|
12803 | * The format is in: `{[actualPropertyName: string]:string}`.
|
12804 | *
|
12805 | * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.
|
12806 | *
|
12807 | * This allows the render to re-construct the minified and non-minified names
|
12808 | * of properties.
|
12809 | */
|
12810 | outputs?: { [P_1 in keyof T]?: string | undefined; } | undefined;
|
12811 | /**
|
12812 | * A list of optional features to apply.
|
12813 | *
|
12814 | * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}, {@link InheritDefinitionFeature}
|
12815 | */
|
12816 | features?: DirectiveDefFeature[] | undefined;
|
12817 | /**
|
12818 | * Function executed by the parent template to allow child directive to apply host bindings.
|
12819 | */
|
12820 | hostBindings?: HostBindingsFunction<T> | undefined;
|
12821 | /**
|
12822 | * The number of bindings in this directive `hostBindings` (including pure fn bindings).
|
12823 | *
|
12824 | * Used to calculate the length of the component's LView array, so we
|
12825 | * can pre-fill the array and set the host binding start index.
|
12826 | */
|
12827 | hostVars?: number | undefined;
|
12828 | /**
|
12829 | * Assign static attribute values to a host element.
|
12830 | *
|
12831 | * This property will assign static attribute values as well as class and style
|
12832 | * values to a host element. Since attribute values can consist of different types of values,
|
12833 | * the `hostAttrs` array must include the values in the following format:
|
12834 | *
|
12835 | * attrs = [
|
12836 | * // static attributes (like `title`, `name`, `id`...)
|
12837 | * attr1, value1, attr2, value,
|
12838 | *
|
12839 | * // a single namespace value (like `x:id`)
|
12840 | * NAMESPACE_MARKER, namespaceUri1, name1, value1,
|
12841 | *
|
12842 | * // another single namespace value (like `x:name`)
|
12843 | * NAMESPACE_MARKER, namespaceUri2, name2, value2,
|
12844 | *
|
12845 | * // a series of CSS classes that will be applied to the element (no spaces)
|
12846 | * CLASSES_MARKER, class1, class2, class3,
|
12847 | *
|
12848 | * // a series of CSS styles (property + value) that will be applied to the element
|
12849 | * STYLES_MARKER, prop1, value1, prop2, value2
|
12850 | * ]
|
12851 | *
|
12852 | * All non-class and non-style attributes must be defined at the start of the list
|
12853 | * first before all class and style values are set. When there is a change in value
|
12854 | * type (like when classes and styles are introduced) a marker must be used to separate
|
12855 | * the entries. The marker values themselves are set via entries found in the
|
12856 | * [AttributeMarker] enum.
|
12857 | */
|
12858 | hostAttrs?: TAttributes | undefined;
|
12859 | /**
|
12860 | * Function to create instances of content queries associated with a given directive.
|
12861 | */
|
12862 | contentQueries?: ContentQueriesFunction<T> | undefined;
|
12863 | /**
|
12864 | * Additional set of instructions specific to view query processing. This could be seen as a
|
12865 | * set of instructions to be inserted into the template function.
|
12866 | */
|
12867 | viewQuery?: ViewQueriesFunction<T> | null | undefined;
|
12868 | /**
|
12869 | * Defines the name that can be used in the template to assign this directive to a variable.
|
12870 | *
|
12871 | * See: {@link Directive.exportAs}
|
12872 | */
|
12873 | exportAs?: string[] | undefined;
|
12874 | }) => never;
|
12875 |
|
12876 | /**
|
12877 | * Construct an injectable definition which defines how a token will be constructed by the DI
|
12878 | * system, and in which injectors (if any) it will be available.
|
12879 | *
|
12880 | * This should be assigned to a static `ɵprov` field on a type, which will then be an
|
12881 | * `InjectableType`.
|
12882 | *
|
12883 | * Options:
|
12884 | * * `providedIn` determines which injectors will include the injectable, by either associating it
|
12885 | * with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be
|
12886 | * provided in the `'root'` injector, which will be the application-level injector in most apps.
|
12887 | * * `factory` gives the zero argument function which will create an instance of the injectable.
|
12888 | * The factory can call `inject` to access the `Injector` and request injection of dependencies.
|
12889 | *
|
12890 | * @codeGenApi
|
12891 | * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.
|
12892 | */
|
12893 | export declare function ɵɵdefineInjectable<T>(opts: {
|
12894 | token: unknown;
|
12895 | providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
|
12896 | factory: () => T;
|
12897 | }): unknown;
|
12898 |
|
12899 | /**
|
12900 | * Construct an `InjectorDef` which configures an injector.
|
12901 | *
|
12902 | * This should be assigned to a static injector def (`ɵinj`) field on a type, which will then be an
|
12903 | * `InjectorType`.
|
12904 | *
|
12905 | * Options:
|
12906 | *
|
12907 | * * `providers`: an optional array of providers to add to the injector. Each provider must
|
12908 | * either have a factory or point to a type which has a `ɵprov` static property (the
|
12909 | * type must be an `InjectableType`).
|
12910 | * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s
|
12911 | * whose providers will also be added to the injector. Locally provided types will override
|
12912 | * providers from imports.
|
12913 | *
|
12914 | * @codeGenApi
|
12915 | */
|
12916 | export declare function ɵɵdefineInjector(options: {
|
12917 | providers?: any[];
|
12918 | imports?: any[];
|
12919 | }): unknown;
|
12920 |
|
12921 | /**
|
12922 | * @codeGenApi
|
12923 | */
|
12924 | export declare function ɵɵdefineNgModule<T>(def: {
|
12925 | /** Token representing the module. Used by DI. */
|
12926 | type: T;
|
12927 | /** List of components to bootstrap. */
|
12928 | bootstrap?: Type<any>[] | (() => Type<any>[]);
|
12929 | /** List of components, directives, and pipes declared by this module. */
|
12930 | declarations?: Type<any>[] | (() => Type<any>[]);
|
12931 | /** List of modules or `ModuleWithProviders` imported by this module. */
|
12932 | imports?: Type<any>[] | (() => Type<any>[]);
|
12933 | /**
|
12934 | * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this
|
12935 | * module.
|
12936 | */
|
12937 | exports?: Type<any>[] | (() => Type<any>[]);
|
12938 | /** The set of schemas that declare elements to be allowed in the NgModule. */
|
12939 | schemas?: SchemaMetadata[] | null;
|
12940 | /** Unique ID for the module that is used with `getModuleFactory`. */
|
12941 | id?: string | null;
|
12942 | }): unknown;
|
12943 |
|
12944 | /**
|
12945 | * Create a pipe definition object.
|
12946 | *
|
12947 | * # Example
|
12948 | * ```
|
12949 | * class MyPipe implements PipeTransform {
|
12950 | * // Generated by Angular Template Compiler
|
12951 | * static ɵpipe = definePipe({
|
12952 | * ...
|
12953 | * });
|
12954 | * }
|
12955 | * ```
|
12956 | * @param pipeDef Pipe definition generated by the compiler
|
12957 | *
|
12958 | * @codeGenApi
|
12959 | */
|
12960 | export declare function ɵɵdefinePipe<T>(pipeDef: {
|
12961 | /** Name of the pipe. Used for matching pipes in template to pipe defs. */
|
12962 | name: string;
|
12963 | /** Pipe class reference. Needed to extract pipe lifecycle hooks. */
|
12964 | type: Type<T>;
|
12965 | /** Whether the pipe is pure. */
|
12966 | pure?: boolean;
|
12967 | }): unknown;
|
12968 |
|
12969 |
|
12970 | /**
|
12971 | * @publicApi
|
12972 | */
|
12973 | export declare type ɵɵDirectiveDeclaration<T, Selector extends string, ExportAs extends string[], InputMap extends {
|
12974 | [key: string]: string;
|
12975 | }, OutputMap extends {
|
12976 | [key: string]: string;
|
12977 | }, QueryFields extends string[]> = unknown;
|
12978 |
|
12979 | /**
|
12980 | * Returns the value associated to the given token from the injectors.
|
12981 | *
|
12982 | * `directiveInject` is intended to be used for directive, component and pipe factories.
|
12983 | * All other injection use `inject` which does not walk the node injector tree.
|
12984 | *
|
12985 | * Usage example (in factory function):
|
12986 | *
|
12987 | * ```ts
|
12988 | * class SomeDirective {
|
12989 | * constructor(directive: DirectiveA) {}
|
12990 | *
|
12991 | * static ɵdir = ɵɵdefineDirective({
|
12992 | * type: SomeDirective,
|
12993 | * factory: () => new SomeDirective(ɵɵdirectiveInject(DirectiveA))
|
12994 | * });
|
12995 | * }
|
12996 | * ```
|
12997 | * @param token the type or token to inject
|
12998 | * @param flags Injection flags
|
12999 | * @returns the value from the injector or `null` when not found
|
13000 | *
|
13001 | * @codeGenApi
|
13002 | */
|
13003 | export declare function ɵɵdirectiveInject<T>(token: ProviderToken<T>): T;
|
13004 |
|
13005 | export declare function ɵɵdirectiveInject<T>(token: ProviderToken<T>, flags: InjectFlags): T;
|
13006 |
|
13007 | /**
|
13008 | * Disables directive matching on element.
|
13009 | *
|
13010 | * * Example:
|
13011 | * ```
|
13012 | * <my-comp my-directive>
|
13013 | * Should match component / directive.
|
13014 | * </my-comp>
|
13015 | * <div ngNonBindable>
|
13016 | * <!-- ɵɵdisableBindings() -->
|
13017 | * <my-comp my-directive>
|
13018 | * Should not match component / directive because we are in ngNonBindable.
|
13019 | * </my-comp>
|
13020 | * <!-- ɵɵenableBindings() -->
|
13021 | * </div>
|
13022 | * ```
|
13023 | *
|
13024 | * @codeGenApi
|
13025 | */
|
13026 | export declare function ɵɵdisableBindings(): void;
|
13027 |
|
13028 | /**
|
13029 | * Creates an empty element using {@link elementStart} and {@link elementEnd}
|
13030 | *
|
13031 | * @param index Index of the element in the data array
|
13032 | * @param name Name of the DOM Node
|
13033 | * @param attrsIndex Index of the element's attributes in the `consts` array.
|
13034 | * @param localRefsIndex Index of the element's local references in the `consts` array.
|
13035 | *
|
13036 | * @codeGenApi
|
13037 | */
|
13038 | export declare function ɵɵelement(index: number, name: string, attrsIndex?: number | null, localRefsIndex?: number): void;
|
13039 |
|
13040 | /**
|
13041 | * Creates an empty logical container using {@link elementContainerStart}
|
13042 | * and {@link elementContainerEnd}
|
13043 | *
|
13044 | * @param index Index of the element in the LView array
|
13045 | * @param attrsIndex Index of the container attributes in the `consts` array.
|
13046 | * @param localRefsIndex Index of the container's local references in the `consts` array.
|
13047 | *
|
13048 | * @codeGenApi
|
13049 | */
|
13050 | export declare function ɵɵelementContainer(index: number, attrsIndex?: number | null, localRefsIndex?: number): void;
|
13051 |
|
13052 | /**
|
13053 | * Mark the end of the <ng-container>.
|
13054 | *
|
13055 | * @codeGenApi
|
13056 | */
|
13057 | export declare function ɵɵelementContainerEnd(): void;
|
13058 |
|
13059 | /**
|
13060 | * Creates a logical container for other nodes (<ng-container>) backed by a comment node in the DOM.
|
13061 | * The instruction must later be followed by `elementContainerEnd()` call.
|
13062 | *
|
13063 | * @param index Index of the element in the LView array
|
13064 | * @param attrsIndex Index of the container attributes in the `consts` array.
|
13065 | * @param localRefsIndex Index of the container's local references in the `consts` array.
|
13066 | *
|
13067 | * Even if this instruction accepts a set of attributes no actual attribute values are propagated to
|
13068 | * the DOM (as a comment node can't have attributes). Attributes are here only for directive
|
13069 | * matching purposes and setting initial inputs of directives.
|
13070 | *
|
13071 | * @codeGenApi
|
13072 | */
|
13073 | export declare function ɵɵelementContainerStart(index: number, attrsIndex?: number | null, localRefsIndex?: number): void;
|
13074 |
|
13075 | /**
|
13076 | * Mark the end of the element.
|
13077 | *
|
13078 | * @codeGenApi
|
13079 | */
|
13080 | export declare function ɵɵelementEnd(): void;
|
13081 |
|
13082 |
|
13083 | /**
|
13084 | * Create DOM element. The instruction must later be followed by `elementEnd()` call.
|
13085 | *
|
13086 | * @param index Index of the element in the LView array
|
13087 | * @param name Name of the DOM Node
|
13088 | * @param attrsIndex Index of the element's attributes in the `consts` array.
|
13089 | * @param localRefsIndex Index of the element's local references in the `consts` array.
|
13090 | *
|
13091 | * Attributes and localRefs are passed as an array of strings where elements with an even index
|
13092 | * hold an attribute name and elements with an odd index hold an attribute value, ex.:
|
13093 | * ['id', 'warning5', 'class', 'alert']
|
13094 | *
|
13095 | * @codeGenApi
|
13096 | */
|
13097 | export declare function ɵɵelementStart(index: number, name: string, attrsIndex?: number | null, localRefsIndex?: number): void;
|
13098 |
|
13099 | /**
|
13100 | * Enables directive matching on elements.
|
13101 | *
|
13102 | * * Example:
|
13103 | * ```
|
13104 | * <my-comp my-directive>
|
13105 | * Should match component / directive.
|
13106 | * </my-comp>
|
13107 | * <div ngNonBindable>
|
13108 | * <!-- ɵɵdisableBindings() -->
|
13109 | * <my-comp my-directive>
|
13110 | * Should not match component / directive because we are in ngNonBindable.
|
13111 | * </my-comp>
|
13112 | * <!-- ɵɵenableBindings() -->
|
13113 | * </div>
|
13114 | * ```
|
13115 | *
|
13116 | * @codeGenApi
|
13117 | */
|
13118 | export declare function ɵɵenableBindings(): void;
|
13119 |
|
13120 | /**
|
13121 | * @publicApi
|
13122 | */
|
13123 | export declare type ɵɵFactoryDeclaration<T, CtorDependencies extends CtorDependency[]> = unknown;
|
13124 |
|
13125 | export declare enum ɵɵFactoryTarget {
|
13126 | Directive = 0,
|
13127 | Component = 1,
|
13128 | Injectable = 2,
|
13129 | Pipe = 3,
|
13130 | NgModule = 4
|
13131 | }
|
13132 |
|
13133 | /**
|
13134 | * Returns the current OpaqueViewState instance.
|
13135 | *
|
13136 | * Used in conjunction with the restoreView() instruction to save a snapshot
|
13137 | * of the current view and restore it when listeners are invoked. This allows
|
13138 | * walking the declaration view tree in listeners to get vars from parent views.
|
13139 | *
|
13140 | * @codeGenApi
|
13141 | */
|
13142 | export declare function ɵɵgetCurrentView(): OpaqueViewState;
|
13143 |
|
13144 | /**
|
13145 | * @codeGenApi
|
13146 | */
|
13147 | export declare function ɵɵgetInheritedFactory<T>(type: Type<any>): (type: Type<T>) => T;
|
13148 |
|
13149 | /**
|
13150 | * Update a property on a host element. Only applies to native node properties, not inputs.
|
13151 | *
|
13152 | * Operates on the element selected by index via the {@link select} instruction.
|
13153 | *
|
13154 | * @param propName Name of property. Because it is going to DOM, this is not subject to
|
13155 | * renaming as part of minification.
|
13156 | * @param value New value to write.
|
13157 | * @param sanitizer An optional function used to sanitize the value.
|
13158 | * @returns This function returns itself so that it may be chained
|
13159 | * (e.g. `property('name', ctx.name)('title', ctx.title)`)
|
13160 | *
|
13161 | * @codeGenApi
|
13162 | */
|
13163 | export declare function ɵɵhostProperty<T>(propName: string, value: T, sanitizer?: SanitizerFn | null): typeof ɵɵhostProperty;
|
13164 |
|
13165 | /**
|
13166 | *
|
13167 | * Use this instruction to create a translation block that doesn't contain any placeholder.
|
13168 | * It calls both {@link i18nStart} and {@link i18nEnd} in one instruction.
|
13169 | *
|
13170 | * The translation `message` is the value which is locale specific. The translation string may
|
13171 | * contain placeholders which associate inner elements and sub-templates within the translation.
|
13172 | *
|
13173 | * The translation `message` placeholders are:
|
13174 | * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be
|
13175 | * interpolated into. The placeholder `index` points to the expression binding index. An optional
|
13176 | * `block` that matches the sub-template in which it was declared.
|
13177 | * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning
|
13178 | * and end of DOM element that were embedded in the original translation block. The placeholder
|
13179 | * `index` points to the element index in the template instructions set. An optional `block` that
|
13180 | * matches the sub-template in which it was declared.
|
13181 | * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be
|
13182 | * split up and translated separately in each angular template function. The `index` points to the
|
13183 | * `template` instruction index. A `block` that matches the sub-template in which it was declared.
|
13184 | *
|
13185 | * @param index A unique index of the translation in the static block.
|
13186 | * @param messageIndex An index of the translation message from the `def.consts` array.
|
13187 | * @param subTemplateIndex Optional sub-template index in the `message`.
|
13188 | *
|
13189 | * @codeGenApi
|
13190 | */
|
13191 | export declare function ɵɵi18n(index: number, messageIndex: number, subTemplateIndex?: number): void;
|
13192 |
|
13193 | /**
|
13194 | * Updates a translation block or an i18n attribute when the bindings have changed.
|
13195 | *
|
13196 | * @param index Index of either {@link i18nStart} (translation block) or {@link i18nAttributes}
|
13197 | * (i18n attribute) on which it should update the content.
|
13198 | *
|
13199 | * @codeGenApi
|
13200 | */
|
13201 | export declare function ɵɵi18nApply(index: number): void;
|
13202 |
|
13203 | /**
|
13204 | * Marks a list of attributes as translatable.
|
13205 | *
|
13206 | * @param index A unique index in the static block
|
13207 | * @param values
|
13208 | *
|
13209 | * @codeGenApi
|
13210 | */
|
13211 | export declare function ɵɵi18nAttributes(index: number, attrsIndex: number): void;
|
13212 |
|
13213 | /**
|
13214 | * Translates a translation block marked by `i18nStart` and `i18nEnd`. It inserts the text/ICU nodes
|
13215 | * into the render tree, moves the placeholder nodes and removes the deleted nodes.
|
13216 | *
|
13217 | * @codeGenApi
|
13218 | */
|
13219 | export declare function ɵɵi18nEnd(): void;
|
13220 |
|
13221 | /**
|
13222 | * Stores the values of the bindings during each update cycle in order to determine if we need to
|
13223 | * update the translated nodes.
|
13224 | *
|
13225 | * @param value The binding's value
|
13226 | * @returns This function returns itself so that it may be chained
|
13227 | * (e.g. `i18nExp(ctx.name)(ctx.title)`)
|
13228 | *
|
13229 | * @codeGenApi
|
13230 | */
|
13231 | export declare function ɵɵi18nExp<T>(value: T): typeof ɵɵi18nExp;
|
13232 |
|
13233 | /**
|
13234 | * Handles message string post-processing for internationalization.
|
13235 | *
|
13236 | * Handles message string post-processing by transforming it from intermediate
|
13237 | * format (that might contain some markers that we need to replace) to the final
|
13238 | * form, consumable by i18nStart instruction. Post processing steps include:
|
13239 | *
|
13240 | * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])
|
13241 | * 2. Replace all ICU vars (like "VAR_PLURAL")
|
13242 | * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER}
|
13243 | * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)
|
13244 | * in case multiple ICUs have the same placeholder name
|
13245 | *
|
13246 | * @param message Raw translation string for post processing
|
13247 | * @param replacements Set of replacements that should be applied
|
13248 | *
|
13249 | * @returns Transformed string that can be consumed by i18nStart instruction
|
13250 | *
|
13251 | * @codeGenApi
|
13252 | */
|
13253 | export declare function ɵɵi18nPostprocess(message: string, replacements?: {
|
13254 | [key: string]: (string | string[]);
|
13255 | }): string;
|
13256 |
|
13257 | /**
|
13258 | * Marks a block of text as translatable.
|
13259 | *
|
13260 | * The instructions `i18nStart` and `i18nEnd` mark the translation block in the template.
|
13261 | * The translation `message` is the value which is locale specific. The translation string may
|
13262 | * contain placeholders which associate inner elements and sub-templates within the translation.
|
13263 | *
|
13264 | * The translation `message` placeholders are:
|
13265 | * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be
|
13266 | * interpolated into. The placeholder `index` points to the expression binding index. An optional
|
13267 | * `block` that matches the sub-template in which it was declared.
|
13268 | * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning
|
13269 | * and end of DOM element that were embedded in the original translation block. The placeholder
|
13270 | * `index` points to the element index in the template instructions set. An optional `block` that
|
13271 | * matches the sub-template in which it was declared.
|
13272 | * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be
|
13273 | * split up and translated separately in each angular template function. The `index` points to the
|
13274 | * `template` instruction index. A `block` that matches the sub-template in which it was declared.
|
13275 | *
|
13276 | * @param index A unique index of the translation in the static block.
|
13277 | * @param messageIndex An index of the translation message from the `def.consts` array.
|
13278 | * @param subTemplateIndex Optional sub-template index in the `message`.
|
13279 | *
|
13280 | * @codeGenApi
|
13281 | */
|
13282 | export declare function ɵɵi18nStart(index: number, messageIndex: number, subTemplateIndex?: number): void;
|
13283 |
|
13284 | /**
|
13285 | * Merges the definition from a super class to a sub class.
|
13286 | * @param definition The definition that is a SubClass of another directive of component
|
13287 | *
|
13288 | * @codeGenApi
|
13289 | */
|
13290 | export declare function ɵɵInheritDefinitionFeature(definition: ɵDirectiveDef<any> | ɵComponentDef<any>): void;
|
13291 |
|
13292 | /**
|
13293 | * Generated instruction: Injects a token from the currently active injector.
|
13294 | *
|
13295 | * Must be used in the context of a factory function such as one defined for an
|
13296 | * `InjectionToken`. Throws an error if not called from such a context.
|
13297 | *
|
13298 | * (Additional documentation moved to `inject`, as it is the public API, and an alias for this
|
13299 | * instruction)
|
13300 | *
|
13301 | * @see inject
|
13302 | * @codeGenApi
|
13303 | * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.
|
13304 | */
|
13305 | export declare function ɵɵinject<T>(token: ProviderToken<T>): T;
|
13306 |
|
13307 | export declare function ɵɵinject<T>(token: ProviderToken<T>, flags?: InjectFlags): T | null;
|
13308 |
|
13309 | /**
|
13310 | * Information about how a type or `InjectionToken` interfaces with the DI system.
|
13311 | *
|
13312 | * At a minimum, this includes a `factory` which defines how to create the given type `T`, possibly
|
13313 | * requesting injection of other types if necessary.
|
13314 | *
|
13315 | * Optionally, a `providedIn` parameter specifies that the given type belongs to a particular
|
13316 | * `Injector`, `NgModule`, or a special scope (e.g. `'root'`). A value of `null` indicates
|
13317 | * that the injectable does not belong to any scope.
|
13318 | *
|
13319 | * @codeGenApi
|
13320 | * @publicApi The ViewEngine compiler emits code with this type for injectables. This code is
|
13321 | * deployed to npm, and should be treated as public api.
|
13322 |
|
13323 | */
|
13324 | export declare interface ɵɵInjectableDeclaration<T> {
|
13325 | /**
|
13326 | * Specifies that the given type belongs to a particular injector:
|
13327 | * - `InjectorType` such as `NgModule`,
|
13328 | * - `'root'` the root injector
|
13329 | * - `'any'` all injectors.
|
13330 | * - `null`, does not belong to any injector. Must be explicitly listed in the injector
|
13331 | * `providers`.
|
13332 | */
|
13333 | providedIn: InjectorType<any> | 'root' | 'platform' | 'any' | null;
|
13334 | /**
|
13335 | * The token to which this definition belongs.
|
13336 | *
|
13337 | * Note that this may not be the same as the type that the `factory` will create.
|
13338 | */
|
13339 | token: unknown;
|
13340 | /**
|
13341 | * Factory method to execute to create an instance of the injectable.
|
13342 | */
|
13343 | factory: (t?: Type<any>) => T;
|
13344 | /**
|
13345 | * In a case of no explicit injector, a location where the instance of the injectable is stored.
|
13346 | */
|
13347 | value: T | undefined;
|
13348 | }
|
13349 |
|
13350 | /**
|
13351 | * Facade for the attribute injection from DI.
|
13352 | *
|
13353 | * @codeGenApi
|
13354 | */
|
13355 | export declare function ɵɵinjectAttribute(attrNameToInject: string): string | null;
|
13356 |
|
13357 | /**
|
13358 | * @publicApi
|
13359 | */
|
13360 | export declare type ɵɵInjectorDeclaration<T> = unknown;
|
13361 |
|
13362 | /**
|
13363 | * Information about the providers to be included in an `Injector` as well as how the given type
|
13364 | * which carries the information should be created by the DI system.
|
13365 | *
|
13366 | * An `InjectorDef` can import other types which have `InjectorDefs`, forming a deep nested
|
13367 | * structure of providers with a defined priority (identically to how `NgModule`s also have
|
13368 | * an import/dependency structure).
|
13369 | *
|
13370 | * NOTE: This is a private type and should not be exported
|
13371 | *
|
13372 | * @codeGenApi
|
13373 | */
|
13374 | export declare interface ɵɵInjectorDef<T> {
|
13375 | providers: (Type<any> | ValueProvider | ExistingProvider | FactoryProvider | ConstructorProvider | StaticClassProvider | ClassProvider | any[])[];
|
13376 | imports: (InjectorType<any> | InjectorTypeWithProviders<any>)[];
|
13377 | }
|
13378 |
|
13379 | /**
|
13380 | * Throws an error indicating that a factory function could not be generated by the compiler for a
|
13381 | * particular class.
|
13382 | *
|
13383 | * This instruction allows the actual error message to be optimized away when ngDevMode is turned
|
13384 | * off, saving bytes of generated code while still providing a good experience in dev mode.
|
13385 | *
|
13386 | * The name of the class is not mentioned here, but will be in the generated factory function name
|
13387 | * and thus in the stack trace.
|
13388 | *
|
13389 | * @codeGenApi
|
13390 | */
|
13391 | export declare function ɵɵinvalidFactory(): never;
|
13392 |
|
13393 | /**
|
13394 | * Throws an error indicating that a factory function could not be generated by the compiler for a
|
13395 | * particular class.
|
13396 | *
|
13397 | * This instruction allows the actual error message to be optimized away when ngDevMode is turned
|
13398 | * off, saving bytes of generated code while still providing a good experience in dev mode.
|
13399 | *
|
13400 | * The name of the class is not mentioned here, but will be in the generated factory function name
|
13401 | * and thus in the stack trace.
|
13402 | *
|
13403 | * @codeGenApi
|
13404 | */
|
13405 | export declare function ɵɵinvalidFactoryDep(index: number): never;
|
13406 |
|
13407 | /**
|
13408 | * Adds an event listener to the current node.
|
13409 | *
|
13410 | * If an output exists on one of the node's directives, it also subscribes to the output
|
13411 | * and saves the subscription for later cleanup.
|
13412 | *
|
13413 | * @param eventName Name of the event
|
13414 | * @param listenerFn The function to be called when event emits
|
13415 | * @param useCapture Whether or not to use capture in event listener
|
13416 | * @param eventTargetResolver Function that returns global target information in case this listener
|
13417 | * should be attached to a global object like window, document or body
|
13418 | *
|
13419 | * @codeGenApi
|
13420 | */
|
13421 | export declare function ɵɵlistener(eventName: string, listenerFn: (e?: any) => any, useCapture?: boolean, eventTargetResolver?: GlobalTargetResolver): typeof ɵɵlistener;
|
13422 |
|
13423 | /**
|
13424 | * Loads a QueryList corresponding to the current view or content query.
|
13425 | *
|
13426 | * @codeGenApi
|
13427 | */
|
13428 | export declare function ɵɵloadQuery<T>(): QueryList<T>;
|
13429 |
|
13430 | /**
|
13431 | * Sets the namespace used to create elements to `null`, which forces element creation to use
|
13432 | * `createElement` rather than `createElementNS`.
|
13433 | *
|
13434 | * @codeGenApi
|
13435 | */
|
13436 | export declare function ɵɵnamespaceHTML(): void;
|
13437 |
|
13438 | /**
|
13439 | * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state.
|
13440 | *
|
13441 | * @codeGenApi
|
13442 | */
|
13443 | export declare function ɵɵnamespaceMathML(): void;
|
13444 |
|
13445 | /**
|
13446 | * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state.
|
13447 | *
|
13448 | * @codeGenApi
|
13449 | */
|
13450 | export declare function ɵɵnamespaceSVG(): void;
|
13451 |
|
13452 | /**
|
13453 | * Retrieves a context at the level specified and saves it as the global, contextViewData.
|
13454 | * Will get the next level up if level is not specified.
|
13455 | *
|
13456 | * This is used to save contexts of parent views so they can be bound in embedded views, or
|
13457 | * in conjunction with reference() to bind a ref from a parent view.
|
13458 | *
|
13459 | * @param level The relative level of the view from which to grab context compared to contextVewData
|
13460 | * @returns context
|
13461 | *
|
13462 | * @codeGenApi
|
13463 | */
|
13464 | export declare function ɵɵnextContext<T = any>(level?: number): T;
|
13465 |
|
13466 | /**
|
13467 | * Evaluates the class metadata declaration.
|
13468 | *
|
13469 | * @codeGenApi
|
13470 | */
|
13471 | export declare function ɵɵngDeclareClassMetadata(decl: {
|
13472 | type: Type<any>;
|
13473 | decorators: any[];
|
13474 | ctorParameters?: () => any[];
|
13475 | propDecorators?: {
|
13476 | [field: string]: any;
|
13477 | };
|
13478 | }): void;
|
13479 |
|
13480 | /**
|
13481 | * Compiles a partial component declaration object into a full component definition object.
|
13482 | *
|
13483 | * @codeGenApi
|
13484 | */
|
13485 | export declare function ɵɵngDeclareComponent(decl: R3DeclareComponentFacade): unknown;
|
13486 |
|
13487 | /**
|
13488 | * Compiles a partial directive declaration object into a full directive definition object.
|
13489 | *
|
13490 | * @codeGenApi
|
13491 | */
|
13492 | export declare function ɵɵngDeclareDirective(decl: R3DeclareDirectiveFacade): unknown;
|
13493 |
|
13494 | /**
|
13495 | * Compiles a partial pipe declaration object into a full pipe definition object.
|
13496 | *
|
13497 | * @codeGenApi
|
13498 | */
|
13499 | export declare function ɵɵngDeclareFactory(decl: R3DeclareFactoryFacade): unknown;
|
13500 |
|
13501 | /**
|
13502 | * Compiles a partial injectable declaration object into a full injectable definition object.
|
13503 | *
|
13504 | * @codeGenApi
|
13505 | */
|
13506 | export declare function ɵɵngDeclareInjectable(decl: R3DeclareInjectableFacade): unknown;
|
13507 |
|
13508 | /**
|
13509 | * Compiles a partial injector declaration object into a full injector definition object.
|
13510 | *
|
13511 | * @codeGenApi
|
13512 | */
|
13513 | export declare function ɵɵngDeclareInjector(decl: R3DeclareInjectorFacade): unknown;
|
13514 |
|
13515 | /**
|
13516 | * Compiles a partial NgModule declaration object into a full NgModule definition object.
|
13517 | *
|
13518 | * @codeGenApi
|
13519 | */
|
13520 | export declare function ɵɵngDeclareNgModule(decl: R3DeclareNgModuleFacade): unknown;
|
13521 |
|
13522 | /**
|
13523 | * Compiles a partial pipe declaration object into a full pipe definition object.
|
13524 | *
|
13525 | * @codeGenApi
|
13526 | */
|
13527 | export declare function ɵɵngDeclarePipe(decl: R3DeclarePipeFacade): unknown;
|
13528 |
|
13529 | /**
|
13530 | * @publicApi
|
13531 | */
|
13532 | export declare type ɵɵNgModuleDeclaration<T, Declarations, Imports, Exports> = unknown;
|
13533 |
|
13534 | /**
|
13535 | * The NgOnChangesFeature decorates a component with support for the ngOnChanges
|
13536 | * lifecycle hook, so it should be included in any component that implements
|
13537 | * that hook.
|
13538 | *
|
13539 | * If the component or directive uses inheritance, the NgOnChangesFeature MUST
|
13540 | * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise
|
13541 | * inherited properties will not be propagated to the ngOnChanges lifecycle
|
13542 | * hook.
|
13543 | *
|
13544 | * Example usage:
|
13545 | *
|
13546 | * ```
|
13547 | * static ɵcmp = defineComponent({
|
13548 | * ...
|
13549 | * inputs: {name: 'publicName'},
|
13550 | * features: [NgOnChangesFeature]
|
13551 | * });
|
13552 | * ```
|
13553 | *
|
13554 | * @codeGenApi
|
13555 | */
|
13556 | export declare function ɵɵNgOnChangesFeature<T>(): DirectiveDefFeature;
|
13557 |
|
13558 |
|
13559 | /**
|
13560 | * Create a pipe.
|
13561 | *
|
13562 | * @param index Pipe index where the pipe will be stored.
|
13563 | * @param pipeName The name of the pipe
|
13564 | * @returns T the instance of the pipe.
|
13565 | *
|
13566 | * @codeGenApi
|
13567 | */
|
13568 | export declare function ɵɵpipe(index: number, pipeName: string): any;
|
13569 |
|
13570 | /**
|
13571 | * Invokes a pipe with 1 arguments.
|
13572 | *
|
13573 | * This instruction acts as a guard to {@link PipeTransform#transform} invoking
|
13574 | * the pipe only when an input to the pipe changes.
|
13575 | *
|
13576 | * @param index Pipe index where the pipe was stored on creation.
|
13577 | * @param slotOffset the offset in the reserved slot space
|
13578 | * @param v1 1st argument to {@link PipeTransform#transform}.
|
13579 | *
|
13580 | * @codeGenApi
|
13581 | */
|
13582 | export declare function ɵɵpipeBind1(index: number, slotOffset: number, v1: any): any;
|
13583 |
|
13584 | /**
|
13585 | * Invokes a pipe with 2 arguments.
|
13586 | *
|
13587 | * This instruction acts as a guard to {@link PipeTransform#transform} invoking
|
13588 | * the pipe only when an input to the pipe changes.
|
13589 | *
|
13590 | * @param index Pipe index where the pipe was stored on creation.
|
13591 | * @param slotOffset the offset in the reserved slot space
|
13592 | * @param v1 1st argument to {@link PipeTransform#transform}.
|
13593 | * @param v2 2nd argument to {@link PipeTransform#transform}.
|
13594 | *
|
13595 | * @codeGenApi
|
13596 | */
|
13597 | export declare function ɵɵpipeBind2(index: number, slotOffset: number, v1: any, v2: any): any;
|
13598 |
|
13599 | /**
|
13600 | * Invokes a pipe with 3 arguments.
|
13601 | *
|
13602 | * This instruction acts as a guard to {@link PipeTransform#transform} invoking
|
13603 | * the pipe only when an input to the pipe changes.
|
13604 | *
|
13605 | * @param index Pipe index where the pipe was stored on creation.
|
13606 | * @param slotOffset the offset in the reserved slot space
|
13607 | * @param v1 1st argument to {@link PipeTransform#transform}.
|
13608 | * @param v2 2nd argument to {@link PipeTransform#transform}.
|
13609 | * @param v3 4rd argument to {@link PipeTransform#transform}.
|
13610 | *
|
13611 | * @codeGenApi
|
13612 | */
|
13613 | export declare function ɵɵpipeBind3(index: number, slotOffset: number, v1: any, v2: any, v3: any): any;
|
13614 |
|
13615 | /**
|
13616 | * Invokes a pipe with 4 arguments.
|
13617 | *
|
13618 | * This instruction acts as a guard to {@link PipeTransform#transform} invoking
|
13619 | * the pipe only when an input to the pipe changes.
|
13620 | *
|
13621 | * @param index Pipe index where the pipe was stored on creation.
|
13622 | * @param slotOffset the offset in the reserved slot space
|
13623 | * @param v1 1st argument to {@link PipeTransform#transform}.
|
13624 | * @param v2 2nd argument to {@link PipeTransform#transform}.
|
13625 | * @param v3 3rd argument to {@link PipeTransform#transform}.
|
13626 | * @param v4 4th argument to {@link PipeTransform#transform}.
|
13627 | *
|
13628 | * @codeGenApi
|
13629 | */
|
13630 | export declare function ɵɵpipeBind4(index: number, slotOffset: number, v1: any, v2: any, v3: any, v4: any): any;
|
13631 |
|
13632 | /**
|
13633 | * Invokes a pipe with variable number of arguments.
|
13634 | *
|
13635 | * This instruction acts as a guard to {@link PipeTransform#transform} invoking
|
13636 | * the pipe only when an input to the pipe changes.
|
13637 | *
|
13638 | * @param index Pipe index where the pipe was stored on creation.
|
13639 | * @param slotOffset the offset in the reserved slot space
|
13640 | * @param values Array of arguments to pass to {@link PipeTransform#transform} method.
|
13641 | *
|
13642 | * @codeGenApi
|
13643 | */
|
13644 | export declare function ɵɵpipeBindV(index: number, slotOffset: number, values: [any, ...any[]]): any;
|
13645 |
|
13646 | /**
|
13647 | * @publicApi
|
13648 | */
|
13649 | export declare type ɵɵPipeDeclaration<T, Name extends string> = unknown;
|
13650 |
|
13651 | /**
|
13652 | * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call
|
13653 | * to the projectionDef instruction.
|
13654 | *
|
13655 | * @param nodeIndex
|
13656 | * @param selectorIndex:
|
13657 | * - 0 when the selector is `*` (or unspecified as this is the default value),
|
13658 | * - 1 based index of the selector from the {@link projectionDef}
|
13659 | *
|
13660 | * @codeGenApi
|
13661 | */
|
13662 | export declare function ɵɵprojection(nodeIndex: number, selectorIndex?: number, attrs?: TAttributes): void;
|
13663 |
|
13664 | /**
|
13665 | * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.
|
13666 | * It takes all the selectors from the entire component's template and decides where
|
13667 | * each projected node belongs (it re-distributes nodes among "buckets" where each "bucket" is
|
13668 | * backed by a selector).
|
13669 | *
|
13670 | * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text,
|
13671 | * un-parsed form.
|
13672 | *
|
13673 | * The parsed form is needed for efficient matching of a node against a given CSS selector.
|
13674 | * The un-parsed, textual form is needed for support of the ngProjectAs attribute.
|
13675 | *
|
13676 | * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more
|
13677 | * drawbacks:
|
13678 | * - having only a textual form would require runtime parsing of CSS selectors;
|
13679 | * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a
|
13680 | * template author).
|
13681 | *
|
13682 | * @param projectionSlots? A collection of projection slots. A projection slot can be based
|
13683 | * on a parsed CSS selectors or set to the wildcard selector ("*") in order to match
|
13684 | * all nodes which do not match any selector. If not specified, a single wildcard
|
13685 | * selector projection slot will be defined.
|
13686 | *
|
13687 | * @codeGenApi
|
13688 | */
|
13689 | export declare function ɵɵprojectionDef(projectionSlots?: ProjectionSlots): void;
|
13690 |
|
13691 | /**
|
13692 | * Update a property on a selected element.
|
13693 | *
|
13694 | * Operates on the element selected by index via the {@link select} instruction.
|
13695 | *
|
13696 | * If the property name also exists as an input property on one of the element's directives,
|
13697 | * the component property will be set instead of the element property. This check must
|
13698 | * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled
|
13699 | *
|
13700 | * @param propName Name of property. Because it is going to DOM, this is not subject to
|
13701 | * renaming as part of minification.
|
13702 | * @param value New value to write.
|
13703 | * @param sanitizer An optional function used to sanitize the value.
|
13704 | * @returns This function returns itself so that it may be chained
|
13705 | * (e.g. `property('name', ctx.name)('title', ctx.title)`)
|
13706 | *
|
13707 | * @codeGenApi
|
13708 | */
|
13709 | export declare function ɵɵproperty<T>(propName: string, value: T, sanitizer?: SanitizerFn | null): typeof ɵɵproperty;
|
13710 |
|
13711 | /**
|
13712 | *
|
13713 | * Update an interpolated property on an element with a lone bound value
|
13714 | *
|
13715 | * Used when the value passed to a property has 1 interpolated value in it, an no additional text
|
13716 | * surrounds that interpolated value:
|
13717 | *
|
13718 | * ```html
|
13719 | * <div title="{{v0}}"></div>
|
13720 | * ```
|
13721 | *
|
13722 | * Its compiled representation is::
|
13723 | *
|
13724 | * ```ts
|
13725 | * ɵɵpropertyInterpolate('title', v0);
|
13726 | * ```
|
13727 | *
|
13728 | * If the property name also exists as an input property on one of the element's directives,
|
13729 | * the component property will be set instead of the element property. This check must
|
13730 | * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
|
13731 | *
|
13732 | * @param propName The name of the property to update
|
13733 | * @param prefix Static value used for concatenation only.
|
13734 | * @param v0 Value checked for change.
|
13735 | * @param suffix Static value used for concatenation only.
|
13736 | * @param sanitizer An optional sanitizer function
|
13737 | * @returns itself, so that it may be chained.
|
13738 | * @codeGenApi
|
13739 | */
|
13740 | export declare function ɵɵpropertyInterpolate(propName: string, v0: any, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate;
|
13741 |
|
13742 | /**
|
13743 | *
|
13744 | * Update an interpolated property on an element with single bound value surrounded by text.
|
13745 | *
|
13746 | * Used when the value passed to a property has 1 interpolated value in it:
|
13747 | *
|
13748 | * ```html
|
13749 | * <div title="prefix{{v0}}suffix"></div>
|
13750 | * ```
|
13751 | *
|
13752 | * Its compiled representation is::
|
13753 | *
|
13754 | * ```ts
|
13755 | * ɵɵpropertyInterpolate1('title', 'prefix', v0, 'suffix');
|
13756 | * ```
|
13757 | *
|
13758 | * If the property name also exists as an input property on one of the element's directives,
|
13759 | * the component property will be set instead of the element property. This check must
|
13760 | * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
|
13761 | *
|
13762 | * @param propName The name of the property to update
|
13763 | * @param prefix Static value used for concatenation only.
|
13764 | * @param v0 Value checked for change.
|
13765 | * @param suffix Static value used for concatenation only.
|
13766 | * @param sanitizer An optional sanitizer function
|
13767 | * @returns itself, so that it may be chained.
|
13768 | * @codeGenApi
|
13769 | */
|
13770 | export declare function ɵɵpropertyInterpolate1(propName: string, prefix: string, v0: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate1;
|
13771 |
|
13772 | /**
|
13773 | *
|
13774 | * Update an interpolated property on an element with 2 bound values surrounded by text.
|
13775 | *
|
13776 | * Used when the value passed to a property has 2 interpolated values in it:
|
13777 | *
|
13778 | * ```html
|
13779 | * <div title="prefix{{v0}}-{{v1}}suffix"></div>
|
13780 | * ```
|
13781 | *
|
13782 | * Its compiled representation is::
|
13783 | *
|
13784 | * ```ts
|
13785 | * ɵɵpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');
|
13786 | * ```
|
13787 | *
|
13788 | * If the property name also exists as an input property on one of the element's directives,
|
13789 | * the component property will be set instead of the element property. This check must
|
13790 | * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
|
13791 | *
|
13792 | * @param propName The name of the property to update
|
13793 | * @param prefix Static value used for concatenation only.
|
13794 | * @param v0 Value checked for change.
|
13795 | * @param i0 Static value used for concatenation only.
|
13796 | * @param v1 Value checked for change.
|
13797 | * @param suffix Static value used for concatenation only.
|
13798 | * @param sanitizer An optional sanitizer function
|
13799 | * @returns itself, so that it may be chained.
|
13800 | * @codeGenApi
|
13801 | */
|
13802 | export declare function ɵɵpropertyInterpolate2(propName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate2;
|
13803 |
|
13804 | /**
|
13805 | *
|
13806 | * Update an interpolated property on an element with 3 bound values surrounded by text.
|
13807 | *
|
13808 | * Used when the value passed to a property has 3 interpolated values in it:
|
13809 | *
|
13810 | * ```html
|
13811 | * <div title="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
|
13812 | * ```
|
13813 | *
|
13814 | * Its compiled representation is::
|
13815 | *
|
13816 | * ```ts
|
13817 | * ɵɵpropertyInterpolate3(
|
13818 | * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');
|
13819 | * ```
|
13820 | *
|
13821 | * If the property name also exists as an input property on one of the element's directives,
|
13822 | * the component property will be set instead of the element property. This check must
|
13823 | * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
|
13824 | *
|
13825 | * @param propName The name of the property to update
|
13826 | * @param prefix Static value used for concatenation only.
|
13827 | * @param v0 Value checked for change.
|
13828 | * @param i0 Static value used for concatenation only.
|
13829 | * @param v1 Value checked for change.
|
13830 | * @param i1 Static value used for concatenation only.
|
13831 | * @param v2 Value checked for change.
|
13832 | * @param suffix Static value used for concatenation only.
|
13833 | * @param sanitizer An optional sanitizer function
|
13834 | * @returns itself, so that it may be chained.
|
13835 | * @codeGenApi
|
13836 | */
|
13837 | export declare function ɵɵpropertyInterpolate3(propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate3;
|
13838 |
|
13839 | /**
|
13840 | *
|
13841 | * Update an interpolated property on an element with 4 bound values surrounded by text.
|
13842 | *
|
13843 | * Used when the value passed to a property has 4 interpolated values in it:
|
13844 | *
|
13845 | * ```html
|
13846 | * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
|
13847 | * ```
|
13848 | *
|
13849 | * Its compiled representation is::
|
13850 | *
|
13851 | * ```ts
|
13852 | * ɵɵpropertyInterpolate4(
|
13853 | * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
|
13854 | * ```
|
13855 | *
|
13856 | * If the property name also exists as an input property on one of the element's directives,
|
13857 | * the component property will be set instead of the element property. This check must
|
13858 | * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
|
13859 | *
|
13860 | * @param propName The name of the property to update
|
13861 | * @param prefix Static value used for concatenation only.
|
13862 | * @param v0 Value checked for change.
|
13863 | * @param i0 Static value used for concatenation only.
|
13864 | * @param v1 Value checked for change.
|
13865 | * @param i1 Static value used for concatenation only.
|
13866 | * @param v2 Value checked for change.
|
13867 | * @param i2 Static value used for concatenation only.
|
13868 | * @param v3 Value checked for change.
|
13869 | * @param suffix Static value used for concatenation only.
|
13870 | * @param sanitizer An optional sanitizer function
|
13871 | * @returns itself, so that it may be chained.
|
13872 | * @codeGenApi
|
13873 | */
|
13874 | export declare function ɵɵpropertyInterpolate4(propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate4;
|
13875 |
|
13876 | /**
|
13877 | *
|
13878 | * Update an interpolated property on an element with 5 bound values surrounded by text.
|
13879 | *
|
13880 | * Used when the value passed to a property has 5 interpolated values in it:
|
13881 | *
|
13882 | * ```html
|
13883 | * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
|
13884 | * ```
|
13885 | *
|
13886 | * Its compiled representation is::
|
13887 | *
|
13888 | * ```ts
|
13889 | * ɵɵpropertyInterpolate5(
|
13890 | * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
|
13891 | * ```
|
13892 | *
|
13893 | * If the property name also exists as an input property on one of the element's directives,
|
13894 | * the component property will be set instead of the element property. This check must
|
13895 | * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
|
13896 | *
|
13897 | * @param propName The name of the property to update
|
13898 | * @param prefix Static value used for concatenation only.
|
13899 | * @param v0 Value checked for change.
|
13900 | * @param i0 Static value used for concatenation only.
|
13901 | * @param v1 Value checked for change.
|
13902 | * @param i1 Static value used for concatenation only.
|
13903 | * @param v2 Value checked for change.
|
13904 | * @param i2 Static value used for concatenation only.
|
13905 | * @param v3 Value checked for change.
|
13906 | * @param i3 Static value used for concatenation only.
|
13907 | * @param v4 Value checked for change.
|
13908 | * @param suffix Static value used for concatenation only.
|
13909 | * @param sanitizer An optional sanitizer function
|
13910 | * @returns itself, so that it may be chained.
|
13911 | * @codeGenApi
|
13912 | */
|
13913 | export declare function ɵɵpropertyInterpolate5(propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate5;
|
13914 |
|
13915 | /**
|
13916 | *
|
13917 | * Update an interpolated property on an element with 6 bound values surrounded by text.
|
13918 | *
|
13919 | * Used when the value passed to a property has 6 interpolated values in it:
|
13920 | *
|
13921 | * ```html
|
13922 | * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
|
13923 | * ```
|
13924 | *
|
13925 | * Its compiled representation is::
|
13926 | *
|
13927 | * ```ts
|
13928 | * ɵɵpropertyInterpolate6(
|
13929 | * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
|
13930 | * ```
|
13931 | *
|
13932 | * If the property name also exists as an input property on one of the element's directives,
|
13933 | * the component property will be set instead of the element property. This check must
|
13934 | * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
|
13935 | *
|
13936 | * @param propName The name of the property to update
|
13937 | * @param prefix Static value used for concatenation only.
|
13938 | * @param v0 Value checked for change.
|
13939 | * @param i0 Static value used for concatenation only.
|
13940 | * @param v1 Value checked for change.
|
13941 | * @param i1 Static value used for concatenation only.
|
13942 | * @param v2 Value checked for change.
|
13943 | * @param i2 Static value used for concatenation only.
|
13944 | * @param v3 Value checked for change.
|
13945 | * @param i3 Static value used for concatenation only.
|
13946 | * @param v4 Value checked for change.
|
13947 | * @param i4 Static value used for concatenation only.
|
13948 | * @param v5 Value checked for change.
|
13949 | * @param suffix Static value used for concatenation only.
|
13950 | * @param sanitizer An optional sanitizer function
|
13951 | * @returns itself, so that it may be chained.
|
13952 | * @codeGenApi
|
13953 | */
|
13954 | export declare function ɵɵpropertyInterpolate6(propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate6;
|
13955 |
|
13956 | /**
|
13957 | *
|
13958 | * Update an interpolated property on an element with 7 bound values surrounded by text.
|
13959 | *
|
13960 | * Used when the value passed to a property has 7 interpolated values in it:
|
13961 | *
|
13962 | * ```html
|
13963 | * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
|
13964 | * ```
|
13965 | *
|
13966 | * Its compiled representation is::
|
13967 | *
|
13968 | * ```ts
|
13969 | * ɵɵpropertyInterpolate7(
|
13970 | * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
|
13971 | * ```
|
13972 | *
|
13973 | * If the property name also exists as an input property on one of the element's directives,
|
13974 | * the component property will be set instead of the element property. This check must
|
13975 | * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
|
13976 | *
|
13977 | * @param propName The name of the property to update
|
13978 | * @param prefix Static value used for concatenation only.
|
13979 | * @param v0 Value checked for change.
|
13980 | * @param i0 Static value used for concatenation only.
|
13981 | * @param v1 Value checked for change.
|
13982 | * @param i1 Static value used for concatenation only.
|
13983 | * @param v2 Value checked for change.
|
13984 | * @param i2 Static value used for concatenation only.
|
13985 | * @param v3 Value checked for change.
|
13986 | * @param i3 Static value used for concatenation only.
|
13987 | * @param v4 Value checked for change.
|
13988 | * @param i4 Static value used for concatenation only.
|
13989 | * @param v5 Value checked for change.
|
13990 | * @param i5 Static value used for concatenation only.
|
13991 | * @param v6 Value checked for change.
|
13992 | * @param suffix Static value used for concatenation only.
|
13993 | * @param sanitizer An optional sanitizer function
|
13994 | * @returns itself, so that it may be chained.
|
13995 | * @codeGenApi
|
13996 | */
|
13997 | export declare function ɵɵpropertyInterpolate7(propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate7;
|
13998 |
|
13999 | /**
|
14000 | *
|
14001 | * Update an interpolated property on an element with 8 bound values surrounded by text.
|
14002 | *
|
14003 | * Used when the value passed to a property has 8 interpolated values in it:
|
14004 | *
|
14005 | * ```html
|
14006 | * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
|
14007 | * ```
|
14008 | *
|
14009 | * Its compiled representation is::
|
14010 | *
|
14011 | * ```ts
|
14012 | * ɵɵpropertyInterpolate8(
|
14013 | * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
|
14014 | * ```
|
14015 | *
|
14016 | * If the property name also exists as an input property on one of the element's directives,
|
14017 | * the component property will be set instead of the element property. This check must
|
14018 | * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
|
14019 | *
|
14020 | * @param propName The name of the property to update
|
14021 | * @param prefix Static value used for concatenation only.
|
14022 | * @param v0 Value checked for change.
|
14023 | * @param i0 Static value used for concatenation only.
|
14024 | * @param v1 Value checked for change.
|
14025 | * @param i1 Static value used for concatenation only.
|
14026 | * @param v2 Value checked for change.
|
14027 | * @param i2 Static value used for concatenation only.
|
14028 | * @param v3 Value checked for change.
|
14029 | * @param i3 Static value used for concatenation only.
|
14030 | * @param v4 Value checked for change.
|
14031 | * @param i4 Static value used for concatenation only.
|
14032 | * @param v5 Value checked for change.
|
14033 | * @param i5 Static value used for concatenation only.
|
14034 | * @param v6 Value checked for change.
|
14035 | * @param i6 Static value used for concatenation only.
|
14036 | * @param v7 Value checked for change.
|
14037 | * @param suffix Static value used for concatenation only.
|
14038 | * @param sanitizer An optional sanitizer function
|
14039 | * @returns itself, so that it may be chained.
|
14040 | * @codeGenApi
|
14041 | */
|
14042 | export declare function ɵɵpropertyInterpolate8(propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate8;
|
14043 |
|
14044 | /**
|
14045 | * Update an interpolated property on an element with 9 or more bound values surrounded by text.
|
14046 | *
|
14047 | * Used when the number of interpolated values exceeds 8.
|
14048 | *
|
14049 | * ```html
|
14050 | * <div
|
14051 | * title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div>
|
14052 | * ```
|
14053 | *
|
14054 | * Its compiled representation is::
|
14055 | *
|
14056 | * ```ts
|
14057 | * ɵɵpropertyInterpolateV(
|
14058 | * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
|
14059 | * 'suffix']);
|
14060 | * ```
|
14061 | *
|
14062 | * If the property name also exists as an input property on one of the element's directives,
|
14063 | * the component property will be set instead of the element property. This check must
|
14064 | * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
|
14065 | *
|
14066 | * @param propName The name of the property to update.
|
14067 | * @param values The collection of values and the strings inbetween those values, beginning with a
|
14068 | * string prefix and ending with a string suffix.
|
14069 | * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
|
14070 | * @param sanitizer An optional sanitizer function
|
14071 | * @returns itself, so that it may be chained.
|
14072 | * @codeGenApi
|
14073 | */
|
14074 | export declare function ɵɵpropertyInterpolateV(propName: string, values: any[], sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolateV;
|
14075 |
|
14076 | /**
|
14077 | * This feature resolves the providers of a directive (or component),
|
14078 | * and publish them into the DI system, making it visible to others for injection.
|
14079 | *
|
14080 | * For example:
|
14081 | * ```ts
|
14082 | * class ComponentWithProviders {
|
14083 | * constructor(private greeter: GreeterDE) {}
|
14084 | *
|
14085 | * static ɵcmp = defineComponent({
|
14086 | * type: ComponentWithProviders,
|
14087 | * selectors: [['component-with-providers']],
|
14088 | * factory: () => new ComponentWithProviders(directiveInject(GreeterDE as any)),
|
14089 | * decls: 1,
|
14090 | * vars: 1,
|
14091 | * template: function(fs: RenderFlags, ctx: ComponentWithProviders) {
|
14092 | * if (fs & RenderFlags.Create) {
|
14093 | * ɵɵtext(0);
|
14094 | * }
|
14095 | * if (fs & RenderFlags.Update) {
|
14096 | * ɵɵtextInterpolate(ctx.greeter.greet());
|
14097 | * }
|
14098 | * },
|
14099 | * features: [ɵɵProvidersFeature([GreeterDE])]
|
14100 | * });
|
14101 | * }
|
14102 | * ```
|
14103 | *
|
14104 | * @param definition
|
14105 | *
|
14106 | * @codeGenApi
|
14107 | */
|
14108 | export declare function ɵɵProvidersFeature<T>(providers: Provider[], viewProviders?: Provider[]): (definition: ɵDirectiveDef<T>) => void;
|
14109 |
|
14110 | /**
|
14111 | * Bindings for pure functions are stored after regular bindings.
|
14112 | *
|
14113 | * |-------decls------|---------vars---------| |----- hostVars (dir1) ------|
|
14114 | * ------------------------------------------------------------------------------------------
|
14115 | * | nodes/refs/pipes | bindings | fn slots | injector | dir1 | host bindings | host slots |
|
14116 | * ------------------------------------------------------------------------------------------
|
14117 | * ^ ^
|
14118 | * TView.bindingStartIndex TView.expandoStartIndex
|
14119 | *
|
14120 | * Pure function instructions are given an offset from the binding root. Adding the offset to the
|
14121 | * binding root gives the first index where the bindings are stored. In component views, the binding
|
14122 | * root is the bindingStartIndex. In host bindings, the binding root is the expandoStartIndex +
|
14123 | * any directive instances + any hostVars in directives evaluated before it.
|
14124 | *
|
14125 | * See VIEW_DATA.md for more information about host binding resolution.
|
14126 | */
|
14127 | /**
|
14128 | * If the value hasn't been saved, calls the pure function to store and return the
|
14129 | * value. If it has been saved, returns the saved value.
|
14130 | *
|
14131 | * @param slotOffset the offset from binding root to the reserved slot
|
14132 | * @param pureFn Function that returns a value
|
14133 | * @param thisArg Optional calling context of pureFn
|
14134 | * @returns value
|
14135 | *
|
14136 | * @codeGenApi
|
14137 | */
|
14138 | export declare function ɵɵpureFunction0<T>(slotOffset: number, pureFn: () => T, thisArg?: any): T;
|
14139 |
|
14140 | /**
|
14141 | * If the value of the provided exp has changed, calls the pure function to return
|
14142 | * an updated value. Or if the value has not changed, returns cached value.
|
14143 | *
|
14144 | * @param slotOffset the offset from binding root to the reserved slot
|
14145 | * @param pureFn Function that returns an updated value
|
14146 | * @param exp Updated expression value
|
14147 | * @param thisArg Optional calling context of pureFn
|
14148 | * @returns Updated or cached value
|
14149 | *
|
14150 | * @codeGenApi
|
14151 | */
|
14152 | export declare function ɵɵpureFunction1(slotOffset: number, pureFn: (v: any) => any, exp: any, thisArg?: any): any;
|
14153 |
|
14154 | /**
|
14155 | * If the value of any provided exp has changed, calls the pure function to return
|
14156 | * an updated value. Or if no values have changed, returns cached value.
|
14157 | *
|
14158 | * @param slotOffset the offset from binding root to the reserved slot
|
14159 | * @param pureFn
|
14160 | * @param exp1
|
14161 | * @param exp2
|
14162 | * @param thisArg Optional calling context of pureFn
|
14163 | * @returns Updated or cached value
|
14164 | *
|
14165 | * @codeGenApi
|
14166 | */
|
14167 | export declare function ɵɵpureFunction2(slotOffset: number, pureFn: (v1: any, v2: any) => any, exp1: any, exp2: any, thisArg?: any): any;
|
14168 |
|
14169 | /**
|
14170 | * If the value of any provided exp has changed, calls the pure function to return
|
14171 | * an updated value. Or if no values have changed, returns cached value.
|
14172 | *
|
14173 | * @param slotOffset the offset from binding root to the reserved slot
|
14174 | * @param pureFn
|
14175 | * @param exp1
|
14176 | * @param exp2
|
14177 | * @param exp3
|
14178 | * @param thisArg Optional calling context of pureFn
|
14179 | * @returns Updated or cached value
|
14180 | *
|
14181 | * @codeGenApi
|
14182 | */
|
14183 | export declare function ɵɵpureFunction3(slotOffset: number, pureFn: (v1: any, v2: any, v3: any) => any, exp1: any, exp2: any, exp3: any, thisArg?: any): any;
|
14184 |
|
14185 | /**
|
14186 | * If the value of any provided exp has changed, calls the pure function to return
|
14187 | * an updated value. Or if no values have changed, returns cached value.
|
14188 | *
|
14189 | * @param slotOffset the offset from binding root to the reserved slot
|
14190 | * @param pureFn
|
14191 | * @param exp1
|
14192 | * @param exp2
|
14193 | * @param exp3
|
14194 | * @param exp4
|
14195 | * @param thisArg Optional calling context of pureFn
|
14196 | * @returns Updated or cached value
|
14197 | *
|
14198 | * @codeGenApi
|
14199 | */
|
14200 | export declare function ɵɵpureFunction4(slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, thisArg?: any): any;
|
14201 |
|
14202 | /**
|
14203 | * If the value of any provided exp has changed, calls the pure function to return
|
14204 | * an updated value. Or if no values have changed, returns cached value.
|
14205 | *
|
14206 | * @param slotOffset the offset from binding root to the reserved slot
|
14207 | * @param pureFn
|
14208 | * @param exp1
|
14209 | * @param exp2
|
14210 | * @param exp3
|
14211 | * @param exp4
|
14212 | * @param exp5
|
14213 | * @param thisArg Optional calling context of pureFn
|
14214 | * @returns Updated or cached value
|
14215 | *
|
14216 | * @codeGenApi
|
14217 | */
|
14218 | export declare function ɵɵpureFunction5(slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, thisArg?: any): any;
|
14219 |
|
14220 | /**
|
14221 | * If the value of any provided exp has changed, calls the pure function to return
|
14222 | * an updated value. Or if no values have changed, returns cached value.
|
14223 | *
|
14224 | * @param slotOffset the offset from binding root to the reserved slot
|
14225 | * @param pureFn
|
14226 | * @param exp1
|
14227 | * @param exp2
|
14228 | * @param exp3
|
14229 | * @param exp4
|
14230 | * @param exp5
|
14231 | * @param exp6
|
14232 | * @param thisArg Optional calling context of pureFn
|
14233 | * @returns Updated or cached value
|
14234 | *
|
14235 | * @codeGenApi
|
14236 | */
|
14237 | export declare function ɵɵpureFunction6(slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, thisArg?: any): any;
|
14238 |
|
14239 | /**
|
14240 | * If the value of any provided exp has changed, calls the pure function to return
|
14241 | * an updated value. Or if no values have changed, returns cached value.
|
14242 | *
|
14243 | * @param slotOffset the offset from binding root to the reserved slot
|
14244 | * @param pureFn
|
14245 | * @param exp1
|
14246 | * @param exp2
|
14247 | * @param exp3
|
14248 | * @param exp4
|
14249 | * @param exp5
|
14250 | * @param exp6
|
14251 | * @param exp7
|
14252 | * @param thisArg Optional calling context of pureFn
|
14253 | * @returns Updated or cached value
|
14254 | *
|
14255 | * @codeGenApi
|
14256 | */
|
14257 | export declare function ɵɵpureFunction7(slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, thisArg?: any): any;
|
14258 |
|
14259 | /**
|
14260 | * If the value of any provided exp has changed, calls the pure function to return
|
14261 | * an updated value. Or if no values have changed, returns cached value.
|
14262 | *
|
14263 | * @param slotOffset the offset from binding root to the reserved slot
|
14264 | * @param pureFn
|
14265 | * @param exp1
|
14266 | * @param exp2
|
14267 | * @param exp3
|
14268 | * @param exp4
|
14269 | * @param exp5
|
14270 | * @param exp6
|
14271 | * @param exp7
|
14272 | * @param exp8
|
14273 | * @param thisArg Optional calling context of pureFn
|
14274 | * @returns Updated or cached value
|
14275 | *
|
14276 | * @codeGenApi
|
14277 | */
|
14278 | export declare function ɵɵpureFunction8(slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any, v8: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, exp8: any, thisArg?: any): any;
|
14279 |
|
14280 | /**
|
14281 | * pureFunction instruction that can support any number of bindings.
|
14282 | *
|
14283 | * If the value of any provided exp has changed, calls the pure function to return
|
14284 | * an updated value. Or if no values have changed, returns cached value.
|
14285 | *
|
14286 | * @param slotOffset the offset from binding root to the reserved slot
|
14287 | * @param pureFn A pure function that takes binding values and builds an object or array
|
14288 | * containing those values.
|
14289 | * @param exps An array of binding values
|
14290 | * @param thisArg Optional calling context of pureFn
|
14291 | * @returns Updated or cached value
|
14292 | *
|
14293 | * @codeGenApi
|
14294 | */
|
14295 | export declare function ɵɵpureFunctionV(slotOffset: number, pureFn: (...v: any[]) => any, exps: any[], thisArg?: any): any;
|
14296 |
|
14297 | /**
|
14298 | * Refreshes a query by combining matches from all active views and removing matches from deleted
|
14299 | * views.
|
14300 | *
|
14301 | * @returns `true` if a query got dirty during change detection or if this is a static query
|
14302 | * resolving in creation mode, `false` otherwise.
|
14303 | *
|
14304 | * @codeGenApi
|
14305 | */
|
14306 | export declare function ɵɵqueryRefresh(queryList: QueryList<any>): boolean;
|
14307 |
|
14308 | /**
|
14309 | * Retrieves a local reference from the current contextViewData.
|
14310 | *
|
14311 | * If the reference to retrieve is in a parent view, this instruction is used in conjunction
|
14312 | * with a nextContext() call, which walks up the tree and updates the contextViewData instance.
|
14313 | *
|
14314 | * @param index The index of the local ref in contextViewData.
|
14315 | *
|
14316 | * @codeGenApi
|
14317 | */
|
14318 | export declare function ɵɵreference<T>(index: number): T;
|
14319 |
|
14320 | /**
|
14321 | *
|
14322 | * @codeGenApi
|
14323 | */
|
14324 | export declare function ɵɵresolveBody(element: RElement & {
|
14325 | ownerDocument: Document;
|
14326 | }): HTMLElement;
|
14327 |
|
14328 | /**
|
14329 | *
|
14330 | * @codeGenApi
|
14331 | */
|
14332 | export declare function ɵɵresolveDocument(element: RElement & {
|
14333 | ownerDocument: Document;
|
14334 | }): Document;
|
14335 |
|
14336 | /**
|
14337 | *
|
14338 | * @codeGenApi
|
14339 | */
|
14340 | export declare function ɵɵresolveWindow(element: RElement & {
|
14341 | ownerDocument: Document;
|
14342 | }): (Window & typeof globalThis) | null;
|
14343 |
|
14344 | /**
|
14345 | * Restores `contextViewData` to the given OpaqueViewState instance.
|
14346 | *
|
14347 | * Used in conjunction with the getCurrentView() instruction to save a snapshot
|
14348 | * of the current view and restore it when listeners are invoked. This allows
|
14349 | * walking the declaration view tree in listeners to get vars from parent views.
|
14350 | *
|
14351 | * @param viewToRestore The OpaqueViewState instance to restore.
|
14352 | * @returns Context of the restored OpaqueViewState instance.
|
14353 | *
|
14354 | * @codeGenApi
|
14355 | */
|
14356 | export declare function ɵɵrestoreView<T = any>(viewToRestore: OpaqueViewState): T;
|
14357 |
|
14358 | /**
|
14359 | * An `html` sanitizer which converts untrusted `html` **string** into trusted string by removing
|
14360 | * dangerous content.
|
14361 | *
|
14362 | * This method parses the `html` and locates potentially dangerous content (such as urls and
|
14363 | * javascript) and removes it.
|
14364 | *
|
14365 | * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}.
|
14366 | *
|
14367 | * @param unsafeHtml untrusted `html`, typically from the user.
|
14368 | * @returns `html` string which is safe to display to user, because all of the dangerous javascript
|
14369 | * and urls have been removed.
|
14370 | *
|
14371 | * @codeGenApi
|
14372 | */
|
14373 | export declare function ɵɵsanitizeHtml(unsafeHtml: any): TrustedHTML | string;
|
14374 |
|
14375 | /**
|
14376 | * A `url` sanitizer which only lets trusted `url`s through.
|
14377 | *
|
14378 | * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}.
|
14379 | *
|
14380 | * @param unsafeResourceUrl untrusted `url`, typically from the user.
|
14381 | * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because
|
14382 | * only trusted `url`s have been allowed to pass.
|
14383 | *
|
14384 | * @codeGenApi
|
14385 | */
|
14386 | export declare function ɵɵsanitizeResourceUrl(unsafeResourceUrl: any): TrustedScriptURL | string;
|
14387 |
|
14388 | /**
|
14389 | * A `script` sanitizer which only lets trusted javascript through.
|
14390 | *
|
14391 | * This passes only `script`s marked trusted by calling {@link
|
14392 | * bypassSanitizationTrustScript}.
|
14393 | *
|
14394 | * @param unsafeScript untrusted `script`, typically from the user.
|
14395 | * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`,
|
14396 | * because only trusted `scripts` have been allowed to pass.
|
14397 | *
|
14398 | * @codeGenApi
|
14399 | */
|
14400 | export declare function ɵɵsanitizeScript(unsafeScript: any): TrustedScript | string;
|
14401 |
|
14402 | /**
|
14403 | * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing
|
14404 | * dangerous content.
|
14405 | *
|
14406 | * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustStyle}.
|
14407 | *
|
14408 | * @param unsafeStyle untrusted `style`, typically from the user.
|
14409 | * @returns `style` string which is safe to bind to the `style` properties.
|
14410 | *
|
14411 | * @codeGenApi
|
14412 | */
|
14413 | export declare function ɵɵsanitizeStyle(unsafeStyle: any): string;
|
14414 |
|
14415 | /**
|
14416 | * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing
|
14417 | * dangerous
|
14418 | * content.
|
14419 | *
|
14420 | * This method parses the `url` and locates potentially dangerous content (such as javascript) and
|
14421 | * removes it.
|
14422 | *
|
14423 | * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}.
|
14424 | *
|
14425 | * @param unsafeUrl untrusted `url`, typically from the user.
|
14426 | * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because
|
14427 | * all of the dangerous javascript has been removed.
|
14428 | *
|
14429 | * @codeGenApi
|
14430 | */
|
14431 | export declare function ɵɵsanitizeUrl(unsafeUrl: any): string;
|
14432 |
|
14433 | /**
|
14434 | * Sanitizes URL, selecting sanitizer function based on tag and property names.
|
14435 | *
|
14436 | * This function is used in case we can't define security context at compile time, when only prop
|
14437 | * name is available. This happens when we generate host bindings for Directives/Components. The
|
14438 | * host element is unknown at compile time, so we defer calculation of specific sanitizer to
|
14439 | * runtime.
|
14440 | *
|
14441 | * @param unsafeUrl untrusted `url`, typically from the user.
|
14442 | * @param tag target element tag name.
|
14443 | * @param prop name of the property that contains the value.
|
14444 | * @returns `url` string which is safe to bind.
|
14445 | *
|
14446 | * @codeGenApi
|
14447 | */
|
14448 | export declare function ɵɵsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string, prop: string): any;
|
14449 |
|
14450 | /**
|
14451 | * Generated next to NgModules to monkey-patch directive and pipe references onto a component's
|
14452 | * definition, when generating a direct reference in the component file would otherwise create an
|
14453 | * import cycle.
|
14454 | *
|
14455 | * See [this explanation](https://hackmd.io/Odw80D0pR6yfsOjg_7XCJg?view) for more details.
|
14456 | *
|
14457 | * @codeGenApi
|
14458 | */
|
14459 | export declare function ɵɵsetComponentScope(type: ɵComponentType<any>, directives: Type<any>[], pipes: Type<any>[]): void;
|
14460 |
|
14461 | /**
|
14462 | * Adds the module metadata that is necessary to compute the module's transitive scope to an
|
14463 | * existing module definition.
|
14464 | *
|
14465 | * Scope metadata of modules is not used in production builds, so calls to this function can be
|
14466 | * marked pure to tree-shake it from the bundle, allowing for all referenced declarations
|
14467 | * to become eligible for tree-shaking as well.
|
14468 | *
|
14469 | * @codeGenApi
|
14470 | */
|
14471 | export declare function ɵɵsetNgModuleScope(type: any, scope: {
|
14472 | /** List of components, directives, and pipes declared by this module. */
|
14473 | declarations?: Type<any>[] | (() => Type<any>[]);
|
14474 | /** List of modules or `ModuleWithProviders` imported by this module. */
|
14475 | imports?: Type<any>[] | (() => Type<any>[]);
|
14476 | /**
|
14477 | * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this
|
14478 | * module.
|
14479 | */
|
14480 | exports?: Type<any>[] | (() => Type<any>[]);
|
14481 | }): unknown;
|
14482 |
|
14483 | /**
|
14484 | * Update style bindings using an object literal on an element.
|
14485 | *
|
14486 | * This instruction is meant to apply styling via the `[style]="exp"` template bindings.
|
14487 | * When styles are applied to the element they will then be updated with respect to
|
14488 | * any styles/classes set via `styleProp`. If any styles are set to falsy
|
14489 | * then they will be removed from the element.
|
14490 | *
|
14491 | * Note that the styling instruction will not be applied until `stylingApply` is called.
|
14492 | *
|
14493 | * @param styles A key/value style map of the styles that will be applied to the given element.
|
14494 | * Any missing styles (that have already been applied to the element beforehand) will be
|
14495 | * removed (unset) from the element's styling.
|
14496 | *
|
14497 | * Note that this will apply the provided styleMap value to the host element if this function
|
14498 | * is called within a host binding.
|
14499 | *
|
14500 | * @codeGenApi
|
14501 | */
|
14502 | export declare function ɵɵstyleMap(styles: {
|
14503 | [styleName: string]: any;
|
14504 | } | string | undefined | null): void;
|
14505 |
|
14506 |
|
14507 | /**
|
14508 | *
|
14509 | * Update an interpolated style on an element with single bound value surrounded by text.
|
14510 | *
|
14511 | * Used when the value passed to a property has 1 interpolated value in it:
|
14512 | *
|
14513 | * ```html
|
14514 | * <div style="key: {{v0}}suffix"></div>
|
14515 | * ```
|
14516 | *
|
14517 | * Its compiled representation is:
|
14518 | *
|
14519 | * ```ts
|
14520 | * ɵɵstyleMapInterpolate1('key: ', v0, 'suffix');
|
14521 | * ```
|
14522 | *
|
14523 | * @param prefix Static value used for concatenation only.
|
14524 | * @param v0 Value checked for change.
|
14525 | * @param suffix Static value used for concatenation only.
|
14526 | * @codeGenApi
|
14527 | */
|
14528 | export declare function ɵɵstyleMapInterpolate1(prefix: string, v0: any, suffix: string): void;
|
14529 |
|
14530 | /**
|
14531 | *
|
14532 | * Update an interpolated style on an element with 2 bound values surrounded by text.
|
14533 | *
|
14534 | * Used when the value passed to a property has 2 interpolated values in it:
|
14535 | *
|
14536 | * ```html
|
14537 | * <div style="key: {{v0}}; key1: {{v1}}suffix"></div>
|
14538 | * ```
|
14539 | *
|
14540 | * Its compiled representation is:
|
14541 | *
|
14542 | * ```ts
|
14543 | * ɵɵstyleMapInterpolate2('key: ', v0, '; key1: ', v1, 'suffix');
|
14544 | * ```
|
14545 | *
|
14546 | * @param prefix Static value used for concatenation only.
|
14547 | * @param v0 Value checked for change.
|
14548 | * @param i0 Static value used for concatenation only.
|
14549 | * @param v1 Value checked for change.
|
14550 | * @param suffix Static value used for concatenation only.
|
14551 | * @codeGenApi
|
14552 | */
|
14553 | export declare function ɵɵstyleMapInterpolate2(prefix: string, v0: any, i0: string, v1: any, suffix: string): void;
|
14554 |
|
14555 | /**
|
14556 | *
|
14557 | * Update an interpolated style on an element with 3 bound values surrounded by text.
|
14558 | *
|
14559 | * Used when the value passed to a property has 3 interpolated values in it:
|
14560 | *
|
14561 | * ```html
|
14562 | * <div style="key: {{v0}}; key2: {{v1}}; key2: {{v2}}suffix"></div>
|
14563 | * ```
|
14564 | *
|
14565 | * Its compiled representation is:
|
14566 | *
|
14567 | * ```ts
|
14568 | * ɵɵstyleMapInterpolate3(
|
14569 | * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, 'suffix');
|
14570 | * ```
|
14571 | *
|
14572 | * @param prefix Static value used for concatenation only.
|
14573 | * @param v0 Value checked for change.
|
14574 | * @param i0 Static value used for concatenation only.
|
14575 | * @param v1 Value checked for change.
|
14576 | * @param i1 Static value used for concatenation only.
|
14577 | * @param v2 Value checked for change.
|
14578 | * @param suffix Static value used for concatenation only.
|
14579 | * @codeGenApi
|
14580 | */
|
14581 | export declare function ɵɵstyleMapInterpolate3(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): void;
|
14582 |
|
14583 | /**
|
14584 | *
|
14585 | * Update an interpolated style on an element with 4 bound values surrounded by text.
|
14586 | *
|
14587 | * Used when the value passed to a property has 4 interpolated values in it:
|
14588 | *
|
14589 | * ```html
|
14590 | * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}suffix"></div>
|
14591 | * ```
|
14592 | *
|
14593 | * Its compiled representation is:
|
14594 | *
|
14595 | * ```ts
|
14596 | * ɵɵstyleMapInterpolate4(
|
14597 | * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, 'suffix');
|
14598 | * ```
|
14599 | *
|
14600 | * @param prefix Static value used for concatenation only.
|
14601 | * @param v0 Value checked for change.
|
14602 | * @param i0 Static value used for concatenation only.
|
14603 | * @param v1 Value checked for change.
|
14604 | * @param i1 Static value used for concatenation only.
|
14605 | * @param v2 Value checked for change.
|
14606 | * @param i2 Static value used for concatenation only.
|
14607 | * @param v3 Value checked for change.
|
14608 | * @param suffix Static value used for concatenation only.
|
14609 | * @codeGenApi
|
14610 | */
|
14611 | export declare function ɵɵstyleMapInterpolate4(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string): void;
|
14612 |
|
14613 | /**
|
14614 | *
|
14615 | * Update an interpolated style on an element with 5 bound values surrounded by text.
|
14616 | *
|
14617 | * Used when the value passed to a property has 5 interpolated values in it:
|
14618 | *
|
14619 | * ```html
|
14620 | * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}suffix"></div>
|
14621 | * ```
|
14622 | *
|
14623 | * Its compiled representation is:
|
14624 | *
|
14625 | * ```ts
|
14626 | * ɵɵstyleMapInterpolate5(
|
14627 | * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, 'suffix');
|
14628 | * ```
|
14629 | *
|
14630 | * @param prefix Static value used for concatenation only.
|
14631 | * @param v0 Value checked for change.
|
14632 | * @param i0 Static value used for concatenation only.
|
14633 | * @param v1 Value checked for change.
|
14634 | * @param i1 Static value used for concatenation only.
|
14635 | * @param v2 Value checked for change.
|
14636 | * @param i2 Static value used for concatenation only.
|
14637 | * @param v3 Value checked for change.
|
14638 | * @param i3 Static value used for concatenation only.
|
14639 | * @param v4 Value checked for change.
|
14640 | * @param suffix Static value used for concatenation only.
|
14641 | * @codeGenApi
|
14642 | */
|
14643 | export declare function ɵɵstyleMapInterpolate5(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string): void;
|
14644 |
|
14645 | /**
|
14646 | *
|
14647 | * Update an interpolated style on an element with 6 bound values surrounded by text.
|
14648 | *
|
14649 | * Used when the value passed to a property has 6 interpolated values in it:
|
14650 | *
|
14651 | * ```html
|
14652 | * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}};
|
14653 | * key5: {{v5}}suffix"></div>
|
14654 | * ```
|
14655 | *
|
14656 | * Its compiled representation is:
|
14657 | *
|
14658 | * ```ts
|
14659 | * ɵɵstyleMapInterpolate6(
|
14660 | * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
|
14661 | * 'suffix');
|
14662 | * ```
|
14663 | *
|
14664 | * @param prefix Static value used for concatenation only.
|
14665 | * @param v0 Value checked for change.
|
14666 | * @param i0 Static value used for concatenation only.
|
14667 | * @param v1 Value checked for change.
|
14668 | * @param i1 Static value used for concatenation only.
|
14669 | * @param v2 Value checked for change.
|
14670 | * @param i2 Static value used for concatenation only.
|
14671 | * @param v3 Value checked for change.
|
14672 | * @param i3 Static value used for concatenation only.
|
14673 | * @param v4 Value checked for change.
|
14674 | * @param i4 Static value used for concatenation only.
|
14675 | * @param v5 Value checked for change.
|
14676 | * @param suffix Static value used for concatenation only.
|
14677 | * @codeGenApi
|
14678 | */
|
14679 | export declare function ɵɵstyleMapInterpolate6(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string): void;
|
14680 |
|
14681 | /**
|
14682 | *
|
14683 | * Update an interpolated style on an element with 7 bound values surrounded by text.
|
14684 | *
|
14685 | * Used when the value passed to a property has 7 interpolated values in it:
|
14686 | *
|
14687 | * ```html
|
14688 | * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};
|
14689 | * key6: {{v6}}suffix"></div>
|
14690 | * ```
|
14691 | *
|
14692 | * Its compiled representation is:
|
14693 | *
|
14694 | * ```ts
|
14695 | * ɵɵstyleMapInterpolate7(
|
14696 | * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
|
14697 | * '; key6: ', v6, 'suffix');
|
14698 | * ```
|
14699 | *
|
14700 | * @param prefix Static value used for concatenation only.
|
14701 | * @param v0 Value checked for change.
|
14702 | * @param i0 Static value used for concatenation only.
|
14703 | * @param v1 Value checked for change.
|
14704 | * @param i1 Static value used for concatenation only.
|
14705 | * @param v2 Value checked for change.
|
14706 | * @param i2 Static value used for concatenation only.
|
14707 | * @param v3 Value checked for change.
|
14708 | * @param i3 Static value used for concatenation only.
|
14709 | * @param v4 Value checked for change.
|
14710 | * @param i4 Static value used for concatenation only.
|
14711 | * @param v5 Value checked for change.
|
14712 | * @param i5 Static value used for concatenation only.
|
14713 | * @param v6 Value checked for change.
|
14714 | * @param suffix Static value used for concatenation only.
|
14715 | * @codeGenApi
|
14716 | */
|
14717 | export declare function ɵɵstyleMapInterpolate7(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string): void;
|
14718 |
|
14719 | /**
|
14720 | *
|
14721 | * Update an interpolated style on an element with 8 bound values surrounded by text.
|
14722 | *
|
14723 | * Used when the value passed to a property has 8 interpolated values in it:
|
14724 | *
|
14725 | * ```html
|
14726 | * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};
|
14727 | * key6: {{v6}}; key7: {{v7}}suffix"></div>
|
14728 | * ```
|
14729 | *
|
14730 | * Its compiled representation is:
|
14731 | *
|
14732 | * ```ts
|
14733 | * ɵɵstyleMapInterpolate8(
|
14734 | * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
|
14735 | * '; key6: ', v6, '; key7: ', v7, 'suffix');
|
14736 | * ```
|
14737 | *
|
14738 | * @param prefix Static value used for concatenation only.
|
14739 | * @param v0 Value checked for change.
|
14740 | * @param i0 Static value used for concatenation only.
|
14741 | * @param v1 Value checked for change.
|
14742 | * @param i1 Static value used for concatenation only.
|
14743 | * @param v2 Value checked for change.
|
14744 | * @param i2 Static value used for concatenation only.
|
14745 | * @param v3 Value checked for change.
|
14746 | * @param i3 Static value used for concatenation only.
|
14747 | * @param v4 Value checked for change.
|
14748 | * @param i4 Static value used for concatenation only.
|
14749 | * @param v5 Value checked for change.
|
14750 | * @param i5 Static value used for concatenation only.
|
14751 | * @param v6 Value checked for change.
|
14752 | * @param i6 Static value used for concatenation only.
|
14753 | * @param v7 Value checked for change.
|
14754 | * @param suffix Static value used for concatenation only.
|
14755 | * @codeGenApi
|
14756 | */
|
14757 | export declare function ɵɵstyleMapInterpolate8(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any, suffix: string): void;
|
14758 |
|
14759 | /**
|
14760 | * Update an interpolated style on an element with 9 or more bound values surrounded by text.
|
14761 | *
|
14762 | * Used when the number of interpolated values exceeds 8.
|
14763 | *
|
14764 | * ```html
|
14765 | * <div
|
14766 | * class="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};
|
14767 | * key6: {{v6}}; key7: {{v7}}; key8: {{v8}}; key9: {{v9}}suffix"></div>
|
14768 | * ```
|
14769 | *
|
14770 | * Its compiled representation is:
|
14771 | *
|
14772 | * ```ts
|
14773 | * ɵɵstyleMapInterpolateV(
|
14774 | * ['key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
|
14775 | * '; key6: ', v6, '; key7: ', v7, '; key8: ', v8, '; key9: ', v9, 'suffix']);
|
14776 | * ```
|
14777 | *.
|
14778 | * @param values The collection of values and the strings in-between those values, beginning with
|
14779 | * a string prefix and ending with a string suffix.
|
14780 | * (e.g. `['prefix', value0, '; key2: ', value1, '; key2: ', value2, ..., value99, 'suffix']`)
|
14781 | * @codeGenApi
|
14782 | */
|
14783 | export declare function ɵɵstyleMapInterpolateV(values: any[]): void;
|
14784 |
|
14785 | /**
|
14786 | * Update a style binding on an element with the provided value.
|
14787 | *
|
14788 | * If the style value is falsy then it will be removed from the element
|
14789 | * (or assigned a different value depending if there are any styles placed
|
14790 | * on the element with `styleMap` or any static styles that are
|
14791 | * present from when the element was created with `styling`).
|
14792 | *
|
14793 | * Note that the styling element is updated as part of `stylingApply`.
|
14794 | *
|
14795 | * @param prop A valid CSS property.
|
14796 | * @param value New value to write (`null` or an empty string to remove).
|
14797 | * @param suffix Optional suffix. Used with scalar values to add unit such as `px`.
|
14798 | *
|
14799 | * Note that this will apply the provided style value to the host element if this function is called
|
14800 | * within a host binding function.
|
14801 | *
|
14802 | * @codeGenApi
|
14803 | */
|
14804 | export declare function ɵɵstyleProp(prop: string, value: string | number | ɵSafeValue | undefined | null, suffix?: string | null): typeof ɵɵstyleProp;
|
14805 |
|
14806 |
|
14807 | /**
|
14808 | *
|
14809 | * Update an interpolated style property on an element with single bound value surrounded by text.
|
14810 | *
|
14811 | * Used when the value passed to a property has 1 interpolated value in it:
|
14812 | *
|
14813 | * ```html
|
14814 | * <div style.color="prefix{{v0}}suffix"></div>
|
14815 | * ```
|
14816 | *
|
14817 | * Its compiled representation is:
|
14818 | *
|
14819 | * ```ts
|
14820 | * ɵɵstylePropInterpolate1(0, 'prefix', v0, 'suffix');
|
14821 | * ```
|
14822 | *
|
14823 | * @param styleIndex Index of style to update. This index value refers to the
|
14824 | * index of the style in the style bindings array that was passed into
|
14825 | * `styling`.
|
14826 | * @param prefix Static value used for concatenation only.
|
14827 | * @param v0 Value checked for change.
|
14828 | * @param suffix Static value used for concatenation only.
|
14829 | * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
|
14830 | * @returns itself, so that it may be chained.
|
14831 | * @codeGenApi
|
14832 | */
|
14833 | export declare function ɵɵstylePropInterpolate1(prop: string, prefix: string, v0: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate1;
|
14834 |
|
14835 | /**
|
14836 | *
|
14837 | * Update an interpolated style property on an element with 2 bound values surrounded by text.
|
14838 | *
|
14839 | * Used when the value passed to a property has 2 interpolated values in it:
|
14840 | *
|
14841 | * ```html
|
14842 | * <div style.color="prefix{{v0}}-{{v1}}suffix"></div>
|
14843 | * ```
|
14844 | *
|
14845 | * Its compiled representation is:
|
14846 | *
|
14847 | * ```ts
|
14848 | * ɵɵstylePropInterpolate2(0, 'prefix', v0, '-', v1, 'suffix');
|
14849 | * ```
|
14850 | *
|
14851 | * @param styleIndex Index of style to update. This index value refers to the
|
14852 | * index of the style in the style bindings array that was passed into
|
14853 | * `styling`.
|
14854 | * @param prefix Static value used for concatenation only.
|
14855 | * @param v0 Value checked for change.
|
14856 | * @param i0 Static value used for concatenation only.
|
14857 | * @param v1 Value checked for change.
|
14858 | * @param suffix Static value used for concatenation only.
|
14859 | * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
|
14860 | * @returns itself, so that it may be chained.
|
14861 | * @codeGenApi
|
14862 | */
|
14863 | export declare function ɵɵstylePropInterpolate2(prop: string, prefix: string, v0: any, i0: string, v1: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate2;
|
14864 |
|
14865 | /**
|
14866 | *
|
14867 | * Update an interpolated style property on an element with 3 bound values surrounded by text.
|
14868 | *
|
14869 | * Used when the value passed to a property has 3 interpolated values in it:
|
14870 | *
|
14871 | * ```html
|
14872 | * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
|
14873 | * ```
|
14874 | *
|
14875 | * Its compiled representation is:
|
14876 | *
|
14877 | * ```ts
|
14878 | * ɵɵstylePropInterpolate3(0, 'prefix', v0, '-', v1, '-', v2, 'suffix');
|
14879 | * ```
|
14880 | *
|
14881 | * @param styleIndex Index of style to update. This index value refers to the
|
14882 | * index of the style in the style bindings array that was passed into
|
14883 | * `styling`.
|
14884 | * @param prefix Static value used for concatenation only.
|
14885 | * @param v0 Value checked for change.
|
14886 | * @param i0 Static value used for concatenation only.
|
14887 | * @param v1 Value checked for change.
|
14888 | * @param i1 Static value used for concatenation only.
|
14889 | * @param v2 Value checked for change.
|
14890 | * @param suffix Static value used for concatenation only.
|
14891 | * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
|
14892 | * @returns itself, so that it may be chained.
|
14893 | * @codeGenApi
|
14894 | */
|
14895 | export declare function ɵɵstylePropInterpolate3(prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate3;
|
14896 |
|
14897 | /**
|
14898 | *
|
14899 | * Update an interpolated style property on an element with 4 bound values surrounded by text.
|
14900 | *
|
14901 | * Used when the value passed to a property has 4 interpolated values in it:
|
14902 | *
|
14903 | * ```html
|
14904 | * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
|
14905 | * ```
|
14906 | *
|
14907 | * Its compiled representation is:
|
14908 | *
|
14909 | * ```ts
|
14910 | * ɵɵstylePropInterpolate4(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
|
14911 | * ```
|
14912 | *
|
14913 | * @param styleIndex Index of style to update. This index value refers to the
|
14914 | * index of the style in the style bindings array that was passed into
|
14915 | * `styling`.
|
14916 | * @param prefix Static value used for concatenation only.
|
14917 | * @param v0 Value checked for change.
|
14918 | * @param i0 Static value used for concatenation only.
|
14919 | * @param v1 Value checked for change.
|
14920 | * @param i1 Static value used for concatenation only.
|
14921 | * @param v2 Value checked for change.
|
14922 | * @param i2 Static value used for concatenation only.
|
14923 | * @param v3 Value checked for change.
|
14924 | * @param suffix Static value used for concatenation only.
|
14925 | * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
|
14926 | * @returns itself, so that it may be chained.
|
14927 | * @codeGenApi
|
14928 | */
|
14929 | export declare function ɵɵstylePropInterpolate4(prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate4;
|
14930 |
|
14931 | /**
|
14932 | *
|
14933 | * Update an interpolated style property on an element with 5 bound values surrounded by text.
|
14934 | *
|
14935 | * Used when the value passed to a property has 5 interpolated values in it:
|
14936 | *
|
14937 | * ```html
|
14938 | * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
|
14939 | * ```
|
14940 | *
|
14941 | * Its compiled representation is:
|
14942 | *
|
14943 | * ```ts
|
14944 | * ɵɵstylePropInterpolate5(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
|
14945 | * ```
|
14946 | *
|
14947 | * @param styleIndex Index of style to update. This index value refers to the
|
14948 | * index of the style in the style bindings array that was passed into
|
14949 | * `styling`.
|
14950 | * @param prefix Static value used for concatenation only.
|
14951 | * @param v0 Value checked for change.
|
14952 | * @param i0 Static value used for concatenation only.
|
14953 | * @param v1 Value checked for change.
|
14954 | * @param i1 Static value used for concatenation only.
|
14955 | * @param v2 Value checked for change.
|
14956 | * @param i2 Static value used for concatenation only.
|
14957 | * @param v3 Value checked for change.
|
14958 | * @param i3 Static value used for concatenation only.
|
14959 | * @param v4 Value checked for change.
|
14960 | * @param suffix Static value used for concatenation only.
|
14961 | * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
|
14962 | * @returns itself, so that it may be chained.
|
14963 | * @codeGenApi
|
14964 | */
|
14965 | export declare function ɵɵstylePropInterpolate5(prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate5;
|
14966 |
|
14967 | /**
|
14968 | *
|
14969 | * Update an interpolated style property on an element with 6 bound values surrounded by text.
|
14970 | *
|
14971 | * Used when the value passed to a property has 6 interpolated values in it:
|
14972 | *
|
14973 | * ```html
|
14974 | * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
|
14975 | * ```
|
14976 | *
|
14977 | * Its compiled representation is:
|
14978 | *
|
14979 | * ```ts
|
14980 | * ɵɵstylePropInterpolate6(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
|
14981 | * ```
|
14982 | *
|
14983 | * @param styleIndex Index of style to update. This index value refers to the
|
14984 | * index of the style in the style bindings array that was passed into
|
14985 | * `styling`.
|
14986 | * @param prefix Static value used for concatenation only.
|
14987 | * @param v0 Value checked for change.
|
14988 | * @param i0 Static value used for concatenation only.
|
14989 | * @param v1 Value checked for change.
|
14990 | * @param i1 Static value used for concatenation only.
|
14991 | * @param v2 Value checked for change.
|
14992 | * @param i2 Static value used for concatenation only.
|
14993 | * @param v3 Value checked for change.
|
14994 | * @param i3 Static value used for concatenation only.
|
14995 | * @param v4 Value checked for change.
|
14996 | * @param i4 Static value used for concatenation only.
|
14997 | * @param v5 Value checked for change.
|
14998 | * @param suffix Static value used for concatenation only.
|
14999 | * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
|
15000 | * @returns itself, so that it may be chained.
|
15001 | * @codeGenApi
|
15002 | */
|
15003 | export declare function ɵɵstylePropInterpolate6(prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate6;
|
15004 |
|
15005 | /**
|
15006 | *
|
15007 | * Update an interpolated style property on an element with 7 bound values surrounded by text.
|
15008 | *
|
15009 | * Used when the value passed to a property has 7 interpolated values in it:
|
15010 | *
|
15011 | * ```html
|
15012 | * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
|
15013 | * ```
|
15014 | *
|
15015 | * Its compiled representation is:
|
15016 | *
|
15017 | * ```ts
|
15018 | * ɵɵstylePropInterpolate7(
|
15019 | * 0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
|
15020 | * ```
|
15021 | *
|
15022 | * @param styleIndex Index of style to update. This index value refers to the
|
15023 | * index of the style in the style bindings array that was passed into
|
15024 | * `styling`.
|
15025 | * @param prefix Static value used for concatenation only.
|
15026 | * @param v0 Value checked for change.
|
15027 | * @param i0 Static value used for concatenation only.
|
15028 | * @param v1 Value checked for change.
|
15029 | * @param i1 Static value used for concatenation only.
|
15030 | * @param v2 Value checked for change.
|
15031 | * @param i2 Static value used for concatenation only.
|
15032 | * @param v3 Value checked for change.
|
15033 | * @param i3 Static value used for concatenation only.
|
15034 | * @param v4 Value checked for change.
|
15035 | * @param i4 Static value used for concatenation only.
|
15036 | * @param v5 Value checked for change.
|
15037 | * @param i5 Static value used for concatenation only.
|
15038 | * @param v6 Value checked for change.
|
15039 | * @param suffix Static value used for concatenation only.
|
15040 | * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
|
15041 | * @returns itself, so that it may be chained.
|
15042 | * @codeGenApi
|
15043 | */
|
15044 | export declare function ɵɵstylePropInterpolate7(prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate7;
|
15045 |
|
15046 | /**
|
15047 | *
|
15048 | * Update an interpolated style property on an element with 8 bound values surrounded by text.
|
15049 | *
|
15050 | * Used when the value passed to a property has 8 interpolated values in it:
|
15051 | *
|
15052 | * ```html
|
15053 | * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
|
15054 | * ```
|
15055 | *
|
15056 | * Its compiled representation is:
|
15057 | *
|
15058 | * ```ts
|
15059 | * ɵɵstylePropInterpolate8(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6,
|
15060 | * '-', v7, 'suffix');
|
15061 | * ```
|
15062 | *
|
15063 | * @param styleIndex Index of style to update. This index value refers to the
|
15064 | * index of the style in the style bindings array that was passed into
|
15065 | * `styling`.
|
15066 | * @param prefix Static value used for concatenation only.
|
15067 | * @param v0 Value checked for change.
|
15068 | * @param i0 Static value used for concatenation only.
|
15069 | * @param v1 Value checked for change.
|
15070 | * @param i1 Static value used for concatenation only.
|
15071 | * @param v2 Value checked for change.
|
15072 | * @param i2 Static value used for concatenation only.
|
15073 | * @param v3 Value checked for change.
|
15074 | * @param i3 Static value used for concatenation only.
|
15075 | * @param v4 Value checked for change.
|
15076 | * @param i4 Static value used for concatenation only.
|
15077 | * @param v5 Value checked for change.
|
15078 | * @param i5 Static value used for concatenation only.
|
15079 | * @param v6 Value checked for change.
|
15080 | * @param i6 Static value used for concatenation only.
|
15081 | * @param v7 Value checked for change.
|
15082 | * @param suffix Static value used for concatenation only.
|
15083 | * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
|
15084 | * @returns itself, so that it may be chained.
|
15085 | * @codeGenApi
|
15086 | */
|
15087 | export declare function ɵɵstylePropInterpolate8(prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate8;
|
15088 |
|
15089 | /**
|
15090 | * Update an interpolated style property on an element with 9 or more bound values surrounded by
|
15091 | * text.
|
15092 | *
|
15093 | * Used when the number of interpolated values exceeds 8.
|
15094 | *
|
15095 | * ```html
|
15096 | * <div
|
15097 | * style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix">
|
15098 | * </div>
|
15099 | * ```
|
15100 | *
|
15101 | * Its compiled representation is:
|
15102 | *
|
15103 | * ```ts
|
15104 | * ɵɵstylePropInterpolateV(
|
15105 | * 0, ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
|
15106 | * 'suffix']);
|
15107 | * ```
|
15108 | *
|
15109 | * @param styleIndex Index of style to update. This index value refers to the
|
15110 | * index of the style in the style bindings array that was passed into
|
15111 | * `styling`..
|
15112 | * @param values The collection of values and the strings in-between those values, beginning with
|
15113 | * a string prefix and ending with a string suffix.
|
15114 | * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
|
15115 | * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
|
15116 | * @returns itself, so that it may be chained.
|
15117 | * @codeGenApi
|
15118 | */
|
15119 | export declare function ɵɵstylePropInterpolateV(prop: string, values: any[], valueSuffix?: string | null): typeof ɵɵstylePropInterpolateV;
|
15120 |
|
15121 | /**
|
15122 | * Registers a synthetic host listener (e.g. `(@foo.start)`) on a component or directive.
|
15123 | *
|
15124 | * This instruction is for compatibility purposes and is designed to ensure that a
|
15125 | * synthetic host listener (e.g. `@HostListener('@foo.start')`) properly gets rendered
|
15126 | * in the component's renderer. Normally all host listeners are evaluated with the
|
15127 | * parent component's renderer, but, in the case of animation @triggers, they need
|
15128 | * to be evaluated with the sub component's renderer (because that's where the
|
15129 | * animation triggers are defined).
|
15130 | *
|
15131 | * Do not use this instruction as a replacement for `listener`. This instruction
|
15132 | * only exists to ensure compatibility with the ViewEngine's host binding behavior.
|
15133 | *
|
15134 | * @param eventName Name of the event
|
15135 | * @param listenerFn The function to be called when event emits
|
15136 | * @param useCapture Whether or not to use capture in event listener
|
15137 | * @param eventTargetResolver Function that returns global target information in case this listener
|
15138 | * should be attached to a global object like window, document or body
|
15139 | *
|
15140 | * @codeGenApi
|
15141 | */
|
15142 | export declare function ɵɵsyntheticHostListener(eventName: string, listenerFn: (e?: any) => any): typeof ɵɵsyntheticHostListener;
|
15143 |
|
15144 | /**
|
15145 | * Updates a synthetic host binding (e.g. `[@foo]`) on a component or directive.
|
15146 | *
|
15147 | * This instruction is for compatibility purposes and is designed to ensure that a
|
15148 | * synthetic host binding (e.g. `@HostBinding('@foo')`) properly gets rendered in
|
15149 | * the component's renderer. Normally all host bindings are evaluated with the parent
|
15150 | * component's renderer, but, in the case of animation @triggers, they need to be
|
15151 | * evaluated with the sub component's renderer (because that's where the animation
|
15152 | * triggers are defined).
|
15153 | *
|
15154 | * Do not use this instruction as a replacement for `elementProperty`. This instruction
|
15155 | * only exists to ensure compatibility with the ViewEngine's host binding behavior.
|
15156 | *
|
15157 | * @param index The index of the element to update in the data array
|
15158 | * @param propName Name of property. Because it is going to DOM, this is not subject to
|
15159 | * renaming as part of minification.
|
15160 | * @param value New value to write.
|
15161 | * @param sanitizer An optional function used to sanitize the value.
|
15162 | *
|
15163 | * @codeGenApi
|
15164 | */
|
15165 | export declare function ɵɵsyntheticHostProperty<T>(propName: string, value: T | ɵNO_CHANGE, sanitizer?: SanitizerFn | null): typeof ɵɵsyntheticHostProperty;
|
15166 |
|
15167 | /**
|
15168 | * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.
|
15169 | *
|
15170 | * <ng-template #foo>
|
15171 | * <div></div>
|
15172 | * </ng-template>
|
15173 | *
|
15174 | * @param index The index of the container in the data array
|
15175 | * @param templateFn Inline template
|
15176 | * @param decls The number of nodes, local refs, and pipes for this template
|
15177 | * @param vars The number of bindings for this template
|
15178 | * @param tagName The name of the container element, if applicable
|
15179 | * @param attrsIndex Index of template attributes in the `consts` array.
|
15180 | * @param localRefs Index of the local references in the `consts` array.
|
15181 | * @param localRefExtractor A function which extracts local-refs values from the template.
|
15182 | * Defaults to the current element associated with the local-ref.
|
15183 | *
|
15184 | * @codeGenApi
|
15185 | */
|
15186 | export declare function ɵɵtemplate(index: number, templateFn: ComponentTemplate<any> | null, decls: number, vars: number, tagName?: string | null, attrsIndex?: number | null, localRefsIndex?: number | null, localRefExtractor?: LocalRefExtractor): void;
|
15187 |
|
15188 | /**
|
15189 | * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the
|
15190 | * `<ng-template>` element.
|
15191 | *
|
15192 | * @codeGenApi
|
15193 | */
|
15194 | export declare function ɵɵtemplateRefExtractor(tNode: TNode, lView: ɵangular_packages_core_core_ca): TemplateRef<any> | null;
|
15195 |
|
15196 | /**
|
15197 | * Create static text node
|
15198 | *
|
15199 | * @param index Index of the node in the data array
|
15200 | * @param value Static string value to write.
|
15201 | *
|
15202 | * @codeGenApi
|
15203 | */
|
15204 | export declare function ɵɵtext(index: number, value?: string): void;
|
15205 |
|
15206 | /**
|
15207 | *
|
15208 | * Update text content with a lone bound value
|
15209 | *
|
15210 | * Used when a text node has 1 interpolated value in it, an no additional text
|
15211 | * surrounds that interpolated value:
|
15212 | *
|
15213 | * ```html
|
15214 | * <div>{{v0}}</div>
|
15215 | * ```
|
15216 | *
|
15217 | * Its compiled representation is:
|
15218 | *
|
15219 | * ```ts
|
15220 | * ɵɵtextInterpolate(v0);
|
15221 | * ```
|
15222 | * @returns itself, so that it may be chained.
|
15223 | * @see textInterpolateV
|
15224 | * @codeGenApi
|
15225 | */
|
15226 | export declare function ɵɵtextInterpolate(v0: any): typeof ɵɵtextInterpolate;
|
15227 |
|
15228 | /**
|
15229 | *
|
15230 | * Update text content with single bound value surrounded by other text.
|
15231 | *
|
15232 | * Used when a text node has 1 interpolated value in it:
|
15233 | *
|
15234 | * ```html
|
15235 | * <div>prefix{{v0}}suffix</div>
|
15236 | * ```
|
15237 | *
|
15238 | * Its compiled representation is:
|
15239 | *
|
15240 | * ```ts
|
15241 | * ɵɵtextInterpolate1('prefix', v0, 'suffix');
|
15242 | * ```
|
15243 | * @returns itself, so that it may be chained.
|
15244 | * @see textInterpolateV
|
15245 | * @codeGenApi
|
15246 | */
|
15247 | export declare function ɵɵtextInterpolate1(prefix: string, v0: any, suffix: string): typeof ɵɵtextInterpolate1;
|
15248 |
|
15249 | /**
|
15250 | *
|
15251 | * Update text content with 2 bound values surrounded by other text.
|
15252 | *
|
15253 | * Used when a text node has 2 interpolated values in it:
|
15254 | *
|
15255 | * ```html
|
15256 | * <div>prefix{{v0}}-{{v1}}suffix</div>
|
15257 | * ```
|
15258 | *
|
15259 | * Its compiled representation is:
|
15260 | *
|
15261 | * ```ts
|
15262 | * ɵɵtextInterpolate2('prefix', v0, '-', v1, 'suffix');
|
15263 | * ```
|
15264 | * @returns itself, so that it may be chained.
|
15265 | * @see textInterpolateV
|
15266 | * @codeGenApi
|
15267 | */
|
15268 | export declare function ɵɵtextInterpolate2(prefix: string, v0: any, i0: string, v1: any, suffix: string): typeof ɵɵtextInterpolate2;
|
15269 |
|
15270 | /**
|
15271 | *
|
15272 | * Update text content with 3 bound values surrounded by other text.
|
15273 | *
|
15274 | * Used when a text node has 3 interpolated values in it:
|
15275 | *
|
15276 | * ```html
|
15277 | * <div>prefix{{v0}}-{{v1}}-{{v2}}suffix</div>
|
15278 | * ```
|
15279 | *
|
15280 | * Its compiled representation is:
|
15281 | *
|
15282 | * ```ts
|
15283 | * ɵɵtextInterpolate3(
|
15284 | * 'prefix', v0, '-', v1, '-', v2, 'suffix');
|
15285 | * ```
|
15286 | * @returns itself, so that it may be chained.
|
15287 | * @see textInterpolateV
|
15288 | * @codeGenApi
|
15289 | */
|
15290 | export declare function ɵɵtextInterpolate3(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): typeof ɵɵtextInterpolate3;
|
15291 |
|
15292 | /**
|
15293 | *
|
15294 | * Update text content with 4 bound values surrounded by other text.
|
15295 | *
|
15296 | * Used when a text node has 4 interpolated values in it:
|
15297 | *
|
15298 | * ```html
|
15299 | * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix</div>
|
15300 | * ```
|
15301 | *
|
15302 | * Its compiled representation is:
|
15303 | *
|
15304 | * ```ts
|
15305 | * ɵɵtextInterpolate4(
|
15306 | * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
|
15307 | * ```
|
15308 | * @returns itself, so that it may be chained.
|
15309 | * @see ɵɵtextInterpolateV
|
15310 | * @codeGenApi
|
15311 | */
|
15312 | export declare function ɵɵtextInterpolate4(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string): typeof ɵɵtextInterpolate4;
|
15313 |
|
15314 | /**
|
15315 | *
|
15316 | * Update text content with 5 bound values surrounded by other text.
|
15317 | *
|
15318 | * Used when a text node has 5 interpolated values in it:
|
15319 | *
|
15320 | * ```html
|
15321 | * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix</div>
|
15322 | * ```
|
15323 | *
|
15324 | * Its compiled representation is:
|
15325 | *
|
15326 | * ```ts
|
15327 | * ɵɵtextInterpolate5(
|
15328 | * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
|
15329 | * ```
|
15330 | * @returns itself, so that it may be chained.
|
15331 | * @see textInterpolateV
|
15332 | * @codeGenApi
|
15333 | */
|
15334 | export declare function ɵɵtextInterpolate5(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string): typeof ɵɵtextInterpolate5;
|
15335 |
|
15336 | /**
|
15337 | *
|
15338 | * Update text content with 6 bound values surrounded by other text.
|
15339 | *
|
15340 | * Used when a text node has 6 interpolated values in it:
|
15341 | *
|
15342 | * ```html
|
15343 | * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix</div>
|
15344 | * ```
|
15345 | *
|
15346 | * Its compiled representation is:
|
15347 | *
|
15348 | * ```ts
|
15349 | * ɵɵtextInterpolate6(
|
15350 | * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
|
15351 | * ```
|
15352 | *
|
15353 | * @param i4 Static value used for concatenation only.
|
15354 | * @param v5 Value checked for change. @returns itself, so that it may be chained.
|
15355 | * @see textInterpolateV
|
15356 | * @codeGenApi
|
15357 | */
|
15358 | export declare function ɵɵtextInterpolate6(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string): typeof ɵɵtextInterpolate6;
|
15359 |
|
15360 | /**
|
15361 | *
|
15362 | * Update text content with 7 bound values surrounded by other text.
|
15363 | *
|
15364 | * Used when a text node has 7 interpolated values in it:
|
15365 | *
|
15366 | * ```html
|
15367 | * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix</div>
|
15368 | * ```
|
15369 | *
|
15370 | * Its compiled representation is:
|
15371 | *
|
15372 | * ```ts
|
15373 | * ɵɵtextInterpolate7(
|
15374 | * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
|
15375 | * ```
|
15376 | * @returns itself, so that it may be chained.
|
15377 | * @see textInterpolateV
|
15378 | * @codeGenApi
|
15379 | */
|
15380 | export declare function ɵɵtextInterpolate7(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string): typeof ɵɵtextInterpolate7;
|
15381 |
|
15382 | /**
|
15383 | *
|
15384 | * Update text content with 8 bound values surrounded by other text.
|
15385 | *
|
15386 | * Used when a text node has 8 interpolated values in it:
|
15387 | *
|
15388 | * ```html
|
15389 | * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix</div>
|
15390 | * ```
|
15391 | *
|
15392 | * Its compiled representation is:
|
15393 | *
|
15394 | * ```ts
|
15395 | * ɵɵtextInterpolate8(
|
15396 | * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
|
15397 | * ```
|
15398 | * @returns itself, so that it may be chained.
|
15399 | * @see textInterpolateV
|
15400 | * @codeGenApi
|
15401 | */
|
15402 | export declare function ɵɵtextInterpolate8(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any, suffix: string): typeof ɵɵtextInterpolate8;
|
15403 |
|
15404 | /**
|
15405 | * Update text content with 9 or more bound values other surrounded by text.
|
15406 | *
|
15407 | * Used when the number of interpolated values exceeds 8.
|
15408 | *
|
15409 | * ```html
|
15410 | * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix</div>
|
15411 | * ```
|
15412 | *
|
15413 | * Its compiled representation is:
|
15414 | *
|
15415 | * ```ts
|
15416 | * ɵɵtextInterpolateV(
|
15417 | * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
|
15418 | * 'suffix']);
|
15419 | * ```
|
15420 | *.
|
15421 | * @param values The collection of values and the strings in between those values, beginning with
|
15422 | * a string prefix and ending with a string suffix.
|
15423 | * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
|
15424 | *
|
15425 | * @returns itself, so that it may be chained.
|
15426 | * @codeGenApi
|
15427 | */
|
15428 | export declare function ɵɵtextInterpolateV(values: any[]): typeof ɵɵtextInterpolateV;
|
15429 |
|
15430 | /**
|
15431 | * A template tag function for promoting the associated constant literal to a
|
15432 | * TrustedHTML. Interpolation is explicitly not allowed.
|
15433 | *
|
15434 | * @param html constant template literal containing trusted HTML.
|
15435 | * @returns TrustedHTML wrapping `html`.
|
15436 | *
|
15437 | * @security This is a security-sensitive function and should only be used to
|
15438 | * convert constant values of attributes and properties found in
|
15439 | * application-provided Angular templates to TrustedHTML.
|
15440 | *
|
15441 | * @codeGenApi
|
15442 | */
|
15443 | export declare function ɵɵtrustConstantHtml(html: TemplateStringsArray): TrustedHTML | string;
|
15444 |
|
15445 | /**
|
15446 | * A template tag function for promoting the associated constant literal to a
|
15447 | * TrustedScriptURL. Interpolation is explicitly not allowed.
|
15448 | *
|
15449 | * @param url constant template literal containing a trusted script URL.
|
15450 | * @returns TrustedScriptURL wrapping `url`.
|
15451 | *
|
15452 | * @security This is a security-sensitive function and should only be used to
|
15453 | * convert constant values of attributes and properties found in
|
15454 | * application-provided Angular templates to TrustedScriptURL.
|
15455 | *
|
15456 | * @codeGenApi
|
15457 | */
|
15458 | export declare function ɵɵtrustConstantResourceUrl(url: TemplateStringsArray): TrustedScriptURL | string;
|
15459 |
|
15460 | /**
|
15461 | * Creates new QueryList, stores the reference in LView and returns QueryList.
|
15462 | *
|
15463 | * @param predicate The type for which the query will search
|
15464 | * @param flags Flags associated with the query
|
15465 | * @param read What to save in the query
|
15466 | *
|
15467 | * @codeGenApi
|
15468 | */
|
15469 | export declare function ɵɵviewQuery<T>(predicate: ProviderToken<unknown> | string[], flags: QueryFlags, read?: any): void;
|
15470 |
|
15471 | export { }
|
15472 |
|
\ | No newline at end of file |