ngwr 0.2.0 → 0.3.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.
@@ -0,0 +1,447 @@
1
+ import { trigger, state, style, transition, animate } from '@angular/animations';
2
+ import * as i3 from '@angular/cdk/portal';
3
+ import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, PortalModule } from '@angular/cdk/portal';
4
+ import * as i0 from '@angular/core';
5
+ import { EventEmitter, Directive, Component, ViewEncapsulation, ViewChild, HostBinding, HostListener, Optional, Input, InjectionToken, Injector, Injectable, SkipSelf, NgModule } from '@angular/core';
6
+ import { Subject, filter, take, takeUntil } from 'rxjs';
7
+ import * as i2 from '@angular/cdk/overlay';
8
+ import { OverlayConfig, OverlayRef, OverlayModule, OverlayContainer, FullscreenOverlayContainer } from '@angular/cdk/overlay';
9
+ import { hasModifierKey } from '@angular/cdk/keycodes';
10
+ import { WrAbstractBase } from 'ngwr/core/abstract';
11
+ import { CommonModule } from '@angular/common';
12
+ import { WrIconModule } from 'ngwr/icon';
13
+
14
+ const WR_ANIMATION_ZOOM_CLASS_NAME_MAP = {
15
+ enter: 'wr-animation-zoom-enter',
16
+ enterActive: 'wr-animation-zoom-enter--active',
17
+ leave: 'wr-animation-zoom-leave',
18
+ leaveActive: 'wr-animation-zoom-leave--active',
19
+ };
20
+ const WR_ANIMATION_FADE_CLASS_NAME_MAP = {
21
+ enter: 'wr-animation-fade-enter',
22
+ enterActive: 'wr-animation-fade-enter--active',
23
+ leave: 'wr-animation-fade-leave',
24
+ leaveActive: 'wr-animation-fade-leave--active',
25
+ };
26
+ const wrDialogAnimations = {
27
+ dialogContainer: trigger('dialogContainer', [
28
+ state('void, exit', style({})),
29
+ state('enter', style({})),
30
+ transition('* => enter', animate('.24s', style({}))),
31
+ transition('* => void, * => exit', animate('.2s', style({}))),
32
+ ]),
33
+ };
34
+
35
+ class WrDialogConfig {
36
+ }
37
+
38
+ class WrDialogBase extends BasePortalOutlet {
39
+ constructor(cdr, config, overlayRef) {
40
+ super();
41
+ this.cdr = cdr;
42
+ this.config = config;
43
+ this.overlayRef = overlayRef;
44
+ this.containerClick = new EventEmitter();
45
+ this.animationStateChanged = new EventEmitter();
46
+ this.state = 'enter';
47
+ this.destroyed$ = new Subject();
48
+ }
49
+ ngOnDestroy() {
50
+ this.destroyed$.next();
51
+ this.destroyed$.complete();
52
+ }
53
+ onContainerClick(e) {
54
+ if (e.target === e.currentTarget || e.target === this.dialogElementRef.nativeElement) {
55
+ this.containerClick.emit();
56
+ }
57
+ }
58
+ attachComponentPortal(portal) {
59
+ return this.portalOutlet.attachComponentPortal(portal);
60
+ }
61
+ attachTemplatePortal(portal) {
62
+ return this.portalOutlet.attachTemplatePortal(portal);
63
+ }
64
+ setEnterAnimationClass() {
65
+ const dialogElement = this.dialogElementRef.nativeElement;
66
+ const backdropElement = this.overlayRef.backdropElement;
67
+ dialogElement.classList.add(WR_ANIMATION_ZOOM_CLASS_NAME_MAP.enter);
68
+ dialogElement.classList.add(WR_ANIMATION_ZOOM_CLASS_NAME_MAP.enterActive);
69
+ if (backdropElement) {
70
+ backdropElement.classList.add(WR_ANIMATION_FADE_CLASS_NAME_MAP.enter);
71
+ backdropElement.classList.add(WR_ANIMATION_FADE_CLASS_NAME_MAP.enterActive);
72
+ }
73
+ }
74
+ setExitAnimationClass() {
75
+ const dialogElement = this.dialogElementRef.nativeElement;
76
+ dialogElement.classList.add(WR_ANIMATION_ZOOM_CLASS_NAME_MAP.leave);
77
+ dialogElement.classList.add(WR_ANIMATION_ZOOM_CLASS_NAME_MAP.leaveActive);
78
+ this.setMaskExitAnimationClass();
79
+ }
80
+ setMaskExitAnimationClass() {
81
+ const backdropElement = this.overlayRef.backdropElement;
82
+ if (backdropElement) {
83
+ backdropElement.classList.add(WR_ANIMATION_FADE_CLASS_NAME_MAP.leave);
84
+ backdropElement.classList.add(WR_ANIMATION_FADE_CLASS_NAME_MAP.leaveActive);
85
+ }
86
+ }
87
+ cleanAnimationClass() {
88
+ const backdropElement = this.overlayRef.backdropElement;
89
+ const dialogElement = this.dialogElementRef.nativeElement;
90
+ if (backdropElement) {
91
+ backdropElement.classList.remove(WR_ANIMATION_FADE_CLASS_NAME_MAP.enter);
92
+ backdropElement.classList.remove(WR_ANIMATION_FADE_CLASS_NAME_MAP.enterActive);
93
+ }
94
+ dialogElement.classList.remove(WR_ANIMATION_ZOOM_CLASS_NAME_MAP.enter);
95
+ dialogElement.classList.remove(WR_ANIMATION_ZOOM_CLASS_NAME_MAP.enterActive);
96
+ dialogElement.classList.remove(WR_ANIMATION_ZOOM_CLASS_NAME_MAP.leave);
97
+ dialogElement.classList.remove(WR_ANIMATION_ZOOM_CLASS_NAME_MAP.leaveActive);
98
+ }
99
+ onAnimationDone(event) {
100
+ this.cleanAnimationClass();
101
+ this.animationStateChanged.emit(event);
102
+ }
103
+ onAnimationStart(event) {
104
+ if (event.toState === 'enter') {
105
+ this.setEnterAnimationClass();
106
+ }
107
+ else if (event.toState === 'exit') {
108
+ this.setExitAnimationClass();
109
+ }
110
+ this.animationStateChanged.emit(event);
111
+ }
112
+ startExitAnimation() {
113
+ this.state = 'exit';
114
+ this.cdr.markForCheck();
115
+ }
116
+ }
117
+ WrDialogBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrDialogBase, deps: [{ token: i0.ChangeDetectorRef }, { token: WrDialogConfig }, { token: i2.OverlayRef }], target: i0.ɵɵFactoryTarget.Directive });
118
+ WrDialogBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.10", type: WrDialogBase, usesInheritance: true, ngImport: i0 });
119
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrDialogBase, decorators: [{
120
+ type: Directive
121
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: WrDialogConfig }, { type: i2.OverlayRef }]; } });
122
+
123
+ class WrDialogContainer extends WrDialogBase {
124
+ constructor(cdr, config, overlayRef) {
125
+ super(cdr, config, overlayRef);
126
+ this.config = config;
127
+ this.state = 'enter';
128
+ }
129
+ onAnimationStart(event) {
130
+ super.onAnimationStart(event);
131
+ }
132
+ onAnimationDone(event) {
133
+ super.onAnimationDone(event);
134
+ }
135
+ onContainerClick(e) {
136
+ super.onContainerClick(e);
137
+ }
138
+ /** Set element classes */
139
+ get elClasses() {
140
+ return {
141
+ 'wr-dialog': true,
142
+ };
143
+ }
144
+ }
145
+ WrDialogContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrDialogContainer, deps: [{ token: i0.ChangeDetectorRef }, { token: WrDialogConfig }, { token: i2.OverlayRef }], target: i0.ɵɵFactoryTarget.Component });
146
+ WrDialogContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.10", type: WrDialogContainer, selector: "wr-dialog-container", host: { listeners: { "@dialogContainer.start": "onAnimationStart($event)", "@dialogContainer.done": "onAnimationDone($event)", "click": "onContainerClick($event)" }, properties: { "@dialogContainer": "this.state", "class": "this.elClasses" } }, viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }, { propertyName: "dialogElementRef", first: true, predicate: ["dialogElement"], descendants: true, static: true }], exportAs: ["wrDialogContainer"], usesInheritance: true, ngImport: i0, template: "<div class=\"wr-dialog__wrapper\" #dialogElement>\n <ng-template cdkPortalOutlet></ng-template>\n</div>\n", dependencies: [{ kind: "directive", type: i3.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], animations: [wrDialogAnimations.dialogContainer], encapsulation: i0.ViewEncapsulation.None });
147
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrDialogContainer, decorators: [{
148
+ type: Component,
149
+ args: [{ selector: 'wr-dialog-container', exportAs: 'wrDialogContainer', animations: [wrDialogAnimations.dialogContainer], encapsulation: ViewEncapsulation.None, template: "<div class=\"wr-dialog__wrapper\" #dialogElement>\n <ng-template cdkPortalOutlet></ng-template>\n</div>\n" }]
150
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: WrDialogConfig }, { type: i2.OverlayRef }]; }, propDecorators: { portalOutlet: [{
151
+ type: ViewChild,
152
+ args: [CdkPortalOutlet, { static: true }]
153
+ }], dialogElementRef: [{
154
+ type: ViewChild,
155
+ args: ['dialogElement', { static: true }]
156
+ }], state: [{
157
+ type: HostBinding,
158
+ args: ['@dialogContainer']
159
+ }], onAnimationStart: [{
160
+ type: HostListener,
161
+ args: ['@dialogContainer.start', ['$event']]
162
+ }], onAnimationDone: [{
163
+ type: HostListener,
164
+ args: ['@dialogContainer.done', ['$event']]
165
+ }], onContainerClick: [{
166
+ type: HostListener,
167
+ args: ['click', ['$event']]
168
+ }], elClasses: [{
169
+ type: HostBinding,
170
+ args: ['class']
171
+ }] } });
172
+
173
+ class WrDialogRef extends WrAbstractBase {
174
+ constructor(config, overlayRef, containerInstance) {
175
+ super();
176
+ this.config = config;
177
+ this.overlayRef = overlayRef;
178
+ this.containerInstance = containerInstance;
179
+ this.componentInstance = null;
180
+ this.afterClosed = new Subject();
181
+ this.afterOpened = new Subject();
182
+ this.id = config.id || `wr__modal__${Date.now()}`;
183
+ containerInstance.animationStateChanged
184
+ .pipe(filter(event => event.phaseName === 'done' && event.toState === 'enter'), take(1))
185
+ .subscribe(() => {
186
+ this.afterOpened.next();
187
+ this.afterOpened.complete();
188
+ });
189
+ containerInstance.animationStateChanged
190
+ .pipe(filter(event => event.phaseName === 'done' && event.toState === 'exit'), take(1))
191
+ .subscribe(() => {
192
+ clearTimeout(this.closeTimeout);
193
+ this._finishDialogClose();
194
+ });
195
+ containerInstance.containerClick.pipe(take(1), takeUntil(this.destroyed$)).subscribe(() => {
196
+ this.close(undefined);
197
+ });
198
+ overlayRef.backdropClick().subscribe(() => this.close(undefined));
199
+ overlayRef.keydownEvents().subscribe(event => {
200
+ if (event.code === 'Escape' && !hasModifierKey(event)) {
201
+ event.preventDefault();
202
+ this.close(undefined);
203
+ }
204
+ });
205
+ overlayRef.detachments().subscribe(() => {
206
+ this.afterClosed.next(this.result);
207
+ this.afterClosed.complete();
208
+ this.componentInstance = null;
209
+ this.overlayRef.dispose();
210
+ });
211
+ }
212
+ close(result) {
213
+ this.result = result;
214
+ this.containerInstance.animationStateChanged
215
+ .pipe(filter(event => event.phaseName === 'start'), take(1))
216
+ .subscribe(event => {
217
+ this.overlayRef.detachBackdrop();
218
+ // @ts-ignore
219
+ this.closeTimeout = setTimeout(() => {
220
+ this._finishDialogClose();
221
+ }, event.totalTime + 100);
222
+ });
223
+ this.containerInstance.startExitAnimation();
224
+ }
225
+ _finishDialogClose() {
226
+ this.overlayRef.dispose();
227
+ this.destroyed$.next();
228
+ }
229
+ }
230
+
231
+ class WrDialogClose {
232
+ constructor(dialogRef) {
233
+ this.dialogRef = dialogRef;
234
+ }
235
+ _onButtonClick(event) {
236
+ event.preventDefault();
237
+ this.dialogRef.close(undefined);
238
+ }
239
+ }
240
+ WrDialogClose.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrDialogClose, deps: [{ token: WrDialogRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
241
+ WrDialogClose.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.10", type: WrDialogClose, selector: "[wr-dialog-close], [wrDialogClose]", host: { listeners: { "click": "_onButtonClick($event)" } }, exportAs: ["wrDialogClose"], ngImport: i0 });
242
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrDialogClose, decorators: [{
243
+ type: Directive,
244
+ args: [{
245
+ selector: '[wr-dialog-close], [wrDialogClose]',
246
+ exportAs: 'wrDialogClose',
247
+ }]
248
+ }], ctorParameters: function () { return [{ type: WrDialogRef, decorators: [{
249
+ type: Optional
250
+ }] }]; }, propDecorators: { _onButtonClick: [{
251
+ type: HostListener,
252
+ args: ['click', ['$event']]
253
+ }] } });
254
+ class WrDialogTitle {
255
+ get elClasses() {
256
+ return {
257
+ 'wr-dialog__title': true,
258
+ };
259
+ }
260
+ }
261
+ WrDialogTitle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrDialogTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
262
+ WrDialogTitle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.10", type: WrDialogTitle, selector: "[wr-dialog-title], [wrDialogTitle]", host: { properties: { "class": "this.elClasses" } }, exportAs: ["wrtDialogTitle"], ngImport: i0 });
263
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrDialogTitle, decorators: [{
264
+ type: Directive,
265
+ args: [{
266
+ selector: '[wr-dialog-title], [wrDialogTitle]',
267
+ exportAs: 'wrtDialogTitle',
268
+ }]
269
+ }], propDecorators: { elClasses: [{
270
+ type: HostBinding,
271
+ args: ['class']
272
+ }] } });
273
+ class WrDialogContent {
274
+ get elClasses() {
275
+ return {
276
+ 'wr-dialog__content': true,
277
+ };
278
+ }
279
+ }
280
+ WrDialogContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrDialogContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
281
+ WrDialogContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.10", type: WrDialogContent, selector: "[wr-dialog-content], wr-dialog-content, [wrDialogContent]", host: { properties: { "class": "this.elClasses" } }, ngImport: i0 });
282
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrDialogContent, decorators: [{
283
+ type: Directive,
284
+ args: [{
285
+ selector: `[wr-dialog-content], wr-dialog-content, [wrDialogContent]`,
286
+ }]
287
+ }], propDecorators: { elClasses: [{
288
+ type: HostBinding,
289
+ args: ['class']
290
+ }] } });
291
+ class WrDialogFooter {
292
+ constructor(cdr) {
293
+ this.cdr = cdr;
294
+ this._position = 'end';
295
+ }
296
+ get position() {
297
+ return this._position;
298
+ }
299
+ set position(value) {
300
+ this._position = value;
301
+ this.cdr.markForCheck();
302
+ }
303
+ get elClasses() {
304
+ return {
305
+ 'wr-dialog__footer': true,
306
+ 'wr-dialog__footer--start': this.position === 'start',
307
+ 'wr-dialog__footer--center': this.position === 'center',
308
+ 'wr-dialog__footer--end': this.position === 'end',
309
+ };
310
+ }
311
+ }
312
+ WrDialogFooter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrDialogFooter, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
313
+ WrDialogFooter.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.10", type: WrDialogFooter, selector: "[wr-dialog-footer], wr-dialog-footer, [wrDialogFooter]", inputs: { position: "position" }, host: { properties: { "class": "this.elClasses" } }, ngImport: i0 });
314
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrDialogFooter, decorators: [{
315
+ type: Directive,
316
+ args: [{
317
+ selector: `[wr-dialog-footer], wr-dialog-footer, [wrDialogFooter]`,
318
+ }]
319
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { position: [{
320
+ type: Input
321
+ }], elClasses: [{
322
+ type: HostBinding,
323
+ args: ['class']
324
+ }] } });
325
+
326
+ const WR_DIALOG_DATA = new InjectionToken('WR_DIALOG_DATA');
327
+
328
+ class WrDialogService {
329
+ constructor(overlay, injector, parentModal) {
330
+ this.overlay = overlay;
331
+ this.injector = injector;
332
+ this.parentModal = parentModal;
333
+ this.openedDialogsAtThisLevel = [];
334
+ this.afterAllClosedAtThisLevel = new Subject();
335
+ }
336
+ get openedDialogs() {
337
+ return this.parentModal ? this.parentModal.openedDialogs : this.openedDialogsAtThisLevel;
338
+ }
339
+ get _afterAllClosed() {
340
+ const parent = this.parentModal;
341
+ return parent ? parent._afterAllClosed : this.afterAllClosedAtThisLevel;
342
+ }
343
+ ngOnDestroy() {
344
+ this.closeModals(this.openedDialogsAtThisLevel);
345
+ this.afterAllClosedAtThisLevel.complete();
346
+ }
347
+ open(config) {
348
+ const _config = config || new WrDialogConfig();
349
+ const positionStrategy = _config?.positionStrategy || this._defaultPositionStrategy();
350
+ const overlayRef = this._createOverlay(positionStrategy);
351
+ const dialogContainer = this._attachDialogContainer(overlayRef, _config);
352
+ const dialogRef = this._attachDialogContent(dialogContainer, overlayRef, _config);
353
+ dialogContainer.dialogRef = dialogRef;
354
+ this.openedDialogs.push(dialogRef);
355
+ dialogRef.afterClosed.subscribe(() => this.removeOpenModal(dialogRef));
356
+ return dialogRef;
357
+ }
358
+ removeOpenModal(dialogRef) {
359
+ const index = this.openedDialogs.indexOf(dialogRef);
360
+ if (index > -1) {
361
+ this.openedDialogs.splice(index, 1);
362
+ if (!this.openedDialogs.length) {
363
+ this._afterAllClosed.next();
364
+ }
365
+ }
366
+ }
367
+ closeModals(dialogs) {
368
+ let i = dialogs.length;
369
+ while (i--) {
370
+ dialogs[i].close();
371
+ if (!this.openedDialogs.length) {
372
+ this._afterAllClosed.next();
373
+ }
374
+ }
375
+ }
376
+ _defaultPositionStrategy() {
377
+ return this.overlay.position().global().centerHorizontally().centerVertically();
378
+ }
379
+ _createOverlay(positionStrategy) {
380
+ const overlayConfig = new OverlayConfig({
381
+ positionStrategy,
382
+ hasBackdrop: true,
383
+ backdropClass: 'wr-backdrop',
384
+ scrollStrategy: this.overlay.scrollStrategies.block(),
385
+ disposeOnNavigation: true,
386
+ });
387
+ return this.overlay.create(overlayConfig);
388
+ }
389
+ _attachDialogContainer(overlayRef, config) {
390
+ const userInjector = config && config.viewContainerRef && config.viewContainerRef?.injector;
391
+ const injector = Injector.create({
392
+ parent: userInjector || this.injector,
393
+ providers: [
394
+ { provide: OverlayRef, useValue: overlayRef },
395
+ { provide: WrDialogConfig, useValue: config },
396
+ ],
397
+ });
398
+ const containerPortal = new ComponentPortal(WrDialogContainer, config.viewContainerRef, injector);
399
+ const containerRef = overlayRef.attach(containerPortal);
400
+ return containerRef.instance;
401
+ }
402
+ _attachDialogContent(dialogContainer, overlayRef, config) {
403
+ const dialogRef = new WrDialogRef(config, overlayRef, dialogContainer);
404
+ const userInjector = config && config.viewContainerRef && config.viewContainerRef?.injector;
405
+ const injector = Injector.create({
406
+ parent: userInjector || this.injector,
407
+ providers: [
408
+ { provide: WrDialogRef, useValue: dialogRef },
409
+ { provide: WR_DIALOG_DATA, useValue: config.data },
410
+ ],
411
+ });
412
+ const contentRef = dialogContainer.attachComponentPortal(new ComponentPortal(config.component, config.viewContainerRef, injector));
413
+ dialogRef.componentInstance = contentRef.instance;
414
+ return dialogRef;
415
+ }
416
+ }
417
+ WrDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrDialogService, deps: [{ token: i2.Overlay }, { token: i0.Injector }, { token: WrDialogService, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Injectable });
418
+ WrDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrDialogService });
419
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrDialogService, decorators: [{
420
+ type: Injectable
421
+ }], ctorParameters: function () { return [{ type: i2.Overlay }, { type: i0.Injector }, { type: WrDialogService, decorators: [{
422
+ type: Optional
423
+ }, {
424
+ type: SkipSelf
425
+ }] }]; } });
426
+
427
+ class WrDialogModule {
428
+ }
429
+ WrDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
430
+ WrDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.10", ngImport: i0, type: WrDialogModule, declarations: [WrDialogContainer, WrDialogClose, WrDialogTitle, WrDialogContent, WrDialogFooter], imports: [CommonModule, OverlayModule, PortalModule, WrIconModule], exports: [WrDialogContainer, WrDialogClose, WrDialogTitle, WrDialogContent, WrDialogFooter] });
431
+ WrDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrDialogModule, providers: [WrDialogService, { provide: OverlayContainer, useClass: FullscreenOverlayContainer }], imports: [CommonModule, OverlayModule, PortalModule, WrIconModule] });
432
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrDialogModule, decorators: [{
433
+ type: NgModule,
434
+ args: [{
435
+ imports: [CommonModule, OverlayModule, PortalModule, WrIconModule],
436
+ exports: [WrDialogContainer, WrDialogClose, WrDialogTitle, WrDialogContent, WrDialogFooter],
437
+ declarations: [WrDialogContainer, WrDialogClose, WrDialogTitle, WrDialogContent, WrDialogFooter],
438
+ providers: [WrDialogService, { provide: OverlayContainer, useClass: FullscreenOverlayContainer }],
439
+ }]
440
+ }] });
441
+
442
+ /**
443
+ * Generated bundle index. Do not edit.
444
+ */
445
+
446
+ export { WR_ANIMATION_FADE_CLASS_NAME_MAP, WR_ANIMATION_ZOOM_CLASS_NAME_MAP, WR_DIALOG_DATA, WrDialogBase, WrDialogClose, WrDialogConfig, WrDialogContainer, WrDialogContent, WrDialogFooter, WrDialogModule, WrDialogRef, WrDialogService, WrDialogTitle, wrDialogAnimations };
447
+ //# sourceMappingURL=ngwr-dialog.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngwr-dialog.mjs","sources":["../../../projects/lib/dialog/dialog-animations.ts","../../../projects/lib/dialog/dialog-config.ts","../../../projects/lib/dialog/dialog-base.ts","../../../projects/lib/dialog/dialog-container.ts","../../../projects/lib/dialog/dialog-container.html","../../../projects/lib/dialog/dialog-ref.ts","../../../projects/lib/dialog/dialog-content-directives.ts","../../../projects/lib/dialog/dialog-tokens.ts","../../../projects/lib/dialog/dialog-service.ts","../../../projects/lib/dialog/dialog-module.ts","../../../projects/lib/dialog/ngwr-dialog.ts"],"sourcesContent":["import { animate, AnimationTriggerMetadata, state, style, transition, trigger } from '@angular/animations';\n\nexport const WR_ANIMATION_ZOOM_CLASS_NAME_MAP = {\n enter: 'wr-animation-zoom-enter',\n enterActive: 'wr-animation-zoom-enter--active',\n leave: 'wr-animation-zoom-leave',\n leaveActive: 'wr-animation-zoom-leave--active',\n};\n\nexport const WR_ANIMATION_FADE_CLASS_NAME_MAP = {\n enter: 'wr-animation-fade-enter',\n enterActive: 'wr-animation-fade-enter--active',\n leave: 'wr-animation-fade-leave',\n leaveActive: 'wr-animation-fade-leave--active',\n};\n\nexport const wrDialogAnimations: {\n readonly dialogContainer: AnimationTriggerMetadata;\n} = {\n dialogContainer: trigger('dialogContainer', [\n state('void, exit', style({})),\n state('enter', style({})),\n transition('* => enter', animate('.24s', style({}))),\n transition('* => void, * => exit', animate('.2s', style({}))),\n ]),\n};\n","import { ComponentType, PositionStrategy } from '@angular/cdk/overlay';\nimport { ViewContainerRef } from '@angular/core';\n\nimport { SafeAny } from 'ngwr/core/types';\n\nexport class WrDialogConfig<T = SafeAny> {\n id?: string;\n component?: ComponentType<T>;\n title?: string;\n data?: SafeAny;\n viewContainerRef?: ViewContainerRef;\n positionStrategy?: PositionStrategy;\n}\n","import { AnimationEvent } from '@angular/animations';\nimport { OverlayRef } from '@angular/cdk/overlay';\nimport { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport {\n ChangeDetectorRef,\n ComponentRef,\n Directive,\n ElementRef,\n EmbeddedViewRef,\n EventEmitter,\n OnDestroy,\n} from '@angular/core';\nimport { Subject } from 'rxjs';\n\nimport { WR_ANIMATION_FADE_CLASS_NAME_MAP, WR_ANIMATION_ZOOM_CLASS_NAME_MAP } from './dialog-animations';\nimport { WrDialogConfig } from './dialog-config';\nimport { WrDialogRef } from './dialog-ref';\n\n@Directive()\nexport class WrDialogBase extends BasePortalOutlet implements OnDestroy {\n portalOutlet!: CdkPortalOutlet;\n dialogElementRef!: ElementRef<HTMLDivElement>;\n dialogRef!: WrDialogRef;\n\n containerClick = new EventEmitter<void>();\n animationStateChanged = new EventEmitter<AnimationEvent>();\n\n state: 'void' | 'enter' | 'exit' = 'enter';\n\n protected readonly destroyed$: Subject<void> = new Subject<void>();\n\n constructor(public cdr: ChangeDetectorRef, public config: WrDialogConfig, protected overlayRef: OverlayRef) {\n super();\n }\n\n ngOnDestroy(): void {\n this.destroyed$.next();\n this.destroyed$.complete();\n }\n\n onContainerClick(e: MouseEvent): void {\n if (e.target === e.currentTarget || e.target === this.dialogElementRef.nativeElement) {\n this.containerClick.emit();\n }\n }\n\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n return this.portalOutlet.attachComponentPortal(portal);\n }\n\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n return this.portalOutlet.attachTemplatePortal(portal);\n }\n\n private setEnterAnimationClass(): void {\n const dialogElement = this.dialogElementRef.nativeElement;\n const backdropElement = this.overlayRef.backdropElement;\n dialogElement.classList.add(WR_ANIMATION_ZOOM_CLASS_NAME_MAP.enter);\n dialogElement.classList.add(WR_ANIMATION_ZOOM_CLASS_NAME_MAP.enterActive);\n if (backdropElement) {\n backdropElement.classList.add(WR_ANIMATION_FADE_CLASS_NAME_MAP.enter);\n backdropElement.classList.add(WR_ANIMATION_FADE_CLASS_NAME_MAP.enterActive);\n }\n }\n\n private setExitAnimationClass(): void {\n const dialogElement = this.dialogElementRef.nativeElement;\n dialogElement.classList.add(WR_ANIMATION_ZOOM_CLASS_NAME_MAP.leave);\n dialogElement.classList.add(WR_ANIMATION_ZOOM_CLASS_NAME_MAP.leaveActive);\n this.setMaskExitAnimationClass();\n }\n\n private setMaskExitAnimationClass(): void {\n const backdropElement = this.overlayRef.backdropElement;\n if (backdropElement) {\n backdropElement.classList.add(WR_ANIMATION_FADE_CLASS_NAME_MAP.leave);\n backdropElement.classList.add(WR_ANIMATION_FADE_CLASS_NAME_MAP.leaveActive);\n }\n }\n\n private cleanAnimationClass(): void {\n const backdropElement = this.overlayRef.backdropElement;\n const dialogElement = this.dialogElementRef.nativeElement;\n if (backdropElement) {\n backdropElement.classList.remove(WR_ANIMATION_FADE_CLASS_NAME_MAP.enter);\n backdropElement.classList.remove(WR_ANIMATION_FADE_CLASS_NAME_MAP.enterActive);\n }\n dialogElement.classList.remove(WR_ANIMATION_ZOOM_CLASS_NAME_MAP.enter);\n dialogElement.classList.remove(WR_ANIMATION_ZOOM_CLASS_NAME_MAP.enterActive);\n dialogElement.classList.remove(WR_ANIMATION_ZOOM_CLASS_NAME_MAP.leave);\n dialogElement.classList.remove(WR_ANIMATION_ZOOM_CLASS_NAME_MAP.leaveActive);\n }\n\n onAnimationDone(event: AnimationEvent): void {\n this.cleanAnimationClass();\n this.animationStateChanged.emit(event);\n }\n\n onAnimationStart(event: AnimationEvent): void {\n if (event.toState === 'enter') {\n this.setEnterAnimationClass();\n } else if (event.toState === 'exit') {\n this.setExitAnimationClass();\n }\n this.animationStateChanged.emit(event);\n }\n\n startExitAnimation(): void {\n this.state = 'exit';\n this.cdr.markForCheck();\n }\n}\n","import { AnimationEvent } from '@angular/animations';\nimport { OverlayRef } from '@angular/cdk/overlay';\nimport { CdkPortalOutlet } from '@angular/cdk/portal';\nimport {\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n HostListener,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { SafeAny } from 'ngwr/core/types';\n\nimport { wrDialogAnimations } from './dialog-animations';\nimport { WrDialogBase } from './dialog-base';\nimport { WrDialogConfig } from './dialog-config';\n\n@Component({\n selector: 'wr-dialog-container',\n exportAs: 'wrDialogContainer',\n templateUrl: './dialog-container.html',\n animations: [wrDialogAnimations.dialogContainer],\n encapsulation: ViewEncapsulation.None,\n})\nexport class WrDialogContainer extends WrDialogBase {\n @ViewChild(CdkPortalOutlet, { static: true }) override portalOutlet!: CdkPortalOutlet;\n @ViewChild('dialogElement', { static: true }) override dialogElementRef!: ElementRef<HTMLDivElement>;\n\n @HostBinding('@dialogContainer') override state: 'void' | 'enter' | 'exit' = 'enter';\n @HostListener('@dialogContainer.start', ['$event'])\n override onAnimationStart(event: AnimationEvent): void {\n super.onAnimationStart(event);\n }\n @HostListener('@dialogContainer.done', ['$event'])\n override onAnimationDone(event: AnimationEvent): void {\n super.onAnimationDone(event);\n }\n\n @HostListener('click', ['$event'])\n override onContainerClick(e: MouseEvent): void {\n super.onContainerClick(e);\n }\n\n /** Set element classes */\n @HostBinding('class')\n get elClasses(): SafeAny {\n return {\n 'wr-dialog': true,\n };\n }\n\n constructor(cdr: ChangeDetectorRef, public override config: WrDialogConfig, overlayRef: OverlayRef) {\n super(cdr, config, overlayRef);\n }\n}\n","<div class=\"wr-dialog__wrapper\" #dialogElement>\n <ng-template cdkPortalOutlet></ng-template>\n</div>\n","import { hasModifierKey } from '@angular/cdk/keycodes';\nimport { OverlayRef } from '@angular/cdk/overlay';\nimport { filter, Subject, take, takeUntil } from 'rxjs';\n\nimport { WrAbstractBase } from 'ngwr/core/abstract';\nimport { SafeAny } from 'ngwr/core/types';\n\nimport { WrDialogBase } from './dialog-base';\nimport { WrDialogConfig } from './dialog-config';\n\nexport class WrDialogRef<T = SafeAny, R = SafeAny> extends WrAbstractBase {\n readonly id?: string;\n result?: R;\n componentInstance: T | null = null;\n private closeTimeout?: number;\n readonly afterClosed: Subject<R | undefined> = new Subject<R | undefined>();\n readonly afterOpened: Subject<void> = new Subject();\n\n constructor(\n private readonly config: WrDialogConfig<T>,\n private readonly overlayRef: OverlayRef,\n public containerInstance: WrDialogBase\n ) {\n super();\n this.id = config.id || `wr__modal__${Date.now()}`;\n\n containerInstance.animationStateChanged\n .pipe(\n filter(event => event.phaseName === 'done' && event.toState === 'enter'),\n take(1)\n )\n .subscribe(() => {\n this.afterOpened.next();\n this.afterOpened.complete();\n });\n\n containerInstance.animationStateChanged\n .pipe(\n filter(event => event.phaseName === 'done' && event.toState === 'exit'),\n take(1)\n )\n .subscribe(() => {\n clearTimeout(this.closeTimeout);\n this._finishDialogClose();\n });\n\n containerInstance.containerClick.pipe(take(1), takeUntil(this.destroyed$)).subscribe(() => {\n this.close(undefined);\n });\n\n overlayRef.backdropClick().subscribe(() => this.close(undefined));\n\n overlayRef.keydownEvents().subscribe(event => {\n if (event.code === 'Escape' && !hasModifierKey(event)) {\n event.preventDefault();\n this.close(undefined);\n }\n });\n\n overlayRef.detachments().subscribe(() => {\n this.afterClosed.next(this.result);\n this.afterClosed.complete();\n this.componentInstance = null;\n this.overlayRef.dispose();\n });\n }\n\n close(result?: R): void {\n this.result = result;\n this.containerInstance.animationStateChanged\n .pipe(\n filter(event => event.phaseName === 'start'),\n take(1)\n )\n .subscribe(event => {\n this.overlayRef.detachBackdrop();\n // @ts-ignore\n this.closeTimeout = setTimeout(() => {\n this._finishDialogClose();\n }, event.totalTime + 100);\n });\n\n this.containerInstance.startExitAnimation();\n }\n\n _finishDialogClose(): void {\n this.overlayRef.dispose();\n this.destroyed$.next();\n }\n}\n","import { ChangeDetectorRef, Directive, HostBinding, HostListener, Input, Optional } from '@angular/core';\n\nimport { SafeAny } from 'ngwr/core/types';\nimport { WrDialogRef } from './dialog-ref';\n\n@Directive({\n selector: '[wr-dialog-close], [wrDialogClose]',\n exportAs: 'wrDialogClose',\n})\nexport class WrDialogClose {\n @HostListener('click', ['$event'])\n _onButtonClick(event: MouseEvent): void {\n event.preventDefault();\n this.dialogRef.close(undefined);\n }\n\n constructor(@Optional() public dialogRef: WrDialogRef) {}\n}\n\n@Directive({\n selector: '[wr-dialog-title], [wrDialogTitle]',\n exportAs: 'wrtDialogTitle',\n})\nexport class WrDialogTitle {\n @HostBinding('class')\n get elClasses(): SafeAny {\n return {\n 'wr-dialog__title': true,\n };\n }\n}\n\n@Directive({\n selector: `[wr-dialog-content], wr-dialog-content, [wrDialogContent]`,\n})\nexport class WrDialogContent {\n @HostBinding('class')\n get elClasses(): SafeAny {\n return {\n 'wr-dialog__content': true,\n };\n }\n}\n\n@Directive({\n selector: `[wr-dialog-footer], wr-dialog-footer, [wrDialogFooter]`,\n})\nexport class WrDialogFooter {\n @Input()\n get position(): 'start' | 'center' | 'end' {\n return this._position;\n }\n set position(value: 'start' | 'center' | 'end') {\n this._position = value;\n this.cdr.markForCheck();\n }\n private _position: 'start' | 'center' | 'end' = 'end';\n\n @HostBinding('class')\n get elClasses(): SafeAny {\n return {\n 'wr-dialog__footer': true,\n 'wr-dialog__footer--start': this.position === 'start',\n 'wr-dialog__footer--center': this.position === 'center',\n 'wr-dialog__footer--end': this.position === 'end',\n };\n }\n\n constructor(private readonly cdr: ChangeDetectorRef) {}\n}\n","import { InjectionToken } from '@angular/core';\n\nimport { SafeAny } from 'ngwr/core/types';\n\nexport const WR_DIALOG_DATA = new InjectionToken<SafeAny>('WR_DIALOG_DATA');\n","import {\n ComponentType,\n GlobalPositionStrategy,\n Overlay,\n OverlayConfig,\n OverlayRef,\n PositionStrategy,\n} from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { Injectable, Injector, OnDestroy, Optional, SkipSelf } from '@angular/core';\nimport { Subject } from 'rxjs';\n\nimport { SafeAny } from 'ngwr/core/types';\n\nimport { WrDialogBase } from './dialog-base';\nimport { WrDialogConfig } from './dialog-config';\nimport { WrDialogContainer } from './dialog-container';\nimport { WrDialogRef } from './dialog-ref';\nimport { WR_DIALOG_DATA } from './dialog-tokens';\n\n@Injectable()\nexport class WrDialogService implements OnDestroy {\n private openedDialogsAtThisLevel: WrDialogRef[] = [];\n private readonly afterAllClosedAtThisLevel = new Subject<void>();\n\n get openedDialogs(): WrDialogRef[] {\n return this.parentModal ? this.parentModal.openedDialogs : this.openedDialogsAtThisLevel;\n }\n\n get _afterAllClosed(): Subject<void> {\n const parent = this.parentModal;\n return parent ? parent._afterAllClosed : this.afterAllClosedAtThisLevel;\n }\n\n constructor(\n private readonly overlay: Overlay,\n private readonly injector: Injector,\n @Optional() @SkipSelf() private parentModal: WrDialogService\n ) {}\n\n ngOnDestroy(): void {\n this.closeModals(this.openedDialogsAtThisLevel);\n this.afterAllClosedAtThisLevel.complete();\n }\n\n open<T = SafeAny, R = SafeAny>(config: WrDialogConfig<T>): WrDialogRef<T, R> {\n const _config = config || new WrDialogConfig<SafeAny>();\n const positionStrategy = _config?.positionStrategy || this._defaultPositionStrategy();\n const overlayRef = this._createOverlay(positionStrategy);\n const dialogContainer = this._attachDialogContainer(overlayRef, _config);\n const dialogRef = this._attachDialogContent<T, R>(dialogContainer, overlayRef, _config);\n dialogContainer.dialogRef = dialogRef;\n this.openedDialogs.push(dialogRef);\n dialogRef.afterClosed.subscribe(() => this.removeOpenModal(dialogRef));\n return dialogRef;\n }\n\n private removeOpenModal(dialogRef: WrDialogRef): void {\n const index = this.openedDialogs.indexOf(dialogRef);\n if (index > -1) {\n this.openedDialogs.splice(index, 1);\n\n if (!this.openedDialogs.length) {\n this._afterAllClosed.next();\n }\n }\n }\n\n private closeModals(dialogs: WrDialogRef[]): void {\n let i = dialogs.length;\n while (i--) {\n dialogs[i].close();\n if (!this.openedDialogs.length) {\n this._afterAllClosed.next();\n }\n }\n }\n\n private _defaultPositionStrategy(): GlobalPositionStrategy {\n return this.overlay.position().global().centerHorizontally().centerVertically();\n }\n\n private _createOverlay(positionStrategy: PositionStrategy): OverlayRef {\n const overlayConfig = new OverlayConfig({\n positionStrategy,\n hasBackdrop: true,\n backdropClass: 'wr-backdrop',\n scrollStrategy: this.overlay.scrollStrategies.block(),\n disposeOnNavigation: true,\n });\n return this.overlay.create(overlayConfig);\n }\n\n private _attachDialogContainer(overlayRef: OverlayRef, config: WrDialogConfig): WrDialogBase {\n const userInjector = config && config.viewContainerRef && config.viewContainerRef?.injector;\n const injector = Injector.create({\n parent: userInjector || this.injector,\n providers: [\n { provide: OverlayRef, useValue: overlayRef },\n { provide: WrDialogConfig, useValue: config },\n ],\n });\n\n const containerPortal = new ComponentPortal<WrDialogBase>(WrDialogContainer, config.viewContainerRef, injector);\n const containerRef = overlayRef.attach<WrDialogBase>(containerPortal);\n return containerRef.instance;\n }\n\n private _attachDialogContent<T, R>(\n dialogContainer: WrDialogBase,\n overlayRef: OverlayRef,\n config: WrDialogConfig<T>\n ): WrDialogRef<T, R> {\n const dialogRef = new WrDialogRef<T, R>(config, overlayRef, dialogContainer);\n\n const userInjector = config && config.viewContainerRef && config.viewContainerRef?.injector;\n const injector = Injector.create({\n parent: userInjector || this.injector,\n providers: [\n { provide: WrDialogRef, useValue: dialogRef },\n { provide: WR_DIALOG_DATA, useValue: config.data },\n ],\n });\n\n const contentRef = dialogContainer.attachComponentPortal<T>(\n new ComponentPortal(config.component as ComponentType<T>, config.viewContainerRef, injector)\n );\n dialogRef.componentInstance = contentRef.instance;\n return dialogRef;\n }\n}\n","import { FullscreenOverlayContainer, OverlayContainer, OverlayModule } from '@angular/cdk/overlay';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { WrIconModule } from 'ngwr/icon';\n\nimport { WrDialogContainer } from './dialog-container';\nimport { WrDialogClose, WrDialogContent, WrDialogFooter, WrDialogTitle } from './dialog-content-directives';\nimport { WrDialogService } from './dialog-service';\n\n@NgModule({\n imports: [CommonModule, OverlayModule, PortalModule, WrIconModule],\n exports: [WrDialogContainer, WrDialogClose, WrDialogTitle, WrDialogContent, WrDialogFooter],\n declarations: [WrDialogContainer, WrDialogClose, WrDialogTitle, WrDialogContent, WrDialogFooter],\n providers: [WrDialogService, { provide: OverlayContainer, useClass: FullscreenOverlayContainer }],\n})\nexport class WrDialogModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.WrDialogConfig","i1.WrDialogRef","i1"],"mappings":";;;;;;;;;;;;;AAEa,MAAA,gCAAgC,GAAG;AAC9C,IAAA,KAAK,EAAE,yBAAyB;AAChC,IAAA,WAAW,EAAE,iCAAiC;AAC9C,IAAA,KAAK,EAAE,yBAAyB;AAChC,IAAA,WAAW,EAAE,iCAAiC;EAC9C;AAEW,MAAA,gCAAgC,GAAG;AAC9C,IAAA,KAAK,EAAE,yBAAyB;AAChC,IAAA,WAAW,EAAE,iCAAiC;AAC9C,IAAA,KAAK,EAAE,yBAAyB;AAChC,IAAA,WAAW,EAAE,iCAAiC;EAC9C;AAEW,MAAA,kBAAkB,GAE3B;AACF,IAAA,eAAe,EAAE,OAAO,CAAC,iBAAiB,EAAE;AAC1C,QAAA,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;AAC9B,QAAA,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;AACzB,QAAA,UAAU,CAAC,YAAY,EAAE,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;AACpD,QAAA,UAAU,CAAC,sBAAsB,EAAE,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;KAC9D,CAAC;;;MCnBS,cAAc,CAAA;AAO1B;;ACOK,MAAO,YAAa,SAAQ,gBAAgB,CAAA;AAYhD,IAAA,WAAA,CAAmB,GAAsB,EAAS,MAAsB,EAAY,UAAsB,EAAA;AACxG,QAAA,KAAK,EAAE,CAAC;QADS,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;QAAS,IAAM,CAAA,MAAA,GAAN,MAAM,CAAgB;QAAY,IAAU,CAAA,UAAA,GAAV,UAAU,CAAY;AAP1G,QAAA,IAAA,CAAA,cAAc,G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E,eAAe,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA;6GAI/E,cAAc,EAAA,SAAA,EAFd,CAAC,eAAe,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,0BAA0B,EAAE,CAAC,EAHvF,OAAA,EAAA,CAAA,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,CAAA,EAAA,CAAA,CAAA;4FAKtD,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,CAAC;oBAClE,OAAO,EAAE,CAAC,iBAAiB,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,CAAC;oBAC3F,YAAY,EAAE,CAAC,iBAAiB,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,CAAC;AAChG,oBAAA,SAAS,EAAE,CAAC,eAAe,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,0BAA0B,EAAE,CAAC;AAClG,iBAAA,CAAA;;;AChBD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngwr",
3
- "version": "0.2.0",
3
+ "version": "0.3.1",
4
4
  "license": "MIT",
