@ngrdt/forms 0.0.61 → 0.0.62
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/ngrdt-forms.mjs +8 -5
- package/fesm2022/ngrdt-forms.mjs.map +1 -1
- package/index.d.ts +7 -4
- package/package.json +3 -3
package/fesm2022/ngrdt-forms.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Injector, signal,
|
|
2
|
+
import { inject, Injector, signal, model, linkedSignal, input, booleanAttribute, computed, effect, untracked, Directive, InjectionToken, forwardRef, output, numberAttribute, ElementRef, Pipe } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed, toSignal, toObservable } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { FormControlName, FormControlDirective, NgModel, NgControl, Validators, NG_VALUE_ACCESSOR, FormControl, FormGroup } from '@angular/forms';
|
|
5
5
|
import { RdtInteractiveElementComponent, RdtComponentOutletDirective } from '@ngrdt/core';
|
|
@@ -32,13 +32,16 @@ class RdtBaseFormInputComponent extends RdtInteractiveElementComponent {
|
|
|
32
32
|
injector = inject(Injector);
|
|
33
33
|
_control = signal(null);
|
|
34
34
|
control = this._control.asReadonly();
|
|
35
|
-
label = input('');
|
|
36
|
-
placeholder = input('');
|
|
37
|
-
name = input('');
|
|
38
35
|
externalValue = model(null, { alias: 'value' });
|
|
39
36
|
internalValue = linkedSignal(() => this.toInternalValue(this.externalValue()));
|
|
40
37
|
dataTestIdInput = input(undefined, { alias: 'dataTestId' });
|
|
41
38
|
dataTestId = linkedSignal(() => this.dataTestIdInput() ?? this.label() ?? '');
|
|
39
|
+
labelInput = input('', { alias: 'label' });
|
|
40
|
+
label = linkedSignal(() => this.labelInput() ?? '');
|
|
41
|
+
placeholderInput = input('', { alias: 'placeholder' });
|
|
42
|
+
placeholder = linkedSignal(() => this.placeholderInput() ?? '');
|
|
43
|
+
nameInput = input('', { alias: 'name' });
|
|
44
|
+
name = linkedSignal(() => this.nameInput() ?? '');
|
|
42
45
|
readonlyInput = input(null, {
|
|
43
46
|
alias: 'readonly',
|
|
44
47
|
transform: booleanAttribute,
|
|
@@ -182,7 +185,7 @@ class RdtBaseFormInputComponent extends RdtInteractiveElementComponent {
|
|
|
182
185
|
}
|
|
183
186
|
static REQUIRED_ERROR = { required: true };
|
|
184
187
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: RdtBaseFormInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
185
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.0", type: RdtBaseFormInputComponent, isStandalone: true, inputs: {
|
|
188
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.0", type: RdtBaseFormInputComponent, isStandalone: true, inputs: { externalValue: { classPropertyName: "externalValue", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, dataTestIdInput: { classPropertyName: "dataTestIdInput", publicName: "dataTestId", isSignal: true, isRequired: false, transformFunction: null }, labelInput: { classPropertyName: "labelInput", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholderInput: { classPropertyName: "placeholderInput", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, nameInput: { classPropertyName: "nameInput", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, readonlyInput: { classPropertyName: "readonlyInput", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, requiredInput: { classPropertyName: "requiredInput", publicName: "required", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { externalValue: "valueChange" }, usesInheritance: true, ngImport: i0 });
|
|
186
189
|
}
|
|
187
190
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: RdtBaseFormInputComponent, decorators: [{
|
|
188
191
|
type: Directive,
|