@social-mail/social-mail-client 1.2.35 → 1.2.36

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.
@@ -39533,6 +39533,7 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
39533
39533
  init() {
39534
39534
  return __awaiter(this, void 0, void 0, function* () {
39535
39535
  this.title = this.parameters.name;
39536
+ this.file = this.parameters;
39536
39537
  this.renderer = XNode.create("div", {
39537
39538
  "data-display": "grid",
39538
39539
  "data-align-items": "stretch",
@@ -39545,13 +39546,19 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
39545
39546
  "data-click-event": "save-file",
39546
39547
  text: "Save"
39547
39548
  }));
39548
- const file = this.parameters;
39549
+ const file = this.file;
39549
39550
  const iframe = this.element.querySelector("iframe");
39550
39551
  this.monacoService = yield MonacoService.createEditor(this, iframe);
39551
- const code = yield FetchBuilder.get(file.downloadUrl).responseAsText();
39552
- this.monacoService.setCodeModel(this, code, `http://a/${file.name}`);
39552
+ this.content = yield FetchBuilder.get(file.downloadUrl).responseAsText();
39553
+ this.monacoService.setCodeModel(this, this.content, `http://a/${file.name}`);
39553
39554
  });
39554
39555
  }
39556
+ codeChanged({
39557
+ code
39558
+ }) {
39559
+ this.modified || (this.modified = this.content !== code);
39560
+ this.content = code;
39561
+ }
39555
39562
  saveFile() {
39556
39563
  return __awaiter(this, void 0, void 0, function* () {
39557
39564
  const {
@@ -39568,6 +39575,7 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
39568
39575
  }),
39569
39576
  appFileID
39570
39577
  });
39578
+ this.modified = false;
39571
39579
  return yield this.cloudFileService.getFile(appFileID);
39572
39580
  });
39573
39581
  }
@@ -39582,6 +39590,9 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
39582
39590
  }
39583
39591
  });
39584
39592
  __decorate([InjectProperty, __metadata("design:type", CloudFileService)], CodeEditorPage.prototype, "cloudFileService", void 0);
39593
+ __decorate([Action({
39594
+ onEvent: "code-changed"
39595
+ }), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", void 0)], CodeEditorPage.prototype, "codeChanged", null);
39585
39596
  __decorate([Action({
39586
39597
  onEvent: "save-file",
39587
39598
  close: true