@getflip/swirl-components 0.216.0 → 0.217.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 (26) hide show
  1. package/components.json +43 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/swirl-chip.cjs.entry.js +1 -1
  4. package/dist/cjs/swirl-components.cjs.js +1 -1
  5. package/dist/cjs/swirl-file-viewer_7.cjs.entry.js +18 -2
  6. package/dist/collection/assets/pdfjs/pdf.worker.min.js +1 -1
  7. package/dist/collection/components/swirl-chip/swirl-chip.js +1 -1
  8. package/dist/collection/components/swirl-file-viewer/swirl-file-viewer.js +19 -1
  9. package/dist/collection/components/swirl-file-viewer/viewers/swirl-file-viewer-video/swirl-file-viewer-video.js +36 -1
  10. package/dist/components/assets/pdfjs/pdf.worker.min.js +1 -1
  11. package/dist/components/swirl-chip.js +1 -1
  12. package/dist/components/swirl-file-viewer-video2.js +19 -1
  13. package/dist/components/swirl-file-viewer2.js +3 -1
  14. package/dist/esm/loader.js +1 -1
  15. package/dist/esm/swirl-chip.entry.js +1 -1
  16. package/dist/esm/swirl-components.js +1 -1
  17. package/dist/esm/swirl-file-viewer_7.entry.js +18 -2
  18. package/dist/swirl-components/p-7490b2df.entry.js +1 -0
  19. package/dist/swirl-components/{p-ab08170a.entry.js → p-7900de4c.entry.js} +4 -4
  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-video/swirl-file-viewer-video.d.ts +3 -0
  23. package/dist/types/components.d.ts +4 -0
  24. package/package.json +1 -1
  25. package/vscode-data.json +8 -0
  26. package/dist/swirl-components/p-4bccdf5c.entry.js +0 -1
@@ -49,7 +49,7 @@ export class SwirlChip {
49
49
  "chip--interactive": this.interactive || this.pressed !== undefined,
50
50
  "chip--removable": this.removable,
51
51
  });
52
- return (h(Host, { key: '2c558ecbcce9b65da44616543ec1f764a01cb2cf' }, h(Tag, { key: '4f146a7481412df5d1b398b85b455114afc40297', class: className, type: this.interactive ? "button" : undefined, "aria-pressed": this.pressed !== undefined ? String(this.pressed) : undefined }, h("span", { key: '1718cc6dc4e726a8ed98fecf322cd0b6284f67a1', class: "chip__inner" }, showAvatar && (h("span", { key: '9ae76d5e8b2349ad69c704b062ea6638c1f50191', class: "chip__avatar" }, h("slot", { key: '87d4b9788a9efca593aa1e0cacb2e84eeae6fea3', name: "avatar" }))), showIcon && (h("span", { key: 'e92922a857124377ca8892c3c242f6444954cb02', class: "chip__icon", innerHTML: this.icon, ref: (el) => (this.iconEl = el) })), h("span", { key: '7b7d73e445ed9ea5c5641c23bcbff85aaafb0a02', class: "chip__label" }, this.label)), this.progress !== undefined && (h("span", { key: '8a9fc592a21a81237a13b15185c382a016a70b5f', class: "chip__progress-indicator" }, h("swirl-progress-indicator", { key: 'fad6f0d26d8968a40bcb3c6d71c66c5f109e8012', label: this.progressBarLabel, value: this.progress })))), this.removable && (h("button", { key: '1cdc6a95b026f6332f72dbc46e2800f7acc21858', "aria-label": this.removeButtonLabel, class: "chip__remove-button", onClick: this.remove.emit }, h("swirl-icon-close", { key: '8bcf66065c3920ee3dbfca3db57dcccae00690fb', size: 20 })))));
52
+ return (h(Host, { key: '2c558ecbcce9b65da44616543ec1f764a01cb2cf' }, h(Tag, { key: '4f146a7481412df5d1b398b85b455114afc40297', class: className, type: this.interactive ? "button" : undefined, "aria-pressed": this.pressed !== undefined ? String(this.pressed) : undefined }, h("span", { key: '1718cc6dc4e726a8ed98fecf322cd0b6284f67a1', class: "chip__inner" }, showAvatar && (h("span", { key: '9ae76d5e8b2349ad69c704b062ea6638c1f50191', class: "chip__avatar" }, h("slot", { key: '87d4b9788a9efca593aa1e0cacb2e84eeae6fea3', name: "avatar" }))), showIcon && (h("span", { key: 'e92922a857124377ca8892c3c242f6444954cb02', class: "chip__icon", innerHTML: this.icon, ref: (el) => (this.iconEl = el) })), h("span", { key: '7b7d73e445ed9ea5c5641c23bcbff85aaafb0a02', class: "chip__label" }, this.label)), this.progress !== undefined && (h("span", { key: '8a9fc592a21a81237a13b15185c382a016a70b5f', class: "chip__progress-indicator" }, h("swirl-progress-indicator", { key: 'fad6f0d26d8968a40bcb3c6d71c66c5f109e8012', label: this.progressBarLabel, value: this.progress })))), this.removable && (h("button", { key: '5ec9c622c143c895146cbee3643ddfd7247ad383', "aria-label": this.removeButtonLabel, class: "chip__remove-button", onClick: this.remove.emit, type: "button" }, h("swirl-icon-close", { key: 'c259db9f4c46a5f0a1e083b5f99d696dee815954', size: 20 })))));
53
53
  }
