angular2-toaster-mod
Version:
An Angular 2 Toaster Notification library based on AngularJS-Toaster
1 lines • 5.63 kB
Source Map (JSON)
{"version":3,"file":"toaster-config.js","sourceRoot":"","sources":["../../src/toaster-config.ts"],"names":[],"mappings":"OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB;AAE/C;IAwBI,uBAAY,eAAgC;QACxC,eAAe,GAAG,eAAe,IAAI,EAAE,CAAC;QACxC,IAAI,CAAC,KAAK,GAAG,eAAe,CAAC,KAAK,IAAI,IAAI,CAAC;QAC3C,IAAI,CAAC,YAAY,GAAG,eAAe,CAAC,YAAY,IAAI,IAAI,GAAG,eAAe,CAAC,YAAY,GAAG,IAAI,CAAC;QAC/F,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC,eAAe,IAAI,IAAI,GAAG,eAAe,CAAC,eAAe,GAAG,KAAK,CAAC;QACzG,IAAI,CAAC,SAAS,GAAG,eAAe,CAAC,SAAS,IAAI,mEAAmE,CAAC;QAClH,IAAI,CAAC,WAAW,GAAG,eAAe,CAAC,WAAW,IAAI,IAAI,GAAG,eAAe,CAAC,WAAW,GAAG,IAAI,CAAC;QAC5F,IAAI,CAAC,OAAO,GAAG,eAAe,CAAC,OAAO,IAAI,IAAI,GAAG,eAAe,CAAC,OAAO,GAAG,IAAI,CAAC;QAChF,IAAI,CAAC,WAAW,GAAG,eAAe,CAAC,WAAW,IAAI;YAC9C,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,YAAY;YAClB,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE,eAAe;YACxB,OAAO,EAAE,eAAe;SAC3B,CAAC;QACF,IAAI,CAAC,WAAW,GAAG,eAAe,CAAC,WAAW,IAAI;YAC9C,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,cAAc;YACvB,OAAO,EAAE,cAAc;SAC1B,CAAC;QACF,IAAI,CAAC,cAAc,GAAG,eAAe,CAAC,cAAc,IAAI,cAAc,CAAC,OAAO,CAAC;QAC/E,IAAI,CAAC,YAAY,GAAG,eAAe,CAAC,YAAY,IAAI,sBAAsB,CAAC;QAC3E,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC,gBAAgB,IAAI,YAAY,CAAC;QACzE,IAAI,CAAC,aAAa,GAAG,eAAe,CAAC,aAAa,IAAI,iBAAiB,CAAC;QACxE,IAAI,CAAC,cAAc,GAAG,eAAe,CAAC,cAAc,IAAI,EAAE,CAAC;QAC3D,IAAI,CAAC,UAAU,GAAG,eAAe,CAAC,UAAU,IAAI,aAAa,CAAC;QAC9D,IAAI,CAAC,YAAY,GAAG,eAAe,CAAC,YAAY,IAAI,eAAe,CAAC;QACpE,IAAI,CAAC,iBAAiB,GAAG,eAAe,CAAC,iBAAiB,IAAI,IAAI,GAAG,eAAe,CAAC,iBAAiB,GAAG,KAAK,CAAC;QAC/G,IAAI,CAAC,kBAAkB,GAAG,eAAe,CAAC,kBAAkB,IAAI,IAAI,GAAG,eAAe,CAAC,kBAAkB,GAAG,KAAK,CAAC;QAClH,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC,gBAAgB,IAAI,IAAI,GAAG,eAAe,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAC/G,CAAC;IACL,oBAAC;AAAD,CAAC,AAzDD,IAyDC","sourcesContent":["import {BodyOutputType} from './bodyOutputType';\n\nexport class ToasterConfig implements IToasterConfig {\n limit: number;\n tapToDismiss: boolean;\n showCloseButton: boolean|Object;\n closeHtml: string;\n newestOnTop: boolean;\n timeout: number|Object;\n typeClasses: Object;\n iconClasses: Object;\n bodyOutputType: BodyOutputType;\n bodyTemplate: string;\n defaultTypeClass: string;\n // Options (see CSS):\n // 'toast-top-full-width', 'toast-bottom-full-width', 'toast-center',\n // 'toast-top-left', 'toast-top-center', 'toast-top-right',\n // 'toast-bottom-left', 'toast-bottom-center', 'toast-bottom-right',\n positionClass: string;\n animationClass: string;\n titleClass: string;\n messageClass: string;\n preventDuplicates: boolean;\n mouseoverTimerStop: boolean;\n toastContainerId: number;\n\n constructor(configOverrides?: IToasterConfig) {\n configOverrides = configOverrides || {};\n this.limit = configOverrides.limit || null;\n this.tapToDismiss = configOverrides.tapToDismiss != null ? configOverrides.tapToDismiss : true;\n this.showCloseButton = configOverrides.showCloseButton != null ? configOverrides.showCloseButton : false;\n this.closeHtml = configOverrides.closeHtml || '<button class=\"toast-close-button\" type=\"button\">×</button>';\n this.newestOnTop = configOverrides.newestOnTop != null ? configOverrides.newestOnTop : true;\n this.timeout = configOverrides.timeout != null ? configOverrides.timeout : 5000;\n this.typeClasses = configOverrides.typeClasses || {\n error: 'toast-error',\n info: 'toast-info',\n wait: 'toast-wait',\n success: 'toast-success',\n warning: 'toast-warning'\n };\n this.iconClasses = configOverrides.iconClasses || {\n error: 'icon-error',\n info: 'icon-info',\n wait: 'icon-wait',\n success: 'icon-success',\n warning: 'icon-warning'\n };\n this.bodyOutputType = configOverrides.bodyOutputType || BodyOutputType.Default;\n this.bodyTemplate = configOverrides.bodyTemplate || 'toasterBodyTmpl.html';\n this.defaultTypeClass = configOverrides.defaultTypeClass || 'toast-info';\n this.positionClass = configOverrides.positionClass || 'toast-top-right';\n this.animationClass = configOverrides.animationClass || '';\n this.titleClass = configOverrides.titleClass || 'toast-title';\n this.messageClass = configOverrides.messageClass || 'toast-message';\n this.preventDuplicates = configOverrides.preventDuplicates != null ? configOverrides.preventDuplicates : false;\n this.mouseoverTimerStop = configOverrides.mouseoverTimerStop != null ? configOverrides.mouseoverTimerStop : false;\n this.toastContainerId = configOverrides.toastContainerId != null ? configOverrides.toastContainerId : null;\n }\n}\n\nexport interface IToasterConfig {\n limit?: number;\n tapToDismiss?: boolean;\n showCloseButton?: boolean|Object;\n closeHtml?: string;\n newestOnTop?: boolean;\n timeout?: number|Object;\n typeClasses?: Object;\n iconClasses?: Object;\n bodyOutputType?: BodyOutputType;\n bodyTemplate?: string;\n defaultTypeClass?: string;\n // Options (see CSS):\n // 'toast-top-full-width', 'toast-bottom-full-width', 'toast-center',\n // 'toast-top-left', 'toast-top-center', 'toast-top-right',\n // 'toast-bottom-left', 'toast-bottom-center', 'toast-bottom-right',\n positionClass?: string;\n animationClass?: string;\n titleClass?: string;\n messageClass?: string;\n preventDuplicates?: boolean;\n mouseoverTimerStop?: boolean;\n toastContainerId?: number;\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}