wj-elements 0.1.149 → 0.1.151

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 (238) hide show
  1. package/dist/wje-element.js +3 -1
  2. package/dist/wje-element.js.map +1 -1
  3. package/dist/wje-img.js +2 -2
  4. package/dist/wje-img.js.map +1 -1
  5. package/dist/wje-pagination.js +3 -3
  6. package/dist/wje-pagination.js.map +1 -1
  7. package/package.json +1 -1
  8. package/dist/packages/index.d.ts +0 -104
  9. package/dist/packages/localize/localize.d.ts +0 -17
  10. package/dist/packages/translations/en-gb.d.ts +0 -18
  11. package/dist/packages/translations/sk-sk.d.ts +0 -13
  12. package/dist/packages/utils/animations.d.ts +0 -2
  13. package/dist/packages/utils/date.d.ts +0 -1
  14. package/dist/packages/utils/element-utils.d.ts +0 -46
  15. package/dist/packages/utils/event.d.ts +0 -67
  16. package/dist/packages/utils/localize.d.ts +0 -4
  17. package/dist/packages/utils/permissions-api.d.ts +0 -34
  18. package/dist/packages/utils/utils.d.ts +0 -1
  19. package/dist/packages/utils/wje-import-firefox.d.ts +0 -0
  20. package/dist/packages/utils/wje-import.d.ts +0 -0
  21. package/dist/packages/wje-accordion/accordion.d.ts +0 -2
  22. package/dist/packages/wje-accordion/accordion.element.d.ts +0 -72
  23. package/dist/packages/wje-accordion/accordion.test.d.ts +0 -0
  24. package/dist/packages/wje-accordion-item/accordion-item.d.ts +0 -2
  25. package/dist/packages/wje-accordion-item/accordion-item.element.d.ts +0 -40
  26. package/dist/packages/wje-animation/animation.d.ts +0 -2
  27. package/dist/packages/wje-animation/animation.element.d.ts +0 -158
  28. package/dist/packages/wje-animation/animation.test.d.ts +0 -1
  29. package/dist/packages/wje-aside/aside.d.ts +0 -2
  30. package/dist/packages/wje-aside/aside.element.d.ts +0 -31
  31. package/dist/packages/wje-avatar/avatar.d.ts +0 -2
  32. package/dist/packages/wje-avatar/avatar.element.d.ts +0 -76
  33. package/dist/packages/wje-avatar/avatar.test.d.ts +0 -1
  34. package/dist/packages/wje-avatar/service/service.d.ts +0 -40
  35. package/dist/packages/wje-badge/badge.d.ts +0 -2
  36. package/dist/packages/wje-badge/badge.element.d.ts +0 -35
  37. package/dist/packages/wje-badge/badge.test.d.ts +0 -1
  38. package/dist/packages/wje-breadcrumb/breadcrumb.d.ts +0 -2
  39. package/dist/packages/wje-breadcrumb/breadcrumb.element.d.ts +0 -80
  40. package/dist/packages/wje-breadcrumbs/breadcrumbs.d.ts +0 -2
  41. package/dist/packages/wje-breadcrumbs/breadcrumbs.element.d.ts +0 -97
  42. package/dist/packages/wje-breadcrumbs/breadcrumbs.test.d.ts +0 -1
  43. package/dist/packages/wje-button/button.d.ts +0 -2
  44. package/dist/packages/wje-button/button.element.d.ts +0 -173
  45. package/dist/packages/wje-button/button.test.d.ts +0 -1
  46. package/dist/packages/wje-button-group/button-group.d.ts +0 -2
  47. package/dist/packages/wje-button-group/button-group.element.d.ts +0 -39
  48. package/dist/packages/wje-card/card.d.ts +0 -2
  49. package/dist/packages/wje-card/card.element.d.ts +0 -29
  50. package/dist/packages/wje-card-content/card-content.d.ts +0 -2
  51. package/dist/packages/wje-card-content/card-content.element.d.ts +0 -22
  52. package/dist/packages/wje-card-controls/card-controls.d.ts +0 -2
  53. package/dist/packages/wje-card-controls/card-controls.element.d.ts +0 -23
  54. package/dist/packages/wje-card-header/card-header.d.ts +0 -2
  55. package/dist/packages/wje-card-header/card-header.element.d.ts +0 -22
  56. package/dist/packages/wje-card-subtitle/card-subtitle.d.ts +0 -2
  57. package/dist/packages/wje-card-subtitle/card-subtitle.element.d.ts +0 -30
  58. package/dist/packages/wje-card-title/card-title.d.ts +0 -2
  59. package/dist/packages/wje-card-title/card-title.element.d.ts +0 -32
  60. package/dist/packages/wje-carousel/carousel.d.ts +0 -2
  61. package/dist/packages/wje-carousel/carousel.element.d.ts +0 -146
  62. package/dist/packages/wje-carousel-item/carousel-item.d.ts +0 -2
  63. package/dist/packages/wje-carousel-item/carousel-item.element.d.ts +0 -38
  64. package/dist/packages/wje-checkbox/checkbox.d.ts +0 -2
  65. package/dist/packages/wje-checkbox/checkbox.element.d.ts +0 -171
  66. package/dist/packages/wje-chip/chip.d.ts +0 -2
  67. package/dist/packages/wje-chip/chip.element.d.ts +0 -30
  68. package/dist/packages/wje-col/col.d.ts +0 -2
  69. package/dist/packages/wje-col/col.element.d.ts +0 -16
  70. package/dist/packages/wje-color-picker/color-picker.d.ts +0 -2
  71. package/dist/packages/wje-color-picker/color-picker.element.d.ts +0 -187
  72. package/dist/packages/wje-color-picker/color-picker.test.d.ts +0 -1
  73. package/dist/packages/wje-container/container.d.ts +0 -2
  74. package/dist/packages/wje-container/container.element.d.ts +0 -31
  75. package/dist/packages/wje-copy-button/copy-button.d.ts +0 -2
  76. package/dist/packages/wje-copy-button/copy-button.element.d.ts +0 -89
  77. package/dist/packages/wje-copy-button/service/service.d.ts +0 -12
  78. package/dist/packages/wje-dialog/dialog.d.ts +0 -2
  79. package/dist/packages/wje-dialog/dialog.element.d.ts +0 -116
  80. package/dist/packages/wje-divider/divider.d.ts +0 -2
  81. package/dist/packages/wje-divider/divider.element.d.ts +0 -32
  82. package/dist/packages/wje-dropdown/dropdown.d.ts +0 -2
  83. package/dist/packages/wje-dropdown/dropdown.element.d.ts +0 -85
  84. package/dist/packages/wje-element/element.d.ts +0 -315
  85. package/dist/packages/wje-element/service/universal-service.d.ts +0 -18
  86. package/dist/packages/wje-file-upload/file-upload.d.ts +0 -2
  87. package/dist/packages/wje-file-upload/file-upload.element.d.ts +0 -191
  88. package/dist/packages/wje-file-upload/service/service.d.ts +0 -70
  89. package/dist/packages/wje-file-upload-item/file-upload-item.d.ts +0 -2
  90. package/dist/packages/wje-file-upload-item/file-upload-item.element.d.ts +0 -66
  91. package/dist/packages/wje-footer/footer.d.ts +0 -2
  92. package/dist/packages/wje-footer/footer.element.d.ts +0 -28
  93. package/dist/packages/wje-form/form.d.ts +0 -2
  94. package/dist/packages/wje-form/form.element.d.ts +0 -28
  95. package/dist/packages/wje-format-digital/format-digital.d.ts +0 -2
  96. package/dist/packages/wje-format-digital/format-digital.element.d.ts +0 -87
  97. package/dist/packages/wje-format-digital/format-digital.test.d.ts +0 -1
  98. package/dist/packages/wje-grid/grid.d.ts +0 -2
  99. package/dist/packages/wje-grid/grid.element.d.ts +0 -26
  100. package/dist/packages/wje-header/header.d.ts +0 -2
  101. package/dist/packages/wje-header/header.element.d.ts +0 -35
  102. package/dist/packages/wje-icon/icon.d.ts +0 -2
  103. package/dist/packages/wje-icon/icon.element.d.ts +0 -40
  104. package/dist/packages/wje-icon/service/service.d.ts +0 -11
  105. package/dist/packages/wje-icon-picker/icon-picker.d.ts +0 -2
  106. package/dist/packages/wje-icon-picker/icon-picker.element.d.ts +0 -197
  107. package/dist/packages/wje-img/img.d.ts +0 -2
  108. package/dist/packages/wje-img/img.element.d.ts +0 -117
  109. package/dist/packages/wje-img-comparer/img-comparer.d.ts +0 -2
  110. package/dist/packages/wje-img-comparer/img-comparer.element.d.ts +0 -60
  111. package/dist/packages/wje-img-comparer/service/service.d.ts +0 -1
  112. package/dist/packages/wje-infinite-scroll/infinite-scroll.d.ts +0 -2
  113. package/dist/packages/wje-infinite-scroll/infinite-scroll.element.d.ts +0 -173
  114. package/dist/packages/wje-input/input.d.ts +0 -2
  115. package/dist/packages/wje-input/input.element.d.ts +0 -204
  116. package/dist/packages/wje-input-file/input-file.d.ts +0 -2
  117. package/dist/packages/wje-input-file/input-file.element.d.ts +0 -50
  118. package/dist/packages/wje-item/item.d.ts +0 -2
  119. package/dist/packages/wje-item/item.element.d.ts +0 -68
  120. package/dist/packages/wje-kanban/kanban.d.ts +0 -2
  121. package/dist/packages/wje-kanban/kanban.element.d.ts +0 -183
  122. package/dist/packages/wje-label/label.d.ts +0 -2
  123. package/dist/packages/wje-label/label.element.d.ts +0 -34
  124. package/dist/packages/wje-level-indicator/level-indicator.d.ts +0 -2
  125. package/dist/packages/wje-level-indicator/level-indicator.element.d.ts +0 -91
  126. package/dist/packages/wje-list/list.d.ts +0 -2
  127. package/dist/packages/wje-list/list.element.d.ts +0 -31
  128. package/dist/packages/wje-main/main.d.ts +0 -2
  129. package/dist/packages/wje-main/main.element.d.ts +0 -30
  130. package/dist/packages/wje-masonry/masonry.d.ts +0 -2
  131. package/dist/packages/wje-masonry/masonry.element.d.ts +0 -114
  132. package/dist/packages/wje-masonry/service/service.d.ts +0 -32
  133. package/dist/packages/wje-menu/menu.d.ts +0 -2
  134. package/dist/packages/wje-menu/menu.element.d.ts +0 -47
  135. package/dist/packages/wje-menu-button/menu-button.d.ts +0 -2
  136. package/dist/packages/wje-menu-button/menu-button.element.d.ts +0 -34
  137. package/dist/packages/wje-menu-item/menu-item.d.ts +0 -2
  138. package/dist/packages/wje-menu-item/menu-item.element.d.ts +0 -139
  139. package/dist/packages/wje-menu-label/menu-label.d.ts +0 -2
  140. package/dist/packages/wje-menu-label/menu-label.element.d.ts +0 -39
  141. package/dist/packages/wje-option/option.d.ts +0 -2
  142. package/dist/packages/wje-option/option.element.d.ts +0 -59
  143. package/dist/packages/wje-options/options.d.ts +0 -2
  144. package/dist/packages/wje-options/options.element.d.ts +0 -183
  145. package/dist/packages/wje-orgchart/orgchart.d.ts +0 -2
  146. package/dist/packages/wje-orgchart/orgchart.element.d.ts +0 -24
  147. package/dist/packages/wje-orgchart-group/orgchart-group.d.ts +0 -2
  148. package/dist/packages/wje-orgchart-group/orgchart-group.element.d.ts +0 -28
  149. package/dist/packages/wje-orgchart-item/orgchart-item.d.ts +0 -2
  150. package/dist/packages/wje-orgchart-item/orgchart-item.element.d.ts +0 -49
  151. package/dist/packages/wje-pagination/pagination.d.ts +0 -2
  152. package/dist/packages/wje-pagination/pagination.element.d.ts +0 -166
  153. package/dist/packages/wje-pagination/pagination.test.d.ts +0 -1
  154. package/dist/packages/wje-pagination/service/service.d.ts +0 -9
  155. package/dist/packages/wje-panel/panel.d.ts +0 -2
  156. package/dist/packages/wje-panel/panel.element.d.ts +0 -34
  157. package/dist/packages/wje-popup/popup.d.ts +0 -2
  158. package/dist/packages/wje-popup/popup.element.d.ts +0 -93
  159. package/dist/packages/wje-progress-bar/progress-bar.d.ts +0 -2
  160. package/dist/packages/wje-progress-bar/progress-bar.element.d.ts +0 -96
  161. package/dist/packages/wje-qr-code/qr-code.d.ts +0 -2
  162. package/dist/packages/wje-qr-code/qr-code.element.d.ts +0 -33
  163. package/dist/packages/wje-radio/radio.d.ts +0 -2
  164. package/dist/packages/wje-radio/radio.element.d.ts +0 -53
  165. package/dist/packages/wje-radio-group/radio-group.d.ts +0 -2
  166. package/dist/packages/wje-radio-group/radio-group.element.d.ts +0 -137
  167. package/dist/packages/wje-rate/rate.d.ts +0 -2
  168. package/dist/packages/wje-rate/rate.element.d.ts +0 -156
  169. package/dist/packages/wje-relative-time/relative-time.d.ts +0 -2
  170. package/dist/packages/wje-relative-time/relative-time.element.d.ts +0 -55
  171. package/dist/packages/wje-relative-time/relative-time.test.d.ts +0 -1
  172. package/dist/packages/wje-reorder/reorder.d.ts +0 -2
  173. package/dist/packages/wje-reorder/reorder.element.d.ts +0 -119
  174. package/dist/packages/wje-reorder-dropzone/reorder-dropzone.d.ts +0 -2
  175. package/dist/packages/wje-reorder-dropzone/reorder-dropzone.element.d.ts +0 -23
  176. package/dist/packages/wje-reorder-handle/reorder-handle.d.ts +0 -2
  177. package/dist/packages/wje-reorder-handle/reorder-handle.element.d.ts +0 -75
  178. package/dist/packages/wje-reorder-item/reorder-item.d.ts +0 -2
  179. package/dist/packages/wje-reorder-item/reorder-item.element.d.ts +0 -24
  180. package/dist/packages/wje-route/route.d.ts +0 -2
  181. package/dist/packages/wje-route/route.element.d.ts +0 -22
  182. package/dist/packages/wje-router/router.d.ts +0 -2
  183. package/dist/packages/wje-router/router.element.d.ts +0 -39
  184. package/dist/packages/wje-router-link/router-link.d.ts +0 -2
  185. package/dist/packages/wje-router-link/router-link.element.d.ts +0 -31
  186. package/dist/packages/wje-router-outlet/router-outlet.d.ts +0 -2
  187. package/dist/packages/wje-router-outlet/router-outlet.element.d.ts +0 -15
  188. package/dist/packages/wje-row/row.d.ts +0 -2
  189. package/dist/packages/wje-row/row.element.d.ts +0 -23
  190. package/dist/packages/wje-select/select.d.ts +0 -2
  191. package/dist/packages/wje-select/select.element.d.ts +0 -315
  192. package/dist/packages/wje-slider/slider.d.ts +0 -2
  193. package/dist/packages/wje-slider/slider.element.d.ts +0 -103
  194. package/dist/packages/wje-split-view/service/service.d.ts +0 -1
  195. package/dist/packages/wje-split-view/split-view.d.ts +0 -2
  196. package/dist/packages/wje-split-view/split-view.element.d.ts +0 -66
  197. package/dist/packages/wje-status/status.d.ts +0 -2
  198. package/dist/packages/wje-status/status.element.d.ts +0 -26
  199. package/dist/packages/wje-step/step.d.ts +0 -2
  200. package/dist/packages/wje-step/step.element.d.ts +0 -23
  201. package/dist/packages/wje-stepper/stepper.d.ts +0 -2
  202. package/dist/packages/wje-stepper/stepper.element.d.ts +0 -78
  203. package/dist/packages/wje-store/default-store-actions.d.ts +0 -25
  204. package/dist/packages/wje-store/pubsub.d.ts +0 -21
  205. package/dist/packages/wje-store/store.d.ts +0 -153
  206. package/dist/packages/wje-tab/tab.d.ts +0 -2
  207. package/dist/packages/wje-tab/tab.element.d.ts +0 -41
  208. package/dist/packages/wje-tab-group/tab-group.d.ts +0 -2
  209. package/dist/packages/wje-tab-group/tab-group.element.d.ts +0 -67
  210. package/dist/packages/wje-tab-panel/tab-panel.d.ts +0 -2
  211. package/dist/packages/wje-tab-panel/tab-panel.element.d.ts +0 -23
  212. package/dist/packages/wje-textarea/textarea.d.ts +0 -2
  213. package/dist/packages/wje-textarea/textarea.element.d.ts +0 -176
  214. package/dist/packages/wje-thumbnail/thumbnail.d.ts +0 -2
  215. package/dist/packages/wje-thumbnail/thumbnail.element.d.ts +0 -31
  216. package/dist/packages/wje-timeline/timeline.d.ts +0 -2
  217. package/dist/packages/wje-timeline/timeline.element.d.ts +0 -25
  218. package/dist/packages/wje-timeline-item/timeline-item.d.ts +0 -2
  219. package/dist/packages/wje-timeline-item/timeline-item.element.d.ts +0 -27
  220. package/dist/packages/wje-toast/toast.d.ts +0 -2
  221. package/dist/packages/wje-toast/toast.element.d.ts +0 -173
  222. package/dist/packages/wje-toast/toast.test.d.ts +0 -1
  223. package/dist/packages/wje-toggle/toggle.d.ts +0 -2
  224. package/dist/packages/wje-toggle/toggle.element.d.ts +0 -65
  225. package/dist/packages/wje-toolbar/toolbar.d.ts +0 -2
  226. package/dist/packages/wje-toolbar/toolbar.element.d.ts +0 -39
  227. package/dist/packages/wje-toolbar-action/toolbar-action.d.ts +0 -2
  228. package/dist/packages/wje-toolbar-action/toolbar-action.element.d.ts +0 -35
  229. package/dist/packages/wje-tooltip/tooltip.d.ts +0 -2
  230. package/dist/packages/wje-tooltip/tooltip.element.d.ts +0 -71
  231. package/dist/packages/wje-tree/tree.d.ts +0 -2
  232. package/dist/packages/wje-tree/tree.element.d.ts +0 -104
  233. package/dist/packages/wje-tree/tree.test.d.ts +0 -1
  234. package/dist/packages/wje-tree-item/tree-item.d.ts +0 -2
  235. package/dist/packages/wje-tree-item/tree-item.element.d.ts +0 -155
  236. package/dist/packages/wje-tree-item/tree-item.test.d.ts +0 -1
  237. package/dist/packages/wje-visually-hidden/visually-hidden.d.ts +0 -2
  238. package/dist/packages/wje-visually-hidden/visually-hidden.element.d.ts +0 -29
