mis-crystal-design-system 4.0.27 → 4.0.29-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/action-list/mis-crystal-design-system-action-list.metadata.json +1 -1
- package/bundles/mis-crystal-design-system-action-list.umd.js +641 -495
- package/bundles/mis-crystal-design-system-action-list.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-action-list.umd.min.js +1 -15
- package/bundles/mis-crystal-design-system-action-list.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-analytics.umd.js +555 -409
- package/bundles/mis-crystal-design-system-analytics.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-analytics.umd.min.js +1 -15
- package/bundles/mis-crystal-design-system-analytics.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-checkbox.umd.js +1 -1
- package/bundles/mis-crystal-design-system-checkbox.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-checkbox.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-datepicker_v2.umd.js +836 -690
- package/bundles/mis-crystal-design-system-datepicker_v2.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-datepicker_v2.umd.min.js +1 -15
- package/bundles/mis-crystal-design-system-datepicker_v2.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-daterangepicker_v2.umd.js +889 -743
- package/bundles/mis-crystal-design-system-daterangepicker_v2.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-daterangepicker_v2.umd.min.js +1 -15
- package/bundles/mis-crystal-design-system-daterangepicker_v2.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-dropdown.umd.js +648 -493
- package/bundles/mis-crystal-design-system-dropdown.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-dropdown.umd.min.js +1 -15
- package/bundles/mis-crystal-design-system-dropdown.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-dynamic-form.umd.js +869 -723
- package/bundles/mis-crystal-design-system-dynamic-form.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-dynamic-form.umd.min.js +1 -15
- package/bundles/mis-crystal-design-system-dynamic-form.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-input.umd.js +1 -1
- package/bundles/mis-crystal-design-system-input.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-input.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-loader.umd.js +1 -1
- package/bundles/mis-crystal-design-system-loader.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-loader.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-multi-select-dropdown.umd.js +756 -610
- package/bundles/mis-crystal-design-system-multi-select-dropdown.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-multi-select-dropdown.umd.min.js +1 -15
- package/bundles/mis-crystal-design-system-multi-select-dropdown.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-nested-multi-select-dropdown.umd.js +769 -623
- package/bundles/mis-crystal-design-system-nested-multi-select-dropdown.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-nested-multi-select-dropdown.umd.min.js +1 -15
- package/bundles/mis-crystal-design-system-nested-multi-select-dropdown.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-ske-loader.umd.js +1 -1
- package/bundles/mis-crystal-design-system-ske-loader.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-ske-loader.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-specificdatepicker.umd.js +1107 -961
- package/bundles/mis-crystal-design-system-specificdatepicker.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-specificdatepicker.umd.min.js +1 -15
- package/bundles/mis-crystal-design-system-specificdatepicker.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-table.umd.js +921 -775
- package/bundles/mis-crystal-design-system-table.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-table.umd.min.js +1 -15
- package/bundles/mis-crystal-design-system-table.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-timepicker.umd.js +813 -667
- package/bundles/mis-crystal-design-system-timepicker.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-timepicker.umd.min.js +1 -15
- package/bundles/mis-crystal-design-system-timepicker.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-toast.umd.js +1 -1
- package/bundles/mis-crystal-design-system-toast.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-toast.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-virtual-scroll.umd.js +603 -457
- package/bundles/mis-crystal-design-system-virtual-scroll.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-virtual-scroll.umd.min.js +1 -15
- package/bundles/mis-crystal-design-system-virtual-scroll.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-widgets.umd.js +608 -462
- package/bundles/mis-crystal-design-system-widgets.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-widgets.umd.min.js +1 -15
- package/bundles/mis-crystal-design-system-widgets.umd.min.js.map +1 -1
- package/checkbox/mis-crystal-design-system-checkbox.metadata.json +1 -1
- package/datepicker_v2/mis-crystal-design-system-datepicker_v2.metadata.json +1 -1
- package/daterangepicker_v2/mis-crystal-design-system-daterangepicker_v2.metadata.json +1 -1
- package/dropdown/dropdown.component.d.ts +8 -0
- package/dropdown/mis-crystal-design-system-dropdown.metadata.json +1 -1
- package/dynamic-form/mis-crystal-design-system-dynamic-form.metadata.json +1 -1
- package/esm2015/action-list/action-list.component.js +1 -1
- package/esm2015/checkbox/checkbox.component.js +1 -1
- package/esm2015/datepicker_v2/tz-dp-container/tz-dp-container.component.js +1 -1
- package/esm2015/daterangepicker_v2/tz-drp-container/tz-drp-container.component.js +1 -1
- package/esm2015/dropdown/dropdown.component.js +12 -3
- package/esm2015/dynamic-form/dynamic-form.component.js +1 -1
- package/esm2015/input/mis-input.component.js +1 -1
- package/esm2015/loader/loader.component.js +1 -1
- package/esm2015/multi-select-dropdown/multi-select-dropdown.component.js +3 -3
- package/esm2015/nested-multi-select-dropdown/nested-multi-select-dropdown.component.js +1 -1
- package/esm2015/ske-loader/ske-loader.component.js +1 -1
- package/esm2015/specificdatepicker/tz-sdp-container/tz-sdp-container.component.js +1 -1
- package/esm2015/table/table.component.js +1 -1
- package/esm2015/toast/mis-crystal-design-system-toast.js +1 -2
- package/esm2015/toast/public_api.js +2 -1
- package/fesm2015/mis-crystal-design-system-action-list.js +1 -1
- package/fesm2015/mis-crystal-design-system-checkbox.js +1 -1
- package/fesm2015/mis-crystal-design-system-datepicker_v2.js +1 -1
- package/fesm2015/mis-crystal-design-system-daterangepicker_v2.js +1 -1
- package/fesm2015/mis-crystal-design-system-dropdown.js +11 -2
- package/fesm2015/mis-crystal-design-system-dropdown.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-dynamic-form.js +1 -1
- package/fesm2015/mis-crystal-design-system-input.js +1 -1
- package/fesm2015/mis-crystal-design-system-loader.js +1 -1
- package/fesm2015/mis-crystal-design-system-multi-select-dropdown.js +2 -2
- package/fesm2015/mis-crystal-design-system-multi-select-dropdown.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-nested-multi-select-dropdown.js +1 -1
- package/fesm2015/mis-crystal-design-system-ske-loader.js +1 -1
- package/fesm2015/mis-crystal-design-system-specificdatepicker.js +1 -1
- package/fesm2015/mis-crystal-design-system-table.js +1 -1
- package/fesm2015/mis-crystal-design-system-toast.js +1 -1
- package/fesm2015/mis-crystal-design-system-toast.js.map +1 -1
- package/input/mis-crystal-design-system-input.metadata.json +1 -1
- package/loader/mis-crystal-design-system-loader.metadata.json +1 -1
- package/multi-select-dropdown/mis-crystal-design-system-multi-select-dropdown.metadata.json +1 -1
- package/nested-multi-select-dropdown/mis-crystal-design-system-nested-multi-select-dropdown.metadata.json +1 -1
- package/package.json +1 -1
- package/ske-loader/mis-crystal-design-system-ske-loader.metadata.json +1 -1
- package/specificdatepicker/mis-crystal-design-system-specificdatepicker.metadata.json +1 -1
- package/table/mis-crystal-design-system-table.metadata.json +1 -1
- package/toast/mis-crystal-design-system-toast.d.ts +0 -1
- package/toast/mis-crystal-design-system-toast.metadata.json +1 -1
- package/toast/public_api.d.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mis-crystal-design-system-toast.umd.js","sources":["../../../projects/mis-components/toast/toast.data.service.ts","../../../projects/mis-components/toast/toast.component.ts","../../../projects/mis-components/toast/toast.service.ts","../../../projects/mis-components/toast/toast.module.ts","../../../projects/mis-components/toast/mis-crystal-design-system-toast.ts"],"sourcesContent":["import { Injectable } from \"@angular/core\";\n\n@Injectable({\n providedIn: \"root\"\n})\nexport class ToastDataService {\n private messageMap: Map<number, string> = new Map();\n get messages(): string[] {\n return Array.from(this.messageMap.values()).reverse();\n }\n\n constructor() {}\n\n updateMessage(msg: string): number {\n const id = new Date().getTime();\n this.messageMap.set(id, msg);\n return id;\n }\n\n removeMessage(id: number): void {\n this.messageMap.delete(id);\n }\n\n hasMessage(): boolean {\n return this.messageMap.size > 0;\n }\n}\n","import { animate, style, transition, trigger } from \"@angular/animations\";\nimport { Component } from \"@angular/core\";\nimport { ToastDataService } from \"./toast.data.service\";\n\n@Component({\n selector: \"mis-teams-toast\",\n templateUrl: \"./toast.component.html\",\n styleUrls: [\"./toast.component.scss\"],\n animations: [\n trigger(\"fadeInOut\", [\n transition(\":enter\", [\n style({ opacity: \"0\", transform: \"translateY(-50%)\", height: \"0\" }),\n animate(\"300ms ease-in\", style({ opacity: \"1\", transform: \"translateY(0)\", height: \"*\" }))\n ]),\n transition(\":leave\", [animate(\"300ms ease-in\", style({ opacity: \"0\", transform: \"translateY(50%)\" }))])\n ])\n ]\n})\nexport class ToastComponent {\n constructor(public data: ToastDataService) {}\n}\n","import { Overlay, OverlayConfig, OverlayRef } from \"@angular/cdk/overlay\";\nimport { ComponentPortal } from \"@angular/cdk/portal\";\nimport { Injectable } from \"@angular/core\";\nimport { ToastComponent } from \"./toast.component\";\nimport { ToastDataService } from \"./toast.data.service\";\n\ntype Operations = \"created\" | \"updated\" | \"deleted\" | \"create\" | \"update\" | \"delete\";\n\n@Injectable({\n providedIn: \"root\"\n})\nexport class ToastService {\n constructor(private overlay: Overlay, private data: ToastDataService) {\n this.userProfilePortal = new ComponentPortal(ToastComponent);\n }\n private toastWrapperRef: OverlayRef;\n private messagePromises: Promise<void>[] = [];\n private userProfilePortal: ComponentPortal<ToastComponent>;\n\n messageBuilder = {\n error: {\n simple: \"Something went wrong. Please try again later.\",\n 400: \"Bad Request! We are working to fix this.\",\n 401: \"UNAUTHORISED\",\n 403: \"Sorry for the interruption but seems like your session has expired. Please login again and continue\",\n 404: \"Unable to find resource. Please try again later\"\n },\n item: (item: string) => {\n return {\n action: (act: Operations = \"updated\") => {\n const success = `Successfully ${act} ${item}.`;\n const failure = `Failed to ${act} ${item}.`;\n return {\n success,\n failure\n };\n }\n };\n },\n short: (act: Operations = \"updated\") => {\n const success = `Successfully ${act}.`;\n const failure = `Failed to ${act}.`;\n return {\n success,\n failure\n };\n },\n simple: (...args: string[]) => args.join(\" \"),\n simplest: \"Done!\"\n };\n\n displayMsg(msg: string, timeout = 3000): void {\n const positionStrategy = this.overlay.position().global().centerHorizontally();\n\n if (window?.innerWidth < 600) {\n positionStrategy.bottom(\"48px\");\n } else {\n positionStrategy.top(\"80px\");\n }\n const config = new OverlayConfig({\n hasBackdrop: false,\n positionStrategy\n });\n if (!this.toastWrapperRef?.hasAttached()) {\n this.toastWrapperRef = this.overlay.create(config);\n this.toastWrapperRef.attach(this.userProfilePortal);\n }\n const messageId = this.data.updateMessage(msg);\n this.messagePromises.push(\n new Promise((resolve, reject) => {\n setTimeout(() => {\n resolve(this.data.removeMessage(messageId));\n if (!this.data.hasMessage()) {\n this.closeToastOverlay();\n }\n // adding 300ms for entry animation\n }, timeout + 300);\n })\n );\n Promise.race(this.messagePromises).then(() => {});\n }\n\n // tslint:disable-next-line\n private closeToastOverlay(): any {\n return setTimeout(() => {\n this.messagePromises = [];\n this.toastWrapperRef?.detach();\n // adding 300ms for exit animation\n }, 300);\n }\n}\n","import { OverlayModule } from \"@angular/cdk/overlay\";\nimport { CommonModule } from \"@angular/common\";\nimport { ModuleWithProviders, NgModule } from \"@angular/core\";\nimport { ToastComponent } from \"./toast.component\";\nimport { ToastDataService } from \"./toast.data.service\";\nimport { ToastService } from \"./toast.service\";\n\n@NgModule({\n declarations: [ToastComponent],\n imports: [CommonModule, OverlayModule],\n entryComponents: [ToastComponent]\n})\nexport class ToastModule {\n static forRoot(): ModuleWithProviders<ToastModule> {\n return {\n ngModule: ToastModule,\n providers: [ToastDataService, ToastService]\n };\n }\n\n static forChild(): ModuleWithProviders<ToastModule> {\n return {\n ngModule: ToastModule,\n providers: [ToastDataService, ToastService]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n
|
|
1
|
+
{"version":3,"file":"mis-crystal-design-system-toast.umd.js","sources":["../../../projects/mis-components/toast/toast.data.service.ts","../../../projects/mis-components/toast/toast.component.ts","../../../projects/mis-components/toast/toast.service.ts","../../../projects/mis-components/toast/toast.module.ts","../../../projects/mis-components/toast/mis-crystal-design-system-toast.ts"],"sourcesContent":["import { Injectable } from \"@angular/core\";\n\n@Injectable({\n providedIn: \"root\"\n})\nexport class ToastDataService {\n private messageMap: Map<number, string> = new Map();\n get messages(): string[] {\n return Array.from(this.messageMap.values()).reverse();\n }\n\n constructor() {}\n\n updateMessage(msg: string): number {\n const id = new Date().getTime();\n this.messageMap.set(id, msg);\n return id;\n }\n\n removeMessage(id: number): void {\n this.messageMap.delete(id);\n }\n\n hasMessage(): boolean {\n return this.messageMap.size > 0;\n }\n}\n","import { animate, style, transition, trigger } from \"@angular/animations\";\nimport { Component } from \"@angular/core\";\nimport { ToastDataService } from \"./toast.data.service\";\n\n@Component({\n selector: \"mis-teams-toast\",\n templateUrl: \"./toast.component.html\",\n styleUrls: [\"./toast.component.scss\"],\n animations: [\n trigger(\"fadeInOut\", [\n transition(\":enter\", [\n style({ opacity: \"0\", transform: \"translateY(-50%)\", height: \"0\" }),\n animate(\"300ms ease-in\", style({ opacity: \"1\", transform: \"translateY(0)\", height: \"*\" }))\n ]),\n transition(\":leave\", [animate(\"300ms ease-in\", style({ opacity: \"0\", transform: \"translateY(50%)\" }))])\n ])\n ]\n})\nexport class ToastComponent {\n constructor(public data: ToastDataService) {}\n}\n","import { Overlay, OverlayConfig, OverlayRef } from \"@angular/cdk/overlay\";\nimport { ComponentPortal } from \"@angular/cdk/portal\";\nimport { Injectable } from \"@angular/core\";\nimport { ToastComponent } from \"./toast.component\";\nimport { ToastDataService } from \"./toast.data.service\";\n\ntype Operations = \"created\" | \"updated\" | \"deleted\" | \"create\" | \"update\" | \"delete\";\n\n@Injectable({\n providedIn: \"root\"\n})\nexport class ToastService {\n constructor(private overlay: Overlay, private data: ToastDataService) {\n this.userProfilePortal = new ComponentPortal(ToastComponent);\n }\n private toastWrapperRef: OverlayRef;\n private messagePromises: Promise<void>[] = [];\n private userProfilePortal: ComponentPortal<ToastComponent>;\n\n messageBuilder = {\n error: {\n simple: \"Something went wrong. Please try again later.\",\n 400: \"Bad Request! We are working to fix this.\",\n 401: \"UNAUTHORISED\",\n 403: \"Sorry for the interruption but seems like your session has expired. Please login again and continue\",\n 404: \"Unable to find resource. Please try again later\"\n },\n item: (item: string) => {\n return {\n action: (act: Operations = \"updated\") => {\n const success = `Successfully ${act} ${item}.`;\n const failure = `Failed to ${act} ${item}.`;\n return {\n success,\n failure\n };\n }\n };\n },\n short: (act: Operations = \"updated\") => {\n const success = `Successfully ${act}.`;\n const failure = `Failed to ${act}.`;\n return {\n success,\n failure\n };\n },\n simple: (...args: string[]) => args.join(\" \"),\n simplest: \"Done!\"\n };\n\n displayMsg(msg: string, timeout = 3000): void {\n const positionStrategy = this.overlay.position().global().centerHorizontally();\n\n if (window?.innerWidth < 600) {\n positionStrategy.bottom(\"48px\");\n } else {\n positionStrategy.top(\"80px\");\n }\n const config = new OverlayConfig({\n hasBackdrop: false,\n positionStrategy\n });\n if (!this.toastWrapperRef?.hasAttached()) {\n this.toastWrapperRef = this.overlay.create(config);\n this.toastWrapperRef.attach(this.userProfilePortal);\n }\n const messageId = this.data.updateMessage(msg);\n this.messagePromises.push(\n new Promise((resolve, reject) => {\n setTimeout(() => {\n resolve(this.data.removeMessage(messageId));\n if (!this.data.hasMessage()) {\n this.closeToastOverlay();\n }\n // adding 300ms for entry animation\n }, timeout + 300);\n })\n );\n Promise.race(this.messagePromises).then(() => {});\n }\n\n // tslint:disable-next-line\n private closeToastOverlay(): any {\n return setTimeout(() => {\n this.messagePromises = [];\n this.toastWrapperRef?.detach();\n // adding 300ms for exit animation\n }, 300);\n }\n}\n","import { OverlayModule } from \"@angular/cdk/overlay\";\nimport { CommonModule } from \"@angular/common\";\nimport { ModuleWithProviders, NgModule } from \"@angular/core\";\nimport { ToastComponent } from \"./toast.component\";\nimport { ToastDataService } from \"./toast.data.service\";\nimport { ToastService } from \"./toast.service\";\n\n@NgModule({\n declarations: [ToastComponent],\n imports: [CommonModule, OverlayModule],\n entryComponents: [ToastComponent]\n})\nexport class ToastModule {\n static forRoot(): ModuleWithProviders<ToastModule> {\n return {\n ngModule: ToastModule,\n providers: [ToastDataService, ToastService]\n };\n }\n\n static forChild(): ModuleWithProviders<ToastModule> {\n return {\n ngModule: ToastModule,\n providers: [ToastDataService, ToastService]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["Injectable","Component","trigger","transition","style","animate","ComponentPortal","OverlayConfig","Overlay","NgModule","CommonModule","OverlayModule"],"mappings":";;;;;;;QAWE;YALQ,eAAU,GAAwB,IAAI,GAAG,EAAE,CAAC;SAKpC;QAJhB,sBAAI,sCAAQ;iBAAZ;gBACE,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;aACvD;;;WAAA;QAID,wCAAa,GAAb,UAAc,GAAW;YACvB,IAAM,EAAE,GAAG,IAAI,IAAI,EAAE,C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AE,MAAM;iBACnB;;;gBAVQQ,UAAO;gBAIP,gBAAgB;;;;QCQzB;;QACS,mBAAO,GAAd;YACE,OAAO;gBACL,QAAQ,EAAE,WAAW;gBACrB,SAAS,EAAE,CAAC,gBAAgB,EAAE,YAAY,CAAC;aAC5C,CAAC;SACH;QAEM,oBAAQ,GAAf;YACE,OAAO;gBACL,QAAQ,EAAE,WAAW;gBACrB,SAAS,EAAE,CAAC,gBAAgB,EAAE,YAAY,CAAC;aAC5C,CAAC;SACH;;;;gBAlBFC,WAAQ,SAAC;oBACR,YAAY,EAAE,CAAC,cAAc,CAAC;oBAC9B,OAAO,EAAE,CAACC,mBAAY,EAAEC,gBAAa,CAAC;oBACtC,eAAe,EAAE,CAAC,cAAc,CAAC;iBAClC;;;ICXD;;;;;;;;;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/cdk/overlay"),require("@angular/cdk/portal"),require("@angular/core"),require("@angular/animations"),require("@angular/common")):"function"==typeof define&&define.amd?define("mis-crystal-design-system/toast",["exports","@angular/cdk/overlay","@angular/cdk/portal","@angular/core","@angular/animations","@angular/common"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self)["mis-crystal-design-system"]=e["mis-crystal-design-system"]||{},e["mis-crystal-design-system"].toast={}),e.ng.cdk.overlay,e.ng.cdk.portal,e.ng.core,e.ng.animations,e.ng.common)}(this,(function(e,t,r,a,o,n){"use strict";var s=function(){function e(){this.messageMap=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return Array.from(this.messageMap.values()).reverse()},enumerable:!1,configurable:!0}),e.prototype.updateMessage=function(e){var t=(new Date).getTime();return this.messageMap.set(t,e),t},e.prototype.removeMessage=function(e){this.messageMap.delete(e)},e.prototype.hasMessage=function(){return this.messageMap.size>0},e}();s.ɵprov=a.ɵɵdefineInjectable({factory:function(){return new s},token:s,providedIn:"root"}),s.decorators=[{type:a.Injectable,args:[{providedIn:"root"}]}],s.ctorParameters=function(){return[]};var i=function(e){this.data=e};i.decorators=[{type:a.Component,args:[{selector:"mis-teams-toast",template:'<div class="toast-container">\n <div *ngFor="let msg of data.messages" @fadeInOut>\n <div class="toast-wrapper">\n <div class="msg">{{ msg }}</div>\n </div>\n </div>\n</div>\n',animations:[o.trigger("fadeInOut",[o.transition(":enter",[o.style({opacity:"0",transform:"translateY(-50%)",height:"0"}),o.animate("300ms ease-in",o.style({opacity:"1",transform:"translateY(0)",height:"*"}))]),o.transition(":leave",[o.animate("300ms ease-in",o.style({opacity:"0",transform:"translateY(50%)"}))])])],styles:[".toast-container{transition:max-height .3s ease-in}.toast-container>div{position:relative;display:flex;justify-content:center}.toast-wrapper{display:flex;flex-direction:row;align-items:center;gap:20px;padding:14px 12px;background:#181f33;box-shadow:0 12px 17px rgba(0,0,0,.14),0 5px 22px rgba(0,0,0,.12),0 7px 8px rgba(0,0,0,.2);border-radius:4px;transition:all .3s ease-in;min-height:44px;transform-origin:top}.toast-wrapper .msg{color:#fff;max-width:314px;flex:1 1 314px;font-size:14px;line-height:20px;letter-spacing:.2px}@media screen and (max-width:360px){.toast-wrapper .msg{max-width:90vw;flex:1 1 90vw}}"]}]}],i.ctorParameters=function(){return[{type:s}]};var l=function(){function e(e,t){this.overlay=e,this.data=t,this.messagePromises=[],this.messageBuilder={error:{simple:"Something went wrong. Please try again later.",400:"Bad Request! We are working to fix this.",401:"UNAUTHORISED",403:"Sorry for the interruption but seems like your session has expired. Please login again and continue",404:"Unable to find resource. Please try again later"},item:function(e){return{action:function(t){return void 0===t&&(t="updated"),{success:"Successfully "+t+" "+e+".",failure:"Failed to "+t+" "+e+"."}}}},short:function(e){return void 0===e&&(e="updated"),{success:"Successfully "+e+".",failure:"Failed to "+e+"."}},simple:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.join(" ")},simplest:"Done!"},this.userProfilePortal=new r.ComponentPortal(i)}return e.prototype.displayMsg=function(e,r){var a,o=this;void 0===r&&(r=3e3);var n=this.overlay.position().global().centerHorizontally();(null===window||void 0===window?void 0:window.innerWidth)<600?n.bottom("48px"):n.top("80px");var s=new t.OverlayConfig({hasBackdrop:!1,positionStrategy:n});(null===(a=this.toastWrapperRef)||void 0===a?void 0:a.hasAttached())||(this.toastWrapperRef=this.overlay.create(s),this.toastWrapperRef.attach(this.userProfilePortal));var i=this.data.updateMessage(e);this.messagePromises.push(new Promise((function(e,t){setTimeout((function(){e(o.data.removeMessage(i)),o.data.hasMessage()||o.closeToastOverlay()}),r+300)}))),Promise.race(this.messagePromises).then((function(){}))},e.prototype.closeToastOverlay=function(){var e=this;return setTimeout((function(){var t;e.messagePromises=[],null===(t=e.toastWrapperRef)||void 0===t||t.detach()}),300)},e}();l.ɵprov=a.ɵɵdefineInjectable({factory:function(){return new l(a.ɵɵinject(t.Overlay),a.ɵɵinject(s))},token:l,providedIn:"root"}),l.decorators=[{type:a.Injectable,args:[{providedIn:"root"}]}],l.ctorParameters=function(){return[{type:t.Overlay},{type:s}]};var
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/cdk/overlay"),require("@angular/cdk/portal"),require("@angular/core"),require("@angular/animations"),require("@angular/common")):"function"==typeof define&&define.amd?define("mis-crystal-design-system/toast",["exports","@angular/cdk/overlay","@angular/cdk/portal","@angular/core","@angular/animations","@angular/common"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self)["mis-crystal-design-system"]=e["mis-crystal-design-system"]||{},e["mis-crystal-design-system"].toast={}),e.ng.cdk.overlay,e.ng.cdk.portal,e.ng.core,e.ng.animations,e.ng.common)}(this,(function(e,t,r,a,o,n){"use strict";var s=function(){function e(){this.messageMap=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return Array.from(this.messageMap.values()).reverse()},enumerable:!1,configurable:!0}),e.prototype.updateMessage=function(e){var t=(new Date).getTime();return this.messageMap.set(t,e),t},e.prototype.removeMessage=function(e){this.messageMap.delete(e)},e.prototype.hasMessage=function(){return this.messageMap.size>0},e}();s.ɵprov=a.ɵɵdefineInjectable({factory:function(){return new s},token:s,providedIn:"root"}),s.decorators=[{type:a.Injectable,args:[{providedIn:"root"}]}],s.ctorParameters=function(){return[]};var i=function(e){this.data=e};i.decorators=[{type:a.Component,args:[{selector:"mis-teams-toast",template:'<div class="toast-container">\n <div *ngFor="let msg of data.messages" @fadeInOut>\n <div class="toast-wrapper">\n <div class="msg">{{ msg }}</div>\n </div>\n </div>\n</div>\n',animations:[o.trigger("fadeInOut",[o.transition(":enter",[o.style({opacity:"0",transform:"translateY(-50%)",height:"0"}),o.animate("300ms ease-in",o.style({opacity:"1",transform:"translateY(0)",height:"*"}))]),o.transition(":leave",[o.animate("300ms ease-in",o.style({opacity:"0",transform:"translateY(50%)"}))])])],styles:[".toast-container{transition:max-height .3s ease-in}.toast-container>div{position:relative;display:flex;justify-content:center}.toast-wrapper{display:flex;flex-direction:row;align-items:center;gap:20px;padding:14px 12px;background:#181f33;box-shadow:0 12px 17px rgba(0,0,0,.14),0 5px 22px rgba(0,0,0,.12),0 7px 8px rgba(0,0,0,.2);border-radius:4px;transition:all .3s ease-in;min-height:44px;transform-origin:top}.toast-wrapper .msg{color:#fff;max-width:314px;flex:1 1 314px;font-size:14px;line-height:20px;letter-spacing:.2px}@media screen and (max-width:360px){.toast-wrapper .msg{max-width:90vw;flex:1 1 90vw}}"]}]}],i.ctorParameters=function(){return[{type:s}]};var l=function(){function e(e,t){this.overlay=e,this.data=t,this.messagePromises=[],this.messageBuilder={error:{simple:"Something went wrong. Please try again later.",400:"Bad Request! We are working to fix this.",401:"UNAUTHORISED",403:"Sorry for the interruption but seems like your session has expired. Please login again and continue",404:"Unable to find resource. Please try again later"},item:function(e){return{action:function(t){return void 0===t&&(t="updated"),{success:"Successfully "+t+" "+e+".",failure:"Failed to "+t+" "+e+"."}}}},short:function(e){return void 0===e&&(e="updated"),{success:"Successfully "+e+".",failure:"Failed to "+e+"."}},simple:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.join(" ")},simplest:"Done!"},this.userProfilePortal=new r.ComponentPortal(i)}return e.prototype.displayMsg=function(e,r){var a,o=this;void 0===r&&(r=3e3);var n=this.overlay.position().global().centerHorizontally();(null===window||void 0===window?void 0:window.innerWidth)<600?n.bottom("48px"):n.top("80px");var s=new t.OverlayConfig({hasBackdrop:!1,positionStrategy:n});(null===(a=this.toastWrapperRef)||void 0===a?void 0:a.hasAttached())||(this.toastWrapperRef=this.overlay.create(s),this.toastWrapperRef.attach(this.userProfilePortal));var i=this.data.updateMessage(e);this.messagePromises.push(new Promise((function(e,t){setTimeout((function(){e(o.data.removeMessage(i)),o.data.hasMessage()||o.closeToastOverlay()}),r+300)}))),Promise.race(this.messagePromises).then((function(){}))},e.prototype.closeToastOverlay=function(){var e=this;return setTimeout((function(){var t;e.messagePromises=[],null===(t=e.toastWrapperRef)||void 0===t||t.detach()}),300)},e}();l.ɵprov=a.ɵɵdefineInjectable({factory:function(){return new l(a.ɵɵinject(t.Overlay),a.ɵɵinject(s))},token:l,providedIn:"root"}),l.decorators=[{type:a.Injectable,args:[{providedIn:"root"}]}],l.ctorParameters=function(){return[{type:t.Overlay},{type:s}]};var p=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[s,l]}},e.forChild=function(){return{ngModule:e,providers:[s,l]}},e}();p.decorators=[{type:a.NgModule,args:[{declarations:[i],imports:[n.CommonModule,t.OverlayModule],entryComponents:[i]}]}],e.ToastComponent=i,e.ToastDataService=s,e.ToastModule=p,e.ToastService=l,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=mis-crystal-design-system-toast.umd.min.js.map
|