@luftborn/custom-elements 2.15.6 → 2.15.8
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 +41 -36
- package/demo/index.min.js +40 -35
- package/demo/index.min.js.map +1 -1
- package/dist/elements/CPRElement/CPRElement.js +2 -2
- package/dist/elements/CPRElement/CPRElement.js.map +1 -1
- package/dist/elements/CVRElement/CVRElement.js +2 -2
- package/dist/elements/CVRElement/CVRElement.js.map +1 -1
- package/dist/elements/CheckBoxElement/CheckBoxElement.js +2 -1
- package/dist/elements/CheckBoxElement/CheckBoxElement.js.map +1 -1
- package/dist/elements/CustomFormatDateFieldElement/CustomFormatDateFieldElement.js +2 -2
- package/dist/elements/CustomFormatDateFieldElement/CustomFormatDateFieldElement.js.map +1 -1
- package/dist/elements/CustomRegularExpression/CustomRegularExpressionElement.js +2 -2
- package/dist/elements/CustomRegularExpression/CustomRegularExpressionElement.js.map +1 -1
- package/dist/elements/DateField/DateFieldElement.js +2 -2
- package/dist/elements/DateField/DateFieldElement.js.map +1 -1
- package/dist/elements/EmailField/EmailFieldElement.js +2 -2
- package/dist/elements/EmailField/EmailFieldElement.js.map +1 -1
- package/dist/elements/FileField/FileFieldElement.js +2 -2
- package/dist/elements/FileField/FileFieldElement.js.map +1 -1
- package/dist/elements/IdentificationElement/IdentificationElement.js +2 -2
- package/dist/elements/IdentificationElement/IdentificationElement.js.map +1 -1
- package/dist/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.js +2 -2
- package/dist/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.js.map +1 -1
- package/dist/elements/NumericField/NumericFieldElement.js +2 -2
- package/dist/elements/NumericField/NumericFieldElement.js.map +1 -1
- package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.js +2 -1
- package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.js.map +1 -1
- package/dist/elements/SECompanyRegistrationElement/SECompanyRegistrationElement.js +2 -2
- package/dist/elements/SECompanyRegistrationElement/SECompanyRegistrationElement.js.map +1 -1
- package/dist/elements/SEPersonalNumberElement/SEPersonalNumberElement.js +2 -2
- package/dist/elements/SEPersonalNumberElement/SEPersonalNumberElement.js.map +1 -1
- package/dist/elements/TextAreaElement/TextAreaElement.js +2 -2
- package/dist/elements/TextAreaElement/TextAreaElement.js.map +1 -1
- package/dist/elements/TextField/TextFieldElement.js +2 -2
- package/dist/elements/TextField/TextFieldElement.js.map +1 -1
- package/dist/elements/TypeAhead/TypeAheadElement.js +1 -1
- package/dist/framework/CustomInputElement.js +7 -4
- package/dist/framework/CustomInputElement.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/CPRElement/CPRElement.ts +2 -2
- package/src/elements/CVRElement/CVRElement.ts +2 -2
- package/src/elements/CheckBoxElement/CheckBoxElement.ts +2 -1
- package/src/elements/CustomFormatDateFieldElement/CustomFormatDateFieldElement.ts +2 -2
- package/src/elements/CustomRegularExpression/CustomRegularExpressionElement.ts +2 -2
- package/src/elements/DateField/DateFieldElement.ts +2 -2
- package/src/elements/EmailField/EmailFieldElement.ts +2 -2
- package/src/elements/FileField/FileFieldElement.ts +2 -2
- package/src/elements/IdentificationElement/IdentificationElement.ts +2 -2
- package/src/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.ts +2 -2
- package/src/elements/NumericField/NumericFieldElement.ts +2 -2
- package/src/elements/RadioButtonGroup/RadioButtonGroupElement.ts +10 -8
- package/src/elements/SECompanyRegistrationElement/SECompanyRegistrationElement.ts +2 -2
- package/src/elements/SEPersonalNumberElement/SEPersonalNumberElement.ts +2 -2
- package/src/elements/TextAreaElement/TextAreaElement.ts +2 -2
- package/src/elements/TextField/TextFieldElement.ts +2 -2
- package/src/elements/TypeAhead/TypeAheadElement.ts +1 -1
- package/src/framework/CustomInputElement.ts +7 -4
package/demo/index.min.js
CHANGED
|
@@ -3857,7 +3857,7 @@ var CPRElement = /** @class */ (function (_super) {
|
|
|
3857
3857
|
_super.prototype.addLabel.call(this, this.text);
|
|
3858
3858
|
};
|
|
3859
3859
|
CPRElement.prototype.initChildInputs = function () {
|
|
3860
|
-
this.text = _super.prototype.getChildInput.call(this, '
|
|
3860
|
+
this.text = _super.prototype.getChildInput.call(this, '.cpr-field');
|
|
3861
3861
|
this.text.addEventListener('change', this.change.bind(this));
|
|
3862
3862
|
if (this.required) {
|
|
3863
3863
|
this.text.setAttribute('required', '');
|
|
@@ -3881,7 +3881,7 @@ var CPRElement = /** @class */ (function (_super) {
|
|
|
3881
3881
|
CPRElement = __decorate([
|
|
3882
3882
|
(0, custom_element_decorator_1.default)({
|
|
3883
3883
|
selector: 'cpr-element',
|
|
3884
|
-
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" id='cpr-field' placeholder='DDMMYY-SSSS'/>\n\t\t\t</div>\n\t\t</div>",
|
|
3884
|
+
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" class='cpr-field' id='cpr-field' placeholder='DDMMYY-SSSS'/>\n\t\t\t</div>\n\t\t</div>",
|
|
3885
3885
|
style: "\n \t:host{\n width:100%;\n \t}\n \t.wrapper{\n display:flex;\n \t}\n \tinput{\n box-sizing: border-box;\n width: 100% !important;\n border: .1rem solid #5A616D;\n border-radius: .25rem;\n padding: 0.125rem 0.25rem;\n margin: 0.0625rem 0;\n resize: none;\n \t}\n\t\tinput::placeholder {\n\t\t\tcolor: rgb(117, 117, 117);\n\t\t}\n\t\t.field-label {\n\t\t\tcolor: #27282d;\n\t\t\tfont-size: .75rem;\n\t\t\tfont-weight: 600;\n\t\t\tword-wrap: break-word;\n\t\t}\n\t\t.field-input {\n\t\t\tfont-size: 0.813rem;\n\t\t\tmin-height: 1.438rem;\n\t\t}\n\t",
|
|
3886
3886
|
useShadow: true,
|
|
3887
3887
|
})
|
|
@@ -3948,7 +3948,7 @@ var CVRElement = /** @class */ (function (_super) {
|
|
|
3948
3948
|
_super.prototype.addLabel.call(this, this.text);
|
|
3949
3949
|
};
|
|
3950
3950
|
CVRElement.prototype.initChildInputs = function () {
|
|
3951
|
-
this.text = _super.prototype.getChildInput.call(this, '
|
|
3951
|
+
this.text = _super.prototype.getChildInput.call(this, '.cvr-field');
|
|
3952
3952
|
this.text.addEventListener('change', this.change.bind(this));
|
|
3953
3953
|
if (this.required) {
|
|
3954
3954
|
this.text.setAttribute('required', '');
|
|
@@ -3972,7 +3972,7 @@ var CVRElement = /** @class */ (function (_super) {
|
|
|
3972
3972
|
CVRElement = __decorate([
|
|
3973
3973
|
(0, custom_element_decorator_1.default)({
|
|
3974
3974
|
selector: 'cvr-element',
|
|
3975
|
-
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" id='cvr-field' placeholder='SSSSSSSS'/>\n\t\t\t</div>\n\t\t</div>",
|
|
3975
|
+
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" class='cvr-field' id='cvr-field' placeholder='SSSSSSSS'/>\n\t\t\t</div>\n\t\t</div>",
|
|
3976
3976
|
style: "\n\t :host{\n width:100%;\n \t}\n \t.wrapper{\n display:flex;\n \t}\n \tinput{\n box-sizing: border-box;\n width: 100% !important;\n border: .1rem solid #5A616D;\n border-radius: .25rem;\n padding: 0.125rem 0.25rem;\n margin: 0.0625rem 0;\n resize: none;\n \t}\n\t\tinput::placeholder {\n\t\t\tcolor: rgb(117, 117, 117);\n\t\t}\t\n\t\t.field-label {\n\t\t\tcolor: #27282d;\n\t\t\tfont-size: .75rem;\n\t\t\tfont-weight: 600;\n\t\t\tword-wrap: break-word;\n\t\t}\n\t\t.field-input {\n\t\t\tfont-size: 0.813rem;\n\t\t\tmin-height: 1.438rem;\n\t\t}\n\t",
|
|
3977
3977
|
useShadow: true,
|
|
3978
3978
|
})
|
|
@@ -4059,7 +4059,8 @@ var CheckBoxElement = /** @class */ (function (_super) {
|
|
|
4059
4059
|
fieldset = document.createElement('fieldset');
|
|
4060
4060
|
wrapper.appendChild(fieldset);
|
|
4061
4061
|
}
|
|
4062
|
-
|
|
4062
|
+
var optionsAlreadyAdded = fieldset.querySelectorAll('input[type="checkbox"]').length;
|
|
4063
|
+
if (!optionsAlreadyAdded) {
|
|
4063
4064
|
this.options.forEach(function (element, index) {
|
|
4064
4065
|
fieldset.insertAdjacentHTML('beforeend', StringUtil_1.StringUtil.StringFormat(_this.checkboxTemplate, _this.name, element, _this.name + "-" + index));
|
|
4065
4066
|
});
|
|
@@ -4991,7 +4992,7 @@ var CustomFormatDateFieldElement = /** @class */ (function (_super) {
|
|
|
4991
4992
|
};
|
|
4992
4993
|
CustomFormatDateFieldElement.prototype.initChildInputs = function () {
|
|
4993
4994
|
var _a;
|
|
4994
|
-
this.date = _super.prototype.getChildInput.call(this, '
|
|
4995
|
+
this.date = _super.prototype.getChildInput.call(this, '.date-field');
|
|
4995
4996
|
if (!this.date) {
|
|
4996
4997
|
return;
|
|
4997
4998
|
}
|
|
@@ -5053,7 +5054,7 @@ var CustomFormatDateFieldElement = /** @class */ (function (_super) {
|
|
|
5053
5054
|
CustomFormatDateFieldElement = __decorate([
|
|
5054
5055
|
(0, custom_element_decorator_1.default)({
|
|
5055
5056
|
selector: 'custom-format-date-element',
|
|
5056
|
-
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" id=\"date-field\"
|
|
5057
|
+
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" id=\"date-field\" class=\"date-field\" />\n\t\t\t\t<button id=\"picker-trigger\" aria-label=\"Open date picker\">\n\t\t\t\t\t<svg class=\"svg-picker\" data-toggle viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"2\" y=\"4\" width=\"20\" height=\"18\" rx=\"1\" fill=\"#000\"/><rect x=\"4\" y=\"8\" width=\"16\" height=\"12\" fill=\"white\"/><path d=\"M4 10H20\" stroke=\"#000\" stroke-width=\"1\"/><circle cx=\"16\" cy=\"14\" r=\"2\" fill=\"#F44336\"/><rect x=\"6\" y=\"2\" width=\"3\" height=\"4\" rx=\".5\" fill=\"#000\"/><rect x=\"15\" y=\"2\" width=\"3\" height=\"4\" rx=\".5\" fill=\"#000\"/></svg>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</div>",
|
|
5057
5058
|
style: "\n\t\t:host{\n\t\t\twidth:100%;\n\t\t}\n\t\t* {\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.wrapper{\n\t\t\tdisplay:flex;\n\t\t\tposition: relative;\n\t\t}\n\t\tinput{\n\t\t\tbox-sizing: border-box;\n\t\t\twidth: 100% !important;\n\t\t\tborder: .1rem solid #5A616D;\n\t\t\tborder-radius: .25rem;\n\t\t\tpadding: 0.125rem 0.25rem;\n\t\t\tmargin: 0.0625rem 0;\n\t\t\tresize: none;\n\t\t}\n\t\tinput::placeholder {\n\t\t\tcolor: rgb(117, 117, 117);\n\t\t}\n\t\t#date-field::after {\n\t\t\tcontent: url('path/to/datepicker-icon.png'); /* Path to your datepicker icon */\n\t\t\tcursor: pointer;\n\t\t\tright: 0.625rem;\n\t\t}\n\t\t.svg-picker {\n\t\t\twidth: 0.938rem;\n\t\t\theight: 0.938rem;\n\t\t}\n\t\t#picker-trigger {\n\t\t\tcursor: pointer;\n\t\t\tbackground-color: transparent;\n\t\t\tborder: none;\n\t\t\twidth: 1.5rem;\n\t\t\theight: 1.5rem;\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: flex-end;\n\t\t\tposition:absolute;\n\t\t\tright: 0.125rem;\n\t\t\ttop: 15%;\n\t\t\tpadding: 0;\n\t\t}\n\t\t.field-label {\n\t\t\tcolor: #27282d;\n\t\t\tfont-size: .75rem;\n\t\t\tfont-weight: 600;\n\t\t\tword-wrap: break-word;\n\t\t}\n\t\t.field-input {\n\t\t\tfont-size: 0.813rem;\n\t\t\tmin-height: 1.438rem;\n\t\t}\n\t",
|
|
5058
5059
|
useShadow: true,
|
|
5059
5060
|
})
|
|
@@ -5123,7 +5124,7 @@ var CustomRegularExpressionElement = /** @class */ (function (_super) {
|
|
|
5123
5124
|
_super.prototype.addLabel.call(this, this.text);
|
|
5124
5125
|
};
|
|
5125
5126
|
CustomRegularExpressionElement.prototype.initChildInputs = function () {
|
|
5126
|
-
this.text = _super.prototype.getChildInput.call(this, '
|
|
5127
|
+
this.text = _super.prototype.getChildInput.call(this, '.regex-field');
|
|
5127
5128
|
this.text.addEventListener('change', this.change.bind(this));
|
|
5128
5129
|
if (this.required) {
|
|
5129
5130
|
this.text.setAttribute('required', '');
|
|
@@ -5150,7 +5151,7 @@ var CustomRegularExpressionElement = /** @class */ (function (_super) {
|
|
|
5150
5151
|
CustomRegularExpressionElement = __decorate([
|
|
5151
5152
|
(0, custom_element_decorator_1.default)({
|
|
5152
5153
|
selector: 'regex-element',
|
|
5153
|
-
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" id='regex-field'/>\n\t\t\t</div>\n\t\t</div>",
|
|
5154
|
+
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" id='regex-field' class='regex-field' />\n\t\t\t</div>\n\t\t</div>",
|
|
5154
5155
|
style: "\n \t:host{\n width:100%;\n \t}\n \t.wrapper{\n display:flex;\n \t}\n \tinput{\n box-sizing: border-box;\n width: 100% !important;\n border: .1rem solid #5A616D;\n border-radius: .25rem;\n padding: 0.125rem 0.25rem;\n margin: 0.0625rem 0;\n resize: none;\n \t}\n\t\tinput::placeholder {\n\t\t\tcolor: rgb(117, 117, 117);\n\t\t}\n\t\t.field-label {\n\t\t\tcolor: #27282d;\n\t\t\tfont-size: .75rem;\n\t\t\tfont-weight: 600;\n\t\t\tword-wrap: break-word;\n\t\t}\n\t\t.field-input {\n\t\t\tfont-size: 0.813rem;\n\t\t\tmin-height: 1.438rem;\n\t\t}\n\t",
|
|
5155
5156
|
useShadow: true,
|
|
5156
5157
|
})
|
|
@@ -5214,7 +5215,7 @@ var DateFieldElement = /** @class */ (function (_super) {
|
|
|
5214
5215
|
_super.prototype.addLabel.call(this, this.date);
|
|
5215
5216
|
};
|
|
5216
5217
|
DateFieldElement.prototype.initChildInputs = function () {
|
|
5217
|
-
this.date = _super.prototype.getChildInput.call(this, '
|
|
5218
|
+
this.date = _super.prototype.getChildInput.call(this, '.date-field');
|
|
5218
5219
|
this.date.addEventListener('change', this.change.bind(this));
|
|
5219
5220
|
if (this.required) {
|
|
5220
5221
|
this.date.setAttribute('required', '');
|
|
@@ -5244,7 +5245,7 @@ var DateFieldElement = /** @class */ (function (_super) {
|
|
|
5244
5245
|
DateFieldElement = __decorate([
|
|
5245
5246
|
(0, custom_element_decorator_1.default)({
|
|
5246
5247
|
selector: 'date-element',
|
|
5247
|
-
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"date\" id='date-field'/>\n\t\t\t</div>\n\t\t</div>",
|
|
5248
|
+
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"date\" class='date-field' id='date-field'/>\n\t\t\t</div>\n\t\t</div>",
|
|
5248
5249
|
style: "\n \t:host{\n width:100%;\n \t}\n \t.wrapper{\n display:flex;\n \t}\n \tinput{\n box-sizing: border-box;\n width: 100% !important;\n border: .1rem solid #5A616D;\n border-radius: .25rem;\n padding: 0.125rem 0.25rem;\n margin: 0.0625rem 0;\n resize: none;\n \t}\n\t\tinput::placeholder {\n\t\t\tcolor: rgb(117, 117, 117);\n\t\t}\n\t\t.field-label {\n\t\t\tcolor: #27282d;\n\t\t\tfont-size: .75rem;\n\t\t\tfont-weight: 600;\n\t\t\tword-wrap: break-word;\n\t\t}\n\t\t.field-input {\n\t\t\tfont-size: 0.813rem;\n\t\t\tmin-height: 1.438rem;\n\t\t}\n\t",
|
|
5249
5250
|
useShadow: true,
|
|
5250
5251
|
})
|
|
@@ -5470,7 +5471,7 @@ var EmailFieldElement = /** @class */ (function (_super) {
|
|
|
5470
5471
|
_super.prototype.addLabel.call(this, this.email);
|
|
5471
5472
|
};
|
|
5472
5473
|
EmailFieldElement.prototype.initChildInputs = function () {
|
|
5473
|
-
this.email = _super.prototype.getChildInput.call(this, '
|
|
5474
|
+
this.email = _super.prototype.getChildInput.call(this, '.email-field');
|
|
5474
5475
|
this.email.addEventListener('change', this.change.bind(this));
|
|
5475
5476
|
if (this.required) {
|
|
5476
5477
|
this.email.setAttribute('required', '');
|
|
@@ -5497,7 +5498,7 @@ var EmailFieldElement = /** @class */ (function (_super) {
|
|
|
5497
5498
|
EmailFieldElement = __decorate([
|
|
5498
5499
|
(0, custom_element_decorator_1.default)({
|
|
5499
5500
|
selector: 'email-element',
|
|
5500
|
-
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" id='email-field'/>\n\t\t\t</div>\n\t\t</div>",
|
|
5501
|
+
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" class='email-field' id='email-field'/>\n\t\t\t</div>\n\t\t</div>",
|
|
5501
5502
|
style: "\n \t:host{\n width:100%;\n \t}\n \t.wrapper{\n display:flex;\n \t}\n \tinput{\n box-sizing: border-box;\n width: 100% !important;\n border: .1rem solid #5A616D;\n border-radius: .25rem;\n padding: 0.125rem 0.25rem;\n margin: 0.0625rem 0;\n resize: none;\n \t}\n\t\tinput::placeholder {\n\t\t\tcolor: rgb(117, 117, 117);\n\t\t}\n\t\t.field-label {\n\t\t\tcolor: #27282d;\n\t\t\tfont-size: .75rem;\n\t\t\tfont-weight: 600;\n\t\t\tword-wrap: break-word;\n\t\t}\n\t\t.field-input {\n\t\t\tfont-size: 0.813rem;\n\t\t\tmin-height: 1.438rem;\n\t\t}\n\t",
|
|
5502
5503
|
useShadow: true,
|
|
5503
5504
|
})
|
|
@@ -5609,7 +5610,7 @@ var FileFieldElement = /** @class */ (function (_super) {
|
|
|
5609
5610
|
});
|
|
5610
5611
|
};
|
|
5611
5612
|
FileFieldElement.prototype.initChildInputs = function () {
|
|
5612
|
-
this.file = _super.prototype.getChildInput.call(this, '
|
|
5613
|
+
this.file = _super.prototype.getChildInput.call(this, '.file-field');
|
|
5613
5614
|
this.file.addEventListener('change', this.change.bind(this));
|
|
5614
5615
|
this.file.addEventListener('input', this.processImageFiles.bind(this));
|
|
5615
5616
|
if (this.required) {
|
|
@@ -5830,7 +5831,7 @@ var FileFieldElement = /** @class */ (function (_super) {
|
|
|
5830
5831
|
FileFieldElement = __decorate([
|
|
5831
5832
|
(0, custom_element_decorator_1.default)({
|
|
5832
5833
|
selector: 'file-element',
|
|
5833
|
-
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"file\" id='file-field' accept=\"image/*,application/pdf\"/>\n\t\t\t</div>\n\t\t</div>",
|
|
5834
|
+
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"file\" class='file-field' id='file-field' accept=\"image/*,application/pdf\"/>\n\t\t\t</div>\n\t\t</div>",
|
|
5834
5835
|
style: "\n \t:host{\n width:100%;\n \t}\n \t.wrapper{\n display:flex;\n \t}\n \tinput{\n box-sizing: border-box;\n width: 100% !important;\n margin: 0.0625rem 0;\n resize: none;\n \t}\n input::placeholder {\n\t\t\tcolor: rgb(117, 117, 117);\n\t\t}\n .field-label {\n\t\t\tcolor: #27282d;\n\t\t\tfont-size: .75rem;\n\t\t\tfont-weight: 600;\n\t\t\tword-wrap: break-word;\n\t\t}\n\t\t.field-input {\n\t\t\tfont-size: 0.813rem;\n\t\t\tmin-height: 1.438rem;\n\t\t}\n\t",
|
|
5835
5836
|
useShadow: true,
|
|
5836
5837
|
})
|
|
@@ -5905,7 +5906,7 @@ var IdentificationElement = /** @class */ (function (_super) {
|
|
|
5905
5906
|
_super.prototype.addLabel.call(this, this.text);
|
|
5906
5907
|
};
|
|
5907
5908
|
IdentificationElement.prototype.initChildInputs = function () {
|
|
5908
|
-
this.text = _super.prototype.getChildInput.call(this, '
|
|
5909
|
+
this.text = _super.prototype.getChildInput.call(this, '.id-field');
|
|
5909
5910
|
this.typeSelector = _super.prototype.getChildInput.call(this, '#id-type');
|
|
5910
5911
|
this.text.addEventListener('change', this.change.bind(this));
|
|
5911
5912
|
this.typeSelector.addEventListener('change', this.change.bind(this));
|
|
@@ -5930,7 +5931,7 @@ var IdentificationElement = /** @class */ (function (_super) {
|
|
|
5930
5931
|
IdentificationElement = __decorate([
|
|
5931
5932
|
(0, custom_element_decorator_1.default)({
|
|
5932
5933
|
selector: 'id-element',
|
|
5933
|
-
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n\t\t\t<div class=\"wrapper\">\n <select id='id-type'>\n <option value='cvr'>Danish CVR</option>\n <option value='cpr'>Danish CPR</option>\n <option value='swe'>Sweden Bank Id</option>\n <option value='nor'>Norway Bank Id</option>\n </select>\n\t\t\t\t<input type=\"text\" id='id-field' placeholder=''/>\n\t\t\t</div>\n\t\t</div>",
|
|
5934
|
+
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n\t\t\t<div class=\"wrapper\">\n <select id='id-type'>\n <option value='cvr'>Danish CVR</option>\n <option value='cpr'>Danish CPR</option>\n <option value='swe'>Sweden Bank Id</option>\n <option value='nor'>Norway Bank Id</option>\n </select>\n\t\t\t\t<input type=\"text\" class='id-field' id='id-field' placeholder=''/>\n\t\t\t</div>\n\t\t</div>",
|
|
5934
5935
|
style: "\n \t:host{\n width:100%;\n \t}\n \t.wrapper{\n display:flex;\n \t}\n \tinput, select{\n box-sizing: border-box;\n border: .1rem solid #5A616D;\n border-radius: .25rem;\n margin: 0.125rem;\n resize: none;\n \t}\n \tinput{\n width: 75% !important;\n \t}\n \tselect{\n width: 25% !important;\n \t}\n\t\tinput::placeholder {\n\t\t\tcolor: rgb(117, 117, 117);\n\t\t}\n\t\t.field-label {\n\t\t\tcolor: #27282d;\n\t\t\tfont-size: .75rem;\n\t\t\tfont-weight: 600;\n\t\t\tword-wrap: break-word;\n\t\t}\n\t\t.field-input {\n\t\t\tfont-size: 0.813rem;\n\t\t\tmin-height: 1.438rem;\n\t\t}\n\t",
|
|
5935
5936
|
useShadow: true,
|
|
5936
5937
|
})
|
|
@@ -6033,7 +6034,7 @@ var IntPhoneFieldElement = /** @class */ (function (_super) {
|
|
|
6033
6034
|
IntPhoneFieldElement.prototype.setIntlTelInput = function () {
|
|
6034
6035
|
var _this = this;
|
|
6035
6036
|
var _a, _b, _c;
|
|
6036
|
-
this.phone = _super.prototype.getChildInput.call(this, '
|
|
6037
|
+
this.phone = _super.prototype.getChildInput.call(this, '.phone-field');
|
|
6037
6038
|
var geoIpLookup = function (success, failure) {
|
|
6038
6039
|
return new MakeRequest_1.default('https://ipinfo.io/json?token=8226138217a68a', 'get', { 'content-type': 'application/json' })
|
|
6039
6040
|
.send()
|
|
@@ -6082,7 +6083,7 @@ var IntPhoneFieldElement = /** @class */ (function (_super) {
|
|
|
6082
6083
|
IntPhoneFieldElement = __decorate([
|
|
6083
6084
|
(0, custom_element_decorator_1.default)({
|
|
6084
6085
|
selector: 'int-phone-element',
|
|
6085
|
-
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n <link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/16.0.0/css/intlTelInput.css\" >\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"tel\" id=\"phone-field\"
|
|
6086
|
+
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n <link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/16.0.0/css/intlTelInput.css\" >\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"tel\" id=\"phone-field\" class=\"phone-field\" />\n\t\t\t</div>\n\t\t</div>",
|
|
6086
6087
|
style: "\n \t:host{\n width:100%;\n \t}\n \t.wrapper{\n display:flex;\n \t}\n \t.iti {\n \twidth: 100% !important;\n \t}\n \tinput{\n box-sizing: border-box;\n width: 100% !important;\n border: .1rem solid #5A616D;\n border-radius: .25rem;\n padding: 0.125rem 0.25rem;\n margin: 0.0625rem 0;\n resize: none;\n \t}\n\t\tinput::placeholder {\n\t\t\tcolor: rgb(117, 117, 117);\n\t\t}\n\t\t.field-label {\n\t\t\tcolor: #27282d;\n\t\t\tfont-size: .75rem;\n\t\t\tfont-weight: 600;\n\t\t\tword-wrap: break-word;\n\t\t}\n\t\t.field-input {\n\t\t\tfont-size: 0.813rem;\n\t\t\tmin-height: 1.438rem;\n\t\t}\n\t\t@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {\n\t\t\t.iti__flag {\n\t\t\tbackground-image: url('https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/16.0.0/img/flags@2x.png'), url(" + (0, Flags2x_1.default)() + ");\n\t\t\t}\n\t\t}\n\t",
|
|
6087
6088
|
useShadow: true,
|
|
6088
6089
|
})
|
|
@@ -6149,7 +6150,7 @@ var NumericFieldElement = /** @class */ (function (_super) {
|
|
|
6149
6150
|
_super.prototype.addLabel.call(this, this.number);
|
|
6150
6151
|
};
|
|
6151
6152
|
NumericFieldElement.prototype.initChildInputs = function () {
|
|
6152
|
-
this.number = _super.prototype.getChildInput.call(this, '
|
|
6153
|
+
this.number = _super.prototype.getChildInput.call(this, '.numeric-field');
|
|
6153
6154
|
this.number.addEventListener('change', this.change.bind(this));
|
|
6154
6155
|
if (this.required) {
|
|
6155
6156
|
this.number.setAttribute('required', '');
|
|
@@ -6185,7 +6186,7 @@ var NumericFieldElement = /** @class */ (function (_super) {
|
|
|
6185
6186
|
NumericFieldElement = __decorate([
|
|
6186
6187
|
(0, custom_element_decorator_1.default)({
|
|
6187
6188
|
selector: 'numeric-element',
|
|
6188
|
-
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"number\" id=\"numeric-field\" step=\"any\" />\n\t\t\t</div>\n\t\t</div>",
|
|
6189
|
+
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"number\" class=\"numeric-field\" id=\"numeric-field\" step=\"any\" />\n\t\t\t</div>\n\t\t</div>",
|
|
6189
6190
|
style: "\n \t:host{\n width:100%;\n \t}\n \t.wrapper{\n display:flex;\n \t}\n\t\tinput{\n box-sizing: border-box;\n width: 100% !important;\n\t\t\tborder: .1rem solid #5A616D;\n\t\t\tborder-radius: .25rem;\n\t\t\tpadding: 0.125rem 0.25rem;\n\t\t\tmargin: 0.0625rem 0;\n resize: none;\n \t}\n\t\tinput::placeholder {\n\t\t\tcolor: rgb(117, 117, 117);\n\t\t}\n\t\t.field-label {\n\t\t\tcolor: #27282d;\n\t\t\tfont-size: .75rem;\n\t\t\tfont-weight: 600;\n\t\t\tword-wrap: break-word;\n\t\t}\n\t\t.field-input {\n\t\t\tfont-size: 0.813rem;\n\t\t\tmin-height: 1.438rem;\n\t\t}\n\t",
|
|
6190
6191
|
useShadow: true,
|
|
6191
6192
|
})
|
|
@@ -6278,7 +6279,8 @@ var RadioButtonGroupElement = /** @class */ (function (_super) {
|
|
|
6278
6279
|
fieldset = document.createElement('fieldset');
|
|
6279
6280
|
wrapper.appendChild(fieldset);
|
|
6280
6281
|
}
|
|
6281
|
-
|
|
6282
|
+
var optionsAlreadyAdded = fieldset.querySelectorAll('input[type="radio"]').length;
|
|
6283
|
+
if (!optionsAlreadyAdded) {
|
|
6282
6284
|
this.options.forEach(function (element, index) {
|
|
6283
6285
|
fieldset.insertAdjacentHTML('beforeend', StringUtil_1.StringUtil.StringFormat(_this.radioButtonTemplate, _this.name, element, _this.name + "-" + index, "" + (_this.required ? 'required' : '')));
|
|
6284
6286
|
});
|
|
@@ -6522,7 +6524,7 @@ var SECompanyRegistrationElement = /** @class */ (function (_super) {
|
|
|
6522
6524
|
_super.prototype.addLabel.call(this, this.text);
|
|
6523
6525
|
};
|
|
6524
6526
|
SECompanyRegistrationElement.prototype.initChildInputs = function () {
|
|
6525
|
-
this.text = _super.prototype.getChildInput.call(this, '
|
|
6527
|
+
this.text = _super.prototype.getChildInput.call(this, '.se-company-registration-field');
|
|
6526
6528
|
this.text.addEventListener('change', this.change.bind(this));
|
|
6527
6529
|
if (this.required) {
|
|
6528
6530
|
this.text.setAttribute('required', '');
|
|
@@ -6546,7 +6548,7 @@ var SECompanyRegistrationElement = /** @class */ (function (_super) {
|
|
|
6546
6548
|
SECompanyRegistrationElement = __decorate([
|
|
6547
6549
|
(0, custom_element_decorator_1.default)({
|
|
6548
6550
|
selector: 'se-company-registration-element',
|
|
6549
|
-
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" id='se-company-registration-field' placeholder='SSSSSSSSSS'/>\n\t\t\t</div>\t\n </div>",
|
|
6551
|
+
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" class='se-company-registration-field' id='se-company-registration-field' placeholder='SSSSSSSSSS'/>\n\t\t\t</div>\t\n </div>",
|
|
6550
6552
|
style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: .1rem solid #5A616D;\n border-radius: .25rem;\n padding: 0.125rem 0.25rem;\n margin: 0.0625rem 0;\n resize: none;\n }\n\t\tinput::placeholder {\n\t\t\tcolor: rgb(117, 117, 117);\n\t\t}\n\t\t.field-label {\n\t\t\tcolor: #27282d;\n\t\t\tfont-size: .75rem;\n\t\t\tfont-weight: 600;\n\t\t\tword-wrap: break-word;\n\t\t}\n\t\t.field-input {\n\t\t\tfont-size: 0.813rem;\n\t\t\tmin-height: 1.438rem;\n\t\t}\n\t",
|
|
6551
6553
|
useShadow: true,
|
|
6552
6554
|
})
|
|
@@ -6613,7 +6615,7 @@ var SEPersonalNumberElement = /** @class */ (function (_super) {
|
|
|
6613
6615
|
_super.prototype.addLabel.call(this, this.text);
|
|
6614
6616
|
};
|
|
6615
6617
|
SEPersonalNumberElement.prototype.initChildInputs = function () {
|
|
6616
|
-
this.text = _super.prototype.getChildInput.call(this, '
|
|
6618
|
+
this.text = _super.prototype.getChildInput.call(this, '.se-personal-number-field');
|
|
6617
6619
|
this.text.addEventListener('change', this.change.bind(this));
|
|
6618
6620
|
if (this.required) {
|
|
6619
6621
|
this.text.setAttribute('required', '');
|
|
@@ -6637,7 +6639,7 @@ var SEPersonalNumberElement = /** @class */ (function (_super) {
|
|
|
6637
6639
|
SEPersonalNumberElement = __decorate([
|
|
6638
6640
|
(0, custom_element_decorator_1.default)({
|
|
6639
6641
|
selector: 'se-personal-number-element',
|
|
6640
|
-
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" id='se-personal-number-field' placeholder='(YY)YYMMDD-SSSS'/>\n\t\t\t</div>\n </div>",
|
|
6642
|
+
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" class='se-personal-number-field' id='se-personal-number-field' placeholder='(YY)YYMMDD-SSSS'/>\n\t\t\t</div>\n </div>",
|
|
6641
6643
|
style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: .1rem solid #5A616D;\n border-radius: .25rem;\n padding: 0.125rem 0.25rem;\n margin: 0.0625rem 0;\n resize: none;\n }\n\t\tinput::placeholder {\n\t\t\tcolor: rgb(117, 117, 117);\n\t\t}\n\t\t.field-label {\n\t\t\tcolor: #27282d;\n\t\t\tfont-size: .75rem;\n\t\t\tfont-weight: 600;\n\t\t\tword-wrap: break-word;\n\t\t}\n\t\t.field-input {\n\t\t\tfont-size: 0.813rem;\n\t\t\tmin-height: 1.438rem;\n\t\t}\n\t",
|
|
6642
6644
|
useShadow: true,
|
|
6643
6645
|
})
|
|
@@ -6701,7 +6703,7 @@ var TextAreaElement = /** @class */ (function (_super) {
|
|
|
6701
6703
|
_super.prototype.addLabel.call(this, this.text);
|
|
6702
6704
|
};
|
|
6703
6705
|
TextAreaElement.prototype.initChildInputs = function () {
|
|
6704
|
-
this.text = _super.prototype.getChildInput.call(this, '
|
|
6706
|
+
this.text = _super.prototype.getChildInput.call(this, '.text-area-field');
|
|
6705
6707
|
this.text.addEventListener('change', this.change.bind(this));
|
|
6706
6708
|
if (this.required) {
|
|
6707
6709
|
this.text.setAttribute('required', '');
|
|
@@ -6728,7 +6730,7 @@ var TextAreaElement = /** @class */ (function (_super) {
|
|
|
6728
6730
|
TextAreaElement = __decorate([
|
|
6729
6731
|
(0, custom_element_decorator_1.default)({
|
|
6730
6732
|
selector: 'text-area-element',
|
|
6731
|
-
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<textarea rows=5 id='text-area-field'></textarea>\n\t\t\t</div>\n\t\t</div>",
|
|
6733
|
+
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<textarea rows=5 class='text-area-field' id='text-area-field'></textarea>\n\t\t\t</div>\n\t\t</div>",
|
|
6732
6734
|
style: "\n \t:host{\n width:100%;\n \t}\n \t.wrapper{\n display:flex;\n \t}\n \ttextarea{\n box-sizing: border-box;\n width: 100% !important;\n border: .1rem solid #5A616D;\n border-radius: .25rem;\n padding: 0.125rem 0.25rem;\n margin: 0.0625rem 0;\n resize: none;\n \t}\n\t\ttextarea::placeholder {\n\t\t\tcolor: rgb(117, 117, 117);\n\t\t}\n\t\t.field-label {\n\t\t\tcolor: #27282d;\n\t\t\tfont-size: .75rem;\n\t\t\tfont-weight: 600;\n\t\t\tword-wrap: break-word;\n\t\t}\n\t\t.field-input {\n\t\t\tfont-size: 0.813rem;\n\t\t\tmin-height: 1.438rem;\n\t\t}\n\t",
|
|
6733
6735
|
useShadow: true,
|
|
6734
6736
|
})
|
|
@@ -6792,7 +6794,7 @@ var TextFieldElement = /** @class */ (function (_super) {
|
|
|
6792
6794
|
_super.prototype.addLabel.call(this, this.text);
|
|
6793
6795
|
};
|
|
6794
6796
|
TextFieldElement.prototype.initChildInputs = function () {
|
|
6795
|
-
this.text = _super.prototype.getChildInput.call(this, '
|
|
6797
|
+
this.text = _super.prototype.getChildInput.call(this, '.text-field');
|
|
6796
6798
|
this.text.addEventListener('change', this.change.bind(this));
|
|
6797
6799
|
if (this.required) {
|
|
6798
6800
|
this.text.setAttribute('required', '');
|
|
@@ -6819,7 +6821,7 @@ var TextFieldElement = /** @class */ (function (_super) {
|
|
|
6819
6821
|
TextFieldElement = __decorate([
|
|
6820
6822
|
(0, custom_element_decorator_1.default)({
|
|
6821
6823
|
selector: 'text-element',
|
|
6822
|
-
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" id='text-field' />\n\t\t\t</div>\n\t\t</div>\n\t",
|
|
6824
|
+
template: "\n\t\t<div class=\"field-label\">\n\t\t</div>\n\t\t<div class=\"field-input\">\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" class='text-field' id='text-field' />\n\t\t\t</div>\n\t\t</div>\n\t",
|
|
6823
6825
|
style: "\n\t\t:host{\n\t\t\twidth:100%;\n\t\t}\n\t\t.wrapper{\n\t\t\tdisplay:flex;\n\t\t}\n\t\tinput{\n\t\t\tbox-sizing: border-box;\n\t\t\twidth: 100% !important;\n\t\t\tborder: .1rem solid #5A616D;\n\t\t\tborder-radius: .25rem;\n\t\t\tpadding: 0.125rem 0.25rem;\n\t\t\tmargin: 0.0625rem 0;\n\t\t\tresize: none;\n\t\t}\n\t\tinput::placeholder {\n\t\t\tcolor: rgb(117, 117, 117);\n\t\t}\n\t\t.field-label {\n\t\t\tcolor: #27282d;\n\t\t\tfont-size: .75rem;\n\t\t\tfont-weight: 600;\n\t\t\tword-wrap: break-word;\n\t\t}\n\t\t.field-input {\n\t\t\tfont-size: 0.813rem;\n\t\t\tmin-height: 1.438rem;\n\t\t}\n\t",
|
|
6824
6826
|
useShadow: true,
|
|
6825
6827
|
})
|
|
@@ -6912,7 +6914,7 @@ var TypeAheadElement = /** @class */ (function (_super) {
|
|
|
6912
6914
|
};
|
|
6913
6915
|
TypeAheadElement.prototype.initChildInputs = function () {
|
|
6914
6916
|
var _this = this;
|
|
6915
|
-
this.textInputElement = _super.prototype.getChildInput.call(this, '
|
|
6917
|
+
this.textInputElement = _super.prototype.getChildInput.call(this, '.text-input');
|
|
6916
6918
|
this.descriptionElement = _super.prototype.getChildElement.call(this, '#description');
|
|
6917
6919
|
this.optionsListElement = _super.prototype.getChildElement.call(this, '#options-list');
|
|
6918
6920
|
this.componentWrapper = _super.prototype.getChildElement.call(this, '.wrapper');
|
|
@@ -7382,14 +7384,17 @@ var CustomInputElement = /** @class */ (function (_super) {
|
|
|
7382
7384
|
}
|
|
7383
7385
|
if (this.label) {
|
|
7384
7386
|
var randomId = Math.random().toString(36).substring(2, 15);
|
|
7385
|
-
inputField.id = "
|
|
7387
|
+
inputField.id = inputField.id + "-" + randomId;
|
|
7386
7388
|
var newLabel = document.createElement('label');
|
|
7387
7389
|
newLabel.setAttribute('for', inputField.id);
|
|
7388
7390
|
newLabel.classList.add('field-label');
|
|
7389
7391
|
newLabel.textContent = this.label + ": ";
|
|
7390
|
-
var
|
|
7391
|
-
if (
|
|
7392
|
-
|
|
7392
|
+
var fieldLabelDiv = this.shadowRoot.querySelector('.field-label');
|
|
7393
|
+
if (fieldLabelDiv) {
|
|
7394
|
+
var existingLabel = fieldLabelDiv.querySelector('label.field-label');
|
|
7395
|
+
if (!existingLabel) {
|
|
7396
|
+
fieldLabelDiv.appendChild(newLabel);
|
|
7397
|
+
}
|
|
7393
7398
|
}
|
|
7394
7399
|
if (this.required) {
|
|
7395
7400
|
newLabel.innerHTML += '<span style="color: #e00040">*</span>';
|