@getflip/swirl-components 0.115.0 → 0.117.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 (124) hide show
  1. package/components.json +440 -70
  2. package/dist/cjs/focus-trap.esm-21561e09.js +1145 -0
  3. package/dist/cjs/index-506fe4ea.js +14 -26
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/swirl-app-bar.cjs.entry.js +2 -1
  6. package/dist/cjs/swirl-app-icon.cjs.entry.js +1 -3
  7. package/dist/cjs/swirl-app-layout_6.cjs.entry.js +1 -1
  8. package/dist/cjs/swirl-badge.cjs.entry.js +1 -1
  9. package/dist/cjs/swirl-components.cjs.js +1 -1
  10. package/dist/cjs/swirl-file-viewer_7.cjs.entry.js +5 -2
  11. package/dist/cjs/swirl-icon-arrow-back_5.cjs.entry.js +87 -0
  12. package/dist/cjs/swirl-icon-dock-left.cjs.entry.js +23 -0
  13. package/dist/cjs/swirl-modal.cjs.entry.js +2 -1143
  14. package/dist/cjs/swirl-pdf-reader.cjs.entry.js +6 -1
  15. package/dist/cjs/swirl-shell-layout.cjs.entry.js +87 -75
  16. package/dist/cjs/swirl-shell-navigation-item.cjs.entry.js +1 -1
  17. package/dist/cjs/swirl-visually-hidden.cjs.entry.js +1 -1
  18. package/dist/collection/assets/pdfjs/pdf.worker.min.js +1 -1
  19. package/dist/collection/collection-manifest.json +1 -0
  20. package/dist/collection/components/swirl-app-bar/swirl-app-bar.js +20 -1
  21. package/dist/collection/components/swirl-app-icon/swirl-app-icon.css +3 -22
  22. package/dist/collection/components/swirl-app-icon/swirl-app-icon.js +0 -20
  23. package/dist/collection/components/swirl-app-layout/swirl-app-layout.css +38 -4
  24. package/dist/collection/components/swirl-badge/swirl-badge.css +18 -1
  25. package/dist/collection/components/swirl-badge/swirl-badge.js +1 -1
  26. package/dist/collection/components/swirl-file-viewer/swirl-file-viewer.js +19 -1
  27. package/dist/collection/components/swirl-file-viewer/viewers/swirl-file-viewer-pdf/swirl-file-viewer-pdf.js +21 -1
  28. package/dist/collection/components/swirl-icon/icons/swirl-icon-dock-left.js +52 -0
  29. package/dist/collection/components/swirl-pdf-reader/swirl-pdf-reader.js +54 -1
  30. package/dist/collection/components/swirl-shell-layout/swirl-shell-layout.css +353 -132
  31. package/dist/collection/components/swirl-shell-layout/swirl-shell-layout.js +322 -95
  32. package/dist/collection/components/swirl-shell-layout/swirl-shell-layout.spec.js +8 -58
  33. package/dist/collection/components/swirl-shell-layout/swirl-shell-layout.stories.js +81 -102
  34. package/dist/collection/components/swirl-shell-navigation-item/swirl-shell-navigation-item.css +46 -35
  35. package/dist/collection/components/swirl-visually-hidden/swirl-visually-hidden.js +1 -1
  36. package/dist/collection/components/swirl-visually-hidden/swirl-visually-hidden.spec.js +0 -3
  37. package/dist/components/assets/images/flip-logo.png +0 -0
  38. package/dist/components/assets/pdfjs/pdf.worker.min.js +1 -1
  39. package/dist/components/focus-trap.esm.js +1143 -0
  40. package/dist/components/swirl-app-bar.js +3 -1
  41. package/dist/components/swirl-app-icon.js +1 -4
  42. package/dist/components/swirl-app-layout2.js +1 -1
  43. package/dist/components/swirl-badge2.js +1 -1
  44. package/dist/components/swirl-file-viewer-pdf2.js +4 -1
  45. package/dist/components/swirl-file-viewer2.js +3 -1
  46. package/dist/components/swirl-icon-arrow-back.js +1 -35
  47. package/dist/{esm/swirl-icon-arrow-back.entry.js → components/swirl-icon-arrow-back2.js} +26 -8
  48. package/dist/components/swirl-icon-arrow-forward.js +1 -35
  49. package/dist/{esm/swirl-icon-arrow-forward.entry.js → components/swirl-icon-arrow-forward2.js} +26 -8
  50. package/dist/components/swirl-icon-dock-left.d.ts +11 -0
  51. package/dist/components/swirl-icon-dock-left.js +40 -0
  52. package/dist/components/swirl-icon-double-arrow-left.js +1 -35
  53. package/dist/{esm/swirl-icon-double-arrow-left.entry.js → components/swirl-icon-double-arrow-left2.js} +26 -8
  54. package/dist/components/swirl-icon-double-arrow-right.js +1 -35
  55. package/dist/{esm/swirl-icon-double-arrow-right.entry.js → components/swirl-icon-double-arrow-right2.js} +26 -8
  56. package/dist/components/swirl-icon-menu.js +1 -35
  57. package/dist/{esm/swirl-icon-menu.entry.js → components/swirl-icon-menu2.js} +26 -8
  58. package/dist/components/swirl-modal.js +1 -1142
  59. package/dist/components/swirl-pdf-reader.js +8 -2
  60. package/dist/components/swirl-shell-layout.js +150 -89
  61. package/dist/components/swirl-shell-navigation-item.js +1 -1
  62. package/dist/components/swirl-visually-hidden2.js +2 -3
  63. package/dist/esm/focus-trap.esm-37cd2d2b.js +1143 -0
  64. package/dist/esm/index-99d0060d.js +14 -26
  65. package/dist/esm/loader.js +1 -1
  66. package/dist/esm/swirl-app-bar.entry.js +2 -1
  67. package/dist/esm/swirl-app-icon.entry.js +1 -3
  68. package/dist/esm/swirl-app-layout_6.entry.js +1 -1
  69. package/dist/esm/swirl-badge.entry.js +1 -1
  70. package/dist/esm/swirl-components.js +1 -1
  71. package/dist/esm/swirl-file-viewer_7.entry.js +5 -2
  72. package/dist/esm/swirl-icon-arrow-back_5.entry.js +79 -0
  73. package/dist/esm/swirl-icon-dock-left.entry.js +19 -0
  74. package/dist/esm/swirl-modal.entry.js +1 -1142
  75. package/dist/esm/swirl-pdf-reader.entry.js +7 -2
  76. package/dist/esm/swirl-shell-layout.entry.js +88 -76
  77. package/dist/esm/swirl-shell-navigation-item.entry.js +1 -1
  78. package/dist/esm/swirl-visually-hidden.entry.js +1 -1
  79. package/dist/swirl-components/p-08fd60a5.entry.js +1 -0
  80. package/dist/swirl-components/p-0ac2eb84.entry.js +1 -0
  81. package/dist/swirl-components/p-11c6c9ba.entry.js +1 -0
  82. package/dist/swirl-components/p-25b4973d.entry.js +1 -0
  83. package/dist/swirl-components/p-262771e5.entry.js +1 -0
  84. package/dist/swirl-components/p-353eab4c.entry.js +1 -0
  85. package/dist/swirl-components/p-3795fbb4.entry.js +1 -0
  86. package/dist/swirl-components/p-40ee5f22.entry.js +1 -0
  87. package/dist/swirl-components/{p-05d56f14.entry.js → p-4368ba9d.entry.js} +2 -2
  88. package/dist/swirl-components/p-4a69e7f3.entry.js +1 -0
  89. package/dist/swirl-components/p-76c36ee9.entry.js +1 -0
  90. package/dist/swirl-components/p-7c4a4b66.entry.js +1 -0
  91. package/dist/swirl-components/p-c2e1dfdb.js +10 -0
  92. package/dist/swirl-components/swirl-components.esm.js +1 -1
  93. package/dist/types/components/swirl-app-bar/swirl-app-bar.d.ts +1 -0
  94. package/dist/types/components/swirl-app-icon/swirl-app-icon.d.ts +0 -1
  95. package/dist/types/components/swirl-badge/swirl-badge.d.ts +1 -1
  96. package/dist/types/components/swirl-file-viewer/swirl-file-viewer.d.ts +1 -0
  97. package/dist/types/components/swirl-file-viewer/viewers/swirl-file-viewer-pdf/swirl-file-viewer-pdf.d.ts +6 -0
  98. package/dist/types/components/swirl-icon/icons/swirl-icon-dock-left.d.ts +5 -0
  99. package/dist/types/components/swirl-pdf-reader/swirl-pdf-reader.d.ts +4 -0
  100. package/dist/types/components/swirl-shell-layout/swirl-shell-layout.d.ts +42 -25
  101. package/dist/types/components.d.ts +62 -11
  102. package/dist/typings.d.ts +1 -0
  103. package/icons.json +1 -1
  104. package/package.json +2 -2
  105. package/vscode-data.json +70 -6
  106. package/dist/cjs/swirl-icon-arrow-back.cjs.entry.js +0 -23
  107. package/dist/cjs/swirl-icon-arrow-forward.cjs.entry.js +0 -23
  108. package/dist/cjs/swirl-icon-double-arrow-left.cjs.entry.js +0 -23
  109. package/dist/cjs/swirl-icon-double-arrow-right.cjs.entry.js +0 -23
  110. package/dist/cjs/swirl-icon-menu.cjs.entry.js +0 -23
  111. package/dist/swirl-components/p-3a2abee9.entry.js +0 -1
  112. package/dist/swirl-components/p-441c8210.entry.js +0 -1
  113. package/dist/swirl-components/p-4a84e63d.entry.js +0 -1
  114. package/dist/swirl-components/p-54e4ff0b.entry.js +0 -1
  115. package/dist/swirl-components/p-5da3a9a8.entry.js +0 -1
  116. package/dist/swirl-components/p-645a878c.entry.js +0 -1
  117. package/dist/swirl-components/p-79be22ea.entry.js +0 -10
  118. package/dist/swirl-components/p-97668c59.entry.js +0 -1
  119. package/dist/swirl-components/p-af636e9c.entry.js +0 -1
  120. package/dist/swirl-components/p-be2cf7ee.entry.js +0 -1
  121. package/dist/swirl-components/p-c4d4a99d.entry.js +0 -1
  122. package/dist/swirl-components/p-ca78767e.entry.js +0 -1
  123. package/dist/swirl-components/p-d2fc7935.entry.js +0 -1
  124. package/dist/swirl-components/p-f83a0b0f.entry.js +0 -1
