@breadstone/mosaik-elements-angular 0.0.198 → 0.0.199

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,10 @@
1
+ ## 0.0.199 (2025-12-05)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - **SignalFormValidator:** update collectErrors implementation for flat structures ([1a51b459a5](https://github.com/RueDeRennes/mosaik/commit/1a51b459a5))
6
+ - **package:** add missing newline at end of file ([e7bbe4e7c1](https://github.com/RueDeRennes/mosaik/commit/e7bbe4e7c1))
7
+
1
8
  ## 0.0.198 (2025-12-05)
2
9
 
3
10
  This was a version bump only for mosaik-elements-angular to align it with other projects, there were no code changes.
@@ -60644,18 +60644,33 @@ class SignalFormValidator {
60644
60644
  * @returns An array of validation issues.
60645
60645
  */
60646
60646
  collectErrors(form) {
60647
+ // this is the first version of this implementation,
60648
+ // what we know is this doesn't work with nested structures.
60649
+ // we have to check this in the future again.
60647
60650
  const issues = [];
60648
- this.traverse(form, '', (path, field) => {
60651
+ for (const [key, field] of Object.entries(form)) {
60649
60652
  const errs = field.errors();
60650
60653
  if (errs.length > 0) {
60651
60654
  issues.push({
60652
- path,
60655
+ path: key,
60653
60656
  errors: errs,
60654
60657
  fieldRef: field
60655
60658
  });
60656
60659
  }
60657
- });
60660
+ }
60658
60661
  return issues;
60662
+ // const issues: Array<ISignalValidationIssue> = [];
60663
+ // this.traverse(form, '', (path, field) => {
60664
+ // const errs = field.errors();
60665
+ // if (errs.length > 0) {
60666
+ // issues.push({
60667
+ // path,
60668
+ // errors: errs,
60669
+ // fieldRef: field
60670
+ // });
60671
+ // }
60672
+ // // });
60673
+ // return issues;
60659
60674
  }
60660
60675
  /**
60661
60676
  * Checks whether the form is currently valid (i.e., no issues found).