@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.
- package/dist/cjs/mds-input-tip-item.cjs.entry.js +8 -10
- package/dist/collection/common/locale.js +8 -10
- package/dist/collection/type/language.js +1 -0
- package/dist/components/mds-input-tip-item.js +8 -10
- package/dist/documentation.json +1 -1
- package/dist/esm/mds-input-tip-item.entry.js +8 -10
- package/dist/esm-es5/mds-input-tip-item.entry.js +1 -1
- package/dist/mds-input-tip-item/mds-input-tip-item.esm.js +1 -1
- package/dist/mds-input-tip-item/{p-4c3c132e.system.entry.js → p-7f7a0684.system.entry.js} +1 -1
- package/dist/mds-input-tip-item/{p-0f7b5474.entry.js → p-c23db9de.entry.js} +1 -1
- package/dist/mds-input-tip-item/p-f513b09b.system.js +1 -1
- package/dist/stats.json +18 -16
- package/dist/types/common/locale.d.ts +5 -3
- package/dist/types/type/language.d.ts +1 -0
- package/dist/types/type/preference.d.ts +1 -1
- package/documentation.json +17 -2
- package/package.json +3 -3
- package/src/common/locale.ts +14 -10
- package/src/type/language.ts +4 -0
- package/src/type/preference.ts +1 -0
- package/www/build/mds-input-tip-item.esm.js +1 -1
- package/www/build/{p-4c3c132e.system.entry.js → p-7f7a0684.system.entry.js} +1 -1
- package/www/build/{p-0f7b5474.entry.js → p-c23db9de.entry.js} +1 -1
- package/www/build/p-f513b09b.system.js +1 -1
|
@@ -4749,20 +4749,19 @@ const Handlebars = /*@__PURE__*/getDefaultExportFromCjs(handlebars.exports);
|
|
|
4749
4749
|
|
|
4750
4750
|
class Locale {
|
|
4751
4751
|
constructor(configData) {
|
|
4752
|
-
this.
|
|
4752
|
+
this.rollbackLanguage = 'en';
|
|
4753
4753
|
this.lang = (element) => {
|
|
4754
|
-
|
|
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.
|
|
4761
|
+
this.language = this.rollbackLanguage;
|
|
4762
4762
|
};
|
|
4763
4763
|
this.pluralize = (tag, context) => {
|
|
4764
|
-
|
|
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
|
|
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.
|
|
4
|
+
this.rollbackLanguage = 'en';
|
|
5
5
|
this.lang = (element) => {
|
|
6
|
-
|
|
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.
|
|
13
|
+
this.language = this.rollbackLanguage;
|
|
14
14
|
};
|
|
15
15
|
this.pluralize = (tag, context) => {
|
|
16
|
-
|
|
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
|
|
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.
|
|
4748
|
+
this.rollbackLanguage = 'en';
|
|
4749
4749
|
this.lang = (element) => {
|
|
4750
|
-
|
|
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.
|
|
4757
|
+
this.language = this.rollbackLanguage;
|
|
4758
4758
|
};
|
|
4759
4759
|
this.pluralize = (tag, context) => {
|
|
4760
|
-
|
|
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
|
|
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
|
}
|
package/dist/documentation.json
CHANGED
|
@@ -4745,20 +4745,19 @@ const Handlebars = /*@__PURE__*/getDefaultExportFromCjs(handlebars.exports);
|
|
|
4745
4745
|
|
|
4746
4746
|
class Locale {
|
|
4747
4747
|
constructor(configData) {
|
|
4748
|
-
this.
|
|
4748
|
+
this.rollbackLanguage = 'en';
|
|
4749
4749
|
this.lang = (element) => {
|
|
4750
|
-
|
|
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.
|
|
4757
|
+
this.language = this.rollbackLanguage;
|
|
4758
4758
|
};
|
|
4759
4759
|
this.pluralize = (tag, context) => {
|
|
4760
|
-
|
|
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
|
|
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
|
}
|