@luftborn/custom-elements 2.3.3 → 2.4.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 +23 -7
- package/demo/index.min.js +22 -6
- package/demo/index.min.js.map +1 -1
- package/dist/elements/CustomRegularExpression/CustomRegularExpressionElement.js +3 -0
- package/dist/elements/CustomRegularExpression/CustomRegularExpressionElement.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/TextAreaElement/TextAreaElement.js +3 -0
- package/dist/elements/TextAreaElement/TextAreaElement.js.map +1 -1
- package/dist/elements/TextField/TextFieldElement.js +4 -1
- package/dist/elements/TextField/TextFieldElement.js.map +1 -1
- package/dist/elements/TypeAhead/TypeAheadElement.js +5 -5
- 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/CustomRegularExpression/CustomRegularExpressionElement.ts +3 -0
- package/src/elements/EmailField/EmailFieldElement.ts +3 -0
- package/src/elements/NumericField/NumericFieldElement.ts +3 -0
- package/src/elements/TextAreaElement/TextAreaElement.ts +3 -0
- package/src/elements/TextField/TextFieldElement.ts +4 -1
- package/src/elements/TypeAhead/TypeAheadElement.ts +4 -5
- package/src/framework/CustomInputElement.ts +2 -0
package/demo/index.min.js
CHANGED
|
@@ -3032,6 +3032,9 @@ var CustomRegularExpressionElement = /** @class */ (function (_super) {
|
|
|
3032
3032
|
if (this.customValue) {
|
|
3033
3033
|
this.text.setAttribute('pattern', this.customValue);
|
|
3034
3034
|
}
|
|
3035
|
+
if (this.placeholder) {
|
|
3036
|
+
this.text.setAttribute('placeholder', this.placeholder);
|
|
3037
|
+
}
|
|
3035
3038
|
};
|
|
3036
3039
|
// events
|
|
3037
3040
|
CustomRegularExpressionElement.prototype.change = function ($event) {
|
|
@@ -3342,6 +3345,9 @@ var EmailFieldElement = /** @class */ (function (_super) {
|
|
|
3342
3345
|
if (this.required) {
|
|
3343
3346
|
this.email.setAttribute('required', '');
|
|
3344
3347
|
}
|
|
3348
|
+
if (this.placeholder) {
|
|
3349
|
+
this.email.setAttribute('placeholder', this.placeholder);
|
|
3350
|
+
}
|
|
3345
3351
|
};
|
|
3346
3352
|
// events
|
|
3347
3353
|
EmailFieldElement.prototype.change = function ($event) {
|
|
@@ -3780,6 +3786,9 @@ var NumericFieldElement = /** @class */ (function (_super) {
|
|
|
3780
3786
|
if (this.step) {
|
|
3781
3787
|
this.number.setAttribute('step', this.step);
|
|
3782
3788
|
}
|
|
3789
|
+
if (this.placeholder) {
|
|
3790
|
+
this.number.setAttribute('placeholder', this.placeholder);
|
|
3791
|
+
}
|
|
3783
3792
|
};
|
|
3784
3793
|
// events
|
|
3785
3794
|
NumericFieldElement.prototype.change = function ($event) {
|
|
@@ -4130,6 +4139,9 @@ var TextAreaElement = /** @class */ (function (_super) {
|
|
|
4130
4139
|
if (this.required) {
|
|
4131
4140
|
this.text.setAttribute('required', '');
|
|
4132
4141
|
}
|
|
4142
|
+
if (this.placeholder) {
|
|
4143
|
+
this.text.setAttribute('placeholder', this.placeholder);
|
|
4144
|
+
}
|
|
4133
4145
|
};
|
|
4134
4146
|
// events
|
|
4135
4147
|
TextAreaElement.prototype.change = function ($event) {
|
|
@@ -4211,6 +4223,9 @@ var TextFieldElement = /** @class */ (function (_super) {
|
|
|
4211
4223
|
if (this.required) {
|
|
4212
4224
|
this.text.setAttribute('required', '');
|
|
4213
4225
|
}
|
|
4226
|
+
if (this.placeholder) {
|
|
4227
|
+
this.text.setAttribute('placeholder', this.placeholder);
|
|
4228
|
+
}
|
|
4214
4229
|
};
|
|
4215
4230
|
// events
|
|
4216
4231
|
TextFieldElement.prototype.change = function ($event) {
|
|
@@ -4224,7 +4239,7 @@ var TextFieldElement = /** @class */ (function (_super) {
|
|
|
4224
4239
|
TextFieldElement = __decorate([
|
|
4225
4240
|
(0, custom_element_decorator_1.default)({
|
|
4226
4241
|
selector: 'text-element',
|
|
4227
|
-
template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" id='text-field'/>\n\t\t\t</div>",
|
|
4242
|
+
template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" id='text-field' />\n\t\t\t</div>",
|
|
4228
4243
|
style: "\n\t:host{\n\t\t\twidth:100%;\n\t}\n\t.wrapper{\n\t\t\tdisplay:flex;\n\t}\n\tinput{\n\t\t\tbox-sizing: border-box;\n\t\t\twidth: 100% !important;\n\t\t\tborder: none;\n\t\t\tbackground-color: #f1f4ff;\n\t\t\tmargin: 2px;\n\t\t\tresize: none;\n\t}\n\t\t",
|
|
4229
4244
|
useShadow: true,
|
|
4230
4245
|
})
|
|
@@ -4322,6 +4337,9 @@ var TypeAheadElement = /** @class */ (function (_super) {
|
|
|
4322
4337
|
if (this.required) {
|
|
4323
4338
|
this.textInputElement.setAttribute('required', '');
|
|
4324
4339
|
}
|
|
4340
|
+
if (this.placeholder) {
|
|
4341
|
+
this.textInputElement.setAttribute('placeholder', this.placeholder);
|
|
4342
|
+
}
|
|
4325
4343
|
this.textInputElement.addEventListener('change', this.change.bind(this));
|
|
4326
4344
|
this.textInputElement.addEventListener('input', function () {
|
|
4327
4345
|
_this.inputEventHandler();
|
|
@@ -4364,7 +4382,7 @@ var TypeAheadElement = /** @class */ (function (_super) {
|
|
|
4364
4382
|
optionsListItemDescription.classList.add('options-list-item-description');
|
|
4365
4383
|
optionsListItemDescription.innerHTML = DomUtility_1.default.boldenText(option.description, searchValue);
|
|
4366
4384
|
optionsListItem.appendChild(optionsListItemDescription);
|
|
4367
|
-
optionsListItem.addEventListener('
|
|
4385
|
+
optionsListItem.addEventListener('mousedown', function () {
|
|
4368
4386
|
_this.optionSelectedHandler(option);
|
|
4369
4387
|
});
|
|
4370
4388
|
_this.componentWrapper.appendChild(optionslist);
|
|
@@ -4425,9 +4443,6 @@ var TypeAheadElement = /** @class */ (function (_super) {
|
|
|
4425
4443
|
});
|
|
4426
4444
|
};
|
|
4427
4445
|
TypeAheadElement.prototype.change = function ($event) {
|
|
4428
|
-
if ($event.target.classList.contains('options-list-item')) {
|
|
4429
|
-
return;
|
|
4430
|
-
}
|
|
4431
4446
|
this.touched = true;
|
|
4432
4447
|
this.onChange.emit(new CustomEvents_1.CustomElementEventArgs(this.value, 'change'));
|
|
4433
4448
|
};
|
|
@@ -4439,7 +4454,7 @@ var TypeAheadElement = /** @class */ (function (_super) {
|
|
|
4439
4454
|
(0, custom_element_decorator_1.default)({
|
|
4440
4455
|
selector: 'type-ahead-element',
|
|
4441
4456
|
template: "\n\t\t<div class=\"wrapper\">\n\t\t\t<input type=\"text\" id=\"text-input\">\n\t\t\t<div id=\"description\"></div>\n\t\t</div>",
|
|
4442
|
-
style: "\n\t\t:host {\n\t\t\twidth:100%;\n\t\t}\n\t\t.wrapper {\n\t\t\tposition: relative;\n\t\t\tdisplay:flex;\n\t\t\tflex-direction: column;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t}\n\t\t#text-input {\n\t\t\tbox-sizing: border-box;\n\t\t\twidth: 100% !important;\n\t\t\tborder: none;\n\t\t\tbackground-color: #f1f4ff;\n\t\t\tmargin: 2px;\n\t\t\tresize: none;\n\t\t}\n\t\t.wrapper #description {\n\t\t\twidth: 100%;\n\t\t\tpadding: 0 2px;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.options-list {\n\t\t\tposition: absolute;\n\t\t\tborder: 1px solid #E8E8E8;\n\t\t\tborder-bottom: none;\n\t\t\tborder-top: none;\n\t\t\tz-index: 3;\n\t\t\ttop: 100%;\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\tmax-height: 200px;\n\t\t\toverflow-y: auto;\n\t\t}\n\t\t.options-list-item {\n\t\t\tpadding: 10px;\n\t\t\tcursor: pointer;\n\t\t\tbackground-color: #FFFFFF;\n\t\t\tborder-bottom: 1px solid #E8E8E8;\n\t\t
|
|
4457
|
+
style: "\n\t\t:host {\n\t\t\twidth:100%;\n\t\t}\n\t\t.wrapper {\n\t\t\tposition: relative;\n\t\t\tdisplay:flex;\n\t\t\tflex-direction: column;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t}\n\t\t#text-input {\n\t\t\tbox-sizing: border-box;\n\t\t\twidth: 100% !important;\n\t\t\tborder: none;\n\t\t\tbackground-color: #f1f4ff;\n\t\t\tmargin: 2px;\n\t\t\tresize: none;\n\t\t}\n\t\t.wrapper #description {\n\t\t\twidth: 100%;\n\t\t\tpadding: 0 2px;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.options-list {\n\t\t\tposition: absolute;\n\t\t\tborder: 1px solid #E8E8E8;\n\t\t\tborder-bottom: none;\n\t\t\tborder-top: none;\n\t\t\tz-index: 3;\n\t\t\ttop: 100%;\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\tmax-height: 200px;\n\t\t\toverflow-y: auto;\n\t\t}\n\t\t.options-list-item {\n\t\t\tpadding: 10px;\n\t\t\tcursor: pointer;\n\t\t\tbackground-color: #FFFFFF;\n\t\t\tborder-bottom: 1px solid #E8E8E8;\n\t\t}\n\t\t.options-list-item:hover {\n\t\t\tbackground-color: #E8E8E8;\n\t\t}\n\t\t.options-list-item.active {\n\t\t\t/*when navigating through the items using the arrow keys:*/\n\t\t\tbackground-color: #003E64 !important;\n\t\t\tcolor: #FFFFFF;\n\t\t}\n\t\t.options-list-item-title {\n\t\t\tfont-size: 16px;\n\t\t}\n\t\t.options-list-item-description {\n\t\t\tfont-size: 10px;\n\t\t}\n\t",
|
|
4443
4458
|
useShadow: true,
|
|
4444
4459
|
})
|
|
4445
4460
|
], TypeAheadElement);
|
|
@@ -4582,6 +4597,7 @@ var CustomInputElement = /** @class */ (function (_super) {
|
|
|
4582
4597
|
this.dependencies = data.dependencies;
|
|
4583
4598
|
this.required = data.required;
|
|
4584
4599
|
this.name = data.name;
|
|
4600
|
+
this.placeholder = data.placeholder;
|
|
4585
4601
|
this.allDependenciesMustBeMet = data.allDependenciesMustBeMet;
|
|
4586
4602
|
this.multi = data.multi;
|
|
4587
4603
|
this.max = data.max;
|