wj-elements 0.1.175 → 0.1.177

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 (37) hide show
  1. package/dist/light.css +5 -0
  2. package/dist/{list.element-Ce1vIm1O.js → list.element-D4-wlFN_.js} +2 -2
  3. package/dist/{list.element-Ce1vIm1O.js.map → list.element-D4-wlFN_.js.map} +1 -1
  4. package/dist/localize.js +34 -6
  5. package/dist/localize.js.map +1 -1
  6. package/dist/packages/index.d.ts +1 -0
  7. package/dist/packages/localize/localize.d.ts +37 -7
  8. package/dist/packages/wje-accordion/accordion.test.d.ts +0 -0
  9. package/dist/packages/wje-color-picker/color-picker.test.d.ts +1 -0
  10. package/dist/packages/wje-element/element.d.ts +1 -6
  11. package/dist/packages/wje-icon/service/library.d.ts +3 -0
  12. package/dist/packages/wje-masonry/masonry.element.d.ts +1 -1
  13. package/dist/packages/wje-select/select.element.d.ts +5 -2
  14. package/dist/packages/wje-split-view/split-view.element.d.ts +0 -1
  15. package/dist/packages/wje-tooltip/tooltip.element.d.ts +5 -0
  16. package/dist/wje-element.js +14 -14
  17. package/dist/wje-element.js.map +1 -1
  18. package/dist/wje-icon-library.js +20 -0
  19. package/dist/wje-icon-library.js.map +1 -0
  20. package/dist/wje-icon-picker.js +1 -1
  21. package/dist/wje-icon-picker.js.map +1 -1
  22. package/dist/wje-icon.js +6 -5
  23. package/dist/wje-icon.js.map +1 -1
  24. package/dist/wje-input.js +1 -1
  25. package/dist/wje-list.js +1 -1
  26. package/dist/wje-masonry.js.map +1 -1
  27. package/dist/wje-master.js +93 -90
  28. package/dist/wje-master.js.map +1 -1
  29. package/dist/wje-options.js +1 -1
  30. package/dist/wje-select.js +54 -9
  31. package/dist/wje-select.js.map +1 -1
  32. package/dist/wje-split-view.js.map +1 -1
  33. package/dist/wje-textarea.js +2 -2
  34. package/dist/wje-textarea.js.map +1 -1
  35. package/dist/wje-tooltip.js +9 -0
  36. package/dist/wje-tooltip.js.map +1 -1
  37. package/package.json +4 -1
package/dist/light.css CHANGED
@@ -383,6 +383,11 @@
383
383
  --wje-input-margin-bottom: 0.5rem;
384
384
  --wje-input-line-height: 20px;
385
385
  --wje-input-slot-padding-inline: 0.5rem;
386
+ --wje-input-label-display: block;
387
+ --wje-input-label-margin: 0;
388
+ --wje-input-label-padding: 0;
389
+ --wje-input-label-line-height: var(--wje-line-height-normal);
390
+ --wje-input-label-font-size: var(--wje-font-size);
386
391
 
387
392
  /* Item */
388
393
  --wje-item-color: var(--wje-color);
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
  import WJElement from "./wje-element.js";
