@social-mail/social-mail-client 1.2.283 → 1.2.284
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.
- package/dist/admin/AdminAppIndex.pack.js +19 -20
- package/dist/admin/AdminAppIndex.pack.js.map +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js +2 -2
- package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
- package/dist/common/pages/websites/studio/WebSiteStudioPage.d.ts.map +1 -1
- package/dist/common/pages/websites/studio/WebSiteStudioPage.js +2 -20
- package/dist/common/pages/websites/studio/WebSiteStudioPage.js.map +1 -1
- package/dist/site-editor/editor/WebSitePageEditor.d.ts.map +1 -1
- package/dist/site-editor/editor/WebSitePageEditor.js +17 -0
- package/dist/site-editor/editor/WebSitePageEditor.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.js +19 -20
- package/dist/web/AppIndex.pack.js.map +1 -1
- package/dist/web/AppIndex.pack.min.js +2 -2
- package/dist/web/AppIndex.pack.min.js.map +1 -1
- package/package.json +1 -1
- package/src/common/pages/websites/studio/WebSiteStudioPage.tsx +24 -23
- package/src/site-editor/editor/WebSitePageEditor.tsx +22 -0
|
@@ -49730,6 +49730,23 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
|
|
|
49730
49730
|
this.htmlDocument.head.appendChild(script);
|
|
49731
49731
|
}
|
|
49732
49732
|
script.setAttribute("src", "//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.54/dist/components.webpack.js");
|
|
49733
|
+
for (const e of Array.from(this.htmlDocument.querySelectorAll("inject"))) {
|
|
49734
|
+
let src = e.getAttribute("src");
|
|
49735
|
+
if (src.startsWith("/")) {
|
|
49736
|
+
src = src.substring(1);
|
|
49737
|
+
} else {}
|
|
49738
|
+
const file = yield this.cloudFileService.children(this.folder.appFileID, src).firstOrDefault();
|
|
49739
|
+
const text = yield FetchBuilder.get(file.downloadUrl).responseAsText();
|
|
49740
|
+
const parser = new DOMParser();
|
|
49741
|
+
const dom = parser.parseFromString(text, "text/html");
|
|
49742
|
+
const children = Array.from(dom.body.children);
|
|
49743
|
+
e.innerHTML = "";
|
|
49744
|
+
for (const iterator of children) {
|
|
49745
|
+
iterator.setAttribute("contentEditable", "false");
|
|
49746
|
+
iterator.remove();
|
|
49747
|
+
e.appendChild(iterator);
|
|
49748
|
+
}
|
|
49749
|
+
}
|
|
49733
49750
|
});
|
|
49734
49751
|
}
|
|
49735
49752
|
addStyleSheet(file) {
|
|
@@ -50449,26 +50466,8 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
50449
50466
|
}
|
|
50450
50467
|
downloadHtml(file, cancelToken) {
|
|
50451
50468
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50452
|
-
|
|
50453
|
-
|
|
50454
|
-
const doc = parser.parseFromString(text, "text/html");
|
|
50455
|
-
const injects = Array.from(doc.documentElement.querySelectorAll("inject"));
|
|
50456
|
-
for (const e of injects) {
|
|
50457
|
-
let src = e.getAttribute("src");
|
|
50458
|
-
if (src.startsWith("/")) {
|
|
50459
|
-
src = src.substring(1);
|
|
50460
|
-
} else {}
|
|
50461
|
-
const injectedFile = yield this.cloudFileService.children(this.root.appFileID, src).firstOrDefault();
|
|
50462
|
-
text = yield FetchBuilder.get(injectedFile.downloadUrl).responseAsText();
|
|
50463
|
-
const dom = parser.parseFromString(text, "text/html");
|
|
50464
|
-
const children = Array.from(dom.body.children);
|
|
50465
|
-
e.innerHTML = "";
|
|
50466
|
-
for (const iterator of children) {
|
|
50467
|
-
iterator.setAttribute("contentEditable", "false");
|
|
50468
|
-
e.appendChild(iterator);
|
|
50469
|
-
}
|
|
50470
|
-
}
|
|
50471
|
-
return doc.documentElement.outerHTML;
|
|
50469
|
+
const text = yield FetchBuilder.get(file.downloadUrl).cancelToken(cancelToken).responseAsText(true);
|
|
50470
|
+
return text;
|
|
50472
50471
|
});
|
|
50473
50472
|
}
|
|
50474
50473
|
createIndexHtml() {
|