@social-mail/social-mail-client 1.0.92 → 1.0.94

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.
@@ -25135,12 +25135,18 @@ System.register(["tslib", "@web-atoms/core/dist/di/Inject", "../EntityService",
25135
25135
  if (!search) {
25136
25136
  return [];
25137
25137
  }
25138
+ let q = this.entityService.query(EmailAddress);
25138
25139
  if (!/\%$/.test(search)) {
25139
- search = search + "%";
25140
+ search = `${search}%`.toLocaleLowerCase();
25141
+ q = q.where({
25142
+ search
25143
+ }, p => x => Sql.text.like(x.emailAddress, p.search) || Sql.text.like(x.name, p.search));
25144
+ } else {
25145
+ q = q.where({
25146
+ search
25147
+ }, p => x => Sql.text.iLike(x.emailAddress, p.search) || Sql.text.iLike(x.name, p.search));
25140
25148
  }
25141
- const list = yield this.entityService.query(EmailAddress).where({
25142
- search
25143
- }, p => x => Sql.text.like(x.emailAddress, p.search)).orderByDescending(x => x.emailAddressID).toPagedList({
25149
+ const list = yield q.orderByDescending(x => x.emailAddressID).toPagedList({
25144
25150
  start: 0,
25145
25151
  size: 10,
25146
25152
  count: false,
@@ -26193,12 +26199,12 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
26193
26199
  replyEmail({
26194
26200
  email
26195
26201
  }, ce) {
26196
- var _a, _b;
26202
+ var _a, _b, _c;
26197
26203
  return __awaiter(this, void 0, void 0, function* () {
26198
26204
  const parse = JSON.parse(email.headers);
26199
26205
  const emailAddressText = ((_b = (_a = parse === null || parse === void 0 ? void 0 : parse.replyTo) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : this.parameters.emailAddress.emailAddress).toLocaleLowerCase();
26200
26206
  const name = email.senderName;
26201
- const parentID = email.emailID;
26207
+ const parentID = (_c = email.parentID) !== null && _c !== void 0 ? _c : email.emailID;
26202
26208
  const recipients = [EmailRecipient.create({
26203
26209
  name,
26204
26210
  emailAddressText