@getflip/swirl-components 0.115.0 → 0.116.0

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.
Files changed (28) hide show
  1. package/components.json +70 -2
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/swirl-components.cjs.js +1 -1
  4. package/dist/cjs/swirl-file-viewer_7.cjs.entry.js +5 -2
  5. package/dist/cjs/swirl-pdf-reader.cjs.entry.js +6 -1
  6. package/dist/collection/assets/pdfjs/pdf.worker.min.js +1 -1
  7. package/dist/collection/components/swirl-file-viewer/swirl-file-viewer.js +19 -1
  8. package/dist/collection/components/swirl-file-viewer/viewers/swirl-file-viewer-pdf/swirl-file-viewer-pdf.js +21 -1
  9. package/dist/collection/components/swirl-pdf-reader/swirl-pdf-reader.js +54 -1
  10. package/dist/components/assets/pdfjs/pdf.worker.min.js +1 -1
  11. package/dist/components/swirl-file-viewer-pdf2.js +4 -1
  12. package/dist/components/swirl-file-viewer2.js +3 -1
  13. package/dist/components/swirl-pdf-reader.js +8 -2
  14. package/dist/esm/loader.js +1 -1
  15. package/dist/esm/swirl-components.js +1 -1
  16. package/dist/esm/swirl-file-viewer_7.entry.js +5 -2
  17. package/dist/esm/swirl-pdf-reader.entry.js +7 -2
  18. package/dist/swirl-components/p-353eab4c.entry.js +1 -0
  19. package/dist/swirl-components/{p-05d56f14.entry.js → p-4368ba9d.entry.js} +2 -2
  20. package/dist/swirl-components/swirl-components.esm.js +1 -1
  21. package/dist/types/components/swirl-file-viewer/swirl-file-viewer.d.ts +1 -0
  22. package/dist/types/components/swirl-file-viewer/viewers/swirl-file-viewer-pdf/swirl-file-viewer-pdf.d.ts +6 -0
  23. package/dist/types/components/swirl-pdf-reader/swirl-pdf-reader.d.ts +4 -0
  24. package/dist/types/components.d.ts +12 -0
  25. package/dist/typings.d.ts +1 -0
  26. package/package.json +1 -1
  27. package/vscode-data.json +12 -0
  28. package/dist/swirl-components/p-af636e9c.entry.js +0 -1
