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

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,