@social-mail/social-mail-client 1.2.376 → 1.2.377

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.
@@ -23766,6 +23766,22 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
23766
23766
  yield this.entityService.save(files);
23767
23767
  });
23768
23768
  }
23769
+ getFilePath(root, selectedFile) {
23770
+ var _a;
23771
+ const [ignore, ...segments] = selectedFile.path.split("/");
23772
+ let path = "";
23773
+ for (const iterator of segments) {
23774
+ if (selectedFile.appFileID === iterator) {
23775
+ break;
23776
+ }
23777
+ root = (_a = root.children) === null || _a === void 0 ? void 0 : _a.find(x => x.appFileID === iterator);
23778
+ if (!root) {
23779
+ return path;
23780
+ }
23781
+ path += root.name + "/";
23782
+ }
23783
+ return path;
23784
+ }
23769
23785
  };
23770
23786
  __decorate([Inject, __metadata("design:type", EntityService)], CloudFileService.prototype, "entityService", void 0);
23771
23787
  __decorate([Inject, __metadata("design:type", LocalFileService)], CloudFileService.prototype, "localFileService", void 0);
@@ -52457,7 +52473,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
52457
52473
  icon: "fad fa-globe-pointer",
52458
52474
  text: "View Site"
52459
52475
  }), XNode.create("a", {
52460
- href: Bind.oneWay(() => apiPath(`/api/site/draft/${this.webSite.folderID}/${this.selectedFile.name}`)),
52476
+ href: Bind.oneWay(() => apiPath(`/api/site/draft/${this.root.appFileID}/${this.cloudFileService.getFilePath(this.root, this.selectedFile)}${this.selectedFile.name}`)),
52461
52477
  target: "_blank"
52462
52478
  }, XNode.create(EditIconTextButton, {
52463
52479
  icon: "fad fa-globe-pointer",
@@ -52500,7 +52516,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
52500
52516
  }), XNode.create(WebSitePageEditor, {
52501
52517
  class: "file-list",
52502
52518
  selectedFile: Bind.oneWay(() => this.selectedFile),
52503
- baseUrl: Bind.oneWay(() => apiPath(`/api/site/draft/${this.root.appFileID}/`)),
52519
+ baseUrl: Bind.oneWay(() => apiPath(`/api/site/draft/${this.root.appFileID}/${this.cloudFileService.getFilePath(this.root, this.selectedFile)}`)),
52504
52520
  folder: this.root,
52505
52521
  presenter: Bind.presenter(c => this.htmlEditor = c),
52506
52522
  "event-html-page-changed": ce => this.pageContent = ce.detail,