@social-mail/social-mail-client 1.8.278 → 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 (78) hide show
  1. package/dist/admin/AdminAppIndex.pack.js +6 -1
  2. package/dist/admin/AdminAppIndex.pack.js.map +1 -1
  3. package/dist/admin/AdminAppIndex.pack.min.js +1 -1
  4. package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
  5. package/dist/common/CDN.d.ts.map +1 -1
  6. package/dist/common/CDN.js +4 -1
  7. package/dist/common/CDN.js.map +1 -1
  8. package/dist/public/channel/ChannelApp.pack.js +46 -4
  9. package/dist/public/channel/ChannelApp.pack.js.map +1 -1
  10. package/dist/public/channel/ChannelApp.pack.min.js +1 -1
  11. package/dist/public/channel/ChannelApp.pack.min.js.map +1 -1
  12. package/dist/public/channel/UrlService.d.ts +1 -0
  13. package/dist/public/channel/UrlService.d.ts.map +1 -1
  14. package/dist/public/channel/UrlService.js +18 -0
  15. package/dist/public/channel/UrlService.js.map +1 -1
  16. package/dist/public/channel/controls/channel-post/ChannelPost.d.ts +1 -0
  17. package/dist/public/channel/controls/channel-post/ChannelPost.d.ts.map +1 -1
  18. package/dist/public/channel/controls/channel-post/ChannelPost.js +4 -1
  19. package/dist/public/channel/controls/channel-post/ChannelPost.js.map +1 -1
  20. package/dist/public/channel/pages/BaseChannelPage.d.ts.map +1 -1
  21. package/dist/public/channel/pages/BaseChannelPage.js.map +1 -1
  22. package/dist/public/channel/pages/posts/ChannelPage.d.ts +1 -3
  23. package/dist/public/channel/pages/posts/ChannelPage.d.ts.map +1 -1
  24. package/dist/public/channel/pages/posts/ChannelPage.js +14 -1
  25. package/dist/public/channel/pages/posts/ChannelPage.js.map +1 -1
  26. package/dist/public/contact-us/ContactUsApp.d.ts.map +1 -1
  27. package/dist/public/contact-us/ContactUsApp.js +5 -0
  28. package/dist/public/contact-us/ContactUsApp.js.map +1 -1
  29. package/dist/public/contact-us/ContactUsApp.pack.js +5 -0
  30. package/dist/public/contact-us/ContactUsApp.pack.js.map +1 -1
  31. package/dist/public/contact-us/ContactUsApp.pack.min.js +1 -1
  32. package/dist/public/contact-us/ContactUsApp.pack.min.js.map +1 -1
  33. package/dist/site-editor-app/SiteEditorApp.pack.js +10 -2
  34. package/dist/site-editor-app/SiteEditorApp.pack.js.map +1 -1
  35. package/dist/site-editor-app/SiteEditorApp.pack.min.js +1 -1
  36. package/dist/site-editor-app/SiteEditorApp.pack.min.js.map +1 -1
  37. package/dist/tsconfig.tsbuildinfo +1 -1
  38. package/dist/web/AppIndex.pack.js +6 -1
  39. package/dist/web/AppIndex.pack.js.map +1 -1
  40. package/dist/web/AppIndex.pack.min.js +1 -1
  41. package/dist/web/AppIndex.pack.min.js.map +1 -1
  42. package/dist/web/page/mails/service/ConversationService.d.ts.map +1 -1
  43. package/dist/web/page/mails/service/ConversationService.js +6 -1
  44. package/dist/web/page/mails/service/ConversationService.js.map +1 -1
  45. package/package.json +1 -1
  46. package/src/common/CDN.ts +4 -1
  47. package/src/public/channel/UrlService.ts +14 -0
  48. package/src/public/channel/controls/channel-post/ChannelPost.tsx +4 -3
  49. package/src/public/channel/pages/BaseChannelPage.tsx +1 -4
  50. package/src/public/channel/pages/posts/ChannelPage.tsx +17 -2
  51. package/src/public/contact-us/ContactUsApp.tsx +6 -0
  52. package/src/web/page/mails/service/ConversationService.tsx +6 -1
  53. package/dist/public/channel/controls/post-summary/PostSummary.d.ts +0 -17
  54. package/dist/public/channel/controls/post-summary/PostSummary.d.ts.map +0 -1
  55. package/dist/public/channel/controls/post-summary/PostSummary.global.css +0 -2
  56. package/dist/public/channel/controls/post-summary/PostSummary.global.css.map +0 -1
  57. package/dist/public/channel/controls/post-summary/PostSummary.js +0 -86
  58. package/dist/public/channel/controls/post-summary/PostSummary.js.map +0 -1
  59. package/dist/public/channel/controls/post-view/PostView.d.ts +0 -16
  60. package/dist/public/channel/controls/post-view/PostView.d.ts.map +0 -1
  61. package/dist/public/channel/controls/post-view/PostView.global.css +0 -2
  62. package/dist/public/channel/controls/post-view/PostView.global.css.map +0 -1
  63. package/dist/public/channel/controls/post-view/PostView.js +0 -88
  64. package/dist/public/channel/controls/post-view/PostView.js.map +0 -1
  65. package/dist/public/channel/pages/ChannelHomePage.d.ts +0 -18
  66. package/dist/public/channel/pages/ChannelHomePage.d.ts.map +0 -1
  67. package/dist/public/channel/pages/ChannelHomePage.js +0 -84
  68. package/dist/public/channel/pages/ChannelHomePage.js.map +0 -1
  69. package/dist/public/channel/pages/PublicChannelPage.d.ts +0 -25
  70. package/dist/public/channel/pages/PublicChannelPage.d.ts.map +0 -1
  71. package/dist/public/channel/pages/PublicChannelPage.js +0 -183
  72. package/dist/public/channel/pages/PublicChannelPage.js.map +0 -1
  73. package/src/public/channel/controls/post-summary/PostSummary.global.css +0 -162
  74. package/src/public/channel/controls/post-summary/PostSummary.tsx +0 -82
  75. package/src/public/channel/controls/post-view/PostView.global.css +0 -114
  76. package/src/public/channel/controls/post-view/PostView.tsx +0 -88
  77. package/src/public/channel/pages/ChannelHomePage.tsx +0 -69
  78. package/src/public/channel/pages/PublicChannelPage.tsx +0 -131
