@social-mail/social-mail-client 1.8.355 → 1.8.356

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-client",
3
- "version": "1.8.355",
3
+ "version": "1.8.356",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -8,6 +8,7 @@ import InfiniteRepeater from "../../controls/repeater/InfiniteRepeater";
8
8
  import CommonCommands from "../../commands/CommonCommands";
9
9
  import DnsZoneService from "./DnsZoneService";
10
10
  import { HostedZone, IHostedZone } from "../../../model/model";
11
+ import Bind from "@web-atoms/core/dist/core/Bind";
11
12
 
12
13
  export default class DnsZoneListPage extends ContentPage {
13
14
 
@@ -15,12 +16,19 @@ export default class DnsZoneListPage extends ContentPage {
15
16
  size = 100;
16
17
  version = 1;
17
18
 
19
+ search = "";
20
+
18
21
  @InjectProperty
19
22
  private dnsZoneService: DnsZoneService;
20
23
 
21
24
  private zones: IHostedZone[] = [];
22
25
 
23
26
  async init() {
27
+
28
+ this.headerRenderer = () => <div data-layout="header-row">
29
+ <input type="search" value={Bind.twoWaysImmediate(() => this.search)}/>
30
+ </div>;
31
+
24
32
  this.renderer = <div>
25
33
  <AtomRepeater
26
34
  data-layout="data-grid"
@@ -2,6 +2,7 @@ import { Inject } from "@web-atoms/core/dist/di/Inject";
2
2
  import EntityService from "../../../services/EntityService";
3
3
  import { HostedZone, IHostedZone, IHostedZoneRecord } from "../../../model/model";
4
4
  import DITransient from "@web-atoms/core/dist/di/DITransient";
5
+ import { Sql } from "../../Sql";
5
6
 
6
7
  @DITransient()
7
8
  export default class DnsZoneService {
@@ -10,13 +11,20 @@ export default class DnsZoneService {
10
11
  private entityService: EntityService;
11
12
 
12
13
  list({
14
+ search = "",
13
15
  start = 0,
14
16
  size = 100,
15
17
  cancelToken = null,
16
18
  version = 1
17
19
  }) {
18
- return this.entityService.query(HostedZone)
20
+ let q = this.entityService.query(HostedZone);
21
+ if (search) {
22
+ search = `${search}%`.toLowerCase();
23
+ q = q.where({ search }, (p) => (x) => Sql.text.like(x.domain.name, p.search));
24
+ }
25
+ return q
19
26
  .include((x) => x.domain)
27
+ .orderBy((x) => x.domain.name)
20
28
  .toPagedList({
21
29
  start,
22
30
  size,