@social-mail/social-mail-client 1.2.742 → 1.2.744
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/public/channel/ChannelApp.d.ts.map +1 -1
- package/dist/public/channel/ChannelApp.js +11 -2
- package/dist/public/channel/ChannelApp.js.map +1 -1
- package/dist/public/channel/ChannelApp.pack.js +1331 -1232
- package/dist/public/channel/ChannelApp.pack.js.map +1 -1
- package/dist/public/channel/ChannelApp.pack.min.js +109 -103
- package/dist/public/channel/ChannelApp.pack.min.js.map +1 -1
- package/dist/public/channel/ChannelView.pack.js +3 -3
- package/dist/public/channel/ChannelView.pack.js.map +1 -1
- package/dist/public/channel/ChannelView.pack.min.js +1 -1
- package/dist/public/channel/ChannelView.pack.min.js.map +1 -1
- package/dist/public/channel/UrlService.d.ts +1 -1
- package/dist/public/channel/UrlService.d.ts.map +1 -1
- package/dist/public/channel/UrlService.js +3 -3
- package/dist/public/channel/UrlService.js.map +1 -1
- package/dist/public/channel/commands/ChannelCommands.d.ts +8 -0
- package/dist/public/channel/commands/ChannelCommands.d.ts.map +1 -1
- package/dist/public/channel/commands/ChannelCommands.js +7 -2
- package/dist/public/channel/commands/ChannelCommands.js.map +1 -1
- package/dist/public/channel/controls/Pager.d.ts +7 -0
- package/dist/public/channel/controls/Pager.d.ts.map +1 -0
- package/dist/public/channel/controls/Pager.js +69 -0
- package/dist/public/channel/controls/Pager.js.map +1 -0
- package/dist/public/channel/pages/BaseChannelPage.d.ts +1 -0
- package/dist/public/channel/pages/BaseChannelPage.d.ts.map +1 -1
- package/dist/public/channel/pages/BaseChannelPage.js +2 -0
- package/dist/public/channel/pages/BaseChannelPage.js.map +1 -1
- package/dist/public/channel/pages/ChannelDetailPage.js +1 -1
- package/dist/public/channel/pages/ChannelDetailPage.js.map +1 -1
- package/dist/public/channel/pages/ChannelHomePage.d.ts +2 -0
- package/dist/public/channel/pages/ChannelHomePage.d.ts.map +1 -1
- package/dist/public/channel/pages/ChannelHomePage.js +3 -1
- package/dist/public/channel/pages/ChannelHomePage.js.map +1 -1
- package/dist/public/channel/pages/ChannelPhotosPage.d.ts +2 -0
- package/dist/public/channel/pages/ChannelPhotosPage.d.ts.map +1 -1
- package/dist/public/channel/pages/ChannelPhotosPage.js +15 -7
- package/dist/public/channel/pages/ChannelPhotosPage.js.map +1 -1
- package/dist/public/channel/pages/ChannelVideosPage.d.ts +1 -1
- package/dist/public/channel/pages/ChannelVideosPage.d.ts.map +1 -1
- package/dist/public/channel/pages/ChannelVideosPage.js +5 -4
- package/dist/public/channel/pages/ChannelVideosPage.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/public/channel/ChannelApp.tsx +14 -4
- package/src/public/channel/UrlService.ts +3 -3
- package/src/public/channel/commands/ChannelCommands.tsx +7 -2
- package/src/public/channel/controls/Pager.tsx +56 -0
- package/src/public/channel/pages/BaseChannelPage.tsx +6 -0
- package/src/public/channel/pages/ChannelDetailPage.tsx +2 -2
- package/src/public/channel/pages/ChannelHomePage.tsx +3 -2
- package/src/public/channel/pages/ChannelPhotosPage.tsx +15 -6
- package/src/public/channel/pages/ChannelVideosPage.tsx +6 -4
|
@@ -1976,7 +1976,7 @@ const UMD = new UMDClass();
|
|
|
1976
1976
|
|
|
1977
1977
|
AmdLoader.instance.register(
|
|
1978
1978
|
["@social-mail/social-mail-client","@web-atoms/web-controls","@web-atoms/core","reflect-metadata","@web-atoms/date-time","@web-atoms/data-styles","@web-atoms/entity","@web-atoms/email-dom"],
|
|
1979
|
-
["@social-mail/social-mail-client/dist/public/channel/ChannelApp","@web-atoms/web-controls/dist/desktop-app/MobileDesktopApp","@web-atoms/web-controls/dist/mobile-app/MobileApp","@web-atoms/core/dist/core/AtomLoader","@web-atoms/core/dist/services/JsonService","@web-atoms/core/dist/core/StringHelper","@web-atoms/core/dist/di/RegisterSingleton","@web-atoms/core/dist/di/Register","@web-atoms/core/dist/core/types","reflect-metadata","@web-atoms/core/dist/core/AtomMap","@web-atoms/core/dist/di/ServiceCollection","@web-atoms/core/dist/di/TypeKey","@web-atoms/date-time/dist/DateTime","@web-atoms/date-time/dist/TimeSpan","@web-atoms/core/dist/services/ReferenceService","@web-atoms/core/dist/di/DISingleton","@web-atoms/core/dist/core/AtomUri","@web-atoms/core/dist/web/core/AtomUI","@web-atoms/core/dist/core/Command","@web-atoms/core/dist/core/EventScope","@web-atoms/core/dist/core/Route","@web-atoms/core/dist/core/InheritedProperty","@web-atoms/core/dist/core/AtomBinder","@web-atoms/core/dist/core/sleep","@web-atoms/core/dist/core/XNode","@web-atoms/core/dist/core/Bind","@web-atoms/core/dist/core/ExpressionParser","@web-atoms/core/dist/services/NavigationService","@web-atoms/core/dist/core/AtomComponent","@web-atoms/core/dist/App","@web-atoms/core/dist/core/AtomDispatcher","@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/Hacks","@web-atoms/core/dist/core/PropertyMap","@web-atoms/core/dist/core/FormattedString","@web-atoms/core/dist/web/controls/AtomControl","@web-atoms/core/dist/core/BindableProperty","@web-atoms/core/dist/core/WebImage","@web-atoms/core/dist/web/styles/AtomStyle","@web-atoms/core/dist/web/styles/AtomStyleSheet","@web-atoms/core/dist/web/services/PopupService","@web-atoms/core/dist/style/styled","@web-atoms/core/dist/web/services/PopupWindow","@web-atoms/web-controls/dist/PageNavigator","@web-atoms/web-controls/dist/desktop-app/DesktopApp","@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","@social-mail/social-mail-client/dist/public/channel/styles/common","@social-mail/social-mail-client/dist/public/channel/commands/ChannelCommands","@social-mail/social-mail-client/dist/public/channel/pages/ChannelCalendarPage","@social-mail/social-mail-client/dist/model/model","@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/common/cache/CacheTTL","@web-atoms/web-controls/dist/basic/Calendar","@web-atoms/core/dist/core/WatchProperty","@web-atoms/web-controls/dist/basic/AtomRepeater","@web-atoms/core/dist/core/Colors","@web-atoms/web-controls/dist/basic/InlinePopup","@web-atoms/web-controls/dist/basic/styles/inline-popup-style","@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","@web-atoms/web-controls/dist/basic/Select","@web-atoms/web-controls/dist/basic/styles/calendar-style","@web-atoms/web-controls/dist/basic/TimeEditor","@web-atoms/web-controls/dist/basic/styles/time-editor-style","@social-mail/social-mail-client/dist/common/Mailto","@social-mail/social-mail-client/dist/public/channel/UrlService","@social-mail/social-mail-client/dist/common/apiPath","@social-mail/social-mail-client/dist/common/CDN","@social-mail/social-mail-client/dist/common/Slugger","@social-mail/social-mail-client/dist/common/toBase36","@social-mail/social-mail-client/dist/common/TestMode","@social-mail/social-mail-client/dist/public/channel/pages/BaseChannelPage","@web-atoms/core/dist/core/InjectProperty","@social-mail/social-mail-client/dist/services/EntityService","@social-mail/social-mail-client/dist/services/BusyProgress","@social-mail/social-mail-client/dist/public/channel/BlogService","@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/public/channel/controls/BlogHeader","@social-mail/social-mail-client/dist/public/channel/controls/RecentPosts","@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/TagCloud","@social-mail/social-mail-client/dist/public/channel/controls/UpcomingEvents","@social-mail/social-mail-client/dist/public/channel/pages/ChannelVideosPage","@social-mail/social-mail-client/dist/common/fileUrl","@social-mail/social-mail-client/dist/public/channel/pages/ChannelPhotosPage","@social-mail/social-mail-client/dist/public/channel/
|
|
1979
|
+
["@social-mail/social-mail-client/dist/public/channel/ChannelApp","@web-atoms/web-controls/dist/desktop-app/MobileDesktopApp","@web-atoms/web-controls/dist/mobile-app/MobileApp","@web-atoms/core/dist/core/AtomLoader","@web-atoms/core/dist/services/JsonService","@web-atoms/core/dist/core/StringHelper","@web-atoms/core/dist/di/RegisterSingleton","@web-atoms/core/dist/di/Register","@web-atoms/core/dist/core/types","reflect-metadata","@web-atoms/core/dist/core/AtomMap","@web-atoms/core/dist/di/ServiceCollection","@web-atoms/core/dist/di/TypeKey","@web-atoms/date-time/dist/DateTime","@web-atoms/date-time/dist/TimeSpan","@web-atoms/core/dist/services/ReferenceService","@web-atoms/core/dist/di/DISingleton","@web-atoms/core/dist/core/AtomUri","@web-atoms/core/dist/web/core/AtomUI","@web-atoms/core/dist/core/Command","@web-atoms/core/dist/core/EventScope","@web-atoms/core/dist/core/Route","@web-atoms/core/dist/core/InheritedProperty","@web-atoms/core/dist/core/AtomBinder","@web-atoms/core/dist/core/sleep","@web-atoms/core/dist/core/XNode","@web-atoms/core/dist/core/Bind","@web-atoms/core/dist/core/ExpressionParser","@web-atoms/core/dist/services/NavigationService","@web-atoms/core/dist/core/AtomComponent","@web-atoms/core/dist/App","@web-atoms/core/dist/core/AtomDispatcher","@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/Hacks","@web-atoms/core/dist/core/PropertyMap","@web-atoms/core/dist/core/FormattedString","@web-atoms/core/dist/web/controls/AtomControl","@web-atoms/core/dist/core/BindableProperty","@web-atoms/core/dist/core/WebImage","@web-atoms/core/dist/web/styles/AtomStyle","@web-atoms/core/dist/web/styles/AtomStyleSheet","@web-atoms/core/dist/web/services/PopupService","@web-atoms/core/dist/style/styled","@web-atoms/core/dist/web/services/PopupWindow","@web-atoms/web-controls/dist/PageNavigator","@web-atoms/web-controls/dist/desktop-app/DesktopApp","@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","@social-mail/social-mail-client/dist/public/channel/styles/common","@social-mail/social-mail-client/dist/public/channel/commands/ChannelCommands","@social-mail/social-mail-client/dist/public/channel/pages/ChannelCalendarPage","@social-mail/social-mail-client/dist/model/model","@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/common/cache/CacheTTL","@web-atoms/web-controls/dist/basic/Calendar","@web-atoms/core/dist/core/WatchProperty","@web-atoms/web-controls/dist/basic/AtomRepeater","@web-atoms/core/dist/core/Colors","@web-atoms/web-controls/dist/basic/InlinePopup","@web-atoms/web-controls/dist/basic/styles/inline-popup-style","@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","@web-atoms/web-controls/dist/basic/Select","@web-atoms/web-controls/dist/basic/styles/calendar-style","@web-atoms/web-controls/dist/basic/TimeEditor","@web-atoms/web-controls/dist/basic/styles/time-editor-style","@social-mail/social-mail-client/dist/common/Mailto","@social-mail/social-mail-client/dist/public/channel/UrlService","@social-mail/social-mail-client/dist/common/apiPath","@social-mail/social-mail-client/dist/common/CDN","@social-mail/social-mail-client/dist/common/Slugger","@social-mail/social-mail-client/dist/common/toBase36","@social-mail/social-mail-client/dist/common/TestMode","@social-mail/social-mail-client/dist/public/channel/pages/BaseChannelPage","@web-atoms/core/dist/core/InjectProperty","@social-mail/social-mail-client/dist/services/EntityService","@social-mail/social-mail-client/dist/services/BusyProgress","@social-mail/social-mail-client/dist/public/channel/BlogService","@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/public/channel/controls/BlogHeader","@social-mail/social-mail-client/dist/public/channel/controls/RecentPosts","@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/TagCloud","@social-mail/social-mail-client/dist/public/channel/controls/UpcomingEvents","@social-mail/social-mail-client/dist/public/channel/pages/ChannelVideosPage","@social-mail/social-mail-client/dist/common/fileUrl","@social-mail/social-mail-client/dist/public/channel/pages/ChannelPhotosPage","@social-mail/social-mail-client/dist/public/channel/controls/Pager","@social-mail/social-mail-client/dist/public/channel/pages/ChannelHomePage","@social-mail/social-mail-client/dist/public/channel/PostSummary","@social-mail/social-mail-client/dist/common/date/DateFormats","@social-mail/social-mail-client/dist/common/controls/repeater/InfiniteRepeater","@social-mail/social-mail-client/dist/public/channel/pages/ChannelDetailPage","@social-mail/social-mail-client/dist/public/channel/PostView","@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/public/channel/controls/MediaCarousel","@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/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/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","@social-mail/social-mail-client/dist/site-editor/editor/webComponentsPath","@social-mail/social-mail-client/dist/public/channel/styles/channelViewStyle"]);
|
|
1980
1980
|
|
|
1981
1981
|
System.register([], function (_export, _context) {
|
|
1982
1982
|
"use strict";
|
|
@@ -23249,12 +23249,12 @@ System.register(["../../common/apiPath", "../../common/CDN", "../../common/Slugg
|
|
|
23249
23249
|
emailAddress: {
|
|
23250
23250
|
emailAddress
|
|
23251
23251
|
}
|
|
23252
|
-
}, section = "calendar") {
|
|
23252
|
+
}, section = "calendar", current = 0) {
|
|
23253
23253
|
const cid = "@" + emailAddress.split("@")[0];
|
|
23254
23254
|
if (AppLocation.isLocalTesting) {
|
|
23255
|
-
return `?${Date.now()}#!/${cid}/${section}
|
|
23255
|
+
return `?${Date.now()}#!/${cid}/${section}/${current}`;
|
|
23256
23256
|
}
|
|
23257
|
-
return `/${cid}/${section}
|
|
23257
|
+
return `/${cid}/${section}/${current}`;
|
|
23258
23258
|
},
|
|
23259
23259
|
toCalendarUrl({
|
|
23260
23260
|
emailAddress: {
|
|
@@ -24481,6 +24481,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
24481
24481
|
super(...arguments);
|
|
24482
24482
|
this.channel = null;
|
|
24483
24483
|
}
|
|
24484
|
+
set route(v) {}
|
|
24484
24485
|
init() {
|
|
24485
24486
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24486
24487
|
const {
|
|
@@ -24488,6 +24489,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
24488
24489
|
} = this.parameters;
|
|
24489
24490
|
this.renderer = XNode.create("div", null);
|
|
24490
24491
|
this.channel = yield this.blogService.getChannel(void 0, channel, void 0);
|
|
24492
|
+
document.title = "Social " + this.channel.emailAddress.emailAddress;
|
|
24491
24493
|
this.renderer = XNode.create("section", {
|
|
24492
24494
|
"data-blog-list": "blog-list"
|
|
24493
24495
|
}, this.renderHeader(), yield this.renderBody(), XNode.create("aside", null, XNode.create(TagCloud, null), XNode.create(UpcomingEvents, {
|
|
@@ -24955,8 +24957,9 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "../../../
|
|
|
24955
24957
|
}
|
|
24956
24958
|
renderBody() {
|
|
24957
24959
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24958
|
-
const
|
|
24959
|
-
const items =
|
|
24960
|
+
const videos = yield this.loadVideos();
|
|
24961
|
+
const items = videos.items;
|
|
24962
|
+
document.title = "Videos " + this.channel.emailAddress.emailAddress;
|
|
24960
24963
|
return XNode.create("section", {
|
|
24961
24964
|
"data-width": "100%"
|
|
24962
24965
|
}, XNode.create("image-grid", null, ...items.map(m => XNode.create("img", {
|
|
@@ -24968,8 +24971,8 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "../../../
|
|
|
24968
24971
|
}, XNode.create("a", null, "First")));
|
|
24969
24972
|
});
|
|
24970
24973
|
}
|
|
24971
|
-
|
|
24972
|
-
return this.entityService.query(AppFile, "channelFiles", this.channel.mailboxID).where(x => Sql.text.like(x.contentType, "
|
|
24974
|
+
loadVideos() {
|
|
24975
|
+
return this.entityService.query(AppFile, "channelFiles", this.channel.mailboxID).where(x => Sql.text.like(x.contentType, "video/%")).orderByDescending(x => x.appFileID).toPagedList({
|
|
24973
24976
|
start: this.start,
|
|
24974
24977
|
size: 3
|
|
24975
24978
|
});
|
|
@@ -24984,10 +24987,82 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "../../../
|
|
|
24984
24987
|
|
|
24985
24988
|
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/public/channel/pages/ChannelVideosPage");
|
|
24986
24989
|
|
|
24987
|
-
System.register(["
|
|
24990
|
+
System.register(["@web-atoms/core/dist/core/XNode"], function (_export, _context) {
|
|
24991
|
+
"use strict";
|
|
24992
|
+
|
|
24993
|
+
var XNode;
|
|
24994
|
+
function* range(start, end, url) {
|
|
24995
|
+
for (let index = start; index <= end; index++) {
|
|
24996
|
+
yield XNode.create("a", {
|
|
24997
|
+
href: url(index)
|
|
24998
|
+
}, index.toString());
|
|
24999
|
+
}
|
|
25000
|
+
}
|
|
25001
|
+
function Pager({
|
|
25002
|
+
current,
|
|
25003
|
+
end,
|
|
25004
|
+
step = 3,
|
|
25005
|
+
url = void 0
|
|
25006
|
+
}) {
|
|
25007
|
+
if (end < 0) {
|
|
25008
|
+
return XNode.create("div", null);
|
|
25009
|
+
}
|
|
25010
|
+
if (end <= step) {
|
|
25011
|
+
return XNode.create("div", {
|
|
25012
|
+
"data-layout": "row"
|
|
25013
|
+
}, XNode.create("a", {
|
|
25014
|
+
href: url(0)
|
|
25015
|
+
}, "First"), ...Array.from(range(1, end, url)));
|
|
25016
|
+
}
|
|
25017
|
+
if (current) {
|
|
25018
|
+
if (current > step) {
|
|
25019
|
+
if (current < end - step) {
|
|
25020
|
+
return XNode.create("div", {
|
|
25021
|
+
"data-layout": "row"
|
|
25022
|
+
}, XNode.create("a", {
|
|
25023
|
+
href: url(0)
|
|
25024
|
+
}, "First"), "...", ...Array.from(range(current - step, current + step, url)), "...", XNode.create("a", {
|
|
25025
|
+
href: url(end)
|
|
25026
|
+
}, "Last"));
|
|
25027
|
+
}
|
|
25028
|
+
return XNode.create("div", {
|
|
25029
|
+
"data-layout": "row"
|
|
25030
|
+
}, XNode.create("a", {
|
|
25031
|
+
href: url(0)
|
|
25032
|
+
}, "First"), "...", ...Array.from(range(current - step, end, url)), XNode.create("a", {
|
|
25033
|
+
href: url(end)
|
|
25034
|
+
}, "Last"));
|
|
25035
|
+
}
|
|
25036
|
+
return XNode.create("div", {
|
|
25037
|
+
"data-layout": "row"
|
|
25038
|
+
}, XNode.create("a", {
|
|
25039
|
+
href: url(0)
|
|
25040
|
+
}, "First"), ...Array.from(range(1, current + step, url)), "...", XNode.create("a", {
|
|
25041
|
+
href: url(end)
|
|
25042
|
+
}, "Last"));
|
|
25043
|
+
}
|
|
25044
|
+
return XNode.create("div", {
|
|
25045
|
+
"data-layout": "row"
|
|
25046
|
+
}, ...Array.from(range(1, end, url)), XNode.create("a", {
|
|
25047
|
+
href: url(end)
|
|
25048
|
+
}, "Last"));
|
|
25049
|
+
}
|
|
25050
|
+
_export("default", Pager);
|
|
25051
|
+
return {
|
|
25052
|
+
setters: [function (_webAtomsCoreDistCoreXNode) {
|
|
25053
|
+
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
25054
|
+
}],
|
|
25055
|
+
execute: function () {}
|
|
25056
|
+
};
|
|
25057
|
+
});
|
|
25058
|
+
//# sourceMappingURL=Pager.js.map
|
|
25059
|
+
|
|
25060
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/public/channel/controls/Pager");
|
|
25061
|
+
|
|
25062
|
+
System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "../../../model/model", "../../../services/EntityService", "@web-atoms/core/dist/core/XNode", "../../../common/fileUrl", "../UrlService", "../../../common/Sql", "../BlogService", "./BaseChannelPage", "../controls/Pager"], function (_export, _context) {
|
|
24988
25063
|
"use strict";
|
|
24989
25064
|
|
|
24990
|
-
var __awaiter, __decorate, __metadata, InjectProperty, AppFile, EntityService, XNode, fileUrl, UrlService, Sql, BlogService, BaseChannelPage, ChannelPhotosPage;
|
|
25065
|
+
var __awaiter, __decorate, __metadata, InjectProperty, AppFile, EntityService, XNode, fileUrl, UrlService, Sql, BlogService, BaseChannelPage, Pager, ChannelPhotosPage;
|
|
24991
25066
|
_export("default", void 0);
|
|
24992
25067
|
return {
|
|
24993
25068
|
setters: [function (_tslib) {
|
|
@@ -25012,6 +25087,8 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "../../../
|
|
|
25012
25087
|
BlogService = _BlogService.default;
|
|
25013
25088
|
}, function (_BaseChannelPage) {
|
|
25014
25089
|
BaseChannelPage = _BaseChannelPage.default;
|
|
25090
|
+
}, function (_controlsPager) {
|
|
25091
|
+
Pager = _controlsPager.default;
|
|
25015
25092
|
}],
|
|
25016
25093
|
execute: function () {
|
|
25017
25094
|
_export("default", ChannelPhotosPage = class ChannelPhotosPage extends BaseChannelPage {
|
|
@@ -25019,26 +25096,32 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "../../../
|
|
|
25019
25096
|
super(...arguments);
|
|
25020
25097
|
this.channel = null;
|
|
25021
25098
|
this.start = 0;
|
|
25099
|
+
this.size = 50;
|
|
25022
25100
|
}
|
|
25023
25101
|
renderBody() {
|
|
25102
|
+
var _a;
|
|
25024
25103
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25104
|
+
this.start = Number.parseInt((_a = this.parameters.start) !== null && _a !== void 0 ? _a : 0, 10);
|
|
25025
25105
|
const photos = yield this.loadPhotos();
|
|
25026
25106
|
const items = photos.items;
|
|
25107
|
+
document.title = "Photos " + this.channel.emailAddress.emailAddress;
|
|
25027
25108
|
return XNode.create("section", {
|
|
25028
25109
|
"data-width": "100%"
|
|
25029
25110
|
}, XNode.create("image-grid", null, ...items.map(m => XNode.create("img", {
|
|
25030
25111
|
src: fileUrl.webp(m, 300),
|
|
25031
25112
|
"data-src-set": `${UrlService.toImageUrl(m, 600)} 640w,
|
|
25032
25113
|
${UrlService.toImageUrl(m, 1024)}`
|
|
25033
|
-
}))), XNode.create(
|
|
25034
|
-
|
|
25035
|
-
|
|
25114
|
+
}))), XNode.create(Pager, {
|
|
25115
|
+
current: this.start,
|
|
25116
|
+
end: Math.floor(photos.total / this.size) - 1,
|
|
25117
|
+
url: x => UrlService.toSectionUrl(this.channel, "photos", x)
|
|
25118
|
+
}));
|
|
25036
25119
|
});
|
|
25037
25120
|
}
|
|
25038
25121
|
loadPhotos() {
|
|
25039
25122
|
return this.entityService.query(AppFile, "channelFiles", this.channel.mailboxID).where(x => Sql.text.like(x.contentType, "image/%")).orderByDescending(x => x.appFileID).toPagedList({
|
|
25040
|
-
start: this.start,
|
|
25041
|
-
size:
|
|
25123
|
+
start: this.start * this.size,
|
|
25124
|
+
size: this.size
|
|
25042
25125
|
});
|
|
25043
25126
|
}
|
|
25044
25127
|
});
|
|
@@ -25149,1338 +25232,1316 @@ System.register(["@web-atoms/date-time/dist/DateTime"], function (_export, _cont
|
|
|
25149
25232
|
|
|
25150
25233
|
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/common/date/DateFormats");
|
|
25151
25234
|
|
|
25152
|
-
System.register([], function (_export, _context) {
|
|
25235
|
+
System.register(["@web-atoms/core/dist/core/XNode", "../../common/date/DateFormats", "./UrlService", "@social-mail/social-mail-client/content/images/gif/loader.gif", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dist/style/styled"], function (_export, _context) {
|
|
25153
25236
|
"use strict";
|
|
25154
25237
|
|
|
25155
|
-
|
|
25156
|
-
|
|
25157
|
-
|
|
25158
|
-
|
|
25159
|
-
|
|
25238
|
+
var XNode, DateFormats, UrlService, loaderImage, Bind, styled, commentIcon;
|
|
25239
|
+
function PostSummary({
|
|
25240
|
+
channel = void 0,
|
|
25241
|
+
mailboxEmail = void 0,
|
|
25242
|
+
itemPath = void 0,
|
|
25243
|
+
blogService = void 0
|
|
25244
|
+
}) {
|
|
25160
25245
|
var _a, _b;
|
|
25161
|
-
const
|
|
25162
|
-
|
|
25163
|
-
|
|
25164
|
-
|
|
25165
|
-
|
|
25166
|
-
|
|
25167
|
-
|
|
25168
|
-
|
|
25169
|
-
|
|
25170
|
-
|
|
25171
|
-
|
|
25172
|
-
|
|
25173
|
-
|
|
25174
|
-
|
|
25175
|
-
|
|
25176
|
-
|
|
25177
|
-
|
|
25178
|
-
|
|
25179
|
-
|
|
25180
|
-
|
|
25181
|
-
|
|
25182
|
-
|
|
25183
|
-
|
|
25184
|
-
|
|
25185
|
-
|
|
25186
|
-
|
|
25187
|
-
|
|
25246
|
+
const {
|
|
25247
|
+
mailboxID,
|
|
25248
|
+
email
|
|
25249
|
+
} = mailboxEmail;
|
|
25250
|
+
const {
|
|
25251
|
+
engagements = []
|
|
25252
|
+
} = email;
|
|
25253
|
+
const isComment = email.parentID !== null;
|
|
25254
|
+
const firstMedia = (_a = email.attachments) === null || _a === void 0 ? void 0 : _a.find(x => /(image|video)\//i.test(x.contentType));
|
|
25255
|
+
const href = UrlService.toBlogUrl(Object.assign({
|
|
25256
|
+
mailbox: channel
|
|
25257
|
+
}, mailboxEmail));
|
|
25258
|
+
return XNode.create("post-summary", {
|
|
25259
|
+
"data-comment": isComment,
|
|
25260
|
+
"data-item-path": itemPath
|
|
25261
|
+
}, firstMedia ? XNode.create("a", {
|
|
25262
|
+
"data-element": "preview",
|
|
25263
|
+
href: href
|
|
25264
|
+
}, XNode.create("img", {
|
|
25265
|
+
src: Bind.oneTimeAsync(() => blogService.getImage(mailboxEmail), loaderImage)
|
|
25266
|
+
})) : XNode.create("a", {
|
|
25267
|
+
"data-element": "preview-text",
|
|
25268
|
+
href: href,
|
|
25269
|
+
text: (_b = isComment ? email.senderName : email.subject) === null || _b === void 0 ? void 0 : _b.trim()
|
|
25270
|
+
}), XNode.create("a", {
|
|
25271
|
+
"data-element": "title",
|
|
25272
|
+
href: href,
|
|
25273
|
+
text: isComment ? email.senderName : email.subject
|
|
25274
|
+
}), XNode.create("h6", {
|
|
25275
|
+
"data-element": "date",
|
|
25276
|
+
href: href,
|
|
25277
|
+
text: DateFormats.relative.short(email.dateSent)
|
|
25278
|
+
}), !isComment && XNode.create("h5", {
|
|
25279
|
+
href: href,
|
|
25280
|
+
"data-element": "author",
|
|
25281
|
+
text: email.senderName
|
|
25282
|
+
}), XNode.create("section", null, XNode.create("section", null, email.textBody.substring(0, 110).trim(), "\xa0", XNode.create("a", {
|
|
25283
|
+
href: href
|
|
25284
|
+
}, "Read More ..."))), XNode.create("footer", null, ...engagements.map(x => XNode.create("span", {
|
|
25285
|
+
"data-click-event": x.engagement === commentIcon ? "view-comments" : "none",
|
|
25286
|
+
"data-element": "engagements",
|
|
25287
|
+
title: `View all ${x.engagement} ${x.count}`,
|
|
25288
|
+
text: `${x.engagement} ${x.count}`
|
|
25289
|
+
}))));
|
|
25188
25290
|
}
|
|
25189
|
-
_export(
|
|
25190
|
-
newCSSStyleDeclaration: newCSSStyleDeclaration,
|
|
25191
|
-
default: mergeStyle
|
|
25192
|
-
});
|
|
25291
|
+
_export("default", PostSummary);
|
|
25193
25292
|
return {
|
|
25194
|
-
setters: [
|
|
25195
|
-
|
|
25196
|
-
|
|
25197
|
-
|
|
25198
|
-
|
|
25293
|
+
setters: [function (_webAtomsCoreDistCoreXNode) {
|
|
25294
|
+
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
25295
|
+
}, function (_commonDateDateFormats) {
|
|
25296
|
+
DateFormats = _commonDateDateFormats.DateFormats;
|
|
25297
|
+
}, function (_UrlService) {
|
|
25298
|
+
UrlService = _UrlService.UrlService;
|
|
25299
|
+
}, function (_socialMailSocialMailClientContentImagesGifLoaderGif) {
|
|
25300
|
+
loaderImage = _socialMailSocialMailClientContentImagesGifLoaderGif.default;
|
|
25301
|
+
}, function (_webAtomsCoreDistCoreBind) {
|
|
25302
|
+
Bind = _webAtomsCoreDistCoreBind.default;
|
|
25303
|
+
}, function (_webAtomsCoreDistStyleStyled) {
|
|
25304
|
+
styled = _webAtomsCoreDistStyleStyled.default;
|
|
25305
|
+
}],
|
|
25306
|
+
execute: function () {
|
|
25307
|
+
commentIcon = "💬";
|
|
25308
|
+
styled.css`
|
|
25309
|
+
|
|
25310
|
+
display: grid;
|
|
25311
|
+
grid-template-columns: 1fr 2fr auto;
|
|
25312
|
+
grid-template-rows: auto auto 1fr auto;
|
|
25199
25313
|
|
|
25200
|
-
|
|
25314
|
+
padding-bottom: 10px;
|
|
25315
|
+
padding-right: 20px;
|
|
25201
25316
|
|
|
25202
|
-
|
|
25203
|
-
|
|
25317
|
+
border-bottom: solid 1px lightgray;
|
|
25318
|
+
|
|
25319
|
+
max-height: 285px;
|
|
25320
|
+
height: 285px;
|
|
25321
|
+
|
|
25322
|
+
overflow: hidden;
|
|
25323
|
+
|
|
25324
|
+
margin-bottom: 10px;
|
|
25325
|
+
|
|
25326
|
+
gap: 10px;
|
|
25327
|
+
|
|
25328
|
+
row-gap: 20px;
|
|
25329
|
+
|
|
25330
|
+
& > [data-element=preview] {
|
|
25331
|
+
grid-row: 1 / span 4;
|
|
25332
|
+
grid-column: 1;
|
|
25333
|
+
background-color: #343a400d;
|
|
25334
|
+
object-fit: contain;
|
|
25335
|
+
width: 275px;
|
|
25336
|
+
height: 275px;
|
|
25337
|
+
border: none;
|
|
25338
|
+
outline: none;
|
|
25339
|
+
text-decoration: none;
|
|
25340
|
+
|
|
25341
|
+
border-radius: 10px;
|
|
25342
|
+
|
|
25343
|
+
& > img {
|
|
25344
|
+
width: 100%;
|
|
25345
|
+
height: 100%;
|
|
25346
|
+
object-fit: contain;
|
|
25347
|
+
}
|
|
25204
25348
|
|
|
25205
|
-
var newCSSStyleDeclaration, StyleHelper, toStyle;
|
|
25206
|
-
_export("default", void 0);
|
|
25207
|
-
return {
|
|
25208
|
-
setters: [function (_styleMergeStyle) {
|
|
25209
|
-
newCSSStyleDeclaration = _styleMergeStyle.newCSSStyleDeclaration;
|
|
25210
|
-
}],
|
|
25211
|
-
execute: function () {
|
|
25212
|
-
toStyle = style => {
|
|
25213
|
-
var _a;
|
|
25214
|
-
if (typeof style === "string") {
|
|
25215
|
-
const css = style;
|
|
25216
|
-
const cs = newCSSStyleDeclaration();
|
|
25217
|
-
cs.cssText = css;
|
|
25218
|
-
return cs;
|
|
25219
25349
|
}
|
|
25220
|
-
|
|
25221
|
-
|
|
25222
|
-
|
|
25350
|
+
|
|
25351
|
+
& > [data-element=preview-text] {
|
|
25352
|
+
grid-row: 1 / span 4;
|
|
25353
|
+
grid-column: 1;
|
|
25354
|
+
background-color: gray;
|
|
25355
|
+
max-width: 100%;
|
|
25356
|
+
max-height: 120px;
|
|
25357
|
+
height: 120px;
|
|
25358
|
+
border: none;
|
|
25359
|
+
outline: none;
|
|
25360
|
+
text-decoration: none;
|
|
25361
|
+
font-size: 20px;
|
|
25362
|
+
line-height: 30px;
|
|
25363
|
+
color: white;
|
|
25364
|
+
padding: 10px;
|
|
25365
|
+
border-top-left-radius: 10px;
|
|
25366
|
+
border-top-right-radius: 10px;
|
|
25367
|
+
text-overflow: ellipsis;
|
|
25368
|
+
overflow:hidden;
|
|
25369
|
+
position: relative;
|
|
25370
|
+
&::after {
|
|
25371
|
+
position: absolute;
|
|
25372
|
+
left: 0;
|
|
25373
|
+
right: 0;
|
|
25374
|
+
top: 0;
|
|
25375
|
+
bottom: 0;
|
|
25376
|
+
content: "";
|
|
25377
|
+
pointer-events: none;
|
|
25378
|
+
background: linear-gradient(to top, rgba(255, 255, 255, 0) 1px, rgba(255, 255, 255, 0.5) 16px);
|
|
25379
|
+
}
|
|
25223
25380
|
}
|
|
25224
|
-
|
|
25225
|
-
|
|
25226
|
-
|
|
25227
|
-
|
|
25228
|
-
|
|
25381
|
+
|
|
25382
|
+
& > [data-element=title] {
|
|
25383
|
+
grid-row: 2;
|
|
25384
|
+
grid-column: 2 / span 2;
|
|
25385
|
+
font-size: 1.5em;
|
|
25386
|
+
line-height: 1.2;
|
|
25387
|
+
text-decoration: none;
|
|
25388
|
+
margin: 0;
|
|
25389
|
+
& a {
|
|
25390
|
+
text-decoration: none;
|
|
25229
25391
|
}
|
|
25230
|
-
s[key] = element;
|
|
25231
|
-
}
|
|
25232
25392
|
}
|
|
25233
|
-
return s;
|
|
25234
|
-
};
|
|
25235
|
-
_export("default", StyleHelper = class StyleHelper {
|
|
25236
|
-
static styleToString(style, props) {
|
|
25237
|
-
var _a;
|
|
25238
|
-
if (!style) {
|
|
25239
|
-
return;
|
|
25240
|
-
}
|
|
25241
|
-
const cs = toStyle(style);
|
|
25242
|
-
if (props) {
|
|
25243
|
-
const ps = toStyle(props);
|
|
25244
|
-
for (let index = 0; index < ps.length; index++) {
|
|
25245
|
-
const key = ps[index];
|
|
25246
|
-
let value = (_a = ps[key]) === null || _a === void 0 ? void 0 : _a.toString();
|
|
25247
|
-
if (value === void 0 || value === null || value === "") {
|
|
25248
|
-
continue;
|
|
25249
|
-
}
|
|
25250
|
-
cs[key] = value;
|
|
25251
|
-
}
|
|
25252
|
-
}
|
|
25253
|
-
const allKeys = [];
|
|
25254
|
-
for (let index = 0; index < cs.length; index++) {
|
|
25255
|
-
const key = cs[index];
|
|
25256
|
-
allKeys.push(key);
|
|
25257
|
-
}
|
|
25258
|
-
for (const key of allKeys) {
|
|
25259
|
-
if (!cs[key]) {
|
|
25260
|
-
cs.removeProperty(key);
|
|
25261
|
-
}
|
|
25262
|
-
}
|
|
25263
|
-
return cs.cssText;
|
|
25264
|
-
}
|
|
25265
|
-
});
|
|
25266
|
-
}
|
|
25267
|
-
};
|
|
25268
|
-
});
|
|
25269
|
-
//# sourceMappingURL=StyleHelper.js.map
|
|
25270
|
-
|
|
25271
|
-
AmdLoader.instance.setup("@web-atoms/email-dom/dist/dom/StyleHelper");
|
|
25272
25393
|
|
|
25273
|
-
|
|
25274
|
-
|
|
25275
|
-
|
|
25276
|
-
|
|
25277
|
-
|
|
25278
|
-
|
|
25279
|
-
|
|
25280
|
-
return div.innerHTML;
|
|
25281
|
-
}
|
|
25282
|
-
function DomToElement(div, node) {
|
|
25283
|
-
var _a;
|
|
25284
|
-
while (typeof node.name === "function") {
|
|
25285
|
-
node = node.name(node.attributes, ...node.children);
|
|
25286
|
-
}
|
|
25287
|
-
const a = node.attributes;
|
|
25288
|
-
if (a) {
|
|
25289
|
-
for (const key in a) {
|
|
25290
|
-
if (Object.prototype.hasOwnProperty.call(a, key)) {
|
|
25291
|
-
let element = a[key];
|
|
25292
|
-
if (element === null || element === void 0) {
|
|
25293
|
-
continue;
|
|
25294
|
-
}
|
|
25295
|
-
if (typeof element === "object" && key === "style") {
|
|
25296
|
-
element = StyleHelper.styleToString(element);
|
|
25297
|
-
} else {
|
|
25298
|
-
element = element.toString();
|
|
25299
|
-
}
|
|
25300
|
-
if (!element) {
|
|
25301
|
-
continue;
|
|
25302
|
-
}
|
|
25303
|
-
switch (key) {
|
|
25304
|
-
case "text":
|
|
25305
|
-
div.textContent = element;
|
|
25306
|
-
continue;
|
|
25307
|
-
case "innerHTML":
|
|
25308
|
-
div.innerHTML = element;
|
|
25309
|
-
continue;
|
|
25310
|
-
}
|
|
25311
|
-
if (key.startsWith("styler-")) {
|
|
25312
|
-
div.setAttribute(key, element);
|
|
25313
|
-
continue;
|
|
25314
|
-
}
|
|
25315
|
-
if (key.startsWith("style") && key.length > 5) {
|
|
25316
|
-
div.style[key.substring(5)] = element;
|
|
25317
|
-
continue;
|
|
25318
|
-
}
|
|
25319
|
-
if (key.startsWith("data") && key.length > 4) {
|
|
25320
|
-
if (key.indexOf("-") !== -1) {
|
|
25321
|
-
div.setAttribute(key, element);
|
|
25322
|
-
continue;
|
|
25323
|
-
}
|
|
25324
|
-
div.dataset[key.substring(4)] = element;
|
|
25325
|
-
continue;
|
|
25326
|
-
}
|
|
25327
|
-
div.setAttribute(key, element);
|
|
25394
|
+
& > [data-element=date] {
|
|
25395
|
+
grid-row: 1;
|
|
25396
|
+
grid-column: 3;
|
|
25397
|
+
font-size: 0.70rem;
|
|
25398
|
+
line-height: 1;
|
|
25399
|
+
letter-spacing:0.05rem;
|
|
25400
|
+
margin: 0;
|
|
25328
25401
|
}
|
|
25329
|
-
}
|
|
25330
|
-
}
|
|
25331
|
-
if (!((_a = node.children) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
25332
|
-
return;
|
|
25333
|
-
}
|
|
25334
|
-
for (let iterator of node.children) {
|
|
25335
|
-
if (iterator === false || iterator === void 0 || iterator === null) {
|
|
25336
|
-
continue;
|
|
25337
|
-
}
|
|
25338
|
-
if (typeof iterator !== "object") {
|
|
25339
|
-
div.appendChild(document.createTextNode(iterator.toString()));
|
|
25340
|
-
continue;
|
|
25341
|
-
}
|
|
25342
|
-
while (typeof iterator.name === "function") {
|
|
25343
|
-
iterator = iterator.name(iterator.attributes, ...iterator.children);
|
|
25344
|
-
}
|
|
25345
|
-
const child = document.createElement(iterator.name);
|
|
25346
|
-
div.appendChild(child);
|
|
25347
|
-
DomToElement(child, iterator);
|
|
25348
|
-
}
|
|
25349
|
-
}
|
|
25350
|
-
_export({
|
|
25351
|
-
default: DomToString,
|
|
25352
|
-
DomToElement: DomToElement
|
|
25353
|
-
});
|
|
25354
|
-
return {
|
|
25355
|
-
setters: [function (_webAtomsCoreDistCoreXNode) {
|
|
25356
|
-
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
25357
|
-
}, function (_domStyleHelper) {
|
|
25358
|
-
StyleHelper = _domStyleHelper.default;
|
|
25359
|
-
}],
|
|
25360
|
-
execute: function () {}
|
|
25361
|
-
};
|
|
25362
|
-
});
|
|
25363
|
-
//# sourceMappingURL=DomToString.js.map
|
|
25364
|
-
|
|
25365
|
-
AmdLoader.instance.setup("@web-atoms/email-dom/dist/DomToString");
|
|
25366
|
-
|
|
25367
|
-
System.register(["@web-atoms/core/dist/core/EventScope"], function (_export, _context) {
|
|
25368
|
-
"use strict";
|
|
25369
25402
|
|
|
25370
|
-
|
|
25371
|
-
|
|
25372
|
-
|
|
25373
|
-
|
|
25374
|
-
|
|
25375
|
-
|
|
25376
|
-
|
|
25377
|
-
|
|
25378
|
-
onThreadMarkedAsBlocked: EventScope.create(),
|
|
25379
|
-
onDraftDeleted: EventScope.create(),
|
|
25380
|
-
onFileDeleted: EventScope.create(),
|
|
25381
|
-
onEmailScheduled: EventScope.create(),
|
|
25382
|
-
onEmailUnscheduled: EventScope.create()
|
|
25383
|
-
});
|
|
25384
|
-
}
|
|
25385
|
-
};
|
|
25386
|
-
});
|
|
25387
|
-
//# sourceMappingURL=CommonEvents.js.map
|
|
25403
|
+
& > [data-element=author] {
|
|
25404
|
+
grid-row: 1;
|
|
25405
|
+
grid-column: 2;
|
|
25406
|
+
font-size: 0.70rem;
|
|
25407
|
+
line-height: 1;
|
|
25408
|
+
letter-spacing:0.05rem;
|
|
25409
|
+
margin: 0;
|
|
25410
|
+
}
|
|
25388
25411
|
|
|
25389
|
-
|
|
25412
|
+
& > section {
|
|
25413
|
+
grid-row: 3;
|
|
25414
|
+
grid-column: 2 / span 2;
|
|
25415
|
+
position: relative;
|
|
25416
|
+
}
|
|
25390
25417
|
|
|
25391
|
-
|
|
25392
|
-
|
|
25418
|
+
& > footer {
|
|
25419
|
+
grid-row: 4;
|
|
25420
|
+
grid-column: 1 / span 3;
|
|
25421
|
+
}
|
|
25393
25422
|
|
|
25394
|
-
|
|
25395
|
-
|
|
25396
|
-
|
|
25397
|
-
|
|
25398
|
-
|
|
25399
|
-
|
|
25400
|
-
|
|
25401
|
-
|
|
25423
|
+
`.installGlobal("post-summary");
|
|
25424
|
+
document.body.addEventListener("click", e => {
|
|
25425
|
+
let target = e.target;
|
|
25426
|
+
do {
|
|
25427
|
+
const href = target.tagName === "POST-SUMMARY" && target.getAttribute("data-link");
|
|
25428
|
+
if (href) {
|
|
25429
|
+
location.href = href;
|
|
25430
|
+
return;
|
|
25431
|
+
}
|
|
25432
|
+
target = target.parentElement;
|
|
25433
|
+
} while (target);
|
|
25402
25434
|
});
|
|
25403
25435
|
}
|
|
25404
25436
|
};
|
|
25405
25437
|
});
|
|
25406
|
-
//# sourceMappingURL=
|
|
25438
|
+
//# sourceMappingURL=PostSummary.js.map
|
|
25407
25439
|
|
|
25408
|
-
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/
|
|
25440
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/public/channel/PostSummary");
|
|
25409
25441
|
|
|
25410
|
-
System.register(["tslib", "@web-atoms/core/dist/
|
|
25442
|
+
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) {
|
|
25411
25443
|
"use strict";
|
|
25412
25444
|
|
|
25413
|
-
var __awaiter,
|
|
25445
|
+
var __awaiter, Bind, CancelToken, XNode, styled, AtomControl, InfiniteRepeater, _a, loadMoreSet, pagedItemsSetter, scrollToBottom;
|
|
25446
|
+
_export("default", void 0);
|
|
25414
25447
|
return {
|
|
25415
25448
|
setters: [function (_tslib) {
|
|
25416
25449
|
__awaiter = _tslib.__awaiter;
|
|
25417
|
-
|
|
25418
|
-
|
|
25419
|
-
}, function (
|
|
25420
|
-
|
|
25421
|
-
}, function (_webAtomsCoreDistDiInject) {
|
|
25422
|
-
Inject = _webAtomsCoreDistDiInject.Inject;
|
|
25423
|
-
}, function (_servicesEntityService) {
|
|
25424
|
-
EntityService = _servicesEntityService.default;
|
|
25425
|
-
}, function (_modelModel) {
|
|
25426
|
-
Email = _modelModel.Email;
|
|
25427
|
-
EmailRecipient = _modelModel.EmailRecipient;
|
|
25428
|
-
MailboxContactEmail = _modelModel.MailboxContactEmail;
|
|
25429
|
-
MailboxEmail = _modelModel.MailboxEmail;
|
|
25430
|
-
}, function (_commonSql) {
|
|
25431
|
-
Sql = _commonSql.Sql;
|
|
25432
|
-
}, function (_webAtomsEmailDomDistDomToString) {
|
|
25433
|
-
DomToString = _webAtomsEmailDomDistDomToString.default;
|
|
25450
|
+
}, function (_webAtomsCoreDistCoreBind) {
|
|
25451
|
+
Bind = _webAtomsCoreDistCoreBind.default;
|
|
25452
|
+
}, function (_webAtomsCoreDistCoreTypes) {
|
|
25453
|
+
CancelToken = _webAtomsCoreDistCoreTypes.CancelToken;
|
|
25434
25454
|
}, function (_webAtomsCoreDistCoreXNode) {
|
|
25435
25455
|
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
25456
|
+
}, function (_webAtomsCoreDistStyleStyled) {
|
|
25457
|
+
styled = _webAtomsCoreDistStyleStyled.default;
|
|
25436
25458
|
}, function (_webAtomsCoreDistWebControlsAtomControl) {
|
|
25437
25459
|
AtomControl = _webAtomsCoreDistWebControlsAtomControl.AtomControl;
|
|
25438
|
-
}, function (_webAtomsCoreDistWebCoreAtomUI) {
|
|
25439
|
-
AncestorEnumerator = _webAtomsCoreDistWebCoreAtomUI.AncestorEnumerator;
|
|
25440
|
-
descendentIterator = _webAtomsCoreDistWebCoreAtomUI.descendentIterator;
|
|
25441
|
-
}, function (_webAtomsDateTimeDistDateTime) {
|
|
25442
|
-
DateTime = _webAtomsDateTimeDistDateTime.default;
|
|
25443
|
-
}, function (_commonEventsCommonEvents) {
|
|
25444
|
-
CommonEvents = _commonEventsCommonEvents.CommonEvents;
|
|
25445
|
-
}, function (_servicesBusyProgress) {
|
|
25446
|
-
BusyProgress = _servicesBusyProgress.default;
|
|
25447
|
-
}, function (_servicesEmailEmailContentDownloader) {
|
|
25448
|
-
EmailContentDownloader = _servicesEmailEmailContentDownloader.default;
|
|
25449
|
-
}, function (_EngagementService) {
|
|
25450
|
-
EngagementService = _EngagementService.default;
|
|
25451
|
-
}, function (_commandsMailAppEvents) {
|
|
25452
|
-
MailAppEvents = _commandsMailAppEvents.MailAppEvents;
|
|
25453
|
-
}, function (_commonFileUrl) {
|
|
25454
|
-
fileUrl = _commonFileUrl.fileUrl;
|
|
25455
25460
|
}],
|
|
25456
25461
|
execute: function () {
|
|
25457
|
-
|
|
25458
|
-
|
|
25459
|
-
|
|
25460
|
-
|
|
25461
|
-
|
|
25462
|
-
|
|
25463
|
-
|
|
25464
|
-
|
|
25465
|
-
|
|
25466
|
-
|
|
25467
|
-
|
|
25468
|
-
|
|
25469
|
-
|
|
25470
|
-
|
|
25471
|
-
|
|
25472
|
-
|
|
25473
|
-
|
|
25474
|
-
|
|
25475
|
-
|
|
25476
|
-
|
|
25477
|
-
|
|
25478
|
-
|
|
25479
|
-
|
|
25480
|
-
|
|
25481
|
-
|
|
25482
|
-
|
|
25483
|
-
|
|
25484
|
-
|
|
25485
|
-
|
|
25486
|
-
|
|
25487
|
-
|
|
25488
|
-
|
|
25489
|
-
|
|
25490
|
-
|
|
25491
|
-
|
|
25492
|
-
|
|
25493
|
-
|
|
25494
|
-
|
|
25495
|
-
|
|
25496
|
-
|
|
25497
|
-
|
|
25462
|
+
loadMoreSet = Symbol("loadMoreSet");
|
|
25463
|
+
styled.css`
|
|
25464
|
+
|
|
25465
|
+
margin: 10px;
|
|
25466
|
+
padding: 10px;
|
|
25467
|
+
& > span {
|
|
25468
|
+
background-color: lightgray;
|
|
25469
|
+
border-radius: 10px;
|
|
25470
|
+
padding: 3px;
|
|
25471
|
+
padding-left: 10px;
|
|
25472
|
+
padding-right: 10px;
|
|
25473
|
+
border: solid 1px gray;
|
|
25474
|
+
}
|
|
25475
|
+
|
|
25476
|
+
`.installGlobal("[data-load-more=load-more]");
|
|
25477
|
+
pagedItemsSetter = AtomControl.registerProperty("paged-items", "paged-items", (control, element, value) => {
|
|
25478
|
+
var _b, _c;
|
|
25479
|
+
if (value && value.items) {
|
|
25480
|
+
let cancelToken = control[loadMoreSet];
|
|
25481
|
+
(_b = control.footerRenderer) !== null && _b !== void 0 ? _b : control.footerRenderer = () => XNode.create("div", {
|
|
25482
|
+
"data-load-more": "load-more",
|
|
25483
|
+
"data-click-event": "load-more-items"
|
|
25484
|
+
}, XNode.create("span", {
|
|
25485
|
+
text: "Load more ... "
|
|
25486
|
+
}));
|
|
25487
|
+
(_c = control.headerRenderer) !== null && _c !== void 0 ? _c : control.headerRenderer = () => XNode.create("div", {
|
|
25488
|
+
class: "scroll-header",
|
|
25489
|
+
"style-height": "1px",
|
|
25490
|
+
"style-width": "100%"
|
|
25491
|
+
});
|
|
25492
|
+
if (!cancelToken) {
|
|
25493
|
+
control[loadMoreSet] = cancelToken = new CancelToken();
|
|
25494
|
+
control.bindEvent(control.element, "loadMoreItems", e => {
|
|
25495
|
+
const ce = new CustomEvent("moreItems", {
|
|
25496
|
+
detail: {
|
|
25497
|
+
pagedItems: control.pagedItems,
|
|
25498
|
+
cancelToken
|
|
25499
|
+
},
|
|
25500
|
+
bubbles: false
|
|
25501
|
+
});
|
|
25502
|
+
control.element.dispatchEvent(ce);
|
|
25503
|
+
});
|
|
25504
|
+
} else {
|
|
25505
|
+
cancelToken.cancel();
|
|
25506
|
+
control[loadMoreSet] = cancelToken = new CancelToken();
|
|
25498
25507
|
}
|
|
25499
|
-
|
|
25500
|
-
|
|
25501
|
-
|
|
25502
|
-
|
|
25503
|
-
|
|
25504
|
-
|
|
25505
|
-
if (src.startsWith("cid:")) {
|
|
25506
|
-
cid = src.substring(4);
|
|
25507
|
-
const a = (_c = mail.attachments) === null || _c === void 0 ? void 0 : _c.find(x => x.contentID === cid);
|
|
25508
|
-
if (a) {
|
|
25509
|
-
iterator.setAttribute("src", fileUrl(a));
|
|
25510
|
-
a.included = true;
|
|
25511
|
-
}
|
|
25512
|
-
}
|
|
25513
|
-
if (/^http\:\/\//i.test(src)) {
|
|
25514
|
-
iterator.setAttribute("src", src.substring(5));
|
|
25515
|
-
}
|
|
25516
|
-
}
|
|
25517
|
-
continue;
|
|
25508
|
+
const items = control.items;
|
|
25509
|
+
if (items && Array.isArray(items)) {
|
|
25510
|
+
items.clear();
|
|
25511
|
+
items.addAll(value.items);
|
|
25512
|
+
} else {
|
|
25513
|
+
control.items = value.items;
|
|
25518
25514
|
}
|
|
25519
|
-
|
|
25520
|
-
|
|
25515
|
+
const autoScroll = control.element.getAttribute("data-auto-scroll") !== "false";
|
|
25516
|
+
if (autoScroll) {
|
|
25517
|
+
setTimeout(() => {
|
|
25518
|
+
var _b;
|
|
25519
|
+
const ce = (_b = control.element) === null || _b === void 0 ? void 0 : _b.firstElementChild;
|
|
25520
|
+
const scrollX = window.scrollX;
|
|
25521
|
+
const scrollY = window.scrollY;
|
|
25522
|
+
ce === null || ce === void 0 ? void 0 : ce.scrollIntoView();
|
|
25523
|
+
setTimeout(() => {
|
|
25524
|
+
window.scrollTo(scrollX, scrollY);
|
|
25525
|
+
}, 100);
|
|
25526
|
+
}, 100);
|
|
25521
25527
|
}
|
|
25528
|
+
control.footer = value.total && value.items && value.items.length < value.total;
|
|
25529
|
+
control.pagedItems = value;
|
|
25522
25530
|
}
|
|
25523
|
-
|
|
25524
|
-
|
|
25525
|
-
|
|
25526
|
-
|
|
25527
|
-
|
|
25528
|
-
|
|
25529
|
-
|
|
25530
|
-
div[msg] {
|
|
25531
|
-
overflow: visible;
|
|
25532
|
-
display: flex;
|
|
25533
|
-
flex-direction: column;
|
|
25534
|
-
word-break: break-word;
|
|
25535
|
-
}
|
|
25536
|
-
`;
|
|
25537
|
-
container.appendChild(style);
|
|
25538
|
-
msg.setAttribute("msg", "msg");
|
|
25539
|
-
container.appendChild(msg);
|
|
25540
|
-
if (/img|video/i.test(firstVisibleElement === null || firstVisibleElement === void 0 ? void 0 : firstVisibleElement.tagName)) {
|
|
25541
|
-
const root = AncestorEnumerator.find(e, x => x.hasAttribute("data-msg-container"));
|
|
25542
|
-
(root !== null && root !== void 0 ? root : e).setAttribute("has-poster", "true");
|
|
25543
|
-
}
|
|
25544
|
-
if (!thread.timeRead && thread.mailboxID && thread.mailboxID !== ((_d = thread.email) === null || _d === void 0 ? void 0 : _d.senderID)) {
|
|
25545
|
-
const timeRead = DateTime.now;
|
|
25546
|
-
thread.timeRead = timeRead;
|
|
25547
|
-
const control = AtomControl.from(e);
|
|
25548
|
-
const entityService = control.app.resolve(EntityService);
|
|
25549
|
-
entityService.save(MailboxContactEmail.patch(thread, {
|
|
25550
|
-
timeRead
|
|
25551
|
-
})).then(() => {
|
|
25552
|
-
CommonEvents.onThreadMarkedAsRead.dispatchEvent(thread);
|
|
25553
|
-
}, console.error);
|
|
25531
|
+
});
|
|
25532
|
+
scrollToBottom = ({
|
|
25533
|
+
target,
|
|
25534
|
+
detail: {
|
|
25535
|
+
type,
|
|
25536
|
+
index
|
|
25554
25537
|
}
|
|
25555
|
-
|
|
25556
|
-
|
|
25538
|
+
}) => {
|
|
25539
|
+
if (!(type === "add" && index === 0) && type !== "reset") {
|
|
25557
25540
|
return;
|
|
25558
25541
|
}
|
|
25559
|
-
const shadow = e.attachShadow({
|
|
25560
|
-
mode: "open"
|
|
25561
|
-
});
|
|
25562
|
-
shadow.appendChild(container);
|
|
25563
25542
|
setTimeout(() => {
|
|
25564
|
-
|
|
25565
|
-
|
|
25566
|
-
|
|
25543
|
+
const e = target.firstElementChild;
|
|
25544
|
+
console.log(e);
|
|
25545
|
+
e === null || e === void 0 ? void 0 : e.scrollIntoView(true);
|
|
25546
|
+
}, 1);
|
|
25547
|
+
};
|
|
25548
|
+
_export("default", InfiniteRepeater = class InfiniteRepeater {});
|
|
25549
|
+
_a = InfiniteRepeater;
|
|
25550
|
+
InfiniteRepeater.pagedItems = start => {
|
|
25551
|
+
const setter = start(0);
|
|
25552
|
+
const setters = pagedItemsSetter(Bind.oneWayAsync(setter));
|
|
25553
|
+
setters["event-more-items"] = Bind.event((s, e) => __awaiter(void 0, void 0, void 0, function* () {
|
|
25554
|
+
var _b, _c;
|
|
25555
|
+
const st = (_c = (_b = s.items) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0;
|
|
25556
|
+
if (!st) {
|
|
25557
|
+
return;
|
|
25567
25558
|
}
|
|
25568
|
-
|
|
25569
|
-
|
|
25570
|
-
|
|
25571
|
-
|
|
25572
|
-
|
|
25573
|
-
|
|
25574
|
-
|
|
25575
|
-
|
|
25576
|
-
|
|
25577
|
-
|
|
25578
|
-
|
|
25579
|
-
|
|
25580
|
-
|
|
25581
|
-
|
|
25582
|
-
|
|
25583
|
-
|
|
25584
|
-
|
|
25585
|
-
|
|
25586
|
-
|
|
25587
|
-
|
|
25559
|
+
const cancelToken = s[loadMoreSet];
|
|
25560
|
+
const loader = start(st);
|
|
25561
|
+
const results = yield loader(s, e.target, cancelToken);
|
|
25562
|
+
s.items.addAll(results.items);
|
|
25563
|
+
s.footer = results.items.length > 0;
|
|
25564
|
+
}));
|
|
25565
|
+
return setters;
|
|
25566
|
+
};
|
|
25567
|
+
}
|
|
25568
|
+
};
|
|
25569
|
+
});
|
|
25570
|
+
//# sourceMappingURL=InfiniteRepeater.js.map
|
|
25571
|
+
|
|
25572
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/common/controls/repeater/InfiniteRepeater");
|
|
25573
|
+
|
|
25574
|
+
System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "../BlogImageService", "@web-atoms/core/dist/core/XNode", "@web-atoms/web-controls/dist/basic/AtomRepeater", "../PostSummary", "../../../common/controls/repeater/InfiniteRepeater", "./BaseChannelPage"], function (_export, _context) {
|
|
25575
|
+
"use strict";
|
|
25576
|
+
|
|
25577
|
+
var __awaiter, __decorate, __metadata, InjectProperty, BlogImageService, XNode, AtomRepeater, PostSummary, InfiniteRepeater, BaseChannelPage, ChannelHomePage;
|
|
25578
|
+
_export("default", void 0);
|
|
25579
|
+
return {
|
|
25580
|
+
setters: [function (_tslib) {
|
|
25581
|
+
__awaiter = _tslib.__awaiter;
|
|
25582
|
+
__decorate = _tslib.__decorate;
|
|
25583
|
+
__metadata = _tslib.__metadata;
|
|
25584
|
+
}, function (_webAtomsCoreDistCoreInjectProperty) {
|
|
25585
|
+
InjectProperty = _webAtomsCoreDistCoreInjectProperty.default;
|
|
25586
|
+
}, function (_BlogImageService) {
|
|
25587
|
+
BlogImageService = _BlogImageService.default;
|
|
25588
|
+
}, function (_webAtomsCoreDistCoreXNode) {
|
|
25589
|
+
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
25590
|
+
}, function (_webAtomsWebControlsDistBasicAtomRepeater) {
|
|
25591
|
+
AtomRepeater = _webAtomsWebControlsDistBasicAtomRepeater.default;
|
|
25592
|
+
}, function (_PostSummary) {
|
|
25593
|
+
PostSummary = _PostSummary.default;
|
|
25594
|
+
}, function (_commonControlsRepeaterInfiniteRepeater) {
|
|
25595
|
+
InfiniteRepeater = _commonControlsRepeaterInfiniteRepeater.default;
|
|
25596
|
+
}, function (_BaseChannelPage) {
|
|
25597
|
+
BaseChannelPage = _BaseChannelPage.default;
|
|
25598
|
+
}],
|
|
25599
|
+
execute: function () {
|
|
25600
|
+
_export("default", ChannelHomePage = class ChannelHomePage extends BaseChannelPage {
|
|
25601
|
+
constructor() {
|
|
25602
|
+
super(...arguments);
|
|
25603
|
+
this.search = "";
|
|
25604
|
+
this.tag = "";
|
|
25605
|
+
this.author = "";
|
|
25606
|
+
this.emails = [];
|
|
25588
25607
|
}
|
|
25589
|
-
|
|
25590
|
-
|
|
25591
|
-
emailAddressID,
|
|
25592
|
-
email
|
|
25593
|
-
}) {
|
|
25608
|
+
renderBody() {
|
|
25609
|
+
var _a, _b;
|
|
25594
25610
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25595
|
-
|
|
25596
|
-
|
|
25597
|
-
|
|
25598
|
-
|
|
25599
|
-
|
|
25600
|
-
},
|
|
25601
|
-
|
|
25602
|
-
|
|
25603
|
-
|
|
25604
|
-
|
|
25605
|
-
|
|
25606
|
-
|
|
25607
|
-
|
|
25608
|
-
|
|
25609
|
-
|
|
25610
|
-
|
|
25611
|
-
|
|
25612
|
-
|
|
25613
|
-
|
|
25614
|
-
yield this.entityService.save(cloner.copy);
|
|
25615
|
-
return email;
|
|
25616
|
-
}
|
|
25617
|
-
if (create && email) {
|
|
25618
|
-
const recipients = (_a = email.recipients) !== null && _a !== void 0 ? _a : email.recipients = [];
|
|
25619
|
-
const mailboxes = (_b = email.mailboxes) !== null && _b !== void 0 ? _b : email.mailboxes = [];
|
|
25620
|
-
const threads = (_c = email.threadContacts) !== null && _c !== void 0 ? _c : email.threadContacts = [];
|
|
25621
|
-
if (!email.senderID) {
|
|
25622
|
-
throw new Error("SenderID is not set");
|
|
25623
|
-
}
|
|
25624
|
-
email.status = "draft";
|
|
25625
|
-
for (const {
|
|
25626
|
-
mailboxID,
|
|
25627
|
-
emailAddressID
|
|
25628
|
-
} of mailboxContacts) {
|
|
25629
|
-
if (!mailboxes.some(m => m.mailboxID === mailboxID)) {
|
|
25630
|
-
mailboxes.push(MailboxEmail.create({
|
|
25631
|
-
mailboxID
|
|
25632
|
-
}));
|
|
25633
|
-
}
|
|
25634
|
-
if (!recipients.some(r => r.emailAddressID === emailAddressID)) {
|
|
25635
|
-
recipients.push(EmailRecipient.create({
|
|
25636
|
-
emailAddressID
|
|
25637
|
-
}));
|
|
25638
|
-
}
|
|
25639
|
-
if (!threads.some(r => r.mailboxID === mailboxID)) {
|
|
25640
|
-
threads.push(MailboxContactEmail.create({
|
|
25641
|
-
mailboxID,
|
|
25642
|
-
emailAddressID
|
|
25643
|
-
}));
|
|
25644
|
-
}
|
|
25645
|
-
}
|
|
25646
|
-
yield this.entityService.save(email, c => c.include(x => x.mailboxes).include(x => x.recipients).include(x => x.threadContacts));
|
|
25647
|
-
}
|
|
25648
|
-
return email;
|
|
25649
|
-
});
|
|
25650
|
-
}
|
|
25651
|
-
list({
|
|
25652
|
-
searchItems = null,
|
|
25653
|
-
mailboxID,
|
|
25654
|
-
emailAddressID,
|
|
25655
|
-
start = 0,
|
|
25656
|
-
size = 100,
|
|
25657
|
-
version = 0,
|
|
25658
|
-
cancelToken
|
|
25659
|
-
}) {
|
|
25660
|
-
var _a, _b, _c;
|
|
25661
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
25662
|
-
let q = this.entityService.query(MailboxContactEmail).where({
|
|
25663
|
-
mailboxID,
|
|
25664
|
-
emailAddressID
|
|
25665
|
-
}, p => x => x.mailboxID === p.mailboxID && x.emailAddressID === p.emailAddressID && x.engagement === null);
|
|
25666
|
-
if (searchItems) {
|
|
25667
|
-
for (const {
|
|
25668
|
-
tag,
|
|
25669
|
-
text
|
|
25670
|
-
} of searchItems) {
|
|
25671
|
-
if (tag) {
|
|
25672
|
-
q = q.where({
|
|
25673
|
-
tag: tag.tagID
|
|
25674
|
-
}, p => x => x.email.emailTags.some(t => t.tagID === p.tag));
|
|
25675
|
-
continue;
|
|
25676
|
-
}
|
|
25677
|
-
let search = text;
|
|
25678
|
-
if (!/\%/.test(search)) {
|
|
25679
|
-
search = `%${search}%`;
|
|
25680
|
-
}
|
|
25681
|
-
q = q.where({
|
|
25682
|
-
search
|
|
25683
|
-
}, p => x => Sql.text.iLike(x.email.subject, p.search) || Sql.text.iLike(x.email.textBody, p.search) || x.email.attachments.some(a => Sql.text.iLike(a.fileContent.textDocument.searchable, p.search)));
|
|
25684
|
-
}
|
|
25685
|
-
}
|
|
25686
|
-
const emails = yield q.include(x => [x.email.recipients.forEach(r => r.emailAddress), x.email.attachments, x.email.senderUser, x.email.senderEmail]).orderByDescending(x => x.dateReceived).toPagedList({
|
|
25611
|
+
this.tag = (_a = this.parameters.tag) !== null && _a !== void 0 ? _a : "";
|
|
25612
|
+
this.author = (_b = this.parameters.author) !== null && _b !== void 0 ? _b : "";
|
|
25613
|
+
document.title = "Social " + this.channel.emailAddress.emailAddress;
|
|
25614
|
+
return XNode.create("section", {
|
|
25615
|
+
"data-width": "100%"
|
|
25616
|
+
}, XNode.create(AtomRepeater, Object.assign({
|
|
25617
|
+
"data-items-updated-event": "items-updated",
|
|
25618
|
+
"event-items-updated": () => this.itemsUpdated(),
|
|
25619
|
+
"data-auto-scroll": "false",
|
|
25620
|
+
itemRenderer: x => XNode.create(PostSummary, {
|
|
25621
|
+
blogService: this.blogImageService,
|
|
25622
|
+
channel: this.channel,
|
|
25623
|
+
mailboxEmail: x
|
|
25624
|
+
}),
|
|
25625
|
+
items: this.emails
|
|
25626
|
+
}, InfiniteRepeater.pagedItems(start => (c, e, cancelToken) => this.blogService.getEmails({
|
|
25627
|
+
channelID: this.channel.mailboxID,
|
|
25628
|
+
author: this.author,
|
|
25629
|
+
tag: this.tag,
|
|
25687
25630
|
start,
|
|
25688
|
-
|
|
25631
|
+
search: this.search,
|
|
25689
25632
|
cancelToken
|
|
25690
|
-
});
|
|
25691
|
-
const tasks = [];
|
|
25692
|
-
const d = BusyProgress.create();
|
|
25693
|
-
try {
|
|
25694
|
-
for (const mce of emails.items) {
|
|
25695
|
-
const {
|
|
25696
|
-
email
|
|
25697
|
-
} = mce;
|
|
25698
|
-
(_a = email.htmlBody) !== null && _a !== void 0 ? _a : email.htmlBody = "";
|
|
25699
|
-
(_b = email.textBody) !== null && _b !== void 0 ? _b : email.textBody = "";
|
|
25700
|
-
tasks.push(this.downloadEmailContent(mce));
|
|
25701
|
-
tasks.push(this.engagementService.downloadEngagements(email));
|
|
25702
|
-
}
|
|
25703
|
-
yield Promise.all(tasks);
|
|
25704
|
-
} finally {
|
|
25705
|
-
(_c = d === null || d === void 0 ? void 0 : d.dispose) === null || _c === void 0 ? void 0 : _c.call(d);
|
|
25706
|
-
}
|
|
25707
|
-
return emails;
|
|
25708
|
-
});
|
|
25709
|
-
}
|
|
25710
|
-
stopEmail(mce) {
|
|
25711
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
25712
|
-
const {
|
|
25713
|
-
email
|
|
25714
|
-
} = mce;
|
|
25715
|
-
email.status = "draft";
|
|
25716
|
-
yield this.entityService.save(email, c => c);
|
|
25717
|
-
CommonEvents.onEmailUnscheduled.dispatchEvent(mce);
|
|
25718
|
-
});
|
|
25719
|
-
}
|
|
25720
|
-
downloadEmailContent(mce) {
|
|
25721
|
-
var _a, _b;
|
|
25722
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
25723
|
-
const {
|
|
25724
|
-
email
|
|
25725
|
-
} = mce;
|
|
25726
|
-
if (email.replyCount) {
|
|
25727
|
-
const children = yield this.entityService.query(Email).where({
|
|
25728
|
-
emailID: email.emailID
|
|
25729
|
-
}, p => x => x.emailID === p.emailID && x.engagement !== null).orderByDescending(x => x.emailID).toPagedList({
|
|
25730
|
-
start: 0,
|
|
25731
|
-
size: 4,
|
|
25732
|
-
cacheVersion: "a",
|
|
25733
|
-
cacheSeconds: 900
|
|
25734
|
-
});
|
|
25735
|
-
email.children = (_a = children === null || children === void 0 ? void 0 : children.items) !== null && _a !== void 0 ? _a : [];
|
|
25736
|
-
} else {
|
|
25737
|
-
(_b = email.children) !== null && _b !== void 0 ? _b : email.children = [];
|
|
25738
|
-
}
|
|
25739
|
-
yield this.emailContentDownloader.download(mce);
|
|
25740
|
-
});
|
|
25741
|
-
}
|
|
25742
|
-
renderText(html) {
|
|
25743
|
-
const div = document.createElement("div");
|
|
25744
|
-
div.innerHTML = html;
|
|
25745
|
-
return div.textContent;
|
|
25746
|
-
}
|
|
25747
|
-
renderHtml(html) {
|
|
25748
|
-
const div = document.createElement("div");
|
|
25749
|
-
div.innerHTML = html;
|
|
25750
|
-
return div.innerHTML;
|
|
25751
|
-
}
|
|
25752
|
-
toHtml(textBody) {
|
|
25753
|
-
return DomToString(XNode.create("div", null, ...textBody.split("\n").map(p => XNode.create("p", {
|
|
25754
|
-
text: p
|
|
25755
|
-
}))));
|
|
25756
|
-
}
|
|
25757
|
-
block(thread) {
|
|
25758
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
25759
|
-
thread.blocked = !thread.blocked;
|
|
25760
|
-
const cloner = this.entityService.cloner(thread).copy;
|
|
25761
|
-
yield this.entityService.save(cloner);
|
|
25762
|
-
CommonEvents.onThreadMarkedAsBlocked.dispatchEvent(thread);
|
|
25633
|
+
})))));
|
|
25763
25634
|
});
|
|
25764
25635
|
}
|
|
25765
|
-
|
|
25766
|
-
|
|
25767
|
-
const {
|
|
25768
|
-
emailID,
|
|
25769
|
-
status
|
|
25770
|
-
} = email;
|
|
25771
|
-
yield this.entityService.delete(Email.create({
|
|
25772
|
-
emailID,
|
|
25773
|
-
status
|
|
25774
|
-
}));
|
|
25775
|
-
CommonEvents.onDraftDeleted.dispatchEvent(email);
|
|
25776
|
-
});
|
|
25636
|
+
itemsUpdated() {
|
|
25637
|
+
window.pageReady = true;
|
|
25777
25638
|
}
|
|
25778
|
-
};
|
|
25779
|
-
__decorate([
|
|
25780
|
-
__decorate([Inject, __metadata("design:type", EmailContentDownloader)], ConversationService.prototype, "emailContentDownloader", void 0);
|
|
25781
|
-
__decorate([Inject, __metadata("design:type", EngagementService)], ConversationService.prototype, "engagementService", void 0);
|
|
25782
|
-
ConversationService = __decorate([DISingleton()], ConversationService);
|
|
25783
|
-
_export("default", ConversationService);
|
|
25639
|
+
});
|
|
25640
|
+
__decorate([InjectProperty, __metadata("design:type", BlogImageService)], ChannelHomePage.prototype, "blogImageService", void 0);
|
|
25784
25641
|
}
|
|
25785
25642
|
};
|
|
25786
25643
|
});
|
|
25787
|
-
//# sourceMappingURL=
|
|
25644
|
+
//# sourceMappingURL=ChannelHomePage.js.map
|
|
25788
25645
|
|
|
25789
|
-
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/
|
|
25646
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/public/channel/pages/ChannelHomePage");
|
|
25790
25647
|
|
|
25791
|
-
System.register([
|
|
25648
|
+
System.register([], function (_export, _context) {
|
|
25792
25649
|
"use strict";
|
|
25793
25650
|
|
|
25794
|
-
|
|
25795
|
-
|
|
25796
|
-
|
|
25797
|
-
}
|
|
25798
|
-
|
|
25799
|
-
|
|
25800
|
-
|
|
25801
|
-
|
|
25802
|
-
|
|
25803
|
-
if (email.attachments[0].included) {
|
|
25804
|
-
return XNode.create("div", null);
|
|
25805
|
-
}
|
|
25806
|
-
}
|
|
25807
|
-
let children = [];
|
|
25808
|
-
for (const element of email.attachments) {
|
|
25809
|
-
if (/video/i.test(element.contentType)) {
|
|
25810
|
-
children.push(XNode.create("div", {
|
|
25811
|
-
"data-element": "preview"
|
|
25812
|
-
}, XNode.create("video", {
|
|
25813
|
-
controls: "true",
|
|
25814
|
-
src: element.url
|
|
25815
|
-
})));
|
|
25651
|
+
function newCSSStyleDeclaration() {
|
|
25652
|
+
const e = document.createElement("div");
|
|
25653
|
+
return e.style;
|
|
25654
|
+
}
|
|
25655
|
+
function mergeStyle(...styles) {
|
|
25656
|
+
var _a, _b;
|
|
25657
|
+
const s = newCSSStyleDeclaration();
|
|
25658
|
+
for (const iterator of styles) {
|
|
25659
|
+
if (!iterator) {
|
|
25816
25660
|
continue;
|
|
25817
25661
|
}
|
|
25818
|
-
if (
|
|
25819
|
-
|
|
25820
|
-
|
|
25821
|
-
|
|
25822
|
-
|
|
25823
|
-
|
|
25662
|
+
if (iterator instanceof CSSStyleDeclaration) {
|
|
25663
|
+
for (let index = 0; index < iterator.length; index++) {
|
|
25664
|
+
const name = iterator[index];
|
|
25665
|
+
let value = (_a = iterator[name]) === null || _a === void 0 ? void 0 : _a.toString();
|
|
25666
|
+
if (value === void 0 || value === null || value === "") {
|
|
25667
|
+
continue;
|
|
25668
|
+
}
|
|
25669
|
+
s[name] = value;
|
|
25670
|
+
}
|
|
25824
25671
|
continue;
|
|
25825
25672
|
}
|
|
25826
|
-
|
|
25827
|
-
|
|
25828
|
-
|
|
25829
|
-
|
|
25830
|
-
|
|
25831
|
-
|
|
25673
|
+
for (const key in iterator) {
|
|
25674
|
+
if (Object.prototype.hasOwnProperty.call(iterator, key)) {
|
|
25675
|
+
const element = (_b = iterator[key]) === null || _b === void 0 ? void 0 : _b.toString();
|
|
25676
|
+
if (!element) {
|
|
25677
|
+
continue;
|
|
25678
|
+
}
|
|
25679
|
+
s[key] = element;
|
|
25680
|
+
}
|
|
25832
25681
|
}
|
|
25833
|
-
return XNode.create("div", {
|
|
25834
|
-
"data-element": "media"
|
|
25835
|
-
}, children[0]);
|
|
25836
25682
|
}
|
|
25837
|
-
return
|
|
25838
|
-
"data-element": "media"
|
|
25839
|
-
});
|
|
25683
|
+
return s;
|
|
25840
25684
|
}
|
|
25841
|
-
_export(
|
|
25685
|
+
_export({
|
|
25686
|
+
newCSSStyleDeclaration: newCSSStyleDeclaration,
|
|
25687
|
+
default: mergeStyle
|
|
25688
|
+
});
|
|
25842
25689
|
return {
|
|
25843
|
-
setters: [
|
|
25844
|
-
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
25845
|
-
}],
|
|
25690
|
+
setters: [],
|
|
25846
25691
|
execute: function () {}
|
|
25847
25692
|
};
|
|
25848
25693
|
});
|
|
25849
|
-
//# sourceMappingURL=
|
|
25694
|
+
//# sourceMappingURL=mergeStyle.js.map
|
|
25850
25695
|
|
|
25851
|
-
AmdLoader.instance.setup("@
|
|
25696
|
+
AmdLoader.instance.setup("@web-atoms/email-dom/dist/style/mergeStyle");
|
|
25852
25697
|
|
|
25853
|
-
System.register(["
|
|
25698
|
+
System.register(["../style/mergeStyle"], function (_export, _context) {
|
|
25854
25699
|
"use strict";
|
|
25855
25700
|
|
|
25856
|
-
var
|
|
25857
|
-
|
|
25858
|
-
email = void 0,
|
|
25859
|
-
channel = void 0,
|
|
25860
|
-
itemPath = void 0
|
|
25861
|
-
}) {
|
|
25862
|
-
var _a;
|
|
25863
|
-
const {
|
|
25864
|
-
engagements = []
|
|
25865
|
-
} = email;
|
|
25866
|
-
const isComment = email.parentID !== null;
|
|
25867
|
-
return XNode.create("post-view", {
|
|
25868
|
-
"data-element": "blog-item",
|
|
25869
|
-
"data-comment": isComment,
|
|
25870
|
-
"data-item-path": itemPath,
|
|
25871
|
-
"data-msg-container": "true"
|
|
25872
|
-
}, XNode.create("h4", {
|
|
25873
|
-
"data-element": "title"
|
|
25874
|
-
}, XNode.create("label", {
|
|
25875
|
-
text: isComment ? email.senderName : email.subject
|
|
25876
|
-
})), XNode.create("h6", {
|
|
25877
|
-
"data-element": "date",
|
|
25878
|
-
text: DateFormats.relative.short(email.dateSent)
|
|
25879
|
-
}), !isComment && XNode.create("h5", {
|
|
25880
|
-
"data-element": "author",
|
|
25881
|
-
text: email.senderName
|
|
25882
|
-
}), XNode.create("section", {
|
|
25883
|
-
"data-element": "content"
|
|
25884
|
-
}, !email.parentID ? XNode.create("section", Object.assign({}, renderMail({
|
|
25885
|
-
email
|
|
25886
|
-
}))) : XNode.create("section", {
|
|
25887
|
-
text: email.textBody
|
|
25888
|
-
})), XNode.create(MediaCarousel, {
|
|
25889
|
-
email: email
|
|
25890
|
-
}), XNode.create("footer", null, XNode.create("button", {
|
|
25891
|
-
"data-element": "engage",
|
|
25892
|
-
"data-click-event": "react-email",
|
|
25893
|
-
style: "padding:0; margin:0; border: none; outline: none;"
|
|
25894
|
-
}, XNode.create("img", {
|
|
25895
|
-
src: UMD.resolvePath("@social-mail/social-mail-client/content/images/icons/face-plus.svg"),
|
|
25896
|
-
"style-max-height": "15px",
|
|
25897
|
-
title: "React"
|
|
25898
|
-
})), XNode.create("button", {
|
|
25899
|
-
"data-element": "engage",
|
|
25900
|
-
"data-click-event": "reply-email",
|
|
25901
|
-
style: "padding:0; margin:0; border: none; outline: none;"
|
|
25902
|
-
}, XNode.create("img", {
|
|
25903
|
-
src: UMD.resolvePath("@social-mail/social-mail-client/content/images/icons/comment-plus.svg"),
|
|
25904
|
-
"style-max-height": "15px",
|
|
25905
|
-
title: "React"
|
|
25906
|
-
})), ...engagements.map((x, index) => XNode.create("span", {
|
|
25907
|
-
"data-click-event": x.engagement === commentIcon ? "view-comments" : "engagement-click",
|
|
25908
|
-
"data-element": "engagements",
|
|
25909
|
-
"data-item-path": `email:$, engagement: $.engagements.${index}`,
|
|
25910
|
-
title: `View all ${x.engagement} ${x.count}`,
|
|
25911
|
-
text: `${x.engagement} ${x.count}`
|
|
25912
|
-
})), !email.parentID && XNode.create("share-button", {
|
|
25913
|
-
title: email.subject,
|
|
25914
|
-
href: location.href
|
|
25915
|
-
}, XNode.create("i", {
|
|
25916
|
-
class: "fas fa-share"
|
|
25917
|
-
}), " Share")), XNode.create("section", {
|
|
25918
|
-
"data-element": "comments"
|
|
25919
|
-
}, ...((_a = email.children) !== null && _a !== void 0 ? _a : []).map((c, i) => XNode.create(PostView, {
|
|
25920
|
-
itemPath: `${itemPath ? itemPath : "$"}.children.${i}`,
|
|
25921
|
-
email: c
|
|
25922
|
-
}))));
|
|
25923
|
-
}
|
|
25924
|
-
_export("default", PostView);
|
|
25701
|
+
var newCSSStyleDeclaration, StyleHelper, toStyle;
|
|
25702
|
+
_export("default", void 0);
|
|
25925
25703
|
return {
|
|
25926
|
-
setters: [function (
|
|
25927
|
-
|
|
25928
|
-
}, function (_commonDateDateFormats) {
|
|
25929
|
-
DateFormats = _commonDateDateFormats.DateFormats;
|
|
25930
|
-
}, function (_webAtomsCoreDistCoreTypes) {
|
|
25931
|
-
UMD = _webAtomsCoreDistCoreTypes.UMD;
|
|
25932
|
-
}, function (_webPageMailsServiceConversationService) {
|
|
25933
|
-
renderMail = _webPageMailsServiceConversationService.renderMail;
|
|
25934
|
-
}, function (_controlsMediaCarousel) {
|
|
25935
|
-
MediaCarousel = _controlsMediaCarousel.default;
|
|
25936
|
-
}, function (_webAtomsCoreDistStyleStyled) {
|
|
25937
|
-
styled = _webAtomsCoreDistStyleStyled.default;
|
|
25704
|
+
setters: [function (_styleMergeStyle) {
|
|
25705
|
+
newCSSStyleDeclaration = _styleMergeStyle.newCSSStyleDeclaration;
|
|
25938
25706
|
}],
|
|
25939
25707
|
execute: function () {
|
|
25940
|
-
|
|
25941
|
-
|
|
25942
|
-
|
|
25943
|
-
|
|
25944
|
-
|
|
25945
|
-
|
|
25946
|
-
|
|
25947
|
-
|
|
25948
|
-
|
|
25949
|
-
|
|
25950
|
-
|
|
25951
|
-
|
|
25952
|
-
|
|
25953
|
-
|
|
25954
|
-
|
|
25955
|
-
|
|
25956
|
-
|
|
25957
|
-
|
|
25708
|
+
toStyle = style => {
|
|
25709
|
+
var _a;
|
|
25710
|
+
if (typeof style === "string") {
|
|
25711
|
+
const css = style;
|
|
25712
|
+
const cs = newCSSStyleDeclaration();
|
|
25713
|
+
cs.cssText = css;
|
|
25714
|
+
return cs;
|
|
25715
|
+
}
|
|
25716
|
+
const s = newCSSStyleDeclaration();
|
|
25717
|
+
if (style instanceof CSSStyleDeclaration) {
|
|
25718
|
+
return style;
|
|
25719
|
+
}
|
|
25720
|
+
for (const key in style) {
|
|
25721
|
+
if (Object.prototype.hasOwnProperty.call(style, key)) {
|
|
25722
|
+
const element = (_a = style[key]) === null || _a === void 0 ? void 0 : _a.toString();
|
|
25723
|
+
if (element === void 0 || element === null || element === "") {
|
|
25724
|
+
continue;
|
|
25725
|
+
}
|
|
25726
|
+
s[key] = element;
|
|
25727
|
+
}
|
|
25728
|
+
}
|
|
25729
|
+
return s;
|
|
25730
|
+
};
|
|
25731
|
+
_export("default", StyleHelper = class StyleHelper {
|
|
25732
|
+
static styleToString(style, props) {
|
|
25733
|
+
var _a;
|
|
25734
|
+
if (!style) {
|
|
25735
|
+
return;
|
|
25736
|
+
}
|
|
25737
|
+
const cs = toStyle(style);
|
|
25738
|
+
if (props) {
|
|
25739
|
+
const ps = toStyle(props);
|
|
25740
|
+
for (let index = 0; index < ps.length; index++) {
|
|
25741
|
+
const key = ps[index];
|
|
25742
|
+
let value = (_a = ps[key]) === null || _a === void 0 ? void 0 : _a.toString();
|
|
25743
|
+
if (value === void 0 || value === null || value === "") {
|
|
25744
|
+
continue;
|
|
25745
|
+
}
|
|
25746
|
+
cs[key] = value;
|
|
25747
|
+
}
|
|
25748
|
+
}
|
|
25749
|
+
const allKeys = [];
|
|
25750
|
+
for (let index = 0; index < cs.length; index++) {
|
|
25751
|
+
const key = cs[index];
|
|
25752
|
+
allKeys.push(key);
|
|
25753
|
+
}
|
|
25754
|
+
for (const key of allKeys) {
|
|
25755
|
+
if (!cs[key]) {
|
|
25756
|
+
cs.removeProperty(key);
|
|
25757
|
+
}
|
|
25758
|
+
}
|
|
25759
|
+
return cs.cssText;
|
|
25760
|
+
}
|
|
25761
|
+
});
|
|
25958
25762
|
}
|
|
25763
|
+
};
|
|
25764
|
+
});
|
|
25765
|
+
//# sourceMappingURL=StyleHelper.js.map
|
|
25959
25766
|
|
|
25960
|
-
|
|
25961
|
-
grid-row: 1;
|
|
25962
|
-
grid-column: 2;
|
|
25963
|
-
margin: 0;
|
|
25964
|
-
font-weight: normal;
|
|
25965
|
-
font-size: 0.8rem;
|
|
25966
|
-
line-height: 1;
|
|
25967
|
-
letter-spacing: 0.05rem;
|
|
25968
|
-
}
|
|
25767
|
+
AmdLoader.instance.setup("@web-atoms/email-dom/dist/dom/StyleHelper");
|
|
25969
25768
|
|
|
25970
|
-
|
|
25971
|
-
|
|
25972
|
-
grid-column: 1 / span 2;
|
|
25973
|
-
margin: 0;
|
|
25974
|
-
font-weight: normal;
|
|
25975
|
-
font-size: 1.65rem;
|
|
25976
|
-
line-height: 1.2;
|
|
25977
|
-
}
|
|
25769
|
+
System.register(["@web-atoms/core/dist/core/XNode", "./dom/StyleHelper"], function (_export, _context) {
|
|
25770
|
+
"use strict";
|
|
25978
25771
|
|
|
25979
|
-
|
|
25980
|
-
|
|
25981
|
-
|
|
25982
|
-
|
|
25983
|
-
|
|
25984
|
-
|
|
25985
|
-
|
|
25986
|
-
|
|
25987
|
-
|
|
25988
|
-
|
|
25989
|
-
|
|
25990
|
-
|
|
25991
|
-
|
|
25992
|
-
|
|
25993
|
-
|
|
25994
|
-
|
|
25772
|
+
var XNode, StyleHelper;
|
|
25773
|
+
function DomToString(node) {
|
|
25774
|
+
const div = document.createElement("div");
|
|
25775
|
+
DomToElement(div, XNode.create("div", null, node));
|
|
25776
|
+
return div.innerHTML;
|
|
25777
|
+
}
|
|
25778
|
+
function DomToElement(div, node) {
|
|
25779
|
+
var _a;
|
|
25780
|
+
while (typeof node.name === "function") {
|
|
25781
|
+
node = node.name(node.attributes, ...node.children);
|
|
25782
|
+
}
|
|
25783
|
+
const a = node.attributes;
|
|
25784
|
+
if (a) {
|
|
25785
|
+
for (const key in a) {
|
|
25786
|
+
if (Object.prototype.hasOwnProperty.call(a, key)) {
|
|
25787
|
+
let element = a[key];
|
|
25788
|
+
if (element === null || element === void 0) {
|
|
25789
|
+
continue;
|
|
25790
|
+
}
|
|
25791
|
+
if (typeof element === "object" && key === "style") {
|
|
25792
|
+
element = StyleHelper.styleToString(element);
|
|
25793
|
+
} else {
|
|
25794
|
+
element = element.toString();
|
|
25795
|
+
}
|
|
25796
|
+
if (!element) {
|
|
25797
|
+
continue;
|
|
25798
|
+
}
|
|
25799
|
+
switch (key) {
|
|
25800
|
+
case "text":
|
|
25801
|
+
div.textContent = element;
|
|
25802
|
+
continue;
|
|
25803
|
+
case "innerHTML":
|
|
25804
|
+
div.innerHTML = element;
|
|
25805
|
+
continue;
|
|
25806
|
+
}
|
|
25807
|
+
if (key.startsWith("styler-")) {
|
|
25808
|
+
div.setAttribute(key, element);
|
|
25809
|
+
continue;
|
|
25810
|
+
}
|
|
25811
|
+
if (key.startsWith("style") && key.length > 5) {
|
|
25812
|
+
div.style[key.substring(5)] = element;
|
|
25813
|
+
continue;
|
|
25814
|
+
}
|
|
25815
|
+
if (key.startsWith("data") && key.length > 4) {
|
|
25816
|
+
if (key.indexOf("-") !== -1) {
|
|
25817
|
+
div.setAttribute(key, element);
|
|
25818
|
+
continue;
|
|
25819
|
+
}
|
|
25820
|
+
div.dataset[key.substring(4)] = element;
|
|
25821
|
+
continue;
|
|
25822
|
+
}
|
|
25823
|
+
div.setAttribute(key, element);
|
|
25824
|
+
}
|
|
25825
|
+
}
|
|
25826
|
+
}
|
|
25827
|
+
if (!((_a = node.children) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
25828
|
+
return;
|
|
25829
|
+
}
|
|
25830
|
+
for (let iterator of node.children) {
|
|
25831
|
+
if (iterator === false || iterator === void 0 || iterator === null) {
|
|
25832
|
+
continue;
|
|
25833
|
+
}
|
|
25834
|
+
if (typeof iterator !== "object") {
|
|
25835
|
+
div.appendChild(document.createTextNode(iterator.toString()));
|
|
25836
|
+
continue;
|
|
25837
|
+
}
|
|
25838
|
+
while (typeof iterator.name === "function") {
|
|
25839
|
+
iterator = iterator.name(iterator.attributes, ...iterator.children);
|
|
25840
|
+
}
|
|
25841
|
+
const child = document.createElement(iterator.name);
|
|
25842
|
+
div.appendChild(child);
|
|
25843
|
+
DomToElement(child, iterator);
|
|
25844
|
+
}
|
|
25845
|
+
}
|
|
25846
|
+
_export({
|
|
25847
|
+
default: DomToString,
|
|
25848
|
+
DomToElement: DomToElement
|
|
25849
|
+
});
|
|
25850
|
+
return {
|
|
25851
|
+
setters: [function (_webAtomsCoreDistCoreXNode) {
|
|
25852
|
+
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
25853
|
+
}, function (_domStyleHelper) {
|
|
25854
|
+
StyleHelper = _domStyleHelper.default;
|
|
25855
|
+
}],
|
|
25856
|
+
execute: function () {}
|
|
25857
|
+
};
|
|
25858
|
+
});
|
|
25859
|
+
//# sourceMappingURL=DomToString.js.map
|
|
25860
|
+
|
|
25861
|
+
AmdLoader.instance.setup("@web-atoms/email-dom/dist/DomToString");
|
|
25862
|
+
|
|
25863
|
+
System.register(["@web-atoms/core/dist/core/EventScope"], function (_export, _context) {
|
|
25864
|
+
"use strict";
|
|
25865
|
+
|
|
25866
|
+
var EventScope, CommonEvents;
|
|
25867
|
+
return {
|
|
25868
|
+
setters: [function (_webAtomsCoreDistCoreEventScope) {
|
|
25869
|
+
EventScope = _webAtomsCoreDistCoreEventScope.default;
|
|
25870
|
+
}],
|
|
25871
|
+
execute: function () {
|
|
25872
|
+
_export("CommonEvents", CommonEvents = {
|
|
25873
|
+
onThreadMarkedAsRead: EventScope.create(),
|
|
25874
|
+
onThreadMarkedAsBlocked: EventScope.create(),
|
|
25875
|
+
onDraftDeleted: EventScope.create(),
|
|
25876
|
+
onFileDeleted: EventScope.create(),
|
|
25877
|
+
onEmailScheduled: EventScope.create(),
|
|
25878
|
+
onEmailUnscheduled: EventScope.create()
|
|
25879
|
+
});
|
|
25880
|
+
}
|
|
25881
|
+
};
|
|
25882
|
+
});
|
|
25883
|
+
//# sourceMappingURL=CommonEvents.js.map
|
|
25884
|
+
|
|
25885
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/common/events/CommonEvents");
|
|
25886
|
+
|
|
25887
|
+
System.register(["@web-atoms/core/dist/core/EventScope"], function (_export, _context) {
|
|
25888
|
+
"use strict";
|
|
25889
|
+
|
|
25890
|
+
var EventScope, MailAppEvents;
|
|
25891
|
+
return {
|
|
25892
|
+
setters: [function (_webAtomsCoreDistCoreEventScope) {
|
|
25893
|
+
EventScope = _webAtomsCoreDistCoreEventScope.default;
|
|
25894
|
+
}],
|
|
25895
|
+
execute: function () {
|
|
25896
|
+
_export("MailAppEvents", MailAppEvents = {
|
|
25897
|
+
mailboxContactUpdated: EventScope.create()
|
|
25898
|
+
});
|
|
25899
|
+
}
|
|
25900
|
+
};
|
|
25901
|
+
});
|
|
25902
|
+
//# sourceMappingURL=MailAppEvents.js.map
|
|
25903
|
+
|
|
25904
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/web/commands/MailAppEvents");
|
|
25905
|
+
|
|
25906
|
+
System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/core/dist/di/Inject", "../../../../services/EntityService", "../../../../model/model", "../../../../common/Sql", "@web-atoms/email-dom/dist/DomToString", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/web/controls/AtomControl", "@web-atoms/core/dist/web/core/AtomUI", "@web-atoms/date-time/dist/DateTime", "../../../../common/events/CommonEvents", "../../../../services/BusyProgress", "../../../../services/email/EmailContentDownloader", "./EngagementService", "../../../commands/MailAppEvents", "../../../../common/fileUrl"], function (_export, _context) {
|
|
25907
|
+
"use strict";
|
|
25908
|
+
|
|
25909
|
+
var __awaiter, __decorate, __metadata, DISingleton, Inject, EntityService, Email, EmailRecipient, MailboxContactEmail, MailboxEmail, Sql, DomToString, XNode, AtomControl, AncestorEnumerator, descendentIterator, DateTime, CommonEvents, BusyProgress, EmailContentDownloader, EngagementService, MailAppEvents, fileUrl, renderMail, ConversationService;
|
|
25910
|
+
return {
|
|
25911
|
+
setters: [function (_tslib) {
|
|
25912
|
+
__awaiter = _tslib.__awaiter;
|
|
25913
|
+
__decorate = _tslib.__decorate;
|
|
25914
|
+
__metadata = _tslib.__metadata;
|
|
25915
|
+
}, function (_webAtomsCoreDistDiDISingleton) {
|
|
25916
|
+
DISingleton = _webAtomsCoreDistDiDISingleton.default;
|
|
25917
|
+
}, function (_webAtomsCoreDistDiInject) {
|
|
25918
|
+
Inject = _webAtomsCoreDistDiInject.Inject;
|
|
25919
|
+
}, function (_servicesEntityService) {
|
|
25920
|
+
EntityService = _servicesEntityService.default;
|
|
25921
|
+
}, function (_modelModel) {
|
|
25922
|
+
Email = _modelModel.Email;
|
|
25923
|
+
EmailRecipient = _modelModel.EmailRecipient;
|
|
25924
|
+
MailboxContactEmail = _modelModel.MailboxContactEmail;
|
|
25925
|
+
MailboxEmail = _modelModel.MailboxEmail;
|
|
25926
|
+
}, function (_commonSql) {
|
|
25927
|
+
Sql = _commonSql.Sql;
|
|
25928
|
+
}, function (_webAtomsEmailDomDistDomToString) {
|
|
25929
|
+
DomToString = _webAtomsEmailDomDistDomToString.default;
|
|
25930
|
+
}, function (_webAtomsCoreDistCoreXNode) {
|
|
25931
|
+
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
25932
|
+
}, function (_webAtomsCoreDistWebControlsAtomControl) {
|
|
25933
|
+
AtomControl = _webAtomsCoreDistWebControlsAtomControl.AtomControl;
|
|
25934
|
+
}, function (_webAtomsCoreDistWebCoreAtomUI) {
|
|
25935
|
+
AncestorEnumerator = _webAtomsCoreDistWebCoreAtomUI.AncestorEnumerator;
|
|
25936
|
+
descendentIterator = _webAtomsCoreDistWebCoreAtomUI.descendentIterator;
|
|
25937
|
+
}, function (_webAtomsDateTimeDistDateTime) {
|
|
25938
|
+
DateTime = _webAtomsDateTimeDistDateTime.default;
|
|
25939
|
+
}, function (_commonEventsCommonEvents) {
|
|
25940
|
+
CommonEvents = _commonEventsCommonEvents.CommonEvents;
|
|
25941
|
+
}, function (_servicesBusyProgress) {
|
|
25942
|
+
BusyProgress = _servicesBusyProgress.default;
|
|
25943
|
+
}, function (_servicesEmailEmailContentDownloader) {
|
|
25944
|
+
EmailContentDownloader = _servicesEmailEmailContentDownloader.default;
|
|
25945
|
+
}, function (_EngagementService) {
|
|
25946
|
+
EngagementService = _EngagementService.default;
|
|
25947
|
+
}, function (_commandsMailAppEvents) {
|
|
25948
|
+
MailAppEvents = _commandsMailAppEvents.MailAppEvents;
|
|
25949
|
+
}, function (_commonFileUrl) {
|
|
25950
|
+
fileUrl = _commonFileUrl.fileUrl;
|
|
25951
|
+
}],
|
|
25952
|
+
execute: function () {
|
|
25953
|
+
_export("renderMail", renderMail = AtomControl.registerProperty("data-html", "html", (c, e, value) => {
|
|
25954
|
+
var _a, _b, _c, _d;
|
|
25955
|
+
if (!value) {
|
|
25956
|
+
e.innerHTML = "";
|
|
25957
|
+
return;
|
|
25958
|
+
}
|
|
25959
|
+
const thread = value;
|
|
25960
|
+
const mail = thread.email;
|
|
25961
|
+
let html = mail.htmlBody;
|
|
25962
|
+
const msg = document.createElement("div");
|
|
25963
|
+
if (!html) {
|
|
25964
|
+
html !== null && html !== void 0 ? html : html = mail.textBody;
|
|
25965
|
+
for (const iterator of html.split("\n")) {
|
|
25966
|
+
const p = document.createElement("p");
|
|
25967
|
+
p.appendChild(document.createTextNode(iterator));
|
|
25968
|
+
msg.appendChild(p);
|
|
25969
|
+
}
|
|
25970
|
+
e.appendChild(msg);
|
|
25971
|
+
return;
|
|
25972
|
+
}
|
|
25973
|
+
msg.innerHTML = html;
|
|
25974
|
+
let firstVisibleElement = null;
|
|
25975
|
+
for (const node of descendentIterator(msg)) {
|
|
25976
|
+
if (!firstVisibleElement && node.nodeType === Node.TEXT_NODE) {
|
|
25977
|
+
const {
|
|
25978
|
+
parentElement
|
|
25979
|
+
} = node;
|
|
25980
|
+
if (parentElement.tagName !== "STYLE" && ((_a = node.nodeValue) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
25981
|
+
firstVisibleElement || (firstVisibleElement = node.parentElement);
|
|
25982
|
+
}
|
|
25983
|
+
}
|
|
25984
|
+
if (node.nodeType !== Node.ELEMENT_NODE) {
|
|
25985
|
+
continue;
|
|
25986
|
+
}
|
|
25987
|
+
const iterator = node;
|
|
25988
|
+
let cid = iterator.getAttribute("data-content-id");
|
|
25989
|
+
if (cid) {
|
|
25990
|
+
const a = (_b = mail.attachments) === null || _b === void 0 ? void 0 : _b.find(x => x.contentID === cid);
|
|
25991
|
+
if (a) {
|
|
25992
|
+
iterator.setAttribute("src", a.url);
|
|
25993
|
+
}
|
|
25994
|
+
}
|
|
25995
|
+
if (/^(IMG|VIDEO)$/.test(iterator.tagName)) {
|
|
25996
|
+
firstVisibleElement || (firstVisibleElement = iterator);
|
|
25997
|
+
const src = iterator.getAttribute("src");
|
|
25998
|
+
iterator.setAttribute("controls", "true");
|
|
25999
|
+
iterator.setAttribute("crossorigin", "anonymous");
|
|
26000
|
+
if (src) {
|
|
26001
|
+
if (src.startsWith("cid:")) {
|
|
26002
|
+
cid = src.substring(4);
|
|
26003
|
+
const a = (_c = mail.attachments) === null || _c === void 0 ? void 0 : _c.find(x => x.contentID === cid);
|
|
26004
|
+
if (a) {
|
|
26005
|
+
iterator.setAttribute("src", fileUrl(a));
|
|
26006
|
+
a.included = true;
|
|
26007
|
+
}
|
|
26008
|
+
}
|
|
26009
|
+
if (/^http\:\/\//i.test(src)) {
|
|
26010
|
+
iterator.setAttribute("src", src.substring(5));
|
|
26011
|
+
}
|
|
26012
|
+
}
|
|
26013
|
+
continue;
|
|
26014
|
+
}
|
|
26015
|
+
if (iterator.tagName === "A") {
|
|
26016
|
+
iterator.target = "_blank";
|
|
26017
|
+
}
|
|
26018
|
+
}
|
|
26019
|
+
const container = document.createElement("div");
|
|
26020
|
+
const style = e.ownerDocument.createElement("style");
|
|
26021
|
+
style.textContent = `
|
|
26022
|
+
video,img {
|
|
26023
|
+
max-width: 100% !important;
|
|
26024
|
+
}
|
|
26025
|
+
|
|
26026
|
+
div[msg] {
|
|
26027
|
+
overflow: visible;
|
|
26028
|
+
display: flex;
|
|
26029
|
+
flex-direction: column;
|
|
26030
|
+
word-break: break-word;
|
|
26031
|
+
}
|
|
26032
|
+
`;
|
|
26033
|
+
container.appendChild(style);
|
|
26034
|
+
msg.setAttribute("msg", "msg");
|
|
26035
|
+
container.appendChild(msg);
|
|
26036
|
+
if (/img|video/i.test(firstVisibleElement === null || firstVisibleElement === void 0 ? void 0 : firstVisibleElement.tagName)) {
|
|
26037
|
+
const root = AncestorEnumerator.find(e, x => x.hasAttribute("data-msg-container"));
|
|
26038
|
+
(root !== null && root !== void 0 ? root : e).setAttribute("has-poster", "true");
|
|
26039
|
+
}
|
|
26040
|
+
if (!thread.timeRead && thread.mailboxID && thread.mailboxID !== ((_d = thread.email) === null || _d === void 0 ? void 0 : _d.senderID)) {
|
|
26041
|
+
const timeRead = DateTime.now;
|
|
26042
|
+
thread.timeRead = timeRead;
|
|
26043
|
+
const control = AtomControl.from(e);
|
|
26044
|
+
const entityService = control.app.resolve(EntityService);
|
|
26045
|
+
entityService.save(MailboxContactEmail.patch(thread, {
|
|
26046
|
+
timeRead
|
|
26047
|
+
})).then(() => {
|
|
26048
|
+
CommonEvents.onThreadMarkedAsRead.dispatchEvent(thread);
|
|
26049
|
+
}, console.error);
|
|
26050
|
+
}
|
|
26051
|
+
if (window.previewMode) {
|
|
26052
|
+
e.appendChild(container);
|
|
26053
|
+
return;
|
|
26054
|
+
}
|
|
26055
|
+
const shadow = e.attachShadow({
|
|
26056
|
+
mode: "open"
|
|
26057
|
+
});
|
|
26058
|
+
shadow.appendChild(container);
|
|
26059
|
+
setTimeout(() => {
|
|
26060
|
+
if (msg.scrollWidth > msg.offsetWidth) {
|
|
26061
|
+
msg.style.scale = msg.offsetWidth / msg.scrollWidth + "";
|
|
26062
|
+
msg.style.transformOrigin = "top left";
|
|
26063
|
+
}
|
|
26064
|
+
}, 100);
|
|
26065
|
+
return;
|
|
26066
|
+
}));
|
|
26067
|
+
ConversationService = class ConversationService {
|
|
26068
|
+
closeAllThreads(contact) {
|
|
26069
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26070
|
+
contact.dateUpdated = DateTime.now;
|
|
26071
|
+
contact.closeAllConversations = true;
|
|
26072
|
+
yield this.entityService.save(contact, c => c);
|
|
26073
|
+
contact.openThreads = 0;
|
|
26074
|
+
MailAppEvents.mailboxContactUpdated.dispatchEvent(contact);
|
|
26075
|
+
});
|
|
26076
|
+
}
|
|
26077
|
+
closePermanently(contact) {
|
|
26078
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26079
|
+
contact.autoClose = !contact.autoClose;
|
|
26080
|
+
contact.dateUpdated = DateTime.now;
|
|
26081
|
+
yield this.entityService.save(contact, c => c);
|
|
26082
|
+
MailAppEvents.mailboxContactUpdated.dispatchEvent(contact);
|
|
26083
|
+
});
|
|
26084
|
+
}
|
|
26085
|
+
getDraft({
|
|
26086
|
+
mailboxID,
|
|
26087
|
+
emailAddressID,
|
|
26088
|
+
email
|
|
26089
|
+
}) {
|
|
26090
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26091
|
+
const draft = "draft";
|
|
26092
|
+
return yield this.entityService.query(MailboxContactEmail).where({
|
|
26093
|
+
mailboxID,
|
|
26094
|
+
emailAddressID,
|
|
26095
|
+
draft
|
|
26096
|
+
}, p => x => x.mailboxID === p.mailboxID && x.emailAddressID === p.emailAddressID && x.email.status === p.draft).orderByDescending(x => x.emailID).include(x => [x.email.recipients, x.email.attachments]).firstOrDefault();
|
|
26097
|
+
});
|
|
26098
|
+
}
|
|
26099
|
+
draft(email, mailboxContacts, create = false, saveAttachments = true, cancelToken) {
|
|
26100
|
+
var _a, _b, _c;
|
|
26101
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26102
|
+
if (email === null || email === void 0 ? void 0 : email.emailID) {
|
|
26103
|
+
email.subject || (email.subject = "");
|
|
26104
|
+
email.dateUpdated = DateTime.now;
|
|
26105
|
+
let cloner = this.entityService.cloner(Object.assign({}, email));
|
|
26106
|
+
if (saveAttachments) {
|
|
26107
|
+
cloner = cloner.include(x => x.attachments);
|
|
26108
|
+
}
|
|
26109
|
+
cloner = cloner.include(x => x.mailboxes).include(x => x.recipients).include(x => x.threadContacts);
|
|
26110
|
+
yield this.entityService.save(cloner.copy);
|
|
26111
|
+
return email;
|
|
26112
|
+
}
|
|
26113
|
+
if (create && email) {
|
|
26114
|
+
const recipients = (_a = email.recipients) !== null && _a !== void 0 ? _a : email.recipients = [];
|
|
26115
|
+
const mailboxes = (_b = email.mailboxes) !== null && _b !== void 0 ? _b : email.mailboxes = [];
|
|
26116
|
+
const threads = (_c = email.threadContacts) !== null && _c !== void 0 ? _c : email.threadContacts = [];
|
|
26117
|
+
if (!email.senderID) {
|
|
26118
|
+
throw new Error("SenderID is not set");
|
|
26119
|
+
}
|
|
26120
|
+
email.status = "draft";
|
|
26121
|
+
for (const {
|
|
26122
|
+
mailboxID,
|
|
26123
|
+
emailAddressID
|
|
26124
|
+
} of mailboxContacts) {
|
|
26125
|
+
if (!mailboxes.some(m => m.mailboxID === mailboxID)) {
|
|
26126
|
+
mailboxes.push(MailboxEmail.create({
|
|
26127
|
+
mailboxID
|
|
26128
|
+
}));
|
|
26129
|
+
}
|
|
26130
|
+
if (!recipients.some(r => r.emailAddressID === emailAddressID)) {
|
|
26131
|
+
recipients.push(EmailRecipient.create({
|
|
26132
|
+
emailAddressID
|
|
26133
|
+
}));
|
|
26134
|
+
}
|
|
26135
|
+
if (!threads.some(r => r.mailboxID === mailboxID)) {
|
|
26136
|
+
threads.push(MailboxContactEmail.create({
|
|
26137
|
+
mailboxID,
|
|
26138
|
+
emailAddressID
|
|
26139
|
+
}));
|
|
26140
|
+
}
|
|
26141
|
+
}
|
|
26142
|
+
yield this.entityService.save(email, c => c.include(x => x.mailboxes).include(x => x.recipients).include(x => x.threadContacts));
|
|
26143
|
+
}
|
|
26144
|
+
return email;
|
|
26145
|
+
});
|
|
26146
|
+
}
|
|
26147
|
+
list({
|
|
26148
|
+
searchItems = null,
|
|
26149
|
+
mailboxID,
|
|
26150
|
+
emailAddressID,
|
|
26151
|
+
start = 0,
|
|
26152
|
+
size = 100,
|
|
26153
|
+
version = 0,
|
|
26154
|
+
cancelToken
|
|
26155
|
+
}) {
|
|
26156
|
+
var _a, _b, _c;
|
|
26157
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26158
|
+
let q = this.entityService.query(MailboxContactEmail).where({
|
|
26159
|
+
mailboxID,
|
|
26160
|
+
emailAddressID
|
|
26161
|
+
}, p => x => x.mailboxID === p.mailboxID && x.emailAddressID === p.emailAddressID && x.engagement === null);
|
|
26162
|
+
if (searchItems) {
|
|
26163
|
+
for (const {
|
|
26164
|
+
tag,
|
|
26165
|
+
text
|
|
26166
|
+
} of searchItems) {
|
|
26167
|
+
if (tag) {
|
|
26168
|
+
q = q.where({
|
|
26169
|
+
tag: tag.tagID
|
|
26170
|
+
}, p => x => x.email.emailTags.some(t => t.tagID === p.tag));
|
|
26171
|
+
continue;
|
|
26172
|
+
}
|
|
26173
|
+
let search = text;
|
|
26174
|
+
if (!/\%/.test(search)) {
|
|
26175
|
+
search = `%${search}%`;
|
|
26176
|
+
}
|
|
26177
|
+
q = q.where({
|
|
26178
|
+
search
|
|
26179
|
+
}, p => x => Sql.text.iLike(x.email.subject, p.search) || Sql.text.iLike(x.email.textBody, p.search) || x.email.attachments.some(a => Sql.text.iLike(a.fileContent.textDocument.searchable, p.search)));
|
|
26180
|
+
}
|
|
26181
|
+
}
|
|
26182
|
+
const emails = yield q.include(x => [x.email.recipients.forEach(r => r.emailAddress), x.email.attachments, x.email.senderUser, x.email.senderEmail]).orderByDescending(x => x.dateReceived).toPagedList({
|
|
26183
|
+
start,
|
|
26184
|
+
size,
|
|
26185
|
+
cancelToken
|
|
26186
|
+
});
|
|
26187
|
+
const tasks = [];
|
|
26188
|
+
const d = BusyProgress.create();
|
|
26189
|
+
try {
|
|
26190
|
+
for (const mce of emails.items) {
|
|
26191
|
+
const {
|
|
26192
|
+
email
|
|
26193
|
+
} = mce;
|
|
26194
|
+
(_a = email.htmlBody) !== null && _a !== void 0 ? _a : email.htmlBody = "";
|
|
26195
|
+
(_b = email.textBody) !== null && _b !== void 0 ? _b : email.textBody = "";
|
|
26196
|
+
tasks.push(this.downloadEmailContent(mce));
|
|
26197
|
+
tasks.push(this.engagementService.downloadEngagements(email));
|
|
26198
|
+
}
|
|
26199
|
+
yield Promise.all(tasks);
|
|
26200
|
+
} finally {
|
|
26201
|
+
(_c = d === null || d === void 0 ? void 0 : d.dispose) === null || _c === void 0 ? void 0 : _c.call(d);
|
|
26202
|
+
}
|
|
26203
|
+
return emails;
|
|
26204
|
+
});
|
|
26205
|
+
}
|
|
26206
|
+
stopEmail(mce) {
|
|
26207
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26208
|
+
const {
|
|
26209
|
+
email
|
|
26210
|
+
} = mce;
|
|
26211
|
+
email.status = "draft";
|
|
26212
|
+
yield this.entityService.save(email, c => c);
|
|
26213
|
+
CommonEvents.onEmailUnscheduled.dispatchEvent(mce);
|
|
26214
|
+
});
|
|
26215
|
+
}
|
|
26216
|
+
downloadEmailContent(mce) {
|
|
26217
|
+
var _a, _b;
|
|
26218
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26219
|
+
const {
|
|
26220
|
+
email
|
|
26221
|
+
} = mce;
|
|
26222
|
+
if (email.replyCount) {
|
|
26223
|
+
const children = yield this.entityService.query(Email).where({
|
|
26224
|
+
emailID: email.emailID
|
|
26225
|
+
}, p => x => x.emailID === p.emailID && x.engagement !== null).orderByDescending(x => x.emailID).toPagedList({
|
|
26226
|
+
start: 0,
|
|
26227
|
+
size: 4,
|
|
26228
|
+
cacheVersion: "a",
|
|
26229
|
+
cacheSeconds: 900
|
|
26230
|
+
});
|
|
26231
|
+
email.children = (_a = children === null || children === void 0 ? void 0 : children.items) !== null && _a !== void 0 ? _a : [];
|
|
26232
|
+
} else {
|
|
26233
|
+
(_b = email.children) !== null && _b !== void 0 ? _b : email.children = [];
|
|
25995
26234
|
}
|
|
26235
|
+
yield this.emailContentDownloader.download(mce);
|
|
26236
|
+
});
|
|
25996
26237
|
}
|
|
25997
|
-
|
|
25998
|
-
|
|
26238
|
+
renderText(html) {
|
|
26239
|
+
const div = document.createElement("div");
|
|
26240
|
+
div.innerHTML = html;
|
|
26241
|
+
return div.textContent;
|
|
25999
26242
|
}
|
|
26000
|
-
|
|
26001
|
-
|
|
26002
|
-
|
|
26003
|
-
|
|
26004
|
-
grid-column: 1 / span 3;
|
|
26005
|
-
}
|
|
26006
|
-
|
|
26007
|
-
& > [data-element=content] {
|
|
26008
|
-
grid-row: 4;
|
|
26009
|
-
grid-column: 1 / span 2;
|
|
26010
|
-
}
|
|
26011
|
-
|
|
26012
|
-
& > footer {
|
|
26013
|
-
grid-row: 6;
|
|
26014
|
-
padding: 10px;
|
|
26015
|
-
grid-column: 1/ span 2;
|
|
26016
|
-
background-color: canvas;
|
|
26017
|
-
color: canvastext;
|
|
26018
|
-
display: flex;
|
|
26019
|
-
gap: 5px;
|
|
26020
|
-
flex-wrap: wrap;
|
|
26021
|
-
|
|
26022
|
-
& > [data-element=engagements] {
|
|
26023
|
-
border-radius: 9999px;
|
|
26024
|
-
padding: 2px;
|
|
26025
|
-
padding-left: 10px;
|
|
26026
|
-
padding-right: 10px;
|
|
26027
|
-
border: solid 1px lightgray;
|
|
26028
|
-
cursor: pointer;
|
|
26243
|
+
renderHtml(html) {
|
|
26244
|
+
const div = document.createElement("div");
|
|
26245
|
+
div.innerHTML = html;
|
|
26246
|
+
return div.innerHTML;
|
|
26029
26247
|
}
|
|
26030
|
-
|
|
26031
|
-
|
|
26032
|
-
|
|
26033
|
-
|
|
26034
|
-
|
|
26035
|
-
|
|
26036
|
-
|
|
26037
|
-
|
|
26248
|
+
toHtml(textBody) {
|
|
26249
|
+
return DomToString(XNode.create("div", null, ...textBody.split("\n").map(p => XNode.create("p", {
|
|
26250
|
+
text: p
|
|
26251
|
+
}))));
|
|
26252
|
+
}
|
|
26253
|
+
block(thread) {
|
|
26254
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26255
|
+
thread.blocked = !thread.blocked;
|
|
26256
|
+
const cloner = this.entityService.cloner(thread).copy;
|
|
26257
|
+
yield this.entityService.save(cloner);
|
|
26258
|
+
CommonEvents.onThreadMarkedAsBlocked.dispatchEvent(thread);
|
|
26259
|
+
});
|
|
26260
|
+
}
|
|
26261
|
+
delete(email) {
|
|
26262
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26263
|
+
const {
|
|
26264
|
+
emailID,
|
|
26265
|
+
status
|
|
26266
|
+
} = email;
|
|
26267
|
+
yield this.entityService.delete(Email.create({
|
|
26268
|
+
emailID,
|
|
26269
|
+
status
|
|
26270
|
+
}));
|
|
26271
|
+
CommonEvents.onDraftDeleted.dispatchEvent(email);
|
|
26272
|
+
});
|
|
26273
|
+
}
|
|
26274
|
+
};
|
|
26275
|
+
__decorate([Inject, __metadata("design:type", EntityService)], ConversationService.prototype, "entityService", void 0);
|
|
26276
|
+
__decorate([Inject, __metadata("design:type", EmailContentDownloader)], ConversationService.prototype, "emailContentDownloader", void 0);
|
|
26277
|
+
__decorate([Inject, __metadata("design:type", EngagementService)], ConversationService.prototype, "engagementService", void 0);
|
|
26278
|
+
ConversationService = __decorate([DISingleton()], ConversationService);
|
|
26279
|
+
_export("default", ConversationService);
|
|
26038
26280
|
}
|
|
26039
26281
|
};
|
|
26040
26282
|
});
|
|
26041
|
-
//# sourceMappingURL=
|
|
26283
|
+
//# sourceMappingURL=ConversationService.js.map
|
|
26042
26284
|
|
|
26043
|
-
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/
|
|
26285
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/web/page/mails/service/ConversationService");
|
|
26044
26286
|
|
|
26045
|
-
System.register(["
|
|
26287
|
+
System.register(["@web-atoms/core/dist/core/XNode"], function (_export, _context) {
|
|
26046
26288
|
"use strict";
|
|
26047
26289
|
|
|
26048
|
-
var
|
|
26049
|
-
|
|
26290
|
+
var XNode;
|
|
26291
|
+
function MediaCarousel({
|
|
26292
|
+
email = void 0
|
|
26293
|
+
}) {
|
|
26294
|
+
var _a;
|
|
26295
|
+
if (!((_a = email.attachments) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
26296
|
+
return XNode.create("div", null);
|
|
26297
|
+
}
|
|
26298
|
+
if (email.attachments.length === 1) {
|
|
26299
|
+
if (email.attachments[0].included) {
|
|
26300
|
+
return XNode.create("div", null);
|
|
26301
|
+
}
|
|
26302
|
+
}
|
|
26303
|
+
let children = [];
|
|
26304
|
+
for (const element of email.attachments) {
|
|
26305
|
+
if (/video/i.test(element.contentType)) {
|
|
26306
|
+
children.push(XNode.create("div", {
|
|
26307
|
+
"data-element": "preview"
|
|
26308
|
+
}, XNode.create("video", {
|
|
26309
|
+
controls: "true",
|
|
26310
|
+
src: element.url
|
|
26311
|
+
})));
|
|
26312
|
+
continue;
|
|
26313
|
+
}
|
|
26314
|
+
if (/image/i.test(element.contentType)) {
|
|
26315
|
+
children.push(XNode.create("div", {
|
|
26316
|
+
"data-element": "preview"
|
|
26317
|
+
}, XNode.create("img", {
|
|
26318
|
+
src: element.url
|
|
26319
|
+
})));
|
|
26320
|
+
continue;
|
|
26321
|
+
}
|
|
26322
|
+
}
|
|
26323
|
+
if (children.length) {
|
|
26324
|
+
if (children.length > 1) {
|
|
26325
|
+
children = [XNode.create("carousel-slider", {
|
|
26326
|
+
"data-element": "media"
|
|
26327
|
+
}, ...children)];
|
|
26328
|
+
}
|
|
26329
|
+
return XNode.create("div", {
|
|
26330
|
+
"data-element": "media"
|
|
26331
|
+
}, children[0]);
|
|
26332
|
+
}
|
|
26333
|
+
return XNode.create("div", {
|
|
26334
|
+
"data-element": "media"
|
|
26335
|
+
});
|
|
26336
|
+
}
|
|
26337
|
+
_export("default", MediaCarousel);
|
|
26050
26338
|
return {
|
|
26051
|
-
setters: [function (
|
|
26052
|
-
__awaiter = _tslib.__awaiter;
|
|
26053
|
-
__decorate = _tslib.__decorate;
|
|
26054
|
-
__metadata = _tslib.__metadata;
|
|
26055
|
-
}, function (_webAtomsCoreDistCoreInjectProperty) {
|
|
26056
|
-
InjectProperty = _webAtomsCoreDistCoreInjectProperty.default;
|
|
26057
|
-
}, function (_webAtomsWebControlsDistMobileAppMobileApp) {
|
|
26058
|
-
ContentPage = _webAtomsWebControlsDistMobileAppMobileApp.ContentPage;
|
|
26059
|
-
}, function (_BlogImageService) {
|
|
26060
|
-
BlogImageService = _BlogImageService.default;
|
|
26061
|
-
}, function (_BlogService) {
|
|
26062
|
-
BlogService = _BlogService.default;
|
|
26063
|
-
}, function (_webAtomsCoreDistCoreXNode) {
|
|
26339
|
+
setters: [function (_webAtomsCoreDistCoreXNode) {
|
|
26064
26340
|
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
26065
|
-
}, function (_controlsBlogHeader) {
|
|
26066
|
-
BlogHeader = _controlsBlogHeader.default;
|
|
26067
|
-
}, function (_webAtomsCoreDistCoreBind) {
|
|
26068
|
-
Bind = _webAtomsCoreDistCoreBind.default;
|
|
26069
|
-
}, function (_controlsRecentPosts) {
|
|
26070
|
-
RecentPosts = _controlsRecentPosts.default;
|
|
26071
|
-
}, function (_controlsTagCloud) {
|
|
26072
|
-
TagCloud = _controlsTagCloud.default;
|
|
26073
|
-
}, function (_controlsUpcomingEvents) {
|
|
26074
|
-
UpcomingEvents = _controlsUpcomingEvents.default;
|
|
26075
|
-
}, function (_controlsPostList) {
|
|
26076
|
-
PopularPosts = _controlsPostList.default;
|
|
26077
|
-
}, function (_PostView) {
|
|
26078
|
-
PostView = _PostView.default;
|
|
26079
|
-
}, function (_UrlService) {
|
|
26080
|
-
UrlService = _UrlService.UrlService;
|
|
26081
26341
|
}],
|
|
26082
|
-
execute: function () {
|
|
26083
|
-
_export("default", ChannelDetailPage = class ChannelDetailPage extends ContentPage {
|
|
26084
|
-
constructor() {
|
|
26085
|
-
super(...arguments);
|
|
26086
|
-
this.search = "";
|
|
26087
|
-
this.tag = "";
|
|
26088
|
-
this.author = "";
|
|
26089
|
-
this.emails = [];
|
|
26090
|
-
this.email = null;
|
|
26091
|
-
}
|
|
26092
|
-
init() {
|
|
26093
|
-
var _a;
|
|
26094
|
-
var _b;
|
|
26095
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
26096
|
-
const {
|
|
26097
|
-
channel,
|
|
26098
|
-
slug
|
|
26099
|
-
} = this.parameters;
|
|
26100
|
-
this.channel = yield this.blogService.getChannel(void 0, channel, void 0);
|
|
26101
|
-
const {
|
|
26102
|
-
mailboxID: channelID
|
|
26103
|
-
} = this.channel;
|
|
26104
|
-
document.title = "Social " + this.channel.emailAddress.emailAddress;
|
|
26105
|
-
const emailID = UrlService.getEmailID(slug);
|
|
26106
|
-
this.email = yield this.blogService.getEmail({
|
|
26107
|
-
emailID,
|
|
26108
|
-
channelID,
|
|
26109
|
-
channel
|
|
26110
|
-
});
|
|
26111
|
-
(_a = (_b = this.email).engagements) !== null && _a !== void 0 ? _a : _b.engagements = [];
|
|
26112
|
-
this.emails = [this.email];
|
|
26113
|
-
this.renderer = XNode.create("section", {
|
|
26114
|
-
"data-blog-list": "blog-list"
|
|
26115
|
-
}, XNode.create(BlogHeader, {
|
|
26116
|
-
search: Bind.twoWaysImmediate(() => this.search),
|
|
26117
|
-
channel: this.channel
|
|
26118
|
-
}), XNode.create("section", {
|
|
26119
|
-
"data-width": "100%"
|
|
26120
|
-
}, XNode.create(PostView, {
|
|
26121
|
-
channel: this.channel,
|
|
26122
|
-
email: this.emails[0]
|
|
26123
|
-
})), XNode.create("aside", null, XNode.create(TagCloud, null), XNode.create(UpcomingEvents, {
|
|
26124
|
-
channel: this.channel
|
|
26125
|
-
}), XNode.create(PopularPosts, null), XNode.create(RecentPosts, null)), XNode.create("footer", null));
|
|
26126
|
-
});
|
|
26127
|
-
}
|
|
26128
|
-
itemsUpdated() {
|
|
26129
|
-
window.pageReady = true;
|
|
26130
|
-
}
|
|
26131
|
-
});
|
|
26132
|
-
__decorate([InjectProperty, __metadata("design:type", BlogService)], ChannelDetailPage.prototype, "blogService", void 0);
|
|
26133
|
-
__decorate([InjectProperty, __metadata("design:type", BlogImageService)], ChannelDetailPage.prototype, "blogImageService", void 0);
|
|
26134
|
-
}
|
|
26342
|
+
execute: function () {}
|
|
26135
26343
|
};
|
|
26136
26344
|
});
|
|
26137
|
-
//# sourceMappingURL=
|
|
26345
|
+
//# sourceMappingURL=MediaCarousel.js.map
|
|
26138
26346
|
|
|
26139
|
-
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/public/channel/
|
|
26347
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/public/channel/controls/MediaCarousel");
|
|
26140
26348
|
|
|
26141
|
-
System.register(["@web-atoms/core/dist/core/XNode", "../../common/date/DateFormats", "
|
|
26349
|
+
System.register(["@web-atoms/core/dist/core/XNode", "../../common/date/DateFormats", "@web-atoms/core/dist/core/types", "../../web/page/mails/service/ConversationService", "./controls/MediaCarousel", "@web-atoms/core/dist/style/styled"], function (_export, _context) {
|
|
26142
26350
|
"use strict";
|
|
26143
26351
|
|
|
26144
|
-
var XNode, DateFormats,
|
|
26145
|
-
function
|
|
26352
|
+
var XNode, DateFormats, UMD, renderMail, MediaCarousel, styled, commentIcon;
|
|
26353
|
+
function PostView({
|
|
26354
|
+
email = void 0,
|
|
26146
26355
|
channel = void 0,
|
|
26147
|
-
|
|
26148
|
-
itemPath = void 0,
|
|
26149
|
-
blogService = void 0
|
|
26356
|
+
itemPath = void 0
|
|
26150
26357
|
}) {
|
|
26151
|
-
var _a
|
|
26152
|
-
const {
|
|
26153
|
-
mailboxID,
|
|
26154
|
-
email
|
|
26155
|
-
} = mailboxEmail;
|
|
26358
|
+
var _a;
|
|
26156
26359
|
const {
|
|
26157
26360
|
engagements = []
|
|
26158
26361
|
} = email;
|
|
26159
26362
|
const isComment = email.parentID !== null;
|
|
26160
|
-
|
|
26161
|
-
|
|
26162
|
-
mailbox: channel
|
|
26163
|
-
}, mailboxEmail));
|
|
26164
|
-
return XNode.create("post-summary", {
|
|
26363
|
+
return XNode.create("post-view", {
|
|
26364
|
+
"data-element": "blog-item",
|
|
26165
26365
|
"data-comment": isComment,
|
|
26166
|
-
"data-item-path": itemPath
|
|
26167
|
-
|
|
26168
|
-
|
|
26169
|
-
|
|
26170
|
-
}, XNode.create("
|
|
26171
|
-
src: Bind.oneTimeAsync(() => blogService.getImage(mailboxEmail), loaderImage)
|
|
26172
|
-
})) : XNode.create("a", {
|
|
26173
|
-
"data-element": "preview-text",
|
|
26174
|
-
href: href,
|
|
26175
|
-
text: (_b = isComment ? email.senderName : email.subject) === null || _b === void 0 ? void 0 : _b.trim()
|
|
26176
|
-
}), XNode.create("a", {
|
|
26177
|
-
"data-element": "title",
|
|
26178
|
-
href: href,
|
|
26366
|
+
"data-item-path": itemPath,
|
|
26367
|
+
"data-msg-container": "true"
|
|
26368
|
+
}, XNode.create("h4", {
|
|
26369
|
+
"data-element": "title"
|
|
26370
|
+
}, XNode.create("label", {
|
|
26179
26371
|
text: isComment ? email.senderName : email.subject
|
|
26180
|
-
}), XNode.create("h6", {
|
|
26372
|
+
})), XNode.create("h6", {
|
|
26181
26373
|
"data-element": "date",
|
|
26182
|
-
href: href,
|
|
26183
26374
|
text: DateFormats.relative.short(email.dateSent)
|
|
26184
26375
|
}), !isComment && XNode.create("h5", {
|
|
26185
|
-
href: href,
|
|
26186
26376
|
"data-element": "author",
|
|
26187
26377
|
text: email.senderName
|
|
26188
|
-
}), XNode.create("section",
|
|
26189
|
-
|
|
26190
|
-
},
|
|
26191
|
-
|
|
26378
|
+
}), XNode.create("section", {
|
|
26379
|
+
"data-element": "content"
|
|
26380
|
+
}, !email.parentID ? XNode.create("section", Object.assign({}, renderMail({
|
|
26381
|
+
email
|
|
26382
|
+
}))) : XNode.create("section", {
|
|
26383
|
+
text: email.textBody
|
|
26384
|
+
})), XNode.create(MediaCarousel, {
|
|
26385
|
+
email: email
|
|
26386
|
+
}), XNode.create("footer", null, XNode.create("button", {
|
|
26387
|
+
"data-element": "engage",
|
|
26388
|
+
"data-click-event": "react-email",
|
|
26389
|
+
style: "padding:0; margin:0; border: none; outline: none;"
|
|
26390
|
+
}, XNode.create("img", {
|
|
26391
|
+
src: UMD.resolvePath("@social-mail/social-mail-client/content/images/icons/face-plus.svg"),
|
|
26392
|
+
"style-max-height": "15px",
|
|
26393
|
+
title: "React"
|
|
26394
|
+
})), XNode.create("button", {
|
|
26395
|
+
"data-element": "engage",
|
|
26396
|
+
"data-click-event": "reply-email",
|
|
26397
|
+
style: "padding:0; margin:0; border: none; outline: none;"
|
|
26398
|
+
}, XNode.create("img", {
|
|
26399
|
+
src: UMD.resolvePath("@social-mail/social-mail-client/content/images/icons/comment-plus.svg"),
|
|
26400
|
+
"style-max-height": "15px",
|
|
26401
|
+
title: "React"
|
|
26402
|
+
})), ...engagements.map((x, index) => XNode.create("span", {
|
|
26403
|
+
"data-click-event": x.engagement === commentIcon ? "view-comments" : "engagement-click",
|
|
26192
26404
|
"data-element": "engagements",
|
|
26405
|
+
"data-item-path": `email:$, engagement: $.engagements.${index}`,
|
|
26193
26406
|
title: `View all ${x.engagement} ${x.count}`,
|
|
26194
26407
|
text: `${x.engagement} ${x.count}`
|
|
26408
|
+
})), !email.parentID && XNode.create("share-button", {
|
|
26409
|
+
title: email.subject,
|
|
26410
|
+
href: location.href
|
|
26411
|
+
}, XNode.create("i", {
|
|
26412
|
+
class: "fas fa-share"
|
|
26413
|
+
}), " Share")), XNode.create("section", {
|
|
26414
|
+
"data-element": "comments"
|
|
26415
|
+
}, ...((_a = email.children) !== null && _a !== void 0 ? _a : []).map((c, i) => XNode.create(PostView, {
|
|
26416
|
+
itemPath: `${itemPath ? itemPath : "$"}.children.${i}`,
|
|
26417
|
+
email: c
|
|
26195
26418
|
}))));
|
|
26196
26419
|
}
|
|
26197
|
-
_export("default",
|
|
26420
|
+
_export("default", PostView);
|
|
26198
26421
|
return {
|
|
26199
26422
|
setters: [function (_webAtomsCoreDistCoreXNode) {
|
|
26200
26423
|
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
26201
26424
|
}, function (_commonDateDateFormats) {
|
|
26202
26425
|
DateFormats = _commonDateDateFormats.DateFormats;
|
|
26203
|
-
}, function (
|
|
26204
|
-
|
|
26205
|
-
}, function (
|
|
26206
|
-
|
|
26207
|
-
}, function (
|
|
26208
|
-
|
|
26426
|
+
}, function (_webAtomsCoreDistCoreTypes) {
|
|
26427
|
+
UMD = _webAtomsCoreDistCoreTypes.UMD;
|
|
26428
|
+
}, function (_webPageMailsServiceConversationService) {
|
|
26429
|
+
renderMail = _webPageMailsServiceConversationService.renderMail;
|
|
26430
|
+
}, function (_controlsMediaCarousel) {
|
|
26431
|
+
MediaCarousel = _controlsMediaCarousel.default;
|
|
26209
26432
|
}, function (_webAtomsCoreDistStyleStyled) {
|
|
26210
26433
|
styled = _webAtomsCoreDistStyleStyled.default;
|
|
26211
26434
|
}],
|
|
26212
26435
|
execute: function () {
|
|
26213
|
-
commentIcon = "💬";
|
|
26214
26436
|
styled.css`
|
|
26215
|
-
|
|
26216
|
-
|
|
26217
|
-
|
|
26218
|
-
grid-template-rows: auto auto 1fr auto;
|
|
26219
|
-
|
|
26220
|
-
padding-bottom: 10px;
|
|
26221
|
-
padding-right: 20px;
|
|
26222
|
-
|
|
26223
|
-
border-bottom: solid 1px lightgray;
|
|
26224
|
-
|
|
26225
|
-
max-height: 285px;
|
|
26226
|
-
height: 285px;
|
|
26227
|
-
|
|
26228
|
-
overflow: hidden;
|
|
26229
|
-
|
|
26230
|
-
margin-bottom: 10px;
|
|
26437
|
+
display: grid;
|
|
26438
|
+
grid-template-columns: 1fr auto;
|
|
26439
|
+
grid-template-rows: auto auto auto 1fr auto auto auto;
|
|
26231
26440
|
|
|
26232
|
-
|
|
26441
|
+
padding-top: 10px;
|
|
26442
|
+
padding-bottom: 10px;
|
|
26233
26443
|
|
|
26234
|
-
|
|
26444
|
+
row-gap: 10px;
|
|
26235
26445
|
|
|
26236
|
-
|
|
26237
|
-
|
|
26238
|
-
|
|
26239
|
-
|
|
26240
|
-
|
|
26241
|
-
|
|
26242
|
-
|
|
26243
|
-
|
|
26244
|
-
|
|
26245
|
-
text-decoration: none;
|
|
26446
|
+
& > [data-element=author] {
|
|
26447
|
+
grid-row: 1;
|
|
26448
|
+
grid-column: 1;
|
|
26449
|
+
margin: 0;
|
|
26450
|
+
font-weight: normal;
|
|
26451
|
+
font-size: 0.8rem;
|
|
26452
|
+
line-height: 1;
|
|
26453
|
+
letter-spacing: 0.05rem;
|
|
26454
|
+
}
|
|
26246
26455
|
|
|
26247
|
-
|
|
26456
|
+
& > [data-element=date] {
|
|
26457
|
+
grid-row: 1;
|
|
26458
|
+
grid-column: 2;
|
|
26459
|
+
margin: 0;
|
|
26460
|
+
font-weight: normal;
|
|
26461
|
+
font-size: 0.8rem;
|
|
26462
|
+
line-height: 1;
|
|
26463
|
+
letter-spacing: 0.05rem;
|
|
26464
|
+
}
|
|
26248
26465
|
|
|
26249
|
-
|
|
26250
|
-
|
|
26251
|
-
|
|
26252
|
-
|
|
26253
|
-
|
|
26466
|
+
& > [data-element=title] {
|
|
26467
|
+
grid-row: 2;
|
|
26468
|
+
grid-column: 1 / span 2;
|
|
26469
|
+
margin: 0;
|
|
26470
|
+
font-weight: normal;
|
|
26471
|
+
font-size: 1.65rem;
|
|
26472
|
+
line-height: 1.2;
|
|
26473
|
+
}
|
|
26254
26474
|
|
|
26475
|
+
& > [data-element=media] {
|
|
26476
|
+
grid-row: 3;
|
|
26477
|
+
grid-column: 1/ span 2;
|
|
26478
|
+
display: grid;
|
|
26479
|
+
background-color: #343a400d;
|
|
26480
|
+
border-radius: 20px;
|
|
26481
|
+
overflow: hidden;
|
|
26482
|
+
& img, & video {
|
|
26483
|
+
max-height: 70vh;
|
|
26255
26484
|
}
|
|
26256
|
-
|
|
26257
|
-
|
|
26258
|
-
|
|
26259
|
-
|
|
26260
|
-
|
|
26261
|
-
|
|
26262
|
-
max-height: 120px;
|
|
26263
|
-
height: 120px;
|
|
26264
|
-
border: none;
|
|
26265
|
-
outline: none;
|
|
26266
|
-
text-decoration: none;
|
|
26267
|
-
font-size: 20px;
|
|
26268
|
-
line-height: 30px;
|
|
26269
|
-
color: white;
|
|
26270
|
-
padding: 10px;
|
|
26271
|
-
border-top-left-radius: 10px;
|
|
26272
|
-
border-top-right-radius: 10px;
|
|
26273
|
-
text-overflow: ellipsis;
|
|
26274
|
-
overflow:hidden;
|
|
26275
|
-
position: relative;
|
|
26276
|
-
&::after {
|
|
26277
|
-
position: absolute;
|
|
26278
|
-
left: 0;
|
|
26279
|
-
right: 0;
|
|
26280
|
-
top: 0;
|
|
26281
|
-
bottom: 0;
|
|
26282
|
-
content: "";
|
|
26283
|
-
pointer-events: none;
|
|
26284
|
-
background: linear-gradient(to top, rgba(255, 255, 255, 0) 1px, rgba(255, 255, 255, 0.5) 16px);
|
|
26285
|
-
}
|
|
26286
|
-
}
|
|
26287
|
-
|
|
26288
|
-
& > [data-element=title] {
|
|
26289
|
-
grid-row: 2;
|
|
26290
|
-
grid-column: 2 / span 2;
|
|
26291
|
-
font-size: 1.5em;
|
|
26292
|
-
line-height: 1.2;
|
|
26293
|
-
text-decoration: none;
|
|
26294
|
-
margin: 0;
|
|
26295
|
-
& a {
|
|
26296
|
-
text-decoration: none;
|
|
26485
|
+
& [data-element=preview] {
|
|
26486
|
+
display: grid;
|
|
26487
|
+
width: 100%;
|
|
26488
|
+
& > * {
|
|
26489
|
+
place-self: center;
|
|
26490
|
+
max-width: 100%;
|
|
26297
26491
|
}
|
|
26298
26492
|
}
|
|
26299
|
-
|
|
26300
|
-
|
|
26301
|
-
grid-row: 1;
|
|
26302
|
-
grid-column: 3;
|
|
26303
|
-
font-size: 0.70rem;
|
|
26304
|
-
line-height: 1;
|
|
26305
|
-
letter-spacing:0.05rem;
|
|
26306
|
-
margin: 0;
|
|
26307
|
-
}
|
|
26308
|
-
|
|
26309
|
-
& > [data-element=author] {
|
|
26310
|
-
grid-row: 1;
|
|
26311
|
-
grid-column: 2;
|
|
26312
|
-
font-size: 0.70rem;
|
|
26313
|
-
line-height: 1;
|
|
26314
|
-
letter-spacing:0.05rem;
|
|
26315
|
-
margin: 0;
|
|
26316
|
-
}
|
|
26317
|
-
|
|
26318
|
-
& > section {
|
|
26319
|
-
grid-row: 3;
|
|
26320
|
-
grid-column: 2 / span 2;
|
|
26321
|
-
position: relative;
|
|
26322
|
-
}
|
|
26323
|
-
|
|
26324
|
-
& > footer {
|
|
26325
|
-
grid-row: 4;
|
|
26326
|
-
grid-column: 1 / span 3;
|
|
26493
|
+
& > carousel-slider {
|
|
26494
|
+
place-self: stretch;
|
|
26327
26495
|
}
|
|
26496
|
+
}
|
|
26328
26497
|
|
|
26329
|
-
|
|
26330
|
-
|
|
26331
|
-
|
|
26332
|
-
do {
|
|
26333
|
-
const href = target.tagName === "POST-SUMMARY" && target.getAttribute("data-link");
|
|
26334
|
-
if (href) {
|
|
26335
|
-
location.href = href;
|
|
26336
|
-
return;
|
|
26337
|
-
}
|
|
26338
|
-
target = target.parentElement;
|
|
26339
|
-
} while (target);
|
|
26340
|
-
});
|
|
26498
|
+
&[has-poster] > [data-element=media] {
|
|
26499
|
+
grid-row: 5;
|
|
26500
|
+
grid-column: 1 / span 3;
|
|
26341
26501
|
}
|
|
26342
|
-
};
|
|
26343
|
-
});
|
|
26344
|
-
//# sourceMappingURL=PostSummary.js.map
|
|
26345
26502
|
|
|
26346
|
-
|
|
26503
|
+
& > [data-element=content] {
|
|
26504
|
+
grid-row: 4;
|
|
26505
|
+
grid-column: 1 / span 2;
|
|
26506
|
+
}
|
|
26347
26507
|
|
|
26348
|
-
|
|
26349
|
-
|
|
26508
|
+
& > footer {
|
|
26509
|
+
grid-row: 6;
|
|
26510
|
+
padding: 10px;
|
|
26511
|
+
grid-column: 1/ span 2;
|
|
26512
|
+
background-color: canvas;
|
|
26513
|
+
color: canvastext;
|
|
26514
|
+
display: flex;
|
|
26515
|
+
gap: 5px;
|
|
26516
|
+
flex-wrap: wrap;
|
|
26350
26517
|
|
|
26351
|
-
|
|
26352
|
-
|
|
26353
|
-
|
|
26354
|
-
|
|
26355
|
-
|
|
26356
|
-
|
|
26357
|
-
|
|
26358
|
-
|
|
26359
|
-
|
|
26360
|
-
}, function (_webAtomsCoreDistCoreXNode) {
|
|
26361
|
-
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
26362
|
-
}, function (_webAtomsCoreDistStyleStyled) {
|
|
26363
|
-
styled = _webAtomsCoreDistStyleStyled.default;
|
|
26364
|
-
}, function (_webAtomsCoreDistWebControlsAtomControl) {
|
|
26365
|
-
AtomControl = _webAtomsCoreDistWebControlsAtomControl.AtomControl;
|
|
26366
|
-
}],
|
|
26367
|
-
execute: function () {
|
|
26368
|
-
loadMoreSet = Symbol("loadMoreSet");
|
|
26369
|
-
styled.css`
|
|
26518
|
+
& > [data-element=engagements] {
|
|
26519
|
+
border-radius: 9999px;
|
|
26520
|
+
padding: 2px;
|
|
26521
|
+
padding-left: 10px;
|
|
26522
|
+
padding-right: 10px;
|
|
26523
|
+
border: solid 1px lightgray;
|
|
26524
|
+
cursor: pointer;
|
|
26525
|
+
}
|
|
26526
|
+
}
|
|
26370
26527
|
|
|
26371
|
-
|
|
26372
|
-
|
|
26373
|
-
& > span {
|
|
26374
|
-
background-color: lightgray;
|
|
26375
|
-
border-radius: 10px;
|
|
26376
|
-
padding: 3px;
|
|
26377
|
-
padding-left: 10px;
|
|
26378
|
-
padding-right: 10px;
|
|
26379
|
-
border: solid 1px gray;
|
|
26528
|
+
& > [data-element=comments] {
|
|
26529
|
+
grid-row: 7;
|
|
26380
26530
|
}
|
|
26381
26531
|
|
|
26382
|
-
`.installGlobal("
|
|
26383
|
-
|
|
26384
|
-
var _b, _c;
|
|
26385
|
-
if (value && value.items) {
|
|
26386
|
-
let cancelToken = control[loadMoreSet];
|
|
26387
|
-
(_b = control.footerRenderer) !== null && _b !== void 0 ? _b : control.footerRenderer = () => XNode.create("div", {
|
|
26388
|
-
"data-load-more": "load-more",
|
|
26389
|
-
"data-click-event": "load-more-items"
|
|
26390
|
-
}, XNode.create("span", {
|
|
26391
|
-
text: "Load more ... "
|
|
26392
|
-
}));
|
|
26393
|
-
(_c = control.headerRenderer) !== null && _c !== void 0 ? _c : control.headerRenderer = () => XNode.create("div", {
|
|
26394
|
-
class: "scroll-header",
|
|
26395
|
-
"style-height": "1px",
|
|
26396
|
-
"style-width": "100%"
|
|
26397
|
-
});
|
|
26398
|
-
if (!cancelToken) {
|
|
26399
|
-
control[loadMoreSet] = cancelToken = new CancelToken();
|
|
26400
|
-
control.bindEvent(control.element, "loadMoreItems", e => {
|
|
26401
|
-
const ce = new CustomEvent("moreItems", {
|
|
26402
|
-
detail: {
|
|
26403
|
-
pagedItems: control.pagedItems,
|
|
26404
|
-
cancelToken
|
|
26405
|
-
},
|
|
26406
|
-
bubbles: false
|
|
26407
|
-
});
|
|
26408
|
-
control.element.dispatchEvent(ce);
|
|
26409
|
-
});
|
|
26410
|
-
} else {
|
|
26411
|
-
cancelToken.cancel();
|
|
26412
|
-
control[loadMoreSet] = cancelToken = new CancelToken();
|
|
26413
|
-
}
|
|
26414
|
-
const items = control.items;
|
|
26415
|
-
if (items && Array.isArray(items)) {
|
|
26416
|
-
items.clear();
|
|
26417
|
-
items.addAll(value.items);
|
|
26418
|
-
} else {
|
|
26419
|
-
control.items = value.items;
|
|
26420
|
-
}
|
|
26421
|
-
const autoScroll = control.element.getAttribute("data-auto-scroll") !== "false";
|
|
26422
|
-
if (autoScroll) {
|
|
26423
|
-
setTimeout(() => {
|
|
26424
|
-
var _b;
|
|
26425
|
-
const ce = (_b = control.element) === null || _b === void 0 ? void 0 : _b.firstElementChild;
|
|
26426
|
-
const scrollX = window.scrollX;
|
|
26427
|
-
const scrollY = window.scrollY;
|
|
26428
|
-
ce === null || ce === void 0 ? void 0 : ce.scrollIntoView();
|
|
26429
|
-
setTimeout(() => {
|
|
26430
|
-
window.scrollTo(scrollX, scrollY);
|
|
26431
|
-
}, 100);
|
|
26432
|
-
}, 100);
|
|
26433
|
-
}
|
|
26434
|
-
control.footer = value.total && value.items && value.items.length < value.total;
|
|
26435
|
-
control.pagedItems = value;
|
|
26436
|
-
}
|
|
26437
|
-
});
|
|
26438
|
-
scrollToBottom = ({
|
|
26439
|
-
target,
|
|
26440
|
-
detail: {
|
|
26441
|
-
type,
|
|
26442
|
-
index
|
|
26443
|
-
}
|
|
26444
|
-
}) => {
|
|
26445
|
-
if (!(type === "add" && index === 0) && type !== "reset") {
|
|
26446
|
-
return;
|
|
26447
|
-
}
|
|
26448
|
-
setTimeout(() => {
|
|
26449
|
-
const e = target.firstElementChild;
|
|
26450
|
-
console.log(e);
|
|
26451
|
-
e === null || e === void 0 ? void 0 : e.scrollIntoView(true);
|
|
26452
|
-
}, 1);
|
|
26453
|
-
};
|
|
26454
|
-
_export("default", InfiniteRepeater = class InfiniteRepeater {});
|
|
26455
|
-
_a = InfiniteRepeater;
|
|
26456
|
-
InfiniteRepeater.pagedItems = start => {
|
|
26457
|
-
const setter = start(0);
|
|
26458
|
-
const setters = pagedItemsSetter(Bind.oneWayAsync(setter));
|
|
26459
|
-
setters["event-more-items"] = Bind.event((s, e) => __awaiter(void 0, void 0, void 0, function* () {
|
|
26460
|
-
var _b, _c;
|
|
26461
|
-
const st = (_c = (_b = s.items) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0;
|
|
26462
|
-
if (!st) {
|
|
26463
|
-
return;
|
|
26464
|
-
}
|
|
26465
|
-
const cancelToken = s[loadMoreSet];
|
|
26466
|
-
const loader = start(st);
|
|
26467
|
-
const results = yield loader(s, e.target, cancelToken);
|
|
26468
|
-
s.items.addAll(results.items);
|
|
26469
|
-
s.footer = results.items.length > 0;
|
|
26470
|
-
}));
|
|
26471
|
-
return setters;
|
|
26472
|
-
};
|
|
26532
|
+
`.installGlobal("post-view");
|
|
26533
|
+
commentIcon = "💬";
|
|
26473
26534
|
}
|
|
26474
26535
|
};
|
|
26475
26536
|
});
|
|
26476
|
-
//# sourceMappingURL=
|
|
26537
|
+
//# sourceMappingURL=PostView.js.map
|
|
26477
26538
|
|
|
26478
|
-
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/
|
|
26539
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/public/channel/PostView");
|
|
26479
26540
|
|
|
26480
|
-
System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "../BlogImageService", "@web-atoms/core/dist/core/XNode", "@web-atoms/
|
|
26541
|
+
System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "../BlogImageService", "../BlogService", "@web-atoms/core/dist/core/XNode", "../controls/BlogHeader", "@web-atoms/core/dist/core/Bind", "../controls/RecentPosts", "../controls/TagCloud", "../controls/UpcomingEvents", "../controls/PostList", "../PostView", "../UrlService"], function (_export, _context) {
|
|
26481
26542
|
"use strict";
|
|
26482
26543
|
|
|
26483
|
-
var __awaiter, __decorate, __metadata, InjectProperty, BlogImageService, XNode,
|
|
26544
|
+
var __awaiter, __decorate, __metadata, InjectProperty, ContentPage, BlogImageService, BlogService, XNode, BlogHeader, Bind, RecentPosts, TagCloud, UpcomingEvents, PopularPosts, PostView, UrlService, ChannelDetailPage;
|
|
26484
26545
|
_export("default", void 0);
|
|
26485
26546
|
return {
|
|
26486
26547
|
setters: [function (_tslib) {
|
|
@@ -26489,65 +26550,89 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "../BlogIm
|
|
|
26489
26550
|
__metadata = _tslib.__metadata;
|
|
26490
26551
|
}, function (_webAtomsCoreDistCoreInjectProperty) {
|
|
26491
26552
|
InjectProperty = _webAtomsCoreDistCoreInjectProperty.default;
|
|
26553
|
+
}, function (_webAtomsWebControlsDistMobileAppMobileApp) {
|
|
26554
|
+
ContentPage = _webAtomsWebControlsDistMobileAppMobileApp.ContentPage;
|
|
26492
26555
|
}, function (_BlogImageService) {
|
|
26493
26556
|
BlogImageService = _BlogImageService.default;
|
|
26557
|
+
}, function (_BlogService) {
|
|
26558
|
+
BlogService = _BlogService.default;
|
|
26494
26559
|
}, function (_webAtomsCoreDistCoreXNode) {
|
|
26495
26560
|
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
26496
|
-
}, function (
|
|
26497
|
-
|
|
26498
|
-
}, function (
|
|
26499
|
-
|
|
26500
|
-
}, function (
|
|
26501
|
-
|
|
26502
|
-
}, function (
|
|
26503
|
-
|
|
26561
|
+
}, function (_controlsBlogHeader) {
|
|
26562
|
+
BlogHeader = _controlsBlogHeader.default;
|
|
26563
|
+
}, function (_webAtomsCoreDistCoreBind) {
|
|
26564
|
+
Bind = _webAtomsCoreDistCoreBind.default;
|
|
26565
|
+
}, function (_controlsRecentPosts) {
|
|
26566
|
+
RecentPosts = _controlsRecentPosts.default;
|
|
26567
|
+
}, function (_controlsTagCloud) {
|
|
26568
|
+
TagCloud = _controlsTagCloud.default;
|
|
26569
|
+
}, function (_controlsUpcomingEvents) {
|
|
26570
|
+
UpcomingEvents = _controlsUpcomingEvents.default;
|
|
26571
|
+
}, function (_controlsPostList) {
|
|
26572
|
+
PopularPosts = _controlsPostList.default;
|
|
26573
|
+
}, function (_PostView) {
|
|
26574
|
+
PostView = _PostView.default;
|
|
26575
|
+
}, function (_UrlService) {
|
|
26576
|
+
UrlService = _UrlService.UrlService;
|
|
26504
26577
|
}],
|
|
26505
26578
|
execute: function () {
|
|
26506
|
-
_export("default",
|
|
26579
|
+
_export("default", ChannelDetailPage = class ChannelDetailPage extends ContentPage {
|
|
26507
26580
|
constructor() {
|
|
26508
26581
|
super(...arguments);
|
|
26509
26582
|
this.search = "";
|
|
26510
26583
|
this.tag = "";
|
|
26511
26584
|
this.author = "";
|
|
26512
26585
|
this.emails = [];
|
|
26586
|
+
this.email = null;
|
|
26513
26587
|
}
|
|
26514
|
-
|
|
26588
|
+
init() {
|
|
26589
|
+
var _a;
|
|
26590
|
+
var _b;
|
|
26515
26591
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26516
|
-
|
|
26517
|
-
|
|
26518
|
-
|
|
26592
|
+
const {
|
|
26593
|
+
channel,
|
|
26594
|
+
slug
|
|
26595
|
+
} = this.parameters;
|
|
26596
|
+
this.channel = yield this.blogService.getChannel(void 0, channel, void 0);
|
|
26597
|
+
const {
|
|
26598
|
+
mailboxID: channelID
|
|
26599
|
+
} = this.channel;
|
|
26600
|
+
const emailID = UrlService.getEmailID(slug);
|
|
26601
|
+
this.email = yield this.blogService.getEmail({
|
|
26602
|
+
emailID,
|
|
26603
|
+
channelID,
|
|
26604
|
+
channel
|
|
26605
|
+
});
|
|
26606
|
+
document.title = this.email.subject + " - Social " + this.channel.emailAddress.emailAddress;
|
|
26607
|
+
(_a = (_b = this.email).engagements) !== null && _a !== void 0 ? _a : _b.engagements = [];
|
|
26608
|
+
this.emails = [this.email];
|
|
26609
|
+
this.renderer = XNode.create("section", {
|
|
26610
|
+
"data-blog-list": "blog-list"
|
|
26611
|
+
}, XNode.create(BlogHeader, {
|
|
26612
|
+
search: Bind.twoWaysImmediate(() => this.search),
|
|
26613
|
+
channel: this.channel
|
|
26614
|
+
}), XNode.create("section", {
|
|
26519
26615
|
"data-width": "100%"
|
|
26520
|
-
}, XNode.create(
|
|
26521
|
-
|
|
26522
|
-
|
|
26523
|
-
|
|
26524
|
-
|
|
26525
|
-
|
|
26526
|
-
channel: this.channel,
|
|
26527
|
-
mailboxEmail: x
|
|
26528
|
-
}),
|
|
26529
|
-
items: this.emails
|
|
26530
|
-
}, InfiniteRepeater.pagedItems(start => (c, e, cancelToken) => this.blogService.getEmails({
|
|
26531
|
-
channelID: this.channel.mailboxID,
|
|
26532
|
-
author: this.author,
|
|
26533
|
-
tag: this.tag,
|
|
26534
|
-
start,
|
|
26535
|
-
search: this.search,
|
|
26536
|
-
cancelToken
|
|
26537
|
-
})))));
|
|
26616
|
+
}, XNode.create(PostView, {
|
|
26617
|
+
channel: this.channel,
|
|
26618
|
+
email: this.emails[0]
|
|
26619
|
+
})), XNode.create("aside", null, XNode.create(TagCloud, null), XNode.create(UpcomingEvents, {
|
|
26620
|
+
channel: this.channel
|
|
26621
|
+
}), XNode.create(PopularPosts, null), XNode.create(RecentPosts, null)), XNode.create("footer", null));
|
|
26538
26622
|
});
|
|
26539
26623
|
}
|
|
26540
26624
|
itemsUpdated() {
|
|
26541
26625
|
window.pageReady = true;
|
|
26542
26626
|
}
|
|
26543
26627
|
});
|
|
26544
|
-
__decorate([InjectProperty, __metadata("design:type",
|
|
26628
|
+
__decorate([InjectProperty, __metadata("design:type", BlogService)], ChannelDetailPage.prototype, "blogService", void 0);
|
|
26629
|
+
__decorate([InjectProperty, __metadata("design:type", BlogImageService)], ChannelDetailPage.prototype, "blogImageService", void 0);
|
|
26545
26630
|
}
|
|
26546
26631
|
};
|
|
26547
26632
|
});
|
|
26548
|
-
//# sourceMappingURL=
|
|
26633
|
+
//# sourceMappingURL=ChannelDetailPage.js.map
|
|
26549
26634
|
|
|
26550
|
-
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/public/channel/pages/
|
|
26635
|
+
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/public/channel/pages/ChannelDetailPage");
|
|
26551
26636
|
|
|
26552
26637
|
System.register(["@web-atoms/core/dist/core/Command"], function (_export, _context) {
|
|
26553
26638
|
"use strict";
|
|
@@ -26567,15 +26652,20 @@ System.register(["@web-atoms/core/dist/core/Command"], function (_export, _conte
|
|
|
26567
26652
|
openPage: () => _context.import("../pages/ChannelCalendarPage")
|
|
26568
26653
|
});
|
|
26569
26654
|
ChannelCommands.channelVideos = Command.create({
|
|
26570
|
-
route: "/@{channel}/videos",
|
|
26655
|
+
route: "/@{channel}/videos/{start?}",
|
|
26571
26656
|
routeOrder: 100,
|
|
26572
26657
|
openPage: () => _context.import("../pages/ChannelVideosPage")
|
|
26573
26658
|
});
|
|
26574
26659
|
ChannelCommands.channelPhotos = Command.create({
|
|
26575
|
-
route: "/@{channel}/photos",
|
|
26660
|
+
route: "/@{channel}/photos/{start?}",
|
|
26576
26661
|
routeOrder: 100,
|
|
26577
26662
|
openPage: () => _context.import("../pages/ChannelPhotosPage")
|
|
26578
26663
|
});
|
|
26664
|
+
ChannelCommands.channelTag = Command.create({
|
|
26665
|
+
route: "/@{channel}/tag/{tag}",
|
|
26666
|
+
routeOrder: 100,
|
|
26667
|
+
openPage: () => _context.import("../pages/ChannelHomePage")
|
|
26668
|
+
});
|
|
26579
26669
|
ChannelCommands.channelDetail = Command.create({
|
|
26580
26670
|
route: "/@{channel}/{slug}",
|
|
26581
26671
|
routeOrder: 500,
|
|
@@ -29112,8 +29202,17 @@ System.register(["tslib", "@web-atoms/web-controls/dist/desktop-app/MobileDeskto
|
|
|
29112
29202
|
}
|
|
29113
29203
|
`.withOrder("high").installGlobal("[channel-app]");
|
|
29114
29204
|
styled.css`
|
|
29115
|
-
|
|
29116
|
-
|
|
29205
|
+
overflow: auto !important;
|
|
29206
|
+
`.withOrder("high").installGlobal("body,html");
|
|
29207
|
+
if (AppLocation.isLocalTesting) {
|
|
29208
|
+
styled.css`
|
|
29209
|
+
&[data-desktop-app=desktop-app] {
|
|
29210
|
+
max-width: 1024px;
|
|
29211
|
+
min-width: 1024px;
|
|
29212
|
+
width: 1024px;
|
|
29213
|
+
}
|
|
29214
|
+
`.withOrder("high").installGlobal("[channel-app]");
|
|
29215
|
+
}
|
|
29117
29216
|
ChannelApp = class ChannelApp extends MobileDesktopApp {
|
|
29118
29217
|
init() {
|
|
29119
29218
|
return __awaiter(this, void 0, void 0, function* () {
|