@ngrdt/forms 0.0.72 → 0.0.78
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 +2 -6
- package/fesm2022/ngrdt-forms.mjs.map +1 -1
- package/index.d.ts +1 -4
- package/package.json +3 -3
package/fesm2022/ngrdt-forms.mjs
CHANGED
|
@@ -34,8 +34,6 @@ class RdtBaseFormInputComponent extends RdtInteractiveElementComponent {
|
|
|
34
34
|
control = this._control.asReadonly();
|
|
35
35
|
externalValue = model(null, { alias: 'value' });
|
|
36
36
|
internalValue = linkedSignal(() => this.toInternalValue(this.externalValue()));
|
|
37
|
-
dataTestIdInput = input(undefined, { alias: 'dataTestId' });
|
|
38
|
-
dataTestId = linkedSignal(() => this.dataTestIdInput() ?? this.label() ?? '');
|
|
39
37
|
labelInput = input('', { alias: 'label' });
|
|
40
38
|
label = linkedSignal(() => this.labelInput() ?? '');
|
|
41
39
|
placeholderInput = input('', { alias: 'placeholder' });
|
|
@@ -194,7 +192,7 @@ class RdtBaseFormInputComponent extends RdtInteractiveElementComponent {
|
|
|
194
192
|
}
|
|
195
193
|
static REQUIRED_ERROR = { required: true };
|
|
196
194
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: RdtBaseFormInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
197
|
-
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 },
|
|
195
|
+
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 }, 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 });
|
|
198
196
|
}
|
|
199
197
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: RdtBaseFormInputComponent, decorators: [{
|
|
200
198
|
type: Directive,
|
|
@@ -461,7 +459,6 @@ class RdtFileInputComponent extends RdtBaseFormInputComponent {
|
|
|
461
459
|
labelFn = input(this.defaultLabelFn);
|
|
462
460
|
multiple = input(false, { transform: booleanAttribute });
|
|
463
461
|
labelCtrl = new FormControl(null);
|
|
464
|
-
labelDataTestId = computed(() => this.dataTestId() + '-label');
|
|
465
462
|
touchedEffect = effect(() => {
|
|
466
463
|
const touched = this.touched();
|
|
467
464
|
if (touched) {
|
|
@@ -505,7 +502,6 @@ class RdtFileInputComponent extends RdtBaseFormInputComponent {
|
|
|
505
502
|
.readAll(Array.from(target.files))
|
|
506
503
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
507
504
|
.subscribe((files) => {
|
|
508
|
-
console.log(files);
|
|
509
505
|
this.onChange(files);
|
|
510
506
|
this.writeValue(files);
|
|
511
507
|
});
|
|
@@ -1213,7 +1209,7 @@ class RdtBaseSelectCommonComponent extends RdtBaseFormInputComponent {
|
|
|
1213
1209
|
this.onInternalValueChange(values);
|
|
1214
1210
|
}
|
|
1215
1211
|
}
|
|
1216
|
-
else {
|
|
1212
|
+
else if (untracked(this.touched) || untracked(this.focused)) {
|
|
1217
1213
|
this.onInternalValueChange(null);
|
|
1218
1214
|
}
|
|
1219
1215
|
});
|