ngx-kit 6.2.0 → 7.0.0
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/README.md +3 -3
- package/angle-selector/README.md +34 -34
- package/box-shadow/README.md +33 -33
- package/color-picker/README.md +52 -49
- package/data-table/README.md +120 -113
- package/date-picker/README.md +74 -69
- package/dialog/README.md +92 -92
- package/drag-resize/README.md +55 -0
- package/drawer-menu/README.md +125 -77
- package/dropzone/README.md +422 -422
- package/fesm2022/ngx-kit-angle-selector.mjs +2 -2
- package/fesm2022/ngx-kit-angle-selector.mjs.map +1 -1
- package/fesm2022/ngx-kit-box-shadow.mjs +2 -2
- package/fesm2022/ngx-kit-box-shadow.mjs.map +1 -1
- package/fesm2022/ngx-kit-color-picker.mjs +265 -73
- package/fesm2022/ngx-kit-color-picker.mjs.map +1 -1
- package/fesm2022/ngx-kit-data-table.mjs +2 -2
- package/fesm2022/ngx-kit-data-table.mjs.map +1 -1
- package/fesm2022/ngx-kit-date-picker.mjs +11 -11
- package/fesm2022/ngx-kit-date-picker.mjs.map +1 -1
- package/fesm2022/ngx-kit-dialog.mjs +3 -3
- package/fesm2022/ngx-kit-dialog.mjs.map +1 -1
- package/fesm2022/ngx-kit-drag-resize.mjs +1664 -0
- package/fesm2022/ngx-kit-drag-resize.mjs.map +1 -0
- package/fesm2022/ngx-kit-drawer-menu.mjs +424 -158
- package/fesm2022/ngx-kit-drawer-menu.mjs.map +1 -1
- package/fesm2022/ngx-kit-dropzone.mjs +2 -2
- package/fesm2022/ngx-kit-dropzone.mjs.map +1 -1
- package/fesm2022/ngx-kit-form-field.mjs +3 -5
- package/fesm2022/ngx-kit-form-field.mjs.map +1 -1
- package/fesm2022/ngx-kit-gallery.mjs +2 -2
- package/fesm2022/ngx-kit-gallery.mjs.map +1 -1
- package/fesm2022/ngx-kit-gradient-picker.mjs.map +1 -1
- package/fesm2022/ngx-kit-grid-layout.mjs +927 -0
- package/fesm2022/ngx-kit-grid-layout.mjs.map +1 -0
- package/fesm2022/ngx-kit-image-editor.mjs +2 -2
- package/fesm2022/ngx-kit-image-editor.mjs.map +1 -1
- package/fesm2022/ngx-kit-menu.mjs +8 -8
- package/fesm2022/ngx-kit-menu.mjs.map +1 -1
- package/fesm2022/ngx-kit-message.mjs +2 -2
- package/fesm2022/ngx-kit-message.mjs.map +1 -1
- package/fesm2022/ngx-kit-notify.mjs +2 -2
- package/fesm2022/ngx-kit-notify.mjs.map +1 -1
- package/fesm2022/ngx-kit-shared.mjs +54 -3
- package/fesm2022/ngx-kit-shared.mjs.map +1 -1
- package/fesm2022/ngx-kit-time-picker.mjs +2 -2
- package/fesm2022/ngx-kit-time-picker.mjs.map +1 -1
- package/fesm2022/ngx-kit-virtual-scroll.mjs +392 -0
- package/fesm2022/ngx-kit-virtual-scroll.mjs.map +1 -0
- package/fesm2022/ngx-kit-webflow.mjs +709 -0
- package/fesm2022/ngx-kit-webflow.mjs.map +1 -0
- package/gallery/README.md +71 -71
- package/gradient-picker/README.md +41 -41
- package/grid-layout/README.md +64 -0
- package/image-editor/README.md +12 -12
- package/menu/README.md +85 -85
- package/message/README.md +70 -70
- package/notify/README.md +56 -58
- package/package.json +17 -1
- package/shared/README.md +117 -117
- package/time-picker/README.md +89 -95
- package/types/ngx-kit-color-picker.d.ts +72 -16
- package/types/ngx-kit-date-picker.d.ts +2 -1
- package/types/ngx-kit-drag-resize.d.ts +368 -0
- package/types/ngx-kit-drawer-menu.d.ts +148 -88
- package/types/ngx-kit-grid-layout.d.ts +310 -0
- package/types/ngx-kit-image-editor.d.ts +1 -1
- package/types/ngx-kit-shared.d.ts +12 -1
- package/types/ngx-kit-virtual-scroll.d.ts +179 -0
- package/types/ngx-kit-webflow.d.ts +286 -0
- package/virtual-scroll/README.md +199 -0
|
@@ -180,18 +180,18 @@ class NgxMenuItem {
|
|
|
180
180
|
this.menuContext?.close();
|
|
181
181
|
}
|
|
182
182
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxMenuItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
183
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.4", type: NgxMenuItem, isStandalone: true, selector: "ngx-menu-item,[ngx-menu-item]", host: { listeners: { "click": "onClick()" } }, exportAs: ["NgxMenuItem"], ngImport: i0, template: `
|
|
184
|
-
<div class="ngx-menu-item">
|
|
185
|
-
<ng-content></ng-content>
|
|
186
|
-
</div>
|
|
183
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.4", type: NgxMenuItem, isStandalone: true, selector: "ngx-menu-item,[ngx-menu-item]", host: { listeners: { "click": "onClick()" } }, exportAs: ["NgxMenuItem"], ngImport: i0, template: `
|
|
184
|
+
<div class="ngx-menu-item">
|
|
185
|
+
<ng-content></ng-content>
|
|
186
|
+
</div>
|
|
187
187
|
`, isInline: true, styles: [".ngx-menu-item{box-sizing:border-box;outline:0;padding:var(--ngx-menu-item-padding, 6px 12px);transition:all .3s}.ngx-menu-item:hover{cursor:pointer;background-color:var(--ngx-menu-item-hover-bg, #9bc6ff68)}\n"] });
|
|
188
188
|
}
|
|
189
189
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxMenuItem, decorators: [{
|
|
190
190
|
type: Component,
|
|
191
|
-
args: [{ selector: 'ngx-menu-item,[ngx-menu-item]', template: `
|
|
192
|
-
<div class="ngx-menu-item">
|
|
193
|
-
<ng-content></ng-content>
|
|
194
|
-
</div>
|
|
191
|
+
args: [{ selector: 'ngx-menu-item,[ngx-menu-item]', template: `
|
|
192
|
+
<div class="ngx-menu-item">
|
|
193
|
+
<ng-content></ng-content>
|
|
194
|
+
</div>
|
|
195
195
|
`, exportAs: 'NgxMenuItem', styles: [".ngx-menu-item{box-sizing:border-box;outline:0;padding:var(--ngx-menu-item-padding, 6px 12px);transition:all .3s}.ngx-menu-item:hover{cursor:pointer;background-color:var(--ngx-menu-item-hover-bg, #9bc6ff68)}\n"] }]
|
|
196
196
|
}], propDecorators: { onClick: [{
|
|
197
197
|
type: HostListener,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-kit-menu.mjs","sources":["../../../projects/libs/menu/directives/ngx-menu.directive.ts","../../../projects/libs/menu/directives/ngx-context-menu.directive.ts","../../../projects/libs/menu/tokens/menu-context.token.ts","../../../projects/libs/menu/components/ngx-menu/menu.component.ts","../../../projects/libs/menu/components/ngx-menu-item/menu-item.component.ts","../../../projects/libs/menu/components/ngx-menu-divider/menu-divider.component.ts","../../../projects/libs/menu/ngx-menu.module.ts","../../../projects/libs/menu/ngx-kit-menu.ts"],"sourcesContent":["import {\n Directive,\n OnDestroy,\n ElementRef,\n HostListener,\n input,\n ApplicationRef,\n} from '@angular/core';\nimport { OverlayRef, OverlayService, OverlayInstance, Alignment, Placement } from 'ngx-kit/shared';\nimport { NgxMenuPanel } from '../components/ngx-menu/menu.component';\n\n@Directive({\n selector: '[ngxMenu]',\n exportAs: 'ngxMenu',\n})\nexport class NgxMenu implements OnDestroy {\n ngxMenu = input.required<NgxMenuPanel>();\n placement = input<Placement>();\n alignment = input<Alignment>();\n\n private containerRef?: OverlayRef<NgxMenuPanel>;\n\n constructor(\n private el: ElementRef,\n private appRef: ApplicationRef,\n private overlayService: OverlayService,\n ) {}\n\n ngOnDestroy(): void {\n this.destroyContainer();\n }\n\n @HostListener('click', ['$event'])\n onClick(ev: Event) {\n ev.stopPropagation();\n ev.preventDefault();\n this.toggleContainer();\n }\n\n private toggleContainer() {\n if (this.containerRef) {\n this.destroyContainer();\n return;\n }\n const t = this.ngxMenu().template();\n if (!t) return;\n this.containerRef = this.overlayService.openTemplate({\n anchor: this.el.nativeElement,\n template: t,\n appRef: this.appRef,\n alignment: this.alignment() ?? 'start',\n placement: this.placement() ?? 'auto',\n onClosed: () => {\n this.containerRef = undefined;\n this.overlayService.closeAll();\n },\n configure: (instance: OverlayInstance, ref: OverlayRef<NgxMenuPanel>) => {\n this.ngxMenu().containerRef = ref;\n },\n });\n }\n\n private destroyContainer() {\n this.containerRef?.close();\n this.containerRef = undefined;\n }\n}\n","import { Directive, OnDestroy, input, ApplicationRef, ElementRef } from '@angular/core';\r\nimport { OverlayRef, OverlayService, OverlayInstance } from 'ngx-kit/shared';\r\nimport { NgxMenuPanel } from '../components/ngx-menu/menu.component';\r\n\r\n@Directive({\r\n selector: '[ngxContextMenu]',\r\n exportAs: 'ngxContextMenu',\r\n})\r\nexport class NgxContextMenu implements OnDestroy {\r\n ngxContextMenu = input.required<NgxMenuPanel>();\r\n\r\n private containerRef?: OverlayRef<NgxMenuPanel>;\r\n\r\n // باید همون رفرنس تابعی که به addEventListener داده میشه رو نگه داریم و به\r\n // removeEventListener هم بدیم؛ قبلاً هر بار یک آرو فانکشن جدید ساخته میشد\r\n // که removeEventListener اصلاً نمیتونست تشخیص بده مال همون listener قبلیه،\r\n // پس listener هیچوقت واقعاً حذف نمیشد (نشتی حافظهی کامل directive + المنت).\r\n private readonly boundOnClick = (ev: PointerEvent) => this.onClick(ev);\r\n\r\n constructor(\r\n private el: ElementRef<HTMLElement>,\r\n private appRef: ApplicationRef,\r\n private overlayService: OverlayService,\r\n ) {\r\n el.nativeElement.addEventListener('contextmenu', this.boundOnClick);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.destroyContainer();\r\n this.el.nativeElement.removeEventListener('contextmenu', this.boundOnClick);\r\n }\r\n\r\n onClick(ev: PointerEvent) {\r\n if (ev.currentTarget == this.el.nativeElement) {\r\n ev.stopPropagation();\r\n ev.preventDefault();\r\n this.toggleContainer(ev.clientX, ev.clientY);\r\n }\r\n }\r\n\r\n private toggleContainer(x: number, y: number) {\r\n if (this.containerRef) {\r\n this.destroyContainer();\r\n return;\r\n }\r\n const t = this.ngxContextMenu().template();\r\n if (!t) return;\r\n this.containerRef = this.overlayService.openTemplate({\r\n anchor: this.el.nativeElement,\r\n point: { x, y },\r\n template: t,\r\n appRef: this.appRef,\r\n alignment: 'start',\r\n placement: 'auto',\r\n onClosed: () => {\r\n this.containerRef = undefined;\r\n this.overlayService.closeAll();\r\n },\r\n configure: (instance: OverlayInstance, ref: OverlayRef<NgxMenuPanel>) => {\r\n this.ngxContextMenu().containerRef = ref;\r\n },\r\n });\r\n }\r\n\r\n private destroyContainer() {\r\n this.containerRef?.close();\r\n this.containerRef = undefined;\r\n }\r\n}\r\n","import { InjectionToken } from '@angular/core';\n\nexport interface MenuContext {\n close(): void;\n}\n\nexport const NGX_MENU_CONTEXT = new InjectionToken<MenuContext>('ngx-menu-context');\n","import { CommonModule } from '@angular/common';\nimport { Component, input, TemplateRef, viewChild } from '@angular/core';\nimport { OverlayRef } from 'ngx-kit/shared';\nimport { MenuContext, NGX_MENU_CONTEXT } from '../../tokens/menu-context.token';\n\n@Component({\n selector: 'ngx-menu,[ngx-menu]',\n template: `\n <ng-template>\n <div class=\"ngx-menu-panel\" [class]=\"class()\">\n <ng-content></ng-content>\n </div>\n </ng-template>\n `,\n exportAs: 'NgxMenu',\n styles: `\n .ngx-menu-panel {\n --ngx-menu-bg: light-dark(#ffffff, #252425);\n --ngx-menu-fg: light-dark(#000000, #ffffff);\n }\n .ngx-menu-panel {\n overflow: auto;\n box-sizing: border-box;\n outline: 0;\n background-color: var(--ngx-menu-bg);\n color: var(--ngx-menu-fg);\n box-shadow: var(--ngx-menu-shadow, 0px 0px 4px rgb(0 0 0 / 30%));\n border-radius: var(--ngx-menu-radius, 10px);\n padding: var(--ngx-menu-padding, 5px);\n min-width: var(--ngx-menu-min-width, 20px);\n min-height: var(--ngx-menu-min-height, 40px);\n will-change: transform, opacity;\n }\n .ngx-menu-panel.ngx-menu-panel-exit {\n animation: menu-exit 100ms 25ms linear forwards;\n }\n `,\n imports: [CommonModule],\n providers: [{ provide: NGX_MENU_CONTEXT, useExisting: NgxMenuPanel }],\n})\nexport class NgxMenuPanel implements MenuContext {\n template = viewChild<TemplateRef<any>>(TemplateRef);\n class = input<string>();\n\n containerRef?: OverlayRef<NgxMenuPanel>;\n\n close(): void {\n this.containerRef?.close();\n }\n}\n","import { Component, HostListener, inject } from '@angular/core';\r\nimport { NGX_MENU_CONTEXT } from '../../tokens/menu-context.token';\r\nimport { NgxMenu } from '../../directives/ngx-menu.directive';\r\n\r\n@Component({\r\n selector: 'ngx-menu-item,[ngx-menu-item]',\r\n template: `\r\n <div class=\"ngx-menu-item\">\r\n <ng-content></ng-content>\r\n </div>\r\n `,\r\n exportAs: 'NgxMenuItem',\r\n styles: `\r\n .ngx-menu-item {\r\n box-sizing: border-box;\r\n outline: 0;\r\n padding: var(--ngx-menu-item-padding, 6px 12px);\r\n transition: all 300ms;\r\n &:hover {\r\n cursor: pointer;\r\n background-color: var(--ngx-menu-item-hover-bg, #9bc6ff68);\r\n }\r\n }\r\n `,\r\n})\r\nexport class NgxMenuItem {\r\n menuContext = inject(NGX_MENU_CONTEXT);\r\n childMenu = inject(NgxMenu, {\r\n self: true,\r\n optional: true,\r\n });\r\n\r\n @HostListener('click')\r\n onClick() {\r\n if (this.childMenu?.ngxMenu) {\r\n return;\r\n }\r\n this.menuContext?.close();\r\n }\r\n}\r\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'ngx-menu-divider,[ngx-menu-divider]',\n template: ``,\n styles: `\n :host {\n display: block;\n border-bottom: var(--ngx-menu-item-border, 1px #43434d3d solid);\n border-bottom-color: var(--ngx-menu-divider-border-color, #43434d3d);\n margin: var(--ngx-menu-divider-margin, 10px calc(var(--ngx-menu-padding, 5px) * -1));\n }\n `,\n})\nexport class NgxMenuDivider {}\n","import { NgModule } from '@angular/core';\nimport { NgxMenuDivider } from './components/ngx-menu-divider/menu-divider.component';\nimport { NgxMenuItem } from './components/ngx-menu-item/menu-item.component';\nimport { NgxMenuPanel } from './components/ngx-menu/menu.component';\nimport { NgxMenu } from './directives/ngx-menu.directive';\nimport { NgxContextMenu } from './public-api';\n\nconst d = [NgxMenu, NgxContextMenu, NgxMenuPanel, NgxMenuItem, NgxMenuDivider];\n@NgModule({\n imports: d,\n exports: d,\n})\nexport class NgxMenuModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAea,OAAO,CAAA;AAQR,IAAA,EAAA;AACA,IAAA,MAAA;AACA,IAAA,cAAA;IATV,OAAO,GAAG,KAAK,CAAC,QAAQ;gFAAgB;AACxC,IAAA,SAAS,GAAG,KAAK;6FAAa;AAC9B,IAAA,SAAS,GAAG,KAAK;6FAAa;AAEtB,IAAA,YAAY;AAEpB,IAAA,WAAA,CACU,EAAc,EACd,MAAsB,EACtB,cAA8B,EAAA;QAF9B,IAAA,CAAA,EAAE,GAAF,EAAE;QACF,IAAA,CAAA,MAAM,GAAN,MAAM;QACN,IAAA,CAAA,cAAc,GAAd,cAAc;IACrB;IAEH,WAAW,GAAA;QACT,IAAI,CAAC,gBAAgB,EAAE;IACzB;AAGA,IAAA,OAAO,CAAC,EAAS,EAAA;QACf,EAAE,CAAC,eAAe,EAAE;QACpB,EAAE,CAAC,cAAc,EAAE;QACnB,IAAI,CAAC,eAAe,EAAE;IACxB;IAEQ,eAAe,GAAA;AACrB,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;YACrB,IAAI,CAAC,gBAAgB,EAAE;YACvB;QACF;QACA,MAAM,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;AACnC,QAAA,IAAI,CAAC,CAAC;YAAE;QACR,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC;AACnD,YAAA,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,aAAa;AAC7B,YAAA,QAAQ,EAAE,CAAC;YACX,MAAM,EAAE,IAAI,CAAC,MAAM;AACnB,YAAA,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,OAAO;AACtC,YAAA,SAAS,EAAE,IAAI,CAA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CAAA;;2FAUD,cAAc,EAAA,UAAA,EAAA,CAAA;kBAZ1B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qCAAqC,YACrC,CAAA,CAAE,EAAA,MAAA,EAAA,CAAA,+OAAA,CAAA,EAAA;;;ACGd,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,CAAC;MAKjE,aAAa,CAAA;uGAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAb,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YALf,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,CAAA,EAAA,OAAA,EAAA,CAAlE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,CAAA,EAAA,CAAA;AAKhE,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YALU,YAAY,CAAA,EAAA,CAAA;;2FAKnC,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC;AACV,oBAAA,OAAO,EAAE,CAAC;AACX,iBAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-kit-menu.mjs","sources":["../../../projects/libs/menu/directives/ngx-menu.directive.ts","../../../projects/libs/menu/directives/ngx-context-menu.directive.ts","../../../projects/libs/menu/tokens/menu-context.token.ts","../../../projects/libs/menu/components/ngx-menu/menu.component.ts","../../../projects/libs/menu/components/ngx-menu-item/menu-item.component.ts","../../../projects/libs/menu/components/ngx-menu-divider/menu-divider.component.ts","../../../projects/libs/menu/ngx-menu.module.ts","../../../projects/libs/menu/ngx-kit-menu.ts"],"sourcesContent":["import {\n Directive,\n OnDestroy,\n ElementRef,\n HostListener,\n input,\n ApplicationRef,\n} from '@angular/core';\nimport { OverlayRef, OverlayService, OverlayInstance, Alignment, Placement } from 'ngx-kit/shared';\nimport { NgxMenuPanel } from '../components/ngx-menu/menu.component';\n\n@Directive({\n selector: '[ngxMenu]',\n exportAs: 'ngxMenu',\n})\nexport class NgxMenu implements OnDestroy {\n ngxMenu = input.required<NgxMenuPanel>();\n placement = input<Placement>();\n alignment = input<Alignment>();\n\n private containerRef?: OverlayRef<NgxMenuPanel>;\n\n constructor(\n private el: ElementRef,\n private appRef: ApplicationRef,\n private overlayService: OverlayService,\n ) {}\n\n ngOnDestroy(): void {\n this.destroyContainer();\n }\n\n @HostListener('click', ['$event'])\n onClick(ev: Event) {\n ev.stopPropagation();\n ev.preventDefault();\n this.toggleContainer();\n }\n\n private toggleContainer() {\n if (this.containerRef) {\n this.destroyContainer();\n return;\n }\n const t = this.ngxMenu().template();\n if (!t) return;\n this.containerRef = this.overlayService.openTemplate({\n anchor: this.el.nativeElement,\n template: t,\n appRef: this.appRef,\n alignment: this.alignment() ?? 'start',\n placement: this.placement() ?? 'auto',\n onClosed: () => {\n this.containerRef = undefined;\n this.overlayService.closeAll();\n },\n configure: (instance: OverlayInstance, ref: OverlayRef<NgxMenuPanel>) => {\n this.ngxMenu().containerRef = ref;\n },\n });\n }\n\n private destroyContainer() {\n this.containerRef?.close();\n this.containerRef = undefined;\n }\n}\n","import { Directive, OnDestroy, input, ApplicationRef, ElementRef } from '@angular/core';\nimport { OverlayRef, OverlayService, OverlayInstance } from 'ngx-kit/shared';\nimport { NgxMenuPanel } from '../components/ngx-menu/menu.component';\n\n@Directive({\n selector: '[ngxContextMenu]',\n exportAs: 'ngxContextMenu',\n})\nexport class NgxContextMenu implements OnDestroy {\n ngxContextMenu = input.required<NgxMenuPanel>();\n\n private containerRef?: OverlayRef<NgxMenuPanel>;\n\n // باید همون رفرنس تابعی که به addEventListener داده میشه رو نگه داریم و به\n // removeEventListener هم بدیم؛ قبلاً هر بار یک آرو فانکشن جدید ساخته میشد\n // که removeEventListener اصلاً نمیتونست تشخیص بده مال همون listener قبلیه،\n // پس listener هیچوقت واقعاً حذف نمیشد (نشتی حافظهی کامل directive + المنت).\n private readonly boundOnClick = (ev: PointerEvent) => this.onClick(ev);\n\n constructor(\n private el: ElementRef<HTMLElement>,\n private appRef: ApplicationRef,\n private overlayService: OverlayService,\n ) {\n el.nativeElement.addEventListener('contextmenu', this.boundOnClick);\n }\n\n ngOnDestroy(): void {\n this.destroyContainer();\n this.el.nativeElement.removeEventListener('contextmenu', this.boundOnClick);\n }\n\n onClick(ev: PointerEvent) {\n if (ev.currentTarget == this.el.nativeElement) {\n ev.stopPropagation();\n ev.preventDefault();\n this.toggleContainer(ev.clientX, ev.clientY);\n }\n }\n\n private toggleContainer(x: number, y: number) {\n if (this.containerRef) {\n this.destroyContainer();\n return;\n }\n const t = this.ngxContextMenu().template();\n if (!t) return;\n this.containerRef = this.overlayService.openTemplate({\n anchor: this.el.nativeElement,\n point: { x, y },\n template: t,\n appRef: this.appRef,\n alignment: 'start',\n placement: 'auto',\n onClosed: () => {\n this.containerRef = undefined;\n this.overlayService.closeAll();\n },\n configure: (instance: OverlayInstance, ref: OverlayRef<NgxMenuPanel>) => {\n this.ngxContextMenu().containerRef = ref;\n },\n });\n }\n\n private destroyContainer() {\n this.containerRef?.close();\n this.containerRef = undefined;\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport interface MenuContext {\n close(): void;\n}\n\nexport const NGX_MENU_CONTEXT = new InjectionToken<MenuContext>('ngx-menu-context');\n","import { CommonModule } from '@angular/common';\nimport { Component, input, TemplateRef, viewChild } from '@angular/core';\nimport { OverlayRef } from 'ngx-kit/shared';\nimport { MenuContext, NGX_MENU_CONTEXT } from '../../tokens/menu-context.token';\n\n@Component({\n selector: 'ngx-menu,[ngx-menu]',\n template: `\n <ng-template>\n <div class=\"ngx-menu-panel\" [class]=\"class()\">\n <ng-content></ng-content>\n </div>\n </ng-template>\n `,\n exportAs: 'NgxMenu',\n styles: `\n .ngx-menu-panel {\n --ngx-menu-bg: light-dark(#ffffff, #252425);\n --ngx-menu-fg: light-dark(#000000, #ffffff);\n }\n .ngx-menu-panel {\n overflow: auto;\n box-sizing: border-box;\n outline: 0;\n background-color: var(--ngx-menu-bg);\n color: var(--ngx-menu-fg);\n box-shadow: var(--ngx-menu-shadow, 0px 0px 4px rgb(0 0 0 / 30%));\n border-radius: var(--ngx-menu-radius, 10px);\n padding: var(--ngx-menu-padding, 5px);\n min-width: var(--ngx-menu-min-width, 20px);\n min-height: var(--ngx-menu-min-height, 40px);\n will-change: transform, opacity;\n }\n .ngx-menu-panel.ngx-menu-panel-exit {\n animation: menu-exit 100ms 25ms linear forwards;\n }\n `,\n imports: [CommonModule],\n providers: [{ provide: NGX_MENU_CONTEXT, useExisting: NgxMenuPanel }],\n})\nexport class NgxMenuPanel implements MenuContext {\n template = viewChild<TemplateRef<any>>(TemplateRef);\n class = input<string>();\n\n containerRef?: OverlayRef<NgxMenuPanel>;\n\n close(): void {\n this.containerRef?.close();\n }\n}\n","import { Component, HostListener, inject } from '@angular/core';\nimport { NGX_MENU_CONTEXT } from '../../tokens/menu-context.token';\nimport { NgxMenu } from '../../directives/ngx-menu.directive';\n\n@Component({\n selector: 'ngx-menu-item,[ngx-menu-item]',\n template: `\n <div class=\"ngx-menu-item\">\n <ng-content></ng-content>\n </div>\n `,\n exportAs: 'NgxMenuItem',\n styles: `\n .ngx-menu-item {\n box-sizing: border-box;\n outline: 0;\n padding: var(--ngx-menu-item-padding, 6px 12px);\n transition: all 300ms;\n &:hover {\n cursor: pointer;\n background-color: var(--ngx-menu-item-hover-bg, #9bc6ff68);\n }\n }\n `,\n})\nexport class NgxMenuItem {\n menuContext = inject(NGX_MENU_CONTEXT);\n childMenu = inject(NgxMenu, {\n self: true,\n optional: true,\n });\n\n @HostListener('click')\n onClick() {\n if (this.childMenu?.ngxMenu) {\n return;\n }\n this.menuContext?.close();\n }\n}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'ngx-menu-divider,[ngx-menu-divider]',\n template: ``,\n styles: `\n :host {\n display: block;\n border-bottom: var(--ngx-menu-item-border, 1px #43434d3d solid);\n border-bottom-color: var(--ngx-menu-divider-border-color, #43434d3d);\n margin: var(--ngx-menu-divider-margin, 10px calc(var(--ngx-menu-padding, 5px) * -1));\n }\n `,\n})\nexport class NgxMenuDivider {}\n","import { NgModule } from '@angular/core';\nimport { NgxMenuDivider } from './components/ngx-menu-divider/menu-divider.component';\nimport { NgxMenuItem } from './components/ngx-menu-item/menu-item.component';\nimport { NgxMenuPanel } from './components/ngx-menu/menu.component';\nimport { NgxMenu } from './directives/ngx-menu.directive';\nimport { NgxContextMenu } from './public-api';\n\nconst d = [NgxMenu, NgxContextMenu, NgxMenuPanel, NgxMenuItem, NgxMenuDivider];\n@NgModule({\n imports: d,\n exports: d,\n})\nexport class NgxMenuModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAea,OAAO,CAAA;AAQR,IAAA,EAAA;AACA,IAAA,MAAA;AACA,IAAA,cAAA;IATV,OAAO,GAAG,KAAK,CAAC,QAAQ;gFAAgB;AACxC,IAAA,SAAS,GAAG,KAAK;6FAAa;AAC9B,IAAA,SAAS,GAAG,KAAK;6FAAa;AAEtB,IAAA,YAAY;AAEpB,IAAA,WAAA,CACU,EAAc,EACd,MAAsB,EACtB,cAA8B,EAAA;QAF9B,IAAA,CAAA,EAAE,GAAF,EAAE;QACF,IAAA,CAAA,MAAM,GAAN,MAAM;QACN,IAAA,CAAA,cAAc,GAAd,cAAc;IACrB;IAEH,WAAW,GAAA;QACT,I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c,CAAA,EAAA,OAAA,EAAA,CAAlE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,CAAA,EAAA,CAAA;AAKhE,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YALU,YAAY,CAAA,EAAA,CAAA;;2FAKnC,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC;AACV,oBAAA,OAAO,EAAE,CAAC;AACX,iBAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -174,7 +174,7 @@ class NgxMessageComponent {
|
|
|
174
174
|
provide: NGX_MESSAGE_CONFIGS,
|
|
175
175
|
useValue: NGX_MESSAGE_DEFAULT_OPTIONS,
|
|
176
176
|
},
|
|
177
|
-
], viewQueries: [{ propertyName: "confetti", first: true, predicate: ["confetti"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"ngx-msg-overlay show\"\n (click)=\"onOutSideClick()\"\n [ngClass]=\"options.containerClass\"\n [class.has-backdrop]=\"options.backdrop\"\n [attr.data-type]=\"options.icon\">\n <div class=\"ngx-msg-modal\" (click)=\"innerOnClick($event)\">\n <div class=\"confetti\" #confetti></div>\n @if (options.showCloseButton) {\n <button class=\"close-x\" (click)=\"close()\" aria-label=\"Close\">\u2715</button>\n }\n @if (showIcon()) {\n <div class=\"icon-stage\">\n <div class=\"icon-ring\"></div>\n <div class=\"icon-disc\" [innerHTML]=\"icon\"></div>\n </div>\n }\n <h2>{{ options.title }}</h2>\n <p class=\"desc\">\n {{ options.text }}\n <span [innerHTML]=\"options.html\"></span>\n </p>\n\n <div class=\"ngx-msg-actions\">\n @if (options.showCancelButton) {\n <button\n class=\"btn btn-ghost\"\n (click)=\"onCancel()\"\n [attr.aria-label]=\"options.cancelButtonAriaLabel\">\n {{ options.cancelButtonText }}\n </button>\n }\n @if (options.showDenyButton) {\n <button\n class=\"btn btn-ghost\"\n (click)=\"onDeny()\"\n [attr.aria-label]=\"options.denyButtonAriaLabel\">\n {{ options.denyButtonText }}\n </button>\n }\n @if (options.showConfirmButton) {\n <button\n class=\"btn btn-primary\"\n (click)=\"onConfirm()\"\n [attr.aria-label]=\"options.confirmButtonAriaLabel\">\n {{ options.confirmButtonText }}\n </button>\n }\n </div>\n </div>\n</div>\n", styles: [":root{--bg-0: #0a0c14;--bg-1: #0f1220;--ngx-msg-panel-bg: light-dark(#ffffffc4, #161928b8);--ngx-msg-panel-fg: light-dark(#000, #fff);--ngx-msg-panel-border: light-dark(#4545454a, #ffffff14);--ink-0: light-dark(#212121, #f3f4fb);--ink-1: light-dark(#2d2e32, #a8adc4);--ink-2: #6b7090;--violet: #8b7bff;--violet-2: #5b4fd1;--cyan: #43e0d8;--amber: #ffb454;--rose: #ff6b8b;--emerald: #3ee08f;--success-a: #3ee08f;--success-b: #1fb8b0;--error-a: #ff6b8b;--error-b: #c23f6b;--warning-a: #ffc45c;--warning-b: #ff8a4c;--info-a: #7cc1ff;--info-b: #5b6cff;--confirm-a: #c58bff;--confirm-b: #7b5cff}.ngx-msg-overlay{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:24px;background:#06070e8c;backdrop-filter:blur(6px) saturate(140%);-webkit-backdrop-filter:blur(6px) saturate(140%);opacity:0;visibility:hidden;transition:opacity .35s ease,visibility .35s ease}.ngx-msg-overlay.show{opacity:1;visibility:visible}.ngx-msg-modal{position:relative;width:100%;max-width:400px;background-color:var(--ngx-msg-panel-bg);color:var(--ngx-msg-panel-fg);border:1px solid var(--ngx-msg-panel-border);border-radius:26px;padding:38px 30px 28px;text-align:center;box-shadow:0 30px 80px -20px #0009,0 0 0 1px #ffffff05 inset;transform:translateY(28px) scale(.92);opacity:0;transition:transform .1s,opacity .1s;overflow:hidden}.ngx-msg-overlay.show .ngx-msg-modal{animation:modalIn .55s cubic-bezier(.2,1.1,.3,1) forwards}.ngx-msg-overlay.closing .ngx-msg-modal{animation:modalOut .28s cubic-bezier(.4,0,1,1) forwards}@keyframes modalIn{0%{transform:translateY(28px) scale(.9);opacity:0}60%{transform:translateY(-4px) scale(1.015);opacity:1}to{transform:translateY(0) scale(1);opacity:1}}@keyframes modalOut{to{transform:translateY(14px) scale(.94);opacity:0}}.ngx-msg-modal:before{content:\"\";position:absolute;top:-60px;left:50%;translate:-50% 0;width:260px;height:200px;border-radius:50%;background:var(--type-glow, radial-gradient(circle, rgba(139, 123, 255, .35), transparent 70%));filter:blur(20px);pointer-events:none}.ngx-msg-modal .close-x{position:absolute;top:4px;left:4px;width:30px;height:30px;border-radius:50%;border:none;background:none;color:var(--ink-2);display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:14px;line-height:1;transition:background .2s,color .2s,transform .2s;transform-origin:center;font-family:none}.ngx-msg-modal .close-x:hover{background:#ffffff14;color:var(--ink-0);transform:rotate(90deg)}.ngx-msg-overlay .icon-stage{position:relative;width:96px;height:96px;margin:4px auto 22px}.ngx-msg-overlay .icon-ring{position:absolute;inset:0;border-radius:50%;background:var(--type-ring, conic-gradient(from 0deg, var(--violet), var(--cyan), var(--violet)));-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 calc(100% - 2.5px));mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 calc(100% - 2.5px));opacity:0}.ngx-msg-overlay.show .icon-ring{animation:ringIn .8s .05s cubic-bezier(.2,.8,.2,1) forwards,ringSpin 6s linear infinite}@keyframes ringIn{to{opacity:1}}@keyframes ringSpin{to{transform:rotate(360deg)}}.ngx-msg-overlay .icon-disc{position:absolute;inset:8px;border-radius:50%;background:var(--type-disc, linear-gradient(150deg, var(--violet), var(--violet-2)));display:flex;align-items:center;justify-content:center;box-shadow:0 10px 30px -6px var(--type-shadow, rgba(139, 123, 255, .55));transform:scale(0)}.ngx-msg-overlay.show .icon-disc{animation:discPop .6s .12s cubic-bezier(.34,1.56,.64,1) forwards}@keyframes discPop{to{transform:scale(1)}}.ngx-msg-overlay .icon-disc svg{width:46px;height:46px;overflow:visible}.ngx-msg-overlay .icon-disc .draw{fill:none;stroke:#fff;stroke-width:5.5;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:80;stroke-dashoffset:80}.ngx-msg-overlay.show .icon-disc .draw{animation:draw .5s .42s cubic-bezier(.4,0,.2,1) forwards}@keyframes draw{to{stroke-dashoffset:0}}.ngx-msg-overlay .icon-disc .dot-mark{fill:#fff;opacity:0;transform:scale(0);transform-origin:center}.ngx-msg-overlay.show .icon-disc .dot-mark{animation:dotPop .3s .55s cubic-bezier(.34,1.56,.64,1) forwards}@keyframes dotPop{to{opacity:1;transform:scale(1)}}.ngx-msg-overlay .spinner-wrap{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.ngx-msg-overlay .spinner{width:52px;height:52px;border-radius:50%;border:5px solid rgba(255,255,255,.18);border-top-color:#fff;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.ngx-msg-modal h2{font-size:22px;font-weight:700;margin:0 0 10px;opacity:0;transform:translateY(8px)}.ngx-msg-modal p.desc{font-size:14.5px;line-height:1.85;color:var(--ink-1);margin:0 0 26px;opacity:0;transform:translateY(8px)}.ngx-msg-overlay.show .ngx-msg-modal h2{animation:textIn .5s .3s ease forwards}.ngx-msg-overlay.show .ngx-msg-modal p.desc{animation:textIn .5s .38s ease forwards}@keyframes textIn{to{opacity:1;transform:translateY(0)}}.ngx-msg-modal .ngx-msg-actions{display:flex;gap:10px;justify-content:center;opacity:0;transform:translateY(8px)}.ngx-msg-overlay.show .ngx-msg-modal .ngx-msg-actions{animation:textIn .5s .46s ease forwards}.ngx-msg-overlay .btn{appearance:none;border:none;cursor:pointer;font-family:inherit;font-size:14.5px;font-weight:700;padding:12px 22px;border-radius:13px;transition:transform .18s cubic-bezier(.2,.8,.2,1),filter .2s,box-shadow .2s;flex:1;max-width:170px}.ngx-msg-overlay .btn:active{transform:scale(.95)}.ngx-msg-overlay .btn-primary{color:#0a0c14;background:var(--type-btn, linear-gradient(135deg, var(--violet), var(--cyan)));box-shadow:0 10px 24px -8px var(--type-shadow, rgba(139, 123, 255, .6))}.ngx-msg-overlay .btn-primary:hover{filter:brightness(1.08);transform:translateY(-2px)}.ngx-msg-overlay .btn-ghost{color:var(--ink-1);background:#ffffff0b;border:1px solid var(--ngx-msg-panel-border)}.ngx-msg-overlay .btn-ghost:hover{color:var(--ink-0);background:#ffffff14}.ngx-msg-overlay .progress{position:absolute;bottom:0;left:0;height:3px;background:var(--type-btn, linear-gradient(90deg, var(--violet), var(--cyan)));width:100%;transform-origin:right center}.ngx-msg-overlay [dir=rtl] .progress{transform-origin:left center}@media(prefers-reduced-motion:reduce){.ngx-msg-overlay *{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}.ngx-msg-overlay .btn:focus-visible,.ngx-msg-overlay .trigger:focus-visible,.ngx-msg-overlay .close-x:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}.ngx-msg-overlay[data-type=success] .ngx-msg-modal{--type-ring: conic-gradient(from 0deg, var(--success-a), var(--success-b), var(--success-a));--type-disc: linear-gradient(150deg, var(--success-a), var(--success-b));--type-shadow: rgba(62, 224, 143, .5);--type-btn: linear-gradient(135deg, var(--success-a), var(--success-b));--type-glow: radial-gradient(circle, rgba(62, 224, 143, .35), transparent 70%)}.ngx-msg-overlay[data-type=error] .ngx-msg-modal{--type-ring: conic-gradient(from 0deg, var(--error-a), var(--error-b), var(--error-a));--type-disc: linear-gradient(150deg, var(--error-a), var(--error-b));--type-shadow: rgba(255, 107, 139, .5);--type-btn: linear-gradient(135deg, var(--error-a), var(--error-b));--type-glow: radial-gradient(circle, rgba(255, 107, 139, .35), transparent 70%)}.ngx-msg-overlay[data-type=warning] .ngx-msg-modal{--type-ring: conic-gradient(from 0deg, var(--warning-a), var(--warning-b), var(--warning-a));--type-disc: linear-gradient(150deg, var(--warning-a), var(--warning-b));--type-shadow: rgba(255, 140, 76, .5);--type-btn: linear-gradient(135deg, var(--warning-a), var(--warning-b));--type-glow: radial-gradient(circle, rgba(255, 140, 76, .35), transparent 70%)}.ngx-msg-overlay[data-type=info] .ngx-msg-modal{--type-ring: conic-gradient(from 0deg, var(--info-a), var(--info-b), var(--info-a));--type-disc: linear-gradient(150deg, var(--info-a), var(--info-b));--type-shadow: rgba(91, 108, 255, .5);--type-btn: linear-gradient(135deg, var(--info-a), var(--info-b));--type-glow: radial-gradient(circle, rgba(91, 108, 255, .35), transparent 70%)}.ngx-msg-overlay[data-type=confirm] .ngx-msg-modal{--type-ring: conic-gradient(from 0deg, var(--confirm-a), var(--confirm-b), var(--confirm-a));--type-disc: linear-gradient(150deg, var(--confirm-a), var(--confirm-b));--type-shadow: rgba(123, 92, 255, .5);--type-btn: linear-gradient(135deg, var(--confirm-a), var(--confirm-b));--type-glow: radial-gradient(circle, rgba(123, 92, 255, .35), transparent 70%)}.ngx-msg-overlay[data-type=loading] .ngx-msg-modal{--type-disc: linear-gradient(150deg, #9aa3c0, #565c78);--type-glow: radial-gradient(circle, rgba(154, 163, 192, .3), transparent 70%)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
177
|
+
], viewQueries: [{ propertyName: "confetti", first: true, predicate: ["confetti"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"ngx-msg-overlay show\"\n (click)=\"onOutSideClick()\"\n [ngClass]=\"options.containerClass\"\n [class.has-backdrop]=\"options.backdrop\"\n [attr.data-type]=\"options.icon\">\n <div class=\"ngx-msg-modal\" (click)=\"innerOnClick($event)\">\n <div class=\"confetti\" #confetti></div>\n @if (options.showCloseButton) {\n <button class=\"close-x\" (click)=\"close()\" aria-label=\"Close\">\u2715</button>\n }\n @if (showIcon()) {\n <div class=\"icon-stage\">\n <div class=\"icon-ring\"></div>\n <div class=\"icon-disc\" [innerHTML]=\"icon\"></div>\n </div>\n }\n <h2>{{ options.title }}</h2>\n <p class=\"desc\">\n {{ options.text }}\n <span [innerHTML]=\"options.html\"></span>\n </p>\n\n <div class=\"ngx-msg-actions\">\n @if (options.showCancelButton) {\n <button\n class=\"btn btn-ghost\"\n (click)=\"onCancel()\"\n [attr.aria-label]=\"options.cancelButtonAriaLabel\">\n {{ options.cancelButtonText }}\n </button>\n }\n @if (options.showDenyButton) {\n <button\n class=\"btn btn-ghost\"\n (click)=\"onDeny()\"\n [attr.aria-label]=\"options.denyButtonAriaLabel\">\n {{ options.denyButtonText }}\n </button>\n }\n @if (options.showConfirmButton) {\n <button\n class=\"btn btn-primary\"\n (click)=\"onConfirm()\"\n [attr.aria-label]=\"options.confirmButtonAriaLabel\">\n {{ options.confirmButtonText }}\n </button>\n }\n </div>\n </div>\n</div>\n", styles: [":root{--bg-0: #0a0c14;--bg-1: #0f1220;--ngx-msg-panel-bg: light-dark(#ffffffc4, #161928b8);--ngx-msg-panel-fg: light-dark(#000, #fff);--ngx-msg-panel-border: light-dark(#4545454a, #ffffff14);--ink-0: light-dark(#212121, #f3f4fb);--ink-1: light-dark(#2d2e32, #a8adc4);--ink-2: #6b7090;--violet: #8b7bff;--violet-2: #5b4fd1;--cyan: #43e0d8;--amber: #ffb454;--rose: #ff6b8b;--emerald: #3ee08f;--success-a: #3ee08f;--success-b: #1fb8b0;--error-a: #ff6b8b;--error-b: #c23f6b;--warning-a: #ffc45c;--warning-b: #ff8a4c;--info-a: #7cc1ff;--info-b: #5b6cff;--confirm-a: #c58bff;--confirm-b: #7b5cff}.ngx-msg-overlay{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:24px;background:#06070e8c;backdrop-filter:blur(6px) saturate(140%);-webkit-backdrop-filter:blur(6px) saturate(140%);opacity:0;visibility:hidden;transition:opacity .35s ease,visibility .35s ease}.ngx-msg-overlay.show{opacity:1;visibility:visible}.ngx-msg-modal{position:relative;min-width:400px;max-width:80dvw;background-color:var(--ngx-msg-panel-bg);color:var(--ngx-msg-panel-fg);border:1px solid var(--ngx-msg-panel-border);border-radius:26px;padding:38px 30px 28px;text-align:center;box-shadow:0 30px 80px -20px #0009,0 0 0 1px #ffffff05 inset;transform:translateY(28px) scale(.92);opacity:0;transition:transform .1s,opacity .1s;overflow:hidden}.ngx-msg-overlay.show .ngx-msg-modal{animation:modalIn .55s cubic-bezier(.2,1.1,.3,1) forwards}.ngx-msg-overlay.closing .ngx-msg-modal{animation:modalOut .28s cubic-bezier(.4,0,1,1) forwards}@keyframes modalIn{0%{transform:translateY(28px) scale(.9);opacity:0}60%{transform:translateY(-4px) scale(1.015);opacity:1}to{transform:translateY(0) scale(1);opacity:1}}@keyframes modalOut{to{transform:translateY(14px) scale(.94);opacity:0}}.ngx-msg-modal:before{content:\"\";position:absolute;top:-60px;left:50%;translate:-50% 0;width:260px;height:200px;border-radius:50%;background:var(--type-glow, radial-gradient(circle, rgba(139, 123, 255, .35), transparent 70%));filter:blur(20px);pointer-events:none}.ngx-msg-modal .close-x{position:absolute;top:4px;left:4px;width:30px;height:30px;border-radius:50%;border:none;background:none;color:var(--ink-2);display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:14px;line-height:1;transition:background .2s,color .2s,transform .2s;transform-origin:center;font-family:none}.ngx-msg-modal .close-x:hover{background:#ffffff14;color:var(--ink-0);transform:rotate(90deg)}.ngx-msg-overlay .icon-stage{position:relative;width:96px;height:96px;margin:4px auto 22px}.ngx-msg-overlay .icon-ring{position:absolute;inset:0;border-radius:50%;background:var(--type-ring, conic-gradient(from 0deg, var(--violet), var(--cyan), var(--violet)));-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 calc(100% - 2.5px));mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 calc(100% - 2.5px));opacity:0}.ngx-msg-overlay.show .icon-ring{animation:ringIn .8s .05s cubic-bezier(.2,.8,.2,1) forwards,ringSpin 6s linear infinite}@keyframes ringIn{to{opacity:1}}@keyframes ringSpin{to{transform:rotate(360deg)}}.ngx-msg-overlay .icon-disc{position:absolute;inset:8px;border-radius:50%;background:var(--type-disc, linear-gradient(150deg, var(--violet), var(--violet-2)));display:flex;align-items:center;justify-content:center;box-shadow:0 10px 30px -6px var(--type-shadow, rgba(139, 123, 255, .55));transform:scale(0)}.ngx-msg-overlay.show .icon-disc{animation:discPop .6s .12s cubic-bezier(.34,1.56,.64,1) forwards}@keyframes discPop{to{transform:scale(1)}}.ngx-msg-overlay .icon-disc svg{width:46px;height:46px;overflow:visible}.ngx-msg-overlay .icon-disc .draw{fill:none;stroke:#fff;stroke-width:5.5;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:80;stroke-dashoffset:80}.ngx-msg-overlay.show .icon-disc .draw{animation:draw .5s .42s cubic-bezier(.4,0,.2,1) forwards}@keyframes draw{to{stroke-dashoffset:0}}.ngx-msg-overlay .icon-disc .dot-mark{fill:#fff;opacity:0;transform:scale(0);transform-origin:center}.ngx-msg-overlay.show .icon-disc .dot-mark{animation:dotPop .3s .55s cubic-bezier(.34,1.56,.64,1) forwards}@keyframes dotPop{to{opacity:1;transform:scale(1)}}.ngx-msg-overlay .spinner-wrap{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.ngx-msg-overlay .spinner{width:52px;height:52px;border-radius:50%;border:5px solid rgba(255,255,255,.18);border-top-color:#fff;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.ngx-msg-modal h2{font-size:22px;font-weight:700;margin:0 0 10px;opacity:0;transform:translateY(8px)}.ngx-msg-modal p.desc{font-size:14.5px;line-height:1.85;color:var(--ink-1);margin:0 0 26px;opacity:0;transform:translateY(8px);overflow:auto;max-height:70dvh}.ngx-msg-overlay.show .ngx-msg-modal h2{animation:textIn .5s .3s ease forwards}.ngx-msg-overlay.show .ngx-msg-modal p.desc{animation:textIn .5s .38s ease forwards}@keyframes textIn{to{opacity:1;transform:translateY(0)}}.ngx-msg-modal .ngx-msg-actions{display:flex;gap:10px;justify-content:center;opacity:0;transform:translateY(8px)}.ngx-msg-overlay.show .ngx-msg-modal .ngx-msg-actions{animation:textIn .5s .46s ease forwards}.ngx-msg-overlay .btn{appearance:none;border:none;cursor:pointer;font-family:inherit;font-size:14.5px;font-weight:700;padding:12px 22px;border-radius:13px;transition:transform .18s cubic-bezier(.2,.8,.2,1),filter .2s,box-shadow .2s;flex:1;max-width:170px}.ngx-msg-overlay .btn:active{transform:scale(.95)}.ngx-msg-overlay .btn-primary{color:#0a0c14;background:var(--type-btn, linear-gradient(135deg, var(--violet), var(--cyan)));box-shadow:0 10px 24px -8px var(--type-shadow, rgba(139, 123, 255, .6))}.ngx-msg-overlay .btn-primary:hover{filter:brightness(1.08);transform:translateY(-2px)}.ngx-msg-overlay .btn-ghost{color:var(--ink-1);background:#ffffff0b;border:1px solid var(--ngx-msg-panel-border)}.ngx-msg-overlay .btn-ghost:hover{color:var(--ink-0);background:#ffffff14}.ngx-msg-overlay .progress{position:absolute;bottom:0;left:0;height:3px;background:var(--type-btn, linear-gradient(90deg, var(--violet), var(--cyan)));width:100%;transform-origin:right center}.ngx-msg-overlay [dir=rtl] .progress{transform-origin:left center}@media(prefers-reduced-motion:reduce){.ngx-msg-overlay *{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}.ngx-msg-overlay .btn:focus-visible,.ngx-msg-overlay .trigger:focus-visible,.ngx-msg-overlay .close-x:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}.ngx-msg-overlay[data-type=success] .ngx-msg-modal{--type-ring: conic-gradient(from 0deg, var(--success-a), var(--success-b), var(--success-a));--type-disc: linear-gradient(150deg, var(--success-a), var(--success-b));--type-shadow: rgba(62, 224, 143, .5);--type-btn: linear-gradient(135deg, var(--success-a), var(--success-b));--type-glow: radial-gradient(circle, rgba(62, 224, 143, .35), transparent 70%)}.ngx-msg-overlay[data-type=error] .ngx-msg-modal{--type-ring: conic-gradient(from 0deg, var(--error-a), var(--error-b), var(--error-a));--type-disc: linear-gradient(150deg, var(--error-a), var(--error-b));--type-shadow: rgba(255, 107, 139, .5);--type-btn: linear-gradient(135deg, var(--error-a), var(--error-b));--type-glow: radial-gradient(circle, rgba(255, 107, 139, .35), transparent 70%)}.ngx-msg-overlay[data-type=warning] .ngx-msg-modal{--type-ring: conic-gradient(from 0deg, var(--warning-a), var(--warning-b), var(--warning-a));--type-disc: linear-gradient(150deg, var(--warning-a), var(--warning-b));--type-shadow: rgba(255, 140, 76, .5);--type-btn: linear-gradient(135deg, var(--warning-a), var(--warning-b));--type-glow: radial-gradient(circle, rgba(255, 140, 76, .35), transparent 70%)}.ngx-msg-overlay[data-type=info] .ngx-msg-modal{--type-ring: conic-gradient(from 0deg, var(--info-a), var(--info-b), var(--info-a));--type-disc: linear-gradient(150deg, var(--info-a), var(--info-b));--type-shadow: rgba(91, 108, 255, .5);--type-btn: linear-gradient(135deg, var(--info-a), var(--info-b));--type-glow: radial-gradient(circle, rgba(91, 108, 255, .35), transparent 70%)}.ngx-msg-overlay[data-type=confirm] .ngx-msg-modal{--type-ring: conic-gradient(from 0deg, var(--confirm-a), var(--confirm-b), var(--confirm-a));--type-disc: linear-gradient(150deg, var(--confirm-a), var(--confirm-b));--type-shadow: rgba(123, 92, 255, .5);--type-btn: linear-gradient(135deg, var(--confirm-a), var(--confirm-b));--type-glow: radial-gradient(circle, rgba(123, 92, 255, .35), transparent 70%)}.ngx-msg-overlay[data-type=loading] .ngx-msg-modal{--type-disc: linear-gradient(150deg, #9aa3c0, #565c78);--type-glow: radial-gradient(circle, rgba(154, 163, 192, .3), transparent 70%)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
178
178
|
}
|
|
179
179
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxMessageComponent, decorators: [{
|
|
180
180
|
type: Component,
|
|
@@ -183,7 +183,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
|
|
|
183
183
|
provide: NGX_MESSAGE_CONFIGS,
|
|
184
184
|
useValue: NGX_MESSAGE_DEFAULT_OPTIONS,
|
|
185
185
|
},
|
|
186
|
-
], template: "<div\n class=\"ngx-msg-overlay show\"\n (click)=\"onOutSideClick()\"\n [ngClass]=\"options.containerClass\"\n [class.has-backdrop]=\"options.backdrop\"\n [attr.data-type]=\"options.icon\">\n <div class=\"ngx-msg-modal\" (click)=\"innerOnClick($event)\">\n <div class=\"confetti\" #confetti></div>\n @if (options.showCloseButton) {\n <button class=\"close-x\" (click)=\"close()\" aria-label=\"Close\">\u2715</button>\n }\n @if (showIcon()) {\n <div class=\"icon-stage\">\n <div class=\"icon-ring\"></div>\n <div class=\"icon-disc\" [innerHTML]=\"icon\"></div>\n </div>\n }\n <h2>{{ options.title }}</h2>\n <p class=\"desc\">\n {{ options.text }}\n <span [innerHTML]=\"options.html\"></span>\n </p>\n\n <div class=\"ngx-msg-actions\">\n @if (options.showCancelButton) {\n <button\n class=\"btn btn-ghost\"\n (click)=\"onCancel()\"\n [attr.aria-label]=\"options.cancelButtonAriaLabel\">\n {{ options.cancelButtonText }}\n </button>\n }\n @if (options.showDenyButton) {\n <button\n class=\"btn btn-ghost\"\n (click)=\"onDeny()\"\n [attr.aria-label]=\"options.denyButtonAriaLabel\">\n {{ options.denyButtonText }}\n </button>\n }\n @if (options.showConfirmButton) {\n <button\n class=\"btn btn-primary\"\n (click)=\"onConfirm()\"\n [attr.aria-label]=\"options.confirmButtonAriaLabel\">\n {{ options.confirmButtonText }}\n </button>\n }\n </div>\n </div>\n</div>\n", styles: [":root{--bg-0: #0a0c14;--bg-1: #0f1220;--ngx-msg-panel-bg: light-dark(#ffffffc4, #161928b8);--ngx-msg-panel-fg: light-dark(#000, #fff);--ngx-msg-panel-border: light-dark(#4545454a, #ffffff14);--ink-0: light-dark(#212121, #f3f4fb);--ink-1: light-dark(#2d2e32, #a8adc4);--ink-2: #6b7090;--violet: #8b7bff;--violet-2: #5b4fd1;--cyan: #43e0d8;--amber: #ffb454;--rose: #ff6b8b;--emerald: #3ee08f;--success-a: #3ee08f;--success-b: #1fb8b0;--error-a: #ff6b8b;--error-b: #c23f6b;--warning-a: #ffc45c;--warning-b: #ff8a4c;--info-a: #7cc1ff;--info-b: #5b6cff;--confirm-a: #c58bff;--confirm-b: #7b5cff}.ngx-msg-overlay{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:24px;background:#06070e8c;backdrop-filter:blur(6px) saturate(140%);-webkit-backdrop-filter:blur(6px) saturate(140%);opacity:0;visibility:hidden;transition:opacity .35s ease,visibility .35s ease}.ngx-msg-overlay.show{opacity:1;visibility:visible}.ngx-msg-modal{position:relative;width:100%;max-width:400px;background-color:var(--ngx-msg-panel-bg);color:var(--ngx-msg-panel-fg);border:1px solid var(--ngx-msg-panel-border);border-radius:26px;padding:38px 30px 28px;text-align:center;box-shadow:0 30px 80px -20px #0009,0 0 0 1px #ffffff05 inset;transform:translateY(28px) scale(.92);opacity:0;transition:transform .1s,opacity .1s;overflow:hidden}.ngx-msg-overlay.show .ngx-msg-modal{animation:modalIn .55s cubic-bezier(.2,1.1,.3,1) forwards}.ngx-msg-overlay.closing .ngx-msg-modal{animation:modalOut .28s cubic-bezier(.4,0,1,1) forwards}@keyframes modalIn{0%{transform:translateY(28px) scale(.9);opacity:0}60%{transform:translateY(-4px) scale(1.015);opacity:1}to{transform:translateY(0) scale(1);opacity:1}}@keyframes modalOut{to{transform:translateY(14px) scale(.94);opacity:0}}.ngx-msg-modal:before{content:\"\";position:absolute;top:-60px;left:50%;translate:-50% 0;width:260px;height:200px;border-radius:50%;background:var(--type-glow, radial-gradient(circle, rgba(139, 123, 255, .35), transparent 70%));filter:blur(20px);pointer-events:none}.ngx-msg-modal .close-x{position:absolute;top:4px;left:4px;width:30px;height:30px;border-radius:50%;border:none;background:none;color:var(--ink-2);display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:14px;line-height:1;transition:background .2s,color .2s,transform .2s;transform-origin:center;font-family:none}.ngx-msg-modal .close-x:hover{background:#ffffff14;color:var(--ink-0);transform:rotate(90deg)}.ngx-msg-overlay .icon-stage{position:relative;width:96px;height:96px;margin:4px auto 22px}.ngx-msg-overlay .icon-ring{position:absolute;inset:0;border-radius:50%;background:var(--type-ring, conic-gradient(from 0deg, var(--violet), var(--cyan), var(--violet)));-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 calc(100% - 2.5px));mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 calc(100% - 2.5px));opacity:0}.ngx-msg-overlay.show .icon-ring{animation:ringIn .8s .05s cubic-bezier(.2,.8,.2,1) forwards,ringSpin 6s linear infinite}@keyframes ringIn{to{opacity:1}}@keyframes ringSpin{to{transform:rotate(360deg)}}.ngx-msg-overlay .icon-disc{position:absolute;inset:8px;border-radius:50%;background:var(--type-disc, linear-gradient(150deg, var(--violet), var(--violet-2)));display:flex;align-items:center;justify-content:center;box-shadow:0 10px 30px -6px var(--type-shadow, rgba(139, 123, 255, .55));transform:scale(0)}.ngx-msg-overlay.show .icon-disc{animation:discPop .6s .12s cubic-bezier(.34,1.56,.64,1) forwards}@keyframes discPop{to{transform:scale(1)}}.ngx-msg-overlay .icon-disc svg{width:46px;height:46px;overflow:visible}.ngx-msg-overlay .icon-disc .draw{fill:none;stroke:#fff;stroke-width:5.5;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:80;stroke-dashoffset:80}.ngx-msg-overlay.show .icon-disc .draw{animation:draw .5s .42s cubic-bezier(.4,0,.2,1) forwards}@keyframes draw{to{stroke-dashoffset:0}}.ngx-msg-overlay .icon-disc .dot-mark{fill:#fff;opacity:0;transform:scale(0);transform-origin:center}.ngx-msg-overlay.show .icon-disc .dot-mark{animation:dotPop .3s .55s cubic-bezier(.34,1.56,.64,1) forwards}@keyframes dotPop{to{opacity:1;transform:scale(1)}}.ngx-msg-overlay .spinner-wrap{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.ngx-msg-overlay .spinner{width:52px;height:52px;border-radius:50%;border:5px solid rgba(255,255,255,.18);border-top-color:#fff;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.ngx-msg-modal h2{font-size:22px;font-weight:700;margin:0 0 10px;opacity:0;transform:translateY(8px)}.ngx-msg-modal p.desc{font-size:14.5px;line-height:1.85;color:var(--ink-1);margin:0 0 26px;opacity:0;transform:translateY(8px)}.ngx-msg-overlay.show .ngx-msg-modal h2{animation:textIn .5s .3s ease forwards}.ngx-msg-overlay.show .ngx-msg-modal p.desc{animation:textIn .5s .38s ease forwards}@keyframes textIn{to{opacity:1;transform:translateY(0)}}.ngx-msg-modal .ngx-msg-actions{display:flex;gap:10px;justify-content:center;opacity:0;transform:translateY(8px)}.ngx-msg-overlay.show .ngx-msg-modal .ngx-msg-actions{animation:textIn .5s .46s ease forwards}.ngx-msg-overlay .btn{appearance:none;border:none;cursor:pointer;font-family:inherit;font-size:14.5px;font-weight:700;padding:12px 22px;border-radius:13px;transition:transform .18s cubic-bezier(.2,.8,.2,1),filter .2s,box-shadow .2s;flex:1;max-width:170px}.ngx-msg-overlay .btn:active{transform:scale(.95)}.ngx-msg-overlay .btn-primary{color:#0a0c14;background:var(--type-btn, linear-gradient(135deg, var(--violet), var(--cyan)));box-shadow:0 10px 24px -8px var(--type-shadow, rgba(139, 123, 255, .6))}.ngx-msg-overlay .btn-primary:hover{filter:brightness(1.08);transform:translateY(-2px)}.ngx-msg-overlay .btn-ghost{color:var(--ink-1);background:#ffffff0b;border:1px solid var(--ngx-msg-panel-border)}.ngx-msg-overlay .btn-ghost:hover{color:var(--ink-0);background:#ffffff14}.ngx-msg-overlay .progress{position:absolute;bottom:0;left:0;height:3px;background:var(--type-btn, linear-gradient(90deg, var(--violet), var(--cyan)));width:100%;transform-origin:right center}.ngx-msg-overlay [dir=rtl] .progress{transform-origin:left center}@media(prefers-reduced-motion:reduce){.ngx-msg-overlay *{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}.ngx-msg-overlay .btn:focus-visible,.ngx-msg-overlay .trigger:focus-visible,.ngx-msg-overlay .close-x:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}.ngx-msg-overlay[data-type=success] .ngx-msg-modal{--type-ring: conic-gradient(from 0deg, var(--success-a), var(--success-b), var(--success-a));--type-disc: linear-gradient(150deg, var(--success-a), var(--success-b));--type-shadow: rgba(62, 224, 143, .5);--type-btn: linear-gradient(135deg, var(--success-a), var(--success-b));--type-glow: radial-gradient(circle, rgba(62, 224, 143, .35), transparent 70%)}.ngx-msg-overlay[data-type=error] .ngx-msg-modal{--type-ring: conic-gradient(from 0deg, var(--error-a), var(--error-b), var(--error-a));--type-disc: linear-gradient(150deg, var(--error-a), var(--error-b));--type-shadow: rgba(255, 107, 139, .5);--type-btn: linear-gradient(135deg, var(--error-a), var(--error-b));--type-glow: radial-gradient(circle, rgba(255, 107, 139, .35), transparent 70%)}.ngx-msg-overlay[data-type=warning] .ngx-msg-modal{--type-ring: conic-gradient(from 0deg, var(--warning-a), var(--warning-b), var(--warning-a));--type-disc: linear-gradient(150deg, var(--warning-a), var(--warning-b));--type-shadow: rgba(255, 140, 76, .5);--type-btn: linear-gradient(135deg, var(--warning-a), var(--warning-b));--type-glow: radial-gradient(circle, rgba(255, 140, 76, .35), transparent 70%)}.ngx-msg-overlay[data-type=info] .ngx-msg-modal{--type-ring: conic-gradient(from 0deg, var(--info-a), var(--info-b), var(--info-a));--type-disc: linear-gradient(150deg, var(--info-a), var(--info-b));--type-shadow: rgba(91, 108, 255, .5);--type-btn: linear-gradient(135deg, var(--info-a), var(--info-b));--type-glow: radial-gradient(circle, rgba(91, 108, 255, .35), transparent 70%)}.ngx-msg-overlay[data-type=confirm] .ngx-msg-modal{--type-ring: conic-gradient(from 0deg, var(--confirm-a), var(--confirm-b), var(--confirm-a));--type-disc: linear-gradient(150deg, var(--confirm-a), var(--confirm-b));--type-shadow: rgba(123, 92, 255, .5);--type-btn: linear-gradient(135deg, var(--confirm-a), var(--confirm-b));--type-glow: radial-gradient(circle, rgba(123, 92, 255, .35), transparent 70%)}.ngx-msg-overlay[data-type=loading] .ngx-msg-modal{--type-disc: linear-gradient(150deg, #9aa3c0, #565c78);--type-glow: radial-gradient(circle, rgba(154, 163, 192, .3), transparent 70%)}\n"] }]
|
|
186
|
+
], template: "<div\n class=\"ngx-msg-overlay show\"\n (click)=\"onOutSideClick()\"\n [ngClass]=\"options.containerClass\"\n [class.has-backdrop]=\"options.backdrop\"\n [attr.data-type]=\"options.icon\">\n <div class=\"ngx-msg-modal\" (click)=\"innerOnClick($event)\">\n <div class=\"confetti\" #confetti></div>\n @if (options.showCloseButton) {\n <button class=\"close-x\" (click)=\"close()\" aria-label=\"Close\">\u2715</button>\n }\n @if (showIcon()) {\n <div class=\"icon-stage\">\n <div class=\"icon-ring\"></div>\n <div class=\"icon-disc\" [innerHTML]=\"icon\"></div>\n </div>\n }\n <h2>{{ options.title }}</h2>\n <p class=\"desc\">\n {{ options.text }}\n <span [innerHTML]=\"options.html\"></span>\n </p>\n\n <div class=\"ngx-msg-actions\">\n @if (options.showCancelButton) {\n <button\n class=\"btn btn-ghost\"\n (click)=\"onCancel()\"\n [attr.aria-label]=\"options.cancelButtonAriaLabel\">\n {{ options.cancelButtonText }}\n </button>\n }\n @if (options.showDenyButton) {\n <button\n class=\"btn btn-ghost\"\n (click)=\"onDeny()\"\n [attr.aria-label]=\"options.denyButtonAriaLabel\">\n {{ options.denyButtonText }}\n </button>\n }\n @if (options.showConfirmButton) {\n <button\n class=\"btn btn-primary\"\n (click)=\"onConfirm()\"\n [attr.aria-label]=\"options.confirmButtonAriaLabel\">\n {{ options.confirmButtonText }}\n </button>\n }\n </div>\n </div>\n</div>\n", styles: [":root{--bg-0: #0a0c14;--bg-1: #0f1220;--ngx-msg-panel-bg: light-dark(#ffffffc4, #161928b8);--ngx-msg-panel-fg: light-dark(#000, #fff);--ngx-msg-panel-border: light-dark(#4545454a, #ffffff14);--ink-0: light-dark(#212121, #f3f4fb);--ink-1: light-dark(#2d2e32, #a8adc4);--ink-2: #6b7090;--violet: #8b7bff;--violet-2: #5b4fd1;--cyan: #43e0d8;--amber: #ffb454;--rose: #ff6b8b;--emerald: #3ee08f;--success-a: #3ee08f;--success-b: #1fb8b0;--error-a: #ff6b8b;--error-b: #c23f6b;--warning-a: #ffc45c;--warning-b: #ff8a4c;--info-a: #7cc1ff;--info-b: #5b6cff;--confirm-a: #c58bff;--confirm-b: #7b5cff}.ngx-msg-overlay{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:24px;background:#06070e8c;backdrop-filter:blur(6px) saturate(140%);-webkit-backdrop-filter:blur(6px) saturate(140%);opacity:0;visibility:hidden;transition:opacity .35s ease,visibility .35s ease}.ngx-msg-overlay.show{opacity:1;visibility:visible}.ngx-msg-modal{position:relative;min-width:400px;max-width:80dvw;background-color:var(--ngx-msg-panel-bg);color:var(--ngx-msg-panel-fg);border:1px solid var(--ngx-msg-panel-border);border-radius:26px;padding:38px 30px 28px;text-align:center;box-shadow:0 30px 80px -20px #0009,0 0 0 1px #ffffff05 inset;transform:translateY(28px) scale(.92);opacity:0;transition:transform .1s,opacity .1s;overflow:hidden}.ngx-msg-overlay.show .ngx-msg-modal{animation:modalIn .55s cubic-bezier(.2,1.1,.3,1) forwards}.ngx-msg-overlay.closing .ngx-msg-modal{animation:modalOut .28s cubic-bezier(.4,0,1,1) forwards}@keyframes modalIn{0%{transform:translateY(28px) scale(.9);opacity:0}60%{transform:translateY(-4px) scale(1.015);opacity:1}to{transform:translateY(0) scale(1);opacity:1}}@keyframes modalOut{to{transform:translateY(14px) scale(.94);opacity:0}}.ngx-msg-modal:before{content:\"\";position:absolute;top:-60px;left:50%;translate:-50% 0;width:260px;height:200px;border-radius:50%;background:var(--type-glow, radial-gradient(circle, rgba(139, 123, 255, .35), transparent 70%));filter:blur(20px);pointer-events:none}.ngx-msg-modal .close-x{position:absolute;top:4px;left:4px;width:30px;height:30px;border-radius:50%;border:none;background:none;color:var(--ink-2);display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:14px;line-height:1;transition:background .2s,color .2s,transform .2s;transform-origin:center;font-family:none}.ngx-msg-modal .close-x:hover{background:#ffffff14;color:var(--ink-0);transform:rotate(90deg)}.ngx-msg-overlay .icon-stage{position:relative;width:96px;height:96px;margin:4px auto 22px}.ngx-msg-overlay .icon-ring{position:absolute;inset:0;border-radius:50%;background:var(--type-ring, conic-gradient(from 0deg, var(--violet), var(--cyan), var(--violet)));-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 calc(100% - 2.5px));mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 calc(100% - 2.5px));opacity:0}.ngx-msg-overlay.show .icon-ring{animation:ringIn .8s .05s cubic-bezier(.2,.8,.2,1) forwards,ringSpin 6s linear infinite}@keyframes ringIn{to{opacity:1}}@keyframes ringSpin{to{transform:rotate(360deg)}}.ngx-msg-overlay .icon-disc{position:absolute;inset:8px;border-radius:50%;background:var(--type-disc, linear-gradient(150deg, var(--violet), var(--violet-2)));display:flex;align-items:center;justify-content:center;box-shadow:0 10px 30px -6px var(--type-shadow, rgba(139, 123, 255, .55));transform:scale(0)}.ngx-msg-overlay.show .icon-disc{animation:discPop .6s .12s cubic-bezier(.34,1.56,.64,1) forwards}@keyframes discPop{to{transform:scale(1)}}.ngx-msg-overlay .icon-disc svg{width:46px;height:46px;overflow:visible}.ngx-msg-overlay .icon-disc .draw{fill:none;stroke:#fff;stroke-width:5.5;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:80;stroke-dashoffset:80}.ngx-msg-overlay.show .icon-disc .draw{animation:draw .5s .42s cubic-bezier(.4,0,.2,1) forwards}@keyframes draw{to{stroke-dashoffset:0}}.ngx-msg-overlay .icon-disc .dot-mark{fill:#fff;opacity:0;transform:scale(0);transform-origin:center}.ngx-msg-overlay.show .icon-disc .dot-mark{animation:dotPop .3s .55s cubic-bezier(.34,1.56,.64,1) forwards}@keyframes dotPop{to{opacity:1;transform:scale(1)}}.ngx-msg-overlay .spinner-wrap{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.ngx-msg-overlay .spinner{width:52px;height:52px;border-radius:50%;border:5px solid rgba(255,255,255,.18);border-top-color:#fff;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.ngx-msg-modal h2{font-size:22px;font-weight:700;margin:0 0 10px;opacity:0;transform:translateY(8px)}.ngx-msg-modal p.desc{font-size:14.5px;line-height:1.85;color:var(--ink-1);margin:0 0 26px;opacity:0;transform:translateY(8px);overflow:auto;max-height:70dvh}.ngx-msg-overlay.show .ngx-msg-modal h2{animation:textIn .5s .3s ease forwards}.ngx-msg-overlay.show .ngx-msg-modal p.desc{animation:textIn .5s .38s ease forwards}@keyframes textIn{to{opacity:1;transform:translateY(0)}}.ngx-msg-modal .ngx-msg-actions{display:flex;gap:10px;justify-content:center;opacity:0;transform:translateY(8px)}.ngx-msg-overlay.show .ngx-msg-modal .ngx-msg-actions{animation:textIn .5s .46s ease forwards}.ngx-msg-overlay .btn{appearance:none;border:none;cursor:pointer;font-family:inherit;font-size:14.5px;font-weight:700;padding:12px 22px;border-radius:13px;transition:transform .18s cubic-bezier(.2,.8,.2,1),filter .2s,box-shadow .2s;flex:1;max-width:170px}.ngx-msg-overlay .btn:active{transform:scale(.95)}.ngx-msg-overlay .btn-primary{color:#0a0c14;background:var(--type-btn, linear-gradient(135deg, var(--violet), var(--cyan)));box-shadow:0 10px 24px -8px var(--type-shadow, rgba(139, 123, 255, .6))}.ngx-msg-overlay .btn-primary:hover{filter:brightness(1.08);transform:translateY(-2px)}.ngx-msg-overlay .btn-ghost{color:var(--ink-1);background:#ffffff0b;border:1px solid var(--ngx-msg-panel-border)}.ngx-msg-overlay .btn-ghost:hover{color:var(--ink-0);background:#ffffff14}.ngx-msg-overlay .progress{position:absolute;bottom:0;left:0;height:3px;background:var(--type-btn, linear-gradient(90deg, var(--violet), var(--cyan)));width:100%;transform-origin:right center}.ngx-msg-overlay [dir=rtl] .progress{transform-origin:left center}@media(prefers-reduced-motion:reduce){.ngx-msg-overlay *{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}.ngx-msg-overlay .btn:focus-visible,.ngx-msg-overlay .trigger:focus-visible,.ngx-msg-overlay .close-x:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}.ngx-msg-overlay[data-type=success] .ngx-msg-modal{--type-ring: conic-gradient(from 0deg, var(--success-a), var(--success-b), var(--success-a));--type-disc: linear-gradient(150deg, var(--success-a), var(--success-b));--type-shadow: rgba(62, 224, 143, .5);--type-btn: linear-gradient(135deg, var(--success-a), var(--success-b));--type-glow: radial-gradient(circle, rgba(62, 224, 143, .35), transparent 70%)}.ngx-msg-overlay[data-type=error] .ngx-msg-modal{--type-ring: conic-gradient(from 0deg, var(--error-a), var(--error-b), var(--error-a));--type-disc: linear-gradient(150deg, var(--error-a), var(--error-b));--type-shadow: rgba(255, 107, 139, .5);--type-btn: linear-gradient(135deg, var(--error-a), var(--error-b));--type-glow: radial-gradient(circle, rgba(255, 107, 139, .35), transparent 70%)}.ngx-msg-overlay[data-type=warning] .ngx-msg-modal{--type-ring: conic-gradient(from 0deg, var(--warning-a), var(--warning-b), var(--warning-a));--type-disc: linear-gradient(150deg, var(--warning-a), var(--warning-b));--type-shadow: rgba(255, 140, 76, .5);--type-btn: linear-gradient(135deg, var(--warning-a), var(--warning-b));--type-glow: radial-gradient(circle, rgba(255, 140, 76, .35), transparent 70%)}.ngx-msg-overlay[data-type=info] .ngx-msg-modal{--type-ring: conic-gradient(from 0deg, var(--info-a), var(--info-b), var(--info-a));--type-disc: linear-gradient(150deg, var(--info-a), var(--info-b));--type-shadow: rgba(91, 108, 255, .5);--type-btn: linear-gradient(135deg, var(--info-a), var(--info-b));--type-glow: radial-gradient(circle, rgba(91, 108, 255, .35), transparent 70%)}.ngx-msg-overlay[data-type=confirm] .ngx-msg-modal{--type-ring: conic-gradient(from 0deg, var(--confirm-a), var(--confirm-b), var(--confirm-a));--type-disc: linear-gradient(150deg, var(--confirm-a), var(--confirm-b));--type-shadow: rgba(123, 92, 255, .5);--type-btn: linear-gradient(135deg, var(--confirm-a), var(--confirm-b));--type-glow: radial-gradient(circle, rgba(123, 92, 255, .35), transparent 70%)}.ngx-msg-overlay[data-type=loading] .ngx-msg-modal{--type-disc: linear-gradient(150deg, #9aa3c0, #565c78);--type-glow: radial-gradient(circle, rgba(154, 163, 192, .3), transparent 70%)}\n"] }]
|
|
187
187
|
}], propDecorators: { confetti: [{ type: i0.ViewChild, args: ['confetti', { isSignal: true }] }], onScapeKey: [{
|
|
188
188
|
type: HostListener,
|
|
189
189
|
args: ['document:keydown.escape', ['$event']]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-kit-message.mjs","sources":["../../../projects/libs/message/models/tokens.ts","../../../projects/libs/message/models/message-result.ts","../../../projects/libs/message/models/icons.ts","../../../projects/libs/message/components/message.component.ts","../../../projects/libs/message/components/message.component.html","../../../projects/libs/message/services/apply-default.ts","../../../projects/libs/message/services/message.service.ts","../../../projects/libs/message/message-facade.ts","../../../projects/libs/message/message-provider.ts","../../../projects/libs/message/models/message-options.ts","../../../projects/libs/message/ngx-kit-message.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { IMessageOptions } from './message-options.interface';\nimport { NgxMessageService } from '../public-api';\nimport { MessageOptions } from './message-options';\n\nexport const NGX_MESSAGE_CONFIGS = new InjectionToken<IMessageOptions>('ngx-message-configs');\n\nexport const NGX_MESSAGE_API = new InjectionToken<NgxMessageService>('NgxMessageService');\nexport const NGX_MESSAGE_DEFAULT_OPTIONS: MessageOptions = {\n useOverlay: true,\n title: '',\n text: '',\n html: '',\n backdrop: true,\n icon: 'None',\n width: undefined,\n allowOutsideClick: true,\n allowEscapeKey: true,\n allowEnterKey: true,\n showConfirmButton: true,\n showDenyButton: false,\n showCancelButton: false,\n confirmButtonText: 'Ok',\n denyButtonText: 'No',\n cancelButtonText: 'Cancel',\n confirmButtonColor: '',\n denyButtonColor: '',\n cancelButtonColor: '',\n confirmButtonAriaLabel: '',\n denyButtonAriaLabel: '',\n cancelButtonAriaLabel: '',\n reverseButtons: false,\n showCloseButton: true,\n containerClass: '',\n};\n","import { EventEmitter } from '@angular/core';\n\nexport type MessageOutput<T = any> = {\n id: number;\n close: () => void;\n afterClose: EventEmitter<MessageResult>;\n};\nexport interface MessageResult<T = any> {\n readonly isConfirmed: boolean;\n readonly isDenied: boolean;\n readonly isDismissed: boolean;\n /**\n * @description ❌⚠️NOT Implemented!⚠️❌\n */\n readonly value?: T;\n readonly dismiss?: DismissReason;\n}\n\n/**\n * An enum of possible reasons that can explain an alert dismissal.\n */\nexport enum DismissReason {\n cancel,\n backdrop,\n close,\n /**\n * @description ❌⚠️NOT Implemented!⚠️❌\n */\n esc,\n /**\n * @description ❌⚠️NOT Implemented!⚠️❌\n */\n timer,\n}\n","// 'None' | 'success' | 'error' | 'warning' | 'info' | 'question' | 'loading';\nexport const ICONS: { [key: string]: string } = {\n None: '',\n success: `<svg viewBox=\"0 0 46 46\"><path class=\"draw\" d=\"M12 24 L20 32 L34 15\"/></svg>`,\n error: `<svg viewBox=\"0 0 46 46\"><path class=\"draw\" d=\"M14 14 L32 32\"/><path class=\"draw\" style=\"animation-delay:.55s\" d=\"M32 14 L14 32\"/></svg>`,\n warning: `<svg viewBox=\"0 0 46 46\"><path class=\"draw\" d=\"M23 10 L23 26\"/><circle class=\"dot-mark\" cx=\"23\" cy=\"34\" r=\"3.4\"/></svg>`,\n info: `<svg viewBox=\"0 0 46 46\"><circle class=\"dot-mark\" cx=\"23\" cy=\"12\" r=\"3.2\" style=\"animation-delay:.28s\"/><path class=\"draw\" style=\"animation-delay:.4s\" d=\"M23 20 L23 36\"/></svg>`,\n question: `<svg viewBox=\"0 0 320 512\"><path fill=\"currentColor\" d=\"M204.3 32.01H96c-52.94 0-96 43.06-96 96c0 17.67 14.31 31.1 32 31.1s32-14.32 32-31.1c0-17.64 14.34-32 32-32h108.3C232.8 96.01 256 119.2 256 147.8c0 19.72-10.97 37.47-30.5 47.33L127.8 252.4C117.1 258.2 112 268.7 112 280v40c0 17.67 14.31 31.99 32 31.99s32-14.32 32-31.99V298.3L256 251.3c39.47-19.75 64-59.42 64-103.5C320 83.95 268.1 32.01 204.3 32.01zM144 400c-22.09 0-40 17.91-40 40s17.91 39.1 40 39.1s40-17.9 40-39.1S166.1 400 144 400z\"/></svg>`,\n loading: `<div class=\"spinner-wrap\"><div class=\"spinner\"></div></div>`,\n};\n","import {\r\n AfterViewInit,\r\n Component,\r\n DOCUMENT,\r\n ElementRef,\r\n HostListener,\r\n inject,\r\n OnInit,\r\n signal,\r\n viewChild,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\nimport { IMessageOptions } from '../models/message-options.interface';\r\nimport { Subject } from 'rxjs';\r\nimport { MessageResult, DismissReason } from '../models/message-result';\r\nimport { CommonModule } from '@angular/common';\r\nimport { NGX_MESSAGE_CONFIGS, NGX_MESSAGE_DEFAULT_OPTIONS } from '../models/tokens';\r\nimport { ICONS } from '../models/icons';\r\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\r\nimport { makeConfetti } from 'ngx-kit/shared';\r\nimport { NgxMessageService } from '../services/message.service';\r\n\r\n@Component({\r\n selector: 'ngx-message',\r\n templateUrl: 'message.component.html',\r\n styleUrls: ['./message.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n imports: [CommonModule],\r\n providers: [\r\n {\r\n provide: NGX_MESSAGE_CONFIGS,\r\n useValue: NGX_MESSAGE_DEFAULT_OPTIONS,\r\n },\r\n ],\r\n})\r\nexport class NgxMessageComponent implements OnInit, AfterViewInit {\r\n icon?: SafeHtml;\r\n showIcon = signal(true);\r\n options!: IMessageOptions;\r\n confetti = viewChild<ElementRef<HTMLDivElement>>('confetti');\r\n index = 0;\r\n\r\n protected sanitizer = inject(DomSanitizer);\r\n protected doc = inject(DOCUMENT);\r\n private readonly messageService = inject(NgxMessageService);\r\n\r\n private readonly _onClose = new Subject<{ index: number; result: MessageResult<any> }>();\r\n public onClose = this._onClose.asObservable();\r\n\r\n ngOnInit(): void {\r\n this.showIcon.update((x) => (x = this.options.icon != 'None'));\r\n this.icon = this.sanitizer.bypassSecurityTrustHtml(ICONS[this.options.icon ?? 'None']);\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n const confetti = this.confetti()?.nativeElement;\r\n if (this.options.icon == 'success' && confetti) {\r\n makeConfetti(this.doc, confetti);\r\n }\r\n }\r\n\r\n /**\r\n * وقتی چند تا پیام همزمان باز باشن، هرکدوم listener خودشو روی document\r\n * داشت — پس یه فشردن Escape/Enter، رویداد رو به *همهشون* همزمان میفرستاد،\r\n * نه فقط آخرین پیامی که باز شده (رفتار طبیعیِ یه استکِ مودال باید این باشه\r\n * که فقط بالاترین لایه به کیبورد واکنش نشون بده). این چک همون چیزیه که\r\n * OverlayService با getLastDialog() برای اورلیها انجام میده.\r\n */\r\n private isTopmost(): boolean {\r\n const ids = [...this.messageService.alerts.keys()];\r\n if (!ids.length) return true;\r\n return this.index === Math.max(...ids);\r\n }\r\n\r\n @HostListener('document:keydown.escape', ['$event'])\r\n onScapeKey(event: Event) {\r\n if (this.options.allowEscapeKey && this.isTopmost()) {\r\n this.onCancel();\r\n }\r\n }\r\n\r\n @HostListener('document:keydown.enter', ['$event'])\r\n onEnterKey(event: Event) {\r\n if (!this.isTopmost()) return;\r\n event.stopPropagation();\r\n event.preventDefault();\r\n if (this.options.allowEnterKey) {\r\n if (this.options.showConfirmButton) {\r\n this.onConfirm();\r\n } else if (this.options.showDenyButton) {\r\n this.onDeny();\r\n } else {\r\n this.onCancel();\r\n }\r\n }\r\n }\r\n\r\n onConfirm() {\r\n this._onClose.next({\r\n index: this.index,\r\n result: {\r\n isConfirmed: true,\r\n isDismissed: false,\r\n isDenied: false,\r\n dismiss: DismissReason.close,\r\n },\r\n });\r\n }\r\n onCancel() {\r\n this._onClose.next({\r\n index: this.index,\r\n result: {\r\n isConfirmed: false,\r\n isDismissed: true,\r\n isDenied: false,\r\n dismiss: DismissReason.cancel,\r\n },\r\n });\r\n }\r\n onDeny() {\r\n this._onClose.next({\r\n index: this.index,\r\n result: {\r\n isConfirmed: false,\r\n isDismissed: false,\r\n isDenied: true,\r\n dismiss: DismissReason.close,\r\n },\r\n });\r\n }\r\n close() {\r\n this.onCancel();\r\n }\r\n\r\n onOutSideClick() {\r\n if (this.options.allowOutsideClick) {\r\n this.onCancel();\r\n }\r\n }\r\n innerOnClick(ev: Event) {\r\n ev.preventDefault();\r\n ev.stopPropagation();\r\n }\r\n}\r\n","<div\n class=\"ngx-msg-overlay show\"\n (click)=\"onOutSideClick()\"\n [ngClass]=\"options.containerClass\"\n [class.has-backdrop]=\"options.backdrop\"\n [attr.data-type]=\"options.icon\">\n <div class=\"ngx-msg-modal\" (click)=\"innerOnClick($event)\">\n <div class=\"confetti\" #confetti></div>\n @if (options.showCloseButton) {\n <button class=\"close-x\" (click)=\"close()\" aria-label=\"Close\">✕</button>\n }\n @if (showIcon()) {\n <div class=\"icon-stage\">\n <div class=\"icon-ring\"></div>\n <div class=\"icon-disc\" [innerHTML]=\"icon\"></div>\n </div>\n }\n <h2>{{ options.title }}</h2>\n <p class=\"desc\">\n {{ options.text }}\n <span [innerHTML]=\"options.html\"></span>\n </p>\n\n <div class=\"ngx-msg-actions\">\n @if (options.showCancelButton) {\n <button\n class=\"btn btn-ghost\"\n (click)=\"onCancel()\"\n [attr.aria-label]=\"options.cancelButtonAriaLabel\">\n {{ options.cancelButtonText }}\n </button>\n }\n @if (options.showDenyButton) {\n <button\n class=\"btn btn-ghost\"\n (click)=\"onDeny()\"\n [attr.aria-label]=\"options.denyButtonAriaLabel\">\n {{ options.denyButtonText }}\n </button>\n }\n @if (options.showConfirmButton) {\n <button\n class=\"btn btn-primary\"\n (click)=\"onConfirm()\"\n [attr.aria-label]=\"options.confirmButtonAriaLabel\">\n {{ options.confirmButtonText }}\n </button>\n }\n </div>\n </div>\n</div>\n","export function applyDefaultConfig(config: any, defaultConfig: any): any {\r\n var config = JSON.parse(JSON.stringify(config));\r\n for (let key in defaultConfig) {\r\n if (config[key] === undefined || config[key] === null || config[key] === '') {\r\n config[key] = defaultConfig[key];\r\n } else if (typeof config[key] === 'object') {\r\n config[key] = applyDefaultConfig(config[key], defaultConfig[key]);\r\n }\r\n }\r\n return config;\r\n}\r\n","import {\r\n ApplicationRef,\r\n ComponentRef,\r\n createComponent,\r\n EmbeddedViewRef,\r\n EnvironmentInjector,\r\n EventEmitter,\r\n Inject,\r\n Injectable,\r\n Injector,\r\n} from '@angular/core';\r\nimport { NGX_MESSAGE_CONFIGS, NGX_MESSAGE_DEFAULT_OPTIONS } from '../models/tokens';\r\nimport { IMessageOptions } from '../models/message-options.interface';\r\nimport { MessageOutput, MessageResult } from '../models/message-result';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport { NgxMessageComponent } from '../components/message.component';\r\nimport { applyDefaultConfig } from './apply-default';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class NgxMessageService {\r\n // قبلاً یه آرایهی معمولی بود (`ComponentRef[]`) و removeDialogComponentFromBody\r\n // فقط componentRef رو destroy میکرد ولی هیچوقت از آرایه حذفش نمیکرد — یعنی\r\n // این سرویس (که providedIn:'root' و singleton سراسریه) به ازای هر پیامی که\r\n // تا حالا تو کل عمر اپ نشون داده شده، یک رفرنس destroy-شده رو برای همیشه نگه\r\n // میداشت: یک نشتی حافظهی پیوسته. با Map<id, ComponentRef> جایگزین شد که\r\n // با delete واقعاً entry رو آزاد میکنه؛ کلید هم شناسهی پایدارِ پیام (insertedId)\r\n // هست، نه موقعیتِ آرایه (که با splice ممکن بود جابهجا و نامعتبر بشه).\r\n alerts = new Map<number, ComponentRef<NgxMessageComponent>>();\r\n insertedId = 0;\r\n constructor(\r\n private appRef: ApplicationRef,\r\n private injector: Injector,\r\n private envInjector: EnvironmentInjector,\r\n @Inject(DOCUMENT) private _doc: Document,\r\n ) {}\r\n\r\n public show<T = any>(c?: IMessageOptions): MessageOutput<T> {\r\n let d = applyDefaultConfig(\r\n this.injector.get(NGX_MESSAGE_CONFIGS, NGX_MESSAGE_DEFAULT_OPTIONS),\r\n NGX_MESSAGE_DEFAULT_OPTIONS,\r\n );\r\n const config = applyDefaultConfig(c, d);\r\n\r\n const componentRef = createComponent(NgxMessageComponent, {\r\n environmentInjector: this.envInjector,\r\n });\r\n\r\n this.appRef.attachView(componentRef.hostView);\r\n const id = this.insertedId++;\r\n const payload: MessageOutput<T> = {\r\n close: () => componentRef.instance.close(),\r\n id,\r\n afterClose: new EventEmitter(),\r\n };\r\n this.appendDialogComponentToBody(componentRef, config);\r\n componentRef.instance.options = config;\r\n componentRef.instance.index = id;\r\n componentRef.instance.onClose.subscribe((result) => {\r\n this.removeDialogComponentFromBody(result.index);\r\n payload.afterClose.emit(result.result);\r\n });\r\n this.alerts.set(id, componentRef);\r\n\r\n return payload;\r\n }\r\n\r\n private removeDialogComponentFromBody(id: number): void {\r\n const ref = this.alerts.get(id);\r\n if (!ref) return;\r\n\r\n const domElem = (ref.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\r\n\r\n // قبل از destroy باید hidePopover صدا بزنیم\r\n if (domElem.popover === 'manual') {\r\n try {\r\n domElem.hidePopover();\r\n } catch {}\r\n }\r\n\r\n this.appRef.detachView(ref.hostView);\r\n ref.destroy();\r\n this.alerts.delete(id);\r\n }\r\n\r\n private appendDialogComponentToBody(\r\n componentRef: ComponentRef<NgxMessageComponent>,\r\n config: IMessageOptions,\r\n ) {\r\n const domElem = (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\r\n if (config.containerClass) {\r\n for (let c of config.containerClass.split(' ')) {\r\n if (c.trim()) domElem.classList.add(c);\r\n }\r\n }\r\n this._doc.body.appendChild(domElem);\r\n if (config.useOverlay) {\r\n domElem.popover = 'manual';\r\n domElem.showPopover();\r\n }\r\n }\r\n\r\n closeAll() {\r\n for (const id of [...this.alerts.keys()]) {\r\n this.removeDialogComponentFromBody(id);\r\n }\r\n }\r\n}\r\n","import { Injector } from '@angular/core';\r\nimport { NGX_MESSAGE_API } from './models/tokens';\r\nimport { IMessageOptions } from './models/message-options.interface';\r\n\r\n/**\r\n * Static facade so call sites can use: MSG.warn('msg', opts)\r\n * Module will set the service instance in its constructor.\r\n */\r\nexport class MSG {\r\n static injector: Injector;\r\n\r\n static show<T = any>(options?: IMessageOptions) {\r\n if (!MSG.injector) {\r\n throw new Error(\r\n 'ngx-kit: Error on EnvironmentProvider. Ensure \"provideMessage()\" in root provider.',\r\n );\r\n }\r\n\r\n return MSG.injector.get(NGX_MESSAGE_API).show<T>(options);\r\n }\r\n\r\n static fire(options?: IMessageOptions) {\r\n return this.show(options);\r\n }\r\n\r\n static info(title: string, text?: string, options?: IMessageOptions) {\r\n return this.show({\r\n icon: 'info',\r\n title,\r\n text,\r\n ...options,\r\n });\r\n }\r\n\r\n static success(title: string, text?: string, options?: IMessageOptions) {\r\n return this.show({\r\n icon: 'success',\r\n title,\r\n text,\r\n ...options,\r\n });\r\n }\r\n static warning(title: string, text?: string, options?: IMessageOptions) {\r\n return this.show({\r\n icon: 'warning',\r\n title,\r\n text,\r\n ...options,\r\n });\r\n }\r\n static error(title: string, text?: string, options?: IMessageOptions) {\r\n return this.show({\r\n icon: 'error',\r\n title,\r\n text,\r\n ...options,\r\n });\r\n }\r\n static question(title: string, text?: string, options?: IMessageOptions) {\r\n return this.show({\r\n icon: 'question',\r\n title,\r\n text,\r\n ...options,\r\n showConfirmButton: true,\r\n showCancelButton: true,\r\n });\r\n }\r\n static loading(title: string, text?: string, options?: IMessageOptions) {\r\n return this.show({\r\n icon: 'loading',\r\n title,\r\n text,\r\n ...options,\r\n showConfirmButton: false,\r\n showCancelButton: false,\r\n showDenyButton: false,\r\n });\r\n }\r\n}\r\n\r\nexport class Modal extends MSG {}\r\n","import {\r\n EnvironmentProviders,\r\n inject,\r\n Injector,\r\n makeEnvironmentProviders,\r\n provideEnvironmentInitializer,\r\n} from '@angular/core';\r\nimport { IMessageOptions } from './models/message-options.interface';\r\nimport { NGX_MESSAGE_API, NGX_MESSAGE_CONFIGS, NGX_MESSAGE_DEFAULT_OPTIONS } from './models/tokens';\r\nimport { NgxMessageService } from './services/message.service';\r\nimport { MSG as MessageFacade } from './message-facade';\r\nimport { Modal as ModalFacade } from './message-facade';\r\n\r\nexport function provideMessage(options?: IMessageOptions): EnvironmentProviders {\r\n return makeEnvironmentProviders([\r\n {\r\n provide: NGX_MESSAGE_CONFIGS,\r\n useValue: { ...NGX_MESSAGE_DEFAULT_OPTIONS, ...(options || {}) },\r\n },\r\n {\r\n provide: NGX_MESSAGE_API,\r\n useExisting: NgxMessageService,\r\n },\r\n provideEnvironmentInitializer(() => {\r\n MessageFacade.injector = inject(Injector);\r\n ModalFacade.injector = inject(Injector);\r\n }),\r\n ]);\r\n}\r\n","import { MessageIcon } from './MessageIcon';\r\nimport { IMessageOptions } from './message-options.interface';\r\n\r\nexport class MessageOptions implements IMessageOptions {\r\n public constructor(private config?: IMessageOptions) {\r\n //config = { ...(new MessageOptions()), ...config };\r\n }\r\n /**\r\n * add popover manual to set alert dialog container to top layer\r\n * - usefull when using alert modal in angular material dialog\r\n *\r\n */\r\n useOverlay?: boolean;\r\n title?: string = '';\r\n text?: string = '';\r\n html?: string | HTMLElement = '';\r\n backdrop?: boolean = true;\r\n icon?: MessageIcon;\r\n width?: number | string;\r\n allowOutsideClick?: boolean = true;\r\n allowEscapeKey?: boolean = true;\r\n allowEnterKey?: boolean = true;\r\n showConfirmButton?: boolean = true;\r\n showDenyButton?: boolean = false;\r\n showCancelButton?: boolean = false;\r\n confirmButtonText: string = 'Ok';\r\n denyButtonText?: string = 'No';\r\n cancelButtonText?: string = 'Cancel';\r\n confirmButtonColor?: string;\r\n denyButtonColor?: string;\r\n cancelButtonColor?: string;\r\n confirmButtonAriaLabel?: string = '';\r\n denyButtonAriaLabel?: string = '';\r\n cancelButtonAriaLabel?: string = '';\r\n reverseButtons?: boolean = false;\r\n showCloseButton?: boolean = false;\r\n containerClass?: string = '';\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["DOCUMENT","MessageFacade","ModalFacade"],"mappings":";;;;;;;;MAKa,mBAAmB,GAAG,IAAI,cAAc,CAAkB,qBAAqB;MAE/E,eAAe,GAAG,IAAI,cAAc,CAAoB,mBAAmB;AACjF,MAAM,2BAA2B,GAAmB;AACzD,IAAA,UAAU,EAAE,IAAI;AAChB,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,IAAI,EAAE,EAAE;AACR,IAAA,IAAI,EAAE,EAAE;AACR,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,iBAAiB,EAAE,IAAI;AACvB,IAAA,cAAc,EAAE,IAAI;AACpB,IAAA,aAAa,EAAE,IAAI;AACnB,IAAA,iBAAiB,EAAE,IAAI;AACvB,IAAA,cAAc,EAAE,KAAK;AACrB,IAAA,gBAAgB,EAAE,KAAK;AACvB,IAAA,iBAAiB,EAAE,IAAI;AACvB,IAAA,cAAc,EAAE,IAAI;AACpB,IAAA,gBAAgB,EAAE,QAAQ;AAC1B,IAAA,kBAAkB,EAAE,EAAE;AACtB,IAAA,eAAe,EAAE,EAAE;AACnB,IAAA,iBAAiB,EAAE,EAAE;AACrB,IAAA,sBAAsB,EAAE,EAAE;AAC1B,IAAA,mBAAmB,EAAE,EAAE;AACvB,IAAA,qBAAqB,EAAE,EAAE;AACzB,IAAA,cAAc,EAAE,KAAK;AACrB,IAAA,eAAe,EAAE,IAAI;AACrB,IAAA,cAAc,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,cAAc,GAAY,EAAE;AAC7B;;ACrCD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-kit-message.mjs","sources":["../../../projects/libs/message/models/tokens.ts","../../../projects/libs/message/models/message-result.ts","../../../projects/libs/message/models/icons.ts","../../../projects/libs/message/components/message.component.ts","../../../projects/libs/message/components/message.component.html","../../../projects/libs/message/services/apply-default.ts","../../../projects/libs/message/services/message.service.ts","../../../projects/libs/message/message-facade.ts","../../../projects/libs/message/message-provider.ts","../../../projects/libs/message/models/message-options.ts","../../../projects/libs/message/ngx-kit-message.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { IMessageOptions } from './message-options.interface';\nimport { NgxMessageService } from '../public-api';\nimport { MessageOptions } from './message-options';\n\nexport const NGX_MESSAGE_CONFIGS = new InjectionToken<IMessageOptions>('ngx-message-configs');\n\nexport const NGX_MESSAGE_API = new InjectionToken<NgxMessageService>('NgxMessageService');\nexport const NGX_MESSAGE_DEFAULT_OPTIONS: MessageOptions = {\n useOverlay: true,\n title: '',\n text: '',\n html: '',\n backdrop: true,\n icon: 'None',\n width: undefined,\n allowOutsideClick: true,\n allowEscapeKey: true,\n allowEnterKey: true,\n showConfirmButton: true,\n showDenyButton: false,\n showCancelButton: false,\n confirmButtonText: 'Ok',\n denyButtonText: 'No',\n cancelButtonText: 'Cancel',\n confirmButtonColor: '',\n denyButtonColor: '',\n cancelButtonColor: '',\n confirmButtonAriaLabel: '',\n denyButtonAriaLabel: '',\n cancelButtonAriaLabel: '',\n reverseButtons: false,\n showCloseButton: true,\n containerClass: '',\n};\n","import { EventEmitter } from '@angular/core';\n\nexport type MessageOutput<T = any> = {\n id: number;\n close: () => void;\n afterClose: EventEmitter<MessageResult>;\n};\nexport interface MessageResult<T = any> {\n readonly isConfirmed: boolean;\n readonly isDenied: boolean;\n readonly isDismissed: boolean;\n /**\n * @description ❌⚠️NOT Implemented!⚠️❌\n */\n readonly value?: T;\n readonly dismiss?: DismissReason;\n}\n\n/**\n * An enum of possible reasons that can explain an alert dismissal.\n */\nexport enum DismissReason {\n cancel,\n backdrop,\n close,\n /**\n * @description ❌⚠️NOT Implemented!⚠️❌\n */\n esc,\n /**\n * @description ❌⚠️NOT Implemented!⚠️❌\n */\n timer,\n}\n","// 'None' | 'success' | 'error' | 'warning' | 'info' | 'question' | 'loading';\nexport const ICONS: { [key: string]: string } = {\n None: '',\n success: `<svg viewBox=\"0 0 46 46\"><path class=\"draw\" d=\"M12 24 L20 32 L34 15\"/></svg>`,\n error: `<svg viewBox=\"0 0 46 46\"><path class=\"draw\" d=\"M14 14 L32 32\"/><path class=\"draw\" style=\"animation-delay:.55s\" d=\"M32 14 L14 32\"/></svg>`,\n warning: `<svg viewBox=\"0 0 46 46\"><path class=\"draw\" d=\"M23 10 L23 26\"/><circle class=\"dot-mark\" cx=\"23\" cy=\"34\" r=\"3.4\"/></svg>`,\n info: `<svg viewBox=\"0 0 46 46\"><circle class=\"dot-mark\" cx=\"23\" cy=\"12\" r=\"3.2\" style=\"animation-delay:.28s\"/><path class=\"draw\" style=\"animation-delay:.4s\" d=\"M23 20 L23 36\"/></svg>`,\n question: `<svg viewBox=\"0 0 320 512\"><path fill=\"currentColor\" d=\"M204.3 32.01H96c-52.94 0-96 43.06-96 96c0 17.67 14.31 31.1 32 31.1s32-14.32 32-31.1c0-17.64 14.34-32 32-32h108.3C232.8 96.01 256 119.2 256 147.8c0 19.72-10.97 37.47-30.5 47.33L127.8 252.4C117.1 258.2 112 268.7 112 280v40c0 17.67 14.31 31.99 32 31.99s32-14.32 32-31.99V298.3L256 251.3c39.47-19.75 64-59.42 64-103.5C320 83.95 268.1 32.01 204.3 32.01zM144 400c-22.09 0-40 17.91-40 40s17.91 39.1 40 39.1s40-17.9 40-39.1S166.1 400 144 400z\"/></svg>`,\n loading: `<div class=\"spinner-wrap\"><div class=\"spinner\"></div></div>`,\n};\n","import {\n AfterViewInit,\n Component,\n DOCUMENT,\n ElementRef,\n HostListener,\n inject,\n OnInit,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { IMessageOptions } from '../models/message-options.interface';\nimport { Subject } from 'rxjs';\nimport { MessageResult, DismissReason } from '../models/message-result';\nimport { CommonModule } from '@angular/common';\nimport { NGX_MESSAGE_CONFIGS, NGX_MESSAGE_DEFAULT_OPTIONS } from '../models/tokens';\nimport { ICONS } from '../models/icons';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { makeConfetti } from 'ngx-kit/shared';\nimport { NgxMessageService } from '../services/message.service';\n\n@Component({\n selector: 'ngx-message',\n templateUrl: 'message.component.html',\n styleUrls: ['./message.component.scss'],\n encapsulation: ViewEncapsulation.None,\n imports: [CommonModule],\n providers: [\n {\n provide: NGX_MESSAGE_CONFIGS,\n useValue: NGX_MESSAGE_DEFAULT_OPTIONS,\n },\n ],\n})\nexport class NgxMessageComponent implements OnInit, AfterViewInit {\n icon?: SafeHtml;\n showIcon = signal(true);\n options!: IMessageOptions;\n confetti = viewChild<ElementRef<HTMLDivElement>>('confetti');\n index = 0;\n\n protected sanitizer = inject(DomSanitizer);\n protected doc = inject(DOCUMENT);\n private readonly messageService = inject(NgxMessageService);\n\n private readonly _onClose = new Subject<{ index: number; result: MessageResult<any> }>();\n public onClose = this._onClose.asObservable();\n\n ngOnInit(): void {\n this.showIcon.update((x) => (x = this.options.icon != 'None'));\n this.icon = this.sanitizer.bypassSecurityTrustHtml(ICONS[this.options.icon ?? 'None']);\n }\n\n ngAfterViewInit(): void {\n const confetti = this.confetti()?.nativeElement;\n if (this.options.icon == 'success' && confetti) {\n makeConfetti(this.doc, confetti);\n }\n }\n\n /**\n * وقتی چند تا پیام همزمان باز باشن، هرکدوم listener خودشو روی document\n * داشت — پس یه فشردن Escape/Enter، رویداد رو به *همهشون* همزمان میفرستاد،\n * نه فقط آخرین پیامی که باز شده (رفتار طبیعیِ یه استکِ مودال باید این باشه\n * که فقط بالاترین لایه به کیبورد واکنش نشون بده). این چک همون چیزیه که\n * OverlayService با getLastDialog() برای اورلیها انجام میده.\n */\n private isTopmost(): boolean {\n const ids = [...this.messageService.alerts.keys()];\n if (!ids.length) return true;\n return this.index === Math.max(...ids);\n }\n\n @HostListener('document:keydown.escape', ['$event'])\n onScapeKey(event: Event) {\n if (this.options.allowEscapeKey && this.isTopmost()) {\n this.onCancel();\n }\n }\n\n @HostListener('document:keydown.enter', ['$event'])\n onEnterKey(event: Event) {\n if (!this.isTopmost()) return;\n event.stopPropagation();\n event.preventDefault();\n if (this.options.allowEnterKey) {\n if (this.options.showConfirmButton) {\n this.onConfirm();\n } else if (this.options.showDenyButton) {\n this.onDeny();\n } else {\n this.onCancel();\n }\n }\n }\n\n onConfirm() {\n this._onClose.next({\n index: this.index,\n result: {\n isConfirmed: true,\n isDismissed: false,\n isDenied: false,\n dismiss: DismissReason.close,\n },\n });\n }\n onCancel() {\n this._onClose.next({\n index: this.index,\n result: {\n isConfirmed: false,\n isDismissed: true,\n isDenied: false,\n dismiss: DismissReason.cancel,\n },\n });\n }\n onDeny() {\n this._onClose.next({\n index: this.index,\n result: {\n isConfirmed: false,\n isDismissed: false,\n isDenied: true,\n dismiss: DismissReason.close,\n },\n });\n }\n close() {\n this.onCancel();\n }\n\n onOutSideClick() {\n if (this.options.allowOutsideClick) {\n this.onCancel();\n }\n }\n innerOnClick(ev: Event) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n}\n","<div\n class=\"ngx-msg-overlay show\"\n (click)=\"onOutSideClick()\"\n [ngClass]=\"options.containerClass\"\n [class.has-backdrop]=\"options.backdrop\"\n [attr.data-type]=\"options.icon\">\n <div class=\"ngx-msg-modal\" (click)=\"innerOnClick($event)\">\n <div class=\"confetti\" #confetti></div>\n @if (options.showCloseButton) {\n <button class=\"close-x\" (click)=\"close()\" aria-label=\"Close\">✕</button>\n }\n @if (showIcon()) {\n <div class=\"icon-stage\">\n <div class=\"icon-ring\"></div>\n <div class=\"icon-disc\" [innerHTML]=\"icon\"></div>\n </div>\n }\n <h2>{{ options.title }}</h2>\n <p class=\"desc\">\n {{ options.text }}\n <span [innerHTML]=\"options.html\"></span>\n </p>\n\n <div class=\"ngx-msg-actions\">\n @if (options.showCancelButton) {\n <button\n class=\"btn btn-ghost\"\n (click)=\"onCancel()\"\n [attr.aria-label]=\"options.cancelButtonAriaLabel\">\n {{ options.cancelButtonText }}\n </button>\n }\n @if (options.showDenyButton) {\n <button\n class=\"btn btn-ghost\"\n (click)=\"onDeny()\"\n [attr.aria-label]=\"options.denyButtonAriaLabel\">\n {{ options.denyButtonText }}\n </button>\n }\n @if (options.showConfirmButton) {\n <button\n class=\"btn btn-primary\"\n (click)=\"onConfirm()\"\n [attr.aria-label]=\"options.confirmButtonAriaLabel\">\n {{ options.confirmButtonText }}\n </button>\n }\n </div>\n </div>\n</div>\n","export function applyDefaultConfig(config: any, defaultConfig: any): any {\n var config = JSON.parse(JSON.stringify(config));\n for (let key in defaultConfig) {\n if (config[key] === undefined || config[key] === null || config[key] === '') {\n config[key] = defaultConfig[key];\n } else if (typeof config[key] === 'object') {\n config[key] = applyDefaultConfig(config[key], defaultConfig[key]);\n }\n }\n return config;\n}\n","import {\n ApplicationRef,\n ComponentRef,\n createComponent,\n EmbeddedViewRef,\n EnvironmentInjector,\n EventEmitter,\n Inject,\n Injectable,\n Injector,\n} from '@angular/core';\nimport { NGX_MESSAGE_CONFIGS, NGX_MESSAGE_DEFAULT_OPTIONS } from '../models/tokens';\nimport { IMessageOptions } from '../models/message-options.interface';\nimport { MessageOutput, MessageResult } from '../models/message-result';\nimport { DOCUMENT } from '@angular/common';\nimport { NgxMessageComponent } from '../components/message.component';\nimport { applyDefaultConfig } from './apply-default';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NgxMessageService {\n // قبلاً یه آرایهی معمولی بود (`ComponentRef[]`) و removeDialogComponentFromBody\n // فقط componentRef رو destroy میکرد ولی هیچوقت از آرایه حذفش نمیکرد — یعنی\n // این سرویس (که providedIn:'root' و singleton سراسریه) به ازای هر پیامی که\n // تا حالا تو کل عمر اپ نشون داده شده، یک رفرنس destroy-شده رو برای همیشه نگه\n // میداشت: یک نشتی حافظهی پیوسته. با Map<id, ComponentRef> جایگزین شد که\n // با delete واقعاً entry رو آزاد میکنه؛ کلید هم شناسهی پایدارِ پیام (insertedId)\n // هست، نه موقعیتِ آرایه (که با splice ممکن بود جابهجا و نامعتبر بشه).\n alerts = new Map<number, ComponentRef<NgxMessageComponent>>();\n insertedId = 0;\n constructor(\n private appRef: ApplicationRef,\n private injector: Injector,\n private envInjector: EnvironmentInjector,\n @Inject(DOCUMENT) private _doc: Document,\n ) {}\n\n public show<T = any>(c?: IMessageOptions): MessageOutput<T> {\n let d = applyDefaultConfig(\n this.injector.get(NGX_MESSAGE_CONFIGS, NGX_MESSAGE_DEFAULT_OPTIONS),\n NGX_MESSAGE_DEFAULT_OPTIONS,\n );\n const config = applyDefaultConfig(c, d);\n\n const componentRef = createComponent(NgxMessageComponent, {\n environmentInjector: this.envInjector,\n });\n\n this.appRef.attachView(componentRef.hostView);\n const id = this.insertedId++;\n const payload: MessageOutput<T> = {\n close: () => componentRef.instance.close(),\n id,\n afterClose: new EventEmitter(),\n };\n this.appendDialogComponentToBody(componentRef, config);\n componentRef.instance.options = config;\n componentRef.instance.index = id;\n componentRef.instance.onClose.subscribe((result) => {\n this.removeDialogComponentFromBody(result.index);\n payload.afterClose.emit(result.result);\n });\n this.alerts.set(id, componentRef);\n\n return payload;\n }\n\n private removeDialogComponentFromBody(id: number): void {\n const ref = this.alerts.get(id);\n if (!ref) return;\n\n const domElem = (ref.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n\n // قبل از destroy باید hidePopover صدا بزنیم\n if (domElem.popover === 'manual') {\n try {\n domElem.hidePopover();\n } catch {}\n }\n\n this.appRef.detachView(ref.hostView);\n ref.destroy();\n this.alerts.delete(id);\n }\n\n private appendDialogComponentToBody(\n componentRef: ComponentRef<NgxMessageComponent>,\n config: IMessageOptions,\n ) {\n const domElem = (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n if (config.containerClass) {\n for (let c of config.containerClass.split(' ')) {\n if (c.trim()) domElem.classList.add(c);\n }\n }\n this._doc.body.appendChild(domElem);\n if (config.useOverlay) {\n domElem.popover = 'manual';\n domElem.showPopover();\n }\n }\n\n closeAll() {\n for (const id of [...this.alerts.keys()]) {\n this.removeDialogComponentFromBody(id);\n }\n }\n}\n","import { Injector } from '@angular/core';\nimport { NGX_MESSAGE_API } from './models/tokens';\nimport { IMessageOptions } from './models/message-options.interface';\n\n/**\n * Static facade so call sites can use: MSG.warn('msg', opts)\n * Module will set the service instance in its constructor.\n */\nexport class MSG {\n static injector: Injector;\n\n static show<T = any>(options?: IMessageOptions) {\n if (!MSG.injector) {\n throw new Error(\n 'ngx-kit: Error on EnvironmentProvider. Ensure \"provideMessage()\" in root provider.',\n );\n }\n\n return MSG.injector.get(NGX_MESSAGE_API).show<T>(options);\n }\n\n static fire(options?: IMessageOptions) {\n return this.show(options);\n }\n\n static info(title: string, text?: string, options?: IMessageOptions) {\n return this.show({\n icon: 'info',\n title,\n text,\n ...options,\n });\n }\n\n static success(title: string, text?: string, options?: IMessageOptions) {\n return this.show({\n icon: 'success',\n title,\n text,\n ...options,\n });\n }\n static warning(title: string, text?: string, options?: IMessageOptions) {\n return this.show({\n icon: 'warning',\n title,\n text,\n ...options,\n });\n }\n static error(title: string, text?: string, options?: IMessageOptions) {\n return this.show({\n icon: 'error',\n title,\n text,\n ...options,\n });\n }\n static question(title: string, text?: string, options?: IMessageOptions) {\n return this.show({\n icon: 'question',\n title,\n text,\n ...options,\n showConfirmButton: true,\n showCancelButton: true,\n });\n }\n static loading(title: string, text?: string, options?: IMessageOptions) {\n return this.show({\n icon: 'loading',\n title,\n text,\n ...options,\n showConfirmButton: false,\n showCancelButton: false,\n showDenyButton: false,\n });\n }\n}\n\nexport class Modal extends MSG {}\n","import {\n EnvironmentProviders,\n inject,\n Injector,\n makeEnvironmentProviders,\n provideEnvironmentInitializer,\n} from '@angular/core';\nimport { IMessageOptions } from './models/message-options.interface';\nimport { NGX_MESSAGE_API, NGX_MESSAGE_CONFIGS, NGX_MESSAGE_DEFAULT_OPTIONS } from './models/tokens';\nimport { NgxMessageService } from './services/message.service';\nimport { MSG as MessageFacade } from './message-facade';\nimport { Modal as ModalFacade } from './message-facade';\n\nexport function provideMessage(options?: IMessageOptions): EnvironmentProviders {\n return makeEnvironmentProviders([\n {\n provide: NGX_MESSAGE_CONFIGS,\n useValue: { ...NGX_MESSAGE_DEFAULT_OPTIONS, ...(options || {}) },\n },\n {\n provide: NGX_MESSAGE_API,\n useExisting: NgxMessageService,\n },\n provideEnvironmentInitializer(() => {\n MessageFacade.injector = inject(Injector);\n ModalFacade.injector = inject(Injector);\n }),\n ]);\n}\n","import { MessageIcon } from './MessageIcon';\nimport { IMessageOptions } from './message-options.interface';\n\nexport class MessageOptions implements IMessageOptions {\n public constructor(private config?: IMessageOptions) {\n //config = { ...(new MessageOptions()), ...config };\n }\n /**\n * add popover manual to set alert dialog container to top layer\n * - usefull when using alert modal in angular material dialog\n *\n */\n useOverlay?: boolean;\n title?: string = '';\n text?: string = '';\n html?: string | HTMLElement = '';\n backdrop?: boolean = true;\n icon?: MessageIcon;\n width?: number | string;\n allowOutsideClick?: boolean = true;\n allowEscapeKey?: boolean = true;\n allowEnterKey?: boolean = true;\n showConfirmButton?: boolean = true;\n showDenyButton?: boolean = false;\n showCancelButton?: boolean = false;\n confirmButtonText: string = 'Ok';\n denyButtonText?: string = 'No';\n cancelButtonText?: string = 'Cancel';\n confirmButtonColor?: string;\n denyButtonColor?: string;\n cancelButtonColor?: string;\n confirmButtonAriaLabel?: string = '';\n denyButtonAriaLabel?: string = '';\n cancelButtonAriaLabel?: string = '';\n reverseButtons?: boolean = false;\n showCloseButton?: boolean = false;\n containerClass?: string = '';\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["DOCUMENT","MessageFacade","ModalFacade"],"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A6B,CAAC,MAAK;AACjC,YAAAC,GAAa,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AACzC,YAAAC,KAAW,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AACzC,QAAA,CAAC,CAAC;AACH,KAAA,CAAC;AACJ;;MCzBa,cAAc,CAAA;AACE,IAAA,MAAA;AAA3B,IAAA,WAAA,CAA2B,MAAwB,EAAA;QAAxB,IAAA,CAAA,MAAM,GAAN,MAAM;;IAEjC;AACA;;;;AAIG;AACH,IAAA,UAAU;IACV,KAAK,GAAY,EAAE;IACnB,IAAI,GAAY,EAAE;IAClB,IAAI,GAA0B,EAAE;IAChC,QAAQ,GAAa,IAAI;AACzB,IAAA,IAAI;AACJ,IAAA,KAAK;IACL,iBAAiB,GAAa,IAAI;IAClC,cAAc,GAAa,IAAI;IAC/B,aAAa,GAAa,IAAI;IAC9B,iBAAiB,GAAa,IAAI;IAClC,cAAc,GAAa,KAAK;IAChC,gBAAgB,GAAa,KAAK;IAClC,iBAAiB,GAAW,IAAI;IAChC,cAAc,GAAY,IAAI;IAC9B,gBAAgB,GAAY,QAAQ;AACpC,IAAA,kBAAkB;AAClB,IAAA,eAAe;AACf,IAAA,iBAAiB;IACjB,sBAAsB,GAAY,EAAE;IACpC,mBAAmB,GAAY,EAAE;IACjC,qBAAqB,GAAY,EAAE;IACnC,cAAc,GAAa,KAAK;IAChC,eAAe,GAAa,KAAK;IACjC,cAAc,GAAY,EAAE;AAC7B;;ACrCD;;AAEG;;;;"}
|
|
@@ -167,11 +167,11 @@ class NgxNotificationComponent {
|
|
|
167
167
|
return div.textContent;
|
|
168
168
|
}
|
|
169
169
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxNotificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
170
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.4", type: NgxNotificationComponent, isStandalone: true, selector: "ngx-notification", inputs: { payload: { classPropertyName: "payload", publicName: "payload", isSignal: true, isRequired: true, transformFunction: null }, containerClass: { classPropertyName: "containerClass", publicName: "containerClass", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { onClose: "onClose", onFinish: "onFinish" }, viewQueries: [{ propertyName: "bar", first: true, predicate: ["bar"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"{{ containerClass }} {{ containerClass }}-{{ payload().type }} {{ showClass() }}\"\n role=\"status\"\n (mouseenter)=\"onMouseEnter()\"\n (mouseleave)=\"onMouseLeave()\"\n (click)=\"onTap()\"\n [attr.aria-live]=\"\n payload().type === 'error' || payload().type === 'warning' ? 'assertive' : 'polite'\n \"\n [attr.data-id]=\"payload().id\">\n <div class=\"ngx-notify-icon-container\">\n <div class=\"ngx-notify-icon\">\n @switch (payload().type) {\n @case ('success') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n fill=\"currentColor\"\n d=\"M235.3 331.3C229.1 337.6 218.9 337.6 212.7 331.3L148.7 267.3C142.4 261.1 142.4 250.9 148.7 244.7C154.9 238.4 165.1 238.4 171.3 244.7L224 297.4L340.7 180.7C346.9 174.4 357.1 174.4 363.3 180.7C369.6 186.9 369.6 197.1 363.3 203.3L235.3 331.3zM512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 32C132.3 32 32 132.3 32 256C32 379.7 132.3 480 256 480C379.7 480 480 379.7 480 256C480 132.3 379.7 32 256 32z\" />\n </svg>\n }\n @case ('error') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n fill=\"currentColor\"\n d=\"M180.7 180.7C186.9 174.4 197.1 174.4 203.3 180.7L256 233.4L308.7 180.7C314.9 174.4 325.1 174.4 331.3 180.7C337.6 186.9 337.6 197.1 331.3 203.3L278.6 255.1L331.3 308.7C337.6 314.9 337.6 325.1 331.3 331.3C325.1 337.6 314.9 337.6 308.7 331.3L256 278.6L203.3 331.3C197.1 337.6 186.9 337.6 180.7 331.3C174.4 325.1 174.4 314.9 180.7 308.7L233.4 255.1L180.7 203.3C174.4 197.1 174.4 186.9 180.7 180.7V180.7zM.0669 191.5C.0669 172.4 7.652 154.1 21.16 140.6L140.6 21.15C154.1 7.648 172.4 .0625 191.5 .0625H320.5C339.6 .0625 357.9 7.648 371.4 21.15L490.8 140.6C504.3 154.1 511.9 172.4 511.9 191.5V320.5C511.9 339.6 504.3 357.9 490.8 371.4L371.4 490.8C357.9 504.3 339.6 511.9 320.5 511.9H191.5C172.4 511.9 154.1 504.3 140.6 490.8L21.15 371.4C7.652 357.9 .0666 339.6 .0666 320.5L.0669 191.5zM43.78 163.2C36.28 170.7 32.07 180.9 32.07 191.5V320.5C32.07 331.1 36.28 341.3 43.78 348.8L163.2 468.2C170.7 475.7 180.9 479.9 191.5 479.9H320.5C331.1 479.9 341.3 475.7 348.8 468.2L468.2 348.8C475.7 341.3 479.9 331.1 479.9 320.5V191.5C479.9 180.9 475.7 170.7 468.2 163.2L348.8 43.78C341.3 36.28 331.1 32.06 320.5 32.06H191.5C180.9 32.06 170.7 36.28 163.2 43.78L43.78 163.2zM43.78 348.8L21.15 371.4z\" />\n </svg>\n }\n @case ('warning') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n fill=\"currentColor\"\n d=\"M256 360c-13.25 0-23.1 10.74-23.1 24c0 13.25 10.75 24 23.1 24c13.25 0 23.1-10.75 23.1-24C280 370.7 269.3 360 256 360zM256 320c8.843 0 15.1-7.156 15.1-16V160c0-8.844-7.155-16-15.1-16S240 151.2 240 160v144C240 312.8 247.2 320 256 320zM504.3 397.3L304.5 59.38C294.4 42.27 276.2 32.03 256 32C235.8 32 217.7 42.22 207.5 59.36l-199.9 338c-10.05 16.97-10.2 37.34-.4218 54.5C17.29 469.5 35.55 480 56.1 480h399.9c20.51 0 38.75-10.53 48.81-28.17C514.6 434.7 514.4 414.3 504.3 397.3zM476.1 435.1C472.7 443.5 464.8 448 455.1 448H56.1c-8.906 0-16.78-4.484-21.08-12c-4.078-7.156-4.015-15.3 .1562-22.36L235.1 75.66C239.4 68.36 247.2 64 256 64c0 0-.0156 0 0 0c8.765 .0156 16.56 4.359 20.86 11.64l199.9 338C480.1 420.7 481.1 428.8 476.1 435.1z\" />\n </svg>\n }\n @case ('info') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n fill=\"currentColor\"\n d=\"M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 480c-123.5 0-224-100.5-224-224s100.5-224 224-224s224 100.5 224 224S379.5 480 256 480zM256 184c13.25 0 24-10.74 24-24c0-13.25-10.75-24-24-24S232 146.7 232 160C232 173.3 242.7 184 256 184zM304 352h-32V240C272 231.2 264.8 224 256 224H224C215.2 224 208 231.2 208 240S215.2 256 224 256h16v96h-32C199.2 352 192 359.2 192 368C192 376.8 199.2 384 208 384h96c8.836 0 16-7.164 16-16C320 359.2 312.8 352 304 352z\" />\n </svg>\n }\n }\n </div>\n </div>\n\n <div class=\"ngx-notify-content\">\n <div class=\"ngx-notify-title\" [innerHTML]=\"safeMessage\"></div>\n <div class=\"ngx-notify-description\" [innerHTML]=\"safeDescription\"></div>\n </div>\n\n @if (payload().options.dismissible) {\n <div class=\"ngx-notify-close-container\">\n <button class=\"ngx-notify-close\" (click)=\"close($event)\" aria-label=\"close\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\n <path\n fill=\"currentColor\"\n d=\"M315.3 411.3c-6.253 6.253-16.37 6.253-22.63 0L160 278.6l-132.7 132.7c-6.253 6.253-16.37 6.253-22.63 0c-6.253-6.253-6.253-16.37 0-22.63L137.4 256L4.69 123.3c-6.253-6.253-6.253-16.37 0-22.63c6.253-6.253 16.37-6.253 22.63 0L160 233.4l132.7-132.7c6.253-6.253 16.37-6.253 22.63 0c6.253 6.253 6.253 16.37 0 22.63L182.6 256l132.7 132.7C321.6 394.9 321.6 405.1 315.3 411.3z\" />\n </svg>\n </button>\n </div>\n }\n\n <div class=\"ngx-notify-progress\">\n <div class=\"progress-bar\" #bar></div>\n </div>\n</div>\n", styles: [":host{display:block;margin:8px 0;--ngx-notify-content-bg: light-dark(#ffffff, #262b35);--ngx-notify-content-fg: light-dark(#000, #fff)}.ngx-notify{display:flex;min-width:240px;width:500px;max-width:100%;border-radius:8px;box-shadow:0 0
|
|
170
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.4", type: NgxNotificationComponent, isStandalone: true, selector: "ngx-notification", inputs: { payload: { classPropertyName: "payload", publicName: "payload", isSignal: true, isRequired: true, transformFunction: null }, containerClass: { classPropertyName: "containerClass", publicName: "containerClass", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { onClose: "onClose", onFinish: "onFinish" }, viewQueries: [{ propertyName: "bar", first: true, predicate: ["bar"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"{{ containerClass }} {{ containerClass }}-{{ payload().type }} {{ showClass() }}\"\n role=\"status\"\n (mouseenter)=\"onMouseEnter()\"\n (mouseleave)=\"onMouseLeave()\"\n (click)=\"onTap()\"\n [attr.aria-live]=\"\n payload().type === 'error' || payload().type === 'warning' ? 'assertive' : 'polite'\n \"\n [attr.data-id]=\"payload().id\">\n <div class=\"ngx-notify-icon-container\">\n <div class=\"ngx-notify-icon\">\n @switch (payload().type) {\n @case ('success') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n fill=\"currentColor\"\n d=\"M235.3 331.3C229.1 337.6 218.9 337.6 212.7 331.3L148.7 267.3C142.4 261.1 142.4 250.9 148.7 244.7C154.9 238.4 165.1 238.4 171.3 244.7L224 297.4L340.7 180.7C346.9 174.4 357.1 174.4 363.3 180.7C369.6 186.9 369.6 197.1 363.3 203.3L235.3 331.3zM512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 32C132.3 32 32 132.3 32 256C32 379.7 132.3 480 256 480C379.7 480 480 379.7 480 256C480 132.3 379.7 32 256 32z\" />\n </svg>\n }\n @case ('error') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n fill=\"currentColor\"\n d=\"M180.7 180.7C186.9 174.4 197.1 174.4 203.3 180.7L256 233.4L308.7 180.7C314.9 174.4 325.1 174.4 331.3 180.7C337.6 186.9 337.6 197.1 331.3 203.3L278.6 255.1L331.3 308.7C337.6 314.9 337.6 325.1 331.3 331.3C325.1 337.6 314.9 337.6 308.7 331.3L256 278.6L203.3 331.3C197.1 337.6 186.9 337.6 180.7 331.3C174.4 325.1 174.4 314.9 180.7 308.7L233.4 255.1L180.7 203.3C174.4 197.1 174.4 186.9 180.7 180.7V180.7zM.0669 191.5C.0669 172.4 7.652 154.1 21.16 140.6L140.6 21.15C154.1 7.648 172.4 .0625 191.5 .0625H320.5C339.6 .0625 357.9 7.648 371.4 21.15L490.8 140.6C504.3 154.1 511.9 172.4 511.9 191.5V320.5C511.9 339.6 504.3 357.9 490.8 371.4L371.4 490.8C357.9 504.3 339.6 511.9 320.5 511.9H191.5C172.4 511.9 154.1 504.3 140.6 490.8L21.15 371.4C7.652 357.9 .0666 339.6 .0666 320.5L.0669 191.5zM43.78 163.2C36.28 170.7 32.07 180.9 32.07 191.5V320.5C32.07 331.1 36.28 341.3 43.78 348.8L163.2 468.2C170.7 475.7 180.9 479.9 191.5 479.9H320.5C331.1 479.9 341.3 475.7 348.8 468.2L468.2 348.8C475.7 341.3 479.9 331.1 479.9 320.5V191.5C479.9 180.9 475.7 170.7 468.2 163.2L348.8 43.78C341.3 36.28 331.1 32.06 320.5 32.06H191.5C180.9 32.06 170.7 36.28 163.2 43.78L43.78 163.2zM43.78 348.8L21.15 371.4z\" />\n </svg>\n }\n @case ('warning') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n fill=\"currentColor\"\n d=\"M256 360c-13.25 0-23.1 10.74-23.1 24c0 13.25 10.75 24 23.1 24c13.25 0 23.1-10.75 23.1-24C280 370.7 269.3 360 256 360zM256 320c8.843 0 15.1-7.156 15.1-16V160c0-8.844-7.155-16-15.1-16S240 151.2 240 160v144C240 312.8 247.2 320 256 320zM504.3 397.3L304.5 59.38C294.4 42.27 276.2 32.03 256 32C235.8 32 217.7 42.22 207.5 59.36l-199.9 338c-10.05 16.97-10.2 37.34-.4218 54.5C17.29 469.5 35.55 480 56.1 480h399.9c20.51 0 38.75-10.53 48.81-28.17C514.6 434.7 514.4 414.3 504.3 397.3zM476.1 435.1C472.7 443.5 464.8 448 455.1 448H56.1c-8.906 0-16.78-4.484-21.08-12c-4.078-7.156-4.015-15.3 .1562-22.36L235.1 75.66C239.4 68.36 247.2 64 256 64c0 0-.0156 0 0 0c8.765 .0156 16.56 4.359 20.86 11.64l199.9 338C480.1 420.7 481.1 428.8 476.1 435.1z\" />\n </svg>\n }\n @case ('info') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n fill=\"currentColor\"\n d=\"M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 480c-123.5 0-224-100.5-224-224s100.5-224 224-224s224 100.5 224 224S379.5 480 256 480zM256 184c13.25 0 24-10.74 24-24c0-13.25-10.75-24-24-24S232 146.7 232 160C232 173.3 242.7 184 256 184zM304 352h-32V240C272 231.2 264.8 224 256 224H224C215.2 224 208 231.2 208 240S215.2 256 224 256h16v96h-32C199.2 352 192 359.2 192 368C192 376.8 199.2 384 208 384h96c8.836 0 16-7.164 16-16C320 359.2 312.8 352 304 352z\" />\n </svg>\n }\n }\n </div>\n </div>\n\n <div class=\"ngx-notify-content\">\n <div class=\"ngx-notify-title\" [innerHTML]=\"safeMessage\"></div>\n <div class=\"ngx-notify-description\" [innerHTML]=\"safeDescription\"></div>\n </div>\n\n @if (payload().options.dismissible) {\n <div class=\"ngx-notify-close-container\">\n <button class=\"ngx-notify-close\" (click)=\"close($event)\" aria-label=\"close\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\n <path\n fill=\"currentColor\"\n d=\"M315.3 411.3c-6.253 6.253-16.37 6.253-22.63 0L160 278.6l-132.7 132.7c-6.253 6.253-16.37 6.253-22.63 0c-6.253-6.253-6.253-16.37 0-22.63L137.4 256L4.69 123.3c-6.253-6.253-6.253-16.37 0-22.63c6.253-6.253 16.37-6.253 22.63 0L160 233.4l132.7-132.7c6.253-6.253 16.37-6.253 22.63 0c6.253 6.253 6.253 16.37 0 22.63L182.6 256l132.7 132.7C321.6 394.9 321.6 405.1 315.3 411.3z\" />\n </svg>\n </button>\n </div>\n }\n\n <div class=\"ngx-notify-progress\">\n <div class=\"progress-bar\" #bar></div>\n </div>\n</div>\n", styles: [":host{display:block;margin:8px 0;--ngx-notify-content-bg: light-dark(#ffffff, #262b35);--ngx-notify-content-fg: light-dark(#000, #fff)}.ngx-notify{display:flex;min-width:240px;width:500px;max-width:100%;border-radius:8px;box-shadow:0 0 20px light-dark(#797979,rgba(2,2,2,.7411764706));opacity:0;transform:translateY(-8px);transition:opacity .28s ease,transform .28s ease;pointer-events:auto;overflow:hidden}.ngx-notify-icon-container{width:60px;min-width:60px;display:flex;align-items:center;justify-content:center}.ngx-notify-icon-container .ngx-notify-icon{padding:15px}.ngx-notify-icon-container .ngx-notify-icon svg{width:100%;height:100%}.ngx-notify-content{background-color:var(--ngx-notify-content-bg);color:var(--ngx-notify-content-fg);padding:15px;border-radius:0 0 0 15px;flex:auto}.ngx-notify-content .ngx-notify-title{font-size:1rem}.ngx-notify-content .ngx-notify-description{opacity:.8;font-size:.8rem}.ngx-show{opacity:1;transform:translateY(0)}.ngx-notify-info{background:#1cacff;--var-ngx-progress-bar-bg: #1cacff;color:#e8f3ff}.ngx-notify-success{background:#54c999;--var-ngx-progress-bar-bg: #54c999;color:#ebeceb}.ngx-notify-warning{background:#ffb242;--var-ngx-progress-bar-bg: #ffb242;color:#ffecec}.ngx-notify-error{background:#ff3c39;--var-ngx-progress-bar-bg: #ff3c39;color:#ffecec}.ngx-notify-close-container{background-color:var(--ngx-notify-content-bg);color:var(--ngx-notify-content-fg);display:flex;align-items:center;justify-content:center}.ngx-notify-close-container .ngx-notify-close{background:transparent;border:none;width:22px;height:22px;line-height:0;margin:0 5px;cursor:pointer;transform:rotate(0);transition:transform .4s}.ngx-notify-close-container .ngx-notify-close:hover{transform:rotate(90deg)}.ngx-notify-progress{position:absolute;bottom:0;height:4px;left:60px;right:0;overflow:hidden}.ngx-notify-progress .progress-bar{background-color:var(--var-ngx-progress-bar-bg);height:100%;transform:scaleX(0);transform-origin:left}::ng-deep html[dir=rtl] .ngx-notify-content,::ng-deep body[dir=ltr] .ngx-notify-content{border-radius:0 0 15px}::ng-deep html[dir=rtl] .ngx-notify-progress,::ng-deep body[dir=ltr] .ngx-notify-progress{left:0;right:60px}::ng-deep html[dir=rtl] .ngx-notify-progress .progress-bar,::ng-deep body[dir=ltr] .ngx-notify-progress .progress-bar{transform-origin:right!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
171
171
|
}
|
|
172
172
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxNotificationComponent, decorators: [{
|
|
173
173
|
type: Component,
|
|
174
|
-
args: [{ selector: 'ngx-notification', imports: [CommonModule], template: "<div\n class=\"{{ containerClass }} {{ containerClass }}-{{ payload().type }} {{ showClass() }}\"\n role=\"status\"\n (mouseenter)=\"onMouseEnter()\"\n (mouseleave)=\"onMouseLeave()\"\n (click)=\"onTap()\"\n [attr.aria-live]=\"\n payload().type === 'error' || payload().type === 'warning' ? 'assertive' : 'polite'\n \"\n [attr.data-id]=\"payload().id\">\n <div class=\"ngx-notify-icon-container\">\n <div class=\"ngx-notify-icon\">\n @switch (payload().type) {\n @case ('success') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n fill=\"currentColor\"\n d=\"M235.3 331.3C229.1 337.6 218.9 337.6 212.7 331.3L148.7 267.3C142.4 261.1 142.4 250.9 148.7 244.7C154.9 238.4 165.1 238.4 171.3 244.7L224 297.4L340.7 180.7C346.9 174.4 357.1 174.4 363.3 180.7C369.6 186.9 369.6 197.1 363.3 203.3L235.3 331.3zM512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 32C132.3 32 32 132.3 32 256C32 379.7 132.3 480 256 480C379.7 480 480 379.7 480 256C480 132.3 379.7 32 256 32z\" />\n </svg>\n }\n @case ('error') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n fill=\"currentColor\"\n d=\"M180.7 180.7C186.9 174.4 197.1 174.4 203.3 180.7L256 233.4L308.7 180.7C314.9 174.4 325.1 174.4 331.3 180.7C337.6 186.9 337.6 197.1 331.3 203.3L278.6 255.1L331.3 308.7C337.6 314.9 337.6 325.1 331.3 331.3C325.1 337.6 314.9 337.6 308.7 331.3L256 278.6L203.3 331.3C197.1 337.6 186.9 337.6 180.7 331.3C174.4 325.1 174.4 314.9 180.7 308.7L233.4 255.1L180.7 203.3C174.4 197.1 174.4 186.9 180.7 180.7V180.7zM.0669 191.5C.0669 172.4 7.652 154.1 21.16 140.6L140.6 21.15C154.1 7.648 172.4 .0625 191.5 .0625H320.5C339.6 .0625 357.9 7.648 371.4 21.15L490.8 140.6C504.3 154.1 511.9 172.4 511.9 191.5V320.5C511.9 339.6 504.3 357.9 490.8 371.4L371.4 490.8C357.9 504.3 339.6 511.9 320.5 511.9H191.5C172.4 511.9 154.1 504.3 140.6 490.8L21.15 371.4C7.652 357.9 .0666 339.6 .0666 320.5L.0669 191.5zM43.78 163.2C36.28 170.7 32.07 180.9 32.07 191.5V320.5C32.07 331.1 36.28 341.3 43.78 348.8L163.2 468.2C170.7 475.7 180.9 479.9 191.5 479.9H320.5C331.1 479.9 341.3 475.7 348.8 468.2L468.2 348.8C475.7 341.3 479.9 331.1 479.9 320.5V191.5C479.9 180.9 475.7 170.7 468.2 163.2L348.8 43.78C341.3 36.28 331.1 32.06 320.5 32.06H191.5C180.9 32.06 170.7 36.28 163.2 43.78L43.78 163.2zM43.78 348.8L21.15 371.4z\" />\n </svg>\n }\n @case ('warning') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n fill=\"currentColor\"\n d=\"M256 360c-13.25 0-23.1 10.74-23.1 24c0 13.25 10.75 24 23.1 24c13.25 0 23.1-10.75 23.1-24C280 370.7 269.3 360 256 360zM256 320c8.843 0 15.1-7.156 15.1-16V160c0-8.844-7.155-16-15.1-16S240 151.2 240 160v144C240 312.8 247.2 320 256 320zM504.3 397.3L304.5 59.38C294.4 42.27 276.2 32.03 256 32C235.8 32 217.7 42.22 207.5 59.36l-199.9 338c-10.05 16.97-10.2 37.34-.4218 54.5C17.29 469.5 35.55 480 56.1 480h399.9c20.51 0 38.75-10.53 48.81-28.17C514.6 434.7 514.4 414.3 504.3 397.3zM476.1 435.1C472.7 443.5 464.8 448 455.1 448H56.1c-8.906 0-16.78-4.484-21.08-12c-4.078-7.156-4.015-15.3 .1562-22.36L235.1 75.66C239.4 68.36 247.2 64 256 64c0 0-.0156 0 0 0c8.765 .0156 16.56 4.359 20.86 11.64l199.9 338C480.1 420.7 481.1 428.8 476.1 435.1z\" />\n </svg>\n }\n @case ('info') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n fill=\"currentColor\"\n d=\"M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 480c-123.5 0-224-100.5-224-224s100.5-224 224-224s224 100.5 224 224S379.5 480 256 480zM256 184c13.25 0 24-10.74 24-24c0-13.25-10.75-24-24-24S232 146.7 232 160C232 173.3 242.7 184 256 184zM304 352h-32V240C272 231.2 264.8 224 256 224H224C215.2 224 208 231.2 208 240S215.2 256 224 256h16v96h-32C199.2 352 192 359.2 192 368C192 376.8 199.2 384 208 384h96c8.836 0 16-7.164 16-16C320 359.2 312.8 352 304 352z\" />\n </svg>\n }\n }\n </div>\n </div>\n\n <div class=\"ngx-notify-content\">\n <div class=\"ngx-notify-title\" [innerHTML]=\"safeMessage\"></div>\n <div class=\"ngx-notify-description\" [innerHTML]=\"safeDescription\"></div>\n </div>\n\n @if (payload().options.dismissible) {\n <div class=\"ngx-notify-close-container\">\n <button class=\"ngx-notify-close\" (click)=\"close($event)\" aria-label=\"close\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\n <path\n fill=\"currentColor\"\n d=\"M315.3 411.3c-6.253 6.253-16.37 6.253-22.63 0L160 278.6l-132.7 132.7c-6.253 6.253-16.37 6.253-22.63 0c-6.253-6.253-6.253-16.37 0-22.63L137.4 256L4.69 123.3c-6.253-6.253-6.253-16.37 0-22.63c6.253-6.253 16.37-6.253 22.63 0L160 233.4l132.7-132.7c6.253-6.253 16.37-6.253 22.63 0c6.253 6.253 6.253 16.37 0 22.63L182.6 256l132.7 132.7C321.6 394.9 321.6 405.1 315.3 411.3z\" />\n </svg>\n </button>\n </div>\n }\n\n <div class=\"ngx-notify-progress\">\n <div class=\"progress-bar\" #bar></div>\n </div>\n</div>\n", styles: [":host{display:block;margin:8px 0;--ngx-notify-content-bg: light-dark(#ffffff, #262b35);--ngx-notify-content-fg: light-dark(#000, #fff)}.ngx-notify{display:flex;min-width:240px;width:500px;max-width:100%;border-radius:8px;box-shadow:0 0
|
|
174
|
+
args: [{ selector: 'ngx-notification', imports: [CommonModule], template: "<div\n class=\"{{ containerClass }} {{ containerClass }}-{{ payload().type }} {{ showClass() }}\"\n role=\"status\"\n (mouseenter)=\"onMouseEnter()\"\n (mouseleave)=\"onMouseLeave()\"\n (click)=\"onTap()\"\n [attr.aria-live]=\"\n payload().type === 'error' || payload().type === 'warning' ? 'assertive' : 'polite'\n \"\n [attr.data-id]=\"payload().id\">\n <div class=\"ngx-notify-icon-container\">\n <div class=\"ngx-notify-icon\">\n @switch (payload().type) {\n @case ('success') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n fill=\"currentColor\"\n d=\"M235.3 331.3C229.1 337.6 218.9 337.6 212.7 331.3L148.7 267.3C142.4 261.1 142.4 250.9 148.7 244.7C154.9 238.4 165.1 238.4 171.3 244.7L224 297.4L340.7 180.7C346.9 174.4 357.1 174.4 363.3 180.7C369.6 186.9 369.6 197.1 363.3 203.3L235.3 331.3zM512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 32C132.3 32 32 132.3 32 256C32 379.7 132.3 480 256 480C379.7 480 480 379.7 480 256C480 132.3 379.7 32 256 32z\" />\n </svg>\n }\n @case ('error') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n fill=\"currentColor\"\n d=\"M180.7 180.7C186.9 174.4 197.1 174.4 203.3 180.7L256 233.4L308.7 180.7C314.9 174.4 325.1 174.4 331.3 180.7C337.6 186.9 337.6 197.1 331.3 203.3L278.6 255.1L331.3 308.7C337.6 314.9 337.6 325.1 331.3 331.3C325.1 337.6 314.9 337.6 308.7 331.3L256 278.6L203.3 331.3C197.1 337.6 186.9 337.6 180.7 331.3C174.4 325.1 174.4 314.9 180.7 308.7L233.4 255.1L180.7 203.3C174.4 197.1 174.4 186.9 180.7 180.7V180.7zM.0669 191.5C.0669 172.4 7.652 154.1 21.16 140.6L140.6 21.15C154.1 7.648 172.4 .0625 191.5 .0625H320.5C339.6 .0625 357.9 7.648 371.4 21.15L490.8 140.6C504.3 154.1 511.9 172.4 511.9 191.5V320.5C511.9 339.6 504.3 357.9 490.8 371.4L371.4 490.8C357.9 504.3 339.6 511.9 320.5 511.9H191.5C172.4 511.9 154.1 504.3 140.6 490.8L21.15 371.4C7.652 357.9 .0666 339.6 .0666 320.5L.0669 191.5zM43.78 163.2C36.28 170.7 32.07 180.9 32.07 191.5V320.5C32.07 331.1 36.28 341.3 43.78 348.8L163.2 468.2C170.7 475.7 180.9 479.9 191.5 479.9H320.5C331.1 479.9 341.3 475.7 348.8 468.2L468.2 348.8C475.7 341.3 479.9 331.1 479.9 320.5V191.5C479.9 180.9 475.7 170.7 468.2 163.2L348.8 43.78C341.3 36.28 331.1 32.06 320.5 32.06H191.5C180.9 32.06 170.7 36.28 163.2 43.78L43.78 163.2zM43.78 348.8L21.15 371.4z\" />\n </svg>\n }\n @case ('warning') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n fill=\"currentColor\"\n d=\"M256 360c-13.25 0-23.1 10.74-23.1 24c0 13.25 10.75 24 23.1 24c13.25 0 23.1-10.75 23.1-24C280 370.7 269.3 360 256 360zM256 320c8.843 0 15.1-7.156 15.1-16V160c0-8.844-7.155-16-15.1-16S240 151.2 240 160v144C240 312.8 247.2 320 256 320zM504.3 397.3L304.5 59.38C294.4 42.27 276.2 32.03 256 32C235.8 32 217.7 42.22 207.5 59.36l-199.9 338c-10.05 16.97-10.2 37.34-.4218 54.5C17.29 469.5 35.55 480 56.1 480h399.9c20.51 0 38.75-10.53 48.81-28.17C514.6 434.7 514.4 414.3 504.3 397.3zM476.1 435.1C472.7 443.5 464.8 448 455.1 448H56.1c-8.906 0-16.78-4.484-21.08-12c-4.078-7.156-4.015-15.3 .1562-22.36L235.1 75.66C239.4 68.36 247.2 64 256 64c0 0-.0156 0 0 0c8.765 .0156 16.56 4.359 20.86 11.64l199.9 338C480.1 420.7 481.1 428.8 476.1 435.1z\" />\n </svg>\n }\n @case ('info') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n fill=\"currentColor\"\n d=\"M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 480c-123.5 0-224-100.5-224-224s100.5-224 224-224s224 100.5 224 224S379.5 480 256 480zM256 184c13.25 0 24-10.74 24-24c0-13.25-10.75-24-24-24S232 146.7 232 160C232 173.3 242.7 184 256 184zM304 352h-32V240C272 231.2 264.8 224 256 224H224C215.2 224 208 231.2 208 240S215.2 256 224 256h16v96h-32C199.2 352 192 359.2 192 368C192 376.8 199.2 384 208 384h96c8.836 0 16-7.164 16-16C320 359.2 312.8 352 304 352z\" />\n </svg>\n }\n }\n </div>\n </div>\n\n <div class=\"ngx-notify-content\">\n <div class=\"ngx-notify-title\" [innerHTML]=\"safeMessage\"></div>\n <div class=\"ngx-notify-description\" [innerHTML]=\"safeDescription\"></div>\n </div>\n\n @if (payload().options.dismissible) {\n <div class=\"ngx-notify-close-container\">\n <button class=\"ngx-notify-close\" (click)=\"close($event)\" aria-label=\"close\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\n <path\n fill=\"currentColor\"\n d=\"M315.3 411.3c-6.253 6.253-16.37 6.253-22.63 0L160 278.6l-132.7 132.7c-6.253 6.253-16.37 6.253-22.63 0c-6.253-6.253-6.253-16.37 0-22.63L137.4 256L4.69 123.3c-6.253-6.253-6.253-16.37 0-22.63c6.253-6.253 16.37-6.253 22.63 0L160 233.4l132.7-132.7c6.253-6.253 16.37-6.253 22.63 0c6.253 6.253 6.253 16.37 0 22.63L182.6 256l132.7 132.7C321.6 394.9 321.6 405.1 315.3 411.3z\" />\n </svg>\n </button>\n </div>\n }\n\n <div class=\"ngx-notify-progress\">\n <div class=\"progress-bar\" #bar></div>\n </div>\n</div>\n", styles: [":host{display:block;margin:8px 0;--ngx-notify-content-bg: light-dark(#ffffff, #262b35);--ngx-notify-content-fg: light-dark(#000, #fff)}.ngx-notify{display:flex;min-width:240px;width:500px;max-width:100%;border-radius:8px;box-shadow:0 0 20px light-dark(#797979,rgba(2,2,2,.7411764706));opacity:0;transform:translateY(-8px);transition:opacity .28s ease,transform .28s ease;pointer-events:auto;overflow:hidden}.ngx-notify-icon-container{width:60px;min-width:60px;display:flex;align-items:center;justify-content:center}.ngx-notify-icon-container .ngx-notify-icon{padding:15px}.ngx-notify-icon-container .ngx-notify-icon svg{width:100%;height:100%}.ngx-notify-content{background-color:var(--ngx-notify-content-bg);color:var(--ngx-notify-content-fg);padding:15px;border-radius:0 0 0 15px;flex:auto}.ngx-notify-content .ngx-notify-title{font-size:1rem}.ngx-notify-content .ngx-notify-description{opacity:.8;font-size:.8rem}.ngx-show{opacity:1;transform:translateY(0)}.ngx-notify-info{background:#1cacff;--var-ngx-progress-bar-bg: #1cacff;color:#e8f3ff}.ngx-notify-success{background:#54c999;--var-ngx-progress-bar-bg: #54c999;color:#ebeceb}.ngx-notify-warning{background:#ffb242;--var-ngx-progress-bar-bg: #ffb242;color:#ffecec}.ngx-notify-error{background:#ff3c39;--var-ngx-progress-bar-bg: #ff3c39;color:#ffecec}.ngx-notify-close-container{background-color:var(--ngx-notify-content-bg);color:var(--ngx-notify-content-fg);display:flex;align-items:center;justify-content:center}.ngx-notify-close-container .ngx-notify-close{background:transparent;border:none;width:22px;height:22px;line-height:0;margin:0 5px;cursor:pointer;transform:rotate(0);transition:transform .4s}.ngx-notify-close-container .ngx-notify-close:hover{transform:rotate(90deg)}.ngx-notify-progress{position:absolute;bottom:0;height:4px;left:60px;right:0;overflow:hidden}.ngx-notify-progress .progress-bar{background-color:var(--var-ngx-progress-bar-bg);height:100%;transform:scaleX(0);transform-origin:left}::ng-deep html[dir=rtl] .ngx-notify-content,::ng-deep body[dir=ltr] .ngx-notify-content{border-radius:0 0 15px}::ng-deep html[dir=rtl] .ngx-notify-progress,::ng-deep body[dir=ltr] .ngx-notify-progress{left:0;right:60px}::ng-deep html[dir=rtl] .ngx-notify-progress .progress-bar,::ng-deep body[dir=ltr] .ngx-notify-progress .progress-bar{transform-origin:right!important}\n"] }]
|
|
175
175
|
}], ctorParameters: () => [], propDecorators: { payload: [{ type: i0.Input, args: [{ isSignal: true, alias: "payload", required: true }] }], containerClass: [{
|
|
176
176
|
type: Input
|
|
177
177
|
}], bar: [{ type: i0.ViewChild, args: ['bar', { isSignal: true }] }], onClose: [{ type: i0.Output, args: ["onClose"] }], onFinish: [{ type: i0.Output, args: ["onFinish"] }] } });
|