@social-mail/social-mail-client 1.2.282 → 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
|
@@ -49730,22 +49730,6 @@ 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
|
-
e.appendChild(iterator);
|
|
49747
|
-
}
|
|
49748
|
-
}
|
|
49749
49733
|
});
|
|
49750
49734
|
}
|
|
49751
49735
|
addStyleSheet(file) {
|
|
@@ -50452,7 +50436,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
50452
50436
|
folder: this.root,
|
|
50453
50437
|
presenter: Bind.presenter(c => this.htmlEditor = c),
|
|
50454
50438
|
"event-html-page-changed": ce => this.pageContent = ce.detail,
|
|
50455
|
-
htmlPage: Bind.oneWayAsync((s, e, cancelToken) => this.selectedFile ?
|
|
50439
|
+
htmlPage: Bind.oneWayAsync((s, e, cancelToken) => this.selectedFile ? this.downloadHtml(this.selectedFile, cancelToken) : void 0)
|
|
50456
50440
|
}));
|
|
50457
50441
|
this.footerRenderer = () => XNode.create("div", {
|
|
50458
50442
|
"data-layout": "command-row",
|
|
@@ -50463,6 +50447,30 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
50463
50447
|
}));
|
|
50464
50448
|
});
|
|
50465
50449
|
}
|
|
50450
|
+
downloadHtml(file, cancelToken) {
|
|
50451
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50452
|
+
let text = yield FetchBuilder.get(file.downloadUrl).cancelToken(cancelToken).responseAsText(true);
|
|
50453
|
+
const parser = new DOMParser();
|
|
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;
|
|
50472
|
+
});
|
|
50473
|
+
}
|
|
50466
50474
|
createIndexHtml() {
|
|
50467
50475
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50468
50476
|
yield PageNavigator.pushPageForResultOrCancel(ChooseWebSiteTemplatePage, this.root);
|