wj-elements 0.1.196 → 0.1.197

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 (241) hide show
  1. package/dist/wje-dialog.js +1 -1
  2. package/dist/wje-file-upload.js +1 -2
  3. package/dist/wje-file-upload.js.map +1 -1
  4. package/dist/wje-routerx.js +1 -1
  5. package/dist/wje-routerx.js.map +1 -1
  6. package/package.json +1 -1
  7. package/dist/packages/index.d.ts +0 -107
  8. package/dist/packages/internals/form-associated-element.d.ts +0 -143
  9. package/dist/packages/localize/localize.d.ts +0 -47
  10. package/dist/packages/translations/en-gb.d.ts +0 -18
  11. package/dist/packages/translations/sk-sk.d.ts +0 -13
  12. package/dist/packages/utils/animations.d.ts +0 -2
  13. package/dist/packages/utils/base-path.d.ts +0 -14
  14. package/dist/packages/utils/date.d.ts +0 -2
  15. package/dist/packages/utils/element-utils.d.ts +0 -46
  16. package/dist/packages/utils/event.d.ts +0 -67
  17. package/dist/packages/utils/icon-library.d.ts +0 -3
  18. package/dist/packages/utils/localize.d.ts +0 -4
  19. package/dist/packages/utils/permissions.d.ts +0 -40
  20. package/dist/packages/utils/universal-service.d.ts +0 -18
  21. package/dist/packages/utils/utils.d.ts +0 -1
  22. package/dist/packages/wje-accordion/accordion.d.ts +0 -2
  23. package/dist/packages/wje-accordion/accordion.element.d.ts +0 -72
  24. package/dist/packages/wje-accordion/accordion.test.d.ts +0 -0
  25. package/dist/packages/wje-accordion-item/accordion-item.d.ts +0 -2
  26. package/dist/packages/wje-accordion-item/accordion-item.element.d.ts +0 -40
  27. package/dist/packages/wje-animation/animation.d.ts +0 -2
  28. package/dist/packages/wje-animation/animation.element.d.ts +0 -158
  29. package/dist/packages/wje-animation/animation.test.d.ts +0 -1
  30. package/dist/packages/wje-aside/aside.d.ts +0 -2
  31. package/dist/packages/wje-aside/aside.element.d.ts +0 -31
  32. package/dist/packages/wje-avatar/avatar.d.ts +0 -2
  33. package/dist/packages/wje-avatar/avatar.element.d.ts +0 -76
  34. package/dist/packages/wje-avatar/avatar.test.d.ts +0 -1
  35. package/dist/packages/wje-avatar/service/service.d.ts +0 -40
  36. package/dist/packages/wje-badge/badge.d.ts +0 -2
  37. package/dist/packages/wje-badge/badge.element.d.ts +0 -35
  38. package/dist/packages/wje-badge/badge.test.d.ts +0 -1
  39. package/dist/packages/wje-breadcrumb/breadcrumb.d.ts +0 -2
  40. package/dist/packages/wje-breadcrumb/breadcrumb.element.d.ts +0 -80
  41. package/dist/packages/wje-breadcrumbs/breadcrumbs.d.ts +0 -2
  42. package/dist/packages/wje-breadcrumbs/breadcrumbs.element.d.ts +0 -97
  43. package/dist/packages/wje-breadcrumbs/breadcrumbs.test.d.ts +0 -1
  44. package/dist/packages/wje-button/button.d.ts +0 -2
  45. package/dist/packages/wje-button/button.element.d.ts +0 -204
  46. package/dist/packages/wje-button/button.test.d.ts +0 -1
  47. package/dist/packages/wje-button-group/button-group.d.ts +0 -2
  48. package/dist/packages/wje-button-group/button-group.element.d.ts +0 -96
  49. package/dist/packages/wje-card/card.d.ts +0 -2
  50. package/dist/packages/wje-card/card.element.d.ts +0 -29
  51. package/dist/packages/wje-card-content/card-content.d.ts +0 -2
  52. package/dist/packages/wje-card-content/card-content.element.d.ts +0 -22
  53. package/dist/packages/wje-card-controls/card-controls.d.ts +0 -2
  54. package/dist/packages/wje-card-controls/card-controls.element.d.ts +0 -23
  55. package/dist/packages/wje-card-header/card-header.d.ts +0 -2
  56. package/dist/packages/wje-card-header/card-header.element.d.ts +0 -22
  57. package/dist/packages/wje-card-subtitle/card-subtitle.d.ts +0 -2
  58. package/dist/packages/wje-card-subtitle/card-subtitle.element.d.ts +0 -30
  59. package/dist/packages/wje-card-title/card-title.d.ts +0 -2
  60. package/dist/packages/wje-card-title/card-title.element.d.ts +0 -32
  61. package/dist/packages/wje-carousel/carousel.d.ts +0 -2
  62. package/dist/packages/wje-carousel/carousel.element.d.ts +0 -146
  63. package/dist/packages/wje-carousel-item/carousel-item.d.ts +0 -2
  64. package/dist/packages/wje-carousel-item/carousel-item.element.d.ts +0 -38
  65. package/dist/packages/wje-checkbox/checkbox.d.ts +0 -2
  66. package/dist/packages/wje-checkbox/checkbox.element.d.ts +0 -99
  67. package/dist/packages/wje-chip/chip.d.ts +0 -2
  68. package/dist/packages/wje-chip/chip.element.d.ts +0 -64
  69. package/dist/packages/wje-col/col.d.ts +0 -2
  70. package/dist/packages/wje-col/col.element.d.ts +0 -16
  71. package/dist/packages/wje-color-picker/color-picker.d.ts +0 -2
  72. package/dist/packages/wje-color-picker/color-picker.element.d.ts +0 -187
  73. package/dist/packages/wje-color-picker/color-picker.test.d.ts +0 -1
  74. package/dist/packages/wje-container/container.d.ts +0 -2
  75. package/dist/packages/wje-container/container.element.d.ts +0 -31
  76. package/dist/packages/wje-copy-button/copy-button.d.ts +0 -2
  77. package/dist/packages/wje-copy-button/copy-button.element.d.ts +0 -89
  78. package/dist/packages/wje-copy-button/service/service.d.ts +0 -12
  79. package/dist/packages/wje-dialog/dialog.d.ts +0 -2
  80. package/dist/packages/wje-dialog/dialog.element.d.ts +0 -127
  81. package/dist/packages/wje-divider/divider.d.ts +0 -2
  82. package/dist/packages/wje-divider/divider.element.d.ts +0 -32
  83. package/dist/packages/wje-dropdown/dropdown.d.ts +0 -2
  84. package/dist/packages/wje-dropdown/dropdown.element.d.ts +0 -84
  85. package/dist/packages/wje-element/element.d.ts +0 -306
  86. package/dist/packages/wje-file-upload/file-upload.d.ts +0 -2
  87. package/dist/packages/wje-file-upload/file-upload.element.d.ts +0 -191
  88. package/dist/packages/wje-file-upload/service/service.d.ts +0 -70
  89. package/dist/packages/wje-file-upload-item/file-upload-item.d.ts +0 -2
  90. package/dist/packages/wje-file-upload-item/file-upload-item.element.d.ts +0 -68
  91. package/dist/packages/wje-footer/footer.d.ts +0 -2
  92. package/dist/packages/wje-footer/footer.element.d.ts +0 -28
  93. package/dist/packages/wje-form/form.d.ts +0 -2
  94. package/dist/packages/wje-form/form.element.d.ts +0 -28
  95. package/dist/packages/wje-format-digital/format-digital.d.ts +0 -2
  96. package/dist/packages/wje-format-digital/format-digital.element.d.ts +0 -83
  97. package/dist/packages/wje-format-digital/format-digital.test.d.ts +0 -1
  98. package/dist/packages/wje-grid/grid.d.ts +0 -2
  99. package/dist/packages/wje-grid/grid.element.d.ts +0 -26
  100. package/dist/packages/wje-header/header.d.ts +0 -2
  101. package/dist/packages/wje-header/header.element.d.ts +0 -35
  102. package/dist/packages/wje-icon/icon.d.ts +0 -2
  103. package/dist/packages/wje-icon/icon.element.d.ts +0 -40
  104. package/dist/packages/wje-icon/service/library.d.ts +0 -3
  105. package/dist/packages/wje-icon/service/service.d.ts +0 -11
  106. package/dist/packages/wje-icon-picker/icon-picker.d.ts +0 -2
  107. package/dist/packages/wje-icon-picker/icon-picker.element.d.ts +0 -187
  108. package/dist/packages/wje-img/img.d.ts +0 -2
  109. package/dist/packages/wje-img/img.element.d.ts +0 -118
  110. package/dist/packages/wje-img-comparer/img-comparer.d.ts +0 -2
  111. package/dist/packages/wje-img-comparer/img-comparer.element.d.ts +0 -60
  112. package/dist/packages/wje-img-comparer/service/service.d.ts +0 -1
  113. package/dist/packages/wje-infinite-scroll/infinite-scroll.d.ts +0 -2
  114. package/dist/packages/wje-infinite-scroll/infinite-scroll.element.d.ts +0 -172
  115. package/dist/packages/wje-input/input.d.ts +0 -2
  116. package/dist/packages/wje-input/input.element.d.ts +0 -159
  117. package/dist/packages/wje-input-file/input-file.d.ts +0 -2
  118. package/dist/packages/wje-input-file/input-file.element.d.ts +0 -50
  119. package/dist/packages/wje-item/item.d.ts +0 -2
  120. package/dist/packages/wje-item/item.element.d.ts +0 -68
  121. package/dist/packages/wje-kanban/kanban.d.ts +0 -2
  122. package/dist/packages/wje-kanban/kanban.element.d.ts +0 -182
  123. package/dist/packages/wje-label/label.d.ts +0 -2
  124. package/dist/packages/wje-label/label.element.d.ts +0 -34
  125. package/dist/packages/wje-level-indicator/level-indicator.d.ts +0 -2
  126. package/dist/packages/wje-level-indicator/level-indicator.element.d.ts +0 -91
  127. package/dist/packages/wje-list/list.d.ts +0 -2
  128. package/dist/packages/wje-list/list.element.d.ts +0 -31
  129. package/dist/packages/wje-main/main.d.ts +0 -2
  130. package/dist/packages/wje-main/main.element.d.ts +0 -30
  131. package/dist/packages/wje-masonry/masonry.d.ts +0 -2
  132. package/dist/packages/wje-masonry/masonry.element.d.ts +0 -114
  133. package/dist/packages/wje-masonry/service/service.d.ts +0 -32
  134. package/dist/packages/wje-menu/menu.d.ts +0 -2
  135. package/dist/packages/wje-menu/menu.element.d.ts +0 -47
  136. package/dist/packages/wje-menu-button/menu-button.d.ts +0 -2
  137. package/dist/packages/wje-menu-button/menu-button.element.d.ts +0 -34
  138. package/dist/packages/wje-menu-item/menu-item.d.ts +0 -2
  139. package/dist/packages/wje-menu-item/menu-item.element.d.ts +0 -158
  140. package/dist/packages/wje-menu-label/menu-label.d.ts +0 -2
  141. package/dist/packages/wje-menu-label/menu-label.element.d.ts +0 -39
  142. package/dist/packages/wje-option/option.d.ts +0 -2
  143. package/dist/packages/wje-option/option.element.d.ts +0 -95
  144. package/dist/packages/wje-options/options.d.ts +0 -2
  145. package/dist/packages/wje-options/options.element.d.ts +0 -232
  146. package/dist/packages/wje-orgchart/orgchart.d.ts +0 -2
  147. package/dist/packages/wje-orgchart/orgchart.element.d.ts +0 -24
  148. package/dist/packages/wje-orgchart-group/orgchart-group.d.ts +0 -2
  149. package/dist/packages/wje-orgchart-group/orgchart-group.element.d.ts +0 -28
  150. package/dist/packages/wje-orgchart-item/orgchart-item.d.ts +0 -2
  151. package/dist/packages/wje-orgchart-item/orgchart-item.element.d.ts +0 -49
  152. package/dist/packages/wje-pagination/pagination.d.ts +0 -2
  153. package/dist/packages/wje-pagination/pagination.element.d.ts +0 -166
  154. package/dist/packages/wje-pagination/pagination.test.d.ts +0 -1
  155. package/dist/packages/wje-pagination/service/service.d.ts +0 -9
  156. package/dist/packages/wje-panel/panel.d.ts +0 -2
  157. package/dist/packages/wje-panel/panel.element.d.ts +0 -34
  158. package/dist/packages/wje-popup/popup.d.ts +0 -2
  159. package/dist/packages/wje-popup/popup.element.d.ts +0 -94
  160. package/dist/packages/wje-progress-bar/progress-bar.d.ts +0 -2
  161. package/dist/packages/wje-progress-bar/progress-bar.element.d.ts +0 -96
  162. package/dist/packages/wje-qr-code/qr-code.d.ts +0 -2
  163. package/dist/packages/wje-qr-code/qr-code.element.d.ts +0 -33
  164. package/dist/packages/wje-radio/radio.d.ts +0 -2
  165. package/dist/packages/wje-radio/radio.element.d.ts +0 -64
  166. package/dist/packages/wje-radio-group/radio-group.d.ts +0 -2
  167. package/dist/packages/wje-radio-group/radio-group.element.d.ts +0 -61
  168. package/dist/packages/wje-rate/rate.d.ts +0 -2
  169. package/dist/packages/wje-rate/rate.element.d.ts +0 -156
  170. package/dist/packages/wje-relative-time/relative-time.d.ts +0 -2
  171. package/dist/packages/wje-relative-time/relative-time.element.d.ts +0 -55
  172. package/dist/packages/wje-relative-time/relative-time.test.d.ts +0 -1
  173. package/dist/packages/wje-reorder/reorder.d.ts +0 -2
  174. package/dist/packages/wje-reorder/reorder.element.d.ts +0 -119
  175. package/dist/packages/wje-reorder-dropzone/reorder-dropzone.d.ts +0 -2
  176. package/dist/packages/wje-reorder-dropzone/reorder-dropzone.element.d.ts +0 -23
  177. package/dist/packages/wje-reorder-handle/reorder-handle.d.ts +0 -2
  178. package/dist/packages/wje-reorder-handle/reorder-handle.element.d.ts +0 -75
  179. package/dist/packages/wje-reorder-item/reorder-item.d.ts +0 -2
  180. package/dist/packages/wje-reorder-item/reorder-item.element.d.ts +0 -24
  181. package/dist/packages/wje-route/route.d.ts +0 -2
  182. package/dist/packages/wje-route/route.element.d.ts +0 -22
  183. package/dist/packages/wje-router/router.d.ts +0 -2
  184. package/dist/packages/wje-router/router.element.d.ts +0 -39
  185. package/dist/packages/wje-router-link/router-link.d.ts +0 -2
  186. package/dist/packages/wje-router-link/router-link.element.d.ts +0 -31
  187. package/dist/packages/wje-router-outlet/router-outlet.d.ts +0 -2
  188. package/dist/packages/wje-router-outlet/router-outlet.element.d.ts +0 -15
  189. package/dist/packages/wje-row/row.d.ts +0 -2
  190. package/dist/packages/wje-row/row.element.d.ts +0 -23
  191. package/dist/packages/wje-select/select.d.ts +0 -2
  192. package/dist/packages/wje-select/select.element.d.ts +0 -358
  193. package/dist/packages/wje-slider/slider.d.ts +0 -2
  194. package/dist/packages/wje-slider/slider.element.d.ts +0 -103
  195. package/dist/packages/wje-sliding-container/sliding-container.d.ts +0 -2
  196. package/dist/packages/wje-sliding-container/sliding-container.element.d.ts +0 -265
  197. package/dist/packages/wje-split-view/service/service.d.ts +0 -1
  198. package/dist/packages/wje-split-view/split-view.d.ts +0 -2
  199. package/dist/packages/wje-split-view/split-view.element.d.ts +0 -65
  200. package/dist/packages/wje-status/status.d.ts +0 -2
  201. package/dist/packages/wje-status/status.element.d.ts +0 -26
  202. package/dist/packages/wje-step/step.d.ts +0 -2
  203. package/dist/packages/wje-step/step.element.d.ts +0 -23
  204. package/dist/packages/wje-stepper/stepper.d.ts +0 -2
  205. package/dist/packages/wje-stepper/stepper.element.d.ts +0 -80
  206. package/dist/packages/wje-store/default-store-actions.d.ts +0 -25
  207. package/dist/packages/wje-store/pubsub.d.ts +0 -22
  208. package/dist/packages/wje-store/store.d.ts +0 -153
  209. package/dist/packages/wje-tab/tab.d.ts +0 -2
  210. package/dist/packages/wje-tab/tab.element.d.ts +0 -66
  211. package/dist/packages/wje-tab-group/tab-group.d.ts +0 -2
  212. package/dist/packages/wje-tab-group/tab-group.element.d.ts +0 -107
  213. package/dist/packages/wje-tab-panel/tab-panel.d.ts +0 -2
  214. package/dist/packages/wje-tab-panel/tab-panel.element.d.ts +0 -23
  215. package/dist/packages/wje-textarea/textarea.d.ts +0 -2
  216. package/dist/packages/wje-textarea/textarea.element.d.ts +0 -89
  217. package/dist/packages/wje-thumbnail/thumbnail.d.ts +0 -2
  218. package/dist/packages/wje-thumbnail/thumbnail.element.d.ts +0 -31
  219. package/dist/packages/wje-timeline/timeline.d.ts +0 -2
  220. package/dist/packages/wje-timeline/timeline.element.d.ts +0 -25
  221. package/dist/packages/wje-timeline-item/timeline-item.d.ts +0 -2
  222. package/dist/packages/wje-timeline-item/timeline-item.element.d.ts +0 -27
  223. package/dist/packages/wje-toast/toast.d.ts +0 -2
  224. package/dist/packages/wje-toast/toast.element.d.ts +0 -173
  225. package/dist/packages/wje-toast/toast.test.d.ts +0 -1
  226. package/dist/packages/wje-toggle/toggle.d.ts +0 -2
  227. package/dist/packages/wje-toggle/toggle.element.d.ts +0 -65
  228. package/dist/packages/wje-toolbar/toolbar.d.ts +0 -2
  229. package/dist/packages/wje-toolbar/toolbar.element.d.ts +0 -39
  230. package/dist/packages/wje-toolbar-action/toolbar-action.d.ts +0 -2
  231. package/dist/packages/wje-toolbar-action/toolbar-action.element.d.ts +0 -35
  232. package/dist/packages/wje-tooltip/tooltip.d.ts +0 -2
  233. package/dist/packages/wje-tooltip/tooltip.element.d.ts +0 -77
  234. package/dist/packages/wje-tree/tree.d.ts +0 -2
  235. package/dist/packages/wje-tree/tree.element.d.ts +0 -105
  236. package/dist/packages/wje-tree/tree.test.d.ts +0 -1
  237. package/dist/packages/wje-tree-item/tree-item.d.ts +0 -2
  238. package/dist/packages/wje-tree-item/tree-item.element.d.ts +0 -155
  239. package/dist/packages/wje-tree-item/tree-item.test.d.ts +0 -1
  240. package/dist/packages/wje-visually-hidden/visually-hidden.d.ts +0 -2
  241. package/dist/packages/wje-visually-hidden/visually-hidden.element.d.ts +0 -29