5
5
  "description": "NGWR – Angular UI components library",
6
6
  "author": "Roman Khegay <rk@garuna.dev> (https://garuna.dev/)",
@@ -81,6 +81,14 @@
81
81
  "node": "./fesm2015/ngwr-core-types.mjs",
82
82
  "default": "./fesm2020/ngwr-core-types.mjs"
83
83
  },
84
+ "./dialog": {
85
+ "types": "./dialog/index.d.ts",
86
+ "esm2020": "./esm2020/dialog/ngwr-dialog.mjs",
87
+ "es2020": "./fesm2020/ngwr-dialog.mjs",
88
+ "es2015": "./fesm2015/ngwr-dialog.mjs",
89
+ "node": "./fesm2015/ngwr-dialog.mjs",
90
+ "default": "./fesm2020/ngwr-dialog.mjs"
91
+ },
84
92
  "./divider": {
85
93
  "types": "./divider/index.d.ts",
86
94
  "esm2020": "./esm2020/divider/ngwr-divider.mjs",
@@ -143,6 +151,7 @@
143
151
  "tslib": "^2.3.0"
144
152
  },
145
153
  "peerDependencies": {
154
+ "@angular/animations": ">=14.0.0 <15.0.0",
146
155
  "@angular/common": ">=14.0.0 <15.0.0",
147
156
  "@angular/core": ">=14.0.0 <15.0.0",
148
157
  "@angular/forms": ">=14.0.0 <15.0.0",
@@ -12,3 +12,81 @@
12
12
  100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
13
13
  }
