@social-mail/social-mail-client 1.2.779 → 1.2.781
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/ChannelView.d.ts +0 -27
- package/dist/public/channel/ChannelView.d.ts.map +1 -1
- package/dist/public/channel/ChannelView.js +3 -247
- package/dist/public/channel/ChannelView.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/public/channel/ChannelView.tsx +203 -203
- package/dist/public/channel/ChannelView.pack.js +0 -28379
- package/dist/public/channel/ChannelView.pack.js.map +0 -1
- package/dist/public/channel/ChannelView.pack.min.js +0 -1346
- package/dist/public/channel/ChannelView.pack.min.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,203 +1,203 @@
|
|
|
1
|
-
import InjectProperty from "@web-atoms/core/dist/core/InjectProperty";
|
|
2
|
-
import { AtomControl } from "@web-atoms/core/dist/web/controls/AtomControl";
|
|
3
|
-
import BlogService from "./BlogService";
|
|
4
|
-
import XNode from "@web-atoms/core/dist/core/XNode";
|
|
5
|
-
import Action from "@web-atoms/core/dist/view-model/Action";
|
|
6
|
-
import EmojiPopup from "./emoji/EmojiPopup";
|
|
7
|
-
import "../../style/GlobalStyle";
|
|
8
|
-
import "./styles/channelViewStyle";
|
|
9
|
-
import PopupService from "@web-atoms/core/dist/web/services/PopupService";
|
|
10
|
-
import { IEmail, IMailbox } from "../../model/model";
|
|
11
|
-
import AtomRepeater from "@web-atoms/web-controls/dist/basic/AtomRepeater";
|
|
12
|
-
import PostView from "./PostView";
|
|
13
|
-
import CopyIcon from "../../common/controls/buttons/CopyIcon";
|
|
14
|
-
import TagCloud from "./controls/TagCloud";
|
|
15
|
-
import PopularPosts from "./controls/PostList";
|
|
16
|
-
import RecentPosts from "./controls/RecentPosts";
|
|
17
|
-
import BlogHeader from "./controls/BlogHeader";
|
|
18
|
-
import Pack from "@web-atoms/core/dist/Pack";
|
|
19
|
-
import InfiniteRepeater from "../../common/controls/repeater/InfiniteRepeater";
|
|
20
|
-
import Bind from "@web-atoms/core/dist/core/Bind";
|
|
21
|
-
import PostSummary from "./PostSummary";
|
|
22
|
-
import { UrlService } from "./UrlService";
|
|
23
|
-
import { WebComponents } from "../../site-editor/editor/webComponentsPath";
|
|
24
|
-
import BlogImageService from "./BlogImageService";
|
|
25
|
-
import ChannelCalendarView from "./ChannelCalendarView";
|
|
26
|
-
import { Mailto } from "../../common/Mailto";
|
|
27
|
-
import CalendarLink from "./controls/CalendarLink";
|
|
28
|
-
import UpcomingEvents from "./controls/UpcomingEvents";
|
|
29
|
-
import { AppLocation } from "../../common/TestMode";
|
|
30
|
-
import WebApp from "@web-atoms/core/dist/web/WebApp";
|
|
31
|
-
import ChannelPhotosView from "./controls/ChannelPhotosView";
|
|
32
|
-
import ChannelVideosView from "./controls/ChannelVideosView";
|
|
33
|
-
|
|
34
|
-
if(AppLocation.isLocalTesting) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const { channel, emailID, tag, author, calendar, photos, videos } = UrlService.getParameters();
|
|
42
|
-
|
|
43
|
-
const commentIcon = "💬";
|
|
44
|
-
|
|
45
|
-
@Pack
|
|
46
|
-
export default class ChannelMessage extends AtomControl {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
}
|
|
1
|
+
// import InjectProperty from "@web-atoms/core/dist/core/InjectProperty";
|
|
2
|
+
// import { AtomControl } from "@web-atoms/core/dist/web/controls/AtomControl";
|
|
3
|
+
// import BlogService from "./BlogService";
|
|
4
|
+
// import XNode from "@web-atoms/core/dist/core/XNode";
|
|
5
|
+
// import Action from "@web-atoms/core/dist/view-model/Action";
|
|
6
|
+
// import EmojiPopup from "./emoji/EmojiPopup";
|
|
7
|
+
// import "../../style/GlobalStyle";
|
|
8
|
+
// import "./styles/channelViewStyle";
|
|
9
|
+
// import PopupService from "@web-atoms/core/dist/web/services/PopupService";
|
|
10
|
+
// import { IEmail, IMailbox } from "../../model/model";
|
|
11
|
+
// import AtomRepeater from "@web-atoms/web-controls/dist/basic/AtomRepeater";
|
|
12
|
+
// import PostView from "./PostView";
|
|
13
|
+
// import CopyIcon from "../../common/controls/buttons/CopyIcon";
|
|
14
|
+
// import TagCloud from "./controls/TagCloud";
|
|
15
|
+
// import PopularPosts from "./controls/PostList";
|
|
16
|
+
// import RecentPosts from "./controls/RecentPosts";
|
|
17
|
+
// import BlogHeader from "./controls/BlogHeader";
|
|
18
|
+
// import Pack from "@web-atoms/core/dist/Pack";
|
|
19
|
+
// import InfiniteRepeater from "../../common/controls/repeater/InfiniteRepeater";
|
|
20
|
+
// import Bind from "@web-atoms/core/dist/core/Bind";
|
|
21
|
+
// import PostSummary from "./PostSummary";
|
|
22
|
+
// import { UrlService } from "./UrlService";
|
|
23
|
+
// import { WebComponents } from "../../site-editor/editor/webComponentsPath";
|
|
24
|
+
// import BlogImageService from "./BlogImageService";
|
|
25
|
+
// import ChannelCalendarView from "./ChannelCalendarView";
|
|
26
|
+
// import { Mailto } from "../../common/Mailto";
|
|
27
|
+
// import CalendarLink from "./controls/CalendarLink";
|
|
28
|
+
// import UpcomingEvents from "./controls/UpcomingEvents";
|
|
29
|
+
// import { AppLocation } from "../../common/TestMode";
|
|
30
|
+
// import WebApp from "@web-atoms/core/dist/web/WebApp";
|
|
31
|
+
// import ChannelPhotosView from "./controls/ChannelPhotosView";
|
|
32
|
+
// import ChannelVideosView from "./controls/ChannelVideosView";
|
|
33
|
+
|
|
34
|
+
// if(AppLocation.isLocalTesting) {
|
|
35
|
+
|
|
36
|
+
// WebApp.installStyleSheet("/styles/styler.css");
|
|
37
|
+
// WebApp.installStyleSheet("/styles/vars.css");
|
|
38
|
+
// }
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
// const { channel, emailID, tag, author, calendar, photos, videos } = UrlService.getParameters();
|
|
42
|
+
|
|
43
|
+
// const commentIcon = "💬";
|
|
44
|
+
|
|
45
|
+
// @Pack
|
|
46
|
+
// export default class ChannelMessage extends AtomControl {
|
|
47
|
+
|
|
48
|
+
// @InjectProperty
|
|
49
|
+
// blogService: BlogService;
|
|
50
|
+
|
|
51
|
+
// @InjectProperty
|
|
52
|
+
// blogImageService: BlogImageService;
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
// private channel: IMailbox;
|
|
56
|
+
// private email: IEmail;
|
|
57
|
+
// private search = "";
|
|
58
|
+
|
|
59
|
+
// private tag = tag;
|
|
60
|
+
// private author = author;
|
|
61
|
+
|
|
62
|
+
// private emails: IEmail[] = [];
|
|
63
|
+
|
|
64
|
+
// constructor(app, e = document.createElement("section")) {
|
|
65
|
+
// super(app, e);
|
|
66
|
+
// this.pushInit();
|
|
67
|
+
// }
|
|
68
|
+
|
|
69
|
+
// async init() {
|
|
70
|
+
|
|
71
|
+
// this.app.installScript(`${WebComponents.path}/dist/main.js`);
|
|
72
|
+
|
|
73
|
+
// this.channel = await this.blogService.getChannel(void 0, channel, void 0);
|
|
74
|
+
// const { mailboxID: channelID } = this.channel;
|
|
75
|
+
// if (emailID){
|
|
76
|
+
// this.email = await this.blogService.getEmail({ emailID, channelID, channel });
|
|
77
|
+
// this.email.engagements ??= [];
|
|
78
|
+
// this.emails = [this.email];
|
|
79
|
+
// document.title = "Social " + this.channel.emailAddress.emailAddress + " " + this.email.subject;
|
|
80
|
+
// } else {
|
|
81
|
+
// document.title = "Social " + this.channel.emailAddress.emailAddress;
|
|
82
|
+
// }
|
|
83
|
+
|
|
84
|
+
// const search = (calendar || emailID) ? void 0 : Bind.twoWaysImmediate(() => this.search);
|
|
85
|
+
|
|
86
|
+
// this.element.setAttribute("data-blog-list", "blog-list");
|
|
87
|
+
// this.element.setAttribute("data-layout", "flex-center");
|
|
88
|
+
// this.renderer = <section>
|
|
89
|
+
// <BlogHeader
|
|
90
|
+
// search={search}
|
|
91
|
+
// channel={this.channel}/>
|
|
92
|
+
// <section data-width="100%">
|
|
93
|
+
// { this.renderBody() }
|
|
94
|
+
// </section>
|
|
95
|
+
// <aside>
|
|
96
|
+
// <TagCloud/>
|
|
97
|
+
// <UpcomingEvents channel={this.channel}/>
|
|
98
|
+
// <PopularPosts/>
|
|
99
|
+
// <RecentPosts/>
|
|
100
|
+
// </aside>
|
|
101
|
+
// <footer></footer>
|
|
102
|
+
// </section>;
|
|
103
|
+
// }
|
|
104
|
+
|
|
105
|
+
// renderBody() {
|
|
106
|
+
|
|
107
|
+
// if (calendar) {
|
|
108
|
+
// return <ChannelCalendarView channel={this.channel}/>;
|
|
109
|
+
// }
|
|
110
|
+
|
|
111
|
+
// if (photos) {
|
|
112
|
+
// return <ChannelPhotosView channel={this.channel}/>;
|
|
113
|
+
// }
|
|
114
|
+
|
|
115
|
+
// if (videos) {
|
|
116
|
+
// return <ChannelVideosView channel={this.channel}/>;
|
|
117
|
+
// }
|
|
118
|
+
// return emailID
|
|
119
|
+
// ? <AtomRepeater
|
|
120
|
+
// data-items-updated-event="items-updated"
|
|
121
|
+
// event-items-updated={() => this.itemsUpdated()}
|
|
122
|
+
// itemRenderer={(x) => <PostView channel={this.channel} email={x} />}
|
|
123
|
+
// items={this.emails} />
|
|
124
|
+
// : <AtomRepeater
|
|
125
|
+
// data-items-updated-event="items-updated"
|
|
126
|
+
// event-items-updated={() => this.itemsUpdated()}
|
|
127
|
+
// data-auto-scroll="false"
|
|
128
|
+
// itemRenderer={(x) => <PostSummary blogService={this.blogImageService} channel={this.channel} mailboxEmail={x} />}
|
|
129
|
+
// items={this.emails}
|
|
130
|
+
// {...InfiniteRepeater.pagedItems((start) => (c, e, cancelToken) => this.blogService.getEmails({
|
|
131
|
+
// channelID: this.channel.mailboxID,
|
|
132
|
+
// author: this.author,
|
|
133
|
+
// tag: this.tag,
|
|
134
|
+
// start,
|
|
135
|
+
// search: this.search,
|
|
136
|
+
// cancelToken
|
|
137
|
+
// })
|
|
138
|
+
// )} />;
|
|
139
|
+
// }
|
|
140
|
+
|
|
141
|
+
// itemsUpdated() {
|
|
142
|
+
// (window as any).pageReady = true;
|
|
143
|
+
// }
|
|
144
|
+
|
|
145
|
+
// @Action({ onEvent: "engagement-click"})
|
|
146
|
+
// engagementClick({ email, engagement}) {
|
|
147
|
+
// const emoji = engagement.engagement;
|
|
148
|
+
// this.reactAction(email, emoji);
|
|
149
|
+
// }
|
|
150
|
+
|
|
151
|
+
// reactAction(email: IEmail, emoji) {
|
|
152
|
+
// const { headerMessageID } = email;
|
|
153
|
+
// const { channel: { emailAddress: { emailAddress }} } = this;
|
|
154
|
+
// const subject = `${emoji}:${Number(email.emailID).toString(36)}:${headerMessageID}`;
|
|
155
|
+
// const link = Mailto.create({ to: emailAddress, subject, body: emoji, inReplyTo: headerMessageID });
|
|
156
|
+
// // const link = `mailto:${channel.emailAddress.emailAddress}?subject=${subject}&body=${emoji}&in-reply-to=${headerMessageID}`;
|
|
157
|
+
// this.element.dispatchEvent(new CustomEvent("shareLink", {
|
|
158
|
+
// detail: {
|
|
159
|
+
// link,
|
|
160
|
+
// shareTitle: `React ${emoji} Via`
|
|
161
|
+
// },
|
|
162
|
+
// bubbles: true
|
|
163
|
+
// }));
|
|
164
|
+
|
|
165
|
+
// }
|
|
166
|
+
|
|
167
|
+
// @Action({ onEvent: "react-email"})
|
|
168
|
+
// async reactEmail(email, ce: CustomEvent) {
|
|
169
|
+
// const emoji: string = await EmojiPopup.showControl(ce.target as any, { parentElement: ce.target as any});
|
|
170
|
+
// this.reactAction(email, emoji);
|
|
171
|
+
// }
|
|
172
|
+
|
|
173
|
+
// @Action({ onEvent: "reply-email"})
|
|
174
|
+
// async replyEmail(email, ce: CustomEvent) {
|
|
175
|
+
// const emoji = commentIcon;
|
|
176
|
+
// const { headerMessageID } = email;
|
|
177
|
+
// const { channel: { emailAddress: { emailAddress }} } = this;
|
|
178
|
+
// const subject = `${emoji}:${Number(email.emailID).toString(36)}:${headerMessageID}`;
|
|
179
|
+
// const link = Mailto.create({ to: emailAddress, subject, inReplyTo: headerMessageID });
|
|
180
|
+
// // const link = `mailto:${channel.emailAddress.emailAddress}?subject=${subject}&in-reply-to=${headerMessageID}&body=&`;
|
|
181
|
+
// this.element.dispatchEvent(new CustomEvent("shareLink", {
|
|
182
|
+
// detail: {
|
|
183
|
+
// link,
|
|
184
|
+
// shareTitle: "Add Comment Via"
|
|
185
|
+
// },
|
|
186
|
+
// bubbles: true
|
|
187
|
+
// }));
|
|
188
|
+
// // await PopupService.alert({
|
|
189
|
+
// // message: <div data-layout="vertical-flex">
|
|
190
|
+
// // To send comment to this post, email us your comment with given subject to the channel email address.
|
|
191
|
+
// // <div>To: {channel.emailAddress.emailAddress} <CopyIcon text={channel.emailAddress.emailAddress}/></div>
|
|
192
|
+
// // <div>Subject: {subject} <CopyIcon text={subject}/></div>
|
|
193
|
+
// // <br/>
|
|
194
|
+
// // <div>If you have email client configured, you can click on following link.</div>
|
|
195
|
+
// // <div>
|
|
196
|
+
// // <a href={}>Email Now</a>
|
|
197
|
+
// // </div>
|
|
198
|
+
// // </div>,
|
|
199
|
+
// // title: "Send Email"
|
|
200
|
+
// // });
|
|
201
|
+
// }
|
|
202
|
+
|
|
203
|
+
// }
|