@social-mail/social-mail-client 1.2.375 → 1.2.377
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 +62 -12
- package/dist/admin/AdminAppIndex.pack.js.map +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js +31 -4
- 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 +3 -2
- package/dist/common/pages/websites/studio/WebSiteStudioPage.js.map +1 -1
- package/dist/site-editor/blocks/Block.js +28 -1
- package/dist/site-editor/blocks/Block.js.map +1 -1
- package/dist/site-editor/editor/WebSitePageEditor.d.ts +1 -0
- package/dist/site-editor/editor/WebSitePageEditor.d.ts.map +1 -1
- package/dist/site-editor/editor/WebSitePageEditor.js +15 -9
- package/dist/site-editor/editor/WebSitePageEditor.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.js +62 -12
- package/dist/web/AppIndex.pack.js.map +1 -1
- package/dist/web/AppIndex.pack.min.js +31 -4
- package/dist/web/AppIndex.pack.min.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 +16 -0
- package/dist/web/page/files/service/CloudFileService.js.map +1 -1
- package/package.json +1 -1
- package/src/common/pages/websites/studio/WebSiteStudioPage.tsx +3 -2
- package/src/site-editor/blocks/Block.tsx +28 -1
- package/src/site-editor/editor/WebSitePageEditor.tsx +17 -5
- package/src/web/page/files/service/CloudFileService.ts +17 -0
|
@@ -23766,6 +23766,22 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
|
|
|
23766
23766
|
yield this.entityService.save(files);
|
|
23767
23767
|
});
|
|
23768
23768
|
}
|
|
23769
|
+
getFilePath(root, selectedFile) {
|
|
23770
|
+
var _a;
|
|
23771
|
+
const [ignore, ...segments] = selectedFile.path.split("/");
|
|
23772
|
+
let path = "";
|
|
23773
|
+
for (const iterator of segments) {
|
|
23774
|
+
if (selectedFile.appFileID === iterator) {
|
|
23775
|
+
break;
|
|
23776
|
+
}
|
|
23777
|
+
root = (_a = root.children) === null || _a === void 0 ? void 0 : _a.find(x => x.appFileID === iterator);
|
|
23778
|
+
if (!root) {
|
|
23779
|
+
return path;
|
|
23780
|
+
}
|
|
23781
|
+
path += root.name + "/";
|
|
23782
|
+
}
|
|
23783
|
+
return path;
|
|
23784
|
+
}
|
|
23769
23785
|
};
|
|
23770
23786
|
__decorate([Inject, __metadata("design:type", EntityService)], CloudFileService.prototype, "entityService", void 0);
|
|
23771
23787
|
__decorate([Inject, __metadata("design:type", LocalFileService)], CloudFileService.prototype, "localFileService", void 0);
|
|
@@ -46823,7 +46839,7 @@ System.register(["@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/web/co
|
|
|
46823
46839
|
|
|
46824
46840
|
& nav {
|
|
46825
46841
|
|
|
46826
|
-
menu {
|
|
46842
|
+
input:not(:checked)+nav menu {
|
|
46827
46843
|
position: relative;
|
|
46828
46844
|
padding-inline-start: 0;
|
|
46829
46845
|
margin: 0;
|
|
@@ -46855,6 +46871,33 @@ System.register(["@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/web/co
|
|
|
46855
46871
|
}
|
|
46856
46872
|
}
|
|
46857
46873
|
|
|
46874
|
+
input:checked+nav > menu {
|
|
46875
|
+
position: relative;
|
|
46876
|
+
padding-inline-start: 0;
|
|
46877
|
+
margin: 0;
|
|
46878
|
+
|
|
46879
|
+
& > ul {
|
|
46880
|
+
background-color: canvas;
|
|
46881
|
+
margin: 10px;
|
|
46882
|
+
border-radius: 5px;
|
|
46883
|
+
border: solid 1px lightgray;
|
|
46884
|
+
padding-inline-start: 0;
|
|
46885
|
+
}
|
|
46886
|
+
|
|
46887
|
+
& li {
|
|
46888
|
+
list-style-type: none;
|
|
46889
|
+
|
|
46890
|
+
padding: 10px;
|
|
46891
|
+
margin: 5px;
|
|
46892
|
+
|
|
46893
|
+
&:hover {
|
|
46894
|
+
background-color: var(--hover-color);
|
|
46895
|
+
color: var(--hover-text-color);
|
|
46896
|
+
}
|
|
46897
|
+
}
|
|
46898
|
+
}
|
|
46899
|
+
|
|
46900
|
+
|
|
46858
46901
|
}
|
|
46859
46902
|
|
|
46860
46903
|
`.expand("[styler-element=navbar]"));
|
|
@@ -51557,10 +51600,10 @@ System.register(["./apiPath"], function (_export, _context) {
|
|
|
51557
51600
|
|
|
51558
51601
|
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/common/fileUrl");
|
|
51559
51602
|
|
|
51560
|
-
System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlPageEditor", "../../web/page/files/media/ChooseMediaPage", "@web-atoms/web-controls/dist/PageNavigator", "../styler/StylerSet", "@web-atoms/core/dist/core/InjectProperty", "../../web/page/files/service/CloudFileService", "@web-atoms/core/dist/view-model/Action", "../../code-editor/CodeEditorPage", "
|
|
51603
|
+
System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlPageEditor", "../../web/page/files/media/ChooseMediaPage", "@web-atoms/web-controls/dist/PageNavigator", "../styler/StylerSet", "@web-atoms/core/dist/core/InjectProperty", "../../web/page/files/service/CloudFileService", "@web-atoms/core/dist/view-model/Action", "../../code-editor/CodeEditorPage", "@web-atoms/core/dist/services/FetchBuilder", "../../common/fileUrl"], function (_export, _context) {
|
|
51561
51604
|
"use strict";
|
|
51562
51605
|
|
|
51563
|
-
var __awaiter, __decorate, __metadata, BindableProperty, HtmlPageEditor, ChooseMediaPage, PageNavigator, StylerSet, InjectProperty, CloudFileService, Action, CodeEditorPage,
|
|
51606
|
+
var __awaiter, __decorate, __metadata, BindableProperty, HtmlPageEditor, ChooseMediaPage, PageNavigator, StylerSet, InjectProperty, CloudFileService, Action, CodeEditorPage, FetchBuilder, imageUrl, srcSetUrl, WebSitePageEditor;
|
|
51564
51607
|
_export("default", void 0);
|
|
51565
51608
|
return {
|
|
51566
51609
|
setters: [function (_tslib) {
|
|
@@ -51585,8 +51628,6 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
|
|
|
51585
51628
|
Action = _webAtomsCoreDistViewModelAction.default;
|
|
51586
51629
|
}, function (_codeEditorCodeEditorPage) {
|
|
51587
51630
|
CodeEditorPage = _codeEditorCodeEditorPage.default;
|
|
51588
|
-
}, function (_commonApiPath) {
|
|
51589
|
-
apiPath = _commonApiPath.apiPath;
|
|
51590
51631
|
}, function (_webAtomsCoreDistServicesFetchBuilder) {
|
|
51591
51632
|
FetchBuilder = _webAtomsCoreDistServicesFetchBuilder.default;
|
|
51592
51633
|
}, function (_commonFileUrl) {
|
|
@@ -51598,6 +51639,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
|
|
|
51598
51639
|
constructor() {
|
|
51599
51640
|
super(...arguments);
|
|
51600
51641
|
this.folder = null;
|
|
51642
|
+
this.selectedFile = null;
|
|
51601
51643
|
}
|
|
51602
51644
|
changeImage() {
|
|
51603
51645
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -51721,7 +51763,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
|
|
|
51721
51763
|
});
|
|
51722
51764
|
file = yield this.cloudFileService.getFile(file.appFileID);
|
|
51723
51765
|
}
|
|
51724
|
-
yield this.addStyleSheet(file);
|
|
51766
|
+
yield this.addStyleSheet(file, "styles/vars.css");
|
|
51725
51767
|
});
|
|
51726
51768
|
}
|
|
51727
51769
|
setStylerSheet() {
|
|
@@ -51745,14 +51787,14 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
|
|
|
51745
51787
|
}
|
|
51746
51788
|
}
|
|
51747
51789
|
const stylerCSS = yield this.createFile("styler.css", StylerSet.instance.toString());
|
|
51748
|
-
yield this.addStyleSheet(stylerCSS);
|
|
51790
|
+
yield this.addStyleSheet(stylerCSS, "styles/styler.css");
|
|
51749
51791
|
let vars = yield this.cloudFileService.children(this.folder.appFileID, "styles/vars.css").firstOrDefault();
|
|
51750
51792
|
if (!vars) {
|
|
51751
51793
|
vars = yield this.createFile("vars.css", `* {
|
|
51752
51794
|
${StylerSet.instance.varsCss}
|
|
51753
51795
|
}`);
|
|
51754
51796
|
}
|
|
51755
|
-
yield this.addStyleSheet(vars);
|
|
51797
|
+
yield this.addStyleSheet(vars, "styles/vars.css");
|
|
51756
51798
|
let script = this.htmlDocument.querySelector("script[web-components]");
|
|
51757
51799
|
if (!script) {
|
|
51758
51800
|
script = this.htmlDocument.createElement("script");
|
|
@@ -51761,14 +51803,21 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
|
|
|
51761
51803
|
script.setAttribute("defer", "true");
|
|
51762
51804
|
this.htmlDocument.head.appendChild(this.htmlDocument.createTextNode("\n"));
|
|
51763
51805
|
this.htmlDocument.head.appendChild(script);
|
|
51806
|
+
this.htmlDocument.head.appendChild(this.htmlDocument.createTextNode("\n"));
|
|
51764
51807
|
}
|
|
51765
51808
|
script.setAttribute("src", "//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.72/dist/components.webpack.js");
|
|
51766
51809
|
});
|
|
51767
51810
|
}
|
|
51768
|
-
addStyleSheet(file) {
|
|
51811
|
+
addStyleSheet(file, path) {
|
|
51769
51812
|
return __awaiter(this, void 0, void 0, function* () {
|
|
51813
|
+
const filePath = this.selectedFile.path.substring(this.folder.path.length);
|
|
51814
|
+
let folder = filePath.split("/").length - 2;
|
|
51815
|
+
while (folder > 0) {
|
|
51816
|
+
path = "../" + path;
|
|
51817
|
+
folder--;
|
|
51818
|
+
}
|
|
51770
51819
|
const document = this.htmlDocument;
|
|
51771
|
-
const href =
|
|
51820
|
+
const href = "./" + path;
|
|
51772
51821
|
let link;
|
|
51773
51822
|
for (const iterator of Array.from(document.querySelectorAll(`link[rel="stylesheet"][styler-css]`))) {
|
|
51774
51823
|
if (iterator.getAttribute("styler-css") === file.name) {
|
|
@@ -52424,7 +52473,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
52424
52473
|
icon: "fad fa-globe-pointer",
|
|
52425
52474
|
text: "View Site"
|
|
52426
52475
|
}), XNode.create("a", {
|
|
52427
|
-
href: Bind.oneWay(() => apiPath(`/api/site/draft/${this.
|
|
52476
|
+
href: Bind.oneWay(() => apiPath(`/api/site/draft/${this.root.appFileID}/${this.cloudFileService.getFilePath(this.root, this.selectedFile)}${this.selectedFile.name}`)),
|
|
52428
52477
|
target: "_blank"
|
|
52429
52478
|
}, XNode.create(EditIconTextButton, {
|
|
52430
52479
|
icon: "fad fa-globe-pointer",
|
|
@@ -52466,7 +52515,8 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
52466
52515
|
}
|
|
52467
52516
|
}), XNode.create(WebSitePageEditor, {
|
|
52468
52517
|
class: "file-list",
|
|
52469
|
-
|
|
52518
|
+
selectedFile: Bind.oneWay(() => this.selectedFile),
|
|
52519
|
+
baseUrl: Bind.oneWay(() => apiPath(`/api/site/draft/${this.root.appFileID}/${this.cloudFileService.getFilePath(this.root, this.selectedFile)}`)),
|
|
52470
52520
|
folder: this.root,
|
|
52471
52521
|
presenter: Bind.presenter(c => this.htmlEditor = c),
|
|
52472
52522
|
"event-html-page-changed": ce => this.pageContent = ce.detail,
|