@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
|
@@ -35163,6 +35163,22 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
|
|
|
35163
35163
|
yield this.entityService.save(files);
|
|
35164
35164
|
});
|
|
35165
35165
|
}
|
|
35166
|
+
getFilePath(root, selectedFile) {
|
|
35167
|
+
var _a;
|
|
35168
|
+
const [ignore, ...segments] = selectedFile.path.split("/");
|
|
35169
|
+
let path = "";
|
|
35170
|
+
for (const iterator of segments) {
|
|
35171
|
+
if (selectedFile.appFileID === iterator) {
|
|
35172
|
+
break;
|
|
35173
|
+
}
|
|
35174
|
+
root = (_a = root.children) === null || _a === void 0 ? void 0 : _a.find(x => x.appFileID === iterator);
|
|
35175
|
+
if (!root) {
|
|
35176
|
+
return path;
|
|
35177
|
+
}
|
|
35178
|
+
path += root.name + "/";
|
|
35179
|
+
}
|
|
35180
|
+
return path;
|
|
35181
|
+
}
|
|
35166
35182
|
};
|
|
35167
35183
|
__decorate([Inject, __metadata("design:type", EntityService)], CloudFileService.prototype, "entityService", void 0);
|
|
35168
35184
|
__decorate([Inject, __metadata("design:type", LocalFileService)], CloudFileService.prototype, "localFileService", void 0);
|
|
@@ -42155,7 +42171,7 @@ System.register(["@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/web/co
|
|
|
42155
42171
|
|
|
42156
42172
|
& nav {
|
|
42157
42173
|
|
|
42158
|
-
menu {
|
|
42174
|
+
input:not(:checked)+nav menu {
|
|
42159
42175
|
position: relative;
|
|
42160
42176
|
padding-inline-start: 0;
|
|
42161
42177
|
margin: 0;
|
|
@@ -42187,6 +42203,33 @@ System.register(["@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/web/co
|
|
|
42187
42203
|
}
|
|
42188
42204
|
}
|
|
42189
42205
|
|
|
42206
|
+
input:checked+nav > menu {
|
|
42207
|
+
position: relative;
|
|
42208
|
+
padding-inline-start: 0;
|
|
42209
|
+
margin: 0;
|
|
42210
|
+
|
|
42211
|
+
& > ul {
|
|
42212
|
+
background-color: canvas;
|
|
42213
|
+
margin: 10px;
|
|
42214
|
+
border-radius: 5px;
|
|
42215
|
+
border: solid 1px lightgray;
|
|
42216
|
+
padding-inline-start: 0;
|
|
42217
|
+
}
|
|
42218
|
+
|
|
42219
|
+
& li {
|
|
42220
|
+
list-style-type: none;
|
|
42221
|
+
|
|
42222
|
+
padding: 10px;
|
|
42223
|
+
margin: 5px;
|
|
42224
|
+
|
|
42225
|
+
&:hover {
|
|
42226
|
+
background-color: var(--hover-color);
|
|
42227
|
+
color: var(--hover-text-color);
|
|
42228
|
+
}
|
|
42229
|
+
}
|
|
42230
|
+
}
|
|
42231
|
+
|
|
42232
|
+
|
|
42190
42233
|
}
|
|
42191
42234
|
|
|
42192
42235
|
`.expand("[styler-element=navbar]"));
|
|
@@ -47039,10 +47082,10 @@ System.register(["./apiPath"], function (_export, _context) {
|
|
|
47039
47082
|
|
|
47040
47083
|
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/common/fileUrl");
|
|
47041
47084
|
|
|
47042
|
-
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", "
|
|
47085
|
+
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) {
|
|
47043
47086
|
"use strict";
|
|
47044
47087
|
|
|
47045
|
-
var __awaiter, __decorate, __metadata, BindableProperty, HtmlPageEditor, ChooseMediaPage, PageNavigator, StylerSet, InjectProperty, CloudFileService, Action, CodeEditorPage,
|
|
47088
|
+
var __awaiter, __decorate, __metadata, BindableProperty, HtmlPageEditor, ChooseMediaPage, PageNavigator, StylerSet, InjectProperty, CloudFileService, Action, CodeEditorPage, FetchBuilder, imageUrl, srcSetUrl, WebSitePageEditor;
|
|
47046
47089
|
_export("default", void 0);
|
|
47047
47090
|
return {
|
|
47048
47091
|
setters: [function (_tslib) {
|
|
@@ -47067,8 +47110,6 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
|
|
|
47067
47110
|
Action = _webAtomsCoreDistViewModelAction.default;
|
|
47068
47111
|
}, function (_codeEditorCodeEditorPage) {
|
|
47069
47112
|
CodeEditorPage = _codeEditorCodeEditorPage.default;
|
|
47070
|
-
}, function (_commonApiPath) {
|
|
47071
|
-
apiPath = _commonApiPath.apiPath;
|
|
47072
47113
|
}, function (_webAtomsCoreDistServicesFetchBuilder) {
|
|
47073
47114
|
FetchBuilder = _webAtomsCoreDistServicesFetchBuilder.default;
|
|
47074
47115
|
}, function (_commonFileUrl) {
|
|
@@ -47080,6 +47121,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
|
|
|
47080
47121
|
constructor() {
|
|
47081
47122
|
super(...arguments);
|
|
47082
47123
|
this.folder = null;
|
|
47124
|
+
this.selectedFile = null;
|
|
47083
47125
|
}
|
|
47084
47126
|
changeImage() {
|
|
47085
47127
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -47203,7 +47245,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
|
|
|
47203
47245
|
});
|
|
47204
47246
|
file = yield this.cloudFileService.getFile(file.appFileID);
|
|
47205
47247
|
}
|
|
47206
|
-
yield this.addStyleSheet(file);
|
|
47248
|
+
yield this.addStyleSheet(file, "styles/vars.css");
|
|
47207
47249
|
});
|
|
47208
47250
|
}
|
|
47209
47251
|
setStylerSheet() {
|
|
@@ -47227,14 +47269,14 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
|
|
|
47227
47269
|
}
|
|
47228
47270
|
}
|
|
47229
47271
|
const stylerCSS = yield this.createFile("styler.css", StylerSet.instance.toString());
|
|
47230
|
-
yield this.addStyleSheet(stylerCSS);
|
|
47272
|
+
yield this.addStyleSheet(stylerCSS, "styles/styler.css");
|
|
47231
47273
|
let vars = yield this.cloudFileService.children(this.folder.appFileID, "styles/vars.css").firstOrDefault();
|
|
47232
47274
|
if (!vars) {
|
|
47233
47275
|
vars = yield this.createFile("vars.css", `* {
|
|
47234
47276
|
${StylerSet.instance.varsCss}
|
|
47235
47277
|
}`);
|
|
47236
47278
|
}
|
|
47237
|
-
yield this.addStyleSheet(vars);
|
|
47279
|
+
yield this.addStyleSheet(vars, "styles/vars.css");
|
|
47238
47280
|
let script = this.htmlDocument.querySelector("script[web-components]");
|
|
47239
47281
|
if (!script) {
|
|
47240
47282
|
script = this.htmlDocument.createElement("script");
|
|
@@ -47243,14 +47285,21 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
|
|
|
47243
47285
|
script.setAttribute("defer", "true");
|
|
47244
47286
|
this.htmlDocument.head.appendChild(this.htmlDocument.createTextNode("\n"));
|
|
47245
47287
|
this.htmlDocument.head.appendChild(script);
|
|
47288
|
+
this.htmlDocument.head.appendChild(this.htmlDocument.createTextNode("\n"));
|
|
47246
47289
|
}
|
|
47247
47290
|
script.setAttribute("src", "//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.72/dist/components.webpack.js");
|
|
47248
47291
|
});
|
|
47249
47292
|
}
|
|
47250
|
-
addStyleSheet(file) {
|
|
47293
|
+
addStyleSheet(file, path) {
|
|
47251
47294
|
return __awaiter(this, void 0, void 0, function* () {
|
|
47295
|
+
const filePath = this.selectedFile.path.substring(this.folder.path.length);
|
|
47296
|
+
let folder = filePath.split("/").length - 2;
|
|
47297
|
+
while (folder > 0) {
|
|
47298
|
+
path = "../" + path;
|
|
47299
|
+
folder--;
|
|
47300
|
+
}
|
|
47252
47301
|
const document = this.htmlDocument;
|
|
47253
|
-
const href =
|
|
47302
|
+
const href = "./" + path;
|
|
47254
47303
|
let link;
|
|
47255
47304
|
for (const iterator of Array.from(document.querySelectorAll(`link[rel="stylesheet"][styler-css]`))) {
|
|
47256
47305
|
if (iterator.getAttribute("styler-css") === file.name) {
|
|
@@ -47906,7 +47955,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
47906
47955
|
icon: "fad fa-globe-pointer",
|
|
47907
47956
|
text: "View Site"
|
|
47908
47957
|
}), XNode.create("a", {
|
|
47909
|
-
href: Bind.oneWay(() => apiPath(`/api/site/draft/${this.
|
|
47958
|
+
href: Bind.oneWay(() => apiPath(`/api/site/draft/${this.root.appFileID}/${this.cloudFileService.getFilePath(this.root, this.selectedFile)}${this.selectedFile.name}`)),
|
|
47910
47959
|
target: "_blank"
|
|
47911
47960
|
}, XNode.create(EditIconTextButton, {
|
|
47912
47961
|
icon: "fad fa-globe-pointer",
|
|
@@ -47948,7 +47997,8 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
47948
47997
|
}
|
|
47949
47998
|
}), XNode.create(WebSitePageEditor, {
|
|
47950
47999
|
class: "file-list",
|
|
47951
|
-
|
|
48000
|
+
selectedFile: Bind.oneWay(() => this.selectedFile),
|
|
48001
|
+
baseUrl: Bind.oneWay(() => apiPath(`/api/site/draft/${this.root.appFileID}/${this.cloudFileService.getFilePath(this.root, this.selectedFile)}`)),
|
|
47952
48002
|
folder: this.root,
|
|
47953
48003
|
presenter: Bind.presenter(c => this.htmlEditor = c),
|
|
47954
48004
|
"event-html-page-changed": ce => this.pageContent = ce.detail,
|