ngx-kit 1.0.0 → 2.0.1
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/dialog/README.md +169 -0
- package/fesm2022/{ngx-input-angle-selector.mjs → ngx-kit-angle-selector.mjs} +16 -16
- package/fesm2022/ngx-kit-angle-selector.mjs.map +1 -0
- package/fesm2022/{ngx-input-box-shadow.mjs → ngx-kit-box-shadow.mjs} +10 -10
- package/fesm2022/ngx-kit-box-shadow.mjs.map +1 -0
- package/fesm2022/{ngx-input-color-picker.mjs → ngx-kit-color-picker.mjs} +30 -14
- package/fesm2022/ngx-kit-color-picker.mjs.map +1 -0
- package/fesm2022/ngx-kit-date-picker.mjs +2280 -0
- package/fesm2022/ngx-kit-date-picker.mjs.map +1 -0
- package/fesm2022/ngx-kit-dialog.mjs +378 -0
- package/fesm2022/ngx-kit-dialog.mjs.map +1 -0
- package/fesm2022/{ngx-input-gradient-picker.mjs → ngx-kit-gradient-picker.mjs} +11 -11
- package/fesm2022/ngx-kit-gradient-picker.mjs.map +1 -0
- package/fesm2022/ngx-kit-menu.mjs +229 -0
- package/fesm2022/ngx-kit-menu.mjs.map +1 -0
- package/fesm2022/ngx-kit-notify.mjs +292 -0
- package/fesm2022/ngx-kit-notify.mjs.map +1 -0
- package/fesm2022/{ngx-input-shared.mjs → ngx-kit-shared.mjs} +267 -162
- package/fesm2022/ngx-kit-shared.mjs.map +1 -0
- package/fesm2022/{ngx-input.mjs → ngx-kit.mjs} +1 -1
- package/fesm2022/ngx-kit.mjs.map +1 -0
- package/package.json +31 -15
- package/styles/all.css +22 -0
- package/styles/overlay.css +22 -0
- package/types/{ngx-input-angle-selector.d.ts → ngx-kit-angle-selector.d.ts} +6 -5
- package/types/{ngx-input-box-shadow.d.ts → ngx-kit-box-shadow.d.ts} +7 -7
- package/types/{ngx-input-color-picker.d.ts → ngx-kit-color-picker.d.ts} +7 -7
- package/types/ngx-kit-date-picker.d.ts +294 -0
- package/types/ngx-kit-dialog.d.ts +139 -0
- package/types/{ngx-input-gradient-picker.d.ts → ngx-kit-gradient-picker.d.ts} +7 -7
- package/types/ngx-kit-menu.d.ts +69 -0
- package/types/ngx-kit-notify.d.ts +60 -0
- package/types/{ngx-input-shared.d.ts → ngx-kit-shared.d.ts} +87 -40
- package/fesm2022/ngx-input-angle-selector.mjs.map +0 -1
- package/fesm2022/ngx-input-box-shadow.mjs.map +0 -1
- package/fesm2022/ngx-input-color-picker.mjs.map +0 -1
- package/fesm2022/ngx-input-gradient-picker.mjs.map +0 -1
- package/fesm2022/ngx-input-shared.mjs.map +0 -1
- package/fesm2022/ngx-input.mjs.map +0 -1
- /package/types/{ngx-input.d.ts → ngx-kit.d.ts} +0 -0
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, HostListener, Directive, InjectionToken, viewChild, TemplateRef, Component, inject, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from 'ngx-kit/shared';
|
|
4
|
+
import * as i1$1 from '@angular/common';
|
|
5
|
+
import { CommonModule } from '@angular/common';
|
|
6
|
+
|
|
7
|
+
class NgxMenu {
|
|
8
|
+
el;
|
|
9
|
+
appRef;
|
|
10
|
+
overlayService;
|
|
11
|
+
ngxMenu = input.required(/* @ts-ignore */
|
|
12
|
+
...(ngDevMode ? [{ debugName: "ngxMenu" }] : /* istanbul ignore next */ []));
|
|
13
|
+
placement = input(/* @ts-ignore */
|
|
14
|
+
...(ngDevMode ? [undefined, { debugName: "placement" }] : /* istanbul ignore next */ []));
|
|
15
|
+
alignment = input(/* @ts-ignore */
|
|
16
|
+
...(ngDevMode ? [undefined, { debugName: "alignment" }] : /* istanbul ignore next */ []));
|
|
17
|
+
containerRef;
|
|
18
|
+
constructor(el, appRef, overlayService) {
|
|
19
|
+
this.el = el;
|
|
20
|
+
this.appRef = appRef;
|
|
21
|
+
this.overlayService = overlayService;
|
|
22
|
+
}
|
|
23
|
+
ngOnDestroy() {
|
|
24
|
+
this.destroyContainer();
|
|
25
|
+
}
|
|
26
|
+
onClick(ev) {
|
|
27
|
+
ev.stopPropagation();
|
|
28
|
+
ev.preventDefault();
|
|
29
|
+
this.toggleContainer();
|
|
30
|
+
}
|
|
31
|
+
toggleContainer() {
|
|
32
|
+
if (this.containerRef) {
|
|
33
|
+
this.destroyContainer();
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const t = this.ngxMenu().template();
|
|
37
|
+
if (!t)
|
|
38
|
+
return;
|
|
39
|
+
this.containerRef = this.overlayService.openTemplate({
|
|
40
|
+
anchor: this.el.nativeElement,
|
|
41
|
+
template: t,
|
|
42
|
+
appRef: this.appRef,
|
|
43
|
+
alignment: this.alignment() ?? 'start',
|
|
44
|
+
placement: this.placement() ?? 'auto',
|
|
45
|
+
onClosed: () => {
|
|
46
|
+
this.containerRef = undefined;
|
|
47
|
+
this.overlayService.closeAll();
|
|
48
|
+
},
|
|
49
|
+
configure: (instance, ref) => {
|
|
50
|
+
this.ngxMenu().containerRef = ref;
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
destroyContainer() {
|
|
55
|
+
this.containerRef?.close();
|
|
56
|
+
this.containerRef = undefined;
|
|
57
|
+
}
|
|
58
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxMenu, deps: [{ token: i0.ElementRef }, { token: i0.ApplicationRef }, { token: i1.OverlayService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
59
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.4", type: NgxMenu, isStandalone: true, selector: "[ngxMenu]", inputs: { ngxMenu: { classPropertyName: "ngxMenu", publicName: "ngxMenu", isSignal: true, isRequired: true, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick($event)" } }, exportAs: ["ngxMenu"], ngImport: i0 });
|
|
60
|
+
}
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxMenu, decorators: [{
|
|
62
|
+
type: Directive,
|
|
63
|
+
args: [{
|
|
64
|
+
selector: '[ngxMenu]',
|
|
65
|
+
exportAs: 'ngxMenu',
|
|
66
|
+
}]
|
|
67
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ApplicationRef }, { type: i1.OverlayService }], propDecorators: { ngxMenu: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngxMenu", required: true }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], alignment: [{ type: i0.Input, args: [{ isSignal: true, alias: "alignment", required: false }] }], onClick: [{
|
|
68
|
+
type: HostListener,
|
|
69
|
+
args: ['click', ['$event']]
|
|
70
|
+
}] } });
|
|
71
|
+
|
|
72
|
+
class NgxContextMenu {
|
|
73
|
+
el;
|
|
74
|
+
appRef;
|
|
75
|
+
overlayService;
|
|
76
|
+
ngxContextMenu = input.required(/* @ts-ignore */
|
|
77
|
+
...(ngDevMode ? [{ debugName: "ngxContextMenu" }] : /* istanbul ignore next */ []));
|
|
78
|
+
containerRef;
|
|
79
|
+
constructor(el, appRef, overlayService) {
|
|
80
|
+
this.el = el;
|
|
81
|
+
this.appRef = appRef;
|
|
82
|
+
this.overlayService = overlayService;
|
|
83
|
+
el.nativeElement.addEventListener('contextmenu', (ev) => this.onClick(ev));
|
|
84
|
+
}
|
|
85
|
+
ngOnDestroy() {
|
|
86
|
+
this.destroyContainer();
|
|
87
|
+
this.el.nativeElement.removeEventListener('contextmenu', (ev) => this.onClick(ev));
|
|
88
|
+
}
|
|
89
|
+
onClick(ev) {
|
|
90
|
+
if (ev.currentTarget == this.el.nativeElement) {
|
|
91
|
+
ev.stopPropagation();
|
|
92
|
+
ev.preventDefault();
|
|
93
|
+
this.toggleContainer(ev.clientX, ev.clientY);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
toggleContainer(x, y) {
|
|
97
|
+
if (this.containerRef) {
|
|
98
|
+
this.destroyContainer();
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const t = this.ngxContextMenu().template();
|
|
102
|
+
if (!t)
|
|
103
|
+
return;
|
|
104
|
+
this.containerRef = this.overlayService.openTemplate({
|
|
105
|
+
anchor: this.el.nativeElement,
|
|
106
|
+
point: { x, y },
|
|
107
|
+
template: t,
|
|
108
|
+
appRef: this.appRef,
|
|
109
|
+
alignment: 'start',
|
|
110
|
+
placement: 'auto',
|
|
111
|
+
onClosed: () => {
|
|
112
|
+
this.containerRef = undefined;
|
|
113
|
+
this.overlayService.closeAll();
|
|
114
|
+
},
|
|
115
|
+
configure: (instance, ref) => {
|
|
116
|
+
this.ngxContextMenu().containerRef = ref;
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
destroyContainer() {
|
|
121
|
+
this.containerRef?.close();
|
|
122
|
+
this.containerRef = undefined;
|
|
123
|
+
}
|
|
124
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxContextMenu, deps: [{ token: i0.ElementRef }, { token: i0.ApplicationRef }, { token: i1.OverlayService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
125
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.4", type: NgxContextMenu, isStandalone: true, selector: "[ngxContextMenu]", inputs: { ngxContextMenu: { classPropertyName: "ngxContextMenu", publicName: "ngxContextMenu", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["ngxContextMenu"], ngImport: i0 });
|
|
126
|
+
}
|
|
127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxContextMenu, decorators: [{
|
|
128
|
+
type: Directive,
|
|
129
|
+
args: [{
|
|
130
|
+
selector: '[ngxContextMenu]',
|
|
131
|
+
exportAs: 'ngxContextMenu',
|
|
132
|
+
}]
|
|
133
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ApplicationRef }, { type: i1.OverlayService }], propDecorators: { ngxContextMenu: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngxContextMenu", required: true }] }] } });
|
|
134
|
+
|
|
135
|
+
const NGX_MENU_CONTEXT = new InjectionToken('ngx-menu-context');
|
|
136
|
+
|
|
137
|
+
class NgxMenuPanel {
|
|
138
|
+
template = viewChild(TemplateRef, /* @ts-ignore */
|
|
139
|
+
...(ngDevMode ? [{ debugName: "template" }] : /* istanbul ignore next */ []));
|
|
140
|
+
class = input(/* @ts-ignore */
|
|
141
|
+
...(ngDevMode ? [undefined, { debugName: "class" }] : /* istanbul ignore next */ []));
|
|
142
|
+
containerRef;
|
|
143
|
+
close() {
|
|
144
|
+
this.containerRef?.close();
|
|
145
|
+
}
|
|
146
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxMenuPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
147
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.4", type: NgxMenuPanel, isStandalone: true, selector: "ngx-menu,[ngx-menu]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: NGX_MENU_CONTEXT, useExisting: NgxMenuPanel }], viewQueries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], exportAs: ["NgxMenu"], ngImport: i0, template: `
|
|
148
|
+
<ng-template>
|
|
149
|
+
<div class="ngx-menu-panel" [ngClass]="class()">
|
|
150
|
+
<ng-content></ng-content>
|
|
151
|
+
</div>
|
|
152
|
+
</ng-template>
|
|
153
|
+
`, isInline: true, styles: [".ngx-menu-panel{overflow:auto;box-sizing:border-box;outline:0;background-color:var(--ngx-menu-bg, #ffffff);color:var(--ngx-menu-fg, #111111);box-shadow:var(--ngx-menu-shadow, 0px 0px 4px rgb(0 0 0 / 30%));border-radius:var(--ngx-menu-radius, 10px);padding:var(--ngx-menu-padding, 5px);min-width:var(--ngx-menu-min-width, 20px);min-height:var(--ngx-menu-min-height, 40px);will-change:transform,opacity}.ngx-menu-panel.ngx-menu-panel-exit{animation:menu-exit .1s 25ms linear forwards}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
154
|
+
}
|
|
155
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxMenuPanel, decorators: [{
|
|
156
|
+
type: Component,
|
|
157
|
+
args: [{ selector: 'ngx-menu,[ngx-menu]', template: `
|
|
158
|
+
<ng-template>
|
|
159
|
+
<div class="ngx-menu-panel" [ngClass]="class()">
|
|
160
|
+
<ng-content></ng-content>
|
|
161
|
+
</div>
|
|
162
|
+
</ng-template>
|
|
163
|
+
`, exportAs: 'NgxMenu', imports: [CommonModule], providers: [{ provide: NGX_MENU_CONTEXT, useExisting: NgxMenuPanel }], styles: [".ngx-menu-panel{overflow:auto;box-sizing:border-box;outline:0;background-color:var(--ngx-menu-bg, #ffffff);color:var(--ngx-menu-fg, #111111);box-shadow:var(--ngx-menu-shadow, 0px 0px 4px rgb(0 0 0 / 30%));border-radius:var(--ngx-menu-radius, 10px);padding:var(--ngx-menu-padding, 5px);min-width:var(--ngx-menu-min-width, 20px);min-height:var(--ngx-menu-min-height, 40px);will-change:transform,opacity}.ngx-menu-panel.ngx-menu-panel-exit{animation:menu-exit .1s 25ms linear forwards}\n"] }]
|
|
164
|
+
}], propDecorators: { template: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
165
|
+
|
|
166
|
+
class NgxMenuItem {
|
|
167
|
+
menuContext = inject(NGX_MENU_CONTEXT);
|
|
168
|
+
childMenu = inject(NgxMenu, {
|
|
169
|
+
self: true,
|
|
170
|
+
optional: true,
|
|
171
|
+
});
|
|
172
|
+
onClick() {
|
|
173
|
+
if (this.childMenu?.ngxMenu) {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
this.menuContext?.close();
|
|
177
|
+
}
|
|
178
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxMenuItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
179
|
+
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: `
|
|
180
|
+
<div class="ngx-menu-item">
|
|
181
|
+
<ng-content></ng-content>
|
|
182
|
+
</div>
|
|
183
|
+
`, isInline: true, styles: [".ngx-menu-item{box-sizing:border-box;outline:0;padding:var(--ngx-menu-item-padding, 6px 12px)}.ngx-menu-item:hover{cursor:pointer;background-color:var(--ngx-menu-item-padding, #9bc6ff68)}\n"] });
|
|
184
|
+
}
|
|
185
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxMenuItem, decorators: [{
|
|
186
|
+
type: Component,
|
|
187
|
+
args: [{ selector: 'ngx-menu-item,[ngx-menu-item]', template: `
|
|
188
|
+
<div class="ngx-menu-item">
|
|
189
|
+
<ng-content></ng-content>
|
|
190
|
+
</div>
|
|
191
|
+
`, exportAs: 'NgxMenuItem', styles: [".ngx-menu-item{box-sizing:border-box;outline:0;padding:var(--ngx-menu-item-padding, 6px 12px)}.ngx-menu-item:hover{cursor:pointer;background-color:var(--ngx-menu-item-padding, #9bc6ff68)}\n"] }]
|
|
192
|
+
}], propDecorators: { onClick: [{
|
|
193
|
+
type: HostListener,
|
|
194
|
+
args: ['click']
|
|
195
|
+
}] } });
|
|
196
|
+
|
|
197
|
+
class NgxMenuDivider {
|
|
198
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxMenuDivider, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
199
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.4", type: NgxMenuDivider, isStandalone: true, selector: "ngx-menu-divider", ngImport: i0, template: `
|
|
200
|
+
<div class="ngx-menu-divider"></div>
|
|
201
|
+
`, isInline: true, styles: [".ngx-menu-divider{border-bottom:var(--ngx-menu-item-border, 1px #43434d95 solid);border-bottom-color:var(--ngx-menu-divider-border-color, #43434d95)}\n"] });
|
|
202
|
+
}
|
|
203
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxMenuDivider, decorators: [{
|
|
204
|
+
type: Component,
|
|
205
|
+
args: [{ selector: 'ngx-menu-divider', template: `
|
|
206
|
+
<div class="ngx-menu-divider"></div>
|
|
207
|
+
`, styles: [".ngx-menu-divider{border-bottom:var(--ngx-menu-item-border, 1px #43434d95 solid);border-bottom-color:var(--ngx-menu-divider-border-color, #43434d95)}\n"] }]
|
|
208
|
+
}] });
|
|
209
|
+
|
|
210
|
+
const d = [NgxMenu, NgxContextMenu, NgxMenuPanel, NgxMenuItem, NgxMenuDivider];
|
|
211
|
+
class NgxMenuModule {
|
|
212
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
213
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.4", ngImport: i0, type: NgxMenuModule, imports: [NgxMenu, NgxContextMenu, NgxMenuPanel, NgxMenuItem, NgxMenuDivider], exports: [NgxMenu, NgxContextMenu, NgxMenuPanel, NgxMenuItem, NgxMenuDivider] });
|
|
214
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxMenuModule, imports: [NgxMenuPanel] });
|
|
215
|
+
}
|
|
216
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxMenuModule, decorators: [{
|
|
217
|
+
type: NgModule,
|
|
218
|
+
args: [{
|
|
219
|
+
imports: d,
|
|
220
|
+
exports: d,
|
|
221
|
+
}]
|
|
222
|
+
}] });
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Generated bundle index. Do not edit.
|
|
226
|
+
*/
|
|
227
|
+
|
|
228
|
+
export { NgxContextMenu, NgxMenu, NgxMenuDivider, NgxMenuItem, NgxMenuModule, NgxMenuPanel };
|
|
229
|
+
//# sourceMappingURL=ngx-kit-menu.mjs.map
|
|
@@ -0,0 +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 {\r\n Directive,\r\n OnDestroy,\r\n ElementRef,\r\n HostListener,\r\n input,\r\n ApplicationRef,\r\n} from '@angular/core';\r\nimport { OverlayRef, OverlayService, OverlayInstance, Alignment, Placement } from 'ngx-kit/shared';\r\nimport { NgxMenuPanel } from '../components/ngx-menu/menu.component';\r\n\r\n@Directive({\r\n selector: '[ngxMenu]',\r\n exportAs: 'ngxMenu',\r\n})\r\nexport class NgxMenu implements OnDestroy {\r\n ngxMenu = input.required<NgxMenuPanel>();\r\n placement = input<Placement>();\r\n alignment = input<Alignment>();\r\n\r\n private containerRef?: OverlayRef<NgxMenuPanel>;\r\n\r\n constructor(\r\n private el: ElementRef,\r\n private appRef: ApplicationRef,\r\n private overlayService: OverlayService,\r\n ) {}\r\n\r\n ngOnDestroy(): void {\r\n this.destroyContainer();\r\n }\r\n\r\n @HostListener('click', ['$event'])\r\n onClick(ev: Event) {\r\n ev.stopPropagation();\r\n ev.preventDefault();\r\n this.toggleContainer();\r\n }\r\n\r\n private toggleContainer() {\r\n if (this.containerRef) {\r\n this.destroyContainer();\r\n return;\r\n }\r\n const t = this.ngxMenu().template();\r\n if (!t) return;\r\n this.containerRef = this.overlayService.openTemplate({\r\n anchor: this.el.nativeElement,\r\n template: t,\r\n appRef: this.appRef,\r\n alignment: this.alignment() ?? 'start',\r\n placement: this.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.ngxMenu().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 { 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 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', (ev) => this.onClick(ev));\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.destroyContainer();\r\n this.el.nativeElement.removeEventListener('contextmenu', (ev) => this.onClick(ev));\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';\r\n\r\nexport interface MenuContext {\r\n close(): void;\r\n}\r\n\r\nexport const NGX_MENU_CONTEXT = new InjectionToken<MenuContext>('ngx-menu-context');\r\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\" [ngClass]=\"class()\">\n <ng-content></ng-content>\n </div>\n </ng-template>\n `,\n exportAs: 'NgxMenu',\n styles: `\n .ngx-menu-panel {\n overflow: auto;\n box-sizing: border-box;\n outline: 0;\n background-color: var(--ngx-menu-bg, #ffffff);\n color: var(--ngx-menu-fg, #111111);\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 &:hover {\n cursor: pointer;\n background-color: var(--ngx-menu-item-padding, #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',\n template: `\n <div class=\"ngx-menu-divider\"></div>\n `,\n styles: `\n .ngx-menu-divider {\n border-bottom: var(--ngx-menu-item-border, 1px #43434d95 solid);\n border-bottom-color: var(--ngx-menu-divider-border-color, #43434d95);\n }\n `,\n})\nexport class NgxMenuDivider {}\n","import { NgModule } from '@angular/core';\r\nimport { NgxMenuDivider } from './components/ngx-menu-divider/menu-divider.component';\r\nimport { NgxMenuItem } from './components/ngx-menu-item/menu-item.component';\r\nimport { NgxMenuPanel } from './components/ngx-menu/menu.component';\r\nimport { NgxMenu } from './directives/ngx-menu.directive';\r\nimport { NgxContextMenu } from './public-api';\r\n\r\nconst d = [NgxMenu, NgxContextMenu, NgxMenuPanel, NgxMenuItem, NgxMenuDivider];\r\n@NgModule({\r\n imports: d,\r\n exports: d,\r\n})\r\nexport class NgxMenuModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"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,GAA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AA,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;;;;"}
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, output, signal, inject, DOCUMENT, ElementRef, afterNextRender, Input, Component, EnvironmentInjector, ApplicationRef, createComponent, Injectable, makeEnvironmentProviders, provideEnvironmentInitializer, Injector } from '@angular/core';
|
|
3
|
+
import { WINDOW } from 'ngx-kit/shared';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
|
|
6
|
+
const NGX_NOTIFY_CONFIG = new InjectionToken('NgxNotifyOption');
|
|
7
|
+
const NGX_NOTIFY_API = new InjectionToken('NgxNotifyService');
|
|
8
|
+
const NGX_NOTIFY_DEFAULTS = {
|
|
9
|
+
timeout: 3000,
|
|
10
|
+
position: 'top-center',
|
|
11
|
+
maxVisible: 10,
|
|
12
|
+
allowHtml: false,
|
|
13
|
+
pauseOnHover: true,
|
|
14
|
+
dismissible: true,
|
|
15
|
+
containerClass: 'ngx-bg-notify',
|
|
16
|
+
notificationClass: 'ngx-notify',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Static facade so call sites can use: Notify.warn('msg', opts)
|
|
21
|
+
* Module will set the service instance in its constructor.
|
|
22
|
+
*/
|
|
23
|
+
class Notify {
|
|
24
|
+
static injector;
|
|
25
|
+
static show(message, type = 'info', options) {
|
|
26
|
+
if (!Notify.injector) {
|
|
27
|
+
console.error('ngx-notify: Error on EnvironmentProvider. Ensure "provideNotify()" in root provider.');
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
Notify.injector.get(NGX_NOTIFY_API).show(message, type, options);
|
|
31
|
+
}
|
|
32
|
+
static info(message, options) {
|
|
33
|
+
this.show(message, 'info', options);
|
|
34
|
+
}
|
|
35
|
+
static success(message, options) {
|
|
36
|
+
this.show(message, 'success', options);
|
|
37
|
+
}
|
|
38
|
+
static warning(message, options) {
|
|
39
|
+
this.show(message, 'warning', options);
|
|
40
|
+
}
|
|
41
|
+
static error(message, options) {
|
|
42
|
+
this.show(message, 'error', options);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
class NgxPgNotificationComponent {
|
|
47
|
+
cdr;
|
|
48
|
+
payload;
|
|
49
|
+
containerClass = 'ngx-notify';
|
|
50
|
+
onClose = output();
|
|
51
|
+
onFinish = output();
|
|
52
|
+
_timeoutId = null;
|
|
53
|
+
_remaining = 0;
|
|
54
|
+
_endTs = 0;
|
|
55
|
+
_paused = false;
|
|
56
|
+
safeMessage = '';
|
|
57
|
+
showClass = signal('', /* @ts-ignore */
|
|
58
|
+
...(ngDevMode ? [{ debugName: "showClass" }] : /* istanbul ignore next */ []));
|
|
59
|
+
doc = inject(DOCUMENT);
|
|
60
|
+
el = inject(ElementRef);
|
|
61
|
+
constructor(cdr) {
|
|
62
|
+
this.cdr = cdr;
|
|
63
|
+
afterNextRender(() => {
|
|
64
|
+
this.showClass.set('ngx-show');
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
ngOnInit() {
|
|
68
|
+
// decide how to render message
|
|
69
|
+
if (this.payload.options.allowHtml) {
|
|
70
|
+
this.safeMessage = this.payload.message;
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
this.safeMessage = this.escapeHtml(this.payload.message);
|
|
74
|
+
}
|
|
75
|
+
if (this.payload.options.timeout && this.payload.options.timeout > 0) {
|
|
76
|
+
this.startTimer(this.payload.options.timeout);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
ngOnDestroy() {
|
|
80
|
+
this.clearTimer();
|
|
81
|
+
}
|
|
82
|
+
// Public API to start timer (used by service when created)
|
|
83
|
+
startTimer(ms) {
|
|
84
|
+
this.clearTimer();
|
|
85
|
+
this._remaining = ms;
|
|
86
|
+
this._endTs = Date.now() + ms;
|
|
87
|
+
this._timeoutId = setTimeout(() => this.onFinish.emit({ id: this.payload.id, el: this.el.nativeElement }), ms);
|
|
88
|
+
}
|
|
89
|
+
pauseTimer() {
|
|
90
|
+
if (!this._timeoutId)
|
|
91
|
+
return;
|
|
92
|
+
this._paused = true;
|
|
93
|
+
clearTimeout(this._timeoutId);
|
|
94
|
+
this._remaining = Math.max(0, this._endTs - Date.now());
|
|
95
|
+
}
|
|
96
|
+
resumeTimer() {
|
|
97
|
+
if (!this._paused || this._remaining <= 0)
|
|
98
|
+
return;
|
|
99
|
+
this._paused = false;
|
|
100
|
+
this.startTimer(this._remaining);
|
|
101
|
+
}
|
|
102
|
+
close(ev) {
|
|
103
|
+
if (ev)
|
|
104
|
+
ev.stopPropagation();
|
|
105
|
+
this.onClose.emit({ id: this.payload.id, el: this.el.nativeElement });
|
|
106
|
+
}
|
|
107
|
+
onMouseEnter() {
|
|
108
|
+
if (this.payload.options.pauseOnHover)
|
|
109
|
+
this.pauseTimer();
|
|
110
|
+
}
|
|
111
|
+
onMouseLeave() {
|
|
112
|
+
if (this.payload.options.pauseOnHover)
|
|
113
|
+
this.resumeTimer();
|
|
114
|
+
}
|
|
115
|
+
escapeHtml(input) {
|
|
116
|
+
const div = this.doc.createElement('div');
|
|
117
|
+
div.appendChild(this.doc.createTextNode(input));
|
|
118
|
+
return div.innerHTML;
|
|
119
|
+
}
|
|
120
|
+
ngOnDestroyCleanup() {
|
|
121
|
+
this.clearTimer();
|
|
122
|
+
}
|
|
123
|
+
clearTimer() {
|
|
124
|
+
if (this._timeoutId) {
|
|
125
|
+
clearTimeout(this._timeoutId);
|
|
126
|
+
this._timeoutId = null;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxPgNotificationComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
130
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.4", type: NgxPgNotificationComponent, isStandalone: true, selector: "ngx-notification", inputs: { payload: "payload", containerClass: "containerClass" }, outputs: { onClose: "onClose", onFinish: "onFinish" }, ngImport: i0, template: "<div\n class=\"{{ containerClass }} {{ containerClass }}-{{ payload.type }} {{ showClass() }}\"\n role=\"status\"\n (mouseenter)=\"onMouseEnter()\"\n (mouseleave)=\"onMouseLeave()\"\n [attr.aria-live]=\"payload.type === 'error' || payload.type === 'warning' ? 'assertive' : 'polite'\"\n [attr.data-id]=\"payload.id\">\n <span [innerHTML]=\"safeMessage\"></span>\n @if (payload.options.dismissible) {\n <button class=\"ngx-close\" (click)=\"close($event)\" aria-label=\"close\">\u00D7</button>\n }\n</div>\n", styles: [":host{display:block;margin:8px 0}.ngx-notify{min-width:240px;width:500px;max-width:100%;padding:14px 18px;border-radius:8px;box-shadow:0 10px 30px #00000014;font-family:Inter,Roboto,Arial,sans-serif;font-size:14px;text-align:center;opacity:0;transform:translateY(-8px);transition:opacity .28s ease,transform .28s ease;pointer-events:auto}.ngx-show{opacity:1;transform:translateY(0)}.ngx-notify-info{background:#0a78cc;color:#e8f3ff}.ngx-notify-success{background:#03bc50;color:#ebeceb}.ngx-notify-warning{background:#e28408;color:#fff4e5}.ngx-notify-error{background:#e7012b;color:#ffecec}.ngx-close{position:absolute;right:8px;top:6px;background:transparent;border:none;font-size:18px;cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
131
|
+
}
|
|
132
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxPgNotificationComponent, decorators: [{
|
|
133
|
+
type: Component,
|
|
134
|
+
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 [attr.aria-live]=\"payload.type === 'error' || payload.type === 'warning' ? 'assertive' : 'polite'\"\n [attr.data-id]=\"payload.id\">\n <span [innerHTML]=\"safeMessage\"></span>\n @if (payload.options.dismissible) {\n <button class=\"ngx-close\" (click)=\"close($event)\" aria-label=\"close\">\u00D7</button>\n }\n</div>\n", styles: [":host{display:block;margin:8px 0}.ngx-notify{min-width:240px;width:500px;max-width:100%;padding:14px 18px;border-radius:8px;box-shadow:0 10px 30px #00000014;font-family:Inter,Roboto,Arial,sans-serif;font-size:14px;text-align:center;opacity:0;transform:translateY(-8px);transition:opacity .28s ease,transform .28s ease;pointer-events:auto}.ngx-show{opacity:1;transform:translateY(0)}.ngx-notify-info{background:#0a78cc;color:#e8f3ff}.ngx-notify-success{background:#03bc50;color:#ebeceb}.ngx-notify-warning{background:#e28408;color:#fff4e5}.ngx-notify-error{background:#e7012b;color:#ffecec}.ngx-close{position:absolute;right:8px;top:6px;background:transparent;border:none;font-size:18px;cursor:pointer}\n"] }]
|
|
135
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { payload: [{
|
|
136
|
+
type: Input
|
|
137
|
+
}], containerClass: [{
|
|
138
|
+
type: Input
|
|
139
|
+
}], onClose: [{ type: i0.Output, args: ["onClose"] }], onFinish: [{ type: i0.Output, args: ["onFinish"] }] } });
|
|
140
|
+
|
|
141
|
+
// We'll include a tiny inline uuid fallback if uuid package is not available
|
|
142
|
+
function makeId() {
|
|
143
|
+
// simple random id
|
|
144
|
+
return 'n_' + Math.random().toString(36).substr(2, 9);
|
|
145
|
+
}
|
|
146
|
+
class NgxNotifyService {
|
|
147
|
+
queue = [];
|
|
148
|
+
visible = [];
|
|
149
|
+
container = null;
|
|
150
|
+
envInjector = inject(EnvironmentInjector);
|
|
151
|
+
appRef = inject(ApplicationRef);
|
|
152
|
+
doc = inject(DOCUMENT);
|
|
153
|
+
win = inject(WINDOW);
|
|
154
|
+
defaultOptions = inject(NGX_NOTIFY_CONFIG);
|
|
155
|
+
constructor() { }
|
|
156
|
+
configureContainer(position, containerClass) {
|
|
157
|
+
if (this.container)
|
|
158
|
+
return; // created already
|
|
159
|
+
const container = this.doc.createElement('div');
|
|
160
|
+
container.className = containerClass + ' ngx-notify-container ' + `ngx-pos-${position}`;
|
|
161
|
+
container.style.position = 'fixed';
|
|
162
|
+
container.style.zIndex = '99999';
|
|
163
|
+
// center special
|
|
164
|
+
if (position === 'center') {
|
|
165
|
+
container.style.left = '50%';
|
|
166
|
+
container.style.top = '50%';
|
|
167
|
+
container.style.transform = 'translate(-50%,-50%)';
|
|
168
|
+
container.style.display = 'flex';
|
|
169
|
+
container.style.flexDirection = 'column';
|
|
170
|
+
container.style.alignItems = 'center';
|
|
171
|
+
container.style.pointerEvents = 'none';
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
if (position?.includes('center')) {
|
|
175
|
+
container.style.left = '50%';
|
|
176
|
+
container.style.transform = 'translateX(-50%)';
|
|
177
|
+
}
|
|
178
|
+
// corners
|
|
179
|
+
if (position?.includes('top'))
|
|
180
|
+
container.style.top = '20px';
|
|
181
|
+
else
|
|
182
|
+
container.style.bottom = '20px';
|
|
183
|
+
if (position?.includes('left'))
|
|
184
|
+
container.style.left = '20px';
|
|
185
|
+
// else container.style.right = '20px';
|
|
186
|
+
container.style.display = 'flex';
|
|
187
|
+
container.style.flexDirection = 'column';
|
|
188
|
+
if (position?.includes('bottom'))
|
|
189
|
+
container.style.flexDirection = 'column-reverse';
|
|
190
|
+
container.style.pointerEvents = 'none';
|
|
191
|
+
}
|
|
192
|
+
this.doc.body.appendChild(container);
|
|
193
|
+
this.container = container;
|
|
194
|
+
}
|
|
195
|
+
show(message, type = 'info', options) {
|
|
196
|
+
const opts = { ...this.defaultOptions, ...(options || {}) };
|
|
197
|
+
const id = typeof this.win.crypto?.randomUUID === 'function'
|
|
198
|
+
? this.win.crypto.randomUUID()
|
|
199
|
+
: makeId();
|
|
200
|
+
const payload = { id, message, type, options: opts };
|
|
201
|
+
this.configureContainer(opts.position, opts.containerClass);
|
|
202
|
+
// queue or show immediately
|
|
203
|
+
if (this.visible.length >= opts.maxVisible) {
|
|
204
|
+
this.queue.push(payload);
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
this._createAndShow(payload);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
_createAndShow(payload) {
|
|
211
|
+
if (!this.container)
|
|
212
|
+
this.configureContainer(payload.options.position, payload.options.containerClass);
|
|
213
|
+
const host = document.createElement('div');
|
|
214
|
+
this.container.appendChild(host);
|
|
215
|
+
const compRef = createComponent(NgxPgNotificationComponent, {
|
|
216
|
+
environmentInjector: this.envInjector,
|
|
217
|
+
hostElement: host,
|
|
218
|
+
});
|
|
219
|
+
compRef.instance.payload = payload;
|
|
220
|
+
compRef.instance.onClose.subscribe((d) => this.removeEl(d));
|
|
221
|
+
compRef.instance.onFinish.subscribe((d) => this.removeEl(d));
|
|
222
|
+
// Registers the component’s view so it participates in change detection cycle.
|
|
223
|
+
this.appRef.attachView(compRef.hostView);
|
|
224
|
+
// store visible
|
|
225
|
+
this.visible.push({ ref: compRef, payload });
|
|
226
|
+
}
|
|
227
|
+
removeNode(node, id) {
|
|
228
|
+
node.style.opacity = '0';
|
|
229
|
+
node.style.transform = 'translateY(-30px)';
|
|
230
|
+
node.style.transition = 'all 300ms';
|
|
231
|
+
setTimeout(() => {
|
|
232
|
+
const item = this.visible.find((x) => x.payload.id === id);
|
|
233
|
+
if (item) {
|
|
234
|
+
this.appRef.attachView(item.ref.hostView);
|
|
235
|
+
item.ref.destroy();
|
|
236
|
+
}
|
|
237
|
+
this.visible = this.visible.filter((v) => v.payload.id !== id);
|
|
238
|
+
// show next in queue
|
|
239
|
+
this._showNextIfPossible();
|
|
240
|
+
}, 300);
|
|
241
|
+
}
|
|
242
|
+
removeEl(d) {
|
|
243
|
+
if (d.el)
|
|
244
|
+
this.removeNode(d.el, d.id);
|
|
245
|
+
else {
|
|
246
|
+
// if in queue remove it
|
|
247
|
+
this.queue = this.queue.filter((q) => q.id !== d.id);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
_showNextIfPossible() {
|
|
251
|
+
if (!this.queue.length)
|
|
252
|
+
return;
|
|
253
|
+
const next = this.queue.shift();
|
|
254
|
+
// ensure we don't exceed maxVisible
|
|
255
|
+
if (this.visible.length < next.options.maxVisible) {
|
|
256
|
+
this._createAndShow(next);
|
|
257
|
+
}
|
|
258
|
+
else {
|
|
259
|
+
// push back
|
|
260
|
+
this.queue.unshift(next);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxNotifyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
264
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxNotifyService, providedIn: 'root' });
|
|
265
|
+
}
|
|
266
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxNotifyService, decorators: [{
|
|
267
|
+
type: Injectable,
|
|
268
|
+
args: [{ providedIn: 'root' }]
|
|
269
|
+
}], ctorParameters: () => [] });
|
|
270
|
+
|
|
271
|
+
function provideNotify(options) {
|
|
272
|
+
return makeEnvironmentProviders([
|
|
273
|
+
{
|
|
274
|
+
provide: NGX_NOTIFY_CONFIG,
|
|
275
|
+
useValue: { ...NGX_NOTIFY_DEFAULTS, ...(options || {}) },
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
provide: NGX_NOTIFY_API,
|
|
279
|
+
useExisting: NgxNotifyService,
|
|
280
|
+
},
|
|
281
|
+
provideEnvironmentInitializer(() => {
|
|
282
|
+
Notify.injector = inject(Injector);
|
|
283
|
+
}),
|
|
284
|
+
]);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Generated bundle index. Do not edit.
|
|
289
|
+
*/
|
|
290
|
+
|
|
291
|
+
export { Notify, provideNotify };
|
|
292
|
+
//# sourceMappingURL=ngx-kit-notify.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-kit-notify.mjs","sources":["../../../projects/libs/notify/models/notify-config.ts","../../../projects/libs/notify/notify-facade.ts","../../../projects/libs/notify/components/notification.component.ts","../../../projects/libs/notify/components/notification.component.html","../../../projects/libs/notify/services/notify.service.ts","../../../projects/libs/notify/notify-provider.ts","../../../projects/libs/notify/ngx-kit-notify.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { NgxNotifyOptions } from './notify-options';\nimport { NgxNotifyService } from '../services/notify.service';\n\nexport const NGX_NOTIFY_CONFIG = new InjectionToken<NgxNotifyOptions>('NgxNotifyOption');\nexport const NGX_NOTIFY_API = new InjectionToken<NgxNotifyService>('NgxNotifyService');\n\nexport const NGX_NOTIFY_DEFAULTS: Required<NgxNotifyOptions> = {\n timeout: 3000,\n position: 'top-center',\n maxVisible: 10,\n allowHtml: false,\n pauseOnHover: true,\n dismissible: true,\n containerClass: 'ngx-bg-notify',\n notificationClass: 'ngx-notify',\n};\n","import { Injector } from '@angular/core';\nimport { NgxNotifyOptions } from './models/notify-options';\nimport { NGX_NOTIFY_API } from './models/notify-config';\n\n/**\n * Static facade so call sites can use: Notify.warn('msg', opts)\n * Module will set the service instance in its constructor.\n */\nexport class Notify {\n static injector: Injector;\n\n static show(\n message: string,\n type: 'info' | 'success' | 'warning' | 'error' = 'info',\n options?: NgxNotifyOptions,\n ) {\n if (!Notify.injector) {\n console.error(\n 'ngx-notify: Error on EnvironmentProvider. Ensure \"provideNotify()\" in root provider.',\n );\n return;\n }\n Notify.injector.get(NGX_NOTIFY_API).show(message, type, options);\n }\n\n static info(message: string, options?: NgxNotifyOptions) {\n this.show(message, 'info', options);\n }\n static success(message: string, options?: NgxNotifyOptions) {\n this.show(message, 'success', options);\n }\n static warning(message: string, options?: NgxNotifyOptions) {\n this.show(message, 'warning', options);\n }\n static error(message: string, options?: NgxNotifyOptions) {\n this.show(message, 'error', options);\n }\n}\n","import {\n Component,\n OnInit,\n OnDestroy,\n Input,\n ChangeDetectorRef,\n DOCUMENT,\n inject,\n ElementRef,\n Renderer2,\n afterNextRender,\n signal,\n output,\n} from '@angular/core';\nimport { INotifyEnd, NgxNotifyPayload } from '../models/notify.model';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'ngx-notification',\n templateUrl: './notification.component.html',\n styleUrls: ['./notification.component.scss'],\n imports: [CommonModule],\n})\nexport class NgxPgNotificationComponent implements OnInit, OnDestroy {\n @Input() payload!: NgxNotifyPayload;\n @Input() containerClass = 'ngx-notify';\n\n onClose = output<INotifyEnd>();\n onFinish = output<INotifyEnd>();\n\n private _timeoutId: any = null;\n private _remaining = 0;\n private _endTs = 0;\n private _paused = false;\n\n safeMessage = '';\n showClass = signal('');\n private doc = inject(DOCUMENT);\n private el = inject(ElementRef);\n constructor(private cdr: ChangeDetectorRef) {\n afterNextRender(() => {\n this.showClass.set('ngx-show');\n });\n }\n\n ngOnInit(): void {\n // decide how to render message\n if (this.payload.options.allowHtml) {\n this.safeMessage = this.payload.message;\n } else {\n this.safeMessage = this.escapeHtml(this.payload.message);\n }\n\n if (this.payload.options.timeout && this.payload.options.timeout > 0) {\n this.startTimer(this.payload.options.timeout);\n }\n }\n\n ngOnDestroy(): void {\n this.clearTimer();\n }\n\n // Public API to start timer (used by service when created)\n startTimer(ms: number) {\n this.clearTimer();\n this._remaining = ms;\n this._endTs = Date.now() + ms;\n this._timeoutId = setTimeout(\n () => this.onFinish.emit({ id: this.payload.id, el: this.el.nativeElement }),\n ms,\n );\n }\n pauseTimer() {\n if (!this._timeoutId) return;\n this._paused = true;\n clearTimeout(this._timeoutId);\n this._remaining = Math.max(0, this._endTs - Date.now());\n }\n\n resumeTimer() {\n if (!this._paused || this._remaining <= 0) return;\n this._paused = false;\n this.startTimer(this._remaining);\n }\n\n close(ev?: Event) {\n if (ev) ev.stopPropagation();\n this.onClose.emit({ id: this.payload.id, el: this.el.nativeElement });\n }\n\n onMouseEnter() {\n if (this.payload.options.pauseOnHover) this.pauseTimer();\n }\n onMouseLeave() {\n if (this.payload.options.pauseOnHover) this.resumeTimer();\n }\n\n escapeHtml(input: string) {\n const div = this.doc.createElement('div');\n div.appendChild(this.doc.createTextNode(input));\n return div.innerHTML;\n }\n\n ngOnDestroyCleanup() {\n this.clearTimer();\n }\n\n private clearTimer() {\n if (this._timeoutId) {\n clearTimeout(this._timeoutId);\n this._timeoutId = null;\n }\n }\n}\n","<div\n class=\"{{ containerClass }} {{ containerClass }}-{{ payload.type }} {{ showClass() }}\"\n role=\"status\"\n (mouseenter)=\"onMouseEnter()\"\n (mouseleave)=\"onMouseLeave()\"\n [attr.aria-live]=\"payload.type === 'error' || payload.type === 'warning' ? 'assertive' : 'polite'\"\n [attr.data-id]=\"payload.id\">\n <span [innerHTML]=\"safeMessage\"></span>\n @if (payload.options.dismissible) {\n <button class=\"ngx-close\" (click)=\"close($event)\" aria-label=\"close\">×</button>\n }\n</div>\n","import {\n Injectable,\n ComponentRef,\n DOCUMENT,\n inject,\n createComponent,\n Injector,\n EnvironmentInjector,\n ApplicationRef,\n} from '@angular/core';\nimport { NgxNotifyOptions } from '../models/notify-options';\nimport { INotifyEnd, NgxNotifyPayload, NgxPgNotifyType } from '../models/notify.model';\nimport { WINDOW } from 'ngx-kit/shared';\nimport { NGX_NOTIFY_CONFIG } from '../models/notify-config';\nimport { NgxPgNotificationComponent } from '../components/notification.component';\n\n// We'll include a tiny inline uuid fallback if uuid package is not available\nfunction makeId() {\n // simple random id\n return 'n_' + Math.random().toString(36).substr(2, 9);\n}\n\n@Injectable({ providedIn: 'root' })\nexport class NgxNotifyService {\n private queue: NgxNotifyPayload[] = [];\n private visible: { ref: ComponentRef<any>; payload: NgxNotifyPayload }[] = [];\n private container: HTMLElement | null = null;\n\n private envInjector = inject(EnvironmentInjector);\n private appRef = inject(ApplicationRef);\n private doc = inject(DOCUMENT);\n private win = inject(WINDOW);\n private defaultOptions = inject(NGX_NOTIFY_CONFIG);\n constructor() {}\n\n configureContainer(position: NgxNotifyOptions['position'], containerClass: string) {\n if (this.container) return; // created already\n\n const container = this.doc.createElement('div');\n container.className = containerClass + ' ngx-notify-container ' + `ngx-pos-${position}`;\n container.style.position = 'fixed';\n container.style.zIndex = '99999';\n\n // center special\n if (position === 'center') {\n container.style.left = '50%';\n container.style.top = '50%';\n container.style.transform = 'translate(-50%,-50%)';\n container.style.display = 'flex';\n container.style.flexDirection = 'column';\n container.style.alignItems = 'center';\n container.style.pointerEvents = 'none';\n } else {\n if (position?.includes('center')) {\n container.style.left = '50%';\n container.style.transform = 'translateX(-50%)';\n }\n // corners\n if (position?.includes('top')) container.style.top = '20px';\n else container.style.bottom = '20px';\n if (position?.includes('left')) container.style.left = '20px';\n // else container.style.right = '20px';\n container.style.display = 'flex';\n container.style.flexDirection = 'column';\n if (position?.includes('bottom')) container.style.flexDirection = 'column-reverse';\n container.style.pointerEvents = 'none';\n }\n\n this.doc.body.appendChild(container);\n this.container = container;\n }\n\n show(message: string, type: NgxPgNotifyType = 'info', options?: NgxNotifyOptions) {\n const opts: NgxNotifyOptions = { ...this.defaultOptions, ...(options || {}) };\n const id =\n typeof (this.win as any).crypto?.randomUUID === 'function'\n ? (this.win as any).crypto.randomUUID()\n : makeId();\n\n const payload: NgxNotifyPayload = { id, message, type, options: opts };\n\n this.configureContainer(opts.position!, opts.containerClass!);\n\n // queue or show immediately\n if (this.visible.length >= opts.maxVisible!) {\n this.queue.push(payload);\n } else {\n this._createAndShow(payload);\n }\n }\n\n private _createAndShow(payload: NgxNotifyPayload) {\n if (!this.container)\n this.configureContainer(payload.options.position!, payload.options.containerClass!);\n const host = document.createElement('div');\n this.container!.appendChild(host);\n\n const compRef = createComponent(NgxPgNotificationComponent, {\n environmentInjector: this.envInjector,\n hostElement: host,\n });\n compRef.instance.payload = payload;\n compRef.instance.onClose.subscribe((d) => this.removeEl(d));\n compRef.instance.onFinish.subscribe((d) => this.removeEl(d));\n\n // Registers the component’s view so it participates in change detection cycle.\n this.appRef.attachView(compRef.hostView);\n // store visible\n this.visible.push({ ref: compRef, payload });\n }\n private removeNode(node: HTMLElement, id: string) {\n node.style.opacity = '0';\n node.style.transform = 'translateY(-30px)';\n node.style.transition = 'all 300ms';\n setTimeout(() => {\n const item = this.visible.find((x) => x.payload.id === id);\n if (item) {\n this.appRef.attachView(item.ref.hostView);\n item.ref.destroy();\n }\n this.visible = this.visible.filter((v) => v.payload.id !== id);\n // show next in queue\n this._showNextIfPossible();\n }, 300);\n }\n\n private removeEl(d: INotifyEnd) {\n if (d.el) this.removeNode(d.el, d.id);\n else {\n // if in queue remove it\n this.queue = this.queue.filter((q) => q.id !== d.id);\n }\n }\n\n private _showNextIfPossible() {\n if (!this.queue.length) return;\n const next = this.queue.shift()!;\n // ensure we don't exceed maxVisible\n if (this.visible.length < next.options.maxVisible!) {\n this._createAndShow(next);\n } else {\n // push back\n this.queue.unshift(next);\n }\n }\n}\n","import {\r\n EnvironmentProviders,\r\n inject,\r\n Injector,\r\n makeEnvironmentProviders,\r\n provideEnvironmentInitializer,\r\n} from '@angular/core';\r\nimport { NGX_NOTIFY_API, NGX_NOTIFY_CONFIG, NGX_NOTIFY_DEFAULTS } from './models/notify-config';\r\nimport { NgxNotifyOptions } from './models/notify-options';\r\nimport { Notify as NotifyFacade } from './notify-facade';\r\nimport { NgxNotifyService } from './services/notify.service';\r\nexport function provideNotify(options?: NgxNotifyOptions): EnvironmentProviders {\r\n return makeEnvironmentProviders([\r\n {\r\n provide: NGX_NOTIFY_CONFIG,\r\n useValue: { ...NGX_NOTIFY_DEFAULTS, ...(options || {}) },\r\n },\r\n {\r\n provide: NGX_NOTIFY_API,\r\n useExisting: NgxNotifyService,\r\n },\r\n provideEnvironmentInitializer(() => {\r\n NotifyFacade.injector = inject(Injector);\r\n }),\r\n ]);\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["NotifyFacade"],"mappings":";;;;;AAIO,MAAM,iBAAiB,GAAG,IAAI,cAAc,CAAmB,iBAAiB,CAAC;AACjF,MAAM,cAAc,GAAG,IAAI,cAAc,CAAmB,kBAAkB,CAAC;AAE/E,MAAM,mBAAmB,GAA+B;AAC7D,IAAA,OAAO,EAAE,IAAI;AACb,IAAA,QAAQ,EAAE,YAAY;AACtB,IAAA,UAAU,EAAE,EAAE;AACd,IAAA,SAAS,EAAE,KAAK;AAChB,IAAA,YAAY,EAAE,IAAI;AAClB,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,cAAc,EAAE,eAAe;AAC/B,IAAA,iBAAiB,EAAE,YAAY;CAChC;;ACZD;;;AAGG;MACU,MAAM,CAAA;IACjB,OAAO,QAAQ;IAEf,OAAO,IAAI,CACT,OAAe,EACf,IAAA,GAAiD,MAAM,EACvD,OAA0B,EAAA;AAE1B,QAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;AACpB,YAAA,OAAO,CAAC,KAAK,CACX,sFAAsF,CACvF;YACD;QACF;AACA,QAAA,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC;IAClE;AAEA,IAAA,OAAO,IAAI,CAAC,OAAe,EAAE,OAA0B,EAAA;QACrD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC;IACrC;AACA,IAAA,OAAO,OAAO,CAAC,OAAe,EAAE,OAA0B,EAAA;QACxD,IAAI,CAAC,IAAI,CAAC,OAAO,E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