@social-mail/social-mail-client 1.2.546 → 1.2.548

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 (80) hide show
  1. package/content/images/svg/logo/logo-orange.svg +57 -0
  2. package/dist/admin/AdminAppIndex.pack.js +2 -1
  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/common/cache/CacheTTL.d.ts +1 -0
  7. package/dist/common/cache/CacheTTL.d.ts.map +1 -1
  8. package/dist/common/cache/CacheTTL.js +2 -1
  9. package/dist/common/cache/CacheTTL.js.map +1 -1
  10. package/dist/common/toBase36.d.ts +4 -0
  11. package/dist/common/toBase36.d.ts.map +1 -1
  12. package/dist/common/toBase36.js +33 -1
  13. package/dist/common/toBase36.js.map +1 -1
  14. package/dist/public/channel/BlogImageService.d.ts.map +1 -1
  15. package/dist/public/channel/BlogImageService.js +5 -2
  16. package/dist/public/channel/BlogImageService.js.map +1 -1
  17. package/dist/public/channel/BlogService.d.ts +4 -5
  18. package/dist/public/channel/BlogService.d.ts.map +1 -1
  19. package/dist/public/channel/BlogService.js +26 -10
  20. package/dist/public/channel/BlogService.js.map +1 -1
  21. package/dist/public/channel/ChannelMessage.d.ts +0 -12
  22. package/dist/public/channel/ChannelMessage.d.ts.map +1 -1
  23. package/dist/public/channel/ChannelMessage.js +3 -137
  24. package/dist/public/channel/ChannelMessage.js.map +1 -1
  25. package/dist/public/channel/ChannelMessageList.d.ts +0 -12
  26. package/dist/public/channel/ChannelMessageList.d.ts.map +1 -1
  27. package/dist/public/channel/ChannelMessageList.js +3 -127
  28. package/dist/public/channel/ChannelMessageList.js.map +1 -1
  29. package/dist/public/channel/ChannelView.d.ts +15 -3
  30. package/dist/public/channel/ChannelView.d.ts.map +1 -1
  31. package/dist/public/channel/ChannelView.js +169 -11
  32. package/dist/public/channel/ChannelView.js.map +1 -1
  33. package/dist/public/channel/ChannelView.pack.js +902 -884
  34. package/dist/public/channel/ChannelView.pack.js.map +1 -1
  35. package/dist/public/channel/ChannelView.pack.min.js +155 -142
  36. package/dist/public/channel/ChannelView.pack.min.js.map +1 -1
  37. package/dist/public/channel/PostSummary.d.ts +6 -0
  38. package/dist/public/channel/PostSummary.d.ts.map +1 -0
  39. package/dist/public/channel/PostSummary.js +61 -0
  40. package/dist/public/channel/PostSummary.js.map +1 -0
  41. package/dist/public/channel/UrlService.d.ts +3 -1
  42. package/dist/public/channel/UrlService.d.ts.map +1 -1
  43. package/dist/public/channel/UrlService.js +30 -4
  44. package/dist/public/channel/UrlService.js.map +1 -1
  45. package/dist/public/channel/controls/BlogHeader.d.ts +6 -0
  46. package/dist/public/channel/controls/BlogHeader.d.ts.map +1 -0
  47. package/dist/public/channel/controls/BlogHeader.js +42 -0
  48. package/dist/public/channel/controls/BlogHeader.js.map +1 -0
  49. package/dist/public/channel/controls/PostList.d.ts.map +1 -1
  50. package/dist/public/channel/controls/PostList.js +32 -9
  51. package/dist/public/channel/controls/PostList.js.map +1 -1
  52. package/dist/public/channel/controls/TagCloud.d.ts.map +1 -1
  53. package/dist/public/channel/controls/TagCloud.js +18 -5
  54. package/dist/public/channel/controls/TagCloud.js.map +1 -1
  55. package/dist/public/channel/styles/channelViewStyle.d.ts.map +1 -1
  56. package/dist/public/channel/styles/channelViewStyle.js +28 -16
  57. package/dist/public/channel/styles/channelViewStyle.js.map +1 -1
  58. package/dist/public/store/Store.pack.js +33 -1
  59. package/dist/public/store/Store.pack.js.map +1 -1
  60. package/dist/public/store/Store.pack.min.js +1 -1
  61. package/dist/public/store/Store.pack.min.js.map +1 -1
  62. package/dist/tsconfig.tsbuildinfo +1 -1
  63. package/dist/web/AppIndex.pack.js +2 -1
  64. package/dist/web/AppIndex.pack.js.map +1 -1
  65. package/dist/web/AppIndex.pack.min.js +1 -1
  66. package/dist/web/AppIndex.pack.min.js.map +1 -1
  67. package/package.json +1 -1
  68. package/src/common/cache/CacheTTL.ts +2 -1
  69. package/src/common/toBase36.ts +36 -0
  70. package/src/public/channel/BlogImageService.ts +3 -0
  71. package/src/public/channel/BlogService.ts +19 -5
  72. package/src/public/channel/ChannelMessage.tsx +113 -117
  73. package/src/public/channel/ChannelMessageList.tsx +110 -106
  74. package/src/public/channel/ChannelView.tsx +153 -7
  75. package/src/public/channel/PostSummary.tsx +46 -0
  76. package/src/public/channel/UrlService.ts +23 -4
  77. package/src/public/channel/controls/BlogHeader.tsx +29 -0
  78. package/src/public/channel/controls/PostList.tsx +32 -5
  79. package/src/public/channel/controls/TagCloud.tsx +18 -4
  80. package/src/public/channel/styles/channelViewStyle.ts +28 -16
@@ -1975,8 +1975,8 @@ const UMD = new UMDClass();
1975
1975
  //# sourceMappingURL=umd.js.map
1976
1976
 
1977
1977
  AmdLoader.instance.register(
1978
- ["@social-mail/social-mail-client","@web-atoms/core","reflect-metadata","@web-atoms/date-time","@web-atoms/entity","@web-atoms/web-controls","@web-atoms/email-dom","@web-atoms/data-styles"],
1979
- ["@social-mail/social-mail-client/dist/public/channel/ChannelView","@social-mail/social-mail-client/dist/public/channel/ChannelMessage","@web-atoms/core/dist/core/InjectProperty","@web-atoms/core/dist/web/controls/AtomControl","@web-atoms/core/dist/core/AtomBinder","@web-atoms/core/dist/core/types","reflect-metadata","@web-atoms/core/dist/core/AtomMap","@web-atoms/core/dist/core/AtomComponent","@web-atoms/core/dist/App","@web-atoms/core/dist/core/AtomDispatcher","@web-atoms/core/dist/di/RegisterSingleton","@web-atoms/core/dist/di/Register","@web-atoms/core/dist/di/ServiceCollection","@web-atoms/core/dist/di/TypeKey","@web-atoms/core/dist/di/ServiceProvider","@web-atoms/core/dist/core/TransientDisposable","@web-atoms/core/dist/di/Inject","@web-atoms/core/dist/services/BusyIndicatorService","@web-atoms/core/dist/core/AtomDisposableList","@web-atoms/core/dist/core/AtomWatcher","@web-atoms/core/dist/core/ExpressionParser","@web-atoms/core/dist/core/Bind","@web-atoms/core/dist/core/Hacks","@web-atoms/core/dist/web/core/AtomUI","@web-atoms/core/dist/core/InheritedProperty","@web-atoms/core/dist/core/PropertyMap","@web-atoms/core/dist/core/XNode","@web-atoms/core/dist/core/BindableProperty","@web-atoms/core/dist/core/Command","@web-atoms/core/dist/core/EventScope","@web-atoms/date-time/dist/DateTime","@web-atoms/date-time/dist/TimeSpan","@web-atoms/core/dist/core/Route","@web-atoms/core/dist/core/StringHelper","@web-atoms/core/dist/core/FormattedString","@web-atoms/core/dist/core/WebImage","@web-atoms/core/dist/web/styles/AtomStyle","@web-atoms/core/dist/web/styles/AtomStyleSheet","@social-mail/social-mail-client/dist/public/channel/BlogService","@web-atoms/core/dist/di/DISingleton","@social-mail/social-mail-client/dist/services/EntityService","@web-atoms/entity/dist/services/BaseEntityService","@web-atoms/entity/dist/models/Cloner","@web-atoms/entity/dist/models/cloneSource","@web-atoms/entity/dist/models/IEntityModel","@web-atoms/entity/dist/services/HttpSession","@web-atoms/core/dist/services/http/JsonError","@web-atoms/entity/dist/models/TaskManager","@web-atoms/entity/dist/models/Queue","@web-atoms/entity/dist/services/mergeProperties","@web-atoms/entity/dist/services/Query","@web-atoms/entity/dist/services/StringHelper","@web-atoms/entity/dist/services/resolve","@social-mail/social-mail-client/dist/services/BusyProgress","@web-atoms/core/dist/style/styled","@social-mail/social-mail-client/dist/common/apiPath","@social-mail/social-mail-client/dist/model/model","@social-mail/social-mail-client/dist/common/Sql","@social-mail/social-mail-client/dist/services/email/EmailContentDownloader","@web-atoms/core/dist/services/FetchBuilder","@social-mail/social-mail-client/dist/web/page/mails/service/EngagementService","@social-mail/social-mail-client/dist/common/cache/CacheTTL","@web-atoms/core/dist/view-model/Action","@web-atoms/core/dist/services/NavigationService","@web-atoms/core/dist/core/AtomUri","@web-atoms/core/dist/services/ReferenceService","@web-atoms/core/dist/web/services/PopupService","@web-atoms/core/dist/web/services/PopupWindow","@web-atoms/core/dist/core/sleep","@social-mail/social-mail-client/dist/public/channel/emoji/EmojiPopup","@web-atoms/core/dist/web/WebApp","@web-atoms/core/dist/core/AtomOnce","@web-atoms/core/dist/web/services/WebBusyIndicatorService","@web-atoms/core/dist/web/styles/StyleBuilder","@web-atoms/core/dist/web/services/WindowService","@web-atoms/core/dist/Atom","@web-atoms/core/dist/core/AtomLoader","@web-atoms/core/dist/services/JsonService","@web-atoms/core/dist/core/FormattedError","@web-atoms/core/dist/view-model/AtomWindowViewModel","@web-atoms/core/dist/view-model/AtomViewModel","@web-atoms/core/dist/view-model/baseTypes","@web-atoms/core/dist/web/controls/AtomAlertWindow","@web-atoms/core/dist/web/styles/AtomAlertWindowStyle","@web-atoms/core/dist/core/Colors","@web-atoms/core/dist/web/styles/AtomWindowStyle","@web-atoms/core/src/web/images/close-button-hover.svg","@web-atoms/core/dist/web/controls/AtomWindow","@web-atoms/core/dist/web/controls/AtomTemplate","@web-atoms/core/dist/web/controls/AtomNotification","@web-atoms/core/dist/web/styles/AtomNotificationStyle","@web-atoms/core/dist/web/styles/AtomPopupStyle","@web-atoms/core/dist/web/services/NotificationPopup","@web-atoms/core/dist/web/styles/AtomTheme","@web-atoms/web-controls/dist/basic/InlinePopup","@web-atoms/web-controls/dist/basic/styles/inline-popup-style","@social-mail/social-mail-client/dist/public/channel/styles/channelViewStyle","@social-mail/social-mail-client/dist/common/TestMode","@web-atoms/web-controls/dist/basic/AtomRepeater","@web-atoms/core/dist/core/WatchProperty","@web-atoms/web-controls/dist/basic/MergeNode","@web-atoms/web-controls/dist/basic/ItemPath","@web-atoms/web-controls/dist/basic/styles/ui-display-none-style","@web-atoms/web-controls/dist/basic/styles/popup-style","@web-atoms/web-controls/dist/basic/styles/suggestion-popup","@web-atoms/web-controls/dist/basic/styles/repeater-style","@web-atoms/web-controls/dist/DataAttributes","@social-mail/social-mail-client/dist/public/channel/PostView","@social-mail/social-mail-client/dist/common/date/DateFormats","@social-mail/social-mail-client/dist/web/page/mails/service/ConversationService","@web-atoms/email-dom/dist/DomToString","@web-atoms/email-dom/dist/dom/StyleHelper","@web-atoms/email-dom/dist/style/mergeStyle","@social-mail/social-mail-client/dist/common/events/CommonEvents","@social-mail/social-mail-client/dist/web/commands/MailAppEvents","@social-mail/social-mail-client/dist/common/fileUrl","@social-mail/social-mail-client/dist/common/controls/buttons/CopyIcon","@social-mail/social-mail-client/dist/public/channel/controls/TagCloud","@social-mail/social-mail-client/dist/public/channel/controls/PostList","@social-mail/social-mail-client/dist/public/channel/UrlService","@social-mail/social-mail-client/content/images/gif/loader.gif","@social-mail/social-mail-client/dist/public/channel/BlogImageService","@social-mail/social-mail-client/dist/public/channel/controls/RecentPosts","@social-mail/social-mail-client/dist/public/channel/ChannelMessageList","@web-atoms/web-controls/dist/basic/LimitedText","@social-mail/social-mail-client/dist/common/controls/repeater/InfiniteRepeater","@social-mail/social-mail-client/dist/style/GlobalStyle","@web-atoms/core/dist/core/AtomList","@social-mail/social-mail-client/dist/style/OverrideAppStyle","@web-atoms/data-styles/data-styles","@web-atoms/core/dist/Pack"]);
1978
+ ["@social-mail/social-mail-client","@web-atoms/core","reflect-metadata","@web-atoms/date-time","@web-atoms/entity","@web-atoms/web-controls","@web-atoms/data-styles","@web-atoms/email-dom"],
1979
+ ["@social-mail/social-mail-client/dist/public/channel/ChannelView","@web-atoms/core/dist/core/InjectProperty","@web-atoms/core/dist/web/controls/AtomControl","@web-atoms/core/dist/core/AtomBinder","@web-atoms/core/dist/core/types","reflect-metadata","@web-atoms/core/dist/core/AtomMap","@web-atoms/core/dist/core/AtomComponent","@web-atoms/core/dist/App","@web-atoms/core/dist/core/AtomDispatcher","@web-atoms/core/dist/di/RegisterSingleton","@web-atoms/core/dist/di/Register","@web-atoms/core/dist/di/ServiceCollection","@web-atoms/core/dist/di/TypeKey","@web-atoms/core/dist/di/ServiceProvider","@web-atoms/core/dist/core/TransientDisposable","@web-atoms/core/dist/di/Inject","@web-atoms/core/dist/services/BusyIndicatorService","@web-atoms/core/dist/core/AtomDisposableList","@web-atoms/core/dist/core/AtomWatcher","@web-atoms/core/dist/core/ExpressionParser","@web-atoms/core/dist/core/Bind","@web-atoms/core/dist/core/Hacks","@web-atoms/core/dist/web/core/AtomUI","@web-atoms/core/dist/core/InheritedProperty","@web-atoms/core/dist/core/PropertyMap","@web-atoms/core/dist/core/XNode","@web-atoms/core/dist/core/BindableProperty","@web-atoms/core/dist/core/Command","@web-atoms/core/dist/core/EventScope","@web-atoms/date-time/dist/DateTime","@web-atoms/date-time/dist/TimeSpan","@web-atoms/core/dist/core/Route","@web-atoms/core/dist/core/StringHelper","@web-atoms/core/dist/core/FormattedString","@web-atoms/core/dist/core/WebImage","@web-atoms/core/dist/web/styles/AtomStyle","@web-atoms/core/dist/web/styles/AtomStyleSheet","@social-mail/social-mail-client/dist/public/channel/BlogService","@web-atoms/core/dist/di/DISingleton","@social-mail/social-mail-client/dist/services/EntityService","@web-atoms/entity/dist/services/BaseEntityService","@web-atoms/entity/dist/models/Cloner","@web-atoms/entity/dist/models/cloneSource","@web-atoms/entity/dist/models/IEntityModel","@web-atoms/entity/dist/services/HttpSession","@web-atoms/core/dist/services/http/JsonError","@web-atoms/entity/dist/models/TaskManager","@web-atoms/entity/dist/models/Queue","@web-atoms/entity/dist/services/mergeProperties","@web-atoms/entity/dist/services/Query","@web-atoms/entity/dist/services/StringHelper","@web-atoms/entity/dist/services/resolve","@social-mail/social-mail-client/dist/services/BusyProgress","@web-atoms/core/dist/style/styled","@social-mail/social-mail-client/dist/common/apiPath","@social-mail/social-mail-client/dist/model/model","@social-mail/social-mail-client/dist/common/Sql","@social-mail/social-mail-client/dist/services/email/EmailContentDownloader","@web-atoms/core/dist/services/FetchBuilder","@social-mail/social-mail-client/dist/web/page/mails/service/EngagementService","@social-mail/social-mail-client/dist/common/cache/CacheTTL","@web-atoms/core/dist/view-model/Action","@web-atoms/core/dist/services/NavigationService","@web-atoms/core/dist/core/AtomUri","@web-atoms/core/dist/services/ReferenceService","@web-atoms/core/dist/web/services/PopupService","@web-atoms/core/dist/web/services/PopupWindow","@web-atoms/core/dist/core/sleep","@social-mail/social-mail-client/dist/public/channel/emoji/EmojiPopup","@web-atoms/core/dist/web/WebApp","@web-atoms/core/dist/core/AtomOnce","@web-atoms/core/dist/web/services/WebBusyIndicatorService","@web-atoms/core/dist/web/styles/StyleBuilder","@web-atoms/core/dist/web/services/WindowService","@web-atoms/core/dist/Atom","@web-atoms/core/dist/core/AtomLoader","@web-atoms/core/dist/services/JsonService","@web-atoms/core/dist/core/FormattedError","@web-atoms/core/dist/view-model/AtomWindowViewModel","@web-atoms/core/dist/view-model/AtomViewModel","@web-atoms/core/dist/view-model/baseTypes","@web-atoms/core/dist/web/controls/AtomAlertWindow","@web-atoms/core/dist/web/styles/AtomAlertWindowStyle","@web-atoms/core/dist/core/Colors","@web-atoms/core/dist/web/styles/AtomWindowStyle","@web-atoms/core/src/web/images/close-button-hover.svg","@web-atoms/core/dist/web/controls/AtomWindow","@web-atoms/core/dist/web/controls/AtomTemplate","@web-atoms/core/dist/web/controls/AtomNotification","@web-atoms/core/dist/web/styles/AtomNotificationStyle","@web-atoms/core/dist/web/styles/AtomPopupStyle","@web-atoms/core/dist/web/services/NotificationPopup","@web-atoms/core/dist/web/styles/AtomTheme","@web-atoms/web-controls/dist/basic/InlinePopup","@web-atoms/web-controls/dist/basic/styles/inline-popup-style","@social-mail/social-mail-client/dist/style/GlobalStyle","@web-atoms/core/dist/core/AtomList","@social-mail/social-mail-client/dist/style/OverrideAppStyle","@web-atoms/data-styles/data-styles","@social-mail/social-mail-client/dist/public/channel/styles/channelViewStyle","@social-mail/social-mail-client/dist/common/TestMode","@web-atoms/web-controls/dist/basic/AtomRepeater","@web-atoms/core/dist/core/WatchProperty","@web-atoms/web-controls/dist/basic/MergeNode","@web-atoms/web-controls/dist/basic/ItemPath","@web-atoms/web-controls/dist/basic/styles/ui-display-none-style","@web-atoms/web-controls/dist/basic/styles/popup-style","@web-atoms/web-controls/dist/basic/styles/suggestion-popup","@web-atoms/web-controls/dist/basic/styles/repeater-style","@web-atoms/web-controls/dist/DataAttributes","@social-mail/social-mail-client/dist/public/channel/PostView","@social-mail/social-mail-client/dist/common/date/DateFormats","@social-mail/social-mail-client/dist/web/page/mails/service/ConversationService","@web-atoms/email-dom/dist/DomToString","@web-atoms/email-dom/dist/dom/StyleHelper","@web-atoms/email-dom/dist/style/mergeStyle","@social-mail/social-mail-client/dist/common/events/CommonEvents","@social-mail/social-mail-client/dist/web/commands/MailAppEvents","@social-mail/social-mail-client/dist/common/fileUrl","@social-mail/social-mail-client/dist/common/controls/buttons/CopyIcon","@social-mail/social-mail-client/dist/public/channel/controls/TagCloud","@social-mail/social-mail-client/dist/public/channel/UrlService","@social-mail/social-mail-client/dist/public/channel/controls/PostList","@social-mail/social-mail-client/content/images/gif/loader.gif","@social-mail/social-mail-client/dist/public/channel/BlogImageService","@social-mail/social-mail-client/content/images/svg/logo/logo-orange.svg","@social-mail/social-mail-client/dist/public/channel/controls/RecentPosts","@social-mail/social-mail-client/dist/public/channel/controls/BlogHeader","@web-atoms/core/dist/Pack","@social-mail/social-mail-client/dist/common/controls/repeater/InfiniteRepeater","@social-mail/social-mail-client/dist/public/channel/PostSummary","@social-mail/social-mail-client/dist/common/toBase36"]);
1980
1980
 
