@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.
Files changed (49) hide show
  1. package/dist/admin/AdminAppIndex.pack.js +33 -29
  2. package/dist/admin/AdminAppIndex.pack.js.map +1 -1
  3. package/dist/admin/AdminAppIndex.pack.min.js +2 -2
  4. package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
  5. package/dist/public/channel/ChannelView.pack.js +19 -19
  6. package/dist/public/channel/ChannelView.pack.js.map +1 -1
  7. package/dist/public/channel/ChannelView.pack.min.js +1 -1
  8. package/dist/public/channel/ChannelView.pack.min.js.map +1 -1
  9. package/dist/public/contact-us/ContactUsApp.pack.js +19 -19
  10. package/dist/public/contact-us/ContactUsApp.pack.js.map +1 -1
  11. package/dist/public/contact-us/ContactUsApp.pack.min.js +1 -1
  12. package/dist/public/contact-us/ContactUsApp.pack.min.js.map +1 -1
  13. package/dist/public/preview/pdf/PreviewPDF.pack.js +19 -19
  14. package/dist/public/preview/pdf/PreviewPDF.pack.js.map +1 -1
  15. package/dist/public/preview/pdf/PreviewPDF.pack.min.js +1 -1
  16. package/dist/public/preview/pdf/PreviewPDF.pack.min.js.map +1 -1
  17. package/dist/public/store/Store.pack.js +19 -19
  18. package/dist/public/store/Store.pack.js.map +1 -1
  19. package/dist/public/store/Store.pack.min.js +1 -1
  20. package/dist/public/store/Store.pack.min.js.map +1 -1
  21. package/dist/public/store/StoreApp.pack.js +19 -19
  22. package/dist/public/store/StoreApp.pack.js.map +1 -1
  23. package/dist/public/store/StoreApp.pack.min.js +1 -1
  24. package/dist/public/store/StoreApp.pack.min.js.map +1 -1
  25. package/dist/public/store/cart/ShoppingCart.pack.js +19 -19
  26. package/dist/public/store/cart/ShoppingCart.pack.js.map +1 -1
  27. package/dist/public/store/cart/ShoppingCart.pack.min.js +1 -1
  28. package/dist/public/store/cart/ShoppingCart.pack.min.js.map +1 -1
  29. package/dist/site-editor/SiteEditorApp.pack.js +19 -19
  30. package/dist/site-editor/SiteEditorApp.pack.js.map +1 -1
  31. package/dist/site-editor/SiteEditorApp.pack.min.js +1 -1
  32. package/dist/site-editor/SiteEditorApp.pack.min.js.map +1 -1
  33. package/dist/tsconfig.tsbuildinfo +1 -1
  34. package/dist/web/AppIndex.pack.js +33 -29
  35. package/dist/web/AppIndex.pack.js.map +1 -1
  36. package/dist/web/AppIndex.pack.min.js +2 -2
  37. package/dist/web/AppIndex.pack.min.js.map +1 -1
  38. package/dist/web/page/channels/services/ChannelService.d.ts +4 -1
  39. package/dist/web/page/channels/services/ChannelService.d.ts.map +1 -1
  40. package/dist/web/page/channels/services/ChannelService.js +14 -10
  41. package/dist/web/page/channels/services/ChannelService.js.map +1 -1
  42. package/node_modules/@web-atoms/core/dist/style/styled.d.ts.map +1 -1
  43. package/node_modules/@web-atoms/core/dist/style/styled.js +19 -19
  44. package/node_modules/@web-atoms/core/dist/style/styled.js.map +1 -1
  45. package/node_modules/@web-atoms/core/dist/tsconfig.tsbuildinfo +1 -1
  46. package/node_modules/@web-atoms/core/package.json +1 -1
  47. package/node_modules/@web-atoms/core/src/style/styled.ts +19 -21
  48. package/package.json +2 -2
  49. 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(Email);
31
+ let q = this.entityService.query(MailboxEmail);
32
32
 
33
33
  if (channelID) {
34
- q = q.where({ channelID}, (p) => (x) => x.mailboxes.some((m) => m.mailboxID === p.channelID));
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.status === "published");
38
+ q = q.where((x) => x.datePublished !== null);
39
39
  } else {
40
- q = q.where((x) => x.status !== "published");
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) {