@uxland/primary-shell 7.37.0 → 7.37.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxland/primary-shell",
3
- "version": "7.37.0",
3
+ "version": "7.37.2",
4
4
  "description": "Primaria Shell",
5
5
  "author": "UXLand <dev@uxland.es>",
6
6
  "homepage": "https://github.com/uxland/harmonix/tree/app#readme",
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "devDependencies": {
32
32
  "@primaria/plugins-core": "^1.0.14",
33
- "@salut/design-system-salut": "../../design-system-salut-2.14.0.tgz",
33
+ "@salut/design-system-salut": "../../design-system-salut-2.14.1.tgz",
34
34
  "@types/react": "^19.0.12",
35
35
  "@uxland/lit-utilities": "^1.0.0",
36
36
  "@uxland/localization": "^1.0.3",
@@ -46,10 +46,12 @@ export class PdfVisor extends LitElement {
46
46
  }
47
47
  }
48
48
 
49
- private _getPdfSrc(pdf: IPdfDocument) {
50
- if (pdf.data.url) return pdf.data.url;
51
- if (pdf.data.b64) return createUrlFromBase64(pdf.data.b64);
52
- return "";
49
+ private _getPdfSrc(pdf: IPdfDocument): string {
50
+ const src = pdf.data.url || (pdf.data.b64 ? createUrlFromBase64(pdf.data.b64) : "") || "";
51
+ if (!src) return "";
52
+
53
+ const separator = src.includes("#") ? "&" : "#";
54
+ return `${src}${separator}navpanes=0`;
53
55
  }
54
56
 
55
57
  private _subscribeEvents() {
@@ -101,10 +103,7 @@ export class PdfVisor extends LitElement {
101
103
  <div class="pdf-container">
102
104
  ${
103
105
  this.activePdfs.length > 0
104
- ? this.activePdfs.map(
105
- (pdf) =>
106
- html`<iframe height="100%" src=${this._getPdfSrc(pdf)} frameborder="0"></iframe>`,
107
- )
106
+ ? this.activePdfs.map((pdf) => html`<iframe height="100%" src=${this._getPdfSrc(pdf)} frameborder="0"></iframe>`)
108
107
  : html`
109
108
  <div class="no-pdf">
110
109
  <p>${translate("pdfVisor.noPdfSelected")}</p>