@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.
@@ -33386,12 +33386,14 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
33386
33386
  templates = false,
33387
33387
  cancelToken = null
33388
33388
  }) {
33389
+ var _a;
33389
33390
  return __awaiter(this, void 0, void 0, function* () {
33391
+ let root;
33390
33392
  if (templates) {
33391
33393
  const children = yield this.entityService.query(AppFile).where(x => x.templates.some(c => true)).toArray({
33392
33394
  cancelToken
33393
33395
  });
33394
- const root = AppFile.create({
33396
+ root = AppFile.create({
33395
33397
  name: "Templates",
33396
33398
  isFolder: true,
33397
33399
  appFileID: 0,
@@ -33400,11 +33402,13 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
33400
33402
  });
33401
33403
  return root;
33402
33404
  }
33403
- return yield this.entityService.query(AppFile).where({
33405
+ root = yield this.entityService.query(AppFile).where({
33404
33406
  id
33405
33407
  }, p => x => x.appFileID === p.id && x.isDeleted === false).include(x => x.creator).include(x => x.children).firstOrDefault({
33406
33408
  cancelToken
33407
33409
  });
33410
+ (_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));
33411
+ return root;
33408
33412
  });
33409
33413
  }
33410
33414
  rootFolders() {
@@ -33517,6 +33521,8 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
33517
33521
  folder.children.add(iterator);
33518
33522
  results.push(iterator);
33519
33523
  }
33524
+ results.sort((a, b) => a.isFolder ? Number.MIN_SAFE_INTEGER : b.isFolder ? Number.MAX_SAFE_INTEGER : a.name.localeCompare(b.name));
33525
+ results.refresh();
33520
33526
  return results;
33521
33527
  });
33522
33528
  }
@@ -45311,7 +45317,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "./HtmlP
45311
45317
  this.htmlDocument.head.appendChild(this.htmlDocument.createTextNode("\n"));
45312
45318
  this.htmlDocument.head.appendChild(script);
45313
45319
  }
45314
- script.setAttribute("src", "//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.50/dist/components.webpack.js");
45320
+ script.setAttribute("src", "//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.51/dist/components.webpack.js");
45315
45321
  });
45316
45322
  }
45317
45323
  addStyleSheet(file) {
@@ -45898,7 +45904,6 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
45898
45904
  (_a = (_c = this.root).children) !== null && _a !== void 0 ? _a : _c.children = [];
45899
45905
  this.root.children.remove(x => x.isDeleted || !(/^(text\/(html|css))$/i.test(x.contentType) || x.isFolder));
45900
45906
  this.root.children.sort((a, b) => a.isFolder ? -1 : 0);
45901
- yield this.onItemExpanded(this.root);
45902
45907
  if (!((_b = this.root.children) === null || _b === void 0 ? void 0 : _b.some(f => f.name === "index.html"))) {
45903
45908
  yield this.createIndexHtml();
45904
45909
  return;
@@ -46017,16 +46022,6 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
46017
46022
  openFolder(file) {
46018
46023
  this.selectedFile = file;
46019
46024
  }
46020
- onItemExpanded(folder) {
46021
- return __awaiter(this, void 0, void 0, function* () {
46022
- yield this.cloudFileService.files({
46023
- search: "",
46024
- accept: "text/html",
46025
- folder,
46026
- cancelToken: null
46027
- });
46028
- });
46029
- }
46030
46025
  onFilesUploaded() {
46031
46026
  return __awaiter(this, void 0, void 0, function* () {
46032
46027
  this.version++;
@@ -46143,9 +46138,6 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
46143
46138
  __decorate([Action({
46144
46139
  onEvent: "open-folder"
46145
46140
  }), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", void 0)], WebSiteStudioPage.prototype, "openFolder", null);
46146
- __decorate([Action({
46147
- onEvent: "item-expanded"
46148
- }), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Promise)], WebSiteStudioPage.prototype, "onItemExpanded", null);
46149
46141
  __decorate([Action({
46150
46142
  onEvent: "files-available"
46151
46143
  }), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise)], WebSiteStudioPage.prototype, "onFilesUploaded", null);