5
- const styles = "/*\n[ WJ List ]\n*/\n:host {\n margin: 0;\n padding: 0;\n display: block;\n contain: content;\n list-style-type: none;\n}\n\n:host(.wje-inset) {\n background: var(--wje-list-background);\n transform: translateZ(0);\n overflow: hidden;\n padding: var(--wje-list-inset-padding);\n border-radius: var(--wje-list-border-radius);\n}\n\n:host(.wje-lines-none) ::slotted(wje-item) {\n --wje-border-width: 0 !important;\n}";
5
+ const styles = "/*\n[ WJ List ]\n*/\n:host {\n margin: 0;\n padding: 0;\n display: block;\n contain: content;\n list-style-type: none;\n}\n\n:host(.wje-inset) {\n background: var(--wje-list-background);\n transform: translateZ(0);\n overflow: hidden;\n padding: var(--wje-list-inset-padding);\n border-radius: var(--wje-list-border-radius);\n}\n\n:host(.wje-lines-none) ::slotted(wje-item) {\n --wje-border-width: 0 !important;\n --wje-item-border-width: 0!important;\n}";
6
6
  class List extends WJElement {
7
7
  /**
8
8
  * Creates an instance of List.
@@ -47,4 +47,4 @@ class List extends WJElement {
47
47
  export {
48
48
  List as L
49
49
  };
50
- //# sourceMappingURL=list.element-Ce1vIm1O.js.map
50
+ //# sourceMappingURL=list.element-D4-wlFN_.js.map
@@ -1 +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;"}
1
+ {"version":3,"file":"list.element-D4-wlFN_.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,27 +18,55 @@ class LocalizerDefault {
18
18
  console.error(`Language "${this.lang}" not loaded.`);
19
19
  }
20
20
  }
21
- // Vyhľadávanie prekladu podľa kľúča
21
+ /**
22
+ * Translates a given translation key based on the currently selected language.
23
+ * @param {string} key The key representing the text to be translated.
24
+ * @returns {string} The translated text if available; otherwise, returns the original key.
25
+ */
22
26
  translate(key) {
23
27
  var _a;
24
28
  const langMap = (_a = this.languages) == null ? void 0 : _a.get(this.currentLang);
25
29
  if (!langMap) return key;
26
30
  return langMap ? langMap[key] || key : key;
27
31
  }
28
- // Vyhľadávanie prekladu podľa kľúča a typu čísla
32
+ /**
33
+ * Translates a key into a localized string based on the provided count and pluralization type.
34
+ * @param {string} key The base translation key to be used for fetching the localized string.
35
+ * @param {number} [count=0] The count value used to determine the pluralization form.
36
+ * @param {string} [type='cardinal'] The type of pluralization to use, such as 'cardinal' or 'ordinal'.
37
+ * @returns {string} The translated string, adapted to the pluralization rules and count.
38
+ */
29
39
  translatePlural(key, count = 0, type = "cardinal") {
30
40
  const plural = new Intl.PluralRules(this.lang, { type });
31
41
  if (count !== void 0) key += "." + plural.select(count);
32
42
  return this.translate(key);
33
43
  }
34
- // Formátovanie čísla podľa aktuálneho jazyka
44
+ /**
45
+ * Formats a number according to the specified locale and formatting options.
46
+ * @param {number} number The numeric value to format.
47
+ * @param {object} options An object containing formatting options for the number.
48
+ * @returns {string} The formatted number as a string.
49
+ */
35
50
  formatNumber(number, options) {
36
51
  return new Intl.NumberFormat(this.currentLang, options).format(number);
37
52
  }
38
- // Formátovanie dátumu podľa aktuálneho jazyka
39
- formatDate(date) {
40
- return new Intl.DateTimeFormat(this.currentLang).format(new Date(date));
53
+ /**
54
+ * Formats a given date based on the specified options and the current language setting.
55
+ * @param {string|Date|number} date The date to format. Can be a Date object, a timestamp, or a date string.
56
+ * @param {object} options The formatting options to customize the output, as supported by Intl.DateTimeFormat.
57
+ * @returns {string} The formatted date string based on the specified options and current language.
58
+ */
59
+ formatDate(date, options) {
60
+ return new Intl.DateTimeFormat(this.currentLang, options).format(new Date(date));
41
61
  }
62
+ /**
63
+ * Formats a relative time string based on a given language, value, unit, and formatting options.
64
+ * @param {string} lang The language to use for formatting. Defaults to `this.currentLang` if not provided.
65
+ * @param {number} value The numerical value to format, representing the time difference.
66
+ * @param {string} [unit] The unit of time to use (e.g., "second", "minute", "hour", "day", "week", "month", "year").
67
+ * @param {object} [options] An object containing formatting options, such as the style for the numeric representation.
68
+ * @returns {string} The formatted relative time string in the specified language.
69
+ */
42
70
  relativeTime(lang, value = 0, unit = "day", options = { numeric: "auto" }) {
43
71
  lang = lang || this.currentLang;
44
72
  return new Intl.RelativeTimeFormat(lang, options).format(value, unit);
@@ -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 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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AI,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;"}
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 /**\n * Translates a given translation key based on the currently selected language.\n * @param {string} key The key representing the text to be translated.\n * @returns {string} The translated text if available; otherwise, returns the original key.\n */\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 /**\n * Translates a key into a localized string based on the provided count and pluralization type.\n * @param {string} key The base translation key to be used for fetching the localized string.\n * @param {number} [count=0] The count value used to determine the pluralization form.\n * @param {string} [type='cardinal'] The type of pluralization to use, such as 'cardinal' or 'ordinal'.\n * @returns {string} The translated string, adapted to the pluralization rules and count.\n */\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 /**\n * Formats a number according to the specified locale and formatting options.\n * @param {number} number The numeric value to format.\n * @param {object} options An object containing formatting options for the number.\n * @returns {string} The formatted number as a string.\n */\n formatNumber(number, options) {\n return new Intl.NumberFormat(this.currentLang, options).format(number);\n }\n\n /**\n * Formats a given date based on the specified options and the current language setting.\n * @param {string|Date|number} date The date to format. Can be a Date object, a timestamp, or a date string.\n * @param {object} options The formatting options to customize the output, as supported by Intl.DateTimeFormat.\n * @returns {string} The formatted date string based on the specified options and current language.\n */\n formatDate(date, options) {\n return new Intl.DateTimeFormat(this.currentLang, options).format(new Date(date));\n }\n\n /**\n * Formats a relative time string based on a given language, value, unit, and formatting options.\n * @param {string} lang The language to use for formatting. Defaults to `this.currentLang` if not provided.\n * @param {number} value The numerical value to format, representing the time difference.\n * @param {string} [unit] The unit of time to use (e.g., \"second\", \"minute\", \"hour\", \"day\", \"week\", \"month\", \"year\").\n * @param {object} [options] An object containing formatting options, such as the style for the numeric representation.\n * @returns {string} The formatted relative time string in the specified language.\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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AAAA;AAAA;AAAA;AAAA;AAAA,EAUI,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;AClGO,MAAM,kBAAkB,iBAAiB;AAAA,EAC5C,YAAY,SAAS;AACjB,UAAM,OAAO;AAAA,EACrB;AAAA,EACI,OAAO,uBAAuB,aAAa;AACvC,wBAAoB,GAAG,WAAW;AAAA,EAC1C;AACA;"}
@@ -101,4 +101,5 @@ export { default as Tooltip } from './wje-tooltip/tooltip.js';
101
101
  export { default as Tree } from './wje-tree/tree.js';
102
102
  export { default as TreeItem } from './wje-tree-item/tree-item.js';
103
103
  export { default as VisuallyHidden } from './wje-visually-hidden/visually-hidden.js';
104
+ export { registerIconLibrary, unregisterIconLibrary } from './wje-icon/service/library.js';
104
105
  export { defaultStoreActions, store } from './wje-store/store.js';
@@ -7,11 +7,41 @@ export class LocalizerDefault {
7
7
  currentLang: string;
8
8
  get languages(): any;
9
9
  setLanguage(): void;
10
- translate(key: any): any;
11
- translatePlural(key: any, count?: number, type?: string): any;
12
- formatNumber(number: any, options: any): string;
13
- formatDate(date: any): string;
14
- relativeTime(lang: any, value?: number, unit?: string, options?: {
15
- numeric: string;
16
- }): string;
10
+ /**
11
+ * Translates a given translation key based on the currently selected language.
12
+ * @param {string} key The key representing the text to be translated.
13
+ * @returns {string} The translated text if available; otherwise, returns the original key.
14
+ */
15
+ translate(key: string): string;
16
+ /**
17
+ * Translates a key into a localized string based on the provided count and pluralization type.
18
+ * @param {string} key The base translation key to be used for fetching the localized string.
19
+ * @param {number} [count=0] The count value used to determine the pluralization form.
20
+ * @param {string} [type='cardinal'] The type of pluralization to use, such as 'cardinal' or 'ordinal'.
21
+ * @returns {string} The translated string, adapted to the pluralization rules and count.
22
+ */
23
+ translatePlural(key: string, count?: number, type?: string): string;
24
+ /**
25
+ * Formats a number according to the specified locale and formatting options.
26
+ * @param {number} number The numeric value to format.
27
+ * @param {object} options An object containing formatting options for the number.
28
+ * @returns {string} The formatted number as a string.
29
+ */
30
+ formatNumber(number: number, options: object): string;
31
+ /**
32
+ * Formats a given date based on the specified options and the current language setting.
33
+ * @param {string|Date|number} date The date to format. Can be a Date object, a timestamp, or a date string.
34
+ * @param {object} options The formatting options to customize the output, as supported by Intl.DateTimeFormat.
35
+ * @returns {string} The formatted date string based on the specified options and current language.
36
+ */
37
+ formatDate(date: string | Date | number, options: object): string;
38
+ /**
39
+ * Formats a relative time string based on a given language, value, unit, and formatting options.
40
+ * @param {string} lang The language to use for formatting. Defaults to `this.currentLang` if not provided.
41
+ * @param {number} value The numerical value to format, representing the time difference.
42
+ * @param {string} [unit] The unit of time to use (e.g., "second", "minute", "hour", "day", "week", "month", "year").
43
+ * @param {object} [options] An object containing formatting options, such as the style for the numeric representation.
44
+ * @returns {string} The formatted relative time string in the specified language.
45
+ */
46
+ relativeTime(lang: string, value?: number, unit?: string, options?: object): string;
17
47
  }
@@ -115,7 +115,7 @@ export default class WJElement extends HTMLElement {
115
115
  * Gets the rendering context, either the shadow root or the component itself.
116
116
  * @returns The rendering context.
117
117
  */
118
- get context(): this | ShadowRoot;
118
+ get context(): any;
119
119
  /**
120
120
  * Gets the store instance.
121
121
  * @returns {object} The store instance.
@@ -248,11 +248,6 @@ export default class WJElement extends HTMLElement {
248
248
  * Lifecycle method invoked when the component is disconnected from the DOM.
249
249
  */
250
250
  disconnectedCallback(): void;
251
- /**
252
- * Enqueues an update for the component.
253
- * This method processes the current render promise and then refreshes the component.
254
- */
255
- enqueueUpdate(): void;
256
251
  /**
257
252
  * Lifecycle method invoked when an observed attribute changes.
258
253
  * @param name The name of the attribute that changed.
@@ -0,0 +1,3 @@
1
+ export function getIconLibrary(name: any): any;
2
+ export function registerIconLibrary(name: any, options: any): void;
3
+ export function unregisterIconLibrary(name: any): void;
@@ -9,7 +9,7 @@ import { default as WJElement } from '../wje-element/element.js';
9
9
  * @csspart native - The native part of the masonry layout.
10
10
  * @csspart column - The individual columns in the masonry layout.
11
11
  * @slot - The default slot for the masonry layout.
12
- * @cssproperty [--wje-masonry-gap=1rem] - The gap between items in the masonry layout. Accepts any valid CSS length. Default is 1rem.
12
+ * @cssproperty [--wje-masonry-layout-gap=1rem] - The gap between items in the masonry layout. Accepts any valid CSS length. Default is 1rem.
13
13
  * @cssproperty [--wje-masonry-layout-col-count=1] - The count column in the masonry layout. Accepts any valid CSS length.
14
14
  * @tag wje-masonry
15
15
  */
@@ -255,6 +255,7 @@ export default class Select extends WJElement {
255
255
  * @returns {Array} The selected value.
256
256
  */
257
257
  get selected(): any[];
258
+ get options(): any[];
258
259
  /**
259
260
  * Sets the trigger value.
260
261
  * @param {string} value The trigger value to set.
@@ -313,10 +314,10 @@ export default class Select extends WJElement {
313
314
  getSelected(): any[];
314
315
  /**
315
316
  * Handles the selection change.
316
- * @param {Element} option The option that changed.
317
+ * @param {Element[]} options The option that changed.
317
318
  * @param {number} length The length of the selected options.
318
319
  */
319
- selectionChanged(option?: Element, length?: number): void;
320
+ selectionChanged(options?: Element[], length?: number): void;
320
321
  /**
321
322
  * Updates the selected options and their corresponding chips.
322
323
  * @param {boolean} [silence] Determines whether to suppress the "wje-select:change" event.
@@ -390,6 +391,7 @@ export default class Select extends WJElement {
390
391
  * @param {boolean} [silent] Whether to trigger the change event or not.
391
392
  */
392
393
  selectOptions(values: any[] | any, silent?: boolean): void;
394
+ htmlSelectedItem(item: any): any;
393
395
  /**
394
396
  * @summary Callback function that is called when the custom element is associated with a form.
395
397
  * This function adds an event listener to the form's submit event, which validates the input and propagates the validation.
@@ -432,4 +434,5 @@ export default class Select extends WJElement {
432
434
  * @returns {boolean} Returns true if all elements in the `elements` array are found within the `options` array, otherwise returns false.
433
435
  */
434
436
  areAllElementsInOptions(elements: any[], options: any[]): boolean;
437
+ #private;
435
438
  }
@@ -8,7 +8,6 @@ import { default as WJElement } from '../wje-element/element.js';
8
8
  * @slot start - Slot for the start view.
9
9
  * @slot end - Slot for the end view.
10
10
  * @slot divider - Slot for the divider.
11
- * @csspart native-split-view - The native split view wrapper.
12
11
  * @csspart wje-divider - The divider of the split view.
13
12
  * @cssproperty [--wje-split-view-divider-area=12px] - Defines the interactive area (hitbox) of the divider for resizing. Accepts any valid CSS length unit (e.g., `px`, `rem`, `%`).
14
13
  * @cssproperty [--wje-split-view-divider-width=4px] - Specifies the visual width of the divider. Controls how thick the divider appears.
@@ -25,6 +25,11 @@ export default class Tooltip extends WJElement {
25
25
  * @returns {Array} An array of observed attributes
26
26
  */
27
27
  static get observedAttributes(): any[];
28
+ /**
29
+ * Dependencies of the Button element.
30
+ * @type {object}
31
+ */
32
+ dependencies: object;
28
33
  /**
29
34
  * Set active attribute for the tooltip element.
30
35
  * @param value
@@ -9,7 +9,7 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
9
9
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10
10
  var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
11
11
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
12
- var _Event_instances, dispatch_fn, _drawingStatus, _isAttached, _isRendering, _originalVisibility, _pristine, _WJElement_instances, refresh_fn, resolveRender_fn;
12
+ var _Event_instances, dispatch_fn, _drawingStatus, _isAttached, _isRendering, _originalVisibility, _pristine, _WJElement_instances, enqueueUpdate_fn, refresh_fn, resolveRender_fn;
13
13
  import { store, defaultStoreActions } from "./wje-store.js";
14
14
  class UniversalService {
15
15
  constructor(props = {}) {
@@ -699,7 +699,7 @@ const _WJElement = class _WJElement extends HTMLElement {
699
699
  this.setUpAccessors();
700
700
  __privateSet(this, _drawingStatus, this.drawingStatuses.ATTACHED);
701
701
  __privateSet(this, _pristine, false);
702
- this.enqueueUpdate();
702
+ __privateMethod(this, _WJElement_instances, enqueueUpdate_fn).call(this);
703
703
  }
704
704
  }
705
705
  /**
@@ -756,15 +756,6 @@ const _WJElement = class _WJElement extends HTMLElement {
756
756
  __privateSet(this, _drawingStatus, this.drawingStatuses.DISCONNECTED);
757
757
  this.componentCleanup();
758
758
  }
759
- /**
760
- * Enqueues an update for the component.
761
- * This method processes the current render promise and then refreshes the component.
762
- */
763
- enqueueUpdate() {
764
- if (!__privateGet(this, _isRendering)) {
765
- this.rafId = requestAnimationFrame(() => __privateMethod(this, _WJElement_instances, refresh_fn).call(this));
766
- }
767
- }
768
759
  /**
769
760
  * Lifecycle method invoked when an observed attribute changes.
770
761
  * @param name The name of the attribute that changed.
@@ -774,7 +765,7 @@ const _WJElement = class _WJElement extends HTMLElement {
774
765
  attributeChangedCallback(name, old, newName) {
775
766
  if (old !== newName) {
776
767
  __privateSet(this, _pristine, false);
777
- this.enqueueUpdate();
768
+ __privateMethod(this, _WJElement_instances, enqueueUpdate_fn).call(this);
778
769
  }
779
770
  }
780
771
  refresh() {
@@ -783,7 +774,7 @@ const _WJElement = class _WJElement extends HTMLElement {
783
774
  this.rejectPromise = reject;
784
775
  });
785
776
  __privateSet(this, _pristine, false);
786
- this.enqueueUpdate();
777
+ __privateMethod(this, _WJElement_instances, enqueueUpdate_fn).call(this);
787
778
  }
788
779
  stopRenderLoop() {
789
780
  if (this.rafId) {
@@ -915,6 +906,15 @@ _isRendering = new WeakMap();
915
906
  _originalVisibility = new WeakMap();
916
907
  _pristine = new WeakMap();
917
908
  _WJElement_instances = new WeakSet();
909
+ /**
910
+ * Enqueues an update for the component.
911
+ * This method processes the current render promise and then refreshes the component.
912
+ */
913
+ enqueueUpdate_fn = function() {
914
+ if (!__privateGet(this, _isRendering)) {
915
+ this.rafId = requestAnimationFrame(() => __privateMethod(this, _WJElement_instances, refresh_fn).call(this));
916
+ }
917
+ };
918
918
  refresh_fn = async function() {
919
919
  var _a, _b, _c;
920
920
  if (__privateGet(this, _isRendering)) {
@@ -939,7 +939,7 @@ refresh_fn = async function() {
939
939
  __privateSet(this, _isRendering, false);
940
940
  if (!__privateGet(this, _pristine)) {
941
941
  __privateSet(this, _pristine, false);
942
- this.enqueueUpdate();
942
+ __privateMethod(this, _WJElement_instances, enqueueUpdate_fn).call(this);
943
943
  } else {
944
944
  this.finisPromise();
945
945
  this.style.visibility = __privateGet(this, _originalVisibility);