@@ -115,6 +115,7 @@
115
115
  "./components/swirl-icon/icons/swirl-icon-delete.js",
116
116
  "./components/swirl-icon/icons/swirl-icon-description.js",
117
117
  "./components/swirl-icon/icons/swirl-icon-discover.js",
118
+ "./components/swirl-icon/icons/swirl-icon-dock-left.js",
118
119
  "./components/swirl-icon/icons/swirl-icon-double-arrow-left.js",
119
120
  "./components/swirl-icon/icons/swirl-icon-double-arrow-right.js",
120
121
  "./components/swirl-icon/icons/swirl-icon-download.js",
@@ -21,6 +21,7 @@ export class SwirlAppBar {
21
21
  this.stepDownButtonClick.emit(event);
22
22
  };
23
23
  this.backButtonLabel = "Go back";
24
+ this.closeButtonIcon = "<swirl-icon-close></swirl-icon-close>";
24
25
  this.closeButtonLabel = "Close";
25
26
  this.stepUpButtonLabel = "Previous item";
26
27
  this.stepDownButtonLabel = "Next item";
@@ -51,7 +52,7 @@ export class SwirlAppBar {
51
52
  "app-bar--has-cta": this.hasCta,
52
53
  "app-bar--has-right-controls": hasRightControls,
53
54
  });