14
14
 
15
+ @keyframes wr-fade-in {
16
+ 0% { opacity: 0 }
17
+ to { opacity: 1 }
18
+ }
19
+ @keyframes wr-fade-out {
20
+ 0% { opacity: 1 }
21
+ to { opacity: 0 }
22
+ }
23
+
24
+ @keyframes wr-zoom-in {
25
+ 0% { transform: scale(.2); opacity: 0 }
26
+ to { transform: scale(1); opacity: 1 }
27
+ }
28
+ @keyframes wr-zoom-out {
29
+ 0% { transform: scale(1) }
30
+ to { transform: scale(.2); opacity:0 }
31
+ }
32
+
33
+ .wr-animation {
34
+ &-fade {
35
+ &-enter,
36
+ &-leave {
37
+ animation-duration: 0.2s;
38
+ animation-fill-mode: both;
39
+ animation-play-state: paused;
40
+ animation-timing-function: linear;
41
+ }
42
+
43
+ &-enter {
44
+ opacity: 0;
45
+
46
+ &--active {
47
+ animation-name: wr-fade-in;
48
+ animation-play-state:running;
49
+ }
50
+ }
51
+
52
+ &-leave {
53
+ opacity: 1;
54
+
55
+ &--active {
56
+ animation-name: wr-fade-out;
57
+ animation-play-state: running;
58
+ pointer-events: none;
59
+ }
60
+ }
61
+ }
62
+
63
+ &-zoom {
64
+ &-enter,
65
+ &-leave {
66
+ animation-duration: 0.2s;
67
+ animation-fill-mode: both;
68
+ animation-play-state: paused
69
+ }
70
+
71
+ &-enter {
72
+ transform: scale(0);
73
+ opacity: 0;
74
+ animation-timing-function: cubic-bezier(.08,.82,.17,1);
75
+
76
+ &--active {
77
+ animation-name: wr-zoom-in;
78
+ animation-play-state:running;
79
+ }
80
+ }
81
+
82
+ &-leave {
83
+ animation-timing-function: cubic-bezier(.78,.14,.15,.86);
84
+
85
+ &--active {
86
+ animation-name: wr-zoom-out;
87
+ animation-play-state: running;
88
+ pointer-events: none;
89
+ }
90
+ }
91
+ }
92
+ }
@@ -0,0 +1 @@
1
+ @import '@angular/cdk/overlay-prebuilt.css';