@colijnit/corecomponents_v12 260.1.15 → 260.1.16
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 +12 -25
- 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 +5 -16
- package/esm2015/lib/components/base/commit-buttons/commit-buttons.component.js +2 -2
- package/esm2015/lib/components/input-text/input-text.component.js +3 -1
- package/esm2015/lib/components/list-of-values/list-of-values.component.js +53 -53
- package/esm2015/lib/directives/screen-configuration/screen-configuration.directive.js +2 -2
- package/fesm2015/colijnit-corecomponents_v12.js +60 -69
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/base/base-input.component.d.ts +1 -3
- package/package.json +1 -1
|
@@ -2222,7 +2222,7 @@
|
|
|
2222
2222
|
CommitButtonsComponent.decorators = [
|
|
2223
2223
|
{ type: i0.Component, args: [{
|
|
2224
2224
|
selector: 'co-commit-buttons',
|
|
2225
|
-
template: "\n <div class=\"commit-buttons-wrapper\" [overlay]=\"parentForOverlay\" [rightAlign]=\"true\" @showHideSaveCancel>\n <div class=\"commit-buttons-button save\" [class.finished]=\"commitFinished\"\n (click)=\"commitClick.emit($event)\">\n <div class=\"save-button-spinner\" *ngIf=\"committing\">\n <div #animatediv></div>\n <div #animatediv></div>\n <div #animatediv></div>\n <div #animatediv></div>\n </div>\n <svg class=\"checkmark\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 52 52\" *ngIf=\"firstShow || commitFinished\">\n <path class=\"checkmark-check\" [class.first-show]=\"firstShow\" fill=\"none\" d=\"M14.1 27.2l7.1 7.2 16.7-16.8\"/></svg>\n </div>\n <div class=\"commit-buttons-button cancel\" (click)=\"cancelClick.emit($event)\">\n <div class=\"cancel-button\"></div>\n </div>\n </div>\n ",
|
|
2225
|
+
template: "\n <div class=\"commit-buttons-wrapper\" [overlay]=\"parentForOverlay\" [rightAlign]=\"true\" @showHideSaveCancel>\n <div class=\"commit-buttons-button save\" [class.finished]=\"commitFinished\"\n (click)=\"commitClick.emit($event)\">\n <div class=\"save-button-spinner\" *ngIf=\"committing\">\n <div #animatediv></div>\n <div #animatediv></div>\n <div #animatediv></div>\n <div #animatediv></div>\n </div>\n <svg class=\"checkmark\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 52 52\" *ngIf=\"firstShow || commitFinished\">\n <path class=\"checkmark-check\" [class.first-show]=\"firstShow\" fill=\"none\" d=\"M14.1 27.2l7.1 7.2 16.7-16.8\"/></svg>\n </div>\n <div class=\"commit-buttons-button cancel\" (mousedown)=\"$event.preventDefault()\" (click)=\"cancelClick.emit($event)\">\n <div class=\"cancel-button\"></div>\n </div>\n </div>\n ",
|
|
2226
2226
|
animations: [
|
|
2227
2227
|
animations.trigger('showHideSaveCancel', [
|
|
2228
2228
|
animations.state('*', animations.style({ transform: 'scaleY(1)', opacity: 1 })),
|
|
@@ -2291,8 +2291,8 @@
|
|
|
2291
2291
|
this.excludeUserModelChange = false;
|
|
2292
2292
|
this.noFormGroupControl = false;
|
|
2293
2293
|
this.keepFocus = false;
|
|
2294
|
-
this.canceled = false;
|
|
2295
2294
|
this.validationError = '';
|
|
2295
|
+
this.shouldCommit = true;
|
|
2296
2296
|
this._markedAsUserTouched = false;
|
|
2297
2297
|
this._destroyed = false;
|
|
2298
2298
|
this._hasOnPushCdStrategy = false;
|
|
@@ -2709,8 +2709,7 @@
|
|
|
2709
2709
|
this.input = undefined;
|
|
2710
2710
|
};
|
|
2711
2711
|
BaseInputComponent.prototype.cancelClick = function (event) {
|
|
2712
|
-
this.
|
|
2713
|
-
this.conditionResolver(this.canceled);
|
|
2712
|
+
this.shouldCommit = false;
|
|
2714
2713
|
this.keepFocus = true;
|
|
2715
2714
|
if (this._initialModelSet) {
|
|
2716
2715
|
this.model = this._initialModel;
|
|
@@ -2764,34 +2763,19 @@
|
|
|
2764
2763
|
}
|
|
2765
2764
|
this.focus.next();
|
|
2766
2765
|
};
|
|
2767
|
-
BaseInputComponent.prototype.waitForCancelCondition = function () {
|
|
2768
|
-
var _this = this;
|
|
2769
|
-
return new Promise(function (resolve) {
|
|
2770
|
-
_this.conditionResolver = resolve; // Save the resolver to be called later
|
|
2771
|
-
});
|
|
2772
|
-
};
|
|
2773
2766
|
BaseInputComponent.prototype.doBlur = function (event, handleCommit) {
|
|
2774
2767
|
if (handleCommit === void 0) { handleCommit = true; }
|
|
2775
2768
|
return __awaiter(this, void 0, void 0, function () {
|
|
2776
|
-
var cancelTimeout, result;
|
|
2777
2769
|
var _this = this;
|
|
2778
2770
|
return __generator(this, function (_a) {
|
|
2779
2771
|
switch (_a.label) {
|
|
2780
2772
|
case 0:
|
|
2781
|
-
|
|
2782
|
-
return [4 /*yield*/, Promise.race([this.waitForCancelCondition(), cancelTimeout])];
|
|
2783
|
-
case 1:
|
|
2784
|
-
result = _a.sent();
|
|
2785
|
-
// If canceled
|
|
2786
|
-
if (result) {
|
|
2787
|
-
return [2 /*return*/];
|
|
2788
|
-
}
|
|
2789
|
-
if (!(this.showSaveCancel && handleCommit && this._modelDirtyForCommit)) return [3 /*break*/, 3];
|
|
2773
|
+
if (!(this.showSaveCancel && handleCommit && this._modelDirtyForCommit && this.shouldCommit)) return [3 /*break*/, 2];
|
|
2790
2774
|
return [4 /*yield*/, this._handleCommit(event, false)];
|
|
2791
|
-
case
|
|
2775
|
+
case 1:
|
|
2792
2776
|
_a.sent();
|
|
2793
|
-
_a.label =
|
|
2794
|
-
case
|
|
2777
|
+
_a.label = 2;
|
|
2778
|
+
case 2:
|
|
2795
2779
|
setTimeout(function () {
|
|
2796
2780
|
if (_this.keepFocus || _this.keepFocussed) {
|
|
2797
2781
|
if (event) {
|
|
@@ -2935,6 +2919,7 @@
|
|
|
2935
2919
|
return [2 /*return*/, true];
|
|
2936
2920
|
}
|
|
2937
2921
|
this.keepFocus = true;
|
|
2922
|
+
this.shouldCommit = true;
|
|
2938
2923
|
if (this._commitButtonsComponentRef) {
|
|
2939
2924
|
this._commitButtonsComponentRef.instance.commitFinished = false;
|
|
2940
2925
|
this._commitButtonsComponentRef.instance.committing = true;
|
|
@@ -6451,6 +6436,8 @@
|
|
|
6451
6436
|
};
|
|
6452
6437
|
InputTextComponent.prototype.clearInput = function (event) {
|
|
6453
6438
|
this.setModel(null);
|
|
6439
|
+
this.keepFocus = true;
|
|
6440
|
+
this.shouldCommit = false;
|
|
6454
6441
|
this.clearIconClick.emit(event);
|
|
6455
6442
|
};
|
|
6456
6443
|
InputTextComponent.prototype.handleKeyDownInput = function (event) {
|
|
@@ -12253,7 +12240,7 @@
|
|
|
12253
12240
|
ListOfValuesComponent.decorators = [
|
|
12254
12241
|
{ type: i0.Component, args: [{
|
|
12255
12242
|
selector: 'co-list-of-values',
|
|
12256
|
-
template: "\n <co-input-text\n *ngIf=\"!largeCollection\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"isSelectOpen\"\n aria-controls=\"lov-popup\"\n role=\"combobox\"\n class=\"no-focus-line\"\n overlayParent\n #parentForOverlay=\"overlayParent\"\n type=\"text\"\n [id]=\"label\"\n [model]=\"multiselect ? selectedModels : selectedModel\"\n [placeholder]=\"label\"\n [myFormInputInstance]=\"this\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [noClickFocus]=\"false\"\n [leftIconData]=\" model && model[optionIcon] ? iconCacheService.getIcon(model[optionIcon]) : 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 <ng-container *ngIf=\"multiselect && showChips\">\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\n <co-input-text\n *ngIf=\"largeCollection\"\n [model]=\"filterText\"\n [placeholder]=\"label\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (modelChange)=\"onModelChange($event)\">\n </co-input-text>\n <div *ngIf=\"isLoading\" class=\"filter-loader\"><span></span></div>\n <input type=\"hidden\" [ngModel]=\"model\">\n ",
|
|
12243
|
+
template: "\n <co-input-text\n *ngIf=\"!largeCollection\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"isSelectOpen\"\n aria-controls=\"lov-popup\"\n role=\"combobox\"\n class=\"no-focus-line\"\n overlayParent\n #parentForOverlay=\"overlayParent\"\n type=\"text\"\n [id]=\"label\"\n [model]=\"multiselect ? ((!selectedModels || selectedModels.length === 0) ? null : selectedModels ) : selectedModel\"\n [placeholder]=\"label\"\n [myFormInputInstance]=\"this\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [noClickFocus]=\"false\"\n [leftIconData]=\" model && model[optionIcon] ? iconCacheService.getIcon(model[optionIcon]) : 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 <ng-container *ngIf=\"multiselect && showChips\">\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\n <co-input-text\n *ngIf=\"largeCollection\"\n [model]=\"filterText\"\n [placeholder]=\"label\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (modelChange)=\"onModelChange($event)\">\n </co-input-text>\n <div *ngIf=\"isLoading\" class=\"filter-loader\"><span></span></div>\n <input type=\"hidden\" [ngModel]=\"(selectedModels && selectedModels.length) || selectedModel ? model : null\">\n ",
|
|
12257
12244
|
providers: [
|
|
12258
12245
|
OverlayService,
|
|
12259
12246
|
{
|
|
@@ -14840,7 +14827,7 @@
|
|
|
14840
14827
|
if (myCfgObj) {
|
|
14841
14828
|
this._setHostVisible(myCfgObj.immediatelyVisible());
|
|
14842
14829
|
if (!this.screenConfigNativeElement) {
|
|
14843
|
-
this.hostComponent.required = myCfgObj.isRequired();
|
|
14830
|
+
this.hostComponent.required = this.hostComponent.required || myCfgObj.isRequired();
|
|
14844
14831
|
this.hostComponent.readonly = this.hostComponent.forceReadonly || this._moduleInReadonlyMode() || myCfgObj.isReadonly();
|
|
14845
14832
|
this.hostComponent.decimals = myCfgObj.scale;
|
|
14846
14833
|
this.hostComponent.maxLength = myCfgObj.maxLength;
|