@maggioli-design-system/mds-input-tip-item 1.1.0 → 1.1.1

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.
@@ -4749,20 +4749,19 @@ const Handlebars = /*@__PURE__*/getDefaultExportFromCjs(handlebars.exports);
4749
4749
 
4750
4750
  class Locale {
4751
4751
  constructor(configData) {
4752
- this.defaultLanguage = 'en';
4752
+ this.rollbackLanguage = 'en';
4753
4753
  this.lang = (element) => {
4754
- const closestElement = element.closest('[lang]');
4755
- if (closestElement) {
4756
- if (closestElement.lang) {
4757
- this.language = closestElement.lang;
4754
+ this.closestElement = element.closest('[lang]');
4755
+ if (this.closestElement) {
4756
+ if (this.closestElement.lang) {
4757
+ this.language = this.closestElement.lang;
4758
4758
  return;
4759
4759
  }
4760
4760
  }
4761
- this.language = this.defaultLanguage;
4761
+ this.language = this.rollbackLanguage;
4762
4762
  };
4763
4763
  this.pluralize = (tag, context) => {
4764
- var _a;
4765
- const languagePhrase = (_a = this.config[this.language][tag]) !== null && _a !== void 0 ? _a : this.config[this.defaultLanguage][tag];
4764
+ const languagePhrase = this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag];
4766
4765
  const phrases = [];
4767
4766
  if (Array.isArray(languagePhrase)) {
4768
4767
  phrases.push(languagePhrase[0]);
@@ -4787,11 +4786,10 @@ class Locale {
4787
4786
  return template(context);
4788
4787
  };
4789
4788
  this.get = (tag, context) => {
4790
- var _a;
4791
4789
  if (context) {
4792
4790
  return this.pluralize(tag, context);
4793
4791
  }
4794
- return (_a = this.config[this.language][tag]) !== null && _a !== void 0 ? _a : this.config[this.defaultLanguage][tag];
4792
+ return this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag];
4795
4793
  };
4796
4794
  this.config = configData;
4797
4795
  }
@@ -1,20 +1,19 @@
1
1
  import Handlebars from "handlebars";
2
2
  export class Locale {
3
3
  constructor(configData) {
4
- this.defaultLanguage = 'en';
4
+ this.rollbackLanguage = 'en';
5
5
  this.lang = (element) => {
6
- const closestElement = element.closest('[lang]');
7
- if (closestElement) {
8
- if (closestElement.lang) {
9
- this.language = closestElement.lang;
6
+ this.closestElement = element.closest('[lang]');
7
+ if (this.closestElement) {
8
+ if (this.closestElement.lang) {
9
+ this.language = this.closestElement.lang;
10
10
  return;
11
11
  }
12
12
  }
13
- this.language = this.defaultLanguage;
13
+ this.language = this.rollbackLanguage;
14
14
  };
15
15
  this.pluralize = (tag, context) => {
16
- var _a;
17
- const languagePhrase = (_a = this.config[this.language][tag]) !== null && _a !== void 0 ? _a : this.config[this.defaultLanguage][tag];
16
+ const languagePhrase = this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag];
18
17
  const phrases = [];
19
18
  if (Array.isArray(languagePhrase)) {
20
19
  phrases.push(languagePhrase[0]);
@@ -39,11 +38,10 @@ export class Locale {
39
38
  return template(context);
40
39
  };
41
40
  this.get = (tag, context) => {
42
- var _a;
43
41
  if (context) {
44
42
  return this.pluralize(tag, context);
45
43
  }
46
- return (_a = this.config[this.language][tag]) !== null && _a !== void 0 ? _a : this.config[this.defaultLanguage][tag];
44
+ return this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag];
47
45
  };
48
46
  this.config = configData;
49
47
  }
@@ -0,0 +1 @@
1
+ export {};
@@ -4745,20 +4745,19 @@ const Handlebars = /*@__PURE__*/getDefaultExportFromCjs(handlebars.exports);
4745
4745
 
4746
4746
  class Locale {
4747
4747
  constructor(configData) {
4748
- this.defaultLanguage = 'en';
4748
+ this.rollbackLanguage = 'en';
4749
4749
  this.lang = (element) => {
4750
- const closestElement = element.closest('[lang]');
4751
- if (closestElement) {
4752
- if (closestElement.lang) {
4753
- this.language = closestElement.lang;
4750
+ this.closestElement = element.closest('[lang]');
4751
+ if (this.closestElement) {
4752
+ if (this.closestElement.lang) {
4753
+ this.language = this.closestElement.lang;
4754
4754
  return;
4755
4755
  }
4756
4756
  }
4757
- this.language = this.defaultLanguage;
4757
+ this.language = this.rollbackLanguage;
4758
4758
  };
4759
4759
  this.pluralize = (tag, context) => {
4760
- var _a;
4761
- const languagePhrase = (_a = this.config[this.language][tag]) !== null && _a !== void 0 ? _a : this.config[this.defaultLanguage][tag];
4760
+ const languagePhrase = this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag];
4762
4761
  const phrases = [];
4763
4762
  if (Array.isArray(languagePhrase)) {
4764
4763
  phrases.push(languagePhrase[0]);
@@ -4783,11 +4782,10 @@ class Locale {
4783
4782
  return template(context);
4784
4783
  };
4785
4784
  this.get = (tag, context) => {
4786
- var _a;
4787
4785
  if (context) {
4788
4786
  return this.pluralize(tag, context);
4789
4787
  }
4790
- return (_a = this.config[this.language][tag]) !== null && _a !== void 0 ? _a : this.config[this.defaultLanguage][tag];
4788
+ return this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag];
4791
4789
  };
4792
4790
  this.config = configData;
4793
4791
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2024-09-05T13:44:04",
2
+ "timestamp": "2024-09-13T08:50:57",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.21.0",
@@ -4745,20 +4745,19 @@ const Handlebars = /*@__PURE__*/getDefaultExportFromCjs(handlebars.exports);
4745
4745
 
4746
4746
  class Locale {
4747
4747
  constructor(configData) {
4748
- this.defaultLanguage = 'en';
4748
+ this.rollbackLanguage = 'en';
4749
4749
  this.lang = (element) => {
4750
- const closestElement = element.closest('[lang]');
4751
- if (closestElement) {
4752
- if (closestElement.lang) {
4753
- this.language = closestElement.lang;
4750
+ this.closestElement = element.closest('[lang]');
4751
+ if (this.closestElement) {
4752
+ if (this.closestElement.lang) {
4753
+ this.language = this.closestElement.lang;
4754
4754
  return;
4755
4755
  }
4756
4756
  }
4757
- this.language = this.defaultLanguage;
4757
+ this.language = this.rollbackLanguage;
4758
4758
  };
4759
4759
  this.pluralize = (tag, context) => {
4760
- var _a;
4761
- const languagePhrase = (_a = this.config[this.language][tag]) !== null && _a !== void 0 ? _a : this.config[this.defaultLanguage][tag];
4760
+ const languagePhrase = this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag];
4762
4761
  const phrases = [];
4763
4762
  if (Array.isArray(languagePhrase)) {
4764
4763
  phrases.push(languagePhrase[0]);
@@ -4783,11 +4782,10 @@ class Locale {
4783
4782
  return template(context);
4784
4783
  };
4785
4784
  this.get = (tag, context) => {
4786
- var _a;
4787
4785
  if (context) {
4788
4786
  return this.pluralize(tag, context);
4789
4787
  }
4790
- return (_a = this.config[this.language][tag]) !== null && _a !== void 0 ? _a : this.config[this.defaultLanguage][tag];
4788
+ return this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag];
4791
4789
  };
4792
4790
  this.config = configData;
4793
4791
  }