@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
|
@@ -34102,8 +34102,10 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
|
|
|
34102
34102
|
delete(files) {
|
|
34103
34103
|
return __awaiter(this, void 0, void 0, function* () {
|
|
34104
34104
|
files = files.map(({
|
|
34105
|
+
$type,
|
|
34105
34106
|
appFileID
|
|
34106
|
-
}) =>
|
|
34107
|
+
}) => ({
|
|
34108
|
+
$type,
|
|
34107
34109
|
appFileID,
|
|
34108
34110
|
isDeleted: true
|
|
34109
34111
|
}));
|
|
@@ -44897,8 +44899,8 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
44897
44899
|
mobileWidth = 480;
|
|
44898
44900
|
_export("default", HtmlPageEditor = class HtmlPageEditor extends AtomControl {
|
|
44899
44901
|
get htmlPage() {
|
|
44900
|
-
var _a, _b;
|
|
44901
|
-
return (
|
|
44902
|
+
var _a, _b, _c;
|
|
44903
|
+
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;
|
|
44902
44904
|
}
|
|
44903
44905
|
set htmlPage(v) {
|
|
44904
44906
|
if (!this.element) {
|
|
@@ -44939,6 +44941,8 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
44939
44941
|
this.undoList = [];
|
|
44940
44942
|
this.redoList = [];
|
|
44941
44943
|
this.pageVariables = [];
|
|
44944
|
+
this.lastCommittedHtml = null;
|
|
44945
|
+
this.lastCommittedBody = null;
|
|
44942
44946
|
this.hover = new SelectedElement(this);
|
|
44943
44947
|
this.dropTarget = new SelectedElement(this);
|
|
44944
44948
|
this.maxWidth = desktopWidth;
|
|
@@ -45259,16 +45263,6 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
45259
45263
|
componentScript.src = UMD.resolvePath("@social-mail/social-mail-client/component.js");
|
|
45260
45264
|
componentScript.setAttribute("styler-component-script", "component-script");
|
|
45261
45265
|
}
|
|
45262
|
-
const currentHtml = clone.innerHTML;
|
|
45263
|
-
if (!lastHtml) {
|
|
45264
|
-
this.lastHtml = currentHtml;
|
|
45265
|
-
return;
|
|
45266
|
-
}
|
|
45267
|
-
if (lastHtml === currentHtml) {
|
|
45268
|
-
return;
|
|
45269
|
-
}
|
|
45270
|
-
this.undoList.add(this.lastHtml);
|
|
45271
|
-
this.lastHtml = currentHtml;
|
|
45272
45266
|
if (this.baseUrl) {
|
|
45273
45267
|
if (!this.originalBaseUrl) {
|
|
45274
45268
|
(_a = clone.querySelector("base")) === null || _a === void 0 ? void 0 : _a.remove();
|
|
@@ -45279,6 +45273,18 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
45279
45273
|
}
|
|
45280
45274
|
}
|
|
45281
45275
|
}
|
|
45276
|
+
const currentHtml = clone.innerHTML;
|
|
45277
|
+
if (!lastHtml) {
|
|
45278
|
+
this.lastHtml = currentHtml;
|
|
45279
|
+
this.lastCommittedHtml = clone.outerHTML;
|
|
45280
|
+
this.lastCommittedBody = body.innerHTML;
|
|
45281
|
+
return;
|
|
45282
|
+
}
|
|
45283
|
+
if (lastHtml === currentHtml) {
|
|
45284
|
+
return;
|
|
45285
|
+
}
|
|
45286
|
+
this.undoList.add(this.lastHtml);
|
|
45287
|
+
this.lastHtml = currentHtml;
|
|
45282
45288
|
this.lastCommittedHtml = clone.outerHTML;
|
|
45283
45289
|
this.lastCommittedBody = body.innerHTML;
|
|
45284
45290
|
this.element.dispatchEvent(new CustomEvent("htmlPageChanged", {
|
|
@@ -46852,6 +46858,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
46852
46858
|
super(...arguments);
|
|
46853
46859
|
this.version = 1;
|
|
46854
46860
|
this.pageContent = "";
|
|
46861
|
+
this.lastHtml = "";
|
|
46855
46862
|
}
|
|
46856
46863
|
init() {
|
|
46857
46864
|
var _a, _b;
|
|
@@ -46951,7 +46958,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
46951
46958
|
}));
|
|
46952
46959
|
this.footerRenderer = () => XNode.create("div", {
|
|
46953
46960
|
"data-layout": "command-row",
|
|
46954
|
-
"style-display": Bind.oneWay(() =>
|
|
46961
|
+
"style-display": Bind.oneWay(() => this.lastHtml !== this.pageContent)
|
|
46955
46962
|
}, XNode.create(SaveIconTextButton, {
|
|
46956
46963
|
"data-click-event": "save-page",
|
|
46957
46964
|
text: "Save"
|
|
@@ -46961,6 +46968,8 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
46961
46968
|
downloadHtml(file, cancelToken) {
|
|
46962
46969
|
return __awaiter(this, void 0, void 0, function* () {
|
|
46963
46970
|
const text = yield FetchBuilder.get(file.downloadUrl).cancelToken(cancelToken).responseAsText(true);
|
|
46971
|
+
this.lastHtml = text;
|
|
46972
|
+
this.pageContent = text;
|
|
46964
46973
|
return text;
|
|
46965
46974
|
});
|
|
46966
46975
|
}
|
|
@@ -46978,7 +46987,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
46978
46987
|
return __awaiter(this, void 0, void 0, function* () {
|
|
46979
46988
|
const content = yield PageNavigator.pushPageForResult(CodeEditorPage, {
|
|
46980
46989
|
fileName: this.selectedFile.name,
|
|
46981
|
-
content: (_a = this.htmlEditor.lastCommittedHtml) !== null && _a !== void 0 ? _a : this.
|
|
46990
|
+
content: (_a = this.htmlEditor.lastCommittedHtml) !== null && _a !== void 0 ? _a : this.lastHtml
|
|
46982
46991
|
});
|
|
46983
46992
|
this.pageContent = content;
|
|
46984
46993
|
this.htmlEditor.htmlPage = content;
|
|
@@ -47012,7 +47021,10 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
47012
47021
|
}
|
|
47013
47022
|
savePage() {
|
|
47014
47023
|
return __awaiter(this, void 0, void 0, function* () {
|
|
47015
|
-
|
|
47024
|
+
let html = this.pageContent;
|
|
47025
|
+
if (!html.trim().startsWith("<!")) {
|
|
47026
|
+
html = `<!DOCTYPE html>${this.pageContent}`;
|
|
47027
|
+
}
|
|
47016
47028
|
const content = new File([html], this.selectedFile.name, {
|
|
47017
47029
|
type: this.selectedFile.contentType
|
|
47018
47030
|
});
|
|
@@ -47024,7 +47036,8 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
47024
47036
|
this.selectedFile.fileContentID = result.fileContentID;
|
|
47025
47037
|
this.selectedFile.downloadUrl = result.downloadUrl;
|
|
47026
47038
|
this.webSite.isModified = true;
|
|
47027
|
-
this.
|
|
47039
|
+
this.lastHtml = html;
|
|
47040
|
+
this.pageContent = html;
|
|
47028
47041
|
});
|
|
47029
47042
|
}
|
|
47030
47043
|
duplicateHtml(file) {
|