matcha-components 19.138.0 → 19.140.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.
- package/fesm2022/matcha-components.mjs +43 -24
- package/fesm2022/matcha-components.mjs.map +1 -1
- package/index.d.ts +18 -16
- package/package.json +1 -1
|
@@ -694,12 +694,6 @@ class MatchaLazyloadDataComponent {
|
|
|
694
694
|
* Threshold para o Intersection Observer (padrão: 0.1 = 10% do elemento visível).
|
|
695
695
|
*/
|
|
696
696
|
this.threshold = 0.1;
|
|
697
|
-
/**
|
|
698
|
-
* Root margin para o Intersection Observer (padrão: '0px').
|
|
699
|
-
* Use valores como '100px' para acionar 100px antes do elemento aparecer.
|
|
700
|
-
* Aceita valores como: '10px', '10px 20px', '10% 5% 0px 5%'
|
|
701
|
-
*/
|
|
702
|
-
this.rootMargin = '0px';
|
|
703
697
|
/**
|
|
704
698
|
* Emite a lista acumulada de itens.
|
|
705
699
|
*/
|
|
@@ -722,7 +716,7 @@ class MatchaLazyloadDataComponent {
|
|
|
722
716
|
// Configura o Intersection Observer para carregamento via scroll
|
|
723
717
|
const options = {
|
|
724
718
|
root: null,
|
|
725
|
-
rootMargin:
|
|
719
|
+
rootMargin: '0px',
|
|
726
720
|
threshold: this.threshold
|
|
727
721
|
};
|
|
728
722
|
this.observer = new IntersectionObserver(entries => {
|
|
@@ -801,7 +795,7 @@ class MatchaLazyloadDataComponent {
|
|
|
801
795
|
this.searchSubscription.unsubscribe();
|
|
802
796
|
}
|
|
803
797
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: MatchaLazyloadDataComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
804
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: MatchaLazyloadDataComponent, isStandalone: false, selector: "matcha-lazyload-data", inputs: { loadData: "loadData", initialList: "initialList", threshold: "threshold",
|
|
798
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: MatchaLazyloadDataComponent, isStandalone: false, selector: "matcha-lazyload-data", inputs: { loadData: "loadData", initialList: "initialList", threshold: "threshold", resetKey: "resetKey", searchTerm: "searchTerm" }, outputs: { aggregatedData: "aggregatedData", exactMatch: "exactMatch" }, usesOnChanges: true, ngImport: i0, template: "<ng-content></ng-content>\n", styles: ["", ":host{height:1px;opacity:0}\n"] }); }
|
|
805
799
|
}
|
|
806
800
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: MatchaLazyloadDataComponent, decorators: [{
|
|
807
801
|
type: Component,
|
|
@@ -812,8 +806,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
812
806
|
type: Input
|
|
813
807
|
}], threshold: [{
|
|
814
808
|
type: Input
|
|
815
|
-
}], rootMargin: [{
|
|
816
|
-
type: Input
|
|
817
809
|
}], resetKey: [{
|
|
818
810
|
type: Input
|
|
819
811
|
}], searchTerm: [{
|
|
@@ -2811,26 +2803,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
2811
2803
|
|
|
2812
2804
|
class MatchaStepperStateService {
|
|
2813
2805
|
constructor() {
|
|
2814
|
-
this.steps
|
|
2815
|
-
this.
|
|
2806
|
+
this.steps = [];
|
|
2807
|
+
this._steps$ = new BehaviorSubject([]);
|
|
2808
|
+
this.steps$ = this._steps$.asObservable();
|
|
2809
|
+
this._activeStep$ = new BehaviorSubject(0);
|
|
2810
|
+
this.activeStep$ = this._activeStep$.asObservable();
|
|
2811
|
+
this.pendingActiveStep = null;
|
|
2816
2812
|
}
|
|
2817
2813
|
setSteps(steps) {
|
|
2818
|
-
this.steps
|
|
2814
|
+
this.steps = steps;
|
|
2815
|
+
this._steps$.next(steps);
|
|
2816
|
+
// Se havia um índice pendente, aplica agora
|
|
2817
|
+
if (this.pendingActiveStep !== null) {
|
|
2818
|
+
this.setActiveStep(this.pendingActiveStep);
|
|
2819
|
+
this.pendingActiveStep = null;
|
|
2820
|
+
}
|
|
2819
2821
|
}
|
|
2820
2822
|
setActiveStep(index) {
|
|
2821
|
-
this.
|
|
2823
|
+
if (this.steps.length === 0) {
|
|
2824
|
+
// Steps ainda não definidos, guarda para depois
|
|
2825
|
+
this.pendingActiveStep = index;
|
|
2826
|
+
return;
|
|
2827
|
+
}
|
|
2828
|
+
if (index >= 0 && index < this.steps.length) {
|
|
2829
|
+
this._activeStep$.next(index);
|
|
2830
|
+
}
|
|
2822
2831
|
}
|
|
2823
2832
|
nextStep() {
|
|
2824
|
-
const
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
this.activeStep$.next(current + 1);
|
|
2833
|
+
const current = this._activeStep$.value;
|
|
2834
|
+
if (current < this.steps.length - 1) {
|
|
2835
|
+
this._activeStep$.next(current + 1);
|
|
2828
2836
|
}
|
|
2829
2837
|
}
|
|
2830
2838
|
prevStep() {
|
|
2831
|
-
const current = this.
|
|
2839
|
+
const current = this._activeStep$.value;
|
|
2832
2840
|
if (current > 0) {
|
|
2833
|
-
this.
|
|
2841
|
+
this._activeStep$.next(current - 1);
|
|
2834
2842
|
}
|
|
2835
2843
|
}
|
|
2836
2844
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: MatchaStepperStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
@@ -2841,8 +2849,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
2841
2849
|
}] });
|
|
2842
2850
|
|
|
2843
2851
|
class MatchaStepperComponent {
|
|
2844
|
-
|
|
2845
|
-
|
|
2852
|
+
constructor(stepperState) {
|
|
2853
|
+
this.stepperState = stepperState;
|
|
2854
|
+
this.active = 0;
|
|
2855
|
+
}
|
|
2856
|
+
ngOnChanges(changes) {
|
|
2857
|
+
if (changes['active'] && typeof changes['active'].currentValue === 'number') {
|
|
2858
|
+
this.stepperState.setActiveStep(this.active);
|
|
2859
|
+
}
|
|
2860
|
+
}
|
|
2861
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: MatchaStepperComponent, deps: [{ token: MatchaStepperStateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2862
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: MatchaStepperComponent, isStandalone: false, selector: "matcha-stepper", inputs: { active: "active" }, providers: [MatchaStepperStateService], usesOnChanges: true, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true }); }
|
|
2846
2863
|
}
|
|
2847
2864
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: MatchaStepperComponent, decorators: [{
|
|
2848
2865
|
type: Component,
|
|
@@ -2852,7 +2869,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
2852
2869
|
providers: [MatchaStepperStateService],
|
|
2853
2870
|
standalone: false
|
|
2854
2871
|
}]
|
|
2855
|
-
}] }
|
|
2872
|
+
}], ctorParameters: () => [{ type: MatchaStepperStateService }], propDecorators: { active: [{
|
|
2873
|
+
type: Input
|
|
2874
|
+
}] } });
|
|
2856
2875
|
|
|
2857
2876
|
class MatchaStepperContentComponent {
|
|
2858
2877
|
constructor(stepperState) {
|
|
@@ -2905,7 +2924,7 @@ class MatchaStepperControllerComponent {
|
|
|
2905
2924
|
this.activeStep = 0;
|
|
2906
2925
|
}
|
|
2907
2926
|
ngOnInit() {
|
|
2908
|
-
this.stepperState.steps$.subscribe(steps => this.steps = steps);
|
|
2927
|
+
this.stepperState.steps$.subscribe((steps) => this.steps = steps);
|
|
2909
2928
|
this.stepperState.activeStep$.subscribe(step => this.activeStep = step);
|
|
2910
2929
|
}
|
|
2911
2930
|
goToStep(index) {
|