1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | import * as i0 from '@angular/core';
|
8 | import { inject, ɵChangeDetectionScheduler, Injectable, Inject, RendererFactory2, NgZone, ANIMATION_MODULE_TYPE, NgModule, ɵperformanceMarkFeature } from '@angular/core';
|
9 | export { ANIMATION_MODULE_TYPE } from '@angular/core';
|
10 | import { ɵDomRendererFactory2, BrowserModule } from '@angular/platform-browser';
|
11 | import * as i1 from '@angular/animations/browser';
|
12 | import { ɵAnimationEngine, ɵWebAnimationsStyleNormalizer, ɵAnimationRendererFactory, ɵAnimationStyleNormalizer, AnimationDriver, ɵWebAnimationsDriver, NoopAnimationDriver } from '@angular/animations/browser';
|
13 | import { DOCUMENT } from '@angular/common';
|
14 |
|
15 | class InjectableAnimationEngine extends ɵAnimationEngine {
|
16 |
|
17 |
|
18 |
|
19 | constructor(doc, driver, normalizer) {
|
20 | super(doc, driver, normalizer, inject(ɵChangeDetectionScheduler, { optional: true }));
|
21 | }
|
22 | ngOnDestroy() {
|
23 | this.flush();
|
24 | }
|
25 | static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: InjectableAnimationEngine, deps: [{ token: DOCUMENT }, { token: i1.AnimationDriver }, { token: i1.ɵAnimationStyleNormalizer }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
26 | static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: InjectableAnimationEngine }); }
|
27 | }
|
28 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: InjectableAnimationEngine, decorators: [{
|
29 | type: Injectable
|
30 | }], ctorParameters: () => [{ type: Document, decorators: [{
|
31 | type: Inject,
|
32 | args: [DOCUMENT]
|
33 | }] }, { type: i1.AnimationDriver }, { type: i1.ɵAnimationStyleNormalizer }] });
|
34 | function instantiateDefaultStyleNormalizer() {
|
35 | return new ɵWebAnimationsStyleNormalizer();
|
36 | }
|
37 | function instantiateRendererFactory(renderer, engine, zone) {
|
38 | return new ɵAnimationRendererFactory(renderer, engine, zone);
|
39 | }
|
40 | const SHARED_ANIMATION_PROVIDERS = [
|
41 | { provide: ɵAnimationStyleNormalizer, useFactory: instantiateDefaultStyleNormalizer },
|
42 | { provide: ɵAnimationEngine, useClass: InjectableAnimationEngine }, {
|
43 | provide: RendererFactory2,
|
44 | useFactory: instantiateRendererFactory,
|
45 | deps: [ɵDomRendererFactory2, ɵAnimationEngine, NgZone]
|
46 | }
|
47 | ];
|
48 |
|
49 |
|
50 |
|
51 |
|
52 | const BROWSER_ANIMATIONS_PROVIDERS = [
|
53 | { provide: AnimationDriver, useFactory: () => new ɵWebAnimationsDriver() },
|
54 | { provide: ANIMATION_MODULE_TYPE, useValue: 'BrowserAnimations' }, ...SHARED_ANIMATION_PROVIDERS
|
55 | ];
|
56 |
|
57 |
|
58 |
|
59 |
|
60 | const BROWSER_NOOP_ANIMATIONS_PROVIDERS = [
|
61 | { provide: AnimationDriver, useClass: NoopAnimationDriver },
|
62 | { provide: ANIMATION_MODULE_TYPE, useValue: 'NoopAnimations' }, ...SHARED_ANIMATION_PROVIDERS
|
63 | ];
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 | class BrowserAnimationsModule {
|
71 | |
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 | static withConfig(config) {
|
88 | return {
|
89 | ngModule: BrowserAnimationsModule,
|
90 | providers: config.disableAnimations ? BROWSER_NOOP_ANIMATIONS_PROVIDERS :
|
91 | BROWSER_ANIMATIONS_PROVIDERS
|
92 | };
|
93 | }
|
94 | static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: BrowserAnimationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
95 | static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.7", ngImport: i0, type: BrowserAnimationsModule, exports: [BrowserModule] }); }
|
96 | static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: BrowserAnimationsModule, providers: BROWSER_ANIMATIONS_PROVIDERS, imports: [BrowserModule] }); }
|
97 | }
|
98 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: BrowserAnimationsModule, decorators: [{
|
99 | type: NgModule,
|
100 | args: [{
|
101 | exports: [BrowserModule],
|
102 | providers: BROWSER_ANIMATIONS_PROVIDERS,
|
103 | }]
|
104 | }] });
|
105 |
|
106 |
|
107 |
|
108 |
|
109 |
|
110 |
|
111 |
|
112 |
|
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 |
|
122 |
|
123 |
|
124 |
|
125 |
|
126 |
|
127 | function provideAnimations() {
|
128 | ɵperformanceMarkFeature('NgEagerAnimations');
|
129 |
|
130 |
|
131 | return [...BROWSER_ANIMATIONS_PROVIDERS];
|
132 | }
|
133 |
|
134 |
|
135 |
|
136 |
|
137 | class NoopAnimationsModule {
|
138 | static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: NoopAnimationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
139 | static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.7", ngImport: i0, type: NoopAnimationsModule, exports: [BrowserModule] }); }
|
140 | static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: NoopAnimationsModule, providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS, imports: [BrowserModule] }); }
|
141 | }
|
142 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: NoopAnimationsModule, decorators: [{
|
143 | type: NgModule,
|
144 | args: [{
|
145 | exports: [BrowserModule],
|
146 | providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS,
|
147 | }]
|
148 | }] });
|
149 |
|
150 |
|
151 |
|
152 |
|
153 |
|
154 |
|
155 |
|
156 |
|
157 |
|
158 |
|
159 |
|
160 |
|
161 |
|
162 |
|
163 |
|
164 |
|
165 |
|
166 |
|
167 |
|
168 |
|
169 |
|
170 | function provideNoopAnimations() {
|
171 |
|
172 |
|
173 | return [...BROWSER_NOOP_ANIMATIONS_PROVIDERS];
|
174 | }
|
175 |
|
176 |
|
177 |
|
178 |
|
179 |
|
180 |
|
181 |
|
182 |
|
183 |
|
184 |
|
185 |
|
186 |
|
187 |
|
188 |
|
189 |
|
190 |
|
191 |
|
192 |
|
193 |
|
194 | export { BrowserAnimationsModule, NoopAnimationsModule, provideAnimations, provideNoopAnimations, InjectableAnimationEngine as ɵInjectableAnimationEngine };
|
195 |
|