wj-elements 0.1.199 → 0.1.200
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.
- package/dist/packages/index.d.ts +107 -0
- package/dist/packages/internals/form-associated-element.d.ts +143 -0
- package/dist/packages/localize/localize.d.ts +47 -0
- package/dist/packages/translations/en-gb.d.ts +18 -0
- package/dist/packages/translations/sk-sk.d.ts +13 -0
- package/dist/packages/utils/animations.d.ts +2 -0
- package/dist/packages/utils/base-path.d.ts +14 -0
- package/dist/packages/utils/date.d.ts +2 -0
- package/dist/packages/utils/element-utils.d.ts +46 -0
- package/dist/packages/utils/event.d.ts +67 -0
- package/dist/packages/utils/icon-library.d.ts +3 -0
- package/dist/packages/utils/localize.d.ts +4 -0
- package/dist/packages/utils/permissions.d.ts +40 -0
- package/dist/packages/utils/universal-service.d.ts +18 -0
- package/dist/packages/utils/utils.d.ts +1 -0
- package/dist/packages/wje-accordion/accordion.d.ts +2 -0
- package/dist/packages/wje-accordion/accordion.element.d.ts +72 -0
- package/dist/packages/wje-accordion/accordion.test.d.ts +0 -0
- package/dist/packages/wje-accordion-item/accordion-item.d.ts +2 -0
- package/dist/packages/wje-accordion-item/accordion-item.element.d.ts +40 -0
- package/dist/packages/wje-animation/animation.d.ts +2 -0
- package/dist/packages/wje-animation/animation.element.d.ts +158 -0
- package/dist/packages/wje-animation/animation.test.d.ts +1 -0
- package/dist/packages/wje-aside/aside.d.ts +2 -0
- package/dist/packages/wje-aside/aside.element.d.ts +31 -0
- package/dist/packages/wje-avatar/avatar.d.ts +2 -0
- package/dist/packages/wje-avatar/avatar.element.d.ts +76 -0
- package/dist/packages/wje-avatar/avatar.test.d.ts +1 -0
- package/dist/packages/wje-avatar/service/service.d.ts +40 -0
- package/dist/packages/wje-badge/badge.d.ts +2 -0
- package/dist/packages/wje-badge/badge.element.d.ts +35 -0
- package/dist/packages/wje-badge/badge.test.d.ts +1 -0
- package/dist/packages/wje-breadcrumb/breadcrumb.d.ts +2 -0
- package/dist/packages/wje-breadcrumb/breadcrumb.element.d.ts +80 -0
- package/dist/packages/wje-breadcrumbs/breadcrumbs.d.ts +2 -0
- package/dist/packages/wje-breadcrumbs/breadcrumbs.element.d.ts +97 -0
- package/dist/packages/wje-breadcrumbs/breadcrumbs.test.d.ts +1 -0
- package/dist/packages/wje-button/button.d.ts +2 -0
- package/dist/packages/wje-button/button.element.d.ts +204 -0
- package/dist/packages/wje-button/button.test.d.ts +1 -0
- package/dist/packages/wje-button-group/button-group.d.ts +2 -0
- package/dist/packages/wje-button-group/button-group.element.d.ts +96 -0
- package/dist/packages/wje-card/card.d.ts +2 -0
- package/dist/packages/wje-card/card.element.d.ts +29 -0
- package/dist/packages/wje-card-content/card-content.d.ts +2 -0
- package/dist/packages/wje-card-content/card-content.element.d.ts +22 -0
- package/dist/packages/wje-card-controls/card-controls.d.ts +2 -0
- package/dist/packages/wje-card-controls/card-controls.element.d.ts +23 -0
- package/dist/packages/wje-card-header/card-header.d.ts +2 -0
- package/dist/packages/wje-card-header/card-header.element.d.ts +22 -0
- package/dist/packages/wje-card-subtitle/card-subtitle.d.ts +2 -0
- package/dist/packages/wje-card-subtitle/card-subtitle.element.d.ts +30 -0
- package/dist/packages/wje-card-title/card-title.d.ts +2 -0
- package/dist/packages/wje-card-title/card-title.element.d.ts +32 -0
- package/dist/packages/wje-carousel/carousel.d.ts +2 -0
- package/dist/packages/wje-carousel/carousel.element.d.ts +146 -0
- package/dist/packages/wje-carousel-item/carousel-item.d.ts +2 -0
- package/dist/packages/wje-carousel-item/carousel-item.element.d.ts +38 -0
- package/dist/packages/wje-checkbox/checkbox.d.ts +2 -0
- package/dist/packages/wje-checkbox/checkbox.element.d.ts +99 -0
- package/dist/packages/wje-chip/chip.d.ts +2 -0
- package/dist/packages/wje-chip/chip.element.d.ts +64 -0
- package/dist/packages/wje-col/col.d.ts +2 -0
- package/dist/packages/wje-col/col.element.d.ts +16 -0
- package/dist/packages/wje-color-picker/color-picker.d.ts +2 -0
- package/dist/packages/wje-color-picker/color-picker.element.d.ts +187 -0
- package/dist/packages/wje-color-picker/color-picker.test.d.ts +1 -0
- package/dist/packages/wje-container/container.d.ts +2 -0
- package/dist/packages/wje-container/container.element.d.ts +31 -0
- package/dist/packages/wje-copy-button/copy-button.d.ts +2 -0
- package/dist/packages/wje-copy-button/copy-button.element.d.ts +89 -0
- package/dist/packages/wje-copy-button/service/service.d.ts +12 -0
- package/dist/packages/wje-dialog/dialog.d.ts +2 -0
- package/dist/packages/wje-dialog/dialog.element.d.ts +127 -0
- package/dist/packages/wje-divider/divider.d.ts +2 -0
- package/dist/packages/wje-divider/divider.element.d.ts +32 -0
- package/dist/packages/wje-dropdown/dropdown.d.ts +2 -0
- package/dist/packages/wje-dropdown/dropdown.element.d.ts +84 -0
- package/dist/packages/wje-element/element.d.ts +306 -0
- package/dist/packages/wje-file-upload/file-upload.d.ts +2 -0
- package/dist/packages/wje-file-upload/file-upload.element.d.ts +191 -0
- package/dist/packages/wje-file-upload/service/service.d.ts +70 -0
- package/dist/packages/wje-file-upload-item/file-upload-item.d.ts +2 -0
- package/dist/packages/wje-file-upload-item/file-upload-item.element.d.ts +68 -0
- package/dist/packages/wje-footer/footer.d.ts +2 -0
- package/dist/packages/wje-footer/footer.element.d.ts +28 -0
- package/dist/packages/wje-form/form.d.ts +2 -0
- package/dist/packages/wje-form/form.element.d.ts +28 -0
- package/dist/packages/wje-format-digital/format-digital.d.ts +2 -0
- package/dist/packages/wje-format-digital/format-digital.element.d.ts +83 -0
- package/dist/packages/wje-format-digital/format-digital.test.d.ts +1 -0
- package/dist/packages/wje-grid/grid.d.ts +2 -0
- package/dist/packages/wje-grid/grid.element.d.ts +26 -0
- package/dist/packages/wje-header/header.d.ts +2 -0
- package/dist/packages/wje-header/header.element.d.ts +35 -0
- package/dist/packages/wje-icon/icon.d.ts +2 -0
- package/dist/packages/wje-icon/icon.element.d.ts +40 -0
- package/dist/packages/wje-icon/service/library.d.ts +3 -0
- package/dist/packages/wje-icon/service/service.d.ts +11 -0
- package/dist/packages/wje-icon-picker/icon-picker.d.ts +2 -0
- package/dist/packages/wje-icon-picker/icon-picker.element.d.ts +187 -0
- package/dist/packages/wje-img/img.d.ts +2 -0
- package/dist/packages/wje-img/img.element.d.ts +118 -0
- package/dist/packages/wje-img-comparer/img-comparer.d.ts +2 -0
- package/dist/packages/wje-img-comparer/img-comparer.element.d.ts +60 -0
- package/dist/packages/wje-img-comparer/service/service.d.ts +1 -0
- package/dist/packages/wje-infinite-scroll/infinite-scroll.d.ts +2 -0
- package/dist/packages/wje-infinite-scroll/infinite-scroll.element.d.ts +172 -0
- package/dist/packages/wje-input/input.d.ts +2 -0
- package/dist/packages/wje-input/input.element.d.ts +159 -0
- package/dist/packages/wje-input-file/input-file.d.ts +2 -0
- package/dist/packages/wje-input-file/input-file.element.d.ts +50 -0
- package/dist/packages/wje-item/item.d.ts +2 -0
- package/dist/packages/wje-item/item.element.d.ts +68 -0
- package/dist/packages/wje-kanban/kanban.d.ts +2 -0
- package/dist/packages/wje-kanban/kanban.element.d.ts +182 -0
- package/dist/packages/wje-label/label.d.ts +2 -0
- package/dist/packages/wje-label/label.element.d.ts +34 -0
- package/dist/packages/wje-level-indicator/level-indicator.d.ts +2 -0
- package/dist/packages/wje-level-indicator/level-indicator.element.d.ts +91 -0
- package/dist/packages/wje-list/list.d.ts +2 -0
- package/dist/packages/wje-list/list.element.d.ts +31 -0
- package/dist/packages/wje-main/main.d.ts +2 -0
- package/dist/packages/wje-main/main.element.d.ts +30 -0
- package/dist/packages/wje-masonry/masonry.d.ts +2 -0
- package/dist/packages/wje-masonry/masonry.element.d.ts +114 -0
- package/dist/packages/wje-masonry/service/service.d.ts +32 -0
- package/dist/packages/wje-menu/menu.d.ts +2 -0
- package/dist/packages/wje-menu/menu.element.d.ts +47 -0
- package/dist/packages/wje-menu-button/menu-button.d.ts +2 -0
- package/dist/packages/wje-menu-button/menu-button.element.d.ts +34 -0
- package/dist/packages/wje-menu-item/menu-item.d.ts +2 -0
- package/dist/packages/wje-menu-item/menu-item.element.d.ts +158 -0
- package/dist/packages/wje-menu-label/menu-label.d.ts +2 -0
- package/dist/packages/wje-menu-label/menu-label.element.d.ts +39 -0
- package/dist/packages/wje-option/option.d.ts +2 -0
- package/dist/packages/wje-option/option.element.d.ts +95 -0
- package/dist/packages/wje-options/options.d.ts +2 -0
- package/dist/packages/wje-options/options.element.d.ts +232 -0
- package/dist/packages/wje-orgchart/orgchart.d.ts +2 -0
- package/dist/packages/wje-orgchart/orgchart.element.d.ts +24 -0
- package/dist/packages/wje-orgchart-group/orgchart-group.d.ts +2 -0
- package/dist/packages/wje-orgchart-group/orgchart-group.element.d.ts +28 -0
- package/dist/packages/wje-orgchart-item/orgchart-item.d.ts +2 -0
- package/dist/packages/wje-orgchart-item/orgchart-item.element.d.ts +49 -0
- package/dist/packages/wje-pagination/pagination.d.ts +2 -0
- package/dist/packages/wje-pagination/pagination.element.d.ts +166 -0
- package/dist/packages/wje-pagination/pagination.test.d.ts +1 -0
- package/dist/packages/wje-pagination/service/service.d.ts +9 -0
- package/dist/packages/wje-panel/panel.d.ts +2 -0
- package/dist/packages/wje-panel/panel.element.d.ts +34 -0
- package/dist/packages/wje-popup/popup.d.ts +2 -0
- package/dist/packages/wje-popup/popup.element.d.ts +94 -0
- package/dist/packages/wje-progress-bar/progress-bar.d.ts +2 -0
- package/dist/packages/wje-progress-bar/progress-bar.element.d.ts +96 -0
- package/dist/packages/wje-qr-code/qr-code.d.ts +2 -0
- package/dist/packages/wje-qr-code/qr-code.element.d.ts +33 -0
- package/dist/packages/wje-radio/radio.d.ts +2 -0
- package/dist/packages/wje-radio/radio.element.d.ts +64 -0
- package/dist/packages/wje-radio-group/radio-group.d.ts +2 -0
- package/dist/packages/wje-radio-group/radio-group.element.d.ts +61 -0
- package/dist/packages/wje-rate/rate.d.ts +2 -0
- package/dist/packages/wje-rate/rate.element.d.ts +156 -0
- package/dist/packages/wje-relative-time/relative-time.d.ts +2 -0
- package/dist/packages/wje-relative-time/relative-time.element.d.ts +55 -0
- package/dist/packages/wje-relative-time/relative-time.test.d.ts +1 -0
- package/dist/packages/wje-reorder/reorder.d.ts +2 -0
- package/dist/packages/wje-reorder/reorder.element.d.ts +119 -0
- package/dist/packages/wje-reorder-dropzone/reorder-dropzone.d.ts +2 -0
- package/dist/packages/wje-reorder-dropzone/reorder-dropzone.element.d.ts +23 -0
- package/dist/packages/wje-reorder-handle/reorder-handle.d.ts +2 -0
- package/dist/packages/wje-reorder-handle/reorder-handle.element.d.ts +75 -0
- package/dist/packages/wje-reorder-item/reorder-item.d.ts +2 -0
- package/dist/packages/wje-reorder-item/reorder-item.element.d.ts +24 -0
- package/dist/packages/wje-route/route.d.ts +2 -0
- package/dist/packages/wje-route/route.element.d.ts +22 -0
- package/dist/packages/wje-router/router.d.ts +2 -0
- package/dist/packages/wje-router/router.element.d.ts +39 -0
- package/dist/packages/wje-router-link/router-link.d.ts +2 -0
- package/dist/packages/wje-router-link/router-link.element.d.ts +31 -0
- package/dist/packages/wje-router-outlet/router-outlet.d.ts +2 -0
- package/dist/packages/wje-router-outlet/router-outlet.element.d.ts +16 -0
- package/dist/packages/wje-row/row.d.ts +2 -0
- package/dist/packages/wje-row/row.element.d.ts +23 -0
- package/dist/packages/wje-select/select.d.ts +2 -0
- package/dist/packages/wje-select/select.element.d.ts +358 -0
- package/dist/packages/wje-slider/slider.d.ts +2 -0
- package/dist/packages/wje-slider/slider.element.d.ts +103 -0
- package/dist/packages/wje-sliding-container/sliding-container.d.ts +2 -0
- package/dist/packages/wje-sliding-container/sliding-container.element.d.ts +265 -0
- package/dist/packages/wje-split-view/service/service.d.ts +1 -0
- package/dist/packages/wje-split-view/split-view.d.ts +2 -0
- package/dist/packages/wje-split-view/split-view.element.d.ts +65 -0
- package/dist/packages/wje-status/status.d.ts +2 -0
- package/dist/packages/wje-status/status.element.d.ts +26 -0
- package/dist/packages/wje-step/step.d.ts +2 -0
- package/dist/packages/wje-step/step.element.d.ts +23 -0
- package/dist/packages/wje-stepper/stepper.d.ts +2 -0
- package/dist/packages/wje-stepper/stepper.element.d.ts +80 -0
- package/dist/packages/wje-store/default-store-actions.d.ts +25 -0
- package/dist/packages/wje-store/pubsub.d.ts +22 -0
- package/dist/packages/wje-store/store.d.ts +153 -0
- package/dist/packages/wje-tab/tab.d.ts +2 -0
- package/dist/packages/wje-tab/tab.element.d.ts +66 -0
- package/dist/packages/wje-tab-group/tab-group.d.ts +2 -0
- package/dist/packages/wje-tab-group/tab-group.element.d.ts +107 -0
- package/dist/packages/wje-tab-panel/tab-panel.d.ts +2 -0
- package/dist/packages/wje-tab-panel/tab-panel.element.d.ts +23 -0
- package/dist/packages/wje-textarea/textarea.d.ts +2 -0
- package/dist/packages/wje-textarea/textarea.element.d.ts +89 -0
- package/dist/packages/wje-thumbnail/thumbnail.d.ts +2 -0
- package/dist/packages/wje-thumbnail/thumbnail.element.d.ts +31 -0
- package/dist/packages/wje-timeline/timeline.d.ts +2 -0
- package/dist/packages/wje-timeline/timeline.element.d.ts +25 -0
- package/dist/packages/wje-timeline-item/timeline-item.d.ts +2 -0
- package/dist/packages/wje-timeline-item/timeline-item.element.d.ts +27 -0
- package/dist/packages/wje-toast/toast.d.ts +2 -0
- package/dist/packages/wje-toast/toast.element.d.ts +173 -0
- package/dist/packages/wje-toast/toast.test.d.ts +1 -0
- package/dist/packages/wje-toggle/toggle.d.ts +2 -0
- package/dist/packages/wje-toggle/toggle.element.d.ts +65 -0
- package/dist/packages/wje-toolbar/toolbar.d.ts +2 -0
- package/dist/packages/wje-toolbar/toolbar.element.d.ts +39 -0
- package/dist/packages/wje-toolbar-action/toolbar-action.d.ts +2 -0
- package/dist/packages/wje-toolbar-action/toolbar-action.element.d.ts +35 -0
- package/dist/packages/wje-tooltip/tooltip.d.ts +2 -0
- package/dist/packages/wje-tooltip/tooltip.element.d.ts +77 -0
- package/dist/packages/wje-tree/tree.d.ts +2 -0
- package/dist/packages/wje-tree/tree.element.d.ts +105 -0
- package/dist/packages/wje-tree/tree.test.d.ts +1 -0
- package/dist/packages/wje-tree-item/tree-item.d.ts +2 -0
- package/dist/packages/wje-tree-item/tree-item.element.d.ts +155 -0
- package/dist/packages/wje-tree-item/tree-item.test.d.ts +1 -0
- package/dist/packages/wje-visually-hidden/visually-hidden.d.ts +2 -0
- package/dist/packages/wje-visually-hidden/visually-hidden.element.d.ts +29 -0
- package/package.json +1 -1
|
@@ -0,0 +1,191 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
}>;
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
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;
|