@breadstone/mosaik-elements-angular 0.0.194 → 0.0.195
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## 0.0.195 (2025-12-03)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- **FormFieldDirective:** remove unnecessary @required annotation from fieldState ([77df1cf897](https://github.com/RueDeRennes/mosaik/commit/77df1cf897))
|
|
6
|
+
- **FormFieldStatusDirective:** inject FIELD and update host element handling ([f8c4c2001f](https://github.com/RueDeRennes/mosaik/commit/f8c4c2001f))
|
|
7
|
+
- **package:** add missing newline at end of file in package.json ([a9bf15349b](https://github.com/RueDeRennes/mosaik/commit/a9bf15349b))
|
|
8
|
+
|
|
1
9
|
## 0.0.194 (2025-12-03)
|
|
2
10
|
|
|
3
11
|
### 🩹 Fixes
|
|
@@ -2469,24 +2469,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImpor
|
|
|
2469
2469
|
* If no Signal Forms field is bound, the directive stays inactive.
|
|
2470
2470
|
*/
|
|
2471
2471
|
class FormFieldStatusDirective {
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
* Provided by Angular when `[field]` is present on the same element.
|
|
2475
|
-
* `null` if the element is not bound to a Signal Forms field.
|
|
2476
|
-
*/
|
|
2477
|
-
fieldState = inject(FIELD, { optional: true });
|
|
2472
|
+
_host;
|
|
2473
|
+
_field;
|
|
2478
2474
|
constructor() {
|
|
2475
|
+
this._host = inject((ElementRef)).nativeElement;
|
|
2476
|
+
this._field = inject(FIELD, { optional: true });
|
|
2479
2477
|
effect(() => {
|
|
2480
2478
|
// Prevent Angular from tracking the null-case.
|
|
2481
2479
|
// We only want reactivity when a field is really present.
|
|
2482
|
-
const field = untracked(() => this.
|
|
2480
|
+
const field = untracked(() => this._field);
|
|
2483
2481
|
if (!field) {
|
|
2484
2482
|
return;
|
|
2485
2483
|
}
|
|
2486
2484
|
const state = field.state();
|
|
2487
2485
|
const isInvalid = state.invalid() && state.touched();
|
|
2488
|
-
if ('invalid' in this.
|
|
2489
|
-
this.
|
|
2486
|
+
if ('invalid' in this._host) {
|
|
2487
|
+
this._host.invalid = isInvalid;
|
|
2490
2488
|
}
|
|
2491
2489
|
});
|
|
2492
2490
|
}
|
|
@@ -61833,7 +61831,6 @@ class FormFieldDirective {
|
|
|
61833
61831
|
/**
|
|
61834
61832
|
* The FieldState to observe for validation errors.
|
|
61835
61833
|
*
|
|
61836
|
-
* @required
|
|
61837
61834
|
* @public
|
|
61838
61835
|
* @example
|
|
61839
61836
|
* ```html
|
|
@@ -61842,7 +61839,7 @@ class FormFieldDirective {
|
|
|
61842
61839
|
* </mosaik-form-field>
|
|
61843
61840
|
* ```
|
|
61844
61841
|
*/
|
|
61845
|
-
fieldState = input
|
|
61842
|
+
fieldState = input(undefined, { ...(ngDevMode ? { debugName: "fieldState" } : {}) });
|
|
61846
61843
|
//#endregion
|
|
61847
61844
|
//#region Methods
|
|
61848
61845
|
/**
|
|
@@ -61872,7 +61869,7 @@ class FormFieldDirective {
|
|
|
61872
61869
|
}
|
|
61873
61870
|
}
|
|
61874
61871
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: FormFieldDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
61875
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.2", type: FormFieldDirective, isStandalone: true, selector: "mosaik-form-field", inputs: { fieldState: { classPropertyName: "fieldState", publicName: "fieldState", isSignal: true, isRequired:
|
|
61872
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.2", type: FormFieldDirective, isStandalone: true, selector: "mosaik-form-field", inputs: { fieldState: { classPropertyName: "fieldState", publicName: "fieldState", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
61876
61873
|
}
|
|
61877
61874
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: FormFieldDirective, decorators: [{
|
|
61878
61875
|
type: Directive,
|
|
@@ -61880,7 +61877,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImpor
|
|
|
61880
61877
|
// applies to your custom element
|
|
61881
61878
|
selector: 'mosaik-form-field'
|
|
61882
61879
|
}]
|
|
61883
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { fieldState: [{ type: i0.Input, args: [{ isSignal: true, alias: "fieldState", required:
|
|
61880
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { fieldState: [{ type: i0.Input, args: [{ isSignal: true, alias: "fieldState", required: false }] }] } });
|
|
61884
61881
|
|
|
61885
61882
|
// #region Imports
|
|
61886
61883
|
// #endregion
|