@social-mail/social-mail-client 1.2.95 → 1.2.97

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.
@@ -18525,6 +18525,7 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
18525
18525
  }],
18526
18526
  execute: function () {
18527
18527
  _export("renderMail", renderMail = AtomControl.registerProperty("data-html", "html", (c, e, value) => {
18528
+ var _a;
18528
18529
  if (!value) {
18529
18530
  e.innerHTML = "";
18530
18531
  return;
@@ -18576,7 +18577,7 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
18576
18577
  mode: "open"
18577
18578
  });
18578
18579
  shadow.appendChild(msg);
18579
- if (!thread.timeRead && thread.mailboxID) {
18580
+ if (!thread.timeRead && thread.mailboxID && thread.mailboxID !== ((_a = thread.email) === null || _a === void 0 ? void 0 : _a.senderID)) {
18580
18581
  const timeRead = DateTime.now;
18581
18582
  thread.timeRead = timeRead;
18582
18583
  const control = AtomControl.from(e);
@@ -28821,7 +28822,13 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
28821
28822
  margin-bottom: 25px;
28822
28823
  }
28823
28824
  & .engagements {
28824
- & > * {
28825
+ display: flex;
28826
+ flex-wrap: wrap;
28827
+ gap: 5px;
28828
+ margin-top: 5px;
28829
+ margin-bottom: 5px;
28830
+ align-items: center;
28831
+ & > span {
28825
28832
  border: solid 1px lightgray;
28826
28833
  padding: 3px;
28827
28834
  padding-left: 7px;
@@ -28919,12 +28926,14 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
28919
28926
  cancelToken
28920
28927
  })), {
28921
28928
  itemRenderer: thread => {
28922
- var _a, _b, _c, _d, _e, _f, _g;
28929
+ var _a, _b, _c, _d, _e, _f, _g, _h;
28923
28930
  const item = thread.email;
28924
28931
  const internalDate = (_b = (_a = item.dateSent) !== null && _a !== void 0 ? _a : item.dateReceived) !== null && _b !== void 0 ? _b : item.dateCreated;
28925
28932
  const sent = item.senderID === thread.mailboxID;
28926
28933
  const remaining = DateTime.from((_c = item.dateSent) !== null && _c !== void 0 ? _c : DateTime.today).diff(DateTime.now);
28927
28934
  const isSending = thread.email.status === "scheduled" && remaining.totalSeconds > 3;
28935
+ const engagements = (_d = thread.email.engagements) !== null && _d !== void 0 ? _d : [];
28936
+ const tags = ((_e = thread.email.tags) !== null && _e !== void 0 ? _e : "").split(",").filter(x => x);
28928
28937
  let readStatus = "";
28929
28938
  let readColor = "";
28930
28939
  if (sent) {
@@ -28953,8 +28962,8 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
28953
28962
  text: item.subject
28954
28963
  }), item.received ? XNode.create("div", null) : item.userID !== SocialMailApp.user.userID && XNode.create("div", {
28955
28964
  "style-max-width": "20ch",
28956
- title: (_d = item.senderUser) === null || _d === void 0 ? void 0 : _d.displayName,
28957
- text: (_e = item.senderUser) === null || _e === void 0 ? void 0 : _e.displayName
28965
+ title: (_f = item.senderUser) === null || _f === void 0 ? void 0 : _f.displayName,
28966
+ text: (_g = item.senderUser) === null || _g === void 0 ? void 0 : _g.displayName
28958
28967
  }), XNode.create("div", {
28959
28968
  text: DateFormats.relative.short(internalDate),
28960
28969
  title: DateFormats.withWeekDayAndTime(internalDate)
@@ -28966,28 +28975,29 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
28966
28975
  height: "40vh"
28967
28976
  }, XNode.create("div", Object.assign({
28968
28977
  class: "message"
28969
- }, renderMail(thread)))), ((_f = item.engagements) === null || _f === void 0 ? void 0 : _f.length) && XNode.create("div", {
28978
+ }, renderMail(thread)))), XNode.create("div", {
28970
28979
  class: "engagements"
28971
- }, ...item.engagements.map(x => XNode.create("span", {
28980
+ }, sent && XNode.create("i", {
28981
+ class: "fa-solid fa-circle-small",
28982
+ "style-color": readColor,
28983
+ title: readStatus
28984
+ }), ...engagements.map(x => XNode.create("span", {
28972
28985
  "data-click-event": "view-engagements",
28973
28986
  "data-cursor": "pointer",
28974
28987
  title: `View all ${x.engagement} ${x.count}`,
28975
28988
  text: `${x.engagement} ${x.count}`
28976
- }))), ((_g = item.attachments) === null || _g === void 0 ? void 0 : _g.length) && XNode.create("div", {
28989
+ }))), ((_h = item.attachments) === null || _h === void 0 ? void 0 : _h.length) && XNode.create("div", {
28977
28990
  class: "attachments",
28978
28991
  "data-layout": "flex-wrap-padding"
28979
- }, ...item.attachments.map(FilePreview)), thread.email.tags && XNode.create("div", {
28980
- "data-layout": "row"
28981
- }, ...thread.email.tags.split(",").map(x => XNode.create("span", {
28992
+ }, ...item.attachments.map(FilePreview)), XNode.create("div", {
28993
+ "data-layout": "row",
28994
+ "data-margin-top": "default",
28995
+ "data-margin-bottom": "default"
28996
+ }, ...tags.map(x => XNode.create("span", {
28982
28997
  text: `#${x.startsWith("#") ? x.substring(1) : x}`
28983
- }))), sent ? XNode.create("div", {
28984
- "data-layout": "row"
28985
- }, XNode.create("i", {
28986
- class: "fa-solid fa-circle-small",
28987
- "style-color": readColor,
28988
- title: readStatus
28989
- })) : XNode.create("div", {
28990
- "data-layout": "row"
28998
+ }))), !sent && XNode.create("div", {
28999
+ "data-layout": "row",
29000
+ "data-margin-top": "default"
28991
29001
  }, XNode.create("i", {
28992
29002
  "data-click-event": "react-email",
28993
29003
  class: "fa-light fa-face-smile-plus",