@seniorsistemas/angular-components 17.26.12 → 17.26.13-bugfix-sds-312-0983e649

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 (27) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +23 -32
  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/code-editor/code-editor.component.js +1 -1
  9. package/esm2015/components/dynamic-form/components/fields/text/text-field.component.js +11 -2
  10. package/esm2015/components/dynamic-form/components/fields/text-area/text-area-field.component.js +3 -6
  11. package/esm2015/components/info-sign/info-sign.component.js +2 -2
  12. package/esm2015/components/speech-recognition/speech-recognition/speech-recognition.component.js +2 -1
  13. package/esm2015/components/text-area/text-area/text-area.component.js +1 -1
  14. package/esm2015/components/tooltip/tooltip.directive.js +7 -26
  15. package/esm5/components/code-editor/code-editor.component.js +1 -1
  16. package/esm5/components/dynamic-form/components/fields/text/text-field.component.js +15 -2
  17. package/esm5/components/dynamic-form/components/fields/text-area/text-area-field.component.js +3 -6
  18. package/esm5/components/info-sign/info-sign.component.js +2 -2
  19. package/esm5/components/speech-recognition/speech-recognition/speech-recognition.component.js +2 -1
  20. package/esm5/components/text-area/text-area/text-area.component.js +1 -1
  21. package/esm5/components/tooltip/tooltip.directive.js +7 -26
  22. package/fesm2015/seniorsistemas-angular-components.js +20 -33
  23. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  24. package/fesm5/seniorsistemas-angular-components.js +24 -33
  25. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  26. package/package.json +1 -1
  27. package/seniorsistemas-angular-components.metadata.json +1 -1
@@ -38,7 +38,7 @@ import { CheckboxModule as CheckboxModule$1 } from 'primeng/checkbox';
38
38
  import { ChipsModule as ChipsModule$1 } from 'primeng/chips';
39
39
  import { DropdownModule } from 'primeng/dropdown';
40
40
  import { FieldsetModule } from 'primeng/fieldset';
41
- import { InputMaskModule } from 'primeng/inputmask';
41
+ import { InputMask, InputMaskModule } from 'primeng/inputmask';
42
42
  import { InputTextModule } from 'primeng/inputtext';
43
43
  import { InputTextareaModule } from 'primeng/inputtextarea';
44
44
  import { KeyFilterModule } from 'primeng/keyfilter';
@@ -477,8 +477,7 @@ let TooltipDirective = class TooltipDirective {
477
477
  this.visible = true;
478
478
  this.mobileBehavior = MobileBehavior.Pressing;
479
479
  this.componentRef = null;
480
- this.existFocusedInputRefTooltip = false;
481
- this.boundOnWindowMouseMoveFunction = this.onWindowMouseMove.bind(this);
480
+ this.tooltipCreatedByFocus = false;
482
481
  this.debounceCreateTooltipFunction = this.debounceUtils.debounceLeading(() => this._createTooltip(true, true));
483
482
  }
