@4i/modal-manager 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -54,11 +54,11 @@ var ModalManager = /** @class */ (function (_super) {
|
|
54
54
|
}));
|
55
55
|
};
|
56
56
|
ModalManager.prototype.close = function (position) {
|
57
|
-
var _a;
|
58
|
-
this.emitter.emit(exports.constants.CLOSE, position);
|
57
|
+
var _a, _b;
|
58
|
+
this.emitter.emit(exports.constants.CLOSE, position !== null && position !== void 0 ? position : ((_a = this.queue) === null || _a === void 0 ? void 0 : _a.length) - 1);
|
59
59
|
var closedModalName = this.queue[this.queue.length - 1];
|
60
60
|
this.queue.pop();
|
61
|
-
(
|
61
|
+
(_b = this._openModalStateCallback) === null || _b === void 0 ? void 0 : _b.call(this, this.getQueueState({
|
62
62
|
queue: this.queue,
|
63
63
|
closedModalName: closedModalName,
|
64
64
|
}));
|
@@ -54,7 +54,7 @@ export class ModalManager extends Manager {
|
|
54
54
|
}
|
55
55
|
|
56
56
|
close<T>(position?: T) {
|
57
|
-
this.emitter.emit(constants.CLOSE, position);
|
57
|
+
this.emitter.emit(constants.CLOSE, position ?? this.queue?.length - 1);
|
58
58
|
const closedModalName = this.queue[this.queue.length - 1];
|
59
59
|
this.queue.pop();
|
60
60
|
|