wj-elements 0.1.134 → 0.1.135

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 (257) hide show
  1. package/dist/infinite-scroll.element-XVJukzjy.js +1 -0
  2. package/dist/infinite-scroll.element-XVJukzjy.js.map +1 -0
  3. package/dist/list.element-Ce1vIm1O.js +1 -0
  4. package/dist/list.element-Ce1vIm1O.js.map +1 -0
  5. package/dist/localize.js +3 -0
  6. package/dist/localize.js.map +1 -0
  7. package/dist/packages/index.d.ts +2 -0
  8. package/dist/packages/utils/permissions-api.d.ts +2 -2
  9. package/dist/packages/wje-accordion/accordion.element.d.ts +2 -2
  10. package/dist/packages/wje-accordion-item/accordion-item.element.d.ts +1 -1
  11. package/dist/packages/wje-animation/animation.element.d.ts +1 -1
  12. package/dist/packages/wje-aside/aside.element.d.ts +1 -1
  13. package/dist/packages/wje-badge/badge.element.d.ts +1 -1
  14. package/dist/packages/wje-breadcrumb/breadcrumb.element.d.ts +2 -2
  15. package/dist/packages/wje-breadcrumbs/breadcrumbs.element.d.ts +3 -3
  16. package/dist/packages/wje-button/button.element.d.ts +5 -5
  17. package/dist/packages/wje-button-group/button-group.element.d.ts +2 -2
  18. package/dist/packages/wje-card/card.element.d.ts +1 -1
  19. package/dist/packages/wje-card-content/card-content.element.d.ts +1 -1
  20. package/dist/packages/wje-card-controls/card-controls.element.d.ts +1 -1
  21. package/dist/packages/wje-card-header/card-header.element.d.ts +1 -1
  22. package/dist/packages/wje-card-subtitle/card-subtitle.element.d.ts +1 -1
  23. package/dist/packages/wje-card-title/card-title.element.d.ts +1 -1
  24. package/dist/packages/wje-carousel/carousel.element.d.ts +2 -2
  25. package/dist/packages/wje-color-picker/color-picker.element.d.ts +4 -4
  26. package/dist/packages/wje-container/container.element.d.ts +1 -1
  27. package/dist/packages/wje-dialog/dialog.element.d.ts +2 -2
  28. package/dist/packages/wje-dropdown/dropdown.element.d.ts +2 -2
  29. package/dist/packages/wje-element/element.d.ts +2 -2
  30. package/dist/packages/wje-file-upload/file-upload.element.d.ts +2 -2
  31. package/dist/packages/wje-file-upload-item/file-upload-item.element.d.ts +6 -4
  32. package/dist/packages/wje-footer/footer.element.d.ts +1 -1
  33. package/dist/packages/wje-format-digital/format-digital.element.d.ts +1 -1
  34. package/dist/packages/wje-header/header.element.d.ts +1 -1
  35. package/dist/packages/wje-icon/icon.element.d.ts +1 -1
  36. package/dist/packages/wje-icon-picker/icon-picker.element.d.ts +1 -1
  37. package/dist/packages/wje-img-comparer/img-comparer.element.d.ts +1 -1
  38. package/dist/packages/wje-infinite-scroll/infinite-scroll.element.d.ts +3 -3
  39. package/dist/packages/wje-input-file/input-file.element.d.ts +1 -1
  40. package/dist/packages/wje-item/item.element.d.ts +1 -1
  41. package/dist/packages/wje-kanban/kanban.element.d.ts +3 -3
  42. package/dist/packages/wje-label/label.element.d.ts +1 -1
  43. package/dist/packages/wje-main/main.element.d.ts +1 -1
  44. package/dist/packages/wje-menu/menu.element.d.ts +1 -1
  45. package/dist/packages/wje-menu-button/menu-button.element.d.ts +1 -1
  46. package/dist/packages/wje-menu-label/menu-label.element.d.ts +1 -1
  47. package/dist/packages/wje-option/option.element.d.ts +1 -1
  48. package/dist/packages/wje-options/options.element.d.ts +5 -2
  49. package/dist/packages/wje-popup/popup.element.d.ts +1 -1
  50. package/dist/packages/wje-progress-bar/progress-bar.element.d.ts +1 -1
  51. package/dist/packages/wje-radio/radio.element.d.ts +1 -1
  52. package/dist/packages/wje-rate/rate.element.d.ts +3 -3
  53. package/dist/packages/wje-relative-time/relative-time.element.d.ts +1 -1
  54. package/dist/packages/wje-reorder/reorder.element.d.ts +1 -1
  55. package/dist/packages/wje-route/route.element.d.ts +1 -1
  56. package/dist/packages/wje-router/router.element.d.ts +1 -1
  57. package/dist/packages/wje-router-link/router-link.element.d.ts +1 -1
  58. package/dist/packages/wje-select/select.element.d.ts +2 -2
  59. package/dist/packages/wje-slider/slider.element.d.ts +1 -1
  60. package/dist/packages/wje-split-view/split-view.element.d.ts +1 -1
  61. package/dist/packages/wje-store/default-store-actions.d.ts +5 -0
  62. package/dist/packages/wje-textarea/textarea.element.d.ts +1 -1
  63. package/dist/popup.element-tyYxow0p.js +1 -0
  64. package/dist/popup.element-tyYxow0p.js.map +1 -0
  65. package/dist/router-links-CJnOdbas.js +1 -0
  66. package/dist/router-links-CJnOdbas.js.map +1 -0
  67. package/dist/wje-accordion-item.js +1 -0
  68. package/dist/wje-accordion-item.js.map +1 -0
  69. package/dist/wje-accordion.js +1 -0
  70. package/dist/wje-accordion.js.map +1 -0
  71. package/dist/wje-animation.js +1 -0
  72. package/dist/wje-animation.js.map +1 -0
  73. package/dist/wje-aside.js +1 -0
  74. package/dist/wje-aside.js.map +1 -0
  75. package/dist/wje-avatar.js +1 -0
  76. package/dist/wje-avatar.js.map +1 -0
  77. package/dist/wje-badge.js +1 -0
  78. package/dist/wje-badge.js.map +1 -0
  79. package/dist/wje-breadcrumb.js +1 -0
  80. package/dist/wje-breadcrumb.js.map +1 -0
  81. package/dist/wje-breadcrumbs.js +1 -0
  82. package/dist/wje-breadcrumbs.js.map +1 -0
  83. package/dist/wje-button-group.js +1 -0
  84. package/dist/wje-button-group.js.map +1 -0
  85. package/dist/wje-button.js +1 -0
  86. package/dist/wje-button.js.map +1 -0
  87. package/dist/wje-card-content.js +1 -0
  88. package/dist/wje-card-content.js.map +1 -0
  89. package/dist/wje-card-controls.js +1 -0
  90. package/dist/wje-card-controls.js.map +1 -0
  91. package/dist/wje-card-header.js +1 -0
  92. package/dist/wje-card-header.js.map +1 -0
  93. package/dist/wje-card-subtitle.js +1 -0
  94. package/dist/wje-card-subtitle.js.map +1 -0
  95. package/dist/wje-card-title.js +1 -0
  96. package/dist/wje-card-title.js.map +1 -0
  97. package/dist/wje-card.js +1 -0
  98. package/dist/wje-card.js.map +1 -0
  99. package/dist/wje-carousel-item.js +1 -0
  100. package/dist/wje-carousel-item.js.map +1 -0
  101. package/dist/wje-carousel.js +1 -0
  102. package/dist/wje-carousel.js.map +1 -0
  103. package/dist/wje-checkbox.js +1 -0
  104. package/dist/wje-checkbox.js.map +1 -0
  105. package/dist/wje-chip.js +1 -0
  106. package/dist/wje-chip.js.map +1 -0
  107. package/dist/wje-col.js +1 -0
  108. package/dist/wje-col.js.map +1 -0
  109. package/dist/wje-color-picker.js +1 -0
  110. package/dist/wje-color-picker.js.map +1 -0
  111. package/dist/wje-container.js +1 -0
  112. package/dist/wje-container.js.map +1 -0
  113. package/dist/wje-copy-button.js +1 -0
  114. package/dist/wje-copy-button.js.map +1 -0
  115. package/dist/wje-dialog.js +1 -0
  116. package/dist/wje-dialog.js.map +1 -0
  117. package/dist/wje-divider.js +1 -0
  118. package/dist/wje-divider.js.map +1 -0
  119. package/dist/wje-dropdown.js +1 -0
  120. package/dist/wje-dropdown.js.map +1 -0
  121. package/dist/wje-element.js +1 -0
  122. package/dist/wje-element.js.map +1 -0
  123. package/dist/wje-fetchAndParseCSS.js +1 -0
  124. package/dist/wje-fetchAndParseCSS.js.map +1 -0
  125. package/dist/wje-file-upload-item.js +17 -8
  126. package/dist/wje-file-upload-item.js.map +1 -0
  127. package/dist/wje-file-upload.js +10 -5
  128. package/dist/wje-file-upload.js.map +1 -0
  129. package/dist/wje-footer.js +1 -0
  130. package/dist/wje-footer.js.map +1 -0
  131. package/dist/wje-form.js +1 -0
  132. package/dist/wje-form.js.map +1 -0
  133. package/dist/wje-format-digital.js +1 -0
  134. package/dist/wje-format-digital.js.map +1 -0
  135. package/dist/wje-grid.js +1 -0
  136. package/dist/wje-grid.js.map +1 -0
  137. package/dist/wje-header.js +1 -0
  138. package/dist/wje-header.js.map +1 -0
  139. package/dist/wje-icon-picker.js +1 -0
  140. package/dist/wje-icon-picker.js.map +1 -0
  141. package/dist/wje-icon.js +1 -0
  142. package/dist/wje-icon.js.map +1 -0
  143. package/dist/wje-img-comparer.js +1 -0
  144. package/dist/wje-img-comparer.js.map +1 -0
  145. package/dist/wje-img.js +1 -0
  146. package/dist/wje-img.js.map +1 -0
  147. package/dist/wje-infinite-scroll.js +1 -0
  148. package/dist/wje-infinite-scroll.js.map +1 -0
  149. package/dist/wje-input-file.js +1 -0
  150. package/dist/wje-input-file.js.map +1 -0
  151. package/dist/wje-input.js +1 -0
  152. package/dist/wje-input.js.map +1 -0
  153. package/dist/wje-item.js +1 -0
  154. package/dist/wje-item.js.map +1 -0
  155. package/dist/wje-kanban.js +1 -0
  156. package/dist/wje-kanban.js.map +1 -0
  157. package/dist/wje-label.js +1 -0
  158. package/dist/wje-label.js.map +1 -0
  159. package/dist/wje-list.js +1 -0
  160. package/dist/wje-list.js.map +1 -0
  161. package/dist/wje-main.js +1 -0
  162. package/dist/wje-main.js.map +1 -0
  163. package/dist/wje-masonry.js +1 -0
  164. package/dist/wje-masonry.js.map +1 -0
  165. package/dist/wje-master.js +32 -1
  166. package/dist/wje-master.js.map +1 -0
  167. package/dist/wje-menu-button.js +1 -0
  168. package/dist/wje-menu-button.js.map +1 -0
  169. package/dist/wje-menu-item.js +1 -0
  170. package/dist/wje-menu-item.js.map +1 -0
  171. package/dist/wje-menu-label.js +1 -0
  172. package/dist/wje-menu-label.js.map +1 -0
  173. package/dist/wje-menu.js +1 -0
  174. package/dist/wje-menu.js.map +1 -0
  175. package/dist/wje-option.js +1 -0
  176. package/dist/wje-option.js.map +1 -0
  177. package/dist/wje-options.js +16 -2
  178. package/dist/wje-options.js.map +1 -0
  179. package/dist/wje-orgchart-group.js +1 -0
  180. package/dist/wje-orgchart-group.js.map +1 -0
  181. package/dist/wje-orgchart-item.js +1 -0
  182. package/dist/wje-orgchart-item.js.map +1 -0
  183. package/dist/wje-orgchart.js +1 -0
  184. package/dist/wje-orgchart.js.map +1 -0
  185. package/dist/wje-popup.js +1 -0
  186. package/dist/wje-popup.js.map +1 -0
  187. package/dist/wje-progress-bar.js +1 -0
  188. package/dist/wje-progress-bar.js.map +1 -0
  189. package/dist/wje-qr-code.js +1 -0
  190. package/dist/wje-qr-code.js.map +1 -0
  191. package/dist/wje-radio-group.js +1 -0
  192. package/dist/wje-radio-group.js.map +1 -0
  193. package/dist/wje-radio.js +1 -0
  194. package/dist/wje-radio.js.map +1 -0
  195. package/dist/wje-rate.js +1 -0
  196. package/dist/wje-rate.js.map +1 -0
  197. package/dist/wje-relative-time.js +1 -0
  198. package/dist/wje-relative-time.js.map +1 -0
  199. package/dist/wje-reorder-dropzone.js +1 -0
  200. package/dist/wje-reorder-dropzone.js.map +1 -0
  201. package/dist/wje-reorder-handle.js +1 -0
  202. package/dist/wje-reorder-handle.js.map +1 -0
  203. package/dist/wje-reorder-item.js +1 -0
  204. package/dist/wje-reorder-item.js.map +1 -0
  205. package/dist/wje-reorder.js +1 -0
  206. package/dist/wje-reorder.js.map +1 -0
  207. package/dist/wje-route.js +1 -0
  208. package/dist/wje-route.js.map +1 -0
  209. package/dist/wje-router-link.js +1 -0
  210. package/dist/wje-router-link.js.map +1 -0
  211. package/dist/wje-router-outlet.js +1 -0
  212. package/dist/wje-router-outlet.js.map +1 -0
  213. package/dist/wje-routerx.js +1 -0
  214. package/dist/wje-routerx.js.map +1 -0
  215. package/dist/wje-row.js +1 -0
  216. package/dist/wje-row.js.map +1 -0
  217. package/dist/wje-select.js +1 -0
  218. package/dist/wje-select.js.map +1 -0
  219. package/dist/wje-slider.js +1 -0
  220. package/dist/wje-slider.js.map +1 -0
  221. package/dist/wje-sliding-container.js +1 -0
  222. package/dist/wje-sliding-container.js.map +1 -0
  223. package/dist/wje-split-view.js +1 -0
  224. package/dist/wje-split-view.js.map +1 -0
  225. package/dist/wje-status.js +1 -0
  226. package/dist/wje-status.js.map +1 -0
  227. package/dist/wje-step.js +1 -0
  228. package/dist/wje-step.js.map +1 -0
  229. package/dist/wje-stepper.js +1 -0
  230. package/dist/wje-stepper.js.map +1 -0
  231. package/dist/wje-store.js +29 -15
  232. package/dist/wje-store.js.map +1 -0
  233. package/dist/wje-tab-group.js +1 -0
  234. package/dist/wje-tab-group.js.map +1 -0
  235. package/dist/wje-tab-panel.js +1 -0
  236. package/dist/wje-tab-panel.js.map +1 -0
  237. package/dist/wje-tab.js +1 -0
  238. package/dist/wje-tab.js.map +1 -0
  239. package/dist/wje-textarea.js +1 -0
  240. package/dist/wje-textarea.js.map +1 -0
  241. package/dist/wje-thumbnail.js +1 -0
  242. package/dist/wje-thumbnail.js.map +1 -0
  243. package/dist/wje-toast.js +1 -0
  244. package/dist/wje-toast.js.map +1 -0
  245. package/dist/wje-toggle.js +1 -0
  246. package/dist/wje-toggle.js.map +1 -0
  247. package/dist/wje-toolbar-action.js +1 -0
  248. package/dist/wje-toolbar-action.js.map +1 -0
  249. package/dist/wje-toolbar.js +1 -0
  250. package/dist/wje-toolbar.js.map +1 -0
  251. package/dist/wje-tooltip.js +1 -0
  252. package/dist/wje-tooltip.js.map +1 -0
  253. package/dist/wje-visually-hidden.js +1 -0
  254. package/dist/wje-visually-hidden.js.map +1 -0
  255. package/package.json +3 -2
  256. /package/dist/packages/translations/{en-GB.d.ts → en-gb.d.ts} +0 -0
  257. /package/dist/packages/translations/{sk-SK.d.ts → sk-sk.d.ts} +0 -0