484
483
  ngOnInit() {
@@ -488,22 +487,6 @@ let TooltipDirective = class TooltipDirective {
488
487
  ngOnDestroy() {
489
488
  this.destroy();
490
489
  }
491
- onWindowMouseMove(event) {
492
- if (!this.componentRef) {
493
- return;
494
- }
495
- const elementRect = this.elementRef.nativeElement.getBoundingClientRect();
496
- const toolTipRect = this.tooltipDivElement.getBoundingClientRect();
497
- const totalElementArea = {
498
- top: Math.min(elementRect.top, toolTipRect.top),
499
- right: Math.max(elementRect.right, toolTipRect.right),
500
- left: Math.min(elementRect.left, toolTipRect.left),
501
- bottom: Math.max(elementRect.bottom, toolTipRect.bottom),
502
- };
503
- if (isMousePositionOutsideOfElement(event, totalElementArea) && !this.existFocusedInputRefTooltip) {
504
- this.destroy();
505
- }
506
- }
507
490
  /**
508
491
  * Manipula a visibilidade do tooltip quando houver uma referência de input.
509
492
  */
@@ -513,15 +496,15 @@ let TooltipDirective = class TooltipDirective {
513
496
  const icon = this.getIconFromFocusedInput();
514
497
  this.renderer.listen(inputFocus, "focus", () => {
515
498
  if (icon) {
516
- this.existFocusedInputRefTooltip = true;
517
499
  this._createTooltip(false, false);
500
+ this.tooltipCreatedByFocus = true;
518
501
  }
519
502
  });
520
503
  this.renderer.listen(inputFocus, "blur", () => {
521
504
  if (icon) {
522
505
  this.removeTooltip(icon);
523
506
  this.destroy();
524
- this.existFocusedInputRefTooltip = false;
507
+ this.tooltipCreatedByFocus = false;
525
508
  }
526
509
  });
527
510
  }
@@ -561,12 +544,12 @@ let TooltipDirective = class TooltipDirective {
561
544
  }
562
545
  }
563
546
  onMouseEnter() {
564
- if (this.tooltipEvent === TooltipEvent.Hover) {
547
+ if (this.tooltipEvent === TooltipEvent.Hover || this.focusedInputRef) {
565
548
  this.debounceCreateTooltipFunction();
566
549
  }
567
550
  }
568
551
  onMouseLeave() {
569
- if (this.tooltipEvent === TooltipEvent.Hover && !this.existFocusedInputRefTooltip) {
552
+ if ((this.tooltipEvent === TooltipEvent.Hover || this.focusedInputRef) && !this.tooltipCreatedByFocus) {
570
553
  this.destroy();
571
554
  }
572
555
  }
@@ -628,7 +611,6 @@ let TooltipDirective = class TooltipDirective {
628
611
  if (this.componentRef !== null) {
629
612
  this.componentRef.instance.visible = this.visible;
630
613
  this.setTooltipPositionProperty();
631
- window.addEventListener("mousemove", this.boundOnWindowMouseMoveFunction);
632
614
  }
633
615
  }
634
616
  setTooltipPositionProperty() {
@@ -738,7 +720,6 @@ let TooltipDirective = class TooltipDirective {
738
720
  this.componentRef = null;
739
721
  this.tooltipDivElement = null;
740
722
  }
741
- window.removeEventListener("mousemove", this.boundOnWindowMouseMoveFunction);
742
723
  }
743
724
  };
744
725
  TooltipDirective.ctorParameters = () => [
@@ -973,7 +954,7 @@ let InfoSignComponent = class InfoSignComponent {
973
954
  InfoSignComponent = __decorate([
974
955
  Component({
975
956
  selector: "s-info-sign-component",
976
- 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",
957
+ 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",
977
958
  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}"]
978
959
  })
979
960
  ], InfoSignComponent);
@@ -4033,7 +4014,7 @@ CodeEditorComponent = CodeEditorComponent_1 = __decorate([
4033
4014
  multi: true,
4034
4015
  },
4035
4016
  ],
4036
- styles: [".core-wrapper{height:100%}"]
4017
+ styles: [".core-wrapper{height:100%;border:1px solid #c1c1cc;border-radius:3px}"]
4037
4018
  })
4038
4019
  ], CodeEditorComponent);
4039
4020
 
@@ -10920,12 +10901,9 @@ __decorate([
10920
10901
  __decorate([
10921
10902
  Input()
10922
10903
  ], TextAreaFieldComponent.prototype, "formControl", void 0);
10923
- __decorate([
10924
- ViewChild('inputRef')
10925
- ], TextAreaFieldComponent.prototype, "inputRef", void 0);
10926
10904
  TextAreaFieldComponent = __decorate([
10927
10905
  Component({
10928
- 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"
10906
+ 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"
10929
10907
  })
10930
10908
  ], TextAreaFieldComponent);
10931
10909
 
@@ -11383,6 +11361,14 @@ let TextFieldComponent = class TextFieldComponent extends BaseFieldComponent {
11383
11361
  this.ngUnsubscribe.next();
11384
11362
  this.ngUnsubscribe.complete();
11385
11363
  }
11364
+ get inputElement() {
11365
+ if (this.inputRef instanceof InputMask) {
11366
+ return this.inputRef.inputViewChild.nativeElement;
11367
+ }
11368
+ else {
11369
+ return this.inputRef;
11370
+ }
11371
+ }
11386
11372
  getCharacterPattern() {
11387
11373
  return typeof this.field.characterPattern === "function"
11388
11374
  ? this.field.characterPattern()
@@ -11417,7 +11403,7 @@ __decorate([
11417
11403
  ], TextFieldComponent.prototype, "inputRef", void 0);
11418
11404
  TextFieldComponent = __decorate([
11419
11405
  Component({
11420
- 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",
11406
+ 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",
11421
11407
  encapsulation: ViewEncapsulation.None,
11422
11408
  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}"]
11423
11409
  })
@@ -12808,7 +12794,7 @@ TextAreaComponent = TextAreaComponent_1 = __decorate([
12808
12794
  multi: true,
12809
12795
  },
12810
12796
  ],
12811
- 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}"]
12797
+ 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}"]
12812
12798
  })
12813
12799
  ], TextAreaComponent);
12814
12800
 
@@ -13017,6 +13003,7 @@ let SpeechRecognitionComponent = SpeechRecognitionComponent_1 = class SpeechReco
13017
13003
  this._recognizedText = '';
13018
13004
  this.disabled = false;
13019
13005
  this.textToSpeechService.cancel();
13006
+ SpeechRecognitionComponent_1.TOOLBAR_ACTIVE = false;
13020
13007
  }
13021
13008
  ngOnDestroy() {
13022
13009
  this.onDestroy$.next();