@colijnit/corecomponents_v12 12.0.99 → 12.0.101

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.
Files changed (24) hide show
  1. package/bundles/colijnit-corecomponents_v12.umd.js +25 -10
  2. package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
  3. package/colijnit-corecomponents_v12.metadata.json +1 -1
  4. package/esm2015/lib/components/image/image.component.js +30 -8
  5. package/esm2015/lib/components/image/image.module.js +3 -2
  6. package/esm2015/lib/components/input-number-picker/input-number-picker.component.js +4 -3
  7. package/esm2015/lib/core/constant/default-upper-bound-for-range-components.js +2 -1
  8. package/esm2015/lib/core/model/bounds-constrained-number-value.js +3 -3
  9. package/fesm2015/colijnit-corecomponents_v12.js +33 -10
  10. package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
  11. package/lib/components/icon-collapse-handle/style/material.scss +0 -1
  12. package/lib/components/image/image.component.d.ts +18 -2
  13. package/lib/components/image/style/_layout.scss +29 -0
  14. package/lib/components/image/style/_material-definition.scss +10 -0
  15. package/lib/components/image/style/_theme.scss +14 -0
  16. package/lib/components/image/style/material.scss +4 -0
  17. package/lib/components/input-number-picker/style/_layout.scss +0 -1
  18. package/lib/components/input-number-picker/style/_material-definition.scss +4 -5
  19. package/lib/components/input-search/style/_material-definition.scss +1 -1
  20. package/lib/components/simple-grid/style/_material-definition.scss +2 -2
  21. package/lib/core/constant/default-upper-bound-for-range-components.d.ts +1 -0
  22. package/lib/style/_input.mixins.scss +3 -1
  23. package/lib/style/_variables.scss +5 -2
  24. package/package.json +1 -1
@@ -2027,21 +2027,34 @@
2027
2027
  ];
2028
2028
 
2029
2029
  var ImageComponent = /** @class */ (function () {
2030
- function ImageComponent() {
2030
+ function ImageComponent(_sanitizer) {
2031
+ this._sanitizer = _sanitizer;
2032
+ this.showClass = true;
2033
+ this.error = false;
2034
+ this._defaultPlaceholder = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><path d="M35,18l-3-4H22l-3,4H16V36H40V18ZM24,16h6v2H24Zm2.5,18A6.5,6.5,0,1,1,33,27.5,6.51,6.51,0,0,1,26.5,34ZM38,22H36V20h2Z" fill="#484f60"/><rect x="10" y="18" width="5" height="18" fill="#484f60"/><rect x="11" y="15" width="3" height="2" fill="#484f60"/><path d="M26.5,32A4.5,4.5,0,1,1,31,27.5,4.51,4.51,0,0,1,26.5,32Z" fill="#484f60"/></svg>';
2031
2035
  }
2036
+ ImageComponent.prototype.ngOnInit = function () {
2037
+ this.innerPlaceHolder = this._sanitizer.bypassSecurityTrustHtml(this.placeHolder ? this.placeHolder : this._defaultPlaceholder);
2038
+ };
2039
+ ImageComponent.prototype.handleImageError = function (event) {
2040
+ this.error = true;
2041
+ };
2032
2042
  return ImageComponent;
2033
2043
  }());
2034
2044
  ImageComponent.decorators = [
2035
2045
  { type: i0.Component, args: [{
2036
2046
  selector: "co-image",
2037
- template: "\n <img *ngIf=\"!!source\" [src]=\"source\">\n ",
2038
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
2039
- styles: [":host{display:inline-block}img{width:100%;height:100%;object-fit:contain}\n"]
2047
+ template: "\n <ng-container *ngIf=\"!error\">\n <img *ngIf=\"!!source\" [src]=\"source\" (error)=\"handleImageError($event)\">\n </ng-container>\n <ng-container *ngIf=\"error || !source\">\n <div class=\"no-image-wrapper\">\n <co-icon [iconData]=\"innerPlaceHolder\"></co-icon>\n <span [textContent]=\"'geen afbeelding'\"></span>\n </div>\n </ng-container>\n ",
2048
+ encapsulation: i0.ViewEncapsulation.None
2040
2049
  },] }
2041
2050
  ];
2042
- ImageComponent.ctorParameters = function () { return []; };
2051
+ ImageComponent.ctorParameters = function () { return [
2052
+ { type: platformBrowser.DomSanitizer }
2053
+ ]; };
2043
2054
  ImageComponent.propDecorators = {
2044
- source: [{ type: i0.Input }]
2055
+ source: [{ type: i0.Input }],
2056
+ placeHolder: [{ type: i0.Input }],
2057
+ showClass: [{ type: i0.HostBinding, args: ["class.co-image",] }]
2045
2058
  };
2046
2059
 
2047
2060
  var ImageModule = /** @class */ (function () {
@@ -2051,7 +2064,7 @@
2051
2064
  }());
2052
2065
  ImageModule.decorators = [
2053
2066
  { type: i0.NgModule, args: [{
2054
- imports: [common.CommonModule],
2067
+ imports: [common.CommonModule, IconModule],
2055
2068
  declarations: [ImageComponent],
2056
2069
  exports: [ImageComponent]
2057
2070
  },] }
@@ -6970,6 +6983,7 @@
6970
6983
 
6971
6984
  var JAVA_MAX_INT = 2147483647;
6972
6985
 
6986
+ var DEFAULT_LOWER_BOUND_FOR_RANGE_COMPONENTS = -JAVA_MAX_INT;
6973
6987
  var DEFAULT_UPPER_BOUND_FOR_RANGE_COMPONENTS = JAVA_MAX_INT;
6974
6988
 
6975
6989
  // A data type class that represents a stepped-bounds numerical value, with min max and step size. Value is always within these bounds and is auto corrected for incoming manipulation requests.
@@ -6980,7 +6994,7 @@
6980
6994
  // the actual numeric current value, which we ensure always complies to our current min, max and step
6981
6995
  this._value = 0;
6982
6996
  this._valueAsString = "0";
6983
- this._min = 0;
6997
+ this._min = DEFAULT_LOWER_BOUND_FOR_RANGE_COMPONENTS;
6984
6998
  this._max = DEFAULT_UPPER_BOUND_FOR_RANGE_COMPONENTS;
6985
6999
  this._step = 1; // stepsize before the decimal.
6986
7000
  this._stepDecimals = 0; // derived from step
@@ -7358,7 +7372,7 @@
7358
7372
  },
7359
7373
  // @override
7360
7374
  set: function (model) {
7361
- this.setValue(model, true);
7375
+ // this.setValue(model, true);
7362
7376
  _super.prototype.model = model;
7363
7377
  },
7364
7378
  enumerable: false,
@@ -7410,7 +7424,8 @@
7410
7424
  return true;
7411
7425
  };
7412
7426
  InputNumberPickerComponent.prototype.ngOnInit = function () {
7413
- this.numberLogic.init(true);
7427
+ this.numberLogic.setValue(this.model, true);
7428
+ // this.numberLogic.init(true);
7414
7429
  this._updateButtonsShowState();
7415
7430
  };
7416
7431
  InputNumberPickerComponent.prototype.ngOnDestroy = function () {