@seniorsistemas/angular-components 17.26.12-bugfix-sds-312-28ff6099 → 17.26.13

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.
@@ -508,6 +508,8 @@ var TooltipDirective = /** @class */ (function () {
508
508
  this.visible = true;
509
509
  this.mobileBehavior = MobileBehavior.Pressing;
510
510
  this.componentRef = null;
511
+ this.existFocusedInputRefTooltip = false;
512
+ this.boundOnWindowMouseMoveFunction = this.onWindowMouseMove.bind(this);
511
513
  this.debounceCreateTooltipFunction = this.debounceUtils.debounceLeading(function () { return _this._createTooltip(true, true); });
512
514
  }
513
515
  TooltipDirective.prototype.ngOnInit = function () {
@@ -517,6 +519,22 @@ var TooltipDirective = /** @class */ (function () {
517
519
  TooltipDirective.prototype.ngOnDestroy = function () {
518
520
  this.destroy();
519
521
  };
522
+ TooltipDirective.prototype.onWindowMouseMove = function (event) {
523
+ if (!this.componentRef) {
524
+ return;
525
+ }
526
+ var elementRect = this.elementRef.nativeElement.getBoundingClientRect();
527
+ var toolTipRect = this.tooltipDivElement.getBoundingClientRect();
528
+ var totalElementArea = {
529
+ top: Math.min(elementRect.top, toolTipRect.top),
530
+ right: Math.max(elementRect.right, toolTipRect.right),
531
+ left: Math.min(elementRect.left, toolTipRect.left),
532
+ bottom: Math.max(elementRect.bottom, toolTipRect.bottom),
533
+ };
534
+ if (isMousePositionOutsideOfElement(event, totalElementArea) && !this.existFocusedInputRefTooltip) {
535
+ this.destroy();
536
+ }
537
+ };
520
538
  /**
521
539
  * Manipula a visibilidade do tooltip quando houver uma referência de input.
522
540
  */
@@ -527,6 +545,7 @@ var TooltipDirective = /** @class */ (function () {
527
545
  var icon_1 = this.getIconFromFocusedInput();
528
546
  this.renderer.listen(inputFocus, "focus", function () {
529
547
  if (icon_1) {
548
+ _this.existFocusedInputRefTooltip = true;
530
549
  _this._createTooltip(false, false);
531
550
  }
532
551
  });
@@ -534,6 +553,7 @@ var TooltipDirective = /** @class */ (function () {
534
553
  if (icon_1) {
535
554
  _this.removeTooltip(icon_1);
536
555
  _this.destroy();
556
+ _this.existFocusedInputRefTooltip = false;
537
557
  }
538
558
  });
539
559
  }
@@ -578,7 +598,7 @@ var TooltipDirective = /** @class */ (function () {
578
598
  }
579
599
  };
580
600
  TooltipDirective.prototype.onMouseLeave = function () {
581
- if (this.tooltipEvent === TooltipEvent.Hover) {
601
+ if (this.tooltipEvent === TooltipEvent.Hover && !this.existFocusedInputRefTooltip) {
582
602
  this.destroy();
583
603
  }
584
604
  };
@@ -644,6 +664,7 @@ var TooltipDirective = /** @class */ (function () {
644
664
  if (this.componentRef !== null) {
645
665
  this.componentRef.instance.visible = this.visible;
646
666
  this.setTooltipPositionProperty();
667
+ window.addEventListener("mousemove", this.boundOnWindowMouseMoveFunction);
647
668
  }
648
669
  };
649
670
  TooltipDirective.prototype.setTooltipPositionProperty = function () {
@@ -754,6 +775,7 @@ var TooltipDirective = /** @class */ (function () {
754
775
  this.componentRef = null;
755
776
  this.tooltipDivElement = null;
756
777
  }
778
+ window.removeEventListener("mousemove", this.boundOnWindowMouseMoveFunction);
757
779
  };
758
780
  TooltipDirective.ctorParameters = function () { return [
759
781
  { type: ElementRef },
@@ -1005,7 +1027,7 @@ var InfoSignComponent = /** @class */ (function () {
1005
1027
  InfoSignComponent = __decorate([
1006
1028
  Component({
1007
1029
  selector: "s-info-sign-component",
1008
- template: "<span class=\"info-sign\">\n <span *ngTemplateOutlet=\"templateRef\"></span>\n <i\n class=\"info-sign__icon fa fa-info-circle\"\n aria-hidden=\"true\"\n [sTooltip]=\"tooltip\"\n [escape]=\"false\"\n tooltipPosition=\"top\"\n [displayTime]=\"displayTime\"\n mobileBehavior=\"tap\"\n showDelay=\"0\"\n [tooltipEvent]=\"focusedInputRef ? 'focus' : 'hover'\"\n [focusedInputRef]=\"focusedInputRef\">\n </i>\n</span>\n",
1030
+ template: "<span class=\"info-sign\">\n <span *ngTemplateOutlet=\"templateRef\"></span>\n <i\n class=\"info-sign__icon fa fa-info-circle\"\n aria-hidden=\"true\"\n [sTooltip]=\"tooltip\"\n [escape]=\"false\"\n tooltipPosition=\"top\"\n [displayTime]=\"displayTime\"\n mobileBehavior=\"tap\"\n showDelay=\"0\"\n [focusedInputRef]=\"focusedInputRef\">\n </i>\n</span>\n",
1009
1031
  styles: [".info-sign{-ms-flex-align:baseline;align-items:baseline;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:start;justify-content:flex-start}.info-sign .info-sign__icon{padding:0 12px}"]
1010
1032
  })
1011
1033
  ], InfoSignComponent);
@@ -13818,6 +13840,7 @@ var SpeechRecognitionComponent = /** @class */ (function () {
13818
13840
  this._recognizedText = '';
13819
13841
  this.disabled = false;
13820
13842
  this.textToSpeechService.cancel();
13843
+ SpeechRecognitionComponent_1.TOOLBAR_ACTIVE = false;
13821
13844
  };
13822
13845
  SpeechRecognitionComponent.prototype.ngOnDestroy = function () {
13823
13846
  this.onDestroy$.next();