54
- return (h(Host, null, h("div", { class: className }, showLeftControls && (h("div", { class: "app-bar__left-controls" }, (this.showBackButton || this.showCloseButton) && (h("div", { class: "app-bar__main-navigation-control" }, this.showBackButton && (h("swirl-button", { hideLabel: true, icon: "<swirl-icon-arrow-back></swirl-icon-arrow-back>", label: this.backButtonLabel, onClick: this.onBackButtonClick })), this.showCloseButton && (h("swirl-button", { hideLabel: true, icon: "<swirl-icon-close></swirl-icon-close>", label: this.closeButtonLabel, onClick: this.onCloseButtonClick })))), this.showStepperControls && (h("div", { class: "app-bar__stepper-controls" }, h("swirl-button", { hideLabel: true, icon: "<swirl-icon-arrow-upward></swirl-icon-arrow-upward>", label: this.stepUpButtonLabel, onClick: this.onStepUpButtonClick }), h("swirl-button", { hideLabel: true, icon: "<swirl-icon-arrow-downward></swirl-icon-arrow-downward>", label: this.stepDownButtonLabel, onClick: this.onStepDownButtonClick }))))), h("div", { class: "app-bar__cta" }, h("slot", { name: "cta" })), h("div", { class: "app-bar__heading" }, h("slot", { name: "heading" })), h("div", { class: "app-bar__center-controls" }, h("slot", { name: "center-controls" })), h("div", { class: "app-bar__right-controls" }, h("slot", { name: "right-controls" })))));
55
+ return (h(Host, null, h("div", { class: className }, showLeftControls && (h("div", { class: "app-bar__left-controls" }, (this.showBackButton || this.showCloseButton) && (h("div", { class: "app-bar__main-navigation-control" }, this.showBackButton && (h("swirl-button", { hideLabel: true, icon: "<swirl-icon-arrow-back></swirl-icon-arrow-back>", label: this.backButtonLabel, onClick: this.onBackButtonClick })), this.showCloseButton && (h("swirl-button", { hideLabel: true, icon: this.closeButtonIcon, label: this.closeButtonLabel, onClick: this.onCloseButtonClick })))), this.showStepperControls && (h("div", { class: "app-bar__stepper-controls" }, h("swirl-button", { hideLabel: true, icon: "<swirl-icon-arrow-upward></swirl-icon-arrow-upward>", label: this.stepUpButtonLabel, onClick: this.onStepUpButtonClick }), h("swirl-button", { hideLabel: true, icon: "<swirl-icon-arrow-downward></swirl-icon-arrow-downward>", label: this.stepDownButtonLabel, onClick: this.onStepDownButtonClick }))))), h("div", { class: "app-bar__cta" }, h("slot", { name: "cta" })), h("div", { class: "app-bar__heading" }, h("slot", { name: "heading" })), h("div", { class: "app-bar__center-controls" }, h("slot", { name: "center-controls" })), h("div", { class: "app-bar__right-controls" }, h("slot", { name: "right-controls" })))));
55
56
  }
