@luftborn/custom-elements 1.4.0 → 2.0.0
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/README.md +2 -2
- package/assets/style.css +277 -277
- package/azure-pipeline.yml +54 -0
- package/demo/index.html +585 -585
- package/demo/index.js +6109 -0
- package/demo/index.min.js +6110 -0
- package/demo/index.min.js.map +1 -0
- package/demo/index.ts +11 -11
- package/demo/old/index.html +586 -586
- package/demo/old/index.js +10849 -10849
- package/demo/old/index.min.js +10850 -10850
- package/demo/old/index.ts +10 -10
- package/dist/custom-form.d.ts +20 -20
- package/dist/custom-form.js +147 -147
- package/dist/elements/Address/AddressElement.d.ts +28 -28
- package/dist/elements/Address/AddressElement.js +206 -206
- package/dist/elements/BankField/BankFieldElement.d.ts +22 -22
- package/dist/elements/BankField/BankFieldElement.js +127 -127
- package/dist/elements/CPRElement/CPRElement.d.ts +14 -14
- package/dist/elements/CPRElement/CPRElement.js +82 -82
- package/dist/elements/CVRElement/CVRElement.d.ts +14 -14
- package/dist/elements/CVRElement/CVRElement.js +82 -82
- package/dist/elements/CheckBoxElement/CheckBoxElement.d.ts +14 -14
- package/dist/elements/CheckBoxElement/CheckBoxElement.js +96 -96
- package/dist/elements/CustomRegularExpression/CustomRegularExpressionElement.d.ts +12 -12
- package/dist/elements/CustomRegularExpression/CustomRegularExpressionElement.js +82 -82
- package/dist/elements/DateField/DateFieldElement.d.ts +12 -12
- package/dist/elements/DateField/DateFieldElement.js +85 -85
- package/dist/elements/DropDownList/DropDownListElement.d.ts +14 -14
- package/dist/elements/DropDownList/DropDownListElement.js +93 -93
- package/dist/elements/Elements.d.ts +18 -18
- package/dist/elements/Elements.js +37 -37
- package/dist/elements/EmailField/EmailFieldElement.d.ts +13 -13
- package/dist/elements/EmailField/EmailFieldElement.js +83 -83
- package/dist/elements/FileField/FileFieldElement.d.ts +15 -15
- package/dist/elements/FileField/FileFieldElement.js +103 -103
- package/dist/elements/IdentificationElement/IdentificationElement.d.ts +18 -18
- package/dist/elements/IdentificationElement/IdentificationElement.js +94 -94
- package/dist/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.d.ts +16 -16
- package/dist/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.js +114 -114
- package/dist/elements/NumericField/NumericFieldElement.d.ts +12 -12
- package/dist/elements/NumericField/NumericFieldElement.js +91 -91
- package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.d.ts +14 -14
- package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.js +99 -99
- package/dist/elements/TextAreaElement/TextAreaElement.d.ts +12 -12
- package/dist/elements/TextAreaElement/TextAreaElement.js +79 -79
- package/dist/elements/TextField/TextFieldElement.d.ts +12 -12
- package/dist/elements/TextField/TextFieldElement.js +79 -79
- package/dist/elements/TypeAhead/TypeAheadElement.d.ts +24 -24
- package/dist/elements/TypeAhead/TypeAheadElement.js +209 -209
- package/dist/framework/CustomEvents.d.ts +21 -21
- package/dist/framework/CustomEvents.js +47 -47
- package/dist/framework/CustomInputElement.d.ts +50 -50
- package/dist/framework/CustomInputElement.js +258 -258
- package/dist/framework/Language/Languages/Base/BaseDictionary.d.ts +4 -4
- package/dist/framework/Language/Languages/Base/BaseDictionary.js +20 -20
- package/dist/framework/Language/Languages/CzechDictionary.d.ts +4 -4
- package/dist/framework/Language/Languages/CzechDictionary.js +39 -39
- package/dist/framework/Language/Languages/DanishDictionary.d.ts +4 -4
- package/dist/framework/Language/Languages/DanishDictionary.js +39 -39
- package/dist/framework/Language/Languages/DutchDictionary.d.ts +4 -4
- package/dist/framework/Language/Languages/DutchDictionary.js +39 -39
- package/dist/framework/Language/Languages/EnglishDictionary.d.ts +4 -4
- package/dist/framework/Language/Languages/EnglishDictionary.js +39 -39
- package/dist/framework/Language/Languages/EstonianDictionary.d.ts +4 -4
- package/dist/framework/Language/Languages/EstonianDictionary.js +39 -39
- package/dist/framework/Language/Languages/FinnishDictionary.d.ts +4 -4
- package/dist/framework/Language/Languages/FinnishDictionary.js +39 -39
- package/dist/framework/Language/Languages/FrenchDictionary.d.ts +4 -4
- package/dist/framework/Language/Languages/FrenchDictionary.js +39 -39
- package/dist/framework/Language/Languages/GermanDictionary.d.ts +4 -4
- package/dist/framework/Language/Languages/GermanDictionary.js +39 -39
- package/dist/framework/Language/Languages/GreekDictionary.d.ts +4 -4
- package/dist/framework/Language/Languages/GreekDictionary.js +39 -39
- package/dist/framework/Language/Languages/HungarianDictionary.d.ts +4 -4
- package/dist/framework/Language/Languages/HungarianDictionary.js +39 -39
- package/dist/framework/Language/Languages/IcelandicDictionary.d.ts +4 -4
- package/dist/framework/Language/Languages/IcelandicDictionary.js +39 -39
- package/dist/framework/Language/Languages/ItalianDictionary.d.ts +4 -4
- package/dist/framework/Language/Languages/ItalianDictionary.js +39 -39
- package/dist/framework/Language/Languages/LatvianDictionary.d.ts +4 -4
- package/dist/framework/Language/Languages/LatvianDictionary.js +39 -39
- package/dist/framework/Language/Languages/LituanianDictionary.d.ts +4 -4
- package/dist/framework/Language/Languages/LituanianDictionary.js +39 -39
- package/dist/framework/Language/Languages/NorwegianDictionary.d.ts +4 -4
- package/dist/framework/Language/Languages/NorwegianDictionary.js +39 -39
- package/dist/framework/Language/Languages/PolishDictionary.d.ts +4 -4
- package/dist/framework/Language/Languages/PolishDictionary.js +39 -39
- package/dist/framework/Language/Languages/PortugueseDictionary.d.ts +4 -4
- package/dist/framework/Language/Languages/PortugueseDictionary.js +39 -39
- package/dist/framework/Language/Languages/SpanishDictionary.d.ts +4 -4
- package/dist/framework/Language/Languages/SpanishDictionary.js +39 -39
- package/dist/framework/Language/Languages/SwedishDictionary.d.ts +4 -4
- package/dist/framework/Language/Languages/SwedishDictionary.js +39 -39
- package/dist/framework/Language/Translator.d.ts +23 -23
- package/dist/framework/Language/Translator.js +115 -115
- package/dist/framework/Models/OptionWithDescription.d.ts +6 -6
- package/dist/framework/Models/OptionWithDescription.js +9 -9
- package/dist/framework/Polyfills/getAttributeNamesPolyfill.d.ts +1 -1
- package/dist/framework/Polyfills/getAttributeNamesPolyfill.js +17 -17
- package/dist/framework/Translations/CaseConverter.d.ts +5 -5
- package/dist/framework/Translations/CaseConverter.js +50 -50
- package/dist/framework/Utilities/ArrayUtil.d.ts +6 -6
- package/dist/framework/Utilities/ArrayUtil.js +36 -36
- package/dist/framework/Utilities/DomUtil.d.ts +21 -21
- package/dist/framework/Utilities/DomUtil.js +101 -101
- package/dist/framework/Utilities/DomUtility.d.ts +3 -3
- package/dist/framework/Utilities/DomUtility.js +12 -12
- package/dist/framework/Utilities/MakeRequest.d.ts +8 -8
- package/dist/framework/Utilities/MakeRequest.js +48 -48
- package/dist/framework/Utilities/StringUtil.d.ts +4 -4
- package/dist/framework/Utilities/StringUtil.js +16 -16
- package/dist/framework/Utilities/ViewportUtil.d.ts +8 -8
- package/dist/framework/Utilities/ViewportUtil.js +42 -42
- package/dist/framework/Utilities/debouncer.d.ts +8 -8
- package/dist/framework/Utilities/debouncer.js +51 -51
- package/dist/framework/Validation/IValidator.interface.d.ts +3 -3
- package/dist/framework/Validation/IValidator.interface.js +2 -2
- package/dist/framework/Validation/Validators/BankAccount.d.ts +4 -4
- package/dist/framework/Validation/Validators/BankAccount.js +12 -12
- package/dist/framework/Validation/Validators/BankAccountRegistrationNumber.d.ts +4 -4
- package/dist/framework/Validation/Validators/BankAccountRegistrationNumber.js +12 -12
- package/dist/framework/Validation/Validators/BankIdNorway.d.ts +5 -5
- package/dist/framework/Validation/Validators/BankIdNorway.js +21 -21
- package/dist/framework/Validation/Validators/BankIdSweden.d.ts +5 -5
- package/dist/framework/Validation/Validators/BankIdSweden.js +21 -21
- package/dist/framework/Validation/Validators/CPR.d.ts +9 -9
- package/dist/framework/Validation/Validators/CPR.js +75 -75
- package/dist/framework/Validation/Validators/CVR.d.ts +5 -5
- package/dist/framework/Validation/Validators/CVR.js +30 -30
- package/dist/framework/custom-element.decorator.d.ts +9 -9
- package/dist/framework/custom-element.decorator.js +51 -51
- package/dist/index.d.ts +7 -7
- package/dist/index.js +14 -14
- package/package.json +38 -38
- package/src/custom-form.ts +140 -140
- package/src/elements/Address/AddressElement.ts +216 -216
- package/src/elements/BankField/BankFieldElement.ts +127 -127
- package/src/elements/CPRElement/CPRElement.ts +74 -74
- package/src/elements/CVRElement/CVRElement.ts +75 -75
- package/src/elements/CheckBoxElement/CheckBoxElement.ts +99 -99
- package/src/elements/CustomRegularExpression/CustomRegularExpressionElement.ts +75 -75
- package/src/elements/DateField/DateFieldElement.ts +78 -78
- package/src/elements/DropDownList/DropDownListElement.ts +100 -100
- package/src/elements/Elements.ts +37 -37
- package/src/elements/EmailField/EmailFieldElement.ts +78 -78
- package/src/elements/FileField/FileFieldElement.ts +96 -96
- package/src/elements/IdentificationElement/IdentificationElement.ts +104 -104
- package/src/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.ts +116 -116
- package/src/elements/NumericField/NumericFieldElement.ts +84 -84
- package/src/elements/RadioButtonGroup/RadioButtonGroupElement.ts +103 -103
- package/src/elements/TextAreaElement/TextAreaElement.ts +72 -72
- package/src/elements/TextField/TextFieldElement.ts +72 -72
- package/src/elements/TypeAhead/TypeAheadElement.ts +248 -248
- package/src/framework/CustomEvents.ts +47 -47
- package/src/framework/CustomInputElement.ts +277 -277
- package/src/framework/Language/Languages/Base/BaseDictionary.ts +15 -15
- package/src/framework/Language/Languages/CzechDictionary.ts +18 -18
- package/src/framework/Language/Languages/DanishDictionary.ts +17 -17
- package/src/framework/Language/Languages/DutchDictionary.ts +17 -17
- package/src/framework/Language/Languages/EnglishDictionary.ts +18 -18
- package/src/framework/Language/Languages/EstonianDictionary.ts +17 -17
- package/src/framework/Language/Languages/FinnishDictionary.ts +17 -17
- package/src/framework/Language/Languages/FrenchDictionary.ts +17 -17
- package/src/framework/Language/Languages/GermanDictionary.ts +17 -17
- package/src/framework/Language/Languages/GreekDictionary.ts +17 -17
- package/src/framework/Language/Languages/HungarianDictionary.ts +17 -17
- package/src/framework/Language/Languages/IcelandicDictionary.ts +17 -17
- package/src/framework/Language/Languages/ItalianDictionary.ts +17 -17
- package/src/framework/Language/Languages/LatvianDictionary.ts +17 -17
- package/src/framework/Language/Languages/LituanianDictionary.ts +17 -17
- package/src/framework/Language/Languages/NorwegianDictionary.ts +17 -17
- package/src/framework/Language/Languages/PolishDictionary.ts +17 -17
- package/src/framework/Language/Languages/PortugueseDictionary.ts +17 -17
- package/src/framework/Language/Languages/SpanishDictionary.ts +17 -17
- package/src/framework/Language/Languages/SwedishDictionary.ts +17 -17
- package/src/framework/Language/Translator.ts +110 -110
- package/src/framework/Models/OptionWithDescription.ts +8 -8
- package/src/framework/Polyfills/getAttributeNamesPolyfill.ts +13 -13
- package/src/framework/Translations/CaseConverter.ts +43 -43
- package/src/framework/Utilities/ArrayUtil.ts +31 -31
- package/src/framework/Utilities/DomUtil.ts +117 -117
- package/src/framework/Utilities/DomUtility.ts +6 -6
- package/src/framework/Utilities/MakeRequest.ts +47 -47
- package/src/framework/Utilities/StringUtil.ts +8 -8
- package/src/framework/Utilities/ViewportUtil.ts +46 -46
- package/src/framework/Utilities/debouncer.ts +66 -66
- package/src/framework/Validation/IValidator.interface.ts +3 -3
- package/src/framework/Validation/Validators/BankAccount.ts +7 -7
- package/src/framework/Validation/Validators/BankAccountRegistrationNumber.ts +8 -8
- package/src/framework/Validation/Validators/BankIdNorway.ts +21 -21
- package/src/framework/Validation/Validators/BankIdSweden.ts +21 -21
- package/src/framework/Validation/Validators/CPR.ts +82 -82
- package/src/framework/Validation/Validators/CVR.ts +27 -27
- package/src/framework/custom-element.decorator.ts +57 -57
- package/src/index.ts +12 -12
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var ViewportUtil_1 = require("./ViewportUtil");
|
|
4
|
-
var DomUtil = /** @class */ (function () {
|
|
5
|
-
function DomUtil(element) {
|
|
6
|
-
this.element = element;
|
|
7
|
-
this.viewPortUtil = new ViewportUtil_1.ViewportUtil(this.element);
|
|
8
|
-
}
|
|
9
|
-
DomUtil.prototype.getDataAttr = function (attr, defaultvalue) {
|
|
10
|
-
if (!this.element) {
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
var value = this.element.getAttribute("data-" + attr);
|
|
14
|
-
return value !== undefined ? value : defaultvalue;
|
|
15
|
-
};
|
|
16
|
-
DomUtil.prototype.setDataAttr = function (attr, value) {
|
|
17
|
-
if (!this.element) {
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
return this.element.setAttribute("data-" + attr, value);
|
|
21
|
-
};
|
|
22
|
-
DomUtil.prototype.getAttr = function (attr, defaultvalue) {
|
|
23
|
-
if (!this.element) {
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
var value = this.element.getAttribute(attr);
|
|
27
|
-
return value !== undefined ? value : defaultvalue;
|
|
28
|
-
};
|
|
29
|
-
DomUtil.prototype.setAttr = function (attr, value) {
|
|
30
|
-
if (!this.element) {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
this.element.setAttribute(attr, value);
|
|
34
|
-
};
|
|
35
|
-
DomUtil.prototype.removeAttr = function (attr) {
|
|
36
|
-
if (!this.element) {
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
39
|
-
this.element.removeAttribute(attr);
|
|
40
|
-
};
|
|
41
|
-
DomUtil.prototype.removeDataAttr = function (attr) {
|
|
42
|
-
if (!this.element) {
|
|
43
|
-
return null;
|
|
44
|
-
}
|
|
45
|
-
this.element.removeAttribute("data-" + attr);
|
|
46
|
-
};
|
|
47
|
-
DomUtil.prototype.hasAttr = function (attr) {
|
|
48
|
-
if (!this.element) {
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
return this.element.hasAttribute(attr);
|
|
52
|
-
};
|
|
53
|
-
DomUtil.prototype.shake = function () {
|
|
54
|
-
var _this = this;
|
|
55
|
-
this.appendClass('shake');
|
|
56
|
-
setTimeout(function () {
|
|
57
|
-
_this.removeClass('shake');
|
|
58
|
-
_this.element.readOnly = false;
|
|
59
|
-
}, 600);
|
|
60
|
-
};
|
|
61
|
-
DomUtil.prototype.error = function () {
|
|
62
|
-
var _this = this;
|
|
63
|
-
this.appendClass('error');
|
|
64
|
-
setTimeout(function () {
|
|
65
|
-
_this.removeClass('error');
|
|
66
|
-
_this.element.readOnly = false;
|
|
67
|
-
}, 5000);
|
|
68
|
-
};
|
|
69
|
-
DomUtil.prototype.focus = function () {
|
|
70
|
-
if (!this.viewPortUtil.IsVisible()) {
|
|
71
|
-
this.element.scrollIntoView();
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
DomUtil.prototype.removeClass = function (classname) {
|
|
75
|
-
this.element.classList.remove(classname);
|
|
76
|
-
};
|
|
77
|
-
DomUtil.prototype.appendClass = function (classname) {
|
|
78
|
-
this.element.classList.add(classname);
|
|
79
|
-
};
|
|
80
|
-
DomUtil.prototype.deleteElement = function () {
|
|
81
|
-
if (!this.element) {
|
|
82
|
-
return null;
|
|
83
|
-
}
|
|
84
|
-
this.element.remove();
|
|
85
|
-
};
|
|
86
|
-
DomUtil.prototype.setChildElementByAttrName = function (name, value) {
|
|
87
|
-
var firstLetter = name.replace(/^\w/, function (c) { return c.toUpperCase(); });
|
|
88
|
-
var SubElement = this.element.querySelector("[name=\"" + firstLetter + "\"]");
|
|
89
|
-
if (SubElement) {
|
|
90
|
-
SubElement.value = value;
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
DomUtil.prototype.hasClass = function (className) {
|
|
94
|
-
return this.element.classList.contains(className);
|
|
95
|
-
};
|
|
96
|
-
DomUtil.prototype.getStyle = function (ruleName) {
|
|
97
|
-
return getComputedStyle(this.element)[ruleName];
|
|
98
|
-
};
|
|
99
|
-
return DomUtil;
|
|
100
|
-
}());
|
|
101
|
-
exports.default = DomUtil;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var ViewportUtil_1 = require("./ViewportUtil");
|
|
4
|
+
var DomUtil = /** @class */ (function () {
|
|
5
|
+
function DomUtil(element) {
|
|
6
|
+
this.element = element;
|
|
7
|
+
this.viewPortUtil = new ViewportUtil_1.ViewportUtil(this.element);
|
|
8
|
+
}
|
|
9
|
+
DomUtil.prototype.getDataAttr = function (attr, defaultvalue) {
|
|
10
|
+
if (!this.element) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
var value = this.element.getAttribute("data-" + attr);
|
|
14
|
+
return value !== undefined ? value : defaultvalue;
|
|
15
|
+
};
|
|
16
|
+
DomUtil.prototype.setDataAttr = function (attr, value) {
|
|
17
|
+
if (!this.element) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
return this.element.setAttribute("data-" + attr, value);
|
|
21
|
+
};
|
|
22
|
+
DomUtil.prototype.getAttr = function (attr, defaultvalue) {
|
|
23
|
+
if (!this.element) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
var value = this.element.getAttribute(attr);
|
|
27
|
+
return value !== undefined ? value : defaultvalue;
|
|
28
|
+
};
|
|
29
|
+
DomUtil.prototype.setAttr = function (attr, value) {
|
|
30
|
+
if (!this.element) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
this.element.setAttribute(attr, value);
|
|
34
|
+
};
|
|
35
|
+
DomUtil.prototype.removeAttr = function (attr) {
|
|
36
|
+
if (!this.element) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
this.element.removeAttribute(attr);
|
|
40
|
+
};
|
|
41
|
+
DomUtil.prototype.removeDataAttr = function (attr) {
|
|
42
|
+
if (!this.element) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
this.element.removeAttribute("data-" + attr);
|
|
46
|
+
};
|
|
47
|
+
DomUtil.prototype.hasAttr = function (attr) {
|
|
48
|
+
if (!this.element) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
return this.element.hasAttribute(attr);
|
|
52
|
+
};
|
|
53
|
+
DomUtil.prototype.shake = function () {
|
|
54
|
+
var _this = this;
|
|
55
|
+
this.appendClass('shake');
|
|
56
|
+
setTimeout(function () {
|
|
57
|
+
_this.removeClass('shake');
|
|
58
|
+
_this.element.readOnly = false;
|
|
59
|
+
}, 600);
|
|
60
|
+
};
|
|
61
|
+
DomUtil.prototype.error = function () {
|
|
62
|
+
var _this = this;
|
|
63
|
+
this.appendClass('error');
|
|
64
|
+
setTimeout(function () {
|
|
65
|
+
_this.removeClass('error');
|
|
66
|
+
_this.element.readOnly = false;
|
|
67
|
+
}, 5000);
|
|
68
|
+
};
|
|
69
|
+
DomUtil.prototype.focus = function () {
|
|
70
|
+
if (!this.viewPortUtil.IsVisible()) {
|
|
71
|
+
this.element.scrollIntoView();
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
DomUtil.prototype.removeClass = function (classname) {
|
|
75
|
+
this.element.classList.remove(classname);
|
|
76
|
+
};
|
|
77
|
+
DomUtil.prototype.appendClass = function (classname) {
|
|
78
|
+
this.element.classList.add(classname);
|
|
79
|
+
};
|
|
80
|
+
DomUtil.prototype.deleteElement = function () {
|
|
81
|
+
if (!this.element) {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
this.element.remove();
|
|
85
|
+
};
|
|
86
|
+
DomUtil.prototype.setChildElementByAttrName = function (name, value) {
|
|
87
|
+
var firstLetter = name.replace(/^\w/, function (c) { return c.toUpperCase(); });
|
|
88
|
+
var SubElement = this.element.querySelector("[name=\"" + firstLetter + "\"]");
|
|
89
|
+
if (SubElement) {
|
|
90
|
+
SubElement.value = value;
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
DomUtil.prototype.hasClass = function (className) {
|
|
94
|
+
return this.element.classList.contains(className);
|
|
95
|
+
};
|
|
96
|
+
DomUtil.prototype.getStyle = function (ruleName) {
|
|
97
|
+
return getComputedStyle(this.element)[ruleName];
|
|
98
|
+
};
|
|
99
|
+
return DomUtil;
|
|
100
|
+
}());
|
|
101
|
+
exports.default = DomUtil;
|
|
102
102
|
//# sourceMappingURL=DomUtil.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export default class DomUtility {
|
|
2
|
-
static boldenText(inputText: string, matchindTextToBolden: string): string;
|
|
3
|
-
}
|
|
1
|
+
export default class DomUtility {
|
|
2
|
+
static boldenText(inputText: string, matchindTextToBolden: string): string;
|
|
3
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var DomUtility = /** @class */ (function () {
|
|
4
|
-
function DomUtility() {
|
|
5
|
-
}
|
|
6
|
-
// https://stackoverflow.com/questions/1230445/javascript-regex-how-to-bold-specific-words-with-regex
|
|
7
|
-
DomUtility.boldenText = function (inputText, matchindTextToBolden) {
|
|
8
|
-
return inputText.replace(new RegExp('(^|)(' + matchindTextToBolden + ')(|$)', 'ig'), '$1<b>$2</b>$3');
|
|
9
|
-
};
|
|
10
|
-
return DomUtility;
|
|
11
|
-
}());
|
|
12
|
-
exports.default = DomUtility;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var DomUtility = /** @class */ (function () {
|
|
4
|
+
function DomUtility() {
|
|
5
|
+
}
|
|
6
|
+
// https://stackoverflow.com/questions/1230445/javascript-regex-how-to-bold-specific-words-with-regex
|
|
7
|
+
DomUtility.boldenText = function (inputText, matchindTextToBolden) {
|
|
8
|
+
return inputText.replace(new RegExp('(^|)(' + matchindTextToBolden + ')(|$)', 'ig'), '$1<b>$2</b>$3');
|
|
9
|
+
};
|
|
10
|
+
return DomUtility;
|
|
11
|
+
}());
|
|
12
|
+
exports.default = DomUtility;
|
|
13
13
|
//# sourceMappingURL=DomUtility.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export default class MakeRequest {
|
|
2
|
-
method: string;
|
|
3
|
-
url: string;
|
|
4
|
-
headers: any;
|
|
5
|
-
constructor(url: string, method?: string, headers?: any);
|
|
6
|
-
private setHeaders;
|
|
7
|
-
send(data?: any): Promise<unknown>;
|
|
8
|
-
}
|
|
1
|
+
export default class MakeRequest {
|
|
2
|
+
method: string;
|
|
3
|
+
url: string;
|
|
4
|
+
headers: any;
|
|
5
|
+
constructor(url: string, method?: string, headers?: any);
|
|
6
|
+
private setHeaders;
|
|
7
|
+
send(data?: any): Promise<unknown>;
|
|
8
|
+
}
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var MakeRequest = /** @class */ (function () {
|
|
4
|
-
function MakeRequest(url, method, headers) {
|
|
5
|
-
if (method === void 0) { method = 'get'; }
|
|
6
|
-
if (headers === void 0) { headers = {}; }
|
|
7
|
-
this.method = method;
|
|
8
|
-
this.url = url;
|
|
9
|
-
this.headers = headers;
|
|
10
|
-
}
|
|
11
|
-
MakeRequest.prototype.setHeaders = function (httpRequest) {
|
|
12
|
-
for (var header in this.headers) {
|
|
13
|
-
httpRequest.setRequestHeader(header, this.headers[header]);
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
MakeRequest.prototype.send = function (data) {
|
|
17
|
-
var _this = this;
|
|
18
|
-
if (data === void 0) { data = null; }
|
|
19
|
-
return new Promise(function (resolve, reject) {
|
|
20
|
-
var xmlHttpRequest = new XMLHttpRequest();
|
|
21
|
-
xmlHttpRequest.open(_this.method, _this.url);
|
|
22
|
-
_this.setHeaders(xmlHttpRequest);
|
|
23
|
-
xmlHttpRequest.onload = function () {
|
|
24
|
-
if (xmlHttpRequest.status >= 200 &&
|
|
25
|
-
xmlHttpRequest.status < 300) {
|
|
26
|
-
resolve(xmlHttpRequest.response);
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
reject({
|
|
30
|
-
status: xmlHttpRequest.status,
|
|
31
|
-
statusText: xmlHttpRequest.statusText,
|
|
32
|
-
body: xmlHttpRequest.response,
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
xmlHttpRequest.onerror = function () {
|
|
37
|
-
reject({
|
|
38
|
-
status: xmlHttpRequest.status,
|
|
39
|
-
statusText: xmlHttpRequest.statusText,
|
|
40
|
-
body: xmlHttpRequest.response,
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
xmlHttpRequest.send(data);
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
return MakeRequest;
|
|
47
|
-
}());
|
|
48
|
-
exports.default = MakeRequest;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var MakeRequest = /** @class */ (function () {
|
|
4
|
+
function MakeRequest(url, method, headers) {
|
|
5
|
+
if (method === void 0) { method = 'get'; }
|
|
6
|
+
if (headers === void 0) { headers = {}; }
|
|
7
|
+
this.method = method;
|
|
8
|
+
this.url = url;
|
|
9
|
+
this.headers = headers;
|
|
10
|
+
}
|
|
11
|
+
MakeRequest.prototype.setHeaders = function (httpRequest) {
|
|
12
|
+
for (var header in this.headers) {
|
|
13
|
+
httpRequest.setRequestHeader(header, this.headers[header]);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
MakeRequest.prototype.send = function (data) {
|
|
17
|
+
var _this = this;
|
|
18
|
+
if (data === void 0) { data = null; }
|
|
19
|
+
return new Promise(function (resolve, reject) {
|
|
20
|
+
var xmlHttpRequest = new XMLHttpRequest();
|
|
21
|
+
xmlHttpRequest.open(_this.method, _this.url);
|
|
22
|
+
_this.setHeaders(xmlHttpRequest);
|
|
23
|
+
xmlHttpRequest.onload = function () {
|
|
24
|
+
if (xmlHttpRequest.status >= 200 &&
|
|
25
|
+
xmlHttpRequest.status < 300) {
|
|
26
|
+
resolve(xmlHttpRequest.response);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
reject({
|
|
30
|
+
status: xmlHttpRequest.status,
|
|
31
|
+
statusText: xmlHttpRequest.statusText,
|
|
32
|
+
body: xmlHttpRequest.response,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
xmlHttpRequest.onerror = function () {
|
|
37
|
+
reject({
|
|
38
|
+
status: xmlHttpRequest.status,
|
|
39
|
+
statusText: xmlHttpRequest.statusText,
|
|
40
|
+
body: xmlHttpRequest.response,
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
xmlHttpRequest.send(data);
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
return MakeRequest;
|
|
47
|
+
}());
|
|
48
|
+
exports.default = MakeRequest;
|
|
49
49
|
//# sourceMappingURL=MakeRequest.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare class StringUtil {
|
|
2
|
-
constructor();
|
|
3
|
-
static StringFormat(str: string, ...args: string[]): string;
|
|
4
|
-
}
|
|
1
|
+
export declare class StringUtil {
|
|
2
|
+
constructor();
|
|
3
|
+
static StringFormat(str: string, ...args: string[]): string;
|
|
4
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StringUtil = void 0;
|
|
4
|
-
var StringUtil = /** @class */ (function () {
|
|
5
|
-
function StringUtil() {
|
|
6
|
-
}
|
|
7
|
-
StringUtil.StringFormat = function (str) {
|
|
8
|
-
var args = [];
|
|
9
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
10
|
-
args[_i - 1] = arguments[_i];
|
|
11
|
-
}
|
|
12
|
-
return str.replace(/{(\d+)}/g, function (match, index) { return args[index] || ''; });
|
|
13
|
-
};
|
|
14
|
-
return StringUtil;
|
|
15
|
-
}());
|
|
16
|
-
exports.StringUtil = StringUtil;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StringUtil = void 0;
|
|
4
|
+
var StringUtil = /** @class */ (function () {
|
|
5
|
+
function StringUtil() {
|
|
6
|
+
}
|
|
7
|
+
StringUtil.StringFormat = function (str) {
|
|
8
|
+
var args = [];
|
|
9
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
10
|
+
args[_i - 1] = arguments[_i];
|
|
11
|
+
}
|
|
12
|
+
return str.replace(/{(\d+)}/g, function (match, index) { return args[index] || ''; });
|
|
13
|
+
};
|
|
14
|
+
return StringUtil;
|
|
15
|
+
}());
|
|
16
|
+
exports.StringUtil = StringUtil;
|
|
17
17
|
//# sourceMappingURL=StringUtil.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare class ViewportUtil {
|
|
2
|
-
private element?;
|
|
3
|
-
constructor(element?: HTMLElement);
|
|
4
|
-
IsVisible(): boolean;
|
|
5
|
-
IsPartiallyVisible(): boolean;
|
|
6
|
-
IsOffsetVisible(offset?: number): boolean;
|
|
7
|
-
WindowTop(offset?: number): boolean;
|
|
8
|
-
}
|
|
1
|
+
export declare class ViewportUtil {
|
|
2
|
+
private element?;
|
|
3
|
+
constructor(element?: HTMLElement);
|
|
4
|
+
IsVisible(): boolean;
|
|
5
|
+
IsPartiallyVisible(): boolean;
|
|
6
|
+
IsOffsetVisible(offset?: number): boolean;
|
|
7
|
+
WindowTop(offset?: number): boolean;
|
|
8
|
+
}
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ViewportUtil = void 0;
|
|
4
|
-
var ViewportUtil = /** @class */ (function () {
|
|
5
|
-
function ViewportUtil(element) {
|
|
6
|
-
if (element === void 0) { element = null; }
|
|
7
|
-
this.element = element;
|
|
8
|
-
}
|
|
9
|
-
ViewportUtil.prototype.IsVisible = function () {
|
|
10
|
-
var bounds = this.element.getBoundingClientRect();
|
|
11
|
-
return (((bounds.top > 0 && bounds.top < innerHeight) ||
|
|
12
|
-
(bounds.bottom > 0 && bounds.bottom < innerHeight)) &&
|
|
13
|
-
((bounds.left > 0 && bounds.left < innerWidth) ||
|
|
14
|
-
(bounds.right > 0 && bounds.right < innerWidth)));
|
|
15
|
-
};
|
|
16
|
-
ViewportUtil.prototype.IsPartiallyVisible = function () {
|
|
17
|
-
var bounds = this.element.getBoundingClientRect();
|
|
18
|
-
return (bounds.top >= 0 ||
|
|
19
|
-
bounds.left >= 0 ||
|
|
20
|
-
bounds.bottom <= innerHeight ||
|
|
21
|
-
bounds.right <= innerWidth);
|
|
22
|
-
};
|
|
23
|
-
ViewportUtil.prototype.IsOffsetVisible = function (offset) {
|
|
24
|
-
if (offset === void 0) { offset = 300; }
|
|
25
|
-
var bounds = this.element.getBoundingClientRect();
|
|
26
|
-
// tslint:disable-next-line: max-line-length
|
|
27
|
-
return (bounds.top + offset >= 0 ||
|
|
28
|
-
bounds.left + offset >= 0 ||
|
|
29
|
-
bounds.bottom - offset <= innerHeight ||
|
|
30
|
-
bounds.right - offset <= innerWidth);
|
|
31
|
-
};
|
|
32
|
-
ViewportUtil.prototype.WindowTop = function (offset) {
|
|
33
|
-
if (offset === void 0) { offset = 0; }
|
|
34
|
-
var YOffset = window.pageYOffset ||
|
|
35
|
-
document.documentElement.scrollTop ||
|
|
36
|
-
document.body.scrollTop ||
|
|
37
|
-
0;
|
|
38
|
-
return offset <= YOffset;
|
|
39
|
-
};
|
|
40
|
-
return ViewportUtil;
|
|
41
|
-
}());
|
|
42
|
-
exports.ViewportUtil = ViewportUtil;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ViewportUtil = void 0;
|
|
4
|
+
var ViewportUtil = /** @class */ (function () {
|
|
5
|
+
function ViewportUtil(element) {
|
|
6
|
+
if (element === void 0) { element = null; }
|
|
7
|
+
this.element = element;
|
|
8
|
+
}
|
|
9
|
+
ViewportUtil.prototype.IsVisible = function () {
|
|
10
|
+
var bounds = this.element.getBoundingClientRect();
|
|
11
|
+
return (((bounds.top > 0 && bounds.top < innerHeight) ||
|
|
12
|
+
(bounds.bottom > 0 && bounds.bottom < innerHeight)) &&
|
|
13
|
+
((bounds.left > 0 && bounds.left < innerWidth) ||
|
|
14
|
+
(bounds.right > 0 && bounds.right < innerWidth)));
|
|
15
|
+
};
|
|
16
|
+
ViewportUtil.prototype.IsPartiallyVisible = function () {
|
|
17
|
+
var bounds = this.element.getBoundingClientRect();
|
|
18
|
+
return (bounds.top >= 0 ||
|
|
19
|
+
bounds.left >= 0 ||
|
|
20
|
+
bounds.bottom <= innerHeight ||
|
|
21
|
+
bounds.right <= innerWidth);
|
|
22
|
+
};
|
|
23
|
+
ViewportUtil.prototype.IsOffsetVisible = function (offset) {
|
|
24
|
+
if (offset === void 0) { offset = 300; }
|
|
25
|
+
var bounds = this.element.getBoundingClientRect();
|
|
26
|
+
// tslint:disable-next-line: max-line-length
|
|
27
|
+
return (bounds.top + offset >= 0 ||
|
|
28
|
+
bounds.left + offset >= 0 ||
|
|
29
|
+
bounds.bottom - offset <= innerHeight ||
|
|
30
|
+
bounds.right - offset <= innerWidth);
|
|
31
|
+
};
|
|
32
|
+
ViewportUtil.prototype.WindowTop = function (offset) {
|
|
33
|
+
if (offset === void 0) { offset = 0; }
|
|
34
|
+
var YOffset = window.pageYOffset ||
|
|
35
|
+
document.documentElement.scrollTop ||
|
|
36
|
+
document.body.scrollTop ||
|
|
37
|
+
0;
|
|
38
|
+
return offset <= YOffset;
|
|
39
|
+
};
|
|
40
|
+
return ViewportUtil;
|
|
41
|
+
}());
|
|
42
|
+
exports.ViewportUtil = ViewportUtil;
|
|
43
43
|
//# sourceMappingURL=ViewportUtil.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
declare type Procedure = (...args: any[]) => any;
|
|
2
|
-
interface Debounce {
|
|
3
|
-
(...args: any[]): any;
|
|
4
|
-
clear: () => void;
|
|
5
|
-
flush: () => void;
|
|
6
|
-
}
|
|
7
|
-
declare const debouncer: (func: Procedure, wait: number, immediate?: boolean) => Debounce;
|
|
8
|
-
export default debouncer;
|
|
1
|
+
declare type Procedure = (...args: any[]) => any;
|
|
2
|
+
interface Debounce {
|
|
3
|
+
(...args: any[]): any;
|
|
4
|
+
clear: () => void;
|
|
5
|
+
flush: () => void;
|
|
6
|
+
}
|
|
7
|
+
declare const debouncer: (func: Procedure, wait: number, immediate?: boolean) => Debounce;
|
|
8
|
+
export default debouncer;
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var debouncer = function (func, wait, immediate) {
|
|
4
|
-
if (immediate === void 0) { immediate = false; }
|
|
5
|
-
var timeout;
|
|
6
|
-
var args;
|
|
7
|
-
var context;
|
|
8
|
-
var result;
|
|
9
|
-
var later = function () {
|
|
10
|
-
timeout = null;
|
|
11
|
-
if (!immediate) {
|
|
12
|
-
result = func.apply(context, args);
|
|
13
|
-
context = args = null;
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
var debouncedFunc = function () {
|
|
17
|
-
context = this;
|
|
18
|
-
args = arguments;
|
|
19
|
-
var callNow = immediate && !timeout;
|
|
20
|
-
if (!timeout) {
|
|
21
|
-
timeout = window.setTimeout(later, wait);
|
|
22
|
-
}
|
|
23
|
-
if (callNow) {
|
|
24
|
-
result = func.apply(context, args);
|
|
25
|
-
context = args = null;
|
|
26
|
-
}
|
|
27
|
-
return result;
|
|
28
|
-
};
|
|
29
|
-
var clear = function () {
|
|
30
|
-
if (timeout) {
|
|
31
|
-
clearTimeout(timeout);
|
|
32
|
-
timeout = null;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
var flush = function () {
|
|
36
|
-
if (timeout) {
|
|
37
|
-
result = func.apply(context, args);
|
|
38
|
-
context = args = null;
|
|
39
|
-
clearTimeout(timeout);
|
|
40
|
-
timeout = null;
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
var debounced = (function () {
|
|
44
|
-
var f = debouncedFunc;
|
|
45
|
-
f.clear = clear;
|
|
46
|
-
f.flush = flush;
|
|
47
|
-
return f;
|
|
48
|
-
})();
|
|
49
|
-
return debounced;
|
|
50
|
-
};
|
|
51
|
-
exports.default = debouncer;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var debouncer = function (func, wait, immediate) {
|
|
4
|
+
if (immediate === void 0) { immediate = false; }
|
|
5
|
+
var timeout;
|
|
6
|
+
var args;
|
|
7
|
+
var context;
|
|
8
|
+
var result;
|
|
9
|
+
var later = function () {
|
|
10
|
+
timeout = null;
|
|
11
|
+
if (!immediate) {
|
|
12
|
+
result = func.apply(context, args);
|
|
13
|
+
context = args = null;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
var debouncedFunc = function () {
|
|
17
|
+
context = this;
|
|
18
|
+
args = arguments;
|
|
19
|
+
var callNow = immediate && !timeout;
|
|
20
|
+
if (!timeout) {
|
|
21
|
+
timeout = window.setTimeout(later, wait);
|
|
22
|
+
}
|
|
23
|
+
if (callNow) {
|
|
24
|
+
result = func.apply(context, args);
|
|
25
|
+
context = args = null;
|
|
26
|
+
}
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
29
|
+
var clear = function () {
|
|
30
|
+
if (timeout) {
|
|
31
|
+
clearTimeout(timeout);
|
|
32
|
+
timeout = null;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
var flush = function () {
|
|
36
|
+
if (timeout) {
|
|
37
|
+
result = func.apply(context, args);
|
|
38
|
+
context = args = null;
|
|
39
|
+
clearTimeout(timeout);
|
|
40
|
+
timeout = null;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
var debounced = (function () {
|
|
44
|
+
var f = debouncedFunc;
|
|
45
|
+
f.clear = clear;
|
|
46
|
+
f.flush = flush;
|
|
47
|
+
return f;
|
|
48
|
+
})();
|
|
49
|
+
return debounced;
|
|
50
|
+
};
|
|
51
|
+
exports.default = debouncer;
|
|
52
52
|
//# sourceMappingURL=debouncer.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export default interface IValidator {
|
|
2
|
-
isSatisfiedBy(input: string, allowEmpty: boolean): boolean;
|
|
3
|
-
}
|
|
1
|
+
export default interface IValidator {
|
|
2
|
+
isSatisfiedBy(input: string, allowEmpty: boolean): boolean;
|
|
3
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=IValidator.interface.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import IValidation from '../IValidator.interface';
|
|
2
|
-
export default class BankAccountValidator implements IValidation {
|
|
3
|
-
isSatisfiedBy(input: string, allowEmpty?: boolean): boolean;
|
|
4
|
-
}
|
|
1
|
+
import IValidation from '../IValidator.interface';
|
|
2
|
+
export default class BankAccountValidator implements IValidation {
|
|
3
|
+
isSatisfiedBy(input: string, allowEmpty?: boolean): boolean;
|
|
4
|
+
}
|