@social-mail/social-mail-client 1.2.291 → 1.2.293
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 +30 -17
- package/dist/admin/AdminAppIndex.pack.js.map +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js +3 -3
- package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
- package/dist/common/pages/websites/studio/WebSiteStudioPage.d.ts.map +1 -1
- package/dist/common/pages/websites/studio/WebSiteStudioPage.js +11 -4
- package/dist/common/pages/websites/studio/WebSiteStudioPage.js.map +1 -1
- package/dist/site-editor/editor/HtmlPageEditor.d.ts.map +1 -1
- package/dist/site-editor/editor/HtmlPageEditor.js +16 -12
- package/dist/site-editor/editor/HtmlPageEditor.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.js +30 -17
- package/dist/web/AppIndex.pack.js.map +1 -1
- package/dist/web/AppIndex.pack.min.js +3 -3
- package/dist/web/AppIndex.pack.min.js.map +1 -1
- package/dist/web/page/files/service/CloudFileService.js +3 -1
- package/dist/web/page/files/service/CloudFileService.js.map +1 -1
- package/package.json +1 -1
- package/src/common/pages/websites/studio/WebSiteStudioPage.tsx +11 -5
- package/src/site-editor/editor/HtmlPageEditor.tsx +15 -13
- package/src/web/page/files/service/CloudFileService.ts +1 -1
|
@@ -23077,8 +23077,10 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
|
|
|
23077
23077
|
delete(files) {
|
|
23078
23078
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23079
23079
|
files = files.map(({
|
|
23080
|
+
$type,
|
|
23080
23081
|
appFileID
|
|
23081
|
-
}) =>
|
|
23082
|
+
}) => ({
|
|
23083
|
+
$type,
|
|
23082
23084
|
appFileID,
|
|
23083
23085
|
isDeleted: true
|
|
23084
23086
|
}));
|
|
@@ -48735,8 +48737,8 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
48735
48737
|
mobileWidth = 480;
|
|
48736
48738
|
_export("default", HtmlPageEditor = class HtmlPageEditor extends AtomControl {
|
|
48737
48739
|
get htmlPage() {
|
|
48738
|
-
var _a, _b;
|
|
48739
|
-
return (
|
|
48740
|
+
var _a, _b, _c;
|
|
48741
|
+
return (_a = this.lastCommittedHtml) !== null && _a !== void 0 ? _a : (_c = (_b = this.htmlDocument) === null || _b === void 0 ? void 0 : _b.documentElement) === null || _c === void 0 ? void 0 : _c.outerHTML;
|
|
48740
48742
|
}
|
|
48741
48743
|
set htmlPage(v) {
|
|
48742
48744
|
if (!this.element) {
|
|
@@ -48777,6 +48779,8 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
48777
48779
|
this.undoList = [];
|
|
48778
48780
|
this.redoList = [];
|
|
48779
48781
|
this.pageVariables = [];
|
|
48782
|
+
this.lastCommittedHtml = null;
|
|
48783
|
+
this.lastCommittedBody = null;
|
|
48780
48784
|
this.hover = new SelectedElement(this);
|
|
48781
48785
|
this.dropTarget = new SelectedElement(this);
|
|
48782
48786
|
this.maxWidth = desktopWidth;
|
|
@@ -49097,16 +49101,6 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
49097
49101
|
componentScript.src = UMD.resolvePath("@social-mail/social-mail-client/component.js");
|
|
49098
49102
|
componentScript.setAttribute("styler-component-script", "component-script");
|
|
49099
49103
|
}
|
|
49100
|
-
const currentHtml = clone.innerHTML;
|
|
49101
|
-
if (!lastHtml) {
|
|
49102
|
-
this.lastHtml = currentHtml;
|
|
49103
|
-
return;
|
|
49104
|
-
}
|
|
49105
|
-
if (lastHtml === currentHtml) {
|
|
49106
|
-
return;
|
|
49107
|
-
}
|
|
49108
|
-
this.undoList.add(this.lastHtml);
|
|
49109
|
-
this.lastHtml = currentHtml;
|
|
49110
49104
|
if (this.baseUrl) {
|
|
49111
49105
|
if (!this.originalBaseUrl) {
|
|
49112
49106
|
(_a = clone.querySelector("base")) === null || _a === void 0 ? void 0 : _a.remove();
|
|
@@ -49117,6 +49111,18 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
49117
49111
|
}
|
|
49118
49112
|
}
|
|
49119
49113
|
}
|
|
49114
|
+
const currentHtml = clone.innerHTML;
|
|
49115
|
+
if (!lastHtml) {
|
|
49116
|
+
this.lastHtml = currentHtml;
|
|
49117
|
+
this.lastCommittedHtml = clone.outerHTML;
|
|
49118
|
+
this.lastCommittedBody = body.innerHTML;
|
|
49119
|
+
return;
|
|
49120
|
+
}
|
|
49121
|
+
if (lastHtml === currentHtml) {
|
|
49122
|
+
return;
|
|
49123
|
+
}
|
|
49124
|
+
this.undoList.add(this.lastHtml);
|
|
49125
|
+
this.lastHtml = currentHtml;
|
|
49120
49126
|
this.lastCommittedHtml = clone.outerHTML;
|
|
49121
49127
|
this.lastCommittedBody = body.innerHTML;
|
|
49122
49128
|
this.element.dispatchEvent(new CustomEvent("htmlPageChanged", {
|
|
@@ -50540,6 +50546,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
50540
50546
|
super(...arguments);
|
|
50541
50547
|
this.version = 1;
|
|
50542
50548
|
this.pageContent = "";
|
|
50549
|
+
this.lastHtml = "";
|
|
50543
50550
|
}
|
|
50544
50551
|
init() {
|
|
50545
50552
|
var _a, _b;
|
|
@@ -50639,7 +50646,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
50639
50646
|
}));
|
|
50640
50647
|
this.footerRenderer = () => XNode.create("div", {
|
|
50641
50648
|
"data-layout": "command-row",
|
|
50642
|
-
"style-display": Bind.oneWay(() =>
|
|
50649
|
+
"style-display": Bind.oneWay(() => this.lastHtml !== this.pageContent)
|
|
50643
50650
|
}, XNode.create(SaveIconTextButton, {
|
|
50644
50651
|
"data-click-event": "save-page",
|
|
50645
50652
|
text: "Save"
|
|
@@ -50649,6 +50656,8 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
50649
50656
|
downloadHtml(file, cancelToken) {
|
|
50650
50657
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50651
50658
|
const text = yield FetchBuilder.get(file.downloadUrl).cancelToken(cancelToken).responseAsText(true);
|
|
50659
|
+
this.lastHtml = text;
|
|
50660
|
+
this.pageContent = text;
|
|
50652
50661
|
return text;
|
|
50653
50662
|
});
|
|
50654
50663
|
}
|
|
@@ -50666,7 +50675,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
50666
50675
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50667
50676
|
const content = yield PageNavigator.pushPageForResult(CodeEditorPage, {
|
|
50668
50677
|
fileName: this.selectedFile.name,
|
|
50669
|
-
content: (_a = this.htmlEditor.lastCommittedHtml) !== null && _a !== void 0 ? _a : this.
|
|
50678
|
+
content: (_a = this.htmlEditor.lastCommittedHtml) !== null && _a !== void 0 ? _a : this.lastHtml
|
|
50670
50679
|
});
|
|
50671
50680
|
this.pageContent = content;
|
|
50672
50681
|
this.htmlEditor.htmlPage = content;
|
|
@@ -50700,7 +50709,10 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
50700
50709
|
}
|
|
50701
50710
|
savePage() {
|
|
50702
50711
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50703
|
-
|
|
50712
|
+
let html = this.pageContent;
|
|
50713
|
+
if (!html.trim().startsWith("<!")) {
|
|
50714
|
+
html = `<!DOCTYPE html>${this.pageContent}`;
|
|
50715
|
+
}
|
|
50704
50716
|
const content = new File([html], this.selectedFile.name, {
|
|
50705
50717
|
type: this.selectedFile.contentType
|
|
50706
50718
|
});
|
|
@@ -50712,7 +50724,8 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
50712
50724
|
this.selectedFile.fileContentID = result.fileContentID;
|
|
50713
50725
|
this.selectedFile.downloadUrl = result.downloadUrl;
|
|
50714
50726
|
this.webSite.isModified = true;
|
|
50715
|
-
this.
|
|
50727
|
+
this.lastHtml = html;
|
|
50728
|
+
this.pageContent = html;
|
|
50716
50729
|
});
|
|
50717
50730
|
}
|
|
50718
50731
|
duplicateHtml(file) {
|