@pristy/pristy-libvue 1.21.3 → 1.21.4

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.
@@ -3536,7 +3536,8 @@ class Wu {
3536
3536
  }
3537
3537
  isThumbnailSupported(e) {
3538
3538
  let l = ["application/pdf", "application/msword", "application/rtf"], s = ["image/svg+xml"];
3539
- return e.isFile && e.content.mimeType && !s.includes(e.content.mimeType) && (e.content.mimeType.startsWith("image/") || e.content.mimeType.startsWith("video/") || e.content.mimeType.startsWith("application/vnd") || l.includes(e.content.mimeType));
3539
+ const a = e.content?.mimeType;
3540
+ return !!(e.isFile && a && !s.includes(a) && (a.startsWith("image/") || a.startsWith("video/") || a.startsWith("application/vnd") || l.includes(a)));
3540
3541
  }
3541
3542
  /**
3542
3543
  * Status of a rendition from a listRenditions/listVersionRenditions response.
@@ -3687,7 +3688,8 @@ class Wu {
3687
3688
  return null;
3688
3689
  }
3689
3690
  isDoc(e) {
3690
- return e.isFile && e.content.mimeType !== "application/pdf" && !e.content.mimeType.includes("image/") && !e.content.mimeType.includes("video/");
3691
+ const l = e.content?.mimeType;
3692
+ return !!(e.isFile && l && l !== "application/pdf" && !l.includes("image/") && !l.includes("video/"));
3691
3693
  }
3692
3694
  toggleMSOfficeVue(e) {
3693
3695
  if (e.isLocked) {
@@ -3914,7 +3916,7 @@ const ke = new Wu(), yu = it({
3914
3916
  "application/typescript": "text-editor"
3915
3917
  };
3916
3918
  function Sc(t) {
3917
- const e = Ye(), l = yu(), s = t.content.mimeType;
3919
+ const e = Ye(), l = yu(), s = t.content?.mimeType ?? "";
3918
3920
  return !e.OPEN_PDF_WITH_COLLABORA && s === "application/pdf" ? { name: "consultation-pdf", params: { id: t.id } } : s.startsWith("image/") ? { name: "consultation-image", params: { id: t.id } } : s.startsWith("video/") ? { name: "consultation-video", params: { id: t.id } } : Gs[s] ? { name: Gs[s], params: { id: t.id } } : s.startsWith("text/") ? { name: "text-editor", params: { id: t.id } } : l.checkIfExists(s, "edit") ? {
3919
3921
  name: "edit-collabora",
3920
3922
  params: { action: "edit", id: t.id }
@@ -5657,7 +5659,8 @@ class pp {
5657
5659
  getIcon(e) {
5658
5660
  let l;
5659
5661
  if (e.isFile) {
5660
- switch (e.content.mimeType) {
5662
+ const s = e.content?.mimeType ?? "";
5663
+ switch (s) {
5661
5664
  case "application/vnd.oasis.opendocument.text":
5662
5665
  case "application/vnd.openxmlformats-officedocument.wordprocessingml.document":
5663
5666
  case "application/msword":
@@ -5803,7 +5806,7 @@ class pp {
5803
5806
  default:
5804
5807
  l = "file-unknow";
5805
5808
  }
5806
- l === "file-unknow" && (e.content.mimeType.startsWith("image/") ? l = "image-unknow" : e.content.mimeType.startsWith("video/") ? l = "video-unknow" : e.content.mimeType.startsWith("audio/") ? l = "audio-unknow" : e.content.mimeType.startsWith("text/") ? l = "text-unknow" : (e.content.mimeType.startsWith("application/x-font-") || e.content.mimeType.startsWith("font/")) && (l = "file-font"));
5809
+ l === "file-unknow" && (s.startsWith("image/") ? l = "image-unknow" : s.startsWith("video/") ? l = "video-unknow" : s.startsWith("audio/") ? l = "audio-unknow" : s.startsWith("text/") ? l = "text-unknow" : (s.startsWith("application/x-font-") || s.startsWith("font/")) && (l = "file-font"));
5807
5810
  } else
5808
5811
  e.nodeType === "st:site" ? l = "mimetype_espace" : l = "mimetype_folder";
5809
5812
  return l;
@@ -5812,13 +5815,14 @@ class pp {
5812
5815
  let l;
5813
5816
  if (e.isFolder)
5814
5817
  l = Oe("dossier");
5815
- else if (e.isFile)
5816
- if (e.content.mimeType.startsWith("image/"))
5818
+ else if (e.isFile) {
5819
+ const s = e.content?.mimeType ?? "";
5820
+ if (s.startsWith("image/"))
5817
5821
  l = Oe("fichier_image");
5818
- else if (e.content.mimeType.startsWith("video/"))
5822
+ else if (s.startsWith("video/"))
5819
5823
  l = Oe("fichier_video");
5820
5824
  else
5821
- switch (e.content.mimeType) {
5825
+ switch (s) {
5822
5826
  case "application/pdf":
5823
5827
  l = Oe("fichier_pdf");
5824
5828
  break;
@@ -5920,7 +5924,7 @@ class pp {
5920
5924
  default:
5921
5925
  l = Oe("fichier");
5922
5926
  }
5923
- else
5927
+ } else
5924
5928
  e.nodeType === "st:site" ? l = Oe("espace") : l = e.nodeType;
5925
5929
  return l;
5926
5930
  }
@@ -6047,7 +6051,7 @@ const Jl = new pp(), Zp = {
6047
6051
  return V2.toLocaleDateString(t);
6048
6052
  },
6049
6053
  displaySvg(t) {
6050
- return t.isFile && t.content.mimeType === "image/svg+xml";
6054
+ return t.isFile && t.content?.mimeType === "image/svg+xml";
6051
6055
  },
6052
6056
  loadIcon(t) {
6053
6057
  return Jl.getIcon(t);
@@ -6317,7 +6321,7 @@ function Op(t, e, l, s, a, o) {
6317
6321
  _: 1
6318
6322
  }, 8, ["value", "state-key", "data-key", "filters", "class"])) : v("", !0);
6319
6323
  }
6320
- const Qc = /* @__PURE__ */ te(Zp, [["render", Op], ["__scopeId", "data-v-5de6ae10"]]), jp = {
6324
+ const Qc = /* @__PURE__ */ te(Zp, [["render", Op], ["__scopeId", "data-v-ef7b0e1a"]]), jp = {
6321
6325
  name: "ContentListView",
6322
6326
  components: {
6323
6327
  PristyIcon: Ja,
@@ -6686,7 +6690,7 @@ const Pc = /* @__PURE__ */ te(jp, [["render", Hp], ["__scopeId", "data-v-af65ba7
6686
6690
  return V2.toLocaleDateString(t);
6687
6691
  },
6688
6692
  displaySvg(t) {
6689
- return t.isFile && t.content.mimeType === "image/svg+xml";
6693
+ return t.isFile && t.content?.mimeType === "image/svg+xml";
6690
6694
  },
6691
6695
  loadIcon(t) {
6692
6696
  return Jl.getIcon(t);
@@ -11141,7 +11145,7 @@ const H2 = it({
11141
11145
  this.currentNodeDisplayed && this.computeUrl(this.currentNodeDisplayed);
11142
11146
  },
11143
11147
  computeUrl(t) {
11144
- this.mimeType = t.content.mimeType, this.currentFileName = t.name, this.currentFileId = t.id, this.previewError = !1, this.mimeType && (this.mimeType === "application/pdf" || this.mimeType.includes("image/") || this.mimeType.includes("video/")) ? (this.isLoadingPreview = !1, this.url = ke.getContentUrl(t.id)) : (this.url = null, this.isLoadingPreview = !0, ke.getRenditionUrl(t.id).then((e) => {
11148
+ this.mimeType = t.content?.mimeType, this.currentFileName = t.name, this.currentFileId = t.id, this.previewError = !1, this.mimeType && (this.mimeType === "application/pdf" || this.mimeType.includes("image/") || this.mimeType.includes("video/")) ? (this.isLoadingPreview = !1, this.url = ke.getContentUrl(t.id)) : (this.url = null, this.isLoadingPreview = !0, ke.getRenditionUrl(t.id).then((e) => {
11145
11149
  this.url = e;
11146
11150
  }).catch((e) => {
11147
11151
  console.warn(
@@ -11288,7 +11292,7 @@ function Gh(t, e, l, s, a, o) {
11288
11292
  ])
11289
11293
  ], 10, yh)) : v("", !0);
11290
11294
  }
11291
- const Th = /* @__PURE__ */ te(Wh, [["render", Gh], ["__scopeId", "data-v-d654a08d"]]), Ih = {
11295
+ const Th = /* @__PURE__ */ te(Wh, [["render", Gh], ["__scopeId", "data-v-8d9aebcb"]]), Ih = {
11292
11296
  name: "SelectionStatus",
11293
11297
  components: {
11294
11298
  PrimeProgressSpinner: Dt