@social-mail/social-mail-client 1.2.525 → 1.2.526
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 +29 -21
- 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 +29 -21
- package/dist/site-editor/editor/WebSitePageEditor.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.js +29 -21
- 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 +32 -23
|
@@ -53450,33 +53450,41 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
|
|
|
53450
53450
|
}
|
|
53451
53451
|
setStylerSheet(doc) {
|
|
53452
53452
|
return __awaiter(this, void 0, void 0, function* () {
|
|
53453
|
+
const pending = [];
|
|
53453
53454
|
for (const e of Array.from(doc.querySelectorAll("inject"))) {
|
|
53454
53455
|
let src = e.getAttribute("src");
|
|
53455
53456
|
if (src.startsWith("/")) {
|
|
53456
53457
|
src = src.substring(1);
|
|
53457
53458
|
} else {}
|
|
53458
|
-
|
|
53459
|
-
|
|
53460
|
-
|
|
53461
|
-
|
|
53462
|
-
|
|
53463
|
-
|
|
53464
|
-
iterator.
|
|
53465
|
-
|
|
53466
|
-
|
|
53467
|
-
|
|
53468
|
-
|
|
53469
|
-
|
|
53470
|
-
|
|
53471
|
-
|
|
53472
|
-
yield this.addStyleSheet(doc, stylerCSS, "styles/styler.css");
|
|
53473
|
-
let vars = yield this.cloudFileService.children(this.folder.appFileID, "styles/vars.css").firstOrDefault();
|
|
53474
|
-
if (!vars) {
|
|
53475
|
-
vars = yield this.createFile("vars.css", `* {
|
|
53476
|
-
${StylerSet.instance.varsCss}
|
|
53477
|
-
}`);
|
|
53459
|
+
pending.push(() => __awaiter(this, void 0, void 0, function* () {
|
|
53460
|
+
const file = yield this.cloudFileService.children(this.folder.appFileID, src).firstOrDefault();
|
|
53461
|
+
const text = yield FetchBuilder.get(file.downloadUrl).responseAsText();
|
|
53462
|
+
const parser = new DOMParser();
|
|
53463
|
+
const dom = parser.parseFromString(text, "text/html");
|
|
53464
|
+
const children = Array.from(dom.body.children);
|
|
53465
|
+
for (const iterator of Array.from(e.children)) {
|
|
53466
|
+
iterator.remove();
|
|
53467
|
+
}
|
|
53468
|
+
for (const iterator of children) {
|
|
53469
|
+
iterator.setAttribute("contentEditable", "false");
|
|
53470
|
+
e.appendChild(iterator);
|
|
53471
|
+
}
|
|
53472
|
+
}));
|
|
53478
53473
|
}
|
|
53479
|
-
|
|
53474
|
+
pending.push(() => __awaiter(this, void 0, void 0, function* () {
|
|
53475
|
+
const stylerCSS = yield this.createFile("styler.css", StylerSet.instance.toString());
|
|
53476
|
+
yield this.addStyleSheet(doc, stylerCSS, "styles/styler.css");
|
|
53477
|
+
}));
|
|
53478
|
+
pending.push(() => __awaiter(this, void 0, void 0, function* () {
|
|
53479
|
+
let vars = yield this.cloudFileService.children(this.folder.appFileID, "styles/vars.css").firstOrDefault();
|
|
53480
|
+
if (!vars) {
|
|
53481
|
+
vars = yield this.createFile("vars.css", `* {
|
|
53482
|
+
${StylerSet.instance.varsCss}
|
|
53483
|
+
}`);
|
|
53484
|
+
}
|
|
53485
|
+
yield this.addStyleSheet(doc, vars, "styles/vars.css");
|
|
53486
|
+
}));
|
|
53487
|
+
yield Promise.all(pending.map(x => x()));
|
|
53480
53488
|
let script = doc.querySelector("script[web-components]");
|
|
53481
53489
|
if (!script) {
|
|
53482
53490
|
script = doc.createElement("script");
|