@social-mail/social-mail-client 1.8.279 → 1.8.280

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/common/CDN.d.ts.map +1 -1
  2. package/dist/common/CDN.js +4 -1
  3. package/dist/common/CDN.js.map +1 -1
  4. package/dist/public/channel/ChannelApp.pack.js +4 -1
  5. package/dist/public/channel/ChannelApp.pack.js.map +1 -1
  6. package/dist/public/channel/ChannelApp.pack.min.js +1 -1
  7. package/dist/public/channel/ChannelApp.pack.min.js.map +1 -1
  8. package/dist/public/channel/controls/channel-post/ChannelPost.d.ts +1 -0
  9. package/dist/public/channel/controls/channel-post/ChannelPost.d.ts.map +1 -1
  10. package/dist/public/channel/controls/channel-post/ChannelPost.js.map +1 -1
  11. package/dist/public/channel/pages/BaseChannelPage.d.ts.map +1 -1
  12. package/dist/public/channel/pages/BaseChannelPage.js.map +1 -1
  13. package/dist/site-editor-app/SiteEditorApp.pack.js +4 -1
  14. package/dist/site-editor-app/SiteEditorApp.pack.js.map +1 -1
  15. package/dist/site-editor-app/SiteEditorApp.pack.min.js +1 -1
  16. package/dist/site-editor-app/SiteEditorApp.pack.min.js.map +1 -1
  17. package/dist/tsconfig.tsbuildinfo +1 -1
  18. package/package.json +1 -1
  19. package/src/common/CDN.ts +4 -1
  20. package/src/public/channel/controls/channel-post/ChannelPost.tsx +2 -1
  21. package/src/public/channel/pages/BaseChannelPage.tsx +1 -4
  22. package/dist/public/channel/controls/post-summary/PostSummary.d.ts +0 -17
  23. package/dist/public/channel/controls/post-summary/PostSummary.d.ts.map +0 -1
  24. package/dist/public/channel/controls/post-summary/PostSummary.global.css +0 -2
  25. package/dist/public/channel/controls/post-summary/PostSummary.global.css.map +0 -1
  26. package/dist/public/channel/controls/post-summary/PostSummary.js +0 -86
  27. package/dist/public/channel/controls/post-summary/PostSummary.js.map +0 -1
  28. package/dist/public/channel/controls/post-view/PostView.d.ts +0 -16
  29. package/dist/public/channel/controls/post-view/PostView.d.ts.map +0 -1
  30. package/dist/public/channel/controls/post-view/PostView.global.css +0 -2
  31. package/dist/public/channel/controls/post-view/PostView.global.css.map +0 -1
  32. package/dist/public/channel/controls/post-view/PostView.js +0 -88
  33. package/dist/public/channel/controls/post-view/PostView.js.map +0 -1
  34. package/dist/public/channel/pages/ChannelHomePage.d.ts +0 -18
  35. package/dist/public/channel/pages/ChannelHomePage.d.ts.map +0 -1
  36. package/dist/public/channel/pages/ChannelHomePage.js +0 -84
  37. package/dist/public/channel/pages/ChannelHomePage.js.map +0 -1
  38. package/dist/public/channel/pages/PublicChannelPage.d.ts +0 -25
  39. package/dist/public/channel/pages/PublicChannelPage.d.ts.map +0 -1
  40. package/dist/public/channel/pages/PublicChannelPage.js +0 -183
  41. package/dist/public/channel/pages/PublicChannelPage.js.map +0 -1
  42. package/src/public/channel/controls/post-summary/PostSummary.global.css +0 -162
  43. package/src/public/channel/controls/post-summary/PostSummary.tsx +0 -82
  44. package/src/public/channel/controls/post-view/PostView.global.css +0 -114
  45. package/src/public/channel/controls/post-view/PostView.tsx +0 -88
  46. package/src/public/channel/pages/ChannelHomePage.tsx +0 -69
  47. package/src/public/channel/pages/PublicChannelPage.tsx +0 -131
@@ -1,69 +0,0 @@
1
- import InjectProperty from "@web-atoms/core/dist/core/InjectProperty";
2
- import BlogImageService from "../BlogImageService";
3
- import { IEmail } from "../../../model/model";
4
- import XNode from "@web-atoms/core/dist/core/XNode";
5
- import Bind from "@web-atoms/core/dist/core/Bind";
6
- import AtomRepeater from "@web-atoms/web-controls/dist/basic/AtomRepeater";
7
- import PostSummary from "../controls/post-summary/PostSummary";
8
- import BaseChannelPage from "./BaseChannelPage";
9
- import IPagedList from "@web-atoms/entity/dist/models/IPagedList";
10
- import Pager from "../controls/Pager";
11
- import { UrlService } from "../UrlService";
12
-
13
-
14
- export default class ChannelHomePage extends BaseChannelPage<{ channel, tag, author, start }> {
15
-
16
- @InjectProperty
17
- blogImageService: BlogImageService;
18
-
19
- search = "";
20
-
21
- tag = "";
22
- author = "";
23
-
24
- start = 0;
25
- size = 25;
26
-
27
- private emails: IPagedList<IEmail> = null;
28
-
29
- async renderBody() {
30
-
31
- this.start = Number.parseInt(this.parameters?.start ?? "0", 10);
32
- this.tag = this.parameters.tag ?? "";
33
- this.author = this.parameters.author ?? "";
34
-
35
- document.title = "Social " + this.channel.emailAddress.emailAddress;
36
-
37
- this.render(<div emails={Bind.oneWayAsync((c, e, cancelToken) => this.blogService.getEmails({
38
- channelID: this.channel.mailboxID,
39
- author: this.author,
40
- tag: this.tag,
41
- start: this.start,
42
- search: this.search,
43
- cancelToken
44
- }))}></div>);
45
-
46
- return <section
47
- data-width="100%"
48
- >
49
- <AtomRepeater
50
- data-items-updated-event="items-updated"
51
- data-auto-scroll="false"
52
- itemRenderer={(x) => <PostSummary blogService={this.blogImageService} channel={this.channel} mailboxEmail={x} />}
53
- items={Bind.oneWay(() => this.emails ? this.emails.items : void 0)}
54
- footer={Bind.oneWay(() => this.emails)}
55
- footerRenderer={(x: IPagedList<IEmail>) =>
56
- <Pager
57
- current={this.start}
58
- end={Math.floor(x.total/this.size)-1}
59
- url={(n) => UrlService.toListUrl(this.channel, n)}
60
- />
61
- }
62
- />
63
- </section>
64
- ;
65
-
66
- this.entityService.postPageReady();
67
- }
68
-
69
- }
@@ -1,131 +0,0 @@
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}:${BigInt(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
- }