@@ -13,6 +13,7 @@ export class SwirlFileViewer {
13
13
  this.description = undefined;
14
14
  this.errorMessage = "File could not be loaded.";
15
15
  this.file = undefined;
16
+ this.pdfWorkerSrc = undefined;
16
17
  this.thumbnailUrl = undefined;
17
18
  this.type = undefined;
18
19
  this.typeUnsupportedMessage = "File type is not supported.";
@@ -43,7 +44,7 @@ export class SwirlFileViewer {
43
44
  this.type !== "text/plain" &&
44
45
  this.type !== "text/csv" &&
45
46
  this.type !== "application/pdf");
46
- return (h(Host, null, h("div", { class: "file-viewer" }, this.type && this.active && (h("div", { class: "file-viewer__file" }, this.type.startsWith("image/") && (h("swirl-file-viewer-image", { description: this.description, errorMessage: this.errorMessage, file: this.file, ref: (el) => (this.viewer = el) })), this.type === "text/plain" && (h("swirl-file-viewer-text", { errorMessage: this.errorMessage, file: this.file, ref: (el) => (this.viewer = el) })), this.type === "text/csv" && (h("swirl-file-viewer-csv", { errorMessage: this.errorMessage, file: this.file, ref: (el) => (this.viewer = el) })), this.type === "application/pdf" && (h("swirl-file-viewer-pdf", { errorMessage: this.errorMessage, file: this.file, onActivate: this.onActivate, onVisiblePagesChange: this.onVisiblePagesChange, ref: (el) => (this.viewer = el), viewMode: this.viewMode, zoom: this.zoom })), this.type.startsWith("video/") && (h("swirl-file-viewer-video", { autoplay: this.autoplay, file: this.file, ref: (el) => (this.viewer = el), type: this.type })), this.type.startsWith("audio/") && (h("swirl-file-viewer-audio", { autoplay: this.autoplay, file: this.file, ref: (el) => (this.viewer = el), type: this.type })), unsupportedType && (h("swirl-inline-error", { message: this.typeUnsupportedMessage })))))));
47
+ return (h(Host, null, h("div", { class: "file-viewer" }, this.type && this.active && (h("div", { class: "file-viewer__file" }, this.type.startsWith("image/") && (h("swirl-file-viewer-image", { description: this.description, errorMessage: this.errorMessage, file: this.file, ref: (el) => (this.viewer = el) })), this.type === "text/plain" && (h("swirl-file-viewer-text", { errorMessage: this.errorMessage, file: this.file, ref: (el) => (this.viewer = el) })), this.type === "text/csv" && (h("swirl-file-viewer-csv", { errorMessage: this.errorMessage, file: this.file, ref: (el) => (this.viewer = el) })), this.type === "application/pdf" && (h("swirl-file-viewer-pdf", { errorMessage: this.errorMessage, file: this.file, onActivate: this.onActivate, onVisiblePagesChange: this.onVisiblePagesChange, ref: (el) => (this.viewer = el), viewMode: this.viewMode, workerSrc: this.pdfWorkerSrc, zoom: this.zoom })), this.type.startsWith("video/") && (h("swirl-file-viewer-video", { autoplay: this.autoplay, file: this.file, ref: (el) => (this.viewer = el), type: this.type })), this.type.startsWith("audio/") && (h("swirl-file-viewer-audio", { autoplay: this.autoplay, file: this.file, ref: (el) => (this.viewer = el), type: this.type })), unsupportedType && (h("swirl-inline-error", { message: this.typeUnsupportedMessage })))))));
47
48
  }
48
49
  static get is() { return "swirl-file-viewer"; }
49
50
  static get encapsulation() { return "shadow"; }
@@ -146,6 +147,23 @@ export class SwirlFileViewer {
146
147
  "attribute": "file",
147
148
  "reflect": false
148
149
  },
