@social-mail/social-mail-client 1.2.241 → 1.2.243

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.
@@ -22522,12 +22522,14 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
22522
22522
  templates = false,
22523
22523
  cancelToken = null
22524
22524
  }) {
22525
+ var _a;
22525
22526
  return __awaiter(this, void 0, void 0, function* () {
22527
+ let root;
22526
22528
  if (templates) {
22527
22529
  const children = yield this.entityService.query(AppFile).where(x => x.templates.some(c => true)).toArray({
22528
22530
  cancelToken
22529
22531
  });
22530
- const root = AppFile.create({
22532
+ root = AppFile.create({
22531
22533
  name: "Templates",
22532
22534
  isFolder: true,
22533
22535
  appFileID: 0,
@@ -22536,11 +22538,13 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
22536
22538
  });
22537
22539
  return root;
22538
22540
  }
22539
- return yield this.entityService.query(AppFile).where({
22541
+ root = yield this.entityService.query(AppFile).where({
22540
22542
  id
22541
22543
  }, p => x => x.appFileID === p.id && x.isDeleted === false).include(x => x.creator).include(x => x.children).firstOrDefault({
22542
22544
  cancelToken
22543
22545
  });
22546
+ (_a = root.children) === null || _a === void 0 ? void 0 : _a.sort((a, b) => a.isFolder ? Number.MIN_SAFE_INTEGER : b.isFolder ? Number.MAX_SAFE_INTEGER : a.name.localeCompare(b.name));
22547
+ return root;
22544
22548
  });
22545
22549
  }
22546
22550
  rootFolders() {
@@ -22653,6 +22657,8 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
22653
22657
  folder.children.add(iterator);
22654
22658
  results.push(iterator);
22655
22659
  }
22660
+ results.sort((a, b) => a.isFolder ? Number.MIN_SAFE_INTEGER : b.isFolder ? Number.MAX_SAFE_INTEGER : a.name.localeCompare(b.name));
22661
+ results.refresh();
22656
22662
  return results;
22657
22663
  });
22658
22664
  }
@@ -48997,7 +49003,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
48997
49003
  this.htmlDocument.head.appendChild(this.htmlDocument.createTextNode("\n"));
48998
49004
  this.htmlDocument.head.appendChild(script);
48999
49005
  }
49000
- script.setAttribute("src", "//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.50/dist/components.webpack.js");
49006
+ script.setAttribute("src", "//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.51/dist/components.webpack.js");
49001
49007
  });
49002
49008
  }
49003
49009
  addStyleSheet(file) {
@@ -49584,7 +49590,6 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
49584
49590
  (_a = (_c = this.root).children) !== null && _a !== void 0 ? _a : _c.children = [];
49585
49591
  this.root.children.remove(x => x.isDeleted || !(/^(text\/(html|css))$/i.test(x.contentType) || x.isFolder));
49586
49592
  this.root.children.sort((a, b) => a.isFolder ? -1 : 0);
49587
- yield this.onItemExpanded(this.root);
49588
49593
  if (!((_b = this.root.children) === null || _b === void 0 ? void 0 : _b.some(f => f.name === "index.html"))) {
49589
49594
  yield this.createIndexHtml();
49590
49595
  return;
@@ -49703,16 +49708,6 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
49703
49708
  openFolder(file) {
49704
49709
  this.selectedFile = file;
49705
49710
  }
49706
- onItemExpanded(folder) {
49707
- return __awaiter(this, void 0, void 0, function* () {
49708
- yield this.cloudFileService.files({
49709
- search: "",
49710
- accept: "text/html",
49711
- folder,
49712
- cancelToken: null
49713
- });
49714
- });
49715
- }
49716
49711
  onFilesUploaded() {
49717
49712
  return __awaiter(this, void 0, void 0, function* () {
49718
49713
  this.version++;
@@ -49829,9 +49824,6 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
49829
49824
  __decorate([Action({
49830
49825
  onEvent: "open-folder"
49831
49826
  }), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", void 0)], WebSiteStudioPage.prototype, "openFolder", null);
49832
- __decorate([Action({
49833
- onEvent: "item-expanded"
49834
- }), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Promise)], WebSiteStudioPage.prototype, "onItemExpanded", null);
49835
49827
  __decorate([Action({
49836
49828
  onEvent: "files-available"
49837
49829
  }), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise)], WebSiteStudioPage.prototype, "onFilesUploaded", null);