@social-mail/social-mail-client 1.8.265 → 1.8.267
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin/AdminAppIndex.pack.global.css +1 -1
- package/dist/admin/AdminAppIndex.pack.global.css.map +1 -1
- package/dist/common/pages/websites/detail/WebSiteDetail.global.css +1 -1
- package/dist/common/pages/websites/detail/WebSiteDetail.global.css.map +1 -1
- package/dist/public/channel/pages/{ChannelDetailPage.d.ts → PublicChannelPage.d.ts} +2 -2
- package/dist/public/channel/pages/{ChannelDetailPage.d.ts.map → PublicChannelPage.d.ts.map} +1 -1
- package/dist/public/channel/pages/{ChannelDetailPage.js → PublicChannelPage.js} +8 -8
- package/dist/public/channel/pages/{ChannelDetailPage.js.map → PublicChannelPage.js.map} +1 -1
- package/dist/site-editor-app/SiteEditorApp.pack.global.css +1 -1
- package/dist/site-editor-app/SiteEditorApp.pack.global.css.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.global.css +1 -1
- package/dist/web/AppIndex.pack.global.css.map +1 -1
- package/package.json +1 -1
- package/src/common/pages/websites/detail/WebSiteDetail.global.css +2 -1
- package/src/public/channel/pages/{ChannelDetailPage.tsx → PublicChannelPage.tsx} +130 -130
|
@@ -1,131 +1,131 @@
|
|
|
1
|
-
import InjectProperty from "@web-atoms/core/dist/core/InjectProperty";
|
|
2
|
-
import { ContentPage } from "@web-atoms/web-controls/dist/mobile-app/MobileApp";
|
|
3
|
-
import BlogImageService from "../BlogImageService";
|
|
4
|
-
import BlogService from "../BlogService";
|
|
5
|
-
import { IEmail, IMailbox } from "../../../model/model";
|
|
6
|
-
import XNode from "@web-atoms/core/dist/core/XNode";
|
|
7
|
-
import BlogHeader from "../controls/blog-header/BlogHeader";
|
|
8
|
-
import Bind from "@web-atoms/core/dist/core/Bind";
|
|
9
|
-
import AtomRepeater from "@web-atoms/web-controls/dist/basic/AtomRepeater";
|
|
10
|
-
import PostSummary from "../controls/post-summary/PostSummary";
|
|
11
|
-
import InfiniteRepeater from "../../../common/controls/repeater/InfiniteRepeater";
|
|
12
|
-
import RecentPosts from "../controls/RecentPosts";
|
|
13
|
-
import TagCloud from "../controls/TagCloud";
|
|
14
|
-
import UpcomingEvents from "../controls/UpcomingEvents";
|
|
15
|
-
import PopularPosts from "../controls/PostList";
|
|
16
|
-
import PostView from "../controls/post-view/PostView";
|
|
17
|
-
import { UrlService } from "../UrlService";
|
|
18
|
-
import EntityService from "../../../services/EntityService";
|
|
19
|
-
import Action from "@web-atoms/core/dist/view-model/Action";
|
|
20
|
-
import { Mailto } from "../../../common/Mailto";
|
|
21
|
-
import EmojiPopup from "../emoji/EmojiPopup";
|
|
22
|
-
import { AncestorEnumerator } from "@web-atoms/core/dist/web/core/AtomUI";
|
|
23
|
-
|
|
24
|
-
const commentIcon = "💬";
|
|
25
|
-
|
|
26
|
-
export default class
|
|
27
|
-
@InjectProperty
|
|
28
|
-
blogService: BlogService;
|
|
29
|
-
|
|
30
|
-
@InjectProperty
|
|
31
|
-
blogImageService: BlogImageService;
|
|
32
|
-
|
|
33
|
-
channel: IMailbox;
|
|
34
|
-
|
|
35
|
-
search = "";
|
|
36
|
-
|
|
37
|
-
tag = "";
|
|
38
|
-
author = "";
|
|
39
|
-
|
|
40
|
-
private emails: IEmail[] = [];
|
|
41
|
-
|
|
42
|
-
private email: IEmail = null;
|
|
43
|
-
|
|
44
|
-
async init() {
|
|
45
|
-
|
|
46
|
-
const { channel, slug } = this.parameters;
|
|
47
|
-
|
|
48
|
-
this.channel = await this.blogService.getChannel(void 0, channel, void 0);
|
|
49
|
-
|
|
50
|
-
const { mailboxID: channelID } = this.channel;
|
|
51
|
-
|
|
52
|
-
const emailID = UrlService.getEmailID(slug);
|
|
53
|
-
|
|
54
|
-
this.email = await this.blogService.getEmail({ emailID, channelID, channel });
|
|
55
|
-
|
|
56
|
-
document.title = this.email.subject + " - Social " + this.channel.emailAddress.emailAddress;
|
|
57
|
-
|
|
58
|
-
this.email.engagements ??= [];
|
|
59
|
-
this.emails = [this.email];
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
this.renderer = <section data-blog-list="blog-list">
|
|
63
|
-
<BlogHeader
|
|
64
|
-
search={Bind.twoWaysImmediate(() => this.search)}
|
|
65
|
-
channel={this.channel}/>
|
|
66
|
-
<section data-width="100%">
|
|
67
|
-
<PostView
|
|
68
|
-
channel={this.channel}
|
|
69
|
-
email={this.emails[0]}
|
|
70
|
-
/>
|
|
71
|
-
</section>
|
|
72
|
-
<aside>
|
|
73
|
-
<TagCloud/>
|
|
74
|
-
<UpcomingEvents channel={this.channel}/>
|
|
75
|
-
<PopularPosts/>
|
|
76
|
-
<RecentPosts/>
|
|
77
|
-
</aside>
|
|
78
|
-
<footer></footer>
|
|
79
|
-
</section>;
|
|
80
|
-
|
|
81
|
-
this.resolve(EntityService).postPageReady();
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
@Action({ onEvent: "engagement-click"})
|
|
85
|
-
engagementClick({ engagement}) {
|
|
86
|
-
const emoji = engagement.engagement;
|
|
87
|
-
this.reactAction(emoji);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
reactAction(emoji) {
|
|
91
|
-
const { email } = this;
|
|
92
|
-
const { headerMessageID } = email;
|
|
93
|
-
const { channel: { emailAddress: { emailAddress }} } = this;
|
|
94
|
-
const subject = `${emoji}:${Number(email.emailID).toString(36)}:${headerMessageID}`;
|
|
95
|
-
const link = Mailto.create({ to: emailAddress, subject, body: emoji, inReplyTo: headerMessageID });
|
|
96
|
-
// const link = `mailto:${channel.emailAddress.emailAddress}?subject=${subject}&body=${emoji}&in-reply-to=${headerMessageID}`;
|
|
97
|
-
this.element.dispatchEvent(new CustomEvent("shareLink", {
|
|
98
|
-
detail: {
|
|
99
|
-
link,
|
|
100
|
-
shareTitle: `React ${emoji} Via`
|
|
101
|
-
},
|
|
102
|
-
bubbles: true
|
|
103
|
-
}));
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
@Action({ onEvent: "react-email"})
|
|
108
|
-
async reactEmail(email, ce: CustomEvent) {
|
|
109
|
-
const parentElement = AncestorEnumerator.findSelector(ce.target as HTMLElement, "button,a") ?? ce.target as HTMLElement;
|
|
110
|
-
const emoji: string = await EmojiPopup.show(parentElement);
|
|
111
|
-
this.reactAction(emoji);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
@Action({ onEvent: "reply-email"})
|
|
115
|
-
async replyEmail(email, ce: CustomEvent) {
|
|
116
|
-
const emoji = commentIcon;
|
|
117
|
-
email = this.email;
|
|
118
|
-
const { headerMessageID } = email;
|
|
119
|
-
const { channel: { emailAddress: { emailAddress }} } = this;
|
|
120
|
-
const subject = `${emoji}:${Number(email.emailID).toString(36)}:${headerMessageID}`;
|
|
121
|
-
const link = Mailto.create({ to: emailAddress, subject, inReplyTo: headerMessageID });
|
|
122
|
-
// const link = `mailto:${channel.emailAddress.emailAddress}?subject=${subject}&in-reply-to=${headerMessageID}&body=&`;
|
|
123
|
-
this.element.dispatchEvent(new CustomEvent("shareLink", {
|
|
124
|
-
detail: {
|
|
125
|
-
link,
|
|
126
|
-
shareTitle: "Add Comment Via"
|
|
127
|
-
},
|
|
128
|
-
bubbles: true
|
|
129
|
-
}));
|
|
130
|
-
}
|
|
1
|
+
import InjectProperty from "@web-atoms/core/dist/core/InjectProperty";
|
|
2
|
+
import { ContentPage } from "@web-atoms/web-controls/dist/mobile-app/MobileApp";
|
|
3
|
+
import BlogImageService from "../BlogImageService";
|
|
4
|
+
import BlogService from "../BlogService";
|
|
5
|
+
import { IEmail, IMailbox } from "../../../model/model";
|
|
6
|
+
import XNode from "@web-atoms/core/dist/core/XNode";
|
|
7
|
+
import BlogHeader from "../controls/blog-header/BlogHeader";
|
|
8
|
+
import Bind from "@web-atoms/core/dist/core/Bind";
|
|
9
|
+
import AtomRepeater from "@web-atoms/web-controls/dist/basic/AtomRepeater";
|
|
10
|
+
import PostSummary from "../controls/post-summary/PostSummary";
|
|
11
|
+
import InfiniteRepeater from "../../../common/controls/repeater/InfiniteRepeater";
|
|
12
|
+
import RecentPosts from "../controls/RecentPosts";
|
|
13
|
+
import TagCloud from "../controls/TagCloud";
|
|
14
|
+
import UpcomingEvents from "../controls/UpcomingEvents";
|
|
15
|
+
import PopularPosts from "../controls/PostList";
|
|
16
|
+
import PostView from "../controls/post-view/PostView";
|
|
17
|
+
import { UrlService } from "../UrlService";
|
|
18
|
+
import EntityService from "../../../services/EntityService";
|
|
19
|
+
import Action from "@web-atoms/core/dist/view-model/Action";
|
|
20
|
+
import { Mailto } from "../../../common/Mailto";
|
|
21
|
+
import EmojiPopup from "../emoji/EmojiPopup";
|
|
22
|
+
import { AncestorEnumerator } from "@web-atoms/core/dist/web/core/AtomUI";
|
|
23
|
+
|
|
24
|
+
const commentIcon = "💬";
|
|
25
|
+
|
|
26
|
+
export default class PublicChannelPage extends ContentPage<{ channel, slug }> {
|
|
27
|
+
@InjectProperty
|
|
28
|
+
blogService: BlogService;
|
|
29
|
+
|
|
30
|
+
@InjectProperty
|
|
31
|
+
blogImageService: BlogImageService;
|
|
32
|
+
|
|
33
|
+
channel: IMailbox;
|
|
34
|
+
|
|
35
|
+
search = "";
|
|
36
|
+
|
|
37
|
+
tag = "";
|
|
38
|
+
author = "";
|
|
39
|
+
|
|
40
|
+
private emails: IEmail[] = [];
|
|
41
|
+
|
|
42
|
+
private email: IEmail = null;
|
|
43
|
+
|
|
44
|
+
async init() {
|
|
45
|
+
|
|
46
|
+
const { channel, slug } = this.parameters;
|
|
47
|
+
|
|
48
|
+
this.channel = await this.blogService.getChannel(void 0, channel, void 0);
|
|
49
|
+
|
|
50
|
+
const { mailboxID: channelID } = this.channel;
|
|
51
|
+
|
|
52
|
+
const emailID = UrlService.getEmailID(slug);
|
|
53
|
+
|
|
54
|
+
this.email = await this.blogService.getEmail({ emailID, channelID, channel });
|
|
55
|
+
|
|
56
|
+
document.title = this.email.subject + " - Social " + this.channel.emailAddress.emailAddress;
|
|
57
|
+
|
|
58
|
+
this.email.engagements ??= [];
|
|
59
|
+
this.emails = [this.email];
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
this.renderer = <section data-blog-list="blog-list">
|
|
63
|
+
<BlogHeader
|
|
64
|
+
search={Bind.twoWaysImmediate(() => this.search)}
|
|
65
|
+
channel={this.channel}/>
|
|
66
|
+
<section data-width="100%">
|
|
67
|
+
<PostView
|
|
68
|
+
channel={this.channel}
|
|
69
|
+
email={this.emails[0]}
|
|
70
|
+
/>
|
|
71
|
+
</section>
|
|
72
|
+
<aside>
|
|
73
|
+
<TagCloud/>
|
|
74
|
+
<UpcomingEvents channel={this.channel}/>
|
|
75
|
+
<PopularPosts/>
|
|
76
|
+
<RecentPosts/>
|
|
77
|
+
</aside>
|
|
78
|
+
<footer></footer>
|
|
79
|
+
</section>;
|
|
80
|
+
|
|
81
|
+
this.resolve(EntityService).postPageReady();
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@Action({ onEvent: "engagement-click"})
|
|
85
|
+
engagementClick({ engagement}) {
|
|
86
|
+
const emoji = engagement.engagement;
|
|
87
|
+
this.reactAction(emoji);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
reactAction(emoji) {
|
|
91
|
+
const { email } = this;
|
|
92
|
+
const { headerMessageID } = email;
|
|
93
|
+
const { channel: { emailAddress: { emailAddress }} } = this;
|
|
94
|
+
const subject = `${emoji}:${Number(email.emailID).toString(36)}:${headerMessageID}`;
|
|
95
|
+
const link = Mailto.create({ to: emailAddress, subject, body: emoji, inReplyTo: headerMessageID });
|
|
96
|
+
// const link = `mailto:${channel.emailAddress.emailAddress}?subject=${subject}&body=${emoji}&in-reply-to=${headerMessageID}`;
|
|
97
|
+
this.element.dispatchEvent(new CustomEvent("shareLink", {
|
|
98
|
+
detail: {
|
|
99
|
+
link,
|
|
100
|
+
shareTitle: `React ${emoji} Via`
|
|
101
|
+
},
|
|
102
|
+
bubbles: true
|
|
103
|
+
}));
|
|
104
|
+
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@Action({ onEvent: "react-email"})
|
|
108
|
+
async reactEmail(email, ce: CustomEvent) {
|
|
109
|
+
const parentElement = AncestorEnumerator.findSelector(ce.target as HTMLElement, "button,a") ?? ce.target as HTMLElement;
|
|
110
|
+
const emoji: string = await EmojiPopup.show(parentElement);
|
|
111
|
+
this.reactAction(emoji);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@Action({ onEvent: "reply-email"})
|
|
115
|
+
async replyEmail(email, ce: CustomEvent) {
|
|
116
|
+
const emoji = commentIcon;
|
|
117
|
+
email = this.email;
|
|
118
|
+
const { headerMessageID } = email;
|
|
119
|
+
const { channel: { emailAddress: { emailAddress }} } = this;
|
|
120
|
+
const subject = `${emoji}:${Number(email.emailID).toString(36)}:${headerMessageID}`;
|
|
121
|
+
const link = Mailto.create({ to: emailAddress, subject, inReplyTo: headerMessageID });
|
|
122
|
+
// const link = `mailto:${channel.emailAddress.emailAddress}?subject=${subject}&in-reply-to=${headerMessageID}&body=&`;
|
|
123
|
+
this.element.dispatchEvent(new CustomEvent("shareLink", {
|
|
124
|
+
detail: {
|
|
125
|
+
link,
|
|
126
|
+
shareTitle: "Add Comment Via"
|
|
127
|
+
},
|
|
128
|
+
bubbles: true
|
|
129
|
+
}));
|
|
130
|
+
}
|
|
131
131
|
}
|