matcha-components 20.169.0 → 20.172.0
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.
|
@@ -2947,6 +2947,9 @@ class MatchaSlideToggleComponent {
|
|
|
2947
2947
|
const newCheckedState = value === '' ? true : !!value;
|
|
2948
2948
|
if (newCheckedState !== this._checked) {
|
|
2949
2949
|
this._checked = newCheckedState;
|
|
2950
|
+
// Força a detecção imediata para sincronizar o DOM do input interno
|
|
2951
|
+
// especialmente útil quando o pai reverte o estado no mesmo ciclo
|
|
2952
|
+
this.cdr.detectChanges();
|
|
2950
2953
|
}
|
|
2951
2954
|
}
|
|
2952
2955
|
get checked() {
|
|
@@ -3008,10 +3011,14 @@ class MatchaSlideToggleComponent {
|
|
|
3008
3011
|
}
|
|
3009
3012
|
const inputElement = event.target;
|
|
3010
3013
|
const newCheckedState = inputElement.checked;
|
|
3014
|
+
// Suprime completamente o evento nativo para evitar interferência no pai
|
|
3015
|
+
// e evitar disparos duplos quando o componente emite seu próprio evento
|
|
3016
|
+
event.preventDefault();
|
|
3017
|
+
event.stopImmediatePropagation();
|
|
3011
3018
|
this._checked = newCheckedState;
|
|
3012
3019
|
this.onChange(newCheckedState);
|
|
3013
3020
|
this.onTouched();
|
|
3014
|
-
this.change.emit({ checked: newCheckedState });
|
|
3021
|
+
this.change.emit({ source: this, checked: newCheckedState });
|
|
3015
3022
|
// Marca para detecção após mudança (necessário para OnPush)
|
|
3016
3023
|
this.cdr.markForCheck();
|
|
3017
3024
|
}
|
|
@@ -11310,6 +11317,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
11310
11317
|
}] } });
|
|
11311
11318
|
|
|
11312
11319
|
class MatchaTooltipDirective {
|
|
11320
|
+
get tooltipText() { return this._tooltipText; }
|
|
11321
|
+
set tooltipText(v) {
|
|
11322
|
+
this._tooltipText = v;
|
|
11323
|
+
}
|
|
11324
|
+
get tooltipTextAttr() {
|
|
11325
|
+
return this.tooltipText;
|
|
11326
|
+
}
|
|
11313
11327
|
get tooltipDisabled() { return this._tooltipDisabled; }
|
|
11314
11328
|
set tooltipDisabled(v) { this._tooltipDisabled = v === 'false' ? false : !!v; }
|
|
11315
11329
|
get tooltipDisabledAttr() {
|
|
@@ -11343,7 +11357,7 @@ class MatchaTooltipDirective {
|
|
|
11343
11357
|
constructor(el, renderer) {
|
|
11344
11358
|
this.el = el;
|
|
11345
11359
|
this.renderer = renderer;
|
|
11346
|
-
this.
|
|
11360
|
+
this._tooltipText = '';
|
|
11347
11361
|
this._tooltipDisabled = false;
|
|
11348
11362
|
this._preferAbove = false;
|
|
11349
11363
|
this._preferBelow = false;
|
|
@@ -11495,7 +11509,7 @@ class MatchaTooltipDirective {
|
|
|
11495
11509
|
this.destroyTooltip();
|
|
11496
11510
|
}
|
|
11497
11511
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaTooltipDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
11498
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: MatchaTooltipDirective, isStandalone: false, selector: "[matchaTooltip]", inputs: { tooltipText: ["matchaTooltip", "tooltipText"], tooltipDisabled: ["matchaTooltipDisabled", "tooltipDisabled"], preferAbove: ["matchaTooltipAbove", "preferAbove"], preferBelow: ["matchaTooltipBelow", "preferBelow"], preferLeft: ["matchaTooltipLeft", "preferLeft"], preferRight: ["matchaTooltipRight", "preferRight"], tooltipEnableClose: ["matchaTooltipEnableClose", "tooltipEnableClose"] }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "click": "onClick($event)" }, properties: { "attr.tooltip-disabled": "this.tooltipDisabledAttr", "attr.tooltip-above": "this.preferAboveAttr", "attr.tooltip-below": "this.preferBelowAttr", "attr.tooltip-left": "this.preferLeftAttr", "attr.tooltip-right": "this.preferRightAttr", "attr.tooltip-enable-close": "this.tooltipEnableCloseAttr" } }, ngImport: i0 }); }
|
|
11512
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: MatchaTooltipDirective, isStandalone: false, selector: "[matchaTooltip]", inputs: { tooltipText: ["matchaTooltip", "tooltipText"], tooltipDisabled: ["matchaTooltipDisabled", "tooltipDisabled"], preferAbove: ["matchaTooltipAbove", "preferAbove"], preferBelow: ["matchaTooltipBelow", "preferBelow"], preferLeft: ["matchaTooltipLeft", "preferLeft"], preferRight: ["matchaTooltipRight", "preferRight"], tooltipEnableClose: ["matchaTooltipEnableClose", "tooltipEnableClose"] }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "click": "onClick($event)" }, properties: { "attr.matchaTooltip": "this.tooltipTextAttr", "attr.tooltip-disabled": "this.tooltipDisabledAttr", "attr.tooltip-above": "this.preferAboveAttr", "attr.tooltip-below": "this.preferBelowAttr", "attr.tooltip-left": "this.preferLeftAttr", "attr.tooltip-right": "this.preferRightAttr", "attr.tooltip-enable-close": "this.tooltipEnableCloseAttr" } }, ngImport: i0 }); }
|
|
11499
11513
|
}
|
|
11500
11514
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaTooltipDirective, decorators: [{
|
|
11501
11515
|
type: Directive,
|
|
@@ -11506,6 +11520,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
11506
11520
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { tooltipText: [{
|
|
11507
11521
|
type: Input,
|
|
11508
11522
|
args: ['matchaTooltip']
|
|
11523
|
+
}], tooltipTextAttr: [{
|
|
11524
|
+
type: HostBinding,
|
|
11525
|
+
args: ['attr.matchaTooltip']
|
|
11509
11526
|
}], tooltipDisabled: [{
|
|
11510
11527
|
type: Input,
|
|
11511
11528
|
args: ['matchaTooltipDisabled']
|