@energycap/components 0.27.4-ECAPID-402-MultiSelect-Component.20220125-1937 → 0.27.4-ECAPID-402-MultiSelect-Component.20220126-0812
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/bundles/energycap-components.umd.js +39 -17
- package/bundles/energycap-components.umd.js.map +1 -1
- package/bundles/energycap-components.umd.min.js +1 -1
- package/bundles/energycap-components.umd.min.js.map +1 -1
- package/energycap-components.d.ts +3 -3
- package/energycap-components.metadata.json +1 -1
- package/esm2015/energycap-components.js +4 -4
- package/esm2015/lib/components.module.js +3 -1
- package/esm2015/lib/controls/multiselect/multiselect.component.js +36 -16
- package/fesm2015/energycap-components.js +36 -12
- package/fesm2015/energycap-components.js.map +1 -1
- package/lib/controls/multiselect/multiselect.component.d.ts +11 -8
- package/package.json +1 -1
|
@@ -8558,27 +8558,47 @@
|
|
|
8558
8558
|
currentTab: [{ type: i0.Input }]
|
|
8559
8559
|
};
|
|
8560
8560
|
|
|
8561
|
-
var MultiselectComponent = /** @class */ (function (
|
|
8562
|
-
|
|
8563
|
-
|
|
8564
|
-
|
|
8565
|
-
_this.validationMessageService = validationMessageService;
|
|
8566
|
-
_this.formGroupHelper = formGroupHelper;
|
|
8567
|
-
return _this;
|
|
8561
|
+
var MultiselectComponent = /** @class */ (function () {
|
|
8562
|
+
function MultiselectComponent() {
|
|
8563
|
+
this.addButtonLabel = '';
|
|
8564
|
+
this.tags = [];
|
|
8568
8565
|
}
|
|
8566
|
+
MultiselectComponent.prototype.ngOnInit = function () {
|
|
8567
|
+
};
|
|
8568
|
+
MultiselectComponent.prototype.ngAfterViewInit = function () {
|
|
8569
|
+
if (this.combobox) {
|
|
8570
|
+
this.combobox.hideToggleButton = true;
|
|
8571
|
+
}
|
|
8572
|
+
else {
|
|
8573
|
+
console.warn('The multiselect requires an <ec-combobox> to be provided as transcluded content');
|
|
8574
|
+
}
|
|
8575
|
+
};
|
|
8576
|
+
MultiselectComponent.prototype.addItem = function () {
|
|
8577
|
+
var _a, _b, _c, _d;
|
|
8578
|
+
console.log('adding item ', (_b = (_a = this.combobox) === null || _a === void 0 ? void 0 : _a.formModel) === null || _b === void 0 ? void 0 : _b.value);
|
|
8579
|
+
if ((_d = (_c = this.combobox) === null || _c === void 0 ? void 0 : _c.formModel) === null || _d === void 0 ? void 0 : _d.value) {
|
|
8580
|
+
this.tags.push({ label: this.combobox.formModel.value.label, type: 'info', isDismissable: true });
|
|
8581
|
+
this.combobox.formModel.setValue(null);
|
|
8582
|
+
}
|
|
8583
|
+
};
|
|
8584
|
+
MultiselectComponent.prototype.removeTag = function (tag) {
|
|
8585
|
+
this.tags = this.tags.filter(function (t) { return t !== tag; });
|
|
8586
|
+
//TODO: emit selectedChanged(tags)
|
|
8587
|
+
};
|
|
8569
8588
|
return MultiselectComponent;
|
|
8570
|
-
}(
|
|
8589
|
+
}());
|
|
8571
8590
|
MultiselectComponent.decorators = [
|
|
8572
8591
|
{ type: i0.Component, args: [{
|
|
8573
8592
|
selector: 'ec-multiselect',
|
|
8574
|
-
template: "<
|
|
8575
|
-
styles: [""]
|
|
8593
|
+
template: "<div class=\"d-flex mb-2\">\r\n <ng-content></ng-content>\r\n <ec-button class=\"textbox-group-btn-right\" label=\"{{addButtonLabel}}\" type=\"secondary\" (clicked)=\"addItem()\"></ec-button>\r\n</div>\r\n<ec-tags\r\n [tags]=\"tags\"\r\n (tagClosed)=\"removeTag($event)\">\r\n</ec-tags>\r\n",
|
|
8594
|
+
styles: [":host{flex:1 1}"]
|
|
8576
8595
|
},] }
|
|
8577
8596
|
];
|
|
8578
|
-
MultiselectComponent.ctorParameters = function () { return [
|
|
8579
|
-
|
|
8580
|
-
{ type:
|
|
8581
|
-
|
|
8597
|
+
MultiselectComponent.ctorParameters = function () { return []; };
|
|
8598
|
+
MultiselectComponent.propDecorators = {
|
|
8599
|
+
addButtonLabel: [{ type: i0.Input }],
|
|
8600
|
+
combobox: [{ type: i0.ContentChild, args: [ComboboxComponent,] }]
|
|
8601
|
+
};
|
|
8582
8602
|
|
|
8583
8603
|
var ComponentsModule = /** @class */ (function () {
|
|
8584
8604
|
function ComponentsModule() {
|
|
@@ -8613,6 +8633,7 @@
|
|
|
8613
8633
|
TableComponent,
|
|
8614
8634
|
SearchableTableComponent,
|
|
8615
8635
|
ComboboxComponent,
|
|
8636
|
+
MultiselectComponent,
|
|
8616
8637
|
MenuComponent,
|
|
8617
8638
|
PopupContainerDirective,
|
|
8618
8639
|
DropdownComponent,
|
|
@@ -8692,6 +8713,7 @@
|
|
|
8692
8713
|
TableComponent,
|
|
8693
8714
|
SearchableTableComponent,
|
|
8694
8715
|
ComboboxComponent,
|
|
8716
|
+
MultiselectComponent,
|
|
8695
8717
|
MenuComponent,
|
|
8696
8718
|
PopupContainerDirective,
|
|
8697
8719
|
DropdownComponent,
|
|
@@ -9966,9 +9988,9 @@
|
|
|
9966
9988
|
exports.urlValidationPattern = urlValidationPattern;
|
|
9967
9989
|
exports.validateFormGroupValuesAreUnique = validateFormGroupValuesAreUnique;
|
|
9968
9990
|
exports.ɵa = ResizableTableDirective;
|
|
9969
|
-
exports.ɵb =
|
|
9970
|
-
exports.ɵc =
|
|
9971
|
-
exports.ɵd =
|
|
9991
|
+
exports.ɵb = MultiselectComponent;
|
|
9992
|
+
exports.ɵc = AvatarService;
|
|
9993
|
+
exports.ɵd = TableDetailRowComponent;
|
|
9972
9994
|
|
|
9973
9995
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9974
9996
|
|