150
+ "pdfWorkerSrc": {
151
+ "type": "string",
152
+ "mutable": false,
153
+ "complexType": {
154
+ "original": "string",
155
+ "resolved": "string",
156
+ "references": {}
157
+ },
158
+ "required": false,
159
+ "optional": true,
160
+ "docs": {
161
+ "tags": [],
162
+ "text": ""
163
+ },
164
+ "attribute": "pdf-worker-src",
165
+ "reflect": false
166
+ },
149
167
  "thumbnailUrl": {
150
168
  "type": "string",
151
169
  "mutable": false,
@@ -2,7 +2,7 @@ import { h, Host, } from "@stencil/core";
2
2
  import classnames from "classnames";
3
3
  import pdf, { getDocument, renderTextLayer, } from "pdfjs-dist/legacy/build/pdf.js";
4
4
  import { debounce, getVisibleHeight, isMobileViewport, } from "../../../../utils";
5
- pdf.GlobalWorkerOptions.workerSrc = "/pdfjs/pdf.worker.min.js";
5
+ window.pdf = pdf;
6
6
  export class SwirlFileViewerPdf {
7
7
  constructor() {
8
8
  this.pages = [];
@@ -33,6 +33,7 @@ export class SwirlFileViewerPdf {
33
33
  this.file = undefined;
34
34
  this.singlePageMode = undefined;
35
35
  this.viewMode = "single";
36
+ this.workerSrc = "/pdfjs/pdf.worker.min.js";
36
37
  this.zoom = 1;
37
38
  this.doc = undefined;
38
39
  this.error = undefined;
@@ -43,6 +44,7 @@ export class SwirlFileViewerPdf {
43
44
  this.visiblePages = [];
44
45
  }
45
46
  async componentWillLoad() {
47
+ window.pdf.GlobalWorkerOptions.workerSrc = this.workerSrc;
46
48
  await this.getPages();
47
49
  }
48
50
  async componentDidLoad() {
@@ -408,6 +410,24 @@ export class SwirlFileViewerPdf {
408
410
  "reflect": false,
409
411
  "defaultValue": "\"single\""
410
412
  },
413
+ "workerSrc": {
414
+ "type": "string",
415
+ "mutable": false,
416
+ "complexType": {
417
+ "original": "string",
418
+ "resolved": "string",
419
+ "references": {}
420
+ },
421
+ "required": false,
422
+ "optional": true,
423
+ "docs": {
424
+ "tags": [],
425
+ "text": ""
426
+ },
427
+ "attribute": "worker-src",
428
+ "reflect": false,
429
+ "defaultValue": "\"/pdfjs/pdf.worker.min.js\""
430
+ },
411
431
  "zoom": {
412
432
  "type": "any",
413
433
  "mutable": false,
@@ -77,6 +77,7 @@ export class SwirlPdfReader {
77
77
  this.label = undefined;
78
78
  this.menuLabel = "File menu";
79
79
  this.menuTriggerLabel = "Open file menu";
80
+ this.pdfWorkerSrc = undefined;
80
81
  this.printButtonLabel = "Print PDF";
81
82
  this.sideBySideButtonLabel = "Toggle side by side view";
82
83
  this.thumbnailButtonLabel = "Scroll to page";
@@ -119,6 +120,7 @@ export class SwirlPdfReader {
119
120
  async open() {
120
121
  this.modal.show();
121
122
  this.active = true;
123
+ this.modalOpen.emit();
122
124
  }
123
125
  /**
124
126
  * Close the reader.
@@ -133,6 +135,7 @@ export class SwirlPdfReader {
133
135
  this.modal.hide();
134
136
  this.closing = false;
135
137
  this.active = false;
138
+ this.modalClose.emit();
136
139
  }, 150);
137
140
  }
138
141
  lockBodyScroll() {
@@ -165,7 +168,7 @@ export class SwirlPdfReader {
165
168
  "pdf-reader__thumbnail--active": this.visiblePages[0] === index + 1,
166
169
  });
167
170
  return (h("button", { "aria-label": `${this.thumbnailButtonLabel} ${index + 1}`, class: thumbnailClassName, onClick: this.onThumbnailClick(index), type: "button" }, h("img", { src: thumbnail.toDataURL("image/png"), alt: "" })));
168
- })), h("swirl-file-viewer", { active: this.active, class: "pdf-reader__viewer", file: this.file, onActivate: this.onActivate, onVisiblePagesChange: this.onVisiblePagesChange, ref: (el) => (this.viewer = el), type: "application/pdf", viewMode: this.viewMode, zoom: this.zoom }), h("div", { class: "pdf-reader__mobile-zoom-controls" }, h("button", { "aria-label": this.autoZoomLabel, class: "pdf-reader__mobile-zoom-button", onClick: this.onZoomAutoButtonClick, type: "button" }, this.zoom === "auto" ? (h("swirl-icon-fullscreen-exit", null)) : (h("swirl-icon-fullscreen", null))), h("button", { "aria-label": this.zoomInButtonLabel, class: "pdf-reader__mobile-zoom-button", disabled: this.zoom === this.zoomSteps[this.zoomSteps.length - 1], onClick: this.onZoomInButtonClick, type: "button" }, h("swirl-icon-add", null)), h("button", { "aria-label": this.zoomOutButtonLabel, class: "pdf-reader__mobile-zoom-button", disabled: this.zoom === this.zoomSteps[0], onClick: this.onZoomOutButtonClick, type: "button" }, h("swirl-icon-remove", null))))), h("swirl-popover", { animation: "scale-in-y", disableScrollLock: true, id: "menu", label: this.menuLabel, placement: "bottom-end", ref: (el) => (this.menu = el) }, h("swirl-stack", null, h("div", { class: "pdf-reader__meta" }, h("div", { class: "pdf-reader__file-icon" }, h("svg", { fill: "none", height: "36", viewBox: "0 0 24 36", width: "24" }, h("path", { d: "M7.01755 21.6V15.192H8.39455C8.64655 15.192 8.86855 15.225 9.06055 15.291C9.25255 15.357 9.42655 15.474 9.58255 15.642C9.73855 15.81 9.84655 16.008 9.90655 16.236C9.96655 16.458 9.99655 16.761 9.99655 17.145C9.99655 17.433 9.97855 17.676 9.94255 17.874C9.91255 18.072 9.84355 18.258 9.73555 18.432C9.60955 18.642 9.44155 18.807 9.23155 18.927C9.02155 19.041 8.74555 19.098 8.40355 19.098H7.93555V21.6H7.01755ZM7.93555 16.056V18.234H8.37655C8.56255 18.234 8.70655 18.207 8.80855 18.153C8.91055 18.099 8.98555 18.024 9.03355 17.928C9.08155 17.838 9.10855 17.727 9.11455 17.595C9.12655 17.463 9.13255 17.316 9.13255 17.154C9.13255 17.004 9.12955 16.863 9.12355 16.731C9.11755 16.593 9.09055 16.473 9.04255 16.371C8.99455 16.269 8.92255 16.191 8.82655 16.137C8.73055 16.083 8.59255 16.056 8.41255 16.056H7.93555Z", fill: "white" }), h("path", { d: "M10.6826 21.6V15.192H12.0416C12.5696 15.192 12.9686 15.336 13.2386 15.624C13.5146 15.912 13.6526 16.32 13.6526 16.848V19.845C13.6526 20.445 13.5056 20.889 13.2116 21.177C12.9236 21.459 12.5066 21.6 11.9606 21.6H10.6826ZM11.6006 16.056V20.736H12.0236C12.2816 20.736 12.4646 20.673 12.5726 20.547C12.6806 20.415 12.7346 20.211 12.7346 19.935V16.848C12.7346 16.596 12.6836 16.401 12.5816 16.263C12.4796 16.125 12.2936 16.056 12.0236 16.056H11.6006Z", fill: "white" }), h("path", { d: "M14.5146 21.6V15.192H17.2506V16.056H15.4326V18H17.0166V18.864H15.4326V21.6H14.5146Z", fill: "white" }), h("path", { d: "M3.59961 9.00001C3.59961 8.0059 4.4055 7.20001 5.39961 7.20001H14.854C15.3314 7.20001 15.7893 7.38965 16.1268 7.72722L19.8724 11.4728C20.21 11.8104 20.3996 12.2682 20.3996 12.7456V27C20.3996 27.9941 19.5937 28.8 18.5996 28.8H5.39961C4.4055 28.8 3.59961 27.9941 3.59961 27V9.00001Z", fill: "#FF574D" }), h("path", { d: "M15.5996 7.36166V10.2C15.5996 11.1941 16.4055 12 17.3996 12H20.2379C20.3237 12.1884 20.3768 12.3913 20.3937 12.6H17.3996C16.0785 12.6 15.0067 11.5325 14.9996 10.213L14.9996 7.20587C15.2083 7.2228 15.4112 7.27593 15.5996 7.36166Z", fill: "white" }), h("path", { d: "M7.01755 21.6V15.192H8.39455C8.64655 15.192 8.86855 15.225 9.06055 15.291C9.25255 15.357 9.42655 15.474 9.58255 15.642C9.73855 15.81 9.84655 16.008 9.90655 16.236C9.96655 16.458 9.99655 16.761 9.99655 17.145C9.99655 17.433 9.97855 17.676 9.94255 17.874C9.91255 18.072 9.84355 18.258 9.73555 18.432C9.60955 18.642 9.44155 18.807 9.23155 18.927C9.02155 19.041 8.74555 19.098 8.40355 19.098H7.93555V21.6H7.01755ZM7.93555 16.056V18.234H8.37655C8.56255 18.234 8.70655 18.207 8.80855 18.153C8.91055 18.099 8.98555 18.024 9.03355 17.928C9.08155 17.838 9.10855 17.727 9.11455 17.595C9.12655 17.463 9.13255 17.316 9.13255 17.154C9.13255 17.004 9.12955 16.863 9.12355 16.731C9.11755 16.593 9.09055 16.473 9.04255 16.371C8.99455 16.269 8.92255 16.191 8.82655 16.137C8.73055 16.083 8.59255 16.056 8.41255 16.056H7.93555Z", fill: "white" }), h("path", { d: "M10.6826 21.6V15.192H12.0416C12.5696 15.192 12.9686 15.336 13.2386 15.624C13.5146 15.912 13.6526 16.32 13.6526 16.848V19.845C13.6526 20.445 13.5056 20.889 13.2116 21.177C12.9236 21.459 12.5066 21.6 11.9606 21.6H10.6826ZM11.6006 16.056V20.736H12.0236C12.2816 20.736 12.4646 20.673 12.5726 20.547C12.6806 20.415 12.7346 20.211 12.7346 19.935V16.848C12.7346 16.596 12.6836 16.401 12.5816 16.263C12.4796 16.125 12.2936 16.056 12.0236 16.056H11.6006Z", fill: "white" }), h("path", { d: "M14.5146 21.6V15.192H17.2506V16.056H15.4326V18H17.0166V18.864H15.4326V21.6H14.5146Z", fill: "white" }))), h("div", { class: "pdf-reader__file-info" }, h("swirl-text", { truncate: true, weight: "semibold" }, this.label), h("swirl-text", { color: "subdued", size: "sm", truncate: true }, this.fileTypeLabel))), h("swirl-separator", null), h("swirl-action-list", null, h("swirl-action-list-item", { class: "pdf-reader__print-button", icon: "<swirl-icon-print></swirl-icon-print>", label: this.printButtonLabel, onClick: this.onPrintButtonClick }), h("swirl-action-list-item", { class: "pdf-reader__download-button", disabled: this.downloading, icon: !this.downloading
171
+ })), h("swirl-file-viewer", { active: this.active, class: "pdf-reader__viewer", file: this.file, onActivate: this.onActivate, onVisiblePagesChange: this.onVisiblePagesChange, pdfWorkerSrc: this.pdfWorkerSrc, ref: (el) => (this.viewer = el), type: "application/pdf", viewMode: this.viewMode, zoom: this.zoom }), h("div", { class: "pdf-reader__mobile-zoom-controls" }, h("button", { "aria-label": this.autoZoomLabel, class: "pdf-reader__mobile-zoom-button", onClick: this.onZoomAutoButtonClick, type: "button" }, this.zoom === "auto" ? (h("swirl-icon-fullscreen-exit", null)) : (h("swirl-icon-fullscreen", null))), h("button", { "aria-label": this.zoomInButtonLabel, class: "pdf-reader__mobile-zoom-button", disabled: this.zoom === this.zoomSteps[this.zoomSteps.length - 1], onClick: this.onZoomInButtonClick, type: "button" }, h("swirl-icon-add", null)), h("button", { "aria-label": this.zoomOutButtonLabel, class: "pdf-reader__mobile-zoom-button", disabled: this.zoom === this.zoomSteps[0], onClick: this.onZoomOutButtonClick, type: "button" }, h("swirl-icon-remove", null))))), h("swirl-popover", { animation: "scale-in-y", disableScrollLock: true, id: "menu", label: this.menuLabel, placement: "bottom-end", ref: (el) => (this.menu = el) }, h("swirl-stack", null, h("div", { class: "pdf-reader__meta" }, h("div", { class: "pdf-reader__file-icon" }, h("svg", { fill: "none", height: "36", viewBox: "0 0 24 36", width: "24" }, h("path", { d: "M7.01755 21.6V15.192H8.39455C8.64655 15.192 8.86855 15.225 9.06055 15.291C9.25255 15.357 9.42655 15.474 9.58255 15.642C9.73855 15.81 9.84655 16.008 9.90655 16.236C9.96655 16.458 9.99655 16.761 9.99655 17.145C9.99655 17.433 9.97855 17.676 9.94255 17.874C9.91255 18.072 9.84355 18.258 9.73555 18.432C9.60955 18.642 9.44155 18.807 9.23155 18.927C9.02155 19.041 8.74555 19.098 8.40355 19.098H7.93555V21.6H7.01755ZM7.93555 16.056V18.234H8.37655C8.56255 18.234 8.70655 18.207 8.80855 18.153C8.91055 18.099 8.98555 18.024 9.03355 17.928C9.08155 17.838 9.10855 17.727 9.11455 17.595C9.12655 17.463 9.13255 17.316 9.13255 17.154C9.13255 17.004 9.12955 16.863 9.12355 16.731C9.11755 16.593 9.09055 16.473 9.04255 16.371C8.99455 16.269 8.92255 16.191 8.82655 16.137C8.73055 16.083 8.59255 16.056 8.41255 16.056H7.93555Z", fill: "white" }), h("path", { d: "M10.6826 21.6V15.192H12.0416C12.5696 15.192 12.9686 15.336 13.2386 15.624C13.5146 15.912 13.6526 16.32 13.6526 16.848V19.845C13.6526 20.445 13.5056 20.889 13.2116 21.177C12.9236 21.459 12.5066 21.6 11.9606 21.6H10.6826ZM11.6006 16.056V20.736H12.0236C12.2816 20.736 12.4646 20.673 12.5726 20.547C12.6806 20.415 12.7346 20.211 12.7346 19.935V16.848C12.7346 16.596 12.6836 16.401 12.5816 16.263C12.4796 16.125 12.2936 16.056 12.0236 16.056H11.6006Z", fill: "white" }), h("path", { d: "M14.5146 21.6V15.192H17.2506V16.056H15.4326V18H17.0166V18.864H15.4326V21.6H14.5146Z", fill: "white" }), h("path", { d: "M3.59961 9.00001C3.59961 8.0059 4.4055 7.20001 5.39961 7.20001H14.854C15.3314 7.20001 15.7893 7.38965 16.1268 7.72722L19.8724 11.4728C20.21 11.8104 20.3996 12.2682 20.3996 12.7456V27C20.3996 27.9941 19.5937 28.8 18.5996 28.8H5.39961C4.4055 28.8 3.59961 27.9941 3.59961 27V9.00001Z", fill: "#FF574D" }), h("path", { d: "M15.5996 7.36166V10.2C15.5996 11.1941 16.4055 12 17.3996 12H20.2379C20.3237 12.1884 20.3768 12.3913 20.3937 12.6H17.3996C16.0785 12.6 15.0067 11.5325 14.9996 10.213L14.9996 7.20587C15.2083 7.2228 15.4112 7.27593 15.5996 7.36166Z", fill: "white" }), h("path", { d: "M7.01755 21.6V15.192H8.39455C8.64655 15.192 8.86855 15.225 9.06055 15.291C9.25255 15.357 9.42655 15.474 9.58255 15.642C9.73855 15.81 9.84655 16.008 9.90655 16.236C9.96655 16.458 9.99655 16.761 9.99655 17.145C9.99655 17.433 9.97855 17.676 9.94255 17.874C9.91255 18.072 9.84355 18.258 9.73555 18.432C9.60955 18.642 9.44155 18.807 9.23155 18.927C9.02155 19.041 8.74555 19.098 8.40355 19.098H7.93555V21.6H7.01755ZM7.93555 16.056V18.234H8.37655C8.56255 18.234 8.70655 18.207 8.80855 18.153C8.91055 18.099 8.98555 18.024 9.03355 17.928C9.08155 17.838 9.10855 17.727 9.11455 17.595C9.12655 17.463 9.13255 17.316 9.13255 17.154C9.13255 17.004 9.12955 16.863 9.12355 16.731C9.11755 16.593 9.09055 16.473 9.04255 16.371C8.99455 16.269 8.92255 16.191 8.82655 16.137C8.73055 16.083 8.59255 16.056 8.41255 16.056H7.93555Z", fill: "white" }), h("path", { d: "M10.6826 21.6V15.192H12.0416C12.5696 15.192 12.9686 15.336 13.2386 15.624C13.5146 15.912 13.6526 16.32 13.6526 16.848V19.845C13.6526 20.445 13.5056 20.889 13.2116 21.177C12.9236 21.459 12.5066 21.6 11.9606 21.6H10.6826ZM11.6006 16.056V20.736H12.0236C12.2816 20.736 12.4646 20.673 12.5726 20.547C12.6806 20.415 12.7346 20.211 12.7346 19.935V16.848C12.7346 16.596 12.6836 16.401 12.5816 16.263C12.4796 16.125 12.2936 16.056 12.0236 16.056H11.6006Z", fill: "white" }), h("path", { d: "M14.5146 21.6V15.192H17.2506V16.056H15.4326V18H17.0166V18.864H15.4326V21.6H14.5146Z", fill: "white" }))), h("div", { class: "pdf-reader__file-info" }, h("swirl-text", { truncate: true, weight: "semibold" }, this.label), h("swirl-text", { color: "subdued", size: "sm", truncate: true }, this.fileTypeLabel))), h("swirl-separator", null), h("swirl-action-list", null, h("swirl-action-list-item", { class: "pdf-reader__print-button", icon: "<swirl-icon-print></swirl-icon-print>", label: this.printButtonLabel, onClick: this.onPrintButtonClick }), h("swirl-action-list-item", { class: "pdf-reader__download-button", disabled: this.downloading, icon: !this.downloading
169
172
  ? "<swirl-icon-download></swirl-icon-download>"
170
173
  : '<swirl-spinner size="xs"></swirl-spinner>', label: this.downloadButtonLabel, onClick: this.onDownloadButtonClick }), h("slot", { name: "menu-items" })))))));
171
174
  }
@@ -325,6 +328,23 @@ export class SwirlPdfReader {
325
328
  "reflect": false,
326
329
  "defaultValue": "\"Open file menu\""
327
330
  },
331
+ "pdfWorkerSrc": {
332
+ "type": "string",
333
+ "mutable": false,
334
+ "complexType": {
335
+ "original": "string",
336
+ "resolved": "string",
337
+ "references": {}
338
+ },
339
+ "required": false,
340
+ "optional": true,
341
+ "docs": {
342
+ "tags": [],
343
+ "text": ""
344
+ },
345
+ "attribute": "pdf-worker-src",
346
+ "reflect": false
347
+ },
328
348
  "printButtonLabel": {
329
349
  "type": "string",
330
350
  "mutable": false,
@@ -484,6 +504,39 @@ export class SwirlPdfReader {
484
504
  "zoomSteps": {}
485
505
  };
486
506
  }
507
+ static get events() {
508
+ return [{
509
+ "method": "modalClose",
510
+ "name": "modalClose",
511
+ "bubbles": true,
512
+ "cancelable": true,
513
+ "composed": true,
514
+ "docs": {
515
+ "tags": [],
516
+ "text": ""
517
+ },
518
+ "complexType": {
519
+ "original": "void",
520
+ "resolved": "void",
521
+ "references": {}
522
+ }
523
+ }, {
524
+ "method": "modalOpen",
525
+ "name": "modalOpen",
526
+ "bubbles": true,
527
+ "cancelable": true,
528
+ "composed": true,
529
+ "docs": {
530
+ "tags": [],
531
+ "text": ""
532
+ },
533
+ "complexType": {
534
+ "original": "void",
535
+ "resolved": "void",
536
+ "references": {}
537
+ }
538
+ }];
539
+ }
487
540
  static get methods() {
488
541
  return {
489
542
  "open": {