@social-mail/social-mail-client 1.2.112 → 1.2.113
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 +42 -15
- package/dist/admin/AdminAppIndex.pack.js.map +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js +4 -4
- package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
- package/dist/common/pages/websites/studio/WebSiteStudioPage.js +2 -1
- package/dist/common/pages/websites/studio/WebSiteStudioPage.js.map +1 -1
- package/dist/public/channel/ChannelView.pack.js +6 -2
- package/dist/public/channel/ChannelView.pack.js.map +1 -1
- package/dist/public/channel/ChannelView.pack.min.js +1 -1
- package/dist/public/channel/ChannelView.pack.min.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.js +42 -15
- package/dist/web/AppIndex.pack.js.map +1 -1
- package/dist/web/AppIndex.pack.min.js +4 -4
- package/dist/web/AppIndex.pack.min.js.map +1 -1
- package/dist/web/page/mails/mini-compose/MiniComposeBox.d.ts +3 -0
- package/dist/web/page/mails/mini-compose/MiniComposeBox.d.ts.map +1 -1
- package/dist/web/page/mails/mini-compose/MiniComposeBox.js +34 -12
- package/dist/web/page/mails/mini-compose/MiniComposeBox.js.map +1 -1
- package/dist/web/page/mails/service/ConversationService.d.ts +1 -1
- package/dist/web/page/mails/service/ConversationService.d.ts.map +1 -1
- package/dist/web/page/mails/service/ConversationService.js +6 -2
- package/dist/web/page/mails/service/ConversationService.js.map +1 -1
- package/package.json +1 -1
- package/src/common/pages/websites/studio/WebSiteStudioPage.tsx +1 -1
- package/src/web/page/mails/mini-compose/MiniComposeBox.tsx +31 -8
- package/src/web/page/mails/service/ConversationService.tsx +6 -4
|
@@ -22389,12 +22389,16 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
|
|
|
22389
22389
|
mailboxID,
|
|
22390
22390
|
emailAddressID,
|
|
22391
22391
|
email
|
|
22392
|
-
}, create = false) {
|
|
22392
|
+
}, create = false, saveAttachments = true, cancelToken) {
|
|
22393
22393
|
var _a, _b, _c;
|
|
22394
22394
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22395
22395
|
if (email === null || email === void 0 ? void 0 : email.emailID) {
|
|
22396
22396
|
email.subject || (email.subject = "");
|
|
22397
|
-
|
|
22397
|
+
email.dateUpdated = DateTime.now;
|
|
22398
|
+
let cloner = this.entityService.cloner(Object.assign({}, email));
|
|
22399
|
+
if (saveAttachments) {
|
|
22400
|
+
cloner = cloner.include(x => x.attachments);
|
|
22401
|
+
}
|
|
22398
22402
|
yield this.entityService.save(cloner.copy);
|
|
22399
22403
|
return email;
|
|
22400
22404
|
}
|
|
@@ -33396,10 +33400,10 @@ System.register(["@web-atoms/core/dist/core/XNode", "@web-atoms/web-controls/dis
|
|
|
33396
33400
|
|
|
33397
33401
|
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/web/page/mails/mini-compose/Attach");
|
|
33398
33402
|
|
|
33399
|
-
System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/style/styled", "@web-atoms/core/dist/web/controls/AtomControl", "../../../../model/model", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dist/view-model/Action", "../../../../common/controls/audio/AudioRecorder", "../service/ConversationService", "@web-atoms/web-controls/dist/basic/AtomRepeater", "@web-atoms/core/dist/core/InjectProperty", "../../../../common/events/CommonEvents", "../service/MailService", "@web-atoms/date-time/dist/DateTime", "@web-atoms/core/dist/core/sleep", "../../../../common/controls/html/InlineHtmlEditorWithToolbar", "@web-atoms/web-controls/dist/html-editor/AtomHtmlEditor", "@web-atoms/web-controls/dist/html-editor/commands/Align", "@web-atoms/web-controls/dist/html-editor/commands/Bold", "@web-atoms/web-controls/dist/html-editor/commands/Italic", "@web-atoms/web-controls/dist/html-editor/commands/StrikeThrough", "@web-atoms/web-controls/dist/html-editor/commands/Underline", "@web-atoms/web-controls/dist/html-editor/commands/AddLink", "@web-atoms/web-controls/dist/html-editor/commands/Unlink", "@web-atoms/web-controls/dist/html-editor/commands/Separator", "./Insert", "@web-atoms/date-time/dist/TimeSpan", "./Attach"], function (_export, _context) {
|
|
33403
|
+
System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/style/styled", "@web-atoms/core/dist/web/controls/AtomControl", "../../../../model/model", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dist/view-model/Action", "../../../../common/controls/audio/AudioRecorder", "../service/ConversationService", "@web-atoms/web-controls/dist/basic/AtomRepeater", "@web-atoms/core/dist/core/InjectProperty", "../../../../common/events/CommonEvents", "../service/MailService", "@web-atoms/date-time/dist/DateTime", "@web-atoms/core/dist/core/sleep", "../../../../common/controls/html/InlineHtmlEditorWithToolbar", "@web-atoms/web-controls/dist/html-editor/AtomHtmlEditor", "@web-atoms/web-controls/dist/html-editor/commands/Align", "@web-atoms/web-controls/dist/html-editor/commands/Bold", "@web-atoms/web-controls/dist/html-editor/commands/Italic", "@web-atoms/web-controls/dist/html-editor/commands/StrikeThrough", "@web-atoms/web-controls/dist/html-editor/commands/Underline", "@web-atoms/web-controls/dist/html-editor/commands/AddLink", "@web-atoms/web-controls/dist/html-editor/commands/Unlink", "@web-atoms/web-controls/dist/html-editor/commands/Separator", "./Insert", "@web-atoms/date-time/dist/TimeSpan", "./Attach", "@web-atoms/core/dist/core/types"], function (_export, _context) {
|
|
33400
33404
|
"use strict";
|
|
33401
33405
|
|
|
33402
|
-
var __awaiter, __decorate, __metadata, XNode, styled, AtomControl, AppFile, Email, Bind, Action, AudioRecorder, ConversationService, AtomRepeater, InjectProperty, CommonEvents, MailService, DateTime, sleep, MailHtmlEditor, Toolbar, Align, Bold, Italic, StrikeThrough, Underline, AddLink, Unlink, Separator, Insert, TimeSpan, Attach, MiniComposeBox, css, defaultEmailBody;
|
|
33406
|
+
var __awaiter, __decorate, __metadata, XNode, styled, AtomControl, AppFile, Email, Bind, Action, AudioRecorder, ConversationService, AtomRepeater, InjectProperty, CommonEvents, MailService, DateTime, sleep, MailHtmlEditor, Toolbar, Align, Bold, Italic, StrikeThrough, Underline, AddLink, Unlink, Separator, Insert, TimeSpan, Attach, CancelToken, MiniComposeBox, css, defaultEmailBody;
|
|
33403
33407
|
_export("default", void 0);
|
|
33404
33408
|
return {
|
|
33405
33409
|
setters: [function (_tslib) {
|
|
@@ -33461,6 +33465,8 @@ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/di
|
|
|
33461
33465
|
TimeSpan = _webAtomsDateTimeDistTimeSpan.default;
|
|
33462
33466
|
}, function (_Attach) {
|
|
33463
33467
|
Attach = _Attach.default;
|
|
33468
|
+
}, function (_webAtomsCoreDistCoreTypes) {
|
|
33469
|
+
CancelToken = _webAtomsCoreDistCoreTypes.CancelToken;
|
|
33464
33470
|
}],
|
|
33465
33471
|
execute: function () {
|
|
33466
33472
|
css = styled.css`
|
|
@@ -33510,6 +33516,8 @@ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/di
|
|
|
33510
33516
|
this.draft = null;
|
|
33511
33517
|
this.typedMessage = "";
|
|
33512
33518
|
this.active = false;
|
|
33519
|
+
this.savedSubject = void 0;
|
|
33520
|
+
this.savedBody = void 0;
|
|
33513
33521
|
this.element.className = css;
|
|
33514
33522
|
this.app.runAsync(() => this.init());
|
|
33515
33523
|
}
|
|
@@ -33657,9 +33665,6 @@ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/di
|
|
|
33657
33665
|
if (!((_a = this.editor) === null || _a === void 0 ? void 0 : _a.htmlTextContent)) {
|
|
33658
33666
|
return;
|
|
33659
33667
|
}
|
|
33660
|
-
if (this.prevSave) {
|
|
33661
|
-
yield this.prevSave;
|
|
33662
|
-
}
|
|
33663
33668
|
(_b = this.draft) !== null && _b !== void 0 ? _b : this.draft = Email.create({
|
|
33664
33669
|
attachments: []
|
|
33665
33670
|
});
|
|
@@ -33667,10 +33672,17 @@ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/di
|
|
|
33667
33672
|
html,
|
|
33668
33673
|
text
|
|
33669
33674
|
} = this.editor.htmlTextContent;
|
|
33675
|
+
if (this.savedSubject === this.draft.subject && this.savedBody === html) {
|
|
33676
|
+
return;
|
|
33677
|
+
}
|
|
33678
|
+
if (this.prevSave) {
|
|
33679
|
+
yield this.prevSave;
|
|
33680
|
+
}
|
|
33681
|
+
this.savedSubject = this.draft.subject;
|
|
33682
|
+
this.savedBody = html;
|
|
33670
33683
|
this.draft.htmlBody = html;
|
|
33671
33684
|
this.draft.textBody = text;
|
|
33672
|
-
|
|
33673
|
-
yield this.prevSave;
|
|
33685
|
+
yield this.save(false);
|
|
33674
33686
|
});
|
|
33675
33687
|
}
|
|
33676
33688
|
onEmailUnscheduled(mce) {
|
|
@@ -33696,6 +33708,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/di
|
|
|
33696
33708
|
yield this.save();
|
|
33697
33709
|
this.draft.status = "scheduled";
|
|
33698
33710
|
this.draft.dateSent = DateTime.now.add(TimeSpan.fromSeconds(30));
|
|
33711
|
+
this.draft.dateUpdated = DateTime.now;
|
|
33699
33712
|
yield this.mailService.send(this.draft);
|
|
33700
33713
|
this.draft = Email.create({
|
|
33701
33714
|
subject: "",
|
|
@@ -33711,7 +33724,6 @@ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/di
|
|
|
33711
33724
|
this.ensureDraft();
|
|
33712
33725
|
this.draft.textBody = this.typedMessage;
|
|
33713
33726
|
yield this.addFiles(uploadedFile);
|
|
33714
|
-
yield this.save();
|
|
33715
33727
|
});
|
|
33716
33728
|
}
|
|
33717
33729
|
addFiles(...files) {
|
|
@@ -33721,6 +33733,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/di
|
|
|
33721
33733
|
for (const file of files) {
|
|
33722
33734
|
attachments.add(this.createAppFile(file));
|
|
33723
33735
|
}
|
|
33736
|
+
yield this.save();
|
|
33724
33737
|
});
|
|
33725
33738
|
}
|
|
33726
33739
|
createAppFile(file) {
|
|
@@ -33741,11 +33754,24 @@ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/di
|
|
|
33741
33754
|
});
|
|
33742
33755
|
(_b = (_c = this.draft).attachments) !== null && _b !== void 0 ? _b : _c.attachments = [];
|
|
33743
33756
|
}
|
|
33744
|
-
save() {
|
|
33757
|
+
save(saveAttachments = true) {
|
|
33745
33758
|
return __awaiter(this, void 0, void 0, function* () {
|
|
33746
|
-
|
|
33747
|
-
|
|
33748
|
-
|
|
33759
|
+
const {
|
|
33760
|
+
prevSave,
|
|
33761
|
+
saveCancelToken
|
|
33762
|
+
} = this;
|
|
33763
|
+
saveCancelToken === null || saveCancelToken === void 0 ? void 0 : saveCancelToken.cancel();
|
|
33764
|
+
const ct = this.saveCancelToken = new CancelToken();
|
|
33765
|
+
this.prevSave = (() => __awaiter(this, void 0, void 0, function* () {
|
|
33766
|
+
try {
|
|
33767
|
+
if (prevSave) {
|
|
33768
|
+
yield prevSave;
|
|
33769
|
+
}
|
|
33770
|
+
this.draft = yield this.conversationService.draft(Object.assign(Object.assign({}, this.mailboxContact), {
|
|
33771
|
+
email: this.draft
|
|
33772
|
+
}), true, saveAttachments, ct);
|
|
33773
|
+
} catch (_a) {}
|
|
33774
|
+
}))().catch(console.error);
|
|
33749
33775
|
});
|
|
33750
33776
|
}
|
|
33751
33777
|
});
|
|
@@ -43877,7 +43903,8 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
43877
43903
|
});
|
|
43878
43904
|
}
|
|
43879
43905
|
hide() {
|
|
43880
|
-
|
|
43906
|
+
var _a;
|
|
43907
|
+
this.pageContent = (_a = this.htmlEditor) === null || _a === void 0 ? void 0 : _a.htmlPage;
|
|
43881
43908
|
super.hide();
|
|
43882
43909
|
}
|
|
43883
43910
|
show() {
|