monkey-style-guide 2.0.122 → 2.0.125

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.
@@ -448,7 +448,9 @@ class MonkeyStyleGuideSnackbarService {
448
448
  this.timeoutBlinkTab = null;
449
449
  this.snackbarElements = new SnackbarElements();
450
450
  this.locationRouter.onUrlChange(() => {
451
- this.closeAll();
451
+ if (this.config && !this.config?.keepOnUrlChange) {
452
+ this.closeAll();
453
+ }
452
454
  });
453
455
  }
454
456
  stopBlinking() {
@@ -558,11 +560,6 @@ class MonkeyStyleGuideSnackbarService {
558
560
  snackbarElement.appendChild(snackbarBodyElement);
559
561
  this.snackbarElements.add(snackbarElement, duration, () => (!keepOpen ? this.close(id) : null), verticalPosition);
560
562
  }
561
- close(id) {
562
- const { snackbarElements } = this;
563
- snackbarElements.remove(id);
564
- this.stopBlinking();
565
- }
566
563
  show(config) {
567
564
  this.config = config;
568
565
  const id = `monkey-snackbar-${MonkeyUtils.getRandomString(30)}`;
@@ -576,11 +573,17 @@ class MonkeyStyleGuideSnackbarService {
576
573
  if (config?.blinkTab) {
577
574
  this.blinkTab();
578
575
  }
576
+ return id;
579
577
  }
580
578
  closeAll() {
581
579
  const { snackbarElements } = this;
582
580
  snackbarElements.removeAll();
583
581
  }
582
+ close(id) {
583
+ const { snackbarElements } = this;
584
+ snackbarElements.remove(id);
585
+ this.stopBlinking();
586
+ }
584
587
  }
585
588
  MonkeyStyleGuideSnackbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MonkeyStyleGuideSnackbarService, deps: [{ token: i1$1.Location }], target: i0.ɵɵFactoryTarget.Injectable });
586
589
  MonkeyStyleGuideSnackbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MonkeyStyleGuideSnackbarService });