@social-mail/social-mail-client 1.2.284 → 1.2.286

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.
@@ -46023,6 +46023,25 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
46023
46023
  }
46024
46024
  setStylerSheet() {
46025
46025
  return __awaiter(this, void 0, void 0, function* () {
46026
+ for (const e of Array.from(this.htmlDocument.querySelectorAll("inject"))) {
46027
+ let src = e.getAttribute("src");
46028
+ if (src.startsWith("/")) {
46029
+ src = src.substring(1);
46030
+ } else {}
46031
+ const file = yield this.cloudFileService.children(this.folder.appFileID, src).firstOrDefault();
46032
+ const text = yield FetchBuilder.get(file.downloadUrl).responseAsText();
46033
+ const parser = new DOMParser();
46034
+ const dom = parser.parseFromString(text, "text/html");
46035
+ const children = Array.from(dom.body.children);
46036
+ for (const iterator of Array.from(e.children)) {
46037
+ iterator.remove();
46038
+ }
46039
+ for (const iterator of children) {
46040
+ iterator.setAttribute("contentEditable", "false");
46041
+ iterator.remove();
46042
+ e.appendChild(iterator);
46043
+ }
46044
+ }
46026
46045
  const stylerCSS = yield this.createFile("styler.css", StylerSet.instance.toString());
46027
46046
  yield this.addStyleSheet(stylerCSS);
46028
46047
  let vars = yield this.cloudFileService.children(this.folder.appFileID, "styles/vars.css").firstOrDefault();
@@ -46042,23 +46061,6 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
46042
46061
  this.htmlDocument.head.appendChild(script);
46043
46062
  }
46044
46063
  script.setAttribute("src", "//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.54/dist/components.webpack.js");
46045
- for (const e of Array.from(this.htmlDocument.querySelectorAll("inject"))) {
46046
- let src = e.getAttribute("src");
46047
- if (src.startsWith("/")) {
46048
- src = src.substring(1);
46049
- } else {}
46050
- const file = yield this.cloudFileService.children(this.folder.appFileID, src).firstOrDefault();
46051
- const text = yield FetchBuilder.get(file.downloadUrl).responseAsText();
46052
- const parser = new DOMParser();
46053
- const dom = parser.parseFromString(text, "text/html");
46054
- const children = Array.from(dom.body.children);
46055
- e.innerHTML = "";
46056
- for (const iterator of children) {
46057
- iterator.setAttribute("contentEditable", "false");
46058
- iterator.remove();
46059
- e.appendChild(iterator);
46060
- }
46061
- }
46062
46064
  });
46063
46065
  }
46064
46066
  addStyleSheet(file) {