wj-elements 0.2.0-alpha.4 → 0.2.0-alpha.5
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/wje-sliding-container/sliding-container.element.d.ts +2 -2
- package/dist/wje-file-upload.js +1 -0
- package/dist/wje-file-upload.js.map +1 -1
- package/package.json +1 -1
- package/dist/index.d.ts +0 -107
- package/dist/internals/form-associated-element.d.ts +0 -143
- package/dist/localize/localize.d.ts +0 -48
- package/dist/translations/en-gb.d.ts +0 -18
- package/dist/translations/sk-sk.d.ts +0 -13
- package/dist/utils/animations.d.ts +0 -2
- package/dist/utils/base-path.d.ts +0 -14
- package/dist/utils/date.d.ts +0 -2
- package/dist/utils/element-utils.d.ts +0 -46
- package/dist/utils/event.d.ts +0 -67
- package/dist/utils/icon-library.d.ts +0 -3
- package/dist/utils/localize.d.ts +0 -4
- package/dist/utils/permissions.d.ts +0 -40
- package/dist/utils/universal-service.d.ts +0 -18
- package/dist/utils/utils.d.ts +0 -1
- package/dist/wje-accordion/accordion.d.ts +0 -2
- package/dist/wje-accordion/accordion.element.d.ts +0 -72
- package/dist/wje-accordion/accordion.test.d.ts +0 -0
- package/dist/wje-accordion-item/accordion-item.d.ts +0 -2
- package/dist/wje-accordion-item/accordion-item.element.d.ts +0 -40
- package/dist/wje-animation/animation.d.ts +0 -2
- package/dist/wje-animation/animation.element.d.ts +0 -158
- package/dist/wje-aside/aside.d.ts +0 -2
- package/dist/wje-aside/aside.element.d.ts +0 -31
- package/dist/wje-avatar/avatar.d.ts +0 -2
- package/dist/wje-avatar/avatar.element.d.ts +0 -76
- package/dist/wje-avatar/avatar.test.d.ts +0 -1
- package/dist/wje-avatar/service/service.d.ts +0 -52
- package/dist/wje-badge/badge.d.ts +0 -2
- package/dist/wje-badge/badge.element.d.ts +0 -35
- package/dist/wje-badge/badge.test.d.ts +0 -1
- package/dist/wje-breadcrumb/breadcrumb.d.ts +0 -2
- package/dist/wje-breadcrumb/breadcrumb.element.d.ts +0 -98
- package/dist/wje-breadcrumbs/breadcrumbs.d.ts +0 -2
- package/dist/wje-breadcrumbs/breadcrumbs.element.d.ts +0 -105
- package/dist/wje-breadcrumbs/breadcrumbs.test.d.ts +0 -1
- package/dist/wje-button/button.d.ts +0 -2
- package/dist/wje-button/button.element.d.ts +0 -204
- package/dist/wje-button/button.test.d.ts +0 -1
- package/dist/wje-button-group/button-group.d.ts +0 -2
- package/dist/wje-button-group/button-group.element.d.ts +0 -96
- package/dist/wje-card/card.d.ts +0 -2
- package/dist/wje-card/card.element.d.ts +0 -31
- package/dist/wje-card-content/card-content.d.ts +0 -2
- package/dist/wje-card-content/card-content.element.d.ts +0 -22
- package/dist/wje-card-controls/card-controls.d.ts +0 -2
- package/dist/wje-card-controls/card-controls.element.d.ts +0 -23
- package/dist/wje-card-header/card-header.d.ts +0 -2
- package/dist/wje-card-header/card-header.element.d.ts +0 -22
- package/dist/wje-card-subtitle/card-subtitle.d.ts +0 -2
- package/dist/wje-card-subtitle/card-subtitle.element.d.ts +0 -30
- package/dist/wje-card-title/card-title.d.ts +0 -2
- package/dist/wje-card-title/card-title.element.d.ts +0 -32
- package/dist/wje-carousel/carousel.d.ts +0 -2
- package/dist/wje-carousel/carousel.element.d.ts +0 -154
- package/dist/wje-carousel-item/carousel-item.d.ts +0 -2
- package/dist/wje-carousel-item/carousel-item.element.d.ts +0 -38
- package/dist/wje-checkbox/checkbox.d.ts +0 -2
- package/dist/wje-checkbox/checkbox.element.d.ts +0 -100
- package/dist/wje-chip/chip.d.ts +0 -2
- package/dist/wje-chip/chip.element.d.ts +0 -76
- package/dist/wje-chip/chip.test.d.ts +0 -1
- package/dist/wje-col/col.d.ts +0 -2
- package/dist/wje-col/col.element.d.ts +0 -16
- package/dist/wje-color-picker/color-picker.d.ts +0 -2
- package/dist/wje-color-picker/color-picker.element.d.ts +0 -230
- package/dist/wje-color-picker/color-picker.test.d.ts +0 -1
- package/dist/wje-container/container.d.ts +0 -2
- package/dist/wje-container/container.element.d.ts +0 -31
- package/dist/wje-copy-button/copy-button.d.ts +0 -2
- package/dist/wje-copy-button/copy-button.element.d.ts +0 -89
- package/dist/wje-copy-button/service/service.d.ts +0 -12
- package/dist/wje-dialog/dialog.d.ts +0 -2
- package/dist/wje-dialog/dialog.element.d.ts +0 -132
- package/dist/wje-divider/divider.d.ts +0 -2
- package/dist/wje-divider/divider.element.d.ts +0 -32
- package/dist/wje-dropdown/dropdown.d.ts +0 -2
- package/dist/wje-dropdown/dropdown.element.d.ts +0 -108
- package/dist/wje-element/element.d.ts +0 -341
- package/dist/wje-file-upload/file-upload.d.ts +0 -2
- package/dist/wje-file-upload/file-upload.element.d.ts +0 -191
- package/dist/wje-file-upload/service/service.d.ts +0 -70
- package/dist/wje-file-upload-item/file-upload-item.d.ts +0 -2
- package/dist/wje-file-upload-item/file-upload-item.element.d.ts +0 -68
- package/dist/wje-footer/footer.d.ts +0 -2
- package/dist/wje-footer/footer.element.d.ts +0 -28
- package/dist/wje-form/form.d.ts +0 -2
- package/dist/wje-form/form.element.d.ts +0 -28
- package/dist/wje-format-digital/format-digital.d.ts +0 -2
- package/dist/wje-format-digital/format-digital.element.d.ts +0 -83
- package/dist/wje-format-digital/format-digital.test.d.ts +0 -1
- package/dist/wje-grid/grid.d.ts +0 -2
- package/dist/wje-grid/grid.element.d.ts +0 -26
- package/dist/wje-header/header.d.ts +0 -2
- package/dist/wje-header/header.element.d.ts +0 -35
- package/dist/wje-icon/icon.d.ts +0 -2
- package/dist/wje-icon/icon.element.d.ts +0 -40
- package/dist/wje-icon/service/library.d.ts +0 -3
- package/dist/wje-icon/service/service.d.ts +0 -11
- package/dist/wje-icon-picker/icon-picker.d.ts +0 -2
- package/dist/wje-icon-picker/icon-picker.element.d.ts +0 -210
- package/dist/wje-img/img.d.ts +0 -2
- package/dist/wje-img/img.element.d.ts +0 -118
- package/dist/wje-img-comparer/img-comparer.d.ts +0 -2
- package/dist/wje-img-comparer/img-comparer.element.d.ts +0 -60
- package/dist/wje-img-comparer/service/service.d.ts +0 -1
- package/dist/wje-infinite-scroll/infinite-scroll.d.ts +0 -2
- package/dist/wje-infinite-scroll/infinite-scroll.element.d.ts +0 -173
- package/dist/wje-input/input.d.ts +0 -2
- package/dist/wje-input/input.element.d.ts +0 -159
- package/dist/wje-input-file/input-file.d.ts +0 -2
- package/dist/wje-input-file/input-file.element.d.ts +0 -50
- package/dist/wje-item/item.d.ts +0 -2
- package/dist/wje-item/item.element.d.ts +0 -68
- package/dist/wje-kanban/kanban.d.ts +0 -2
- package/dist/wje-kanban/kanban.element.d.ts +0 -182
- package/dist/wje-label/label.d.ts +0 -2
- package/dist/wje-label/label.element.d.ts +0 -34
- package/dist/wje-level-indicator/level-indicator.d.ts +0 -2
- package/dist/wje-level-indicator/level-indicator.element.d.ts +0 -91
- package/dist/wje-list/list.d.ts +0 -2
- package/dist/wje-list/list.element.d.ts +0 -31
- package/dist/wje-main/main.d.ts +0 -2
- package/dist/wje-main/main.element.d.ts +0 -30
- package/dist/wje-masonry/masonry.d.ts +0 -2
- package/dist/wje-masonry/masonry.element.d.ts +0 -114
- package/dist/wje-masonry/service/service.d.ts +0 -32
- package/dist/wje-menu/menu.d.ts +0 -2
- package/dist/wje-menu/menu.element.d.ts +0 -47
- package/dist/wje-menu-button/menu-button.d.ts +0 -2
- package/dist/wje-menu-button/menu-button.element.d.ts +0 -34
- package/dist/wje-menu-item/menu-item.d.ts +0 -2
- package/dist/wje-menu-item/menu-item.element.d.ts +0 -161
- package/dist/wje-menu-label/menu-label.d.ts +0 -2
- package/dist/wje-menu-label/menu-label.element.d.ts +0 -39
- package/dist/wje-option/option.d.ts +0 -2
- package/dist/wje-option/option.element.d.ts +0 -95
- package/dist/wje-options/options.d.ts +0 -2
- package/dist/wje-options/options.element.d.ts +0 -232
- package/dist/wje-orgchart/orgchart.d.ts +0 -2
- package/dist/wje-orgchart/orgchart.element.d.ts +0 -24
- package/dist/wje-orgchart-group/orgchart-group.d.ts +0 -2
- package/dist/wje-orgchart-group/orgchart-group.element.d.ts +0 -28
- package/dist/wje-orgchart-item/orgchart-item.d.ts +0 -2
- package/dist/wje-orgchart-item/orgchart-item.element.d.ts +0 -49
- package/dist/wje-pagination/pagination.d.ts +0 -2
- package/dist/wje-pagination/pagination.element.d.ts +0 -178
- package/dist/wje-pagination/pagination.test.d.ts +0 -1
- package/dist/wje-pagination/service/service.d.ts +0 -9
- package/dist/wje-panel/panel.d.ts +0 -2
- package/dist/wje-panel/panel.element.d.ts +0 -34
- package/dist/wje-popup/popup.d.ts +0 -2
- package/dist/wje-popup/popup.element.d.ts +0 -145
- package/dist/wje-progress-bar/progress-bar.d.ts +0 -2
- package/dist/wje-progress-bar/progress-bar.element.d.ts +0 -96
- package/dist/wje-qr-code/qr-code.d.ts +0 -2
- package/dist/wje-qr-code/qr-code.element.d.ts +0 -33
- package/dist/wje-radio/radio.d.ts +0 -2
- package/dist/wje-radio/radio.element.d.ts +0 -64
- package/dist/wje-radio-group/radio-group.d.ts +0 -2
- package/dist/wje-radio-group/radio-group.element.d.ts +0 -61
- package/dist/wje-rate/rate.d.ts +0 -2
- package/dist/wje-rate/rate.element.d.ts +0 -156
- package/dist/wje-relative-time/relative-time.d.ts +0 -2
- package/dist/wje-relative-time/relative-time.element.d.ts +0 -55
- package/dist/wje-relative-time/relative-time.test.d.ts +0 -1
- package/dist/wje-reorder/reorder.d.ts +0 -2
- package/dist/wje-reorder/reorder.element.d.ts +0 -119
- package/dist/wje-reorder-dropzone/reorder-dropzone.d.ts +0 -2
- package/dist/wje-reorder-dropzone/reorder-dropzone.element.d.ts +0 -23
- package/dist/wje-reorder-handle/reorder-handle.d.ts +0 -2
- package/dist/wje-reorder-handle/reorder-handle.element.d.ts +0 -84
- package/dist/wje-reorder-item/reorder-item.d.ts +0 -2
- package/dist/wje-reorder-item/reorder-item.element.d.ts +0 -24
- package/dist/wje-route/route.d.ts +0 -2
- package/dist/wje-route/route.element.d.ts +0 -22
- package/dist/wje-router/router.d.ts +0 -2
- package/dist/wje-router/router.element.d.ts +0 -43
- package/dist/wje-router-link/router-link.d.ts +0 -2
- package/dist/wje-router-link/router-link.element.d.ts +0 -31
- package/dist/wje-router-outlet/router-outlet.d.ts +0 -2
- package/dist/wje-router-outlet/router-outlet.element.d.ts +0 -16
- package/dist/wje-row/row.d.ts +0 -2
- package/dist/wje-row/row.element.d.ts +0 -23
- package/dist/wje-select/select.d.ts +0 -2
- package/dist/wje-select/select.element.d.ts +0 -386
- package/dist/wje-select/select.test.d.ts +0 -1
- package/dist/wje-slider/slider.d.ts +0 -2
- package/dist/wje-slider/slider.element.d.ts +0 -103
- package/dist/wje-sliding-container/sliding-container.d.ts +0 -2
- package/dist/wje-sliding-container/sliding-container.element.d.ts +0 -265
- package/dist/wje-split-view/service/service.d.ts +0 -1
- package/dist/wje-split-view/split-view.d.ts +0 -2
- package/dist/wje-split-view/split-view.element.d.ts +0 -65
- package/dist/wje-status/status.d.ts +0 -2
- package/dist/wje-status/status.element.d.ts +0 -26
- package/dist/wje-step/step.d.ts +0 -2
- package/dist/wje-step/step.element.d.ts +0 -23
- package/dist/wje-stepper/stepper.d.ts +0 -2
- package/dist/wje-stepper/stepper.element.d.ts +0 -125
- package/dist/wje-store/default-store-actions.d.ts +0 -25
- package/dist/wje-store/pubsub.d.ts +0 -22
- package/dist/wje-store/store.d.ts +0 -153
- package/dist/wje-tab/tab.d.ts +0 -2
- package/dist/wje-tab/tab.element.d.ts +0 -66
- package/dist/wje-tab-group/tab-group.d.ts +0 -2
- package/dist/wje-tab-group/tab-group.element.d.ts +0 -131
- package/dist/wje-tab-group/tab-group.test.d.ts +0 -1
- package/dist/wje-tab-panel/tab-panel.d.ts +0 -2
- package/dist/wje-tab-panel/tab-panel.element.d.ts +0 -23
- package/dist/wje-textarea/textarea.d.ts +0 -2
- package/dist/wje-textarea/textarea.element.d.ts +0 -89
- package/dist/wje-thumbnail/thumbnail.d.ts +0 -2
- package/dist/wje-thumbnail/thumbnail.element.d.ts +0 -31
- package/dist/wje-timeline/timeline.d.ts +0 -2
- package/dist/wje-timeline/timeline.element.d.ts +0 -25
- package/dist/wje-timeline-item/timeline-item.d.ts +0 -2
- package/dist/wje-timeline-item/timeline-item.element.d.ts +0 -27
- package/dist/wje-toast/toast.d.ts +0 -2
- package/dist/wje-toast/toast.element.d.ts +0 -173
- package/dist/wje-toast/toast.test.d.ts +0 -1
- package/dist/wje-toggle/toggle.d.ts +0 -2
- package/dist/wje-toggle/toggle.element.d.ts +0 -81
- package/dist/wje-toggle/toggle.test.d.ts +0 -1
- package/dist/wje-toolbar/toolbar.d.ts +0 -2
- package/dist/wje-toolbar/toolbar.element.d.ts +0 -39
- package/dist/wje-toolbar-action/toolbar-action.d.ts +0 -2
- package/dist/wje-toolbar-action/toolbar-action.element.d.ts +0 -35
- package/dist/wje-tooltip/tooltip.d.ts +0 -2
- package/dist/wje-tooltip/tooltip.element.d.ts +0 -77
- package/dist/wje-tree/tree.d.ts +0 -2
- package/dist/wje-tree/tree.element.d.ts +0 -105
- package/dist/wje-tree/tree.test.d.ts +0 -1
- package/dist/wje-tree-item/tree-item.d.ts +0 -2
- package/dist/wje-tree-item/tree-item.element.d.ts +0 -155
- package/dist/wje-tree-item/tree-item.test.d.ts +0 -1
- package/dist/wje-visually-hidden/visually-hidden.d.ts +0 -2
- package/dist/wje-visually-hidden/visually-hidden.element.d.ts +0 -29
- /package/dist/{wje-animation/animation.test.d.ts → packages/wje-file-upload/file-upload.test.d.ts} +0 -0
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { default as WJElement } from '../wje-element/element.js';
|
|
2
|
-
import { default as Icon } from '../wje-icon/icon.js';
|
|
3
|
-
/**
|
|
4
|
-
* @summary This element allows users to compare two images. `ImgComparer` is a custom web component that represents an image comparer.
|
|
5
|
-
* It extends from `WJElement` and uses the `Icon` component.
|
|
6
|
-
* @documentation https://elements.webjet.sk/components/img-comparer
|
|
7
|
-
* @status stable
|
|
8
|
-
* @augments {WJElement}
|
|
9
|
-
* @slot before - The before image slot.
|
|
10
|
-
* @slot after - The after image slot.
|
|
11
|
-
* @csspart divider - The divider part.
|
|
12
|
-
* @cssproperty [--wje-img-compare-divider-area=12px] - The area of the divider. This is the size of the divider. Accepts any valid CSS size.
|
|
13
|
-
* @cssproperty [--wje-img-compare-divider-background=white] - Sets the background color of the divider in the image comparison component. Accepts any valid CSS color value (e.g., `red`, `#ff0000`, `rgba(255, 255, 255, 0.5)`). The default value is `white`, which ensures high contrast in most designs.
|
|
14
|
-
* @cssproperty [--wje-img-compare-divider-size=2px] - The size of the divider. This is the thickness of the divider. Accepts any valid CSS size.
|
|
15
|
-
* @cssproperty [--wje-img-compare-divider-left=50%] - The left position of the divider. This is the initial position of the divider.
|
|
16
|
-
* @cssproperty [--wje-img-compare-position=50%] - The position of the divider. This is the position of the divider.
|
|
17
|
-
* @cssproperty [--wje-img-compare-clip-path=inset(0 calc(100% - var(--wje-img-compare-position)) 0 0)] - The clip path of the divider. This is the clip path of the divider.
|
|
18
|
-
* @tag wje-img-comparer
|
|
19
|
-
*/
|
|
20
|
-
export default class ImgComparer 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
|
-
/**
|
|
34
|
-
* Dependencies of the ImgComparer component.
|
|
35
|
-
* @property {object} dependencies
|
|
36
|
-
*/
|
|
37
|
-
dependencies: {
|
|
38
|
-
'wje-icon': typeof Icon;
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* Draws the component.
|
|
42
|
-
* @returns {DocumentFragment}
|
|
43
|
-
*/
|
|
44
|
-
draw(): DocumentFragment;
|
|
45
|
-
native: HTMLDivElement;
|
|
46
|
-
/**
|
|
47
|
-
* Handles the drag event.
|
|
48
|
-
* @param {Event} e The event.
|
|
49
|
-
*/
|
|
50
|
-
handleDrag: (e: Event) => void;
|
|
51
|
-
position: number;
|
|
52
|
-
/**
|
|
53
|
-
* Clamps a number between a minimum and maximum value.
|
|
54
|
-
* @param {number} num The number to clamp.
|
|
55
|
-
* @param {number} min The minimum value.
|
|
56
|
-
* @param {number} max The maximum value.
|
|
57
|
-
* @returns {number} The clamped number.
|
|
58
|
-
*/
|
|
59
|
-
clamp: (num: number, min: number, max: number) => number;
|
|
60
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function drag(container: any, options: any): void;
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
import { default as WJElement } from '../wje-element/element.js';
|
|
2
|
-
/**
|
|
3
|
-
* `InfiniteScroll` is a custom web component that represents an infinite scroll.
|
|
4
|
-
* It extends from `WJElement`.
|
|
5
|
-
* @summary This element allows users to scroll through a potentially infinite amount of content.
|
|
6
|
-
* @documentation https://elements.webjet.sk/components/infinite-scroll
|
|
7
|
-
* @status stable
|
|
8
|
-
* @augments {WJElement}
|
|
9
|
-
* @csspart loader - The loader part of the infinite scroll.
|
|
10
|
-
* @slot - The default slot for the infinite scroll.
|
|
11
|
-
* @cssproperty [--wje-infinite-scroll-width=100%] - Sets the width of the infinite scroll container. his property determines how wide the infinite scroll area will be relative to its parent element. Accepts any valid CSS width value, such as percentages (`%`), pixels (`px`), or viewport units (`vw`). The default value is `100%`, which makes it span the full width of its container.
|
|
12
|
-
* @cssproperty [--wje-infinite-scroll-height=300px] - Defines the height of the infinite scroll container. This property specifies how tall the infinite scroll area should be. Accepts any valid CSS height value, such as pixels (`px`), percentages (`%`), or viewport units (`vh`). The default value is `300px`, providing a fixed height suitable for most use cases.
|
|
13
|
-
* //@fires wje-infinite-scroll:click-item - Event fired when an item is clicked.
|
|
14
|
-
* @tag wje-infinite-scroll
|
|
15
|
-
*/
|
|
16
|
-
export default class InfiniteScroll 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
|
-
totalPages: number;
|
|
30
|
-
isLoading: any[];
|
|
31
|
-
iterate: Element;
|
|
32
|
-
placementObj: this;
|
|
33
|
-
/**
|
|
34
|
-
* Dependencies of the InfiniteScroll component.
|
|
35
|
-
* @param value
|
|
36
|
-
*/
|
|
37
|
-
set infiniteScrollTemplate(value: null);
|
|
38
|
-
/**
|
|
39
|
-
* Getter for the infiniteScrollTemplate property.
|
|
40
|
-
* @returns {null}
|
|
41
|
-
*/
|
|
42
|
-
get infiniteScrollTemplate(): null;
|
|
43
|
-
/**
|
|
44
|
-
* Dependencies of the InfiniteScroll component.
|
|
45
|
-
* @param value
|
|
46
|
-
*/
|
|
47
|
-
set response(value: any | {});
|
|
48
|
-
/**
|
|
49
|
-
* Getter for the response property.
|
|
50
|
-
* @returns {*|{}}
|
|
51
|
-
*/
|
|
52
|
-
get response(): any | {};
|
|
53
|
-
/**
|
|
54
|
-
* Dependencies of the InfiniteScroll component.
|
|
55
|
-
* @param value
|
|
56
|
-
*/
|
|
57
|
-
set objectName(value: string);
|
|
58
|
-
get objectName(): string;
|
|
59
|
-
/**
|
|
60
|
-
* Prepares the component for updates before it is drawn.
|
|
61
|
-
* This method handles the removal of templates for iteration, adjusts the height styling of the component,
|
|
62
|
-
* and manages abort signals for loading operations.
|
|
63
|
-
* @returns {void} No return value.
|
|
64
|
-
*/
|
|
65
|
-
beforeDraw(): void;
|
|
66
|
-
/**
|
|
67
|
-
* Creates and returns a document fragment containing the structure for an infinite scroll component.
|
|
68
|
-
* The structure includes native elements, slots for customization, and optional loading content.
|
|
69
|
-
* @returns {DocumentFragment} The document fragment containing the component's DOM structure.
|
|
70
|
-
*/
|
|
71
|
-
draw(): DocumentFragment;
|
|
72
|
-
loadingEl: HTMLDivElement;
|
|
73
|
-
endingEl: HTMLSlotElement;
|
|
74
|
-
/**
|
|
75
|
-
* Called after the component has been drawn.
|
|
76
|
-
*/
|
|
77
|
-
afterDraw(): Promise<void>;
|
|
78
|
-
queryParams: any;
|
|
79
|
-
size: any;
|
|
80
|
-
currentPage: number;
|
|
81
|
-
/**
|
|
82
|
-
* Attaches a scroll event listener to the current object.
|
|
83
|
-
* The `scrollEvent` function binds the `onScroll` method to the 'scroll' event
|
|
84
|
-
* of the current object. This enables handling of scroll events for
|
|
85
|
-
* specific functionality such as updating UI elements, loading content dynamically,
|
|
86
|
-
* or tracking user interaction with scrollable content.
|
|
87
|
-
*/
|
|
88
|
-
scrollEvent: () => void;
|
|
89
|
-
/**
|
|
90
|
-
* A function that removes the scroll event listener from the current context.
|
|
91
|
-
* This function is used to unbind the `onScroll` event listener
|
|
92
|
-
* from the `scroll` event of the current object. It ensures that
|
|
93
|
-
* the scroll event no longer triggers the `onScroll` handler.
|
|
94
|
-
* @function
|
|
95
|
-
*/
|
|
96
|
-
unScrollEvent: () => void;
|
|
97
|
-
/**
|
|
98
|
-
* A scroll event handler function that checks the scroll position and triggers loading additional content
|
|
99
|
-
* when the user scrolls near the bottom of the page.
|
|
100
|
-
* Properties accessed:
|
|
101
|
-
* - `scrollTop`: The number of pixels that the content of an element is scrolled vertically.
|
|
102
|
-
* - `scrollHeight`: The total height of the element's content.
|
|
103
|
-
* - `clientHeight`: The inner height of the element in pixels, including padding but excluding borders and scrollbars.
|
|
104
|
-
* Conditions:
|
|
105
|
-
* - Determines if the scroll position is within 300 pixels of the bottom of the element.
|
|
106
|
-
* - Verifies that the current page number is less than or equal to the total number of pages.
|
|
107
|
-
* - Checks if the current page is already in the loading state.
|
|
108
|
-
* Actions:
|
|
109
|
-
* - Increments the current page number when the conditions are met.
|
|
110
|
-
* - Initiates loading for the next page by calling the `loadPages` function.
|
|
111
|
-
* @param {Event} e The scroll event object.
|
|
112
|
-
*/
|
|
113
|
-
onScroll: (e: Event) => void;
|
|
114
|
-
/**
|
|
115
|
-
* Fetches the pages from the server.
|
|
116
|
-
* @param {number} page The page number.
|
|
117
|
-
* @returns {Promise<object>} The response from the server.
|
|
118
|
-
*/
|
|
119
|
-
getPages(page: number): Promise<object>;
|
|
120
|
-
/**
|
|
121
|
-
* Hides the loader.
|
|
122
|
-
*/
|
|
123
|
-
hideLoader(): void;
|
|
124
|
-
/**
|
|
125
|
-
* Displays the loader element by adding the 'show' class to its class list.
|
|
126
|
-
* This method is useful for indicating a loading or processing state in the UI.
|
|
127
|
-
* @returns {void} No return value.
|
|
128
|
-
*/
|
|
129
|
-
showLoader(): void;
|
|
130
|
-
/**
|
|
131
|
-
* Checks if there are more pages to load.
|
|
132
|
-
* @param {number} page The page number.
|
|
133
|
-
* @returns {boolean} Whether there are more pages to load.
|
|
134
|
-
*/
|
|
135
|
-
hasMorePages(page: number): boolean;
|
|
136
|
-
/**
|
|
137
|
-
* Loads the pages.
|
|
138
|
-
* @param {number} page The page number.
|
|
139
|
-
*/
|
|
140
|
-
loadPages(page: number): Promise<void>;
|
|
141
|
-
parser: DOMParser;
|
|
142
|
-
compareFunction: (i: any, item: any) => boolean;
|
|
143
|
-
/**
|
|
144
|
-
* Converts a data item into an HTML element based on a template.
|
|
145
|
-
* This function takes a data item, interpolates it into a predefined template,
|
|
146
|
-
* parses the resulting HTML string, and returns the first child element of the parsed HTML content.
|
|
147
|
-
* @param {object} item The data object to interpolate into the HTML template.
|
|
148
|
-
* @returns {Element} The first child element generated from the interpolated HTML string.
|
|
149
|
-
*/
|
|
150
|
-
dataToHtml: (item: object) => Element;
|
|
151
|
-
/**
|
|
152
|
-
* A custom implementation of the forEach method designed to iterate over an array of data,
|
|
153
|
-
* transform each item into an HTML element, and append the element to a specified placement object.
|
|
154
|
-
* Additionally, it adds an event listener to each generated element for handling click events.
|
|
155
|
-
* @param {Array} data An array of items to process. Each item is transformed into an HTML element
|
|
156
|
-
* and appended to the placement object specified in the context of `this`.
|
|
157
|
-
*/
|
|
158
|
-
customForeach: (data: any[]) => void;
|
|
159
|
-
/**
|
|
160
|
-
* Interpolates a string template with values from the provided parameters object.
|
|
161
|
-
* The template contains placeholders in the format `{{key}}` or `{{key.subkey}}`,
|
|
162
|
-
* which are replaced with the corresponding values from the `params` object.
|
|
163
|
-
* Placeholders support dot notation for accessing nested properties within the `params` object.
|
|
164
|
-
* @param {string} template The string template containing placeholders to be replaced.
|
|
165
|
-
* @param {object} params The object containing key-value pairs used for substitution in the template.
|
|
166
|
-
* @returns {string} A string with all placeholders replaced by their respective values from the `params` object.
|
|
167
|
-
*/
|
|
168
|
-
interpolate: (template: string, params: object) => string;
|
|
169
|
-
addItem(item: any, place?: string): void;
|
|
170
|
-
removeItem(item: any): void;
|
|
171
|
-
reset(): void;
|
|
172
|
-
#private;
|
|
173
|
-
}
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import { FormAssociatedElement } from '../internals/form-associated-element.js';
|
|
2
|
-
/**
|
|
3
|
-
* @summary This class represents a custom input element. It extends the WJElement class and provides additional functionality for handling input.
|
|
4
|
-
* @documentation https://elements.webjet.sk/components/input
|
|
5
|
-
* @status stable
|
|
6
|
-
* @augments {FormAssociatedElement}
|
|
7
|
-
* @csspart native - The native part.
|
|
8
|
-
* @csspart wrapper - The wrapper part.
|
|
9
|
-
* @csspart input - The input part.
|
|
10
|
-
* @csspart clear - The clear part.
|
|
11
|
-
* @slot start - Slot for content at the start of the input.
|
|
12
|
-
* @slot end - Slot for content at the end of the input.
|
|
13
|
-
* @cssproperty [--wje-input-font-family=var(--wje-font-family)] - Defines the font family for the input text.
|
|
14
|
-
* @cssproperty [--wje-input-background-color=var(--wje-background)] - Specifies the background color of the input field.
|
|
15
|
-
* @cssproperty [--wje-input-color=var(--wje-color)] - Sets the text color within the input field.
|
|
16
|
-
* @cssproperty [--wje-input-color-invalid=var(--wje-color-danger)] - Changes the text color when the input value is invalid.
|
|
17
|
-
* @cssproperty [--wje-input-border-color=var(--wje-border-color)] - Defines the border color of the input field.
|
|
18
|
-
* @cssproperty [--wje-input-border-color-focus=var(--wje-color-primary)] - Specifies the border color when the input is focused.
|
|
19
|
-
* @cssproperty [--wje-input-border-width=1px] - Sets the width of the input border.
|
|
20
|
-
* @cssproperty [--wje-input-border-style=solid] - Defines the border style of the input (e.g., solid, dashed).
|
|
21
|
-
* @cssproperty [--wje-input-border-radius=4px] - Specifies the border radius, creating rounded corners.
|
|
22
|
-
* @cssproperty [--wje-input-margin-bottom=.5rem] - Adds spacing below the input field.
|
|
23
|
-
* @cssproperty [--wje-input-line-height=20px] - Sets the line height of the text within the input field.
|
|
24
|
-
* @cssproperty [--wje-input-slot-padding-inline=.5rem] - Controls the padding on the left and right of the input slot content.
|
|
25
|
-
* // @fires wje-input:input - Dispatched when the input value changes.
|
|
26
|
-
* // @fires wje-input:clear - Dispatched when the input is cleared.
|
|
27
|
-
*/
|
|
28
|
-
export default class Input extends FormAssociatedElement {
|
|
29
|
-
/**
|
|
30
|
-
* Getter for the cssStyleSheet attribute.
|
|
31
|
-
* @returns {CSSStyleSheet} The CSS style sheet of the input element.
|
|
32
|
-
*/
|
|
33
|
-
static get cssStyleSheet(): CSSStyleSheet;
|
|
34
|
-
/**
|
|
35
|
-
* Getter for the observedAttributes attribute of the input element.
|
|
36
|
-
* @returns {Array} The attributes to observe for changes.
|
|
37
|
-
*/
|
|
38
|
-
static get observedAttributes(): any[];
|
|
39
|
-
pristine: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Setter for the value attribute.
|
|
42
|
-
* @param {string} value The value to set.
|
|
43
|
-
*/
|
|
44
|
-
set value(value: string);
|
|
45
|
-
/**
|
|
46
|
-
* Retrieves the value from the input element if available; otherwise,
|
|
47
|
-
* returns the internal _value property or an empty string as the default.
|
|
48
|
-
* @returns {string} The current value from the input element, the internal _value, or an empty string.
|
|
49
|
-
*/
|
|
50
|
-
get value(): string;
|
|
51
|
-
_value: string;
|
|
52
|
-
/**
|
|
53
|
-
* Sets the label attribute of the element.
|
|
54
|
-
* @param {string} value The value to set as the label attribute.
|
|
55
|
-
*/
|
|
56
|
-
set label(value: string);
|
|
57
|
-
/**
|
|
58
|
-
* Retrieves the value of the 'label' attribute if it exists.
|
|
59
|
-
* If the 'label' attribute is not set, it returns false.
|
|
60
|
-
* @returns {string|boolean} The value of the 'label' attribute as a string, or false if the attribute is not set.
|
|
61
|
-
*/
|
|
62
|
-
get label(): string | boolean;
|
|
63
|
-
/**
|
|
64
|
-
* Sets the custom error display attribute for an element.
|
|
65
|
-
* @param {boolean} value If true, adds the 'custom-error-display' attribute to the element. If false, removes the attribute from the element.
|
|
66
|
-
*/
|
|
67
|
-
set customErrorDisplay(value: boolean);
|
|
68
|
-
/**
|
|
69
|
-
* Getter for the customErrorDisplay attribute.
|
|
70
|
-
* @returns {boolean} Whether the attribute is present.
|
|
71
|
-
*/
|
|
72
|
-
get customErrorDisplay(): boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Sets the `validateOnChange` property. If set to a truthy value, it adds the
|
|
75
|
-
* `validate-on-change` attribute to the element. If set to a falsy value, it
|
|
76
|
-
* removes the `validate-on-change` attribute from the element.
|
|
77
|
-
* @param {boolean} value Determines whether to add or remove the
|
|
78
|
-
* `validate-on-change` attribute. A truthy value adds the attribute, whereas a
|
|
79
|
-
* falsy value removes it.
|
|
80
|
-
*/
|
|
81
|
-
set validateOnChange(value: boolean);
|
|
82
|
-
/**
|
|
83
|
-
* Getter for the validateOnChange attribute.
|
|
84
|
-
* @returns {boolean} Whether the attribute is present.
|
|
85
|
-
*/
|
|
86
|
-
get validateOnChange(): boolean;
|
|
87
|
-
/**
|
|
88
|
-
* @summary Setter for the defaultValue attribute.
|
|
89
|
-
* This method sets the 'value' attribute of the custom input element to the provided value.
|
|
90
|
-
* The 'value' attribute represents the default value of the input element.
|
|
91
|
-
* @param {string} value The value to set as the default value.
|
|
92
|
-
*/
|
|
93
|
-
set defaultValue(value: string);
|
|
94
|
-
/**
|
|
95
|
-
* @summary Getter for the defaultValue attribute.
|
|
96
|
-
* This method retrieves the 'value' attribute of the custom input element.
|
|
97
|
-
* The 'value' attribute represents the default value of the input element.
|
|
98
|
-
* If the 'value' attribute is not set, it returns an empty string.
|
|
99
|
-
* @returns {string} The default value of the input element.
|
|
100
|
-
*/
|
|
101
|
-
get defaultValue(): string;
|
|
102
|
-
/**
|
|
103
|
-
* Sets or removes the 'clearable' attribute on the element.
|
|
104
|
-
* When set to a truthy value, the 'clearable' attribute is added; when falsy, the attribute is removed.
|
|
105
|
-
* @param {boolean} value Determines whether to set or remove the 'clearable' attribute. If true, the 'clearable' attribute is added. If false, it is removed.
|
|
106
|
-
*/
|
|
107
|
-
set clearable(value: boolean);
|
|
108
|
-
/**
|
|
109
|
-
* Checks if the 'clearable' attribute is present on the element.
|
|
110
|
-
* @returns {boolean} True if the 'clearable' attribute is set, otherwise false.
|
|
111
|
-
*/
|
|
112
|
-
get clearable(): boolean;
|
|
113
|
-
/**
|
|
114
|
-
* Sets the placeholder value for an element. If the provided value is non-empty,
|
|
115
|
-
* it assigns the value to the "placeholder" attribute. Otherwise, it removes
|
|
116
|
-
* the "placeholder" attribute from the element.
|
|
117
|
-
* @param {string} value The placeholder text to set or null/undefined to remove the attribute.
|
|
118
|
-
*/
|
|
119
|
-
set placeholder(value: string);
|
|
120
|
-
/**
|
|
121
|
-
* Retrieves the value of the 'placeholder' attribute from the element.
|
|
122
|
-
* If the attribute is not set, it returns an empty string.
|
|
123
|
-
* @returns {string} The value of the 'placeholder' attribute or an empty string if not set.
|
|
124
|
-
*/
|
|
125
|
-
get placeholder(): string;
|
|
126
|
-
/**
|
|
127
|
-
* Sets the `variant` attribute on the element. If a value is provided, it will set the attribute to the given value.
|
|
128
|
-
* If no value is provided, it removes the `variant` attribute from the element.
|
|
129
|
-
* @param {string} value The value to set for the `variant` attribute. If falsy, the attribute is removed.
|
|
130
|
-
*/
|
|
131
|
-
set variant(value: string);
|
|
132
|
-
/**
|
|
133
|
-
* Retrieves the value of the 'variant' attribute from the element.
|
|
134
|
-
* If the attribute is not set, it defaults to 'default'.
|
|
135
|
-
* @returns {string} The value of the 'variant' attribute or 'default' if not set.
|
|
136
|
-
*/
|
|
137
|
-
get variant(): string;
|
|
138
|
-
/**
|
|
139
|
-
* Draws the input element.
|
|
140
|
-
* @returns {DocumentFragment} The drawn input.
|
|
141
|
-
*/
|
|
142
|
-
draw(): DocumentFragment;
|
|
143
|
-
clear: HTMLElement;
|
|
144
|
-
native: HTMLDivElement;
|
|
145
|
-
labelElement: HTMLLabelElement;
|
|
146
|
-
input: HTMLInputElement;
|
|
147
|
-
errorMessage: HTMLDivElement;
|
|
148
|
-
/**
|
|
149
|
-
* Runs after the input is drawn to the DOM.
|
|
150
|
-
*/
|
|
151
|
-
afterDraw(): void;
|
|
152
|
-
/**
|
|
153
|
-
* Checks whether the input has a slot.
|
|
154
|
-
* @param {HTMLElement} el The element to check.
|
|
155
|
-
* @param {string} slotName The name of the slot to check for.
|
|
156
|
-
* @returns {boolean} Whether the input has the slot.
|
|
157
|
-
*/
|
|
158
|
-
hasSlot(el: HTMLElement, slotName?: string): boolean;
|
|
159
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { default as WJElement } from '../wje-element/element.js';
|
|
2
|
-
/**
|
|
3
|
-
* `InputFile` is a custom web component that represents a file input.
|
|
4
|
-
* @summary This element represents a file input.
|
|
5
|
-
* @documentation https://elements.webjet.sk/components/input-file
|
|
6
|
-
* @status stable
|
|
7
|
-
* @augments {WJElement}
|
|
8
|
-
* @csspart native - The native file input wrapper.
|
|
9
|
-
* @csspart input - The text input.
|
|
10
|
-
* @csspart file-input - The file input element.
|
|
11
|
-
* // @fires wje-input-file:change - Event fired when the file input changes.
|
|
12
|
-
* @tag wje-input-file
|
|
13
|
-
*/
|
|
14
|
-
export default class InputFile extends WJElement {
|
|
15
|
-
/**
|
|
16
|
-
* Returns the CSS stylesheet.
|
|
17
|
-
* @static
|
|
18
|
-
* @returns {object} styles
|
|
19
|
-
*/
|
|
20
|
-
static get cssStyleSheet(): object;
|
|
21
|
-
/**
|
|
22
|
-
* Returns the observed attributes.
|
|
23
|
-
* @static
|
|
24
|
-
* @returns {Array} An empty array
|
|
25
|
-
*/
|
|
26
|
-
static get observedAttributes(): any[];
|
|
27
|
-
_value: string;
|
|
28
|
-
/**
|
|
29
|
-
* @summary Sets the value of the input file.
|
|
30
|
-
* @param {string} value The value to set for the input file.
|
|
31
|
-
*/
|
|
32
|
-
set value(value: string);
|
|
33
|
-
/**
|
|
34
|
-
* Gets the value of the input file.
|
|
35
|
-
* @returns {string}
|
|
36
|
-
*/
|
|
37
|
-
get value(): string;
|
|
38
|
-
/**
|
|
39
|
-
* Draws the component.
|
|
40
|
-
* @returns {object} Document fragment
|
|
41
|
-
*/
|
|
42
|
-
draw(): object;
|
|
43
|
-
native: HTMLDivElement;
|
|
44
|
-
input: HTMLElement;
|
|
45
|
-
fileInput: HTMLInputElement;
|
|
46
|
-
/**
|
|
47
|
-
* After draw method for the InputFile class.
|
|
48
|
-
*/
|
|
49
|
-
afterDraw(): void;
|
|
50
|
-
}
|
package/dist/wje-item/item.d.ts
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { default as WJElement } from '../wje-element/element.js';
|
|
2
|
-
/**
|
|
3
|
-
* `Item` is a custom web component that represents an item.
|
|
4
|
-
* @summary This element represents an item.
|
|
5
|
-
* @documentation https://elements.webjet.sk/components/item
|
|
6
|
-
* @status stable
|
|
7
|
-
* @augments {WJElement}
|
|
8
|
-
* @csspart native - The native part
|
|
9
|
-
* @csspart inner - The inner part
|
|
10
|
-
* @slot start - The start slot
|
|
11
|
-
* @slot end - The end slot
|
|
12
|
-
* @slot error - The error slot
|
|
13
|
-
* @slot helper - The helper slot
|
|
14
|
-
* @cssproperty [--wje-item-background=var(--wje-background)] - Sets the background color of the item. Accepts any valid CSS color value.
|
|
15
|
-
* @cssproperty [--wje-item-color=var(--wje-color)] - Defines the text color for the item. Accepts any valid CSS color value.
|
|
16
|
-
* @cssproperty [--wje-item-padding-start=var(--wje-padding)] - Specifies the left padding of the item. Accepts any valid CSS length.
|
|
17
|
-
* @cssproperty [--wje-item-padding-end=var(--wje-padding)] - Specifies the right padding of the item. Accepts any valid CSS length.
|
|
18
|
-
* @cssproperty [--wje-item-padding-top=var(--wje-padding)] - Specifies the top padding of the item. Accepts any valid CSS length.
|
|
19
|
-
* @cssproperty [--wje-item-padding-bottom=var(--wje-padding)] - Specifies the bottom padding of the item. Accepts any valid CSS length.
|
|
20
|
-
* @cssproperty [--wje-item-inner-padding-start=var(--wje-padding)] - Specifies the left inner padding of the item. Accepts any valid CSS length.
|
|
21
|
-
* @cssproperty [--wje-item-inner-padding-end=var(--wje-padding)] - Specifies the right inner padding of the item. Accepts any valid CSS length.
|
|
22
|
-
* @cssproperty [--wje-item-inner-padding-top=var(--wje-padding)] - Specifies the top inner padding of the item. Accepts any valid CSS length.
|
|
23
|
-
* @cssproperty [--wje-item-inner-padding-bottom=var(--wje-padding)] - Specifies the bottom inner padding of the item. Accepts any valid CSS length.
|
|
24
|
-
* @cssproperty [--wje-item-border-radius=var(--wje-border-radius)] - Defines the border radius, providing rounded corners for the item.
|
|
25
|
-
* @cssproperty [--wje-item-border-width=var(--wje-border-width)] - Sets the border width of the item. Accepts any valid CSS length.
|
|
26
|
-
* @cssproperty [--wje-item-border-style=var(--wje-border-style)] - Specifies the style of the border, such as `solid`, `dashed`, or `dotted`.
|
|
27
|
-
* @cssproperty [--wje-item-border-color=var(--wje-border-color)] - Defines the color of the item's border. Accepts any valid CSS color value.
|
|
28
|
-
* @cssproperty [--wje-item-min-height=var(--wje-min-height)] - Sets the minimum height of the item to ensure consistent layout.
|
|
29
|
-
* @cssproperty [--wje-item-transition=var(--wje-transition)] - Specifies the transition effects for the item, such as for hover or focus states.
|
|
30
|
-
* @cssproperty [--wje-item-inner-box-shadow=var(--wje-box-shadow)] - Adds a shadow effect inside the item for a 3D appearance.
|
|
31
|
-
* @tag wje-item
|
|
32
|
-
*/
|
|
33
|
-
export default class Item extends WJElement {
|
|
34
|
-
/**
|
|
35
|
-
* Returns the CSS styles for the component.
|
|
36
|
-
* @static
|
|
37
|
-
* @returns {object} styles
|
|
38
|
-
*/
|
|
39
|
-
static get cssStyleSheet(): object;
|
|
40
|
-
labelColorStyles: {};
|
|
41
|
-
itemStyles: Map<any, any>;
|
|
42
|
-
inheritedAriaAttributes: {};
|
|
43
|
-
multipleInputs: boolean;
|
|
44
|
-
focusable: boolean;
|
|
45
|
-
button: boolean;
|
|
46
|
-
detailIcon: string;
|
|
47
|
-
disabled: boolean;
|
|
48
|
-
counter: boolean;
|
|
49
|
-
routerDirection: string;
|
|
50
|
-
type: string;
|
|
51
|
-
/**
|
|
52
|
-
* Returns the CSS styles for the component.
|
|
53
|
-
* @returns {boolean}
|
|
54
|
-
*/
|
|
55
|
-
isClickable(): boolean;
|
|
56
|
-
/**
|
|
57
|
-
* Draws the component for the item.
|
|
58
|
-
* @returns {DocumentFragment}
|
|
59
|
-
*/
|
|
60
|
-
draw(): DocumentFragment;
|
|
61
|
-
/**
|
|
62
|
-
* Determines if the given element or any of its ancestors matches the specified selector.
|
|
63
|
-
* @param {string} selector The CSS selector to match against the element's ancestors.
|
|
64
|
-
* @param {HTMLElement} el The element from which to start the search.
|
|
65
|
-
* @returns {boolean} - Returns `true` if the element or one of its ancestors matches the selector; otherwise, `false`.
|
|
66
|
-
*/
|
|
67
|
-
hostContext: (selector: string, el: HTMLElement) => boolean;
|
|
68
|
-
}
|