@esfaenza/extensions 15.2.32 → 15.2.33

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.
@@ -1044,6 +1044,7 @@ class AppEmbeddingExtensions {
1044
1044
  this.Embedded = false;
1045
1045
  this.EmbeddingLevel = 0;
1046
1046
  this.MessageObserver = new Subject();
1047
+ this._reloadAllowed = true;
1047
1048
  this.MainWindow = window;
1048
1049
  while (this.MainWindow.parent != this.MainWindow) {
1049
1050
  this.MainWindow = this.MainWindow.parent;
@@ -1054,6 +1055,11 @@ class AppEmbeddingExtensions {
1054
1055
  if (this.Embedded)
1055
1056
  this.msgService.configureEmbeddability(this.MainWindow, this.MessageObserver);
1056
1057
  }
1058
+ IsReloadAllowed() {
1059
+ let ret = this._reloadAllowed;
1060
+ this._reloadAllowed = true;
1061
+ return ret;
1062
+ }
1057
1063
  configureEmbeddability() {
1058
1064
  window.onmessage = (event) => {
1059
1065
  // Ignoro i miei messaggi dato che mi interessano solo quelli degli altri iframe
@@ -1116,8 +1122,10 @@ class AppEmbeddingExtensions {
1116
1122
  }
1117
1123
  else if (event?.data?.type == "navigate-back") {
1118
1124
  console.log(`Window message - navigate-back -> ${event?.data?.url}`);
1119
- if (history.state._pushed)
1125
+ if (history.state._pushed) {
1126
+ this._reloadAllowed = false;
1120
1127
  history.back();
1128
+ }
1121
1129
  }
1122
1130
  else if (event?.data?.type == "redirect") {
1123
1131
  console.log(`Window message - redirect -> ${event?.data?.url}`);