@limetech/lime-elements 37.1.0-next.44 → 37.1.0-next.45

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 (137) hide show
  1. package/dist/cjs/{component-66df95e7.js → component-9c3fa668.js} +12 -935
  2. package/dist/cjs/component-9c3fa668.js.map +1 -0
  3. package/dist/cjs/component-a0124759.js +929 -0
  4. package/dist/cjs/component-a0124759.js.map +1 -0
  5. package/dist/cjs/lime-elements.cjs.js +1 -1
  6. package/dist/cjs/limel-callout.cjs.entry.js +1 -1
  7. package/dist/cjs/limel-chip-set.cjs.entry.js +1 -1
  8. package/dist/cjs/limel-code-editor.cjs.entry.js +189 -0
  9. package/dist/cjs/limel-code-editor.cjs.entry.js.map +1 -1
  10. package/dist/cjs/limel-file-viewer.cjs.entry.js +260 -0
  11. package/dist/cjs/limel-file-viewer.cjs.entry.js.map +1 -0
  12. package/dist/cjs/limel-file.cjs.entry.js +1 -1
  13. package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +1 -1
  14. package/dist/cjs/limel-icon-button.cjs.entry.js +8 -1
  15. package/dist/cjs/limel-icon-button.cjs.entry.js.map +1 -1
  16. package/dist/cjs/{limel-list_2.cjs.entry.js → limel-list.cjs.entry.js} +2 -122
  17. package/dist/cjs/limel-list.cjs.entry.js.map +1 -0
  18. package/dist/cjs/limel-menu-surface.cjs.entry.js +130 -0
  19. package/dist/cjs/limel-menu-surface.cjs.entry.js.map +1 -0
  20. package/dist/cjs/limel-menu_2.cjs.entry.js +14 -13
  21. package/dist/cjs/limel-menu_2.cjs.entry.js.map +1 -1
  22. package/dist/cjs/limel-snackbar.cjs.entry.js +1 -1
  23. package/dist/cjs/loader.cjs.js +1 -1
  24. package/dist/cjs/{translations-f8080c48.js → translations-a384b596.js} +37 -1
  25. package/dist/cjs/translations-a384b596.js.map +1 -0
  26. package/dist/collection/collection-manifest.json +1 -0
  27. package/dist/collection/components/code-editor/code-editor.js +2 -3
  28. package/dist/collection/components/code-editor/code-editor.js.map +1 -1
  29. package/dist/collection/components/code-editor/code-editor.types.js.map +1 -1
  30. package/dist/collection/components/file-viewer/extension-mapping.js +66 -0
  31. package/dist/collection/components/file-viewer/extension-mapping.js.map +1 -0
  32. package/dist/collection/components/file-viewer/file-viewer.css +266 -0
  33. package/dist/collection/components/file-viewer/file-viewer.js +387 -0
  34. package/dist/collection/components/file-viewer/file-viewer.js.map +1 -0
  35. package/dist/collection/components/file-viewer/file-viewer.types.js +2 -0
  36. package/dist/collection/components/file-viewer/file-viewer.types.js.map +1 -0
  37. package/dist/collection/components/file-viewer/fullscreen.js +43 -0
  38. package/dist/collection/components/file-viewer/fullscreen.js.map +1 -0
  39. package/dist/collection/components/icon-button/icon-button.js +8 -1
  40. package/dist/collection/components/icon-button/icon-button.js.map +1 -1
  41. package/dist/collection/translations/da.js +6 -0
  42. package/dist/collection/translations/da.js.map +1 -1
  43. package/dist/collection/translations/en.js +6 -0
  44. package/dist/collection/translations/en.js.map +1 -1
  45. package/dist/collection/translations/fi.js +6 -0
  46. package/dist/collection/translations/fi.js.map +1 -1
  47. package/dist/collection/translations/nl.js +6 -0
  48. package/dist/collection/translations/nl.js.map +1 -1
  49. package/dist/collection/translations/no.js +6 -0
  50. package/dist/collection/translations/no.js.map +1 -1
  51. package/dist/collection/translations/sv.js +6 -0
  52. package/dist/collection/translations/sv.js.map +1 -1
  53. package/dist/esm/{component-fffa3419.js → component-0be247ac.js} +13 -934
  54. package/dist/esm/component-0be247ac.js.map +1 -0
  55. package/dist/esm/component-6d079abe.js +926 -0
  56. package/dist/esm/component-6d079abe.js.map +1 -0
  57. package/dist/esm/lime-elements.js +1 -1
  58. package/dist/esm/limel-callout.entry.js +1 -1
  59. package/dist/esm/limel-chip-set.entry.js +1 -1
  60. package/dist/esm/limel-code-editor.entry.js +189 -0
  61. package/dist/esm/limel-code-editor.entry.js.map +1 -1
  62. package/dist/esm/limel-file-viewer.entry.js +256 -0
  63. package/dist/esm/limel-file-viewer.entry.js.map +1 -0
  64. package/dist/esm/limel-file.entry.js +1 -1
  65. package/dist/esm/limel-flatpickr-adapter.entry.js +1 -1
  66. package/dist/esm/limel-icon-button.entry.js +8 -1
  67. package/dist/esm/limel-icon-button.entry.js.map +1 -1
  68. package/dist/esm/{limel-list_2.entry.js → limel-list.entry.js} +3 -122
  69. package/dist/esm/limel-list.entry.js.map +1 -0
  70. package/dist/esm/limel-menu-surface.entry.js +126 -0
  71. package/dist/esm/limel-menu-surface.entry.js.map +1 -0
  72. package/dist/esm/limel-menu_2.entry.js +2 -1
  73. package/dist/esm/limel-menu_2.entry.js.map +1 -1
  74. package/dist/esm/limel-snackbar.entry.js +1 -1
  75. package/dist/esm/loader.js +1 -1
  76. package/dist/esm/{translations-f88bb584.js → translations-dea847ae.js} +37 -1
  77. package/dist/esm/translations-dea847ae.js.map +1 -0
  78. package/dist/lime-elements/lime-elements.esm.js +1 -1
  79. package/dist/lime-elements/lime-elements.esm.js.map +1 -1
  80. package/dist/lime-elements/p-3ee3dcdc.js +2 -0
  81. package/dist/lime-elements/p-3ee3dcdc.js.map +1 -0
  82. package/dist/lime-elements/p-45449868.entry.js +2 -0
  83. package/dist/lime-elements/p-45449868.entry.js.map +1 -0
  84. package/dist/lime-elements/{p-550cae4a.entry.js → p-4c100bed.entry.js} +2 -2
  85. package/dist/lime-elements/p-5dd6d677.js +82 -0
  86. package/dist/lime-elements/p-5dd6d677.js.map +1 -0
  87. package/dist/lime-elements/p-685e5867.entry.js +2 -0
  88. package/dist/lime-elements/p-685e5867.entry.js.map +1 -0
  89. package/dist/lime-elements/p-6fa8bf86.entry.js +2 -0
  90. package/dist/lime-elements/p-6fa8bf86.entry.js.map +1 -0
  91. package/dist/lime-elements/{p-9a5745e5.entry.js → p-6fac3a11.entry.js} +2 -2
  92. package/dist/lime-elements/{p-c9aee7a1.entry.js → p-80f0c441.entry.js} +2 -2
  93. package/dist/lime-elements/{p-cf61ac34.entry.js → p-8eff47a6.entry.js} +2 -2
  94. package/dist/lime-elements/p-9eab9eb2.entry.js +2 -0
  95. package/dist/lime-elements/p-9eab9eb2.entry.js.map +1 -0
  96. package/dist/lime-elements/p-b8deba1b.entry.js +2 -0
  97. package/dist/lime-elements/p-b8deba1b.entry.js.map +1 -0
  98. package/dist/lime-elements/{p-7972528a.entry.js → p-dbcae3a0.entry.js} +2 -2
  99. package/dist/lime-elements/p-e3b16b61.js +126 -0
  100. package/dist/lime-elements/p-e3b16b61.js.map +1 -0
  101. package/dist/lime-elements/{p-2d0587d5.entry.js → p-fed820d9.entry.js} +4 -4
  102. package/dist/lime-elements/{p-2d0587d5.entry.js.map → p-fed820d9.entry.js.map} +1 -1
  103. package/dist/types/components/code-editor/code-editor.d.ts +1 -2
  104. package/dist/types/components/code-editor/code-editor.types.d.ts +1 -1
  105. package/dist/types/components/file-viewer/extension-mapping.d.ts +1 -0
  106. package/dist/types/components/file-viewer/file-viewer.types.d.ts +2 -0
  107. package/dist/types/components/file-viewer/fullscreen.d.ts +9 -0
  108. package/dist/types/components/icon-button/icon-button.d.ts +1 -0
  109. package/dist/types/components.d.ts +209 -20
  110. package/dist/types/translations/da.d.ts +6 -0
  111. package/dist/types/translations/en.d.ts +6 -0
  112. package/dist/types/translations/fi.d.ts +6 -0
  113. package/dist/types/translations/nl.d.ts +6 -0
  114. package/dist/types/translations/no.d.ts +6 -0
  115. package/dist/types/translations/sv.d.ts +6 -0
  116. package/package.json +2 -2
  117. package/dist/cjs/component-66df95e7.js.map +0 -1
  118. package/dist/cjs/limel-list_2.cjs.entry.js.map +0 -1
  119. package/dist/cjs/translations-f8080c48.js.map +0 -1
  120. package/dist/esm/component-fffa3419.js.map +0 -1
  121. package/dist/esm/limel-list_2.entry.js.map +0 -1
  122. package/dist/esm/translations-f88bb584.js.map +0 -1
  123. package/dist/lime-elements/p-172385f4.entry.js +0 -2
  124. package/dist/lime-elements/p-172385f4.entry.js.map +0 -1
  125. package/dist/lime-elements/p-22031b5b.entry.js +0 -2
  126. package/dist/lime-elements/p-22031b5b.entry.js.map +0 -1
  127. package/dist/lime-elements/p-94cb40fb.entry.js +0 -2
  128. package/dist/lime-elements/p-94cb40fb.entry.js.map +0 -1
  129. package/dist/lime-elements/p-b59e4287.js +0 -2
  130. package/dist/lime-elements/p-b59e4287.js.map +0 -1
  131. package/dist/lime-elements/p-dfba92de.js +0 -206
  132. package/dist/lime-elements/p-dfba92de.js.map +0 -1
  133. /package/dist/lime-elements/{p-550cae4a.entry.js.map → p-4c100bed.entry.js.map} +0 -0
  134. /package/dist/lime-elements/{p-9a5745e5.entry.js.map → p-6fac3a11.entry.js.map} +0 -0
  135. /package/dist/lime-elements/{p-c9aee7a1.entry.js.map → p-80f0c441.entry.js.map} +0 -0
  136. /package/dist/lime-elements/{p-cf61ac34.entry.js.map → p-8eff47a6.entry.js.map} +0 -0
  137. /package/dist/lime-elements/{p-7972528a.entry.js.map → p-dbcae3a0.entry.js.map} +0 -0