56
57
  static get is() { return "swirl-app-bar"; }
57
58
  static get encapsulation() { return "shadow"; }
@@ -85,6 +86,24 @@ export class SwirlAppBar {
85
86
  "reflect": false,
86
87
  "defaultValue": "\"Go back\""
87
88
  },
89
+ "closeButtonIcon": {
90
+ "type": "string",
91
+ "mutable": false,
92
+ "complexType": {
93
+ "original": "string",
94
+ "resolved": "string",
95
+ "references": {}
96
+ },
97
+ "required": false,
98
+ "optional": true,
99
+ "docs": {
100
+ "tags": [],
101
+ "text": ""
102
+ },
103
+ "attribute": "close-button-icon",
104
+ "reflect": false,
105
+ "defaultValue": "\"<swirl-icon-close></swirl-icon-close>\""
106
+ },
88
107
  "closeButtonLabel": {
89
108
  "type": "string",
90
109
  "mutable": false,
@@ -9,10 +9,9 @@
9
9
  .app-icon {
10
10
  position: relative;
11
11
  overflow: hidden;
12
- width: 2.5rem;
13
- height: 2.5rem;
14
- border-radius: 0.625rem;
15
- background-color: var(--s-surface-default);
12
+ width: 1.25rem;
13
+ height: 1.25rem;
14
+ border-radius: var(--s-border-radius-s);
16
15
  }
17
16
 
18
17
  .app-icon > img {
@@ -20,28 +19,10 @@
20
19
  height: 100%;
21
20
  }
22
21
 
23
- .app-icon::after {
24
- position: absolute;
25
- top: 0;
26
- display: block;
27
- width: 100%;
28
- height: 100%;
29
- border-radius: 0.625rem;
30
- content: "";
31
- box-shadow: 0 0 var(--s-border-width-default) rgba(0, 0, 0, 0.1) inset,
32
- 0 0 var(--s-border-width-default) rgba(0, 0, 0, 0.1) inset;
33
- }
34
-
35
- .app-icon--hide-border::after {
36
- box-shadow: none;
37
- }
38
-
39
22
  .app-icon__icon {
40
23
  display: inline-flex;
41
24
  width: 100%;
42
25
  height: 100%;
43
26
  justify-content: center;
44
27
  align-items: center;
45
-
46
- color: var(--s-icon-default);
47
28
  }
@@ -10,7 +10,6 @@ export class SwirlAppIcon {
10
10
  };
11
11
  this.icon = undefined;
12
12
  this.src = undefined;
13
- this.hideBorder = false;
14
13
  this.imageAvailable = undefined;
15
14
  }
