@social-mail/social-mail-client 1.2.286 → 1.2.288
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 +49 -7
- 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/fileUrl.d.ts +1 -0
- package/dist/common/fileUrl.d.ts.map +1 -1
- package/dist/common/fileUrl.js +4 -1
- package/dist/common/fileUrl.js.map +1 -1
- package/dist/public/store/Store.pack.js +4 -1
- package/dist/public/store/Store.pack.js.map +1 -1
- package/dist/public/store/Store.pack.min.js +1 -1
- package/dist/public/store/Store.pack.min.js.map +1 -1
- package/dist/site-editor/editor/HtmlPageEditor.js +1 -1
- package/dist/site-editor/editor/HtmlPageEditor.js.map +1 -1
- package/dist/site-editor/editor/SelectedElement.js +1 -1
- package/dist/site-editor/editor/SelectedElement.js.map +1 -1
- package/dist/site-editor/editor/WebSitePageEditor.d.ts.map +1 -1
- package/dist/site-editor/editor/WebSitePageEditor.js +33 -3
- package/dist/site-editor/editor/WebSitePageEditor.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.js +49 -7
- 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/media/ChooseMediaPage.d.ts +3 -0
- package/dist/web/page/files/media/ChooseMediaPage.d.ts.map +1 -1
- package/dist/web/page/files/media/ChooseMediaPage.js +10 -1
- package/dist/web/page/files/media/ChooseMediaPage.js.map +1 -1
- package/package.json +1 -1
- package/src/common/fileUrl.ts +4 -0
- package/src/site-editor/editor/HtmlPageEditor.tsx +1 -1
- package/src/site-editor/editor/SelectedElement.tsx +1 -1
- package/src/site-editor/editor/WebSitePageEditor.tsx +34 -5
- package/src/web/page/files/media/ChooseMediaPage.tsx +10 -2
|
@@ -46344,7 +46344,7 @@ System.register(["@web-atoms/core/dist/core/AtomBinder"], function (_export, _co
|
|
|
46344
46344
|
this.name = e.tagName.toLowerCase();
|
|
46345
46345
|
this.parentName = (_a = e.parentElement) === null || _a === void 0 ? void 0 : _a.tagName.toLowerCase();
|
|
46346
46346
|
const r = e.getBoundingClientRect();
|
|
46347
|
-
this.isImage = this.name === "img";
|
|
46347
|
+
this.isImage = this.name === "img" || this.name === "inject" || this.name.startsWith("video");
|
|
46348
46348
|
this.top = `${r.top + 2}px`;
|
|
46349
46349
|
this.left = `${r.left + 2}px`;
|
|
46350
46350
|
this.width = `${r.width}px`;
|
|
@@ -49049,7 +49049,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
49049
49049
|
const target = e.target;
|
|
49050
49050
|
e.preventDefault();
|
|
49051
49051
|
const element = target.nodeType === Node.ELEMENT_NODE ? target : target.parentElement;
|
|
49052
|
-
if (element.tagName
|
|
49052
|
+
if (/^(IMG|INJECT|VIDEO)$/.test(element.tagName)) {
|
|
49053
49053
|
this.changeImage().catch(console.error);
|
|
49054
49054
|
return;
|
|
49055
49055
|
}
|
|
@@ -49414,10 +49414,19 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
|
|
|
49414
49414
|
const size = this.size;
|
|
49415
49415
|
return this.selectedFiles.map(file => ({
|
|
49416
49416
|
file,
|
|
49417
|
-
size
|
|
49417
|
+
size,
|
|
49418
|
+
folder: this.getFolder(file)
|
|
49418
49419
|
}));
|
|
49419
49420
|
});
|
|
49420
49421
|
}
|
|
49422
|
+
getFolder(file) {
|
|
49423
|
+
var _a;
|
|
49424
|
+
if (file.appFileID === this.parameters.folder.appFileID) {
|
|
49425
|
+
return [];
|
|
49426
|
+
}
|
|
49427
|
+
const parent = (_a = file.parent) !== null && _a !== void 0 ? _a : this.selectedFolder;
|
|
49428
|
+
return [...this.getFolder(parent), parent.name];
|
|
49429
|
+
}
|
|
49421
49430
|
onFilesUploaded() {
|
|
49422
49431
|
return __awaiter(this, void 0, void 0, function* () {
|
|
49423
49432
|
this.version++;
|
|
@@ -49538,12 +49547,15 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
|
|
|
49538
49547
|
System.register(["./apiPath"], function (_export, _context) {
|
|
49539
49548
|
"use strict";
|
|
49540
49549
|
|
|
49541
|
-
var apiPath, imageUrl, srcSetUrl, signedImageUrl, signedUrl, storeFileUrl;
|
|
49550
|
+
var apiPath, viewFileUrl, imageUrl, srcSetUrl, signedImageUrl, signedUrl, storeFileUrl;
|
|
49542
49551
|
return {
|
|
49543
49552
|
setters: [function (_apiPath) {
|
|
49544
49553
|
apiPath = _apiPath.apiPath;
|
|
49545
49554
|
}],
|
|
49546
49555
|
execute: function () {
|
|
49556
|
+
_export("viewFileUrl", viewFileUrl = (site, file) => {
|
|
49557
|
+
return apiPath(`/api/site/asset/view/${site.appFileID}/${file.appFileID}/${file.fileContentID}/${file.name}`);
|
|
49558
|
+
});
|
|
49547
49559
|
_export("imageUrl", imageUrl = (site, file, size) => {
|
|
49548
49560
|
const name = encodeURIComponent(file.name);
|
|
49549
49561
|
if (!size) {
|
|
@@ -49627,12 +49639,40 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
|
|
|
49627
49639
|
}
|
|
49628
49640
|
changeImage() {
|
|
49629
49641
|
return __awaiter(this, void 0, void 0, function* () {
|
|
49642
|
+
const {
|
|
49643
|
+
tagName
|
|
49644
|
+
} = this.selection.element;
|
|
49645
|
+
let accept = "image/*";
|
|
49646
|
+
let multiple = true;
|
|
49647
|
+
let isVideo = false;
|
|
49648
|
+
let inject = false;
|
|
49649
|
+
switch (tagName) {
|
|
49650
|
+
case "VIDEO":
|
|
49651
|
+
accept = "video/*";
|
|
49652
|
+
multiple = false;
|
|
49653
|
+
isVideo = true;
|
|
49654
|
+
break;
|
|
49655
|
+
case "INJECT":
|
|
49656
|
+
accept = "text/html";
|
|
49657
|
+
multiple = false;
|
|
49658
|
+
inject = true;
|
|
49659
|
+
break;
|
|
49660
|
+
}
|
|
49630
49661
|
const files = yield PageNavigator.pushPageForResult(ChooseMediaPage, {
|
|
49631
49662
|
folder: this.folder,
|
|
49632
|
-
accept
|
|
49633
|
-
multiple
|
|
49663
|
+
accept,
|
|
49664
|
+
multiple,
|
|
49634
49665
|
selected: this.selection.element
|
|
49635
49666
|
});
|
|
49667
|
+
if (inject || isVideo) {
|
|
49668
|
+
const [{
|
|
49669
|
+
file,
|
|
49670
|
+
folder
|
|
49671
|
+
}] = files;
|
|
49672
|
+
const path = "/" + [folder, file.name].join("/");
|
|
49673
|
+
this.selection.element.setAttribute("src", path);
|
|
49674
|
+
return;
|
|
49675
|
+
}
|
|
49636
49676
|
const images = files.map(({
|
|
49637
49677
|
file,
|
|
49638
49678
|
size
|
|
@@ -49652,6 +49692,9 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
|
|
|
49652
49692
|
const selectedElement = this.selection.element;
|
|
49653
49693
|
const outerText = selectedElement.outerHTML;
|
|
49654
49694
|
let fileName = prompt("File Name", "/templates/header.html");
|
|
49695
|
+
if (!fileName) {
|
|
49696
|
+
return;
|
|
49697
|
+
}
|
|
49655
49698
|
if (fileName.startsWith("/")) {
|
|
49656
49699
|
fileName = fileName.substring(1);
|
|
49657
49700
|
}
|
|
@@ -49726,7 +49769,6 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
|
|
|
49726
49769
|
}
|
|
49727
49770
|
for (const iterator of children) {
|
|
49728
49771
|
iterator.setAttribute("contentEditable", "false");
|
|
49729
|
-
iterator.remove();
|
|
49730
49772
|
e.appendChild(iterator);
|
|
49731
49773
|
}
|
|
49732
49774
|
}
|