1981
1981
  System.register([], function (_export, _context) {
1982
1982
  "use strict";
@@ -16005,7 +16005,8 @@ System.register([], function (_export, _context) {
16005
16005
  seconds: {
16006
16006
  oneHour: 60 * 60,
16007
16007
  oneDay: 60 * 60 * 24,
16008
- oneMonth: 60 * 60 * 24 * 30
16008
+ oneMonth: 60 * 60 * 24 * 30,
16009
+ fifteenMinutes: 15 * 60
16009
16010
  }
16010
16011
  });
16011
16012
  }
@@ -16102,10 +16103,10 @@ System.register(["tslib", "@web-atoms/core/dist/di/Inject", "../../../../service
16102
16103
 
16103
16104
  AmdLoader.instance.setup("@social-mail/social-mail-client/dist/web/page/mails/service/EngagementService");
16104
16105
 
16105
- System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/core/dist/di/Inject", "../../services/EntityService", "../../model/model", "../../common/Sql", "../../services/email/EmailContentDownloader", "../../web/page/mails/service/EngagementService", "../../common/apiPath"], function (_export, _context) {
16106
+ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/core/dist/di/Inject", "../../services/EntityService", "../../model/model", "../../common/Sql", "../../services/email/EmailContentDownloader", "../../web/page/mails/service/EngagementService", "../../common/apiPath", "../../common/cache/CacheTTL"], function (_export, _context) {
16106
16107
  "use strict";
16107
16108
 
16108
- var __awaiter, __decorate, __metadata, DISingleton, Inject, EntityService, Email, Mailbox, MailboxEmail, Sql, EmailContentDownloader, EngagementService, apiPath, updateAttachments, BlogService;
16109
+ var __awaiter, __decorate, __metadata, DISingleton, Inject, EntityService, Email, Mailbox, MailboxEmail, Sql, EmailContentDownloader, EngagementService, apiPath, CacheTTL, cacheVersion, updateAttachments, BlogService;
16109
16110
  return {
16110
16111
  setters: [function (_tslib) {
16111
16112
  __awaiter = _tslib.__awaiter;
@@ -16129,12 +16130,15 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
16129
16130
  EngagementService = _webPageMailsServiceEngagementService.default;
16130
16131
  }, function (_commonApiPath) {
16131
16132
  apiPath = _commonApiPath.apiPath;
16133
+ }, function (_commonCacheCacheTTL) {
16134
+ CacheTTL = _commonCacheCacheTTL.CacheTTL;
16132
16135
  }],
16133
16136
  execute: function () {
16137
+ cacheVersion = "1a";
16134
16138
  updateAttachments = (channelID, email) => {
16135
16139
  if (email.attachments) {
16136
16140
  for (const iterator of email.attachments) {
16137
- iterator.url = apiPath(`/api/emails/channel/content/attachment/${channelID}/${email.emailID}/${email.headerMessageID}/${iterator.appFileID}`);
16141
+ iterator.url = apiPath(`/api/channel/file/view/${channelID}/${email.emailID}/${iterator.appFileID}/${iterator.name}`);
16138
16142
  }
16139
16143
  }
16140
16144
  };
@@ -16158,6 +16162,8 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
16158
16162
  getEmails({
16159
16163
  channelID = 0,
16160
16164
  parentID = 0,
16165
+ authorID = 0,
16166
+ tagID = 0,
16161
16167
  search = "",
16162
16168
  start = 0,
16163
16169
  size = 10,
@@ -16177,22 +16183,30 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
16177
16183
  search
16178
16184
  }, p => x => Sql.text.includes(x.email.textBody, p.search));
16179
16185
  }
16186
+ if (tagID) {
16187
+ q = q.where({
16188
+ tagID
16189
+ }, p => x => x.email.emailTags.some(t => t.tagID === p.tagID));
16190
+ }
16191
+ if (authorID) {
16192
+ q = q.where({
16193
+ authorID
16194
+ }, p => x => x.email.senderID === p.authorID);
16195
+ }
16180
16196
  const mailboxEmails = yield q.include(x => [x.email.attachments, x.email.engagements, x.email.emailTags.forEach(t => t.tag)]).orderByDescending(x => x.dateUpdated).toPagedList({
16181
16197
  start,
16182
16198
  size,
16183
16199
  cancelToken
16184
16200
  });
16185
- const emails = {
16186
- items: mailboxEmails.items.map(x => x.email),
16187
- total: mailboxEmails.total
16188
- };
16189
16201
  const tasks = [];
16190
- for (const email of emails.items) {
16202
+ for (const {
16203
+ email
16204
+ } of mailboxEmails.items) {
16191
16205
  tasks.push(this.downloader.downloadFromUrl(apiPath(`/api/emails/channel/content/html/${channelID}/${email.emailID}/${email.headerMessageID}`), email));
16192
16206
  updateAttachments(channelID, email);
16193
16207
  }
16194
16208
  yield Promise.all(tasks);
16195
- return emails;
16209
+ return mailboxEmails;
16196
16210
  });
16197
16211
  }
16198
16212
  getChannel(emailAddress, channelID, d) {
@@ -16203,7 +16217,10 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
16203
16217
  channelID
16204
16218
  }, p => x => x.mailboxID === p.channelID);
16205
16219
  }
16206
- const c = yield q.include(x => x.emailAddress).orderByDescending(x => x.datePublished).firstOrDefault();
16220
+ const c = yield q.include(x => x.emailAddress).orderByDescending(x => x.datePublished).firstOrDefault({
16221
+ cacheVersion,
16222
+ cacheSeconds: CacheTTL.seconds.oneHour
16223
+ });
16207
16224
  return c;
16208
16225
  });
16209
16226
  }
