@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.
- package/bundles/seniorsistemas-angular-components.umd.js +23 -32
- 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/dynamic-form/components/fields/text/text-field.component.d.ts +3 -1
- package/components/dynamic-form/components/fields/text-area/text-area-field.component.d.ts +1 -2
- package/components/tooltip/tooltip.directive.d.ts +1 -3
- package/esm2015/components/code-editor/code-editor.component.js +1 -1
- package/esm2015/components/dynamic-form/components/fields/text/text-field.component.js +11 -2
- package/esm2015/components/dynamic-form/components/fields/text-area/text-area-field.component.js +3 -6
- 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/text-area/text-area/text-area.component.js +1 -1
- package/esm2015/components/tooltip/tooltip.directive.js +7 -26
- package/esm5/components/code-editor/code-editor.component.js +1 -1
- package/esm5/components/dynamic-form/components/fields/text/text-field.component.js +15 -2
- package/esm5/components/dynamic-form/components/fields/text-area/text-area-field.component.js +3 -6
- 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/text-area/text-area/text-area.component.js +1 -1
- package/esm5/components/tooltip/tooltip.directive.js +7 -26
- package/fesm2015/seniorsistemas-angular-components.js +20 -33
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +24 -33
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- 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';
|
|
@@ -508,8 +508,7 @@ var TooltipDirective = /** @class */ (function () {
|
|
|
508
508
|
this.visible = true;
|
|
509
509
|
this.mobileBehavior = MobileBehavior.Pressing;
|
|
510
510
|
this.componentRef = null;
|
|
511
|
-
this.
|
|
512
|
-
this.boundOnWindowMouseMoveFunction = this.onWindowMouseMove.bind(this);
|
|
511
|
+
this.tooltipCreatedByFocus = false;
|
|
513
512
|
this.debounceCreateTooltipFunction = this.debounceUtils.debounceLeading(function () { return _this._createTooltip(true, true); });
|
|
514
513
|
}
|
|
515
514
|
TooltipDirective.prototype.ngOnInit = function () {
|
|
@@ -519,22 +518,6 @@ var TooltipDirective = /** @class */ (function () {
|
|
|
519
518
|
TooltipDirective.prototype.ngOnDestroy = function () {
|
|
520
519
|
this.destroy();
|
|
521
520
|
};
|
|
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
|
-
};
|
|
538
521
|
/**
|
|
539
522
|
* Manipula a visibilidade do tooltip quando houver uma referência de input.
|
|
540
523
|
*/
|
|
@@ -545,15 +528,15 @@ var TooltipDirective = /** @class */ (function () {
|
|
|
545
528
|
var icon_1 = this.getIconFromFocusedInput();
|
|
546
529
|
this.renderer.listen(inputFocus, "focus", function () {
|
|
547
530
|
if (icon_1) {
|
|
548
|
-
_this.existFocusedInputRefTooltip = true;
|
|
549
531
|
_this._createTooltip(false, false);
|
|
532
|
+
_this.tooltipCreatedByFocus = true;
|
|
550
533
|
}
|
|
551
534
|
});
|
|
552
535
|
this.renderer.listen(inputFocus, "blur", function () {
|
|
553
536
|
if (icon_1) {
|
|
554
537
|
_this.removeTooltip(icon_1);
|
|
555
538
|
_this.destroy();
|
|
556
|
-
_this.
|
|
539
|
+
_this.tooltipCreatedByFocus = false;
|
|
557
540
|
}
|
|
558
541
|
});
|
|
559
542
|
}
|
|
@@ -593,12 +576,12 @@ var TooltipDirective = /** @class */ (function () {
|
|
|
593
576
|
}
|
|
594
577
|
};
|
|
595
578
|
TooltipDirective.prototype.onMouseEnter = function () {
|
|
596
|
-
if (this.tooltipEvent === TooltipEvent.Hover) {
|
|
579
|
+
if (this.tooltipEvent === TooltipEvent.Hover || this.focusedInputRef) {
|
|
597
580
|
this.debounceCreateTooltipFunction();
|
|
598
581
|
}
|
|
599
582
|
};
|
|
600
583
|
TooltipDirective.prototype.onMouseLeave = function () {
|
|
601
|
-
if (this.tooltipEvent === TooltipEvent.Hover && !this.
|
|
584
|
+
if ((this.tooltipEvent === TooltipEvent.Hover || this.focusedInputRef) && !this.tooltipCreatedByFocus) {
|
|
602
585
|
this.destroy();
|
|
603
586
|
}
|
|
604
587
|
};
|
|
@@ -664,7 +647,6 @@ var TooltipDirective = /** @class */ (function () {
|
|
|
664
647
|
if (this.componentRef !== null) {
|
|
665
648
|
this.componentRef.instance.visible = this.visible;
|
|
666
649
|
this.setTooltipPositionProperty();
|
|
667
|
-
window.addEventListener("mousemove", this.boundOnWindowMouseMoveFunction);
|
|
668
650
|
}
|
|
669
651
|
};
|
|
670
652
|
TooltipDirective.prototype.setTooltipPositionProperty = function () {
|
|
@@ -775,7 +757,6 @@ var TooltipDirective = /** @class */ (function () {
|
|
|
775
757
|
this.componentRef = null;
|
|
776
758
|
this.tooltipDivElement = null;
|
|
777
759
|
}
|
|
778
|
-
window.removeEventListener("mousemove", this.boundOnWindowMouseMoveFunction);
|
|
779
760
|
};
|
|
780
761
|
TooltipDirective.ctorParameters = function () { return [
|
|
781
762
|
{ type: ElementRef },
|
|
@@ -1027,7 +1008,7 @@ var InfoSignComponent = /** @class */ (function () {
|
|
|
1027
1008
|
InfoSignComponent = __decorate([
|
|
1028
1009
|
Component({
|
|
1029
1010
|
selector: "s-info-sign-component",
|
|
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",
|
|
1011
|
+
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",
|
|
1031
1012
|
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}"]
|
|
1032
1013
|
})
|
|
1033
1014
|
], InfoSignComponent);
|
|
@@ -4266,7 +4247,7 @@ var CodeEditorComponent = /** @class */ (function () {
|
|
|
4266
4247
|
multi: true,
|
|
4267
4248
|
},
|
|
4268
4249
|
],
|
|
4269
|
-
styles: [".core-wrapper{height:100
|
|
4250
|
+
styles: [".core-wrapper{height:100%;border:1px solid #c1c1cc;border-radius:3px}"]
|
|
4270
4251
|
})
|
|
4271
4252
|
], CodeEditorComponent);
|
|
4272
4253
|
return CodeEditorComponent;
|
|
@@ -11631,12 +11612,9 @@ var TextAreaFieldComponent = /** @class */ (function () {
|
|
|
11631
11612
|
__decorate([
|
|
11632
11613
|
Input()
|
|
11633
11614
|
], TextAreaFieldComponent.prototype, "formControl", void 0);
|
|
11634
|
-
__decorate([
|
|
11635
|
-
ViewChild('inputRef')
|
|
11636
|
-
], TextAreaFieldComponent.prototype, "inputRef", void 0);
|
|
11637
11615
|
TextAreaFieldComponent = __decorate([
|
|
11638
11616
|
Component({
|
|
11639
|
-
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"
|
|
11617
|
+
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"
|
|
11640
11618
|
})
|
|
11641
11619
|
], TextAreaFieldComponent);
|
|
11642
11620
|
return TextAreaFieldComponent;
|
|
@@ -12062,6 +12040,18 @@ var TextFieldComponent = /** @class */ (function (_super) {
|
|
|
12062
12040
|
this.ngUnsubscribe.next();
|
|
12063
12041
|
this.ngUnsubscribe.complete();
|
|
12064
12042
|
};
|
|
12043
|
+
Object.defineProperty(TextFieldComponent.prototype, "inputElement", {
|
|
12044
|
+
get: function () {
|
|
12045
|
+
if (this.inputRef instanceof InputMask) {
|
|
12046
|
+
return this.inputRef.inputViewChild.nativeElement;
|
|
12047
|
+
}
|
|
12048
|
+
else {
|
|
12049
|
+
return this.inputRef;
|
|
12050
|
+
}
|
|
12051
|
+
},
|
|
12052
|
+
enumerable: true,
|
|
12053
|
+
configurable: true
|
|
12054
|
+
});
|
|
12065
12055
|
TextFieldComponent.prototype.getCharacterPattern = function () {
|
|
12066
12056
|
return typeof this.field.characterPattern === "function"
|
|
12067
12057
|
? this.field.characterPattern()
|
|
@@ -12095,7 +12085,7 @@ var TextFieldComponent = /** @class */ (function (_super) {
|
|
|
12095
12085
|
], TextFieldComponent.prototype, "inputRef", void 0);
|
|
12096
12086
|
TextFieldComponent = __decorate([
|
|
12097
12087
|
Component({
|
|
12098
|
-
template: "<s-field-label *ngIf=\"
|
|
12088
|
+
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",
|
|
12099
12089
|
encapsulation: ViewEncapsulation.None,
|
|
12100
12090
|
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}"]
|
|
12101
12091
|
})
|
|
@@ -13616,7 +13606,7 @@ var TextAreaComponent = /** @class */ (function () {
|
|
|
13616
13606
|
multi: true,
|
|
13617
13607
|
},
|
|
13618
13608
|
],
|
|
13619
|
-
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}"]
|
|
13609
|
+
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}"]
|
|
13620
13610
|
})
|
|
13621
13611
|
], TextAreaComponent);
|
|
13622
13612
|
return TextAreaComponent;
|
|
@@ -13840,6 +13830,7 @@ var SpeechRecognitionComponent = /** @class */ (function () {
|
|
|
13840
13830
|
this._recognizedText = '';
|
|
13841
13831
|
this.disabled = false;
|
|
13842
13832
|
this.textToSpeechService.cancel();
|
|
13833
|
+
SpeechRecognitionComponent_1.TOOLBAR_ACTIVE = false;
|
|
13843
13834
|
};
|
|
13844
13835
|
SpeechRecognitionComponent.prototype.ngOnDestroy = function () {
|
|
13845
13836
|
this.onDestroy$.next();
|