@arsedizioni/ars-utils 22.1.0 → 22.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.
@@ -3957,6 +3957,29 @@ class SplashService {
3957
3957
  bootstrapped() { this.api?.disarm(); }
3958
3958
  /** Fade out and remove the splash overlay from the DOM. */
3959
3959
  hide() { this.api?.hide(); }
3960
+ /**
3961
+ * Give up on loading, without taking the splash away.
3962
+ *
3963
+ * The splash stays where it is but stops pretending something is still happening: the progress
3964
+ * bar goes and a reload button appears, so a user who would otherwise sit in front of an endless
3965
+ * animation has something to do. Uncovering the page instead would be worse — whatever is
3966
+ * underneath is, by definition, not ready.
3967
+ *
3968
+ * Falls back to {@link setMessage} where `index.html` does not publish `fail`: the user still
3969
+ * reads what happened, only without the button.
3970
+ * @param text - What to tell the user.
3971
+ */
3972
+ fail(text) {
3973
+ const api = this.api;
3974
+ if (!api)
3975
+ return;
3976
+ if (api.fail) {
3977
+ api.fail(text);
3978
+ }
3979
+ else {
3980
+ api.setMessage(text);
3981
+ }
3982
+ }
3960
3983
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: SplashService, deps: [], target: i0.ɵɵFactoryTarget.Service }); }
3961
3984
  static { this.ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.0", ngImport: i0, type: SplashService }); }
3962
3985
  }