Skip to content

Commit 837a207

Browse files
committed
fix: build prod
1 parent 45a1975 commit 837a207

15 files changed

+47
-24
lines changed

angular.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@
3434
"sourceMap": false,
3535
"extractCss": true,
3636
"namedChunks": false,
37-
"aot": true,
37+
"aot": false,
3838
"extractLicenses": true,
3939
"vendorChunk": false,
40-
"buildOptimizer": true,
40+
"buildOptimizer": false,
4141
"fileReplacements": [
4242
{
4343
"replace": "src/environments/environment.ts",

src/app/components/blank-layout-card/blank-layout-card.component.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ import { Component, HostBinding } from '@angular/core';
22

33
import { UpgradableComponent } from 'theme/components/upgradable';
44

5-
@Component({ })
6-
export abstract class BlankLayoutCardComponent extends UpgradableComponent {
5+
@Component({
6+
template: '',
7+
})
8+
export class BlankLayoutCardComponent extends UpgradableComponent {
79
@HostBinding('class.blank-layout-card') protected readonly blankLayoutCard = true;
810
}

src/app/components/sidebar/sidebar.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { SidebarComponent as BaseSidebarComponent } from 'theme/components/sideb
88
templateUrl: '../../../theme/components/sidebar/sidebar.component.html',
99
})
1010
export class SidebarComponent extends BaseSidebarComponent {
11-
protected menu = [
11+
public menu = [
1212
{ name: 'Dashboard', link: '/app/dashboard', icon: 'dashboard' },
1313
{
1414
name: 'UI',

src/app/layouts/layouts.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { CommonModule } from '@angular/common';
22
import { NgModule } from '@angular/core';
33
import { RouterModule } from '@angular/router';
44

5+
import { BlankLayoutCardComponent } from 'app/components/blank-layout-card';
56
import { MessageMenuComponent } from 'app/components/message-menu';
67
import { NotificationMenuComponent } from 'app/components/notification-menu';
78
import { SidebarComponent } from 'app/components/sidebar';
@@ -18,6 +19,7 @@ import { CommonLayoutComponent } from './common-layout';
1819
declarations: [
1920
CommonLayoutComponent,
2021
BlankLayoutComponent,
22+
BlankLayoutCardComponent,
2123
SidebarComponent,
2224
MessageMenuComponent,
2325
NotificationMenuComponent,

src/app/pages/ui/tables/tables.component.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { UpgradableComponent } from 'theme/components/upgradable';
88
styleUrls: ['./tables.component.scss'],
99
})
1010
export class TablesComponent extends UpgradableComponent {
11-
private readonly Array = Array;
11+
public readonly Array = Array;
1212

1313
@HostBinding('class.mdl-grid') private readonly mdlGrid = true;
1414
@HostBinding('class.mdl-cell') private readonly mdlCell = true;
@@ -18,15 +18,15 @@ export class TablesComponent extends UpgradableComponent {
1818
@HostBinding('class.mdl-cell--top') private readonly mdlCellTop = true;
1919
@HostBinding('class.ui-tables') private readonly uiTables = true;
2020

21-
private headers = [
21+
public headers = [
2222
'#',
2323
'Book title',
2424
'Author',
2525
'First published',
2626
'Status',
2727
];
2828

29-
private simpleTable = [
29+
public simpleTable = [
3030
[
3131
'1',
3232
'To Kill a Mockingbird',
@@ -57,7 +57,7 @@ export class TablesComponent extends UpgradableComponent {
5757
],
5858
];
5959

60-
private borderedTable = [
60+
public borderedTable = [
6161
[
6262
'23',
6363
'Gone with the Wind',
@@ -88,7 +88,7 @@ export class TablesComponent extends UpgradableComponent {
8888
],
8989
];
9090

91-
private strippedTable = [
91+
public strippedTable = [
9292
[
9393
'54',
9494
'The Hitchhiker\'s Guide to th...',
@@ -119,7 +119,7 @@ export class TablesComponent extends UpgradableComponent {
119119
],
120120
];
121121

122-
private borderlessTable = [
122+
public borderlessTable = [
123123
[
124124
'31',
125125
'The Little Prince',
@@ -150,7 +150,7 @@ export class TablesComponent extends UpgradableComponent {
150150
],
151151
];
152152

153-
private advancedHeaders = [
153+
public advancedHeaders = [
154154
'#',
155155
'Book title',
156156
'Author',
@@ -162,7 +162,7 @@ export class TablesComponent extends UpgradableComponent {
162162
'Availability',
163163
];
164164

165-
private advancedTable = [
165+
public advancedTableFullData = [
166166
[
167167
'5',
168168
'Life of Pi',
@@ -218,7 +218,7 @@ export class TablesComponent extends UpgradableComponent {
218218
],
219219
];
220220

221-
private genreColors = {
221+
public genreColors = {
222222
'Childeren\'s literature': 'orange',
223223
'Gothic fiction': 'purple',
224224
'Horror fiction': 'dark-gray',

src/theme/components/line-chart/line-chart.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import * as nv from 'nvd3';
33

44
import { AfterViewInit, Component, ElementRef, HostBinding } from '@angular/core';
55

6-
@Component({ })
6+
@Component({
7+
template: '',
8+
})
79
export abstract class LineChartComponent implements AfterViewInit {
810
protected animatedData;
911
protected rawData;

src/theme/components/pie-chart/pie-chart.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import * as nv from 'nvd3';
33

44
import { Component, HostBinding } from '@angular/core';
55

6-
@Component({ })
6+
@Component({
7+
template: '',
8+
})
79
export abstract class PieChartComponent {
810
@HostBinding('class.pie-chart__container') private readonly pieChartContainer = true;
911
}

src/theme/components/sidebar/menu-item.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ import { Component, HostListener, Input } from '@angular/core';
99
`,
1010
})
1111
export class MenuItemComponent {
12-
@Input() private data;
12+
@Input() public data;
1313
}

src/theme/components/sidebar/menu-link-item.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { Router } from '@angular/router';
2626
`,
2727
})
2828
export class MenuLinkItemComponent {
29-
@Input() private data;
29+
@Input() public data;
3030

3131
constructor(
3232
private router: Router,

src/theme/components/sidebar/sidebar.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ import { Component, Input } from '@angular/core';
66
templateUrl: './sidebar.component.html',
77
})
88
export class SidebarComponent {
9-
@Input() protected menu;
9+
@Input() public menu;
1010
}

src/theme/components/sidebar/submenu-item.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ export class SubmenuItemComponent implements OnInit {
1919
return this.shown;
2020
}
2121

22-
@Input() private data;
22+
@Input() public data;
2323

24-
private shown = false;
24+
public shown = false;
2525

2626
constructor(
2727
private router: Router,

src/theme/components/toggle/toggle.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { Component, HostBinding, Input } from '@angular/core';
22

3-
@Component({ })
3+
@Component({
4+
template: '',
5+
})
46
export abstract class ToggleComponent {
57
private static idCounter = 0;
68

src/theme/components/upgradable/upgradable.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { AfterViewInit, Component } from '@angular/core';
22

3-
@Component({ })
3+
@Component({
4+
template: '',
5+
})
46
export abstract class UpgradableComponent implements AfterViewInit {
57
public ngAfterViewInit() {
68
componentHandler.upgradeDom();

src/theme/theme.module.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ import { RouterModule } from '@angular/router';
66
import { CardModule } from './components/card';
77
import { CheckboxComponent } from './components/checkbox';
88
import { IconToggleComponent } from './components/icon-toggle';
9+
import { LineChartComponent } from './components/line-chart';
910
import { PageTopComponent } from './components/page-top';
11+
import { PieChartComponent } from './components/pie-chart';
1012
import { ProgressComponent } from './components/progress';
1113
import { RadioButtonComponent } from './components/radio-button';
1214
import { SidebarModule } from './components/sidebar';
1315
import { SwitchComponent } from './components/switch';
16+
import { ToggleComponent } from './components/toggle';
17+
import { UpgradableComponent } from './components/upgradable';
1418
import { TooltipModule } from './directives/tooltip';
1519

1620
const BASE_COMPONENTS = [
@@ -20,6 +24,10 @@ const BASE_COMPONENTS = [
2024
SwitchComponent,
2125
IconToggleComponent,
2226
ProgressComponent,
27+
ToggleComponent,
28+
UpgradableComponent,
29+
PieChartComponent,
30+
LineChartComponent,
2331
];
2432

2533
const BASE_DIRECTIVES = [];

tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
"dom",
1919
"es2015.generator",
2020
"es2015.iterable"
21-
]
21+
],
22+
"paths": {
23+
"@components/*": ["app/components"]
24+
}
2225
}
2326
}

0 commit comments

Comments
 (0)