ng2-toasty
Advanced tools
Comparing version 4.0.0 to 4.0.1
import { ModuleWithProviders } from "@angular/core"; | ||
export * from './src/toasty.service'; | ||
export * from './src/toasty.component'; | ||
export * from './src/toast.component'; | ||
export * from './src/shared'; | ||
import { ToastyService, ToastyConfig } from './src/toasty.service'; | ||
@@ -5,0 +7,0 @@ export declare let providers: (typeof ToastyConfig | { |
25
index.js
@@ -8,2 +8,4 @@ // Copyright (C) 2016 Sergey Akopkokhyants | ||
export * from './src/toasty.component'; | ||
export * from './src/toast.component'; | ||
export * from './src/shared'; | ||
import { ToastyComponent } from './src/toasty.component'; | ||
@@ -17,3 +19,3 @@ import { ToastComponent } from './src/toast.component'; | ||
]; | ||
export var ToastyModule = (function () { | ||
var ToastyModule = (function () { | ||
function ToastyModule() { | ||
@@ -27,13 +29,14 @@ } | ||
}; | ||
ToastyModule.decorators = [ | ||
{ type: NgModule, args: [{ | ||
imports: [CommonModule], | ||
declarations: [ToastComponent, ToastyComponent, SafeHtmlPipe], | ||
exports: [ToastComponent, ToastyComponent], | ||
providers: providers | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
ToastyModule.ctorParameters = function () { return []; }; | ||
return ToastyModule; | ||
}()); | ||
export { ToastyModule }; | ||
ToastyModule.decorators = [ | ||
{ type: NgModule, args: [{ | ||
imports: [CommonModule], | ||
declarations: [ToastComponent, ToastyComponent, SafeHtmlPipe], | ||
exports: [ToastComponent, ToastyComponent], | ||
providers: providers | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
ToastyModule.ctorParameters = function () { return []; }; |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"providers":[{"__symbolic":"reference","module":"./src/toasty.service","name":"ToastyConfig"},{"provide":{"__symbolic":"reference","module":"./src/toasty.service","name":"ToastyService"},"useFactory":{"__symbolic":"reference","module":"./src/toasty.service","name":"toastyServiceFactory"},"deps":[{"__symbolic":"reference","module":"./src/toasty.service","name":"ToastyConfig"}]}],"ToastyModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"declarations":[{"__symbolic":"reference","module":"./src/toast.component","name":"ToastComponent"},{"__symbolic":"reference","module":"./src/toasty.component","name":"ToastyComponent"},{"__symbolic":"reference","module":"./src/shared","name":"SafeHtmlPipe"}],"exports":[{"__symbolic":"reference","module":"./src/toast.component","name":"ToastComponent"},{"__symbolic":"reference","module":"./src/toasty.component","name":"ToastyComponent"}],"providers":{"__symbolic":"reference","name":"providers"}}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"ToastyModule"},"providers":{"__symbolic":"reference","name":"providers"}}}}}},"exports":[{"from":"./src/toasty.service"},{"from":"./src/toasty.component"}]},{"__symbolic":"module","version":1,"metadata":{"providers":[{"__symbolic":"reference","module":"./src/toasty.service","name":"ToastyConfig"},{"provide":{"__symbolic":"reference","module":"./src/toasty.service","name":"ToastyService"},"useFactory":{"__symbolic":"reference","module":"./src/toasty.service","name":"toastyServiceFactory"},"deps":[{"__symbolic":"reference","module":"./src/toasty.service","name":"ToastyConfig"}]}],"ToastyModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"declarations":[{"__symbolic":"reference","module":"./src/toast.component","name":"ToastComponent"},{"__symbolic":"reference","module":"./src/toasty.component","name":"ToastyComponent"},{"__symbolic":"reference","module":"./src/shared","name":"SafeHtmlPipe"}],"exports":[{"__symbolic":"reference","module":"./src/toast.component","name":"ToastComponent"},{"__symbolic":"reference","module":"./src/toasty.component","name":"ToastyComponent"}],"providers":{"__symbolic":"reference","name":"providers"}}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"ToastyModule"},"providers":{"__symbolic":"reference","name":"providers"}}}}}},"exports":[{"from":"./src/toasty.service"},{"from":"./src/toasty.component"}]}] | ||
[{"__symbolic":"module","version":3,"metadata":{"providers":[{"__symbolic":"reference","module":"./src/toasty.service","name":"ToastyConfig"},{"provide":{"__symbolic":"reference","module":"./src/toasty.service","name":"ToastyService"},"useFactory":{"__symbolic":"reference","module":"./src/toasty.service","name":"toastyServiceFactory"},"deps":[{"__symbolic":"reference","module":"./src/toasty.service","name":"ToastyConfig"}]}],"ToastyModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"declarations":[{"__symbolic":"reference","module":"./src/toast.component","name":"ToastComponent"},{"__symbolic":"reference","module":"./src/toasty.component","name":"ToastyComponent"},{"__symbolic":"reference","module":"./src/shared","name":"SafeHtmlPipe"}],"exports":[{"__symbolic":"reference","module":"./src/toast.component","name":"ToastComponent"},{"__symbolic":"reference","module":"./src/toasty.component","name":"ToastyComponent"}],"providers":{"__symbolic":"reference","name":"providers"}}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"ToastyModule"},"providers":{"__symbolic":"reference","name":"providers"}}}}}},"exports":[{"from":"./src/toasty.service"},{"from":"./src/toasty.component"},{"from":"./src/toast.component"},{"from":"./src/shared"}]},{"__symbolic":"module","version":1,"metadata":{"providers":[{"__symbolic":"reference","module":"./src/toasty.service","name":"ToastyConfig"},{"provide":{"__symbolic":"reference","module":"./src/toasty.service","name":"ToastyService"},"useFactory":{"__symbolic":"reference","module":"./src/toasty.service","name":"toastyServiceFactory"},"deps":[{"__symbolic":"reference","module":"./src/toasty.service","name":"ToastyConfig"}]}],"ToastyModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"declarations":[{"__symbolic":"reference","module":"./src/toast.component","name":"ToastComponent"},{"__symbolic":"reference","module":"./src/toasty.component","name":"ToastyComponent"},{"__symbolic":"reference","module":"./src/shared","name":"SafeHtmlPipe"}],"exports":[{"__symbolic":"reference","module":"./src/toast.component","name":"ToastComponent"},{"__symbolic":"reference","module":"./src/toasty.component","name":"ToastyComponent"}],"providers":{"__symbolic":"reference","name":"providers"}}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"ToastyModule"},"providers":{"__symbolic":"reference","name":"providers"}}}}}},"exports":[{"from":"./src/toasty.service"},{"from":"./src/toasty.component"},{"from":"./src/toast.component"},{"from":"./src/shared"}]}] |
{ | ||
"name": "ng2-toasty", | ||
"description": "Angular2 Toasty component shows growl-style alerts and messages for your web app", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"scripts": { | ||
@@ -36,40 +36,39 @@ "test": "karma start", | ||
"devDependencies": { | ||
"@angular/common": "^2.4.7", | ||
"@angular/compiler": "^2.4.7", | ||
"@angular/compiler-cli": "^2.4.7", | ||
"@angular/core": "^2.4.7", | ||
"@angular/platform-browser": "^2.4.7", | ||
"@angular/platform-browser-dynamic": "^2.4.7", | ||
"@angular/platform-server": "^2.4.7", | ||
"@types/hammerjs": "2.0.33", | ||
"@types/jasmine": "2.5.37", | ||
"@types/node": "6.0.46", | ||
"awesome-typescript-loader": "2.2.4", | ||
"@angular/common": "^2.4.7 || ^4.0.0", | ||
"@angular/compiler": "^2.4.7 || ^4.0.0", | ||
"@angular/compiler-cli": "^2.4.7 || ^4.0.0", | ||
"@angular/core": "^2.4.7 || ^4.0.0", | ||
"@angular/platform-browser": "^2.4.7 || ^4.0.0", | ||
"@angular/platform-browser-dynamic": "^2.4.7 || ^4.0.0", | ||
"@types/hammerjs": "^2.0.34", | ||
"@types/jasmine": "^2.5.51", | ||
"@types/node": "^7.0.29", | ||
"awesome-typescript-loader": "^3.1.3", | ||
"cash-cp": "^0.2.0", | ||
"codelyzer": "2.0.0-beta.2", | ||
"commitizen": "2.8.6", | ||
"core-js": "2.4.1", | ||
"cz-conventional-changelog": "1.2.0", | ||
"istanbul-instrumenter-loader": "0.2.0", | ||
"jasmine-core": "2.5.2", | ||
"karma": "1.3.0", | ||
"karma-chrome-launcher": "2.0.0", | ||
"karma-coverage": "1.1.1", | ||
"karma-firefox-launcher": "1.0.0", | ||
"karma-jasmine": "1.0.2", | ||
"karma-mocha-reporter": "^2.1.0", | ||
"karma-remap-coverage": "~0.1.2", | ||
"codelyzer": "^3.0.1", | ||
"commitizen": "^2.9.6", | ||
"core-js": "^2.4.1", | ||
"cz-conventional-changelog": "^2.0.0", | ||
"istanbul-instrumenter-loader": "^2.0.0", | ||
"jasmine-core": "^2.6.2", | ||
"karma": "^1.7.0", | ||
"karma-chrome-launcher": "^2.1.1", | ||
"karma-coverage": "^1.1.1", | ||
"karma-firefox-launcher": "^1.0.1", | ||
"karma-jasmine": "^1.1.0", | ||
"karma-mocha-reporter": "^2.2.3", | ||
"karma-remap-coverage": "~0.1.4", | ||
"karma-sourcemap-loader": "^0.3.7", | ||
"karma-webpack": "^2.0.1", | ||
"loader-utils": "~0.2.16", | ||
"reflect-metadata": "^0.1.8", | ||
"rxjs": "^5.0.3", | ||
"semantic-release": "4.3.5", | ||
"source-map-loader": "0.1.5", | ||
"ts-helpers": "1.1.2", | ||
"tslint": "~4.0.0", | ||
"tslint-loader": "3.3.0", | ||
"typescript": "2.0.10", | ||
"webpack": "2.2.0", | ||
"zone.js": "^0.7.6" | ||
"karma-webpack": "^2.0.3", | ||
"loader-utils": "^1.1.0", | ||
"reflect-metadata": "^0.1.10", | ||
"rxjs": "^5.4.0", | ||
"semantic-release": "^6.3.6", | ||
"source-map-loader": "^0.2.1", | ||
"ts-helpers": "^1.1.2", | ||
"tslint": "^5.4.3", | ||
"tslint-loader": "^3.5.3", | ||
"typescript": "^2.3.4", | ||
"webpack": "^2.6.1", | ||
"zone.js": "^0.8.12" | ||
}, | ||
@@ -81,2 +80,2 @@ "config": { | ||
} | ||
} | ||
} |
import { DomSanitizer } from '@angular/platform-browser'; | ||
import { Pipe } from '@angular/core'; | ||
export var SafeHtmlPipe = (function () { | ||
var SafeHtmlPipe = (function () { | ||
function SafeHtmlPipe(domSanitized) { | ||
@@ -14,10 +14,11 @@ this.domSanitized = domSanitized; | ||
}; | ||
SafeHtmlPipe.decorators = [ | ||
{ type: Pipe, args: [{ name: 'safeHtml' },] }, | ||
]; | ||
/** @nocollapse */ | ||
SafeHtmlPipe.ctorParameters = function () { return [ | ||
{ type: DomSanitizer, }, | ||
]; }; | ||
return SafeHtmlPipe; | ||
}()); | ||
export { SafeHtmlPipe }; | ||
SafeHtmlPipe.decorators = [ | ||
{ type: Pipe, args: [{ name: 'safeHtml' },] }, | ||
]; | ||
/** @nocollapse */ | ||
SafeHtmlPipe.ctorParameters = function () { return [ | ||
{ type: DomSanitizer, }, | ||
]; }; |
@@ -8,3 +8,3 @@ // Copyright (C) 2016 Sergey Akopkokhyants | ||
*/ | ||
export var ToastComponent = (function () { | ||
var ToastComponent = (function () { | ||
function ToastComponent() { | ||
@@ -21,15 +21,16 @@ this.closeToastEvent = new EventEmitter(); | ||
}; | ||
ToastComponent.decorators = [ | ||
{ type: Component, args: [{ | ||
selector: 'ng2-toast', | ||
template: "\n <div class=\"toast\" [ngClass]=\"[toast.type, toast.theme]\">\n <div *ngIf=\"toast.showClose\" class=\"close-button\" (click)=\"close($event)\"></div>\n <div *ngIf=\"toast.title || toast.msg\" class=\"toast-text\">\n <span *ngIf=\"toast.title\" class=\"toast-title\" [innerHTML]=\"toast.title | safeHtml\"></span>\n <br *ngIf=\"toast.title && toast.msg\" />\n <span *ngIf=\"toast.msg\" class=\"toast-msg\" [innerHtml]=\"toast.msg | safeHtml\"></span>\n </div>\n </div>" | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
ToastComponent.ctorParameters = function () { return []; }; | ||
ToastComponent.propDecorators = { | ||
'toast': [{ type: Input },], | ||
'closeToastEvent': [{ type: Output, args: ['closeToast',] },], | ||
}; | ||
return ToastComponent; | ||
}()); | ||
export { ToastComponent }; | ||
ToastComponent.decorators = [ | ||
{ type: Component, args: [{ | ||
selector: 'ng2-toast', | ||
template: "\n <div class=\"toast\" [ngClass]=\"[toast.type, toast.theme]\">\n <div *ngIf=\"toast.showClose\" class=\"close-button\" (click)=\"close($event)\"></div>\n <div *ngIf=\"toast.title || toast.msg\" class=\"toast-text\">\n <span *ngIf=\"toast.title\" class=\"toast-title\" [innerHTML]=\"toast.title | safeHtml\"></span>\n <br *ngIf=\"toast.title && toast.msg\" />\n <span *ngIf=\"toast.msg\" class=\"toast-msg\" [innerHtml]=\"toast.msg | safeHtml\"></span>\n </div>\n </div>" | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
ToastComponent.ctorParameters = function () { return []; }; | ||
ToastComponent.propDecorators = { | ||
'toast': [{ type: Input },], | ||
'closeToastEvent': [{ type: Output, args: ['closeToast',] },], | ||
}; |
@@ -10,3 +10,3 @@ // Copyright (C) 2016 Sergey Akopkokhyants | ||
*/ | ||
export var ToastyComponent = (function () { | ||
var ToastyComponent = (function () { | ||
function ToastyComponent(config, toastyService) { | ||
@@ -146,21 +146,22 @@ this.config = config; | ||
}; | ||
/** | ||
* Set of constants defins position of Toasty on the page. | ||
*/ | ||
ToastyComponent.POSITIONS = ['bottom-right', 'bottom-left', 'top-right', 'top-left', 'top-center', 'bottom-center', 'center-center']; | ||
ToastyComponent.decorators = [ | ||
{ type: Component, args: [{ | ||
selector: 'ng2-toasty', | ||
template: "\n <div id=\"toasty\" [ngClass]=\"[position]\">\n <ng2-toast *ngFor=\"let toast of toasts\" [toast]=\"toast\" (closeToast)=\"closeToast(toast)\"></ng2-toast>\n </div>" | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
ToastyComponent.ctorParameters = function () { return [ | ||
{ type: ToastyConfig, }, | ||
{ type: ToastyService, }, | ||
]; }; | ||
ToastyComponent.propDecorators = { | ||
'position': [{ type: Input },], | ||
}; | ||
return ToastyComponent; | ||
}()); | ||
export { ToastyComponent }; | ||
/** | ||
* Set of constants defins position of Toasty on the page. | ||
*/ | ||
ToastyComponent.POSITIONS = ['bottom-right', 'bottom-left', 'top-right', 'top-left', 'top-center', 'bottom-center', 'center-center']; | ||
ToastyComponent.decorators = [ | ||
{ type: Component, args: [{ | ||
selector: 'ng2-toasty', | ||
template: "\n <div id=\"toasty\" [ngClass]=\"[position]\">\n <ng2-toast *ngFor=\"let toast of toasts\" [toast]=\"toast\" (closeToast)=\"closeToast(toast)\"></ng2-toast>\n </div>" | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
ToastyComponent.ctorParameters = function () { return [ | ||
{ type: ToastyConfig, }, | ||
{ type: ToastyService, }, | ||
]; }; | ||
ToastyComponent.propDecorators = { | ||
'position': [{ type: Input },], | ||
}; |
@@ -10,29 +10,31 @@ // Copyright (C) 2016 Sergey Akopkokhyants | ||
*/ | ||
export var ToastOptions = (function () { | ||
var ToastOptions = (function () { | ||
function ToastOptions() { | ||
} | ||
ToastOptions.decorators = [ | ||
{ type: Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
ToastOptions.ctorParameters = function () { return []; }; | ||
return ToastOptions; | ||
}()); | ||
export { ToastOptions }; | ||
ToastOptions.decorators = [ | ||
{ type: Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
ToastOptions.ctorParameters = function () { return []; }; | ||
/** | ||
* Structrure of Toast | ||
*/ | ||
export var ToastData = (function () { | ||
var ToastData = (function () { | ||
function ToastData() { | ||
} | ||
ToastData.decorators = [ | ||
{ type: Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
ToastData.ctorParameters = function () { return []; }; | ||
return ToastData; | ||
}()); | ||
export { ToastData }; | ||
ToastData.decorators = [ | ||
{ type: Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
ToastData.ctorParameters = function () { return []; }; | ||
/** | ||
* Default configuration foa all toats and toasty container | ||
*/ | ||
export var ToastyConfig = (function () { | ||
var ToastyConfig = (function () { | ||
function ToastyConfig() { | ||
@@ -50,9 +52,10 @@ // Maximum number of toasties to show at once | ||
} | ||
ToastyConfig.decorators = [ | ||
{ type: Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
ToastyConfig.ctorParameters = function () { return []; }; | ||
return ToastyConfig; | ||
}()); | ||
export { ToastyConfig }; | ||
ToastyConfig.decorators = [ | ||
{ type: Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
ToastyConfig.ctorParameters = function () { return []; }; | ||
export var ToastyEventType; | ||
@@ -64,3 +67,3 @@ (function (ToastyEventType) { | ||
})(ToastyEventType || (ToastyEventType = {})); | ||
export var ToastyEvent = (function () { | ||
var ToastyEvent = (function () { | ||
function ToastyEvent(type, value) { | ||
@@ -72,2 +75,3 @@ this.type = type; | ||
}()); | ||
export { ToastyEvent }; | ||
export function toastyServiceFactory(config) { | ||
@@ -79,3 +83,3 @@ return new ToastyService(config); | ||
*/ | ||
export var ToastyService = (function () { | ||
var ToastyService = (function () { | ||
function ToastyService(config) { | ||
@@ -220,12 +224,13 @@ this.config = config; | ||
}; | ||
// Allowed THEMES | ||
ToastyService.THEMES = ['default', 'material', 'bootstrap']; | ||
ToastyService.decorators = [ | ||
{ type: Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
ToastyService.ctorParameters = function () { return [ | ||
{ type: ToastyConfig, }, | ||
]; }; | ||
return ToastyService; | ||
}()); | ||
export { ToastyService }; | ||
// Allowed THEMES | ||
ToastyService.THEMES = ['default', 'material', 'bootstrap']; | ||
ToastyService.decorators = [ | ||
{ type: Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
ToastyService.ctorParameters = function () { return [ | ||
{ type: ToastyConfig, }, | ||
]; }; |
/** | ||
* Check and return true if an object is type of string | ||
*/ | ||
export function isString(obj) { | ||
/** | ||
* Check and return true if an object is type of string | ||
*/ export function isString(obj) { | ||
return typeof obj === "string"; | ||
@@ -6,0 +8,0 @@ } |
Sorry, the diff of this file is too big to display
989361
37
60
5872