@seniorsistemas/angular-components 17.26.14 → 17.26.15

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.
Files changed (23) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +22 -31
  2. package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
  3. package/bundles/seniorsistemas-angular-components.umd.min.js +1 -1
  4. package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
  5. package/components/dynamic-form/components/fields/text/text-field.component.d.ts +3 -1
  6. package/components/dynamic-form/components/fields/text-area/text-area-field.component.d.ts +1 -2
  7. package/components/tooltip/tooltip.directive.d.ts +1 -3
  8. package/esm2015/components/dynamic-form/components/fields/text/text-field.component.js +12 -2
  9. package/esm2015/components/dynamic-form/components/fields/text-area/text-area-field.component.js +3 -6
  10. package/esm2015/components/info-sign/info-sign.component.js +2 -2
  11. package/esm2015/components/text-area/text-area/text-area.component.js +1 -1
  12. package/esm2015/components/tooltip/tooltip.directive.js +7 -26
  13. package/esm5/components/dynamic-form/components/fields/text/text-field.component.js +16 -2
  14. package/esm5/components/dynamic-form/components/fields/text-area/text-area-field.component.js +3 -6
  15. package/esm5/components/info-sign/info-sign.component.js +2 -2
  16. package/esm5/components/text-area/text-area/text-area.component.js +1 -1
  17. package/esm5/components/tooltip/tooltip.directive.js +7 -26
  18. package/fesm2015/seniorsistemas-angular-components.js +19 -32
  19. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  20. package/fesm5/seniorsistemas-angular-components.js +23 -32
  21. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  22. package/package.json +1 -1
  23. package/seniorsistemas-angular-components.metadata.json +1 -1
@@ -653,8 +653,7 @@
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
+ this.tooltipCreatedByFocus = false;
658
657
  this.debounceCreateTooltipFunction = this.debounceUtils.debounceLeading(function () { return _this._createTooltip(true, true); });
659
658
  }
660
659
  TooltipDirective.prototype.ngOnInit = function () {
@@ -664,22 +663,6 @@
664
663
  TooltipDirective.prototype.ngOnDestroy = function () {
665
664
  this.destroy();
666
665
  };
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
- };
683
666
  /**
684
667
  * Manipula a visibilidade do tooltip quando houver uma referência de input.
685
668
  */
@@ -690,15 +673,15 @@
690
673
  var icon_1 = this.getIconFromFocusedInput();
691
674
  this.renderer.listen(inputFocus, "focus", function () {
692
675
  if (icon_1) {
693
- _this.existFocusedInputRefTooltip = true;
694
676
  _this._createTooltip(false, false);
677
+ _this.tooltipCreatedByFocus = true;
695
678
  }
696
679
  });
697
680
  this.renderer.listen(inputFocus, "blur", function () {
698
681
  if (icon_1) {
699
682
  _this.removeTooltip(icon_1);
700
683
  _this.destroy();
701
- _this.existFocusedInputRefTooltip = false;
684
+ _this.tooltipCreatedByFocus = false;
702
685
  }
703
686
  });
704
687
  }
@@ -738,12 +721,12 @@
738
721
  }
739
722
  };
740
723
  TooltipDirective.prototype.onMouseEnter = function () {
741
- if (this.tooltipEvent === TooltipEvent.Hover) {
724
+ if (this.tooltipEvent === TooltipEvent.Hover || this.focusedInputRef) {
742
725
  this.debounceCreateTooltipFunction();
743
726
  }
744
727
  };
745
728
  TooltipDirective.prototype.onMouseLeave = function () {
746
- if (this.tooltipEvent === TooltipEvent.Hover && !this.existFocusedInputRefTooltip) {
729
+ if ((this.tooltipEvent === TooltipEvent.Hover || this.focusedInputRef) && !this.tooltipCreatedByFocus) {
747
730
  this.destroy();
748
731
  }
749
732
  };
@@ -809,7 +792,6 @@
809
792
  if (this.componentRef !== null) {
810
793
  this.componentRef.instance.visible = this.visible;
811
794
  this.setTooltipPositionProperty();
812
- window.addEventListener("mousemove", this.boundOnWindowMouseMoveFunction);
813
795
  }
814
796
  };
815
797
  TooltipDirective.prototype.setTooltipPositionProperty = function () {
@@ -920,7 +902,6 @@
920
902
  this.componentRef = null;
921
903
  this.tooltipDivElement = null;
922
904
  }
923
- window.removeEventListener("mousemove", this.boundOnWindowMouseMoveFunction);
924
905
  };
