wj-elements 0.1.140 → 0.1.142

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/dist/dark.css +6 -2
  2. package/dist/infinite-scroll.element-XVJukzjy.js.map +1 -1
  3. package/dist/light.css +14 -2
  4. package/dist/localize.js +2 -6
  5. package/dist/localize.js.map +1 -1
  6. package/dist/packages/index.d.ts +2 -0
  7. package/dist/packages/localize/localize.d.ts +1 -1
  8. package/dist/packages/translations/en-gb.d.ts +5 -0
  9. package/dist/packages/utils/permissions-api.d.ts +2 -2
  10. package/dist/packages/wje-accordion/accordion.element.d.ts +2 -2
  11. package/dist/packages/wje-accordion-item/accordion-item.element.d.ts +1 -1
  12. package/dist/packages/wje-animation/animation.element.d.ts +1 -1
  13. package/dist/packages/wje-aside/aside.element.d.ts +1 -1
  14. package/dist/packages/wje-badge/badge.element.d.ts +1 -1
  15. package/dist/packages/wje-breadcrumb/breadcrumb.element.d.ts +2 -2
  16. package/dist/packages/wje-breadcrumbs/breadcrumbs.element.d.ts +3 -3
  17. package/dist/packages/wje-button/button.element.d.ts +5 -5
  18. package/dist/packages/wje-button-group/button-group.element.d.ts +2 -2
  19. package/dist/packages/wje-card/card.element.d.ts +1 -1
  20. package/dist/packages/wje-card-content/card-content.element.d.ts +1 -1
  21. package/dist/packages/wje-card-controls/card-controls.element.d.ts +1 -1
  22. package/dist/packages/wje-card-header/card-header.element.d.ts +1 -1
  23. package/dist/packages/wje-card-subtitle/card-subtitle.element.d.ts +1 -1
  24. package/dist/packages/wje-card-title/card-title.element.d.ts +1 -1
  25. package/dist/packages/wje-carousel/carousel.element.d.ts +2 -2
  26. package/dist/packages/wje-chip/chip.element.d.ts +1 -0
  27. package/dist/packages/wje-color-picker/color-picker.element.d.ts +4 -4
  28. package/dist/packages/wje-color-picker/color-picker.test.d.ts +1 -0
  29. package/dist/packages/wje-container/container.element.d.ts +1 -1
  30. package/dist/packages/wje-dialog/dialog.element.d.ts +2 -2
  31. package/dist/packages/wje-dropdown/dropdown.element.d.ts +2 -2
  32. package/dist/packages/wje-element/element.d.ts +2 -2
  33. package/dist/packages/wje-file-upload/file-upload.element.d.ts +2 -2
  34. package/dist/packages/wje-file-upload-item/file-upload-item.element.d.ts +1 -1
  35. package/dist/packages/wje-footer/footer.element.d.ts +1 -1
  36. package/dist/packages/wje-format-digital/format-digital.element.d.ts +1 -1
  37. package/dist/packages/wje-header/header.element.d.ts +1 -1
  38. package/dist/packages/wje-icon/icon.element.d.ts +1 -1
  39. package/dist/packages/wje-icon-picker/icon-picker.element.d.ts +1 -1
  40. package/dist/packages/wje-img/img.element.d.ts +1 -1
  41. package/dist/packages/wje-img-comparer/img-comparer.element.d.ts +1 -1
  42. package/dist/packages/wje-infinite-scroll/infinite-scroll.element.d.ts +3 -3
  43. package/dist/packages/wje-input-file/input-file.element.d.ts +1 -1
  44. package/dist/packages/wje-item/item.element.d.ts +1 -1
  45. package/dist/packages/wje-kanban/kanban.element.d.ts +3 -3
  46. package/dist/packages/wje-label/label.element.d.ts +1 -1
  47. package/dist/packages/wje-level-indicator/level-indicator.d.ts +2 -0
  48. package/dist/packages/wje-level-indicator/level-indicator.element.d.ts +91 -0
  49. package/dist/packages/wje-main/main.element.d.ts +1 -1
  50. package/dist/packages/wje-menu/menu.element.d.ts +1 -1
  51. package/dist/packages/wje-menu-button/menu-button.element.d.ts +1 -1
  52. package/dist/packages/wje-menu-label/menu-label.element.d.ts +1 -1
  53. package/dist/packages/wje-option/option.element.d.ts +1 -1
  54. package/dist/packages/wje-options/options.element.d.ts +1 -1
  55. package/dist/packages/wje-pagination/pagination.d.ts +2 -0
  56. package/dist/packages/wje-pagination/pagination.element.d.ts +166 -0
  57. package/dist/packages/wje-pagination/pagination.test.d.ts +1 -0
  58. package/dist/packages/wje-pagination/service/service.d.ts +9 -0
  59. package/dist/packages/wje-popup/popup.element.d.ts +1 -1
  60. package/dist/packages/wje-progress-bar/progress-bar.element.d.ts +1 -1
  61. package/dist/packages/wje-radio/radio.element.d.ts +1 -1
  62. package/dist/packages/wje-rate/rate.element.d.ts +3 -3
  63. package/dist/packages/wje-relative-time/relative-time.element.d.ts +1 -1
  64. package/dist/packages/wje-reorder/reorder.element.d.ts +1 -1
  65. package/dist/packages/wje-route/route.element.d.ts +1 -1
  66. package/dist/packages/wje-router/router.element.d.ts +1 -1
  67. package/dist/packages/wje-router-link/router-link.element.d.ts +1 -1
  68. package/dist/packages/wje-select/select.element.d.ts +2 -2
  69. package/dist/packages/wje-slider/slider.element.d.ts +1 -1
  70. package/dist/packages/wje-split-view/split-view.element.d.ts +1 -1
  71. package/dist/packages/wje-textarea/textarea.element.d.ts +1 -1
  72. package/dist/packages/wje-tree/tree.test.d.ts +1 -0
  73. package/dist/packages/wje-tree-item/tree-item.element.d.ts +2 -2
  74. package/dist/packages/wje-tree-item/tree-item.test.d.ts +1 -0
  75. package/dist/wje-animation.js +3 -3
  76. package/dist/wje-animation.js.map +1 -1
  77. package/dist/wje-button.js +4 -2
  78. package/dist/wje-button.js.map +1 -1
  79. package/dist/wje-checkbox.js +1 -1
  80. package/dist/wje-checkbox.js.map +1 -1
  81. package/dist/wje-chip.js +7 -2
  82. package/dist/wje-chip.js.map +1 -1
  83. package/dist/wje-color-picker.js.map +1 -1
  84. package/dist/wje-dialog.js +1 -1
  85. package/dist/wje-dialog.js.map +1 -1
  86. package/dist/wje-element.js +4 -4
  87. package/dist/wje-element.js.map +1 -1
  88. package/dist/wje-fetchAndParseCSS.js.map +1 -1
  89. package/dist/wje-file-upload-item.js.map +1 -1
  90. package/dist/wje-file-upload.js.map +1 -1
  91. package/dist/wje-format-digital.js.map +1 -1
  92. package/dist/wje-icon-picker.js +6 -8
  93. package/dist/wje-icon-picker.js.map +1 -1
  94. package/dist/wje-level-indicator.js +160 -0
  95. package/dist/wje-level-indicator.js.map +1 -0
  96. package/dist/wje-master.js +190 -651
  97. package/dist/wje-master.js.map +1 -1
  98. package/dist/wje-options.js +1 -6
  99. package/dist/wje-options.js.map +1 -1
  100. package/dist/wje-pagination.js +355 -0
  101. package/dist/wje-pagination.js.map +1 -0
  102. package/dist/wje-slider.js +1 -1
  103. package/dist/wje-slider.js.map +1 -1
  104. package/dist/wje-split-view.js.map +1 -1
  105. package/dist/wje-store.js +5 -7
  106. package/dist/wje-store.js.map +1 -1
  107. package/dist/wje-textarea.js +1 -4
  108. package/dist/wje-textarea.js.map +1 -1
  109. package/dist/wje-tree-item.js +371 -0
  110. package/dist/wje-tree-item.js.map +1 -0
  111. package/dist/wje-tree.js +205 -0
  112. package/dist/wje-tree.js.map +1 -0
  113. package/package.json +6 -3
  114. /package/dist/packages/{bundle.d.ts → wje-accordion/accordion.test.d.ts} +0 -0
