wj-elements 0.1.143 → 0.1.144

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 (66) hide show
  1. package/dist/localize.js +6 -2
  2. package/dist/localize.js.map +1 -1
  3. package/dist/packages/localize/localize.d.ts +1 -1
  4. package/dist/packages/utils/permissions-api.d.ts +2 -2
  5. package/dist/packages/wje-accordion/accordion.element.d.ts +2 -2
  6. package/dist/packages/wje-accordion-item/accordion-item.element.d.ts +1 -1
  7. package/dist/packages/wje-animation/animation.element.d.ts +1 -1
  8. package/dist/packages/wje-aside/aside.element.d.ts +1 -1
  9. package/dist/packages/wje-badge/badge.element.d.ts +1 -1
  10. package/dist/packages/wje-breadcrumb/breadcrumb.element.d.ts +2 -2
  11. package/dist/packages/wje-breadcrumbs/breadcrumbs.element.d.ts +3 -3
  12. package/dist/packages/wje-button/button.element.d.ts +5 -5
  13. package/dist/packages/wje-button-group/button-group.element.d.ts +2 -2
  14. package/dist/packages/wje-card/card.element.d.ts +1 -1
  15. package/dist/packages/wje-card-content/card-content.element.d.ts +1 -1
  16. package/dist/packages/wje-card-controls/card-controls.element.d.ts +1 -1
  17. package/dist/packages/wje-card-header/card-header.element.d.ts +1 -1
  18. package/dist/packages/wje-card-subtitle/card-subtitle.element.d.ts +1 -1
  19. package/dist/packages/wje-card-title/card-title.element.d.ts +1 -1
  20. package/dist/packages/wje-carousel/carousel.element.d.ts +2 -2
  21. package/dist/packages/wje-color-picker/color-picker.element.d.ts +4 -4
  22. package/dist/packages/wje-container/container.element.d.ts +1 -1
  23. package/dist/packages/wje-dialog/dialog.element.d.ts +2 -2
  24. package/dist/packages/wje-dropdown/dropdown.element.d.ts +2 -2
  25. package/dist/packages/wje-element/element.d.ts +2 -2
  26. package/dist/packages/wje-file-upload/file-upload.element.d.ts +2 -2
  27. package/dist/packages/wje-file-upload-item/file-upload-item.element.d.ts +1 -1
  28. package/dist/packages/wje-footer/footer.element.d.ts +1 -1
  29. package/dist/packages/wje-format-digital/format-digital.element.d.ts +1 -1
  30. package/dist/packages/wje-header/header.element.d.ts +1 -1
  31. package/dist/packages/wje-icon/icon.element.d.ts +1 -1
  32. package/dist/packages/wje-icon-picker/icon-picker.element.d.ts +1 -1
  33. package/dist/packages/wje-img/img.element.d.ts +4 -4
  34. package/dist/packages/wje-img-comparer/img-comparer.element.d.ts +1 -1
  35. package/dist/packages/wje-infinite-scroll/infinite-scroll.element.d.ts +3 -3
  36. package/dist/packages/wje-input-file/input-file.element.d.ts +1 -1
  37. package/dist/packages/wje-item/item.element.d.ts +1 -1
  38. package/dist/packages/wje-kanban/kanban.element.d.ts +3 -3
  39. package/dist/packages/wje-label/label.element.d.ts +1 -1
  40. package/dist/packages/wje-level-indicator/level-indicator.element.d.ts +2 -2
  41. package/dist/packages/wje-main/main.element.d.ts +1 -1
  42. package/dist/packages/wje-menu/menu.element.d.ts +1 -1
  43. package/dist/packages/wje-menu-button/menu-button.element.d.ts +1 -1
  44. package/dist/packages/wje-menu-label/menu-label.element.d.ts +1 -1
  45. package/dist/packages/wje-option/option.element.d.ts +1 -1
  46. package/dist/packages/wje-options/options.element.d.ts +1 -1
  47. package/dist/packages/wje-pagination/pagination.element.d.ts +5 -5
  48. package/dist/packages/wje-popup/popup.element.d.ts +1 -1
  49. package/dist/packages/wje-progress-bar/progress-bar.element.d.ts +1 -1
  50. package/dist/packages/wje-radio/radio.element.d.ts +1 -1
  51. package/dist/packages/wje-rate/rate.element.d.ts +3 -3
  52. package/dist/packages/wje-relative-time/relative-time.element.d.ts +1 -1
  53. package/dist/packages/wje-reorder/reorder.element.d.ts +1 -1
  54. package/dist/packages/wje-route/route.element.d.ts +1 -1
  55. package/dist/packages/wje-router/router.element.d.ts +1 -1
  56. package/dist/packages/wje-router-link/router-link.element.d.ts +1 -1
  57. package/dist/packages/wje-select/select.element.d.ts +2 -2
  58. package/dist/packages/wje-slider/slider.element.d.ts +1 -1
  59. package/dist/packages/wje-split-view/split-view.element.d.ts +1 -1
  60. package/dist/packages/wje-textarea/textarea.element.d.ts +1 -1
  61. package/dist/packages/wje-tree-item/tree-item.element.d.ts +2 -2
  62. package/dist/wje-textarea.js +4 -1
  63. package/dist/wje-textarea.js.map +1 -1
  64. package/package.json +1 -1
  65. package/dist/packages/wje-accordion/accordion.test.d.ts +0 -0
  66. package/dist/packages/wje-color-picker/color-picker.test.d.ts +0 -1
package/dist/localize.js CHANGED
@@ -3,6 +3,7 @@ class LocalizerDefault {
3
3
  this.element = element;
4
4
  this.lang = this.element.lang || document.documentElement.lang || "en-gb";
5
5
  this.dir = this.element.dir || document.documentElement.dir || "ltr";
6
+ this.currentLang = "en-gb";
6
7
  this.setLanguage();
7
8
  }