925
906
  TooltipDirective.ctorParameters = function () { return [
926
907
  { type: core.ElementRef },
@@ -1172,7 +1153,7 @@
1172
1153
  InfoSignComponent = __decorate([
1173
1154
  core.Component({
1174
1155
  selector: "s-info-sign-component",
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",
1156
+ 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",
1176
1157
  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}"]
1177
1158
  })
1178
1159
  ], InfoSignComponent);
@@ -11775,12 +11756,9 @@
11775
11756
  __decorate([
11776
11757
  core.Input()
11777
11758
  ], TextAreaFieldComponent.prototype, "formControl", void 0);
11778
- __decorate([
11779
- core.ViewChild('inputRef')
11780
- ], TextAreaFieldComponent.prototype, "inputRef", void 0);
11781
11759
  TextAreaFieldComponent = __decorate([
11782
11760
  core.Component({
11783
- template: "<s-field-label *ngIf=\"textArea\" [field]=\"field\"\n [fieldContainerRef]=\"textArea.textAreaElement?.nativeElement\"></s-field-label>\n\n<s-textarea\n #textArea\n [inputId]=\"(field.id || field.name)\"\n [rows]=\"field.rows\"\n [formControl]=\"formControl\"\n [inputStyle]=\"field.style\"\n [readOnly]=\"field.readonly ? field.readonly() : false\"\n [keyFilter]=\"field.keyFilter\"\n [placeholder]=\"field.placeholder\"\n [keepContext]=\"field.keepContext\"\n [speechRecognitionPlaceholder]=\"field.speechRecognitionPlaceholder\"\n [maxLength]=\"field.maxLength\"\n [speechRecognition]=\"field.speechRecognition\">\n</s-textarea>\n"
11761
+ template: "<s-field-label *ngIf=\"textArea.textAreaElement\" [field]=\"field\"\n [fieldContainerRef]=\"textArea.textAreaElement?.nativeElement\"></s-field-label>\n\n<s-textarea\n #textArea\n [inputId]=\"(field.id || field.name)\"\n [rows]=\"field.rows\"\n [formControl]=\"formControl\"\n [inputStyle]=\"field.style\"\n [readOnly]=\"field.readonly ? field.readonly() : false\"\n [keyFilter]=\"field.keyFilter\"\n [placeholder]=\"field.placeholder\"\n [keepContext]=\"field.keepContext\"\n [speechRecognitionPlaceholder]=\"field.speechRecognitionPlaceholder\"\n [maxLength]=\"field.maxLength\"\n [speechRecognition]=\"field.speechRecognition\">\n</s-textarea>\n"
11784
11762
  })
11785
11763
  ], TextAreaFieldComponent);
11786
11764
  return TextAreaFieldComponent;
@@ -12206,6 +12184,19 @@
12206
12184
  this.ngUnsubscribe.next();
12207
12185
  this.ngUnsubscribe.complete();
12208
12186
  };
12187
+ Object.defineProperty(TextFieldComponent.prototype, "inputElement", {
12188
+ get: function () {
12189
+ var _a, _b;
12190
+ if (this.inputRef instanceof inputmask.InputMask) {
12191
+ return (_b = (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.inputViewChild) === null || _b === void 0 ? void 0 : _b.nativeElement;
12192
+ }
12193
+ else {
12194
+ return this.inputRef;
12195
+ }
12196
+ },
12197
+ enumerable: true,
12198
+ configurable: true
12199
+ });
12209
12200
  TextFieldComponent.prototype.getCharacterPattern = function () {
12210
12201
  return typeof this.field.characterPattern === "function"
12211
12202
  ? this.field.characterPattern()
@@ -12239,7 +12230,7 @@
12239
12230
  ], TextFieldComponent.prototype, "inputRef", void 0);
