@getflip/swirl-components 0.300.0 → 0.300.1
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/components.json +1 -1
- package/dist/cjs/swirl-file-viewer_8.cjs.entry.js +3 -5
- package/dist/collection/components/swirl-file-viewer/viewers/swirl-file-viewer-pdf/swirl-file-viewer-pdf.js +3 -5
- package/dist/components/assets/pdfjs/pdf.worker.min.js +1 -1
- package/dist/components/swirl-file-viewer-pdf2.js +3 -5
- package/dist/esm/swirl-file-viewer_8.entry.js +3 -5
- package/dist/swirl-components/{p-791bc845.entry.js → p-93fe6d45.entry.js} +1 -1
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/package.json +1 -1
package/components.json
CHANGED
|
@@ -30113,7 +30113,7 @@ const SwirlFileViewerPdf = class {
|
|
|
30113
30113
|
.filter(({ visibleHeight }) => visibleHeight > 0);
|
|
30114
30114
|
visiblePages = visiblePagesVisibleHeight.map((page) => page.pageNumber);
|
|
30115
30115
|
if (visiblePagesVisibleHeight.length > 0) {
|
|
30116
|
-
const firstMostVisiblePage = visiblePagesVisibleHeight.reduce((previous, current) => current.visibleHeight > previous.visibleHeight ? current : previous,
|
|
30116
|
+
const firstMostVisiblePage = visiblePagesVisibleHeight.reduce((previous, current) => current.visibleHeight > previous.visibleHeight ? current : previous, visiblePagesVisibleHeight[0]);
|
|
30117
30117
|
currentPage = firstMostVisiblePage.pageNumber;
|
|
30118
30118
|
}
|
|
30119
30119
|
}
|
|
@@ -30188,8 +30188,6 @@ const SwirlFileViewerPdf = class {
|
|
|
30188
30188
|
win.document.write(html);
|
|
30189
30189
|
win.focus();
|
|
30190
30190
|
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
30191
|
-
// var wnd = window.open("about:blank", "", "_blank");
|
|
30192
|
-
// wnd.document.write(html);
|
|
30193
30191
|
win.print();
|
|
30194
30192
|
iframe.remove();
|
|
30195
30193
|
}
|
|
@@ -30213,7 +30211,7 @@ const SwirlFileViewerPdf = class {
|
|
|
30213
30211
|
const showPagination = !this.error && !this.loading && this.visiblePages.length > 0;
|
|
30214
30212
|
const showSpinner = this.loading;
|
|
30215
30213
|
const className = index$1.classnames("file-viewer-pdf", `file-viewer-pdf--view-mode-${this.viewMode}`);
|
|
30216
|
-
return (index.h(index.Host, { key: '
|
|
30214
|
+
return (index.h(index.Host, { key: 'fc44bde6b49ee1fcf3283f03cd92a0ca2df2fd89', class: className, exportparts: "file-viewer-pdf__pagination" }, this.error && (index.h("swirl-inline-error", { key: '51731c3e8a10fc9c23f617948af158eef59a7c71', class: "file-viewer-pdf__error", message: this.errorMessage })), index.h("div", { key: 'f3a1c104d2bd73bd9271310b53c333f9a69695e3', "aria-describedby": "pagination", class: "file-viewer-pdf__pages", onScroll: this.onScroll, ref: (el) => (this.scrollContainer = el) }, this.pages.map((page) => {
|
|
30217
30215
|
const viewport = page.getViewport({
|
|
30218
30216
|
scale: this.getScale(page),
|
|
30219
30217
|
});
|
|
@@ -30227,7 +30225,7 @@ const SwirlFileViewerPdf = class {
|
|
|
30227
30225
|
width: `${width}px`,
|
|
30228
30226
|
height: `${height}px`,
|
|
30229
30227
|
}, tabIndex: 0 }, !rendered && (index.h("swirl-spinner", { class: "file-viewer-pdf__page-spinner" })), index.h("canvas", { class: "file-viewer-pdf__canvas", style: { opacity: rendered ? "1" : "0" } }), index.h("div", { class: "file-viewer-pdf__text-container" })));
|
|
30230
|
-
})), showPagination && (index.h("span", { key: '
|
|
30228
|
+
})), showPagination && (index.h("span", { key: '6c21f44b36b998d10beb38b9c758b1931c3f0bab', class: "file-viewer-pdf__pagination", id: "pagination", part: "file-viewer-pdf__pagination" }, index.h("span", { key: '3629ad2f2da41395d4089a20174ec815ffb45c1d', "aria-current": "page" }, this.currentPage), " /", " ", this.doc.numPages)), showSpinner && (index.h("div", { key: '4e41abc8439c59dcc389a6bdd47538b4592c7915', class: "file-viewer-pdf__spinner" }, index.h("swirl-spinner", { key: 'a391c38d897af60076a0d30977a2c82434a88c71' })))));
|
|
30231
30229
|
}
|
|
30232
30230
|
get el() { return index.getElement(this); }
|
|
30233
30231
|
static get watchers() { return {
|
|
@@ -223,7 +223,7 @@ export class SwirlFileViewerPdf {
|
|
|
223
223
|
.filter(({ visibleHeight }) => visibleHeight > 0);
|
|
224
224
|
visiblePages = visiblePagesVisibleHeight.map((page) => page.pageNumber);
|
|
225
225
|
if (visiblePagesVisibleHeight.length > 0) {
|
|
226
|
-
const firstMostVisiblePage = visiblePagesVisibleHeight.reduce((previous, current) => current.visibleHeight > previous.visibleHeight ? current : previous,
|
|
226
|
+
const firstMostVisiblePage = visiblePagesVisibleHeight.reduce((previous, current) => current.visibleHeight > previous.visibleHeight ? current : previous, visiblePagesVisibleHeight[0]);
|
|
227
227
|
currentPage = firstMostVisiblePage.pageNumber;
|
|
228
228
|
}
|
|
229
229
|
}
|
|
@@ -298,8 +298,6 @@ export class SwirlFileViewerPdf {
|
|
|
298
298
|
win.document.write(html);
|
|
299
299
|
win.focus();
|
|
300
300
|
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
301
|
-
// var wnd = window.open("about:blank", "", "_blank");
|
|
302
|
-
// wnd.document.write(html);
|
|
303
301
|
win.print();
|
|
304
302
|
iframe.remove();
|
|
305
303
|
}
|
|
@@ -323,7 +321,7 @@ export class SwirlFileViewerPdf {
|
|
|
323
321
|
const showPagination = !this.error && !this.loading && this.visiblePages.length > 0;
|
|
324
322
|
const showSpinner = this.loading;
|
|
325
323
|
const className = classnames("file-viewer-pdf", `file-viewer-pdf--view-mode-${this.viewMode}`);
|
|
326
|
-
return (h(Host, { key: '
|
|
324
|
+
return (h(Host, { key: 'fc44bde6b49ee1fcf3283f03cd92a0ca2df2fd89', class: className, exportparts: "file-viewer-pdf__pagination" }, this.error && (h("swirl-inline-error", { key: '51731c3e8a10fc9c23f617948af158eef59a7c71', class: "file-viewer-pdf__error", message: this.errorMessage })), h("div", { key: 'f3a1c104d2bd73bd9271310b53c333f9a69695e3', "aria-describedby": "pagination", class: "file-viewer-pdf__pages", onScroll: this.onScroll, ref: (el) => (this.scrollContainer = el) }, this.pages.map((page) => {
|
|
327
325
|
const viewport = page.getViewport({
|
|
328
326
|
scale: this.getScale(page),
|
|
329
327
|
});
|
|
@@ -337,7 +335,7 @@ export class SwirlFileViewerPdf {
|
|
|
337
335
|
width: `${width}px`,
|
|
338
336
|
height: `${height}px`,
|
|
339
337
|
}, tabIndex: 0 }, !rendered && (h("swirl-spinner", { class: "file-viewer-pdf__page-spinner" })), h("canvas", { class: "file-viewer-pdf__canvas", style: { opacity: rendered ? "1" : "0" } }), h("div", { class: "file-viewer-pdf__text-container" })));
|
|
340
|
-
})), showPagination && (h("span", { key: '
|
|
338
|
+
})), showPagination && (h("span", { key: '6c21f44b36b998d10beb38b9c758b1931c3f0bab', class: "file-viewer-pdf__pagination", id: "pagination", part: "file-viewer-pdf__pagination" }, h("span", { key: '3629ad2f2da41395d4089a20174ec815ffb45c1d', "aria-current": "page" }, this.currentPage), " /", " ", this.doc.numPages)), showSpinner && (h("div", { key: '4e41abc8439c59dcc389a6bdd47538b4592c7915', class: "file-viewer-pdf__spinner" }, h("swirl-spinner", { key: 'a391c38d897af60076a0d30977a2c82434a88c71' })))));
|
|
341
339
|
}
|
|
342
340
|
static get is() { return "swirl-file-viewer-pdf"; }
|
|
343
341
|
static get encapsulation() { return "shadow"; }
|