@social-mail/social-mail-client 1.8.402 → 1.8.403
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 +19 -36
- package/dist/admin/AdminAppIndex.pack.js.map +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
- package/dist/common/FileUrlService.d.ts.map +1 -1
- package/dist/common/FileUrlService.js +18 -35
- package/dist/common/FileUrlService.js.map +1 -1
- package/dist/public/channel/ChannelApp.pack.js +19 -36
- package/dist/public/channel/ChannelApp.pack.js.map +1 -1
- package/dist/public/channel/ChannelApp.pack.min.js +1 -1
- package/dist/public/channel/ChannelApp.pack.min.js.map +1 -1
- package/dist/site-editor-app/SiteEditorApp.pack.js +19 -36
- package/dist/site-editor-app/SiteEditorApp.pack.js.map +1 -1
- package/dist/site-editor-app/SiteEditorApp.pack.min.js +1 -1
- package/dist/site-editor-app/SiteEditorApp.pack.min.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.js +19 -36
- package/dist/web/AppIndex.pack.js.map +1 -1
- package/dist/web/AppIndex.pack.min.js +1 -1
- package/dist/web/AppIndex.pack.min.js.map +1 -1
- package/package.json +1 -1
- package/src/common/FileUrlService.ts +16 -30
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AtomControl } from "@web-atoms/core/dist/web/controls/AtomControl";
|
|
2
|
-
import
|
|
2
|
+
import FetchBuilder from "@web-atoms/core/dist/services/FetchBuilder";
|
|
3
3
|
|
|
4
4
|
export interface IFileUrl {
|
|
5
5
|
name?: string;
|
|
@@ -45,36 +45,22 @@ export const FileUrlService = {
|
|
|
45
45
|
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
if (!
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
if(img.getAttribute("animated") !== "true") {
|
|
48
|
+
export const AnimatedImgSrc = AtomControl.registerProperty("animated", "src", (c, e, v) => {
|
|
49
|
+
e.setAttribute("src", v);
|
|
50
|
+
if (!v) {
|
|
54
51
|
return;
|
|
55
52
|
}
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const blank = img.cloneNode() as HTMLImageElement;
|
|
63
|
-
blank.setAttribute("src", svg);
|
|
64
|
-
blank.removeAttribute("animated");
|
|
65
|
-
parentElement.replaceChild(blank, img);
|
|
66
|
-
setTimeout(() => {
|
|
67
|
-
const newImg = document.createElement("img");
|
|
68
|
-
for (const key of img.getAttributeNames()) {
|
|
69
|
-
newImg.setAttribute(key, img.getAttribute(key));
|
|
53
|
+
const i = setInterval(() => {
|
|
54
|
+
const f = FetchBuilder.get(v).asBlob().then((svg) => {
|
|
55
|
+
const url = URL.createObjectURL(svg);
|
|
56
|
+
const lastUrl = e.getAttribute("src");
|
|
57
|
+
if (lastUrl.startsWith("blob:")) {
|
|
58
|
+
URL.revokeObjectURL(lastUrl);
|
|
70
59
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
export const AnimatedImgSrc = AtomControl.registerProperty("animated", "src", (c, e, v) => {
|
|
78
|
-
e.setAttribute("animated", "true");
|
|
79
|
-
e.setAttribute("src", v);
|
|
60
|
+
e.setAttribute("src", url);
|
|
61
|
+
});
|
|
62
|
+
},5000);
|
|
63
|
+
c.disposables.add(() => {
|
|
64
|
+
clearInterval(i);
|
|
65
|
+
});
|
|
80
66
|
});
|