@luftborn/custom-elements 2.12.3 → 2.12.5
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/demo/index.js +29 -84
- package/demo/index.min.js +28 -83
- package/demo/index.min.js.map +1 -1
- package/dist/elements/CustomFormatDateFieldElement/CustomFormatDateFieldElement.js +3 -0
- package/dist/elements/CustomFormatDateFieldElement/CustomFormatDateFieldElement.js.map +1 -1
- package/dist/framework/Language/Translator.d.ts +1 -20
- package/dist/framework/Language/Translator.js +24 -82
- package/dist/framework/Language/Translator.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/CustomFormatDateFieldElement/CustomFormatDateFieldElement.ts +4 -1
- package/src/framework/Language/Translator.ts +25 -83
package/demo/index.min.js
CHANGED
|
@@ -4940,6 +4940,9 @@ var CustomFormatDateFieldElement = /** @class */ (function (_super) {
|
|
|
4940
4940
|
CustomFormatDateFieldElement.prototype.initChildInputs = function () {
|
|
4941
4941
|
var _a;
|
|
4942
4942
|
this.date = _super.prototype.getChildInput.call(this, '#date-field');
|
|
4943
|
+
if (!this.date) {
|
|
4944
|
+
return;
|
|
4945
|
+
}
|
|
4943
4946
|
this.date.id = "date-field-" + Date.now();
|
|
4944
4947
|
this.pickerTrigger = this.getChildElement('#picker-trigger');
|
|
4945
4948
|
this.dateFormat = CustomDatepickerUtils_1.supportedDateFormats.includes(this.dateFormat) ? this.dateFormat : CustomDatepickerUtils_1.defaultDateFormat;
|
|
@@ -7905,92 +7908,34 @@ var Translator = /** @class */ (function () {
|
|
|
7905
7908
|
}
|
|
7906
7909
|
Translator.Translate = function (key, language) {
|
|
7907
7910
|
if (language === void 0) { language = 'da'; }
|
|
7908
|
-
|
|
7909
|
-
var isSupportedLanguage = Translator.langauges.indexOf(language) != -1;
|
|
7911
|
+
var isSupportedLanguage = Object.keys(this.languaeDictionaries).includes(language);
|
|
7910
7912
|
if (!isSupportedLanguage) {
|
|
7911
7913
|
language = 'da';
|
|
7912
7914
|
}
|
|
7913
|
-
|
|
7914
|
-
|
|
7915
|
-
|
|
7916
|
-
|
|
7917
|
-
|
|
7918
|
-
|
|
7919
|
-
|
|
7920
|
-
|
|
7921
|
-
|
|
7922
|
-
|
|
7923
|
-
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
|
|
7927
|
-
|
|
7928
|
-
|
|
7929
|
-
|
|
7930
|
-
|
|
7931
|
-
|
|
7932
|
-
|
|
7933
|
-
|
|
7934
|
-
|
|
7935
|
-
|
|
7936
|
-
|
|
7937
|
-
return this.italianDictionary.get(key);
|
|
7938
|
-
case 'lt':
|
|
7939
|
-
return this.latvianDictionary.get(key);
|
|
7940
|
-
case 'lv':
|
|
7941
|
-
return this.lituanianDictionary.get(key);
|
|
7942
|
-
case 'nl':
|
|
7943
|
-
return this.dutchDictionary.get(key);
|
|
7944
|
-
case 'no':
|
|
7945
|
-
return this.norwegianDictionary.get(key);
|
|
7946
|
-
case 'pl':
|
|
7947
|
-
return this.polishDictionary.get(key);
|
|
7948
|
-
case 'pt':
|
|
7949
|
-
return this.portugueseDictionary.get(key);
|
|
7950
|
-
case 'sv':
|
|
7951
|
-
return this.swedishDictionary.get(key);
|
|
7952
|
-
}
|
|
7953
|
-
};
|
|
7954
|
-
Translator.langauges = [
|
|
7955
|
-
'en',
|
|
7956
|
-
'da',
|
|
7957
|
-
'cs',
|
|
7958
|
-
'de',
|
|
7959
|
-
'el',
|
|
7960
|
-
'es',
|
|
7961
|
-
'et',
|
|
7962
|
-
'fi',
|
|
7963
|
-
'fr',
|
|
7964
|
-
'hu',
|
|
7965
|
-
'is',
|
|
7966
|
-
'it',
|
|
7967
|
-
'lt',
|
|
7968
|
-
'lv',
|
|
7969
|
-
'nl',
|
|
7970
|
-
'no',
|
|
7971
|
-
'pl',
|
|
7972
|
-
'pt',
|
|
7973
|
-
'sv',
|
|
7974
|
-
];
|
|
7975
|
-
Translator.danishDictionary = new DanishDictionary_1.default();
|
|
7976
|
-
Translator.englishDictionary = new EnglishDictionary_1.default();
|
|
7977
|
-
Translator.czechDictionary = new CzechDictionary_1.default();
|
|
7978
|
-
Translator.germanDictionary = new GermanDictionary_1.default();
|
|
7979
|
-
Translator.greekDictionary = new GreekDictionary_1.default();
|
|
7980
|
-
Translator.spanishDictionary = new SpanishDictionary_1.default();
|
|
7981
|
-
Translator.estonianDictionary = new EstonianDictionary_1.default();
|
|
7982
|
-
Translator.finnishDictionary = new FinnishDictionary_1.default();
|
|
7983
|
-
Translator.frenchDictionary = new FrenchDictionary_1.default();
|
|
7984
|
-
Translator.hungarianDictionary = new HungarianDictionary_1.default();
|
|
7985
|
-
Translator.icelandicDictionary = new IcelandicDictionary_1.default();
|
|
7986
|
-
Translator.italianDictionary = new ItalianDictionary_1.default();
|
|
7987
|
-
Translator.latvianDictionary = new LatvianDictionary_1.default();
|
|
7988
|
-
Translator.lituanianDictionary = new LituanianDictionary_1.default();
|
|
7989
|
-
Translator.dutchDictionary = new DutchDictionary_1.default();
|
|
7990
|
-
Translator.norwegianDictionary = new NorwegianDictionary_1.default();
|
|
7991
|
-
Translator.polishDictionary = new PolishDictionary_1.default();
|
|
7992
|
-
Translator.portugueseDictionary = new PortugueseDictionary_1.default();
|
|
7993
|
-
Translator.swedishDictionary = new SwedishDictionary_1.default();
|
|
7915
|
+
var dictionary = this.languaeDictionaries[language];
|
|
7916
|
+
return dictionary.get(key);
|
|
7917
|
+
};
|
|
7918
|
+
Translator.languaeDictionaries = {
|
|
7919
|
+
'da': new DanishDictionary_1.default(),
|
|
7920
|
+
'en': new EnglishDictionary_1.default(),
|
|
7921
|
+
'cs': new CzechDictionary_1.default(),
|
|
7922
|
+
'de': new GermanDictionary_1.default(),
|
|
7923
|
+
'el': new GreekDictionary_1.default(),
|
|
7924
|
+
'es': new SpanishDictionary_1.default(),
|
|
7925
|
+
'et': new EstonianDictionary_1.default(),
|
|
7926
|
+
'fi': new FinnishDictionary_1.default(),
|
|
7927
|
+
'fr': new FrenchDictionary_1.default(),
|
|
7928
|
+
'hu': new HungarianDictionary_1.default(),
|
|
7929
|
+
'is': new IcelandicDictionary_1.default(),
|
|
7930
|
+
'it': new ItalianDictionary_1.default(),
|
|
7931
|
+
'lv': new LatvianDictionary_1.default(),
|
|
7932
|
+
'lt': new LituanianDictionary_1.default(),
|
|
7933
|
+
'nl': new DutchDictionary_1.default(),
|
|
7934
|
+
'no': new NorwegianDictionary_1.default(),
|
|
7935
|
+
'pl': new PolishDictionary_1.default(),
|
|
7936
|
+
'pt': new PortugueseDictionary_1.default(),
|
|
7937
|
+
'sv': new SwedishDictionary_1.default(),
|
|
7938
|
+
};
|
|
7994
7939
|
return Translator;
|
|
7995
7940
|
}());
|
|
7996
7941
|
exports.default = Translator;
|