@@ -269,3 +269,4 @@ class InfiniteScroll extends WJElement {
269
269
  export {
270
270
  InfiniteScroll as I
271
271
  };
272
+ //# sourceMappingURL=infinite-scroll.element-XVJukzjy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"infinite-scroll.element-XVJukzjy.js","sources":["../packages/wje-infinite-scroll/infinite-scroll.element.js"],"sourcesContent":["import { default as WJElement, event, WjElementUtils } from '../wje-element/element.js';\nimport styles from './styles/styles.css?inline';\n\n/**\n * `InfiniteScroll` is a custom web component that represents an infinite scroll.\n * It extends from `WJElement`.\n * @summary This element allows users to scroll through a potentially infinite amount of content.\n * @documentation https://elements.webjet.sk/components/infinite-scroll\n * @status stable\n * @augments {WJElement}\n * @csspart loader - The loader part of the infinite scroll.\n * @slot - The default slot for the infinite scroll.\n * @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.\n * @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.\n * //@fires wje-infinite-scroll:click-item - Event fired when an item is clicked.\n * @tag wje-infinite-scroll\n */\n\nexport default class InfiniteScroll extends WJElement {\n /**\n * Creates an instance of InfiniteScroll.\n */\n constructor() {\n super();\n\n this.totalPages = 0;\n this.isLoading = [];\n this._response = {};\n this.iterate = null;\n this._infiniteScrollTemplate = null;\n this._abortController = new AbortController();\n this._signal = this._abortController.signal;\n }\n\n /**\n * Dependencies of the InfiniteScroll component.\n * @param value\n */\n set infiniteScrollTemplate(value) {\n this._infiniteScrollTemplate = value;\n }\n\n /**\n * Getter for the infiniteScrollTemplate property.\n * @returns {null}\n */\n get infiniteScrollTemplate() {\n return this._infiniteScrollTemplate;\n }\n\n /**\n * Dependencies of the InfiniteScroll component.\n * @param value\n */\n set response(value) {\n this._response = value;\n }\n\n /**\n * Getter for the response property.\n * @returns {*|{}}\n */\n get response() {\n return this._response;\n }\n\n /**\n * Dependencies of the InfiniteScroll component.\n * @param value\n */\n set objectName(value) {\n this.setAttribute('object-name', value);\n }\n\n get objectName() {\n return this.getAttribute('object-name') ?? 'data';\n }\n\n className = 'InfiniteScroll';\n\n /**\n * Returns the CSS styles for the component.\n * @static\n * @returns {CSSStyleSheet}\n */\n static get cssStyleSheet() {\n return styles;\n }\n\n /**\n * Returns the list of attributes to observe for changes.\n * @static\n * @returns {Array<string>}\n */\n static get observedAttributes() {\n return [];\n }\n\n /**\n * Sets up the attributes for the component.\n */\n setupAttributes() {\n this.isShadowRoot = 'open';\n }\n\n /**\n * Prepares the component before drawing.\n */\n beforeDraw() {\n this.iterate = this.querySelector('[iterate]');\n this.infiniteScrollTemplate = this.iterate?.outerHTML;\n this.iterate?.remove(); // remove template\n\n this.setAttribute('style', 'height: ' + this.height);\n\n // if this._loading is not fulfilled then cancel the promise\n if (this._signal) {\n this._abortController.abort();\n this._abortController = new AbortController();\n this._signal = this._abortController.signal;\n }\n }\n\n /**\n * Draws the component and returns a document fragment.\n * @returns {DocumentFragment}\n */\n draw() {\n let fragment = document.createDocumentFragment();\n\n let native = document.createElement('div');\n native.classList.add('native');\n native.setAttribute('part', 'native-infinite-scroll');\n\n let slot = document.createElement('slot');\n\n let ending = document.createElement('slot');\n ending.setAttribute('name', 'ending');\n\n if (WjElementUtils.hasSlot(this, 'loader')) {\n let loading = document.createElement('div');\n loading.classList.add('loading');\n\n let loader = document.createElement('slot');\n loader.setAttribute('name', 'loader');\n\n loading.appendChild(loader);\n\n this.loadingEl = loading;\n\n fragment.appendChild(loading);\n }\n\n native.appendChild(slot);\n native.appendChild(ending);\n\n fragment.appendChild(native);\n\n this.endingEl = ending;\n\n return fragment;\n }\n\n /**\n * Called after the component has been drawn.\n */\n async afterDraw() {\n this.queryParams = this.queryParams || '';\n this.size = +this.size || 10;\n this.currentPage = 0;\n\n this.scrollEvent();\n this._loading = this.loadPages(this.currentPage);\n await this._loading;\n }\n\n /**\n * Adds the scroll event listener.\n */\n scrollEvent = () => {\n this.addEventListener('scroll', this.onScroll);\n };\n\n /**\n * Removes the scroll event listener.\n */\n unScrollEvent = () => {\n this.removeEventListener('scroll', this.onScroll);\n };\n\n /**\n * Handles the scroll event.\n * @param {Event} e The event.\n */\n onScroll = (e) => {\n const { scrollTop, scrollHeight, clientHeight } = e.target;\n\n if (\n scrollTop + clientHeight >= scrollHeight - 300 &&\n this.currentPage <= this.totalPages &&\n this.isLoading.includes(this.currentPage)\n ) {\n this.currentPage++;\n this._loading = this.loadPages(this.currentPage);\n }\n };\n\n /**\n * Fetches the pages from the server.\n * @param {number} page The page number.\n * @returns {Promise<object>} The response from the server.\n */\n async getPages(page) {\n let hasParams = this.url.includes('?');\n const response = await fetch(\n `${this.url}${hasParams ? '&' : '?'}page=${page}&size=${this.size}${this?.queryParams}`,\n {\n signal: this._signal,\n }\n );\n\n if (!response.ok) {\n throw new Error(`An error occurred: ${response.status}`);\n }\n return await response.json();\n }\n\n /**\n * Hides the loader.\n */\n hideLoader() {\n this?.loadingEl?.classList.remove('show');\n }\n\n /**\n * Shows the loader.\n */\n showLoader() {\n this?.loadingEl?.classList.add('show');\n }\n\n /**\n * Checks if there are more pages to load.\n * @param {number} page The page number.\n * @returns {boolean} Whether there are more pages to load.\n */\n hasMorePages(page) {\n return this.totalPages === 0 || page < this.totalPages;\n }\n\n /**\n * Loads the pages.\n * @param {number} page The page number.\n */\n async loadPages(page) {\n this.showLoader();\n try {\n if (this.hasMorePages(page)) {\n let response;\n this.parser = new DOMParser();\n\n if (typeof this.setCustomData === 'function') {\n response = await this.setCustomData(page, this._signal);\n } else {\n response = await this.getPages(page);\n }\n\n this.totalPages = response?.totalPages;\n this.currentPage = page;\n\n this.placementObj = this;\n\n // if there is a \"container\" attribute, find the element\n if (this.hasAttribute('placement')) this.placementObj = this.querySelector(this.placement);\n\n event.dispatchCustomEvent(this, 'wje-infinite-scroll:load', response);\n\n this.response = response;\n\n this.customForeach(this.objectName ? response[this.objectName] : response);\n\n this.isLoading.push(page);\n } else {\n event.dispatchCustomEvent(this, 'wje-infinite-scroll:complete');\n this.endingEl.classList.add('show');\n }\n } catch (error) {\n console.log(error);\n } finally {\n this.hideLoader();\n }\n }\n\n /**\n * Sets the custom data.\n *\n */\n dataToHtml = (item) => {\n let interpolateItem = this.interpolate(this.infiniteScrollTemplate, item);\n let doc = this.parser.parseFromString(interpolateItem, 'text/html');\n let element = doc.activeElement.firstElementChild;\n console.log(\"IS Element:\", element);\n return element;\n };\n\n customForeach = (data) => {\n data.forEach((item) => {\n let element = this.dataToHtml(item);\n event.addListener(element, 'click', 'wje-infinite-scroll:click-item', null);\n\n this.placementObj.insertAdjacentElement('beforeend', element);\n });\n };\n\n /**\n * Interpolates the string.\n * @param template\n * @param {object} params The parameters for interpolation.\n * @returns {string} The interpolated string.\n */\n interpolate = (template, params) => {\n let keys = template.match(/\\{{.*?\\}}/g);\n\n if (keys) {\n for (let key of keys) {\n let cleanKey = key.replace('{{', '').replace('}}', '');\n let val = '';\n cleanKey.split('.').forEach((k) => {\n val = val === '' ? params[k] : val[k];\n });\n\n template = template.replace(key, val);\n }\n }\n return template;\n };\n}\n"],"names":[],"mappings":";;;;;AAkBe,MAAM,uBAAuB,UAAU;AAAA;AAAA;AAAA;AAAA,EAIlD,cAAc;AACV,UAAO;AAuDX,qCAAY;AAqGZ;AAAA;AAAA;AAAA,uCAAc,MAAM;AAChB,WAAK,iBAAiB,UAAU,KAAK,QAAQ;AAAA,IAChD;AAKD;AAAA;AAAA;AAAA,yCAAgB,MAAM;AAClB,WAAK,oBAAoB,UAAU,KAAK,QAAQ;AAAA,IACnD;AAMD;AAAA;AAAA;AAAA;AAAA,oCAAW,CAAC,MAAM;AACd,YAAM,EAAE,WAAW,cAAc,aAAc,IAAG,EAAE;AAEpD,UACI,YAAY,gBAAgB,eAAe,OAC3C,KAAK,eAAe,KAAK,cACzB,KAAK,UAAU,SAAS,KAAK,WAAW,GAC1C;AACE,aAAK;AACL,aAAK,WAAW,KAAK,UAAU,KAAK,WAAW;AAAA,MAC3D;AAAA,IACK;AA4FD;AAAA;AAAA;AAAA;AAAA,sCAAa,CAAC,SAAS;AACnB,UAAI,kBAAkB,KAAK,YAAY,KAAK,wBAAwB,IAAI;AACxE,UAAI,MAAM,KAAK,OAAO,gBAAgB,iBAAiB,WAAW;AAClE,UAAI,UAAU,IAAI,cAAc;AAChC,cAAQ,IAAI,eAAe,OAAO;AAClC,aAAO;AAAA,IACV;AAED,yCAAgB,CAAC,SAAS;AACtB,WAAK,QAAQ,CAAC,SAAS;AACnB,YAAI,UAAU,KAAK,WAAW,IAAI;AAClC,cAAM,YAAY,SAA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QACvD;AAEgB,aAAK,aAAa,qCAAU;AAC5B,aAAK,cAAc;AAEnB,aAAK,eAAe;AAGpB,YAAI,KAAK,aAAa,WAAW,EAAG,MAAK,eAAe,KAAK,cAAc,KAAK,SAAS;AAEzF,cAAM,oBAAoB,MAAM,4BAA4B,QAAQ;AAEpE,aAAK,WAAW;AAEhB,aAAK,cAAc,KAAK,aAAa,SAAS,KAAK,UAAU,IAAI,QAAQ;AAEzE,aAAK,UAAU,KAAK,IAAI;AAAA,MACxC,OAAmB;AACH,cAAM,oBAAoB,MAAM,8BAA8B;AAC9D,aAAK,SAAS,UAAU,IAAI,MAAM;AAAA,MAClD;AAAA,IACS,SAAQ,OAAO;AACZ,cAAQ,IAAI,KAAK;AAAA,IAC7B,UAAkB;AACN,WAAK,WAAY;AAAA,IAC7B;AAAA,EACA;AA6CA;"}
@@ -47,3 +47,4 @@ class List extends WJElement {
47
47
  export {
48
48
  List as L
49
49
  };
50
+ //# sourceMappingURL=list.element-Ce1vIm1O.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.element-Ce1vIm1O.js","sources":["../packages/wje-list/list.element.js"],"sourcesContent":["import WJElement from '../wje-element/element.js';\nimport styles from './styles/styles.scss?inline';\n\n/**\n * `List` is a custom web component that represents a list.\n * It extends from `WJElement`.\n * @summary This element represents a list.\n * @documentation https://elements.webjet.sk/components/list\n * @status stable\n * @augments {WJElement}\n * @slot - The default slot for the list.\n * @cssproperty [--wje-list-inset-padding=1rem] - The padding of the list when it is inset.\n * @cssproperty [--wje-list-border-radius=8px] - The border radius of the list. Accepts any valid CSS length.\n * @cssproperty [--wje-list-background=var(--wje-background)] - The background of the list. Accepts any valid CSS color value.\n * @tag wje-list\n */\nexport default class List extends WJElement {\n /**\n * Creates an instance of List.\n * @class\n */\n constructor() {\n super();\n }\n\n className = 'List';\n\n /**\n * Returns the CSS styles for the component.\n * @static\n * @returns {CSSStyleSheet}\n */\n static get cssStyleSheet() {\n return styles;\n }\n\n /**\n * Sets up the attributes for the component.\n */\n setupAttributes() {\n this.isShadowRoot = 'open';\n }\n\n /**\n * Returns the list of attributes to observe for changes.\n * @returns {DocumentFragment}\n */\n draw() {\n let fragment = document.createDocumentFragment();\n\n let element = document.createElement('slot');\n fragment.appendChild(element);\n\n return fragment;\n }\n\n /**\n * Called after the component has been drawn.\n */\n afterDraw() {\n this.classList.toggle('wje-lines-' + this.lines, this.hasAttribute('lines'));\n this.classList.toggle('wje-inset', this.hasAttribute('inset'));\n }\n}\n"],"names":[],"mappings":";;;;;AAgBe,MAAM,aAAa,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA,EAKxC,cAAc;AACV,UAAO;AAGX,qCAAY;AAAA,EAFhB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASI,WAAW,gBAAgB;AACvB,WAAO;AAAA,EACf;AAAA;AAAA;AAAA;AAAA,EAKI,kBAAkB;AACd,SAAK,eAAe;AAAA,EAC5B;AAAA;AAAA;AAAA;AAAA;AAAA,EAMI,OAAO;AACH,QAAI,WAAW,SAAS,uBAAwB;AAEhD,QAAI,UAAU,SAAS,cAAc,MAAM;AAC3C,aAAS,YAAY,OAAO;AAE5B,WAAO;AAAA,EACf;AAAA;AAAA;AAAA;AAAA,EAKI,YAAY;AACR,SAAK,UAAU,OAAO,eAAe,KAAK,OAAO,KAAK,aAAa,OAAO,CAAC;AAC3E,SAAK,UAAU,OAAO,aAAa,KAAK,aAAa,OAAO,CAAC;AAAA,EACrE;AACA;"}
package/dist/localize.js CHANGED
@@ -18,7 +18,9 @@ class LocalizerDefault {
18
18
  }
19
19
  // Vyhľadávanie prekladu podľa kľúča
20
20
  translate(key) {
21
+ console.log("TRANSLATE:", this.element.lang, this.lang, this.currentLang, key);
21
22
  const langMap = this.languages.get(this.currentLang);
23
+ console.log("LANG MAP:", langMap);
22
24
  return langMap ? langMap[key] || key : key;
23
25
  }
24
26
  // Vyhľadávanie prekladu podľa kľúča a typu čísla
@@ -65,3 +67,4 @@ class Localizer extends LocalizerDefault {
65
67
  export {
66
68
  Localizer
67
69
  };
70
+ //# sourceMappingURL=localize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localize.js","sources":["../packages/localize/localize.js","../packages/utils/localize.js"],"sourcesContent":["// export const translations = new Map();\n\nexport class LocalizerDefault {\n constructor(element) {\n this.element = element;\n\n this.lang = this.element.lang || document.documentElement.lang || 'en-gb';\n this.dir = this.element.dir || document.documentElement.dir || 'ltr';\n\n this.setLanguage();\n }\n\n get languages() {\n return window.translations;\n }\n\n // Nastavenie aktuálneho jazyka\n setLanguage() {\n if (this.languages.has(this.lang)) {\n this.currentLang = this.lang;\n } else {\n console.error(`Language \"${this.lang}\" not loaded.`);\n }\n }\n\n // Vyhľadávanie prekladu podľa kľúča\n translate(key) {\n console.log(\"TRANSLATE:\",this.element.lang, this.lang, this.currentLang, key);\n const langMap = this.languages.get(this.currentLang);\n console.log(\"LANG MAP:\", langMap);\n return langMap ? langMap[key] || key : key;\n }\n\n // Vyhľadávanie prekladu podľa kľúča a typu čísla\n translatePlural(key, count = 0, type = 'cardinal') {\n const plural = new Intl.PluralRules(this.lang, { type: type });\n\n if (count !== undefined) key += '.' + plural.select(count);\n\n return this.translate(key);\n }\n\n // Formátovanie čísla podľa aktuálneho jazyka\n formatNumber(number, options) {\n return new Intl.NumberFormat(this.currentLang, options).format(number);\n }\n\n // Formátovanie dátumu podľa aktuálneho jazyka\n formatDate(date) {\n return new Intl.DateTimeFormat(this.currentLang).format(new Date(date));\n }\n\n relativeTime(lang, value = 0, unit = 'day', options = { numeric: 'auto' }) {\n lang = lang || this.currentLang;\n return new Intl.RelativeTimeFormat(lang, options).format(value, unit);\n }\n}\n\nexport function registerTranslation(...translation) {\n translation.forEach((t) => {\n if (!t.code) {\n console.error(\"Translation object is missing 'code' property:\", t);\n return;\n }\n\n const code = t.code.toLowerCase();\n if (window.translations.has(code)) {\n window.translations.set(code, { ...window.translations.get(code), ...t });\n } else {\n window.translations.set(code, t);\n }\n });\n}\n","import { LocalizerDefault, registerTranslation } from '../localize/localize.js';\n\nexport class Localizer extends LocalizerDefault {\n constructor(element) {\n super(element);\n }\n static registerTranslation(...translation) {\n registerTranslation(...translation);\n }\n}\n"],"names":[],"mappings":"AAEO,MAAM,iBAAiB;AAAA,EAC1B,YAAY,SAAS;AACjB,SAAK,UAAU;AAEf,SAAK,OAAO,KAAK,QAAQ,QAAQ,SAAS,gBAAgB,QAAQ;AAClE,SAAK,MAAM,KAAK,QAAQ,OAAO,SAAS,gBAAgB,OAAO;AAE/D,SAAK,YAAa;AAAA,EAC1B;AAAA,EAEI,IAAI,YAAY;AACZ,WAAO,OAAO;AAAA,EACtB;AAAA;AAAA,EAGI,cAAc;AACV,QAAI,KAAK,UAAU,IAAI,KAAK,IAAI,GAAG;AAC/B,WAAK,cAAc,KAAK;AAAA,IACpC,OAAe;AACH,cAAQ,MAAM,aAAa,KAAK,IAAI,eAAe;AAAA,IAC/D;AAAA,EACA;AAAA;AAAA,EAGI,UAAU,KAAK;AACX,YAAQ,IAAI,cAAa,KAAK,QAAQ,MAAM,KAAK,MAAM,KAAK,aAAa,GAAG;AAC5E,UAAM,UAAU,KAAK,UAAU,IAAI,KAAK,WAAW;AACnD,YAAQ,IAAI,aAAa,OAAO;AAChC,WAAO,UAAU,QAAQ,GAAG,KAAK,MAAM;AAAA,EAC/C;AAAA;AAAA,EAGI,gBAAgB,KAAK,QAAQ,GAAG,OAAO,YAAY;AAC/C,UAAM,SAAS,IAAI,KAAK,YAAY,KAAK,MAAM,EAAE,MAAY;AAE7D,QAAI,UAAU,OAAW,QAAO,MAAM,OAAO,OAAO,KAAK;AAEzD,WAAO,KAAK,UAAU,GAAG;AAAA,EACjC;AAAA;AAAA,EAGI,aAAa,QAAQ,SAAS;AAC1B,WAAO,IAAI,KAAK,aAAa,KAAK,aAAa,OAAO,EAAE,OAAO,MAAM;AAAA,EAC7E;AAAA;AAAA,EAGI,WAAW,MAAM;AACb,WAAO,IAAI,KAAK,eAAe,KAAK,WAAW,EAAE,OAAO,IAAI,KAAK,IAAI,CAAC;AAAA,EAC9E;AAAA,EAEI,aAAa,MAAM,QAAQ,GAAG,OAAO,OAAO,UAAU,EAAE,SAAS,UAAU;AACvE,WAAO,QAAQ,KAAK;AACpB,WAAO,IAAI,KAAK,mBAAmB,MAAM,OAAO,EAAE,OAAO,OAAO,IAAI;AAAA,EAC5E;AACA;AAEO,SAAS,uBAAuB,aAAa;AAChD,cAAY,QAAQ,CAAC,MAAM;AACvB,QAAI,CAAC,EAAE,MAAM;AACT,cAAQ,MAAM,kDAAkD,CAAC;AACjE;AAAA,IACZ;AAEQ,UAAM,OAAO,EAAE,KAAK,YAAa;AACjC,QAAI,OAAO,aAAa,IAAI,IAAI,GAAG;AAC/B,aAAO,aAAa,IAAI,MAAM,EAAE,GAAG,OAAO,aAAa,IAAI,IAAI,GAAG,GAAG,EAAC,CAAE;AAAA,IACpF,OAAe;AACH,aAAO,aAAa,IAAI,MAAM,CAAC;AAAA,IAC3C;AAAA,EACA,CAAK;AACL;ACtEO,MAAM,kBAAkB,iBAAiB;AAAA,EAC5C,YAAY,SAAS;AACjB,UAAM,OAAO;AAAA,EACrB;AAAA,EACI,OAAO,uBAAuB,aAAa;AACvC,wBAAoB,GAAG,WAAW;AAAA,EAC1C;AACA;"}
@@ -3,6 +3,8 @@ export { fetchAndParseCSS } from './utils/animations.js';
3
3
  export { formatDate } from './utils/date.js';
4
4
  export { event } from './utils/event.js';
5
5
  export { Localizer } from './utils/localize.js';
6
+ export { skSk } from './translations/sk-sk.js';
7
+ export { enGb } from './translations/en-gb.js';
6
8
  export { WjePermissionsApi } from './utils/permissions-api.js';
7
9
  export { default as Accordion } from './wje-accordion/accordion.js';
8
10
  export { default as AccordionItem } from './wje-accordion-item/accordion-item.js';
@@ -4,12 +4,12 @@ export class WjePermissionsApi {
4
4
  * Sets the permission key.
5
5
  * @param value
6
6
  */
7
- static set permissionKey(value: any);
7
+ static set permissionKey(value: any | string);
8
8
  /**
9
9
  * Returns the permission key.
10
10
  * @returns {*|string}
11
11
  */
12
- static get permissionKey(): any;
12
+ static get permissionKey(): any | string;
13
13
  /**
14
14
  * Sets the permissions.
15
15
  * @param value
@@ -17,7 +17,7 @@ export default class Accordion extends WJElement {
17
17
  * Getter for the CSS stylesheet.
18
18
  * @returns {object} The styles for the Accordion element.
19
19
  */
20
- static get cssStyleSheet(): any;
20
+ static get cssStyleSheet(): object;
21
21
  /**
22
22
  * Getter for the observed attributes.
23
23
  * @returns {Array} An array containing the name of the observed attribute.
@@ -39,7 +39,7 @@ export default class Accordion extends WJElement {
39
39
  * Sets the value of the `index` attribute.
40
40
  * @param {number|string} value The value to set for the `index` attribute.
41
41
  */
42
- set index(value: number);
42
+ set index(value: number | string);
43
43
  /**
44
44
  * Retrieves the value of the `index` attribute as a number.
45
45
  * @returns {number} The numerical value of the `index` attribute, or `0` if the attribute is not set.
@@ -12,7 +12,7 @@ export default class AccordionItem extends WJElement {
12
12
  * Getter for the CSS stylesheet.
13
13
  * @returns {object} The styles for the Accordion Item element.
14
14
  */
15
- static get cssStyleSheet(): any;
15
+ static get cssStyleSheet(): object;
16
16
  /**
17
17
  * Getter for the observed attributes.
18
18
  * @returns {Array} An array containing the name of the observed attribute.
@@ -13,7 +13,7 @@ export default class Animation extends WJElement {
13
13
  * Getter for the CSS stylesheet.
14
14
  * @returns {object} The styles for the Animation element.
15
15
  */
16
- static get cssStyleSheet(): any;
16
+ static get cssStyleSheet(): object;
17
17
  /**
18
18
  * Getter for the observed attributes.
19
19
  * @returns {Array} An array containing the name of the observed attribute.
@@ -17,7 +17,7 @@ export default class Aside extends WJElement {
17
17
  * Getter for the CSS stylesheet.
18
18
  * @returns {object} The styles for the Aside element.
19
19
  */
20
- static get cssStyleSheet(): any;
20
+ static get cssStyleSheet(): object;
21
21
  /**
22
22
  * Getter for the observed attributes.
23
23
  * @returns {Array} An empty array as there are no observed attributes.
@@ -26,7 +26,7 @@ export default class Badge extends WJElement {
26
26
  * return ['color'];
27
27
  * }
28
28
  */
29
- static get observedAttributes(): string[];
29
+ static get observedAttributes(): Array<string>;
30
30
  /**
31
31
  * Creates the DOM structure for the Badge element.
32
32
  * @returns {DocumentFragment} A document fragment containing the Badge's structure.
@@ -20,13 +20,13 @@ export default class Breadcrumb extends WJElement {
20
20
  * @static
21
21
  * @returns {object} styles - The CSS styles
22
22
  */
23
- static get cssStyleSheet(): any;
23
+ static get cssStyleSheet(): object;
24
24
  /**
25
25
  * Get observed attributes for the Breadcrumb element.
26
26
  * @static
27
27
  * @returns {Array<string>} - The observed attributes array for the Breadcrumb element.
28
28
  */
29
- static get observedAttributes(): string[];
29
+ static get observedAttributes(): Array<string>;
30
30
  _showSeparator: boolean;
31
31
  showCollapsedIndicator: boolean;
32
32
  /**
@@ -28,13 +28,13 @@ export default class Breadcrumbs extends WJElement {
28
28
  * @static
29
29
  * @returns {object} styles - The CSS styles
30
30
  */
31
- static get cssStyleSheet(): any;
31
+ static get cssStyleSheet(): object;
32
32
  /**
33
33
  * Get observed attributes for the Breadcrumb element.
34
34
  * @static
35
35
  * @returns {Array<string>} - The observed attributes array for the Breadcrumb element.
36
36
  */
37
- static get observedAttributes(): string[];
37
+ static get observedAttributes(): Array<string>;
38
38
  /**
39
39
  * Last breadcrumb flag
40
40
  * @type {boolean}
@@ -54,7 +54,7 @@ export default class Breadcrumbs extends WJElement {
54
54
  * Get items before collapse attribute.
55
55
  * @param {string} value
56
56
  */
57
- set maxItems(value: number);
57
+ set maxItems(value: string);
58
58
  /**
59
59
  * Get items before collapse attribute.
60
60
  * @returns {number}
@@ -33,7 +33,7 @@ export default class Button extends WJElement {
33
33
  * @static
34
34
  * @returns {Array<string>} observedAttributes - The observed attributes array for the Button element.
35
35
  */
36
- static get observedAttributes(): string[];
36
+ static get observedAttributes(): Array<string>;
37
37
  /**
38
38
  * @summary A static property that indicates whether the custom element is form-associated or not.
39
39
  * Form-associated custom elements are elements that can participate in form submission.
@@ -50,12 +50,12 @@ export default class Button extends WJElement {
50
50
  * Properties of the element Button.
51
51
  * @param value
52
52
  */
53
- set color(value: string);
53
+ set color(value: string | string);
54
54
  /**
55
55
  * Get color of the Button element.
56
56
  * @returns {string|string}
57
57
  */
58
- get color(): string;
58
+ get color(): string | string;
59
59
  /**
60
60
  * Set variant of the Button element.
61
61
  * @param value
@@ -80,12 +80,12 @@ export default class Button extends WJElement {
80
80
  * Set variant of the Button element.
81
81
  * @param value
82
82
  */
83
- set dialog(value: any);
83
+ set dialog(value: string | object);
84
84
  /**
85
85
  * Get variant of the Button element.
86
86
  * @returns {string|object}
87
87
  */
88
- get dialog(): any;
88
+ get dialog(): string | object;
89
89
  /**
90
90
  * Set active state of the Button element.
91
91
  * @param {boolean} value The value to set
@@ -13,13 +13,13 @@ export default class ButtonGroup extends WJElement {
13
13
  * @static
14
14
  * @returns {object} styles - The CSS styles
15
15
  */
16
- static get cssStyleSheet(): any;
16
+ static get cssStyleSheet(): object;
17
17
  /**
18
18
  * Get observed attributes for the ButtonGroup element.
19
19
  * @static
20
20
  * @returns {Array<string>} observedAttributes - The observed attributes array
21
21
  */
22
- static get observedAttributes(): string[];
22
+ static get observedAttributes(): Array<string>;
23
23
  /**
24
24
  * Draw method for the ButtonGroup element.
25
25
  * @returns {object} fragment - The document fragment
@@ -17,7 +17,7 @@ export default class Card extends WJElement {
17
17
  * @static
18
18
  * @returns {object} styles - The CSS styles
19
19
  */
20
- static get cssStyleSheet(): any;
20
+ static get cssStyleSheet(): object;
21
21
  /**
22
22
  * Draw method for the Card element.
23
23
  * @param {object} context The context object
@@ -13,7 +13,7 @@ export default class CardContent extends WJElement {
13
13
  * @static
14
14
  * @returns {object} styles - The CSS styles for the CardContent element.
15
15
  */
16
- static get cssStyleSheet(): any;
16
+ static get cssStyleSheet(): object;
17
17
  /**
18
18
  * Draw method for the CardContent element.
19
19
  * @returns {object} fragment - The document fragment containing the drawn element.
@@ -14,7 +14,7 @@ export default class CardControls extends WJElement {
14
14
  * @static
15
15
  * @returns {object} styles - The CSS styles
16
16
  */
17
- static get cssStyleSheet(): any;
17
+ static get cssStyleSheet(): object;
18
18
  /**
19
19
  * Draw method for the CardControls element.
20
20
  * @returns {object} fragment - The document fragment
@@ -13,7 +13,7 @@ export default class CardHeader extends WJElement {
13
13
  * @returns {object} The styles object.
14
14
  * @static
15
15
  */
16
- static get cssStyleSheet(): any;
16
+ static get cssStyleSheet(): object;
17
17
  /**
18
18
  * Draws the CardHeader.
19
19
  * @returns {DocumentFragment} The created document fragment.
@@ -15,7 +15,7 @@ export default class CardSubtitle extends WJElement {
15
15
  * @returns {object} The styles object.
16
16
  * @static
17
17
  */
18
- static get cssStyleSheet(): any;
18
+ static get cssStyleSheet(): object;
19
19
  /**
20
20
  * Getter for the observed attributes.
21
21
  * @returns {Array} An empty array.
@@ -17,7 +17,7 @@ export default class CardTitle extends WJElement {
17
17
  * @returns {object} The styles object.
18
18
  * @static
19
19
  */
20
- static get cssStyleSheet(): any;
20
+ static get cssStyleSheet(): object;
21
21
  /**
22
22
  * Getter for the observed attributes.
23
23
  * @returns {Array} An empty array.
@@ -23,12 +23,12 @@ export default class Carousel extends WJElement {
23
23
  * Active slide attribute.
24
24
  * @param value
25
25
  */
26
- set activeSlide(value: number);
26
+ set activeSlide(value: number | number);
27
27
  /**
28
28
  * Active slide attribute.
29
29
  * @returns {number|number}
30
30
  */
31
- get activeSlide(): number;
31
+ get activeSlide(): number | number;
32
32
  /**
33
33
  * Pagination attribute.
34
34
  * @returns {boolean}
@@ -27,7 +27,7 @@ export default class ColorPicker extends WJElement {
27
27
  * @returns {object} The styles object.
28
28
  * @static
29
29
  */
30
- static get cssStyleSheet(): any;
30
+ static get cssStyleSheet(): object;
31
31
  /**
32
32
  * Getter for the observed attributes.
33
33
  * @returns {Array} An empty array.
@@ -50,17 +50,17 @@ export default class ColorPicker extends WJElement {
50
50
  * Setter for the marker position.
51
51
  * @param {object} value The new marker position.
52
52
  */
53
- set markerPosition(value: any);
53
+ set markerPosition(value: object);
54
54
  /**
55
55
  * Getter for the marker position.
56
56
  * @returns {object} The current marker position.
57
57
  */
58
- get markerPosition(): any;
58
+ get markerPosition(): object;
59
59
  /**
60
60
  * Setter for the color swatches.
61
61
  * @param {string} value The new color swatches.
62
62
  */
63
- set swatches(value: any[]);
63
+ set swatches(value: string);
64
64
  /**
65
65
  * Getter for the color swatches.
66
66
  * @returns {Array} The current color swatches.
@@ -16,7 +16,7 @@ export default class Container extends WJElement {
16
16
  * @returns {object} The styles object.
17
17
  * @static
18
18
  */
19
- static get cssStyleSheet(): any;
19
+ static get cssStyleSheet(): object;
20
20
  /**
21
21
  * Getter for the observed attributes.
22
22
  * @returns {Array} An empty array.
@@ -35,12 +35,12 @@ export default class Dialog extends WJElement {
35
35
  * Sets the headline of the dialog.
36
36
  * @param value
37
37
  */
38
- set placement(value: string);
38
+ set placement(value: string | string);
39
39
  /**
40
40
  * Gets the headline of the dialog.
41
41
  * @returns {string|string}
42
42
  */
43
- get placement(): string;
43
+ get placement(): string | string;
44
44
  /**
45
45
  * Sets the headline of the dialog.
46
46
  * @param value
@@ -30,12 +30,12 @@ export default class Dropdown extends WJElement {
30
30
  * Sets the placement of the dropdown.
31
31
  * @param value
32
32
  */
33
- set trigger(value: string);
33
+ set trigger(value: string | string);
34
34
  /**
35
35
  * Gets the placement of the dropdown.
36
36
  * @returns {string|string}
37
37
  */
38
- get trigger(): string;
38
+ get trigger(): string | string;
39
39
  /**
40
40
  * Callback function to handle other dropdowns being opened. Close the dropdown if it is not the target and collapse is enabled.
41
41
  * @param {Event} e The event object.
@@ -88,12 +88,12 @@ export default class WJElement extends HTMLElement {
88
88
  * Gets the rendering context, either the shadow root or the component itself.
89
89
  * @returns The rendering context.
90
90
  */
91
- get context(): any;
91
+ get context(): this | ShadowRoot;
92
92
  /**
93
93
  * Gets the store instance.
94
94
  * @returns {object} The store instance.
95
95
  */
96
- get store(): any;
96
+ get store(): object;
97
97
  /**
98
98
  * @typedef {object} ArrayActions
99
99
  * @property {Function} addAction - Adds an item to the array.
@@ -83,12 +83,12 @@ export default class FileUpload extends WJElement {
83
83
  * Sets the autoProcessFiles attribute.
84
84
  * @param value
85
85
  */
86
- set autoProcessFiles(value: any);
86
+ set autoProcessFiles(value: any | boolean);
87
87
  /**
88
88
  * Gets the autoProcessFiles attribute.
89
89
  * @returns {any|boolean}
90
90
  */
91
- get autoProcessFiles(): any;
91
+ get autoProcessFiles(): any | boolean;
92
92
  /**
93
93
  * Sets the noUploadButton attribute.
94
94
  * @param value
@@ -29,8 +29,10 @@ export default class FileUploadItem extends WJElement {
29
29
  * @static
30
30
  * @returns {Array<string>}
31
31
  */
32
- static get observedAttributes(): string[];
32
+ static get observedAttributes(): Array<string>;
33
33
  localizer: Localizer;
34
+ set size(value: string);
35
+ get size(): string;
34
36
  /**
35
37
  * Dependencies for the component.
36
38
  * @type {object}
@@ -39,10 +41,10 @@ export default class FileUploadItem extends WJElement {
39
41
  /**
40
42
  * Called when an observed attribute has been added, removed, updated, or replaced.
41
43
  * @param {string} name The name of the attribute that has changed.
42
- * @param {string} old The old value of the attribute.
43
- * @param {string} newName The new value of the attribute.
44
+ * @param {string} oldValue The old value of the attribute.
45
+ * @param {string} newValue The new value of the attribute.
44
46
  */
45
- attributeChangedCallback(name: string, old: string, newName: string): void;
47
+ attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
46
48
  /**
47
49
  * Method to draw the component on the screen.
48
50
  * @returns {DocumentFragment} The fragment containing the component.
@@ -19,7 +19,7 @@ export default class Footer extends WJElement {
19
19
  * @static
20
20
  * @returns {Array<string>}
21
21
  */
22
- static get observedAttributes(): string[];
22
+ static get observedAttributes(): Array<string>;
23
23
  /**
24
24
  * Draws the component.
25
25
  * @returns {DocumentFragment}
@@ -34,7 +34,7 @@ export default class FormatDigital extends WJElement {
34
34
  * @static
35
35
  * @returns {Array<string>} - The attributes to observe.
36
36
  */
37
- static get observedAttributes(): string[];
37
+ static get observedAttributes(): Array<string>;
38
38
  localizer: Localizer;
39
39
  /**
40
40
  * Sets the value of the digital format.
@@ -26,7 +26,7 @@ export default class Header extends WJElement {
26
26
  * @static
27
27
  * @returns {Array<string>}
28
28
  */
29
- static get observedAttributes(): string[];
29
+ static get observedAttributes(): Array<string>;
30
30
  /**
31
31
  * Draws the component.
32
32
  * @returns {DocumentFragment}
@@ -22,7 +22,7 @@ export default class Icon extends WJElement {
22
22
  * @static
23
23
  * @returns {Array<string>}
24
24
  */
25
- static get observedAttributes(): string[];
25
+ static get observedAttributes(): Array<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(): string[];
39
+ static get observedAttributes(): Array<string>;
40
40
  /**
41
41
  * Dependencies of the IconPicker component.
42
42
  * @property {object} dependencies
@@ -29,7 +29,7 @@ export default class ImgComparer extends WJElement {
29
29
  * @static
30
30
  * @returns {Array<string>}
31
31
  */
32
- static get observedAttributes(): string[];
32
+ static get observedAttributes(): Array<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(): string[];
28
+ static get observedAttributes(): Array<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(): any;
20
+ static get cssStyleSheet(): object;
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(): any;
39
+ static get cssStyleSheet(): object;
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(): string[];
27
+ static get observedAttributes(): Array<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: any);
44
+ set response(value: string);
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(): string[];
28
+ static get observedAttributes(): Array<string>;
29
29
  /**
30
30
  * Draws the component.
31
31
  * @returns {DocumentFragment}
@@ -21,7 +21,7 @@ export default class Main extends WJElement {
21
21
  * @static
22
22
  * @returns {Array<string>}
23
23
  */
24
- static get observedAttributes(): string[];
24
+ static get observedAttributes(): Array<string>;
25
25
  /**
26
26
  * Draws the component for the main section.
27
27
  * @returns {DocumentFragment}