1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | import { ChangeDetectorRef, Component, EventEmitter, HostListener, Injectable, Input, NgModule, Output, Renderer2, ViewChild } from '@angular/core';
|
7 | import { CommonModule } from '@angular/common';
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | var NgxSmartModalService = (function () {
|
14 | function NgxSmartModalService() {
|
15 | this.modalStack = [];
|
16 | }
|
17 | |
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 | NgxSmartModalService.prototype.addModal = |
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 | function (modalInstance, force) {
|
34 | if (force) {
|
35 | var i = this.modalStack.findIndex(function (o) {
|
36 | return o.id === modalInstance.id;
|
37 | });
|
38 | if (i > -1) {
|
39 | this.modalStack[i].modal = modalInstance.modal;
|
40 | }
|
41 | else {
|
42 | this.modalStack.push(modalInstance);
|
43 | }
|
44 | return;
|
45 | }
|
46 | this.modalStack.push(modalInstance);
|
47 | };
|
48 | |
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 | NgxSmartModalService.prototype.getModal = |
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 | function (id) {
|
61 | return this.modalStack.filter(function (o) {
|
62 | return o.id === id;
|
63 | })[0].modal;
|
64 | };
|
65 | |
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 | NgxSmartModalService.prototype.get = |
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 | function (id) {
|
78 | return this.getModal(id);
|
79 | };
|
80 | |
81 |
|
82 |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 | NgxSmartModalService.prototype.open = |
88 |
|
89 |
|
90 |
|
91 |
|
92 |
|
93 |
|
94 | function (id, force) {
|
95 | if (force === void 0) { force = false; }
|
96 | var instance = this.modalStack.find(function (o) {
|
97 | return o.id === id;
|
98 | });
|
99 | if (!!instance) {
|
100 | instance.modal.open(force);
|
101 | }
|
102 | else {
|
103 | throw new Error('Modal not found');
|
104 | }
|
105 | };
|
106 | |
107 |
|
108 |
|
109 |
|
110 |
|
111 |
|
112 | NgxSmartModalService.prototype.close = |
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 | function (id) {
|
119 | var instance = this.modalStack.find(function (o) {
|
120 | return o.id === id;
|
121 | });
|
122 | if (!!instance) {
|
123 | instance.modal.close();
|
124 | }
|
125 | else {
|
126 | throw new Error('Modal not found');
|
127 | }
|
128 | };
|
129 | |
130 |
|
131 |
|
132 |
|
133 |
|
134 |
|
135 |
|
136 |
|
137 | NgxSmartModalService.prototype.toggle = |
138 |
|
139 |
|
140 |
|
141 |
|
142 |
|
143 |
|
144 |
|
145 | function (id, force) {
|
146 | if (force === void 0) { force = false; }
|
147 | var instance = this.modalStack.find(function (o) {
|
148 | return o.id === id;
|
149 | });
|
150 | if (!!instance) {
|
151 | instance.modal.toggle(force);
|
152 | }
|
153 | else {
|
154 | throw new Error('Modal not found');
|
155 | }
|
156 | };
|
157 | |
158 |
|
159 |
|
160 |
|
161 |
|
162 | NgxSmartModalService.prototype.getModalStack = |
163 |
|
164 |
|
165 |
|
166 |
|
167 | function () {
|
168 | return this.modalStack;
|
169 | };
|
170 | |
171 |
|
172 |
|
173 |
|
174 |
|
175 | NgxSmartModalService.prototype.getOpenedModals = |
176 |
|
177 |
|
178 |
|
179 |
|
180 | function () {
|
181 | var modals = [];
|
182 | this.modalStack.forEach(function (o) {
|
183 | if (o.modal.visible) {
|
184 | modals.push(o);
|
185 | }
|
186 | });
|
187 | return modals;
|
188 | };
|
189 | |
190 |
|
191 |
|
192 |
|
193 |
|
194 |
|
195 |
|
196 | NgxSmartModalService.prototype.getHigherIndex = |
197 |
|
198 |
|
199 |
|
200 |
|
201 |
|
202 |
|
203 | function () {
|
204 | var index = [1041];
|
205 | var modals = this.getModalStack();
|
206 | modals.forEach(function (o) {
|
207 | index.push(o.modal.layerPosition);
|
208 | });
|
209 | return Math.max.apply(Math, index) + 1;
|
210 | };
|
211 | |
212 |
|
213 |
|
214 |
|
215 |
|
216 | NgxSmartModalService.prototype.getModalStackCount = |
217 |
|
218 |
|
219 |
|
220 |
|
221 | function () {
|
222 | return this.modalStack.length;
|
223 | };
|
224 | |
225 |
|
226 |
|
227 |
|
228 |
|
229 |
|
230 | NgxSmartModalService.prototype.removeModal = |
231 |
|
232 |
|
233 |
|
234 |
|
235 |
|
236 | function (id) {
|
237 | var i = this.modalStack.findIndex(function (o) {
|
238 | return o.id === id;
|
239 | });
|
240 | if (i > -1) {
|
241 | this.modalStack.splice(i, 1);
|
242 | }
|
243 | };
|
244 | |
245 |
|
246 |
|
247 |
|
248 |
|
249 |
|
250 |
|
251 |
|
252 |
|
253 |
|
254 |
|
255 | NgxSmartModalService.prototype.setModalData = |
256 |
|
257 |
|
258 |
|
259 |
|
260 |
|
261 |
|
262 |
|
263 |
|
264 |
|
265 |
|
266 | function (data, id, force) {
|
267 | if (!!this.modalStack.find(function (o) {
|
268 | return o.id === id;
|
269 | })) {
|
270 | this.getModal(id).setData(data, force);
|
271 | return true;
|
272 | }
|
273 | else {
|
274 | return false;
|
275 | }
|
276 | };
|
277 | |
278 |
|
279 |
|
280 |
|
281 |
|
282 |
|
283 | NgxSmartModalService.prototype.getModalData = |
284 |
|
285 |
|
286 |
|
287 |
|
288 |
|
289 | function (id) {
|
290 | return this.getModal(id).getData();
|
291 | };
|
292 | |
293 |
|
294 |
|
295 |
|
296 |
|
297 |
|
298 | NgxSmartModalService.prototype.resetModalData = |
299 |
|
300 |
|
301 |
|
302 |
|
303 |
|
304 | function (id) {
|
305 | if (!!this.modalStack.find(function (o) {
|
306 | return o.id === id;
|
307 | })) {
|
308 | var removed = this.getModal(id).getData();
|
309 | this.getModal(id).removeData();
|
310 | return removed;
|
311 | }
|
312 | else {
|
313 | return false;
|
314 | }
|
315 | };
|
316 | |
317 |
|
318 |
|
319 |
|
320 |
|
321 |
|
322 | NgxSmartModalService.prototype.closeLatestModal = |
323 |
|
324 |
|
325 |
|
326 |
|
327 |
|
328 | function () {
|
329 | var me = this;
|
330 | clearTimeout(this.debouncer);
|
331 | this.debouncer = setTimeout(function () {
|
332 | var tmp;
|
333 | me.getOpenedModals().forEach(function (m) {
|
334 | if (m.modal.layerPosition > (!!tmp ? tmp.modal.layerPosition : 0 && m.modal.escapable)) {
|
335 | tmp = m;
|
336 | }
|
337 | });
|
338 | return !!tmp ? tmp.modal.close() : false;
|
339 | }, 100);
|
340 | };
|
341 | NgxSmartModalService.decorators = [
|
342 | { type: Injectable },
|
343 | ];
|
344 |
|
345 | NgxSmartModalService.ctorParameters = function () { return []; };
|
346 | return NgxSmartModalService;
|
347 | }());
|
348 |
|
349 |
|
350 |
|
351 |
|
352 |
|
353 | var NgxSmartModalComponent = (function () {
|
354 | function NgxSmartModalComponent(_renderer, _changeDetectorRef, _ngxSmartModalService) {
|
355 | var _this = this;
|
356 | this._renderer = _renderer;
|
357 | this._changeDetectorRef = _changeDetectorRef;
|
358 | this._ngxSmartModalService = _ngxSmartModalService;
|
359 | this.closable = true;
|
360 | this.escapable = true;
|
361 | this.dismissable = true;
|
362 | this.identifier = '';
|
363 | this.customClass = 'nsm-dialog-animation-fade';
|
364 | this.visible = false;
|
365 | this.backdrop = true;
|
366 | this.force = true;
|
367 | this.hideDelay = 500;
|
368 | this.autostart = false;
|
369 | this.visibleChange = new EventEmitter();
|
370 | this.onClose = new EventEmitter();
|
371 | this.onCloseFinished = new EventEmitter();
|
372 | this.onDismiss = new EventEmitter();
|
373 | this.onDismissFinished = new EventEmitter();
|
374 | this.onAnyCloseEvent = new EventEmitter();
|
375 | this.onAnyCloseEventFinished = new EventEmitter();
|
376 | this.onOpen = new EventEmitter();
|
377 | this.onEscape = new EventEmitter();
|
378 | this.onDataAdded = new EventEmitter();
|
379 | this.onDataRemoved = new EventEmitter();
|
380 | this.layerPosition = 1041;
|
381 | this.overlayVisible = false;
|
382 | this.openedClass = false;
|
383 | this.escapeKeyboardEvent = function (event) {
|
384 | if (event.keyCode === 27) {
|
385 | _this.onEscape.emit(_this);
|
386 | _this._ngxSmartModalService.closeLatestModal();
|
387 | }
|
388 | };
|
389 | }
|
390 | |
391 |
|
392 |
|
393 | NgxSmartModalComponent.prototype.ngOnInit = |
394 |
|
395 |
|
396 | function () {
|
397 | if (!!this.identifier && this.identifier.length) {
|
398 | this.layerPosition += this._ngxSmartModalService.getModalStackCount();
|
399 | this._ngxSmartModalService.addModal({ id: this.identifier, modal: this }, this.force);
|
400 | if (this.autostart) {
|
401 | this._ngxSmartModalService.open(this.identifier);
|
402 | }
|
403 | }
|
404 | else {
|
405 | throw new Error('identifier field isn’t set. Please set one before calling <ngx-smart-modal> in a template.');
|
406 | }
|
407 | };
|
408 | |
409 |
|
410 |
|
411 | NgxSmartModalComponent.prototype.ngOnDestroy = |
412 |
|
413 |
|
414 | function () {
|
415 | this._ngxSmartModalService.removeModal(this.identifier);
|
416 | window.removeEventListener('keyup', this.escapeKeyboardEvent);
|
417 | if (!this._ngxSmartModalService.getModalStack.length) {
|
418 | this._renderer.removeClass(document.body, 'dialog-open');
|
419 | }
|
420 | };
|
421 | |
422 |
|
423 |
|
424 |
|
425 | NgxSmartModalComponent.prototype.open = |
426 |
|
427 |
|
428 |
|
429 | function (top) {
|
430 | var _this = this;
|
431 | if (top) {
|
432 | this.layerPosition = this._ngxSmartModalService.getHigherIndex();
|
433 | }
|
434 | this._renderer.addClass(document.body, 'dialog-open');
|
435 | this.overlayVisible = true;
|
436 | this.visible = true;
|
437 | setTimeout(function () {
|
438 | _this.openedClass = true;
|
439 | if (_this.target) {
|
440 | _this.targetPlacement();
|
441 | }
|
442 | _this._changeDetectorRef.markForCheck();
|
443 | });
|
444 | this.onOpen.emit(this);
|
445 | if (this.escapable) {
|
446 | window.addEventListener('keyup', this.escapeKeyboardEvent);
|
447 | }
|
448 | };
|
449 | |
450 |
|
451 |
|
452 | NgxSmartModalComponent.prototype.close = |
453 |
|
454 |
|
455 | function () {
|
456 | var me = this;
|
457 | this.openedClass = false;
|
458 | this.onClose.emit(this);
|
459 | this.onAnyCloseEvent.emit(this);
|
460 | if (this._ngxSmartModalService.getOpenedModals().length < 2) {
|
461 | this._renderer.removeClass(document.body, 'dialog-open');
|
462 | }
|
463 | setTimeout(function () {
|
464 | me.visibleChange.emit(me.visible);
|
465 | me.visible = false;
|
466 | me.overlayVisible = false;
|
467 | me._changeDetectorRef.markForCheck();
|
468 | me.onCloseFinished.emit(me);
|
469 | me.onAnyCloseEventFinished.emit(me);
|
470 | }, this.hideDelay);
|
471 | window.removeEventListener('keyup', this.escapeKeyboardEvent);
|
472 | };
|
473 | |
474 |
|
475 |
|
476 |
|
477 | NgxSmartModalComponent.prototype.dismiss = |
478 |
|
479 |
|
480 |
|
481 | function (e) {
|
482 | var me = this;
|
483 | if (!this.dismissable) {
|
484 | return;
|
485 | }
|
486 | if (e.target.classList.contains('overlay')) {
|
487 | this.openedClass = false;
|
488 | this.onDismiss.emit(this);
|
489 | this.onAnyCloseEvent.emit(this);
|
490 | if (this._ngxSmartModalService.getOpenedModals().length < 2) {
|
491 | this._renderer.removeClass(document.body, 'dialog-open');
|
492 | }
|
493 | setTimeout(function () {
|
494 | me.visible = false;
|
495 | me.visibleChange.emit(me.visible);
|
496 | me.overlayVisible = false;
|
497 | me._changeDetectorRef.markForCheck();
|
498 | me.onDismissFinished.emit(me);
|
499 | me.onAnyCloseEventFinished.emit(me);
|
500 | }, this.hideDelay);
|
501 | window.removeEventListener('keyup', this.escapeKeyboardEvent);
|
502 | }
|
503 | };
|
504 | |
505 |
|
506 |
|
507 |
|
508 | NgxSmartModalComponent.prototype.toggle = |
509 |
|
510 |
|
511 |
|
512 | function (top) {
|
513 | if (this.visible) {
|
514 | this.close();
|
515 | }
|
516 | else {
|
517 | this.open(top);
|
518 | }
|
519 | };
|
520 | |
521 |
|
522 |
|
523 |
|
524 | NgxSmartModalComponent.prototype.addCustomClass = |
525 |
|
526 |
|
527 |
|
528 | function (className) {
|
529 | if (!this.customClass.length) {
|
530 | this.customClass = className;
|
531 | }
|
532 | else {
|
533 | this.customClass += ' ' + className;
|
534 | }
|
535 | };
|
536 | |
537 |
|
538 |
|
539 |
|
540 | NgxSmartModalComponent.prototype.removeCustomClass = |
541 |
|
542 |
|
543 |
|
544 | function (className) {
|
545 | if (className) {
|
546 | this.customClass = this.customClass.replace(className, '').trim();
|
547 | }
|
548 | else {
|
549 | this.customClass = '';
|
550 | }
|
551 | };
|
552 | |
553 |
|
554 |
|
555 | NgxSmartModalComponent.prototype.isVisible = |
556 |
|
557 |
|
558 | function () {
|
559 | return this.visible;
|
560 | };
|
561 | |
562 |
|
563 |
|
564 | NgxSmartModalComponent.prototype.hasData = |
565 |
|
566 |
|
567 | function () {
|
568 | return this._data !== undefined;
|
569 | };
|
570 | |
571 |
|
572 |
|
573 |
|
574 |
|
575 | NgxSmartModalComponent.prototype.setData = |
576 |
|
577 |
|
578 |
|
579 |
|
580 | function (data, force) {
|
581 | if (!this.hasData() || (this.hasData() && force)) {
|
582 | this._data = data;
|
583 | this.onDataAdded.emit(this._data);
|
584 | this._changeDetectorRef.markForCheck();
|
585 | }
|
586 | };
|
587 | |
588 |
|
589 |
|
590 | NgxSmartModalComponent.prototype.getData = |
591 |
|
592 |
|
593 | function () {
|
594 | return this._data;
|
595 | };
|
596 | |
597 |
|
598 |
|
599 | NgxSmartModalComponent.prototype.removeData = |
600 |
|
601 |
|
602 | function () {
|
603 | this._data = undefined;
|
604 | this.onDataRemoved.emit(true);
|
605 | this._changeDetectorRef.markForCheck();
|
606 | };
|
607 | |
608 |
|
609 |
|
610 | NgxSmartModalComponent.prototype.targetPlacement = |
611 |
|
612 |
|
613 | function () {
|
614 | if (!this.nsmDialog || !this.nsmContent || !this.nsmOverlay || !this.target) {
|
615 | return;
|
616 | }
|
617 | var targetElementRect = document.querySelector(this.target).getBoundingClientRect();
|
618 | var bodyRect = this.nsmOverlay.nativeElement.getBoundingClientRect();
|
619 | var nsmContentRect = this.nsmContent.nativeElement.getBoundingClientRect();
|
620 | var nsmDialogRect = this.nsmDialog.nativeElement.getBoundingClientRect();
|
621 | var marginLeft = parseInt( (getComputedStyle(this.nsmContent.nativeElement).marginLeft), 10);
|
622 | var marginTop = parseInt( (getComputedStyle(this.nsmContent.nativeElement).marginTop), 10);
|
623 | var offsetTop = targetElementRect.top - nsmDialogRect.top - ((nsmContentRect.height - targetElementRect.height) / 2);
|
624 | var offsetLeft = targetElementRect.left - nsmDialogRect.left - ((nsmContentRect.width - targetElementRect.width) / 2);
|
625 | if (offsetLeft + nsmDialogRect.left + nsmContentRect.width + (marginLeft * 2) > bodyRect.width) {
|
626 | offsetLeft = bodyRect.width - (nsmDialogRect.left + nsmContentRect.width) - (marginLeft * 2);
|
627 | }
|
628 | else if (offsetLeft + nsmDialogRect.left < 0) {
|
629 | offsetLeft = -nsmDialogRect.left;
|
630 | }
|
631 | if (offsetTop + nsmDialogRect.top + nsmContentRect.height + marginTop > bodyRect.height) {
|
632 | offsetTop = bodyRect.height - (nsmDialogRect.top + nsmContentRect.height) - marginTop;
|
633 | }
|
634 | if (offsetTop < 0) {
|
635 | offsetTop = 0;
|
636 | }
|
637 | this._renderer.setStyle(this.nsmContent.nativeElement, 'top', offsetTop + 'px');
|
638 | this._renderer.setStyle(this.nsmContent.nativeElement, 'left', offsetLeft + 'px');
|
639 | };
|
640 | NgxSmartModalComponent.decorators = [
|
641 | { type: Component, args: [{
|
642 | selector: 'ngx-smart-modal',
|
643 | template: "\n <div *ngIf=\"overlayVisible\"\n [style.z-index]=\"visible ? layerPosition-1 : -1\"\n [ngClass]=\"{'transparent':!backdrop, 'overlay':true, 'nsm-overlay-open':openedClass}\"\n (click)=\"dismiss($event)\" #nsmOverlay>\n <div [style.z-index]=\"visible ? layerPosition : -1\"\n [ngClass]=\"['nsm-dialog', customClass, openedClass ? 'nsm-dialog-open': 'nsm-dialog-close']\" #nsmDialog>\n <div class=\"nsm-content\" #nsmContent>\n <div class=\"nsm-body\">\n <ng-content></ng-content>\n </div>\n <button type=\"button\" *ngIf=\"closable\" (click)=\"close()\" aria-label=\"Close\" class=\"nsm-dialog-btn-close\">\n <img\n src=\"data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCI+CjxnPgoJPGc+CgkJPHBhdGggZD0iTTUwNS45NDMsNi4wNThjLTguMDc3LTguMDc3LTIxLjE3Mi04LjA3Ny0yOS4yNDksMEw2LjA1OCw0NzYuNjkzYy04LjA3Nyw4LjA3Ny04LjA3NywyMS4xNzIsMCwyOS4yNDkgICAgQzEwLjA5Niw1MDkuOTgyLDE1LjM5LDUxMiwyMC42ODMsNTEyYzUuMjkzLDAsMTAuNTg2LTIuMDE5LDE0LjYyNS02LjA1OUw1MDUuOTQzLDM1LjMwNiAgICBDNTE0LjAxOSwyNy4yMyw1MTQuMDE5LDE0LjEzNSw1MDUuOTQzLDYuMDU4eiIgZmlsbD0iIzAwMDAwMCIvPgoJPC9nPgo8L2c+CjxnPgoJPGc+CgkJPHBhdGggZD0iTTUwNS45NDIsNDc2LjY5NEwzNS4zMDYsNi4wNTljLTguMDc2LTguMDc3LTIxLjE3Mi04LjA3Ny0yOS4yNDgsMGMtOC4wNzcsOC4wNzYtOC4wNzcsMjEuMTcxLDAsMjkuMjQ4bDQ3MC42MzYsNDcwLjYzNiAgICBjNC4wMzgsNC4wMzksOS4zMzIsNi4wNTgsMTQuNjI1LDYuMDU4YzUuMjkzLDAsMTAuNTg3LTIuMDE5LDE0LjYyNC02LjA1N0M1MTQuMDE4LDQ5Ny44NjYsNTE0LjAxOCw0ODQuNzcxLDUwNS45NDIsNDc2LjY5NHoiIGZpbGw9IiMwMDAwMDAiLz4KCTwvZz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K\" />\n </button>\n </div>\n </div>\n </div>\n "
|
644 | },] },
|
645 | ];
|
646 |
|
647 | NgxSmartModalComponent.ctorParameters = function () { return [
|
648 | { type: Renderer2, },
|
649 | { type: ChangeDetectorRef, },
|
650 | { type: NgxSmartModalService, },
|
651 | ]; };
|
652 | NgxSmartModalComponent.propDecorators = {
|
653 | "closable": [{ type: Input },],
|
654 | "escapable": [{ type: Input },],
|
655 | "dismissable": [{ type: Input },],
|
656 | "identifier": [{ type: Input },],
|
657 | "customClass": [{ type: Input },],
|
658 | "visible": [{ type: Input },],
|
659 | "backdrop": [{ type: Input },],
|
660 | "force": [{ type: Input },],
|
661 | "hideDelay": [{ type: Input },],
|
662 | "autostart": [{ type: Input },],
|
663 | "target": [{ type: Input },],
|
664 | "visibleChange": [{ type: Output },],
|
665 | "onClose": [{ type: Output },],
|
666 | "onCloseFinished": [{ type: Output },],
|
667 | "onDismiss": [{ type: Output },],
|
668 | "onDismissFinished": [{ type: Output },],
|
669 | "onAnyCloseEvent": [{ type: Output },],
|
670 | "onAnyCloseEventFinished": [{ type: Output },],
|
671 | "onOpen": [{ type: Output },],
|
672 | "onEscape": [{ type: Output },],
|
673 | "onDataAdded": [{ type: Output },],
|
674 | "onDataRemoved": [{ type: Output },],
|
675 | "nsmContent": [{ type: ViewChild, args: ['nsmContent',] },],
|
676 | "nsmDialog": [{ type: ViewChild, args: ['nsmDialog',] },],
|
677 | "nsmOverlay": [{ type: ViewChild, args: ['nsmOverlay',] },],
|
678 | "targetPlacement": [{ type: HostListener, args: ['window:resize',] },],
|
679 | };
|
680 | return NgxSmartModalComponent;
|
681 | }());
|
682 |
|
683 |
|
684 |
|
685 |
|
686 |
|
687 | var NgxSmartModalModule = (function () {
|
688 | function NgxSmartModalModule() {
|
689 | }
|
690 | |
691 |
|
692 |
|
693 |
|
694 | NgxSmartModalModule.forRoot = |
695 |
|
696 |
|
697 |
|
698 | function () {
|
699 | return {
|
700 | ngModule: NgxSmartModalModule,
|
701 | providers: [NgxSmartModalService]
|
702 | };
|
703 | };
|
704 | |
705 |
|
706 |
|
707 |
|
708 | NgxSmartModalModule.forChild = |
709 |
|
710 |
|
711 |
|
712 | function () {
|
713 | return {
|
714 | ngModule: NgxSmartModalModule,
|
715 | providers: [NgxSmartModalService]
|
716 | };
|
717 | };
|
718 | NgxSmartModalModule.decorators = [
|
719 | { type: NgModule, args: [{
|
720 | declarations: [NgxSmartModalComponent],
|
721 | exports: [NgxSmartModalComponent],
|
722 | imports: [CommonModule]
|
723 | },] },
|
724 | ];
|
725 |
|
726 | NgxSmartModalModule.ctorParameters = function () { return []; };
|
727 | return NgxSmartModalModule;
|
728 | }());
|
729 |
|
730 |
|
731 |
|
732 |
|
733 |
|
734 |
|
735 |
|
736 |
|
737 |
|
738 |
|
739 |
|
740 |
|
741 |
|
742 |
|
743 |
|
744 |
|
745 |
|
746 |
|
747 |
|
748 |
|
749 |
|
750 |
|
751 |
|
752 | export { NgxSmartModalService, NgxSmartModalComponent, NgxSmartModalModule };
|
753 |
|