@breadstone/mosaik-elements-angular 0.0.194 → 0.0.196
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,22 @@
|
|
|
1
|
+
## 0.0.196 (2025-12-05)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **SignalFormValidator:** mark fields as touched during validation ([662b6f9dbe](https://github.com/RueDeRennes/mosaik/commit/662b6f9dbe))
|
|
6
|
+
- **event-hub:** add Event Hub pattern implementation for Angular 2025 ([88dc4f7404](https://github.com/RueDeRennes/mosaik/commit/88dc4f7404))
|
|
7
|
+
|
|
8
|
+
### 🩹 Fixes
|
|
9
|
+
|
|
10
|
+
- **keywords:** add Event Bus and Message Bus to event hub documentation ([69cafcf76f](https://github.com/RueDeRennes/mosaik/commit/69cafcf76f))
|
|
11
|
+
|
|
12
|
+
## 0.0.195 (2025-12-03)
|
|
13
|
+
|
|
14
|
+
### 🩹 Fixes
|
|
15
|
+
|
|
16
|
+
- **FormFieldDirective:** remove unnecessary @required annotation from fieldState ([77df1cf897](https://github.com/RueDeRennes/mosaik/commit/77df1cf897))
|
|
17
|
+
- **FormFieldStatusDirective:** inject FIELD and update host element handling ([f8c4c2001f](https://github.com/RueDeRennes/mosaik/commit/f8c4c2001f))
|
|
18
|
+
- **package:** add missing newline at end of file in package.json ([a9bf15349b](https://github.com/RueDeRennes/mosaik/commit/a9bf15349b))
|
|
19
|
+
|
|
1
20
|
## 0.0.194 (2025-12-03)
|
|
2
21
|
|
|
3
22
|
### 🩹 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
|
}
|
|
@@ -60615,6 +60613,7 @@ class SignalFormValidator {
|
|
|
60615
60613
|
const issues = [];
|
|
60616
60614
|
// Traverse and collect individual issues
|
|
60617
60615
|
this.traverse(form, '', (path, field) => {
|
|
60616
|
+
field.markAsTouched();
|
|
60618
60617
|
const errs = field.errors();
|
|
60619
60618
|
if (errs.length > 0) {
|
|
60620
60619
|
const issue = {
|
|
@@ -61833,7 +61832,6 @@ class FormFieldDirective {
|
|
|
61833
61832
|
/**
|
|
61834
61833
|
* The FieldState to observe for validation errors.
|
|
61835
61834
|
*
|
|
61836
|
-
* @required
|
|
61837
61835
|
* @public
|
|
61838
61836
|
* @example
|
|
61839
61837
|
* ```html
|
|
@@ -61842,7 +61840,7 @@ class FormFieldDirective {
|
|
|
61842
61840
|
* </mosaik-form-field>
|
|
61843
61841
|
* ```
|
|
61844
61842
|
*/
|
|
61845
|
-
fieldState = input
|
|
61843
|
+
fieldState = input(undefined, { ...(ngDevMode ? { debugName: "fieldState" } : {}) });
|
|
61846
61844
|
//#endregion
|
|
61847
61845
|
//#region Methods
|
|
61848
61846
|
/**
|
|
@@ -61872,7 +61870,7 @@ class FormFieldDirective {
|
|
|
61872
61870
|
}
|
|
61873
61871
|
}
|
|
61874
61872
|
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:
|
|
61873
|
+
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
61874
|
}
|
|
61877
61875
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: FormFieldDirective, decorators: [{
|
|
61878
61876
|
type: Directive,
|
|
@@ -61880,7 +61878,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImpor
|
|
|
61880
61878
|
// applies to your custom element
|
|
61881
61879
|
selector: 'mosaik-form-field'
|
|
61882
61880
|
}]
|
|
61883
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { fieldState: [{ type: i0.Input, args: [{ isSignal: true, alias: "fieldState", required:
|
|
61881
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { fieldState: [{ type: i0.Input, args: [{ isSignal: true, alias: "fieldState", required: false }] }] } });
|
|
61884
61882
|
|
|
61885
61883
|
// #region Imports
|
|
61886
61884
|
// #endregion
|