@social-mail/social-mail-client 1.2.281 → 1.2.283
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 +25 -17
- 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 +1 -0
- package/dist/common/pages/websites/studio/WebSiteStudioPage.d.ts.map +1 -1
- package/dist/common/pages/websites/studio/WebSiteStudioPage.js +25 -1
- 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 +0 -16
- package/dist/site-editor/editor/WebSitePageEditor.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.js +25 -17
- 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 +29 -3
- package/src/site-editor/editor/WebSitePageEditor.tsx +0 -21
|
@@ -46042,22 +46042,6 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
|
|
|
46042
46042
|
this.htmlDocument.head.appendChild(script);
|
|
46043
46043
|
}
|
|
46044
46044
|
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
|
-
e.appendChild(iterator);
|
|
46059
|
-
}
|
|
46060
|
-
}
|
|
46061
46045
|
});
|
|
46062
46046
|
}
|
|
46063
46047
|
addStyleSheet(file) {
|
|
@@ -46764,7 +46748,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
46764
46748
|
folder: this.root,
|
|
46765
46749
|
presenter: Bind.presenter(c => this.htmlEditor = c),
|
|
46766
46750
|
"event-html-page-changed": ce => this.pageContent = ce.detail,
|
|
46767
|
-
htmlPage: Bind.oneWayAsync((s, e, cancelToken) => this.selectedFile ?
|
|
46751
|
+
htmlPage: Bind.oneWayAsync((s, e, cancelToken) => this.selectedFile ? this.downloadHtml(this.selectedFile, cancelToken) : void 0)
|
|
46768
46752
|
}));
|
|
46769
46753
|
this.footerRenderer = () => XNode.create("div", {
|
|
46770
46754
|
"data-layout": "command-row",
|
|
@@ -46775,6 +46759,30 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
46775
46759
|
}));
|
|
46776
46760
|
});
|
|
46777
46761
|
}
|
|
46762
|
+
downloadHtml(file, cancelToken) {
|
|
46763
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46764
|
+
let text = yield FetchBuilder.get(file.downloadUrl).cancelToken(cancelToken).responseAsText(true);
|
|
46765
|
+
const parser = new DOMParser();
|
|
46766
|
+
const doc = parser.parseFromString(text, "text/html");
|
|
46767
|
+
const injects = Array.from(doc.documentElement.querySelectorAll("inject"));
|
|
46768
|
+
for (const e of injects) {
|
|
46769
|
+
let src = e.getAttribute("src");
|
|
46770
|
+
if (src.startsWith("/")) {
|
|
46771
|
+
src = src.substring(1);
|
|
46772
|
+
} else {}
|
|
46773
|
+
const injectedFile = yield this.cloudFileService.children(this.root.appFileID, src).firstOrDefault();
|
|
46774
|
+
text = yield FetchBuilder.get(injectedFile.downloadUrl).responseAsText();
|
|
46775
|
+
const dom = parser.parseFromString(text, "text/html");
|
|
46776
|
+
const children = Array.from(dom.body.children);
|
|
46777
|
+
e.innerHTML = "";
|
|
46778
|
+
for (const iterator of children) {
|
|
46779
|
+
iterator.setAttribute("contentEditable", "false");
|
|
46780
|
+
e.appendChild(iterator);
|
|
46781
|
+
}
|
|
46782
|
+
}
|
|
46783
|
+
return doc.documentElement.outerHTML;
|
|
46784
|
+
});
|
|
46785
|
+
}
|
|
46778
46786
|
createIndexHtml() {
|
|
46779
46787
|
return __awaiter(this, void 0, void 0, function* () {
|
|
46780
46788
|
yield PageNavigator.pushPageForResultOrCancel(ChooseWebSiteTemplatePage, this.root);
|