@luftborn/custom-elements 2.12.2 → 2.12.4
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 +27 -85
- package/demo/index.min.js +26 -84
- package/demo/index.min.js.map +1 -1
- package/dist/elements/Address/AddressElement.js +1 -1
- package/dist/elements/Address/AddressElement.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/Address/AddressElement.ts +1 -1
- package/src/framework/Language/Translator.ts +25 -83
|
@@ -42,7 +42,7 @@ var AddressElement = /** @class */ (function (_super) {
|
|
|
42
42
|
var city = this.city.value ? "," + this.city.value : '';
|
|
43
43
|
var zip = this.zip.value ? "," + this.zip.value : '';
|
|
44
44
|
var country = this.country.value ? "," + this.country.value : '';
|
|
45
|
-
return "" + address +
|
|
45
|
+
return "" + address + zip + city + country;
|
|
46
46
|
},
|
|
47
47
|
set: function (value) {
|
|
48
48
|
var values = value.split(',');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressElement.js","sourceRoot":"","sources":["../../../src/elements/Address/AddressElement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,qFAAqE;AACrE,yEAAwE;AACxE,6DAAsE;AACtE,kEAA6D;AAC7D,iGAA4F;AAC5F,iEAA4D;AA2B5D;IAAoC,kCAAkB;IAWrD;QAAA,YACC,iBAAO,SAEP;QAbO,yBAAmB,GAAG,KAAK,CAAC;QAYnC,IAAA,mCAAyB,GAAE,CAAC;;IAC7B,CAAC;IAED,sBAAI,iCAAK;aAAT;YACC,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;YACvC,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAI,IAAI,CAAC,IAAI,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C;IAED,sBAAW,oCAAkB;aAA7B;YACC,OAAO,CAAC,UAAU,EAAE,mBAAmB,EAAE,sBAAsB,CAAC,CAAC;QAClE,CAAC;;;OAAA;IACD,iDAAwB,GAAxB,UAAyB,IAAY,EAAE,MAAc,EAAE,MAAc;QACpE,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,CAAC;IACO,yCAAgB,GAAxB,UAAyB,IAAY,EAAE,MAAc,EAAE,MAAc;QACpE,QAAQ,IAAI,EAAE;YACb,KAAK,UAAU;gBACd,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAA;gBAC3B,MAAM;YACP,KAAK,mBAAmB;gBACvB,IAAI,CAAC,kBAAkB,GAAG,MAAM,CAAC;gBACjC,IAAI,CAAC,kBAAkB,EAAE,CAAA;gBACzB,MAAM;YACP,KAAK,sBAAsB;gBAC1B,IAAI,MAAM,IAAI,MAAM,IAAI,OAAO,EAAE;oBAChC,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC;oBAChC,IAAI,CAAC,kBAAkB,EAAE,CAAA;iBACzB;gBACD,MAAM;SAEP;IACF,CAAC;IAtLW,cAAc;QAzB1B,IAAA,kCAAa,EAAC;YACd,QAAQ,EAAE,iBAAiB;YAC3B,QAAQ,EAAE,yYAMD;YACT,KAAK,EAAE,kSAYL;YACF,YAAY,EAAE,aAAa;YAC3B,SAAS,EAAE,IAAI;SACf,CAAC;OACW,cAAc,CAuL1B;IAAD,qBAAC;CAAA,AAvLD,CAAoC,uCAAkB,GAuLrD;AAvLY,wCAAc"}
|
|
@@ -1,23 +1,4 @@
|
|
|
1
1
|
export default class Translator {
|
|
2
|
-
private static
|
|
3
|
-
private static danishDictionary;
|
|
4
|
-
private static englishDictionary;
|
|
5
|
-
private static czechDictionary;
|
|
6
|
-
private static germanDictionary;
|
|
7
|
-
private static greekDictionary;
|
|
8
|
-
private static spanishDictionary;
|
|
9
|
-
private static estonianDictionary;
|
|
10
|
-
private static finnishDictionary;
|
|
11
|
-
private static frenchDictionary;
|
|
12
|
-
private static hungarianDictionary;
|
|
13
|
-
private static icelandicDictionary;
|
|
14
|
-
private static italianDictionary;
|
|
15
|
-
private static latvianDictionary;
|
|
16
|
-
private static lituanianDictionary;
|
|
17
|
-
private static dutchDictionary;
|
|
18
|
-
private static norwegianDictionary;
|
|
19
|
-
private static polishDictionary;
|
|
20
|
-
private static portugueseDictionary;
|
|
21
|
-
private static swedishDictionary;
|
|
2
|
+
private static languaeDictionaries;
|
|
22
3
|
static Translate(key: string, language?: string): string;
|
|
23
4
|
}
|
|
@@ -24,92 +24,34 @@ var Translator = /** @class */ (function () {
|
|
|
24
24
|
}
|
|
25
25
|
Translator.Translate = function (key, language) {
|
|
26
26
|
if (language === void 0) { language = 'da'; }
|
|
27
|
-
|
|
28
|
-
var isSupportedLanguage = Translator.langauges.indexOf(language) != -1;
|
|
27
|
+
var isSupportedLanguage = Object.keys(this.languaeDictionaries).includes(language);
|
|
29
28
|
if (!isSupportedLanguage) {
|
|
30
29
|
language = 'da';
|
|
31
30
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
case 'it':
|
|
56
|
-
return this.italianDictionary.get(key);
|
|
57
|
-
case 'lt':
|
|
58
|
-
return this.latvianDictionary.get(key);
|
|
59
|
-
case 'lv':
|
|
60
|
-
return this.lituanianDictionary.get(key);
|
|
61
|
-
case 'nl':
|
|
62
|
-
return this.dutchDictionary.get(key);
|
|
63
|
-
case 'no':
|
|
64
|
-
return this.norwegianDictionary.get(key);
|
|
65
|
-
case 'pl':
|
|
66
|
-
return this.polishDictionary.get(key);
|
|
67
|
-
case 'pt':
|
|
68
|
-
return this.portugueseDictionary.get(key);
|
|
69
|
-
case 'sv':
|
|
70
|
-
return this.swedishDictionary.get(key);
|
|
71
|
-
}
|
|
31
|
+
var dictionary = this.languaeDictionaries[language];
|
|
32
|
+
return dictionary.get(key);
|
|
33
|
+
};
|
|
34
|
+
Translator.languaeDictionaries = {
|
|
35
|
+
'da': new DanishDictionary_1.default(),
|
|
36
|
+
'en': new EnglishDictionary_1.default(),
|
|
37
|
+
'cs': new CzechDictionary_1.default(),
|
|
38
|
+
'de': new GermanDictionary_1.default(),
|
|
39
|
+
'el': new GreekDictionary_1.default(),
|
|
40
|
+
'es': new SpanishDictionary_1.default(),
|
|
41
|
+
'et': new EstonianDictionary_1.default(),
|
|
42
|
+
'fi': new FinnishDictionary_1.default(),
|
|
43
|
+
'fr': new FrenchDictionary_1.default(),
|
|
44
|
+
'hu': new HungarianDictionary_1.default(),
|
|
45
|
+
'is': new IcelandicDictionary_1.default(),
|
|
46
|
+
'it': new ItalianDictionary_1.default(),
|
|
47
|
+
'lv': new LatvianDictionary_1.default(),
|
|
48
|
+
'lt': new LituanianDictionary_1.default(),
|
|
49
|
+
'nl': new DutchDictionary_1.default(),
|
|
50
|
+
'no': new NorwegianDictionary_1.default(),
|
|
51
|
+
'pl': new PolishDictionary_1.default(),
|
|
52
|
+
'pt': new PortugueseDictionary_1.default(),
|
|
53
|
+
'sv': new SwedishDictionary_1.default(),
|
|
72
54
|
};
|
|
73
|
-
Translator.langauges = [
|
|
74
|
-
'en',
|
|
75
|
-
'da',
|
|
76
|
-
'cs',
|
|
77
|
-
'de',
|
|
78
|
-
'el',
|
|
79
|
-
'es',
|
|
80
|
-
'et',
|
|
81
|
-
'fi',
|
|
82
|
-
'fr',
|
|
83
|
-
'hu',
|
|
84
|
-
'is',
|
|
85
|
-
'it',
|
|
86
|
-
'lt',
|
|
87
|
-
'lv',
|
|
88
|
-
'nl',
|
|
89
|
-
'no',
|
|
90
|
-
'pl',
|
|
91
|
-
'pt',
|
|
92
|
-
'sv',
|
|
93
|
-
];
|
|
94
|
-
Translator.danishDictionary = new DanishDictionary_1.default();
|
|
95
|
-
Translator.englishDictionary = new EnglishDictionary_1.default();
|
|
96
|
-
Translator.czechDictionary = new CzechDictionary_1.default();
|
|
97
|
-
Translator.germanDictionary = new GermanDictionary_1.default();
|
|
98
|
-
Translator.greekDictionary = new GreekDictionary_1.default();
|
|
99
|
-
Translator.spanishDictionary = new SpanishDictionary_1.default();
|
|
100
|
-
Translator.estonianDictionary = new EstonianDictionary_1.default();
|
|
101
|
-
Translator.finnishDictionary = new FinnishDictionary_1.default();
|
|
102
|
-
Translator.frenchDictionary = new FrenchDictionary_1.default();
|
|
103
|
-
Translator.hungarianDictionary = new HungarianDictionary_1.default();
|
|
104
|
-
Translator.icelandicDictionary = new IcelandicDictionary_1.default();
|
|
105
|
-
Translator.italianDictionary = new ItalianDictionary_1.default();
|
|
106
|
-
Translator.latvianDictionary = new LatvianDictionary_1.default();
|
|
107
|
-
Translator.lituanianDictionary = new LituanianDictionary_1.default();
|
|
108
|
-
Translator.dutchDictionary = new DutchDictionary_1.default();
|
|
109
|
-
Translator.norwegianDictionary = new NorwegianDictionary_1.default();
|
|
110
|
-
Translator.polishDictionary = new PolishDictionary_1.default();
|
|
111
|
-
Translator.portugueseDictionary = new PortugueseDictionary_1.default();
|
|
112
|
-
Translator.swedishDictionary = new SwedishDictionary_1.default();
|
|
113
55
|
return Translator;
|
|
114
56
|
}());
|
|
115
57
|
exports.default = Translator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Translator.js","sourceRoot":"","sources":["../../../src/framework/Language/Translator.ts"],"names":[],"mappings":";;AAAA,iEAA4D;AAC5D,mEAA8D;AAC9D,+DAA0D;AAC1D,iEAA4D;AAC5D,+DAA0D;AAC1D,mEAA8D;AAC9D,qEAAgE;AAChE,mEAA8D;AAC9D,iEAA4D;AAC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I,4BAAkB,EAAE;QAC9B,IAAI,EAAE,IAAI,2BAAiB,EAAE;QAC7B,IAAI,EAAE,IAAI,0BAAgB,EAAE;QAC5B,IAAI,EAAE,IAAI,6BAAmB,EAAE;QAC/B,IAAI,EAAE,IAAI,6BAAmB,EAAE;QAC/B,IAAI,EAAE,IAAI,2BAAiB,EAAE;QAC7B,IAAI,EAAE,IAAI,2BAAiB,EAAE;QAC7B,IAAI,EAAE,IAAI,6BAAmB,EAAE;QAC/B,IAAI,EAAE,IAAI,yBAAe,EAAE;QAC3B,IAAI,EAAE,IAAI,6BAAmB,EAAE;QAC/B,IAAI,EAAE,IAAI,0BAAgB,EAAE;QAC5B,IAAI,EAAE,IAAI,8BAAoB,EAAE;QAChC,IAAI,EAAE,IAAI,2BAAiB,EAAE;KAChC,CAAA;IAWL,iBAAC;CAAA,AAhCD,IAgCC;kBAhCoB,UAAU"}
|
package/package.json
CHANGED
|
@@ -51,7 +51,7 @@ export class AddressElement extends CustomInputElement {
|
|
|
51
51
|
let city = this.city.value ? `,${this.city.value}` : '';
|
|
52
52
|
let zip = this.zip.value ? `,${this.zip.value}` : '';
|
|
53
53
|
let country = this.country.value ? `,${this.country.value}` : '';
|
|
54
|
-
return `${address}${
|
|
54
|
+
return `${address}${zip}${city}${country}`;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
set value(value: string) {
|
|
@@ -19,93 +19,35 @@ import PortugueseDictionary from "./Languages/PortugueseDictionary";
|
|
|
19
19
|
import SwedishDictionary from "./Languages/SwedishDictionary";
|
|
20
20
|
|
|
21
21
|
export default class Translator {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
'cs',
|
|
26
|
-
'de',
|
|
27
|
-
'el',
|
|
28
|
-
'es',
|
|
29
|
-
'et',
|
|
30
|
-
'fi',
|
|
31
|
-
'fr',
|
|
32
|
-
'hu',
|
|
33
|
-
'is',
|
|
34
|
-
'it',
|
|
35
|
-
'
|
|
36
|
-
'
|
|
37
|
-
'nl',
|
|
38
|
-
'no',
|
|
39
|
-
'pl',
|
|
40
|
-
'pt',
|
|
41
|
-
'sv',
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
private static danishDictionary = new DanishDictionary();
|
|
45
|
-
private static englishDictionary = new EnglishDictionary();
|
|
46
|
-
private static czechDictionary = new CzechDictionary();
|
|
47
|
-
private static germanDictionary = new GermanDictionary();
|
|
48
|
-
private static greekDictionary = new GreekDictionary();
|
|
49
|
-
private static spanishDictionary = new SpanishDictionary();
|
|
50
|
-
private static estonianDictionary = new EstonianDictionary();
|
|
51
|
-
private static finnishDictionary = new FinnishDictionary();
|
|
52
|
-
private static frenchDictionary = new FrenchDictionary();
|
|
53
|
-
private static hungarianDictionary = new HungarianDictionary();
|
|
54
|
-
private static icelandicDictionary = new IcelandicDictionary();
|
|
55
|
-
private static italianDictionary = new ItalianDictionary();
|
|
56
|
-
private static latvianDictionary = new LatvianDictionary();
|
|
57
|
-
private static lituanianDictionary = new LituanianDictionary();
|
|
58
|
-
private static dutchDictionary = new DutchDictionary();
|
|
59
|
-
private static norwegianDictionary = new NorwegianDictionary();
|
|
60
|
-
private static polishDictionary = new PolishDictionary();
|
|
61
|
-
private static portugueseDictionary = new PortugueseDictionary();
|
|
62
|
-
private static swedishDictionary = new SwedishDictionary();
|
|
22
|
+
private static languaeDictionaries = {
|
|
23
|
+
'da': new DanishDictionary(),
|
|
24
|
+
'en': new EnglishDictionary(),
|
|
25
|
+
'cs': new CzechDictionary(),
|
|
26
|
+
'de': new GermanDictionary(),
|
|
27
|
+
'el': new GreekDictionary(),
|
|
28
|
+
'es': new SpanishDictionary(),
|
|
29
|
+
'et': new EstonianDictionary(),
|
|
30
|
+
'fi': new FinnishDictionary(),
|
|
31
|
+
'fr': new FrenchDictionary(),
|
|
32
|
+
'hu': new HungarianDictionary(),
|
|
33
|
+
'is': new IcelandicDictionary(),
|
|
34
|
+
'it': new ItalianDictionary(),
|
|
35
|
+
'lv': new LatvianDictionary(),
|
|
36
|
+
'lt': new LituanianDictionary(),
|
|
37
|
+
'nl': new DutchDictionary(),
|
|
38
|
+
'no': new NorwegianDictionary(),
|
|
39
|
+
'pl': new PolishDictionary(),
|
|
40
|
+
'pt': new PortugueseDictionary(),
|
|
41
|
+
'sv': new SwedishDictionary(),
|
|
42
|
+
}
|
|
63
43
|
|
|
64
44
|
static Translate(key: string, language = 'da'): string {
|
|
65
|
-
|
|
66
|
-
const isSupportedLanguage = Translator.langauges.indexOf(language) != -1;
|
|
45
|
+
const isSupportedLanguage = Object.keys(this.languaeDictionaries).includes(language);
|
|
67
46
|
if (!isSupportedLanguage) {
|
|
68
47
|
language = 'da'
|
|
69
48
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
case 'en':
|
|
74
|
-
return this.englishDictionary.get(key);
|
|
75
|
-
case 'cs':
|
|
76
|
-
return this.czechDictionary.get(key);
|
|
77
|
-
case 'de':
|
|
78
|
-
return this.germanDictionary.get(key);
|
|
79
|
-
case 'el':
|
|
80
|
-
return this.greekDictionary.get(key);
|
|
81
|
-
case 'es':
|
|
82
|
-
return this.spanishDictionary.get(key);
|
|
83
|
-
case 'et':
|
|
84
|
-
return this.estonianDictionary.get(key);
|
|
85
|
-
case 'fi':
|
|
86
|
-
return this.finnishDictionary.get(key);
|
|
87
|
-
case 'fr':
|
|
88
|
-
return this.frenchDictionary.get(key);
|
|
89
|
-
case 'hu':
|
|
90
|
-
return this.hungarianDictionary.get(key);
|
|
91
|
-
case 'is':
|
|
92
|
-
return this.icelandicDictionary.get(key);
|
|
93
|
-
case 'it':
|
|
94
|
-
return this.italianDictionary.get(key);
|
|
95
|
-
case 'lt':
|
|
96
|
-
return this.latvianDictionary.get(key);
|
|
97
|
-
case 'lv':
|
|
98
|
-
return this.lituanianDictionary.get(key);
|
|
99
|
-
case 'nl':
|
|
100
|
-
return this.dutchDictionary.get(key);
|
|
101
|
-
case 'no':
|
|
102
|
-
return this.norwegianDictionary.get(key);
|
|
103
|
-
case 'pl':
|
|
104
|
-
return this.polishDictionary.get(key);
|
|
105
|
-
case 'pt':
|
|
106
|
-
return this.portugueseDictionary.get(key);
|
|
107
|
-
case 'sv':
|
|
108
|
-
return this.swedishDictionary.get(key);
|
|
109
|
-
}
|
|
49
|
+
|
|
50
|
+
const dictionary = this.languaeDictionaries[language];
|
|
51
|
+
return dictionary.get(key);
|
|
110
52
|
}
|
|
111
53
|
}
|