@colijnit/corecomponents_v12 12.2.11 → 12.2.12

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.
@@ -4959,7 +4959,7 @@
4959
4959
  CoDialogComponent.decorators = [
4960
4960
  { type: i0.Component, args: [{
4961
4961
  selector: 'co-dialog',
4962
- template: "\n <div class=\"co-dialog-overlay\" (click)=\"handleOverlayClick($event)\"></div>\n <div class=\"co-dialog-placeholder\">\n <div class=\"co-dialog-wrapper\" [ngClass]=\"customCssClass ? customCssClass : undefined\" @showHideDialog cdkDrag>\n <div class=\"dialog-header\" *ngIf=\"!borderless\" cdkDragHandle>\n <div class=\"dialog-header-caption\" *ngIf=\"headerTemplate\">\n <ng-container [ngTemplateOutlet]=\"headerTemplate\"></ng-container>\n </div>\n <div class=\"dialog-close-button\" *ngIf=\"showCloseIcon\" (click)=\"handleCloseDialog($event)\">\n <co-icon [icon]=\"icons.CrossSkinny\"></co-icon>\n </div>\n </div>\n <div class=\"dialog-content co-small-scrollbar\" [ngClass]=\"customCssClass ? customCssClass : undefined\">\n <ng-content></ng-content>\n </div>\n <div class=\"dialog-footer\" *ngIf=\"footerTemplate\">\n <ng-container [ngTemplateOutlet]=\"footerTemplate\"></ng-container>\n </div>\n </div>\n </div>\n ",
4962
+ template: "\n <div class=\"co-dialog-overlay\" (click)=\"handleOverlayClick($event)\"></div>\n <div class=\"co-dialog-placeholder\">\n <div class=\"co-dialog-wrapper\" [ngClass]=\"customCssClass ? customCssClass : undefined\" @showHideDialog cdkDrag>\n <div *ngIf=\"!borderless\" class=\"dialog-drag-handle\" cdkDragHandle></div>\n <div class=\"dialog-header\" *ngIf=\"!borderless\">\n <div class=\"dialog-header-caption\" *ngIf=\"headerTemplate\">\n <ng-container [ngTemplateOutlet]=\"headerTemplate\"></ng-container>\n </div>\n <div class=\"dialog-close-button\" *ngIf=\"showCloseIcon\" (click)=\"handleCloseDialog($event)\">\n <co-icon [icon]=\"icons.CrossSkinny\"></co-icon>\n </div>\n </div>\n <div class=\"dialog-content co-small-scrollbar\" [ngClass]=\"customCssClass ? customCssClass : undefined\">\n <ng-content></ng-content>\n </div>\n <div class=\"dialog-footer\" *ngIf=\"footerTemplate\">\n <ng-container [ngTemplateOutlet]=\"footerTemplate\"></ng-container>\n </div>\n </div>\n </div>\n ",
4963
4963
  animations: [
4964
4964
  animations.trigger('showHideCoDialog', [
4965
4965
  animations.transition('void => *', [
@@ -5980,6 +5980,25 @@
5980
5980
  showClass: [{ type: i0.HostBinding, args: ['class.co-input-date',] }]
5981
5981
  };
5982
5982
 
5983
+ var OverlayParentDirective = /** @class */ (function () {
5984
+ function OverlayParentDirective(elementRef) {
5985
+ this.elementRef = elementRef;
5986
+ }
5987
+ OverlayParentDirective.prototype.ngOnDestroy = function () {
5988
+ this.elementRef = undefined;
5989
+ };
5990
+ return OverlayParentDirective;
5991
+ }());
5992
+ OverlayParentDirective.decorators = [
5993
+ { type: i0.Directive, args: [{
5994
+ selector: '[overlayParent]',
5995
+ exportAs: 'overlayParent'
5996
+ },] }
5997
+ ];
5998
+ OverlayParentDirective.ctorParameters = function () { return [
5999
+ { type: i0.ElementRef }
6000
+ ]; };
6001
+
5983
6002
  var OverlayDirective = /** @class */ (function () {
5984
6003
  function OverlayDirective(elementRef) {
5985
6004
  var _this = this;
@@ -6000,7 +6019,15 @@
6000
6019
  Object.defineProperty(OverlayDirective.prototype, "parent", {
6001
6020
  set: function (value) {
6002
6021
  if (value) {
6003
- this._parent = value instanceof i0.ElementRef ? value : value.elementRef;
6022
+ if (value instanceof i0.ElementRef) {
6023
+ this._parent = value.nativeElement;
6024
+ }
6025
+ else if (value instanceof OverlayParentDirective) {
6026
+ this._parent = value.elementRef.nativeElement;
6027
+ }
6028
+ else {
6029
+ this._parent = value;
6030
+ }
6004
6031
  }
6005
6032
  else {
6006
6033
  if (this._parent && this._resizeObserver) {
@@ -6045,14 +6072,14 @@
6045
6072
  root: null
6046
6073
  });
6047
6074
  if (this._parent) {
6048
- this._intersectionObserver.observe(this._parent.nativeElement); // observe parent for visibility
6075
+ this._intersectionObserver.observe(this._parent); // observe parent for visibility
6049
6076
  }
6050
6077
  this._resizeObserver.observe(document.body);
6051
6078
  };
6052
6079
  OverlayDirective.prototype._checkAndPlaceElement = function () {
6053
- if (this._elementRef && this._elementRef.nativeElement && this._parent && this._parent.nativeElement) {
6080
+ if (this._elementRef && this._elementRef.nativeElement && this._parent) {
6054
6081
  var elementRect = this._elementRef.nativeElement.getBoundingClientRect();
6055
- var parentBoundingRect = this._parent.nativeElement.getBoundingClientRect();
6082
+ var parentBoundingRect = this._parent.getBoundingClientRect();
6056
6083
  var parentRect = {};
6057
6084
  if (!this.inline) {
6058
6085
  parentRect = {
@@ -6065,10 +6092,10 @@
6065
6092
  }
6066
6093
  else {
6067
6094
  parentRect = {
6068
- bottom: this._parent.nativeElement.offsetTop + parentBoundingRect.height,
6069
- right: this._parent.nativeElement.offsetLeft + parentBoundingRect.width,
6070
- left: this._parent.nativeElement.offsetLeft,
6071
- top: this._parent.nativeElement.offsetTop,
6095
+ bottom: this._parent.offsetTop + parentBoundingRect.height,
6096
+ right: this._parent.offsetLeft + parentBoundingRect.width,
6097
+ left: this._parent.offsetLeft,
6098
+ top: this._parent.offsetTop,
6072
6099
  width: parentBoundingRect.width
6073
6100
  };
6074
6101
  }
@@ -6132,25 +6159,6 @@
6132
6159
  fullSize: [{ type: i0.Input }]
6133
6160
  };
6134
6161
 
6135
- var OverlayParentDirective = /** @class */ (function () {
6136
- function OverlayParentDirective(elementRef) {
6137
- this.elementRef = elementRef;
6138
- }
6139
- OverlayParentDirective.prototype.ngOnDestroy = function () {
6140
- this.elementRef = undefined;
6141
- };
6142
- return OverlayParentDirective;
6143
- }());
6144
- OverlayParentDirective.decorators = [
6145
- { type: i0.Directive, args: [{
6146
- selector: '[overlayParent]',
6147
- exportAs: 'overlayParent'
6148
- },] }
6149
- ];
6150
- OverlayParentDirective.ctorParameters = function () { return [
6151
- { type: i0.ElementRef }
6152
- ]; };
6153
-
6154
6162
  var OverlayModule = /** @class */ (function () {
6155
6163
  function OverlayModule() {
6156
6164
  }
@@ -7238,6 +7246,12 @@
7238
7246
  InputDateRangePickerComponent.prototype.showClass = function () {
7239
7247
  return true;
7240
7248
  };
7249
+ InputDateRangePickerComponent.prototype.handleFirstInputClick = function (event) {
7250
+ event.stopPropagation();
7251
+ };
7252
+ InputDateRangePickerComponent.prototype.handleSecondInputClick = function (event) {
7253
+ event.stopPropagation();
7254
+ };
7241
7255
  InputDateRangePickerComponent.prototype.handleDatesSelected = function (dates) {
7242
7256
  this.setModel(dates);
7243
7257
  };
@@ -7313,7 +7327,7 @@
7313
7327
  InputDateRangePickerComponent.decorators = [
7314
7328
  { type: i0.Component, args: [{
7315
7329
  selector: 'co-input-date-range',
7316
- template: "\n <div class=\"inputs-wrapper\" overlayParent #parentForOverlay=\"overlayParent\">\n <co-input-text class=\"no-focus-line custom-height\"\n [(model)]=\"firstDateAsString\"\n [noClickFocus]=\"true\"\n [pattern]=\"'yyyy-MM-dd'\"\n [type]=\"'date'\"\n [leftIcon]=\"leftIcon\"\n [leftIconData]=\"leftIconData\"\n [placeholder]=\"placeholder\"\n (blur)=\"handleFirstDateChanged(firstDateAsString)\"\n (clearIconClick)=\"clearDate(0)\"\n ></co-input-text>\n <co-input-text class=\"no-focus-line custom-height\"\n [(model)]= \"secondDateAsString\"\n [noClickFocus]=\"true\"\n [pattern]=\"'yyyy-MM-dd'\"\n [type]=\"'date'\"\n [rightIcon]=\"rightIcon\"\n (rightIconClick)=\"toggleCalendar()\"\n (blur)=\"handleSecondDateChanged(secondDateAsString)\"\n (clearIconClick)=\"clearDate(1)\"\n ></co-input-text>\n </div>\n ",
7330
+ template: "\n <div class=\"inputs-wrapper\" overlayParent #parentForOverlay=\"overlayParent\">\n <co-input-text #firstInput class=\"no-focus-line custom-height\"\n [(model)]=\"firstDateAsString\"\n [noClickFocus]=\"true\"\n [pattern]=\"'yyyy-MM-dd'\"\n [type]=\"'date'\"\n [leftIcon]=\"leftIcon\"\n [leftIconData]=\"leftIconData\"\n [placeholder]=\"placeholder\"\n (blur)=\"handleFirstDateChanged(firstDateAsString)\"\n (clearIconClick)=\"clearDate(0)\"\n (click)=\"handleFirstInputClick($event)\"\n ></co-input-text>\n <co-input-text #secondInput class=\"no-focus-line custom-height\"\n [(model)]= \"secondDateAsString\"\n [noClickFocus]=\"true\"\n [pattern]=\"'yyyy-MM-dd'\"\n [type]=\"'date'\"\n [rightIcon]=\"rightIcon\"\n (rightIconClick)=\"toggleCalendar()\"\n (blur)=\"handleSecondDateChanged(secondDateAsString)\"\n (clearIconClick)=\"clearDate(1)\"\n (click)=\"handleSecondInputClick($event)\"\n ></co-input-text>\n </div>\n ",
7317
7331
  providers: [
7318
7332
  OverlayService,
7319
7333
  {
@@ -7328,6 +7342,8 @@
7328
7342
  },] }
7329
7343
  ];
7330
7344
  InputDateRangePickerComponent.propDecorators = {
7345
+ firstInput: [{ type: i0.ViewChild, args: ['firstInput',] }],
7346
+ secondInput: [{ type: i0.ViewChild, args: ['secondInput',] }],
7331
7347
  showClass: [{ type: i0.HostBinding, args: ['class.co-input-date-range',] }]
7332
7348
  };
7333
7349