@social-mail/social-mail-client 1.2.92 → 1.2.95

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 (45) hide show
  1. package/dist/admin/AdminAppIndex.pack.js +57 -134
  2. package/dist/admin/AdminAppIndex.pack.js.map +1 -1
  3. package/dist/admin/AdminAppIndex.pack.min.js +4 -4
  4. package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
  5. package/dist/common/pages/logs/LogsPage.d.ts.map +1 -1
  6. package/dist/common/pages/logs/LogsPage.js +1 -1
  7. package/dist/common/pages/logs/LogsPage.js.map +1 -1
  8. package/dist/common/pages/logs/services/AppLogService.d.ts +1 -1
  9. package/dist/common/pages/logs/services/AppLogService.js +3 -3
  10. package/dist/common/pages/logs/services/AppLogService.js.map +1 -1
  11. package/dist/model/model.d.ts +18 -112
  12. package/dist/model/model.d.ts.map +1 -1
  13. package/dist/model/model.js +6 -82
  14. package/dist/model/model.js.map +1 -1
  15. package/dist/public/channel/ChannelView.pack.js +22 -129
  16. package/dist/public/channel/ChannelView.pack.js.map +1 -1
  17. package/dist/public/channel/ChannelView.pack.min.js +1 -1
  18. package/dist/public/channel/ChannelView.pack.min.js.map +1 -1
  19. package/dist/services/email/EmailContentDownloader.d.ts +2 -2
  20. package/dist/services/email/EmailContentDownloader.d.ts.map +1 -1
  21. package/dist/services/email/EmailContentDownloader.js +5 -11
  22. package/dist/services/email/EmailContentDownloader.js.map +1 -1
  23. package/dist/services/socket/sockets.d.ts +1 -0
  24. package/dist/services/socket/sockets.d.ts.map +1 -1
  25. package/dist/services/socket/sockets.js.map +1 -1
  26. package/dist/tsconfig.tsbuildinfo +1 -1
  27. package/dist/web/AppIndex.pack.js +57 -134
  28. package/dist/web/AppIndex.pack.js.map +1 -1
  29. package/dist/web/AppIndex.pack.min.js +4 -4
  30. package/dist/web/AppIndex.pack.min.js.map +1 -1
  31. package/dist/web/page/mails/ConversationPage.d.ts.map +1 -1
  32. package/dist/web/page/mails/ConversationPage.js +31 -1
  33. package/dist/web/page/mails/ConversationPage.js.map +1 -1
  34. package/dist/web/page/mails/service/ConversationService.d.ts +1 -1
  35. package/dist/web/page/mails/service/ConversationService.d.ts.map +1 -1
  36. package/dist/web/page/mails/service/ConversationService.js +11 -36
  37. package/dist/web/page/mails/service/ConversationService.js.map +1 -1
  38. package/package.json +1 -1
  39. package/src/common/pages/logs/LogsPage.tsx +4 -4
  40. package/src/common/pages/logs/services/AppLogService.ts +2 -2
  41. package/src/model/model.ts +20 -124
  42. package/src/services/email/EmailContentDownloader.ts +6 -14
  43. package/src/services/socket/sockets.ts +4 -1
  44. package/src/web/page/mails/ConversationPage.tsx +35 -2
  45. package/src/web/page/mails/service/ConversationService.tsx +6 -36
