nexheal-lib 0.0.41 → 0.0.42

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.
@@ -1,7 +1,7 @@
1
1
  import * as i1 from '@angular/common';
2
2
  import { CommonModule, DatePipe, DOCUMENT } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { EventEmitter, ViewChild, Input, Output, Component, forwardRef, HostListener, inject, ElementRef, DestroyRef, Directive } from '@angular/core';
4
+ import { EventEmitter, ViewChild, Input, Output, Component, forwardRef, HostListener, inject, ElementRef, ChangeDetectorRef, DestroyRef, Directive } from '@angular/core';
5
5
  import * as i2 from '@angular/forms';
6
6
  import { FormControl, ReactiveFormsModule, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
7
7
  import { Subscription, debounceTime, distinctUntilChanged, fromEvent, Subject } from 'rxjs';
@@ -1651,6 +1651,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
1651
1651
 
1652
1652
  class ColorPicker {
1653
1653
  elementRef = inject(ElementRef);
1654
+ cdRef = inject(ChangeDetectorRef);
1654
1655
  title;
1655
1656
  required = false;
1656
1657
  customClass = "";
@@ -1787,19 +1788,19 @@ class ColorPicker {
1787
1788
  if (this.disabled || this.readonly)
1788
1789
  return;
1789
1790
  event.preventDefault();
1791
+ this.bindDragListeners(); // clears any stale drag first; then set the active drag
1790
1792
  this.dragMode = "selector";
1791
1793
  this.dragEl = event.currentTarget;
1792
1794
  this.handleDrag(event);
1793
- this.bindDragListeners();
1794
1795
  }
1795
1796
  onHueDown(event) {
1796
1797
  if (this.disabled || this.readonly)
1797
1798
  return;
1798
1799
  event.preventDefault();
1800
+ this.bindDragListeners();
1799
1801
  this.dragMode = "hue";
1800
1802
  this.dragEl = event.currentTarget;
1801
1803
  this.handleDrag(event);
1802
- this.bindDragListeners();
1803
1804
  }
1804
1805
  bindDragListeners() {
1805
1806
  this.unbindDragListeners();
@@ -1878,6 +1879,7 @@ class ColorPicker {
1878
1879
  this.value = out;
1879
1880
  this.onChangeFn(out);
1880
1881
  this.onChange.emit(out);
1882
+ this.cdRef.markForCheck();
1881
1883
  }
1882
1884
  getValueToEmit() {
1883
1885
  if (this.format === "hsb") {