@stemy/ngx-dynamic-form 19.9.26 → 19.9.28
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.
|
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { InjectionToken, inject, Inject, Injectable, untracked, input, Renderer2, ElementRef, computed, signal, effect, HostBinding, Directive, Input, Optional, Pipe, Type, Component, Injector, output, ChangeDetectionStrategy, ViewEncapsulation, viewChild, makeEnvironmentProviders, NgModule } from '@angular/core';
|
|
3
3
|
import * as i2 from '@stemy/ngx-utils';
|
|
4
4
|
import { cachedFactory, ReflectUtils, ObjectUtils, LANGUAGE_SERVICE, ForbiddenZone, SetUtils, ArrayUtils, API_SERVICE, StringUtils, AsyncMethodBase, EventsService, NgxUtilsModule } from '@stemy/ngx-utils';
|
|
5
|
-
import { of, merge,
|
|
5
|
+
import { of, merge, Observable, firstValueFrom, BehaviorSubject, combineLatestWith, switchMap, distinctUntilChanged, first, Subject, map, filter } from 'rxjs';
|
|
6
6
|
import { debounceTime } from 'rxjs/operators';
|
|
7
7
|
import * as i1 from '@angular/forms';
|
|
8
8
|
import { FormGroup as FormGroup$1, FormArray as FormArray$1, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
@@ -130,10 +130,7 @@ function replaceSpecialChars(str, to = "-") {
|
|
|
130
130
|
function controlValues(control, timeout = 500) {
|
|
131
131
|
const initial$ = of(control.value); // Emit immediately
|
|
132
132
|
const changes$ = control.valueChanges.pipe(debounceTime(timeout));
|
|
133
|
-
return merge(initial$, changes$)
|
|
134
|
-
console.log(value, "why");
|
|
135
|
-
return value;
|
|
136
|
-
}));
|
|
133
|
+
return merge(initial$, changes$);
|
|
137
134
|
}
|
|
138
135
|
/**
|
|
139
136
|
* Creates a new observable that always starts with the controls current status.
|
|
@@ -2247,11 +2244,11 @@ class DynamicFormPasswordComponent extends DynamicFieldType {
|
|
|
2247
2244
|
});
|
|
2248
2245
|
}
|
|
2249
2246
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.22", ngImport: i0, type: DynamicFormPasswordComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2250
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.22", type: DynamicFormPasswordComponent, isStandalone: false, selector: "dynamic-form-password", viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"form-password-group\">\n <input #input\n class=\"form-control\"\n [attr.type]=\"type()\"\n [attr.data-testid]=\"field.testId\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\" />\n <btn type=\"transparent\"\n [icon]=\"icon()\"\n [attr.data-testid]=\"field.testId + '-toggle'\"\n (mousedown)=\"switchType()\"></btn>\n</div>\n", styles: [".form-password-group{position:relative}.form-password-group btn{display:block;position:absolute;aspect-ratio:1;top:0;bottom:0;right:0}\n"], dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2.BtnComponent, selector: "btn", inputs: ["label", "tooltip", "icon", "disabled", "path", "type", "size"] }, { kind: "directive", type: i3.LegacyFormlyAttributes, selector: "[formlyAttributes]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2247
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.22", type: DynamicFormPasswordComponent, isStandalone: false, selector: "dynamic-form-password", viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"form-password-group\">\n <input #input\n class=\"form-control\"\n [attr.type]=\"type()\"\n [attr.data-testid]=\"field.testId\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\" />\n <btn type=\"transparent\"\n [icon]=\"icon()\"\n [attr.data-testid]=\"field.testId + '-toggle'\"\n (mousedown)=\"switchType()\"></btn>\n</div>\n", styles: [".form-password-group{position:relative}.form-password-group btn{display:block;position:absolute;aspect-ratio:1;top:0;bottom:0;right:0}.mat-mdc-form-field .form-password-group .form-control{background-color:transparent;box-shadow:none;outline:none;border:none;padding:0;height:24px}.mat-mdc-form-field .form-password-group .mat-mdc-button{translate:10px -15px}\n"], dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2.BtnComponent, selector: "btn", inputs: ["label", "tooltip", "icon", "disabled", "path", "type", "size"] }, { kind: "directive", type: i3.LegacyFormlyAttributes, selector: "[formlyAttributes]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2251
2248
|
}
|
|
2252
2249
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.22", ngImport: i0, type: DynamicFormPasswordComponent, decorators: [{
|
|
2253
2250
|
type: Component,
|
|
2254
|
-
args: [{ standalone: false, selector: "dynamic-form-password", encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"form-password-group\">\n <input #input\n class=\"form-control\"\n [attr.type]=\"type()\"\n [attr.data-testid]=\"field.testId\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\" />\n <btn type=\"transparent\"\n [icon]=\"icon()\"\n [attr.data-testid]=\"field.testId + '-toggle'\"\n (mousedown)=\"switchType()\"></btn>\n</div>\n", styles: [".form-password-group{position:relative}.form-password-group btn{display:block;position:absolute;aspect-ratio:1;top:0;bottom:0;right:0}\n"] }]
|
|
2251
|
+
args: [{ standalone: false, selector: "dynamic-form-password", encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"form-password-group\">\n <input #input\n class=\"form-control\"\n [attr.type]=\"type()\"\n [attr.data-testid]=\"field.testId\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\" />\n <btn type=\"transparent\"\n [icon]=\"icon()\"\n [attr.data-testid]=\"field.testId + '-toggle'\"\n (mousedown)=\"switchType()\"></btn>\n</div>\n", styles: [".form-password-group{position:relative}.form-password-group btn{display:block;position:absolute;aspect-ratio:1;top:0;bottom:0;right:0}.mat-mdc-form-field .form-password-group .form-control{background-color:transparent;box-shadow:none;outline:none;border:none;padding:0;height:24px}.mat-mdc-form-field .form-password-group .mat-mdc-button{translate:10px -15px}\n"] }]
|
|
2255
2252
|
}] });
|
|
2256
2253
|
|
|
2257
2254
|
class DynamicFormStaticComponent extends DynamicFieldType {
|