From efeae6b433fc61c2bd1296fe3acbbabfa812ce5f Mon Sep 17 00:00:00 2001 From: Sergey Akopkokhyants Date: Sun, 31 Jul 2016 20:12:46 +0200 Subject: [PATCH] feat(): Implemented package should not have angular as dependency --- bundles/ng2-toasty.js | 13 +++++++++---- bundles/ng2-toasty.min.js | 2 +- package.json | 10 +++++----- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/bundles/ng2-toasty.js b/bundles/ng2-toasty.js index 5e5841d..206ce55 100644 --- a/bundles/ng2-toasty.js +++ b/bundles/ng2-toasty.js @@ -1,4 +1,5 @@ System.registerDynamic("src/toasty.container", ["@angular/core", "@angular/common", "./toasty.utils", "./toasty.config", "./toasty.service", "./toasty.component"], true, function($__require, exports, module) { + "use strict"; ; var define, global = this, @@ -106,12 +107,13 @@ System.registerDynamic("src/toasty.container", ["@angular/core", "@angular/commo template: "\n
\n \n
" }), __metadata('design:paramtypes', [toasty_config_1.ToastyConfig, toasty_service_1.ToastyService])], Toasty); return Toasty; - })(); + }()); exports.Toasty = Toasty; return module.exports; }); System.registerDynamic("src/toasty.component", ["@angular/core", "@angular/common"], true, function($__require, exports, module) { + "use strict"; ; var define, global = this, @@ -150,12 +152,13 @@ System.registerDynamic("src/toasty.component", ["@angular/core", "@angular/commo template: "\n
\n
\n
\n {{toast.title}}\n
\n {{toast.msg}}\n
\n
" }), __metadata('design:paramtypes', [])], Toast); return Toast; - })(); + }()); exports.Toast = Toast; return module.exports; }); System.registerDynamic("src/toasty.config", ["@angular/core"], true, function($__require, exports, module) { + "use strict"; ; var define, global = this, @@ -187,12 +190,13 @@ System.registerDynamic("src/toasty.config", ["@angular/core"], true, function($_ } ToastyConfig = __decorate([core_1.Injectable(), __metadata('design:paramtypes', [])], ToastyConfig); return ToastyConfig; - })(); + }()); exports.ToastyConfig = ToastyConfig; return module.exports; }); System.registerDynamic("src/toasty.service", ["@angular/core", "./toasty.utils", "rxjs/Observable", "./toasty.config"], true, function($__require, exports, module) { + "use strict"; ; var define, global = this, @@ -311,12 +315,13 @@ System.registerDynamic("src/toasty.service", ["@angular/core", "./toasty.utils", ToastyService.THEMES = ['default', 'material', 'bootstrap']; ToastyService = __decorate([core_1.Injectable(), __metadata('design:paramtypes', [toasty_config_1.ToastyConfig])], ToastyService); return ToastyService; - })(); + }()); exports.ToastyService = ToastyService; return module.exports; }); System.registerDynamic("src/toasty.utils", [], true, function($__require, exports, module) { + "use strict"; ; var define, global = this, diff --git a/bundles/ng2-toasty.min.js b/bundles/ng2-toasty.min.js index 8d29b91..7b58e9e 100644 --- a/bundles/ng2-toasty.min.js +++ b/bundles/ng2-toasty.min.js @@ -1,2 +1,2 @@ -System.registerDynamic("src/toasty.container",["@angular/core","@angular/common","./toasty.utils","./toasty.config","./toasty.service","./toasty.component"],!0,function(t,e,o){var s=this&&this.__decorate||function(t,e,o,s){var n,i=arguments.length,r=3>i?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,s);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(3>i?n(r):i>3?n(e,o,r):n(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},n=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},i=t("@angular/core"),r=t("@angular/common"),a=t("./toasty.utils"),c=t("./toasty.config"),l=t("./toasty.service"),f=t("./toasty.component"),u=function(){function t(t,e){this.config=t,this.toastyService=e,this.toasts=[]}return t.prototype.ngOnInit=function(){var e=this;if(this.toastyService.getToasts().subscribe(function(t){e.toasts.length>=e.config.limit&&e.toasts.shift(),e.toasts.push(t),t.timeout&&e._setTimeout(t)}),this.toastyService.getClear().subscribe(function(t){t&&e.clear(t),e.clearAll()}),this.position){for(var o=!0,s=0;s\n \n '}),n("design:paramtypes",[c.ToastyConfig,l.ToastyService])],t)}();return e.Toasty=u,o.exports}),System.registerDynamic("src/toasty.component",["@angular/core","@angular/common"],!0,function(t,e,o){var s=this&&this.__decorate||function(t,e,o,s){var n,i=arguments.length,r=3>i?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,s);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(3>i?n(r):i>3?n(e,o,r):n(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},n=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},i=t("@angular/core"),r=t("@angular/common"),a=function(){function t(){this.closeToastEvent=new i.EventEmitter}return t.prototype.close=function(t){t.preventDefault(),this.closeToastEvent.next(this.toast)},s([i.Input(),n("design:type",Object)],t.prototype,"toast",void 0),s([i.Output("closeToast"),n("design:type",Object)],t.prototype,"closeToastEvent",void 0),t=s([i.Component({selector:"ng2-toast",directives:[r.CORE_DIRECTIVES],template:'\n
\n
\n
\n {{toast.title}}\n
\n {{toast.msg}}\n
\n
'}),n("design:paramtypes",[])],t)}();return e.Toast=a,o.exports}),System.registerDynamic("src/toasty.config",["@angular/core"],!0,function(t,e,o){var s=this&&this.__decorate||function(t,e,o,s){var n,i=arguments.length,r=3>i?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,s);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(3>i?n(r):i>3?n(e,o,r):n(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},n=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},i=t("@angular/core"),r=function(){function t(){this.limit=5,this.showClose=!0,this.position="bottom-right",this.timeout=5e3,this.theme="default"}return t=s([i.Injectable(),n("design:paramtypes",[])],t)}();return e.ToastyConfig=r,o.exports}),System.registerDynamic("src/toasty.service",["@angular/core","./toasty.utils","rxjs/Observable","./toasty.config"],!0,function(t,e,o){var s=this&&this.__decorate||function(t,e,o,s){var n,i=arguments.length,r=3>i?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,s);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(3>i?n(r):i>3?n(e,o,r):n(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},n=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},i=t("@angular/core"),r=t("./toasty.utils"),a=t("rxjs/Observable"),c=t("./toasty.config"),l=function(){function t(t){var e=this;this.config=t,this.uniqueCounter=0,this.toastsObservable=new a.Observable(function(t){e.toastsSubscriber=t}),this.clearObservable=new a.Observable(function(t){e.clearSubscriber=t})}return t.prototype.getToasts=function(){return this.toastsObservable},t.prototype.getClear=function(){return this.clearObservable},t.prototype["default"]=function(t){this.add(t,"default")},t.prototype.info=function(t){this.add(t,"info")},t.prototype.success=function(t){this.add(t,"success")},t.prototype.wait=function(t){this.add(t,"wait")},t.prototype.error=function(t){this.add(t,"error")},t.prototype.warning=function(t){this.add(t,"warning")},t.prototype.add=function(e,o){var s;if(s=r.isString(e)&&""!==e||r.isNumber(e)?{title:e.toString()}:e,!s||!s.title&&!s.msg)throw new Error("ng2-toasty: No toast title or message specified!");o=o||"default",this.uniqueCounter++;var n,i=this._checkConfigItem(this.config,s,"showClose");n=s.theme&&t.THEMES.indexOf(s.theme)>-1?s.theme:this.config.theme;var a={id:this.uniqueCounter,title:s.title,msg:s.msg,showClose:i,type:"toasty-type-"+o,theme:"toasty-theme-"+n,onAdd:s.onAdd&&r.isFunction(s.onAdd)?s.onAdd:null,onRemove:s.onRemove&&r.isFunction(s.onRemove)?s.onRemove:null};a.timeout=s.hasOwnProperty("timeout")?s.timeout:this.config.timeout;try{this.toastsSubscriber.next(a),s.onAdd&&r.isFunction(s.onAdd)&&s.onAdd.call(this,a)}catch(c){console.log(c),console.log("!!! Suggestion: Seems you forget add into your html?")}},t.prototype.clearAll=function(){this.clearSubscriber.next(null)},t.prototype.clear=function(t){this.clearSubscriber.next(t)},t.prototype._checkConfigItem=function(t,e,o){return e[o]===!1?!1:e[o]?!0:t[o]},t.THEMES=["default","material","bootstrap"],t=s([i.Injectable(),n("design:paramtypes",[c.ToastyConfig])],t)}();return e.ToastyService=l,o.exports}),System.registerDynamic("src/toasty.utils",[],!0,function(t,e,o){function s(t){return"string"==typeof t}function n(t){return"number"==typeof t}function i(t){return"function"==typeof t}return e.isString=s,e.isNumber=n,e.isFunction=i,o.exports}),System.registerDynamic("ng2-toasty",["./src/toasty.container","./src/toasty.component","./src/toasty.config","./src/toasty.service","./src/toasty.utils"],!0,function(t,e,o){"use strict";function s(t){for(var o in t)e.hasOwnProperty(o)||(e[o]=t[o])}var n=t("./src/toasty.container"),i=t("./src/toasty.component"),r=t("./src/toasty.config"),a=t("./src/toasty.service");return s(t("./src/toasty.container")),s(t("./src/toasty.component")),s(t("./src/toasty.config")),s(t("./src/toasty.service")),s(t("./src/toasty.utils")),Object.defineProperty(e,"__esModule",{value:!0}),e["default"]={providers:[r.ToastyConfig,a.ToastyService],directives:[n.Toasty,i.Toast]},o.exports}); +System.registerDynamic("src/toasty.container",["@angular/core","@angular/common","./toasty.utils","./toasty.config","./toasty.service","./toasty.component"],!0,function(t,e,o){"use strict";var s=this&&this.__decorate||function(t,e,o,s){var n,i=arguments.length,r=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,s);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(i<3?n(r):i>3?n(e,o,r):n(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},n=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},i=t("@angular/core"),r=t("@angular/common"),a=t("./toasty.utils"),c=t("./toasty.config"),u=t("./toasty.service"),f=t("./toasty.component"),l=function(){function t(t,e){this.config=t,this.toastyService=e,this.toasts=[]}return t.prototype.ngOnInit=function(){var e=this;if(this.toastyService.getToasts().subscribe(function(t){e.toasts.length>=e.config.limit&&e.toasts.shift(),e.toasts.push(t),t.timeout&&e._setTimeout(t)}),this.toastyService.getClear().subscribe(function(t){t&&e.clear(t),e.clearAll()}),this.position){for(var o=!0,s=0;s\n \n '}),n("design:paramtypes",[c.ToastyConfig,u.ToastyService])],t)}();return e.Toasty=l,o.exports}),System.registerDynamic("src/toasty.component",["@angular/core","@angular/common"],!0,function(t,e,o){"use strict";var s=this&&this.__decorate||function(t,e,o,s){var n,i=arguments.length,r=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,s);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(i<3?n(r):i>3?n(e,o,r):n(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},n=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},i=t("@angular/core"),r=t("@angular/common"),a=function(){function t(){this.closeToastEvent=new i.EventEmitter}return t.prototype.close=function(t){t.preventDefault(),this.closeToastEvent.next(this.toast)},s([i.Input(),n("design:type",Object)],t.prototype,"toast",void 0),s([i.Output("closeToast"),n("design:type",Object)],t.prototype,"closeToastEvent",void 0),t=s([i.Component({selector:"ng2-toast",directives:[r.CORE_DIRECTIVES],template:'\n
\n
\n
\n {{toast.title}}\n
\n {{toast.msg}}\n
\n
'}),n("design:paramtypes",[])],t)}();return e.Toast=a,o.exports}),System.registerDynamic("src/toasty.config",["@angular/core"],!0,function(t,e,o){"use strict";var s=this&&this.__decorate||function(t,e,o,s){var n,i=arguments.length,r=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,s);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(i<3?n(r):i>3?n(e,o,r):n(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},n=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},i=t("@angular/core"),r=function(){function t(){this.limit=5,this.showClose=!0,this.position="bottom-right",this.timeout=5e3,this.theme="default"}return t=s([i.Injectable(),n("design:paramtypes",[])],t)}();return e.ToastyConfig=r,o.exports}),System.registerDynamic("src/toasty.service",["@angular/core","./toasty.utils","rxjs/Observable","./toasty.config"],!0,function(t,e,o){"use strict";var s=this&&this.__decorate||function(t,e,o,s){var n,i=arguments.length,r=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,s);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(i<3?n(r):i>3?n(e,o,r):n(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},n=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},i=t("@angular/core"),r=t("./toasty.utils"),a=t("rxjs/Observable"),c=t("./toasty.config"),u=function(){function t(t){var e=this;this.config=t,this.uniqueCounter=0,this.toastsObservable=new a.Observable(function(t){e.toastsSubscriber=t}),this.clearObservable=new a.Observable(function(t){e.clearSubscriber=t})}return t.prototype.getToasts=function(){return this.toastsObservable},t.prototype.getClear=function(){return this.clearObservable},t.prototype.default=function(t){this.add(t,"default")},t.prototype.info=function(t){this.add(t,"info")},t.prototype.success=function(t){this.add(t,"success")},t.prototype.wait=function(t){this.add(t,"wait")},t.prototype.error=function(t){this.add(t,"error")},t.prototype.warning=function(t){this.add(t,"warning")},t.prototype.add=function(e,o){var s;if(s=r.isString(e)&&""!==e||r.isNumber(e)?{title:e.toString()}:e,!s||!s.title&&!s.msg)throw new Error("ng2-toasty: No toast title or message specified!");o=o||"default",this.uniqueCounter++;var n,i=this._checkConfigItem(this.config,s,"showClose");n=s.theme&&t.THEMES.indexOf(s.theme)>-1?s.theme:this.config.theme;var a={id:this.uniqueCounter,title:s.title,msg:s.msg,showClose:i,type:"toasty-type-"+o,theme:"toasty-theme-"+n,onAdd:s.onAdd&&r.isFunction(s.onAdd)?s.onAdd:null,onRemove:s.onRemove&&r.isFunction(s.onRemove)?s.onRemove:null};a.timeout=s.hasOwnProperty("timeout")?s.timeout:this.config.timeout;try{this.toastsSubscriber.next(a),s.onAdd&&r.isFunction(s.onAdd)&&s.onAdd.call(this,a)}catch(t){console.log(t),console.log("!!! Suggestion: Seems you forget add into your html?")}},t.prototype.clearAll=function(){this.clearSubscriber.next(null)},t.prototype.clear=function(t){this.clearSubscriber.next(t)},t.prototype._checkConfigItem=function(t,e,o){return e[o]!==!1&&(!!e[o]||t[o])},t.THEMES=["default","material","bootstrap"],t=s([i.Injectable(),n("design:paramtypes",[c.ToastyConfig])],t)}();return e.ToastyService=u,o.exports}),System.registerDynamic("src/toasty.utils",[],!0,function(t,e,o){"use strict";function s(t){return"string"==typeof t}function n(t){return"number"==typeof t}function i(t){return"function"==typeof t}return e.isString=s,e.isNumber=n,e.isFunction=i,o.exports}),System.registerDynamic("ng2-toasty",["./src/toasty.container","./src/toasty.component","./src/toasty.config","./src/toasty.service","./src/toasty.utils"],!0,function(t,e,o){"use strict";function s(t){for(var o in t)e.hasOwnProperty(o)||(e[o]=t[o])}var n=t("./src/toasty.container"),i=t("./src/toasty.component"),r=t("./src/toasty.config"),a=t("./src/toasty.service");return s(t("./src/toasty.container")),s(t("./src/toasty.component")),s(t("./src/toasty.config")),s(t("./src/toasty.service")),s(t("./src/toasty.utils")),Object.defineProperty(e,"__esModule",{value:!0}),e.default={providers:[r.ToastyConfig,a.ToastyService],directives:[n.Toasty,i.Toast]},o.exports}); //# sourceMappingURL=bundles/ng2-toasty.min.js.map \ No newline at end of file diff --git a/package.json b/package.json index c3310bb..06e0c5c 100644 --- a/package.json +++ b/package.json @@ -27,17 +27,17 @@ "typings": "./ng2-toasty.d.ts", "homepage": "https://github.com/akserg/ng2-toasty", "dependencies": { - "@angular/common": "^2.0.0-rc.4", - "@angular/compiler": "^2.0.0-rc.4", - "@angular/core": "^2.0.0-rc.4", - "@angular/platform-browser": "^2.0.0-rc.4", - "@angular/platform-browser-dynamic": "^2.0.0-rc.4", "es6-shim": "~0.35.0", "reflect-metadata": "0.1.2", "rxjs": "5.0.0-beta.6", "zone.js": "~0.6.12" }, "devDependencies": { + "@angular/common": "^2.0.0-rc.4", + "@angular/compiler": "^2.0.0-rc.4", + "@angular/core": "^2.0.0-rc.4", + "@angular/platform-browser": "^2.0.0-rc.4", + "@angular/platform-browser-dynamic": "^2.0.0-rc.4", "cz-conventional-changelog": "^1.1.6", "jasmine-core": "~2.3.4", "karma": "~0.13.15",