@social-mail/social-mail-hosted-web 1.0.21 → 1.0.22

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.
@@ -18113,11 +18113,11 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
18113
18113
  execute: function () {
18114
18114
  _export("default", DnsRecordEditorPage = class DnsRecordEditorPage extends PopupWindowPage {
18115
18115
  init() {
18116
- var _a, _b, _c, _d;
18116
+ var _a, _b, _c, _d, _e;
18117
18117
  return __awaiter(this, void 0, void 0, function* () {
18118
- this.title = "Add New Record";
18119
- const zone = this.zone = (_a = this.parameters) === null || _a === void 0 ? void 0 : _a.zone;
18120
- (_b = this.model) !== null && _b !== void 0 ? _b : this.model = (_d = (_c = this.parameters) === null || _c === void 0 ? void 0 : _c.model) !== null && _d !== void 0 ? _d : DnsZoneRecord.create({
18118
+ this.title = ((_a = this.parameters) === null || _a === void 0 ? void 0 : _a.model) ? "Edit Record" : "Add New Record";
18119
+ const zone = this.zone = (_b = this.parameters) === null || _b === void 0 ? void 0 : _b.zone;
18120
+ (_c = this.model) !== null && _c !== void 0 ? _c : this.model = (_e = (_d = this.parameters) === null || _d === void 0 ? void 0 : _d.model) !== null && _e !== void 0 ? _e : DnsZoneRecord.create({
18121
18121
  ttl: 600,
18122
18122
  type: "A",
18123
18123
  name: "@",
@@ -18264,7 +18264,12 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
18264
18264
  text: item.ttl
18265
18265
  }), XNode.create("label", {
18266
18266
  text: item.value
18267
- }), XNode.create("br", null), item.disabled ? XNode.create("button", {
18267
+ }), XNode.create("br", null), XNode.create("button", {
18268
+ "data-click-event": "edit-item",
18269
+ "data-layout": "icon-button"
18270
+ }, XNode.create("i", {
18271
+ class: "fas fa-edit"
18272
+ }), "Edit"), item.disabled ? XNode.create("button", {
18268
18273
  "data-click-event": "enable-item",
18269
18274
  "data-layout": "icon-button"
18270
18275
  }, XNode.create("i", {
@@ -18305,6 +18310,17 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
18305
18310
  this.sort();
18306
18311
  });
18307
18312
  }
18313
+ editItem(model) {
18314
+ return __awaiter(this, void 0, void 0, function* () {
18315
+ const zone = this.model;
18316
+ model = yield PageNavigator.pushPageForResult(DnsRecordEditorPage, {
18317
+ model,
18318
+ zone
18319
+ });
18320
+ yield this.dnsZoneService.saveRecord(model);
18321
+ this.sort();
18322
+ });
18323
+ }
18308
18324
  addNewRecord() {
18309
18325
  return __awaiter(this, void 0, void 0, function* () {
18310
18326
  const zone = this.model;
@@ -18330,6 +18346,9 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
18330
18346
  onEvent: "enable-item",
18331
18347
  confirm: "Are you sure you want to enable the record?"
18332
18348
  }), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Promise)], DnsZoneEditorPage.prototype, "enableItem", null);
18349
+ __decorate([Action({
18350
+ onEvent: "edit-item"
18351
+ }), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Promise)], DnsZoneEditorPage.prototype, "editItem", null);
18333
18352
  __decorate([Action({
18334
18353
  onEvent: "add-new-record"
18335
18354
  }), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise)], DnsZoneEditorPage.prototype, "addNewRecord", null);