Skip to content

Commit

Permalink
fix(integration): fix intergration
Browse files Browse the repository at this point in the history
  • Loading branch information
执衡 committed Nov 16, 2017
1 parent 0f1df4e commit b08e822
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
1 change: 0 additions & 1 deletion index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion integration/rollup/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function enableProdMode() {


export default {
input: './out-tsc/app/main.js',
input: './out-tsc/app/src/main.js',
output: {
file: './dist/main.bundle.js',
format: 'iife',
Expand Down
4 changes: 2 additions & 2 deletions integration/webpack/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
const { AotPlugin } = require('@ngtools/webpack')
const { AngularCompilerPlugin } = require('@ngtools/webpack')
const { PurifyPlugin } = require('@angular-devkit/build-optimizer')

function packageSort(packages) {
Expand Down Expand Up @@ -49,7 +49,7 @@ module.exports = {
extensions: ['.js', '.ts'],
},
plugins: [
new AotPlugin({
new AngularCompilerPlugin({
tsConfigPath: path.resolve(__dirname, 'src/tsconfig.app.json'),
entryModule: path.resolve(__dirname, 'src/app/app.module#AppModule'),
}),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"typescript": "~2.4.2",
"uglify-js": "^3.0.28",
"web-animations-js": "^2.3.1",
"zone.js": "^0.8.14"
"zone.js": "^0.8.17"
},
"peerDependencies": {
"@angular/animations": "^5.0.0",
Expand Down
12 changes: 7 additions & 5 deletions src/components/message/nz-message-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,20 @@ export interface NzMessageConfig {
nzAnimate?: boolean;
// For message container only
nzMaxStack?: number;

[index: string]: any;
}

export const NZ_MESSAGE_DEFAULT_CONFIG = new InjectionToken<NzMessageConfig>('NZ_MESSAGE_DEFAULT_CONFIG');

export const NZ_MESSAGE_CONFIG = new InjectionToken<NzMessageConfig>('NZ_MESSAGE_CONFIG');

export const NZ_MESSAGE_DEFAULT_CONFIG_PROVIDER = {
provide: NZ_MESSAGE_DEFAULT_CONFIG,
provide : NZ_MESSAGE_DEFAULT_CONFIG,
useValue: {
nzDuration : 1500,
nzAnimate : true,
nzPauseOnHover : true,
nzMaxStack : 7,
nzDuration : 1500,
nzAnimate : true,
nzPauseOnHover: true,
nzMaxStack : 7,
}
};
3 changes: 1 addition & 2 deletions src/components/message/nz-message.service.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Injectable, ComponentRef, Type } from '@angular/core';
import { Injectable, Type } from '@angular/core';
import { Overlay } from '@angular/cdk/overlay';
import { ComponentPortal } from '@angular/cdk/portal';
import { NzMessageConfig } from './nz-message-config';
import { NzMessageData, NzMessageDataFilled, NzMessageDataOptions } from './nz-message.definitions';
import { NzMessageContainerComponent } from './nz-message-container.component';

Expand Down
16 changes: 8 additions & 8 deletions src/components/notification/nz-notification.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Injectable, EventEmitter } from '@angular/core';
import { Injectable } from '@angular/core';
import { Overlay } from '@angular/cdk/overlay';
import { NzNotificationData, NzNotificationDataFilled } from './nz-notification.definitions';
import { NzMessageBaseService } from '../message/nz-message.service';
Expand All @@ -14,31 +14,31 @@ export class NzNotificationService extends NzMessageBaseService<NzNotificationCo

// Shortcut methods
success(title: string, content: string, options?: NzMessageDataOptions): NzNotificationDataFilled {
return this.createMessage({ type: 'success', title: title, content: content }, options);
return this.createMessage({ type: 'success', title: title, content: content }, options) as NzNotificationDataFilled;
}

error(title: string, content: string, options?: NzMessageDataOptions): NzNotificationDataFilled {
return this.createMessage({ type: 'error', title: title, content: content }, options);
return this.createMessage({ type: 'error', title: title, content: content }, options) as NzNotificationDataFilled;
}

info(title: string, content: string, options?: NzMessageDataOptions): NzNotificationDataFilled {
return this.createMessage({ type: 'info', title: title, content: content }, options);
return this.createMessage({ type: 'info', title: title, content: content }, options) as NzNotificationDataFilled;
}

warning(title: string, content: string, options?: NzMessageDataOptions): NzNotificationDataFilled {
return this.createMessage({ type: 'warning', title: title, content: content }, options);
return this.createMessage({ type: 'warning', title: title, content: content }, options) as NzNotificationDataFilled;
}

blank(title: string, content: string, options?: NzMessageDataOptions): NzNotificationDataFilled {
return this.createMessage({ type: 'blank', title: title, content: content }, options);
return this.createMessage({ type: 'blank', title: title, content: content }, options) as NzNotificationDataFilled;
}

create(type: string, title: string, content: string, options?: NzMessageDataOptions): NzNotificationDataFilled {
return this.createMessage({ type: type as any, title: title, content: content }, options);
return this.createMessage({ type: type as any, title: title, content: content }, options) as NzNotificationDataFilled;
}

// For content with html
html(html: string, options?: NzMessageDataOptions): NzNotificationDataFilled {
return this.createMessage({ html: html }, options);
return this.createMessage({ html: html }, options) as NzNotificationDataFilled;
}
}

0 comments on commit b08e822

Please sign in to comment.