@@ -1,88 +0,0 @@
1
- /* eslint-disable @typescript-eslint/naming-convention */
2
- /* eslint-disable @typescript-eslint/no-namespace */
3
- import XNode from "@web-atoms/core/dist/core/XNode";
4
- import { IEmail, IEmailEngagement, IMailbox } from "../../../../model/model";
5
- import { DateFormats } from "../../../../common/date/DateFormats";
6
- import { UMD } from "@web-atoms/core/dist/core/types";
7
- import { renderMailPromise } from "../../../../web/page/mails/service/ConversationService";
8
- import MediaCarousel from "../MediaCarousel";
9
-
10
- import "./PostView.global.css";
11
-
12
- declare global {
13
- namespace JSX {
14
- interface IntrinsicElements {
15
- "share-button": any;
16
- "post-view": any;
17
- }
18
- }
19
- }
20
-
21
- const commentIcon = "💬";
22
-
23
- export default function PostView ({
24
- email = void 0 as IEmail,
25
- channel = void 0 as IMailbox,
26
- itemPath = void 0 as string
27
- }) {
28
- const { engagements = [] } = email;
29
-
30
- const isComment = email.parentID !== null;
31
-
32
- return <post-view
33
- data-element="blog-item"
34
- data-comment={isComment}
35
- data-item-path={itemPath}
36
- data-msg-container="true"
37
- >
38
- <h4 data-element="title">
39
- <label text={ isComment ? email.senderName : email.subject}/>
40
- </h4>
41
- <h6 data-element="date" text={DateFormats.relative.short(email.dateSent)}/>
42
- {!isComment && <h5 data-element="author" text={email.senderName}/> }
43
- <section
44
- data-element="content">
45
- { !email.parentID
46
- ? <section { ... renderMailPromise({ email })}/>
47
- : <section text={email.textBody}/>
48
- }
49
- </section>
50
- <MediaCarousel email={email}/>
51
- <footer>
52
- <button
53
- data-element="engage"
54
- data-click-event="react-email"
55
- >
56
- <inline-svg
57
- attr-src={UMD.resolvePath("@social-mail/social-mail-client/content/images/icons/face-plus.svg")}
58
- style-max-height="15px"
59
- title="React"/>
60
- </button>
61
- <button
62
- data-element="engage"
63
- data-click-event="reply-email"
64
- >
65
- <inline-svg
66
- attr-src={UMD.resolvePath("@social-mail/social-mail-client/content/images/icons/comment-plus.svg")}
67
- style-max-height="15px"
68
- title="React"/>
69
- Reply
70
- </button>
71
- { ... engagements.map((x: IEmailEngagement, index) =>
72
- <span
73
- data-click-event={ x.engagement === commentIcon ? "view-comments" : "engagement-click" }
74
- data-element="engagements"
75
- data-item-path={`email:$, engagement: $.engagements.${index}`}
76
- title={`View all ${x.engagement} ${x.count}`}
77
- text={`${x.engagement} ${x.count}`}/>)}
78
- { !email.parentID && <share-button
79
- title={email.subject}
80
- href={location.href}><i class="fas fa-share"/> Share</share-button> }
81
- </footer>
82
-
83
- <section data-element="comments">
84
- { ... (email.children ?? []).map((c, i) => <PostView itemPath={ `${ itemPath ? itemPath : "$" }.children.${i}` } email={c} />) }
85
- </section>
86
-
87
- </post-view>;
88
- }
@@ -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
- }