@colijnit/corecomponents_v12 256.1.15 → 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.
@@ -6216,9 +6216,10 @@
6216
6216
 
6217
6217
  var InputTextComponent = /** @class */ (function (_super) {
6218
6218
  __extends(InputTextComponent, _super);
6219
- function InputTextComponent(formComponent, changeDetector, overlayService, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
6219
+ function InputTextComponent(formComponent, injector, changeDetector, overlayService, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
6220
6220
  var _this = _super.call(this, changeDetector, componentFactoryResolver, overlayService, formUserChangeListener, ngZoneWrapper, elementRef) || this;
6221
6221
  _this.formComponent = formComponent;
6222
+ _this.injector = injector;
6222
6223
  _this.changeDetector = changeDetector;
6223
6224
  _this.overlayService = overlayService;
6224
6225
  _this.componentFactoryResolver = componentFactoryResolver;
@@ -6305,6 +6306,21 @@
6305
6306
  enumerable: false,
6306
6307
  configurable: true
6307
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
+ });
6308
6324
  // exclude some non-digit characters, since input type 'number' still allows the characters -, + and e
6309
6325
  InputTextComponent.prototype.excludeNonDigitChars = function (event) {
6310
6326
  var excludedKeys = this.excludePlusMinus ? ['e', '-', '+'] : ['e'];
@@ -6372,7 +6388,7 @@
6372
6388
  InputTextComponent.decorators = [
6373
6389
  { type: i0.Component, args: [{
6374
6390
  selector: 'co-input-text',
6375
- 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 ",
6376
6392
  providers: [
6377
6393
  OverlayService, {
6378
6394
  provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
@@ -6387,6 +6403,7 @@
6387
6403
  ];
6388
6404
  InputTextComponent.ctorParameters = function () { return [
6389
6405
  { type: FormComponent, decorators: [{ type: i0.Optional }] },
6406
+ { type: i0.Injector },
6390
6407
  { type: i0.ChangeDetectorRef },
6391
6408
  { type: OverlayService },
6392
6409
  { type: i0.ComponentFactoryResolver },
@@ -6399,6 +6416,7 @@
6399
6416
  placeholder: [{ type: i0.Input }],
6400
6417
  align: [{ type: i0.Input }],
6401
6418
  type: [{ type: i0.Input }],
6419
+ formatPipe: [{ type: i0.Input }],
6402
6420
  min: [{ type: i0.Input }],
6403
6421
  max: [{ type: i0.Input }],
6404
6422
  pattern: [{ type: i0.Input }],