@social-mail/social-mail-client 1.9.119 → 1.9.121

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.
Files changed (30) hide show
  1. package/css-for-email.js +10 -3
  2. package/dist/admin/AdminAppIndex.pack.js +18 -9
  3. package/dist/admin/AdminAppIndex.pack.js.map +1 -1
  4. package/dist/admin/AdminAppIndex.pack.min.js +1 -1
  5. package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
  6. package/dist/public/channel/ChannelApp.pack.js +7 -5
  7. package/dist/public/channel/ChannelApp.pack.js.map +1 -1
  8. package/dist/public/channel/ChannelApp.pack.min.js +1 -1
  9. package/dist/public/channel/ChannelApp.pack.min.js.map +1 -1
  10. package/dist/site-editor-app/SiteEditorApp.pack.js +18 -9
  11. package/dist/site-editor-app/SiteEditorApp.pack.js.map +1 -1
  12. package/dist/site-editor-app/SiteEditorApp.pack.min.js +1 -1
  13. package/dist/site-editor-app/SiteEditorApp.pack.min.js.map +1 -1
  14. package/dist/tsconfig.tsbuildinfo +1 -1
  15. package/dist/web/AppIndex.pack.js +18 -9
  16. package/dist/web/AppIndex.pack.js.map +1 -1
  17. package/dist/web/AppIndex.pack.min.js +1 -1
  18. package/dist/web/AppIndex.pack.min.js.map +1 -1
  19. package/dist/web/page/mails/ConversationPage.d.ts.map +1 -1
  20. package/dist/web/page/mails/ConversationPage.js +8 -1
  21. package/dist/web/page/mails/ConversationPage.js.map +1 -1
  22. package/dist/web/page/mails/mini-compose/MiniComposePage.js +3 -3
  23. package/dist/web/page/mails/mini-compose/MiniComposePage.js.map +1 -1
  24. package/dist/web/page/mails/service/ConversationService.d.ts.map +1 -1
  25. package/dist/web/page/mails/service/ConversationService.js +7 -5
  26. package/dist/web/page/mails/service/ConversationService.js.map +1 -1
  27. package/package.json +1 -1
  28. package/src/web/page/mails/ConversationPage.tsx +11 -1
  29. package/src/web/page/mails/mini-compose/MiniComposePage.tsx +1 -1
  30. package/src/web/page/mails/service/ConversationService.tsx +8 -5
package/css-for-email.js CHANGED
@@ -26,9 +26,16 @@
26
26
  remove.push(style);
27
27
  }
28
28
 
29
+ const scripts = document.querySelectorAll("script");
30
+ for(let i=0; i<scripts.length;i++) {
31
+ remove.push(scripts[i]);
32
+ }
33
+
29
34
  return () => remove.forEach((x)=>x.remove());
30
35
  }
31
36
 
37
+ const root = window.getComputedStyle(window.document.documentElement);
38
+
32
39
  function css(el) {
33
40
  const cs = window.getComputedStyle(el);
34
41
  var sheets = document.styleSheets, ret = [];
@@ -52,7 +59,9 @@
52
59
  if (value) {
53
60
  // we need to evaluate every var(--)
54
61
  value = value.replace(/(var\(([^\)]+)\))/gm, (m, p1, p2) => {
55
- const cssValue = cs.getPropertyValue(p2.split(",")[0]);
62
+ const varName = p2.split(",")[0];
63
+ const cssValue = cs.getPropertyValue(varName)
64
+ || root.getPropertyValue(varName);
56
65
  return p1 ? cssValue : m;
57
66
  });
58
67
  properties.push({ key, value });
@@ -70,8 +79,6 @@
70
79
 
71
80
  async function flattenStyler(rules) {
72
81
 
73
- const replaceList = [];
74
-
75
82
  const all = document.querySelectorAll(":not(head) > *:not(style,head)");
76
83
  for(let i=0;i<all.length;i++) {
77
84
  const e = all[i];
@@ -29825,11 +29825,13 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
29825
29825
  c.render(XNode.create("div", null, XNode.create("div", {
29826
29826
  "style-height": "40vh"
29827
29827
  }, XNode.create(Loader, null))), e, c);
29828
- const es = c.app.resolve(EntityService);
29829
- mail.sanitizedHtml = html = yield es.run(Email, "getBody", email, {
29830
- cacheSeconds: CacheTTL.seconds.oneMonth,
29831
- cacheVersion: CacheVersions.email
29832
- }).asText();
29828
+ if (mail.status !== "draft") {
29829
+ const es = c.app.resolve(EntityService);
29830
+ mail.sanitizedHtml = html = yield es.run(Email, "getBody", email, {
29831
+ cacheSeconds: CacheTTL.seconds.oneMonth,
29832
+ cacheVersion: CacheVersions.email
29833
+ }).asText();
29834
+ }
29833
29835
  e.innerHTML = "";
29834
29836
  }
29835
29837
  const msg = document.createElement("div");
@@ -39195,7 +39197,7 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
39195
39197
  });
39196
39198
  }
39197
39199
  prepareEmail() {
39198
- var _a, _b;
39200
+ var _a, _b, _c;
39199
39201
  this.title = "Forward";
39200
39202
  let subject = "";
39201
39203
  let htmlBody;
@@ -39263,11 +39265,11 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
39263
39265
  }, "Subject:"), XNode.create("label", null, email.subject)), XNode.create("div", {
39264
39266
  "data-type": "html-body"
39265
39267
  }, XNode.create("div", {
39266
- innerHTML: email.htmlBody
39268
+ innerHTML: (_b = email.sanitizedHtml) !== null && _b !== void 0 ? _b : email.htmlBody
39267
39269
  }))))), XNode.create("footer", {
39268
39270
  "data-social-mail-commands": "emoji-bar"
39269
39271
  })));
39270
- attachments = (_b = email.attachments) === null || _b === void 0 ? void 0 : _b.map(x => AppFile.create(Object.assign(Object.assign({}, x), {
39272
+ attachments = (_c = email.attachments) === null || _c === void 0 ? void 0 : _c.map(x => AppFile.create(Object.assign(Object.assign({}, x), {
39271
39273
  appFileID: void 0
39272
39274
  })));
39273
39275
  }
@@ -40318,7 +40320,14 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
40318
40320
  }), XNode.create(DeleteIconTextButton, {
40319
40321
  "data-click-event": "delete-draft",
40320
40322
  text: "Delete Draft"
40321
- })), !sent && XNode.create("div", {
40323
+ })), sent ? XNode.create("div", {
40324
+ "data-layout": "row",
40325
+ "data-margin-top": "default"
40326
+ }, XNode.create("i", {
40327
+ "data-click-event": "forward-email",
40328
+ class: "fa-solid fa-share-all",
40329
+ title: "Forward"
40330
+ })) : XNode.create("div", {
40322
40331
  "data-layout": "row",
40323
40332
  "data-margin-top": "default"
40324
40333
  }, XNode.create("i", {