@social-mail/social-mail-client 1.2.288 → 1.2.289

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.
@@ -49285,6 +49285,7 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
49285
49285
  max-width: 200px;
49286
49286
  height: 200px;
49287
49287
  object-fit: contain;
49288
+ margin-top: 3ch;
49288
49289
  }
49289
49290
 
49290
49291
 
@@ -49308,6 +49309,7 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
49308
49309
  this.version = 1;
49309
49310
  this.size = 700;
49310
49311
  this.selectedFiles = [];
49312
+ this.showSize = true;
49311
49313
  }
49312
49314
  init() {
49313
49315
  var _a;
@@ -49319,6 +49321,7 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
49319
49321
  this.selectedFolder = this.parameters.folder;
49320
49322
  this.element.style.minWidth = "90%";
49321
49323
  this.element.style.minHeight = "90%";
49324
+ this.showSize = /^(image|video)\//i.test(accept);
49322
49325
  const selected = this.parameters.selected;
49323
49326
  if ((selected === null || selected === void 0 ? void 0 : selected.tagName) === "IMG") {
49324
49327
  if (/^image\-grid$/i.test((_a = selected.parentElement) === null || _a === void 0 ? void 0 : _a.tagName)) {
@@ -49378,30 +49381,44 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
49378
49381
  accept,
49379
49382
  cancelToken
49380
49383
  })),
49381
- itemRenderer: item => XNode.create("div", {
49382
- class: "media-file"
49383
- }, this.parameters.multiple && XNode.create(SelectorCheckBox, null), XNode.create("label", {
49384
- class: "file-name",
49385
- title: item.name,
49386
- text: item.name
49387
- }), XNode.create("img", {
49388
- class: "file-preview",
49389
- src: apiPath(`/api/files/webp(300)/${item.appFileID}/${item.fileContentID}/${item.name}.300.webp`)
49390
- }))
49384
+ itemRenderer: item => {
49385
+ if (/text\/html/i.test(item.contentType)) {
49386
+ return XNode.create("div", {
49387
+ class: "media-file"
49388
+ }, this.parameters.multiple && XNode.create(SelectorCheckBox, null), XNode.create("label", {
49389
+ class: "file-name",
49390
+ title: item.name,
49391
+ text: item.name
49392
+ }), XNode.create("div", {
49393
+ class: "file-preview",
49394
+ text: "HTML File"
49395
+ }));
49396
+ }
49397
+ return XNode.create("div", {
49398
+ class: "media-file"
49399
+ }, this.parameters.multiple && XNode.create(SelectorCheckBox, null), XNode.create("label", {
49400
+ class: "file-name",
49401
+ title: item.name,
49402
+ text: item.name
49403
+ }), XNode.create("img", {
49404
+ class: "file-preview",
49405
+ src: apiPath(`/api/files/webp(300)/${item.appFileID}/${item.fileContentID}/${item.name}.300.webp`)
49406
+ }));
49407
+ }
49391
49408
  })));
49392
49409
  this.footerRenderer = () => XNode.create("div", {
49393
49410
  "style-display": Bind.oneWay(() => this.selectedFiles.length > 0),
49394
49411
  "data-layout": "row"
49395
- }, XNode.create(SelectAll, {
49412
+ }, this.parameters.multiple && XNode.create(SelectAll, {
49396
49413
  items: Bind.oneWay(() => this.filesRepeater.items),
49397
49414
  selectedItems: this.selectedFiles
49398
- }), XNode.create("input", {
49415
+ }), this.showSize && XNode.create("input", {
49399
49416
  type: "range",
49400
49417
  min: "100",
49401
49418
  max: "2000",
49402
49419
  step: "100",
49403
49420
  value: Bind.twoWaysImmediate(() => this.size)
49404
- }), XNode.create("span", {
49421
+ }), this.showSize && XNode.create("span", {
49405
49422
  text: Bind.oneWay(() => `${this.size}px`)
49406
49423
  }), XNode.create(SaveIconTextButton, {
49407
49424
  "data-click-event": "select-file",