@colijnit/corecomponents_v12 257.1.12 → 257.1.14

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.
@@ -2267,6 +2267,7 @@
2267
2267
  this.modelChange = new i0.EventEmitter();
2268
2268
  this.userModelChange = new i0.EventEmitter();
2269
2269
  this.hiddenChange = new i0.EventEmitter();
2270
+ this.cancelClicked = new i0.EventEmitter();
2270
2271
  this.focused = false;
2271
2272
  this.formInput = true;
2272
2273
  this.customWidth = false;
@@ -2693,6 +2694,7 @@
2693
2694
  this.model = this._initialModel;
2694
2695
  }
2695
2696
  this.keepFocus = false;
2697
+ this.cancelClicked.emit();
2696
2698
  };
2697
2699
  BaseInputComponent.prototype.showValidationError = function (error) {
2698
2700
  this.validationError = error;
@@ -3166,6 +3168,7 @@
3166
3168
  modelChange: [{ type: i0.Output }],
3167
3169
  userModelChange: [{ type: i0.Output }],
3168
3170
  hiddenChange: [{ type: i0.Output }],
3171
+ cancelClicked: [{ type: i0.Output }],
3169
3172
  focused: [{ type: i0.HostBinding, args: ['class.cc-input-focused',] }],
3170
3173
  formInput: [{ type: i0.HostBinding, args: ['class.form-input',] }],
3171
3174
  customWidth: [{ type: i0.Input }, { type: i0.HostBinding, args: ['class.custom-width',] }],
@@ -6376,6 +6379,11 @@
6376
6379
  }
6377
6380
  this.isFocused.emit(false);
6378
6381
  };
6382
+ InputTextComponent.prototype.handleDoFocus = function (event) {
6383
+ if (!this.readonly) {
6384
+ this.doFocus(event);
6385
+ }
6386
+ };
6379
6387
  InputTextComponent.prototype.clearInput = function (event) {
6380
6388
  this.setModel(null);
6381
6389
  this.clearIconClick.emit(event);
@@ -6385,7 +6393,7 @@
6385
6393
  InputTextComponent.decorators = [
6386
6394
  { type: i0.Component, args: [{
6387
6395
  selector: 'co-input-text',
6388
- 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 <span class=\"input-text-formatted\" *ngIf=\"!focused && !useContent && formatPipe\"\n [class.show]=\"!focused && !useContent && formatPipe\"\n [ngClass]=\"align\"\n [textContent]=\"pipedModel\" \n (click)=\"doFocus($event)\"\n ></span>\n <input [class.show]=\"focused || !formatPipe\" #input\n [class.input-input-hidden]=\"useContent\"\n [ngClass]=\"align\"\n [type]=\"(isFocusedOnDate || (hasValue && emptyPlace)) ? 'date' : (digitsOnly ? 'number' : (type === 'date' ? 'text' : type))\"\n [placeholder]=\"type === 'date' && !isFocusedOnDate ? '' : ''\"\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 (keyup)=\"keyUp.emit($event)\"\n (focusin)=\"handleInputFocus($event)\"\n (focusout)=\"handleBlur($event)\"\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 && !readonly\" class=\"input-text-clear-button\"\n [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\"\n [iconData]=\"rightIconData\"\n (click)=\"handleRightIconClick($event)\" (mousedown)=\"handleRightIconMouseDown($event)\"\n (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 ",
6396
+ 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 <span class=\"input-text-formatted\" *ngIf=\"!focused && !useContent && formatPipe\"\n [class.show]=\"!focused && !useContent && formatPipe\"\n [ngClass]=\"align\"\n [textContent]=\"pipedModel\"\n (click)=\"handleDoFocus($event)\"\n ></span>\n <input [class.show]=\"focused || !formatPipe\" #input\n [class.input-input-hidden]=\"useContent\"\n [ngClass]=\"align\"\n [type]=\"(isFocusedOnDate || (hasValue && emptyPlace)) ? 'date' : (digitsOnly ? 'number' : (type === 'date' ? 'text' : type))\"\n [placeholder]=\"type === 'date' && !isFocusedOnDate ? '' : ''\"\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 (keyup)=\"keyUp.emit($event)\"\n (focusin)=\"handleInputFocus($event)\"\n (focusout)=\"handleBlur($event)\"\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 && !readonly\" class=\"input-text-clear-button\"\n [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\"\n [iconData]=\"rightIconData\"\n (click)=\"handleRightIconClick($event)\" (mousedown)=\"handleRightIconMouseDown($event)\"\n (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 ",
6389
6397
  providers: [
6390
6398
  OverlayService, {
6391
6399
  provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,