@social-mail/social-mail-client 1.2.285 → 1.2.287
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 +21 -19
- package/dist/admin/AdminAppIndex.pack.js.map +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
- package/dist/site-editor/editor/WebSitePageEditor.d.ts.map +1 -1
- package/dist/site-editor/editor/WebSitePageEditor.js +21 -19
- package/dist/site-editor/editor/WebSitePageEditor.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.js +21 -19
- package/dist/web/AppIndex.pack.js.map +1 -1
- package/dist/web/AppIndex.pack.min.js +1 -1
- package/dist/web/AppIndex.pack.min.js.map +1 -1
- package/package.json +1 -1
- package/src/site-editor/editor/WebSitePageEditor.tsx +27 -24
|
@@ -45964,6 +45964,9 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
|
|
|
45964
45964
|
const selectedElement = this.selection.element;
|
|
45965
45965
|
const outerText = selectedElement.outerHTML;
|
|
45966
45966
|
let fileName = prompt("File Name", "/templates/header.html");
|
|
45967
|
+
if (!fileName) {
|
|
45968
|
+
return;
|
|
45969
|
+
}
|
|
45967
45970
|
if (fileName.startsWith("/")) {
|
|
45968
45971
|
fileName = fileName.substring(1);
|
|
45969
45972
|
}
|
|
@@ -46023,6 +46026,24 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
|
|
|
46023
46026
|
}
|
|
46024
46027
|
setStylerSheet() {
|
|
46025
46028
|
return __awaiter(this, void 0, void 0, function* () {
|
|
46029
|
+
for (const e of Array.from(this.htmlDocument.querySelectorAll("inject"))) {
|
|
46030
|
+
let src = e.getAttribute("src");
|
|
46031
|
+
if (src.startsWith("/")) {
|
|
46032
|
+
src = src.substring(1);
|
|
46033
|
+
} else {}
|
|
46034
|
+
const file = yield this.cloudFileService.children(this.folder.appFileID, src).firstOrDefault();
|
|
46035
|
+
const text = yield FetchBuilder.get(file.downloadUrl).responseAsText();
|
|
46036
|
+
const parser = new DOMParser();
|
|
46037
|
+
const dom = parser.parseFromString(text, "text/html");
|
|
46038
|
+
const children = Array.from(dom.body.children);
|
|
46039
|
+
for (const iterator of Array.from(e.children)) {
|
|
46040
|
+
iterator.remove();
|
|
46041
|
+
}
|
|
46042
|
+
for (const iterator of children) {
|
|
46043
|
+
iterator.setAttribute("contentEditable", "false");
|
|
46044
|
+
e.appendChild(iterator);
|
|
46045
|
+
}
|
|
46046
|
+
}
|
|
46026
46047
|
const stylerCSS = yield this.createFile("styler.css", StylerSet.instance.toString());
|
|
46027
46048
|
yield this.addStyleSheet(stylerCSS);
|
|
46028
46049
|
let vars = yield this.cloudFileService.children(this.folder.appFileID, "styles/vars.css").firstOrDefault();
|
|
@@ -46042,25 +46063,6 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
|
|
|
46042
46063
|
this.htmlDocument.head.appendChild(script);
|
|
46043
46064
|
}
|
|
46044
46065
|
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
|
-
for (const iterator of Array.from(e.children)) {
|
|
46056
|
-
iterator.remove();
|
|
46057
|
-
}
|
|
46058
|
-
for (const iterator of children) {
|
|
46059
|
-
iterator.setAttribute("contentEditable", "false");
|
|
46060
|
-
iterator.remove();
|
|
46061
|
-
e.appendChild(iterator);
|
|
46062
|
-
}
|
|
46063
|
-
}
|
|
46064
46066
|
});
|
|
46065
46067
|
}
|
|
46066
46068
|
addStyleSheet(file) {
|