@colijnit/corecomponents_v12 12.2.0 → 12.2.2
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/colijnit-corecomponents_v12.umd.js +35 -14
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/lib/components/base/base-input.component.js +7 -3
- package/esm2015/lib/components/input-search/input-search.component.js +2 -2
- package/esm2015/lib/components/input-text/input-text.component.js +7 -2
- package/esm2015/lib/components/list-of-values/list-of-values-popup.component.js +25 -8
- package/esm2015/lib/components/list-of-values/list-of-values.component.js +18 -15
- package/fesm2015/colijnit-corecomponents_v12.js +53 -24
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/base/base-input.component.d.ts +1 -0
- package/lib/components/grid-toolbar/style/_material-definition.scss +1 -1
- package/lib/components/input-text/style/_layout.scss +9 -0
- package/lib/components/input-text/style/_material-definition.scss +1 -1
- package/lib/components/list-of-values/list-of-values-popup.component.d.ts +3 -0
- package/lib/components/list-of-values/list-of-values.component.d.ts +0 -1
- package/lib/components/list-of-values/style/_layout.scss +22 -7
- package/lib/components/list-of-values/style/_material-definition.scss +0 -10
- package/lib/style/_variables.scss +1 -0
- package/package.json +1 -1
|
@@ -2263,6 +2263,7 @@
|
|
|
2263
2263
|
this.customWidth = false;
|
|
2264
2264
|
this.customHeight = false;
|
|
2265
2265
|
this.noTriangleGraphic = false;
|
|
2266
|
+
this.keepFocussed = false;
|
|
2266
2267
|
this.halfWidth = false;
|
|
2267
2268
|
this.fullWidth = false;
|
|
2268
2269
|
this.excludeUserModelChange = false;
|
|
@@ -2537,7 +2538,6 @@
|
|
|
2537
2538
|
configurable: true
|
|
2538
2539
|
});
|
|
2539
2540
|
BaseInputComponent.prototype.onClick = function (event) {
|
|
2540
|
-
event.stopPropagation();
|
|
2541
2541
|
if (this.canChange && !this.noClickFocus) {
|
|
2542
2542
|
this.requestFocus();
|
|
2543
2543
|
if (!this.excludeUserModelChange) {
|
|
@@ -2755,7 +2755,7 @@
|
|
|
2755
2755
|
BaseInputComponent.prototype.doBlur = function (event) {
|
|
2756
2756
|
var _this = this;
|
|
2757
2757
|
setTimeout(function () {
|
|
2758
|
-
if (_this.keepFocus) {
|
|
2758
|
+
if (_this.keepFocus || _this.keepFocussed) {
|
|
2759
2759
|
if (event) {
|
|
2760
2760
|
event.preventDefault;
|
|
2761
2761
|
}
|
|
@@ -3125,6 +3125,7 @@
|
|
|
3125
3125
|
customWidth: [{ type: i0.Input }, { type: i0.HostBinding, args: ["class.custom-width",] }],
|
|
3126
3126
|
customHeight: [{ type: i0.Input }, { type: i0.HostBinding, args: ['class.custom-height',] }],
|
|
3127
3127
|
noTriangleGraphic: [{ type: i0.Input }],
|
|
3128
|
+
keepFocussed: [{ type: i0.Input }],
|
|
3128
3129
|
halfWidth: [{ type: i0.Input }, { type: i0.HostBinding, args: ["class.half-width",] }],
|
|
3129
3130
|
fullWidth: [{ type: i0.Input }, { type: i0.HostBinding, args: ["class.full-width-important",] }],
|
|
3130
3131
|
excludeUserModelChange: [{ type: i0.Input }],
|
|
@@ -3164,6 +3165,9 @@
|
|
|
3164
3165
|
__decorate([
|
|
3165
3166
|
InputBoolean()
|
|
3166
3167
|
], BaseInputComponent.prototype, "noTriangleGraphic", void 0);
|
|
3168
|
+
__decorate([
|
|
3169
|
+
InputBoolean()
|
|
3170
|
+
], BaseInputComponent.prototype, "keepFocussed", void 0);
|
|
3167
3171
|
__decorate([
|
|
3168
3172
|
InputBoolean()
|
|
3169
3173
|
], BaseInputComponent.prototype, "halfWidth", void 0);
|
|
@@ -6256,7 +6260,7 @@
|
|
|
6256
6260
|
InputTextComponent.decorators = [
|
|
6257
6261
|
{ type: i0.Component, args: [{
|
|
6258
6262
|
selector: 'co-input-text',
|
|
6259
|
-
template: "\n <div class=\"input-text-wrapper\" overlayParent #parentForOverlay=\"overlayParent\">\n <co-icon *ngIf=\"leftIcon || leftIconData\" class=\"input-text-left-icon\" [icon]=\"leftIcon\" [iconData]=\"leftIconData\"\n (click)=\"handleLeftIconClick($event)\" (mousedown)=\"handleLeftIconMouseDown($event)\"\n (mouseup)=\"handleLeftIconMouseUp($event)\"></co-icon>\n <div *ngIf=\"leftIcon || leftIconData\" class=\"spacer left-icon\"></div>\n <div class=\"input-wrapper\">\n <label *ngIf=\"showPlaceholderOnFocus || (!showPlaceholderOnFocus && !hasValue && !focused)\"\n [textContent]=\"placeholder\"></label>\n <input #input\n [
|
|
6263
|
+
template: "\n <div class=\"input-text-wrapper\" overlayParent #parentForOverlay=\"overlayParent\">\n <co-icon *ngIf=\"leftIcon || leftIconData\" class=\"input-text-left-icon\" [icon]=\"leftIcon\" [iconData]=\"leftIconData\"\n (click)=\"handleLeftIconClick($event)\" (mousedown)=\"handleLeftIconMouseDown($event)\"\n (mouseup)=\"handleLeftIconMouseUp($event)\"></co-icon>\n <div *ngIf=\"leftIcon || leftIconData\" class=\"spacer left-icon\"></div>\n <div class=\"input-wrapper\">\n <label *ngIf=\"showPlaceholderOnFocus || (!showPlaceholderOnFocus && !hasValue && !focused)\"\n [textContent]=\"placeholder\"></label>\n <input #input\n [class.input-input-hidden]=\"useContent\"\n [ngClass]=\"align\"\n [type]=\"digitsOnly ? 'number' : type\"\n [pattern]=\"type === 'date' ? pattern : undefined\"\n [ngModel]=\"model\"\n [min]=\"(type === 'number' || type === 'date') && this.min ? this.min : undefined\"\n [max]=\"(type === 'number' || type === 'date') && this.max ? this.max : undefined\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n (ngModelChange)=\"modelChange.emit($event)\"\n (keydown)=\"digitsOnly ? excludeNonDigitChars($event) : true\"\n >\n <ng-container *ngIf=\"useContent\">\n <div class=\"input-content-wrapper\">\n <ng-content></ng-content>\n </div>\n </ng-container>\n <co-icon [class.show]=\"showClearButton && hasValue && focused && !readonly\" class=\"input-text-clear-button\" [icon]=\"icons.CrossSkinny\" (click)=\"clearInput($event)\"></co-icon>\n <div class=\"required-indicator\"></div>\n </div>\n <div *ngIf=\"rightIcon || rightIconData\" class=\"spacer right-icon\"></div>\n <co-icon *ngIf=\"rightIcon || rightIconData\" class=\"input-text-right-icon\" [icon]=\"rightIcon\" [iconData]=\"rightIconData\"\n (click)=\"handleRightIconClick($event)\" (mousedown)=\"handleRightIconMouseDown($event)\" (mouseup)=\"handleRightIconMouseUp($event)\"></co-icon>\n </div>\n <!--\n <co-commit-buttons *ngIf=\"showSaveCancel && focused && canSaveOrCancel\"\n [committing]=\"committing\"\n [commitFinished]=\"commitFinished\"\n (commitClick)=\"commitClick($event)\"\n (cancelClick)=\"cancelClick($event)\"\n >\n </co-commit-buttons>\n -->\n ",
|
|
6260
6264
|
providers: [
|
|
6261
6265
|
OverlayService, {
|
|
6262
6266
|
provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
|
|
@@ -10882,12 +10886,14 @@
|
|
|
10882
10886
|
];
|
|
10883
10887
|
|
|
10884
10888
|
var ListOfValuesPopupComponent = /** @class */ (function () {
|
|
10885
|
-
function ListOfValuesPopupComponent() {
|
|
10889
|
+
function ListOfValuesPopupComponent(_elementRef) {
|
|
10890
|
+
this._elementRef = _elementRef;
|
|
10886
10891
|
this.multiselect = false;
|
|
10887
10892
|
this.displayField = 'description';
|
|
10888
10893
|
this.searchDisabled = false;
|
|
10889
10894
|
this.modelChange = new i0.EventEmitter();
|
|
10890
10895
|
this.closePopup = new i0.EventEmitter();
|
|
10896
|
+
this.keyDown = new i0.EventEmitter();
|
|
10891
10897
|
this.viewModels = [];
|
|
10892
10898
|
this.viewModelsMain = [];
|
|
10893
10899
|
this._collection = [];
|
|
@@ -10973,8 +10979,14 @@
|
|
|
10973
10979
|
case KeyboardKey.SpaceBar:
|
|
10974
10980
|
if (this.highLightModel) {
|
|
10975
10981
|
this.selectViewModel(this.highLightModel, false);
|
|
10976
|
-
return false;
|
|
10977
10982
|
}
|
|
10983
|
+
else {
|
|
10984
|
+
this.keyDown.next(event);
|
|
10985
|
+
}
|
|
10986
|
+
return false;
|
|
10987
|
+
default:
|
|
10988
|
+
this.keyDown.next(event);
|
|
10989
|
+
return true;
|
|
10978
10990
|
}
|
|
10979
10991
|
}
|
|
10980
10992
|
};
|
|
@@ -11047,6 +11059,9 @@
|
|
|
11047
11059
|
if (!this.multiselect) {
|
|
11048
11060
|
this.selectViewModel(nextModel, false);
|
|
11049
11061
|
}
|
|
11062
|
+
else {
|
|
11063
|
+
this._scrollIntoView();
|
|
11064
|
+
}
|
|
11050
11065
|
};
|
|
11051
11066
|
ListOfValuesPopupComponent.prototype._prepareViewModelsMain = function () {
|
|
11052
11067
|
var _this = this;
|
|
@@ -11075,7 +11090,8 @@
|
|
|
11075
11090
|
return;
|
|
11076
11091
|
}
|
|
11077
11092
|
var offsetHeight = activeItem.offsetHeight, offsetTop = activeItem.offsetTop;
|
|
11078
|
-
var parentOffsetHeight = scrollParent.offsetHeight, scrollTop = scrollParent.scrollTop;
|
|
11093
|
+
var parentOffsetHeight = scrollParent.offsetHeight, scrollTop = scrollParent.scrollTop, parentOffsetTop = scrollParent.offsetTop;
|
|
11094
|
+
offsetTop = offsetTop - parentOffsetTop;
|
|
11079
11095
|
var isAbove = offsetTop < scrollTop;
|
|
11080
11096
|
var isBelow = offsetTop + offsetHeight > scrollTop + parentOffsetHeight;
|
|
11081
11097
|
if (isAbove) {
|
|
@@ -11090,10 +11106,13 @@
|
|
|
11090
11106
|
ListOfValuesPopupComponent.decorators = [
|
|
11091
11107
|
{ type: i0.Component, args: [{
|
|
11092
11108
|
selector: 'co-list-of-values-popup',
|
|
11093
|
-
template: "\n <div class=\"lov-options\" [overlay]=\"parentForOverlay\" [inheritWidth]=\"true\" [ngClass]=\"customCssClass\" id=\"lov-popup\"\n
|
|
11109
|
+
template: "\n <div class=\"lov-options\" [overlay]=\"parentForOverlay\" [inheritWidth]=\"true\" [ngClass]=\"customCssClass\" id=\"lov-popup\"\n role=\"listbox\" [tabindex]=\"-1\"\n (clickOutside)=\"closePopup.emit($event)\">\n <co-input-search *ngIf=\"multiselect\"\n tabindex=\"-1\"\n [(model)]=\"searchTerm\"\n [placeholder]=\"searchPlaceholder\"\n (keydown)=\"handleInputKeyDown($event)\"\n (modelChange)=\"filterViewModels()\"></co-input-search>\n <ul class=\"dropdown-list\" #dropDownList>\n <li #lovItem *ngFor=\"let viewModel of viewModels; let index = index\" [class.selected]=\"viewModel === highLightModel\"\n (click)=\"selectViewModel(viewModel, !multiselect)\" role=\"option\">\n <ng-container *ngIf=\"!multiselect\">\n <span class=\"lov-options-text\" [textContent]=\"viewModel.model[displayField]\"></span>\n </ng-container>\n <ng-container *ngIf=\"multiselect\">\n <co-input-checkbox [model]=\"viewModel.checked\" (modelChange)=\"selectViewModel(viewModel, false)\"></co-input-checkbox>\n <span class=\"lov-options-text\" [textContent]=\"viewModel.model[displayField]\"></span>\n </ng-container>\n </li>\n </ul>\n </div>\n ",
|
|
11094
11110
|
encapsulation: i0.ViewEncapsulation.None
|
|
11095
11111
|
},] }
|
|
11096
11112
|
];
|
|
11113
|
+
ListOfValuesPopupComponent.ctorParameters = function () { return [
|
|
11114
|
+
{ type: i0.ElementRef }
|
|
11115
|
+
]; };
|
|
11097
11116
|
ListOfValuesPopupComponent.propDecorators = {
|
|
11098
11117
|
lovItems: [{ type: i0.ViewChildren, args: ['lovItem', { read: i0.ElementRef },] }],
|
|
11099
11118
|
dropDownList: [{ type: i0.ViewChild, args: ['dropDownList', { read: i0.ElementRef },] }],
|
|
@@ -11108,6 +11127,7 @@
|
|
|
11108
11127
|
collection: [{ type: i0.Input }],
|
|
11109
11128
|
modelChange: [{ type: i0.Output }],
|
|
11110
11129
|
closePopup: [{ type: i0.Output }],
|
|
11130
|
+
keyDown: [{ type: i0.Output }],
|
|
11111
11131
|
showClass: [{ type: i0.HostBinding, args: ['class.co-list-of-values-popup',] }]
|
|
11112
11132
|
};
|
|
11113
11133
|
|
|
@@ -11119,7 +11139,6 @@
|
|
|
11119
11139
|
_this.multiselect = false;
|
|
11120
11140
|
_this.displayField = 'description';
|
|
11121
11141
|
_this.searchDisabled = false;
|
|
11122
|
-
_this.closeAfterOptionChosen = true;
|
|
11123
11142
|
_this.isSelectOpen = false;
|
|
11124
11143
|
_this.state = 'default';
|
|
11125
11144
|
_this.selectedModels = [];
|
|
@@ -11158,6 +11177,9 @@
|
|
|
11158
11177
|
if (this._lovPopupComponentRef) {
|
|
11159
11178
|
this._lovPopupComponentRef.instance.searchTerm = model;
|
|
11160
11179
|
}
|
|
11180
|
+
if (!this.selectedModel && model) {
|
|
11181
|
+
this.openPopup();
|
|
11182
|
+
}
|
|
11161
11183
|
this.selectedModel = model;
|
|
11162
11184
|
};
|
|
11163
11185
|
ListOfValuesComponent.prototype.handleInputKeyDown = function (event) {
|
|
@@ -11216,8 +11238,10 @@
|
|
|
11216
11238
|
collection: this.collection
|
|
11217
11239
|
}, {
|
|
11218
11240
|
modelChange: function (value) { return _this.optionChosen(value); },
|
|
11219
|
-
closePopup: function () { return _this.closePopup(); }
|
|
11241
|
+
closePopup: function () { return _this.closePopup(); },
|
|
11242
|
+
keyDown: function (event) { return _this.handleInputKeyDown(event); }
|
|
11220
11243
|
});
|
|
11244
|
+
this.keepFocussed = true;
|
|
11221
11245
|
};
|
|
11222
11246
|
ListOfValuesComponent.prototype.removeOptionFromModel = function (chip) {
|
|
11223
11247
|
if (this.multiselect) {
|
|
@@ -11234,15 +11258,13 @@
|
|
|
11234
11258
|
}
|
|
11235
11259
|
else {
|
|
11236
11260
|
this.selectedModel = option[this.displayField];
|
|
11237
|
-
if (this.closeAfterOptionChosen) {
|
|
11238
|
-
this.toggleSelect();
|
|
11239
|
-
}
|
|
11240
11261
|
}
|
|
11241
11262
|
}
|
|
11242
11263
|
this.model = option;
|
|
11243
11264
|
this.modelChange.emit(this.model);
|
|
11244
11265
|
};
|
|
11245
11266
|
ListOfValuesComponent.prototype.closePopup = function () {
|
|
11267
|
+
this.keepFocussed = false;
|
|
11246
11268
|
this.isSelectOpen = false;
|
|
11247
11269
|
this.overlayService.removeComponent(this._lovPopupComponentRef);
|
|
11248
11270
|
this._lovPopupComponentRef = undefined;
|
|
@@ -11288,7 +11310,7 @@
|
|
|
11288
11310
|
ListOfValuesComponent.decorators = [
|
|
11289
11311
|
{ type: i0.Component, args: [{
|
|
11290
11312
|
selector: 'co-list-of-values',
|
|
11291
|
-
template: "\n <co-input-text aria-haspopup=\"listbox\" [attr.aria-expanded]=\"isSelectOpen\" aria-controls=\"lov-popup\" role=\"combobox\"\n class=\"no-focus-line\"\n overlayParent\n #parentForOverlay=\"overlayParent\" type=\"text\" [id]=\"label\"\n [model]=\"multiselect ? selectedModels : selectedModel\"\n [placeholder]=\"label\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [noClickFocus]=\"false\"\n [leftIconData]=\"leftIconData\"\n [rightIcon]=\"isSelectOpen ? icons.ChevronUpRegular : icons.ChevronDownRegular\"\n [showClearButton]=\"true\"\n [useContent]=\"multiselect\"\n (modelChange)=\"handleInputModelChange($event)\"\n (click)=\"openPopup()\"\n (rightIconClick)=\"toggleSelect()\"\n (keydown)=\"handleInputKeyDown($event)\"\n (clearIconClick)=\"clearModel($event)\"\n (blur)=\"checkModel()\"\n >\n
|
|
11313
|
+
template: "\n <co-input-text aria-haspopup=\"listbox\" [attr.aria-expanded]=\"isSelectOpen\" aria-controls=\"lov-popup\" role=\"combobox\"\n class=\"no-focus-line\"\n overlayParent\n #parentForOverlay=\"overlayParent\" type=\"text\" [id]=\"label\"\n [model]=\"multiselect ? selectedModels : selectedModel\"\n [placeholder]=\"label\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [noClickFocus]=\"false\"\n [leftIconData]=\"leftIconData\"\n [rightIcon]=\"isSelectOpen ? icons.ChevronUpRegular : icons.ChevronDownRegular\"\n [showClearButton]=\"true\"\n [useContent]=\"multiselect\"\n [customHeight]=\"multiselect\"\n [keepFocussed]=\"keepFocussed\"\n (modelChange)=\"handleInputModelChange($event)\"\n (click)=\"openPopup()\"\n (rightIconClick)=\"toggleSelect()\"\n (keydown)=\"handleInputKeyDown($event)\"\n (clearIconClick)=\"clearModel($event)\"\n (blur)=\"checkModel()\"\n >\n <ng-container *ngIf=\"multiselect\">\n <div class=\"multiselect-chips-wrapper\">\n <div class=\"chips\" *ngFor=\"let chip of model\">\n <span class=\"chips-description\" [textContent]=\"chip[displayField]\"></span>\n <co-icon class=\"remove-chip-icon\" [icon]=\"icons.CrossSkinny\" (click)=\"removeOptionFromModel(chip)\"></co-icon>\n </div>\n </div>\n </ng-container>\n </co-input-text>\n ",
|
|
11292
11314
|
providers: [
|
|
11293
11315
|
OverlayService
|
|
11294
11316
|
],
|
|
@@ -11306,7 +11328,6 @@
|
|
|
11306
11328
|
label: [{ type: i0.Input }],
|
|
11307
11329
|
customCssClass: [{ type: i0.Input }],
|
|
11308
11330
|
searchDisabled: [{ type: i0.Input }],
|
|
11309
|
-
closeAfterOptionChosen: [{ type: i0.Input }],
|
|
11310
11331
|
showClass: [{ type: i0.HostBinding, args: ['class.co-list-of-values',] }]
|
|
11311
11332
|
};
|
|
11312
11333
|
|