@rdlabo/ionic-angular-kit 22.0.0-8 → 22.0.0-beta.pr102.sha1c53fd4f57fa

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.
@@ -473,6 +473,25 @@ class KitOverlayController {
473
473
  if (this.#alertPresenting) {
474
474
  return false;
475
475
  }
476
+ return this.#presentAlertConfirm(options);
477
+ }
478
+ /**
479
+ * Try to present a confirmation alert without stacking it over another alert.
480
+ *
481
+ * @returns `true` for confirmation, `false` for explicit cancellation or backdrop dismissal, and `undefined` when
482
+ * another alert prevented this one from being presented.
483
+ */
484
+ async tryAlertConfirm(options) {
485
+ if (this.#alertPresenting) {
486
+ return undefined;
487
+ }
488
+ const activeAlert = await this.#alertCtrl.getTop();
489
+ if (activeAlert || this.#alertPresenting) {
490
+ return undefined;
491
+ }
492
+ return this.#presentAlertConfirm(options);
493
+ }
494
+ async #presentAlertConfirm(options) {
476
495
  this.#alertPresenting = true;
477
496
  const present = async () => {
478
497
  const alert = await this.#alertCtrl.create({