@vsn-ux/ngx-gaia 0.14.2 → 0.14.3
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.
|
@@ -3296,12 +3296,7 @@ class GaModalService {
|
|
|
3296
3296
|
return this.attachContent(component, data, overlayRef);
|
|
3297
3297
|
}
|
|
3298
3298
|
closeAll() {
|
|
3299
|
-
this.activeModals.
|
|
3300
|
-
while (modals.length > 0) {
|
|
3301
|
-
modals.pop()?.close();
|
|
3302
|
-
}
|
|
3303
|
-
return modals;
|
|
3304
|
-
});
|
|
3299
|
+
[...this.activeModals()].forEach((modal) => modal.close());
|
|
3305
3300
|
}
|
|
3306
3301
|
/** @ignore */
|
|
3307
3302
|
attachContent(component, data, overlayRef) {
|
|
@@ -3320,18 +3315,9 @@ class GaModalService {
|
|
|
3320
3315
|
maxHeight: `calc(100vh - 4rem * var(--ga-base-scaling-factor, 1) * (1 + ${modalStackIndex}))`,
|
|
3321
3316
|
});
|
|
3322
3317
|
}
|
|
3323
|
-
this.activeModals.update((modals) =>
|
|
3324
|
-
modals.push(modalComponent);
|
|
3325
|
-
return modals;
|
|
3326
|
-
});
|
|
3318
|
+
this.activeModals.update((modals) => [...modals, modalComponent]);
|
|
3327
3319
|
modalComponent.afterClosed({ closeOnUnsubscribe: false }).subscribe(() => {
|
|
3328
|
-
|
|
3329
|
-
if (index > -1) {
|
|
3330
|
-
this.activeModals.update((modals) => {
|
|
3331
|
-
modals.splice(index, 1);
|
|
3332
|
-
return modals;
|
|
3333
|
-
});
|
|
3334
|
-
}
|
|
3320
|
+
this.activeModals.update((modals) => modals.filter((modal) => modal !== modalRef.instance));
|
|
3335
3321
|
});
|
|
3336
3322
|
return modalComponent;
|
|
3337
3323
|
}
|