54
54
  static get is() { return "swirl-chip"; }
55
55
  static get encapsulation() { return "scoped"; }
@@ -11,6 +11,7 @@ export class SwirlFileViewer {
11
11
  this.active = true;
12
12
  this.autoplay = undefined;
13
13
  this.description = undefined;
14
+ this.disableDownload = undefined;
14
15
  this.errorMessage = "File could not be loaded.";
15
16
  this.file = undefined;
16
17
  this.fileName = undefined;
@@ -45,7 +46,7 @@ export class SwirlFileViewer {
45
46
  this.type !== "text/plain" &&
46
47
  this.type !== "text/csv" &&
47
48
  this.type !== "application/pdf");
48
- return (h(Host, { key: 'a2126bed467ac3309ab1bff9315257d158c858e3' }, h("div", { key: '5c3f92740ceccf88cf021ba0efe3349fa1b0c38a', class: "file-viewer" }, this.type && this.active && (h("div", { key: '6116e11f02a3fdaa6f7fb81043acfca1bf4a11fe', class: "file-viewer__file" }, this.type.startsWith("image/") && (h("swirl-file-viewer-image", { key: '58f71fce8cef45b4df6cde4a942d88c4281b516e', description: this.description, errorMessage: this.errorMessage, file: this.file, ref: (el) => (this.viewer = el) })), this.type === "text/plain" && (h("swirl-file-viewer-text", { key: 'f6bef66a5793d702162a702f4fc3f83a0790fc4b', errorMessage: this.errorMessage, file: this.file, ref: (el) => (this.viewer = el) })), this.type === "text/csv" && (h("swirl-file-viewer-csv", { key: '212ae07d1f339ec01589b0db8706e3e739efca32', errorMessage: this.errorMessage, file: this.file, ref: (el) => (this.viewer = el) })), this.type === "application/pdf" && (h("swirl-file-viewer-pdf", { key: '60475b799b38486a839ec2a5f201cab4f434e99b', 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", { key: '50ab3675c7e41ed618d01dd79600dcf07ceee50b', autoplay: this.autoplay, file: this.file, ref: (el) => (this.viewer = el), type: this.type })), this.type.startsWith("audio/") && (h("swirl-file-viewer-audio", { key: '9c59f19f6073dd0b26952327421b80dc9515b0b7', autoplay: this.autoplay, file: this.file, ref: (el) => (this.viewer = el), type: this.type })), unsupportedType && (h("swirl-inline-error", { key: '2be4d76fd900d3f62f9748c7f14fb12c83d5afd8', message: this.typeUnsupportedMessage })))))));
49
+ return (h(Host, { key: 'b4bf3cf48bdf55b5a5247d2d9d00d2dd2a653922' }, h("div", { key: 'b9c135b1150e6c9b5a090a6ac78b04ca36e391cc', class: "file-viewer" }, this.type && this.active && (h("div", { key: 'd01dd4d3496474e41c93fbf480f4d4c86f88d3cf', class: "file-viewer__file" }, this.type.startsWith("image/") && (h("swirl-file-viewer-image", { key: '0a67087ddcf5569804bf42f8f3026fcd99ff6b8d', description: this.description, errorMessage: this.errorMessage, file: this.file, ref: (el) => (this.viewer = el) })), this.type === "text/plain" && (h("swirl-file-viewer-text", { key: '3e9e0aa3c2e793226e21b8054fdbfff0fa28d9b8', errorMessage: this.errorMessage, file: this.file, ref: (el) => (this.viewer = el) })), this.type === "text/csv" && (h("swirl-file-viewer-csv", { key: '83be558b789a82eeac46c67af061b634f7dc72c1', errorMessage: this.errorMessage, file: this.file, ref: (el) => (this.viewer = el) })), this.type === "application/pdf" && (h("swirl-file-viewer-pdf", { key: '68bb685041185dd29d07be8e48e7038492d75e57', 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", { key: '66af2a88573a3e2b8019dad662cf32e6f15b1f3e', autoplay: this.autoplay, disableDownload: this.disableDownload, file: this.file, ref: (el) => (this.viewer = el), type: this.type })), this.type.startsWith("audio/") && (h("swirl-file-viewer-audio", { key: '3ff7c5aefbb892cd34a11a172e674a7ecfd7769d', autoplay: this.autoplay, file: this.file, ref: (el) => (this.viewer = el), type: this.type })), unsupportedType && (h("swirl-inline-error", { key: '3d437e0bfedf35206ac3e1c88b6e93e26ccff3be', message: this.typeUnsupportedMessage })))))));
49
50
  }
50
51
  static get is() { return "swirl-file-viewer"; }
51
52
  static get encapsulation() { return "shadow"; }
@@ -113,6 +114,23 @@ export class SwirlFileViewer {
113
114
  "attribute": "description",
114
115
  "reflect": false
115
116
  },
117
+ "disableDownload": {
118
+ "type": "boolean",
119
+ "mutable": false,
120
+ "complexType": {
121
+ "original": "boolean",
122
+ "resolved": "boolean",
123
+ "references": {}
124
+ },
125
+ "required": false,
126
+ "optional": true,
127
+ "docs": {
128
+ "tags": [],
129
+ "text": ""
130
+ },
131
+ "attribute": "disable-download",
132
+ "reflect": false
133
+ },
116
134
  "errorMessage": {
117
135
  "type": "string",
118
136
  "mutable": false,
@@ -2,14 +2,26 @@ import { h, Host, } from "@stencil/core";
2
2
  export class SwirlFileViewerVideo {
3
3
  constructor() {
4
4
  this.autoplay = undefined;
5
+ this.disableDownload = undefined;
5
6
  this.file = undefined;
6
7
  this.type = undefined;
7
8
  }
8
9
  componentDidLoad() {
9
10
  this.activate.emit(this.el);
11
+ if (this.disableDownload) {
12
+ this.videoEl.setAttribute("controlsList", "nodownload");
13
+ }
14
+ }
15
+ watchDisableDownload() {
16
+ if (this.disableDownload) {
17
+ this.videoEl.setAttribute("controlsList", "nodownload");
18
+ }
19
+ else {
20
+ this.videoEl.removeAttribute("controlsList");
21
+ }
10
22
  }
11
23
  render() {
12
- return (h(Host, { key: 'ca6a8f8d3d1d4bef303e438858765f2cab21014a', class: "file-viewer-video" }, h("video", { key: 'a63a4a6cbd9be728c9c1cbfecae47ad950e92fc1', autoplay: this.autoplay, class: "file-viewer-video__video", controls: true }, h("source", { key: 'f247a0a615487b1dc5e812736e973e74f97c7242', src: this.file, type: this.type }))));
24
+ return (h(Host, { key: 'ac8cf96b6359070114b3cde6a7ccf7eea5245c7a', class: "file-viewer-video" }, h("video", { key: '10cc560ceaea3df058a7c5a78f3583f04af60508', autoplay: this.autoplay, class: "file-viewer-video__video", controls: true, ref: (el) => (this.videoEl = el) }, h("source", { key: '6a8da26d879cfe62ed136b52af3e39f3d8bfa626', src: this.file, type: this.type }))));
13
25
  }
14
26
  static get is() { return "swirl-file-viewer-video"; }
15
27
  static get encapsulation() { return "shadow"; }
@@ -42,6 +54,23 @@ export class SwirlFileViewerVideo {
42
54
  "attribute": "autoplay",
43
55
  "reflect": false
44
56
  },
57
+ "disableDownload": {
58
+ "type": "boolean",
59
+ "mutable": false,
60
+ "complexType": {
61
+ "original": "boolean",
62
+ "resolved": "boolean",
63
+ "references": {}
64
+ },
65
+ "required": false,
66
+ "optional": true,
67
+ "docs": {
68
+ "tags": [],
69
+ "text": ""
70
+ },
71
+ "attribute": "disable-download",
72
+ "reflect": false
73
+ },
45
74
  "file": {
46
75
  "type": "string",
47
76
  "mutable": false,
@@ -102,4 +131,10 @@ export class SwirlFileViewerVideo {
102
131
  }];
103
132
  }
104
133
  static get elementRef() { return "el"; }
134
+ static get watchers() {
135
+ return [{
136
+ "propName": "disableDownload",
137
+ "methodName": "watchDisableDownload"
138
+ }];
139
+ }
105
140
  }