@colijnit/corecomponents_v12 256.1.14 → 256.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.
@@ -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',] }],
@@ -6213,9 +6216,10 @@
6213
6216
 
6214
6217
  var InputTextComponent = /** @class */ (function (_super) {
6215
6218
  __extends(InputTextComponent, _super);
6216
- function InputTextComponent(formComponent, changeDetector, overlayService, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
6219
+ function InputTextComponent(formComponent, injector, changeDetector, overlayService, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
6217
6220
  var _this = _super.call(this, changeDetector, componentFactoryResolver, overlayService, formUserChangeListener, ngZoneWrapper, elementRef) || this;
6218
6221
  _this.formComponent = formComponent;
6222
+ _this.injector = injector;
6219
6223
  _this.changeDetector = changeDetector;
6220
6224
  _this.overlayService = overlayService;
6221
6225
  _this.componentFactoryResolver = componentFactoryResolver;
@@ -6302,6 +6306,21 @@
6302
6306
  enumerable: false,
6303
6307
  configurable: true
6304
6308
  });
6309
+ Object.defineProperty(InputTextComponent.prototype, "pipedModel", {
6310
+ get: function () {
6311
+ if (this.formatPipe) {
6312
+ try {
6313
+ var pipe = new this.formatPipe(this);
6314
+ return pipe.transform(this.model);
6315
+ }
6316
+ catch (e) {
6317
+ }
6318
+ }
6319
+ return this.model;
6320
+ },
6321
+ enumerable: false,
6322
+ configurable: true
6323
+ });
6305
6324
  // exclude some non-digit characters, since input type 'number' still allows the characters -, + and e
6306
6325
  InputTextComponent.prototype.excludeNonDigitChars = function (event) {
6307
6326
  var excludedKeys = this.excludePlusMinus ? ['e', '-', '+'] : ['e'];
@@ -6369,7 +6388,7 @@
6369
6388
  InputTextComponent.decorators = [
6370
6389
  { type: i0.Component, args: [{
6371
6390
  selector: 'co-input-text',
6372
- 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]=\"(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 ",
6391
+ 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 ",
6373
6392
  providers: [
6374
6393
  OverlayService, {
6375
6394
  provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
@@ -6384,6 +6403,7 @@
6384
6403
  ];
6385
6404
  InputTextComponent.ctorParameters = function () { return [
6386
6405
  { type: FormComponent, decorators: [{ type: i0.Optional }] },
6406
+ { type: i0.Injector },
6387
6407
  { type: i0.ChangeDetectorRef },
6388
6408
  { type: OverlayService },
6389
6409
  { type: i0.ComponentFactoryResolver },
@@ -6396,6 +6416,7 @@
6396
6416
  placeholder: [{ type: i0.Input }],
6397
6417
  align: [{ type: i0.Input }],
6398
6418
  type: [{ type: i0.Input }],
6419
+ formatPipe: [{ type: i0.Input }],
6399
6420
  min: [{ type: i0.Input }],
6400
6421
  max: [{ type: i0.Input }],
6401
6422
  pattern: [{ type: i0.Input }],