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

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.
@@ -25960,7 +25960,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/di
25960
25960
  });
25961
25961
  }
25962
25962
  sendEmail() {
25963
- var _a, _b, _c, _d;
25963
+ var _a, _b, _c;
25964
25964
  return __awaiter(this, void 0, void 0, function* () {
25965
25965
  if (!((_a = this.draft) === null || _a === void 0 ? void 0 : _a.textBody)) {
25966
25966
  if (!((_c = (_b = this.draft) === null || _b === void 0 ? void 0 : _b.attachments) === null || _c === void 0 ? void 0 : _c.length)) {
@@ -25977,7 +25977,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/di
25977
25977
  this.draft.status = "scheduled";
25978
25978
  this.draft.dateSent = DateTime.now.add(TimeSpan.fromSeconds(30));
25979
25979
  yield this.mailService.send(this.draft);
25980
- (_d = this.draft) !== null && _d !== void 0 ? _d : this.draft = Email.create({
25980
+ this.draft = Email.create({
25981
25981
  htmlBody: `<div contentEditable="true"><p></p><br/></div>`,
25982
25982
  attachments: []
25983
25983
  });
@@ -36244,6 +36244,7 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
36244
36244
  init() {
36245
36245
  return __awaiter(this, void 0, void 0, function* () {
36246
36246
  this.title = this.parameters.name;
36247
+ this.file = this.parameters;
36247
36248
  this.renderer = XNode.create("div", {
36248
36249
  "data-display": "grid",
36249
36250
  "data-align-items": "stretch",
@@ -36256,13 +36257,19 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
36256
36257
  "data-click-event": "save-file",
36257
36258
  text: "Save"
36258
36259
  }));
36259
- const file = this.parameters;
36260
+ const file = this.file;
36260
36261
  const iframe = this.element.querySelector("iframe");
36261
36262
  this.monacoService = yield MonacoService.createEditor(this, iframe);
36262
- const code = yield FetchBuilder.get(file.downloadUrl).responseAsText();
36263
- this.monacoService.setCodeModel(this, code, `http://a/${file.name}`);
36263
+ this.content = yield FetchBuilder.get(file.downloadUrl).responseAsText();
36264
+ this.monacoService.setCodeModel(this, this.content, `http://a/${file.name}`);
36264
36265
  });
36265
36266
  }
36267
+ codeChanged({
36268
+ code
36269
+ }) {
36270
+ this.modified || (this.modified = this.content !== code);
36271
+ this.content = code;
36272
+ }
36266
36273
  saveFile() {
36267
36274
  return __awaiter(this, void 0, void 0, function* () {
36268
36275
  const {
@@ -36279,6 +36286,7 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
36279
36286
  }),
36280
36287
  appFileID
36281
36288
  });
36289
+ this.modified = false;
36282
36290
  return yield this.cloudFileService.getFile(appFileID);
36283
36291
  });
36284
36292
  }
@@ -36293,6 +36301,9 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
36293
36301
  }
36294
36302
  });
36295
36303
  __decorate([InjectProperty, __metadata("design:type", CloudFileService)], CodeEditorPage.prototype, "cloudFileService", void 0);
36304
+ __decorate([Action({
36305
+ onEvent: "code-changed"
36306
+ }), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", void 0)], CodeEditorPage.prototype, "codeChanged", null);
36296
36307
  __decorate([Action({
36297
36308
  onEvent: "save-file",
36298
36309
  close: true