@social-mail/social-mail-client 1.2.66 → 1.2.67
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.js +179 -8
- package/dist/admin/AdminAppIndex.pack.js.map +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js +5 -5
- package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
- package/dist/model/model.d.ts +1 -1
- package/dist/model/model.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.js +179 -8
- package/dist/web/AppIndex.pack.js.map +1 -1
- package/dist/web/AppIndex.pack.min.js +5 -5
- package/dist/web/AppIndex.pack.min.js.map +1 -1
- package/dist/web/page/channels/detail/ChannelDetailPage.d.ts +4 -1
- package/dist/web/page/channels/detail/ChannelDetailPage.d.ts.map +1 -1
- package/dist/web/page/channels/detail/ChannelDetailPage.js +52 -2
- package/dist/web/page/channels/detail/ChannelDetailPage.js.map +1 -1
- package/dist/web/page/channels/services/ChannelService.d.ts +5 -3
- package/dist/web/page/channels/services/ChannelService.d.ts.map +1 -1
- package/dist/web/page/channels/services/ChannelService.js +13 -0
- package/dist/web/page/channels/services/ChannelService.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 +13 -5
- package/dist/web/page/mails/mini-compose/MiniComposeBox.js.map +1 -1
- package/dist/web/page/mails/mini-compose/ToggleEmoji.d.ts +4 -0
- package/dist/web/page/mails/mini-compose/ToggleEmoji.d.ts.map +1 -0
- package/dist/web/page/mails/mini-compose/ToggleEmoji.js +35 -0
- package/dist/web/page/mails/mini-compose/ToggleEmoji.js.map +1 -0
- package/dist/web/page/templates/emoji-bar/EmojiBar.d.ts +3 -0
- package/dist/web/page/templates/emoji-bar/EmojiBar.d.ts.map +1 -0
- package/dist/web/page/templates/emoji-bar/EmojiBar.js +59 -0
- package/dist/web/page/templates/emoji-bar/EmojiBar.js.map +1 -0
- package/package.json +1 -1
- package/src/model/model.ts +1 -1
- package/src/web/page/channels/detail/ChannelDetailPage.tsx +47 -1
- package/src/web/page/channels/services/ChannelService.ts +11 -1
- package/src/web/page/mails/mini-compose/MiniComposeBox.tsx +9 -2
- package/src/web/page/mails/mini-compose/ToggleEmoji.tsx +24 -0
- package/src/web/page/templates/emoji-bar/EmojiBar.tsx +42 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import DITransient from "@web-atoms/core/dist/di/DITransient";
|
|
2
2
|
import { Inject } from "@web-atoms/core/dist/di/Inject";
|
|
3
3
|
import EntityService from "../../../../services/EntityService";
|
|
4
|
-
import { Email, IMailboxContact, Mailbox, MailboxContact } from "../../../../model/model";
|
|
4
|
+
import { Email, IEmail, IMailboxContact, Mailbox, MailboxContact } from "../../../../model/model";
|
|
5
5
|
import { Sql } from "../../../../common/Sql";
|
|
6
6
|
|
|
7
7
|
@DITransient({})
|
|
@@ -16,6 +16,7 @@ export default class ChannelService {
|
|
|
16
16
|
start = 0,
|
|
17
17
|
size = 100,
|
|
18
18
|
search = "",
|
|
19
|
+
version = 0,
|
|
19
20
|
cancelToken
|
|
20
21
|
}) {
|
|
21
22
|
let q = this.entityService.query(Email);
|
|
@@ -78,4 +79,13 @@ export default class ChannelService {
|
|
|
78
79
|
}
|
|
79
80
|
await this.entityService.save(cloners);
|
|
80
81
|
}
|
|
82
|
+
|
|
83
|
+
async deleteMail(email: IEmail) {
|
|
84
|
+
const { emailID } = email;
|
|
85
|
+
await this.entityService.save(Email.create({
|
|
86
|
+
emailID,
|
|
87
|
+
status: "deleted"
|
|
88
|
+
}));
|
|
89
|
+
email.status = "deleted";
|
|
90
|
+
}
|
|
81
91
|
}
|
|
@@ -29,6 +29,8 @@ import Unlink from "@web-atoms/web-controls/dist/html-editor/commands/Unlink";
|
|
|
29
29
|
import Separator from "@web-atoms/web-controls/dist/html-editor/commands/Separator";
|
|
30
30
|
import Insert from "./Insert";
|
|
31
31
|
import TimeSpan from "@web-atoms/date-time/dist/TimeSpan";
|
|
32
|
+
import ToggleEmoji from "./ToggleEmoji";
|
|
33
|
+
import { emojiBarAsText } from "../../templates/emoji-bar/EmojiBar";
|
|
32
34
|
|
|
33
35
|
const css = styled.css `
|
|
34
36
|
display: grid;
|
|
@@ -103,7 +105,10 @@ export default class MiniComposeBox extends AtomControl {
|
|
|
103
105
|
|
|
104
106
|
this.typedMessage = this.draft?.htmlBody
|
|
105
107
|
? this.draft.htmlBody
|
|
106
|
-
: `<
|
|
108
|
+
: `<section style="background-color: white; color: black;">
|
|
109
|
+
<section contentEditable="true"> </br></section>
|
|
110
|
+
${emojiBarAsText()}
|
|
111
|
+
</section>`;
|
|
107
112
|
|
|
108
113
|
this.render(<div>
|
|
109
114
|
<MailHtmlEditor
|
|
@@ -119,11 +124,12 @@ export default class MiniComposeBox extends AtomControl {
|
|
|
119
124
|
<AddLink/>
|
|
120
125
|
<Unlink/>
|
|
121
126
|
<Separator/>
|
|
127
|
+
<ToggleEmoji/>
|
|
122
128
|
</Toolbar></div>}
|
|
123
129
|
data-element="editor"
|
|
124
130
|
data-html-editor="email-editor"
|
|
125
131
|
presenter={Bind.presenter((c) => this.editor = c )}
|
|
126
|
-
content={
|
|
132
|
+
content={this.typedMessage}
|
|
127
133
|
style-min-height="50px"
|
|
128
134
|
/>
|
|
129
135
|
<i
|
|
@@ -209,6 +215,7 @@ export default class MiniComposeBox extends AtomControl {
|
|
|
209
215
|
const { html , text } = this.editor.htmlTextContent;
|
|
210
216
|
this.draft.htmlBody = html;
|
|
211
217
|
this.draft.textBody = text;
|
|
218
|
+
await this.save();
|
|
212
219
|
|
|
213
220
|
this.draft.status = "scheduled";
|
|
214
221
|
this.draft.dateSent = DateTime.now.add(TimeSpan.fromSeconds(30));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import Bind from "@web-atoms/core/dist/core/Bind";
|
|
2
|
+
import XNode from "@web-atoms/core/dist/core/XNode";
|
|
3
|
+
import { IPopupOptions } from "@web-atoms/core/dist/web/services/PopupService";
|
|
4
|
+
import PopupButton, { MenuItem } from "@web-atoms/web-controls/dist/basic/PopupButton";
|
|
5
|
+
import { MailHtmlEditor } from "../../../../common/controls/html/InlineHtmlEditorWithToolbar";
|
|
6
|
+
|
|
7
|
+
const toggleEmojiAction = Bind.event((editor: MailHtmlEditor) => {
|
|
8
|
+
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export default function ToggleEmoji({ alignment = "above" as IPopupOptions["alignment"]}) {
|
|
12
|
+
return <PopupButton
|
|
13
|
+
class="command"
|
|
14
|
+
data-layout="toolbar-button"
|
|
15
|
+
icon="fas fa-message-smile"
|
|
16
|
+
title="Toggle Emoji"
|
|
17
|
+
alignment={alignment}>
|
|
18
|
+
<MenuItem
|
|
19
|
+
icon="ri-list-unordered"
|
|
20
|
+
label="List"
|
|
21
|
+
event-click={toggleEmojiAction}
|
|
22
|
+
/>
|
|
23
|
+
</PopupButton>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import XNode from "@web-atoms/core/dist/core/XNode";
|
|
2
|
+
import { Emoji } from "../../../../services/Emoji";
|
|
3
|
+
import DomToString from "@web-atoms/email-dom/dist/DomToString";
|
|
4
|
+
|
|
5
|
+
const EmojiButton = ({
|
|
6
|
+
emoji,
|
|
7
|
+
command = "track",
|
|
8
|
+
title
|
|
9
|
+
}) => {
|
|
10
|
+
const emojiCode = "u" + Emoji.emojiUnicode(emoji);
|
|
11
|
+
const selector = `social-button-${emojiCode}`;
|
|
12
|
+
return <a
|
|
13
|
+
class={selector}
|
|
14
|
+
style="text-decoration: none;outline: none;border:none; margin-right: 5px"
|
|
15
|
+
data-social-mail-command={command}
|
|
16
|
+
title={title}
|
|
17
|
+
data-social-mail-transform="buttons-3x"
|
|
18
|
+
data-social-mail-transform-max-image="30px"
|
|
19
|
+
data-social-mail-track={emoji}>
|
|
20
|
+
<button style="margin: 1px;padding:2px;padding-left: 5px;padding-right: 5px; border: solid 1px lightgray; border-radius: 9999px; display: inline-flex; align-items: center;">
|
|
21
|
+
{emoji} <span
|
|
22
|
+
data-social-mail-element="count"/>
|
|
23
|
+
</button>
|
|
24
|
+
</a>;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const emojiBar = (addComments = true) => <table data-social-mail-component="emoji-tracker" contentEditable="false" style="width:100%">
|
|
28
|
+
<td>
|
|
29
|
+
<EmojiButton emoji="👍" title={"Like this ... "}/>
|
|
30
|
+
<EmojiButton emoji="👎" title={"Don't like this ... "}/>
|
|
31
|
+
<EmojiButton emoji="🗨️" title={"Comment ... "}/>
|
|
32
|
+
</td>
|
|
33
|
+
<td style="text-align: right">
|
|
34
|
+
<EmojiButton
|
|
35
|
+
emoji="👁️🗨️"
|
|
36
|
+
command="view"
|
|
37
|
+
title={"Views"}
|
|
38
|
+
/>
|
|
39
|
+
</td>
|
|
40
|
+
</table>;
|
|
41
|
+
|
|
42
|
+
export const emojiBarAsText = (addComments = true) => DomToString(emojiBar(addComments));
|