@@ -0,0 +1,387 @@
1
+ import { h, } from '@stencil/core';
2
+ import translate from '../../global/translations';
3
+ import { detectExtension } from './extension-mapping';
4
+ import { Fullscreen } from './fullscreen';
5
+ /**
6
+ * This is a smart component that automatically detects
7
+ * the most common file types such as image, audio, video, and text,
8
+ * and properly displays them in the browser.
9
+ * The component is also capable to render the most common office files.
10
+ *
11
+ * :::note
12
+ * Image files will always be contained in their containers, which means
13
+ * they automatically increase or decrease in size to fill their containing box
14
+ * whilst preserving their aspect-ratio.
15
+ *
16
+ * Text and PDF files will also always respect the width and height of the
17
+ * container in which the `limel-file-viewer` is loaded.
18
+ * :::
19
+ *
20
+ * For some file types such as text and images, the component will display a
21
+ * download button and a button to open the file in a new browser tab.
22
+ * This will allow users to preview the file in a fullscreen mode with the
23
+ * browser and take advantage of for example native zooming and panning
24
+ * functionalities.
25
+ * @exampleComponent limel-example-file-viewer
26
+ * @exampleComponent limel-example-file-viewer-office
27
+ * @exampleComponent limel-example-file-viewer-filename
28
+ * @exampleComponent limel-example-file-viewer-inbuilt-actions
29
+ * @exampleComponent limel-example-file-viewer-custom-actions
30
+ * @exampleComponent limel-example-file-viewer-with-picker
31
+ * @private
32
+ */
33
+ export class FileViewer {
34
+ constructor() {
35
+ this.renderPdf = () => {
36
+ return [
37
+ h("div", { class: "action-menu-for-pdf-files" }, this.renderActionMenu()),
38
+ h("object", { data: this.url, type: "application/pdf" }),
39
+ ];
40
+ };
41
+ this.renderImage = () => {
42
+ return [this.renderButtons(), h("img", { src: this.url, alt: this.alt })];
43
+ };
44
+ this.renderVideo = () => {
45
+ return (h("video", { controls: true }, h("source", { src: this.url })));
46
+ };
47
+ this.renderAudio = () => {
48
+ return (h("audio", { controls: true }, h("source", { src: this.url })));
49
+ };
50
+ this.renderText = () => {
51
+ return [
52
+ this.renderButtons(),
53
+ h("object", { data: this.url, type: "text/plain" }),
54
+ ];
55
+ };
56
+ this.renderOffice = () => {
57
+ return [
58
+ h("div", { class: "action-menu-for-office-files" }, this.renderActionMenu()),
59
+ h("iframe", { src: this.getOfficeViewerUrl() + this.url + '&embedded=true', frameborder: "0" }),
60
+ ];
61
+ };
62
+ this.isOfficeFileAccessibleViaURL = () => {
63
+ return (this.fileType === 'office' &&
64
+ !(this.url.startsWith('http://') || this.url.startsWith('https://')));
65
+ };
66
+ this.getOfficeViewerUrl = () => {
67
+ const officeViewers = {
68
+ 'microsoft-office': 'https://view.officeapps.live.com/op/embed.aspx?src=',
69
+ 'google-drive': 'https://docs.google.com/gview?url=',
70
+ };
71
+ return officeViewers[this.officeViewer];
72
+ };
73
+ this.renderNoFileSupportMessage = () => {
74
+ return (h("div", { class: "no-support" }, h("limel-icon", { class: "icon--warning", name: "brake_warning", size: "large", role: "presentation" }), h("p", null, this.getTranslation('message.unsupported-filetype')), this.renderDownloadButton()));
75
+ };
76
+ this.renderButtons = () => {
77
+ return (h("div", { class: "buttons" }, this.renderActionMenu(), this.renderToggleFullscreenButton(), this.renderDownloadButton(), this.renderOpenInNewTabButton()));
78
+ };
79
+ this.renderToggleFullscreenButton = () => {
80
+ if (!this.allowFullscreen || !this.fullscreen.isSupported()) {
81
+ return;
82
+ }
83
+ const icon = this.isFullscreen ? 'multiply' : 'fit_to_width';
84
+ // eslint-disable-next-line multiline-ternary
85
+ const label = this.isFullscreen
86
+ ? // eslint-disable-next-line multiline-ternary
87
+ this.getTranslation('exit-fullscreen')
88
+ : this.getTranslation('open-in-fullscreen');
89
+ return [
90
+ h("button", { class: "button--toggle-fullscreen", id: "tooltip-toggle-fullscreen", role: "button", onClick: this.handleToggleFullscreen }, h("limel-icon", { name: icon }), h("limel-tooltip", { label: label, elementId: "tooltip-toggle-fullscreen", openDirection: "left" })),
91
+ ];
92
+ };
93
+ this.renderDownloadButton = () => {
94
+ if (!this.allowDownload || this.isFullscreen) {
95
+ return;
96
+ }
97
+ return (h("a", { class: "button--download", id: "tooltip-download", role: "button", download: this.filename ? this.filename : '', href: this.url, target: "_blank" }, h("limel-icon", { name: "download_2" }), h("limel-tooltip", { label: this.getTranslation('download'), elementId: "tooltip-download", openDirection: "left" })));
98
+ };
99
+ this.renderOpenInNewTabButton = () => {
100
+ if (!this.allowOpenInNewTab || this.isFullscreen) {
101
+ return;
102
+ }
103
+ return (h("a", { class: "button--new-tab", id: "tooltip-new-tab", role: "button", href: this.url, target: "_blank", rel: "noopener noreferrer" }, h("limel-icon", { name: "external_link" }), h("limel-tooltip", { label: this.getTranslation('open-in-new-tab'), elementId: "tooltip-new-tab", openDirection: "left" })));
104
+ };
105
+ this.renderActionMenu = () => {
106
+ if (!this.actions || this.isFullscreen) {
107
+ return;
108
+ }
109
+ return (h("limel-menu", { class: "action-menu", items: this.actions, onSelect: this.emitOnAction, "open-direction": "left" }, h("button", { class: "button--action", id: "tooltip-more", role: "button", slot: "trigger" }, h("limel-icon", { name: "menu_2" }), h("limel-tooltip", { label: this.getTranslation('more-actions'), elementId: "tooltip-more", openDirection: "left" }))));
110
+ };
111
+ this.handleToggleFullscreen = () => {
112
+ if (this.fullscreen.isSupported()) {
113
+ this.fullscreen.toggle();
114
+ this.isFullscreen = !this.isFullscreen;
115
+ }
116
+ };
117
+ this.emitOnAction = (event) => {
118
+ event.stopPropagation();
119
+ this.action.emit(event.detail);
120
+ };
121
+ this.url = undefined;
122
+ this.filename = undefined;
123
+ this.alt = undefined;
124
+ this.allowFullscreen = false;
125
+ this.allowOpenInNewTab = false;
126
+ this.allowDownload = false;
127
+ this.language = 'en';
128
+ this.officeViewer = 'microsoft-office';
129
+ this.actions = undefined;
130
+ this.isFullscreen = false;
131
+ this.fileType = undefined;
132
+ this.fullscreen = new Fullscreen(this.HostElement);
133
+ this.fileType = detectExtension(this.filename, this.url);
134
+ }
135
+ render() {
136
+ if (!this.isOfficeFileAccessibleViaURL) {
137
+ return this.renderNoFileSupportMessage();
138
+ }
139
+ return this.renderFileViewer();
140
+ }
141
+ watchUrl(newUrl, oldUrl) {
142
+ if (newUrl === oldUrl) {
143
+ return;
144
+ }
145
+ this.fileType = detectExtension(this.filename, this.url);
146
+ }
147
+ renderFileViewer() {
148
+ const fileViewerFunctions = {
149
+ pdf: this.renderPdf,
150
+ image: this.renderImage,
151
+ video: this.renderVideo,
152
+ audio: this.renderAudio,
153
+ text: this.renderText,
154
+ office: this.renderOffice,
155
+ };
156
+ const fileViewerFunction = fileViewerFunctions[this.fileType] ||
157
+ this.renderNoFileSupportMessage;
158
+ return fileViewerFunction();
159
+ }
160
+ getTranslation(key) {
161
+ return translate.get(`file-viewer.${key}`, this.language);
162
+ }
163
+ static get is() { return "limel-file-viewer"; }
164
+ static get encapsulation() { return "shadow"; }
165
+ static get originalStyleUrls() {
166
+ return {
167
+ "$": ["file-viewer.scss"]
168
+ };
169
+ }
170
+ static get styleUrls() {
171
+ return {
172
+ "$": ["file-viewer.css"]
173
+ };
174
+ }
175
+ static get properties() {
176
+ return {
177
+ "url": {
178
+ "type": "string",
179
+ "mutable": false,
180
+ "complexType": {
181
+ "original": "string",
182
+ "resolved": "string",
183
+ "references": {}
184
+ },
185
+ "required": false,
186
+ "optional": false,
187
+ "docs": {
188
+ "tags": [],
189
+ "text": "Link to the file"
190
+ },
191
+ "attribute": "url",
192
+ "reflect": true
193
+ },
194
+ "filename": {
195
+ "type": "string",
196
+ "mutable": false,
197
+ "complexType": {
198
+ "original": "string",
199
+ "resolved": "string",
200
+ "references": {}
201
+ },
202
+ "required": false,
203
+ "optional": true,
204
+ "docs": {
205
+ "tags": [],
206
+ "text": "The name of the file that must also contains its extension.\nThis overrides the filename that the `url` ends with.\nUseful when the `url` does not contain the filename.\nWhen specified, the `filename` will be used as filename of\nthe downloaded file."
207
+ },
208
+ "attribute": "filename",
209
+ "reflect": true
210
+ },
211
+ "alt": {
212
+ "type": "string",
213
+ "mutable": false,
214
+ "complexType": {
215
+ "original": "string",
216
+ "resolved": "string",
217
+ "references": {}
218
+ },
219
+ "required": false,
220
+ "optional": true,
221
+ "docs": {
222
+ "tags": [],
223
+ "text": "An optional alternative text, mainly for assistive technologies and screen readers.\nIt is used for only image files, as an `alt` attribute.\nShould optimally hold a description of the image,\nwhich is also displayed on the page if the image can't be loaded for some reason."
224
+ },
225
+ "attribute": "alt",
226
+ "reflect": true
227
+ },
228
+ "allowFullscreen": {
229
+ "type": "boolean",
230
+ "mutable": false,
231
+ "complexType": {
232
+ "original": "boolean",
233
+ "resolved": "boolean",
234
+ "references": {}
235
+ },
236
+ "required": false,
237
+ "optional": true,
238
+ "docs": {
239
+ "tags": [],
240
+ "text": "Displays a button that allows the user to view the file\nin fullscreen mode.\nNot displayed for office files!"
241
+ },
242
+ "attribute": "allow-fullscreen",
243
+ "reflect": true,
244
+ "defaultValue": "false"
245
+ },
246
+ "allowOpenInNewTab": {
247
+ "type": "boolean",
248
+ "mutable": false,
249
+ "complexType": {
250
+ "original": "boolean",
251
+ "resolved": "boolean",
252
+ "references": {}
253
+ },
254
+ "required": false,
255
+ "optional": true,
256
+ "docs": {
257
+ "tags": [],
258
+ "text": "Displays a button that allows the user to open the file\nin a new browser tab.\nNot displayed for office files!"
259
+ },
260
+ "attribute": "allow-open-in-new-tab",
261
+ "reflect": true,
262
+ "defaultValue": "false"
263
+ },
264
+ "allowDownload": {
265
+ "type": "boolean",
266
+ "mutable": false,
267
+ "complexType": {
268
+ "original": "boolean",
269
+ "resolved": "boolean",
270
+ "references": {}
271
+ },
272
+ "required": false,
273
+ "optional": true,
274
+ "docs": {
275
+ "tags": [],
276
+ "text": "Displays a button that allows the user to download the file.\nNote that due to the browser's security policies,\nthe file should be hosted on the same domain\nfor the download button to work properly.\nNot displayed for office files!"
277
+ },
278
+ "attribute": "allow-download",
279
+ "reflect": true,
280
+ "defaultValue": "false"
281
+ },
282
+ "language": {
283
+ "type": "any",
284
+ "mutable": false,
285
+ "complexType": {
286
+ "original": "Languages",
287
+ "resolved": "Languages",
288
+ "references": {
289
+ "Languages": {
290
+ "location": "import",
291
+ "path": "@limetech/lime-elements"
292
+ }
293
+ }
294
+ },
295
+ "required": false,
296
+ "optional": false,
297
+ "docs": {
298
+ "tags": [],
299
+ "text": "Defines the localization for translations."
300
+ },
301
+ "attribute": "language",
302
+ "reflect": false,
303
+ "defaultValue": "'en'"
304
+ },
305
+ "officeViewer": {
306
+ "type": "string",
307
+ "mutable": false,
308
+ "complexType": {
309
+ "original": "OfficeViewer",
310
+ "resolved": "\"google-drive\" | \"microsoft-office\"",
311
+ "references": {
312
+ "OfficeViewer": {
313
+ "location": "import",
314
+ "path": "./file-viewer.types"
315
+ }
316
+ }
317
+ },
318
+ "required": false,
319
+ "optional": false,
320
+ "docs": {
321
+ "tags": [],
322
+ "text": "Defines the third-party viewer that should be used to render\nthe content of office files, such as word processing documents,\npresentations, or spreadsheets."
323
+ },
324
+ "attribute": "office-viewer",
325
+ "reflect": true,
326
+ "defaultValue": "'microsoft-office'"
327
+ },
328
+ "actions": {
329
+ "type": "unknown",
330
+ "mutable": false,
331
+ "complexType": {
332
+ "original": "ListItem[]",
333
+ "resolved": "ListItem[]",
334
+ "references": {
335
+ "ListItem": {
336
+ "location": "import",
337
+ "path": "@limetech/lime-elements"
338
+ }
339
+ }
340
+ },
341
+ "required": false,
342
+ "optional": false,
343
+ "docs": {
344
+ "tags": [],
345
+ "text": "An array of custom actions that can be displayed\nas an action menu on the file which is being displayed."
346
+ }
347
+ }
348
+ };
349
+ }
350
+ static get states() {
351
+ return {
352
+ "isFullscreen": {},
353
+ "fileType": {}
354
+ };
355
+ }
356
+ static get events() {
357
+ return [{
358
+ "method": "action",
359
+ "name": "action",
360
+ "bubbles": true,
361
+ "cancelable": true,
362
+ "composed": true,
363
+ "docs": {
364
+ "tags": [],
365
+ "text": "Emitted when a custom action is selected from the action menu."
366
+ },
367
+ "complexType": {
368
+ "original": "ListItem",
369
+ "resolved": "ListItem",
370
+ "references": {
371
+ "ListItem": {
372
+ "location": "import",
373
+ "path": "@limetech/lime-elements"
374
+ }
375
+ }
376
+ }
377
+ }];
378
+ }
379
+ static get elementRef() { return "HostElement"; }
380
+ static get watchers() {
381
+ return [{
382
+ "propName": "url",
383
+ "methodName": "watchUrl"
384
+ }];
385
+ }
386
+ }
387
+ //# sourceMappingURL=file-viewer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-viewer.js","sourceRoot":"","sources":["../../../src/components/file-viewer/file-viewer.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,OAAO,EACP,CAAC,EACD,IAAI,EACJ,KAAK,EACL,KAAK,EAEL,KAAK,GACR,MAAM,eAAe,CAAC;AAEvB,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAOH,MAAM,OAAO,UAAU;EA0FnB;IAsCQ,cAAS,GAAG,GAAG,EAAE;MACrB,OAAO;QACH,WAAK,KAAK,EAAC,2BAA2B,IACjC,IAAI,CAAC,gBAAgB,EAAE,CACtB;QACN,cA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Prop,\n State,\n Event,\n EventEmitter,\n Watch,\n} from '@stencil/core';\nimport { Languages, ListItem } from '@limetech/lime-elements';\nimport translate from '../../global/translations';\nimport { detectExtension } from './extension-mapping';\nimport { Fullscreen } from './fullscreen';\nimport { FileType, OfficeViewer } from './file-viewer.types';\n\n/**\n * This is a smart component that automatically detects\n * the most common file types such as image, audio, video, and text,\n * and properly displays them in the browser.\n * The component is also capable to render the most common office files.\n *\n * :::note\n * Image files will always be contained in their containers, which means\n * they automatically increase or decrease in size to fill their containing box\n * whilst preserving their aspect-ratio.\n *\n * Text and PDF files will also always respect the width and height of the\n * container in which the `limel-file-viewer` is loaded.\n * :::\n *\n * For some file types such as text and images, the component will display a\n * download button and a button to open the file in a new browser tab.\n * This will allow users to preview the file in a fullscreen mode with the\n * browser and take advantage of for example native zooming and panning\n * functionalities.\n * @exampleComponent limel-example-file-viewer\n * @exampleComponent limel-example-file-viewer-office\n * @exampleComponent limel-example-file-viewer-filename\n * @exampleComponent limel-example-file-viewer-inbuilt-actions\n * @exampleComponent limel-example-file-viewer-custom-actions\n * @exampleComponent limel-example-file-viewer-with-picker\n * @private\n */\n\n@Component({\n tag: 'limel-file-viewer',\n shadow: true,\n styleUrl: 'file-viewer.scss',\n})\nexport class FileViewer {\n /**\n * Link to the file\n */\n @Prop({ reflect: true })\n public url: string;\n\n /**\n * The name of the file that must also contains its extension.\n * This overrides the filename that the `url` ends with.\n * Useful when the `url` does not contain the filename.\n * When specified, the `filename` will be used as filename of\n * the downloaded file.\n */\n @Prop({ reflect: true })\n public filename?: string;\n\n /**\n * An optional alternative text, mainly for assistive technologies and screen readers.\n * It is used for only image files, as an `alt` attribute.\n * Should optimally hold a description of the image,\n * which is also displayed on the page if the image can't be loaded for some reason.\n */\n @Prop({ reflect: true })\n public alt?: string;\n\n /**\n * Displays a button that allows the user to view the file\n * in fullscreen mode.\n * Not displayed for office files!\n */\n @Prop({ reflect: true })\n public allowFullscreen?: boolean = false;\n\n /**\n * Displays a button that allows the user to open the file\n * in a new browser tab.\n * Not displayed for office files!\n */\n @Prop({ reflect: true })\n public allowOpenInNewTab?: boolean = false;\n\n /**\n * Displays a button that allows the user to download the file.\n * Note that due to the browser's security policies,\n * the file should be hosted on the same domain\n * for the download button to work properly.\n * Not displayed for office files!\n */\n @Prop({ reflect: true })\n public allowDownload?: boolean = false;\n\n /**\n * Defines the localization for translations.\n */\n @Prop()\n public language: Languages = 'en';\n\n /**\n * Defines the third-party viewer that should be used to render\n * the content of office files, such as word processing documents,\n * presentations, or spreadsheets.\n */\n @Prop({ reflect: true })\n public officeViewer: OfficeViewer = 'microsoft-office';\n\n /**\n * An array of custom actions that can be displayed\n * as an action menu on the file which is being displayed.\n */\n @Prop()\n public actions: ListItem[];\n\n /**\n * Emitted when a custom action is selected from the action menu.\n */\n @Event()\n public action: EventEmitter<ListItem>;\n\n @Element()\n public HostElement: HTMLLimelFileViewerElement;\n\n private fullscreen: Fullscreen;\n\n @State()\n private isFullscreen: boolean = false;\n\n @State()\n public fileType: FileType;\n\n constructor() {\n this.fullscreen = new Fullscreen(this.HostElement);\n this.fileType = detectExtension(this.filename, this.url);\n }\n\n public render() {\n if (!this.isOfficeFileAccessibleViaURL) {\n return this.renderNoFileSupportMessage();\n }\n\n return this.renderFileViewer();\n }\n\n @Watch('url')\n protected watchUrl(newUrl: string, oldUrl: string) {\n if (newUrl === oldUrl) {\n return;\n }\n\n this.fileType = detectExtension(this.filename, this.url);\n }\n\n private renderFileViewer() {\n const fileViewerFunctions = {\n pdf: this.renderPdf,\n image: this.renderImage,\n video: this.renderVideo,\n audio: this.renderAudio,\n text: this.renderText,\n office: this.renderOffice,\n };\n const fileViewerFunction =\n fileViewerFunctions[this.fileType] ||\n this.renderNoFileSupportMessage;\n\n return fileViewerFunction();\n }\n\n private renderPdf = () => {\n return [\n <div class=\"action-menu-for-pdf-files\">\n {this.renderActionMenu()}\n </div>,\n <object data={this.url} type=\"application/pdf\" />,\n ];\n };\n\n private renderImage = () => {\n return [this.renderButtons(), <img src={this.url} alt={this.alt} />];\n };\n\n private renderVideo = () => {\n return (\n <video controls>\n <source src={this.url} />\n </video>\n );\n };\n\n private renderAudio = () => {\n return (\n <audio controls>\n <source src={this.url} />\n </audio>\n );\n };\n\n private renderText = () => {\n return [\n this.renderButtons(),\n <object data={this.url} type=\"text/plain\" />,\n ];\n };\n\n private renderOffice = () => {\n return [\n <div class=\"action-menu-for-office-files\">\n {this.renderActionMenu()}\n </div>,\n <iframe\n src={this.getOfficeViewerUrl() + this.url + '&embedded=true'}\n frameborder=\"0\"\n />,\n ];\n };\n\n private isOfficeFileAccessibleViaURL = () => {\n return (\n this.fileType === 'office' &&\n !(this.url.startsWith('http://') || this.url.startsWith('https://'))\n );\n };\n\n private getOfficeViewerUrl = () => {\n const officeViewers = {\n 'microsoft-office':\n 'https://view.officeapps.live.com/op/embed.aspx?src=',\n 'google-drive': 'https://docs.google.com/gview?url=',\n };\n\n return officeViewers[this.officeViewer];\n };\n\n private renderNoFileSupportMessage = () => {\n return (\n <div class=\"no-support\">\n <limel-icon\n class=\"icon--warning\"\n name=\"brake_warning\"\n size=\"large\"\n role=\"presentation\"\n />\n <p>{this.getTranslation('message.unsupported-filetype')}</p>\n {this.renderDownloadButton()}\n </div>\n );\n };\n\n private renderButtons = () => {\n return (\n <div class=\"buttons\">\n {this.renderActionMenu()}\n {this.renderToggleFullscreenButton()}\n {this.renderDownloadButton()}\n {this.renderOpenInNewTabButton()}\n </div>\n );\n };\n\n private renderToggleFullscreenButton = () => {\n if (!this.allowFullscreen || !this.fullscreen.isSupported()) {\n return;\n }\n\n const icon = this.isFullscreen ? 'multiply' : 'fit_to_width';\n // eslint-disable-next-line multiline-ternary\n const label = this.isFullscreen\n ? // eslint-disable-next-line multiline-ternary\n this.getTranslation('exit-fullscreen')\n : this.getTranslation('open-in-fullscreen');\n\n return [\n <button\n class=\"button--toggle-fullscreen\"\n id=\"tooltip-toggle-fullscreen\"\n role=\"button\"\n onClick={this.handleToggleFullscreen}\n >\n <limel-icon name={icon} />\n <limel-tooltip\n label={label}\n elementId=\"tooltip-toggle-fullscreen\"\n openDirection=\"left\"\n />\n </button>,\n ];\n };\n\n private renderDownloadButton = () => {\n if (!this.allowDownload || this.isFullscreen) {\n return;\n }\n\n return (\n <a\n class=\"button--download\"\n id=\"tooltip-download\"\n role=\"button\"\n download={this.filename ? this.filename : ''}\n href={this.url}\n target=\"_blank\"\n >\n <limel-icon name=\"download_2\" />\n <limel-tooltip\n label={this.getTranslation('download')}\n elementId=\"tooltip-download\"\n openDirection=\"left\"\n />\n </a>\n );\n };\n\n private renderOpenInNewTabButton = () => {\n if (!this.allowOpenInNewTab || this.isFullscreen) {\n return;\n }\n\n return (\n <a\n class=\"button--new-tab\"\n id=\"tooltip-new-tab\"\n role=\"button\"\n href={this.url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <limel-icon name=\"external_link\" />\n <limel-tooltip\n label={this.getTranslation('open-in-new-tab')}\n elementId=\"tooltip-new-tab\"\n openDirection=\"left\"\n />\n </a>\n );\n };\n\n private renderActionMenu = () => {\n if (!this.actions || this.isFullscreen) {\n return;\n }\n\n return (\n <limel-menu\n class=\"action-menu\"\n items={this.actions}\n onSelect={this.emitOnAction}\n open-direction=\"left\"\n >\n <button\n class=\"button--action\"\n id=\"tooltip-more\"\n role=\"button\"\n slot=\"trigger\"\n >\n <limel-icon name=\"menu_2\" />\n <limel-tooltip\n label={this.getTranslation('more-actions')}\n elementId=\"tooltip-more\"\n openDirection=\"left\"\n />\n </button>\n </limel-menu>\n );\n };\n\n private handleToggleFullscreen = () => {\n if (this.fullscreen.isSupported()) {\n this.fullscreen.toggle();\n this.isFullscreen = !this.isFullscreen;\n }\n };\n\n private emitOnAction = (event: CustomEvent<ListItem>) => {\n event.stopPropagation();\n this.action.emit(event.detail);\n };\n\n private getTranslation(key: string) {\n return translate.get(`file-viewer.${key}`, this.language);\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=file-viewer.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-viewer.types.js","sourceRoot":"","sources":["../../../src/components/file-viewer/file-viewer.types.ts"],"names":[],"mappings":"","sourcesContent":["export type FileType =\n | 'pdf'\n | 'image'\n | 'video'\n | 'audio'\n | 'text'\n | 'office'\n | 'unknown';\n\nexport type OfficeViewer = 'microsoft-office' | 'google-drive';\n"]}
@@ -0,0 +1,43 @@
1
+ export class Fullscreen {
2
+ constructor(element) {
3
+ this.requestFullscreen = () => {
4
+ if (this.enter) {
5
+ this.enter();
6
+ }
7
+ };
8
+ this.exitFullscreen = () => {
9
+ if (this.exit) {
10
+ this.exit.bind(window.document)();
11
+ }
12
+ };
13
+ this.toggle = () => {
14
+ const doc = window.document;
15
+ const isFullscreen = doc.fullscreenElement ||
16
+ doc.mozFullScreenElement ||
17
+ doc.webkitFullscreenElement ||
18
+ doc.msFullscreenElement;
19
+ if (isFullscreen) {
20
+ this.exitFullscreen();
21
+ }
22
+ else {
23
+ this.requestFullscreen();
24
+ }
25
+ };
26
+ this.enter =
27
+ element.requestFullscreen ||
28
+ element.msRequestFullscreen ||
29
+ element.mozRequestFullScreen ||
30
+ element.webkitRequestFullscreen;
31
+ this.enter = this.enter.bind(element);
32
+ const doc = window.document;
33
+ this.exit =
34
+ doc.exitFullscreen ||
35
+ doc.msExitFullscreen ||
36
+ doc.mozCancelFullScreen ||
37
+ doc.webkitExitFullscreen;
38
+ }
39
+ isSupported() {
40
+ return !!this.requestFullscreen;
41
+ }
42
+ }
43
+ //# sourceMappingURL=fullscreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fullscreen.js","sourceRoot":"","sources":["../../../src/components/file-viewer/fullscreen.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,UAAU;EAInB,YAAY,OAAY;IAejB,sBAAiB,GAAG,GAAG,EAAE;MAC5B,IAAI,IAAI,CAAC,KAAK,EAAE;QACZ,IAAI,CAAC,KAAK,EAAE,CAAC;OAChB;IACL,CAAC,CAAC;IAEK,mBAAc,GAAG,GAAG,EAAE;MACzB,IAAI,IAAI,CAAC,IAAI,EAAE;QACX,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;OACrC;IACL,CAAC,CAAC;IAEK,WAAM,GAAG,GAAG,EAAE;MACjB,MAAM,GAAG,GAAQ,MAAM,CAAC,QAAQ,CAAC;MACjC,MAAM,YAAY,GACd,GAAG,CAAC,iBAAiB;QACrB,GAAG,CAAC,oBAAoB;QACxB,GAAG,CAAC,uBAAuB;QAC3B,GAAG,CAAC,mBAAmB,CAAC;MAE5B,IAAI,YAAY,EAAE;QACd,IAAI,CAAC,cAAc,EAAE,CAAC;OACzB;WAAM;QACH,IAAI,CAAC,iBAAiB,EAAE,CAAC;OAC5B;IACL,CAAC,CAAC;IAvCE,IAAI,CAAC,KAAK;MACN,OAAO,CAAC,iBAAiB;QACzB,OAAO,CAAC,mBAAmB;QAC3B,OAAO,CAAC,oBAAoB;QAC5B,OAAO,CAAC,uBAAuB,CAAC;IACpC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACtC,MAAM,GAAG,GAAQ,MAAM,CAAC,QAAQ,CAAC;IACjC,IAAI,CAAC,IAAI;MACL,GAAG,CAAC,cAAc;QAClB,GAAG,CAAC,gBAAgB;QACpB,GAAG,CAAC,mBAAmB;QACvB,GAAG,CAAC,oBAAoB,CAAC;EACjC,CAAC;EA6BM,WAAW;IACd,OAAO,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC;EACpC,CAAC;CACJ","sourcesContent":["export class Fullscreen {\n private enter: () => void;\n private exit: () => void;\n\n constructor(element: any) {\n this.enter =\n element.requestFullscreen ||\n element.msRequestFullscreen ||\n element.mozRequestFullScreen ||\n element.webkitRequestFullscreen;\n this.enter = this.enter.bind(element);\n const doc: any = window.document;\n this.exit =\n doc.exitFullscreen ||\n doc.msExitFullscreen ||\n doc.mozCancelFullScreen ||\n doc.webkitExitFullscreen;\n }\n\n public requestFullscreen = () => {\n if (this.enter) {\n this.enter();\n }\n };\n\n public exitFullscreen = () => {\n if (this.exit) {\n this.exit.bind(window.document)();\n }\n };\n\n public toggle = () => {\n const doc: any = window.document;\n const isFullscreen =\n doc.fullscreenElement ||\n doc.mozFullScreenElement ||\n doc.webkitFullscreenElement ||\n doc.msFullscreenElement;\n\n if (isFullscreen) {\n this.exitFullscreen();\n } else {\n this.requestFullscreen();\n }\n };\n\n public isSupported(): boolean {\n return !!this.requestFullscreen;\n }\n}\n"]}
@@ -1,5 +1,6 @@
1
1
  import { h } from '@stencil/core';
