wj-elements 0.2.0-alpha.2 → 0.2.0-alpha.4
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/index.d.ts +107 -0
- package/dist/internals/form-associated-element.d.ts +143 -0
- package/dist/localize/localize.d.ts +48 -0
- package/dist/packages/wje-file-upload/file-upload.element.d.ts +12 -0
- package/dist/packages/wje-file-upload-item/file-upload-item.element.d.ts +24 -8
- package/dist/packages/wje-sliding-container/sliding-container.element.d.ts +2 -2
- package/dist/translations/en-gb.d.ts +18 -0
- package/dist/translations/sk-sk.d.ts +13 -0
- package/dist/utils/animations.d.ts +2 -0
- package/dist/utils/base-path.d.ts +14 -0
- package/dist/utils/date.d.ts +2 -0
- package/dist/utils/element-utils.d.ts +46 -0
- package/dist/utils/event.d.ts +67 -0
- package/dist/utils/icon-library.d.ts +3 -0
- package/dist/utils/localize.d.ts +4 -0
- package/dist/utils/permissions.d.ts +40 -0
- package/dist/utils/universal-service.d.ts +18 -0
- package/dist/utils/utils.d.ts +1 -0
- package/dist/wje-accordion/accordion.d.ts +2 -0
- package/dist/wje-accordion/accordion.element.d.ts +72 -0
- package/dist/wje-accordion/accordion.test.d.ts +0 -0
- package/dist/wje-accordion-item/accordion-item.d.ts +2 -0
- package/dist/wje-accordion-item/accordion-item.element.d.ts +40 -0
- package/dist/wje-animation/animation.d.ts +2 -0
- package/dist/wje-animation/animation.element.d.ts +158 -0
- package/dist/wje-animation/animation.test.d.ts +1 -0
- package/dist/wje-aside/aside.d.ts +2 -0
- package/dist/wje-aside/aside.element.d.ts +31 -0
- package/dist/wje-avatar/avatar.d.ts +2 -0
- package/dist/wje-avatar/avatar.element.d.ts +76 -0
- package/dist/wje-avatar/avatar.test.d.ts +1 -0
- package/dist/wje-avatar/service/service.d.ts +52 -0
- package/dist/wje-badge/badge.d.ts +2 -0
- package/dist/wje-badge/badge.element.d.ts +35 -0
- package/dist/wje-badge/badge.test.d.ts +1 -0
- package/dist/wje-breadcrumb/breadcrumb.d.ts +2 -0
- package/dist/wje-breadcrumb/breadcrumb.element.d.ts +98 -0
- package/dist/wje-breadcrumbs/breadcrumbs.d.ts +2 -0
- package/dist/wje-breadcrumbs/breadcrumbs.element.d.ts +105 -0
- package/dist/wje-breadcrumbs/breadcrumbs.test.d.ts +1 -0
- package/dist/wje-button/button.d.ts +2 -0
- package/dist/wje-button/button.element.d.ts +204 -0
- package/dist/wje-button/button.test.d.ts +1 -0
- package/dist/wje-button-group/button-group.d.ts +2 -0
- package/dist/wje-button-group/button-group.element.d.ts +96 -0
- package/dist/wje-card/card.d.ts +2 -0
- package/dist/wje-card/card.element.d.ts +31 -0
- package/dist/wje-card-content/card-content.d.ts +2 -0
- package/dist/wje-card-content/card-content.element.d.ts +22 -0
- package/dist/wje-card-controls/card-controls.d.ts +2 -0
- package/dist/wje-card-controls/card-controls.element.d.ts +23 -0
- package/dist/wje-card-header/card-header.d.ts +2 -0
- package/dist/wje-card-header/card-header.element.d.ts +22 -0
- package/dist/wje-card-subtitle/card-subtitle.d.ts +2 -0
- package/dist/wje-card-subtitle/card-subtitle.element.d.ts +30 -0
- package/dist/wje-card-title/card-title.d.ts +2 -0
- package/dist/wje-card-title/card-title.element.d.ts +32 -0
- package/dist/wje-carousel/carousel.d.ts +2 -0
- package/dist/wje-carousel/carousel.element.d.ts +154 -0
- package/dist/wje-carousel-item/carousel-item.d.ts +2 -0
- package/dist/wje-carousel-item/carousel-item.element.d.ts +38 -0
- package/dist/wje-checkbox/checkbox.d.ts +2 -0
- package/dist/wje-checkbox/checkbox.element.d.ts +100 -0
- package/dist/wje-chip/chip.d.ts +2 -0
- package/dist/wje-chip/chip.element.d.ts +76 -0
- package/dist/wje-chip/chip.test.d.ts +1 -0
- package/dist/wje-col/col.d.ts +2 -0
- package/dist/wje-col/col.element.d.ts +16 -0
- package/dist/wje-color-picker/color-picker.d.ts +2 -0
- package/dist/wje-color-picker/color-picker.element.d.ts +230 -0
- package/dist/wje-color-picker/color-picker.test.d.ts +1 -0
- package/dist/wje-container/container.d.ts +2 -0
- package/dist/wje-container/container.element.d.ts +31 -0
- package/dist/wje-copy-button/copy-button.d.ts +2 -0
- package/dist/wje-copy-button/copy-button.element.d.ts +89 -0
- package/dist/wje-copy-button/service/service.d.ts +12 -0
- package/dist/wje-dialog/dialog.d.ts +2 -0
- package/dist/wje-dialog/dialog.element.d.ts +132 -0
- package/dist/wje-divider/divider.d.ts +2 -0
- package/dist/wje-divider/divider.element.d.ts +32 -0
- package/dist/wje-dropdown/dropdown.d.ts +2 -0
- package/dist/wje-dropdown/dropdown.element.d.ts +108 -0
- package/dist/wje-element/element.d.ts +341 -0
- package/dist/wje-file-upload/file-upload.d.ts +2 -0
- package/dist/wje-file-upload/file-upload.element.d.ts +191 -0
- package/dist/wje-file-upload/service/service.d.ts +70 -0
- package/dist/wje-file-upload-item/file-upload-item.d.ts +2 -0
- package/dist/wje-file-upload-item/file-upload-item.element.d.ts +68 -0
- package/dist/wje-file-upload-item.js +26 -7
- package/dist/wje-file-upload-item.js.map +1 -1
- package/dist/wje-file-upload.js +30 -0
- package/dist/wje-file-upload.js.map +1 -1
- package/dist/wje-footer/footer.d.ts +2 -0
- package/dist/wje-footer/footer.element.d.ts +28 -0
- package/dist/wje-form/form.d.ts +2 -0
- package/dist/wje-form/form.element.d.ts +28 -0
- package/dist/wje-format-digital/format-digital.d.ts +2 -0
- package/dist/wje-format-digital/format-digital.element.d.ts +83 -0
- package/dist/wje-format-digital/format-digital.test.d.ts +1 -0
- package/dist/wje-grid/grid.d.ts +2 -0
- package/dist/wje-grid/grid.element.d.ts +26 -0
- package/dist/wje-header/header.d.ts +2 -0
- package/dist/wje-header/header.element.d.ts +35 -0
- package/dist/wje-icon/icon.d.ts +2 -0
- package/dist/wje-icon/icon.element.d.ts +40 -0
- package/dist/wje-icon/service/library.d.ts +3 -0
- package/dist/wje-icon/service/service.d.ts +11 -0
- package/dist/wje-icon-picker/icon-picker.d.ts +2 -0
- package/dist/wje-icon-picker/icon-picker.element.d.ts +210 -0
- package/dist/wje-img/img.d.ts +2 -0
- package/dist/wje-img/img.element.d.ts +118 -0
- package/dist/wje-img-comparer/img-comparer.d.ts +2 -0
- package/dist/wje-img-comparer/img-comparer.element.d.ts +60 -0
- package/dist/wje-img-comparer/service/service.d.ts +1 -0
- package/dist/wje-infinite-scroll/infinite-scroll.d.ts +2 -0
- package/dist/wje-infinite-scroll/infinite-scroll.element.d.ts +173 -0
- package/dist/wje-input/input.d.ts +2 -0
- package/dist/wje-input/input.element.d.ts +159 -0
- package/dist/wje-input-file/input-file.d.ts +2 -0
- package/dist/wje-input-file/input-file.element.d.ts +50 -0
- package/dist/wje-item/item.d.ts +2 -0
- package/dist/wje-item/item.element.d.ts +68 -0
- package/dist/wje-kanban/kanban.d.ts +2 -0
- package/dist/wje-kanban/kanban.element.d.ts +182 -0
- package/dist/wje-label/label.d.ts +2 -0
- package/dist/wje-label/label.element.d.ts +34 -0
- package/dist/wje-level-indicator/level-indicator.d.ts +2 -0
- package/dist/wje-level-indicator/level-indicator.element.d.ts +91 -0
- package/dist/wje-list/list.d.ts +2 -0
- package/dist/wje-list/list.element.d.ts +31 -0
- package/dist/wje-main/main.d.ts +2 -0
- package/dist/wje-main/main.element.d.ts +30 -0
- package/dist/wje-masonry/masonry.d.ts +2 -0
- package/dist/wje-masonry/masonry.element.d.ts +114 -0
- package/dist/wje-masonry/service/service.d.ts +32 -0
- package/dist/wje-menu/menu.d.ts +2 -0
- package/dist/wje-menu/menu.element.d.ts +47 -0
- package/dist/wje-menu-button/menu-button.d.ts +2 -0
- package/dist/wje-menu-button/menu-button.element.d.ts +34 -0
- package/dist/wje-menu-item/menu-item.d.ts +2 -0
- package/dist/wje-menu-item/menu-item.element.d.ts +161 -0
- package/dist/wje-menu-label/menu-label.d.ts +2 -0
- package/dist/wje-menu-label/menu-label.element.d.ts +39 -0
- package/dist/wje-option/option.d.ts +2 -0
- package/dist/wje-option/option.element.d.ts +95 -0
- package/dist/wje-options/options.d.ts +2 -0
- package/dist/wje-options/options.element.d.ts +232 -0
- package/dist/wje-orgchart/orgchart.d.ts +2 -0
- package/dist/wje-orgchart/orgchart.element.d.ts +24 -0
- package/dist/wje-orgchart-group/orgchart-group.d.ts +2 -0
- package/dist/wje-orgchart-group/orgchart-group.element.d.ts +28 -0
- package/dist/wje-orgchart-item/orgchart-item.d.ts +2 -0
- package/dist/wje-orgchart-item/orgchart-item.element.d.ts +49 -0
- package/dist/wje-pagination/pagination.d.ts +2 -0
- package/dist/wje-pagination/pagination.element.d.ts +178 -0
- package/dist/wje-pagination/pagination.test.d.ts +1 -0
- package/dist/wje-pagination/service/service.d.ts +9 -0
- package/dist/wje-panel/panel.d.ts +2 -0
- package/dist/wje-panel/panel.element.d.ts +34 -0
- package/dist/wje-popup/popup.d.ts +2 -0
- package/dist/wje-popup/popup.element.d.ts +145 -0
- package/dist/wje-progress-bar/progress-bar.d.ts +2 -0
- package/dist/wje-progress-bar/progress-bar.element.d.ts +96 -0
- package/dist/wje-qr-code/qr-code.d.ts +2 -0
- package/dist/wje-qr-code/qr-code.element.d.ts +33 -0
- package/dist/wje-radio/radio.d.ts +2 -0
- package/dist/wje-radio/radio.element.d.ts +64 -0
- package/dist/wje-radio-group/radio-group.d.ts +2 -0
- package/dist/wje-radio-group/radio-group.element.d.ts +61 -0
- package/dist/wje-rate/rate.d.ts +2 -0
- package/dist/wje-rate/rate.element.d.ts +156 -0
- package/dist/wje-relative-time/relative-time.d.ts +2 -0
- package/dist/wje-relative-time/relative-time.element.d.ts +55 -0
- package/dist/wje-relative-time/relative-time.test.d.ts +1 -0
- package/dist/wje-reorder/reorder.d.ts +2 -0
- package/dist/wje-reorder/reorder.element.d.ts +119 -0
- package/dist/wje-reorder-dropzone/reorder-dropzone.d.ts +2 -0
- package/dist/wje-reorder-dropzone/reorder-dropzone.element.d.ts +23 -0
- package/dist/wje-reorder-handle/reorder-handle.d.ts +2 -0
- package/dist/wje-reorder-handle/reorder-handle.element.d.ts +84 -0
- package/dist/wje-reorder-item/reorder-item.d.ts +2 -0
- package/dist/wje-reorder-item/reorder-item.element.d.ts +24 -0
- package/dist/wje-route/route.d.ts +2 -0
- package/dist/wje-route/route.element.d.ts +22 -0
- package/dist/wje-router/router.d.ts +2 -0
- package/dist/wje-router/router.element.d.ts +43 -0
- package/dist/wje-router-link/router-link.d.ts +2 -0
- package/dist/wje-router-link/router-link.element.d.ts +31 -0
- package/dist/wje-router-outlet/router-outlet.d.ts +2 -0
- package/dist/wje-router-outlet/router-outlet.element.d.ts +16 -0
- package/dist/wje-row/row.d.ts +2 -0
- package/dist/wje-row/row.element.d.ts +23 -0
- package/dist/wje-select/select.d.ts +2 -0
- package/dist/wje-select/select.element.d.ts +386 -0
- package/dist/wje-select/select.test.d.ts +1 -0
- package/dist/wje-slider/slider.d.ts +2 -0
- package/dist/wje-slider/slider.element.d.ts +103 -0
- package/dist/wje-sliding-container/sliding-container.d.ts +2 -0
- package/dist/wje-sliding-container/sliding-container.element.d.ts +265 -0
- package/dist/wje-split-view/service/service.d.ts +1 -0
- package/dist/wje-split-view/split-view.d.ts +2 -0
- package/dist/wje-split-view/split-view.element.d.ts +65 -0
- package/dist/wje-status/status.d.ts +2 -0
- package/dist/wje-status/status.element.d.ts +26 -0
- package/dist/wje-step/step.d.ts +2 -0
- package/dist/wje-step/step.element.d.ts +23 -0
- package/dist/wje-stepper/stepper.d.ts +2 -0
- package/dist/wje-stepper/stepper.element.d.ts +125 -0
- package/dist/wje-store/default-store-actions.d.ts +25 -0
- package/dist/wje-store/pubsub.d.ts +22 -0
- package/dist/wje-store/store.d.ts +153 -0
- package/dist/wje-tab/tab.d.ts +2 -0
- package/dist/wje-tab/tab.element.d.ts +66 -0
- package/dist/wje-tab-group/tab-group.d.ts +2 -0
- package/dist/wje-tab-group/tab-group.element.d.ts +131 -0
- package/dist/wje-tab-group/tab-group.test.d.ts +1 -0
- package/dist/wje-tab-panel/tab-panel.d.ts +2 -0
- package/dist/wje-tab-panel/tab-panel.element.d.ts +23 -0
- package/dist/wje-textarea/textarea.d.ts +2 -0
- package/dist/wje-textarea/textarea.element.d.ts +89 -0
- package/dist/wje-thumbnail/thumbnail.d.ts +2 -0
- package/dist/wje-thumbnail/thumbnail.element.d.ts +31 -0
- package/dist/wje-timeline/timeline.d.ts +2 -0
- package/dist/wje-timeline/timeline.element.d.ts +25 -0
- package/dist/wje-timeline-item/timeline-item.d.ts +2 -0
- package/dist/wje-timeline-item/timeline-item.element.d.ts +27 -0
- package/dist/wje-toast/toast.d.ts +2 -0
- package/dist/wje-toast/toast.element.d.ts +173 -0
- package/dist/wje-toast/toast.test.d.ts +1 -0
- package/dist/wje-toggle/toggle.d.ts +2 -0
- package/dist/wje-toggle/toggle.element.d.ts +81 -0
- package/dist/wje-toggle/toggle.test.d.ts +1 -0
- package/dist/wje-toolbar/toolbar.d.ts +2 -0
- package/dist/wje-toolbar/toolbar.element.d.ts +39 -0
- package/dist/wje-toolbar-action/toolbar-action.d.ts +2 -0
- package/dist/wje-toolbar-action/toolbar-action.element.d.ts +35 -0
- package/dist/wje-tooltip/tooltip.d.ts +2 -0
- package/dist/wje-tooltip/tooltip.element.d.ts +77 -0
- package/dist/wje-tree/tree.d.ts +2 -0
- package/dist/wje-tree/tree.element.d.ts +105 -0
- package/dist/wje-tree/tree.test.d.ts +1 -0
- package/dist/wje-tree-item/tree-item.d.ts +2 -0
- package/dist/wje-tree-item/tree-item.element.d.ts +155 -0
- package/dist/wje-tree-item/tree-item.test.d.ts +1 -0
- package/dist/wje-visually-hidden/visually-hidden.d.ts +2 -0
- package/dist/wje-visually-hidden/visually-hidden.element.d.ts +29 -0
- package/package.json +10 -9
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { default as WJElement } from '../wje-element/element.js';
|
|
2
|
+
/**
|
|
3
|
+
* `Popup` is a custom web component that represents a popup.
|
|
4
|
+
* @summary This element represents a popup.
|
|
5
|
+
* @documentation https://elements.webjet.sk/components/popup
|
|
6
|
+
* @status stable
|
|
7
|
+
* @augments {WJElement}
|
|
8
|
+
* @csspart native - The native part of the popup.
|
|
9
|
+
* @slot anchor - The slot for the anchor of the popup.
|
|
10
|
+
* @slot arrow - The slot for the arrow of the popup.
|
|
11
|
+
* @slot - The default slot for the popup.
|
|
12
|
+
* // @fires wje-popup:reposition - Event fired when the popup is repositioned.
|
|
13
|
+
* // @fires wje-popup:show - Event fired when the popup is shown.
|
|
14
|
+
* // @fires wje-popup:hide - Event fired when the popup is hidden.
|
|
15
|
+
* @tag wje-popup
|
|
16
|
+
*/
|
|
17
|
+
export default class Popup extends WJElement {
|
|
18
|
+
/**
|
|
19
|
+
* Returns the CSS styles for the component.
|
|
20
|
+
* @static
|
|
21
|
+
* @returns {CSSStyleSheet} The CSS styles for the component.
|
|
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
|
+
_manual: boolean;
|
|
31
|
+
set loader(value: boolean);
|
|
32
|
+
get loader(): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Sets the manual property of the popup.
|
|
35
|
+
* @param {boolean} value The value to set.
|
|
36
|
+
*/
|
|
37
|
+
set manual(value: boolean);
|
|
38
|
+
/**
|
|
39
|
+
* Gets the manual property of the popup.
|
|
40
|
+
* @returns {boolean} The value of the manual property.
|
|
41
|
+
*/
|
|
42
|
+
get manual(): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Sets or removes the 'portal' attribute on the element based on the provided value.
|
|
45
|
+
* If the value is truthy, the 'portal' attribute will be added.
|
|
46
|
+
* If the value is falsy, the 'portal' attribute will be removed.
|
|
47
|
+
* @param {boolean} value Determines whether the 'portal' attribute should be added or removed.
|
|
48
|
+
*/
|
|
49
|
+
set portal(value: boolean);
|
|
50
|
+
/**
|
|
51
|
+
* Returns whether the 'portal' attribute is present on the element.
|
|
52
|
+
* @returns {boolean} True if the 'portal' attribute exists, otherwise false.
|
|
53
|
+
*/
|
|
54
|
+
get portal(): boolean;
|
|
55
|
+
get floatingEl(): HTMLDivElement;
|
|
56
|
+
beforeDraw(context: any, store: any, params: any): void;
|
|
57
|
+
/**
|
|
58
|
+
* Draws the component for the popup.
|
|
59
|
+
* @returns {DocumentFragment}
|
|
60
|
+
*/
|
|
61
|
+
draw(): DocumentFragment;
|
|
62
|
+
slotAnchor: HTMLSlotElement;
|
|
63
|
+
slotArrow: HTMLSlotElement;
|
|
64
|
+
native: HTMLDivElement;
|
|
65
|
+
loaderEl: HTMLDivElement;
|
|
66
|
+
/**
|
|
67
|
+
* After Draws the component.
|
|
68
|
+
*/
|
|
69
|
+
afterDraw(): void;
|
|
70
|
+
/**
|
|
71
|
+
* Sets the anchor for the popup.
|
|
72
|
+
* Adds a click event listener to the anchor element.
|
|
73
|
+
*/
|
|
74
|
+
setAnchor(): void;
|
|
75
|
+
anchorEl: any;
|
|
76
|
+
manualCallback: (e: any) => void;
|
|
77
|
+
clickHandler: (e: any) => void;
|
|
78
|
+
/**
|
|
79
|
+
* Toggles the active attribute of the popup.
|
|
80
|
+
*/
|
|
81
|
+
showHide(): void;
|
|
82
|
+
/**
|
|
83
|
+
* Repositions the popup.
|
|
84
|
+
* Uses the floating-ui library to compute the position.
|
|
85
|
+
*/
|
|
86
|
+
reposition(): void;
|
|
87
|
+
offsetCalc: number;
|
|
88
|
+
arrow: Element;
|
|
89
|
+
/**
|
|
90
|
+
* Mounts content to a portal container by creating or ensuring a portal root and mirroring
|
|
91
|
+
* the host's classes, attributes, and slot contents onto the portal. This method manages the
|
|
92
|
+
* movement of default and arrow slot content into the portal shadow DOM, while also setting
|
|
93
|
+
* up necessary mutation observers to keep attributes in sync.
|
|
94
|
+
* @returns {void} Does not return a value.
|
|
95
|
+
*/
|
|
96
|
+
_mountContentToPortal(): void;
|
|
97
|
+
_portalNative: HTMLDivElement;
|
|
98
|
+
_portalSlot: HTMLSlotElement;
|
|
99
|
+
_portalArrowSlot: HTMLSlotElement;
|
|
100
|
+
_portalAttrObserver: MutationObserver;
|
|
101
|
+
_defPlaceholders: any[];
|
|
102
|
+
_arrowPlaceholders: any[];
|
|
103
|
+
_floatingEl: HTMLDivElement;
|
|
104
|
+
_portaled: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Restores the content previously moved to a portal back to its original location.
|
|
107
|
+
* This method handles restoring default slot content, arrow placeholders, disconnecting
|
|
108
|
+
* attribute mirroring observers, and cleaning up elements and containers related to the portal.
|
|
109
|
+
* Ensures all placeholders and native portal elements are properly removed from the DOM.
|
|
110
|
+
* @returns {void} Does not return a value.
|
|
111
|
+
*/
|
|
112
|
+
_restoreContentFromPortal(): void;
|
|
113
|
+
_portalContainer: HTMLDivElement;
|
|
114
|
+
_portalShadow: ShadowRoot;
|
|
115
|
+
/**
|
|
116
|
+
* Ensures that a portal root is created and initialized properly with a shadow DOM and attached styles.
|
|
117
|
+
* If the portal root already exists, the method exits early.
|
|
118
|
+
* The method creates a `div` element in the document body and attaches a shadow DOM to it.
|
|
119
|
+
* It also applies the required styles to the shadow DOM, either using constructable stylesheets
|
|
120
|
+
* or by appending a `<style>` element. Additionally, it copies CSS custom properties from the
|
|
121
|
+
* component's computed styles to the portal host to ensure proper style resolution.
|
|
122
|
+
* @returns {void} This method does not return a value.
|
|
123
|
+
*/
|
|
124
|
+
_ensurePortalRoot(): void;
|
|
125
|
+
findDialog(el: any): any;
|
|
126
|
+
/**
|
|
127
|
+
* Displays the popup by portaling the content, managing the loader state, and attaching event handlers.
|
|
128
|
+
* Optionally dispatches a custom event when the popup is shown.
|
|
129
|
+
* @param {boolean} [dispatchEvent] Indicates whether to dispatch a custom event ('wje-popup:show') when the popup is shown.
|
|
130
|
+
* @returns {void} Does not return any value.
|
|
131
|
+
*/
|
|
132
|
+
show(dispatchEvent?: boolean): void;
|
|
133
|
+
cleanup: any;
|
|
134
|
+
/**
|
|
135
|
+
* Hides the popup.
|
|
136
|
+
* Removes the popup-active class from the floating element.
|
|
137
|
+
* Cleans up the auto update for repositioning.
|
|
138
|
+
*/
|
|
139
|
+
hide(dispatchEvent?: boolean): void;
|
|
140
|
+
/**
|
|
141
|
+
* Removes the active attribute when the popup is hidden.
|
|
142
|
+
*/
|
|
143
|
+
handleHide: () => void;
|
|
144
|
+
markContentReady(): void;
|
|
145
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { default as WJElement } from '../wje-element/element.js';
|
|
2
|
+
/**
|
|
3
|
+
* `ProgressBar` is a custom web component that represents a progress bar.
|
|
4
|
+
* @summary This element represents a progress bar.
|
|
5
|
+
* @documentation https://elements.webjet.sk/components/progress-bar
|
|
6
|
+
* @status stable
|
|
7
|
+
* @augments {WJElement}
|
|
8
|
+
* @slot - The default slot for the progress bar.
|
|
9
|
+
* @slot start - The start slot of the progress bar.
|
|
10
|
+
* @slot end - The end slot of the progress bar.
|
|
11
|
+
* @cssproperty [--wje-progress-bar-color=var(--wje-color-contrast-6)] - Sets the color of the progress bar. This property controls the fill color of the progress indicator. Accepts any valid CSS color value, such as named colors (`red`), hex values (`#ff0000`), or CSS variables.
|
|
12
|
+
* @cssproperty [--wje-progress-bar-text-size=.75rem] - Defines the font size of the text displayed within the progress bar. Accepts any valid CSS length unit (e.g., `rem`, `px`, `em`) to control text size relative to the bar's design.
|
|
13
|
+
* @cssproperty [--wje-progress-bar-text-color=var(--wje-color)] - Specifies the color of the text displayed within the progress bar. Accepts any valid CSS color value to ensure contrast and readability against the progress bar's background.
|
|
14
|
+
* @tag wje-progress-bar
|
|
15
|
+
*/
|
|
16
|
+
export default class ProgressBar extends WJElement {
|
|
17
|
+
/**
|
|
18
|
+
* Returns the CSS styles for the component.
|
|
19
|
+
* @static
|
|
20
|
+
* @returns {CSSStyleSheet}
|
|
21
|
+
*/
|
|
22
|
+
static get cssStyleSheet(): CSSStyleSheet;
|
|
23
|
+
/**
|
|
24
|
+
* Returns the list of attributes to observe for changes.
|
|
25
|
+
* @static
|
|
26
|
+
* @returns {Array<string>}
|
|
27
|
+
*/
|
|
28
|
+
static get observedAttributes(): Array<string>;
|
|
29
|
+
/**
|
|
30
|
+
* Sets the radius of the progress bar.
|
|
31
|
+
* @param {number} value The value to set.
|
|
32
|
+
*/
|
|
33
|
+
set radius(value: number);
|
|
34
|
+
/**
|
|
35
|
+
* Gets the radius of the progress bar.
|
|
36
|
+
* @returns {number} The value of the radius.
|
|
37
|
+
*/
|
|
38
|
+
get radius(): number;
|
|
39
|
+
/**
|
|
40
|
+
* Gets the diameter of the progress bar.
|
|
41
|
+
* @returns {number} The value of the diameter.
|
|
42
|
+
*/
|
|
43
|
+
get diameter(): number;
|
|
44
|
+
/**
|
|
45
|
+
* Gets the diameter of the progress bar.
|
|
46
|
+
* @returns {number} The value of the diameter.
|
|
47
|
+
*/
|
|
48
|
+
get containerSize(): number;
|
|
49
|
+
/**
|
|
50
|
+
* Sets the stroke of the progress bar.
|
|
51
|
+
* @param {number} value The value to set.
|
|
52
|
+
*/
|
|
53
|
+
set stroke(value: number);
|
|
54
|
+
/**
|
|
55
|
+
* Gets the stroke of the progress bar.
|
|
56
|
+
* @returns {number} The value of the stroke.
|
|
57
|
+
*/
|
|
58
|
+
get stroke(): number;
|
|
59
|
+
/**
|
|
60
|
+
* Gets the linecap of the progress bar.
|
|
61
|
+
* @returns {string} The value of the linecap.
|
|
62
|
+
*/
|
|
63
|
+
get linecap(): string;
|
|
64
|
+
/**
|
|
65
|
+
* Draws the component.
|
|
66
|
+
* @param {object} context The context for drawing.
|
|
67
|
+
* @param {object} store The store for drawing.
|
|
68
|
+
* @param {object} params The parameters for drawing.
|
|
69
|
+
* @returns {DocumentFragment}
|
|
70
|
+
*/
|
|
71
|
+
draw(context: object, store: object, params: object): DocumentFragment;
|
|
72
|
+
background: SVGCircleElement | SVGRectElement;
|
|
73
|
+
bar: SVGCircleElement | SVGRectElement;
|
|
74
|
+
/**
|
|
75
|
+
* Adds event listeners after the component is drawn.
|
|
76
|
+
*/
|
|
77
|
+
afterDraw(): void;
|
|
78
|
+
/**
|
|
79
|
+
* Returns the dasharray for a circle with the given radius.
|
|
80
|
+
* @param {number} radius The radius of the circle in pixels.
|
|
81
|
+
* @returns {number} The dasharray value.
|
|
82
|
+
*/
|
|
83
|
+
getCircleDasharray(radius?: number): number;
|
|
84
|
+
/**
|
|
85
|
+
* Returns the dashoffset for a circle with the given progress and radius.
|
|
86
|
+
* @param {number} progress The progress of the circle in percentage.
|
|
87
|
+
* @param {number} radius The radius of the circle in pixels.
|
|
88
|
+
* @returns {number} The dashoffset value.
|
|
89
|
+
*/
|
|
90
|
+
getCircleDashoffset(progress?: number, radius?: number): number;
|
|
91
|
+
/**
|
|
92
|
+
* Sets the progress of the circle.
|
|
93
|
+
* @param percent
|
|
94
|
+
*/
|
|
95
|
+
setCircleProgress(percent: any): void;
|
|
96
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { default as WJElement } from '../wje-element/element.js';
|
|
2
|
+
/**
|
|
3
|
+
* `QrCode` is a custom web component that generates a QR code.
|
|
4
|
+
* @summary This element represents a QR code generator.
|
|
5
|
+
* @documentation https://elements.webjet.sk/components/qr-code
|
|
6
|
+
* @status stable
|
|
7
|
+
* @augments {WJElement}
|
|
8
|
+
* @csspart native - The native part of the QR code.
|
|
9
|
+
* @slot top - The slot for the top content of the QR code.
|
|
10
|
+
* @slot bottom - The slot for the bottom content of the QR code.
|
|
11
|
+
* @tag wje-qr-code
|
|
12
|
+
*/
|
|
13
|
+
export default class QrCode extends WJElement {
|
|
14
|
+
/**
|
|
15
|
+
* Returns the CSS stylesheet for the component.
|
|
16
|
+
* @returns {CSSStyleSheet} The CSS stylesheet.
|
|
17
|
+
*/
|
|
18
|
+
static get cssStyleSheet(): CSSStyleSheet;
|
|
19
|
+
/**
|
|
20
|
+
* Returns the list of observed attributes.
|
|
21
|
+
* @returns {string[]} The list of observed attributes.
|
|
22
|
+
*/
|
|
23
|
+
static get observedAttributes(): string[];
|
|
24
|
+
/**
|
|
25
|
+
* Draws the QR code component.
|
|
26
|
+
* @returns {DocumentFragment} The document fragment containing the QR code component.
|
|
27
|
+
*/
|
|
28
|
+
draw(): DocumentFragment;
|
|
29
|
+
/**
|
|
30
|
+
* Called after the component is drawn to generate the QR code.
|
|
31
|
+
*/
|
|
32
|
+
afterDraw(): void;
|
|
33
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { default as WJElement } from '../wje-element/element.js';
|
|
2
|
+
/**
|
|
3
|
+
* @summary This class represents a Radio button element, extending the WJElement class.
|
|
4
|
+
* @documentation https://elements.webjet.sk/components/radio
|
|
5
|
+
* @status stable
|
|
6
|
+
* @augments WJElement
|
|
7
|
+
* @slot - Default slot for the radio button label content.
|
|
8
|
+
* @csspart native-radio - The native wrapper for the radio button.
|
|
9
|
+
* @cssproperty [--wje-radio-margin-inline=0] - Specifies the horizontal (left and right) margin for the radio button. Accepts any valid CSS length unit (e.g., `px`, `rem`, `%`) to control spacing on both sides of the component.
|
|
10
|
+
* @cssproperty [--wje-radio-margin-top=0] - Defines the top margin for the radio button. Accepts any valid CSS length value to adjust vertical spacing above the component.
|
|
11
|
+
* @cssproperty [--wje-radio-margin-bottom=0] - Sets the bottom margin for the radio button. Accepts any valid CSS length value to adjust vertical spacing below the component.
|
|
12
|
+
* // @fires wje-radio:change - Dispatched when the radio button's state changes.
|
|
13
|
+
* // @fires wje-radio:input - Dispatched when the radio button is interacted with.
|
|
14
|
+
*/
|
|
15
|
+
export default class Radio extends WJElement {
|
|
16
|
+
/**
|
|
17
|
+
* Returns the CSS styles for the component.
|
|
18
|
+
* @returns {CSSStyleSheet}
|
|
19
|
+
*/
|
|
20
|
+
static get cssStyleSheet(): CSSStyleSheet;
|
|
21
|
+
/**
|
|
22
|
+
* Returns the list of attributes to observe for changes.
|
|
23
|
+
* @static
|
|
24
|
+
* @returns {Array<string>}
|
|
25
|
+
*/
|
|
26
|
+
static get observedAttributes(): Array<string>;
|
|
27
|
+
set value(value: string);
|
|
28
|
+
get value(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Sets the name of the radio button.
|
|
31
|
+
* @param value
|
|
32
|
+
*/
|
|
33
|
+
set checked(value: boolean);
|
|
34
|
+
/**
|
|
35
|
+
* Gets the checked property of the radio button.
|
|
36
|
+
* @returns {boolean}
|
|
37
|
+
*/
|
|
38
|
+
get checked(): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Set checked attribute.
|
|
41
|
+
* @param {boolean} value true if the toggle is checked, false otherwise
|
|
42
|
+
*/
|
|
43
|
+
set disabled(value: boolean);
|
|
44
|
+
/**
|
|
45
|
+
* Get disabled attribute value.
|
|
46
|
+
* @returns {boolean} true if the toggle is disabled, false otherwise
|
|
47
|
+
*/
|
|
48
|
+
get disabled(): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Draws the radio button.
|
|
51
|
+
* @returns {DocumentFragment}
|
|
52
|
+
*/
|
|
53
|
+
draw(): DocumentFragment;
|
|
54
|
+
input: HTMLInputElement;
|
|
55
|
+
/**
|
|
56
|
+
* Sets up the event listeners for the component.
|
|
57
|
+
*/
|
|
58
|
+
afterDraw(): void;
|
|
59
|
+
/**
|
|
60
|
+
* Called when an attribute changes.
|
|
61
|
+
* @param {object} e
|
|
62
|
+
*/
|
|
63
|
+
inputEvent: (e: object) => void;
|
|
64
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { FormAssociatedElement } from '../internals/form-associated-element.js';
|
|
2
|
+
import { default as Radio } from '../wje-radio/radio.js';
|
|
3
|
+
/**
|
|
4
|
+
* `RadioGroup` is a custom web component that represents a group of radio buttons.
|
|
5
|
+
* @summary This element represents a group of radio buttons.
|
|
6
|
+
* @documentation https://elements.webjet.sk/components/radio-group
|
|
7
|
+
* @status stable
|
|
8
|
+
* @augments {FormAssociatedElement}
|
|
9
|
+
* @slot - The default slot for the radio group.
|
|
10
|
+
* @tag wje-radio-group
|
|
11
|
+
*/
|
|
12
|
+
export default class RadioGroup extends FormAssociatedElement {
|
|
13
|
+
/**
|
|
14
|
+
* Returns the CSS styles for the component.
|
|
15
|
+
* @static
|
|
16
|
+
* @returns {CSSStyleSheet}
|
|
17
|
+
*/
|
|
18
|
+
static get cssStyleSheet(): CSSStyleSheet;
|
|
19
|
+
static get observedAttributes(): any[];
|
|
20
|
+
pristine: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Setter for the value attribute.
|
|
23
|
+
* @param {string} value The value to set.
|
|
24
|
+
*/
|
|
25
|
+
set value(value: string);
|
|
26
|
+
/**
|
|
27
|
+
* Getter for the value attribute.
|
|
28
|
+
* @returns {string} The value of the attribute.
|
|
29
|
+
*/
|
|
30
|
+
get value(): string;
|
|
31
|
+
/**
|
|
32
|
+
* Draws the component for the radio group.
|
|
33
|
+
* @returns {DocumentFragment}
|
|
34
|
+
*/
|
|
35
|
+
draw(): DocumentFragment;
|
|
36
|
+
input: HTMLInputElement;
|
|
37
|
+
/**
|
|
38
|
+
* Adds event listeners after the component is drawn. Handles the selection of radio buttons.
|
|
39
|
+
*/
|
|
40
|
+
afterDraw(): void;
|
|
41
|
+
/**
|
|
42
|
+
* Returns the radio button with the given value.
|
|
43
|
+
* @param {string} value The value of the radio button.
|
|
44
|
+
* @returns {Radio} The radio button.
|
|
45
|
+
*/
|
|
46
|
+
getRadioByValue(value: string): Radio;
|
|
47
|
+
/**
|
|
48
|
+
* Removes the check from all radio buttons.
|
|
49
|
+
*/
|
|
50
|
+
removeCheck(): void;
|
|
51
|
+
/**
|
|
52
|
+
* Sets the given radio button to checked.
|
|
53
|
+
*/
|
|
54
|
+
checkRadio(radio: any): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Retrieves all direct child elements of the current element.
|
|
57
|
+
* @returns {HTMLElement[]} An array of child elements.
|
|
58
|
+
*/
|
|
59
|
+
getAllElements(): HTMLElement[];
|
|
60
|
+
#private;
|
|
61
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { default as WJElement } from '../wje-element/element.js';
|
|
2
|
+
/**
|
|
3
|
+
* `Rate` is a custom web component that represents a rating component.
|
|
4
|
+
* @summary This element represents a rating component.
|
|
5
|
+
* @documentation https://elements.webjet.sk/components/rate
|
|
6
|
+
* @status stable
|
|
7
|
+
* @augments {WJElement}
|
|
8
|
+
* @attribute {number} precision - The precision of the rating component.
|
|
9
|
+
* @attribute {number} max - The maximum value of the rating component.
|
|
10
|
+
* @attribute {Array<string>} icons - The icons of the rating component.
|
|
11
|
+
* @csspart native - The native part of the rating component.
|
|
12
|
+
* @cssproperty [--wje-rate-gap=.25rem] - Defines the spacing (gap) between individual items in the rating component. Accepts any valid CSS length unit (e.g., `px`, `rem`, `em`) to adjust the distance between rating elements.
|
|
13
|
+
* @cssproperty [--wje-rate-color=var(--wje-color-contrast-11)] - Specifies the default color of the rating items. Accepts any valid CSS color value, including named colors, hex values, RGB, or CSS variables.
|
|
14
|
+
* @cssproperty [--wje-rate-selected-color=var(--wje-color-danger-9)] - Sets the color for selected or highlighted rating items. This property helps visually distinguish selected ratings. Accepts any valid CSS color value.
|
|
15
|
+
* @tag wje-rate
|
|
16
|
+
*/
|
|
17
|
+
export default class Rate 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
|
+
* Sets the precision of the rating component.
|
|
32
|
+
* @param {number} value The value to set.
|
|
33
|
+
*/
|
|
34
|
+
set precision(value: number);
|
|
35
|
+
/**
|
|
36
|
+
* Gets the precision of the rating component.
|
|
37
|
+
* @returns {number} The value of the precision.
|
|
38
|
+
*/
|
|
39
|
+
get precision(): number;
|
|
40
|
+
/**
|
|
41
|
+
* Sets the maximum value of the rating component.
|
|
42
|
+
* @param {number} value The value to set.
|
|
43
|
+
*/
|
|
44
|
+
set max(value: number);
|
|
45
|
+
/**
|
|
46
|
+
* Gets the maximum value of the rating component.
|
|
47
|
+
* @returns {number} The value of the maximum value.
|
|
48
|
+
*/
|
|
49
|
+
get max(): number;
|
|
50
|
+
/**
|
|
51
|
+
* Sets the icons of the rating component.
|
|
52
|
+
* @param {Array<string>} value The value to set.
|
|
53
|
+
*/
|
|
54
|
+
set icons(value: Array<string>);
|
|
55
|
+
/**
|
|
56
|
+
* Gets the icons of the rating component.
|
|
57
|
+
* @returns {Array<string>} The value of the icons.
|
|
58
|
+
*/
|
|
59
|
+
get icons(): Array<string>;
|
|
60
|
+
/**
|
|
61
|
+
* Sets the value of the rating component.
|
|
62
|
+
* @param {number} value The value to set.
|
|
63
|
+
*/
|
|
64
|
+
set value(value: number);
|
|
65
|
+
/**
|
|
66
|
+
* Gets the value of the rating component.
|
|
67
|
+
* @returns {number} The value of the rating component.
|
|
68
|
+
*/
|
|
69
|
+
get value(): number;
|
|
70
|
+
/**
|
|
71
|
+
* Called when an attribute changes.
|
|
72
|
+
* @param {string} name The name of the attribute that changed.
|
|
73
|
+
* @param {string} old The old value of the attribute.
|
|
74
|
+
* @param {string} newName The new value of the attribute.
|
|
75
|
+
*/
|
|
76
|
+
attributeChangedCallback(name: string, old: string, newName: string): void;
|
|
77
|
+
/**
|
|
78
|
+
* Draws the component for the rating component.
|
|
79
|
+
* @returns {DocumentFragment}
|
|
80
|
+
*/
|
|
81
|
+
draw(): DocumentFragment;
|
|
82
|
+
native: HTMLDivElement;
|
|
83
|
+
/**
|
|
84
|
+
* Adds event listeners after the component is drawn.
|
|
85
|
+
*/
|
|
86
|
+
afterDraw(): void;
|
|
87
|
+
/**
|
|
88
|
+
* Creates the icons for the rating component.
|
|
89
|
+
* @param {number} i The index of the icon.
|
|
90
|
+
* @returns {Element} The icon element.
|
|
91
|
+
*/
|
|
92
|
+
createIcons(i: number): Element;
|
|
93
|
+
/**
|
|
94
|
+
* Changes the rate of the rating component.
|
|
95
|
+
*/
|
|
96
|
+
changeRate(): void;
|
|
97
|
+
/**
|
|
98
|
+
* Event handler for the mouse enter event.
|
|
99
|
+
* @param {Event} e The event.
|
|
100
|
+
*/
|
|
101
|
+
onMouseEnter: (e: Event) => void;
|
|
102
|
+
hoverValue: any;
|
|
103
|
+
/**
|
|
104
|
+
* Event handler for the mouse leave event.
|
|
105
|
+
* @param {Event} e The event.
|
|
106
|
+
*/
|
|
107
|
+
onMouseLeave: (e: Event) => void;
|
|
108
|
+
/**
|
|
109
|
+
* Event handler for the mouse move event.
|
|
110
|
+
* @param {Event} e The event.
|
|
111
|
+
*/
|
|
112
|
+
onMouseMove: (e: Event) => void;
|
|
113
|
+
/**
|
|
114
|
+
* Event handler for the touch start event.
|
|
115
|
+
* @param {Event} e The event.
|
|
116
|
+
*/
|
|
117
|
+
onTouchStart: (e: Event) => void;
|
|
118
|
+
/**
|
|
119
|
+
* Event handler for the touch end event.
|
|
120
|
+
* @param {Event} e The event.
|
|
121
|
+
*/
|
|
122
|
+
onTouchEnd: (e: Event) => void;
|
|
123
|
+
/**
|
|
124
|
+
* Event handler for the touch move event.
|
|
125
|
+
* @param {Event} e The event.
|
|
126
|
+
*/
|
|
127
|
+
onTouchMove: (e: Event) => void;
|
|
128
|
+
/**
|
|
129
|
+
* Event handler for the click event.
|
|
130
|
+
* @param {Event} e The event.
|
|
131
|
+
*/
|
|
132
|
+
onClick: (e: Event) => void;
|
|
133
|
+
/**
|
|
134
|
+
* Returns the icons for the rating component.
|
|
135
|
+
* @param {number} index The index of the icon.
|
|
136
|
+
* @returns {Element} The icon element.
|
|
137
|
+
*/
|
|
138
|
+
getIcons(index: number): Element;
|
|
139
|
+
/**
|
|
140
|
+
* Returns the value from the x position.
|
|
141
|
+
* @param {number} coordinate The x coordinate.
|
|
142
|
+
* @returns {number} The value from the x position.
|
|
143
|
+
*/
|
|
144
|
+
getValueFromXPosition(coordinate: number): number;
|
|
145
|
+
/**
|
|
146
|
+
* Rounds a given number to the nearest specified precision.
|
|
147
|
+
* @param {number} numberToRound The number to be rounded.
|
|
148
|
+
* @param {number} [precision] The precision to which the number should be rounded.
|
|
149
|
+
* @returns {number} - The rounded number.
|
|
150
|
+
* @example
|
|
151
|
+
* roundToPrecision(2.3); // Returns 2.5
|
|
152
|
+
* roundToPrecision(2.3, 0.1); // Returns 2.3
|
|
153
|
+
* roundToPrecision(2.6, 1); // Returns 3
|
|
154
|
+
*/
|
|
155
|
+
roundToPrecision(numberToRound: number, precision?: number): number;
|
|
156
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { default as WJElement } from '../wje-element/element.js';
|
|
2
|
+
import { Localizer } from '../utils/localize.js';
|
|
3
|
+
/**
|
|
4
|
+
* `RelativeTime` is a custom web component that represents a relative time component.
|
|
5
|
+
* @summary This element represents a relative time component.
|
|
6
|
+
* @documentation https://elements.webjet.sk/components/relative-time
|
|
7
|
+
* @status stable
|
|
8
|
+
* @augments WJElement
|
|
9
|
+
* @csspart native - The native part of the relative time component.
|
|
10
|
+
* @tag wje-relative-time
|
|
11
|
+
*/
|
|
12
|
+
export default class RelativeTime extends WJElement {
|
|
13
|
+
/**
|
|
14
|
+
* Returns the list of attributes to observe for changes.
|
|
15
|
+
* @static
|
|
16
|
+
* @returns {Array<string>}
|
|
17
|
+
*/
|
|
18
|
+
static get observedAttributes(): Array<string>;
|
|
19
|
+
localizer: Localizer;
|
|
20
|
+
/**
|
|
21
|
+
* Sets the date of the relative time component.
|
|
22
|
+
* @param value
|
|
23
|
+
*/
|
|
24
|
+
set date(value: string);
|
|
25
|
+
/**
|
|
26
|
+
* Gets the date of the relative time component.
|
|
27
|
+
* @returns {string}
|
|
28
|
+
*/
|
|
29
|
+
get date(): string;
|
|
30
|
+
/**
|
|
31
|
+
* Sets the object date of the relative time component.
|
|
32
|
+
* @param value
|
|
33
|
+
*/
|
|
34
|
+
set objectDate(value: Date);
|
|
35
|
+
/**
|
|
36
|
+
* Gets the object date of the relative time component.
|
|
37
|
+
* @returns {Date}
|
|
38
|
+
*/
|
|
39
|
+
get objectDate(): Date;
|
|
40
|
+
/**
|
|
41
|
+
* Draws the component for the relative time.
|
|
42
|
+
* @returns {DocumentFragment}
|
|
43
|
+
*/
|
|
44
|
+
draw(): DocumentFragment;
|
|
45
|
+
/**
|
|
46
|
+
* Returns the relative time string for the given date.
|
|
47
|
+
*/
|
|
48
|
+
getRelativeTimeString(lang?: string): string;
|
|
49
|
+
/**
|
|
50
|
+
* Checks if the given string is an ISO date.
|
|
51
|
+
* @param {string} str The string to check.
|
|
52
|
+
* @returns {boolean} True if the string is an ISO date, false otherwise.
|
|
53
|
+
*/
|
|
54
|
+
isISODate(str: string): boolean;
|
|
55
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|