@datarailsshared/datarailsshared 1.3.38 → 1.3.41

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.
@@ -1631,7 +1631,7 @@
1631
1631
  DrInputComponent.decorators = [
1632
1632
  { type: i0.Component, args: [{
1633
1633
  selector: 'dr-input',
1634
- template: "<ng-content select=\"[prefixIcon]\"></ng-content>\r\n<input [(ngModel)]=\"value\"\r\n (ngModelChange)=\"updateChanges()\"\r\n (blur)=\"blur.emit(value); onTouched()\"\r\n [disabled]=\"_disabled\"\r\n [readonly]=\"readonly\"\r\n [type]=\"type\"\r\n [placeholder]=\"placeholder\"\r\n [name]=\"name\"\r\n [min]=\"min\"\r\n [step]=\"step\"\r\n>\r\n<span class=\"clear-icon\" (click)=\"onClear($event)\"></span>\r\n<span *ngIf=\"type === 'search'\" class=\"search-icon\" (click)=\"onSearchClicked($event)\"></span>\r\n<ng-content select=\"[suffixIcon]\"></ng-content>\r\n<button *ngIf=\"_buttonOptions.show || (_buttonOptions.showOnFocus && _buttonOptions.focusSet)\"\r\n (click)=\"onButtonClicked($event)\">\r\n {{_buttonOptions.text}}\r\n</button>\r\n",
1634
+ template: "<ng-content select=\"[prefixIcon]\"></ng-content>\r\n<input [(ngModel)]=\"value\"\r\n (ngModelChange)=\"updateChanges()\"\r\n (blur)=\"blur.emit(value); onTouched()\"\r\n [disabled]=\"_disabled\"\r\n [readonly]=\"readonly\"\r\n [type]=\"type\"\r\n [placeholder]=\"placeholder\"\r\n [name]=\"name\"\r\n [min]=\"min\"\r\n [max]=\"max\"\r\n [minLength]=\"minLength\"\r\n [maxlength]=\"maxlength\"\r\n [step]=\"step\"\r\n>\r\n<span class=\"clear-icon\" (click)=\"onClear($event)\"></span>\r\n<span *ngIf=\"type === 'search'\" class=\"search-icon\" (click)=\"onSearchClicked($event)\"></span>\r\n<ng-content select=\"[suffixIcon]\"></ng-content>\r\n<button *ngIf=\"_buttonOptions.show || (_buttonOptions.showOnFocus && _buttonOptions.focusSet)\"\r\n (click)=\"onButtonClicked($event)\">\r\n {{_buttonOptions.text}}\r\n</button>\r\n",
1635
1635
  providers: [{
1636
1636
  provide: forms.NG_VALUE_ACCESSOR,
1637
1637
  useExisting: i0.forwardRef(function () { return DrInputComponent; }),
@@ -1656,6 +1656,8 @@
1656
1656
  clearable: [{ type: i0.Input }],
1657
1657
  min: [{ type: i0.Input }],
1658
1658
  max: [{ type: i0.Input }],
1659
+ minLength: [{ type: i0.Input }],
1660
+ maxlength: [{ type: i0.Input }],
1659
1661
  step: [{ type: i0.Input }],
1660
1662
  blur: [{ type: i0.Output }],
1661
1663
  elementClass: [{ type: i0.HostBinding, args: ['class',] }],
@@ -2179,7 +2181,7 @@
2179
2181
  { provide: forms.NG_VALUE_ACCESSOR, useExisting: i0.forwardRef(function () { return DrToggleButtonComponent; }), multi: true }
2180
2182
  ],
2181
2183
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
2182
- styles: [".toggle-container{display:flex;flex-wrap:nowrap;background:#F6F7F8;border:1px solid #C3C4CE;box-sizing:border-box;border-radius:20px;height:28px}.toggle-container.disabled{pointer-events:none}.toggle-container__item{height:28px;display:flex;align-items:center;justify-content:center;padding:4px 16px;border-radius:20px;margin:-1px;cursor:pointer}.toggle-container__item.selected{background:#F3F7FF;border:1px solid #579BF2;color:#0061ff;font-weight:600}\n"]
2184
+ styles: [".toggle-container{display:flex;flex-wrap:nowrap;background:#F6F7F8;border:1px solid #C3C4CE;box-sizing:border-box;border-radius:20px;height:28px}.toggle-container.disabled{pointer-events:none}.toggle-container__item{height:28px;display:flex;align-items:center;justify-content:center;padding:4px 16px;border-radius:20px;margin:-1px;cursor:pointer;font-weight:400;font-size:12px;line-height:20px;white-space:nowrap;color:#4e566c}.toggle-container__item.selected{font-weight:400;background:#F2F2FB;border:1px solid #7F7FDD;color:#25258c}\n"]
2183
2185
  },] }
2184
2186
  ];
2185
2187
  DrToggleButtonComponent.ctorParameters = function () { return [
@@ -3182,12 +3184,16 @@
3182
3184
  }
3183
3185
  else {
3184
3186
  var defaultChildPadding = 3;
3185
- var widthMoreWindowRight = window.innerWidth - this.position.clientX - this.el.nativeElement.offsetWidth - defaultPadding;
3186
- var widthMoreWindowBottom = window.innerHeight - this.position.clientY - this.el.nativeElement.offsetHeight - defaultPadding;
3187
+ var widthMoreWindowRight = window.innerWidth - (this.position.clientX - this.el.nativeElement.offsetWidth - defaultPadding);
3188
+ var widthMoreWindowBottom = window.innerHeight - (this.position.clientY - this.el.nativeElement.offsetHeight - defaultPadding);
3189
+ var spaceRightAmount = window.innerWidth - (this.position.clientX + this.el.nativeElement.offsetWidth + defaultPadding);
3187
3190
  this.widthMoreRight = !(widthMoreWindowRight < 0);
3188
3191
  var calculatedHorizantallyPos = widthMoreWindowRight < 0
3189
3192
  ? -this.position.x + -defaultChildPadding
3190
3193
  : this.position.x + defaultChildPadding + xDifference;
3194
+ if (spaceRightAmount <= 0) {
3195
+ calculatedHorizantallyPos -= this.el.nativeElement.offsetWidth;
3196
+ }
3191
3197
  var deltaHeight = widthMoreWindowBottom < 0 ? widthMoreWindowBottom : defaultDelta;
3192
3198
  this.renderer.setStyle(this.el.nativeElement, 'top', (this.position.y + deltaHeight) + 'px');
3193
3199
  this.renderer.setStyle(this.el.nativeElement, 'left', (calculatedHorizantallyPos) + 'px');