UNPKG

28.4 kBJavaScriptView Raw
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 * @license ngx-smart-modal
9 * MIT license
10 */
11
12/**
13 * @fileoverview added by tsickle
14 * @suppress {checkTypes} checked by tsc
15 */
16var NgxSmartModalService = (function () {
17 function NgxSmartModalService() {
18 this.modalStack = [];
19 }
20 /**
21 * Add a new modal instance. This step is essential and allows to retrieve any modal at any time.
22 * It stores an object that contains the given modal identifier and the modal itself directly in the `modalStack`.
23 *
24 * @param {?} modalInstance The object that contains the given modal identifier and the modal itself.
25 * @param {?=} force Optional parameter that forces the overriding of modal instance if it already exists.
26 * @return {?} nothing special.
27 */
28 NgxSmartModalService.prototype.addModal = /**
29 * Add a new modal instance. This step is essential and allows to retrieve any modal at any time.
30 * It stores an object that contains the given modal identifier and the modal itself directly in the `modalStack`.
31 *
32 * @param {?} modalInstance The object that contains the given modal identifier and the modal itself.
33 * @param {?=} force Optional parameter that forces the overriding of modal instance if it already exists.
34 * @return {?} nothing special.
35 */
36 function (modalInstance, force) {
37 if (force) {
38 var /** @type {?} */ 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 * Retrieve a modal instance by its identifier.
53 *
54 * @param {?} id The modal identifier used at creation time.
55 * @return {?}
56 */
57 NgxSmartModalService.prototype.getModal = /**
58 * Retrieve a modal instance by its identifier.
59 *
60 * @param {?} id The modal identifier used at creation time.
61 * @return {?}
62 */
63 function (id) {
64 return this.modalStack.filter(function (o) {
65 return o.id === id;
66 })[0].modal;
67 };
68 /**
69 * Alias of `getModal` to retrieve a modal instance by its identifier.
70 *
71 * @param {?} id The modal identifier used at creation time.
72 * @return {?}
73 */
74 NgxSmartModalService.prototype.get = /**
75 * Alias of `getModal` to retrieve a modal instance by its identifier.
76 *
77 * @param {?} id The modal identifier used at creation time.
78 * @return {?}
79 */
80 function (id) {
81 return this.getModal(id);
82 };
83 /**
84 * Open a given modal
85 *
86 * @param {?} id The modal identifier used at creation time.
87 * @param {?=} force Tell the modal to open top of all other opened modals
88 * @return {?}
89 */
90 NgxSmartModalService.prototype.open = /**
91 * Open a given modal
92 *
93 * @param {?} id The modal identifier used at creation time.
94 * @param {?=} force Tell the modal to open top of all other opened modals
95 * @return {?}
96 */
97 function (id, force) {
98 if (force === void 0) { force = false; }
99 var /** @type {?} */ 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 * Close a given modal
111 *
112 * @param {?} id The modal identifier used at creation time.
113 * @return {?}
114 */
115 NgxSmartModalService.prototype.close = /**
116 * Close a given modal
117 *
118 * @param {?} id The modal identifier used at creation time.
119 * @return {?}
120 */
121 function (id) {
122 var /** @type {?} */ 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 * Toggles a given modal
134 * If the retrieved modal is opened it closes it, else it opens it.
135 *
136 * @param {?} id The modal identifier used at creation time.
137 * @param {?=} force Tell the modal to open top of all other opened modals
138 * @return {?}
139 */
140 NgxSmartModalService.prototype.toggle = /**
141 * Toggles a given modal
142 * If the retrieved modal is opened it closes it, else it opens it.
143 *
144 * @param {?} id The modal identifier used at creation time.
145 * @param {?=} force Tell the modal to open top of all other opened modals
146 * @return {?}
147 */
148 function (id, force) {
149 if (force === void 0) { force = false; }
150 var /** @type {?} */ 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 * Retrieve all the created modals.
162 *
163 * @return {?} an array that contains all modal instances.
164 */
165 NgxSmartModalService.prototype.getModalStack = /**
166 * Retrieve all the created modals.
167 *
168 * @return {?} an array that contains all modal instances.
169 */
170 function () {
171 return this.modalStack;
172 };
173 /**
174 * Retrieve all the opened modals. It looks for all modal instances with their `visible` property set to `true`.
175 *
176 * @return {?} an array that contains all the opened modals.
177 */
178 NgxSmartModalService.prototype.getOpenedModals = /**
179 * Retrieve all the opened modals. It looks for all modal instances with their `visible` property set to `true`.
180 *
181 * @return {?} an array that contains all the opened modals.
182 */
183 function () {
184 var /** @type {?} */ modals = [];
185 this.modalStack.forEach(function (o) {
186 if (o.modal.visible) {
187 modals.push(o);
188 }
189 });
190 return modals;
191 };
192 /**
193 * Get the higher `z-index` value between all the modal instances. It iterates over the `ModalStack` array and
194 * calculates a higher value (it takes the highest index value between all the modal instances and adds 1).
195 * Use it to make a modal appear foreground.
196 *
197 * @return {?} a higher index from all the existing modal instances.
198 */
199 NgxSmartModalService.prototype.getHigherIndex = /**
200 * Get the higher `z-index` value between all the modal instances. It iterates over the `ModalStack` array and
201 * calculates a higher value (it takes the highest index value between all the modal instances and adds 1).
202 * Use it to make a modal appear foreground.
203 *
204 * @return {?} a higher index from all the existing modal instances.
205 */
206 function () {
207 var /** @type {?} */ index = [1041];
208 var /** @type {?} */ 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 * It gives the number of modal instances. It's helpful to know if the modal stack is empty or not.
216 *
217 * @return {?} the number of modal instances.
218 */
219 NgxSmartModalService.prototype.getModalStackCount = /**
220 * It gives the number of modal instances. It's helpful to know if the modal stack is empty or not.
221 *
222 * @return {?} the number of modal instances.
223 */
224 function () {
225 return this.modalStack.length;
226 };
227 /**
228 * Remove a modal instance from the modal stack.
229 *
230 * @param {?} id The modal identifier.
231 * @return {?} the removed modal instance.
232 */
233 NgxSmartModalService.prototype.removeModal = /**
234 * Remove a modal instance from the modal stack.
235 *
236 * @param {?} id The modal identifier.
237 * @return {?} the removed modal instance.
238 */
239 function (id) {
240 var /** @type {?} */ 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 * Associate data to an identified modal. If the modal isn't already associated to some data, it creates a new
249 * entry in the `modalData` array with its `id` and the given `data`. If the modal already has data, it rewrites
250 * them with the new ones. Finally if no modal found it returns an error message in the console and false value
251 * as method output.
252 *
253 * @param {?} data The data you want to associate to the modal.
254 * @param {?} id The modal identifier.
255 * @param {?=} force If true, overrides the previous stored data if there was.
256 * @return {?} true if the given modal exists and the process has been tried, either false.
257 */
258 NgxSmartModalService.prototype.setModalData = /**
259 * Associate data to an identified modal. If the modal isn't already associated to some data, it creates a new
260 * entry in the `modalData` array with its `id` and the given `data`. If the modal already has data, it rewrites
261 * them with the new ones. Finally if no modal found it returns an error message in the console and false value
262 * as method output.
263 *
264 * @param {?} data The data you want to associate to the modal.
265 * @param {?} id The modal identifier.
266 * @param {?=} force If true, overrides the previous stored data if there was.
267 * @return {?} true if the given modal exists and the process has been tried, either false.
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 * Retrieve modal data by its identifier.
282 *
283 * @param {?} id The modal identifier used at creation time.
284 * @return {?} the associated modal data.
285 */
286 NgxSmartModalService.prototype.getModalData = /**
287 * Retrieve modal data by its identifier.
288 *
289 * @param {?} id The modal identifier used at creation time.
290 * @return {?} the associated modal data.
291 */
292 function (id) {
293 return this.getModal(id).getData();
294 };
295 /**
296 * Reset the data attached to a given modal.
297 *
298 * @param {?} id The modal identifier used at creation time.
299 * @return {?} the removed data or false if modal doesn't exist.
300 */
301 NgxSmartModalService.prototype.resetModalData = /**
302 * Reset the data attached to a given modal.
303 *
304 * @param {?} id The modal identifier used at creation time.
305 * @return {?} the removed data or false if modal doesn't exist.
306 */
307 function (id) {
308 if (!!this.modalStack.find(function (o) {
309 return o.id === id;
310 })) {
311 var /** @type {?} */ removed = this.getModal(id).getData();
312 this.getModal(id).removeData();
313 return removed;
314 }
315 else {
316 return false;
317 }
318 };
319 /**
320 * Close the latest opened modal if it has been declared as escapable
321 * Using a debounce system because one or more modals could be listening
322 * escape key press event.
323 * @return {?}
324 */
325 NgxSmartModalService.prototype.closeLatestModal = /**
326 * Close the latest opened modal if it has been declared as escapable
327 * Using a debounce system because one or more modals could be listening
328 * escape key press event.
329 * @return {?}
330 */
331 function () {
332 var /** @type {?} */ me = this;
333 clearTimeout(this.debouncer);
334 this.debouncer = setTimeout(function () {
335 var /** @type {?} */ 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 /** @nocollapse */
348 NgxSmartModalService.ctorParameters = function () { return []; };
349 return NgxSmartModalService;
350}());
351
352/**
353 * @fileoverview added by tsickle
354 * @suppress {checkTypes} checked by tsc
355 */
356var 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 * @return {?}
395 */
396 NgxSmartModalComponent.prototype.ngOnInit = /**
397 * @return {?}
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 * @return {?}
413 */
414 NgxSmartModalComponent.prototype.ngOnDestroy = /**
415 * @return {?}
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 * @param {?=} top
426 * @return {?}
427 */
428 NgxSmartModalComponent.prototype.open = /**
429 * @param {?=} top
430 * @return {?}
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 * @return {?}
454 */
455 NgxSmartModalComponent.prototype.close = /**
456 * @return {?}
457 */
458 function () {
459 var /** @type {?} */ 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 * @param {?} e
478 * @return {?}
479 */
480 NgxSmartModalComponent.prototype.dismiss = /**
481 * @param {?} e
482 * @return {?}
483 */
484 function (e) {
485 var /** @type {?} */ 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 * @param {?=} top
509 * @return {?}
510 */
511 NgxSmartModalComponent.prototype.toggle = /**
512 * @param {?=} top
513 * @return {?}
514 */
515 function (top) {
516 if (this.visible) {
517 this.close();
518 }
519 else {
520 this.open(top);
521 }
522 };
523 /**
524 * @param {?} className
525 * @return {?}
526 */
527 NgxSmartModalComponent.prototype.addCustomClass = /**
528 * @param {?} className
529 * @return {?}
530 */
531 function (className) {
532 if (!this.customClass.length) {
533 this.customClass = className;
534 }
535 else {
536 this.customClass += ' ' + className;
537 }
538 };
539 /**
540 * @param {?=} className
541 * @return {?}
542 */
543 NgxSmartModalComponent.prototype.removeCustomClass = /**
544 * @param {?=} className
545 * @return {?}
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 * @return {?}
557 */
558 NgxSmartModalComponent.prototype.isVisible = /**
559 * @return {?}
560 */
561 function () {
562 return this.visible;
563 };
564 /**
565 * @return {?}
566 */
567 NgxSmartModalComponent.prototype.hasData = /**
568 * @return {?}
569 */
570 function () {
571 return this._data !== undefined;
572 };
573 /**
574 * @param {?} data
575 * @param {?=} force
576 * @return {?}
577 */
578 NgxSmartModalComponent.prototype.setData = /**
579 * @param {?} data
580 * @param {?=} force
581 * @return {?}
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 * @return {?}
592 */
593 NgxSmartModalComponent.prototype.getData = /**
594 * @return {?}
595 */
596 function () {
597 return this._data;
598 };
599 /**
600 * @return {?}
601 */
602 NgxSmartModalComponent.prototype.removeData = /**
603 * @return {?}
604 */
605 function () {
606 this._data = undefined;
607 this.onDataRemoved.emit(true);
608 this._changeDetectorRef.markForCheck();
609 };
610 /**
611 * @return {?}
612 */
613 NgxSmartModalComponent.prototype.targetPlacement = /**
614 * @return {?}
615 */
616 function () {
617 if (!this.nsmDialog || !this.nsmContent || !this.nsmOverlay || !this.target) {
618 return;
619 }
620 var /** @type {?} */ targetElementRect = document.querySelector(this.target).getBoundingClientRect();
621 var /** @type {?} */ bodyRect = this.nsmOverlay.nativeElement.getBoundingClientRect();
622 var /** @type {?} */ nsmContentRect = this.nsmContent.nativeElement.getBoundingClientRect();
623 var /** @type {?} */ nsmDialogRect = this.nsmDialog.nativeElement.getBoundingClientRect();
624 var /** @type {?} */ marginLeft = parseInt(/** @type {?} */ (getComputedStyle(this.nsmContent.nativeElement).marginLeft), 10);
625 var /** @type {?} */ marginTop = parseInt(/** @type {?} */ (getComputedStyle(this.nsmContent.nativeElement).marginTop), 10);
626 var /** @type {?} */ offsetTop = targetElementRect.top - nsmDialogRect.top - ((nsmContentRect.height - targetElementRect.height) / 2);
627 var /** @type {?} */ 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 /** @nocollapse */
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 * @fileoverview added by tsickle
688 * @suppress {checkTypes} checked by tsc
689 */
690var NgxSmartModalModule = (function () {
691 function NgxSmartModalModule() {
692 }
693 /**
694 * Use in AppModule: new instance of NgxSmartModal.
695 * @return {?}
696 */
697 NgxSmartModalModule.forRoot = /**
698 * Use in AppModule: new instance of NgxSmartModal.
699 * @return {?}
700 */
701 function () {
702 return {
703 ngModule: NgxSmartModalModule,
704 providers: [NgxSmartModalService]
705 };
706 };
707 /**
708 * Use in features modules with lazy loading: new instance of NgxSmartModal.
709 * @return {?}
710 */
711 NgxSmartModalModule.forChild = /**
712 * Use in features modules with lazy loading: new instance of NgxSmartModal.
713 * @return {?}
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 /** @nocollapse */
729 NgxSmartModalModule.ctorParameters = function () { return []; };
730 return NgxSmartModalModule;
731}());
732
733exports.NgxSmartModalService = NgxSmartModalService;
734exports.NgxSmartModalComponent = NgxSmartModalComponent;
735exports.NgxSmartModalModule = NgxSmartModalModule;
736
737Object.defineProperty(exports, '__esModule', { value: true });
738
739})));
740//# sourceMappingURL=ngx-smart-modal.umd.js.map