@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.
- package/bundles/seniorsistemas-angular-components.umd.js +25 -2
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/components/tooltip/tooltip.directive.d.ts +3 -0
- package/esm2015/components/info-sign/info-sign.component.js +2 -2
- package/esm2015/components/speech-recognition/speech-recognition/speech-recognition.component.js +2 -1
- package/esm2015/components/tooltip/tooltip.directive.js +25 -3
- package/esm5/components/info-sign/info-sign.component.js +2 -2
- package/esm5/components/speech-recognition/speech-recognition/speech-recognition.component.js +2 -1
- package/esm5/components/tooltip/tooltip.directive.js +25 -3
- package/fesm2015/seniorsistemas-angular-components.js +25 -2
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +25 -2
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -653,6 +653,8 @@
|
|
|
653
653
|
this.visible = true;
|
|
654
654
|
this.mobileBehavior = MobileBehavior.Pressing;
|
|
655
655
|
this.componentRef = null;
|
|
656
|
+
this.existFocusedInputRefTooltip = false;
|
|
657
|
+
this.boundOnWindowMouseMoveFunction = this.onWindowMouseMove.bind(this);
|
|
656
658
|
this.debounceCreateTooltipFunction = this.debounceUtils.debounceLeading(function () { return _this._createTooltip(true, true); });
|
|
657
659
|
}
|
|
658
660
|
TooltipDirective.prototype.ngOnInit = function () {
|
|
@@ -662,6 +664,22 @@
|
|
|
662
664
|
TooltipDirective.prototype.ngOnDestroy = function () {
|
|
663
665
|
this.destroy();
|
|
664
666
|
};
|
|
667
|
+
TooltipDirective.prototype.onWindowMouseMove = function (event) {
|
|
668
|
+
if (!this.componentRef) {
|
|
669
|
+
return;
|
|
670
|
+
}
|
|
671
|
+
var elementRect = this.elementRef.nativeElement.getBoundingClientRect();
|
|
672
|
+
var toolTipRect = this.tooltipDivElement.getBoundingClientRect();
|
|
673
|
+
var totalElementArea = {
|
|
674
|
+
top: Math.min(elementRect.top, toolTipRect.top),
|
|
675
|
+
right: Math.max(elementRect.right, toolTipRect.right),
|
|
676
|
+
left: Math.min(elementRect.left, toolTipRect.left),
|
|
677
|
+
bottom: Math.max(elementRect.bottom, toolTipRect.bottom),
|
|
678
|
+
};
|
|
679
|
+
if (isMousePositionOutsideOfElement(event, totalElementArea) && !this.existFocusedInputRefTooltip) {
|
|
680
|
+
this.destroy();
|
|
681
|
+
}
|
|
682
|
+
};
|
|
665
683
|
/**
|
|
666
684
|
* Manipula a visibilidade do tooltip quando houver uma referência de input.
|
|
667
685
|
*/
|
|
@@ -672,6 +690,7 @@
|
|
|
672
690
|
var icon_1 = this.getIconFromFocusedInput();
|
|
673
691
|
this.renderer.listen(inputFocus, "focus", function () {
|
|
674
692
|
if (icon_1) {
|
|
693
|
+
_this.existFocusedInputRefTooltip = true;
|
|
675
694
|
_this._createTooltip(false, false);
|
|
676
695
|
}
|
|
677
696
|
});
|
|
@@ -679,6 +698,7 @@
|
|
|
679
698
|
if (icon_1) {
|
|
680
699
|
_this.removeTooltip(icon_1);
|
|
681
700
|
_this.destroy();
|
|
701
|
+
_this.existFocusedInputRefTooltip = false;
|
|
682
702
|
}
|
|
683
703
|
});
|
|
684
704
|
}
|
|
@@ -723,7 +743,7 @@
|
|
|
723
743
|
}
|
|
724
744
|
};
|
|
725
745
|
TooltipDirective.prototype.onMouseLeave = function () {
|
|
726
|
-
if (this.tooltipEvent === TooltipEvent.Hover) {
|
|
746
|
+
if (this.tooltipEvent === TooltipEvent.Hover && !this.existFocusedInputRefTooltip) {
|
|
727
747
|
this.destroy();
|
|
728
748
|
}
|
|
729
749
|
};
|
|
@@ -789,6 +809,7 @@
|
|
|
789
809
|
if (this.componentRef !== null) {
|
|
790
810
|
this.componentRef.instance.visible = this.visible;
|
|
791
811
|
this.setTooltipPositionProperty();
|
|
812
|
+
window.addEventListener("mousemove", this.boundOnWindowMouseMoveFunction);
|
|
792
813
|
}
|
|
793
814
|
};
|
|
794
815
|
TooltipDirective.prototype.setTooltipPositionProperty = function () {
|
|
@@ -899,6 +920,7 @@
|
|
|
899
920
|
this.componentRef = null;
|
|
900
921
|
this.tooltipDivElement = null;
|
|
901
922
|
}
|
|
923
|
+
window.removeEventListener("mousemove", this.boundOnWindowMouseMoveFunction);
|
|
902
924
|
};
|
|
903
925
|
TooltipDirective.ctorParameters = function () { return [
|
|
904
926
|
{ type: core.ElementRef },
|
|
@@ -1150,7 +1172,7 @@
|
|
|
1150
1172
|
InfoSignComponent = __decorate([
|
|
1151
1173
|
core.Component({
|
|
1152
1174
|
selector: "s-info-sign-component",
|
|
1153
|
-
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 [
|
|
1175
|
+
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",
|
|
1154
1176
|
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}"]
|
|
1155
1177
|
})
|
|
1156
1178
|
], InfoSignComponent);
|
|
@@ -13963,6 +13985,7 @@
|
|
|
13963
13985
|
this._recognizedText = '';
|
|
13964
13986
|
this.disabled = false;
|
|
13965
13987
|
this.textToSpeechService.cancel();
|
|
13988
|
+
SpeechRecognitionComponent_1.TOOLBAR_ACTIVE = false;
|
|
13966
13989
|
};
|
|
13967
13990
|
SpeechRecognitionComponent.prototype.ngOnDestroy = function () {
|
|
13968
13991
|
this.onDestroy$.next();
|