@@ -1,191 +0,0 @@
1
- import { default as WJElement } from '../wje-element/element.js';
2
- import { Localizer } from '../utils/localize.js';
3
- /**
4
- * @summary FileUpload is a custom web component for uploading files.
5
- * It extends from WJElement and provides functionalities for file upload.
6
- * @documentation https://elements.webjet.sk/components/file-upload
7
- * @status stable
8
- * @augments WJElement
9
- * @slot - This is a default/unnamed slot.
10
- * @csspart native - The native file upload part.
11
- * @csspart file-list - The file list part.
12
- * @csspart upload-button - The label part.
13
- * @event change - Fires when the file input changes.
14
- * @event drop - Fires when a file is dropped into the component.
15
- * @attribute {string} accepted-types - The accepted file types for upload.
16
- * @attribute {number} chunk-size - The chunk size for file upload.
17
- * @attribute {number} max-file-size - The maximum file size for upload.
18
- * @attribute {string} upload-url - The URL to set as the upload URL.
19
- * @attribute {boolean} auto-process-files - The auto process files attribute.
20
- * @attribute {boolean} no-upload-button - The no upload button attribute.
21
- * @tag wje-file-upload
22
- */
23
- export default class FileUpload extends WJElement {
24
- /**
25
- * Getter for cssStyleSheet.
26
- * @returns {string} The CSS styles for the component.
27
- */
28
- static get cssStyleSheet(): string;
29
- /**
30
- * Getter for observedAttributes.
31
- * @returns {Array} An empty array as no attributes are observed.
32
- */
33
- static get observedAttributes(): any[];
34
- localizer: Localizer;
35
- _uploadedFiles: any[];
36
- _queuedFiles: any[];
37
- /**
38
- * Dependencies for the FileUpload component.
39
- * @type {object}
40
- */
41
- dependencies: object;
42
- /**
43
- * Setter for acceptedTypes attribute.
44
- * @param {string} value The accepted file types for upload.
45
- */
46
- set acceptedTypes(value: string);
47
- /**
48
- * Getter for acceptedTypes attribute.
49
- * @returns {string} The accepted file types for upload.
50
- */
51
- get acceptedTypes(): string;
52
- /**
53
- * Setter for chunkSize attribute.
54
- * @param {number} value The chunk size for file upload.
55
- */
56
- set chunkSize(value: number);
57
- /**
58
- * Getter for chunkSize attribute.
59
- * @returns {number} The chunk size for file upload.
60
- */
61
- get chunkSize(): number;
62
- /**
63
- * Setter for maxFileSize attribute.
64
- * @param {number} value The maximum file size for upload.
65
- */
66
- set maxFileSize(value: number);
67
- /**
68
- * Getter for maxFileSize attribute.
69
- * @returns {number} The maximum file size for upload.
70
- */
71
- get maxFileSize(): number;
72
- /**
73
- * Setter for label attribute.
74
- * @param {string} value The URL to set as the upload URL.
75
- */
76
- set uploadUrl(value: string);
77
- /**
78
- * Gets the upload URL for the file upload element.
79
- * @returns {string} The upload URL for the file upload element.
80
- */
81
- get uploadUrl(): string;
82
- /**
83
- * Sets the autoProcessFiles attribute.
84
- * @param value
85
- */
86
- set autoProcessFiles(value: any | boolean);
87
- /**
88
- * Gets the autoProcessFiles attribute.
89
- * @returns {any|boolean}
90
- */
91
- get autoProcessFiles(): any | boolean;
92
- /**
93
- * Sets the noUploadButton attribute.
94
- * @param value
95
- */
96
- set noUploadButton(value: boolean);
97
- /**
98
- * Gets the noUploadButton attribute.
99
- * @returns {boolean}
100
- */
101
- get noUploadButton(): boolean;
102
- /**
103
- * Sets the uploaded files.
104
- * @param value
105
- */
106
- set uploadedFiles(value: []);
107
- /**
108
- * Return the uploaded files.
109
- * @returns {[]}
110
- */
111
- get uploadedFiles(): [];
112
- /**
113
- * Sets the to-chunk attribute.
114
- * @param value
115
- */
116
- set toChunk(value: boolean);
117
- /**
118
- * Gets the to-chunk attribute.
119
- * @returns {boolean}
120
- */
121
- get toChunk(): boolean;
122
- beforeDraw(): void;
123
- uploadFunction: Function;
124
- /**
125
- * Method to draw the component on the screen.
126
- * @returns {DocumentFragment} The fragment containing the component.
127
- */
128
- draw(): DocumentFragment;
129
- button: HTMLElement;
130
- native: HTMLDivElement;
131
- fileList: HTMLSlotElement;
132
- fileInput: HTMLInputElement;
133
- /**
134
- * Method to perform actions after the component is drawn.
135
- */
136
- afterDraw(): void;
137
- /**
138
- * Method to handle form submission.
139
- * @param {Event} event The form submission event.
140
- */
141
- handleSubmit(event: Event): void;
142
- /**
143
- * Method to handle file drop event.
144
- * @param {Event} event The file drop event object.
145
- */
146
- handleDrop: (event: Event) => void;
147
- /**
148
- * Method to handle file input change event.
149
- * @param {Event} event The file input change event object.
150
- */
151
- handleInputChange: (event: Event) => void;
152
- /**
153
- * Method to add files to the queue.
154
- * @param files
155
- */
156
- addFilesToQueue(files: any): void;
157
- /**
158
- * Method to upload files.
159
- */
160
- uploadFiles(): void;
161
- /**
162
- * Method to create an upload promise.
163
- * @param file
164
- * @returns {Promise<unknown>}
165
- */
166
- createUploadPromise: (file: any) => Promise<unknown>;
167
- /**
168
- * Method to create a preview for the file.
169
- * @param {File} file The file for which the preview is to be created.
170
- * @param {FileReader} reader The FileReader instance to read the file.
171
- * @returns {HTMLElement} The created preview.
172
- */
173
- createPreview(file: File, reader: FileReader): HTMLElement;
174
- /**
175
- * Method to create a thumbnail for the file.
176
- * @param {File} file The file for which the thumbnail is to be created.
177
- * @param {FileReader} reader The FileReader instance to read the file.
178
- * @returns {HTMLElement} The created thumbnail.
179
- */
180
- createThumbnail(file: File, reader: FileReader): HTMLElement;
181
- /**
182
- * Method to validate the files.
183
- * @param {File} file The file to be validated.
184
- * TODO: alowed types a size limit by malo byt cez attributy
185
- */
186
- assertFilesValid(file: File): void;
187
- /**
188
- * Method to reset the form state.
189
- */
190
- resetFormState(): void;
191
- }
@@ -1,70 +0,0 @@
1
- /**
2
- * Retrieves the icon name for a given file type.
3
- * @param {string} type The file type or category (e.g., "pdf", "image", "folder").
4
- * @returns {string} The name of the icon associated with the file type.
5
- * @example
6
- * getFileTypeIcon('pdf'); // Returns the icon name for PDF files.
7
- * getFileTypeIcon('folder'); // Returns 'folder'.
8
- */
9
- export function getFileTypeIcon(type: string): string;
10
- /**
11
- * Checks if a given file matches any of the accepted file types.
12
- * @param {File} file The file to validate.
13
- * @param {string|string[]} acceptedFileTypes A comma-separated string or an array of accepted MIME types or file extensions.
14
- * @returns {boolean} Returns `true` if the file type is valid, otherwise `false`.
15
- * @throws {Error} Throws an error if `acceptedFileTypes` is empty.
16
- * @example
17
- * const file = new File([""], "example.png", { type: "image/png" });
18
- * const isValid = isValidFileType(file, "image/*,application/pdf");
19
- * console.log(isValid); // true
20
- * @example
21
- * const file = new File([""], "example.txt", { type: "text/plain" });
22
- * const isValid = isValidFileType(file, ["text/plain", "application/json"]);
23
- * console.log(isValid); // true
24
- */
25
- export function isValidFileType(file: File, acceptedFileTypes: string | string[]): boolean;
26
- /**
27
- * Uploads a file in chunks using `XMLHttpRequest`, allowing for progress tracking.
28
- * @param {File} file The file to be uploaded.
29
- * @param {number} chunkSize The size of each chunk in bytes.
30
- * @param {HTMLElement} preview The element used to display upload progress.
31
- */
32
- export function uploadFile(file: File, chunkSize: number, preview: HTMLElement): void;
33
- /**
34
- * Returns a function for uploading files either in chunks or as a whole file, based on the provided options.
35
- * @param {string} url The URL to which the file will be uploaded.
36
- * @param {number} [chunkSize] The size of each chunk in bytes when uploading in chunks (default is 1MB).
37
- * @param {boolean} [wholeFile] Whether to upload the file as a whole. If `true`, the entire file is uploaded at once.
38
- * @returns {Function} A function that takes a file and a preview element as arguments and uploads the file.
39
- * @example
40
- * // Upload a file in chunks
41
- * const uploadInChunks = upload('/upload', 1024 * 512); // 512KB chunks
42
- * uploadInChunks(file, previewElement);
43
- * @example
44
- * // Upload a whole file
45
- * const uploadWhole = upload('/upload', undefined, true);
46
- * uploadWhole(file, previewElement);
47
- */
48
- export function upload(url: string, chunkSize?: number, wholeFile?: boolean): Function;
49
- /**
50
- * Uploads a file in chunks to a specified URL, allowing for progress tracking and resuming in case of errors.
51
- * @param {string} url The URL to which the file chunks will be uploaded.
52
- * @param {File} file The file to be uploaded in chunks.
53
- * @param {HTMLElement} preview The element used to display upload progress.
54
- * @param {number} [chunkSize] The size of each chunk in bytes (default is 1MB).
55
- * @returns {Promise<object>} Resolves with the response of the last chunk uploaded, parsed as JSON.
56
- * @throws {Error} - Throws an error if a chunk fails to upload.
57
- */
58
- export function uploadFileInChunks(url: string, file: File, preview: HTMLElement, chunkSize?: number): Promise<object>;
59
- /**
60
- * Uploads a file to a specified URL using a `POST` request and updates the preview element with the uploaded file size.
61
- * @param {string} url The URL to which the file will be uploaded.
62
- * @param {File} file The file to be uploaded.
63
- * @param {HTMLElement} preview The element that displays the upload preview. It will be updated with the file size.
64
- * @returns {Promise<{data: object, file: File}>} - A promise that resolves with the server response and the uploaded file.
65
- * @throws {Error} - Logs an error to the console if the request fails.
66
- */
67
- export function uploadWholeFile(url: string, file: File, preview: HTMLElement): Promise<{
68
- data: object;
69
- file: File;
70
- }>;
@@ -1,2 +0,0 @@
1
- import { default as FileUploadItem } from './file-upload-item.element.js';
2
- export default FileUploadItem;
@@ -1,68 +0,0 @@
1
- import { default as WJElement } from '../wje-element/element.js';
2
- import { Localizer } from '../utils/localize.js';
3
- /**
4
- * @summary This element allows users to upload files.
5
- * `FileUploadItem` is a custom web component that represents a file upload item.
6
- * It extends from `WJElement` and uses the `Localizer` utility for localization.
7
- * @documentation https://elements.webjet.sk/components/file-upload
8
- * @status stable
9
- * @augments WJElement
10
- * @csspart button - The delete button part
11
- * @csspart image - The image part
12
- * @csspart name - The name part
13
- * @csspart size - The size part
14
- * @slot img - Slot for the image
15
- * @slot action - Slot for the action buttons
16
- * @cssproperty --primary-color - The primary color of the file upload item.
17
- * //@fires wje-button:click - Dispatches when the delete button is clicked
18
- * @tag wje-file-upload
19
- */
20
- export default class FileUploadItem extends WJElement {
21
- /**
22
- * Returns the CSS styles for the component.
23
- * @static
24
- * @returns {CSSStyleSheet}
25
- */
26
- static get cssStyleSheet(): CSSStyleSheet;
27
- /**
28
- * Returns the list of attributes to observe for changes.
29
- * @static
30
- * @returns {Array<string>}
31
- */
32
- static get observedAttributes(): Array<string>;
33
- localizer: Localizer;
34
- set isUploaded(value: boolean);
35
- get isUploaded(): boolean;
36
- set size(value: string);
37
- get size(): string;
38
- /**
39
- * Dependencies for the component.
40
- * @type {object}
41
- */
42
- dependencies: object;
43
- /**
44
- * Handles updates to the attributes of a custom element whenever one of the observed attributes is changed.
45
- * Updates the related elements based on the changed attribute and its new value.
46
- * @param {string} name The name of the attribute being changed.
47
- * @param {string | null} oldValue The previous value of the attribute before the change, or null if the attribute was not previously set.
48
- * @param {string | null} newValue The new value of the attribute after the change, or null if the attribute is being removed.
49
- * @returns {void} Does not return a value.
50
- */
51
- attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
52
- /**
53
- * Method to draw the component on the screen.
54
- * @returns {DocumentFragment} The fragment containing the component.
55
- */
56
- draw(): DocumentFragment;
57
- button: HTMLElement;
58
- uploadedEl: HTMLElement;
59
- sliderEl: HTMLElement;
60
- /**
61
- * Called after the component has been drawn.
62
- */
63
- afterDraw(): void;
64
- /**
65
- * Handles the delete action.
66
- */
67
- onDelete: () => void;
68
- }
@@ -1,2 +0,0 @@
1
- import { default as Footer } from './footer.element.js';
2
- export default Footer;
@@ -1,28 +0,0 @@
1
- import { default as WJElement } from '../wje-element/element.js';
2
- /**
3
- * @summary This element represents a footer. `Footer` is a custom web component that represents a footer.
4
- * @documentation https://elements.webjet.sk/components/footer
5
- * @status stable
6
- * @augments WJElement
7
- * @slot default - Default slot for the footer content
8
- * @cssproperty --primary-color - The primary color of the footer
9
- */
10
- export default class Footer extends WJElement {
11
- /**
12
- * Returns the CSS styles for the component.
13
- * @static
14
- * @returns {CSSStyleSheet}
15
- */
16
- static get cssStyleSheet(): CSSStyleSheet;
17
- /**
18
- * Returns the list of attributes to observe for changes.
19
- * @static
20
- * @returns {Array<string>}
21
- */
22
- static get observedAttributes(): Array<string>;
23
- /**
24
- * Draws the component.
25
- * @returns {DocumentFragment}
26
- */
27
- draw(): DocumentFragment;
28
- }
@@ -1,2 +0,0 @@
1
- import { default as Form } from './form.element.js';
2
- export default Form;
@@ -1,28 +0,0 @@
1
- import { default as WJElement } from '../wje-element/element.js';
2
- /**
3
- * @summary The Form class is a custom
4
- * web component that extends WJElement. It is a simple form that can hold other elements or components.
5
- * It provides a slot for adding child elements or components.
6
- * @documentation https://elements.webjet.sk/components/form
7
- * @status stable
8
- * @augments WJElement
9
- * @slot - The slot for adding child elements or components.
10
- * @tag wje-form
11
- */
12
- export default class Form extends WJElement {
13
- /**
14
- * Getter for the CSS stylesheet.
15
- * @returns {*}
16
- */
17
- static get cssStyleSheet(): any;
18
- /**
19
- * Getter for the observed attributes.
20
- * @returns {*[]}
21
- */
22
- static get observedAttributes(): any[];
23
- /**
24
- * Draws the Form.
25
- * @returns {DocumentFragment}
26
- */
27
- draw(): DocumentFragment;
28
- }
@@ -1,2 +0,0 @@
1
- import { default as FormatDigital } from './format-digital.element.js';
2
- export default FormatDigital;
@@ -1,83 +0,0 @@
1
- import { default as WJElement } from '../wje-element/element.js';
2
- import { Localizer } from '../utils/localize.js';
3
- /**
4
- * @summary This element formats and displays digital values such as file sizes or data transfer rates.
5
- * `FormatDigital` is a custom web component that represents a formatted digital value with units like
6
- * bytes or bits. It extends from `WJElement` and utilizes the `Localizer` class for locale-aware formatting.
7
- * @documentation https://elements.webjet.sk/components/format-digital
8
- * @status stable
9
- * @augments {WJElement}
10
- * @attribute {number} value - The numeric value to format (e.g., 1024 for 1 KB).
11
- * @attribute {string} unit - The unit of the value (`byte` or `bit`). Defaults to `byte`.
12
- * @attribute {string} unitDisplay - The display style of the unit (`short`, `long`, or `narrow`). Defaults to `short`.
13
- * @csspart native - The native part of the component.
14
- * @csspart formatted - The part representing the formatted value.
15
- * @csspart start - Slot for content before the formatted value.
16
- * @csspart end - Slot for content after the formatted value.
17
- * @tag wje-format-digital
18
- */
19
- export default class FormatDigital extends WJElement {
20
- /**
21
- * Returns the CSS styles for the component.
22
- * Encapsulated using shadow DOM.
23
- * @static
24
- * @returns {CSSStyleSheet} - The CSS styles for the component.
25
- */
26
- static get cssStyleSheet(): CSSStyleSheet;
27
- /**
28
- * Returns the list of attributes to observe for changes.
29
- * Observes `value` and `unit-display` for re-rendering.
30
- * @static
31
- * @returns {Array<string>} - The attributes to observe.
32
- */
33
- static get observedAttributes(): Array<string>;
34
- localizer: Localizer;
35
- /**
36
- * Sets the value of the digital format.
37
- * This value determines the size in bytes or bits to be displayed.
38
- * @param {number} value The value to set.
39
- */
40
- set value(value: number);
41
- /**
42
- * Returns the value of the digital format.
43
- * @returns {number} The current value of the component.
44
- */
45
- get value(): number;
46
- /**
47
- * Sets the unit of the digital format.
48
- * Valid values are `bit` or `byte`.
49
- * @param {string} value The unit to set.
50
- */
51
- set unit(value: string);
52
- /**
53
- * Returns the unit of the digital format.
54
- * Defaults to `byte` if no unit is set.
55
- * @returns {string} The current unit (`bit` or `byte`).
56
- */
57
- get unit(): string;
58
- /**
59
- * Sets the unit display style for the digital format.
60
- * Valid values are `short`, `long`, or `narrow`.
61
- * @param {string} value The unit display style to set.
62
- */
63
- set unitDisplay(value: string);
64
- /**
65
- * Returns the unit display style for the digital format.
66
- * Defaults to `short` if not set.
67
- * @returns {string} - The current unit display style.
68
- */
69
- get unitDisplay(): string;
70
- /**
71
- * Prepares the component before rendering.
72
- * Computes the formatted value based on the input value and unit.
73
- */
74
- beforeDraw(): void;
75
- formattedValue: string;
76
- /**
77
- * Renders the component and returns a document fragment.
78
- * The rendered structure includes a formatted value wrapped in a container
79
- * with slots for additional customization.
80
- * @returns {DocumentFragment} - The DOM structure for the component.
81
- */
82
- draw(): DocumentFragment;
83
- }
@@ -1,2 +0,0 @@
1
- import { default as Grid } from './grid.element.js';
2
- export default Grid;
@@ -1,26 +0,0 @@
1
- import { default as WJElement } from '../wje-element/element.js';
2
- /**
3
- * @summary The Grid class is a custom web component that extends WJElement. It is a simple grid that can hold other elements or components.
4
- * It provides a slot for adding child elements or components.
5
- * @documentation https://elements.webjet.sk/components/grid
6
- * @status stable
7
- * @augments WJElement
8
- * @slot - The slot for adding child elements or components.
9
- */
10
- export default class Grid extends WJElement {
11
- /**
12
- * Getter for the CSS stylesheet.
13
- * @returns {*}
14
- */
15
- static get cssStyleSheet(): any;
16
- /**
17
- * Getter for the observed attributes.
18
- * @returns {*[]}
19
- */
20
- static get observedAttributes(): any[];
21
- /**
22
- * Draws the Grid element.
23
- * @returns {DocumentFragment}
24
- */
25
- draw(): DocumentFragment;
26
- }
@@ -1,2 +0,0 @@
1
- import { default as Header } from './header.element.js';
2
- export default Header;
@@ -1,35 +0,0 @@
1
- import { default as WJElement } from '../wje-element/element.js';
2
- /**
3
- * @summary `Header` is a custom web component that represents a header. It extends from `WJElement`.
4
- * @documentation https://elements.webjet.sk/components/header
5
- * @status stable
6
- * @augments {WJElement}
7
- * @csspart native - The native part
8
- * @slot default - Default slot for the header content
9
- * @cssproperty [--wje-header-background=var(--wje-background)] - The background of the header element.
10
- * @cssproperty [--wje-header-border-color=var(--wje-border-color)] - The border color of the header element.
11
- * @cssproperty [--wje-header-border-width=0 0 1px 0] - The border width of the header element.
12
- * @cssproperty [--wje-header-border-style=solid] - The border styles of the header
13
- * @cssproperty [--wje-header-top=0] - The position top of the header
14
- * @cssproperty [--wje-header-height=60px] - The height of the header element.
15
- * @tag wje-header
16
- */
17
- export default class Header extends WJElement {
18
- /**
19
- * Returns the CSS styles for the component.
20
- * @static
21
- * @returns {CSSStyleSheet}
22
- */
23
- static get cssStyleSheet(): CSSStyleSheet;
24
- /**
25
- * Returns the list of attributes to observe for changes.
26
- * @static
27
- * @returns {Array<string>}
28
- */
29
- static get observedAttributes(): Array<string>;
30
- /**
31
- * Draws the component.
32
- * @returns {DocumentFragment}
33
- */
34
- draw(): DocumentFragment;
35
- }
@@ -1,2 +0,0 @@
1
- import { default as Icon } from './icon.element.js';
2
- export default Icon;
@@ -1,40 +0,0 @@
1
- import { default as WJElement } from '../wje-element/element.js';
2
- /**
3
- * @summary This element represents an icon. `IconElement` is a custom web component that represents an icon.
4
- * @documentation https://elements.webjet.sk/components/icon
5
- * @status stable
6
- * @augments WJElement
7
- * @csspart svg - The SVG part of the icon
8
- * @cssproperty [--wje-icon-size=1rem] - The size of the icon element
9
- * @cssproperty [--wje-icon-width=var(--wje-icon-size, 100%)] - The width of the icon element
10
- * @cssproperty [--wje-icon-height=var(--wje-icon-size, 100%)] - The height of the icon element
11
- * @tag wje-icon
12
- */
13
- export default class Icon extends WJElement {
14
- /**
15
- * Returns the CSS styles for the component.
16
- * @static
17
- * @returns {CSSStyleSheet}
18
- */
19
- static get cssStyleSheet(): CSSStyleSheet;
20
- /**
21
- * Returns the list of attributes to observe for changes.
22
- * @static
23
- * @returns {Array<string>}
24
- */
25
- static get observedAttributes(): Array<string>;
26
- /**
27
- * Draws the component.
28
- * @param {object} context The context for drawing.
29
- * @param {object} store The store for drawing.
30
- * @param {object} params The parameters for drawing.
31
- * @returns {DocumentFragment}
32
- */
33
- draw(context: object, store: object, params: object): DocumentFragment;
34
- url: string;
35
- native: HTMLDivElement;
36
- /**
37
- * Called after the component has been drawn.
38
- */
39
- afterDraw(): void;
40
- }
@@ -1,3 +0,0 @@
1
- export function getIconLibrary(name: any): any;
2
- export function registerIconLibrary(name: any, options: any): void;
3
- export function unregisterIconLibrary(name: any): void;
@@ -1,11 +0,0 @@
1
- export const iconContent: Map<any, any>;
2
- export function getSrc(src: string): string | null;
3
- export function isSrc(str: string): boolean;
4
- export function isSvgDataUrl(url: string): boolean;
5
- export function isEncodedDataUrl(url: string): boolean;
6
- export function isStr(val: any): boolean;
7
- export function validateContent(svgContent: string): string;
8
- export function isValid(elm: Element | Node): boolean;
9
- export function getSvgContent(url: string, sanitize?: boolean): Promise<void>;
10
- export function getUrl(i: HTMLElement): string | null;
11
- export function getName(iconName: string): string | null;
@@ -1,2 +0,0 @@
1
- import { default as IconPicker } from './icon-picker.element.js';
2
- export default IconPicker;