ngx-flash-messages
Version:
Flash messages/notifications for Angular 2+
1 lines • 18 kB
JavaScript
webpackJsonp([1,4],{"/fcW":function(n,l){function e(n){throw new Error("Cannot find module '"+n+"'.")}e.keys=function(){return[]},e.resolve=e,n.exports=e,e.id="/fcW"},1:function(n,l,e){n.exports=e("x35b")},"1A80":function(n,l,e){"use strict";function t(n){return _._16(0,[(n()(),_._17(0,null,null,3,"option",[],null,null,null,null,null)),_._18(73728,null,0,r.d,[_.W,_.X,[2,r.e]],{value:[0,"value"]},null),_._18(73728,null,0,r.f,[_.W,_.X,[8,null]],{value:[0,"value"]},null),(n()(),_._19(null,["",""]))],function(n,l){n(l,1,0,l.context.$implicit),n(l,2,0,l.context.$implicit)},function(n,l){n(l,3,0,l.context.$implicit)})}function u(n){return _._16(0,[(n()(),_._17(0,null,null,59,"div",[["class","container"]],null,null,null,null,null)),(n()(),_._19(null,["\n "])),(n()(),_._17(0,null,null,1,"h1",[["class","text-center title-spacing"]],null,null,null,null,null)),(n()(),_._19(null,["ngx-flash-messages Demo"])),(n()(),_._19(null,["\n\n "])),(n()(),_._17(0,null,null,1,"ngx-flash-messages",[],null,null,null,o.a,o.b)),_._18(57344,null,0,a.a,[c.a],null,null),(n()(),_._19(null,["\n\n "])),(n()(),_._17(0,null,null,50,"div",[["class","col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3 panel panel-default"]],null,null,null,null,null)),(n()(),_._19(null,["\n "])),(n()(),_._17(0,null,null,47,"div",[["class","panel-body"]],null,null,null,null,null)),(n()(),_._19(null,["\n "])),(n()(),_._17(0,null,null,11,"div",[["class","form-group"]],null,null,null,null,null)),(n()(),_._19(null,["\n "])),(n()(),_._17(0,null,null,1,"label",[["for","flash_message_content"]],null,null,null,null,null)),(n()(),_._19(null,["Message"])),(n()(),_._19(null,["\n "])),(n()(),_._17(0,null,null,5,"input",[["class","form-control"],["id","flash_message_content"],["type","text"]],[[8,"placeholder",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(n,l,e){var t=!0,u=n.component;if("input"===l){t=_._20(n,18)._handleInput(e.target.value)!==!1&&t}if("blur"===l){t=_._20(n,18).onTouched()!==!1&&t}if("compositionstart"===l){t=_._20(n,18)._compositionStart()!==!1&&t}if("compositionend"===l){t=_._20(n,18)._compositionEnd(e.target.value)!==!1&&t}if("ngModelChange"===l){t=(u.messageText=e)!==!1&&t}return t},null,null)),_._18(8192,null,0,r.g,[_.X,_.W,[2,r.h]],null,null),_._21(512,null,r.i,function(n){return[n]},[r.g]),_._18(335872,null,0,r.j,[[8,null],[8,null],[8,null],[2,r.i]],{model:[0,"model"]},{update:"ngModelChange"}),_._21(1024,null,r.k,null,[r.j]),_._18(8192,null,0,r.l,[r.k],null,null),(n()(),_._19(null,["\n "])),(n()(),_._19(null,["\n\n "])),(n()(),_._17(0,null,null,15,"div",[["class","form-group"]],null,null,null,null,null)),(n()(),_._19(null,["\n "])),(n()(),_._17(0,null,null,1,"label",[["for","class_list"]],null,null,null,null,null)),(n()(),_._19(null,["Classes"])),(n()(),_._19(null,["\n "])),(n()(),_._17(0,null,null,9,"select",[["class","form-control"],["id","class_list"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"change"],[null,"blur"]],function(n,l,e){var t=!0,u=n.component;if("change"===l){t=_._20(n,31).onChange(e.target.value)!==!1&&t}if("blur"===l){t=_._20(n,31).onTouched()!==!1&&t}if("ngModelChange"===l){t=(u.messageClass=e)!==!1&&t}return t},null,null)),_._18(8192,null,0,r.e,[_.X,_.W],null,null),_._21(512,null,r.i,function(n){return[n]},[r.e]),_._18(335872,null,0,r.j,[[8,null],[8,null],[8,null],[2,r.i]],{model:[0,"model"]},{update:"ngModelChange"}),_._21(1024,null,r.k,null,[r.j]),_._18(8192,null,0,r.l,[r.k],null,null),(n()(),_._19(null,["\n "])),(n()(),_._22(8388608,null,null,1,null,t)),_._18(401408,null,0,f.f,[_._1,_._2,_.t],{ngForOf:[0,"ngForOf"]},null),(n()(),_._19(null,["\n "])),(n()(),_._19(null,["\n "])),(n()(),_._19(null,["\n\n "])),(n()(),_._17(0,null,null,11,"div",[["class","form-group"]],null,null,null,null,null)),(n()(),_._19(null,["\n "])),(n()(),_._17(0,null,null,1,"label",[["for","flash_message_timeout"]],null,null,null,null,null)),(n()(),_._19(null,["Timeout (ms)"])),(n()(),_._19(null,["\n "])),(n()(),_._17(0,null,null,5,"input",[["class","form-control"],["id","flash_message_timeout"],["placeholder","Default is: 3000"],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(n,l,e){var t=!0,u=n.component;if("input"===l){t=_._20(n,48)._handleInput(e.target.value)!==!1&&t}if("blur"===l){t=_._20(n,48).onTouched()!==!1&&t}if("compositionstart"===l){t=_._20(n,48)._compositionStart()!==!1&&t}if("compositionend"===l){t=_._20(n,48)._compositionEnd(e.target.value)!==!1&&t}if("ngModelChange"===l){t=(u.messageTimeout=e)!==!1&&t}return t},null,null)),_._18(8192,null,0,r.g,[_.X,_.W,[2,r.h]],null,null),_._21(512,null,r.i,function(n){return[n]},[r.g]),_._18(335872,null,0,r.j,[[8,null],[8,null],[8,null],[2,r.i]],{model:[0,"model"]},{update:"ngModelChange"}),_._21(1024,null,r.k,null,[r.j]),_._18(8192,null,0,r.l,[r.k],null,null),(n()(),_._19(null,["\n "])),(n()(),_._19(null,["\n\n "])),(n()(),_._17(0,null,null,1,"button",[["class","btn btn-primary"]],null,[[null,"click"]],function(n,l,e){var t=!0,u=n.component;if("click"===l){t=u.createFlashMessage()!==!1&&t}return t},null,null)),(n()(),_._19(null,["Add message"])),(n()(),_._19(null,["\n "])),(n()(),_._19(null,["\n "])),(n()(),_._19(null,["\n"])),(n()(),_._19(null,["\n\n"])),(n()(),_._17(0,null,null,3,"a",[["href","https://github.com/MapleSyrupGroup/ngx-flash-messages"]],null,null,null,null,null)),(n()(),_._19(null,["\n "])),(n()(),_._17(0,null,null,0,"img",[["alt","Fork me on GitHub"],["data-canonical-src","https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"],["src","https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67"],["style","position: absolute; top: 0; right: 0; border: 0;"]],null,null,null,null,null)),(n()(),_._19(null,["\n"]))],function(n,l){var e=l.component;n(l,6,0),n(l,20,0,e.messageText),n(l,33,0,e.messageClass),n(l,38,0,e.classList),n(l,50,0,e.messageTimeout)},function(n,l){n(l,17,0,l.component.defaultMessage,_._20(l,22).ngClassUntouched,_._20(l,22).ngClassTouched,_._20(l,22).ngClassPristine,_._20(l,22).ngClassDirty,_._20(l,22).ngClassValid,_._20(l,22).ngClassInvalid,_._20(l,22).ngClassPending),n(l,30,0,_._20(l,35).ngClassUntouched,_._20(l,35).ngClassTouched,_._20(l,35).ngClassPristine,_._20(l,35).ngClassDirty,_._20(l,35).ngClassValid,_._20(l,35).ngClassInvalid,_._20(l,35).ngClassPending),n(l,47,0,_._20(l,52).ngClassUntouched,_._20(l,52).ngClassTouched,_._20(l,52).ngClassPristine,_._20(l,52).ngClassDirty,_._20(l,52).ngClassValid,_._20(l,52).ngClassInvalid,_._20(l,52).ngClassPending)})}function s(n){return _._16(0,[(n()(),_._17(0,null,null,1,"app-root",[],null,null,null,u,p)),_._18(57344,null,0,h.a,[c.a],null,null)],function(n,l){n(l,1,0)},null)}var i=e("Ni5f"),_=e("3j3K"),r=e("NVOs"),o=e("8u0Y"),a=e("jNQX"),c=e("ABFb"),h=e("YWx4"),f=e("2Je8");e.d(l,"a",function(){return d});var g=[i.a],p=_._15({encapsulation:0,styles:g,data:{}}),d=_._23("app-root",h.a,s,{},{},[])},"8u0Y":function(n,l,e){"use strict";function t(n){return i._16(0,[(n()(),i._17(0,null,null,5,"div",[["class","alert flash-message"]],null,null,null,null,null)),i._18(139264,null,0,_.g,[i.t,i.u,i.W,i.X],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),(n()(),i._19(null,["\n "])),(n()(),i._17(0,null,null,1,"p",[],null,null,null,null,null)),(n()(),i._19(null,["",""])),(n()(),i._19(null,["\n "]))],function(n,l){n(l,1,0,"alert flash-message",l.context.$implicit.options.classes)},function(n,l){n(l,4,0,l.context.$implicit.text)})}function u(n){return i._16(0,[(n()(),i._17(0,null,null,4,"div",[["class","flash-messages"],["id","flashMessages"]],null,null,null,null,null)),(n()(),i._19(null,["\n "])),(n()(),i._22(8388608,null,null,1,null,t)),i._18(401408,null,0,_.f,[i._1,i._2,i.t],{ngForOf:[0,"ngForOf"]},null),(n()(),i._19(null,["\n"]))],function(n,l){n(l,3,0,l.component.messages)},null)}function s(n){return i._16(0,[(n()(),i._17(0,null,null,1,"ngx-flash-messages",[],null,null,null,u,c)),i._18(57344,null,0,r.a,[o.a],null,null)],function(n,l){n(l,1,0)},null)}var i=e("3j3K"),_=e("2Je8"),r=e("jNQX"),o=e("ABFb");e.d(l,"b",function(){return c}),l.a=u;var a=[],c=i._15({encapsulation:2,styles:a,data:{}});i._23("ngx-flash-messages",r.a,s,{},{},[])},ABFb:function(n,l,e){"use strict";var t=e("3j3K"),u=e("EEr4");e.n(u);e.d(l,"a",function(){return s}),e.i(t.B)();var s=function(){function n(){this.message=new u.Subject}return n.prototype.show=function(n,l){void 0===l&&(l={}),this.message.next({text:n,options:l})},n}()},"IWj+":function(n,l,e){"use strict";e("ABFb"),e("jNQX");e.d(l,"a",function(){return t});var t=function(){function n(){}return n}()},Iksp:function(n,l,e){"use strict";e.d(l,"a",function(){return t});var t=function(){function n(){}return n}()},Ni5f:function(n,l,e){"use strict";e.d(l,"a",function(){return t});var t=[".title-spacing[_ngcontent-%COMP%]{margin-bottom:7rem}"]},YWx4:function(n,l,e){"use strict";var t=e("ABFb");e.d(l,"a",function(){return u});var u=function(){function n(n){this.flashMessages=n,this.classList=["alert-success","alert-info","alert-warning","alert-danger"],this.defaultMessage="Flash message!",this.defaultClass="alert-success"}return n.prototype.ngOnInit=function(){this.messageClass=this.classList[0]},n.prototype.createFlashMessage=function(){var n=this.messageText||this.defaultMessage,l={classes:["alert",this.messageClass||this.defaultClass]};this.messageTimeout&&(l.timeout=this.messageTimeout),this.flashMessages.show(n,l)},n.ctorParameters=function(){return[{type:t.a}]},n}()},jNQX:function(n,l,e){"use strict";var t=e("ABFb");e.d(l,"a",function(){return u});var u=function(){function n(n){this.flashMessagesService=n,this.messages=[]}return n.prototype.ngOnInit=function(){var n=this;this.flashMessagesService.message.subscribe(function(l){n.handleMessage(l)})},n.prototype.handleMessage=function(n){var l=this,e={classes:[],timeout:3e3};Object.assign(e,n.options),n.options=e;var t=n.timestamp=+new Date;this.messages.push(n),setTimeout(function(){l.messages=l.messages.filter(function(n){return n.timestamp!==t})},n.options.timeout)},n.ctorParameters=function(){return[{type:t.a}]},n}()},kZql:function(n,l,e){"use strict";e.d(l,"a",function(){return t});var t={production:!0}},kke6:function(n,l,e){"use strict";var t=e("3j3K"),u=e("Iksp"),s=e("2Je8"),i=e("Qbdm"),_=e("NVOs"),r=e("IWj+"),o=e("ABFb"),a=e("1A80");e.d(l,"a",function(){return f});var c=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,l){n.__proto__=l}||function(n,l){for(var e in l)l.hasOwnProperty(e)&&(n[e]=l[e])};return function(l,e){function t(){this.constructor=l}n(l,e),l.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),h=function(n){function l(l){return n.call(this,l,[a.a],[a.a])||this}return c(l,n),Object.defineProperty(l.prototype,"_LOCALE_ID_12",{get:function(){return null==this.__LOCALE_ID_12&&(this.__LOCALE_ID_12=t.b(this.parent.get(t.c,null))),this.__LOCALE_ID_12},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_NgLocalization_13",{get:function(){return null==this.__NgLocalization_13&&(this.__NgLocalization_13=new s.a(this._LOCALE_ID_12)),this.__NgLocalization_13},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_Compiler_14",{get:function(){return null==this.__Compiler_14&&(this.__Compiler_14=new t.d),this.__Compiler_14},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_APP_ID_15",{get:function(){return null==this.__APP_ID_15&&(this.__APP_ID_15=t.e()),this.__APP_ID_15},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_IterableDiffers_16",{get:function(){return null==this.__IterableDiffers_16&&(this.__IterableDiffers_16=t.f()),this.__IterableDiffers_16},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_KeyValueDiffers_17",{get:function(){return null==this.__KeyValueDiffers_17&&(this.__KeyValueDiffers_17=t.g()),this.__KeyValueDiffers_17},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_DomSanitizer_18",{get:function(){return null==this.__DomSanitizer_18&&(this.__DomSanitizer_18=new i.b(this.parent.get(i.c))),this.__DomSanitizer_18},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_Sanitizer_19",{get:function(){return null==this.__Sanitizer_19&&(this.__Sanitizer_19=this._DomSanitizer_18),this.__Sanitizer_19},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_HAMMER_GESTURE_CONFIG_20",{get:function(){return null==this.__HAMMER_GESTURE_CONFIG_20&&(this.__HAMMER_GESTURE_CONFIG_20=new i.d),this.__HAMMER_GESTURE_CONFIG_20},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_EVENT_MANAGER_PLUGINS_21",{get:function(){return null==this.__EVENT_MANAGER_PLUGINS_21&&(this.__EVENT_MANAGER_PLUGINS_21=[new i.e(this.parent.get(i.c)),new i.f(this.parent.get(i.c)),new i.g(this.parent.get(i.c),this._HAMMER_GESTURE_CONFIG_20)]),this.__EVENT_MANAGER_PLUGINS_21},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_EventManager_22",{get:function(){return null==this.__EventManager_22&&(this.__EventManager_22=new i.h(this._EVENT_MANAGER_PLUGINS_21,this.parent.get(t.h))),this.__EventManager_22},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_ɵDomSharedStylesHost_23",{get:function(){return null==this.__ɵDomSharedStylesHost_23&&(this.__ɵDomSharedStylesHost_23=new i.i(this.parent.get(i.c))),this.__ɵDomSharedStylesHost_23},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_ɵDomRendererFactory2_24",{get:function(){return null==this.__ɵDomRendererFactory2_24&&(this.__ɵDomRendererFactory2_24=new i.j(this._EventManager_22,this._ɵDomSharedStylesHost_23)),this.__ɵDomRendererFactory2_24},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_RendererFactory2_25",{get:function(){return null==this.__RendererFactory2_25&&(this.__RendererFactory2_25=this._ɵDomRendererFactory2_24),this.__RendererFactory2_25},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_ɵSharedStylesHost_26",{get:function(){return null==this.__ɵSharedStylesHost_26&&(this.__ɵSharedStylesHost_26=this._ɵDomSharedStylesHost_23),this.__ɵSharedStylesHost_26},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_Testability_27",{get:function(){return null==this.__Testability_27&&(this.__Testability_27=new t.i(this.parent.get(t.h))),this.__Testability_27},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_Meta_28",{get:function(){return null==this.__Meta_28&&(this.__Meta_28=new i.k(this.parent.get(i.c))),this.__Meta_28},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_Title_29",{get:function(){return null==this.__Title_29&&(this.__Title_29=new i.l(this.parent.get(i.c))),this.__Title_29},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_ɵi_30",{get:function(){return null==this.__ɵi_30&&(this.__ɵi_30=new _.a),this.__ɵi_30},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_FlashMessagesService_31",{get:function(){return null==this.__FlashMessagesService_31&&(this.__FlashMessagesService_31=new o.a),this.__FlashMessagesService_31},enumerable:!0,configurable:!0}),l.prototype.createInternal=function(){return this._CommonModule_0=new s.b,this._ErrorHandler_1=i.m(),this._APP_INITIALIZER_2=[t.j,i.n(this.parent.get(i.o,null),this.parent.get(t.k,null))],this._ApplicationInitStatus_3=new t.l(this._APP_INITIALIZER_2),this._ɵf_4=new t.m(this.parent.get(t.h),this.parent.get(t.n),this,this._ErrorHandler_1,this.componentFactoryResolver,this._ApplicationInitStatus_3),this._ApplicationRef_5=this._ɵf_4,this._ApplicationModule_6=new t.o(this._ApplicationRef_5),this._BrowserModule_7=new i.p(this.parent.get(i.p,null)),this._ɵba_8=new _.b,this._FormsModule_9=new _.c,this._FlashMessagesModule_10=new r.a,this._AppModule_11=new u.a,this._AppModule_11},l.prototype.getInternal=function(n,l){return n===s.b?this._CommonModule_0:n===t.p?this._ErrorHandler_1:n===t.q?this._APP_INITIALIZER_2:n===t.l?this._ApplicationInitStatus_3:n===t.m?this._ɵf_4:n===t.r?this._ApplicationRef_5:n===t.o?this._ApplicationModule_6:n===i.p?this._BrowserModule_7:n===_.b?this._ɵba_8:n===_.c?this._FormsModule_9:n===r.a?this._FlashMessagesModule_10:n===u.a?this._AppModule_11:n===t.c?this._LOCALE_ID_12:n===s.c?this._NgLocalization_13:n===t.d?this._Compiler_14:n===t.s?this._APP_ID_15:n===t.t?this._IterableDiffers_16:n===t.u?this._KeyValueDiffers_17:n===i.q?this._DomSanitizer_18:n===t.v?this._Sanitizer_19:n===i.r?this._HAMMER_GESTURE_CONFIG_20:n===i.s?this._EVENT_MANAGER_PLUGINS_21:n===i.h?this._EventManager_22:n===i.i?this._ɵDomSharedStylesHost_23:n===i.j?this._ɵDomRendererFactory2_24:n===t.w?this._RendererFactory2_25:n===i.t?this._ɵSharedStylesHost_26:n===t.i?this._Testability_27:n===i.k?this._Meta_28:n===i.l?this._Title_29:n===_.a?this._ɵi_30:n===o.a?this._FlashMessagesService_31:l},l.prototype.destroyInternal=function(){this._ɵf_4.ngOnDestroy(),this.__ɵDomSharedStylesHost_23&&this._ɵDomSharedStylesHost_23.ngOnDestroy()},l}(t.x),f=new t.y(h,u.a)},x35b:function(n,l,e){"use strict";Object.defineProperty(l,"__esModule",{value:!0});var t=e("3j3K"),u=e("kZql"),s=e("Qbdm"),i=e("kke6");u.a.production&&e.i(t.a)(),e.i(s.a)().bootstrapModuleFactory(i.a)}},[1]);