@social-mail/social-mail-client 1.2.539 → 1.2.541
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 +33 -29
- package/dist/admin/AdminAppIndex.pack.js.map +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js +2 -2
- package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
- package/dist/public/channel/ChannelView.pack.js +19 -19
- 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/public/contact-us/ContactUsApp.pack.js +19 -19
- package/dist/public/contact-us/ContactUsApp.pack.js.map +1 -1
- package/dist/public/contact-us/ContactUsApp.pack.min.js +1 -1
- package/dist/public/contact-us/ContactUsApp.pack.min.js.map +1 -1
- package/dist/public/preview/pdf/PreviewPDF.pack.js +19 -19
- package/dist/public/preview/pdf/PreviewPDF.pack.js.map +1 -1
- package/dist/public/preview/pdf/PreviewPDF.pack.min.js +1 -1
- package/dist/public/preview/pdf/PreviewPDF.pack.min.js.map +1 -1
- package/dist/public/store/Store.pack.js +19 -19
- package/dist/public/store/Store.pack.js.map +1 -1
- package/dist/public/store/Store.pack.min.js +1 -1
- package/dist/public/store/Store.pack.min.js.map +1 -1
- package/dist/public/store/StoreApp.pack.js +19 -19
- package/dist/public/store/StoreApp.pack.js.map +1 -1
- package/dist/public/store/StoreApp.pack.min.js +1 -1
- package/dist/public/store/StoreApp.pack.min.js.map +1 -1
- package/dist/public/store/cart/ShoppingCart.pack.js +19 -19
- package/dist/public/store/cart/ShoppingCart.pack.js.map +1 -1
- package/dist/public/store/cart/ShoppingCart.pack.min.js +1 -1
- package/dist/public/store/cart/ShoppingCart.pack.min.js.map +1 -1
- package/dist/site-editor/SiteEditorApp.pack.js +19 -19
- package/dist/site-editor/SiteEditorApp.pack.js.map +1 -1
- package/dist/site-editor/SiteEditorApp.pack.min.js +1 -1
- package/dist/site-editor/SiteEditorApp.pack.min.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.js +33 -29
- package/dist/web/AppIndex.pack.js.map +1 -1
- package/dist/web/AppIndex.pack.min.js +2 -2
- package/dist/web/AppIndex.pack.min.js.map +1 -1
- package/dist/web/page/channels/services/ChannelService.d.ts +4 -1
- package/dist/web/page/channels/services/ChannelService.d.ts.map +1 -1
- package/dist/web/page/channels/services/ChannelService.js +14 -10
- package/dist/web/page/channels/services/ChannelService.js.map +1 -1
- package/node_modules/@web-atoms/core/dist/style/styled.d.ts.map +1 -1
- package/node_modules/@web-atoms/core/dist/style/styled.js +19 -19
- package/node_modules/@web-atoms/core/dist/style/styled.js.map +1 -1
- package/node_modules/@web-atoms/core/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@web-atoms/core/package.json +1 -1
- package/node_modules/@web-atoms/core/src/style/styled.ts +19 -21
- package/package.json +2 -2
- package/src/web/page/channels/services/ChannelService.ts +11 -10
|
@@ -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, IEmail, IMailboxContact, Mailbox, MailboxContact } from "../../../../model/model";
|
|
4
|
+
import { Email, IEmail, IMailboxContact, Mailbox, MailboxContact, MailboxEmail } from "../../../../model/model";
|
|
5
5
|
import { Sql } from "../../../../common/Sql";
|
|
6
6
|
import EmailContentDownloader from "../../../../services/email/EmailContentDownloader";
|
|
7
7
|
import EngagementService from "../../mails/service/EngagementService";
|
|
@@ -28,36 +28,37 @@ export default class ChannelService {
|
|
|
28
28
|
version = 0,
|
|
29
29
|
cancelToken
|
|
30
30
|
}) {
|
|
31
|
-
let q = this.entityService.query(
|
|
31
|
+
let q = this.entityService.query(MailboxEmail);
|
|
32
32
|
|
|
33
33
|
if (channelID) {
|
|
34
|
-
q = q.where({ channelID}, (p) => (x) => x.
|
|
34
|
+
q = q.where({ channelID}, (p) => (x) => x.mailboxID === p.channelID);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
if (published) {
|
|
38
|
-
q = q.where((x) => x.
|
|
38
|
+
q = q.where((x) => x.datePublished !== null);
|
|
39
39
|
} else {
|
|
40
|
-
q = q.where((x) => x.status
|
|
40
|
+
q = q.where((x) => x.email.status === null);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
if (search) {
|
|
44
44
|
if (!/\%/.test(search)) {
|
|
45
45
|
search = search + "%";
|
|
46
46
|
}
|
|
47
|
-
q = q.where({ search }, (p) => (x) => Sql.text.like(x.subject, p.search));
|
|
47
|
+
q = q.where({ search }, (p) => (x) => Sql.text.like(x.email.subject, p.search));
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
const result = await q.orderByDescending((x) => x.emailID)
|
|
51
|
+
.include((x) => [x.email, x.email.attachments])
|
|
51
52
|
.toPagedList({ start, size, cancelToken });
|
|
52
53
|
const tasks = [];
|
|
53
54
|
for (const iterator of result.items) {
|
|
54
55
|
tasks.push(this.emailContentDownloader.downloadFromUrl(
|
|
55
|
-
apiPath(`/api/emails/channel/content/html/${channelID}/${iterator.emailID}/${iterator.headerMessageID}`)
|
|
56
|
-
, iterator));
|
|
57
|
-
tasks.push(this.engagementService.downloadEngagements(iterator));
|
|
56
|
+
apiPath(`/api/emails/channel/content/html/${channelID}/${iterator.emailID}/${iterator.email.headerMessageID}`)
|
|
57
|
+
, iterator.email));
|
|
58
|
+
tasks.push(this.engagementService.downloadEngagements(iterator.email));
|
|
58
59
|
}
|
|
59
60
|
await Promise.all(tasks);
|
|
60
|
-
return result;
|
|
61
|
+
return { items: result.items.map((x) => x.email), total: result.total };
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
public async getMailbox(id: number) {
|