@social-mail/social-mail-client 1.2.549 → 1.2.551

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.
@@ -28409,6 +28409,9 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/ent
28409
28409
  }
28410
28410
  downloadFromUrl(url, email) {
28411
28411
  return __awaiter(this, void 0, void 0, function* () {
28412
+ if (!window.caches) {
28413
+ return FetchBuilder.get(url).responseAsText();
28414
+ }
28412
28415
  const cache = yield window.caches.open("email-content-cache");
28413
28416
  const cacheKey = new URL(url, location.href);
28414
28417
  const content = yield cache.match(cacheKey);
@@ -53956,13 +53959,17 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
53956
53959
  }));
53957
53960
  }
53958
53961
  pending.push(() => __awaiter(this, void 0, void 0, function* () {
53959
- const stylerFile = yield this.cloudFileService.children(this.folder.appFileID, "styles/styler.css").firstOrDefault();
53960
- const stylerContent = stylerFile ? yield FetchBuilder.get(stylerFile.downloadUrl).responseAsText() : null;
53961
- const newStyle = StylerSet.instance.toString();
53962
- if (stylerContent !== newStyle) {
53963
- const stylerCSS = yield this.createFile("styler.css", newStyle);
53964
- yield this.addStyleSheet(doc, stylerCSS, "styles/styler.css");
53962
+ let stylerFile = yield this.cloudFileService.children(this.folder.appFileID, "styles/styler.css").firstOrDefault();
53963
+ if (!stylerFile) {
53964
+ stylerFile = yield this.createFile("styler.css", StylerSet.instance.toString());
53965
+ } else {
53966
+ const stylerContent = yield FetchBuilder.get(stylerFile.downloadUrl).responseAsText();
53967
+ const newStyle = StylerSet.instance.toString();
53968
+ if (stylerContent !== newStyle) {
53969
+ stylerFile = yield this.createFile("styler.css", newStyle);
53970
+ }
53965
53971
  }
53972
+ yield this.addStyleSheet(doc, stylerFile, "styles/styler.css");
53966
53973
  }));
53967
53974
  pending.push(() => __awaiter(this, void 0, void 0, function* () {
53968
53975
  let vars = yield this.cloudFileService.children(this.folder.appFileID, "styles/vars.css").firstOrDefault();