@social-mail/social-mail-client 1.8.268 → 1.8.270
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/admin/AdminAppIndex.pack.js +178 -158
- package/dist/admin/AdminAppIndex.pack.js.map +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
- package/dist/common/controls/drag-drop/FilesDragDrop.global.css +1 -1
- package/dist/common/controls/drag-drop/FilesDragDrop.global.css.map +1 -1
- package/dist/public/channel/ChannelApp.pack.global.css +1 -1
- package/dist/public/channel/ChannelApp.pack.global.css.map +1 -1
- package/dist/public/channel/ChannelApp.pack.js +35 -12
- package/dist/public/channel/ChannelApp.pack.js.map +1 -1
- package/dist/public/channel/ChannelApp.pack.min.js +1 -1
- package/dist/public/channel/ChannelApp.pack.min.js.map +1 -1
- package/dist/public/channel/controls/MediaCarousel.js +2 -2
- package/dist/public/channel/controls/MediaCarousel.js.map +1 -1
- package/dist/public/channel/controls/channel-post/ChannelPost.d.ts +2 -0
- package/dist/public/channel/controls/channel-post/ChannelPost.d.ts.map +1 -1
- package/dist/public/channel/controls/channel-post/ChannelPost.global.css +1 -1
- package/dist/public/channel/controls/channel-post/ChannelPost.global.css.map +1 -1
- package/dist/public/channel/controls/channel-post/ChannelPost.js +12 -5
- package/dist/public/channel/controls/channel-post/ChannelPost.js.map +1 -1
- package/dist/public/channel/pages/posts/ChannelPage.d.ts +3 -0
- package/dist/public/channel/pages/posts/ChannelPage.d.ts.map +1 -1
- package/dist/public/channel/pages/posts/ChannelPage.js +8 -0
- package/dist/public/channel/pages/posts/ChannelPage.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/site-editor-app/SiteEditorApp.pack.js +178 -158
- package/dist/site-editor-app/SiteEditorApp.pack.js.map +1 -1
- package/dist/site-editor-app/SiteEditorApp.pack.min.js +1 -1
- package/dist/site-editor-app/SiteEditorApp.pack.min.js.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/dist/web/AppIndex.pack.js +178 -158
- package/dist/web/AppIndex.pack.js.map +1 -1
- package/dist/web/AppIndex.pack.min.js +1 -1
- package/dist/web/AppIndex.pack.min.js.map +1 -1
- package/dist/web/page/mails/ConversationPage.d.ts.map +1 -1
- package/dist/web/page/mails/ConversationPage.js.map +1 -1
- package/dist/web/page/mails/mini-compose/MiniComposeBox.d.ts.map +1 -1
- package/dist/web/page/mails/mini-compose/MiniComposeBox.js +20 -8
- package/dist/web/page/mails/mini-compose/MiniComposeBox.js.map +1 -1
- package/dist/web/page/mails/service/ConversationService.d.ts.map +1 -1
- package/dist/web/page/mails/service/ConversationService.js +13 -5
- package/dist/web/page/mails/service/ConversationService.js.map +1 -1
- package/package.json +1 -1
- package/src/common/controls/drag-drop/FilesDragDrop.global.css +18 -1
- package/src/public/channel/controls/MediaCarousel.tsx +2 -2
- package/src/public/channel/controls/channel-post/ChannelPost.global.css +46 -0
- package/src/public/channel/controls/channel-post/ChannelPost.tsx +28 -6
- package/src/public/channel/pages/posts/ChannelPage.tsx +6 -0
- package/src/web/page/mails/ConversationPage.tsx +6 -0
- package/src/web/page/mails/mini-compose/MiniComposeBox.tsx +15 -1
- package/src/web/page/mails/service/ConversationService.tsx +10 -2
|
@@ -9,6 +9,38 @@ channel-post {
|
|
|
9
9
|
padding: 10px;
|
|
10
10
|
border-radius: 10px;
|
|
11
11
|
|
|
12
|
+
&[enable-buy] {
|
|
13
|
+
> post-highlight {
|
|
14
|
+
display: flex;
|
|
15
|
+
}
|
|
16
|
+
& footer button[data-element=buy-now] {
|
|
17
|
+
display: flex;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
& > post-highlight {
|
|
22
|
+
display: none;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
gap: 5px;
|
|
25
|
+
border-radius: 10px;
|
|
26
|
+
padding: 10px;
|
|
27
|
+
border: solid 1px lightgray;
|
|
28
|
+
& [data-element=buy-now] {
|
|
29
|
+
border-radius: 9999px;
|
|
30
|
+
background-color: var(--primary-action-color, green);
|
|
31
|
+
color: var(--primary-action-text-color, white);
|
|
32
|
+
display: none;
|
|
33
|
+
flex-direction: row;
|
|
34
|
+
align-items: center;
|
|
35
|
+
border-color: transparent;
|
|
36
|
+
gap: 10px;
|
|
37
|
+
padding: 2px;
|
|
38
|
+
padding-left: 10px;
|
|
39
|
+
padding-right: 10px;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
12
44
|
& > channel-name {
|
|
13
45
|
grid-row: 1;
|
|
14
46
|
grid-column: 1;
|
|
@@ -72,6 +104,20 @@ channel-post {
|
|
|
72
104
|
cursor: pointer;
|
|
73
105
|
}
|
|
74
106
|
|
|
107
|
+
& > [data-element=buy-now] {
|
|
108
|
+
border-radius: 9999px;
|
|
109
|
+
background-color: var(--primary-action-color, green);
|
|
110
|
+
color: var(--primary-action-text-color, white);
|
|
111
|
+
display: none;
|
|
112
|
+
flex-direction: row;
|
|
113
|
+
align-items: center;
|
|
114
|
+
border-color: transparent;
|
|
115
|
+
gap: 10px;
|
|
116
|
+
padding: 2px;
|
|
117
|
+
padding-left: 10px;
|
|
118
|
+
padding-right: 10px;
|
|
119
|
+
}
|
|
120
|
+
|
|
75
121
|
& > [data-element=engage] {
|
|
76
122
|
border-radius: 9999px;
|
|
77
123
|
background-color: var(--accent-color);
|
|
@@ -20,6 +20,8 @@ declare global {
|
|
|
20
20
|
"post-date": any;
|
|
21
21
|
"post-description": any;
|
|
22
22
|
"emoji-span": any;
|
|
23
|
+
"post-highlight": any;
|
|
24
|
+
"product-price": any;
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
27
|
}
|
|
@@ -52,20 +54,35 @@ export default function ChannelPost(email: IChannelEmail) {
|
|
|
52
54
|
const full = email[showFullDetails];
|
|
53
55
|
|
|
54
56
|
return <channel-post has-attachments={email.email.attachments?.length > 0}>
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
<header>
|
|
58
|
+
<channel-name>{email.mailbox.emailAddress.name}</channel-name>
|
|
59
|
+
{full
|
|
60
|
+
? <post-title>{email.email.subject}</post-title>
|
|
61
|
+
: <a href={UrlService.toBlogUrl(email)}><post-title>{email.email.subject}</post-title></a>
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
<post-date title={DateFormats.withWeekDayAndTime(email.datePublished)}>{ DateFormats.relative.short(email.datePublished)}</post-date>
|
|
65
|
+
</header>
|
|
60
66
|
|
|
61
|
-
<post-date title={DateFormats.withWeekDayAndTime(email.datePublished)}>{ DateFormats.relative.short(email.datePublished)}</post-date>
|
|
62
67
|
<MediaCarousel email={email.email}/>
|
|
68
|
+
|
|
69
|
+
<post-highlight>
|
|
70
|
+
<div>Buy now, for only <product-price></product-price>, </div>
|
|
71
|
+
<div><button data-element="buy-now">Buy Now</button></div>
|
|
72
|
+
</post-highlight>
|
|
73
|
+
|
|
63
74
|
{ full
|
|
64
75
|
? <post-description data-element="description" { ... renderMailPromise({ email: email.email })}/>
|
|
65
76
|
: <LimitedText data-element="description">
|
|
66
77
|
<post-description { ... renderMailPromise({ email: email.email })}/>
|
|
67
78
|
</LimitedText>
|
|
68
79
|
}
|
|
80
|
+
|
|
81
|
+
<post-highlight>
|
|
82
|
+
<div>Buy now, for only <product-price></product-price>, </div>
|
|
83
|
+
<div><button data-element="buy-now">Buy Now</button></div>
|
|
84
|
+
</post-highlight>
|
|
85
|
+
|
|
69
86
|
<footer>
|
|
70
87
|
{ ... engagements.map((x: IEmailEngagement, index) =>
|
|
71
88
|
<span
|
|
@@ -109,6 +126,11 @@ export default function ChannelPost(email: IChannelEmail) {
|
|
|
109
126
|
/>
|
|
110
127
|
Reply
|
|
111
128
|
</button>
|
|
129
|
+
|
|
130
|
+
{ !email.email.parentID && <button
|
|
131
|
+
data-click-event="buy-now"
|
|
132
|
+
data-element="buy-now">Buy Now</button>}
|
|
133
|
+
|
|
112
134
|
<share-button
|
|
113
135
|
title={email.email.subject}
|
|
114
136
|
href={location.href}><i class="fas fa-share"/> Share</share-button>
|
|
@@ -176,6 +176,12 @@ export default class ChannelPage extends ContentPage {
|
|
|
176
176
|
this.reactAction(email, emoji);
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
+
@Action({ onEvent: "buy-now"})
|
|
180
|
+
buyNowClick({ email }) {
|
|
181
|
+
location.href = "/social-mail/channel-store/buy/" + email.emailID;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
|
|
179
185
|
reactAction(email: IEmail, emoji) {
|
|
180
186
|
const { headerMessageID } = email;
|
|
181
187
|
const { channel: { emailAddress: { emailAddress }} } = this;
|
|
@@ -325,6 +325,12 @@ export default class ConversationPage extends ContentPage {
|
|
|
325
325
|
icon="fas fa-ban"
|
|
326
326
|
label="Block Sender"/>
|
|
327
327
|
}
|
|
328
|
+
{/* <MenuItem
|
|
329
|
+
data-click-event="report-threads"
|
|
330
|
+
icon="fad fa-shield-quartered"
|
|
331
|
+
data-color="red"
|
|
332
|
+
label="Report"
|
|
333
|
+
/> */}
|
|
328
334
|
</div>
|
|
329
335
|
</PopupActionButton>;
|
|
330
336
|
|
|
@@ -41,6 +41,7 @@ import MailboxDropDown from "../../../../common/controls/mailboxes/MailboxDropDo
|
|
|
41
41
|
import { fileUrl } from "../../../../common/fileUrl";
|
|
42
42
|
|
|
43
43
|
import "./styles/mini-compose.local.css";
|
|
44
|
+
import { FilesDragDrop } from "../../../../common/controls/drag-drop/FilesDragDrop";
|
|
44
45
|
|
|
45
46
|
const css = "mini-compose-page";
|
|
46
47
|
|
|
@@ -51,6 +52,11 @@ const defaultEmailBody = `<section style="${defaultMessageBodyStyle}">
|
|
|
51
52
|
<footer data-social-mail-commands="emoji-bar"></footer>
|
|
52
53
|
</section>`;
|
|
53
54
|
|
|
55
|
+
const maxSize = 25*1024*1024;
|
|
56
|
+
const stream = true;
|
|
57
|
+
const maxStreamSize = 100*1024*1024;
|
|
58
|
+
|
|
59
|
+
|
|
54
60
|
const addRecipient = (e: IEmail, a: IEmailRecipient[], type: "from" | "to" | "cc" | "bcc") => {
|
|
55
61
|
if (!a) {
|
|
56
62
|
return;
|
|
@@ -133,6 +139,7 @@ export default class MiniComposeBox extends AtomControl {
|
|
|
133
139
|
this.to ??= [];
|
|
134
140
|
this.cc ??= [];
|
|
135
141
|
this.bcc ??= [];
|
|
142
|
+
this.draft.attachments ??= [];
|
|
136
143
|
if (this.draft.recipients) {
|
|
137
144
|
for (const iterator of this.draft.recipients) {
|
|
138
145
|
if (iterator.type === "to") {
|
|
@@ -161,7 +168,14 @@ export default class MiniComposeBox extends AtomControl {
|
|
|
161
168
|
? this.draft.htmlBody
|
|
162
169
|
: defaultEmailBody;
|
|
163
170
|
|
|
164
|
-
this.renderer = <div
|
|
171
|
+
this.renderer = <div
|
|
172
|
+
{ ... FilesDragDrop({
|
|
173
|
+
extra: JSON.stringify({
|
|
174
|
+
insert: true,
|
|
175
|
+
stream,
|
|
176
|
+
})
|
|
177
|
+
})}
|
|
178
|
+
>
|
|
165
179
|
<div data-layout="vertical-flex-stretch-items" style-width="100%">
|
|
166
180
|
{ this.showSender && <div data-layout="row">
|
|
167
181
|
From: <MailboxDropDown
|
|
@@ -132,13 +132,21 @@ export const renderMailPromise = AtomControl.registerProperty<{ thread?: IMailbo
|
|
|
132
132
|
msg.setAttribute("msg", "msg");
|
|
133
133
|
container.appendChild(msg);
|
|
134
134
|
|
|
135
|
-
const root = AncestorEnumerator.find(e, (x) => x.tagName === "CHANNEL-POST" || x.hasAttribute("data-msg-container"));
|
|
135
|
+
const root = AncestorEnumerator.find(e, (x) => x.tagName === "CHANNEL-POST" || x.hasAttribute("data-msg-container")) ?? e;
|
|
136
136
|
|
|
137
|
+
for (const a of Array.from(msg.querySelectorAll(`a[hash-tag]`))) {
|
|
138
|
+
const tag = a.getAttribute("hash-tag");
|
|
139
|
+
const tokens = tag.toLowerCase().split("/");
|
|
140
|
+
if (tokens[0] !== "#price") {
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
root.setAttribute("enable-buy", "true");
|
|
144
|
+
}
|
|
137
145
|
|
|
138
146
|
// detect if first element is an image or video
|
|
139
147
|
// without any text...
|
|
140
148
|
if (/img|video/i.test(firstVisibleElement?.tagName)) {
|
|
141
|
-
|
|
149
|
+
root.setAttribute("has-poster", "true");
|
|
142
150
|
}
|
|
143
151
|
|
|
144
152
|
const included = email.attachments?.every((x) => (x as any).included);
|