12240
12231
  TextFieldComponent = __decorate([
12241
12232
  core.Component({
12242
- template: "<s-field-label *ngIf=\"inputRef\" [field]=\"field\" [fieldContainerRef]=\"inputRef?.nativeElement\"></s-field-label>\n\n<p-inputMask\n #inputRef\n *ngIf=\"field.mask; else noMask\"\n [type]=\"field.inputType || 'text'\"\n [inputId]=\"field.id || field.name\"\n [name]=\"field.name\"\n [mask]=\"isFunction(field.mask) ? field.mask() : field.mask\"\n [characterPattern]=\"getCharacterPattern()\"\n [unmask]=\"getUnmask()\"\n [placeholder]=\"field.placeholder\"\n slotChar=\"_\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\"\n styleClass=\"mousetrap\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n (onFocus)=\"onFocus.next($event)\"\n (onComplete)=\"onComplete.next($event)\"\n (onInput)=\"onInput.next($event)\"\n [formControl]=\"formControl\"\n [readonly]=\"field.readonly ? field.readonly() : false\"\n [autocomplete]=\"field.browserAutocomplete ? 'on' : 'off'\"\n>\n</p-inputMask>\n\n<ng-template #noMask>\n <ng-container>\n <div class=\"ui-inputgroup\">\n <ng-container *ngIf=\"field.leftAddon\">\n <span *ngIf=\"field.leftAddon.callback\" class=\"addon-button addon-button--left\">\n <s-button\n [label]=\"field.leftAddon.label\"\n [iconClass]=\"field.leftAddon.icon\"\n [priority]=\"field.leftAddon.priority\"\n [disabled]=\"isFunction(field.leftAddon.disabled) ? field.leftAddon.disabled() : field.leftAddon.disabled\"\n (onClick)=\"field.leftAddon.callback()\"\n >\n </s-button>\n </span>\n <span *ngIf=\"!field.leftAddon.callback\" class=\"ui-inputgroup-addon\">\n <span *ngIf=\"field.leftAddon.label\">{{ field.leftAddon.label }}</span>\n <span *ngIf=\"!field.leftAddon.label\" [ngClass]=\"field.leftAddon.icon\"></span>\n </span>\n </ng-container>\n\n <ng-container *ngTemplateOutlet=\"field.keyFilter ? inputKeyFilter : input\"></ng-container>\n\n <ng-container *ngIf=\"field.rightAddon\">\n <span *ngIf=\"field.rightAddon.callback\" class=\"addon-button addon-button--right\">\n <s-button\n [label]=\"field.rightAddon.label\"\n [iconClass]=\"field.rightAddon.icon\"\n [priority]=\"field.rightAddon.priority\"\n [disabled]=\"isFunction(field.rightAddon.disabled) ? field.rightAddon.disabled() : field.rightAddon.disabled\"\n (onClick)=\"field.rightAddon.callback()\"\n >\n </s-button>\n </span>\n <span *ngIf=\"!field.rightAddon.callback\" class=\"ui-inputgroup-addon\">\n <span *ngIf=\"field.rightAddon.label\">{{ field.rightAddon.label }}</span>\n <span *ngIf=\"!field.rightAddon.label\" [ngClass]=\"field.rightAddon.icon\"></span>\n </span>\n </ng-container>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #input>\n <input\n #inputRef\n [type]=\"field.inputType || 'text'\"\n [id]=\"field.id || field.name\"\n [name]=\"field.name\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [placeholder]=\"field.placeholder\"\n [showDelay]=\"500\"\n [maxLength]=\"field.maxLength\"\n pInputText\n [autocomplete]=\"field.browserAutocomplete ? 'on' : 'off'\"\n [ngClass]=\"'mousetrap'\"\n (blur)=\"field.onBlur ? field.onBlur($event) : null\"\n (focus)=\"onFocus.next($event)\"\n (input)=\"onInput.next($event)\"\n [formControl]=\"formControl\"\n [ngStyle]=\"field.style\"\n [readOnly]=\"field.readonly ? field.readonly() : false\"\n />\n</ng-template>\n\n<ng-template #inputKeyFilter>\n <input\n #inputText\n [type]=\"field.inputType || 'text'\"\n [id]=\"field.id || field.name\"\n [name]=\"field.name\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [placeholder]=\"field.placeholder\"\n [showDelay]=\"500\"\n [maxLength]=\"field.maxLength\"\n pInputText\n [autocomplete]=\"field.browserAutocomplete ? 'on' : 'off'\"\n [ngClass]=\"'mousetrap'\"\n (blur)=\"field.onBlur ? field.onBlur($event) : null\"\n (focus)=\"onFocus.next($event)\"\n (input)=\"onInput.next($event)\"\n [pKeyFilter]=\"field.keyFilter\"\n [formControl]=\"formControl\"\n [ngStyle]=\"field.style\"\n [readOnly]=\"field.readonly ? field.readonly() : false\"\n />\n</ng-template>\n",
12233
+ template: "<s-field-label *ngIf=\"inputElement\" [field]=\"field\" [fieldContainerRef]=\"inputElement\"></s-field-label>\n\n<p-inputMask\n #inputRef\n *ngIf=\"field.mask; else noMask\"\n [type]=\"field.inputType || 'text'\"\n [inputId]=\"field.id || field.name\"\n [name]=\"field.name\"\n [mask]=\"isFunction(field.mask) ? field.mask() : field.mask\"\n [characterPattern]=\"getCharacterPattern()\"\n [unmask]=\"getUnmask()\"\n [placeholder]=\"field.placeholder\"\n slotChar=\"_\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\"\n styleClass=\"mousetrap\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n (onFocus)=\"onFocus.next($event)\"\n (onComplete)=\"onComplete.next($event)\"\n (onInput)=\"onInput.next($event)\"\n [formControl]=\"formControl\"\n [readonly]=\"field.readonly ? field.readonly() : false\"\n [autocomplete]=\"field.browserAutocomplete ? 'on' : 'off'\"\n>\n</p-inputMask>\n\n<ng-template #noMask>\n <ng-container>\n <div class=\"ui-inputgroup\">\n <ng-container *ngIf=\"field.leftAddon\">\n <span *ngIf=\"field.leftAddon.callback\" class=\"addon-button addon-button--left\">\n <s-button\n [label]=\"field.leftAddon.label\"\n [iconClass]=\"field.leftAddon.icon\"\n [priority]=\"field.leftAddon.priority\"\n [disabled]=\"isFunction(field.leftAddon.disabled) ? field.leftAddon.disabled() : field.leftAddon.disabled\"\n (onClick)=\"field.leftAddon.callback()\"\n >\n </s-button>\n </span>\n <span *ngIf=\"!field.leftAddon.callback\" class=\"ui-inputgroup-addon\">\n <span *ngIf=\"field.leftAddon.label\">{{ field.leftAddon.label }}</span>\n <span *ngIf=\"!field.leftAddon.label\" [ngClass]=\"field.leftAddon.icon\"></span>\n </span>\n </ng-container>\n\n <ng-container *ngTemplateOutlet=\"field.keyFilter ? inputKeyFilter : input\"></ng-container>\n\n <ng-container *ngIf=\"field.rightAddon\">\n <span *ngIf=\"field.rightAddon.callback\" class=\"addon-button addon-button--right\">\n <s-button\n [label]=\"field.rightAddon.label\"\n [iconClass]=\"field.rightAddon.icon\"\n [priority]=\"field.rightAddon.priority\"\n [disabled]=\"isFunction(field.rightAddon.disabled) ? field.rightAddon.disabled() : field.rightAddon.disabled\"\n (onClick)=\"field.rightAddon.callback()\"\n >\n </s-button>\n </span>\n <span *ngIf=\"!field.rightAddon.callback\" class=\"ui-inputgroup-addon\">\n <span *ngIf=\"field.rightAddon.label\">{{ field.rightAddon.label }}</span>\n <span *ngIf=\"!field.rightAddon.label\" [ngClass]=\"field.rightAddon.icon\"></span>\n </span>\n </ng-container>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #input>\n <input\n #inputRef\n [type]=\"field.inputType || 'text'\"\n [id]=\"field.id || field.name\"\n [name]=\"field.name\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [placeholder]=\"field.placeholder\"\n [showDelay]=\"500\"\n [maxLength]=\"field.maxLength\"\n pInputText\n [autocomplete]=\"field.browserAutocomplete ? 'on' : 'off'\"\n [ngClass]=\"'mousetrap'\"\n (blur)=\"field.onBlur ? field.onBlur($event) : null\"\n (focus)=\"onFocus.next($event)\"\n (input)=\"onInput.next($event)\"\n [formControl]=\"formControl\"\n [ngStyle]=\"field.style\"\n [readOnly]=\"field.readonly ? field.readonly() : false\"\n />\n</ng-template>\n\n<ng-template #inputKeyFilter>\n <input\n #inputText\n [type]=\"field.inputType || 'text'\"\n [id]=\"field.id || field.name\"\n [name]=\"field.name\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [placeholder]=\"field.placeholder\"\n [showDelay]=\"500\"\n [maxLength]=\"field.maxLength\"\n pInputText\n [autocomplete]=\"field.browserAutocomplete ? 'on' : 'off'\"\n [ngClass]=\"'mousetrap'\"\n (blur)=\"field.onBlur ? field.onBlur($event) : null\"\n (focus)=\"onFocus.next($event)\"\n (input)=\"onInput.next($event)\"\n [pKeyFilter]=\"field.keyFilter\"\n [formControl]=\"formControl\"\n [ngStyle]=\"field.style\"\n [readOnly]=\"field.readonly ? field.readonly() : false\"\n />\n</ng-template>\n",
12243
12234
  encapsulation: core.ViewEncapsulation.None,
12244
12235
  styles: ["s-text-field.ng-dirty.ng-invalid .ui-inputtext{border-color:#c13018}s-text-field.ng-dirty.ng-invalid .ui-inputtext:hover{border-color:#e44328}.addon-button{border:1px solid #c1c1cc}.addon-button s-button .s-button-with-text,.addon-button s-button button{height:100%;min-width:40px}.addon-button--left{border-radius:5px 0 0 5px;border-right:none}.addon-button--left s-button button{border-bottom-right-radius:0;border-top-right-radius:0}.addon-button--right{border-left:none;border-radius:0 5px 5px 0}.addon-button--right s-button button{border-bottom-left-radius:0;border-top-left-radius:0}"]
12245
12236
  })
@@ -13760,7 +13751,7 @@
13760
13751
  multi: true,
13761
13752
  },
13762
13753
  ],
13763
- styles: [".textarea{border-radius:3px;border:1px solid #c1c1cc;background:#fff;width:100%;max-width:100%;min-height:4em;min-width:10em;outline:0;padding:8px;display:block}.textarea:disabled{opacity:.5}:host.ng-invalid.ng-dirty .textarea{border-color:#c13018}"]
13754
+ styles: [".textarea{border-radius:3px;border:1px solid #c1c1cc;background:#fff;width:100%;max-width:100%;min-height:4em;min-width:10em;outline:0;padding:8px;display:block}.textarea:disabled{opacity:.5}.textarea:focus{transition:border-color .2s ease-out;border:1px solid #428bca}:host.ng-invalid.ng-dirty .textarea{border-color:#c13018}"]
13764
13755
  })
13765
13756
  ], TextAreaComponent);
13766
13757
  return TextAreaComponent;