@@ -9793,7 +9793,7 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/ent
9793
9793
  System.register(["@web-atoms/date-time/dist/DateTime", "@web-atoms/entity/dist/services/BaseEntityService"], function (_export, _context) {
9794
9794
  "use strict";
9795
9795
 
9796
- var DateTime, Model, DefaultFactory, AppRole, AppFileContentDispositionArray, AppFile, AppFileVersion, AppFileAccessTypeArray, AppFileAccess, AppFileTag, FileContent, Configuration, Contact, ContactEmail, ContactPhone, ContactItem, ContactDomain, CachedItem, Domain, HostedDomain, DomainUser, DomainRelayTypeArray, DomainRelay, DomainKey, EmailStatusArray, Email, EmailEngagement, AppLog, EmailRecipientTypeArray, EmailRecipient, EmailTag, EmailAddress, EmailTemplate, Mailbox, MailboxEmail, MailboxContactStatusArray, MailboxContact, MailboxContactEmail, MailboxContactTag, MailboxSyncTargetDirectionArray, MailboxSyncTargetProtocolArray, MailboxSyncTargetLastSyncStatusArray, MailboxSyncTarget, ChannelConfig, SubscriberActivity, SearchWordStatusArray, SearchWord, SearchWordIndex, UserStatusArray, User, UserPin, UserPushSubscription, UserRole, UserMailbox, UserAuthFactorMethodArray, UserAuthFactor, WebSiteFolder, WebSiteFolderHost, WebSiteFolderVersion, LoginSession, TextDocument, Tag, Product, ProductPrice, AppLicense, VirtualServer, DnsZone, DnsZoneRecordTypeArray, DnsZoneRecord, DnsSigningKey;
9796
+ var DateTime, Model, DefaultFactory, AppRole, AppFileContentDispositionArray, AppFile, AppFileVersion, AppFileAccessTypeArray, AppFileAccess, AppFileTag, FileContent, Configuration, Contact, ContactEmail, ContactPhone, ContactItem, ContactDomain, CachedItem, Domain, HostedDomain, DomainUser, DomainRelayTypeArray, DomainRelay, DomainKey, EmailStatusArray, Email, EmailEngagement, EmailLog, EmailRecipientTypeArray, EmailRecipient, EmailTag, EmailAddress, EmailTemplate, Mailbox, MailboxEmail, MailboxContactStatusArray, MailboxContact, MailboxContactEmail, MailboxContactTag, MailboxSyncTargetDirectionArray, MailboxSyncTargetProtocolArray, MailboxSyncTargetLastSyncStatusArray, MailboxSyncTarget, ChannelConfig, SubscriberActivity, SearchWordStatusArray, SearchWord, SearchWordIndex, UserStatusArray, User, UserPin, UserPushSubscription, UserRole, UserMailbox, UserAuthFactorMethodArray, UserAuthFactor, WebSiteFolder, WebSiteFolderHost, WebSiteFolderVersion, WebSiteChannel, LoginSession, TextDocument, Tag;
9797
9797
  return {
9798
9798
  setters: [function (_webAtomsDateTimeDistDateTime) {
9799
9799
  DateTime = _webAtomsDateTimeDistDateTime.default;
@@ -9954,9 +9954,11 @@ System.register(["@web-atoms/date-time/dist/DateTime", "@web-atoms/entity/dist/s
9954
9954
  engagement: "",
9955
9955
  count: 0
9956
9956
  }));
9957
- _export("AppLog", AppLog = new Model("AppLog", ["logID"], {
9957
+ _export("EmailLog", EmailLog = new Model("EmailLog", ["logID"], {
9958
+ fileName: "",
9959
+ compression: "",
9958
9960
  dateCreated: new DefaultFactory(() => new DateTime()),
9959
- json: false
9961
+ cloudPath: ""
9960
9962
  }));
9961
9963
  _export("EmailRecipientTypeArray", EmailRecipientTypeArray = [{
9962
9964
  "label": "from",
@@ -10153,6 +10155,7 @@ System.register(["@web-atoms/date-time/dist/DateTime", "@web-atoms/entity/dist/s
10153
10155
  dateCreated: new DefaultFactory(() => new DateTime()),
10154
10156
  name: ""
10155
10157
  }));
10158
+ _export("WebSiteChannel", WebSiteChannel = new Model("WebSiteChannel", ["folderID", "channelID"], {}));
10156
10159
  _export("LoginSession", LoginSession = new Model("LoginSession", ["sessionID"], {
10157
10160
  invalid: false,
10158
10161
  dateUpdated: new DefaultFactory(() => new DateTime())
@@ -10164,85 +10167,6 @@ System.register(["@web-atoms/date-time/dist/DateTime", "@web-atoms/entity/dist/s
10164
10167
  name: "",
10165
10168
  isSystemTag: false
10166
10169
  }));
10167
- _export("Product", Product = new Model("Product", ["productID"], {
10168
- name: ""
10169
- }));
10170
- _export("ProductPrice", ProductPrice = new Model("ProductPrice", ["priceID"], {
10171
- quantity: 0,
10172
- amount: 0,
10173
- isActive: false,
10174
- currency: ""
10175
- }));
10176
- _export("AppLicense", AppLicense = new Model("AppLicense", ["licenseID", "priceID"], {
10177
- dateCreated: new DefaultFactory(() => new DateTime()),
10178
- dateExpiry: new DefaultFactory(() => new DateTime()),
10179
- dateUpdated: new DefaultFactory(() => new DateTime()),
10180
- maxCores: 0,
10181
- licenseCode: ""
10182
- }));
10183
- _export("VirtualServer", VirtualServer = new Model("VirtualServer", ["serverID"], {
10184
- serverName: "",
10185
- active: false,
10186
- host: "",
10187
- maxStorageGB: 0
10188
- }));
10189
- _export("DnsZone", DnsZone = new Model("DnsZone", ["zoneID"], {
10190
- zone: "",
10191
- dateCreated: new DefaultFactory(() => new DateTime()),
10192
- dateUpdated: new DefaultFactory(() => new DateTime())
10193
- }));
10194
- _export("DnsZoneRecordTypeArray", DnsZoneRecordTypeArray = [{
10195
- "label": "A",
10196
- "value": "A"
10197
- }, {
10198
- "label": "AAAA",
10199
- "value": "AAAA"
10200
- }, {
10201
- "label": "CNAME",
10202
- "value": "CNAME"
10203
- }, {
10204
- "label": "MX",
10205
- "value": "MX"
10206
- }, {
10207
- "label": "TXT",
10208
- "value": "TXT"
10209
- }, {
10210
- "label": "PTR",
10211
- "value": "PTR"
10212
- }, {
10213
- "label": "SRV",
10214
- "value": "SRV"
10215
- }, {
10216
- "label": "CAA",
10217
- "value": "CAA"
10218
- }, {
10219
- "label": "NS",
10220
- "value": "NS"
10221
- }, {
10222
- "label": "SOA",
10223
- "value": "SOA"
10224
- }]);
10225
- _export("DnsZoneRecord", DnsZoneRecord = new Model("DnsZoneRecord", ["recordID"], {
10226
- disabled: false,
10227
- name: "",
10228
- type: "A",
10229
- isAlias: false,
10230
- value: "",
10231
- ttl: 0,
10232
- dateCreated: new DefaultFactory(() => new DateTime()),
10233
- dateUpdated: new DefaultFactory(() => new DateTime()),
10234
- hosted: false
10235
- }));
10236
- _export("DnsSigningKey", DnsSigningKey = new Model("DnsSigningKey", ["keyID"], {
10237
- publicKey: "",
10238
- digestAlgorithm: 0,
10239
- signingAlgorithm: 0,
10240
- digest: "",
10241
- flags: 0,
10242
- dateCreated: new DefaultFactory(() => new DateTime()),
10243
- expiryDate: new DefaultFactory(() => new DateTime()),
10244
- fileName: ""
10245
- }));
10246
10170
  }
10247
10171
  };
10248
10172
  });
@@ -10461,30 +10385,24 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/ent
10461
10385
  }],
10462
10386
  execute: function () {
10463
10387
  EmailContentDownloader = class EmailContentDownloader extends TaskManager {
10464
- download(email) {
10388
+ download(mce) {
10465
10389
  return __awaiter(this, void 0, void 0, function* () {
10466
- if (email.htmlBody) {
10467
- return email.htmlBody;
10468
- }
10469
- if (!email.originalFileID) {
10470
- return;
10471
- }
10472
10390
  const cache = yield window.caches.open("email-content-cache");
10473
- const cacheKey = new URL(email.htmlBodyUrl, location.href);
10391
+ const cacheKey = new URL(mce.htmlBodyUrl, location.href);
10474
10392
  const content = yield cache.match(cacheKey);
10475
10393
  if (content) {
10476
- return email.htmlBody = yield content.text();
10394
+ return mce.email.htmlBody = yield content.text();
10477
10395
  }
10478
10396
  return yield this.run(() => __awaiter(this, void 0, void 0, function* () {
10479
10397
  for (let i = 0; i < 3; i++) {
10480
10398
  try {
10481
- const text = yield FetchBuilder.get(email.htmlBodyUrl).responseAsText();
10399
+ const text = yield FetchBuilder.get(mce.htmlBodyUrl).responseAsText();
10482
10400
  yield cache.put(cacheKey, new Response(text, {
10483
10401
  headers: {
10484
10402
  "cache-control": "public, max-age=86000"
10485
10403
  }
10486
10404
  }));
10487
- return email.htmlBody = text;
10405
+ return mce.email.htmlBody = text;
10488
10406
  } catch (error) {
10489
10407
  console.error(error);
10490
10408
  }
@@ -11029,7 +10947,7 @@ System.register(["tslib", "@web-atoms/core/dist/di/Inject", "../../../../service
11029
10947
  System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/core/dist/di/Inject", "../../../../services/EntityService", "../../../../model/model", "../../../../common/Sql", "@web-atoms/email-dom/dist/DomToString", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/web/controls/AtomControl", "@web-atoms/core/dist/web/core/AtomUI", "@web-atoms/date-time/dist/DateTime", "../../../../common/events/CommonEvents", "../../../../services/BusyProgress", "../../../../services/email/EmailContentDownloader", "./EngagementService"], function (_export, _context) {
11030
10948
  "use strict";
11031
10949
 
11032
- var __awaiter, __decorate, __metadata, DISingleton, Inject, EntityService, Email, EmailRecipient, MailboxContactEmail, MailboxEmail, Sql, DomToString, XNode, AtomControl, descendentElementIterator, DateTime, CommonEvents, BusyProgress, EmailContentDownloader, EngagementService, renderMail, downloadEmailContent, ConversationService;
10950
+ var __awaiter, __decorate, __metadata, DISingleton, Inject, EntityService, Email, EmailRecipient, MailboxContactEmail, MailboxEmail, Sql, DomToString, XNode, AtomControl, descendentElementIterator, DateTime, CommonEvents, BusyProgress, EmailContentDownloader, EngagementService, renderMail, ConversationService;
11033
10951
  return {
11034
10952
  setters: [function (_tslib) {
11035
10953
  __awaiter = _tslib.__awaiter;
@@ -11133,35 +11051,6 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
11133
11051
  }
11134
11052
  return;
11135
11053
  }));
11136
- downloadEmailContent = (es, email) => __awaiter(void 0, void 0, void 0, function* () {
11137
- var _a, _b;
11138
- if (email.replyCount) {
11139
- const children = yield es.query(Email).where({
11140
- emailID: email.emailID
11141
- }, p => x => x.emailID === p.emailID && x.engagement !== null).orderByDescending(x => x.emailID).toPagedList({
11142
- start: 0,
11143
- size: 4,
11144
- cacheVersion: "a",
11145
- cacheSeconds: 900
11146
- });
11147
- email.children = (_a = children === null || children === void 0 ? void 0 : children.items) !== null && _a !== void 0 ? _a : [];
11148
- } else {
11149
- (_b = email.children) !== null && _b !== void 0 ? _b : email.children = [];
11150
- }
11151
- if (!email.originalFileID) {
11152
- return;
11153
- }
11154
- for (let i = 0; i < 10; i++) {
11155
- try {
11156
- const rs = yield fetch(email.htmlBodyUrl);
11157
- const text = yield rs.text();
11158
- email.htmlBody = text;
11159
- return;
11160
- } catch (error) {
11161
- console.error(error);
11162
- }
11163
- }
11164
- });
11165
11054
  ConversationService = class ConversationService {
11166
11055
  getDraft({
11167
11056
  mailboxID,
@@ -11251,12 +11140,13 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
11251
11140
  const tasks = [];
11252
11141
  const d = BusyProgress.create();
11253
11142
  try {
11254
- for (const {
11255
- email
11256
- } of emails.items) {
11143
+ for (const mce of emails.items) {
11144
+ const {
11145
+ email
11146
+ } = mce;
11257
11147
  (_a = email.htmlBody) !== null && _a !== void 0 ? _a : email.htmlBody = "";
11258
11148
  (_b = email.textBody) !== null && _b !== void 0 ? _b : email.textBody = "";
11259
- tasks.push(this.downloadEmailContent(email));
11149
+ tasks.push(this.downloadEmailContent(mce));
11260
11150
  tasks.push(this.engagementService.downloadEngagements(email));
11261
11151
  }
11262
11152
  yield Promise.all(tasks);
@@ -11276,9 +11166,12 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
11276
11166
  CommonEvents.onEmailUnscheduled.dispatchEvent(mce);
11277
11167
  });
11278
11168
  }
11279
- downloadEmailContent(email) {
11169
+ downloadEmailContent(mce) {
11280
11170
  var _a, _b;
11281
11171
  return __awaiter(this, void 0, void 0, function* () {
11172
+ const {
11173
+ email
11174
+ } = mce;
11282
11175
  if (email.replyCount) {
11283
11176
  const children = yield this.entityService.query(Email).where({
11284
11177
  emailID: email.emailID
@@ -11292,7 +11185,7 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
11292
11185
  } else {
11293
11186
  (_b = email.children) !== null && _b !== void 0 ? _b : email.children = [];
11294
11187
  }
11295
- yield this.emailContentDownloader.download(email);
11188
+ yield this.emailContentDownloader.download(mce);
11296
11189
  });
11297
11190
  }
11298
11191
  renderText(html) {