@@ -21102,64 +21119,455 @@ System.register(["tslib", "@web-atoms/core/dist/web/WebApp", "@web-atoms/web-con
21102
21119
 
21103
21120
  AmdLoader.instance.setup("@social-mail/social-mail-client/dist/public/channel/emoji/EmojiPopup");
21104
21121
 
21105
- System.register([], function (_export, _context) {
21122
+ System.register(["./AtomBinder"], function (_export, _context) {
21106
21123
  "use strict";
21107
21124
 
21108
- var AppLocation;
21125
+ var AtomBinder, AtomList, ap;
21126
+ _export("AtomList", void 0);
21109
21127
  return {
21110
- setters: [],
21128
+ setters: [function (_AtomBinder) {
21129
+ AtomBinder = _AtomBinder.AtomBinder;
21130
+ }],
21111
21131
  execute: function () {
21112
- _export("AppLocation", AppLocation = {
21113
- isLocalTesting: /\d+\.\d+\.\d+\.\d+/.test(location.hostname)
21132
+ _export("AtomList", AtomList = class AtomList extends Array {
21133
+ constructor() {
21134
+ super();
21135
+ this.startValue = 0;
21136
+ this.totalValue = 0;
21137
+ this.sizeValue = 10;
21138
+ this["__proto__"] = AtomList.prototype;
21139
+ this.next = () => {
21140
+ this.start = this.start + this.size;
21141
+ };
21142
+ this.prev = () => {
21143
+ if (this.start >= this.size) {
21144
+ this.start = this.start - this.size;
21145
+ }
21146
+ };
21147
+ }
21148
+ get start() {
21149
+ return this.startValue;
21150
+ }
21151
+ set start(v) {
21152
+ if (v === this.startValue) {
21153
+ return;
21154
+ }
21155
+ this.startValue = v;
21156
+ AtomBinder.refreshValue(this, "start");
21157
+ }
21158
+ get total() {
21159
+ return this.totalValue;
21160
+ }
21161
+ set total(v) {
21162
+ if (v === this.totalValue) {
21163
+ return;
21164
+ }
21165
+ this.totalValue = v;
21166
+ AtomBinder.refreshValue(this, "total");
21167
+ }
21168
+ get size() {
21169
+ return this.sizeValue;
21170
+ }
21171
+ set size(v) {
21172
+ if (v === this.sizeValue) {
21173
+ return;
21174
+ }
21175
+ this.sizeValue = v;
21176
+ AtomBinder.refreshValue(this, "size");
21177
+ }
21178
+ add(item) {
21179
+ const i = this.length;
21180
+ const n = this.push(item);
21181
+ AtomBinder.invokeItemsEvent(this, "add", i, item);
21182
+ AtomBinder.refreshValue(this, "length");
21183
+ return n;
21184
+ }
21185
+ addAll(items) {
21186
+ for (const item of items) {
21187
+ const i = this.length;
21188
+ this.push(item);
21189
+ AtomBinder.invokeItemsEvent(this, "add", i, item);
21190
+ AtomBinder.refreshValue(this, "length");
21191
+ }
21192
+ const t = items["total"];
21193
+ if (t) {
21194
+ this.total = t;
21195
+ }
21196
+ }
21197
+ replace(items, start, size) {
21198
+ this.length = items.length;
21199
+ for (let i = 0; i < items.length; i++) {
21200
+ this[i] = items[i];
21201
+ }
21202
+ this.refresh();
21203
+ const t = items["total"];
21204
+ if (t) {
21205
+ this.total = t;
21206
+ }
21207
+ if (start !== undefined) {
21208
+ this.start = start;
21209
+ }
21210
+ if (size !== undefined) {
21211
+ this.size = size;
21212
+ }
21213
+ }
21214
+ insert(i, item) {
21215
+ const n = this.splice(i, 0, item);
21216
+ AtomBinder.invokeItemsEvent(this, "add", i, item);
21217
+ AtomBinder.refreshValue(this, "length");
21218
+ }
21219
+ set(i, item) {
21220
+ const old = this[i];
21221
+ this[i] = item;
21222
+ AtomBinder.invokeItemsEvent(this, "replace", i, item, old);
21223
+ AtomBinder.refreshValue(this, "length");
21224
+ }
21225
+ removeAt(i) {
21226
+ const item = this[i];
21227
+ this.splice(i, 1);
21228
+ AtomBinder.invokeItemsEvent(this, "remove", i, item);
21229
+ AtomBinder.refreshValue(this, "length");
21230
+ return item;
21231
+ }
21232
+ remove(item) {
21233
+ if (item instanceof Function) {
21234
+ let removed = false;
21235
+ for (let index = 0; index < this.length;) {
21236
+ const it = this[index];
21237
+ if (item(it)) {
21238
+ this.splice(index, 1);
21239
+ AtomBinder.invokeItemsEvent(this, "remove", index, it);
21240
+ AtomBinder.refreshValue(this, "length");
21241
+ removed = true;
21242
+ continue;
21243
+ }
21244
+ index++;
21245
+ }
21246
+ return removed;
21247
+ }
21248
+ const n = this.indexOf(item);
21249
+ if (n !== -1) {
21250
+ this.removeAt(n);
21251
+ return true;
21252
+ }
21253
+ return false;
21254
+ }
21255
+ clear() {
21256
+ this.length = 0;
21257
+ this.refresh();
21258
+ }
21259
+ refresh() {
21260
+ AtomBinder.invokeItemsEvent(this, "refresh", -1, null);
21261
+ AtomBinder.refreshValue(this, "length");
21262
+ }
21263
+ watch(f, wrap) {
21264
+ if (wrap) {
21265
+ const fx = f;
21266
+ f = function () {
21267
+ const p = [];
21268
+ for (let i = 0; i < arguments.length; i++) {
21269
+ const iterator = arguments[i];
21270
+ p.push(iterator);
21271
+ }
21272
+ return fx.call(this, p);
21273
+ };
21274
+ }
21275
+ return AtomBinder.add_CollectionChanged(this, f);
21276
+ }
21277
+ count(f) {
21278
+ let total = 0;
21279
+ for (const iterator of this) {
21280
+ if (f(iterator)) {
21281
+ total++;
21282
+ }
21283
+ }
21284
+ return total;
21285
+ }
21286
+ avg(f) {
21287
+ if (!this.length) {
21288
+ return 0;
21289
+ }
21290
+ let sum = 0;
21291
+ for (const iterator of this) {
21292
+ sum += f(iterator);
21293
+ }
21294
+ return sum / this.length;
21295
+ }
21296
+ includes(item) {
21297
+ return this.indexOf(item) !== -1;
21298
+ }
21114
21299
  });
21300
+ ap = Array.prototype;
21301
+ for (const key of Object.getOwnPropertyNames(AtomList.prototype)) {
21302
+ const {
21303
+ value
21304
+ } = Object.getOwnPropertyDescriptor(AtomList.prototype, key);
21305
+ switch (key) {
21306
+ case "add":
21307
+ case "addAll":
21308
+ case "clear":
21309
+ case "refresh":
21310
+ case "set":
21311
+ case "remove":
21312
+ case "removeAt":
21313
+ case "watch":
21314
+ case "replace":
21315
+ case "insert":
21316
+ case "count":
21317
+ case "avg":
21318
+ case "includes":
21319
+ if (key in ap) {
21320
+ continue;
21321
+ }
21322
+ Object.defineProperty(ap, key, {
21323
+ enumerable: false,
21324
+ value,
21325
+ configurable: true,
21326
+ writable: true
21327
+ });
21328
+ continue;
21329
+ }
21330
+ }
21115
21331
  }
21116
21332
  };
21117
21333
  });
21118
- //# sourceMappingURL=TestMode.js.map
21334
+ //# sourceMappingURL=AtomList.js.map
21119
21335
 
21120
- AmdLoader.instance.setup("@social-mail/social-mail-client/dist/common/TestMode");
21336
+ AmdLoader.instance.setup("@web-atoms/core/dist/core/AtomList");
21121
21337
 
21122
- System.register(["@web-atoms/core/dist/style/styled", "../../../common/TestMode"], function (_export, _context) {
21338
+ System.register(["@web-atoms/core/dist/style/styled"], function (_export, _context) {
21123
21339
  "use strict";
21124
21340
 
21125
- var styled, AppLocation, channelViewStyle;
21341
+ var styled;
21126
21342
  return {
21127
21343
  setters: [function (_webAtomsCoreDistStyleStyled) {
21128
21344
  styled = _webAtomsCoreDistStyleStyled.default;
21129
- }, function (_commonTestMode) {
21130
- AppLocation = _commonTestMode.AppLocation;
21131
21345
  }],
21132
21346
  execute: function () {
21133
21347
  styled.css`
21134
21348
 
21135
- box-sizing: border-box;
21136
-
21137
- & > header {
21349
+ div[data-desktop-app=desktop-app] {
21350
+ width: 100%;
21351
+ }
21138
21352
 
21139
- }
21353
+ /* div[data-base-page=base-page] {
21354
+ & > [data-page-element=title] {
21355
+ overflow-y: visible;
21356
+ }
21357
+ } */
21140
21358
 
21141
- & button[data-element=engage] {
21142
- margin:0;
21143
- border: none;
21144
- outline: none;
21145
- background: transparent;
21146
- cursor: pointer;
21147
- & > img {
21148
- max-height: 20px;
21149
- height: 20px;
21150
- pointer-events: none;
21359
+ `.withId("default-app-style").withOrder("medium").installGlobal();
21151
21360
  }
21152
- }
21153
-
21361
+ };
21362
+ });
21363
+ //# sourceMappingURL=OverrideAppStyle.js.map
21364
+
21365
+ AmdLoader.instance.setup("@social-mail/social-mail-client/dist/style/OverrideAppStyle");
21366
+
21367
+
21368
+ System.register([], function(_export, _context) {
21369
+ return {
21370
+ setters: [],
21371
+ execute: function() {
21372
+
21373
+ // this is because in web atoms loader
21374
+ // root url may not be set when the module is registered
21375
+ setTimeout(() => {
21376
+
21377
+ const cssModule = _context.meta.resolve("./data-styles.css");
21378
+ const cssURL = System.resolve(cssModule);
21379
+
21380
+ const link = document.createElement("link");
21381
+ link.id = "data-styles";
21382
+ link.setAttribute("href", cssURL);
21383
+ link.setAttribute("rel", "stylesheet");
21384
+ link.setAttribute("as", "style");
21385
+ link.setAttribute("crossorigin", "anonymous");
21386
+ const head = document.head;
21387
+ const firstElementChild = head.firstElementChild;
21388
+ if (firstElementChild) {
21389
+ head.insertBefore(link, firstElementChild);
21390
+ } else {
21391
+ head.appendChild(link);
21392
+ }
21393
+ }, 1);
21394
+ }
21395
+ };
21396
+ });
21397
+
21398
+
21399
+ AmdLoader.instance.setup("@web-atoms/data-styles/data-styles");
21400
+
21401
+ System.register(["@web-atoms/core/dist/core/types", "@web-atoms/core/dist/core/AtomList", "./OverrideAppStyle", "@web-atoms/core/dist/style/styled", "@web-atoms/data-styles/data-styles"], function (_export, _context) {
21402
+ "use strict";
21403
+
21404
+ var UMD, styled, ___UMD;
21405
+ function addLinkTag(href, integrity, rel = "stylesheet") {
21406
+ if (!document.head.querySelector(`[href="${href}"]`)) {
21407
+ const fa = document.createElement("link");
21408
+ fa.href = href;
21409
+ fa.crossOrigin = "anonymous";
21410
+ fa.as = "style";
21411
+ fa.rel = "preload";
21412
+ if (integrity) {
21413
+ fa.integrity = integrity;
21414
+ }
21415
+ fa.onload = () => {
21416
+ fa.onload = null;
21417
+ fa.rel = rel;
21418
+ };
21419
+ document.head.insertBefore(fa, document.head.firstElementChild);
21420
+ }
21421
+ }
21422
+ return {
21423
+ setters: [function (_webAtomsCoreDistCoreTypes) {
21424
+ UMD = _webAtomsCoreDistCoreTypes.UMD;
21425
+ }, function (_webAtomsCoreDistCoreAtomList) {}, function (_OverrideAppStyle) {}, function (_webAtomsCoreDistStyleStyled) {
21426
+ styled = _webAtomsCoreDistStyleStyled.default;
21427
+ }, function (_webAtomsDataStylesDataStyles) {}],
21428
+ execute: function () {
21429
+ _export("___UMD", ___UMD = UMD);
21430
+ addLinkTag("https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&display=swap");
21431
+ addLinkTag("https://npm-git.azureedge.net/npm/package/@c8private/fa-icons@6.5.2/css/all.min.css");
21432
+ addLinkTag("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0");
21433
+ addLinkTag("https://cdn.jsdelivr.net/npm/file-icon-vectors@1.0.0/dist/file-icon-vivid.min.css");
21434
+ styled.css`
21435
+
21436
+ :root {
21437
+ --primary-color: #294D4A;
21438
+ --accent-color: #ff6733;
21439
+ --accent2-color: #ff673375;
21440
+ --lighter-accent-color: #e6e6fa60;
21441
+ --light-accent-color: #f2e5fa;
21442
+ --accent-text-color: white;
21443
+ --background-color: #f1f1f160;
21444
+ --window-background: #50505025;
21445
+ --media-bg-color: #9F33FF0F;
21446
+ --font-size-small: 0.8125em;
21447
+
21448
+ --hover-color: #b8b88b20;
21449
+ --command-bg-color: #50505025;
21450
+ --hover-text-color: CanvasText;
21451
+ --selection-color: #b8b88b60;
21452
+ --selection-text-color: CanvasText;
21453
+ --spacing: 5px;
21454
+ --spacing-medium: 7px;
21455
+ --spacing-large: 10px;
21456
+ }
21457
+
21458
+ html, body {
21459
+ margin:0;
21460
+ }
21461
+
21462
+ * {
21463
+ scrollbar-width: thin;
21464
+ scrollbar-color: var(--accent-color) white;
21465
+ }
21466
+
21467
+
21468
+ ::-webkit-scrollbar {
21469
+ width: 5px;
21470
+ }
21471
+ ::-webkit-scrollbar-track {
21472
+ background: white;
21473
+ border-radius: 20px;
21474
+ }
21475
+ ::-webkit-scrollbar-thumb {
21476
+ background: var(--accent-color);
21477
+ border-radius: 20px;
21478
+ }
21479
+
21480
+ body {
21481
+ font-family: trebuchet ms, "Source Sans Pro";
21482
+ font-size: 16px;
21483
+ justify-content: stretch;
21484
+
21485
+ & * {
21486
+ font-family: trebuchet ms, "Source Sans Pro";
21487
+ box-sizing: border-box;
21488
+ }
21489
+
21490
+ &::placeholder {
21491
+ font-size: smaller;
21492
+ }
21493
+
21494
+ & ul {
21495
+ padding-inline-start: 15px;
21496
+ }
21497
+
21498
+ & input[type=search] {
21499
+ border: none;
21500
+ outline: none;
21501
+ border-radius: 9999px;
21502
+ padding-right: 10px;
21503
+ padding-left: 25px;
21504
+ background: canvas url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' class='bi bi-search' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'%3E%3C/path%3E%3C/svg%3E") no-repeat 5px center;
21505
+ }
21506
+ }
21507
+
21508
+ `.withId("global-styles").withOrder("medium").installGlobal();
21509
+ }
21510
+ };
21511
+ });
21512
+ //# sourceMappingURL=GlobalStyle.js.map
21513
+
21514
+ AmdLoader.instance.setup("@social-mail/social-mail-client/dist/style/GlobalStyle");
21515
+
21516
+ System.register([], function (_export, _context) {
21517
+ "use strict";
21518
+
21519
+ var AppLocation;
21520
+ return {
21521
+ setters: [],
21522
+ execute: function () {
21523
+ _export("AppLocation", AppLocation = {
21524
+ isLocalTesting: /\d+\.\d+\.\d+\.\d+/.test(location.hostname)
21525
+ });
21526
+ }
21527
+ };
21528
+ });
21529
+ //# sourceMappingURL=TestMode.js.map
21530
+
21531
+ AmdLoader.instance.setup("@social-mail/social-mail-client/dist/common/TestMode");
21532
+
21533
+ System.register(["@web-atoms/core/dist/style/styled", "../../../common/TestMode"], function (_export, _context) {
21534
+ "use strict";
21535
+
21536
+ var styled, AppLocation, channelViewStyle;
21537
+ return {
21538
+ setters: [function (_webAtomsCoreDistStyleStyled) {
21539
+ styled = _webAtomsCoreDistStyleStyled.default;
21540
+ }, function (_commonTestMode) {
21541
+ AppLocation = _commonTestMode.AppLocation;
21542
+ }],
21543
+ execute: function () {
21544
+ styled.css`
21545
+
21546
+ box-sizing: border-box;
21547
+
21548
+ & > header {
21549
+
21550
+ }
21551
+
21552
+ & button[data-element=engage] {
21553
+ margin:0;
21554
+ border: none;
21555
+ outline: none;
21556
+ background: transparent;
21557
+ cursor: pointer;
21558
+ & > img {
21559
+ max-height: 20px;
21560
+ height: 20px;
21561
+ pointer-events: none;
21562
+ }
21563
+ }
21564
+
21154
21565
  & section[data-element=blog-item] {
21155
21566
  margin: 10px;
21156
- border: solid 1px lightgray;
21157
- border-radius: 10px;
21567
+ border-right: solid 1px lightgray;
21158
21568
  display: grid;
21159
- grid-template-columns: 1fr auto auto;
21160
- grid-template-rows: auto 1fr auto auto;
21161
-
21162
- background-color: gray;
21569
+ grid-template-columns: 1fr auto;
21570
+ grid-template-rows: auto auto 1fr auto auto;
21163
21571
 
21164
21572
  & video, & img {
21165
21573
  max-width: 100%;
@@ -21170,46 +21578,61 @@ box-sizing: border-box;
21170
21578
  color: canvastext;
21171
21579
  }
21172
21580
 
21581
+ & [data-fade=bottom] {
21582
+ position: relative;
21583
+ max-height: 200px;
21584
+ overflow: hidden;
21585
+ &:after {
21586
+ position: absolute;
21587
+ left: 0;
21588
+ right: 0;
21589
+ top: 0;
21590
+ bottom: 0;
21591
+ content: "";
21592
+ margin: 0;
21593
+ pointer-events: none;
21594
+ background: linear-gradient(to top, rgba(255, 255, 255, 1) 1px, rgba(255, 255, 255, 0) 32px);
21595
+ }
21596
+ }
21597
+
21173
21598
  & > h4 {
21174
21599
  grid-row: 1;
21175
- grid-column: 1;
21600
+ grid-column: 1 / span 2;
21176
21601
  margin-block-start: 0;
21177
21602
  margin-block-end: 0;
21178
21603
  padding: 10px;
21179
21604
  & > a {
21180
21605
  text-decoration: none;
21181
- color: white;
21182
21606
  &:hover {
21183
21607
  text-decoration: underline;
21184
- color: #73ff73;
21185
21608
  }
21186
21609
  }
21187
21610
  }
21188
21611
 
21189
21612
  & > h5 {
21190
- grid-row: 1;
21191
- grid-column: 2;
21613
+ grid-row: 2;
21614
+ grid-column: 1;
21192
21615
  margin-block-start: 0;
21193
21616
  margin-block-end: 0;
21194
21617
  padding: 10px;
21195
21618
  }
21196
21619
  & > h6 {
21197
- grid-row: 1;
21198
- grid-column: 3;
21620
+ grid-row: 2;
21621
+ grid-column: 2;
21199
21622
  margin-block-start: 0;
21200
21623
  margin-block-end: 0;
21201
21624
  padding: 10px;
21202
21625
  }
21203
21626
  & > section {
21204
21627
  padding: 10px;
21205
- grid-row: 2;
21628
+ grid-row: 3;
21206
21629
  grid-column: 1 / span 3;
21207
21630
  background-color: canvas;
21208
21631
  color: canvastext;
21209
21632
  }
21210
21633
  & > footer {
21211
21634
  padding: 10px;
21212
- grid-row: 3;
21635
+ grid-row: 5;
21213
21636
  grid-column: 1/ span 3;
21214
21637
  background-color: canvas;
21215
21638
  color: canvastext;
@@ -21276,7 +21699,7 @@ gap: 5px;
21276
21699
  & > aside {
21277
21700
  grid-row: 2;
21278
21701
  grid-column: 2;
21279
- justify-self: center;
21702
+ justify-self: stretch;
21280
21703
  align-self: start;
21281
21704
  display: flex;
21282
21705
  flex-direction: column;
@@ -23865,36 +24288,99 @@ System.register(["@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/servic
23865
24288
 
23866
24289
  AmdLoader.instance.setup("@social-mail/social-mail-client/dist/common/controls/buttons/CopyIcon");
23867
24290
 
23868
- System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atoms/web-controls/dist/basic/AtomRepeater", "../../../services/EntityService", "../../../model/model", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/style/styled"], function (_export, _context) {
24291
+ System.register(["../../common/TestMode"], function (_export, _context) {
23869
24292
  "use strict";
23870
24293
 
23871
- var __awaiter, __decorate, __metadata, InjectProperty, AtomRepeater, EntityService, MailboxTag, XNode, styled, TagCloud;
23872
- _export("default", void 0);
24294
+ var AppLocation, UrlService;
23873
24295
  return {
23874
- setters: [function (_tslib) {
23875
- __awaiter = _tslib.__awaiter;
23876
- __decorate = _tslib.__decorate;
23877
- __metadata = _tslib.__metadata;
23878
- }, function (_webAtomsCoreDistCoreInjectProperty) {
23879
- InjectProperty = _webAtomsCoreDistCoreInjectProperty.default;
23880
- }, function (_webAtomsWebControlsDistBasicAtomRepeater) {
23881
- AtomRepeater = _webAtomsWebControlsDistBasicAtomRepeater.default;
23882
- }, function (_servicesEntityService) {
23883
- EntityService = _servicesEntityService.default;
23884
- }, function (_modelModel) {
23885
- MailboxTag = _modelModel.MailboxTag;
23886
- }, function (_webAtomsCoreDistCoreXNode) {
23887
- XNode = _webAtomsCoreDistCoreXNode.default;
23888
- }, function (_webAtomsCoreDistStyleStyled) {
23889
- styled = _webAtomsCoreDistStyleStyled.default;
24296
+ setters: [function (_commonTestMode) {
24297
+ AppLocation = _commonTestMode.AppLocation;
23890
24298
  }],
23891
24299
  execute: function () {
23892
- styled.css`
23893
- display: flex;
23894
- flex-direction: row;
23895
- flex-wrap: wrap;
23896
- gap: 10px;
23897
-
24300
+ _export("UrlService", UrlService = {
24301
+ toBlogUrl({
24302
+ mailboxID,
24303
+ emailID,
24304
+ email: {
24305
+ subject
24306
+ } = {}
24307
+ }) {
24308
+ subject || (subject = "");
24309
+ if (subject.length > 400) {
24310
+ subject = subject.substring(0, 400);
24311
+ }
24312
+ subject = subject.replace(/[^\p{L}\p{N}]+/ug, "-");
24313
+ subject = encodeURIComponent(subject).replace(/\%20/g, "-");
24314
+ const cid = BigInt(mailboxID).toString(36);
24315
+ const eid = BigInt(emailID).toString(36);
24316
+ if (AppLocation.isLocalTesting) {
24317
+ return `?detail=true&p0=${cid}&p1=p&p2=${eid}`;
24318
+ }
24319
+ return `/channels/${cid}/p/${eid}/${subject}`;
24320
+ },
24321
+ toTagUrl({
24322
+ mailboxID,
24323
+ tagID,
24324
+ tag: {
24325
+ name
24326
+ } = {}
24327
+ }) {
24328
+ const cid = BigInt(mailboxID).toString(36);
24329
+ const eid = BigInt(tagID).toString(36);
24330
+ if (AppLocation.isLocalTesting) {
24331
+ return `?detail=true&p0=${cid}&p1=t&p2=${eid}`;
24332
+ }
24333
+ name || (name = "");
24334
+ if (name.length > 400) {
24335
+ name = name.substring(0, 400);
24336
+ }
24337
+ name = name.replace(/[^\p{L}\p{N}]+/ug, "-");
24338
+ name = encodeURIComponent(name).replace(/\%20/g, "-");
24339
+ return `/channels/${cid}/t/${eid}/${name}`;
24340
+ }
24341
+ });
24342
+ }
24343
+ };
24344
+ });
24345
+ //# sourceMappingURL=UrlService.js.map
24346
+
24347
+ AmdLoader.instance.setup("@social-mail/social-mail-client/dist/public/channel/UrlService");
24348
+
24349
+ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atoms/web-controls/dist/basic/AtomRepeater", "../../../services/EntityService", "../../../model/model", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/style/styled", "../UrlService", "../../../common/cache/CacheTTL"], function (_export, _context) {
24350
+ "use strict";
24351
+
24352
+ var __awaiter, __decorate, __metadata, InjectProperty, AtomRepeater, EntityService, MailboxTag, XNode, styled, UrlService, CacheTTL, TagCloud, cacheVersion;
24353
+ _export("default", void 0);
24354
+ return {
24355
+ setters: [function (_tslib) {
24356
+ __awaiter = _tslib.__awaiter;
24357
+ __decorate = _tslib.__decorate;
24358
+ __metadata = _tslib.__metadata;
24359
+ }, function (_webAtomsCoreDistCoreInjectProperty) {
24360
+ InjectProperty = _webAtomsCoreDistCoreInjectProperty.default;
24361
+ }, function (_webAtomsWebControlsDistBasicAtomRepeater) {
24362
+ AtomRepeater = _webAtomsWebControlsDistBasicAtomRepeater.default;
24363
+ }, function (_servicesEntityService) {
24364
+ EntityService = _servicesEntityService.default;
24365
+ }, function (_modelModel) {
24366
+ MailboxTag = _modelModel.MailboxTag;
24367
+ }, function (_webAtomsCoreDistCoreXNode) {
24368
+ XNode = _webAtomsCoreDistCoreXNode.default;
24369
+ }, function (_webAtomsCoreDistStyleStyled) {
24370
+ styled = _webAtomsCoreDistStyleStyled.default;
24371
+ }, function (_UrlService) {
24372
+ UrlService = _UrlService.UrlService;
24373
+ }, function (_commonCacheCacheTTL) {
24374
+ CacheTTL = _commonCacheCacheTTL.CacheTTL;
24375
+ }],
24376
+ execute: function () {
24377
+ cacheVersion = "1a";
24378
+ styled.css`
24379
+ display: flex;
24380
+ flex-direction: row;
24381
+ flex-wrap: wrap;
24382
+ gap: 10px;
24383
+
23898
24384
  & > header {
23899
24385
  display: block;
23900
24386
  flex: 1 1 100%;
@@ -23903,6 +24389,13 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
23903
24389
  padding: 5px;
23904
24390
  }
23905
24391
 
24392
+ & a {
24393
+ text-decoration: none;
24394
+ &:hover {
24395
+ text-decoration: underline;
24396
+ }
24397
+ }
24398
+
23906
24399
  `.installGlobal("tag-cloud");
23907
24400
  _export("default", TagCloud = class TagCloud extends AtomRepeater {
23908
24401
  constructor(app, e = document.createElement("tag-cloud")) {
@@ -23911,12 +24404,13 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
23911
24404
  }
23912
24405
  init() {
23913
24406
  return __awaiter(this, void 0, void 0, function* () {
23914
- this.header = true;
23915
- this.headerRenderer = () => XNode.create("header", null, "Tags");
23916
24407
  const tags = yield this.entityService.query(MailboxTag, "channelTags").include(x => x.tag).orderByDescending(x => x.count).toPagedList({
23917
- size: 20
24408
+ size: 20,
24409
+ cacheVersion,
24410
+ cacheSeconds: CacheTTL.seconds.fifteenMinutes
23918
24411
  });
23919
24412
  this.itemRenderer = x => XNode.create("a", {
24413
+ href: UrlService.toTagUrl(x),
23920
24414
  text: `# ${x.tag.name}`
23921
24415
  });
23922
24416
  this.items = tags.items;
@@ -23931,42 +24425,10 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
23931
24425
 
23932
24426
  AmdLoader.instance.setup("@social-mail/social-mail-client/dist/public/channel/controls/TagCloud");
23933
24427
 
23934
- System.register(["../../common/TestMode"], function (_export, _context) {
23935
- "use strict";
23936
-
23937
- var AppLocation, UrlService;
23938
- return {
23939
- setters: [function (_commonTestMode) {
23940
- AppLocation = _commonTestMode.AppLocation;
23941
- }],
23942
- execute: function () {
23943
- _export("UrlService", UrlService = {
23944
- toBlogUrl: (channelID, emailID, subject) => {
23945
- subject || (subject = "");
23946
- if (subject.length > 400) {
23947
- subject = subject.substring(0, 400);
23948
- }
23949
- subject = subject.replace(/[^\p{L}\p{N}]+/ug, "-");
23950
- subject = encodeURIComponent(subject).replace(/\%20/g, "-");
23951
- const cid = BigInt(channelID).toString(36);
23952
- const eid = BigInt(emailID).toString(36);
23953
- if (AppLocation.isLocalTesting) {
23954
- return `?detail=true&cid=${cid}&eid=${eid}`;
23955
- }
23956
- return `/channels/${cid}/${eid}/${subject}`;
23957
- }
23958
- });
23959
- }
23960
- };
23961
- });
23962
- //# sourceMappingURL=UrlService.js.map
23963
-
23964
- AmdLoader.instance.setup("@social-mail/social-mail-client/dist/public/channel/UrlService");
23965
-
23966
- System.register(["tslib", "@web-atoms/core/dist/di/Inject", "../../services/EntityService", "@web-atoms/core/dist/di/DISingleton", "../../common/Sql", "../../model/model", "../../common/cache/CacheTTL", "../../common/apiPath"], function (_export, _context) {
24428
+ System.register(["tslib", "@web-atoms/core/dist/di/Inject", "../../services/EntityService", "@web-atoms/core/dist/di/DISingleton", "../../common/Sql", "../../model/model", "../../common/cache/CacheTTL", "../../common/apiPath", "@social-mail/social-mail-client/content/images/svg/logo/logo-orange.svg"], function (_export, _context) {
23967
24429
  "use strict";
23968
24430
 
23969
- var __awaiter, __decorate, __metadata, Inject, EntityService, DISingleton, Sql, AppFile, CacheTTL, apiPath, cacheVersion, cacheSeconds, BlogImageService;
24431
+ var __awaiter, __decorate, __metadata, Inject, EntityService, DISingleton, Sql, AppFile, CacheTTL, apiPath, orangeLogo, cacheVersion, cacheSeconds, BlogImageService;
23970
24432
  return {
23971
24433
  setters: [function (_tslib) {
23972
24434
  __awaiter = _tslib.__awaiter;
@@ -23986,6 +24448,8 @@ System.register(["tslib", "@web-atoms/core/dist/di/Inject", "../../services/Enti
23986
24448
  CacheTTL = _commonCacheCacheTTL.CacheTTL;
23987
24449
  }, function (_commonApiPath) {
23988
24450
  apiPath = _commonApiPath.apiPath;
24451
+ }, function (_socialMailSocialMailClientContentImagesSvgLogoLogoOrangeSvg) {
24452
+ orangeLogo = _socialMailSocialMailClientContentImagesSvgLogoLogoOrangeSvg.default;
23989
24453
  }],
23990
24454
  execute: function () {
23991
24455
  cacheVersion = "1a";
@@ -24007,6 +24471,7 @@ System.register(["tslib", "@web-atoms/core/dist/di/Inject", "../../services/Enti
24007
24471
  if (file) {
24008
24472
  return apiPath(`/api/channel/file/webp(100)/${channelID}/${email.emailID}/${file.appFileID}/${file.name}/${file.name}.100.webp`);
24009
24473
  }
24474
+ return orangeLogo;
24010
24475
  });
24011
24476
  }
24012
24477
  };
@@ -24020,10 +24485,10 @@ System.register(["tslib", "@web-atoms/core/dist/di/Inject", "../../services/Enti
24020
24485
 
24021
24486
  AmdLoader.instance.setup("@social-mail/social-mail-client/dist/public/channel/BlogImageService");
24022
24487
 
24023
- System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atoms/web-controls/dist/basic/AtomRepeater", "../../../services/EntityService", "../../../model/model", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/style/styled", "../UrlService", "@web-atoms/core/dist/core/Bind", "@social-mail/social-mail-client/content/images/gif/loader.gif", "../BlogImageService"], function (_export, _context) {
24488
+ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atoms/web-controls/dist/basic/AtomRepeater", "../../../services/EntityService", "../../../model/model", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/style/styled", "../UrlService", "@web-atoms/core/dist/core/Bind", "@social-mail/social-mail-client/content/images/gif/loader.gif", "../BlogImageService", "../../../common/cache/CacheTTL"], function (_export, _context) {
24024
24489
  "use strict";
24025
24490
 
24026
- var __awaiter, __decorate, __metadata, InjectProperty, AtomRepeater, EntityService, MailboxEmail, XNode, styled, UrlService, Bind, loaderImage, BlogImageService, PostList;
24491
+ var __awaiter, __decorate, __metadata, InjectProperty, AtomRepeater, EntityService, MailboxEmail, XNode, styled, UrlService, Bind, loaderImage, BlogImageService, CacheTTL, PostList, cacheVersion;
24027
24492
  _export("default", void 0);
24028
24493
  return {
24029
24494
  setters: [function (_tslib) {
@@ -24050,8 +24515,11 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
24050
24515
  loaderImage = _socialMailSocialMailClientContentImagesGifLoaderGif.default;
24051
24516
  }, function (_BlogImageService) {
24052
24517
  BlogImageService = _BlogImageService.default;
24518
+ }, function (_commonCacheCacheTTL) {
24519
+ CacheTTL = _commonCacheCacheTTL.CacheTTL;
24053
24520
  }],
24054
24521
  execute: function () {
24522
+ cacheVersion = "1a";
24055
24523
  styled.css`
24056
24524
  display: flex;
24057
24525
  flex-direction: row;
@@ -24061,8 +24529,8 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
24061
24529
  & > header {
24062
24530
  display: block;
24063
24531
  flex: 1 1 100%;
24064
- background-color: var(--accent-color, gray);
24065
- color: var(--accent-text-color, white);
24532
+ color: var(--accent-color, gray);
24533
+ background-color: #cccccc0a;
24066
24534
  padding: 5px;
24067
24535
  }
24068
24536
 
@@ -24074,6 +24542,25 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
24074
24542
  }
24075
24543
  }
24076
24544
 
24545
+ & [data-item-index] {
24546
+ display: grid;
24547
+ grid-template-columns: 50px 1fr;
24548
+ column-gap: 10px;
24549
+ align-items: center;
24550
+ & > img {
24551
+ width: 50px;
24552
+ height: 30px;
24553
+ object-fit: contain;
24554
+ grid-column: 1;
24555
+ }
24556
+ & > a {
24557
+ grid-column: 2;
24558
+ white-space: nowrap;
24559
+ overflow: hidden;
24560
+ text-overflow: ellipsis;
24561
+ }
24562
+ }
24563
+
24077
24564
  `.installGlobal("post-list");
24078
24565
  _export("default", PostList = class PostList extends AtomRepeater {
24079
24566
  constructor(app, e = document.createElement("post-list")) {
@@ -24086,12 +24573,11 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
24086
24573
  this.headerRenderer = text => XNode.create("header", {
24087
24574
  text: text
24088
24575
  });
24089
- this.itemRenderer = x => XNode.create("div", {
24090
- "data-layout": "row"
24091
- }, XNode.create("img", {
24576
+ this.itemRenderer = x => XNode.create("div", null, XNode.create("img", {
24092
24577
  src: Bind.oneTimeAsync(() => this.blogImageService.getImage(x), loaderImage)
24093
24578
  }), XNode.create("a", {
24094
- href: UrlService.toBlogUrl(x.mailboxID, x.emailID, x.email.subject),
24579
+ href: UrlService.toBlogUrl(x),
24580
+ title: x.email.subject,
24095
24581
  target: "_blank",
24096
24582
  text: x.email.subject
24097
24583
  }));
@@ -24105,7 +24591,9 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
24105
24591
  }
24106
24592
  query(q) {
24107
24593
  return q.orderByDescending(x => x.engagementCount).toPagedList({
24108
- size: 5
24594
+ size: 5,
24595
+ cacheVersion,
24596
+ cacheSeconds: CacheTTL.seconds.fifteenMinutes
24109
24597
  });
24110
24598
  }
24111
24599
  });
@@ -24145,259 +24633,64 @@ System.register(["./PostList"], function (_export, _context) {
24145
24633
 
24146
24634
  AmdLoader.instance.setup("@social-mail/social-mail-client/dist/public/channel/controls/RecentPosts");
24147
24635
 
24148
- System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atoms/core/dist/web/controls/AtomControl", "./BlogService", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/view-model/Action", "./emoji/EmojiPopup", "./styles/channelViewStyle", "@web-atoms/core/dist/web/services/PopupService", "@web-atoms/web-controls/dist/basic/AtomRepeater", "./PostView", "../../common/controls/buttons/CopyIcon", "./controls/TagCloud", "./controls/PostList", "./controls/RecentPosts"], function (_export, _context) {
24636
+ System.register(["@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/style/styled"], function (_export, _context) {
24149
24637
  "use strict";
24150
24638
 
24151
- var __awaiter, __decorate, __metadata, InjectProperty, AtomControl, BlogService, XNode, Action, EmojiPopup, PopupService, AtomRepeater, PostView, CopyIcon, TagCloud, PopularPosts, RecentPosts, ChannelMessage, _a, _b, url, channelID, emailID, commentIcon;
24152
- _export("default", void 0);
24639
+ var XNode, styled;
24640
+ function BlogHeader({
24641
+ channel,
24642
+ search
24643
+ }) {
24644
+ return XNode.create("header", {
24645
+ class: "blog-header"
24646
+ }, XNode.create("div", null, XNode.create("span", {
24647
+ text: channel.emailAddress.name
24648
+ }), XNode.create("a", {
24649
+ href: `mailto:subscribe-${channel.emailAddress.emailAddress}?subject=subscribe`
24650
+ }, XNode.create("button", null, "Follow"))), search && XNode.create("div", null, XNode.create("input", {
24651
+ placeholder: "Search...",
24652
+ value: search
24653
+ })));
24654
+ }
24655
+ _export("default", BlogHeader);
24153
24656
  return {
24154
- setters: [function (_tslib) {
24155
- __awaiter = _tslib.__awaiter;
24156
- __decorate = _tslib.__decorate;
24157
- __metadata = _tslib.__metadata;
24158
- }, function (_webAtomsCoreDistCoreInjectProperty) {
24159
- InjectProperty = _webAtomsCoreDistCoreInjectProperty.default;
24160
- }, function (_webAtomsCoreDistWebControlsAtomControl) {
24161
- AtomControl = _webAtomsCoreDistWebControlsAtomControl.AtomControl;
24162
- }, function (_BlogService) {
24163
- BlogService = _BlogService.default;
24164
- }, function (_webAtomsCoreDistCoreXNode) {
24657
+ setters: [function (_webAtomsCoreDistCoreXNode) {
24165
24658
  XNode = _webAtomsCoreDistCoreXNode.default;
24166
- }, function (_webAtomsCoreDistViewModelAction) {
24167
- Action = _webAtomsCoreDistViewModelAction.default;
24168
- }, function (_emojiEmojiPopup) {
24169
- EmojiPopup = _emojiEmojiPopup.default;
24170
- }, function (_stylesChannelViewStyle) {}, function (_webAtomsCoreDistWebServicesPopupService) {
24171
- PopupService = _webAtomsCoreDistWebServicesPopupService.default;
24172
- }, function (_webAtomsWebControlsDistBasicAtomRepeater) {
24173
- AtomRepeater = _webAtomsWebControlsDistBasicAtomRepeater.default;
24174
- }, function (_PostView) {
24175
- PostView = _PostView.default;
24176
- }, function (_commonControlsButtonsCopyIcon) {
24177
- CopyIcon = _commonControlsButtonsCopyIcon.default;
24178
- }, function (_controlsTagCloud) {
24179
- TagCloud = _controlsTagCloud.default;
24180
- }, function (_controlsPostList) {
24181
- PopularPosts = _controlsPostList.default;
24182
- }, function (_controlsRecentPosts) {
24183
- RecentPosts = _controlsRecentPosts.default;
24659
+ }, function (_webAtomsCoreDistStyleStyled) {
24660
+ styled = _webAtomsCoreDistStyleStyled.default;
24184
24661
  }],
24185
24662
  execute: function () {
24186
- url = (_a = window.pageUrl) !== null && _a !== void 0 ? _a : new URL(location.href);
24187
- ({
24188
- 1: channelID = url.searchParams.get("cid"),
24189
- 2: emailID = url.searchParams.get("eid")
24190
- } = (_b = /^\/channels\/([^\/]+)\/([^\/]+)\//.exec(url === null || url === void 0 ? void 0 : url.pathname)) !== null && _b !== void 0 ? _b : {});
24191
- channelID = parseInt(channelID, 36);
24192
- emailID = parseInt(emailID, 36);
24193
- commentIcon = "💬";
24194
- _export("default", ChannelMessage = class ChannelMessage extends AtomControl {
24195
- constructor(app, e = document.createElement("section")) {
24196
- super(app, e);
24197
- this.runAfterInit(() => this.app.runAsync(() => this.init()));
24198
- }
24199
- init() {
24200
- var _a;
24201
- return __awaiter(this, void 0, void 0, function* () {
24202
- const channel = yield this.blogService.getChannel(void 0, channelID, void 0);
24203
- this.channel = channel;
24204
- const email = yield this.blogService.getEmail({
24205
- emailID,
24206
- channelID
24207
- });
24208
- this.email = email;
24209
- const engagements = (_a = email.engagements) !== null && _a !== void 0 ? _a : [];
24210
- this.element.setAttribute("data-blog-list", "blog-list");
24211
- this.element.setAttribute("data-layout", "flex-center");
24212
- this.renderer = XNode.create("section", null, XNode.create("header", null, XNode.create("div", {
24213
- "styler-display": "flex",
24214
- "styler-gap": "size-default"
24215
- }, XNode.create("span", {
24216
- text: channel.emailAddress.name
24217
- }), XNode.create("a", {
24218
- href: `mailto:subscribe-${channel.emailAddress.emailAddress}?subject=subscribe`
24219
- }, XNode.create("button", null, "Follow")))), XNode.create("section", null, XNode.create(AtomRepeater, {
24220
- items: [email],
24221
- itemRenderer: x => XNode.create(PostView, {
24222
- email: x
24223
- })
24224
- })), XNode.create("aside", null, XNode.create(TagCloud, null), XNode.create(PopularPosts, null), XNode.create(RecentPosts, null)), XNode.create("footer", null));
24225
- });
24226
- }
24227
- reactEmail(email, ce) {
24228
- return __awaiter(this, void 0, void 0, function* () {
24229
- const {
24230
- headerMessageID
24231
- } = email;
24232
- const emoji = yield EmojiPopup.showControl(ce.target, {
24233
- parentElement: ce.target
24234
- });
24235
- const {
24236
- channel
24237
- } = this;
24238
- const subject = `${emoji}:${Number(email.emailID).toString(36)}:${headerMessageID}`;
24239
- yield PopupService.alert({
24240
- message: XNode.create("div", {
24241
- "data-layout": "vertical-flex"
24242
- }, "To add your emoji to this post, email just the emoji ", emoji, " with given subject to the channel email address.", XNode.create("div", null, "To: ", channel.emailAddress.emailAddress, " ", XNode.create(CopyIcon, {
24243
- text: channel.emailAddress.emailAddress
24244
- }), " "), XNode.create("div", null, "Subject: ", subject, " ", XNode.create(CopyIcon, {
24245
- text: subject
24246
- })), XNode.create("div", null, "Body: ", emoji, " ", XNode.create(CopyIcon, {
24247
- text: emoji
24248
- })), XNode.create("br", null), XNode.create("div", null, "If you have email client configured, you can click on following link."), XNode.create("div", null, XNode.create("a", {
24249
- href: `mailto:${channel.emailAddress.emailAddress}?subject=${subject}&body=${emoji}&in-reply-to=${headerMessageID}`
24250
- }, "Email Now"))),
24251
- title: "Send Email"
24252
- });
24253
- });
24254
- }
24255
- replyEmail(email, ce) {
24256
- return __awaiter(this, void 0, void 0, function* () {
24257
- const emoji = commentIcon;
24258
- const {
24259
- headerMessageID
24260
- } = email;
24261
- const {
24262
- channel
24263
- } = this;
24264
- const subject = `${emoji}:${Number(email.emailID).toString(36)}:${headerMessageID}`;
24265
- yield PopupService.alert({
24266
- message: XNode.create("div", {
24267
- "data-layout": "vertical-flex"
24268
- }, "To send comment to this post, email us your comment with given subject to the channel email address.", XNode.create("div", null, "To: ", channel.emailAddress.emailAddress, " ", XNode.create(CopyIcon, {
24269
- text: channel.emailAddress.emailAddress
24270
- })), XNode.create("div", null, "Subject: ", subject, " ", XNode.create(CopyIcon, {
24271
- text: subject
24272
- })), XNode.create("br", null), XNode.create("div", null, "If you have email client configured, you can click on following link."), XNode.create("div", null, XNode.create("a", {
24273
- href: `mailto:${channel.emailAddress.emailAddress}?subject=${subject}&in-reply-to=${headerMessageID}`
24274
- }, "Email Now"))),
24275
- title: "Send Email"
24276
- });
24277
- });
24278
- }
24279
- });
24280
- __decorate([InjectProperty, __metadata("design:type", BlogService)], ChannelMessage.prototype, "blogService", void 0);
24281
- __decorate([Action({
24282
- onEvent: "react-email"
24283
- }), __metadata("design:type", Function), __metadata("design:paramtypes", [Object, CustomEvent]), __metadata("design:returntype", Promise)], ChannelMessage.prototype, "reactEmail", null);
24284
- __decorate([Action({
24285
- onEvent: "reply-email"
24286
- }), __metadata("design:type", Function), __metadata("design:paramtypes", [Object, CustomEvent]), __metadata("design:returntype", Promise)], ChannelMessage.prototype, "replyEmail", null);
24663
+ styled.css`
24664
+ display: flex;
24665
+ flex-direction: column;
24666
+ gap: 10px;
24667
+ & > * {
24668
+ display: flex;
24669
+ flex-direction: row;
24670
+ gap: 10px;
24671
+ align-items: center;
24672
+ }
24673
+ `.installGlobal("header.blog-header");
24287
24674
  }
24288
24675
  };
24289
24676
  });
24290
- //# sourceMappingURL=ChannelMessage.js.map
24677
+ //# sourceMappingURL=BlogHeader.js.map
24291
24678
 
24292
- AmdLoader.instance.setup("@social-mail/social-mail-client/dist/public/channel/ChannelMessage");
24679
+ AmdLoader.instance.setup("@social-mail/social-mail-client/dist/public/channel/controls/BlogHeader");
24293
24680
 
24294
- System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/style/styled"], function (_export, _context) {
24681
+ System.register([], function (_export, _context) {
24295
24682
  "use strict";
24296
24683
 
24297
- var __rest, XNode, styled, toggleDetails, setEventHandler;
24298
- function LimitedText(_a, ...nodes) {
24299
- var {
24300
- text = "",
24301
- height = 100
24302
- } = _a,
24303
- a = __rest(_a, ["text", "height"]);
24304
- setEventHandler === null || setEventHandler === void 0 ? void 0 : setEventHandler();
24305
- const h = typeof height === "number" ? `${height}px` : height;
24306
- return XNode.create("div", Object.assign({
24307
- "data-mode": "collapsed",
24308
- "data-max-height": h,
24309
- "style-max-height": h,
24310
- "data-limited-text": "limited-text"
24311
- }, a), text && XNode.create("p", {
24312
- text: text
24313
- }), ...nodes, XNode.create("div", {
24314
- "style-top": h,
24315
- "data-element": "more"
24316
- }, XNode.create("button", {
24317
- class: "fa-solid fa-angles-up"
24318
- })));
24319
- }
24320
- _export("default", LimitedText);
24684
+ function Pack(...a) {}
24685
+ _export("default", Pack);
24321
24686
  return {
24322
- setters: [function (_tslib) {
24323
- __rest = _tslib.__rest;
24324
- }, function (_webAtomsCoreDistCoreXNode) {
24325
- XNode = _webAtomsCoreDistCoreXNode.default;
24326
- }, function (_webAtomsCoreDistStyleStyled) {
24327
- styled = _webAtomsCoreDistStyleStyled.default;
24328
- }],
24329
- execute: function () {
24330
- styled.css`
24331
- position: relative;
24332
- overflow: hidden;
24333
- contain: content;
24687
+ setters: [],
24688
+ execute: function () {}
24689
+ };
24690
+ });
24691
+ //# sourceMappingURL=Pack.js.map
24334
24692
 
24335
- &[data-mode=collapsed] {
24336
- & > [data-element=more] {
24337
- cursor: pointer;
24338
- background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 19%, rgba(255,255,255,1) 65%, rgba(255,255,255,1) 100%);
24339
- & > button {
24340
- transform: rotate(180deg);
24341
- }
24342
- }
24343
- }
24344
-
24345
- & > [data-element=more] {
24346
- display: flex;
24347
- justify-content: flex-end;
24348
- width: 100%;
24349
- right: 0;
24350
- left: 0;
24351
- position: absolute;
24352
- transform: translateY(-100%);
24353
- & > button {
24354
- padding: 1px;
24355
- padding-left: 10px;
24356
- padding-right: 10px;
24357
- border-radius: 9999px;
24358
- border: none;
24359
- outline: none;
24360
- box-shadow: 0 0 6px 6px white;
24361
- transition: transform 0.5s ease-out;
24362
- }
24363
- }
24364
-
24365
- `.installGlobal("[data-limited-text]");
24366
- toggleDetails = e => {
24367
- let start = e.target;
24368
- if (e.defaultPrevented) {
24369
- return;
24370
- }
24371
- start = start.parentElement;
24372
- const container = start;
24373
- start = start === null || start === void 0 ? void 0 : start.parentElement;
24374
- if (!start || start.getAttribute("data-limited-text") !== "limited-text") {
24375
- return;
24376
- }
24377
- e.preventDefault();
24378
- e.stopImmediatePropagation();
24379
- e.stopPropagation();
24380
- if (start.getAttribute("data-mode") === "collapsed") {
24381
- start.setAttribute("data-mode", "open");
24382
- start.style.maxHeight = "";
24383
- container.style.top = "";
24384
- } else {
24385
- const h = start.getAttribute("data-max-height");
24386
- start.style.maxHeight = h;
24387
- container.style.top = h;
24388
- start.setAttribute("data-mode", "collapsed");
24389
- }
24390
- };
24391
- setEventHandler = () => {
24392
- document.body.addEventListener("click", toggleDetails);
24393
- setEventHandler = null;
24394
- };
24395
- }
24396
- };
24397
- });
24398
- //# sourceMappingURL=LimitedText.js.map
24399
-
24400
- AmdLoader.instance.setup("@web-atoms/web-controls/dist/basic/LimitedText");
24693
+ AmdLoader.instance.setup("@web-atoms/core/dist/Pack");
24401
24694
 
24402
24695
  System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dist/core/types", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/style/styled", "@web-atoms/core/dist/web/controls/AtomControl"], function (_export, _context) {
24403
24696
  "use strict";
@@ -24531,569 +24824,294 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
24531
24824
 
24532
24825
  AmdLoader.instance.setup("@social-mail/social-mail-client/dist/common/controls/repeater/InfiniteRepeater");
24533
24826
 
24534
- System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dist/core/InjectProperty", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/web/controls/AtomControl", "@web-atoms/web-controls/dist/basic/AtomRepeater", "@web-atoms/web-controls/dist/basic/LimitedText", "../../common/controls/repeater/InfiniteRepeater", "../../common/date/DateFormats", "../../web/page/mails/service/ConversationService", "./BlogService", "./styles/channelViewStyle", "./UrlService", "./controls/TagCloud", "./controls/PostList", "./controls/RecentPosts"], function (_export, _context) {
24827
+ System.register(["@web-atoms/core/dist/core/XNode", "../../common/date/DateFormats", "../../web/page/mails/service/ConversationService", "./UrlService"], function (_export, _context) {
24535
24828
  "use strict";
24536
24829
 
24537
- var __awaiter, __decorate, __metadata, Bind, InjectProperty, XNode, AtomControl, AtomRepeater, LimitedText, InfiniteRepeater, DateFormats, renderMail, BlogService, UrlService, TagCloud, PopularPosts, RecentPosts, ChannelView;
24538
- _export("default", void 0);
24830
+ var XNode, DateFormats, renderMail, UrlService, commentIcon;
24831
+ function PostSummary({
24832
+ mailboxEmail = void 0,
24833
+ itemPath = void 0
24834
+ }) {
24835
+ const {
24836
+ mailboxID,
24837
+ email
24838
+ } = mailboxEmail;
24839
+ const {
24840
+ engagements = []
24841
+ } = email;
24842
+ const isComment = email.parentID !== null;
24843
+ return XNode.create("section", {
24844
+ "data-element": "blog-item",
24845
+ "data-comment": isComment,
24846
+ "data-item-path": itemPath
24847
+ }, XNode.create("h4", {
24848
+ "data-element": "title"
24849
+ }, XNode.create("a", {
24850
+ href: UrlService.toBlogUrl(mailboxEmail),
24851
+ text: isComment ? email.senderName : email.subject
24852
+ })), XNode.create("h6", {
24853
+ "data-element": "date",
24854
+ text: DateFormats.relative.short(email.dateSent)
24855
+ }), !isComment && XNode.create("h5", {
24856
+ text: email.senderName
24857
+ }), XNode.create("section", {
24858
+ "data-element": "content",
24859
+ "data-fade": "bottom"
24860
+ }, !email.parentID ? XNode.create("section", Object.assign({}, renderMail({
24861
+ email
24862
+ }))) : XNode.create("section", {
24863
+ text: email.textBody
24864
+ })), XNode.create("footer", null, ...engagements.map(x => XNode.create("span", {
24865
+ "data-click-event": x.engagement === commentIcon ? "view-comments" : "none",
24866
+ "data-element": "engagements",
24867
+ title: `View all ${x.engagement} ${x.count}`,
24868
+ text: `${x.engagement} ${x.count}`
24869
+ }))));
24870
+ }
24871
+ _export("default", PostSummary);
24872
+ return {
24873
+ setters: [function (_webAtomsCoreDistCoreXNode) {
24874
+ XNode = _webAtomsCoreDistCoreXNode.default;
24875
+ }, function (_commonDateDateFormats) {
24876
+ DateFormats = _commonDateDateFormats.DateFormats;
24877
+ }, function (_webPageMailsServiceConversationService) {
24878
+ renderMail = _webPageMailsServiceConversationService.renderMail;
24879
+ }, function (_UrlService) {
24880
+ UrlService = _UrlService.UrlService;
24881
+ }],
24882
+ execute: function () {
24883
+ commentIcon = "💬";
24884
+ }
24885
+ };
24886
+ });
24887
+ //# sourceMappingURL=PostSummary.js.map
24888
+
24889
+ AmdLoader.instance.setup("@social-mail/social-mail-client/dist/public/channel/PostSummary");
24890
+
24891
+ System.register([], function (_export, _context) {
24892
+ "use strict";
24893
+
24894
+ var Base36, toBase36, parseBigInt;
24895
+ _export("Base36", void 0);
24896
+ return {
24897
+ setters: [],
24898
+ execute: function () {
24899
+ _export("toBase36", toBase36 = n => BigInt(n).toString(36));
24900
+ parseBigInt = (numberString, throwOnFail = true) => {
24901
+ if (!numberString) {
24902
+ return;
24903
+ }
24904
+ if (numberString.startsWith("$")) {
24905
+ return;
24906
+ }
24907
+ const keySpace = "0123456789abcdefghijklmnopqrstuvwxyz";
24908
+ let result = BigInt(0);
24909
+ const keySpaceLength = BigInt(keySpace.length);
24910
+ for (const iterator of numberString) {
24911
+ const value = keySpace.indexOf(iterator);
24912
+ if (value === -1) {
24913
+ if (throwOnFail) {
24914
+ throw new Error("invalid string");
24915
+ }
24916
+ return;
24917
+ }
24918
+ result = result * keySpaceLength + BigInt(value);
24919
+ }
24920
+ return result;
24921
+ };
24922
+ _export("Base36", Base36 = class Base36 {
24923
+ static encode(n) {
24924
+ return BigInt(n).toString(36);
24925
+ }
24926
+ static decode(n, throwOnFail = true) {
24927
+ var _a;
24928
+ return (_a = parseBigInt(n, throwOnFail)) === null || _a === void 0 ? void 0 : _a.toString();
24929
+ }
24930
+ });
24931
+ }
24932
+ };
24933
+ });
24934
+ //# sourceMappingURL=toBase36.js.map
24935
+
24936
+ AmdLoader.instance.setup("@social-mail/social-mail-client/dist/common/toBase36");
24937
+
24938
+ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atoms/core/dist/web/controls/AtomControl", "./BlogService", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/view-model/Action", "./emoji/EmojiPopup", "../../style/GlobalStyle", "./styles/channelViewStyle", "@web-atoms/core/dist/web/services/PopupService", "@web-atoms/web-controls/dist/basic/AtomRepeater", "./PostView", "../../common/controls/buttons/CopyIcon", "./controls/TagCloud", "./controls/PostList", "./controls/RecentPosts", "./controls/BlogHeader", "@web-atoms/core/dist/Pack", "../../common/controls/repeater/InfiniteRepeater", "@web-atoms/core/dist/core/Bind", "./PostSummary", "../../common/toBase36"], function (_export, _context) {
24939
+ "use strict";
24940
+
24941
+ var __awaiter, __decorate, __metadata, InjectProperty, AtomControl, BlogService, XNode, Action, EmojiPopup, PopupService, AtomRepeater, PostView, CopyIcon, TagCloud, PopularPosts, RecentPosts, BlogHeader, Pack, InfiniteRepeater, Bind, PostSummary, Base36, _a, _b, url, channelID, type, p2, emailID, commentIcon, ChannelMessage;
24539
24942
  return {
24540
24943
  setters: [function (_tslib) {
24541
24944
  __awaiter = _tslib.__awaiter;
24542
24945
  __decorate = _tslib.__decorate;
24543
24946
  __metadata = _tslib.__metadata;
24544
- }, function (_webAtomsCoreDistCoreBind) {
24545
- Bind = _webAtomsCoreDistCoreBind.default;
24546
24947
  }, function (_webAtomsCoreDistCoreInjectProperty) {
24547
24948
  InjectProperty = _webAtomsCoreDistCoreInjectProperty.default;
24548
- }, function (_webAtomsCoreDistCoreXNode) {
24549
- XNode = _webAtomsCoreDistCoreXNode.default;
24550
24949
  }, function (_webAtomsCoreDistWebControlsAtomControl) {
24551
24950
  AtomControl = _webAtomsCoreDistWebControlsAtomControl.AtomControl;
24552
- }, function (_webAtomsWebControlsDistBasicAtomRepeater) {
24553
- AtomRepeater = _webAtomsWebControlsDistBasicAtomRepeater.default;
24554
- }, function (_webAtomsWebControlsDistBasicLimitedText) {
24555
- LimitedText = _webAtomsWebControlsDistBasicLimitedText.default;
24556
- }, function (_commonControlsRepeaterInfiniteRepeater) {
24557
- InfiniteRepeater = _commonControlsRepeaterInfiniteRepeater.default;
24558
- }, function (_commonDateDateFormats) {
24559
- DateFormats = _commonDateDateFormats.DateFormats;
24560
- }, function (_webPageMailsServiceConversationService) {
24561
- renderMail = _webPageMailsServiceConversationService.renderMail;
24562
24951
  }, function (_BlogService) {
24563
24952
  BlogService = _BlogService.default;
24564
- }, function (_stylesChannelViewStyle) {}, function (_UrlService) {
24565
- UrlService = _UrlService.UrlService;
24953
+ }, function (_webAtomsCoreDistCoreXNode) {
24954
+ XNode = _webAtomsCoreDistCoreXNode.default;
24955
+ }, function (_webAtomsCoreDistViewModelAction) {
24956
+ Action = _webAtomsCoreDistViewModelAction.default;
24957
+ }, function (_emojiEmojiPopup) {
24958
+ EmojiPopup = _emojiEmojiPopup.default;
24959
+ }, function (_styleGlobalStyle) {}, function (_stylesChannelViewStyle) {}, function (_webAtomsCoreDistWebServicesPopupService) {
24960
+ PopupService = _webAtomsCoreDistWebServicesPopupService.default;
24961
+ }, function (_webAtomsWebControlsDistBasicAtomRepeater) {
24962
+ AtomRepeater = _webAtomsWebControlsDistBasicAtomRepeater.default;
24963
+ }, function (_PostView) {
24964
+ PostView = _PostView.default;
24965
+ }, function (_commonControlsButtonsCopyIcon) {
24966
+ CopyIcon = _commonControlsButtonsCopyIcon.default;
24566
24967
  }, function (_controlsTagCloud) {
24567
24968
  TagCloud = _controlsTagCloud.default;
24568
24969
  }, function (_controlsPostList) {
24569
24970
  PopularPosts = _controlsPostList.default;
24570
24971
  }, function (_controlsRecentPosts) {
24571
24972
  RecentPosts = _controlsRecentPosts.default;
24973
+ }, function (_controlsBlogHeader) {
24974
+ BlogHeader = _controlsBlogHeader.default;
24975
+ }, function (_webAtomsCoreDistPack) {
24976
+ Pack = _webAtomsCoreDistPack.default;
24977
+ }, function (_commonControlsRepeaterInfiniteRepeater) {
24978
+ InfiniteRepeater = _commonControlsRepeaterInfiniteRepeater.default;
24979
+ }, function (_webAtomsCoreDistCoreBind) {
24980
+ Bind = _webAtomsCoreDistCoreBind.default;
24981
+ }, function (_PostSummary) {
24982
+ PostSummary = _PostSummary.default;
24983
+ }, function (_commonToBase) {
24984
+ Base36 = _commonToBase.Base36;
24572
24985
  }],
24573
24986
  execute: function () {
24574
- _export("default", ChannelView = class ChannelView extends AtomControl {
24987
+ url = (_a = window.pageUrl) !== null && _a !== void 0 ? _a : new URL(location.href);
24988
+ ({
24989
+ 1: channelID = url.searchParams.get("p0"),
24990
+ 2: type = url.searchParams.get("p1"),
24991
+ 3: p2 = url.searchParams.get("p2")
24992
+ } = (_b = /^\/channels\/([^\/]+)\/([^\/]+)\/([^\/]+)\//.exec(url === null || url === void 0 ? void 0 : url.pathname)) !== null && _b !== void 0 ? _b : {});
24993
+ if (channelID) {
24994
+ channelID = Base36.decode(channelID);
24995
+ }
24996
+ type || (type = "");
24997
+ if (p2) {
24998
+ p2 = Base36.decode(p2);
24999
+ }
25000
+ emailID = type === "p" ? p2 : void 0;
25001
+ commentIcon = "💬";
25002
+ ChannelMessage = class ChannelMessage extends AtomControl {
24575
25003
  constructor(app, e = document.createElement("section")) {
24576
25004
  super(app, e);
24577
25005
  this.search = "";
24578
- this.mails = [];
25006
+ this.tagID = type === "t" ? p2 : null;
25007
+ this.authorID = type === "a" ? p2 : null;
25008
+ this.emails = [];
24579
25009
  this.pushInit();
24580
25010
  }
24581
25011
  init() {
24582
25012
  var _a;
25013
+ var _b;
24583
25014
  return __awaiter(this, void 0, void 0, function* () {
24584
- let {
24585
- channelID,
24586
- emailAddress,
24587
- domainID
24588
- } = (_a = window.socialMail) !== null && _a !== void 0 ? _a : {};
24589
- let args = this.element.getAttribute("data-json-args");
24590
- if (args) {
24591
- args = JSON.parse(args || "{}");
24592
- const d = args.domainID || args.domain;
24593
- if (d) {
24594
- domainID = d;
24595
- }
24596
- const c = args.channels || args.channel;
24597
- if (c) {
24598
- channelID = c;
24599
- }
25015
+ const channel = yield this.blogService.getChannel(void 0, channelID, void 0);
25016
+ this.channel = channel;
25017
+ if (emailID) {
25018
+ this.email = yield this.blogService.getEmail({
25019
+ emailID,
25020
+ channelID
25021
+ });
25022
+ (_a = (_b = this.email).engagements) !== null && _a !== void 0 ? _a : _b.engagements = [];
25023
+ this.emails = [this.email];
24600
25024
  }
25025
+ const search = Bind.twoWaysImmediate(() => this.search);
24601
25026
  this.element.setAttribute("data-blog-list", "blog-list");
24602
- this.channel = yield this.blogService.getChannel(emailAddress, channelID, domainID);
24603
- channelID = this.channel.mailboxID;
24604
- emailAddress = this.channel.emailAddress.emailAddress;
24605
- this.renderer = XNode.create("div", {
24606
- "data-layout": "flex-center"
24607
- }, XNode.create("span", {
24608
- text: "..."
24609
- }));
24610
- this.renderer = XNode.create("section", null, XNode.create("header", null, XNode.create("div", {
24611
- "styler-display": "flex",
24612
- "styler-gap": "size-default"
24613
- }, XNode.create("span", {
24614
- text: this.channel.emailAddress.name
24615
- }), XNode.create("a", {
24616
- href: `mailto:subscribe-${this.channel.emailAddress.emailAddress}?subject=subscribe`
24617
- }, XNode.create("button", null, "Follow"))), XNode.create("div", {
24618
- "styler-display": "flex",
24619
- "styler-gap": "size-default"
24620
- }, XNode.create("input", {
24621
- placeholder: "Search...",
24622
- value: Bind.twoWaysImmediate(() => this.search)
24623
- }))), XNode.create("section", null, XNode.create(AtomRepeater, Object.assign({
24624
- items: this.mails,
25027
+ this.element.setAttribute("data-layout", "flex-center");
25028
+ this.renderer = XNode.create("section", null, XNode.create(BlogHeader, {
25029
+ search: search,
25030
+ channel: channel
25031
+ }), XNode.create("section", null, emailID ? XNode.create(AtomRepeater, {
25032
+ items: this.emails,
25033
+ itemRenderer: x => XNode.create(PostView, {
25034
+ email: x
25035
+ })
25036
+ }) : XNode.create(AtomRepeater, Object.assign({
25037
+ items: this.emails,
24625
25038
  "data-auto-scroll": "false"
24626
25039
  }, InfiniteRepeater.pagedItems(start => (c, e, cancelToken) => this.blogService.getEmails({
24627
25040
  channelID: this.channel.mailboxID,
25041
+ authorID: this.authorID,
25042
+ tagID: this.tagID,
24628
25043
  start,
24629
25044
  search: this.search,
24630
25045
  cancelToken
24631
25046
  })), {
24632
- itemRenderer: email => {
24633
- var _a;
24634
- const engagements = (_a = email.engagements) !== null && _a !== void 0 ? _a : [];
24635
- return XNode.create("section", {
24636
- "data-element": "blog-item"
24637
- }, XNode.create("h4", {
24638
- "data-element": "title"
24639
- }, XNode.create("a", {
24640
- href: UrlService.toBlogUrl(channelID, email.emailID, email.subject),
24641
- text: email.subject
24642
- })), XNode.create("h6", {
24643
- "data-element": "date",
24644
- text: DateFormats.relative.short(email.dateSent)
24645
- }), XNode.create("h5", {
24646
- text: email.senderName
24647
- }), XNode.create("section", {
24648
- "data-element": "content"
24649
- }, XNode.create(LimitedText, {
24650
- height: 200
24651
- }, XNode.create("section", Object.assign({}, renderMail({
24652
- email
24653
- }))))), XNode.create("footer", null, ...engagements.map(x => XNode.create("span", {
24654
- title: `View all ${x.engagement} ${x.count}`,
24655
- text: `${x.engagement} ${x.count}`
24656
- }))));
24657
- }
25047
+ itemRenderer: x => XNode.create(PostSummary, {
25048
+ mailboxEmail: x
25049
+ })
24658
25050
  }))), XNode.create("aside", null, XNode.create(TagCloud, null), XNode.create(PopularPosts, null), XNode.create(RecentPosts, null)), XNode.create("footer", null));
24659
25051
  });
24660
25052
  }
24661
- });
24662
- __decorate([InjectProperty, __metadata("design:type", BlogService)], ChannelView.prototype, "blogService", void 0);
24663
- }
24664
- };
24665
- });
24666
- //# sourceMappingURL=ChannelMessageList.js.map
24667
-
24668
- AmdLoader.instance.setup("@social-mail/social-mail-client/dist/public/channel/ChannelMessageList");
24669
-
24670
- System.register(["./AtomBinder"], function (_export, _context) {
24671
- "use strict";
24672
-
24673
- var AtomBinder, AtomList, ap;
24674
- _export("AtomList", void 0);
24675
- return {
24676
- setters: [function (_AtomBinder) {
24677
- AtomBinder = _AtomBinder.AtomBinder;
24678
- }],
24679
- execute: function () {
24680
- _export("AtomList", AtomList = class AtomList extends Array {
24681
- constructor() {
24682
- super();
24683
- this.startValue = 0;
24684
- this.totalValue = 0;
24685
- this.sizeValue = 10;
24686
- this["__proto__"] = AtomList.prototype;
24687
- this.next = () => {
24688
- this.start = this.start + this.size;
24689
- };
24690
- this.prev = () => {
24691
- if (this.start >= this.size) {
24692
- this.start = this.start - this.size;
24693
- }
24694
- };
24695
- }
24696
- get start() {
24697
- return this.startValue;
24698
- }
24699
- set start(v) {
24700
- if (v === this.startValue) {
24701
- return;
24702
- }
24703
- this.startValue = v;
24704
- AtomBinder.refreshValue(this, "start");
25053
+ reactEmail(email, ce) {
25054
+ return __awaiter(this, void 0, void 0, function* () {
25055
+ const {
25056
+ headerMessageID
25057
+ } = email;
25058
+ const emoji = yield EmojiPopup.showControl(ce.target, {
25059
+ parentElement: ce.target
25060
+ });
25061
+ const {
25062
+ channel
25063
+ } = this;
25064
+ const subject = `${emoji}:${Number(email.emailID).toString(36)}:${headerMessageID}`;
25065
+ yield PopupService.alert({
25066
+ message: XNode.create("div", {
25067
+ "data-layout": "vertical-flex"
25068
+ }, "To add your emoji to this post, email just the emoji ", emoji, " with given subject to the channel email address.", XNode.create("div", null, "To: ", channel.emailAddress.emailAddress, " ", XNode.create(CopyIcon, {
25069
+ text: channel.emailAddress.emailAddress
25070
+ }), " "), XNode.create("div", null, "Subject: ", subject, " ", XNode.create(CopyIcon, {
25071
+ text: subject
25072
+ })), XNode.create("div", null, "Body: ", emoji, " ", XNode.create(CopyIcon, {
25073
+ text: emoji
25074
+ })), XNode.create("br", null), XNode.create("div", null, "If you have email client configured, you can click on following link."), XNode.create("div", null, XNode.create("a", {
25075
+ href: `mailto:${channel.emailAddress.emailAddress}?subject=${subject}&body=${emoji}&in-reply-to=${headerMessageID}`
25076
+ }, "Email Now"))),
25077
+ title: "Send Email"
25078
+ });
25079
+ });
24705
25080
  }
24706
- get total() {
24707
- return this.totalValue;
25081
+ replyEmail(email, ce) {
25082
+ return __awaiter(this, void 0, void 0, function* () {
25083
+ const emoji = commentIcon;
25084
+ const {
25085
+ headerMessageID
25086
+ } = email;
25087
+ const {
25088
+ channel
25089
+ } = this;
25090
+ const subject = `${emoji}:${Number(email.emailID).toString(36)}:${headerMessageID}`;
25091
+ yield PopupService.alert({
25092
+ message: XNode.create("div", {
25093
+ "data-layout": "vertical-flex"
25094
+ }, "To send comment to this post, email us your comment with given subject to the channel email address.", XNode.create("div", null, "To: ", channel.emailAddress.emailAddress, " ", XNode.create(CopyIcon, {
25095
+ text: channel.emailAddress.emailAddress
25096
+ })), XNode.create("div", null, "Subject: ", subject, " ", XNode.create(CopyIcon, {
25097
+ text: subject
25098
+ })), XNode.create("br", null), XNode.create("div", null, "If you have email client configured, you can click on following link."), XNode.create("div", null, XNode.create("a", {
25099
+ href: `mailto:${channel.emailAddress.emailAddress}?subject=${subject}&in-reply-to=${headerMessageID}`
25100
+ }, "Email Now"))),
25101
+ title: "Send Email"
25102
+ });
25103
+ });
24708
25104
  }
24709
- set total(v) {
24710
- if (v === this.totalValue) {
24711
- return;
24712
- }
24713
- this.totalValue = v;
24714
- AtomBinder.refreshValue(this, "total");
24715
- }
24716
- get size() {
24717
- return this.sizeValue;
24718
- }
24719
- set size(v) {
24720
- if (v === this.sizeValue) {
24721
- return;
24722
- }
24723
- this.sizeValue = v;
24724
- AtomBinder.refreshValue(this, "size");
24725
- }
24726
- add(item) {
24727
- const i = this.length;
24728
- const n = this.push(item);
24729
- AtomBinder.invokeItemsEvent(this, "add", i, item);
24730
- AtomBinder.refreshValue(this, "length");
24731
- return n;
24732
- }
24733
- addAll(items) {
24734
- for (const item of items) {
24735
- const i = this.length;
24736
- this.push(item);
24737
- AtomBinder.invokeItemsEvent(this, "add", i, item);
24738
- AtomBinder.refreshValue(this, "length");
24739
- }
24740
- const t = items["total"];
24741
- if (t) {
24742
- this.total = t;
24743
- }
24744
- }
24745
- replace(items, start, size) {
24746
- this.length = items.length;
24747
- for (let i = 0; i < items.length; i++) {
24748
- this[i] = items[i];
24749
- }
24750
- this.refresh();
24751
- const t = items["total"];
24752
- if (t) {
24753
- this.total = t;
24754
- }
24755
- if (start !== undefined) {
24756
- this.start = start;
24757
- }
24758
- if (size !== undefined) {
24759
- this.size = size;
24760
- }
24761
- }
24762
- insert(i, item) {
24763
- const n = this.splice(i, 0, item);
24764
- AtomBinder.invokeItemsEvent(this, "add", i, item);
24765
- AtomBinder.refreshValue(this, "length");
24766
- }
24767
- set(i, item) {
24768
- const old = this[i];
24769
- this[i] = item;
24770
- AtomBinder.invokeItemsEvent(this, "replace", i, item, old);
24771
- AtomBinder.refreshValue(this, "length");
24772
- }
24773
- removeAt(i) {
24774
- const item = this[i];
24775
- this.splice(i, 1);
24776
- AtomBinder.invokeItemsEvent(this, "remove", i, item);
24777
- AtomBinder.refreshValue(this, "length");
24778
- return item;
24779
- }
24780
- remove(item) {
24781
- if (item instanceof Function) {
24782
- let removed = false;
24783
- for (let index = 0; index < this.length;) {
24784
- const it = this[index];
24785
- if (item(it)) {
24786
- this.splice(index, 1);
24787
- AtomBinder.invokeItemsEvent(this, "remove", index, it);
24788
- AtomBinder.refreshValue(this, "length");
24789
- removed = true;
24790
- continue;
24791
- }
24792
- index++;
24793
- }
24794
- return removed;
24795
- }
24796
- const n = this.indexOf(item);
24797
- if (n !== -1) {
24798
- this.removeAt(n);
24799
- return true;
24800
- }
24801
- return false;
24802
- }
24803
- clear() {
24804
- this.length = 0;
24805
- this.refresh();
24806
- }
24807
- refresh() {
24808
- AtomBinder.invokeItemsEvent(this, "refresh", -1, null);
24809
- AtomBinder.refreshValue(this, "length");
24810
- }
24811
- watch(f, wrap) {
24812
- if (wrap) {
24813
- const fx = f;
24814
- f = function () {
24815
- const p = [];
24816
- for (let i = 0; i < arguments.length; i++) {
24817
- const iterator = arguments[i];
24818
- p.push(iterator);
24819
- }
24820
- return fx.call(this, p);
24821
- };
24822
- }
24823
- return AtomBinder.add_CollectionChanged(this, f);
24824
- }
24825
- count(f) {
24826
- let total = 0;
24827
- for (const iterator of this) {
24828
- if (f(iterator)) {
24829
- total++;
24830
- }
24831
- }
24832
- return total;
24833
- }
24834
- avg(f) {
24835
- if (!this.length) {
24836
- return 0;
24837
- }
24838
- let sum = 0;
24839
- for (const iterator of this) {
24840
- sum += f(iterator);
24841
- }
24842
- return sum / this.length;
24843
- }
24844
- includes(item) {
24845
- return this.indexOf(item) !== -1;
24846
- }
24847
- });
24848
- ap = Array.prototype;
24849
- for (const key of Object.getOwnPropertyNames(AtomList.prototype)) {
24850
- const {
24851
- value
24852
- } = Object.getOwnPropertyDescriptor(AtomList.prototype, key);
24853
- switch (key) {
24854
- case "add":
24855
- case "addAll":
24856
- case "clear":
24857
- case "refresh":
24858
- case "set":
24859
- case "remove":
24860
- case "removeAt":
24861
- case "watch":
24862
- case "replace":
24863
- case "insert":
24864
- case "count":
24865
- case "avg":
24866
- case "includes":
24867
- if (key in ap) {
24868
- continue;
24869
- }
24870
- Object.defineProperty(ap, key, {
24871
- enumerable: false,
24872
- value,
24873
- configurable: true,
24874
- writable: true
24875
- });
24876
- continue;
24877
- }
24878
- }
24879
- }
24880
- };
24881
- });
24882
- //# sourceMappingURL=AtomList.js.map
24883
-
24884
- AmdLoader.instance.setup("@web-atoms/core/dist/core/AtomList");
24885
-
24886
- System.register(["@web-atoms/core/dist/style/styled"], function (_export, _context) {
24887
- "use strict";
24888
-
24889
- var styled;
24890
- return {
24891
- setters: [function (_webAtomsCoreDistStyleStyled) {
24892
- styled = _webAtomsCoreDistStyleStyled.default;
24893
- }],
24894
- execute: function () {
24895
- styled.css`
24896
-
24897
- div[data-desktop-app=desktop-app] {
24898
- width: 100%;
24899
- }
24900
-
24901
- /* div[data-base-page=base-page] {
24902
- & > [data-page-element=title] {
24903
- overflow-y: visible;
24904
- }
24905
- } */
24906
-
24907
- `.withId("default-app-style").withOrder("medium").installGlobal();
24908
- }
24909
- };
24910
- });
24911
- //# sourceMappingURL=OverrideAppStyle.js.map
24912
-
24913
- AmdLoader.instance.setup("@social-mail/social-mail-client/dist/style/OverrideAppStyle");
24914
-
24915
-
24916
- System.register([], function(_export, _context) {
24917
- return {
24918
- setters: [],
24919
- execute: function() {
24920
-
24921
- // this is because in web atoms loader
24922
- // root url may not be set when the module is registered
24923
- setTimeout(() => {
24924
-
24925
- const cssModule = _context.meta.resolve("./data-styles.css");
24926
- const cssURL = System.resolve(cssModule);
24927
-
24928
- const link = document.createElement("link");
24929
- link.id = "data-styles";
24930
- link.setAttribute("href", cssURL);
24931
- link.setAttribute("rel", "stylesheet");
24932
- link.setAttribute("as", "style");
24933
- link.setAttribute("crossorigin", "anonymous");
24934
- const head = document.head;
24935
- const firstElementChild = head.firstElementChild;
24936
- if (firstElementChild) {
24937
- head.insertBefore(link, firstElementChild);
24938
- } else {
24939
- head.appendChild(link);
24940
- }
24941
- }, 1);
24942
- }
24943
- };
24944
- });
24945
-
24946
-
24947
- AmdLoader.instance.setup("@web-atoms/data-styles/data-styles");
24948
-
24949
- System.register(["@web-atoms/core/dist/core/types", "@web-atoms/core/dist/core/AtomList", "./OverrideAppStyle", "@web-atoms/core/dist/style/styled", "@web-atoms/data-styles/data-styles"], function (_export, _context) {
24950
- "use strict";
24951
-
24952
- var UMD, styled, ___UMD;
24953
- function addLinkTag(href, integrity, rel = "stylesheet") {
24954
- if (!document.head.querySelector(`[href="${href}"]`)) {
24955
- const fa = document.createElement("link");
24956
- fa.href = href;
24957
- fa.crossOrigin = "anonymous";
24958
- fa.as = "style";
24959
- fa.rel = "preload";
24960
- if (integrity) {
24961
- fa.integrity = integrity;
24962
- }
24963
- fa.onload = () => {
24964
- fa.onload = null;
24965
- fa.rel = rel;
24966
25105
  };
24967
- document.head.insertBefore(fa, document.head.firstElementChild);
24968
- }
24969
- }
24970
- return {
24971
- setters: [function (_webAtomsCoreDistCoreTypes) {
24972
- UMD = _webAtomsCoreDistCoreTypes.UMD;
24973
- }, function (_webAtomsCoreDistCoreAtomList) {}, function (_OverrideAppStyle) {}, function (_webAtomsCoreDistStyleStyled) {
24974
- styled = _webAtomsCoreDistStyleStyled.default;
24975
- }, function (_webAtomsDataStylesDataStyles) {}],
24976
- execute: function () {
24977
- _export("___UMD", ___UMD = UMD);
24978
- addLinkTag("https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&display=swap");
24979
- addLinkTag("https://npm-git.azureedge.net/npm/package/@c8private/fa-icons@6.5.2/css/all.min.css");
24980
- addLinkTag("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0");
24981
- addLinkTag("https://cdn.jsdelivr.net/npm/file-icon-vectors@1.0.0/dist/file-icon-vivid.min.css");
24982
- styled.css`
24983
-
24984
- :root {
24985
- --primary-color: #294D4A;
24986
- --accent-color: #ff6733;
24987
- --accent2-color: #ff673375;
24988
- --lighter-accent-color: #e6e6fa60;
24989
- --light-accent-color: #f2e5fa;
24990
- --accent-text-color: white;
24991
- --background-color: #f1f1f160;
24992
- --window-background: #50505025;
24993
- --media-bg-color: #9F33FF0F;
24994
- --font-size-small: 0.8125em;
24995
-
24996
- --hover-color: #b8b88b20;
24997
- --command-bg-color: #50505025;
24998
- --hover-text-color: CanvasText;
24999
- --selection-color: #b8b88b60;
25000
- --selection-text-color: CanvasText;
25001
- --spacing: 5px;
25002
- --spacing-medium: 7px;
25003
- --spacing-large: 10px;
25004
- }
25005
-
25006
- html, body {
25007
- margin:0;
25008
- }
25009
-
25010
- * {
25011
- scrollbar-width: thin;
25012
- scrollbar-color: var(--accent-color) white;
25013
- }
25014
-
25015
-
25016
- ::-webkit-scrollbar {
25017
- width: 5px;
25018
- }
25019
- ::-webkit-scrollbar-track {
25020
- background: white;
25021
- border-radius: 20px;
25022
- }
25023
- ::-webkit-scrollbar-thumb {
25024
- background: var(--accent-color);
25025
- border-radius: 20px;
25026
- }
25027
-
25028
- body {
25029
- font-family: trebuchet ms, "Source Sans Pro";
25030
- font-size: 16px;
25031
- justify-content: stretch;
25032
-
25033
- & * {
25034
- font-family: trebuchet ms, "Source Sans Pro";
25035
- box-sizing: border-box;
25036
- }
25037
-
25038
- &::placeholder {
25039
- font-size: smaller;
25040
- }
25041
-
25042
- & ul {
25043
- padding-inline-start: 15px;
25044
- }
25045
-
25046
- & input[type=search] {
25047
- border: none;
25048
- outline: none;
25049
- border-radius: 9999px;
25050
- padding-right: 10px;
25051
- padding-left: 25px;
25052
- background: canvas url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' class='bi bi-search' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'%3E%3C/path%3E%3C/svg%3E") no-repeat 5px center;
25053
- }
25054
- }
25055
-
25056
- `.withId("global-styles").withOrder("medium").installGlobal();
25057
- }
25058
- };
25059
- });
25060
- //# sourceMappingURL=GlobalStyle.js.map
25061
-
25062
- AmdLoader.instance.setup("@social-mail/social-mail-client/dist/style/GlobalStyle");
25063
-
25064
- System.register([], function (_export, _context) {
25065
- "use strict";
25066
-
25067
- function Pack(...a) {}
25068
- _export("default", Pack);
25069
- return {
25070
- setters: [],
25071
- execute: function () {}
25072
- };
25073
- });
25074
- //# sourceMappingURL=Pack.js.map
25075
-
25076
- AmdLoader.instance.setup("@web-atoms/core/dist/Pack");
25077
-
25078
- System.register(["tslib", "../../style/GlobalStyle", "@web-atoms/core/dist/Pack"], function (_export, _context) {
25079
- "use strict";
25080
-
25081
- var __decorate, Pack, url, view, Empty;
25082
- return {
25083
- setters: [function (_tslib) {
25084
- __decorate = _tslib.__decorate;
25085
- }, function (_styleGlobalStyle) {}, function (_webAtomsCoreDistPack) {
25086
- Pack = _webAtomsCoreDistPack.default;
25087
- }],
25088
- execute: async function () {
25089
- url = new URL(location.href);
25090
- window.pageUrl = url;
25091
- ({
25092
- default: view
25093
- } = await (/\/channels\//.test(url.pathname) || url.searchParams.has("detail") ? _context.import("./ChannelMessage") : _context.import("./ChannelMessageList")));
25094
- Empty = class Empty extends view {};
25095
- Empty = __decorate([Pack], Empty);
25096
- _export("default", Empty);
25106
+ __decorate([InjectProperty, __metadata("design:type", BlogService)], ChannelMessage.prototype, "blogService", void 0);
25107
+ __decorate([Action({
25108
+ onEvent: "react-email"
25109
+ }), __metadata("design:type", Function), __metadata("design:paramtypes", [Object, CustomEvent]), __metadata("design:returntype", Promise)], ChannelMessage.prototype, "reactEmail", null);
25110
+ __decorate([Action({
25111
+ onEvent: "reply-email"
25112
+ }), __metadata("design:type", Function), __metadata("design:paramtypes", [Object, CustomEvent]), __metadata("design:returntype", Promise)], ChannelMessage.prototype, "replyEmail", null);
25113
+ ChannelMessage = __decorate([Pack, __metadata("design:paramtypes", [Object, Object])], ChannelMessage);
25114
+ _export("default", ChannelMessage);
25097
25115
  }
25098
25116
  };
25099
25117
  });