@social-mail/social-mail-client 1.2.132 → 1.2.133
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/content/editor/edit.html +3 -3
- package/dist/admin/AdminAppIndex.pack.js +86 -50
- package/dist/admin/AdminAppIndex.pack.js.map +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js +13 -6
- package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
- package/dist/common/controls/html/grapes-js/GrapesJSEditor.d.ts.map +1 -1
- package/dist/common/controls/html/grapes-js/GrapesJSEditor.js +18 -1
- package/dist/common/controls/html/grapes-js/GrapesJSEditor.js.map +1 -1
- package/dist/common/pages/websites/studio/WebSiteStudioPage.d.ts.map +1 -1
- package/dist/common/pages/websites/studio/WebSiteStudioPage.js +13 -10
- package/dist/common/pages/websites/studio/WebSiteStudioPage.js.map +1 -1
- package/dist/public/components/typewriter/TypeWriter.d.ts +9 -0
- package/dist/public/components/typewriter/TypeWriter.d.ts.map +1 -0
- package/dist/public/components/typewriter/TypeWriter.js +78 -0
- package/dist/public/components/typewriter/TypeWriter.js.map +1 -0
- package/dist/site-editor/blocks/Block.js +7 -0
- package/dist/site-editor/blocks/Block.js.map +1 -1
- package/dist/site-editor/blocks/Components.d.ts +1 -0
- package/dist/site-editor/blocks/Components.d.ts.map +1 -1
- package/dist/site-editor/blocks/Components.js +12 -1
- package/dist/site-editor/blocks/Components.js.map +1 -1
- package/dist/site-editor/editor/HtmlPageEditor.d.ts +1 -3
- package/dist/site-editor/editor/HtmlPageEditor.d.ts.map +1 -1
- package/dist/site-editor/editor/HtmlPageEditor.js +44 -39
- package/dist/site-editor/editor/HtmlPageEditor.js.map +1 -1
- package/dist/site-editor/styler/StylerSet.d.ts.map +1 -1
- package/dist/site-editor/styler/StylerSet.js +10 -0
- package/dist/site-editor/styler/StylerSet.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.js +86 -50
- package/dist/web/AppIndex.pack.js.map +1 -1
- package/dist/web/AppIndex.pack.min.js +13 -6
- package/dist/web/AppIndex.pack.min.js.map +1 -1
- package/package.json +1 -1
- package/src/common/controls/html/grapes-js/GrapesJSEditor.tsx +19 -1
- package/src/common/pages/websites/studio/WebSiteStudioPage.tsx +24 -12
- package/src/public/components/typewriter/TypeWriter.tsx +74 -0
- package/src/site-editor/blocks/Block.tsx +7 -0
- package/src/site-editor/blocks/Components.tsx +14 -1
- package/src/site-editor/editor/HtmlPageEditor.tsx +64 -49
- package/src/site-editor/styler/StylerSet.ts +10 -0
package/content/editor/edit.html
CHANGED
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
}
|
|
11
11
|
</style>
|
|
12
12
|
<body>
|
|
13
|
-
<link href="https://cdn.jsdelivr.net/npm/grapesjs@0.21.
|
|
14
|
-
<script src="https://cdn.jsdelivr.net/npm/grapesjs@0.21.
|
|
13
|
+
<link href="https://cdn.jsdelivr.net/npm/grapesjs@0.21.10/dist/css/grapes.min.css" rel="stylesheet"/>
|
|
14
|
+
<script src="https://cdn.jsdelivr.net/npm/grapesjs@0.21.10/dist/grapes.min.js"></script>
|
|
15
15
|
<script src="https://cdn.jsdelivr.net/npm/grapesjs-preset-webpage@1.0.3/dist/index.js"></script>
|
|
16
|
-
<script src="https://cdn.jsdelivr.net/npm/grapesjs-preset-webpage@1.0.2"></script>
|
|
16
|
+
<!-- <script src="https://cdn.jsdelivr.net/npm/grapesjs-preset-webpage@1.0.2"></script> -->
|
|
17
17
|
<script src="https://cdn.jsdelivr.net/npm/grapesjs-blocks-basic@1.0.1"></script>
|
|
18
18
|
<script src="https://cdn.jsdelivr.net/npm/grapesjs-plugin-forms@2.0.5"></script>
|
|
19
19
|
<script src="https://cdn.jsdelivr.net/npm/grapesjs-component-countdown@1.0.1"></script>
|
|
@@ -39411,6 +39411,13 @@ System.register(["@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/web/co
|
|
|
39411
39411
|
}
|
|
39412
39412
|
}
|
|
39413
39413
|
|
|
39414
|
+
&[styler-full-screen] {
|
|
39415
|
+
width: 100%;
|
|
39416
|
+
max-width: 100%;
|
|
39417
|
+
padding: 0;
|
|
39418
|
+
margin: 0;
|
|
39419
|
+
}
|
|
39420
|
+
|
|
39414
39421
|
`.expand("[styler-layout=main]"));
|
|
39415
39422
|
svg = `<svg xmlns="http://www.w3.org/2000/svg" height="16" width="14" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"/></svg>`;
|
|
39416
39423
|
svgCross = `<svg xmlns="http://www.w3.org/2000/svg" height="16" width="12" viewBox="0 0 384 512"><!--!Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2024 Fonticons, Inc.--><path class="fa-secondary" opacity=".4" d="M297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6z"/><path class="fa-primary" d=""/></svg>`;
|
|
@@ -40203,6 +40210,12 @@ System.register(["./Styler", "./properties/stylerBorder", "./properties/layouts/
|
|
|
40203
40210
|
}
|
|
40204
40211
|
}
|
|
40205
40212
|
return `
|
|
40213
|
+
|
|
40214
|
+
html, body {
|
|
40215
|
+
margin: 0;
|
|
40216
|
+
padding: 0;
|
|
40217
|
+
}
|
|
40218
|
+
|
|
40206
40219
|
* {
|
|
40207
40220
|
box-sizing: border-box;
|
|
40208
40221
|
}
|
|
@@ -40215,6 +40228,10 @@ System.register(["./Styler", "./properties/stylerBorder", "./properties/layouts/
|
|
|
40215
40228
|
background-color: var(--body-color);
|
|
40216
40229
|
color: var(--default-text-color);
|
|
40217
40230
|
}
|
|
40231
|
+
|
|
40232
|
+
img {
|
|
40233
|
+
object-fit: none;
|
|
40234
|
+
}
|
|
40218
40235
|
|
|
40219
40236
|
${StylerSets.low.join("\n")}
|
|
40220
40237
|
|
|
@@ -41706,7 +41723,7 @@ System.register(["@web-atoms/core/dist/core/XNode", "./Block"], function (_expor
|
|
|
41706
41723
|
System.register(["@web-atoms/core/dist/core/XNode", "./Block", "../styler/StylerSets", "@web-atoms/core/dist/style/styled", "../styler/Styler"], function (_export, _context) {
|
|
41707
41724
|
"use strict";
|
|
41708
41725
|
|
|
41709
|
-
var XNode, Block, StylerSets, styled, stylerVars, BlogComponent;
|
|
41726
|
+
var XNode, Block, StylerSets, styled, stylerVars, BlogComponent, TypeWriterComponent;
|
|
41710
41727
|
return {
|
|
41711
41728
|
setters: [function (_webAtomsCoreDistCoreXNode) {
|
|
41712
41729
|
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
@@ -41757,6 +41774,17 @@ System.register(["@web-atoms/core/dist/core/XNode", "./Block", "../styler/Styler
|
|
|
41757
41774
|
"data-view": "dist/public/channel/ChannelView"
|
|
41758
41775
|
})
|
|
41759
41776
|
}));
|
|
41777
|
+
_export("TypeWriterComponent", TypeWriterComponent = Block({
|
|
41778
|
+
className: "fad fa-input-text",
|
|
41779
|
+
title: "Add TypeWriter Component",
|
|
41780
|
+
factory: () => XNode.create("section", {
|
|
41781
|
+
"styler-layout": "component",
|
|
41782
|
+
"data-package": "@social-mail/social-mail-client",
|
|
41783
|
+
"data-host": "true",
|
|
41784
|
+
"data-view": "dist/public/components/TypeWriter",
|
|
41785
|
+
"data-json-args": `["Passionate Actor", "Method Actor", "Teleprompter"]`
|
|
41786
|
+
})
|
|
41787
|
+
}));
|
|
41760
41788
|
}
|
|
41761
41789
|
};
|
|
41762
41790
|
});
|
|
@@ -42282,7 +42310,7 @@ System.register(["@web-atoms/core/dist/core/XNode", "./Block", "@web-atoms/core/
|
|
|
42282
42310
|
System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/core/sleep", "@web-atoms/core/dist/style/styled", "@web-atoms/core/dist/view-model/Action", "@web-atoms/core/dist/web/controls/AtomControl", "../drag-drop/DragDropHelper", "../toolbars/UndoRedoToolbar", "../blocks/WrapGrid", "../toolbars/EditorToolbar", "../properties/Properties", "../styler/StylerSet", "./SelectedElement", "@web-atoms/core/dist/core/AtomBinder", "../styler/Styler", "../blocks/ImageBox", "../blocks/RowBox", "../blocks/ColumnBox", "../blocks/VerticalImageBox", "../blocks/Image", "../blocks/ImageCard", "../blocks/TextBox", "../blocks/Card", "../blocks/List", "../blocks/Components", "@web-atoms/core/dist/core/types", "../blocks/Buttons", "../blocks/Columns2", "../blocks/Columns3", "../blocks/RightImageBox", "@web-atoms/core/dist/web/core/AtomUI", "../blocks/PriceBox", "@web-atoms/core/dist/core/BindableProperty"], function (_export, _context) {
|
|
42283
42311
|
"use strict";
|
|
42284
42312
|
|
|
42285
|
-
var __awaiter, __decorate, __metadata, Bind, XNode, sleep, styled, Action, AtomControl, InstallDragDropHelper, UndoRedoToolbar, WrapGrid, EditorToolbar, Properties, StylerSet, SelectedElement, AtomBinder, StylerVariable, ImageBox, RowBox, ColumnBox, VerticalImageBox, Image, ImageCard, TextBox, Card, List, BlogComponent, UMD, ImageLink, LinkButton, Columns2, Columns3, RightImageBox, descendentElementIterator, PriceTable, BindableProperty, HtmlPageEditor, desktopWidth, tabletWidth, mobileWidth;
|
|
42313
|
+
var __awaiter, __decorate, __metadata, Bind, XNode, sleep, styled, Action, AtomControl, InstallDragDropHelper, UndoRedoToolbar, WrapGrid, EditorToolbar, Properties, StylerSet, SelectedElement, AtomBinder, StylerVariable, ImageBox, RowBox, ColumnBox, VerticalImageBox, Image, ImageCard, TextBox, Card, List, BlogComponent, TypeWriterComponent, UMD, ImageLink, LinkButton, Columns2, Columns3, RightImageBox, descendentElementIterator, PriceTable, BindableProperty, HtmlPageEditor, desktopWidth, tabletWidth, mobileWidth;
|
|
42286
42314
|
_export("default", void 0);
|
|
42287
42315
|
return {
|
|
42288
42316
|
setters: [function (_tslib) {
|
|
@@ -42339,6 +42367,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
42339
42367
|
List = _blocksList.List;
|
|
42340
42368
|
}, function (_blocksComponents) {
|
|
42341
42369
|
BlogComponent = _blocksComponents.BlogComponent;
|
|
42370
|
+
TypeWriterComponent = _blocksComponents.TypeWriterComponent;
|
|
42342
42371
|
}, function (_webAtomsCoreDistCoreTypes) {
|
|
42343
42372
|
UMD = _webAtomsCoreDistCoreTypes.UMD;
|
|
42344
42373
|
}, function (_blocksButtons) {
|
|
@@ -42478,29 +42507,37 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
42478
42507
|
tabletWidth = 768;
|
|
42479
42508
|
mobileWidth = 480;
|
|
42480
42509
|
_export("default", HtmlPageEditor = class HtmlPageEditor extends AtomControl {
|
|
42481
|
-
get
|
|
42482
|
-
|
|
42510
|
+
get htmlPage() {
|
|
42511
|
+
var _a, _b;
|
|
42512
|
+
return (_b = (_a = this.htmlDocument) === null || _a === void 0 ? void 0 : _a.documentElement) === null || _b === void 0 ? void 0 : _b.outerHTML;
|
|
42483
42513
|
}
|
|
42484
|
-
set
|
|
42514
|
+
set htmlPage(v) {
|
|
42485
42515
|
if (!this.element) {
|
|
42486
42516
|
return;
|
|
42487
42517
|
}
|
|
42488
42518
|
if (!this.ready) {
|
|
42489
42519
|
setTimeout(() => {
|
|
42490
|
-
this.
|
|
42520
|
+
this.htmlPage = v;
|
|
42491
42521
|
}, 100);
|
|
42492
42522
|
return;
|
|
42493
42523
|
}
|
|
42494
|
-
|
|
42495
|
-
|
|
42496
|
-
|
|
42497
|
-
|
|
42498
|
-
|
|
42499
|
-
|
|
42500
|
-
|
|
42501
|
-
|
|
42502
|
-
|
|
42503
|
-
|
|
42524
|
+
void this.ready.then(() => {
|
|
42525
|
+
const dom = new DOMParser();
|
|
42526
|
+
const doc = dom.parseFromString(v, "text/html");
|
|
42527
|
+
let baseElement = doc.querySelector("base");
|
|
42528
|
+
if (baseElement) {
|
|
42529
|
+
const href = baseElement.getAttribute("href");
|
|
42530
|
+
if (href !== this.baseUrl) {
|
|
42531
|
+
this.originalBaseUrl = href;
|
|
42532
|
+
baseElement.setAttribute("href", this.baseUrl);
|
|
42533
|
+
}
|
|
42534
|
+
} else {
|
|
42535
|
+
baseElement = doc.createElement("base");
|
|
42536
|
+
baseElement.setAttribute("href", this.baseUrl);
|
|
42537
|
+
doc.head.insertAdjacentElement("afterbegin", baseElement);
|
|
42538
|
+
}
|
|
42539
|
+
return this.initDocument(doc.documentElement.outerHTML);
|
|
42540
|
+
});
|
|
42504
42541
|
}
|
|
42505
42542
|
constructor(app, e) {
|
|
42506
42543
|
super(app, e);
|
|
@@ -42539,7 +42576,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
42539
42576
|
class: "fa-solid fa-code"
|
|
42540
42577
|
}))), XNode.create(EditorToolbar, {
|
|
42541
42578
|
"data-element": "left"
|
|
42542
|
-
}, XNode.create(TextBox, null), XNode.create(Image, null), XNode.create(WrapGrid, null), XNode.create(VerticalImageBox, null), XNode.create(ImageBox, null), XNode.create(RightImageBox, null), XNode.create(Card, null), XNode.create(ImageCard, null), XNode.create(RowBox, null), XNode.create(ColumnBox, null), XNode.create(Columns2, null), XNode.create(Columns3, null), XNode.create(List, null), XNode.create(BlogComponent, null), XNode.create(ImageLink, null), XNode.create(LinkButton, null), XNode.create(PriceTable, null)), XNode.create("div", {
|
|
42579
|
+
}, XNode.create(TextBox, null), XNode.create(Image, null), XNode.create(WrapGrid, null), XNode.create(VerticalImageBox, null), XNode.create(ImageBox, null), XNode.create(RightImageBox, null), XNode.create(Card, null), XNode.create(ImageCard, null), XNode.create(RowBox, null), XNode.create(ColumnBox, null), XNode.create(Columns2, null), XNode.create(Columns3, null), XNode.create(List, null), XNode.create(BlogComponent, null), XNode.create(ImageLink, null), XNode.create(LinkButton, null), XNode.create(PriceTable, null), XNode.create(TypeWriterComponent, null)), XNode.create("div", {
|
|
42543
42580
|
"data-element": "editor",
|
|
42544
42581
|
"style-max-width": Bind.oneWay(() => this.maxWidth > 768 ? "" : this.maxWidth + "px")
|
|
42545
42582
|
}, XNode.create("div", {
|
|
@@ -42771,16 +42808,6 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
42771
42808
|
const clone = this.htmlDocument.documentElement.cloneNode(true);
|
|
42772
42809
|
const body = clone.querySelector("body");
|
|
42773
42810
|
body.removeAttribute("contentEditable");
|
|
42774
|
-
if (this.baseUrl) {
|
|
42775
|
-
if (!this.originalBaseUrl) {
|
|
42776
|
-
(_a = clone.querySelector("base")) === null || _a === void 0 ? void 0 : _a.remove();
|
|
42777
|
-
} else {
|
|
42778
|
-
const baseUrl = clone.querySelector("base");
|
|
42779
|
-
if (baseUrl) {
|
|
42780
|
-
baseUrl.setAttribute("href", this.originalBaseUrl);
|
|
42781
|
-
}
|
|
42782
|
-
}
|
|
42783
|
-
}
|
|
42784
42811
|
const all = clone.querySelectorAll("*");
|
|
42785
42812
|
for (let index = 0; index < all.length; index++) {
|
|
42786
42813
|
const element = all[index];
|
|
@@ -42806,6 +42833,16 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
42806
42833
|
}
|
|
42807
42834
|
this.undoList.add(this.lastHtml);
|
|
42808
42835
|
this.lastHtml = currentHtml;
|
|
42836
|
+
if (this.baseUrl) {
|
|
42837
|
+
if (!this.originalBaseUrl) {
|
|
42838
|
+
(_a = clone.querySelector("base")) === null || _a === void 0 ? void 0 : _a.remove();
|
|
42839
|
+
} else {
|
|
42840
|
+
const baseUrl = clone.querySelector("base");
|
|
42841
|
+
if (baseUrl) {
|
|
42842
|
+
baseUrl.setAttribute("href", this.originalBaseUrl);
|
|
42843
|
+
}
|
|
42844
|
+
}
|
|
42845
|
+
}
|
|
42809
42846
|
this.element.dispatchEvent(new CustomEvent("htmlPageChanged", {
|
|
42810
42847
|
detail: clone.outerHTML,
|
|
42811
42848
|
bubbles: true
|
|
@@ -42826,10 +42863,12 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
42826
42863
|
this.htmlDocument.documentElement.innerHTML = this.redoList.removeAt(this.redoList.length - 1);
|
|
42827
42864
|
this.htmlDocument.body.contentEditable = "true";
|
|
42828
42865
|
}
|
|
42829
|
-
initDocument() {
|
|
42866
|
+
initDocument(v) {
|
|
42830
42867
|
void this.ready.then(() => __awaiter(this, void 0, void 0, function* () {
|
|
42831
|
-
|
|
42832
|
-
|
|
42868
|
+
this.htmlDocument = void 0;
|
|
42869
|
+
yield this.loadContentDocument();
|
|
42870
|
+
this.htmlDocument.open();
|
|
42871
|
+
this.htmlDocument.write(v);
|
|
42833
42872
|
this.htmlDocument.addEventListener("click", e => {
|
|
42834
42873
|
const target = e.target;
|
|
42835
42874
|
const previous = this.selection.element;
|
|
@@ -42906,6 +42945,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
42906
42945
|
}
|
|
42907
42946
|
});
|
|
42908
42947
|
InstallDragDropHelper(this);
|
|
42948
|
+
this.htmlDocument.close();
|
|
42909
42949
|
this.htmlDocument.body.contentEditable = "true";
|
|
42910
42950
|
setTimeout(() => {
|
|
42911
42951
|
this.app.runAsync(() => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -42942,20 +42982,13 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
42942
42982
|
};
|
|
42943
42983
|
this.pageVariables = StylerSet.instance.vars.map(x => new StylerVariable(x.name, x.value, this.htmlDocument, onChange));
|
|
42944
42984
|
}
|
|
42945
|
-
loadContentDocument(
|
|
42946
|
-
var _a;
|
|
42985
|
+
loadContentDocument() {
|
|
42947
42986
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42948
|
-
|
|
42949
|
-
|
|
42950
|
-
}
|
|
42951
|
-
for (;;) {
|
|
42987
|
+
this.contentEditor = this.element.querySelector(`[data-element="content-editor"]`);
|
|
42988
|
+
while (!this.htmlDocument) {
|
|
42952
42989
|
this.htmlDocument = this.contentEditor.contentDocument;
|
|
42953
|
-
if (((_a = this.htmlDocument) === null || _a === void 0 ? void 0 : _a.readyState) === "complete") {
|
|
42954
|
-
break;
|
|
42955
|
-
}
|
|
42956
42990
|
yield sleep(100);
|
|
42957
42991
|
}
|
|
42958
|
-
this.htmlDocument.body.contentEditable = "true";
|
|
42959
42992
|
});
|
|
42960
42993
|
}
|
|
42961
42994
|
});
|
|
@@ -43792,14 +43825,14 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
43792
43825
|
this.pageContent = "";
|
|
43793
43826
|
}
|
|
43794
43827
|
init() {
|
|
43795
|
-
var _a, _b
|
|
43796
|
-
var
|
|
43828
|
+
var _a, _b;
|
|
43829
|
+
var _c;
|
|
43797
43830
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43798
43831
|
this.search = "";
|
|
43799
43832
|
this.root = yield this.cloudFileService.root(this.parameters);
|
|
43800
43833
|
this.title = this.root.name;
|
|
43801
43834
|
this.webSite = yield this.websiteService.get(this.root.appFileID);
|
|
43802
|
-
(_a = (
|
|
43835
|
+
(_a = (_c = this.root).children) !== null && _a !== void 0 ? _a : _c.children = [];
|
|
43803
43836
|
this.root.children.remove(x => x.isDeleted || !(/^(text\/(html|css))$/i.test(x.contentType) || x.isFolder));
|
|
43804
43837
|
this.root.children.sort((a, b) => a.isFolder ? -1 : 0);
|
|
43805
43838
|
yield this.onItemExpanded(this.root);
|
|
@@ -43809,11 +43842,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
43809
43842
|
}
|
|
43810
43843
|
const indexHtml = this.root.children.find(x => x.name === "index.html");
|
|
43811
43844
|
this.selectedFile = indexHtml;
|
|
43812
|
-
|
|
43813
|
-
const firstHost = (_c = this.webSite.hosts) === null || _c === void 0 ? void 0 : _c[0];
|
|
43814
|
-
if (firstHost) {
|
|
43815
|
-
baseUrl = `https://draft-${firstHost.host}`;
|
|
43816
|
-
}
|
|
43845
|
+
const baseUrl = `/api/site/draft/${this.root.appFileID}/`;
|
|
43817
43846
|
this.titleRenderer = () => XNode.create("div", {
|
|
43818
43847
|
"data-layout": "row"
|
|
43819
43848
|
}, XNode.create("div", {
|
|
@@ -43844,7 +43873,13 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
43844
43873
|
"data-click-event": "view-website",
|
|
43845
43874
|
icon: "fad fa-globe-pointer",
|
|
43846
43875
|
text: "View Site"
|
|
43847
|
-
}),
|
|
43876
|
+
}), XNode.create("a", {
|
|
43877
|
+
href: `/api/site/draft/${this.webSite.folderID}`,
|
|
43878
|
+
target: "_blank"
|
|
43879
|
+
}, XNode.create(EditIconTextButton, {
|
|
43880
|
+
icon: "fad fa-globe-pointer",
|
|
43881
|
+
text: "Preview Draft"
|
|
43882
|
+
})), this.parameters.templates && XNode.create("div", {
|
|
43848
43883
|
"data-layout": "row",
|
|
43849
43884
|
"style-display": Bind.oneWay(() => this.selectedFile.appFileID > 0)
|
|
43850
43885
|
}, XNode.create("i", {
|
|
@@ -43877,10 +43912,11 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
43877
43912
|
}
|
|
43878
43913
|
}), XNode.create(WebSitePageEditor, {
|
|
43879
43914
|
class: "file-list",
|
|
43915
|
+
baseUrl: baseUrl,
|
|
43880
43916
|
folder: this.root,
|
|
43881
43917
|
presenter: Bind.presenter(c => this.htmlEditor = c),
|
|
43882
43918
|
"event-html-page-changed": ce => this.pageContent = ce.detail,
|
|
43883
|
-
|
|
43919
|
+
htmlPage: Bind.oneWayAsync((s, e, cancelToken) => this.selectedFile ? FetchBuilder.get(this.selectedFile.downloadUrl).cancelToken(cancelToken).responseAsText(true) : void 0)
|
|
43884
43920
|
}));
|
|
43885
43921
|
this.footerRenderer = () => XNode.create("div", {
|
|
43886
43922
|
"data-layout": "command-row",
|