@uxland/primary-shell 7.37.1 → 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/dist/{component-BHhqZswN.js → component-dvdLH6KG.js} +2 -2
- package/dist/{component-BHhqZswN.js.map → component-dvdLH6KG.js.map} +1 -1
- package/dist/{index-B-kHRe1g.js → index-CXxEmHmi.js} +7 -6
- package/dist/index-CXxEmHmi.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/api/pdf-viewer-manager/pdf-visor/pdf-visor.ts +7 -8
- package/dist/index-B-kHRe1g.js.map +0 -1
package/package.json
CHANGED
|
@@ -46,10 +46,12 @@ export class PdfVisor extends LitElement {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
private _getPdfSrc(pdf: IPdfDocument) {
|
|
50
|
-
|
|
51
|
-
if (
|
|
52
|
-
|
|
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>
|