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