2
2
  import { makeEnterClickable, removeEnterClickable, } from 'src/util/make-enter-clickable';
3
+ import { createRandomString } from '../../util/random-string';
3
4
  /**
4
5
  * @exampleComponent limel-example-icon-button-basic
5
6
  * @exampleComponent limel-example-icon-button-disabled
@@ -34,10 +35,16 @@ export class IconButton {
34
35
  }
35
36
  render() {
36
37
  const buttonAttributes = {};
38
+ const tooltipId = createRandomString();
37
39
  if (this.host.hasAttribute('tabindex')) {
38
40
  buttonAttributes.tabindex = this.host.getAttribute('tabindex');
39
41
  }
40
- return (h("button", Object.assign({ disabled: this.disabled, "aria-label": this.label, title: this.label }, buttonAttributes), h("limel-icon", { name: this.icon, badge: true })));
42
+ return (h("button", Object.assign({ disabled: this.disabled, id: tooltipId }, buttonAttributes), h("limel-icon", { name: this.icon, badge: true }), this.renderTooltip(tooltipId)));
43
+ }
44
+ renderTooltip(tooltipId) {
45
+ if (this.label) {
46
+ return h("limel-tooltip", { elementId: tooltipId, label: this.label });
47
+ }
41
48
  }
42
49
  static get is() { return "limel-icon-button"; }
43
50
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"icon-button.js","sourceRoot":"","sources":["../../../src/components/icon-button/icon-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EA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removeEnterClickable,\n} from 'src/util/make-enter-clickable';\n\n/**\n * @exampleComponent limel-example-icon-button-basic\n * @exampleComponent limel-example-icon-button-disabled\n * @exampleComponent limel-example-icon-button-elevated\n * @exampleComponent limel-example-icon-button-toggle-state\n * @exampleComponent limel-example-icon-button-composite\n */\n@Component({\n tag: 'limel-icon-button',\n shadow: true,\n styleUrl: 'icon-button.scss',\n})\nexport class IconButton {\n /**\n * The icon to display.\n */\n @Prop({ reflect: true })\n public icon: string;\n\n /**\n * Set to `true` to give the button our standard \"elevated\" look, lifting\n * it off the flat layout.\n */\n @Prop({ reflect: true })\n public elevated = false;\n\n /**\n * The text to show to screenreaders and other assistive tech.\n */\n @Prop({ reflect: true })\n public label: string;\n\n /**\n * Set to `true` to disable the button.\n */\n @Prop({ reflect: true })\n public disabled = false;\n\n @Element()\n private host: HTMLLimelIconButtonElement;\n\n public connectedCallback() {\n this.initialize();\n }\n\n public componentWillLoad() {\n makeEnterClickable(this.host);\n }\n\n public disconnectedCallback() {\n removeEnterClickable(this.host);\n }\n\n public componentDidLoad() {\n this.initialize();\n }\n\n private initialize() {\n const element = this.host.shadowRoot.querySelector('.mdc-icon-button');\n if (!element) {\n return;\n }\n }\n\n public render() {\n const buttonAttributes: { tabindex?: string } = {};\n if (this.host.hasAttribute('tabindex')) {\n buttonAttributes.tabindex = this.host.getAttribute('tabindex');\n }\n\n return (\n <button\n disabled={this.disabled}\n aria-label={this.label}\n title={this.label}\n {...buttonAttributes}\n >\n <limel-icon name={this.icon} badge={true} />\n </button>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"icon-button.js","sourceRoot":"","sources":["../../../src/components/icon-button/icon-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EACH,kBAAkB,EAClB,oBAAoB,GACvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,M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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, Element, h, Prop } from '@stencil/core';\nimport {\n makeEnterClickable,\n removeEnterClickable,\n} from 'src/util/make-enter-clickable';\nimport { createRandomString } from '../../util/random-string';\n\n/**\n * @exampleComponent limel-example-icon-button-basic\n * @exampleComponent limel-example-icon-button-disabled\n * @exampleComponent limel-example-icon-button-elevated\n * @exampleComponent limel-example-icon-button-toggle-state\n * @exampleComponent limel-example-icon-button-composite\n */\n@Component({\n tag: 'limel-icon-button',\n shadow: true,\n styleUrl: 'icon-button.scss',\n})\nexport class IconButton {\n /**\n * The icon to display.\n */\n @Prop({ reflect: true })\n public icon: string;\n\n /**\n * Set to `true` to give the button our standard \"elevated\" look, lifting\n * it off the flat layout.\n */\n @Prop({ reflect: true })\n public elevated = false;\n\n /**\n * The text to show to screenreaders and other assistive tech.\n */\n @Prop({ reflect: true })\n public label: string;\n\n /**\n * Set to `true` to disable the button.\n */\n @Prop({ reflect: true })\n public disabled = false;\n\n @Element()\n private host: HTMLLimelIconButtonElement;\n\n public connectedCallback() {\n this.initialize();\n }\n\n public componentWillLoad() {\n makeEnterClickable(this.host);\n }\n\n public disconnectedCallback() {\n removeEnterClickable(this.host);\n }\n\n public componentDidLoad() {\n this.initialize();\n }\n\n private initialize() {\n const element = this.host.shadowRoot.querySelector('.mdc-icon-button');\n if (!element) {\n return;\n }\n }\n\n public render() {\n const buttonAttributes: { tabindex?: string } = {};\n const tooltipId = createRandomString();\n\n if (this.host.hasAttribute('tabindex')) {\n buttonAttributes.tabindex = this.host.getAttribute('tabindex');\n }\n\n return (\n <button\n disabled={this.disabled}\n id={tooltipId}\n {...buttonAttributes}\n >\n <limel-icon name={this.icon} badge={true} />\n {this.renderTooltip(tooltipId)}\n </button>\n );\n }\n private renderTooltip(tooltipId) {\n if (this.label) {\n return <limel-tooltip elementId={tooltipId} label={this.label} />;\n }\n }\n}\n"]}
@@ -10,5 +10,11 @@ export default {
10
10
  'date-picker.year.heading': 'År',
11
11
  'chip-set.clear-all': 'Ryd alle',
12
12
  'file.drag-and-drop-tips': 'Træk og slip filen her, eller klik for at gennemse.',
13
+ 'file-viewer.message.unsupported-filetype': 'Denne fil kan ikke vises!',
14
+ 'file-viewer.download': 'Hent',
15
+ 'file-viewer.exit-fullscreen': 'Afslut fuldskærm',
16
+ 'file-viewer.open-in-fullscreen': 'Åbn i fuld skærm',
17
+ 'file-viewer.open-in-new-tab': 'Åbn i en ny fane',
18
+ 'file-viewer.more-actions': 'Mere…',
13
19
  };
14
20
  //# sourceMappingURL=da.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"da.js","sourceRoot":"","sources":["../../src/translations/da.ts"],"names":[],"mappings":"AAAA,eAAe;EACX,cAAc,EAAE,QAAQ;EACxB,mBAAmB,EAAE,QAAQ;EAC7B,aAAa,EAAE,KAAK;EACpB,iBAAiB,EAAE,UAAU;EAC7B,iBAAiB,EAAE,UAAU;EAC7B,mBAAmB,EAAE,MAAM;EAC3B,2BAA2B,EAAE,OAAO;EACpC,6BAA6B,EAAE,SAAS;EACxC,0BAA0B,EAAE,IAAI;EAChC,oBAAoB,EAAE,UAAU;EAChC,yBAAyB,EACrB,qDAAqD;CAC5D,CAAC","sourcesContent":["export default {\n 'callout.note': 'Bemærk',\n 'callout.important': 'Vigtig',\n 'callout.tip': 'Tip',\n 'callout.caution': 'Advarsel',\n 'callout.warning': 'Advarsel',\n 'date-picker.today': 'Idag',\n 'date-picker.month.heading': 'Måned',\n 'date-picker.quarter.heading': 'Kvartal',\n 'date-picker.year.heading': 'År',\n 'chip-set.clear-all': 'Ryd alle',\n 'file.drag-and-drop-tips':\n 'Træk og slip filen her, eller klik for at gennemse.',\n};\n"]}
1
+ {"version":3,"file":"da.js","sourceRoot":"","sources":["../../src/translations/da.ts"],"names":[],"mappings":"AAAA,eAAe;EACX,cAAc,EAAE,QAAQ;EACxB,mBAAmB,EAAE,QAAQ;EAC7B,aAAa,EAAE,KAAK;EACpB,iBAAiB,EAAE,UAAU;EAC7B,iBAAiB,EAAE,UAAU;EAC7B,mBAAmB,EAAE,MAAM;EAC3B,2BAA2B,EAAE,OAAO;EACpC,6BAA6B,EAAE,SAAS;EACxC,0BAA0B,EAAE,IAAI;EAChC,oBAAoB,EAAE,UAAU;EAChC,yBAAyB,EACrB,qDAAqD;EACzD,0CAA0C,EAAE,2BAA2B;EACvE,sBAAsB,EAAE,MAAM;EAC9B,6BAA6B,EAAE,kBAAkB;EACjD,gCAAgC,EAAE,kBAAkB;EACpD,6BAA6B,EAAE,kBAAkB;EACjD,0BAA0B,EAAE,OAAO;CACtC,CAAC","sourcesContent":["export default {\n 'callout.note': 'Bemærk',\n 'callout.important': 'Vigtig',\n 'callout.tip': 'Tip',\n 'callout.caution': 'Advarsel',\n 'callout.warning': 'Advarsel',\n 'date-picker.today': 'Idag',\n 'date-picker.month.heading': 'Måned',\n 'date-picker.quarter.heading': 'Kvartal',\n 'date-picker.year.heading': 'År',\n 'chip-set.clear-all': 'Ryd alle',\n 'file.drag-and-drop-tips':\n 'Træk og slip filen her, eller klik for at gennemse.',\n 'file-viewer.message.unsupported-filetype': 'Denne fil kan ikke vises!',\n 'file-viewer.download': 'Hent',\n 'file-viewer.exit-fullscreen': 'Afslut fuldskærm',\n 'file-viewer.open-in-fullscreen': 'Åbn i fuld skærm',\n 'file-viewer.open-in-new-tab': 'Åbn i en ny fane',\n 'file-viewer.more-actions': 'Mere…',\n};\n"]}
@@ -12,5 +12,11 @@ export default {
12
12
  'chip-set.remove-chip': 'Remove chip',
13
13
  'snackbar.dismiss': 'Dismiss',
14
14
  'file.drag-and-drop-tips': 'Drag and drop your file here, or click to browse.',
15
+ 'file-viewer.message.unsupported-filetype': 'Cannot display this file!',
16
+ 'file-viewer.download': 'Download',
17
+ 'file-viewer.exit-fullscreen': 'Exit fullscreen',
18
+ 'file-viewer.open-in-fullscreen': 'Open in fullscreen',
19
+ 'file-viewer.open-in-new-tab': 'Open in a new tab',
20
+ 'file-viewer.more-actions': 'More…',
15
21
  };
16
22
  //# sourceMappingURL=en.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"en.js","sourceRoot":"","sources":["../../src/translations/en.ts"],"names":[],"mappings":"AAAA,eAAe;EACX,cAAc,EAAE,MAAM;EACtB,mBAAmB,EAAE,WAAW;EAChC,aAAa,EAAE,KAAK;EACpB,iBAAiB,EAAE,SAAS;EAC5B,iBAAiB,EAAE,SAAS;EAC5B,mBAAmB,EAAE,OAAO;EAC5B,2BAA2B,EAAE,OAAO;EACpC,6BAA6B,EAAE,SAAS;EACxC,0BAA0B,EAAE,MAAM;EAClC,oBAAoB,EAAE,WAAW;EACjC,sBAAsB,EAAE,aAAa;EACrC,kBAAkB,EAAE,SAAS;EAC7B,yBAAyB,EACrB,mDAAmD;CAC1D,CAAC","sourcesContent":["export default {\n 'callout.note': 'Note',\n 'callout.important': 'Important',\n 'callout.tip': 'Tip',\n 'callout.caution': 'Caution',\n 'callout.warning': 'Warning',\n 'date-picker.today': 'Today',\n 'date-picker.month.heading': 'Month',\n 'date-picker.quarter.heading': 'Quarter',\n 'date-picker.year.heading': 'Year',\n 'chip-set.clear-all': 'Clear all',\n 'chip-set.remove-chip': 'Remove chip',\n 'snackbar.dismiss': 'Dismiss',\n 'file.drag-and-drop-tips':\n 'Drag and drop your file here, or click to browse.',\n};\n"]}
1
+ {"version":3,"file":"en.js","sourceRoot":"","sources":["../../src/translations/en.ts"],"names":[],"mappings":"AAAA,eAAe;EACX,cAAc,EAAE,MAAM;EACtB,mBAAmB,EAAE,WAAW;EAChC,aAAa,EAAE,KAAK;EACpB,iBAAiB,EAAE,SAAS;EAC5B,iBAAiB,EAAE,SAAS;EAC5B,mBAAmB,EAAE,OAAO;EAC5B,2BAA2B,EAAE,OAAO;EACpC,6BAA6B,EAAE,SAAS;EACxC,0BAA0B,EAAE,MAAM;EAClC,oBAAoB,EAAE,WAAW;EACjC,sBAAsB,EAAE,aAAa;EACrC,kBAAkB,EAAE,SAAS;EAC7B,yBAAyB,EACrB,mDAAmD;EACvD,0CAA0C,EAAE,2BAA2B;EACvE,sBAAsB,EAAE,UAAU;EAClC,6BAA6B,EAAE,iBAAiB;EAChD,gCAAgC,EAAE,oBAAoB;EACtD,6BAA6B,EAAE,mBAAmB;EAClD,0BAA0B,EAAE,OAAO;CACtC,CAAC","sourcesContent":["export default {\n 'callout.note': 'Note',\n 'callout.important': 'Important',\n 'callout.tip': 'Tip',\n 'callout.caution': 'Caution',\n 'callout.warning': 'Warning',\n 'date-picker.today': 'Today',\n 'date-picker.month.heading': 'Month',\n 'date-picker.quarter.heading': 'Quarter',\n 'date-picker.year.heading': 'Year',\n 'chip-set.clear-all': 'Clear all',\n 'chip-set.remove-chip': 'Remove chip',\n 'snackbar.dismiss': 'Dismiss',\n 'file.drag-and-drop-tips':\n 'Drag and drop your file here, or click to browse.',\n 'file-viewer.message.unsupported-filetype': 'Cannot display this file!',\n 'file-viewer.download': 'Download',\n 'file-viewer.exit-fullscreen': 'Exit fullscreen',\n 'file-viewer.open-in-fullscreen': 'Open in fullscreen',\n 'file-viewer.open-in-new-tab': 'Open in a new tab',\n 'file-viewer.more-actions': 'More…',\n};\n"]}
@@ -10,5 +10,11 @@ export default {
10
10
  'date-picker.year.heading': 'Vuosi',
11
11
  'chip-set.clear-all': 'Tyhjennä kaikki',
12
12
  'file.drag-and-drop-tips': 'Vedä ja pudota tiedostosi tähän, tai napsauta selataksesi.',
13
+ 'file-viewer.message.unsupported-filetype': 'Tätä tiedostoa ei voi näyttää!',
14
+ 'file-viewer.download': 'Ladata',
15
+ 'file-viewer.exit-fullscreen': 'Poistu koko näytöstä',
16
+ 'file-viewer.open-in-fullscreen': 'Avaa koko näytössä',
17
+ 'file-viewer.open-in-new-tab': 'Avaa uudella välilehdellä',
18
+ 'file-viewer.more-actions': 'Lisää…',
13
19
  };
14
20
  //# sourceMappingURL=fi.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fi.js","sourceRoot":"","sources":["../../src/translations/fi.ts"],"names":[],"mappings":"AAAA,eAAe;EACX,cAAc,EAAE,QAAQ;EACxB,mBAAmB,EAAE,SAAS;EAC9B,aAAa,EAAE,QAAQ;EACvB,iBAAiB,EAAE,UAAU;EAC7B,iBAAiB,EAAE,UAAU;EAC7B,mBAAmB,EAAE,QAAQ;EAC7B,2BAA2B,EAAE,UAAU;EACvC,6BAA6B,EAAE,gBAAgB;EAC/C,0BAA0B,EAAE,OAAO;EACnC,oBAAoB,EAAE,iBAAiB;EACvC,yBAAyB,EACrB,4DAA4D;CACnE,CAAC","sourcesContent":["export default {\n 'callout.note': 'Huomio',\n 'callout.important': 'Tärkeää',\n 'callout.tip': 'Vinkki',\n 'callout.caution': 'Varoitus',\n 'callout.warning': 'Varoitus',\n 'date-picker.today': 'Tänään',\n 'date-picker.month.heading': 'Kuukausi',\n 'date-picker.quarter.heading': 'Vuosineljännes',\n 'date-picker.year.heading': 'Vuosi',\n 'chip-set.clear-all': 'Tyhjennä kaikki',\n 'file.drag-and-drop-tips':\n 'Vedä ja pudota tiedostosi tähän, tai napsauta selataksesi.',\n};\n"]}
1
+ {"version":3,"file":"fi.js","sourceRoot":"","sources":["../../src/translations/fi.ts"],"names":[],"mappings":"AAAA,eAAe;EACX,cAAc,EAAE,QAAQ;EACxB,mBAAmB,EAAE,SAAS;EAC9B,aAAa,EAAE,QAAQ;EACvB,iBAAiB,EAAE,UAAU;EAC7B,iBAAiB,EAAE,UAAU;EAC7B,mBAAmB,EAAE,QAAQ;EAC7B,2BAA2B,EAAE,UAAU;EACvC,6BAA6B,EAAE,gBAAgB;EAC/C,0BAA0B,EAAE,OAAO;EACnC,oBAAoB,EAAE,iBAAiB;EACvC,yBAAyB,EACrB,4DAA4D;EAChE,0CAA0C,EACtC,gCAAgC;EACpC,sBAAsB,EAAE,QAAQ;EAChC,6BAA6B,EAAE,sBAAsB;EACrD,gCAAgC,EAAE,oBAAoB;EACtD,6BAA6B,EAAE,2BAA2B;EAC1D,0BAA0B,EAAE,QAAQ;CACvC,CAAC","sourcesContent":["export default {\n 'callout.note': 'Huomio',\n 'callout.important': 'Tärkeää',\n 'callout.tip': 'Vinkki',\n 'callout.caution': 'Varoitus',\n 'callout.warning': 'Varoitus',\n 'date-picker.today': 'Tänään',\n 'date-picker.month.heading': 'Kuukausi',\n 'date-picker.quarter.heading': 'Vuosineljännes',\n 'date-picker.year.heading': 'Vuosi',\n 'chip-set.clear-all': 'Tyhjennä kaikki',\n 'file.drag-and-drop-tips':\n 'Vedä ja pudota tiedostosi tähän, tai napsauta selataksesi.',\n 'file-viewer.message.unsupported-filetype':\n 'Tätä tiedostoa ei voi näyttää!',\n 'file-viewer.download': 'Ladata',\n 'file-viewer.exit-fullscreen': 'Poistu koko näytöstä',\n 'file-viewer.open-in-fullscreen': 'Avaa koko näytössä',\n 'file-viewer.open-in-new-tab': 'Avaa uudella välilehdellä',\n 'file-viewer.more-actions': 'Lisää…',\n};\n"]}
@@ -10,5 +10,11 @@ export default {
10
10
  'date-picker.year.heading': 'Jaar',
11
11
  'chip-set.clear-all': 'Alles wissen',
12
12
  'file.drag-and-drop-tips': 'Sleep uw bestand en zet het hier neer of klik om te bladeren.',
13
+ 'file-viewer.message.unsupported-filetype': 'Kan dit bestand niet weergeven!',
14
+ 'file-viewer.download': 'Downloaden',
15
+ 'file-viewer.exit-fullscreen': 'Verlaat volledig scherm',
16
+ 'file-viewer.open-in-fullscreen': 'Open in volledig scherm',
17
+ 'file-viewer.open-in-new-tab': 'Openen op een nieuw tabblad',
18
+ 'file-viewer.more-actions': 'Meer…',
13
19
  };
14
20
  //# sourceMappingURL=nl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nl.js","sourceRoot":"","sources":["../../src/translations/nl.ts"],"names":[],"mappings":"AAAA,eAAe;EACX,cAAc,EAAE,WAAW;EAC3B,mBAAmB,EAAE,YAAY;EACjC,aAAa,EAAE,KAAK;EACpB,iBAAiB,EAAE,cAAc;EACjC,iBAAiB,EAAE,cAAc;EACjC,mBAAmB,EAAE,SAAS;EAC9B,2BAA2B,EAAE,OAAO;EACpC,6BAA6B,EAAE,UAAU;EACzC,0BAA0B,EAAE,MAAM;EAClC,oBAAoB,EAAE,cAAc;EACpC,yBAAyB,EACrB,+DAA+D;CACtE,CAAC","sourcesContent":["export default {\n 'callout.note': 'Opmerking',\n 'callout.important': 'Belangrijk',\n 'callout.tip': 'Tip',\n 'callout.caution': 'Waarschuwing',\n 'callout.warning': 'Waarschuwing',\n 'date-picker.today': 'Vandaag',\n 'date-picker.month.heading': 'Maand',\n 'date-picker.quarter.heading': 'Kwartaal',\n 'date-picker.year.heading': 'Jaar',\n 'chip-set.clear-all': 'Alles wissen',\n 'file.drag-and-drop-tips':\n 'Sleep uw bestand en zet het hier neer of klik om te bladeren.',\n};\n"]}
1
+ {"version":3,"file":"nl.js","sourceRoot":"","sources":["../../src/translations/nl.ts"],"names":[],"mappings":"AAAA,eAAe;EACX,cAAc,EAAE,WAAW;EAC3B,mBAAmB,EAAE,YAAY;EACjC,aAAa,EAAE,KAAK;EACpB,iBAAiB,EAAE,cAAc;EACjC,iBAAiB,EAAE,cAAc;EACjC,mBAAmB,EAAE,SAAS;EAC9B,2BAA2B,EAAE,OAAO;EACpC,6BAA6B,EAAE,UAAU;EACzC,0BAA0B,EAAE,MAAM;EAClC,oBAAoB,EAAE,cAAc;EACpC,yBAAyB,EACrB,+DAA+D;EACnE,0CAA0C,EACtC,iCAAiC;EACrC,sBAAsB,EAAE,YAAY;EACpC,6BAA6B,EAAE,yBAAyB;EACxD,gCAAgC,EAAE,yBAAyB;EAC3D,6BAA6B,EAAE,6BAA6B;EAC5D,0BAA0B,EAAE,OAAO;CACtC,CAAC","sourcesContent":["export default {\n 'callout.note': 'Opmerking',\n 'callout.important': 'Belangrijk',\n 'callout.tip': 'Tip',\n 'callout.caution': 'Waarschuwing',\n 'callout.warning': 'Waarschuwing',\n 'date-picker.today': 'Vandaag',\n 'date-picker.month.heading': 'Maand',\n 'date-picker.quarter.heading': 'Kwartaal',\n 'date-picker.year.heading': 'Jaar',\n 'chip-set.clear-all': 'Alles wissen',\n 'file.drag-and-drop-tips':\n 'Sleep uw bestand en zet het hier neer of klik om te bladeren.',\n 'file-viewer.message.unsupported-filetype':\n 'Kan dit bestand niet weergeven!',\n 'file-viewer.download': 'Downloaden',\n 'file-viewer.exit-fullscreen': 'Verlaat volledig scherm',\n 'file-viewer.open-in-fullscreen': 'Open in volledig scherm',\n 'file-viewer.open-in-new-tab': 'Openen op een nieuw tabblad',\n 'file-viewer.more-actions': 'Meer…',\n};\n"]}
@@ -10,5 +10,11 @@ export default {
10
10
  'date-picker.year.heading': 'År',
11
11
  'chip-set.clear-all': 'Fjern alle',
12
12
  'file.drag-and-drop-tips': 'Dra og slipp filen her, eller klikk for å bla gjennom.',
13
+ 'file-viewer.message.unsupported-filetype': 'Kan ikke vise denne filen!',
14
+ 'file-viewer.download': 'Nedlasting',
15
+ 'file-viewer.exit-fullscreen': 'Gå ut av fullskjerm',
16
+ 'file-viewer.open-in-fullscreen': 'Åpne i fullskjerm',
17
+ 'file-viewer.open-in-new-tab': 'Åpne i en ny fane',
18
+ 'file-viewer.more-actions': 'Mer…',
13
19
  };
14
20
  //# sourceMappingURL=no.js.map