@@ -22,7 +22,7 @@ export default class Icon extends WJElement {
22
22
  * @static
23
23
  * @returns {Array<string>}
24
24
  */
25
- static get observedAttributes(): Array<string>;
25
+ static get observedAttributes(): string[];
26
26
  /**
27
27
  * Draws the component.
28
28
  * @param {object} context The context for drawing.
@@ -36,7 +36,7 @@ export default class IconPicker extends WJElement {
36
36
  * @static
37
37
  * @returns {Array<string>}
38
38
  */
39
- static get observedAttributes(): Array<string>;
39
+ static get observedAttributes(): string[];
40
40
  /**
41
41
  * Dependencies of the IconPicker component.
42
42
  * @property {object} dependencies
@@ -20,7 +20,7 @@ export default class Img extends WJElement {
20
20
  * @static
21
21
  * @returns {Array<string>}
22
22
  */
23
- static get observedAttributes(): Array<string>;
23
+ static get observedAttributes(): string[];
24
24
  set loader(value: string);
25
25
  get loader(): string;
26
26
  /**
@@ -29,7 +29,7 @@ export default class ImgComparer extends WJElement {
29
29
  * @static
30
30
  * @returns {Array<string>}
31
31
  */
32
- static get observedAttributes(): Array<string>;
32
+ static get observedAttributes(): string[];
33
33
  /**
34
34
  * Dependencies of the ImgComparer component.
35
35
  * @property {object} dependencies
@@ -25,7 +25,7 @@ export default class InfiniteScroll extends WJElement {
25
25
  * @static
26
26
  * @returns {Array<string>}
27
27
  */
28
- static get observedAttributes(): Array<string>;
28
+ static get observedAttributes(): string[];
29
29
  totalPages: number;
30
30
  isLoading: any[];
31
31
  _response: {};
@@ -47,12 +47,12 @@ export default class InfiniteScroll extends WJElement {
47
47
  * Dependencies of the InfiniteScroll component.
48
48
  * @param value
49
49
  */
50
- set response(value: any | {});
50
+ set response(value: any);
51
51
  /**
52
52
  * Getter for the response property.
53
53
  * @returns {*|{}}
54
54
  */
55
- get response(): any | {};
55
+ get response(): any;
56
56
  /**
57
57
  * Dependencies of the InfiniteScroll component.
58
58
  * @param value
@@ -17,7 +17,7 @@ export default class InputFile extends WJElement {
17
17
  * @static
18
18
  * @returns {object} styles
19
19
  */
20
- static get cssStyleSheet(): object;
20
+ static get cssStyleSheet(): any;
21
21
  /**
22
22
  * Returns the observed attributes.
23
23
  * @static
@@ -36,7 +36,7 @@ export default class Item extends WJElement {
36
36
  * @static
37
37
  * @returns {object} styles
38
38
  */
39
- static get cssStyleSheet(): object;
39
+ static get cssStyleSheet(): any;
40
40
  labelColorStyles: {};
41
41
  itemStyles: Map<any, any>;
42
42
  inheritedAriaAttributes: {};
@@ -24,7 +24,7 @@ export default class Kanban extends WJElement {
24
24
  * @static
25
25
  * @returns {Array<string>}
26
26
  */
27
- static get observedAttributes(): Array<string>;
27
+ static get observedAttributes(): string[];
28
28
  totalPages: number;
29
29
  isLoading: any[];
30
30
  _response: {};
@@ -41,12 +41,12 @@ export default class Kanban extends WJElement {
41
41
  * Sets the URL for fetching data.
42
42
  * @param value {string}
43
43
  */
44
- set response(value: string);
44
+ set response(value: any);
45
45
  /**
46
46
  * Gets the URL for fetching data.
47
47
  * @returns {*|{}|{}}
48
48
  */
49
- get response(): any | {} | {};
49
+ get response(): any;
50
50
  /**
51
51
  * Sets the URL for fetching data.
52
52
  * @param value {array}
@@ -25,7 +25,7 @@ export default class Label extends WJElement {
25
25
  * @static
26
26
  * @returns {Array<string>}
27
27
  */
28
- static get observedAttributes(): Array<string>;
28
+ static get observedAttributes(): string[];
29
29
  /**
30
30
  * Draws the component.
31
31
  * @returns {DocumentFragment}
@@ -0,0 +1,2 @@
1
+ import { default as LevelIndicator } from './level-indicator.element.js';
2
+ export default LevelIndicator;
@@ -0,0 +1,91 @@
1
+ import { default as WJElement } from '../wje-element/element.js';
2
+ /**
3
+ * @summary LevelIndicator is a custom web component that extends WJElement.
4
+ * @documentation https://elements.webjet.sk/components/LevelIndicator
5
+ * @status stable
6
+ * @augments WJElement
7
+ * @csspart - Styles the element.
8
+ * @tag wje-level-indicator
9
+ * @example
10
+ * <wje-level-indicator></wje-level-indicator>
11
+ */
12
+ export default class LevelIndicator extends WJElement {
13
+ /**
14
+ * Returns the CSS styles for the component.
15
+ * @static
16
+ * @returns {CSSStyleSheet}
17
+ */
18
+ static get cssStyleSheet(): CSSStyleSheet;
19
+ /**
20
+ * Sets the level attribute for an instance.
21
+ * @param {string} value The value to set for the 'level' attribute.
22
+ */
23
+ set level(value: number);
24
+ /**
25
+ * Retrieves the level attribute of an element, with validation to ensure
26
+ * it is within the range of 0 to 3. If the level attribute is not present,
27
+ * the default value is 1. The result is parsed as an integer and constrained
28
+ * to the valid range.
29
+ * @returns {number} The normalized level value, which is an integer between 0 and 3.
30
+ */
31
+ get level(): number;
32
+ /**
33
+ * Sets the value of the "bars" attribute.
34
+ * @param {string} value The value to set for the "bars" attribute.
35
+ */
36
+ set bars(value: number);
37
+ /**
38
+ * Retrieves the value of the "bars" attribute, parses it as an integer,
39
+ * and ensures it is at least 1. If the attribute is not set, defaults to 3.
40
+ * @returns {number} The parsed integer value of the "bars" attribute or the default value of 3, constrained to a minimum of 1.
41
+ */
42
+ get bars(): number;
43
+ /**
44
+ * Sets the 'colorize' attribute on the element. If the provided value is truthy,
45
+ * the attribute will be set. If the value is falsy, the attribute will be removed.
46
+ * @param {boolean} value A boolean determining whether to set or remove the 'colorize' attribute.
47
+ */
48
+ set colorize(value: boolean);
49
+ /**
50
+ * Determines whether the element has the "colorize" attribute set.
51
+ * @returns {boolean} Returns true if the "colorize" attribute is present, otherwise false.
52
+ */
53
+ get colorize(): boolean;
54
+ /**
55
+ * Sets the 'reverse' attribute on the element. If the provided value is truthy, the attribute is added;
56
+ * otherwise, the attribute is removed.
57
+ * @param {boolean} value The value determining whether to set or remove the 'reverse' attribute.
58
+ */
59
+ set reverse(value: boolean);
60
+ /**
61
+ * Getter method to check if the "reverse" attribute is present on the element.
62
+ * @returns {boolean} Returns true if the "reverse" attribute is set; otherwise, returns false.
63
+ */
64
+ get reverse(): boolean;
65
+ /**
66
+ * Creates a document fragment, appends a new slot element to it, and returns the fragment.
67
+ * @returns {DocumentFragment} A document fragment containing a slot element.
68
+ */
69
+ draw(): DocumentFragment;
70
+ barsArray: any[];
71
+ native: HTMLDivElement;
72
+ /**
73
+ * Executes any additional operations or updates required after the drawing process is completed.
74
+ * @returns {void} This method does not return any value.
75
+ */
76
+ afterDraw(): void;
77
+ /**
78
+ * Updates the class of each bar element based on the specified level.
79
+ * @param {number} level The threshold level determining how many bars should be active.
80
+ * @param {Array} bars An array of bar elements to be updated.
81
+ * @returns {void} This method does not return a value.
82
+ */
83
+ updateBars(level: number, bars: any[]): void;
84
+ /**
85
+ * Determines the color indicator based on the given level and bars.
86
+ * @param {number} level The current value level used to calculate the ratio.
87
+ * @param {number} bars The maximum value that level can reach.
88
+ * @returns {string | undefined} A string representing the color code based on the ratio, or undefined if colorize is disabled.
89
+ */
90
+ getColor(level: number, bars: number): string | undefined;
91
+ }
@@ -21,7 +21,7 @@ export default class Main extends WJElement {
21
21
  * @static
22
22
  * @returns {Array<string>}
23
23
  */
24
- static get observedAttributes(): Array<string>;
24
+ static get observedAttributes(): string[];
25
25
  /**
26
26
  * Draws the component for the main section.
27
27
  * @returns {DocumentFragment}
@@ -34,7 +34,7 @@ export default class Menu extends WJElement {
34
34
  * @static
35
35
  * @returns {Array<string>}
36
36
  */
37
- static get observedAttributes(): Array<string>;
37
+ static get observedAttributes(): string[];
38
38
  /**
39
39
  * Draws the component for the menu.
40
40
  * @returns {DocumentFragment}
@@ -21,7 +21,7 @@ export default class MenuButton extends WJElement {
21
21
  * @static
22
22
  * @returns {Array<string>}
23
23
  */
24
- static get observedAttributes(): Array<string>;
24
+ static get observedAttributes(): string[];
25
25
  /**
26
26
  * Draws the component for the menu button.
27
27
  * @returns {DocumentFragment}
@@ -29,7 +29,7 @@ export default class MenuLabel extends WJElement {
29
29
  * @static
30
30
  * @returns {Array<string>}
31
31
  */
32
- static get observedAttributes(): Array<string>;
32
+ static get observedAttributes(): string[];
33
33
  hasSubmenu: boolean;
34
34
  /**
35
35
  * Draws the component for the menu label.
@@ -25,7 +25,7 @@ export default class Option extends WJElement {
25
25
  * @static
26
26
  * @returns {Array<string>}
27
27
  */
28
- static get observedAttributes(): Array<string>;
28
+ static get observedAttributes(): string[];
29
29
  /**
30
30
  * Dependencies of the Option component.
31
31
  */
@@ -18,7 +18,7 @@ export default class Options extends WJElement {
18
18
  * @static
19
19
  * @returns {Array<string>}
20
20
  */
21
- static get observedAttributes(): Array<string>;
21
+ static get observedAttributes(): string[];
22
22
  _loadedOptions: any[];
23
23
  dependencies: {
24
24
  'wje-option': typeof Option;
@@ -0,0 +1,2 @@
1
+ import { default as Pagination } from './pagination.element.js';
2
+ export default Pagination;
@@ -0,0 +1,166 @@
1
+ import { default as WJElement } from '../wje-element/element.js';
2
+ import { Localizer } from '../utils/localize.js';
3
+ /**
4
+ * @summary This class represents the Pagination component for navigating through paginated content and dynamically updating navigation elements based on attributes like the number of items, page size, etc. Extends the WJElement class.
5
+ * @documentation https://elements.webjet.sk/components/pagination
6
+ * @status stable
7
+ * @augments WJElement
8
+ * @dependency wje-icon, wje-button
9
+ * @csspart native - The wrapper element for the pagination component.
10
+ */
11
+ export default class Pagination extends WJElement {
12
+ /**
13
+ * Returns the CSS styles for the component.
14
+ * @static
15
+ * @returns {CSSStyleSheet}
16
+ */
17
+ static get cssStyleSheet(): CSSStyleSheet;
18
+ /**
19
+ * Getter for the observedAttributes attribute of the input element.
20
+ * @returns {Array} The attributes to observe for changes.
21
+ */
22
+ static get observedAttributes(): any[];
23
+ localizer: Localizer;
24
+ _paginateObj: any;
25
+ /**
26
+ * Sets the value of the 'page' attribute for the object.
27
+ * @param {string} value The value to set for the 'page' attribute.
28
+ */
29
+ set page(value: number);
30
+ /**
31
+ * Retrieves the current page number as a numeric value.
32
+ * @returns {number} The current page number. Returns 0 if the attribute 'page' is not set or is not a numeric value.
33
+ */
34
+ get page(): number;
35
+ /**
36
+ * Sets the maximum number of pages.
37
+ * Updates the 'max-pages' attribute with the provided value.
38
+ * @param {number|string} value The maximum number of pages to set. Can be a number or a parsable string representing a number.
39
+ */
40
+ set maxPages(value: number);
41
+ /**
42
+ * Gets the maximum number of pages.
43
+ * This getter retrieves the value of the "max-pages" attribute from the element.
44
+ * If the attribute is not set or is invalid, it defaults to 3.
45
+ * @returns {number} The maximum number of pages as a numeric value.
46
+ */
47
+ get maxPages(): number;
48
+ /**
49
+ * Sets the `pageSize` attribute to the specified value.
50
+ * @param {number|string} value The desired page size value. This can be a number or a string representation of the size.
51
+ */
52
+ set pageSize(value: number);
53
+ /**
54
+ * Retrieves the value of the 'page-size' attribute and converts it to a number.
55
+ * If the attribute is not set or is invalid, returns the default value of 3.
56
+ * @returns {number} The numeric value of the 'page-size' attribute or the default value of 3.
57
+ */
58
+ get pageSize(): number;
59
+ /**
60
+ * Sets the total number of items.
61
+ * @param {number} value The new total number of items to set.
62
+ */
63
+ set totalItems(value: number);
64
+ /**
65
+ * Retrieves the total number of items represented by the 'total-items' attribute.
66
+ * @returns {number} The total number of items. Defaults to 0 if the attribute is not set or is invalid.
67
+ */
68
+ get totalItems(): number;
69
+ /**
70
+ * Sets the visibility of the first button based on the provided value.
71
+ * Adds the 'show-first-button' attribute when the value is truthy, and removes it otherwise.
72
+ * @param {boolean} value Determines whether to show the first button. If true, the 'show-first-button' attribute is added; if false, it is removed.
73
+ */
74
+ set showFirstButton(value: boolean);
75
+ /**
76
+ * Determines whether the 'show-first-button' attribute is present on the element.
77
+ * @returns {boolean} True if the 'show-first-button' attribute is set; otherwise, false.
78
+ */
79
+ get showFirstButton(): boolean;
80
+ /**
81
+ * Sets the visibility of the "last" button. This method controls the presence
82
+ * or absence of the "show-last-button" attribute based on the provided value.
83
+ * @param {boolean} value A boolean value indicating whether to show the "last" button.
84
+ * If true, the "show-last-button" attribute is added;
85
+ * if false, the attribute is removed.
86
+ */
87
+ set showLastButton(value: boolean);
88
+ /**
89
+ * Determines if the 'show-last-button' attribute is present on the element.
90
+ * @returns {boolean} True if the 'show-last-button' attribute is present, otherwise false.
91
+ */
92
+ get showLastButton(): boolean;
93
+ /**
94
+ * Sets the pagination object by calculating the pagination details
95
+ * based on the total items, current page, page size, and maximum pages.
96
+ * @param {object} value The value to set the pagination object. The pagination details are computed internally.
97
+ */
98
+ set paginateObj(value: any);
99
+ /**
100
+ * Retrieves the pagination object used for managing paginated data.
101
+ * @returns {object} The pagination object containing details and functionality for paginating data.
102
+ */
103
+ get paginateObj(): any;
104
+ /**
105
+ * Sets the 'round' attribute on the element. If the provided value is truthy,
106
+ * the 'round' attribute is added. If the value is falsy, the attribute is removed.
107
+ * @param {boolean} value A boolean value determining whether to add or remove the 'round' attribute.
108
+ */
109
+ set round(value: boolean);
110
+ /**
111
+ * Retrieves the value of the 'round' attribute for the current element.
112
+ * @returns {boolean} A boolean indicating whether the 'round' attribute is present on the element.
113
+ */
114
+ get round(): boolean;
115
+ /**
116
+ * Sets the `show-info` attribute on the element based on the provided value.
117
+ * @param {boolean} value A boolean indicating whether to add or remove the `show-info` attribute.
118
+ */
119
+ set showInfo(value: boolean);
120
+ /**
121
+ * Retrieves the value of the 'show-info' attribute.
122
+ * Checks if the 'show-info' attribute is present on the element.
123
+ * @returns {boolean} True if the 'show-info' attribute is present, otherwise false.
124
+ */
125
+ get showInfo(): boolean;
126
+ /**
127
+ * Dependencies of the Button element.
128
+ * @type {object}
129
+ */
130
+ dependencies: object;
131
+ beforeDraw(): Promise<void>;
132
+ /**
133
+ * Creates a document fragment, appends a new slot element to it, and returns the fragment.
134
+ * @returns {DocumentFragment} A document fragment containing a slot element.
135
+ */
136
+ draw(): DocumentFragment;
137
+ /**
138
+ * Creates a pagination control for navigating between pages of content.
139
+ * This method generates and returns a document fragment containing pagination controls, including buttons for navigating to the first, previous, next, and last pages, as well as optional informational text about the current set of displayed items and total number of items.
140
+ * @returns {DocumentFragment} A document fragment containing the pagination controls.
141
+ */
142
+ htmlPagination(): DocumentFragment;
143
+ /**
144
+ * Creates and returns a DocumentFragment containing a series of buttons for pagination purposes,
145
+ * based on the provided pagination object.
146
+ * @param {object} paginateObj An object containing pagination details.
147
+ * @param {number} paginateObj.currentPage The current active page index (1-based).
148
+ * @param {Array<number>} paginateObj.pages An array of page numbers to display in the pagination.
149
+ * @param {number} paginateObj.totalPages Total number of pages available for pagination.
150
+ * @returns {DocumentFragment} A DocumentFragment containing the buttons and additional pagination elements.
151
+ */
152
+ htmlStackButtons(paginateObj: {
153
+ currentPage: number;
154
+ pages: Array<number>;
155
+ totalPages: number;
156
+ }): DocumentFragment;
157
+ /**
158
+ * Handles the click action for pagination and updates the current page.
159
+ * If the clicked page number is the same as the current page, no action is performed.
160
+ * Otherwise, the current page is updated to the new page number, and a custom event
161
+ * 'wje-pagination:page-change' is dispatched with the pagination object.
162
+ * @param {Event} e The event triggered by the page click.
163
+ * @param {number} page The page number that was clicked.
164
+ */
165
+ pageClickAction: (e: Event, page: number) => void;
166
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Paginates items based on the total number of items, current page, page size, and maximum number of pages to display.
3
+ * @param {number} totalItems The total number of items to paginate.
4
+ * @param {number} [currentPage] The current page number (default is 1).
5
+ * @param {number} [pageSize] The number of items per page (default is 10).
6
+ * @param {number} [maxPages] The maximum number of pages to display in the pagination control (default is 5).
7
+ * @returns {object} An object containing pagination details including total items, current page, page size, total pages, start/end page, start/end index, and the pages array.
8
+ */
9
+ export function paginate(totalItems: number, currentPage?: number, pageSize?: number, maxPages?: number): object;
@@ -26,7 +26,7 @@ export default class Popup extends WJElement {
26
26
  * @static
27
27
  * @returns {Array<string>}
28
28
  */
29
- static get observedAttributes(): Array<string>;
29
+ static get observedAttributes(): string[];
30
30
  _manual: boolean;
31
31
  /**
32
32
  * Sets the manual property of the popup.
@@ -25,7 +25,7 @@ export default class ProgressBar extends WJElement {
25
25
  * @static
26
26
  * @returns {Array<string>}
27
27
  */
28
- static get observedAttributes(): Array<string>;
28
+ static get observedAttributes(): string[];
29
29
  /**
30
30
  * Sets the radius of the progress bar.
31
31
  * @param {number} value The value to set.
@@ -23,7 +23,7 @@ export default class Radio extends WJElement {
23
23
  * @static
24
24
  * @returns {Array<string>}
25
25
  */
26
- static get observedAttributes(): Array<string>;
26
+ static get observedAttributes(): string[];
27
27
  _checked: boolean;
28
28
  /**
29
29
  * Sets the name of the radio button.
@@ -26,7 +26,7 @@ export default class Rate extends WJElement {
26
26
  * @static
27
27
  * @returns {Array<string>}
28
28
  */
29
- static get observedAttributes(): Array<string>;
29
+ static get observedAttributes(): string[];
30
30
  /**
31
31
  * Sets the precision of the rating component.
32
32
  * @param {number} value The value to set.
@@ -51,12 +51,12 @@ export default class Rate extends WJElement {
51
51
  * Sets the icons of the rating component.
52
52
  * @param {Array<string>} value The value to set.
53
53
  */
54
- set icons(value: Array<string>);
54
+ set icons(value: string[]);
55
55
  /**
56
56
  * Gets the icons of the rating component.
57
57
  * @returns {Array<string>} The value of the icons.
58
58
  */
59
- get icons(): Array<string>;
59
+ get icons(): string[];
60
60
  /**
61
61
  * Sets the value of the rating component.
62
62
  * @param {number} value The value to set.
@@ -15,7 +15,7 @@ export default class RelativeTime extends WJElement {
15
15
  * @static
16
16
  * @returns {Array<string>}
17
17
  */
18
- static get observedAttributes(): Array<string>;
18
+ static get observedAttributes(): string[];
19
19
  localizer: Localizer;
20
20
  /**
21
21
  * Sets the date of the relative time component.
@@ -23,7 +23,7 @@ export default class Reorder extends WJElement {
23
23
  * @static
24
24
  * @returns {Array<string>}
25
25
  */
26
- static get observedAttributes(): Array<string>;
26
+ static get observedAttributes(): string[];
27
27
  dragEl: Element;
28
28
  items: any[];
29
29
  originalIndex: number;
@@ -13,7 +13,7 @@ export default class Route extends WJElement {
13
13
  * @static
14
14
  * @returns {Array<string>}
15
15
  */
16
- static get observedAttributes(): Array<string>;
16
+ static get observedAttributes(): string[];
17
17
  /**
18
18
  * Draws the component for the route.
19
19
  * @returns {DocumentFragment}
@@ -13,7 +13,7 @@ export default class Routerx extends WJElement {
13
13
  * @static
14
14
  * @returns {Array<string>}
15
15
  */
16
- static get observedAttributes(): Array<string>;
16
+ static get observedAttributes(): string[];
17
17
  /**
18
18
  * Sets up the router after the component is drawn.
19
19
  */
@@ -20,7 +20,7 @@ export default class RouterLink extends WJElement {
20
20
  * @static
21
21
  * @returns {Array<string>}
22
22
  */
23
- static get observedAttributes(): Array<string>;
23
+ static get observedAttributes(): string[];
24
24
  /**
25
25
  * Draws the component for the router link.
26
26
  * @returns {DocumentFragment}
@@ -43,7 +43,7 @@ export default class Select extends WJElement {
43
43
  * @static
44
44
  * @returns {Array<string>}
45
45
  */
46
- static get observedAttributes(): Array<string>;
46
+ static get observedAttributes(): string[];
47
47
  /**
48
48
  * Whether the input is associated with a form.
49
49
  * @type {boolean}
@@ -221,7 +221,7 @@ export default class Select extends WJElement {
221
221
  * selections(true);
222
222
  */
223
223
  selections(silence?: boolean): void;
224
- selectedOptions: (NodeList & any[]) | Node[];
224
+ selectedOptions: Node[] | (NodeList & any[]);
225
225
  /**
226
226
  * Manages the display of a counter element to indicate the number of items exceeding the maximum allowed options.
227
227
  * - If the number of selected items equals the maximum allowed, the counter element is removed.
@@ -16,7 +16,7 @@ export default class Slider extends WJElement {
16
16
  * @static
17
17
  * @returns {Array<string>}
18
18
  */
19
- static get observedAttributes(): Array<string>;
19
+ static get observedAttributes(): string[];
20
20
  /**
21
21
  * Sets the value of the slider.
22
22
  * @param {number} value The value to set.
@@ -34,7 +34,7 @@ export default class SplitView extends WJElement {
34
34
  * @static
35
35
  * @returns {Array<string>}
36
36
  */
37
- static get observedAttributes(): Array<string>;
37
+ static get observedAttributes(): string[];
38
38
  set initial(value: number);
39
39
  get initial(): number;
40
40
  /**
@@ -39,7 +39,7 @@ export default class Textarea extends WJElement {
39
39
  * @static
40
40
  * @returns {Array<string>}
41
41
  */
42
- static get observedAttributes(): Array<string>;
42
+ static get observedAttributes(): string[];
43
43
  /**
44
44
  * Setter for the invalid attribute.
45
45
  * @param {boolean} isInvalid Whether the input is invalid.
@@ -0,0 +1 @@
1
+ export {};
@@ -24,7 +24,7 @@ export default class TreeItem extends HTMLElement {
24
24
  * @static
25
25
  * @returns {Array<string>}
26
26
  */
27
- static get observedAttributes(): Array<string>;
27
+ static get observedAttributes(): string[];
28
28
  _selection: string;
29
29
  /**
30
30
  * Sets the expanded state of the element. When set to a truthy value,
@@ -59,7 +59,7 @@ export default class TreeItem extends HTMLElement {
59
59
  * specific to the implementation of the component
60
60
  * (e.g., 'single', 'multiple').
61
61
  */
62
- set selection(value: string);
62
+ set selection(value: any);
63
63
  /**
64
64
  * Retrieves the current selection.
65
65
  * @returns {*} The value of the current selection.
@@ -0,0 +1 @@
1
+ export {};