UNPKG

28.3 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 this._renderer = _renderer;
359 this._changeDetectorRef = _changeDetectorRef;
360 this._ngxSmartModalService = _ngxSmartModalService;
361 this.closable = true;
362 this.escapable = true;
363 this.dismissable = true;
364 this.identifier = '';
365 this.customClass = 'nsm-dialog-animation-fade';
366 this.visible = false;
367 this.backdrop = true;
368 this.force = true;
369 this.hideDelay = 500;
370 this.autostart = false;
371 this.visibleChange = new core.EventEmitter();
372 this.onClose = new core.EventEmitter();
373 this.onCloseFinished = new core.EventEmitter();
374 this.onDismiss = new core.EventEmitter();
375 this.onDismissFinished = new core.EventEmitter();
376 this.onAnyCloseEvent = new core.EventEmitter();
377 this.onAnyCloseEventFinished = new core.EventEmitter();
378 this.onOpen = new core.EventEmitter();
379 this.onEscape = new core.EventEmitter();
380 this.onDataAdded = new core.EventEmitter();
381 this.onDataRemoved = new core.EventEmitter();
382 this.layerPosition = 1041;
383 this.overlayVisible = false;
384 this.openedClass = false;
385 this._data = null;
386 }
387 /**
388 * @return {?}
389 */
390 NgxSmartModalComponent.prototype.ngOnInit = /**
391 * @return {?}
392 */
393 function () {
394 if (!!this.identifier && this.identifier.length) {
395 this.layerPosition += this._ngxSmartModalService.getModalStackCount();
396 this._ngxSmartModalService.addModal({ id: this.identifier, modal: this }, this.force);
397 if (this.autostart) {
398 this._ngxSmartModalService.open(this.identifier);
399 }
400 }
401 else {
402 throw new Error('identifier field isn’t set. Please set one before calling <ngx-smart-modal> in a template.');
403 }
404 };
405 /**
406 * @return {?}
407 */
408 NgxSmartModalComponent.prototype.ngOnDestroy = /**
409 * @return {?}
410 */
411 function () {
412 this._ngxSmartModalService.removeModal(this.identifier);
413 };
414 /**
415 * @param {?=} top
416 * @return {?}
417 */
418 NgxSmartModalComponent.prototype.open = /**
419 * @param {?=} top
420 * @return {?}
421 */
422 function (top) {
423 var _this = this;
424 if (top) {
425 this.layerPosition = this._ngxSmartModalService.getHigherIndex();
426 }
427 this._renderer.addClass(document.body, 'dialog-open');
428 this.overlayVisible = true;
429 this.visible = true;
430 setTimeout(function () {
431 _this.openedClass = true;
432 if (_this.target) {
433 _this.targetPlacement();
434 }
435 _this._changeDetectorRef.markForCheck();
436 });
437 this.onOpen.emit(this);
438 };
439 /**
440 * @return {?}
441 */
442 NgxSmartModalComponent.prototype.close = /**
443 * @return {?}
444 */
445 function () {
446 var /** @type {?} */ me = this;
447 this.openedClass = false;
448 this.onClose.emit(this);
449 this.onAnyCloseEvent.emit(this);
450 if (this._ngxSmartModalService.getOpenedModals().length < 2) {
451 this._renderer.removeClass(document.body, 'dialog-open');
452 }
453 setTimeout(function () {
454 me.visibleChange.emit(me.visible);
455 me.visible = false;
456 me.overlayVisible = false;
457 me._changeDetectorRef.markForCheck();
458 me.onCloseFinished.emit(me);
459 me.onAnyCloseEventFinished.emit(me);
460 }, this.hideDelay);
461 };
462 /**
463 * @param {?} e
464 * @return {?}
465 */
466 NgxSmartModalComponent.prototype.dismiss = /**
467 * @param {?} e
468 * @return {?}
469 */
470 function (e) {
471 var /** @type {?} */ me = this;
472 if (!this.dismissable) {
473 return;
474 }
475 if (e.target.classList.contains('overlay')) {
476 this.openedClass = false;
477 this.onDismiss.emit(this);
478 this.onAnyCloseEvent.emit(this);
479 if (this._ngxSmartModalService.getOpenedModals().length < 2) {
480 this._renderer.removeClass(document.body, 'dialog-open');
481 }
482 setTimeout(function () {
483 me.visible = false;
484 me.visibleChange.emit(me.visible);
485 me.overlayVisible = false;
486 me._changeDetectorRef.markForCheck();
487 me.onDismissFinished.emit(me);
488 me.onAnyCloseEventFinished.emit(me);
489 }, this.hideDelay);
490 }
491 };
492 /**
493 * @param {?=} top
494 * @return {?}
495 */
496 NgxSmartModalComponent.prototype.toggle = /**
497 * @param {?=} top
498 * @return {?}
499 */
500 function (top) {
501 if (this.visible) {
502 this.close();
503 }
504 else {
505 this.open(top);
506 }
507 };
508 /**
509 * @param {?} className
510 * @return {?}
511 */
512 NgxSmartModalComponent.prototype.addCustomClass = /**
513 * @param {?} className
514 * @return {?}
515 */
516 function (className) {
517 if (!this.customClass.length) {
518 this.customClass = className;
519 }
520 else {
521 this.customClass += ' ' + className;
522 }
523 };
524 /**
525 * @param {?=} className
526 * @return {?}
527 */
528 NgxSmartModalComponent.prototype.removeCustomClass = /**
529 * @param {?=} className
530 * @return {?}
531 */
532 function (className) {
533 if (className) {
534 this.customClass = this.customClass.replace(className, '').trim();
535 }
536 else {
537 this.customClass = '';
538 }
539 };
540 /**
541 * @return {?}
542 */
543 NgxSmartModalComponent.prototype.isVisible = /**
544 * @return {?}
545 */
546 function () {
547 return this.visible;
548 };
549 /**
550 * @return {?}
551 */
552 NgxSmartModalComponent.prototype.hasData = /**
553 * @return {?}
554 */
555 function () {
556 return !!this._data;
557 };
558 /**
559 * @param {?} data
560 * @param {?=} force
561 * @return {?}
562 */
563 NgxSmartModalComponent.prototype.setData = /**
564 * @param {?} data
565 * @param {?=} force
566 * @return {?}
567 */
568 function (data, force) {
569 var _this = this;
570 if (!this._data || (!!this._data && force)) {
571 setTimeout(function () {
572 _this._data = data;
573 _this.onDataAdded.emit(_this._data);
574 });
575 }
576 };
577 /**
578 * @return {?}
579 */
580 NgxSmartModalComponent.prototype.getData = /**
581 * @return {?}
582 */
583 function () {
584 return this._data;
585 };
586 /**
587 * @return {?}
588 */
589 NgxSmartModalComponent.prototype.removeData = /**
590 * @return {?}
591 */
592 function () {
593 var _this = this;
594 setTimeout(function () {
595 _this._data = null;
596 _this.onDataRemoved.emit(true);
597 });
598 };
599 /**
600 * @param {?} event
601 * @return {?}
602 */
603 NgxSmartModalComponent.prototype.escapeKeyboardEvent = /**
604 * @param {?} event
605 * @return {?}
606 */
607 function (event) {
608 if (event.keyCode === 27 && this.visible) {
609 if (!this.escapable) {
610 return false;
611 }
612 else {
613 this.onEscape.emit(this);
614 this._ngxSmartModalService.closeLatestModal();
615 }
616 }
617 };
618 /**
619 * @return {?}
620 */
621 NgxSmartModalComponent.prototype.targetPlacement = /**
622 * @return {?}
623 */
624 function () {
625 if (!this.nsmDialog || !this.nsmContent || !this.nsmOverlay || !this.target) {
626 return;
627 }
628 var /** @type {?} */ targetElementRect = document.querySelector(this.target).getBoundingClientRect();
629 var /** @type {?} */ bodyRect = this.nsmOverlay.nativeElement.getBoundingClientRect();
630 var /** @type {?} */ nsmContentRect = this.nsmContent.nativeElement.getBoundingClientRect();
631 var /** @type {?} */ nsmDialogRect = this.nsmDialog.nativeElement.getBoundingClientRect();
632 var /** @type {?} */ marginLeft = parseInt(/** @type {?} */ (getComputedStyle(this.nsmContent.nativeElement).marginLeft), 10);
633 var /** @type {?} */ marginTop = parseInt(/** @type {?} */ (getComputedStyle(this.nsmContent.nativeElement).marginTop), 10);
634 var /** @type {?} */ offsetTop = targetElementRect.top - nsmDialogRect.top - ((nsmContentRect.height - targetElementRect.height) / 2);
635 var /** @type {?} */ offsetLeft = targetElementRect.left - nsmDialogRect.left - ((nsmContentRect.width - targetElementRect.width) / 2);
636 if (offsetLeft + nsmDialogRect.left + nsmContentRect.width + (marginLeft * 2) > bodyRect.width) {
637 offsetLeft = bodyRect.width - (nsmDialogRect.left + nsmContentRect.width) - (marginLeft * 2);
638 }
639 else if (offsetLeft + nsmDialogRect.left < 0) {
640 offsetLeft = -nsmDialogRect.left;
641 }
642 if (offsetTop + nsmDialogRect.top + nsmContentRect.height + marginTop > bodyRect.height) {
643 offsetTop = bodyRect.height - (nsmDialogRect.top + nsmContentRect.height) - marginTop;
644 }
645 if (offsetTop < 0) {
646 offsetTop = 0;
647 }
648 this._renderer.setStyle(this.nsmContent.nativeElement, 'top', offsetTop + 'px');
649 this._renderer.setStyle(this.nsmContent.nativeElement, 'left', offsetLeft + 'px');
650 };
651 NgxSmartModalComponent.decorators = [
652 { type: core.Component, args: [{
653 selector: 'ngx-smart-modal',
654 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 "
655 },] },
656 ];
657 /** @nocollapse */
658 NgxSmartModalComponent.ctorParameters = function () { return [
659 { type: core.Renderer2, },
660 { type: core.ChangeDetectorRef, },
661 { type: NgxSmartModalService, },
662 ]; };
663 NgxSmartModalComponent.propDecorators = {
664 "closable": [{ type: core.Input },],
665 "escapable": [{ type: core.Input },],
666 "dismissable": [{ type: core.Input },],
667 "identifier": [{ type: core.Input },],
668 "customClass": [{ type: core.Input },],
669 "visible": [{ type: core.Input },],
670 "backdrop": [{ type: core.Input },],
671 "force": [{ type: core.Input },],
672 "hideDelay": [{ type: core.Input },],
673 "autostart": [{ type: core.Input },],
674 "target": [{ type: core.Input },],
675 "visibleChange": [{ type: core.Output },],
676 "onClose": [{ type: core.Output },],
677 "onCloseFinished": [{ type: core.Output },],
678 "onDismiss": [{ type: core.Output },],
679 "onDismissFinished": [{ type: core.Output },],
680 "onAnyCloseEvent": [{ type: core.Output },],
681 "onAnyCloseEventFinished": [{ type: core.Output },],
682 "onOpen": [{ type: core.Output },],
683 "onEscape": [{ type: core.Output },],
684 "onDataAdded": [{ type: core.Output },],
685 "onDataRemoved": [{ type: core.Output },],
686 "nsmContent": [{ type: core.ViewChild, args: ['nsmContent',] },],
687 "nsmDialog": [{ type: core.ViewChild, args: ['nsmDialog',] },],
688 "nsmOverlay": [{ type: core.ViewChild, args: ['nsmOverlay',] },],
689 "escapeKeyboardEvent": [{ type: core.HostListener, args: ['document:keyup', ['$event'],] },],
690 "targetPlacement": [{ type: core.HostListener, args: ['window:resize',] },],
691 };
692 return NgxSmartModalComponent;
693}());
694
695/**
696 * @fileoverview added by tsickle
697 * @suppress {checkTypes} checked by tsc
698 */
699var NgxSmartModalModule = (function () {
700 function NgxSmartModalModule() {
701 }
702 /**
703 * Use in AppModule: new instance of NgxSmartModal.
704 * @return {?}
705 */
706 NgxSmartModalModule.forRoot = /**
707 * Use in AppModule: new instance of NgxSmartModal.
708 * @return {?}
709 */
710 function () {
711 return {
712 ngModule: NgxSmartModalModule,
713 providers: [NgxSmartModalService]
714 };
715 };
716 /**
717 * Use in features modules with lazy loading: new instance of NgxSmartModal.
718 * @return {?}
719 */
720 NgxSmartModalModule.forChild = /**
721 * Use in features modules with lazy loading: new instance of NgxSmartModal.
722 * @return {?}
723 */
724 function () {
725 return {
726 ngModule: NgxSmartModalModule,
727 providers: [NgxSmartModalService]
728 };
729 };
730 NgxSmartModalModule.decorators = [
731 { type: core.NgModule, args: [{
732 declarations: [NgxSmartModalComponent],
733 exports: [NgxSmartModalComponent],
734 imports: [common.CommonModule]
735 },] },
736 ];
737 /** @nocollapse */
738 NgxSmartModalModule.ctorParameters = function () { return []; };
739 return NgxSmartModalModule;
740}());
741
742exports.NgxSmartModalService = NgxSmartModalService;
743exports.NgxSmartModalComponent = NgxSmartModalComponent;
744exports.NgxSmartModalModule = NgxSmartModalModule;
745
746Object.defineProperty(exports, '__esModule', { value: true });
747
748})));
749//# sourceMappingURL=ngx-smart-modal.umd.js.map