16
15
  render() {
@@ -20,7 +19,6 @@ export class SwirlAppIcon {
20
19
  const showFallbackIcon = !showImage && !showIcon;
21
20
  const className = classnames("app-icon", {
22
21
  "app-icon--has-icon": showIcon || showFallbackIcon,
23
- "app-icon--hide-border": this.hideBorder,
24
22
  });
25
23
  return (h(Host, null, h("span", { class: className }, showImage && (h("img", { alt: "", height: "40", onError: this.setImageUnavailable, onLoad: this.setImageAvailable, src: this.src, width: "40" })), showIcon && (h("span", { class: "app-icon__icon", innerHTML: this.icon })))));
26
24
  }
@@ -71,24 +69,6 @@ export class SwirlAppIcon {
71
69
  },
72
70
  "attribute": "src",
73
71
  "reflect": false
74
- },
75
- "hideBorder": {
76
- "type": "boolean",
77
- "mutable": false,
78
- "complexType": {
79
- "original": "boolean",
80
- "resolved": "boolean",
81
- "references": {}
82
- },
83
- "required": false,
84
- "optional": true,
85
- "docs": {
86
- "tags": [],
87
- "text": ""
88
- },
89
- "attribute": "hide-border",
90
- "reflect": false,
91
- "defaultValue": "false"
92
72
  }
93
73
  };
94
74
  }
@@ -80,6 +80,18 @@
80
80
  }
81
81
  }
82
82
 
