@datarailsshared/datarailsshared 1.3.47 → 1.3.48

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.
@@ -1476,6 +1476,7 @@
1476
1476
  this.placeholder = '';
1477
1477
  this.readonly = false;
1478
1478
  this.blur = new i0.EventEmitter();
1479
+ this.ngModelDebounceChange = new i0.EventEmitter();
1479
1480
  this.innerValue = null;
1480
1481
  this._disabled = null;
1481
1482
  this._elementClass = [];
@@ -1631,7 +1632,7 @@
1631
1632
  DrInputComponent.decorators = [
1632
1633
  { type: i0.Component, args: [{
1633
1634
  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 [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
+ template: "<ng-content select=\"[prefixIcon]\"></ng-content>\r\n<input [(ngModel)]=\"value\"\r\n (ngModelChange)=\"updateChanges()\"\r\n (ngModelDebounceChange)=\"ngModelDebounceChange.emit($event)\"\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 *ngIf=\"value\" 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
1636
  providers: [{
1636
1637
  provide: forms.NG_VALUE_ACCESSOR,
1637
1638
  useExisting: i0.forwardRef(function () { return DrInputComponent; }),
@@ -1660,6 +1661,7 @@
1660
1661
  maxlength: [{ type: i0.Input }],
1661
1662
  step: [{ type: i0.Input }],
1662
1663
  blur: [{ type: i0.Output }],
1664
+ ngModelDebounceChange: [{ type: i0.Output }],
1663
1665
  elementClass: [{ type: i0.HostBinding, args: ['class',] }],
1664
1666
  searchHandler: [{ type: i0.Output }],
1665
1667
  buttonHandler: [{ type: i0.Output }],
@@ -3818,6 +3820,36 @@
3818
3820
  { type: i0.ChangeDetectorRef }
3819
3821
  ]; };
3820
3822
 
3823
+ var DrModelDebounceChangeDirective = /** @class */ (function () {
3824
+ function DrModelDebounceChangeDirective(ngModel) {
3825
+ this.ngModel = ngModel;
3826
+ this.debounce = 200;
3827
+ this.ngModelDebounceChange = new i0.EventEmitter();
3828
+ }
3829
+ DrModelDebounceChangeDirective.prototype.ngOnInit = function () {
3830
+ var _this = this;
3831
+ this.subscription = this.ngModel.control.valueChanges
3832
+ .pipe(operators.skip(1), operators.debounceTime(this.debounce), operators.distinctUntilChanged())
3833
+ .subscribe(function (value) { return _this.ngModelDebounceChange.emit(value); });
3834
+ };
3835
+ DrModelDebounceChangeDirective.prototype.ngOnDestroy = function () {
3836
+ this.subscription.unsubscribe();
3837
+ };
3838
+ return DrModelDebounceChangeDirective;
3839
+ }());
3840
+ DrModelDebounceChangeDirective.decorators = [
3841
+ { type: i0.Directive, args: [{
3842
+ selector: '[ngModelDebounceChange]'
3843
+ },] }
3844
+ ];
3845
+ DrModelDebounceChangeDirective.ctorParameters = function () { return [
3846
+ { type: forms.NgModel }
3847
+ ]; };
3848
+ DrModelDebounceChangeDirective.propDecorators = {
3849
+ debounce: [{ type: i0.Input }],
3850
+ ngModelDebounceChange: [{ type: i0.Output }]
3851
+ };
3852
+
3821
3853
  var components$2 = [DateTagComponent,
3822
3854
  DayTagComponent,
3823
3855
  WeekTagComponent,
@@ -3909,7 +3941,8 @@
3909
3941
  DrToggleButtonComponent,
3910
3942
  DrDatePickerComponent,
3911
3943
  DrDatePickerFormatDirective,
3912
- DrDatePickerCustomHeaderComponent
3944
+ DrDatePickerCustomHeaderComponent,
3945
+ DrModelDebounceChangeDirective
3913
3946
  ];
3914
3947
  var DrInputsModule = /** @class */ (function () {
3915
3948
  function DrInputsModule() {
@@ -4122,6 +4155,7 @@
4122
4155
  exports.DrDropdownService = DrDropdownService;
4123
4156
  exports.DrInputComponent = DrInputComponent;
4124
4157
  exports.DrInputsModule = DrInputsModule;
4158
+ exports.DrModelDebounceChangeDirective = DrModelDebounceChangeDirective;
4125
4159
  exports.DrPopoverComponent = DrPopoverComponent;
4126
4160
  exports.DrPopoverDirective = DrPopoverDirective;
4127
4161
  exports.DrPopoverModule = DrPopoverModule;