@social-mail/social-mail-client 1.2.20 → 1.2.22
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 +164 -42
- package/dist/admin/AdminAppIndex.pack.js.map +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js +11 -6
- package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
- package/dist/code-editor/CodeEditorPage.d.ts +9 -2
- package/dist/code-editor/CodeEditorPage.d.ts.map +1 -1
- package/dist/code-editor/CodeEditorPage.js +72 -5
- package/dist/code-editor/CodeEditorPage.js.map +1 -1
- package/dist/code-editor/MonaoEditor.d.ts +5 -0
- package/dist/code-editor/MonaoEditor.d.ts.map +1 -1
- package/dist/code-editor/MonaoEditor.js +21 -2
- package/dist/code-editor/MonaoEditor.js.map +1 -1
- package/dist/common/pages/websites/studio/WebSiteStudioPage.d.ts +4 -0
- package/dist/common/pages/websites/studio/WebSiteStudioPage.d.ts.map +1 -1
- package/dist/common/pages/websites/studio/WebSiteStudioPage.js +11 -0
- package/dist/common/pages/websites/studio/WebSiteStudioPage.js.map +1 -1
- package/dist/site-editor/editor/HtmlPageEditor.d.ts +1 -0
- package/dist/site-editor/editor/HtmlPageEditor.d.ts.map +1 -1
- package/dist/site-editor/editor/HtmlPageEditor.js +17 -7
- package/dist/site-editor/editor/HtmlPageEditor.js.map +1 -1
- package/dist/site-editor/editor/WebSitePageEditor.d.ts.map +1 -1
- package/dist/site-editor/editor/WebSitePageEditor.js +4 -2
- package/dist/site-editor/editor/WebSitePageEditor.js.map +1 -1
- package/dist/site-editor/styler/StylerSet.d.ts +1 -0
- package/dist/site-editor/styler/StylerSet.d.ts.map +1 -1
- package/dist/site-editor/styler/StylerSet.js +1 -0
- package/dist/site-editor/styler/StylerSet.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.js +164 -42
- package/dist/web/AppIndex.pack.js.map +1 -1
- package/dist/web/AppIndex.pack.min.js +12 -7
- package/dist/web/AppIndex.pack.min.js.map +1 -1
- package/dist/web/page/files/media/ChooseMediaPage.d.ts.map +1 -1
- package/dist/web/page/files/media/ChooseMediaPage.js +34 -24
- package/dist/web/page/files/media/ChooseMediaPage.js.map +1 -1
- package/dist/web/page/files/service/CloudFileService.d.ts +1 -0
- package/dist/web/page/files/service/CloudFileService.d.ts.map +1 -1
- package/dist/web/page/files/service/CloudFileService.js +4 -2
- package/dist/web/page/files/service/CloudFileService.js.map +1 -1
- package/package.json +1 -1
- package/src/code-editor/CodeEditorPage.tsx +50 -1
- package/src/code-editor/MonaoEditor.tsx +23 -3
- package/src/common/pages/websites/studio/WebSiteStudioPage.tsx +18 -0
- package/src/site-editor/editor/HtmlPageEditor.tsx +16 -6
- package/src/site-editor/editor/WebSitePageEditor.tsx +4 -2
- package/src/site-editor/styler/StylerSet.ts +2 -0
- package/src/web/page/files/media/ChooseMediaPage.tsx +27 -18
- package/src/web/page/files/service/CloudFileService.ts +3 -2
|
@@ -18584,11 +18584,13 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
|
|
|
18584
18584
|
const {
|
|
18585
18585
|
appFileID,
|
|
18586
18586
|
content,
|
|
18587
|
-
parentID
|
|
18587
|
+
parentID,
|
|
18588
|
+
folder
|
|
18588
18589
|
} = fm;
|
|
18589
18590
|
return this.localFileService.uploadFile(content, {
|
|
18590
18591
|
appFileID,
|
|
18591
|
-
parentID
|
|
18592
|
+
parentID,
|
|
18593
|
+
folder
|
|
18592
18594
|
});
|
|
18593
18595
|
});
|
|
18594
18596
|
}
|
|
@@ -37170,6 +37172,7 @@ System.register(["./Styler", "./properties/stylerBorder", "./properties/layouts/
|
|
|
37170
37172
|
_export("StylerSet", StylerSet = class StylerSet {
|
|
37171
37173
|
constructor() {
|
|
37172
37174
|
this.vars = vars;
|
|
37175
|
+
this.varsCss = this.vars.join("\n\t\t\t");
|
|
37173
37176
|
this.properties = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
|
|
37174
37177
|
stylerLayout,
|
|
37175
37178
|
stylerColorSets,
|
|
@@ -38402,10 +38405,15 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
38402
38405
|
}, 100);
|
|
38403
38406
|
return;
|
|
38404
38407
|
}
|
|
38405
|
-
void this.ready.then(() => {
|
|
38408
|
+
void this.ready.then(() => __awaiter(this, void 0, void 0, function* () {
|
|
38406
38409
|
if (!this.htmlDocument) {
|
|
38407
38410
|
return;
|
|
38408
38411
|
}
|
|
38412
|
+
const iframe = this.element;
|
|
38413
|
+
if (this.htmlDocument !== iframe.contentDocument) {
|
|
38414
|
+
this.htmlDocument = void 0;
|
|
38415
|
+
yield this.loadContentDocument();
|
|
38416
|
+
}
|
|
38409
38417
|
this.htmlDocument.open();
|
|
38410
38418
|
this.htmlDocument.write(v);
|
|
38411
38419
|
this.htmlDocument.addEventListener("click", e => {
|
|
@@ -38483,7 +38491,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
38483
38491
|
this.loadVariables();
|
|
38484
38492
|
}));
|
|
38485
38493
|
}, 10);
|
|
38486
|
-
});
|
|
38494
|
+
}));
|
|
38487
38495
|
}
|
|
38488
38496
|
constructor(app, e) {
|
|
38489
38497
|
super(app, e);
|
|
@@ -38584,11 +38592,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
38584
38592
|
}, XNode.create("i", {
|
|
38585
38593
|
class: "fas fa-code"
|
|
38586
38594
|
}), "Variables"), XNode.create(Properties, null))));
|
|
38587
|
-
|
|
38588
|
-
while (!this.htmlDocument) {
|
|
38589
|
-
this.htmlDocument = this.contentEditor.contentDocument;
|
|
38590
|
-
yield sleep(100);
|
|
38591
|
-
}
|
|
38595
|
+
yield this.loadContentDocument();
|
|
38592
38596
|
});
|
|
38593
38597
|
}
|
|
38594
38598
|
buildXNode(node) {
|
|
@@ -38769,6 +38773,15 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
38769
38773
|
};
|
|
38770
38774
|
this.pageVariables = StylerSet.instance.vars.map(x => new StylerVariable(x.name, x.value, this.htmlDocument, onChange));
|
|
38771
38775
|
}
|
|
38776
|
+
loadContentDocument() {
|
|
38777
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38778
|
+
this.contentEditor = this.element.querySelector(`[data-element="content-editor"]`);
|
|
38779
|
+
while (!this.htmlDocument) {
|
|
38780
|
+
this.htmlDocument = this.contentEditor.contentDocument;
|
|
38781
|
+
yield sleep(100);
|
|
38782
|
+
}
|
|
38783
|
+
});
|
|
38784
|
+
}
|
|
38772
38785
|
});
|
|
38773
38786
|
__decorate([Action({
|
|
38774
38787
|
onEvent: "delete-element"
|
|
@@ -38796,10 +38809,10 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
38796
38809
|
|
|
38797
38810
|
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/site-editor/editor/HtmlPageEditor");
|
|
38798
38811
|
|
|
38799
|
-
System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "@web-atoms/core/dist/core/XNode", "../../../../common/controls/tree/FileTreeView", "@web-atoms/web-controls/dist/basic/AtomRepeater", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dist/core/InjectProperty", "../service/CloudFileService", "@web-atoms/core/dist/style/styled", "../../../../common/controls/drag-drop/FilesDragDrop", "@web-atoms/core/dist/view-model/Action", "@web-atoms/web-controls/dist/basic/UploadEvent"], function (_export, _context) {
|
|
38812
|
+
System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "@web-atoms/core/dist/core/XNode", "../../../../common/controls/tree/FileTreeView", "@web-atoms/web-controls/dist/basic/AtomRepeater", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dist/core/InjectProperty", "../service/CloudFileService", "@web-atoms/core/dist/style/styled", "../../../../common/controls/drag-drop/FilesDragDrop", "@web-atoms/core/dist/view-model/Action", "@web-atoms/web-controls/dist/basic/UploadEvent", "../../../../common/controls/buttons/IconButton"], function (_export, _context) {
|
|
38800
38813
|
"use strict";
|
|
38801
38814
|
|
|
38802
|
-
var __awaiter, __decorate, __metadata, PopupWindowPage, XNode, FolderTreeView, AtomRepeater, Bind, InjectProperty, CloudFileService, styled, FilesDragDrop, Action, UploadEvent, ChooseMediaPage, css;
|
|
38815
|
+
var __awaiter, __decorate, __metadata, PopupWindowPage, XNode, FolderTreeView, AtomRepeater, Bind, InjectProperty, CloudFileService, styled, FilesDragDrop, Action, UploadEvent, SaveIconTextButton, ChooseMediaPage, css;
|
|
38803
38816
|
_export("default", void 0);
|
|
38804
38817
|
return {
|
|
38805
38818
|
setters: [function (_tslib) {
|
|
@@ -38828,18 +38841,25 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
|
|
|
38828
38841
|
Action = _webAtomsCoreDistViewModelAction.default;
|
|
38829
38842
|
}, function (_webAtomsWebControlsDistBasicUploadEvent) {
|
|
38830
38843
|
UploadEvent = _webAtomsWebControlsDistBasicUploadEvent.default;
|
|
38844
|
+
}, function (_commonControlsButtonsIconButton) {
|
|
38845
|
+
SaveIconTextButton = _commonControlsButtonsIconButton.SaveIconTextButton;
|
|
38831
38846
|
}],
|
|
38832
38847
|
execute: function () {
|
|
38833
38848
|
css = styled.css`
|
|
38834
38849
|
display: grid;
|
|
38835
38850
|
grid-template-columns: 200px 1fr;
|
|
38851
|
+
grid-template-rows: auto 1fr;
|
|
38836
38852
|
gap: 5px;
|
|
38837
38853
|
& .folder-tree {
|
|
38838
38854
|
grid-column: 1;
|
|
38855
|
+
grid-row: 1 / span 2;
|
|
38856
|
+
}
|
|
38857
|
+
& .search {
|
|
38858
|
+
grid-column: 2;
|
|
38839
38859
|
grid-row: 1;
|
|
38840
38860
|
}
|
|
38841
38861
|
& .file-list {
|
|
38842
|
-
grid-row:
|
|
38862
|
+
grid-row: 2;
|
|
38843
38863
|
grid-column: 2;
|
|
38844
38864
|
position: relative;
|
|
38845
38865
|
overflow: auto;
|
|
@@ -38885,10 +38905,30 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
|
|
|
38885
38905
|
this.renderer = XNode.create("div", {
|
|
38886
38906
|
class: css
|
|
38887
38907
|
}, XNode.create(FolderTreeView, {
|
|
38908
|
+
class: "folder-tree",
|
|
38888
38909
|
accept: accept,
|
|
38889
38910
|
folderId: this.parameters.folder.appFileID,
|
|
38890
38911
|
selectedItem: Bind.twoWaysImmediate(() => this.selectedFolder)
|
|
38891
|
-
}), XNode.create("div",
|
|
38912
|
+
}), XNode.create("div", {
|
|
38913
|
+
class: "search",
|
|
38914
|
+
"data-layout": "row"
|
|
38915
|
+
}, XNode.create("input", {
|
|
38916
|
+
type: "search",
|
|
38917
|
+
value: Bind.twoWaysImmediate(() => this.search)
|
|
38918
|
+
}), XNode.create("button", Object.assign({
|
|
38919
|
+
"data-layout": "accent-icon-button"
|
|
38920
|
+
}, UploadEvent.AttachUploadAction({
|
|
38921
|
+
multiple: true,
|
|
38922
|
+
extra: Bind.oneWay(() => {
|
|
38923
|
+
var _a;
|
|
38924
|
+
return JSON.stringify({
|
|
38925
|
+
parentID: (_a = this.selectedFolder) === null || _a === void 0 ? void 0 : _a.appFileID
|
|
38926
|
+
});
|
|
38927
|
+
}),
|
|
38928
|
+
accept
|
|
38929
|
+
})), XNode.create("i", {
|
|
38930
|
+
class: "fas fa-upload"
|
|
38931
|
+
}), "Upload")), XNode.create("div", Object.assign({
|
|
38892
38932
|
class: "file-list"
|
|
38893
38933
|
}, FilesDragDrop({
|
|
38894
38934
|
extra: Bind.oneWay(() => {
|
|
@@ -38920,23 +38960,6 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
|
|
|
38920
38960
|
}))
|
|
38921
38961
|
})));
|
|
38922
38962
|
this.footerRenderer = () => XNode.create("div", {
|
|
38923
|
-
"data-layout": "frame-vertical-flex"
|
|
38924
|
-
}, XNode.create("div", {
|
|
38925
|
-
"data-layout": "row"
|
|
38926
|
-
}, XNode.create("button", Object.assign({
|
|
38927
|
-
"data-layout": "accent-icon-button"
|
|
38928
|
-
}, UploadEvent.AttachUploadAction({
|
|
38929
|
-
multiple: true,
|
|
38930
|
-
extra: Bind.oneWay(() => {
|
|
38931
|
-
var _a;
|
|
38932
|
-
return JSON.stringify({
|
|
38933
|
-
parentID: (_a = this.selectedFolder) === null || _a === void 0 ? void 0 : _a.appFileID
|
|
38934
|
-
});
|
|
38935
|
-
}),
|
|
38936
|
-
accept
|
|
38937
|
-
})), XNode.create("i", {
|
|
38938
|
-
class: "fas fa-upload"
|
|
38939
|
-
}), "Upload")), XNode.create("div", {
|
|
38940
38963
|
"style-display": Bind.oneWay(() => this.selectedFile !== null),
|
|
38941
38964
|
"data-layout": "row"
|
|
38942
38965
|
}, XNode.create("input", {
|
|
@@ -38947,10 +38970,10 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
|
|
|
38947
38970
|
value: Bind.twoWaysImmediate(() => this.size)
|
|
38948
38971
|
}), XNode.create("span", {
|
|
38949
38972
|
text: Bind.oneWay(() => `${this.size}px`)
|
|
38950
|
-
}), XNode.create(
|
|
38973
|
+
}), XNode.create(SaveIconTextButton, {
|
|
38951
38974
|
"data-click-event": "select-file",
|
|
38952
|
-
text: "
|
|
38953
|
-
}))
|
|
38975
|
+
text: "Insert"
|
|
38976
|
+
}));
|
|
38954
38977
|
});
|
|
38955
38978
|
}
|
|
38956
38979
|
selectFile() {
|
|
@@ -39012,6 +39035,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/types", "@web-atoms/core/di
|
|
|
39012
39035
|
this.runAfterInit(() => this.app.runAsync(() => this.init()));
|
|
39013
39036
|
}
|
|
39014
39037
|
onPropertyChanged(name) {
|
|
39038
|
+
super.onPropertyChanged(name);
|
|
39015
39039
|
switch (name) {
|
|
39016
39040
|
case "file":
|
|
39017
39041
|
this.app.runAsync(() => this.loadFile());
|
|
@@ -39051,14 +39075,16 @@ System.register(["tslib", "@web-atoms/core/dist/core/types", "@web-atoms/core/di
|
|
|
39051
39075
|
return editor;
|
|
39052
39076
|
}
|
|
39053
39077
|
loadFile() {
|
|
39078
|
+
var _a;
|
|
39054
39079
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39055
39080
|
yield this.init();
|
|
39081
|
+
(_a = this.codeModelDisposable) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
39056
39082
|
const editor = yield this.createEditor();
|
|
39057
39083
|
const {
|
|
39058
39084
|
file,
|
|
39059
39085
|
monaco
|
|
39060
39086
|
} = this;
|
|
39061
|
-
const
|
|
39087
|
+
const originalContent = yield FetchBuilder.get(file.downloadUrl).responseAsText();
|
|
39062
39088
|
const name = file.name;
|
|
39063
39089
|
let language = "html";
|
|
39064
39090
|
if (/\.(ts|tsx)$/i.test(name)) {
|
|
@@ -39072,8 +39098,24 @@ System.register(["tslib", "@web-atoms/core/dist/core/types", "@web-atoms/core/di
|
|
|
39072
39098
|
}
|
|
39073
39099
|
const uri = monaco.Uri.parse(`http://a/${file.path}-${file.name}`);
|
|
39074
39100
|
const m = monaco.editor.getModel(uri);
|
|
39075
|
-
const model = monaco.editor.createModel(
|
|
39101
|
+
const model = monaco.editor.createModel(originalContent, language, uri);
|
|
39076
39102
|
editor.setModel(model);
|
|
39103
|
+
let id = 0;
|
|
39104
|
+
this.codeModelDisposable = this.registerDisposable(model.onDidChangeContent(() => {
|
|
39105
|
+
if (id) {
|
|
39106
|
+
clearTimeout(id);
|
|
39107
|
+
}
|
|
39108
|
+
id = setTimeout(() => {
|
|
39109
|
+
const content = model.getValue();
|
|
39110
|
+
this.element.dispatchEvent(new CustomEvent("fileChanged", {
|
|
39111
|
+
detail: {
|
|
39112
|
+
file: this.file,
|
|
39113
|
+
content,
|
|
39114
|
+
originalContent
|
|
39115
|
+
}
|
|
39116
|
+
}));
|
|
39117
|
+
}, 500);
|
|
39118
|
+
}));
|
|
39077
39119
|
});
|
|
39078
39120
|
}
|
|
39079
39121
|
});
|
|
@@ -39085,23 +39127,39 @@ System.register(["tslib", "@web-atoms/core/dist/core/types", "@web-atoms/core/di
|
|
|
39085
39127
|
|
|
39086
39128
|
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/code-editor/MonaoEditor");
|
|
39087
39129
|
|
|
39088
|
-
System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "@web-atoms/core/dist/core/XNode", "./MonaoEditor"], function (_export, _context) {
|
|
39130
|
+
System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "@web-atoms/core/dist/core/XNode", "./MonaoEditor", "../common/controls/buttons/IconButton", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dist/view-model/Action", "@web-atoms/core/dist/core/InjectProperty", "../web/page/files/service/CloudFileService"], function (_export, _context) {
|
|
39089
39131
|
"use strict";
|
|
39090
39132
|
|
|
39091
|
-
var __awaiter,
|
|
39133
|
+
var __awaiter, __decorate, __metadata, ContentPage, XNode, MonacoEditor, SaveIconTextButton, Bind, Action, InjectProperty, CloudFileService, CodeEditorPage;
|
|
39092
39134
|
_export("default", void 0);
|
|
39093
39135
|
return {
|
|
39094
39136
|
setters: [function (_tslib) {
|
|
39095
39137
|
__awaiter = _tslib.__awaiter;
|
|
39138
|
+
__decorate = _tslib.__decorate;
|
|
39139
|
+
__metadata = _tslib.__metadata;
|
|
39096
39140
|
}, function (_webAtomsWebControlsDistMobileAppMobileApp) {
|
|
39097
|
-
|
|
39141
|
+
ContentPage = _webAtomsWebControlsDistMobileAppMobileApp.ContentPage;
|
|
39098
39142
|
}, function (_webAtomsCoreDistCoreXNode) {
|
|
39099
39143
|
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
39100
39144
|
}, function (_MonaoEditor) {
|
|
39101
39145
|
MonacoEditor = _MonaoEditor.default;
|
|
39146
|
+
}, function (_commonControlsButtonsIconButton) {
|
|
39147
|
+
SaveIconTextButton = _commonControlsButtonsIconButton.SaveIconTextButton;
|
|
39148
|
+
}, function (_webAtomsCoreDistCoreBind) {
|
|
39149
|
+
Bind = _webAtomsCoreDistCoreBind.default;
|
|
39150
|
+
}, function (_webAtomsCoreDistViewModelAction) {
|
|
39151
|
+
Action = _webAtomsCoreDistViewModelAction.default;
|
|
39152
|
+
}, function (_webAtomsCoreDistCoreInjectProperty) {
|
|
39153
|
+
InjectProperty = _webAtomsCoreDistCoreInjectProperty.default;
|
|
39154
|
+
}, function (_webPageFilesServiceCloudFileService) {
|
|
39155
|
+
CloudFileService = _webPageFilesServiceCloudFileService.default;
|
|
39102
39156
|
}],
|
|
39103
39157
|
execute: function () {
|
|
39104
|
-
_export("default", CodeEditorPage = class CodeEditorPage extends
|
|
39158
|
+
_export("default", CodeEditorPage = class CodeEditorPage extends ContentPage {
|
|
39159
|
+
constructor() {
|
|
39160
|
+
super(...arguments);
|
|
39161
|
+
this.modified = false;
|
|
39162
|
+
}
|
|
39105
39163
|
init() {
|
|
39106
39164
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39107
39165
|
this.title = this.parameters.name;
|
|
@@ -39110,11 +39168,62 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
|
|
|
39110
39168
|
"data-align-items": "stretch",
|
|
39111
39169
|
"data-justify-items": "stretch"
|
|
39112
39170
|
}, XNode.create(MonacoEditor, {
|
|
39113
|
-
file: this.parameters
|
|
39171
|
+
file: this.parameters,
|
|
39172
|
+
"event-file-changed": ({
|
|
39173
|
+
detail: {
|
|
39174
|
+
content,
|
|
39175
|
+
originalContent,
|
|
39176
|
+
file
|
|
39177
|
+
}
|
|
39178
|
+
}) => {
|
|
39179
|
+
this.file = file;
|
|
39180
|
+
this.modified = content !== originalContent;
|
|
39181
|
+
this.content = content;
|
|
39182
|
+
}
|
|
39183
|
+
}));
|
|
39184
|
+
this.footerRenderer = () => XNode.create("div", {
|
|
39185
|
+
"data-layout": "command-row",
|
|
39186
|
+
"style-display": Bind.oneWay(() => this.modified, false)
|
|
39187
|
+
}, XNode.create(SaveIconTextButton, {
|
|
39188
|
+
"data-click-event": "save-file",
|
|
39189
|
+
text: "Save"
|
|
39114
39190
|
}));
|
|
39115
39191
|
});
|
|
39116
39192
|
}
|
|
39193
|
+
saveFile() {
|
|
39194
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39195
|
+
const {
|
|
39196
|
+
file: {
|
|
39197
|
+
appFileID,
|
|
39198
|
+
name,
|
|
39199
|
+
contentType
|
|
39200
|
+
},
|
|
39201
|
+
content
|
|
39202
|
+
} = this;
|
|
39203
|
+
yield this.cloudFileService.saveFile({
|
|
39204
|
+
content: new File([content], name, {
|
|
39205
|
+
type: contentType
|
|
39206
|
+
}),
|
|
39207
|
+
appFileID
|
|
39208
|
+
});
|
|
39209
|
+
return yield this.cloudFileService.getFile(appFileID);
|
|
39210
|
+
});
|
|
39211
|
+
}
|
|
39212
|
+
hide() {
|
|
39213
|
+
this.element.setAttribute("data-page-state", "hidden");
|
|
39214
|
+
}
|
|
39215
|
+
show() {
|
|
39216
|
+
if (!this.element._logicalParent.contains(this.element)) {
|
|
39217
|
+
this.element._logicalParent.appendChild(this.element);
|
|
39218
|
+
}
|
|
39219
|
+
setTimeout(() => this.element.setAttribute("data-page-state", "ready"), 1);
|
|
39220
|
+
}
|
|
39117
39221
|
});
|
|
39222
|
+
__decorate([InjectProperty, __metadata("design:type", CloudFileService)], CodeEditorPage.prototype, "cloudFileService", void 0);
|
|
39223
|
+
__decorate([Action({
|
|
39224
|
+
onEvent: "save-file",
|
|
39225
|
+
close: true
|
|
39226
|
+
}), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise)], CodeEditorPage.prototype, "saveFile", null);
|
|
39118
39227
|
}
|
|
39119
39228
|
};
|
|
39120
39229
|
});
|
|
@@ -39172,8 +39281,9 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
|
|
|
39172
39281
|
}
|
|
39173
39282
|
openVariables() {
|
|
39174
39283
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39175
|
-
const file = yield this.cloudFileService.children(this.folder.appFileID, "vars.css").firstOrDefault();
|
|
39176
|
-
yield PageNavigator.pushPage(CodeEditorPage, file);
|
|
39284
|
+
const file = yield this.cloudFileService.children(this.folder.appFileID, "styles/vars.css").firstOrDefault();
|
|
39285
|
+
const changedFile = yield PageNavigator.pushPage(CodeEditorPage, file);
|
|
39286
|
+
yield this.addStyleSheet(changedFile);
|
|
39177
39287
|
});
|
|
39178
39288
|
}
|
|
39179
39289
|
setStylerSheet() {
|
|
@@ -39183,6 +39293,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
|
|
|
39183
39293
|
let vars = yield this.cloudFileService.children(this.folder.appFileID, "styles/vars.css").firstOrDefault();
|
|
39184
39294
|
if (!vars) {
|
|
39185
39295
|
vars = yield this.createFile("vars.css", `* {
|
|
39296
|
+
${StylerSet.instance.varsCss}
|
|
39186
39297
|
}`);
|
|
39187
39298
|
}
|
|
39188
39299
|
yield this.addStyleSheet(vars);
|
|
@@ -39401,6 +39512,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
39401
39512
|
}), XNode.create(WebSitePageEditor, {
|
|
39402
39513
|
class: "file-list",
|
|
39403
39514
|
folder: this.root,
|
|
39515
|
+
presenter: Bind.presenter(c => this.htmlEditor = c),
|
|
39404
39516
|
"event-html-page-changed": ce => this.pageContent = ce.detail,
|
|
39405
39517
|
htmlPage: Bind.oneWayAsync((s, e, cancelToken) => this.selectedFile ? FetchBuilder.get(this.selectedFile.downloadUrl).cancelToken(cancelToken).responseAsText(true) : void 0)
|
|
39406
39518
|
}));
|
|
@@ -39470,6 +39582,16 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
39470
39582
|
this.pageContent = "";
|
|
39471
39583
|
});
|
|
39472
39584
|
}
|
|
39585
|
+
hide() {
|
|
39586
|
+
this.pageContent = this.htmlEditor.htmlPage;
|
|
39587
|
+
super.hide();
|
|
39588
|
+
}
|
|
39589
|
+
show() {
|
|
39590
|
+
super.show();
|
|
39591
|
+
if (this.pageContent) {
|
|
39592
|
+
setTimeout(() => this.htmlEditor.htmlPage = this.pageContent, 400);
|
|
39593
|
+
}
|
|
39594
|
+
}
|
|
39473
39595
|
});
|
|
39474
39596
|
__decorate([InjectProperty, __metadata("design:type", CloudFileService)], WebSiteStudioPage.prototype, "cloudFileService", void 0);
|
|
39475
39597
|
__decorate([Action({
|