8
9
  get languages() {
@@ -10,7 +11,8 @@ class LocalizerDefault {
10
11
  }
11
12
  // Nastavenie aktuálneho jazyka
12
13
  setLanguage() {
13
- if (this.languages.has(this.lang)) {
14
+ var _a;
15
+ if ((_a = this.languages) == null ? void 0 : _a.has(this.lang)) {
14
16
  this.currentLang = this.lang;
15
17
  } else {
16
18
  console.error(`Language "${this.lang}" not loaded.`);
@@ -18,7 +20,9 @@ class LocalizerDefault {
18
20
  }
19
21
  // Vyhľadávanie prekladu podľa kľúča
20
22
  translate(key) {
21
- const langMap = this.languages.get(this.currentLang);
23
+ var _a;
24
+ const langMap = (_a = this.languages) == null ? void 0 : _a.get(this.currentLang);
25
+ if (!langMap) return key;
22
26
  return langMap ? langMap[key] || key : key;
23
27
  }
24
28
  // Vyhľadávanie prekladu podľa kľúča a typu čísla
@@ -1 +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 const langMap = this.languages.get(this.currentLang);\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;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I,GAAG,GAAG,EAAC,CAAE;AAAA,IACpF,OAAe;AACH,aAAO,aAAa,IAAI,MAAM,CAAC;AAAA,IAC3C;AAAA,EACA,CAAK;AACL;ACpEO,MAAM,kBAAkB,iBAAiB;AAAA,EAC5C,YAAY,SAAS;AACjB,UAAM,OAAO;AAAA,EACrB;AAAA,EACI,OAAO,uBAAuB,aAAa;AACvC,wBAAoB,GAAG,WAAW;AAAA,EAC1C;AACA;"}
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 this.currentLang = 'en-gb';\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 const langMap = this.languages?.get(this.currentLang);\n if (!langMap) return key;\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;AAC/D,SAAK,cAAc;AAEnB,SAAK,YAAa;AAAA,EAC1B;AAAA,EAEI,IAAI,YAAY;AACZ,WAAO,OAAO;AAAA,EACtB;AAAA;AAAA,EAGI,cAAc;AAlBlB;AAmBQ,SAAI,UAAK,cAAL,mBAAgB,IAAI,KAAK,OAAO;AAChC,WAAK,cAAc,KAAK;AAAA,IACpC,OAAe;AACH,cAAQ,MAAM,aAAa,KAAK,IAAI,eAAe;AAAA,IAC/D;AAAA,EACA;AAAA;AAAA,EAGI,UAAU,KAAK;AA3BnB;AA4BQ,UAAM,WAAU,UAAK,cAAL,mBAAgB,IAAI,KAAK;AACzC,QAAI,CAAC,QAAS,QAAO;AACrB,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;"}
@@ -4,9 +4,9 @@ export class LocalizerDefault {
4
4
  element: any;
5
5
  lang: any;
6
6
  dir: any;
7
+ currentLang: string;
7
8
  get languages(): any;
8
9
  setLanguage(): void;
9
- currentLang: any;
10
10
  translate(key: any): any;
11
11
  translatePlural(key: any, count?: number, type?: string): any;
12
12
  formatNumber(number: any, options: any): string;
@@ -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,7 +29,7 @@ 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
34
  set size(value: string);
35
35
  get size(): string;
@@ -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
@@ -24,7 +24,7 @@ export default class Img 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
  _fallout: boolean;
29
29
  actions: {
30
30
  delete: () => void;
@@ -35,12 +35,12 @@ export default class Img extends WJElement {
35
35
  * otherwise, assigns the value to the `_fallout` property.
36
36
  * @param {string|*} value The value to set for the fallout property. If a string, it will update the `fallout` attribute; for other types, it will assign it to the `_fallout` property.
37
37
  */
38
- set fallout(value: string);
38
+ set fallout(value: string | any);
39
39
  /**
40
40
  * Retrieves the value of the 'fallout' attribute if it exists, otherwise returns the internal `_fallout` property.
41
41
  * @returns {string|null} The value of the 'fallout' attribute or the `_fallout` property if the attribute is not present. Returns null if no value is found.
42
42
  */
43
- get fallout(): string;
43
+ get fallout(): string | null;
44
44
  /**
45
45
  * Sets the value of the loader attribute.
46
46
  * @param {string} value The value to set for the loader attribute.
@@ -50,7 +50,7 @@ export default class Img extends WJElement {
50
50
  * Retrieves the value of the 'loader' attribute from the element.
51
51
  * @returns {string|null} The value of the 'loader' attribute if set, otherwise null.
52
52
  */
53
- get loader(): string;
53
+ get loader(): string | null;
54
54
  /**
55
55
  * Creates and assembles a lazy-loaded image element within a document fragment.
56
56
  * @returns {DocumentFragment} A document fragment containing the image element.
@@ -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}
@@ -20,7 +20,7 @@ export default class LevelIndicator extends WJElement {
20
20
  * Sets the level attribute for an instance.
21
21
  * @param {string} value The value to set for the 'level' attribute.
22
22
  */
23
- set level(value: number);
23
+ set level(value: string);
24
24
  /**
25
25
  * Retrieves the level attribute of an element, with validation to ensure
26
26
  * it is within the range of 0 to 3. If the level attribute is not present,
@@ -33,7 +33,7 @@ export default class LevelIndicator extends WJElement {
33
33
  * Sets the value of the "bars" attribute.
34
34
  * @param {string} value The value to set for the "bars" attribute.
35
35
  */
36
- set bars(value: number);
36
+ set bars(value: string);
37
37
  /**
38
38
  * Retrieves the value of the "bars" attribute, parses it as an integer,
39
39
  * and ensures it is at least 1. If the attribute is not set, defaults to 3.
@@ -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}
@@ -34,7 +34,7 @@ export default class Menu extends WJElement {
34
34
  * @static
35
35
  * @returns {Array<string>}
36
36
  */
37
- static get observedAttributes(): string[];
37
+ static get observedAttributes(): Array<string>;
38
38
  /**
39
39
  * Draws the component for the menu.
40
40
  * @returns {DocumentFragment}
@@ -21,7 +21,7 @@ export default class MenuButton extends WJElement {
21
21
  * @static
22
22
  * @returns {Array<string>}
23
23
  */
24
- static get observedAttributes(): string[];
24
+ static get observedAttributes(): Array<string>;
25
25
  /**
26
26
  * Draws the component for the menu button.
27
27
  * @returns {DocumentFragment}
@@ -29,7 +29,7 @@ export default class MenuLabel extends WJElement {
29
29
  * @static
30
30
  * @returns {Array<string>}
31
31
  */
32
- static get observedAttributes(): string[];
32
+ static get observedAttributes(): Array<string>;
33
33
  hasSubmenu: boolean;
34
34
  /**
35
35
  * Draws the component for the menu label.
@@ -25,7 +25,7 @@ export default class Option extends WJElement {
25
25
  * @static
26
26
  * @returns {Array<string>}
27
27
  */
28
- static get observedAttributes(): string[];
28
+ static get observedAttributes(): Array<string>;
29
29
  /**
30
30
  * Dependencies of the Option component.
31
31
  */
@@ -18,7 +18,7 @@ export default class Options extends WJElement {
18
18
  * @static
19
19
  * @returns {Array<string>}
20
20
  */
21
- static get observedAttributes(): string[];
21
+ static get observedAttributes(): Array<string>;
22
22
  _loadedOptions: any[];
23
23
  dependencies: {
24
24
  'wje-option': typeof Option;
@@ -26,7 +26,7 @@ export default class Pagination extends WJElement {
26
26
  * Sets the value of the 'page' attribute for the object.
27
27
  * @param {string} value The value to set for the 'page' attribute.
28
28
  */
29
- set page(value: number);
29
+ set page(value: string);
30
30
  /**
31
31
  * Retrieves the current page number as a numeric value.
32
32
  * @returns {number} The current page number. Returns 0 if the attribute 'page' is not set or is not a numeric value.
@@ -37,7 +37,7 @@ export default class Pagination extends WJElement {
37
37
  * Updates the 'max-pages' attribute with the provided value.
38
38
  * @param {number|string} value The maximum number of pages to set. Can be a number or a parsable string representing a number.
39
39
  */
40
- set maxPages(value: number);
40
+ set maxPages(value: number | string);
41
41
  /**
42
42
  * Gets the maximum number of pages.
43
43
  * This getter retrieves the value of the "max-pages" attribute from the element.
@@ -49,7 +49,7 @@ export default class Pagination extends WJElement {
49
49
  * Sets the `pageSize` attribute to the specified value.
50
50
  * @param {number|string} value The desired page size value. This can be a number or a string representation of the size.
51
51
  */
52
- set pageSize(value: number);
52
+ set pageSize(value: number | string);
53
53
  /**
54
54
  * Retrieves the value of the 'page-size' attribute and converts it to a number.
55
55
  * If the attribute is not set or is invalid, returns the default value of 3.
@@ -95,12 +95,12 @@ export default class Pagination extends WJElement {
95
95
  * based on the total items, current page, page size, and maximum pages.
96
96
  * @param {object} value The value to set the pagination object. The pagination details are computed internally.
97
97
  */
98
- set paginateObj(value: any);
98
+ set paginateObj(value: object);
99
99
  /**
100
100
  * Retrieves the pagination object used for managing paginated data.
101
101
  * @returns {object} The pagination object containing details and functionality for paginating data.
102
102
  */
103
- get paginateObj(): any;
103
+ get paginateObj(): object;
104
104
  /**
105
105
  * Sets the 'round' attribute on the element. If the provided value is truthy,
106
106
  * the 'round' attribute is added. If the value is falsy, the attribute is removed.
@@ -26,7 +26,7 @@ export default class Popup 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
  _manual: boolean;
31
31
  /**
32
32
  * Sets the manual property of the popup.
@@ -25,7 +25,7 @@ export default class ProgressBar extends WJElement {
25
25
  * @static
26
26
  * @returns {Array<string>}
27
27
  */
28
- static get observedAttributes(): string[];
28
+ static get observedAttributes(): Array<string>;
29
29
  /**
30
30
  * Sets the radius of the progress bar.
31
31
  * @param {number} value The value to set.
@@ -23,7 +23,7 @@ export default class Radio extends WJElement {
23
23
  * @static
24
24
  * @returns {Array<string>}
25
25
  */
26
- static get observedAttributes(): string[];
26
+ static get observedAttributes(): Array<string>;
27
27
  _checked: boolean;
28
28
  /**
29
29
  * Sets the name of the radio button.
@@ -26,7 +26,7 @@ export default class Rate extends WJElement {
26
26
  * @static
27
27
  * @returns {Array<string>}
28
28
  */
29
- static get observedAttributes(): string[];
29
+ static get observedAttributes(): Array<string>;
30
30
  /**
31
31
  * Sets the precision of the rating component.
32
32
  * @param {number} value The value to set.
@@ -51,12 +51,12 @@ export default class Rate extends WJElement {
51
51
  * Sets the icons of the rating component.
52
52
  * @param {Array<string>} value The value to set.
53
53
  */
54
- set icons(value: string[]);
54
+ set icons(value: Array<string>);
55
55
  /**
56
56
  * Gets the icons of the rating component.
57
57
  * @returns {Array<string>} The value of the icons.
58
58
  */
59
- get icons(): string[];
59
+ get icons(): Array<string>;
60
60
  /**
61
61
  * Sets the value of the rating component.
62
62
  * @param {number} value The value to set.
@@ -15,7 +15,7 @@ export default class RelativeTime extends WJElement {
15
15
  * @static
16
16
  * @returns {Array<string>}
17
17
  */
18
- static get observedAttributes(): string[];
18
+ static get observedAttributes(): Array<string>;
19
19
  localizer: Localizer;
20
20
  /**
21
21
  * Sets the date of the relative time component.
@@ -23,7 +23,7 @@ export default class Reorder extends WJElement {
23
23
  * @static
24
24
  * @returns {Array<string>}
25
25
  */
26
- static get observedAttributes(): string[];
26
+ static get observedAttributes(): Array<string>;
27
27
  dragEl: Element;
28
28
  items: any[];
29
29
  originalIndex: number;
@@ -13,7 +13,7 @@ export default class Route extends WJElement {
13
13
  * @static
14
14
  * @returns {Array<string>}
15
15
  */
16
- static get observedAttributes(): string[];
16
+ static get observedAttributes(): Array<string>;
17
17
  /**
18
18
  * Draws the component for the route.
19
19
  * @returns {DocumentFragment}
@@ -13,7 +13,7 @@ export default class Routerx extends WJElement {
13
13
  * @static
14
14
  * @returns {Array<string>}
15
15
  */
16
- static get observedAttributes(): string[];
16
+ static get observedAttributes(): Array<string>;
17
17
  /**
18
18
  * Sets up the router after the component is drawn.
19
19
  */
@@ -20,7 +20,7 @@ export default class RouterLink extends WJElement {
20
20
  * @static
21
21
  * @returns {Array<string>}
22
22
  */
23
- static get observedAttributes(): string[];
23
+ static get observedAttributes(): Array<string>;
24
24
  /**
25
25
  * Draws the component for the router link.
26
26
  * @returns {DocumentFragment}
@@ -43,7 +43,7 @@ export default class Select extends WJElement {
43
43
  * @static
44
44
  * @returns {Array<string>}
45
45
  */
46
- static get observedAttributes(): string[];
46
+ static get observedAttributes(): Array<string>;
47
47
  /**
48
48
  * Whether the input is associated with a form.
49
49
  * @type {boolean}
@@ -221,7 +221,7 @@ export default class Select extends WJElement {
221
221
  * selections(true);
222
222
  */
223
223
  selections(silence?: boolean): void;
224
- selectedOptions: Node[] | (NodeList & any[]);
224
+ selectedOptions: (NodeList & any[]) | Node[];
225
225
  /**
226
226
  * Manages the display of a counter element to indicate the number of items exceeding the maximum allowed options.
227
227
  * - If the number of selected items equals the maximum allowed, the counter element is removed.
@@ -16,7 +16,7 @@ export default class Slider extends WJElement {
16
16
  * @static
17
17
  * @returns {Array<string>}
18
18
  */
19
- static get observedAttributes(): string[];
19
+ static get observedAttributes(): Array<string>;
20
20
  /**
21
21
  * Sets the value of the slider.
22
22
  * @param {number} value The value to set.
@@ -34,7 +34,7 @@ export default class SplitView extends WJElement {
34
34
  * @static
35
35
  * @returns {Array<string>}
36
36
  */
37
- static get observedAttributes(): string[];
37
+ static get observedAttributes(): Array<string>;
38
38
  set initial(value: number);
39
39
  get initial(): number;
40
40
  /**
@@ -39,7 +39,7 @@ export default class Textarea extends WJElement {
39
39
  * @static
40
40
  * @returns {Array<string>}
41
41
  */
42
- static get observedAttributes(): string[];
42
+ static get observedAttributes(): Array<string>;
43
43
  /**
44
44
  * Setter for the invalid attribute.
45
45
  * @param {boolean} isInvalid Whether the input is invalid.
@@ -24,7 +24,7 @@ export default class TreeItem extends HTMLElement {
24
24
  * @static
25
25
  * @returns {Array<string>}
26
26
  */
27
- static get observedAttributes(): string[];
27
+ static get observedAttributes(): Array<string>;
28
28
  _selection: string;
29
29
  /**
30
30
  * Sets the expanded state of the element. When set to a truthy value,
@@ -59,7 +59,7 @@ export default class TreeItem extends HTMLElement {
59
59
  * specific to the implementation of the component
60
60
  * (e.g., 'single', 'multiple').
61
61
  */
62
- set selection(value: any);
62
+ set selection(value: string);
63
63
  /**
64
64
  * Retrieves the current selection.
65
65
  * @returns {*} The value of the current selection.
@@ -260,13 +260,16 @@ class Textarea extends WJElement {
260
260
  });
261
261
  }
262
262
  componentCleanup() {
263
+ var _a;
263
264
  this.observer.disconnect();
265
+ (_a = this.resizeObserver) == null ? void 0 : _a.unobserve(this.input);
264
266
  }
265
267
  /**
266
268
  * Disconnects the component.
267
269
  */
268
270
  beforeDisconnect() {
269
- this.resizeObserver.unobserve(this.input);
271
+ var _a;
272
+ (_a = this.resizeObserver) == null ? void 0 : _a.unobserve(this.input);
270
273
  }
271
274
  /**
272
275
  * @summary Validates the input.
@@ -1 +1 @@
1
- {"version":3,"file":"wje-textarea.js","sources":["../packages/wje-textarea/textarea.element.js","../packages/wje-textarea/textarea.js"],"sourcesContent":["import { default as WJElement, event } from '../wje-element/element.js';\nimport styles from './styles/styles.css?inline';\n\n/**\n * `Textarea` is a custom web component that represents a textarea input.\n * @summary This element represents a textarea input.\n * @documentation https://elements.webjet.sk/components/textarea\n * @status stable\n * @augments WJElement\n * @csspart native - The native textarea wrapper.\n * @csspart input - The textarea input.\n * @csspart wrapper - The textarea wrapper.\n * @cssproperty [--wje-textarea-font-family=var(--wje-font-family)] - Specifies the font family used for the textarea. Accepts any valid CSS font-family value.\n * @cssproperty [--wje-textarea-background-color=var(--wje-background)] - Sets the background color of the textarea. Accepts any valid CSS color value.\n * @cssproperty [--wje-textarea-color=var(--wje-color)] - Defines the text color within the textarea. Accepts any valid CSS color value.\n * @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.\n * @cssproperty [--wje-textarea-border-width=1px] - Specifies the width of the textarea's border. Accepts any valid CSS length unit.\n * @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`.\n * @cssproperty [--wje-textarea-border-color=var(--wje-border-color)] - Defines the border color of the textarea. Accepts any valid CSS color value.\n * @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.\n * @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.\n * @cssproperty [--wje-textarea-margin-bottom=.5rem] - Sets the bottom margin of the textarea. Ensures spacing between the textarea and other elements.\n * @cssproperty [--wje-textarea-line-height=20px] - Specifies the line height of the text within the textarea. Helps control the vertical spacing of the text.\n * @cssproperty [--wje-textarea-padding=0.5rem] - Defines the padding inside the textarea. Controls the spacing between the content and the border.\n * @tag wje-textarea\n */\n\nexport default class Textarea extends WJElement {\n /**\n * Creates an instance of Textarea.\n * @class\n */\n constructor() {\n super();\n\n this.invalid = false;\n this.pristine = true;\n this.internals = this.attachInternals();\n this.observer = new MutationObserver(this.observeFunction);\n }\n\n observeFunction = (mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.type === 'attributes') {\n const attributeName = mutation.attributeName;\n const oldValue = mutation.oldValue;\n const newValue = this.getAttribute(attributeName);\n\n console.log(`Attribute ${attributeName} changed from ${oldValue} to ${newValue}`);\n }\n });\n\n this.refresh();\n };\n\n /**\n * Setter for the value attribute.\n * @param {string} value The value to set.\n */\n set value(value) {\n this.internals.setFormValue(value);\n\n if (this.input) this.input.value = value;\n\n this.pristine = false;\n this._value = value;\n }\n\n /**\n * Getter for the value attribute.\n * @returns {string} The value of the attribute.\n */\n get value() {\n return this.input?.value ?? this._value ?? '';\n }\n\n /**\n * Getter for the invalid attribute.\n * @returns {boolean} Whether the attribute is present.\n */\n get invalid() {\n return this.hasAttribute('invalid');\n }\n\n /**\n * Setter for the invalid attribute.\n * @param {boolean} isInvalid Whether the input is invalid.\n */\n set invalid(isInvalid) {\n if (isInvalid) this.setAttribute('invalid', '');\n else this.removeAttribute('invalid');\n }\n\n /**\n * Getter for the form attribute.\n * @returns {HTMLFormElement} The form the input is associated with.\n */\n get form() {\n return this.internals.form;\n }\n\n /**\n * Getter for the name attribute.\n * @returns {string} The name of the input.\n */\n get name() {\n return this.getAttribute('name');\n }\n\n /**\n * Getter for the type attribute.\n * @returns {string} The type of the input.\n */\n get type() {\n return this.localName;\n }\n\n /**\n * Getter for the validity attribute.\n * @returns {ValidityState} The validity state of the input.\n */\n get validity() {\n return this.internals.validity;\n }\n\n /**\n * Getter for the validationMessage attribute.\n * @returns {string} The validation message of the input.\n */\n get validationMessage() {\n return this.internals.validationMessage;\n }\n\n /**\n * Getter for the willValidate attribute.\n * @returns {boolean} Whether the input will be validated.\n */\n get willValidate() {\n return this.internals.willValidate;\n }\n\n className = 'Textarea';\n\n /**\n * Returns the CSS styles for the component.\n * @static\n * @returns {CSSStyleSheet} The CSS stylesheet\n */\n static get cssStyleSheet() {\n return styles;\n }\n\n /**\n * Whether the input is associated with a form.\n * @type {boolean}\n */\n static formAssociated = true;\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 set placeholder(value) {\n this.setAttribute('placeholder', value);\n }\n\n get placeholder() {\n return this.getAttribute('placeholder');\n }\n\n /**\n * Sets up the attributes for the component.\n */\n setupAttributes() {\n this.isShadowRoot = 'open';\n\n // if some value was set via value setter then don't use default value\n if (this.pristine) {\n this.value = this.innerHTML;\n this.pristine = false;\n }\n }\n\n beforeDraw() {\n this.observer.disconnect();\n }\n\n /**\n * Draws the component for the textarea.\n * @returns {DocumentFragment}\n */\n draw() {\n let fragment = document.createDocumentFragment();\n\n let native = document.createElement('div');\n native.classList.add('native-textarea', this.variant || 'default');\n native.setAttribute('part', 'native');\n\n if (this.hasAttribute('invalid')) native.classList.add('has-error');\n\n let wrapper = document.createElement('div');\n wrapper.setAttribute('part', 'wrapper');\n wrapper.classList.add('wrapper');\n\n let inputWrapper = document.createElement('div');\n inputWrapper.classList.add('input-wrapper');\n\n let label = document.createElement('label');\n label.htmlFor = 'textarea';\n label.innerHTML = this.label || '';\n\n let input = document.createElement('textarea');\n input.id = 'textarea';\n input.name = this.name;\n input.disabled = this.hasAttribute('disabled');\n input.innerText = this.value;\n input.placeholder = this.placeholder || '';\n input.classList.add('form-control');\n input.setAttribute('part', 'input');\n input.setAttribute('rows', this.rows || 3);\n input.setAttribute('spellcheck', false);\n\n const attributes = Array.from(this.attributes).map((attr) => attr.name);\n\n attributes.forEach((attr) => {\n if (this.hasAttribute(attr)) {\n input.setAttribute(attr, this[attr] || '');\n }\n });\n\n if (this.resize === 'auto') input.addEventListener('input', this.setTextareaHeight);\n\n if (this.variant === 'standard') {\n if (this.label) native.appendChild(label);\n } else {\n inputWrapper.appendChild(label);\n }\n\n inputWrapper.appendChild(input);\n\n wrapper.appendChild(inputWrapper);\n\n native.appendChild(wrapper);\n\n fragment.appendChild(native);\n\n if (this.hasAttribute('counter')) {\n input.maxLength = this.maxLength || 1000;\n input.addEventListener('input', this.counterFn);\n\n let counter = document.createElement('div');\n counter.classList.add('counter');\n counter.innerText = `${input.value.length}/${input.maxLength}`;\n\n this.counterElement = counter;\n fragment.appendChild(counter);\n }\n\n this.native = native;\n this.labelElement = label;\n this.input = input;\n\n return fragment;\n }\n\n /**\n * Sets up the event listeners after the component is drawn.\n */\n afterDraw() {\n this.resizeObserver = new ResizeObserver(() => this.setTextareaHeight);\n\n if (!this.hasAttribute('disabled')) {\n event.addListener(this, 'click', 'wje:textarea:change');\n event.addListener(this, 'click', 'wje:textarea:input');\n }\n\n this.input.addEventListener('focus', (e) => {\n this.labelElement.classList.add('fade');\n this.native.classList.add('focused');\n });\n\n this.input.addEventListener('blur', (e) => {\n this.native.classList.remove('focused');\n if (!e.target.value) this.labelElement.classList.remove('fade');\n });\n\n this.addEventListener('invalid', (e) => {\n this.invalid = true;\n this.pristine = false;\n\n this.showInvalidMessage();\n\n if (this.customErrorDisplay) {\n e.preventDefault();\n }\n });\n\n this.input.addEventListener('input', (e) => {\n this.validateInput();\n\n if (this.validateOnChange) {\n this.pristine = false;\n this.propagateValidation();\n }\n\n this.input.classList.remove('pristine');\n this.labelElement.classList.add('fade');\n\n const clone = new e.constructor(e.type, e);\n this.dispatchEvent(clone);\n\n event.dispatchCustomEvent(this, 'wje-textarea:input', {\n value: this.input.value,\n });\n\n this.value = this.input.value;\n });\n\n this.validateInput();\n\n this.observer.observe(this, {\n attributes: true, // Watch for attribute changes\n attributeOldValue: true, // Keep track of the old value of attributes\n });\n }\n\n componentCleanup() {\n this.observer.disconnect();\n }\n\n /**\n * Disconnects the component.\n */\n beforeDisconnect() {\n this.resizeObserver.unobserve(this.input);\n }\n\n /**\n * Sets the height of the textarea.\n */\n setTextareaHeight = () => {\n if (this.getAttribute('resize') === 'auto') {\n this.input.style.height = 'auto';\n this.input.style.height = this.input.scrollHeight + 'px';\n }\n };\n\n /**\n * Updates the counter for the textarea.\n * @param {Event} e The event object.\n */\n counterFn = (e) => {\n this.counterElement.innerText = e.target.value.length + '/' + this.input.maxLength;\n };\n\n /**\n * @summary Validates the input.\n * This method checks the validity state of the input. If the input is not valid, it iterates over the validity state object.\n * For each invalid state, it constructs an attribute name and checks if the input has this attribute.\n * If the input has the attribute, it sets the validation error to the state and the error message to the attribute value.\n * If the input does not have the attribute, it sets the error message to the default validation message of the input.\n * 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.\n * If the input is valid, it sets the validity in the form internals to an empty object.\n */\n validateInput() {\n const validState = this.input.validity;\n\n if (!validState.valid) {\n for (let state in validState) {\n const attr = `message-${state.toString()}`;\n\n if (validState[state]) {\n this.validationError = state.toString();\n let errorMessage = this.message;\n\n // TODO this take error messages based on lang from operating system of user should we implement custom translations based on app language ?\n if (!this.hasAttribute('message'))\n errorMessage = this.hasAttribute(attr) ? this.getAttribute(attr) : this.input.validationMessage;\n\n this.internals.setValidity({ [this.validationError]: true }, errorMessage);\n }\n }\n } else {\n this.internals.setValidity({});\n }\n }\n\n /**\n * @summary Propagates the validation state of the input.\n * This method sets the 'invalid' property of the input based on its 'pristine' state and its internal validity state.\n * If the input is invalid and the 'customErrorDisplay' property is true, it dispatches an 'invalid' event.\n */\n propagateValidation() {\n this.invalid = !this.pristine && !this.internals.validity.valid;\n\n if (this.invalid && this.customErrorDisplay) {\n this.dispatchEvent(new Event('invalid'));\n }\n }\n\n /**\n * @summary Callback function that is called when the custom element is associated with a form.\n * This function adds an event listener to the form's submit event, which validates the input and propagates the validation.\n * @param {HTMLFormElement} form The form the custom element is associated with.\n */\n formAssociatedCallback(form) {\n this.internals.setFormValue(this.value);\n form?.addEventListener('submit', () => {\n this.validateInput();\n this.propagateValidation();\n });\n }\n\n /**\n * The formResetCallback method is a built-in lifecycle callback that gets called when a form gets reset.\n * This method is responsible for resetting the value of the custom input element to its default value.\n * It also resets the form value and validity state in the form internals.\n * @function\n */\n formResetCallback() {\n // Set the value of the custom input element to its default value\n this.value = this.defaultValue;\n // Reset the form value in the form internals to the default value\n this.internals.setFormValue(this.defaultValue);\n // Reset the validity state in the form internals\n this.internals.setValidity({});\n }\n\n /**\n * The formStateRestoreCallback method is a built-in lifecycle callback that gets called when the state of a form-associated custom element is restored.\n * This method is responsible for restoring the value of the custom input element to its saved state.\n * It also restores the form value and validity state in the form internals to their saved states.\n * @param {object} state The saved state of the custom input element.\n * @function\n */\n formStateRestoreCallback(state) {\n // Set the value of the custom input element to its saved value\n this.value = state.value;\n // Restore the form value in the form internals to the saved value\n this.internals.setFormValue(state.value);\n // Restore the validity state in the form internals to the saved state\n this.internals.setValidity({});\n }\n\n /**\n * The formStateSaveCallback method is a built-in lifecycle callback that gets called when the state of a form-associated custom element is saved.\n * This method is responsible for saving the value of the custom input element.\n * @returns {object} The saved state of the custom input element.\n * @function\n */\n formStateSaveCallback() {\n return {\n value: this.value,\n };\n }\n\n /**\n * The formDisabledCallback method is a built-in lifecycle callback that gets called when the disabled state of a form-associated custom element changes.\n * This method is not implemented yet.\n * @param {boolean} disabled The new disabled state of the custom input element.\n * @function\n */\n formDisabledCallback(disabled) {\n console.warn('formDisabledCallback not implemented yet');\n }\n}\n","import Textarea from './textarea.element.js';\n\nexport default Textarea;\n\nTextarea.define('wje-textarea', Textarea);\n"],"names":[],"mappings":";;;;;AA2Be,MAAM,iBAAiB,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA,EAK5C,cAAc;AACV,UAAO;AAQX,2CAAkB,CAAC,cAAc;AAC7B,gBAAU,QAAQ,CAAC,aAAa;AAC5B,YAAI,SAAS,SAAS,cAAc;AAChC,gBAAM,gBAAgB,SAAS;AAC/B,gBAAM,WAAW,SAAS;AAC1B,gBAAM,WAAW,KAAK,aAAa,aAAa;AAEhD,kBAAQ,IAAI,aAAa,aAAa,iBAAiB,QAAQ,OAAO,QAAQ,EAAE;AAAA,QAChG;AAAA,MACA,CAAS;AAED,WAAK,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,KAAK;AAElB,SAAK,UAAU,aAAa,KAAK,YAAY;AAE7C,SAAK,UAAU,YAAY,EAAE;AAAA,EACrC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASI,yBAAyB,OAAO;AAE5B,SAAK,QAAQ,MAAM;AAEnB,SAAK,UAAU,aAAa,MAAM,KAAK;AAEvC,SAAK,UAAU,YAAY,EAAE;AAAA,EACrC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQI,wBAAwB;AACpB,WAAO;AAAA,MACH,OAAO,KAAK;AAAA,IACf;AAAA,EACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQI,qBAAqB,UAAU;AAC3B,YAAQ,KAAK,0CAA0C;AAAA,EAC/D;AACA;AAAA;AAAA;AAAA;AAAA;AA1TI,cAjIiB,UAiIV,kBAAiB;ACxJ5B,SAAS,OAAO,gBAAgB,QAAQ;"}
1
+ {"version":3,"file":"wje-textarea.js","sources":["../packages/wje-textarea/textarea.element.js","../packages/wje-textarea/textarea.js"],"sourcesContent":["import { default as WJElement, event } from '../wje-element/element.js';\nimport styles from './styles/styles.css?inline';\n\n/**\n * `Textarea` is a custom web component that represents a textarea input.\n * @summary This element represents a textarea input.\n * @documentation https://elements.webjet.sk/components/textarea\n * @status stable\n * @augments WJElement\n * @csspart native - The native textarea wrapper.\n * @csspart input - The textarea input.\n * @csspart wrapper - The textarea wrapper.\n * @cssproperty [--wje-textarea-font-family=var(--wje-font-family)] - Specifies the font family used for the textarea. Accepts any valid CSS font-family value.\n * @cssproperty [--wje-textarea-background-color=var(--wje-background)] - Sets the background color of the textarea. Accepts any valid CSS color value.\n * @cssproperty [--wje-textarea-color=var(--wje-color)] - Defines the text color within the textarea. Accepts any valid CSS color value.\n * @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.\n * @cssproperty [--wje-textarea-border-width=1px] - Specifies the width of the textarea's border. Accepts any valid CSS length unit.\n * @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`.\n * @cssproperty [--wje-textarea-border-color=var(--wje-border-color)] - Defines the border color of the textarea. Accepts any valid CSS color value.\n * @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.\n * @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.\n * @cssproperty [--wje-textarea-margin-bottom=.5rem] - Sets the bottom margin of the textarea. Ensures spacing between the textarea and other elements.\n * @cssproperty [--wje-textarea-line-height=20px] - Specifies the line height of the text within the textarea. Helps control the vertical spacing of the text.\n * @cssproperty [--wje-textarea-padding=0.5rem] - Defines the padding inside the textarea. Controls the spacing between the content and the border.\n * @tag wje-textarea\n */\n\nexport default class Textarea extends WJElement {\n /**\n * Creates an instance of Textarea.\n * @class\n */\n constructor() {\n super();\n\n this.invalid = false;\n this.pristine = true;\n this.internals = this.attachInternals();\n this.observer = new MutationObserver(this.observeFunction);\n }\n\n observeFunction = (mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.type === 'attributes') {\n const attributeName = mutation.attributeName;\n const oldValue = mutation.oldValue;\n const newValue = this.getAttribute(attributeName);\n\n console.log(`Attribute ${attributeName} changed from ${oldValue} to ${newValue}`);\n }\n });\n\n this.refresh();\n };\n\n /**\n * Setter for the value attribute.\n * @param {string} value The value to set.\n */\n set value(value) {\n this.internals.setFormValue(value);\n\n if (this.input) this.input.value = value;\n\n this.pristine = false;\n this._value = value;\n }\n\n /**\n * Getter for the value attribute.\n * @returns {string} The value of the attribute.\n */\n get value() {\n return this.input?.value ?? this._value ?? '';\n }\n\n /**\n * Getter for the invalid attribute.\n * @returns {boolean} Whether the attribute is present.\n */\n get invalid() {\n return this.hasAttribute('invalid');\n }\n\n /**\n * Setter for the invalid attribute.\n * @param {boolean} isInvalid Whether the input is invalid.\n */\n set invalid(isInvalid) {\n if (isInvalid) this.setAttribute('invalid', '');\n else this.removeAttribute('invalid');\n }\n\n /**\n * Getter for the form attribute.\n * @returns {HTMLFormElement} The form the input is associated with.\n */\n get form() {\n return this.internals.form;\n }\n\n /**\n * Getter for the name attribute.\n * @returns {string} The name of the input.\n */\n get name() {\n return this.getAttribute('name');\n }\n\n /**\n * Getter for the type attribute.\n * @returns {string} The type of the input.\n */\n get type() {\n return this.localName;\n }\n\n /**\n * Getter for the validity attribute.\n * @returns {ValidityState} The validity state of the input.\n */\n get validity() {\n return this.internals.validity;\n }\n\n /**\n * Getter for the validationMessage attribute.\n * @returns {string} The validation message of the input.\n */\n get validationMessage() {\n return this.internals.validationMessage;\n }\n\n /**\n * Getter for the willValidate attribute.\n * @returns {boolean} Whether the input will be validated.\n */\n get willValidate() {\n return this.internals.willValidate;\n }\n\n className = 'Textarea';\n\n /**\n * Returns the CSS styles for the component.\n * @static\n * @returns {CSSStyleSheet} The CSS stylesheet\n */\n static get cssStyleSheet() {\n return styles;\n }\n\n /**\n * Whether the input is associated with a form.\n * @type {boolean}\n */\n static formAssociated = true;\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 set placeholder(value) {\n this.setAttribute('placeholder', value);\n }\n\n get placeholder() {\n return this.getAttribute('placeholder');\n }\n\n /**\n * Sets up the attributes for the component.\n */\n setupAttributes() {\n this.isShadowRoot = 'open';\n\n // if some value was set via value setter then don't use default value\n if (this.pristine) {\n this.value = this.innerHTML;\n this.pristine = false;\n }\n }\n\n beforeDraw() {\n this.observer.disconnect();\n }\n\n /**\n * Draws the component for the textarea.\n * @returns {DocumentFragment}\n */\n draw() {\n let fragment = document.createDocumentFragment();\n\n let native = document.createElement('div');\n native.classList.add('native-textarea', this.variant || 'default');\n native.setAttribute('part', 'native');\n\n if (this.hasAttribute('invalid')) native.classList.add('has-error');\n\n let wrapper = document.createElement('div');\n wrapper.setAttribute('part', 'wrapper');\n wrapper.classList.add('wrapper');\n\n let inputWrapper = document.createElement('div');\n inputWrapper.classList.add('input-wrapper');\n\n let label = document.createElement('label');\n label.htmlFor = 'textarea';\n label.innerHTML = this.label || '';\n\n let input = document.createElement('textarea');\n input.id = 'textarea';\n input.name = this.name;\n input.disabled = this.hasAttribute('disabled');\n input.innerText = this.value;\n input.placeholder = this.placeholder || '';\n input.classList.add('form-control');\n input.setAttribute('part', 'input');\n input.setAttribute('rows', this.rows || 3);\n input.setAttribute('spellcheck', false);\n\n const attributes = Array.from(this.attributes).map((attr) => attr.name);\n\n attributes.forEach((attr) => {\n if (this.hasAttribute(attr)) {\n input.setAttribute(attr, this[attr] || '');\n }\n });\n\n if (this.resize === 'auto') input.addEventListener('input', this.setTextareaHeight);\n\n if (this.variant === 'standard') {\n if (this.label) native.appendChild(label);\n } else {\n inputWrapper.appendChild(label);\n }\n\n inputWrapper.appendChild(input);\n\n wrapper.appendChild(inputWrapper);\n\n native.appendChild(wrapper);\n\n fragment.appendChild(native);\n\n if (this.hasAttribute('counter')) {\n input.maxLength = this.maxLength || 1000;\n input.addEventListener('input', this.counterFn);\n\n let counter = document.createElement('div');\n counter.classList.add('counter');\n counter.innerText = `${input.value.length}/${input.maxLength}`;\n\n this.counterElement = counter;\n fragment.appendChild(counter);\n }\n\n this.native = native;\n this.labelElement = label;\n this.input = input;\n\n return fragment;\n }\n\n /**\n * Sets up the event listeners after the component is drawn.\n */\n afterDraw() {\n this.resizeObserver = new ResizeObserver(() => this.setTextareaHeight);\n\n if (!this.hasAttribute('disabled')) {\n event.addListener(this, 'click', 'wje:textarea:change');\n event.addListener(this, 'click', 'wje:textarea:input');\n }\n\n this.input.addEventListener('focus', (e) => {\n this.labelElement.classList.add('fade');\n this.native.classList.add('focused');\n });\n\n this.input.addEventListener('blur', (e) => {\n this.native.classList.remove('focused');\n if (!e.target.value) this.labelElement.classList.remove('fade');\n });\n\n this.addEventListener('invalid', (e) => {\n this.invalid = true;\n this.pristine = false;\n\n this.showInvalidMessage();\n\n if (this.customErrorDisplay) {\n e.preventDefault();\n }\n });\n\n this.input.addEventListener('input', (e) => {\n this.validateInput();\n\n if (this.validateOnChange) {\n this.pristine = false;\n this.propagateValidation();\n }\n\n this.input.classList.remove('pristine');\n this.labelElement.classList.add('fade');\n\n const clone = new e.constructor(e.type, e);\n this.dispatchEvent(clone);\n\n event.dispatchCustomEvent(this, 'wje-textarea:input', {\n value: this.input.value,\n });\n\n this.value = this.input.value;\n });\n\n this.validateInput();\n\n this.observer.observe(this, {\n attributes: true, // Watch for attribute changes\n attributeOldValue: true, // Keep track of the old value of attributes\n });\n }\n\n componentCleanup() {\n this.observer.disconnect();\n this.resizeObserver?.unobserve(this.input);\n }\n\n /**\n * Disconnects the component.\n */\n beforeDisconnect() {\n this.resizeObserver?.unobserve(this.input);\n }\n\n /**\n * Sets the height of the textarea.\n */\n setTextareaHeight = () => {\n if (this.getAttribute('resize') === 'auto') {\n this.input.style.height = 'auto';\n this.input.style.height = this.input.scrollHeight + 'px';\n }\n };\n\n /**\n * Updates the counter for the textarea.\n * @param {Event} e The event object.\n */\n counterFn = (e) => {\n this.counterElement.innerText = e.target.value.length + '/' + this.input.maxLength;\n };\n\n /**\n * @summary Validates the input.\n * This method checks the validity state of the input. If the input is not valid, it iterates over the validity state object.\n * For each invalid state, it constructs an attribute name and checks if the input has this attribute.\n * If the input has the attribute, it sets the validation error to the state and the error message to the attribute value.\n * If the input does not have the attribute, it sets the error message to the default validation message of the input.\n * 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.\n * If the input is valid, it sets the validity in the form internals to an empty object.\n */\n validateInput() {\n const validState = this.input.validity;\n\n if (!validState.valid) {\n for (let state in validState) {\n const attr = `message-${state.toString()}`;\n\n if (validState[state]) {\n this.validationError = state.toString();\n let errorMessage = this.message;\n\n // TODO this take error messages based on lang from operating system of user should we implement custom translations based on app language ?\n if (!this.hasAttribute('message'))\n errorMessage = this.hasAttribute(attr) ? this.getAttribute(attr) : this.input.validationMessage;\n\n this.internals.setValidity({ [this.validationError]: true }, errorMessage);\n }\n }\n } else {\n this.internals.setValidity({});\n }\n }\n\n /**\n * @summary Propagates the validation state of the input.\n * This method sets the 'invalid' property of the input based on its 'pristine' state and its internal validity state.\n * If the input is invalid and the 'customErrorDisplay' property is true, it dispatches an 'invalid' event.\n */\n propagateValidation() {\n this.invalid = !this.pristine && !this.internals.validity.valid;\n\n if (this.invalid && this.customErrorDisplay) {\n this.dispatchEvent(new Event('invalid'));\n }\n }\n\n /**\n * @summary Callback function that is called when the custom element is associated with a form.\n * This function adds an event listener to the form's submit event, which validates the input and propagates the validation.\n * @param {HTMLFormElement} form The form the custom element is associated with.\n */\n formAssociatedCallback(form) {\n this.internals.setFormValue(this.value);\n form?.addEventListener('submit', () => {\n this.validateInput();\n this.propagateValidation();\n });\n }\n\n /**\n * The formResetCallback method is a built-in lifecycle callback that gets called when a form gets reset.\n * This method is responsible for resetting the value of the custom input element to its default value.\n * It also resets the form value and validity state in the form internals.\n * @function\n */\n formResetCallback() {\n // Set the value of the custom input element to its default value\n this.value = this.defaultValue;\n // Reset the form value in the form internals to the default value\n this.internals.setFormValue(this.defaultValue);\n // Reset the validity state in the form internals\n this.internals.setValidity({});\n }\n\n /**\n * The formStateRestoreCallback method is a built-in lifecycle callback that gets called when the state of a form-associated custom element is restored.\n * This method is responsible for restoring the value of the custom input element to its saved state.\n * It also restores the form value and validity state in the form internals to their saved states.\n * @param {object} state The saved state of the custom input element.\n * @function\n */\n formStateRestoreCallback(state) {\n // Set the value of the custom input element to its saved value\n this.value = state.value;\n // Restore the form value in the form internals to the saved value\n this.internals.setFormValue(state.value);\n // Restore the validity state in the form internals to the saved state\n this.internals.setValidity({});\n }\n\n /**\n * The formStateSaveCallback method is a built-in lifecycle callback that gets called when the state of a form-associated custom element is saved.\n * This method is responsible for saving the value of the custom input element.\n * @returns {object} The saved state of the custom input element.\n * @function\n */\n formStateSaveCallback() {\n return {\n value: this.value,\n };\n }\n\n /**\n * The formDisabledCallback method is a built-in lifecycle callback that gets called when the disabled state of a form-associated custom element changes.\n * This method is not implemented yet.\n * @param {boolean} disabled The new disabled state of the custom input element.\n * @function\n */\n formDisabledCallback(disabled) {\n console.warn('formDisabledCallback not implemented yet');\n }\n}\n","import Textarea from './textarea.element.js';\n\nexport default Textarea;\n\nTextarea.define('wje-textarea', Textarea);\n"],"names":[],"mappings":";;;;;AA2Be,MAAM,iBAAiB,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA,EAK5C,cAAc;AACV,UAAO;AAQX,2CAAkB,CAAC,cAAc;AAC7B,gBAAU,QAAQ,CAAC,aAAa;AAC5B,YAAI,SAAS,SAAS,cAAc;AAChC,gBAAM,gBAAgB,SAAS;AAC/B,gBAAM,WAAW,SAAS;AAC1B,gBAAM,WAAW,KAAK,aAAa,aAAa;AAEhD,kBAAQ,IAAI,aAAa,aAAa,iBAAiB,QAAQ,OAAO,QAAQ,EAAE;AAAA,QAChG;AAAA,MACA,CAAS;AAED,WAAK,QAAS;AAAA,IACjB;AAwFD,qCAAY;AA6MZ;AAAA;AAAA;AAAA,6CAAoB,MAAM;AACtB,UAAI,KAAK,aAAa,QAAQ,MAAM,QAAQ;AACxC,aAAK,MAAM,MAAM,SAAS;AAC1B,aAAK,MAAM,MAAM,SAAS,KAAK,MAAM,eAAe;AAAA,MAChE;AAAA,IACK;AAMD;AAAA;AAAA;AAAA;AAAA,qCAAY,CAAC,MAAM;AACf,WAAK,eAAe,YAAY,EAAE,OAAO,MAAM,SAAS,MAAM,KAAK,MAAM;AAAA,IAC5E;AApUG,SAAK,UAAU;AACf,SAAK,WAAW;AAChB,SAAK,YAAY,KAAK,gBAAiB;AACvC,SAAK,WAAW,IAAI,iBAAiB,KAAK,eAAe;AAAA,EACjE;AAAA;AAAA;AAAA;AAAA;AAAA,EAoBI,IAAI,MAAM,OAAO;AACb,SAAK,UAAU,aAAa,KAAK;AAEjC,QAAI,KAAK,MA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,kBAAiB;ACxJ5B,SAAS,OAAO,gBAAgB,QAAQ;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wj-elements",
3
3
  "description": "WebJET Elements is a modern set of user interface tools harnessing the power of web components designed to simplify web application development.",
4
- "version": "0.1.143",
4
+ "version": "0.1.144",
5
5
  "homepage": "https://github.com/lencys/wj-elements",
6
6
  "author": "Lukáš Ondrejček <lukas.ondrejcek@gmail.com>",
7
7
  "license": "MIT",
File without changes
@@ -1 +0,0 @@
1
- export {};