Skip to content

Commit babc5a5

Browse files
committed
fix: various AoT and prerender issues
1 parent 37ea848 commit babc5a5

File tree

6 files changed

+13
-11
lines changed

6 files changed

+13
-11
lines changed

src/lib/datepicker/datepicker-toggle.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<button mat-icon-button type="button" [attr.aria-label]="_intl.openCalendarLabel"
22
[disabled]="disabled" (click)="_open($event)">
33
<mat-icon>
4-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="100%" height="100%"
5-
fill="currentColor" style="vertical-align: top" focusable="false">
4+
<svg viewBox="0 0 24 24" width="100%" height="100%" fill="currentColor"
5+
style="vertical-align: top" focusable="false">
66
<path d="M0 0h24v24H0z" fill="none"/>
77
<path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"/>
88
</svg>

src/lib/expansion/expansion-panel-header.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import {
2424
} from '@angular/core';
2525
import {merge} from 'rxjs/observable/merge';
2626
import {Subscription} from 'rxjs/Subscription';
27-
import {EXPANSION_PANEL_ANIMATION_TIMING, MatExpansionPanel} from './expansion-panel';
27+
import {MatExpansionPanel} from './expansion-panel';
2828

2929

3030
/**
@@ -64,7 +64,7 @@ import {EXPANSION_PANEL_ANIMATION_TIMING, MatExpansionPanel} from './expansion-p
6464
trigger('indicatorRotate', [
6565
state('collapsed', style({transform: 'rotate(0deg)'})),
6666
state('expanded', style({transform: 'rotate(180deg)'})),
67-
transition('expanded <=> collapsed', animate(EXPANSION_PANEL_ANIMATION_TIMING)),
67+
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4,0.0,0.2,1)')),
6868
]),
6969
trigger('expansionHeight', [
7070
state('collapsed', style({
@@ -77,7 +77,7 @@ import {EXPANSION_PANEL_ANIMATION_TIMING, MatExpansionPanel} from './expansion-p
7777
}), {
7878
params: {expandedHeight: '64px'}
7979
}),
80-
transition('expanded <=> collapsed', animate(EXPANSION_PANEL_ANIMATION_TIMING)),
80+
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4,0.0,0.2,1)')),
8181
]),
8282
],
8383
})

src/lib/expansion/expansion-panel.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ export const _MatExpansionPanelMixinBase = mixinDisabled(MatExpansionPanelBase);
4242
/** MatExpansionPanel's states. */
4343
export type MatExpansionPanelState = 'expanded' | 'collapsed';
4444

45-
/** Time and timing curve for expansion panel animations. */
46-
export const EXPANSION_PANEL_ANIMATION_TIMING = '225ms cubic-bezier(0.4,0.0,0.2,1)';
47-
4845
/**
4946
* <mat-expansion-panel> component.
5047
*
@@ -75,7 +72,7 @@ export const EXPANSION_PANEL_ANIMATION_TIMING = '225ms cubic-bezier(0.4,0.0,0.2,
7572
trigger('bodyExpansion', [
7673
state('collapsed', style({height: '0px', visibility: 'hidden'})),
7774
state('expanded', style({height: '*', visibility: 'visible'})),
78-
transition('expanded <=> collapsed', animate(EXPANSION_PANEL_ANIMATION_TIMING)),
75+
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4,0.0,0.2,1)')),
7976
]),
8077
],
8178
})

src/lib/snack-bar/snack-bar-container.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ import {Subject} from 'rxjs/Subject';
3838
import {MatSnackBarConfig} from './snack-bar-config';
3939

4040

41+
export type SnackBarState = 'visible' | 'hidden' | 'void';
42+
4143
// TODO(jelbourn): we can't use constants from animation.ts here because you can't use
4244
// a text interpolation in anything that is analyzed statically with ngc (for AoT compile).
4345
export const SHOW_ANIMATION = '225ms cubic-bezier(0.4,0.0,1,1)';

src/universal-app/prerender.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ import {renderModuleFactory} from '@angular/platform-server';
66
import {join} from 'path';
77
import {readFileSync} from 'fs-extra';
88
import {log} from 'gulp-util';
9-
import {KitchenSinkServerModuleNgFactory} from './kitchen-sink/kitchen-sink.ngfactory';
9+
import {
10+
KitchenSinkServerModuleNgFactory
11+
} from './dist/packages/universal-app/kitchen-sink/kitchen-sink.ngfactory';
1012

1113
enableProdMode();
1214

src/universal-app/tsconfig-build.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"declaration": true,
66
"stripInternal": false,
77
"experimentalDecorators": true,
8-
"noUnusedParameters": true,
8+
// TODO(crisbeto): disabled due to https://github.com/angular/angular/issues/17131
9+
"noUnusedParameters": false,
910
"strictNullChecks": true,
1011
"module": "commonjs",
1112
"moduleResolution": "node",

0 commit comments

Comments
 (0)