83
+ @media (min-width: 768px) {
84
+ .app-layout--has-sidebar:not(.app-layout--has-navigation).app-layout--sidebar-active .app-layout__grid {
85
+ animation: app-layout-no-nav-sidebar-slide-in 0.3s;
86
+ }
87
+ }
88
+
89
+ @media (min-width: 768px) {
90
+ .app-layout--has-sidebar:not(.app-layout--has-navigation).app-layout--sidebar-closing .app-layout__grid {
91
+ animation: app-layout-no-nav-sidebar-slide-out 0.3s;
92
+ }
93
+ }
94
+
83
95
  @media (min-width: 768px) {
84
96
  .app-layout--has-sidebar.app-layout--sidebar-active .app-layout__grid {
85
97
  grid-template-columns: 1fr min(50%, 25rem);
@@ -96,7 +108,7 @@
96
108
  "body";
97
109
  }
98
110
 
99
- @media (min-width: 1440px) {
111
+ @media (min-width: 1800px) {
100
112
  .app-layout--has-navigation.app-layout--has-sidebar.app-layout--sidebar-active .app-layout__grid {
101
113
  animation: app-layout-sidebar-slide-in 0.3s;
102
114
  grid-template-columns: 25rem 1fr 25rem;
@@ -132,7 +144,7 @@
132
144
  }
133
145
  }
134
146
 
135
- @media (min-width: 768px) and (max-width: 1439px) {
147
+ @media (min-width: 768px) and (max-width: 1799px) {
136
148
  .app-layout--has-navigation.app-layout--has-sidebar .app-layout__sidebar {
137
149
  position: absolute;
138
150
  top: 0;
@@ -196,7 +208,7 @@
196
208
  }
197
209
  }
198
210
 
199
- @media (min-width: 1440px) {
211
+ @media (min-width: 1800px) {
200
212
 
201
213
  .app-layout--sidebar-closing .app-layout__sidebar {
202
214
  animation: none
@@ -397,7 +409,7 @@
397
409
  }
398
410
  }
399
411
 
400
- @media (min-width: 1440px) {
412
+ @media (min-width: 1800px) {
401
413
 
402
414
  .app-layout__sidebar {
403
415
  width: 25rem;
@@ -777,3 +789,25 @@
777
789
  }
778
790
  }
779
791
 
792
+ @keyframes app-layout-no-nav-sidebar-slide-in {
793
+ from {
794
+ overflow: hidden;
795
+ grid-template-columns: 1fr 0;
796
+ }
797
+ to {
798
+ overflow: hidden;
799
+ grid-template-columns: 1fr 25rem;
800
+ }
801
+ }
802
+
803
+ @keyframes app-layout-no-nav-sidebar-slide-out {
804
+ from {
805
+ overflow: hidden;
806
+ grid-template-columns: 1fr 25rem;
807
+ }
808
+ to {
809
+ overflow: hidden;
810
+ grid-template-columns: 1fr 0;
811
+ }
812
+ }
813
+
@@ -15,13 +15,30 @@
15
15
  max-width: 100%;
16
16
  justify-content: center;
17
17
  align-items: center;
18
- border: 0.25rem solid var(--swirl-badge-border-color);
18
+ border: 0.125rem solid var(--swirl-badge-border-color);
19
19
  border-radius: 2rem;
20
20
  color: var(--s-text-on-status);
21
21
  font-size: var(--s-font-size-sm);
22
22
  font-weight: var(--s-font-weight-medium);
23
23
  }
24
24
 
25
+ .badge--size-xs {
26
+ min-width: 1.25rem;
27
+ height: 1.25rem;
28
+ font-size: 0.6875rem;
29
+ }
30
+
31
+ .badge--size-xs .badge__label {
32
+ padding-right: 0.125rem;
33
+ padding-left: 0.125rem;
34
+ }
35
+
36
+ .badge--size-xs .badge__icon > swirl-icon,
37
+ .badge--size-xs .badge__icon > *::part(icon) {
38
+ width: 0.75rem;
39
+ height: 0.75rem;
40
+ }
41
+
25
42
  .badge--size-s {
26
43
  min-width: 1.5rem;
27
44
  height: 1.5rem;
@@ -90,7 +90,7 @@ export class SwirlBadge {
90
90
  "mutable": false,
91
91
  "complexType": {
92
92
  "original": "SwirlBadgeSize",
93
- "resolved": "\"m\" | \"s\"",
93
+ "resolved": "\"m\" | \"s\" | \"xs\"",
94
94
  "references": {
95
95
  "SwirlBadgeSize": {
96
96
  "location": "local",
@@ -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,
@@ -0,0 +1,52 @@
1
+ // DO NOT EDIT. THIS FILE GETS GENERATED VIA "yarn generate".
2
+ import { Fragment, h } from "@stencil/core";
3
+ import classnames from "classnames";
4
+ export class SwirlIconDockLeft {
5
+ constructor() {
6
+ this.size = 24;
7
+ }
8
+ render() {
9
+ const viewBoxSize = this.size === 20 ? 24 : this.size;
10
+ const className = classnames("swirl-icon", `swirl-icon--size-${this.size}`);
11
+ return (h("svg", { class: className, fill: "none", height: this.size, part: "icon", viewBox: `0 0 ${viewBoxSize} ${viewBoxSize}`, width: this.size, xmlns: "http://www.w3.org/2000/svg" }, this.size === 16 && (h(Fragment, null, h("path", { d: "M3.33333 14C2.96667 14 2.65278 13.8694 2.39167 13.6083C2.13056 13.3472 2 13.0333 2 12.6667V3.33333C2 2.96667 2.13056 2.65278 2.39167 2.39167C2.65278 2.13056 2.96667 2 3.33333 2H12.6667C13.0333 2 13.3472 2.13056 13.6083 2.39167C13.8694 2.65278 14 2.96667 14 3.33333V12.6667C14 13.0333 13.8694 13.3472 13.6083 13.6083C13.3472 13.8694 13.0333 14 12.6667 14H3.33333ZM5.33333 12.6667V3.33333H3.33333V12.6667H5.33333ZM6.66667 12.6667H12.6667V3.33333H6.66667V12.6667Z", fill: "currentColor" }))), (this.size === 20 || this.size === 24) && (h(Fragment, null, h("path", { d: "M5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H19C19.55 3 20.0208 3.19583 20.4125 3.5875C20.8042 3.97917 21 4.45 21 5V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5ZM8 19V5H5V19H8ZM10 19H19V5H10V19Z", fill: "currentColor" }))), this.size === 28 && (h(Fragment, null, h("path", { d: "M5.83333 24.5C5.19167 24.5 4.64236 24.2715 4.18542 23.8146C3.72847 23.3576 3.5 22.8083 3.5 22.1667V5.83333C3.5 5.19167 3.72847 4.64236 4.18542 4.18542C4.64236 3.72847 5.19167 3.5 5.83333 3.5H22.1667C22.8083 3.5 23.3576 3.72847 23.8146 4.18542C24.2715 4.64236 24.5 5.19167 24.5 5.83333V22.1667C24.5 22.8083 24.2715 23.3576 23.8146 23.8146C23.3576 24.2715 22.8083 24.5 22.1667 24.5H5.83333ZM9.33333 22.1667V5.83333H5.83333V22.1667H9.33333ZM11.6667 22.1667H22.1667V5.83333H11.6667V22.1667Z", fill: "currentColor" })))));
12
+ }
13
+ static get is() { return "swirl-icon-dock-left"; }
14
+ static get encapsulation() { return "shadow"; }
15
+ static get originalStyleUrls() {
16
+ return {
17
+ "$": ["../swirl-icon.css"]
18
+ };
19
+ }
20
+ static get styleUrls() {
21
+ return {
22
+ "$": ["../swirl-icon.css"]
23
+ };
24
+ }
25
+ static get properties() {
26
+ return {
27
+ "size": {
28
+ "type": "number",
29
+ "mutable": false,
30
+ "complexType": {
31
+ "original": "SwirlIconSize",
32
+ "resolved": "16 | 20 | 24 | 28",
33
+ "references": {
34
+ "SwirlIconSize": {
35
+ "location": "import",
36
+ "path": "../swirl-icon.types"
37
+ }
38
+ }
39
+ },
40
+ "required": false,
41
+ "optional": false,
42
+ "docs": {
43
+ "tags": [],
44
+ "text": ""
45
+ },
46
+ "attribute": "size",
47
+ "reflect": false,
48
+ "defaultValue": "24"
49
+ }
50
+ };
51
+ }
52
+ }
@@ -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": {