@@ -1,21 +0,0 @@
1
- export default class PubSub {
2
- events: {};
3
- /**
4
- * Either create a new event instance for passed `event` name.
5
- * or push a new callback into the existing collection.
6
- * @param {string} event The event name to subscribe to
7
- * @param {Function} callback The callback function to subscribe to the event
8
- * @returns {number} A count of callbacks for this event
9
- * @memberof PubSub
10
- */
11
- subscribe(event: string, callback: Function): number;
12
- /**
13
- * If the passed event has callbacks attached to it, loop through each one and call it.
14
- * @param {string} event The name of the event to publish
15
- * @param {object} [newData] The data to pass to the callbacks
16
- * @param {object} [oldData] The data to pass to the callbacks
17
- * @returns {Array} The callbacks for this event, or an empty array if no event exits
18
- * @memberof PubSub
19
- */
20
- publish(event: string, newData?: object, oldData?: object): any[];
21
- }
@@ -1,153 +0,0 @@
1
- import { default as PubSub } from './pubsub.js';
2
- export let store: Store;
3
- import * as defaultStoreActions from './default-store-actions.js';
4
- /**
5
- * @summary A reactive state management system with support for reducers, events, and state immutability.
6
- * @description The `Store` class provides a centralized way to manage application state with actions, reducers, and event subscriptions. It supports handling both object and array state, with flexibility for custom reducers.
7
- * @example
8
- * const store = new Store({
9
- * reducer: (state, action) => { ... },
10
- * state: { user: { id: 1, name: 'John' } }
11
- * });
12
- * store.subscribe('user', (newState, oldState) => console.log('User changed:', newState));
13
- * store.dispatch({ type: 'user/UPDATE', payload: { name: 'Jane' } });
14
- */
15
- declare class Store {
16
- /**
17
- * Initializes the store with optional reducer and state.
18
- * @param {object} [params] Configuration for the store.
19
- * @param {Function} [params.reducer] Initial reducer function for handling state updates.
20
- * @param {object} [params.state] Initial state of the store.
21
- */
22
- constructor(params?: {
23
- reducer?: Function;
24
- state?: object;
25
- });
26
- _state: {};
27
- _reducer: Function;
28
- events: PubSub;
29
- status: string;
30
- _isPause: boolean;
31
- /**
32
- * Dispatches an action to update the state by invoking the reducer function.
33
- * @param {object} action The action object containing the type and any associated payload.
34
- * @param {string} action.type The type of the action being dispatched.
35
- * @returns {boolean} Returns `true` after the state has been successfully updated.
36
- * @example
37
- * const action = { type: 'INCREMENT', payload: { amount: 1 } };
38
- * store.dispatch(action);
39
- */
40
- dispatch(action: {
41
- type: string;
42
- }): boolean;
43
- /**
44
- * Retrieves a deep copy of the current state to ensure immutability.
45
- * @returns {object} A deep copy of the current state.
46
- * @example
47
- * const currentState = store.getState();
48
- * console.log(currentState);
49
- */
50
- getState(): object;
51
- /**
52
- * Subscribes to a specific event with a provided callback function.
53
- * @param {string} eventName The name of the event to subscribe to.
54
- * @param {Function} callbackFn The function to execute when the event is triggered.
55
- * @returns {Function} - A function to unsubscribe from the event.
56
- * @example
57
- * const unsubscribe = store.subscribe('stateChange', (newState) => {
58
- * console.log('State changed:', newState);
59
- * });
60
- * // Later, to unsubscribe
61
- * unsubscribe();
62
- */
63
- subscribe(eventName: string, callbackFn: Function): Function;
64
- /**
65
- * Unsubscribes from a specific event by removing all associated listeners.
66
- * @param {string} eventName The name of the event to unsubscribe from.
67
- * @returns {void}
68
- * @example
69
- * store.unsubscribe('stateChange');
70
- */
71
- unsubscribe(eventName: string): void;
72
- /**
73
- * Pauses event handling or other operations.
74
- * @returns {this} Returns the current instance for method chaining.
75
- * @example
76
- * store.pause().doSomething();
77
- */
78
- pause(): this;
79
- /**
80
- * Resumes event handling or other operations.
81
- * @param {*} [val] Optional value to pass while resuming.
82
- * @returns {this} Returns the current instance for method chaining.
83
- * @example
84
- * store.play().doSomething();
85
- */
86
- play(val?: any): this;
87
- /**
88
- * Merges a new reducer function into the existing reducer for a specific state property.
89
- * @param {string} stateValueName The key in the state object that the new reducer will manage.
90
- * @param {Function} newReducer The reducer function to handle updates for the specified state property.
91
- * @returns {void}
92
- * @example
93
- * const newReducer = (newState, currentState) => ({ ...currentState, ...newState });
94
- * store.mergeReducers('user', newReducer);
95
- */
96
- mergeReducers(stateValueName: string, newReducer: Function): void;
97
- /**
98
- * Synchronizes each entry in an array with the store by defining or updating state entries.
99
- * @param {string} storeKey The key prefix used for defining or updating store entries.
100
- * @param {Array<object>} [array] The array of entries to be synchronized with the store.
101
- * @param {string} [identificator] The property name used as a unique identifier for each entry.
102
- * @returns {void}
103
- * @example
104
- * const data = [{ id: 1, name: 'Item 1' }, { id: 2, name: 'Item 2' }];
105
- * store.makeEveryArrayEntryAsStoreState('items', data, 'id');
106
- */
107
- makeEveryArrayEntryAsStoreState(storeKey: string, array?: Array<object>, identificator?: string): void;
108
- /**
109
- * Defines a new state variable and associates it with a reducer.
110
- * @param {string} stateValueName The name of the state variable to define.
111
- * @param {*} defaultValue The initial value of the state variable.
112
- * @param {Function|null} [reducer] An optional reducer function to manage updates for the state variable.
113
- * @param {string} [key] The key used to identify individual entries if the state value is an array or object.
114
- * @returns {void}
115
- * @example
116
- * // Define a new state with a custom reducer
117
- * store.define('user', { id: 1, name: 'John Doe' }, (newState, currentState) => ({ ...currentState, ...newState }));
118
- * @example
119
- * // Define a new state with default array reducer
120
- * store.define('items', [], null, 'itemId');
121
- */
122
- define(stateValueName: string, defaultValue: any, reducer?: Function | null, key?: string): void;
123
- /**
124
- * Refreshes the state by wrapping it in a Proxy to track changes and notify subscribers.
125
- * @param {object} newState The new state object to be set. Defaults to an empty object if not provided.
126
- * @returns {void}
127
- * @example
128
- * store.refreshProxy({ user: { id: 1, name: 'John Doe' } });
129
- */
130
- refreshProxy(newState: object): void;
131
- /**
132
- * Creates a reducer function to manage an object state.
133
- * @param {string} stateValueName The name of the state property this reducer manages.
134
- * @returns {Function} A reducer function that handles `ADD`, `UPDATE`, and `DELETE` actions for the specified state property.
135
- * @throws {Error} If the payload is an array, an error is logged since the reducer is designed for object state management.
136
- * @example
137
- * const userReducer = store.createObjectReducer('user');
138
- * const newState = userReducer({ type: 'user/ADD', payload: { id: 1, name: 'John Doe' } });
139
- */
140
- createObjectReducer(stateValueName: string): Function;
141
- /**
142
- * Creates a reducer function to manage an array state.
143
- * @param {string} stateValueName The name of the state property this reducer manages.
144
- * @param {string} key The unique key used to identify items in the array for updates and deletions.
145
- * @returns {Function} A reducer function that handles `ADD`, `ADD_MANY`, `UPDATE`, `DELETE`, and `LOAD` actions for the specified state property.
146
- * @throws {Error} If `action.payload` is not an array when required.
147
- * @example
148
- * const itemsReducer = store.createArrayReducer('items', 'id');
149
- * const newState = itemsReducer({ type: 'items/ADD', payload: { id: 1, name: 'Item 1' } });
150
- */
151
- createArrayReducer(stateValueName: string, key: string): Function;
152
- }
153
- export { defaultStoreActions };
@@ -1,2 +0,0 @@
1
- import { default as Tab } from './tab.element.js';
2
- export default Tab;
@@ -1,41 +0,0 @@
1
- import { default as WJElement } from '../wje-element/element.js';
2
- /**
3
- * `Tab` is a custom web component that represents a tab.
4
- * @summary This element represents a tab.
5
- * @documentation https://elements.webjet.sk/components/tab
6
- * @status stable
7
- * @augments {WJElement}
8
- * @cssproperty [--wje-tab-text-transform=uppercase] - The text transformation for the tab (e.g., uppercase, lowercase).
9
- * @cssproperty [--wje-tab-font-weight=500] - The font weight of the tab text.
10
- * @cssproperty [--wje-tab-letter-spacing=0.06em] - The letter spacing of the tab text.
11
- * @cssproperty [--wje-tab-padding-inline=1rem] - The horizontal padding of the tab.
12
- * @cssproperty [--wje-tab-padding-top=.75rem] - The top padding of the tab text.
13
- * @cssproperty [--wje-tab-padding-bottom=.75rem] - The bottom padding of the tab text.
14
- * @cssproperty [--wje-tab-color-active=var(--wje-color-primary-11)] - The text color of the active tab.
15
- * @cssproperty [--wje-tab-color-hover=var(--wje-color-primary-1)] - The text color of the tab when hovered.
16
- * //@fires wje-tab:change - Dispatched when the tab is changed.
17
- * @tag wje-tab
18
- */
19
- export default class Tab extends WJElement {
20
- /**
21
- * Returns the CSS styles for the component.
22
- * @static
23
- * @returns {CSSStyleSheet}
24
- */
25
- static get cssStyleSheet(): CSSStyleSheet;
26
- /**
27
- * Indicates whether this is the last tab.
28
- * @type {boolean}
29
- */
30
- last: boolean;
31
- /**
32
- * Draws the component for the tab.
33
- * @returns {DocumentFragment}
34
- */
35
- draw(): DocumentFragment;
36
- /**
37
- * Sets up event listeners after the component is rendered.
38
- * // @fires wje-tab:change - Dispatched when the component is clicked, indicating a tab change.
39
- */
40
- afterDraw(): void;
41
- }
@@ -1,2 +0,0 @@
1
- import { default as TabGroup } from './tab-group.element.js';
2
- export default TabGroup;
@@ -1,67 +0,0 @@
1
- import { default as WJElement } from '../wje-element/element.js';
2
- /**
3
- * `TabGroup` is a custom web component that represents a group of tabs.
4
- * @summary This element represents a group of tabs.
5
- * @documentation https://elements.webjet.sk/components/tab-group
6
- * @status stable
7
- * @augments WJElement
8
- * @slot - The default slot for the tab group.
9
- * @slot nav - Slot for the navigation of the tab group.
10
- * @cssproperty [--wje-tab-group-padding=1rem] - Specifies the padding inside the tab group. This property defines the space between the content of the tab group and its outer boundary. Accepts any valid CSS length unit (e.g., `px`, `rem`, `em`, `%`).
11
- * @tag wje-tab-group
12
- */
13
- export default class TabGroup extends WJElement {
14
- /**
15
- * Returns the CSS styles for the component.
16
- * @static
17
- * @returns {CSSStyleSheet}
18
- */
19
- static get cssStyleSheet(): CSSStyleSheet;
20
- /**
21
- * Sets up the event listeners before the component is drawn.
22
- * This method is called before the component is drawn.
23
- * It is used to set up event listeners.
24
- */
25
- beforeDraw(): void;
26
- /**
27
- * Draws the component.
28
- * @param {object} context The context for drawing.
29
- * @param {object} store The store for drawing.
30
- * @param {object} params The parameters for drawing.
31
- * @returns {DocumentFragment}
32
- */
33
- draw(context: object, store: object, params: object): DocumentFragment;
34
- /**
35
- * Sets up the event listeners after the component is drawn.
36
- */
37
- afterDraw(): void;
38
- /**
39
- * Removes the active attribute from all tabs and panels.
40
- */
41
- removeActiveTab(): void;
42
- /**
43
- * Sets the active tab and panel.
44
- * @param {string} tab The name of the tab to set as active.
45
- */
46
- setActiveTab(tab: string): void;
47
- /**
48
- * Returns the currently active tab.
49
- * @returns {Element|null} The active tab, or null if no tab is active.
50
- */
51
- getActiveTab(): Element | null;
52
- /**
53
- * Returns all tabs.
54
- * @returns {Array<Element>} An array of all tabs.
55
- */
56
- getTabAll(): Array<Element>;
57
- /**
58
- * Returns all panels.
59
- * @returns {Array<Element>} An array of all panels.
60
- */
61
- getPanelAll(): Array<Element>;
62
- /**
63
- * Returns the names of all tabs.
64
- * @returns {Array<string>} An array of all tab names.
65
- */
66
- getPanelAllName(): Array<string>;
67
- }
@@ -1,2 +0,0 @@
1
- import { default as TabPanel } from './tab-panel.element.js';
2
- export default TabPanel;
@@ -1,23 +0,0 @@
1
- import { default as WJElement } from '../wje-element/element.js';
2
- /**
3
- * `TabPanel` is a custom web component that represents a tab panel.
4
- * @summary This element represents a tab panel.
5
- * @documentation https://elements.webjet.sk/components/tab-panel
6
- * @status stable
7
- * @augments {WJElement}
8
- * @slot - The default slot for the tab panel.
9
- * @tag wje-tab-panel
10
- */
11
- export default class TabPanel extends WJElement {
12
- /**
13
- * Returns the CSS styles for the component.
14
- * @static
15
- * @returns {CSSStyleSheet}
16
- */
17
- static get cssStyleSheet(): CSSStyleSheet;
18
- /**
19
- * Draws the component for the tab panel.
20
- * @returns {DocumentFragment}
21
- */
22
- draw(): DocumentFragment;
23
- }
@@ -1,2 +0,0 @@
1
- import { default as Textarea } from './textarea.element.js';
2
- export default Textarea;
@@ -1,176 +0,0 @@
1
- import { default as WJElement } from '../wje-element/element.js';
2
- /**
3
- * `Textarea` is a custom web component that represents a textarea input.
4
- * @summary This element represents a textarea input.
5
- * @documentation https://elements.webjet.sk/components/textarea
6
- * @status stable
7
- * @augments WJElement
8
- * @csspart native - The native textarea wrapper.
9
- * @csspart input - The textarea input.
10
- * @csspart wrapper - The textarea wrapper.
11
- * @cssproperty [--wje-textarea-font-family=var(--wje-font-family)] - Specifies the font family used for the textarea. Accepts any valid CSS font-family value.
12
- * @cssproperty [--wje-textarea-background-color=var(--wje-background)] - Sets the background color of the textarea. Accepts any valid CSS color value.
13
- * @cssproperty [--wje-textarea-color=var(--wje-color)] - Defines the text color within the textarea. Accepts any valid CSS color value.
14
- * @cssproperty [--wje-textarea-color-invalid=var(--wje-color-danger)] - Changes the text color of the textarea when it is invalid. Useful for highlighting validation errors.
15
- * @cssproperty [--wje-textarea-border-width=1px] - Specifies the width of the textarea's border. Accepts any valid CSS length unit.
16
- * @cssproperty [--wje-textarea-border-style=solid] - Sets the style of the textarea's border. Accepts standard CSS border styles such as `solid`, `dashed`, or `dotted`.
17
- * @cssproperty [--wje-textarea-border-color=var(--wje-border-color)] - Defines the border color of the textarea. Accepts any valid CSS color value.
18
- * @cssproperty [--wje-textarea-border-color-focus=var(--wje-color-primary)] - Specifies the border color of the textarea when it is focused. Enhances the user experience by providing visual feedback.
19
- * @cssproperty [--wje-textarea-border-radius=4px] - Determines the border radius of the textarea, defining how rounded its corners are. Accepts any valid CSS length unit.
20
- * @cssproperty [--wje-textarea-margin-bottom=.5rem] - Sets the bottom margin of the textarea. Ensures spacing between the textarea and other elements.
21
- * @cssproperty [--wje-textarea-line-height=20px] - Specifies the line height of the text within the textarea. Helps control the vertical spacing of the text.
22
- * @cssproperty [--wje-textarea-padding=0.5rem] - Defines the padding inside the textarea. Controls the spacing between the content and the border.
23
- * @tag wje-textarea
24
- */
25
- export default class Textarea extends WJElement {
26
- /**
27
- * Returns the CSS styles for the component.
28
- * @static
29
- * @returns {CSSStyleSheet} The CSS stylesheet
30
- */
31
- static get cssStyleSheet(): CSSStyleSheet;
32
- /**
33
- * Whether the input is associated with a form.
34
- * @type {boolean}
35
- */
36
- static formAssociated: boolean;
37
- /**
38
- * Returns the list of attributes to observe for changes.
39
- * @static
40
- * @returns {Array<string>}
41
- */
42
- static get observedAttributes(): string[];
43
- /**
44
- * Setter for the invalid attribute.
45
- * @param {boolean} isInvalid Whether the input is invalid.
46
- */
47
- set invalid(isInvalid: boolean);
48
- /**
49
- * Getter for the invalid attribute.
50
- * @returns {boolean} Whether the attribute is present.
51
- */
52
- get invalid(): boolean;
53
- pristine: boolean;
54
- internals: ElementInternals;
55
- observer: MutationObserver;
56
- observeFunction: (mutations: any) => void;
57
- /**
58
- * Setter for the value attribute.
59
- * @param {string} value The value to set.
60
- */
61
- set value(value: string);
62
- /**
63
- * Getter for the value attribute.
64
- * @returns {string} The value of the attribute.
65
- */
66
- get value(): string;
67
- _value: string;
68
- /**
69
- * Getter for the form attribute.
70
- * @returns {HTMLFormElement} The form the input is associated with.
71
- */
72
- get form(): HTMLFormElement;
73
- /**
74
- * Getter for the name attribute.
75
- * @returns {string} The name of the input.
76
- */
77
- get name(): string;
78
- /**
79
- * Getter for the type attribute.
80
- * @returns {string} The type of the input.
81
- */
82
- get type(): string;
83
- /**
84
- * Getter for the validity attribute.
85
- * @returns {ValidityState} The validity state of the input.
86
- */
87
- get validity(): ValidityState;
88
- /**
89
- * Getter for the validationMessage attribute.
90
- * @returns {string} The validation message of the input.
91
- */
92
- get validationMessage(): string;
93
- /**
94
- * Getter for the willValidate attribute.
95
- * @returns {boolean} Whether the input will be validated.
96
- */
97
- get willValidate(): boolean;
98
- set placeholder(value: string);
99
- get placeholder(): string;
100
- beforeDraw(): void;
101
- /**
102
- * Draws the component for the textarea.
103
- * @returns {DocumentFragment}
104
- */
105
- draw(): DocumentFragment;
106
- counterElement: HTMLDivElement;
107
- native: HTMLDivElement;
108
- labelElement: HTMLLabelElement;
109
- input: HTMLTextAreaElement;
110
- /**
111
- * Sets up the event listeners after the component is drawn.
112
- */
113
- afterDraw(): void;
114
- resizeObserver: ResizeObserver;
115
- /**
116
- * Sets the height of the textarea.
117
- */
118
- setTextareaHeight: () => void;
119
- /**
120
- * Updates the counter for the textarea.
121
- * @param {Event} e The event object.
122
- */
123
- counterFn: (e: Event) => void;
124
- /**
125
- * @summary Validates the input.
126
- * This method checks the validity state of the input. If the input is not valid, it iterates over the validity state object.
127
- * For each invalid state, it constructs an attribute name and checks if the input has this attribute.
128
- * If the input has the attribute, it sets the validation error to the state and the error message to the attribute value.
129
- * If the input does not have the attribute, it sets the error message to the default validation message of the input.
130
- * It then sets the validity in the form internals to an object with the validation error as key and true as value, and the error message.
131
- * If the input is valid, it sets the validity in the form internals to an empty object.
132
- */
133
- validateInput(): void;
134
- validationError: string;
135
- /**
136
- * @summary Propagates the validation state of the input.
137
- * This method sets the 'invalid' property of the input based on its 'pristine' state and its internal validity state.
138
- * If the input is invalid and the 'customErrorDisplay' property is true, it dispatches an 'invalid' event.
139
- */
140
- propagateValidation(): void;
141
- /**
142
- * @summary Callback function that is called when the custom element is associated with a form.
143
- * This function adds an event listener to the form's submit event, which validates the input and propagates the validation.
144
- * @param {HTMLFormElement} form The form the custom element is associated with.
145
- */
146
- formAssociatedCallback(form: HTMLFormElement): void;
147
- /**
148
- * The formResetCallback method is a built-in lifecycle callback that gets called when a form gets reset.
149
- * This method is responsible for resetting the value of the custom input element to its default value.
150
- * It also resets the form value and validity state in the form internals.
151
- * @function
152
- */
153
- formResetCallback(): void;
154
- /**
155
- * The formStateRestoreCallback method is a built-in lifecycle callback that gets called when the state of a form-associated custom element is restored.
156
- * This method is responsible for restoring the value of the custom input element to its saved state.
157
- * It also restores the form value and validity state in the form internals to their saved states.
158
- * @param {object} state The saved state of the custom input element.
159
- * @function
160
- */
161
- formStateRestoreCallback(state: object): void;
162
- /**
163
- * The formStateSaveCallback method is a built-in lifecycle callback that gets called when the state of a form-associated custom element is saved.
164
- * This method is responsible for saving the value of the custom input element.
165
- * @returns {object} The saved state of the custom input element.
166
- * @function
167
- */
168
- formStateSaveCallback(): object;
169
- /**
170
- * The formDisabledCallback method is a built-in lifecycle callback that gets called when the disabled state of a form-associated custom element changes.
171
- * This method is not implemented yet.
172
- * @param {boolean} disabled The new disabled state of the custom input element.
173
- * @function
174
- */
175
- formDisabledCallback(disabled: boolean): void;
176
- }
@@ -1,2 +0,0 @@
1
- import { default as Thumbnail } from './thumbnail.element.js';
2
- export default Thumbnail;
@@ -1,31 +0,0 @@
1
- import { default as WJElement } from '../wje-element/element.js';
2
- /**
3
- * @summary Thumbnail class
4
- * @documentation https://elements.webjet.sk/components/thumbnail
5
- * @status stable
6
- * @augments WJElement
7
- * @slot thumbnail-slot - The slot for the thumbnail content.
8
- * @cssproperty [--wje-thumbnail-width=48px] - Defines the width of the thumbnail. Accepts any valid CSS length unit such as `px`, `rem`, or `%`.
9
- * @cssproperty [--wje-thumbnail-height=48px] - Specifies the height of the thumbnail. Accepts any valid CSS length unit.
10
- * @cssproperty [--wje-thumbnail-border-radius=var(--wje-border-radius-medium)] - Sets the border radius of the thumbnail, determining how rounded its corners appear. Accepts any valid CSS length unit or CSS variable.
11
- * @tag thumbnail-element
12
- */
13
- export default class Thumbnail extends WJElement {
14
- /**
15
- * Returns the CSS stylesheet for the component.
16
- * @static
17
- * @returns {CSSStyleSheet} The CSS stylesheet
18
- */
19
- static get cssStyleSheet(): CSSStyleSheet;
20
- /**
21
- * Returns the list of observed attributes.
22
- * @static
23
- * @returns {Array} An empty array
24
- */
25
- static get observedAttributes(): any[];
26
- /**
27
- * Draws the component for the thumbnail.
28
- * @returns {object} Document fragment
29
- */
30
- draw(): object;
31
- }
@@ -1,2 +0,0 @@
1
- import { default as Timeline } from './timeline.element.js';
2
- export default Timeline;
@@ -1,25 +0,0 @@
1
- import { default as WJElement } from '../wje-element/element.js';
2
- /**
3
- * `Timeline` is a custom web component that represents a timeline.
4
- * @summary This element represents a timeline.
5
- * @documentation https://elements.webjet.sk/components/timeline
6
- * @status stable
7
- * @augments WJElement
8
- * @slot - Slot for the timeline items.
9
- * @csspart native - The native part of the rating component.
10
- * @csspart vertical-line - The vertical line part of the rating component.
11
- * @tag wje-timeline
12
- */
13
- export default class Timeline extends WJElement {
14
- /**
15
- * Returns the CSS stylesheet for the component.
16
- * @static
17
- * @returns {CSSStyleSheet} The CSS stylesheet
18
- */
19
- static get cssStyleSheet(): CSSStyleSheet;
20
- /**
21
- * Draws the component for the timeline.
22
- * @returns {DocumentFragment}
23
- */
24
- draw(): DocumentFragment;
25
- }
@@ -1,2 +0,0 @@
1
- import { default as TimelineItem } from './timeline-item.element.js';
2
- export default TimelineItem;
@@ -1,27 +0,0 @@
1
- import { default as WJElement } from '../wje-element/element.js';
2
- /**
3
- * The TimelineItem component.
4
- * @summary This element represents a timeline item.
5
- * @documentation https://elements.webjet.sk/components/timeline-item
6
- * @status stable
7
- * @augments {WJElement}
8
- * @csspart native - The native part of the timeline item.
9
- * @csspart content-container - The content container part of the timeline item.
10
- * @csspart default-icon - The default icon part of the timeline item.
11
- * @slot - Slot for the content of the timeline item.
12
- * @slot status - Slot for the status of the timeline item.
13
- * @tag wje-timeline-item
14
- */
15
- export default class TimelineItem extends WJElement {
16
- /**
17
- * Returns the CSS styles for the component.
18
- * @static
19
- * @returns {CSSStyleSheet}
20
- */
21
- static get cssStyleSheet(): CSSStyleSheet;
22
- /**
23
- * Draws the component for the timeline item.
24
- * @returns {DocumentFragment}
25
- */
26
- draw(): DocumentFragment;
27
- }
@@ -1,2 +0,0 @@
1
- import { default as Toast } from './toast.element.js';
2
- export default Toast;