@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
|
@@ -26083,11 +26083,13 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
|
|
|
26083
26083
|
const {
|
|
26084
26084
|
appFileID,
|
|
26085
26085
|
content,
|
|
26086
|
-
parentID
|
|
26086
|
+
parentID,
|
|
26087
|
+
folder
|
|
26087
26088
|
} = fm;
|
|
26088
26089
|
return this.localFileService.uploadFile(content, {
|
|
26089
26090
|
appFileID,
|
|
26090
|
-
parentID
|
|
26091
|
+
parentID,
|
|
26092
|
+
folder
|
|
26091
26093
|
});
|
|
26092
26094
|
});
|
|
26093
26095
|
}
|
|
@@ -33759,6 +33761,7 @@ System.register(["./Styler", "./properties/stylerBorder", "./properties/layouts/
|
|
|
33759
33761
|
_export("StylerSet", StylerSet = class StylerSet {
|
|
33760
33762
|
constructor() {
|
|
33761
33763
|
this.vars = vars;
|
|
33764
|
+
this.varsCss = this.vars.join("\n\t\t\t");
|
|
33762
33765
|
this.properties = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
|
|
33763
33766
|
stylerLayout,
|
|
33764
33767
|
stylerColorSets,
|
|
@@ -34991,10 +34994,15 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
34991
34994
|
}, 100);
|
|
34992
34995
|
return;
|
|
34993
34996
|
}
|
|
34994
|
-
void this.ready.then(() => {
|
|
34997
|
+
void this.ready.then(() => __awaiter(this, void 0, void 0, function* () {
|
|
34995
34998
|
if (!this.htmlDocument) {
|
|
34996
34999
|
return;
|
|
34997
35000
|
}
|
|
35001
|
+
const iframe = this.element;
|
|
35002
|
+
if (this.htmlDocument !== iframe.contentDocument) {
|
|
35003
|
+
this.htmlDocument = void 0;
|
|
35004
|
+
yield this.loadContentDocument();
|
|
35005
|
+
}
|
|
34998
35006
|
this.htmlDocument.open();
|
|
34999
35007
|
this.htmlDocument.write(v);
|
|
35000
35008
|
this.htmlDocument.addEventListener("click", e => {
|
|
@@ -35072,7 +35080,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
35072
35080
|
this.loadVariables();
|
|
35073
35081
|
}));
|
|
35074
35082
|
}, 10);
|
|
35075
|
-
});
|
|
35083
|
+
}));
|
|
35076
35084
|
}
|
|
35077
35085
|
constructor(app, e) {
|
|
35078
35086
|
super(app, e);
|
|
@@ -35173,11 +35181,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
35173
35181
|
}, XNode.create("i", {
|
|
35174
35182
|
class: "fas fa-code"
|
|
35175
35183
|
}), "Variables"), XNode.create(Properties, null))));
|
|
35176
|
-
|
|
35177
|
-
while (!this.htmlDocument) {
|
|
35178
|
-
this.htmlDocument = this.contentEditor.contentDocument;
|
|
35179
|
-
yield sleep(100);
|
|
35180
|
-
}
|
|
35184
|
+
yield this.loadContentDocument();
|
|
35181
35185
|
});
|
|
35182
35186
|
}
|
|
35183
35187
|
buildXNode(node) {
|
|
@@ -35358,6 +35362,15 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
35358
35362
|
};
|
|
35359
35363
|
this.pageVariables = StylerSet.instance.vars.map(x => new StylerVariable(x.name, x.value, this.htmlDocument, onChange));
|
|
35360
35364
|
}
|
|
35365
|
+
loadContentDocument() {
|
|
35366
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35367
|
+
this.contentEditor = this.element.querySelector(`[data-element="content-editor"]`);
|
|
35368
|
+
while (!this.htmlDocument) {
|
|
35369
|
+
this.htmlDocument = this.contentEditor.contentDocument;
|
|
35370
|
+
yield sleep(100);
|
|
35371
|
+
}
|
|
35372
|
+
});
|
|
35373
|
+
}
|
|
35361
35374
|
});
|
|
35362
35375
|
__decorate([Action({
|
|
35363
35376
|
onEvent: "delete-element"
|
|
@@ -35535,10 +35548,10 @@ System.register(["tslib", "@web-atoms/core/dist/style/styled", "@web-atoms/core/
|
|
|
35535
35548
|
|
|
35536
35549
|
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/common/controls/drag-drop/FilesDragDrop");
|
|
35537
35550
|
|
|
35538
|
-
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) {
|
|
35551
|
+
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) {
|
|
35539
35552
|
"use strict";
|
|
35540
35553
|
|
|
35541
|
-
var __awaiter, __decorate, __metadata, PopupWindowPage, XNode, FolderTreeView, AtomRepeater, Bind, InjectProperty, CloudFileService, styled, FilesDragDrop, Action, UploadEvent, ChooseMediaPage, css;
|
|
35554
|
+
var __awaiter, __decorate, __metadata, PopupWindowPage, XNode, FolderTreeView, AtomRepeater, Bind, InjectProperty, CloudFileService, styled, FilesDragDrop, Action, UploadEvent, SaveIconTextButton, ChooseMediaPage, css;
|
|
35542
35555
|
_export("default", void 0);
|
|
35543
35556
|
return {
|
|
35544
35557
|
setters: [function (_tslib) {
|
|
@@ -35567,18 +35580,25 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
|
|
|
35567
35580
|
Action = _webAtomsCoreDistViewModelAction.default;
|
|
35568
35581
|
}, function (_webAtomsWebControlsDistBasicUploadEvent) {
|
|
35569
35582
|
UploadEvent = _webAtomsWebControlsDistBasicUploadEvent.default;
|
|
35583
|
+
}, function (_commonControlsButtonsIconButton) {
|
|
35584
|
+
SaveIconTextButton = _commonControlsButtonsIconButton.SaveIconTextButton;
|
|
35570
35585
|
}],
|
|
35571
35586
|
execute: function () {
|
|
35572
35587
|
css = styled.css`
|
|
35573
35588
|
display: grid;
|
|
35574
35589
|
grid-template-columns: 200px 1fr;
|
|
35590
|
+
grid-template-rows: auto 1fr;
|
|
35575
35591
|
gap: 5px;
|
|
35576
35592
|
& .folder-tree {
|
|
35577
35593
|
grid-column: 1;
|
|
35594
|
+
grid-row: 1 / span 2;
|
|
35595
|
+
}
|
|
35596
|
+
& .search {
|
|
35597
|
+
grid-column: 2;
|
|
35578
35598
|
grid-row: 1;
|
|
35579
35599
|
}
|
|
35580
35600
|
& .file-list {
|
|
35581
|
-
grid-row:
|
|
35601
|
+
grid-row: 2;
|
|
35582
35602
|
grid-column: 2;
|
|
35583
35603
|
position: relative;
|
|
35584
35604
|
overflow: auto;
|
|
@@ -35624,10 +35644,30 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
|
|
|
35624
35644
|
this.renderer = XNode.create("div", {
|
|
35625
35645
|
class: css
|
|
35626
35646
|
}, XNode.create(FolderTreeView, {
|
|
35647
|
+
class: "folder-tree",
|
|
35627
35648
|
accept: accept,
|
|
35628
35649
|
folderId: this.parameters.folder.appFileID,
|
|
35629
35650
|
selectedItem: Bind.twoWaysImmediate(() => this.selectedFolder)
|
|
35630
|
-
}), XNode.create("div",
|
|
35651
|
+
}), XNode.create("div", {
|
|
35652
|
+
class: "search",
|
|
35653
|
+
"data-layout": "row"
|
|
35654
|
+
}, XNode.create("input", {
|
|
35655
|
+
type: "search",
|
|
35656
|
+
value: Bind.twoWaysImmediate(() => this.search)
|
|
35657
|
+
}), XNode.create("button", Object.assign({
|
|
35658
|
+
"data-layout": "accent-icon-button"
|
|
35659
|
+
}, UploadEvent.AttachUploadAction({
|
|
35660
|
+
multiple: true,
|
|
35661
|
+
extra: Bind.oneWay(() => {
|
|
35662
|
+
var _a;
|
|
35663
|
+
return JSON.stringify({
|
|
35664
|
+
parentID: (_a = this.selectedFolder) === null || _a === void 0 ? void 0 : _a.appFileID
|
|
35665
|
+
});
|
|
35666
|
+
}),
|
|
35667
|
+
accept
|
|
35668
|
+
})), XNode.create("i", {
|
|
35669
|
+
class: "fas fa-upload"
|
|
35670
|
+
}), "Upload")), XNode.create("div", Object.assign({
|
|
35631
35671
|
class: "file-list"
|
|
35632
35672
|
}, FilesDragDrop({
|
|
35633
35673
|
extra: Bind.oneWay(() => {
|
|
@@ -35659,23 +35699,6 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
|
|
|
35659
35699
|
}))
|
|
35660
35700
|
})));
|
|
35661
35701
|
this.footerRenderer = () => XNode.create("div", {
|
|
35662
|
-
"data-layout": "frame-vertical-flex"
|
|
35663
|
-
}, XNode.create("div", {
|
|
35664
|
-
"data-layout": "row"
|
|
35665
|
-
}, XNode.create("button", Object.assign({
|
|
35666
|
-
"data-layout": "accent-icon-button"
|
|
35667
|
-
}, UploadEvent.AttachUploadAction({
|
|
35668
|
-
multiple: true,
|
|
35669
|
-
extra: Bind.oneWay(() => {
|
|
35670
|
-
var _a;
|
|
35671
|
-
return JSON.stringify({
|
|
35672
|
-
parentID: (_a = this.selectedFolder) === null || _a === void 0 ? void 0 : _a.appFileID
|
|
35673
|
-
});
|
|
35674
|
-
}),
|
|
35675
|
-
accept
|
|
35676
|
-
})), XNode.create("i", {
|
|
35677
|
-
class: "fas fa-upload"
|
|
35678
|
-
}), "Upload")), XNode.create("div", {
|
|
35679
35702
|
"style-display": Bind.oneWay(() => this.selectedFile !== null),
|
|
35680
35703
|
"data-layout": "row"
|
|
35681
35704
|
}, XNode.create("input", {
|
|
@@ -35686,10 +35709,10 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
|
|
|
35686
35709
|
value: Bind.twoWaysImmediate(() => this.size)
|
|
35687
35710
|
}), XNode.create("span", {
|
|
35688
35711
|
text: Bind.oneWay(() => `${this.size}px`)
|
|
35689
|
-
}), XNode.create(
|
|
35712
|
+
}), XNode.create(SaveIconTextButton, {
|
|
35690
35713
|
"data-click-event": "select-file",
|
|
35691
|
-
text: "
|
|
35692
|
-
}))
|
|
35714
|
+
text: "Insert"
|
|
35715
|
+
}));
|
|
35693
35716
|
});
|
|
35694
35717
|
}
|
|
35695
35718
|
selectFile() {
|
|
@@ -35751,6 +35774,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/types", "@web-atoms/core/di
|
|
|
35751
35774
|
this.runAfterInit(() => this.app.runAsync(() => this.init()));
|
|
35752
35775
|
}
|
|
35753
35776
|
onPropertyChanged(name) {
|
|
35777
|
+
super.onPropertyChanged(name);
|
|
35754
35778
|
switch (name) {
|
|
35755
35779
|
case "file":
|
|
35756
35780
|
this.app.runAsync(() => this.loadFile());
|
|
@@ -35790,14 +35814,16 @@ System.register(["tslib", "@web-atoms/core/dist/core/types", "@web-atoms/core/di
|
|
|
35790
35814
|
return editor;
|
|
35791
35815
|
}
|
|
35792
35816
|
loadFile() {
|
|
35817
|
+
var _a;
|
|
35793
35818
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35794
35819
|
yield this.init();
|
|
35820
|
+
(_a = this.codeModelDisposable) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
35795
35821
|
const editor = yield this.createEditor();
|
|
35796
35822
|
const {
|
|
35797
35823
|
file,
|
|
35798
35824
|
monaco
|
|
35799
35825
|
} = this;
|
|
35800
|
-
const
|
|
35826
|
+
const originalContent = yield FetchBuilder.get(file.downloadUrl).responseAsText();
|
|
35801
35827
|
const name = file.name;
|
|
35802
35828
|
let language = "html";
|
|
35803
35829
|
if (/\.(ts|tsx)$/i.test(name)) {
|
|
@@ -35811,8 +35837,24 @@ System.register(["tslib", "@web-atoms/core/dist/core/types", "@web-atoms/core/di
|
|
|
35811
35837
|
}
|
|
35812
35838
|
const uri = monaco.Uri.parse(`http://a/${file.path}-${file.name}`);
|
|
35813
35839
|
const m = monaco.editor.getModel(uri);
|
|
35814
|
-
const model = monaco.editor.createModel(
|
|
35840
|
+
const model = monaco.editor.createModel(originalContent, language, uri);
|
|
35815
35841
|
editor.setModel(model);
|
|
35842
|
+
let id = 0;
|
|
35843
|
+
this.codeModelDisposable = this.registerDisposable(model.onDidChangeContent(() => {
|
|
35844
|
+
if (id) {
|
|
35845
|
+
clearTimeout(id);
|
|
35846
|
+
}
|
|
35847
|
+
id = setTimeout(() => {
|
|
35848
|
+
const content = model.getValue();
|
|
35849
|
+
this.element.dispatchEvent(new CustomEvent("fileChanged", {
|
|
35850
|
+
detail: {
|
|
35851
|
+
file: this.file,
|
|
35852
|
+
content,
|
|
35853
|
+
originalContent
|
|
35854
|
+
}
|
|
35855
|
+
}));
|
|
35856
|
+
}, 500);
|
|
35857
|
+
}));
|
|
35816
35858
|
});
|
|
35817
35859
|
}
|
|
35818
35860
|
});
|
|
@@ -35824,23 +35866,39 @@ System.register(["tslib", "@web-atoms/core/dist/core/types", "@web-atoms/core/di
|
|
|
35824
35866
|
|
|
35825
35867
|
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/code-editor/MonaoEditor");
|
|
35826
35868
|
|
|
35827
|
-
System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "@web-atoms/core/dist/core/XNode", "./MonaoEditor"], function (_export, _context) {
|
|
35869
|
+
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) {
|
|
35828
35870
|
"use strict";
|
|
35829
35871
|
|
|
35830
|
-
var __awaiter,
|
|
35872
|
+
var __awaiter, __decorate, __metadata, ContentPage, XNode, MonacoEditor, SaveIconTextButton, Bind, Action, InjectProperty, CloudFileService, CodeEditorPage;
|
|
35831
35873
|
_export("default", void 0);
|
|
35832
35874
|
return {
|
|
35833
35875
|
setters: [function (_tslib) {
|
|
35834
35876
|
__awaiter = _tslib.__awaiter;
|
|
35877
|
+
__decorate = _tslib.__decorate;
|
|
35878
|
+
__metadata = _tslib.__metadata;
|
|
35835
35879
|
}, function (_webAtomsWebControlsDistMobileAppMobileApp) {
|
|
35836
|
-
|
|
35880
|
+
ContentPage = _webAtomsWebControlsDistMobileAppMobileApp.ContentPage;
|
|
35837
35881
|
}, function (_webAtomsCoreDistCoreXNode) {
|
|
35838
35882
|
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
35839
35883
|
}, function (_MonaoEditor) {
|
|
35840
35884
|
MonacoEditor = _MonaoEditor.default;
|
|
35885
|
+
}, function (_commonControlsButtonsIconButton) {
|
|
35886
|
+
SaveIconTextButton = _commonControlsButtonsIconButton.SaveIconTextButton;
|
|
35887
|
+
}, function (_webAtomsCoreDistCoreBind) {
|
|
35888
|
+
Bind = _webAtomsCoreDistCoreBind.default;
|
|
35889
|
+
}, function (_webAtomsCoreDistViewModelAction) {
|
|
35890
|
+
Action = _webAtomsCoreDistViewModelAction.default;
|
|
35891
|
+
}, function (_webAtomsCoreDistCoreInjectProperty) {
|
|
35892
|
+
InjectProperty = _webAtomsCoreDistCoreInjectProperty.default;
|
|
35893
|
+
}, function (_webPageFilesServiceCloudFileService) {
|
|
35894
|
+
CloudFileService = _webPageFilesServiceCloudFileService.default;
|
|
35841
35895
|
}],
|
|
35842
35896
|
execute: function () {
|
|
35843
|
-
_export("default", CodeEditorPage = class CodeEditorPage extends
|
|
35897
|
+
_export("default", CodeEditorPage = class CodeEditorPage extends ContentPage {
|
|
35898
|
+
constructor() {
|
|
35899
|
+
super(...arguments);
|
|
35900
|
+
this.modified = false;
|
|
35901
|
+
}
|
|
35844
35902
|
init() {
|
|
35845
35903
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35846
35904
|
this.title = this.parameters.name;
|
|
@@ -35849,11 +35907,62 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
|
|
|
35849
35907
|
"data-align-items": "stretch",
|
|
35850
35908
|
"data-justify-items": "stretch"
|
|
35851
35909
|
}, XNode.create(MonacoEditor, {
|
|
35852
|
-
file: this.parameters
|
|
35910
|
+
file: this.parameters,
|
|
35911
|
+
"event-file-changed": ({
|
|
35912
|
+
detail: {
|
|
35913
|
+
content,
|
|
35914
|
+
originalContent,
|
|
35915
|
+
file
|
|
35916
|
+
}
|
|
35917
|
+
}) => {
|
|
35918
|
+
this.file = file;
|
|
35919
|
+
this.modified = content !== originalContent;
|
|
35920
|
+
this.content = content;
|
|
35921
|
+
}
|
|
35922
|
+
}));
|
|
35923
|
+
this.footerRenderer = () => XNode.create("div", {
|
|
35924
|
+
"data-layout": "command-row",
|
|
35925
|
+
"style-display": Bind.oneWay(() => this.modified, false)
|
|
35926
|
+
}, XNode.create(SaveIconTextButton, {
|
|
35927
|
+
"data-click-event": "save-file",
|
|
35928
|
+
text: "Save"
|
|
35853
35929
|
}));
|
|
35854
35930
|
});
|
|
35855
35931
|
}
|
|
35932
|
+
saveFile() {
|
|
35933
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35934
|
+
const {
|
|
35935
|
+
file: {
|
|
35936
|
+
appFileID,
|
|
35937
|
+
name,
|
|
35938
|
+
contentType
|
|
35939
|
+
},
|
|
35940
|
+
content
|
|
35941
|
+
} = this;
|
|
35942
|
+
yield this.cloudFileService.saveFile({
|
|
35943
|
+
content: new File([content], name, {
|
|
35944
|
+
type: contentType
|
|
35945
|
+
}),
|
|
35946
|
+
appFileID
|
|
35947
|
+
});
|
|
35948
|
+
return yield this.cloudFileService.getFile(appFileID);
|
|
35949
|
+
});
|
|
35950
|
+
}
|
|
35951
|
+
hide() {
|
|
35952
|
+
this.element.setAttribute("data-page-state", "hidden");
|
|
35953
|
+
}
|
|
35954
|
+
show() {
|
|
35955
|
+
if (!this.element._logicalParent.contains(this.element)) {
|
|
35956
|
+
this.element._logicalParent.appendChild(this.element);
|
|
35957
|
+
}
|
|
35958
|
+
setTimeout(() => this.element.setAttribute("data-page-state", "ready"), 1);
|
|
35959
|
+
}
|
|
35856
35960
|
});
|
|
35961
|
+
__decorate([InjectProperty, __metadata("design:type", CloudFileService)], CodeEditorPage.prototype, "cloudFileService", void 0);
|
|
35962
|
+
__decorate([Action({
|
|
35963
|
+
onEvent: "save-file",
|
|
35964
|
+
close: true
|
|
35965
|
+
}), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise)], CodeEditorPage.prototype, "saveFile", null);
|
|
35857
35966
|
}
|
|
35858
35967
|
};
|
|
35859
35968
|
});
|
|
@@ -35911,8 +36020,9 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
|
|
|
35911
36020
|
}
|
|
35912
36021
|
openVariables() {
|
|
35913
36022
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35914
|
-
const file = yield this.cloudFileService.children(this.folder.appFileID, "vars.css").firstOrDefault();
|
|
35915
|
-
yield PageNavigator.pushPage(CodeEditorPage, file);
|
|
36023
|
+
const file = yield this.cloudFileService.children(this.folder.appFileID, "styles/vars.css").firstOrDefault();
|
|
36024
|
+
const changedFile = yield PageNavigator.pushPage(CodeEditorPage, file);
|
|
36025
|
+
yield this.addStyleSheet(changedFile);
|
|
35916
36026
|
});
|
|
35917
36027
|
}
|
|
35918
36028
|
setStylerSheet() {
|
|
@@ -35922,6 +36032,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
|
|
|
35922
36032
|
let vars = yield this.cloudFileService.children(this.folder.appFileID, "styles/vars.css").firstOrDefault();
|
|
35923
36033
|
if (!vars) {
|
|
35924
36034
|
vars = yield this.createFile("vars.css", `* {
|
|
36035
|
+
${StylerSet.instance.varsCss}
|
|
35925
36036
|
}`);
|
|
35926
36037
|
}
|
|
35927
36038
|
yield this.addStyleSheet(vars);
|
|
@@ -36140,6 +36251,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
36140
36251
|
}), XNode.create(WebSitePageEditor, {
|
|
36141
36252
|
class: "file-list",
|
|
36142
36253
|
folder: this.root,
|
|
36254
|
+
presenter: Bind.presenter(c => this.htmlEditor = c),
|
|
36143
36255
|
"event-html-page-changed": ce => this.pageContent = ce.detail,
|
|
36144
36256
|
htmlPage: Bind.oneWayAsync((s, e, cancelToken) => this.selectedFile ? FetchBuilder.get(this.selectedFile.downloadUrl).cancelToken(cancelToken).responseAsText(true) : void 0)
|
|
36145
36257
|
}));
|
|
@@ -36209,6 +36321,16 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
36209
36321
|
this.pageContent = "";
|
|
36210
36322
|
});
|
|
36211
36323
|
}
|
|
36324
|
+
hide() {
|
|
36325
|
+
this.pageContent = this.htmlEditor.htmlPage;
|
|
36326
|
+
super.hide();
|
|
36327
|
+
}
|
|
36328
|
+
show() {
|
|
36329
|
+
super.show();
|
|
36330
|
+
if (this.pageContent) {
|
|
36331
|
+
setTimeout(() => this.htmlEditor.htmlPage = this.pageContent, 400);
|
|
36332
|
+
}
|
|
36333
|
+
}
|
|
36212
36334
|
});
|
|
36213
36335
|
__decorate([InjectProperty, __metadata("design:type", CloudFileService)], WebSiteStudioPage.prototype, "cloudFileService", void 0);
|
|
36214
36336
|
__decorate([Action({
|