@luftborn/custom-elements 2.9.0 → 2.11.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/demo/index.js +45 -2
- package/demo/index.min.js +44 -1
- package/demo/index.min.js.map +1 -1
- package/dist/elements/CPRElement/CPRElement.js +3 -0
- package/dist/elements/CPRElement/CPRElement.js.map +1 -1
- package/dist/elements/CVRElement/CVRElement.js +3 -0
- package/dist/elements/CVRElement/CVRElement.js.map +1 -1
- package/dist/elements/CustomRegularExpression/CustomRegularExpressionElement.js +3 -0
- package/dist/elements/CustomRegularExpression/CustomRegularExpressionElement.js.map +1 -1
- package/dist/elements/DateField/DateFieldElement.js +3 -0
- package/dist/elements/DateField/DateFieldElement.js.map +1 -1
- package/dist/elements/DropDownList/DropDownListElement.d.ts +1 -1
- package/dist/elements/DropDownList/DropDownListElement.js +7 -1
- package/dist/elements/DropDownList/DropDownListElement.js.map +1 -1
- package/dist/elements/EmailField/EmailFieldElement.js +3 -0
- package/dist/elements/EmailField/EmailFieldElement.js.map +1 -1
- package/dist/elements/NumericField/NumericFieldElement.js +3 -0
- package/dist/elements/NumericField/NumericFieldElement.js.map +1 -1
- package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.js +3 -0
- package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.js.map +1 -1
- package/dist/elements/SECompanyRegistrationElement/SECompanyRegistrationElement.js +3 -0
- package/dist/elements/SECompanyRegistrationElement/SECompanyRegistrationElement.js.map +1 -1
- package/dist/elements/SEPersonalNumberElement/SEPersonalNumberElement.js +3 -0
- package/dist/elements/SEPersonalNumberElement/SEPersonalNumberElement.js.map +1 -1
- package/dist/elements/TextAreaElement/TextAreaElement.js +3 -0
- package/dist/elements/TextAreaElement/TextAreaElement.js.map +1 -1
- package/dist/elements/TextField/TextFieldElement.js +3 -0
- package/dist/elements/TextField/TextFieldElement.js.map +1 -1
- package/dist/elements/TypeAhead/TypeAheadElement.js +3 -0
- package/dist/elements/TypeAhead/TypeAheadElement.js.map +1 -1
- package/dist/framework/CustomInputElement.d.ts +1 -0
- package/dist/framework/CustomInputElement.js +1 -0
- package/dist/framework/CustomInputElement.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/CPRElement/CPRElement.ts +3 -0
- package/src/elements/CVRElement/CVRElement.ts +3 -0
- package/src/elements/CustomRegularExpression/CustomRegularExpressionElement.ts +3 -0
- package/src/elements/DateField/DateFieldElement.ts +3 -0
- package/src/elements/DropDownList/DropDownListElement.ts +8 -2
- package/src/elements/EmailField/EmailFieldElement.ts +3 -0
- package/src/elements/NumericField/NumericFieldElement.ts +3 -0
- package/src/elements/RadioButtonGroup/RadioButtonGroupElement.ts +3 -0
- package/src/elements/SECompanyRegistrationElement/SECompanyRegistrationElement.ts +3 -0
- package/src/elements/SEPersonalNumberElement/SEPersonalNumberElement.ts +3 -0
- package/src/elements/TextAreaElement/TextAreaElement.ts +3 -0
- package/src/elements/TextField/TextFieldElement.ts +3 -0
- package/src/elements/TypeAhead/TypeAheadElement.ts +3 -0
- package/src/framework/CustomInputElement.ts +2 -0
package/demo/index.min.js
CHANGED
|
@@ -2766,6 +2766,9 @@ var CPRElement = /** @class */ (function (_super) {
|
|
|
2766
2766
|
if (this.required) {
|
|
2767
2767
|
this.text.setAttribute('required', '');
|
|
2768
2768
|
}
|
|
2769
|
+
if (this.initialValue) {
|
|
2770
|
+
this.value = this.initialValue;
|
|
2771
|
+
}
|
|
2769
2772
|
};
|
|
2770
2773
|
// events
|
|
2771
2774
|
CPRElement.prototype.change = function ($event) {
|
|
@@ -2850,6 +2853,9 @@ var CVRElement = /** @class */ (function (_super) {
|
|
|
2850
2853
|
if (this.required) {
|
|
2851
2854
|
this.text.setAttribute('required', '');
|
|
2852
2855
|
}
|
|
2856
|
+
if (this.initialValue) {
|
|
2857
|
+
this.value = this.initialValue;
|
|
2858
|
+
}
|
|
2853
2859
|
};
|
|
2854
2860
|
// events
|
|
2855
2861
|
CVRElement.prototype.change = function ($event) {
|
|
@@ -3976,6 +3982,9 @@ var CustomRegularExpressionElement = /** @class */ (function (_super) {
|
|
|
3976
3982
|
if (this.placeholder) {
|
|
3977
3983
|
this.text.setAttribute('placeholder', this.placeholder);
|
|
3978
3984
|
}
|
|
3985
|
+
if (this.initialValue) {
|
|
3986
|
+
this.value = this.initialValue;
|
|
3987
|
+
}
|
|
3979
3988
|
};
|
|
3980
3989
|
// events
|
|
3981
3990
|
CustomRegularExpressionElement.prototype.change = function ($event) {
|
|
@@ -4063,6 +4072,9 @@ var DateFieldElement = /** @class */ (function (_super) {
|
|
|
4063
4072
|
if (this.min) {
|
|
4064
4073
|
this.date.setAttribute('min', this.min);
|
|
4065
4074
|
}
|
|
4075
|
+
if (this.initialValue) {
|
|
4076
|
+
this.value = this.initialValue;
|
|
4077
|
+
}
|
|
4066
4078
|
};
|
|
4067
4079
|
// events
|
|
4068
4080
|
DateFieldElement.prototype.change = function ($event) {
|
|
@@ -4124,6 +4136,9 @@ var DropDownListElement = /** @class */ (function (_super) {
|
|
|
4124
4136
|
}
|
|
4125
4137
|
Object.defineProperty(DropDownListElement.prototype, "value", {
|
|
4126
4138
|
get: function () {
|
|
4139
|
+
if (this.multi) {
|
|
4140
|
+
return Array.from(this.select.selectedOptions).map(function (option) { return option.value; }).join(', ');
|
|
4141
|
+
}
|
|
4127
4142
|
return "" + this.select.value;
|
|
4128
4143
|
},
|
|
4129
4144
|
set: function (value) {
|
|
@@ -4144,7 +4159,7 @@ var DropDownListElement = /** @class */ (function (_super) {
|
|
|
4144
4159
|
_super.prototype.connectedCallback.call(this);
|
|
4145
4160
|
};
|
|
4146
4161
|
DropDownListElement.prototype.initChildInputs = function () {
|
|
4147
|
-
this.select =
|
|
4162
|
+
this.select = this.shadowRoot.querySelector('select');
|
|
4148
4163
|
this.addOptions();
|
|
4149
4164
|
if (this.required) {
|
|
4150
4165
|
this.select.setAttribute('required', '');
|
|
@@ -4152,6 +4167,9 @@ var DropDownListElement = /** @class */ (function (_super) {
|
|
|
4152
4167
|
if (this.multi) {
|
|
4153
4168
|
this.select.setAttribute('multiple', '');
|
|
4154
4169
|
}
|
|
4170
|
+
if (this.initialValue) {
|
|
4171
|
+
this.value = this.initialValue;
|
|
4172
|
+
}
|
|
4155
4173
|
this.select.addEventListener('change', this.change.bind(this));
|
|
4156
4174
|
};
|
|
4157
4175
|
DropDownListElement.prototype.addOptions = function () {
|
|
@@ -4297,6 +4315,9 @@ var EmailFieldElement = /** @class */ (function (_super) {
|
|
|
4297
4315
|
if (this.placeholder) {
|
|
4298
4316
|
this.email.setAttribute('placeholder', this.placeholder);
|
|
4299
4317
|
}
|
|
4318
|
+
if (this.initialValue) {
|
|
4319
|
+
this.value = this.initialValue;
|
|
4320
|
+
}
|
|
4300
4321
|
};
|
|
4301
4322
|
// events
|
|
4302
4323
|
EmailFieldElement.prototype.change = function ($event) {
|
|
@@ -4742,6 +4763,9 @@ var NumericFieldElement = /** @class */ (function (_super) {
|
|
|
4742
4763
|
if (this.placeholder) {
|
|
4743
4764
|
this.number.setAttribute('placeholder', this.placeholder);
|
|
4744
4765
|
}
|
|
4766
|
+
if (this.initialValue) {
|
|
4767
|
+
this.value = this.initialValue;
|
|
4768
|
+
}
|
|
4745
4769
|
};
|
|
4746
4770
|
// events
|
|
4747
4771
|
NumericFieldElement.prototype.change = function ($event) {
|
|
@@ -4835,6 +4859,9 @@ var RadioButtonGroupElement = /** @class */ (function (_super) {
|
|
|
4835
4859
|
this.radioButton.forEach(function (radio) {
|
|
4836
4860
|
return radio.addEventListener('change', _this.change.bind(_this));
|
|
4837
4861
|
});
|
|
4862
|
+
if (this.initialValue) {
|
|
4863
|
+
this.value = this.initialValue;
|
|
4864
|
+
}
|
|
4838
4865
|
};
|
|
4839
4866
|
RadioButtonGroupElement.prototype.addRadioButtons = function () {
|
|
4840
4867
|
var _this = this;
|
|
@@ -4927,6 +4954,9 @@ var SECompanyRegistrationElement = /** @class */ (function (_super) {
|
|
|
4927
4954
|
if (this.required) {
|
|
4928
4955
|
this.text.setAttribute('required', '');
|
|
4929
4956
|
}
|
|
4957
|
+
if (this.initialValue) {
|
|
4958
|
+
this.value = this.initialValue;
|
|
4959
|
+
}
|
|
4930
4960
|
};
|
|
4931
4961
|
// events
|
|
4932
4962
|
SECompanyRegistrationElement.prototype.change = function ($event) {
|
|
@@ -5011,6 +5041,9 @@ var SEPersonalNumberElement = /** @class */ (function (_super) {
|
|
|
5011
5041
|
if (this.required) {
|
|
5012
5042
|
this.text.setAttribute('required', '');
|
|
5013
5043
|
}
|
|
5044
|
+
if (this.initialValue) {
|
|
5045
|
+
this.value = this.initialValue;
|
|
5046
|
+
}
|
|
5014
5047
|
};
|
|
5015
5048
|
// events
|
|
5016
5049
|
SEPersonalNumberElement.prototype.change = function ($event) {
|
|
@@ -5095,6 +5128,9 @@ var TextAreaElement = /** @class */ (function (_super) {
|
|
|
5095
5128
|
if (this.placeholder) {
|
|
5096
5129
|
this.text.setAttribute('placeholder', this.placeholder);
|
|
5097
5130
|
}
|
|
5131
|
+
if (this.initialValue) {
|
|
5132
|
+
this.value = this.initialValue;
|
|
5133
|
+
}
|
|
5098
5134
|
};
|
|
5099
5135
|
// events
|
|
5100
5136
|
TextAreaElement.prototype.change = function ($event) {
|
|
@@ -5179,6 +5215,9 @@ var TextFieldElement = /** @class */ (function (_super) {
|
|
|
5179
5215
|
if (this.placeholder) {
|
|
5180
5216
|
this.text.setAttribute('placeholder', this.placeholder);
|
|
5181
5217
|
}
|
|
5218
|
+
if (this.initialValue) {
|
|
5219
|
+
this.value = this.initialValue;
|
|
5220
|
+
}
|
|
5182
5221
|
};
|
|
5183
5222
|
// events
|
|
5184
5223
|
TextFieldElement.prototype.change = function ($event) {
|
|
@@ -5293,6 +5332,9 @@ var TypeAheadElement = /** @class */ (function (_super) {
|
|
|
5293
5332
|
if (this.placeholder) {
|
|
5294
5333
|
this.textInputElement.setAttribute('placeholder', this.placeholder);
|
|
5295
5334
|
}
|
|
5335
|
+
if (this.initialValue) {
|
|
5336
|
+
this.value = this.initialValue;
|
|
5337
|
+
}
|
|
5296
5338
|
this.textInputElement.addEventListener('change', this.change.bind(this));
|
|
5297
5339
|
this.textInputElement.addEventListener('input', function () {
|
|
5298
5340
|
_this.inputEventHandler();
|
|
@@ -5558,6 +5600,7 @@ var CustomInputElement = /** @class */ (function (_super) {
|
|
|
5558
5600
|
this.step = data.step;
|
|
5559
5601
|
this.customValue = data.value;
|
|
5560
5602
|
this.dateFormat = data.dateFormat;
|
|
5603
|
+
this.initialValue = data.value;
|
|
5561
5604
|
}
|
|
5562
5605
|
catch (ex) {
|
|
5563
5606
|
console.error(ex);
|