@breadstone/mosaik-elements-angular 0.0.151 → 0.0.152

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.152 (2025-10-15)
2
+
3
+ ### 🚀 Features
4
+
5
+ - Refactor validation reporting in FormValidator2 to use IValidateHooks interface ([3f2cc3e038](https://github.com/RueDeRennes/mosaik/commit/3f2cc3e038))
6
+ - Update AutoCompleteBox component to include new input properties and methods ([70b4f5462e](https://github.com/RueDeRennes/mosaik/commit/70b4f5462e))
7
+
1
8
  ## 0.0.151 (2025-09-29)
2
9
 
3
10
  ### 🚀 Features
@@ -1656,6 +1656,166 @@ let AutoCompleteBoxComponent = class AutoCompleteBoxComponent {
1656
1656
  this._element.text = value;
1657
1657
  });
1658
1658
  }
1659
+ get inputId() {
1660
+ // @ts-ignore - temporary fix for the type error
1661
+ return this._element.inputId;
1662
+ }
1663
+ set inputId(value) {
1664
+ this._zone.runOutsideAngular(() => {
1665
+ // @ts-ignore - temporary fix for the type error
1666
+ this._element.inputId = value;
1667
+ });
1668
+ }
1669
+ get listboxId() {
1670
+ // @ts-ignore - temporary fix for the type error
1671
+ return this._element.listboxId;
1672
+ }
1673
+ set listboxId(value) {
1674
+ this._zone.runOutsideAngular(() => {
1675
+ // @ts-ignore - temporary fix for the type error
1676
+ this._element.listboxId = value;
1677
+ });
1678
+ }
1679
+ get highlightedIndex() {
1680
+ // @ts-ignore - temporary fix for the type error
1681
+ return this._element.highlightedIndex;
1682
+ }
1683
+ set highlightedIndex(value) {
1684
+ this._zone.runOutsideAngular(() => {
1685
+ // @ts-ignore - temporary fix for the type error
1686
+ this._element.highlightedIndex = value;
1687
+ });
1688
+ }
1689
+ get shouldRenderSuggestions() {
1690
+ // @ts-ignore - temporary fix for the type error
1691
+ return this._element.shouldRenderSuggestions;
1692
+ }
1693
+ set shouldRenderSuggestions(value) {
1694
+ this._zone.runOutsideAngular(() => {
1695
+ // @ts-ignore - temporary fix for the type error
1696
+ this._element.shouldRenderSuggestions = value;
1697
+ });
1698
+ }
1699
+ get hasSuggestions() {
1700
+ // @ts-ignore - temporary fix for the type error
1701
+ return this._element.hasSuggestions;
1702
+ }
1703
+ set hasSuggestions(value) {
1704
+ this._zone.runOutsideAngular(() => {
1705
+ // @ts-ignore - temporary fix for the type error
1706
+ this._element.hasSuggestions = value;
1707
+ });
1708
+ }
1709
+ get activeDescendantId() {
1710
+ // @ts-ignore - temporary fix for the type error
1711
+ return this._element.activeDescendantId;
1712
+ }
1713
+ set activeDescendantId(value) {
1714
+ this._zone.runOutsideAngular(() => {
1715
+ // @ts-ignore - temporary fix for the type error
1716
+ this._element.activeDescendantId = value;
1717
+ });
1718
+ }
1719
+ get shouldShowNoResultsMessage() {
1720
+ // @ts-ignore - temporary fix for the type error
1721
+ return this._element.shouldShowNoResultsMessage;
1722
+ }
1723
+ set shouldShowNoResultsMessage(value) {
1724
+ this._zone.runOutsideAngular(() => {
1725
+ // @ts-ignore - temporary fix for the type error
1726
+ this._element.shouldShowNoResultsMessage = value;
1727
+ });
1728
+ }
1729
+ get shouldShowLoadingState() {
1730
+ // @ts-ignore - temporary fix for the type error
1731
+ return this._element.shouldShowLoadingState;
1732
+ }
1733
+ set shouldShowLoadingState(value) {
1734
+ this._zone.runOutsideAngular(() => {
1735
+ // @ts-ignore - temporary fix for the type error
1736
+ this._element.shouldShowLoadingState = value;
1737
+ });
1738
+ }
1739
+ get intl() {
1740
+ // @ts-ignore - temporary fix for the type error
1741
+ return this._element.intl;
1742
+ }
1743
+ set intl(value) {
1744
+ this._zone.runOutsideAngular(() => {
1745
+ // @ts-ignore - temporary fix for the type error
1746
+ this._element.intl = value;
1747
+ });
1748
+ }
1749
+ get suggestionPlacement() {
1750
+ // @ts-ignore - temporary fix for the type error
1751
+ return this._element.suggestionPlacement;
1752
+ }
1753
+ set suggestionPlacement(value) {
1754
+ this._zone.runOutsideAngular(() => {
1755
+ // @ts-ignore - temporary fix for the type error
1756
+ this._element.suggestionPlacement = value;
1757
+ });
1758
+ }
1759
+ get suggestionStrategy() {
1760
+ // @ts-ignore - temporary fix for the type error
1761
+ return this._element.suggestionStrategy;
1762
+ }
1763
+ set suggestionStrategy(value) {
1764
+ this._zone.runOutsideAngular(() => {
1765
+ // @ts-ignore - temporary fix for the type error
1766
+ this._element.suggestionStrategy = value;
1767
+ });
1768
+ }
1769
+ get suggestionDistance() {
1770
+ // @ts-ignore - temporary fix for the type error
1771
+ return this._element.suggestionDistance;
1772
+ }
1773
+ set suggestionDistance(value) {
1774
+ this._zone.runOutsideAngular(() => {
1775
+ // @ts-ignore - temporary fix for the type error
1776
+ this._element.suggestionDistance = value;
1777
+ });
1778
+ }
1779
+ get suggestionSkidding() {
1780
+ // @ts-ignore - temporary fix for the type error
1781
+ return this._element.suggestionSkidding;
1782
+ }
1783
+ set suggestionSkidding(value) {
1784
+ this._zone.runOutsideAngular(() => {
1785
+ // @ts-ignore - temporary fix for the type error
1786
+ this._element.suggestionSkidding = value;
1787
+ });
1788
+ }
1789
+ get suggestionSync() {
1790
+ // @ts-ignore - temporary fix for the type error
1791
+ return this._element.suggestionSync;
1792
+ }
1793
+ set suggestionSync(value) {
1794
+ this._zone.runOutsideAngular(() => {
1795
+ // @ts-ignore - temporary fix for the type error
1796
+ this._element.suggestionSync = value;
1797
+ });
1798
+ }
1799
+ get maxSuggestionHeight() {
1800
+ // @ts-ignore - temporary fix for the type error
1801
+ return this._element.maxSuggestionHeight;
1802
+ }
1803
+ set maxSuggestionHeight(value) {
1804
+ this._zone.runOutsideAngular(() => {
1805
+ // @ts-ignore - temporary fix for the type error
1806
+ this._element.maxSuggestionHeight = value;
1807
+ });
1808
+ }
1809
+ get suggestionFlipFallbackPlacements() {
1810
+ // @ts-ignore - temporary fix for the type error
1811
+ return this._element.suggestionFlipFallbackPlacements;
1812
+ }
1813
+ set suggestionFlipFallbackPlacements(value) {
1814
+ this._zone.runOutsideAngular(() => {
1815
+ // @ts-ignore - temporary fix for the type error
1816
+ this._element.suggestionFlipFallbackPlacements = value;
1817
+ });
1818
+ }
1659
1819
  get themeName() {
1660
1820
  // @ts-ignore - temporary fix for the type error
1661
1821
  return this._element.themeName;
@@ -1666,6 +1826,96 @@ let AutoCompleteBoxComponent = class AutoCompleteBoxComponent {
1666
1826
  this._element.themeName = value;
1667
1827
  });
1668
1828
  }
1829
+ get dropDownPlacement() {
1830
+ // @ts-ignore - temporary fix for the type error
1831
+ return this._element.dropDownPlacement;
1832
+ }
1833
+ set dropDownPlacement(value) {
1834
+ this._zone.runOutsideAngular(() => {
1835
+ // @ts-ignore - temporary fix for the type error
1836
+ this._element.dropDownPlacement = value;
1837
+ });
1838
+ }
1839
+ get dropDownStrategy() {
1840
+ // @ts-ignore - temporary fix for the type error
1841
+ return this._element.dropDownStrategy;
1842
+ }
1843
+ set dropDownStrategy(value) {
1844
+ this._zone.runOutsideAngular(() => {
1845
+ // @ts-ignore - temporary fix for the type error
1846
+ this._element.dropDownStrategy = value;
1847
+ });
1848
+ }
1849
+ get dropDownDistance() {
1850
+ // @ts-ignore - temporary fix for the type error
1851
+ return this._element.dropDownDistance;
1852
+ }
1853
+ set dropDownDistance(value) {
1854
+ this._zone.runOutsideAngular(() => {
1855
+ // @ts-ignore - temporary fix for the type error
1856
+ this._element.dropDownDistance = value;
1857
+ });
1858
+ }
1859
+ get dropDownSkidding() {
1860
+ // @ts-ignore - temporary fix for the type error
1861
+ return this._element.dropDownSkidding;
1862
+ }
1863
+ set dropDownSkidding(value) {
1864
+ this._zone.runOutsideAngular(() => {
1865
+ // @ts-ignore - temporary fix for the type error
1866
+ this._element.dropDownSkidding = value;
1867
+ });
1868
+ }
1869
+ get dropDownStaysOpen() {
1870
+ // @ts-ignore - temporary fix for the type error
1871
+ return this._element.dropDownStaysOpen;
1872
+ }
1873
+ set dropDownStaysOpen(value) {
1874
+ this._zone.runOutsideAngular(() => {
1875
+ // @ts-ignore - temporary fix for the type error
1876
+ this._element.dropDownStaysOpen = value;
1877
+ });
1878
+ }
1879
+ get maxDropDownHeight() {
1880
+ // @ts-ignore - temporary fix for the type error
1881
+ return this._element.maxDropDownHeight;
1882
+ }
1883
+ set maxDropDownHeight(value) {
1884
+ this._zone.runOutsideAngular(() => {
1885
+ // @ts-ignore - temporary fix for the type error
1886
+ this._element.maxDropDownHeight = value;
1887
+ });
1888
+ }
1889
+ get isDropDownOpen() {
1890
+ // @ts-ignore - temporary fix for the type error
1891
+ return this._element.isDropDownOpen;
1892
+ }
1893
+ set isDropDownOpen(value) {
1894
+ this._zone.runOutsideAngular(() => {
1895
+ // @ts-ignore - temporary fix for the type error
1896
+ this._element.isDropDownOpen = value;
1897
+ });
1898
+ }
1899
+ get isFocused() {
1900
+ // @ts-ignore - temporary fix for the type error
1901
+ return this._element.isFocused;
1902
+ }
1903
+ set isFocused(value) {
1904
+ this._zone.runOutsideAngular(() => {
1905
+ // @ts-ignore - temporary fix for the type error
1906
+ this._element.isFocused = value;
1907
+ });
1908
+ }
1909
+ get disabled() {
1910
+ // @ts-ignore - temporary fix for the type error
1911
+ return this._element.disabled;
1912
+ }
1913
+ set disabled(value) {
1914
+ this._zone.runOutsideAngular(() => {
1915
+ // @ts-ignore - temporary fix for the type error
1916
+ this._element.disabled = value;
1917
+ });
1918
+ }
1669
1919
  get minimumPrefixLength() {
1670
1920
  // @ts-ignore - temporary fix for the type error
1671
1921
  return this._element.minimumPrefixLength;
@@ -1726,6 +1976,16 @@ let AutoCompleteBoxComponent = class AutoCompleteBoxComponent {
1726
1976
  this._element.items = value;
1727
1977
  });
1728
1978
  }
1979
+ get itemsProvider() {
1980
+ // @ts-ignore - temporary fix for the type error
1981
+ return this._element.itemsProvider;
1982
+ }
1983
+ set itemsProvider(value) {
1984
+ this._zone.runOutsideAngular(() => {
1985
+ // @ts-ignore - temporary fix for the type error
1986
+ this._element.itemsProvider = value;
1987
+ });
1988
+ }
1729
1989
  get populating() {
1730
1990
  // @ts-ignore - temporary fix for the type error
1731
1991
  return this._element.populating;
@@ -1756,6 +2016,16 @@ let AutoCompleteBoxComponent = class AutoCompleteBoxComponent {
1756
2016
  this._element.filteredItems = value;
1757
2017
  });
1758
2018
  }
2019
+ get isPopulating() {
2020
+ // @ts-ignore - temporary fix for the type error
2021
+ return this._element.isPopulating;
2022
+ }
2023
+ set isPopulating(value) {
2024
+ this._zone.runOutsideAngular(() => {
2025
+ // @ts-ignore - temporary fix for the type error
2026
+ this._element.isPopulating = value;
2027
+ });
2028
+ }
1759
2029
  get dir() {
1760
2030
  // @ts-ignore - temporary fix for the type error
1761
2031
  return this._element.dir;
@@ -1797,13 +2067,13 @@ let AutoCompleteBoxComponent = class AutoCompleteBoxComponent {
1797
2067
  }
1798
2068
  }
1799
2069
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: AutoCompleteBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1800
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: AutoCompleteBoxComponent, isStandalone: true, selector: "mosaik-autocompletebox", inputs: { text: "text", themeName: "themeName", minimumPrefixLength: "minimumPrefixLength", minimumPopulateDelay: "minimumPopulateDelay", isTextCompletionEnabled: "isTextCompletionEnabled", searchMode: "searchMode", displayMemberPath: "displayMemberPath", items: "items", populating: "populating", populated: "populated", filteredItems: "filteredItems", dir: "dir", lang: "lang" }, outputs: { connected: "connected", disconnected: "disconnected", changed: "changed" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
2070
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: AutoCompleteBoxComponent, isStandalone: true, selector: "mosaik-autocompletebox", inputs: { text: "text", inputId: "inputId", listboxId: "listboxId", highlightedIndex: "highlightedIndex", shouldRenderSuggestions: "shouldRenderSuggestions", hasSuggestions: "hasSuggestions", activeDescendantId: "activeDescendantId", shouldShowNoResultsMessage: "shouldShowNoResultsMessage", shouldShowLoadingState: "shouldShowLoadingState", intl: "intl", suggestionPlacement: "suggestionPlacement", suggestionStrategy: "suggestionStrategy", suggestionDistance: "suggestionDistance", suggestionSkidding: "suggestionSkidding", suggestionSync: "suggestionSync", maxSuggestionHeight: "maxSuggestionHeight", suggestionFlipFallbackPlacements: "suggestionFlipFallbackPlacements", themeName: "themeName", dropDownPlacement: "dropDownPlacement", dropDownStrategy: "dropDownStrategy", dropDownDistance: "dropDownDistance", dropDownSkidding: "dropDownSkidding", dropDownStaysOpen: "dropDownStaysOpen", maxDropDownHeight: "maxDropDownHeight", isDropDownOpen: "isDropDownOpen", isFocused: "isFocused", disabled: "disabled", minimumPrefixLength: "minimumPrefixLength", minimumPopulateDelay: "minimumPopulateDelay", isTextCompletionEnabled: "isTextCompletionEnabled", searchMode: "searchMode", displayMemberPath: "displayMemberPath", items: "items", itemsProvider: "itemsProvider", populating: "populating", populated: "populated", filteredItems: "filteredItems", isPopulating: "isPopulating", dir: "dir", lang: "lang" }, outputs: { connected: "connected", disconnected: "disconnected", changed: "changed" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1801
2071
  };
1802
2072
  AutoCompleteBoxComponent = __decorate$3y([
1803
2073
  ProxyCmp({
1804
2074
  defineCustomElementFn: () => customElements.define('mosaik-autocompletebox', AutoCompleteBoxElement),
1805
- inputs: ['text', 'themeName', 'minimumPrefixLength', 'minimumPopulateDelay', 'isTextCompletionEnabled', 'searchMode', 'displayMemberPath', 'items', 'populating', 'populated', 'filteredItems', 'dir', 'lang'],
1806
- methods: ['onInput', 'onSelectCallback', 'onFilterCallback', 'updateSearchText', 'updateSelectedItem', 'getDisplayValue', 'adoptStyle', 'on', 'off', 'emit', 'requestUpdate']
2075
+ inputs: ['text', 'inputId', 'listboxId', 'highlightedIndex', 'shouldRenderSuggestions', 'hasSuggestions', 'activeDescendantId', 'shouldShowNoResultsMessage', 'shouldShowLoadingState', 'intl', 'suggestionPlacement', 'suggestionStrategy', 'suggestionDistance', 'suggestionSkidding', 'suggestionSync', 'maxSuggestionHeight', 'suggestionFlipFallbackPlacements', 'themeName', 'dropDownPlacement', 'dropDownStrategy', 'dropDownDistance', 'dropDownSkidding', 'dropDownStaysOpen', 'maxDropDownHeight', 'isDropDownOpen', 'isFocused', 'disabled', 'minimumPrefixLength', 'minimumPopulateDelay', 'isTextCompletionEnabled', 'searchMode', 'displayMemberPath', 'items', 'itemsProvider', 'populating', 'populated', 'filteredItems', 'isPopulating', 'dir', 'lang'],
2076
+ methods: ['onFilterCallback', 'onFloatingActiveChanged', 'onSelectCallback', 'onInput', 'onFocus', 'onBlur', 'onKeyDown', 'onSuggestionMouseDown', 'onSuggestionClick', 'renderHighlightedItem', 'getOptionId', 'open', 'close', 'toggle', 'hasVisibleFocusInTree', 'updateSearchText', 'updateSelectedItem', 'getDisplayValue', 'adoptStyle', 'on', 'off', 'emit', 'requestUpdate']
1807
2077
  }),
1808
2078
  __metadata$3y("design:paramtypes", [])
1809
2079
  ], AutoCompleteBoxComponent);
@@ -1814,13 +2084,63 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
1814
2084
  standalone: true,
1815
2085
  changeDetection: ChangeDetectionStrategy.OnPush,
1816
2086
  template: '<ng-content></ng-content>',
1817
- inputs: ['text', 'themeName', 'minimumPrefixLength', 'minimumPopulateDelay', 'isTextCompletionEnabled', 'searchMode', 'displayMemberPath', 'items', 'populating', 'populated', 'filteredItems', 'dir', 'lang'],
2087
+ inputs: ['text', 'inputId', 'listboxId', 'highlightedIndex', 'shouldRenderSuggestions', 'hasSuggestions', 'activeDescendantId', 'shouldShowNoResultsMessage', 'shouldShowLoadingState', 'intl', 'suggestionPlacement', 'suggestionStrategy', 'suggestionDistance', 'suggestionSkidding', 'suggestionSync', 'maxSuggestionHeight', 'suggestionFlipFallbackPlacements', 'themeName', 'dropDownPlacement', 'dropDownStrategy', 'dropDownDistance', 'dropDownSkidding', 'dropDownStaysOpen', 'maxDropDownHeight', 'isDropDownOpen', 'isFocused', 'disabled', 'minimumPrefixLength', 'minimumPopulateDelay', 'isTextCompletionEnabled', 'searchMode', 'displayMemberPath', 'items', 'itemsProvider', 'populating', 'populated', 'filteredItems', 'isPopulating', 'dir', 'lang'],
1818
2088
  outputs: ['connected', 'disconnected', 'changed']
1819
2089
  }]
1820
2090
  }], ctorParameters: () => [], propDecorators: { text: [{
1821
2091
  type: Input
2092
+ }], inputId: [{
2093
+ type: Input
2094
+ }], listboxId: [{
2095
+ type: Input
2096
+ }], highlightedIndex: [{
2097
+ type: Input
2098
+ }], shouldRenderSuggestions: [{
2099
+ type: Input
2100
+ }], hasSuggestions: [{
2101
+ type: Input
2102
+ }], activeDescendantId: [{
2103
+ type: Input
2104
+ }], shouldShowNoResultsMessage: [{
2105
+ type: Input
2106
+ }], shouldShowLoadingState: [{
2107
+ type: Input
2108
+ }], intl: [{
2109
+ type: Input
2110
+ }], suggestionPlacement: [{
2111
+ type: Input
2112
+ }], suggestionStrategy: [{
2113
+ type: Input
2114
+ }], suggestionDistance: [{
2115
+ type: Input
2116
+ }], suggestionSkidding: [{
2117
+ type: Input
2118
+ }], suggestionSync: [{
2119
+ type: Input
2120
+ }], maxSuggestionHeight: [{
2121
+ type: Input
2122
+ }], suggestionFlipFallbackPlacements: [{
2123
+ type: Input
1822
2124
  }], themeName: [{
1823
2125
  type: Input
2126
+ }], dropDownPlacement: [{
2127
+ type: Input
2128
+ }], dropDownStrategy: [{
2129
+ type: Input
2130
+ }], dropDownDistance: [{
2131
+ type: Input
2132
+ }], dropDownSkidding: [{
2133
+ type: Input
2134
+ }], dropDownStaysOpen: [{
2135
+ type: Input
2136
+ }], maxDropDownHeight: [{
2137
+ type: Input
2138
+ }], isDropDownOpen: [{
2139
+ type: Input
2140
+ }], isFocused: [{
2141
+ type: Input
2142
+ }], disabled: [{
2143
+ type: Input
1824
2144
  }], minimumPrefixLength: [{
1825
2145
  type: Input
1826
2146
  }], minimumPopulateDelay: [{
@@ -1833,12 +2153,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
1833
2153
  type: Input
1834
2154
  }], items: [{
1835
2155
  type: Input
2156
+ }], itemsProvider: [{
2157
+ type: Input
1836
2158
  }], populating: [{
1837
2159
  type: Input
1838
2160
  }], populated: [{
1839
2161
  type: Input
1840
2162
  }], filteredItems: [{
1841
2163
  type: Input
2164
+ }], isPopulating: [{
2165
+ type: Input
1842
2166
  }], dir: [{
1843
2167
  type: Input
1844
2168
  }], lang: [{
@@ -60013,18 +60337,20 @@ class FormValidator2 {
60013
60337
  * @public
60014
60338
  */
60015
60339
  constructor() {
60016
- //
60340
+ // noop
60017
60341
  }
60018
60342
  // #endregion
60019
- // #region Public API (marking + optional reporting)
60343
+ // #region Methods
60020
60344
  /**
60021
60345
  * Marks each control as touched and optionally reports validation issues.
60022
60346
  *
60023
60347
  * @public
60024
- * @param formGroup - The form group to validate.
60025
- * @param options - Optional reporting callbacks.
60348
+ * @template TGroup The specific type of the form group (for typed raw value).
60349
+ * @param formGroup The form group to validate.
60350
+ * @param hooks Optional validation reporting callbacks.
60351
+ * @returns The raw form value (as returned by `formGroup.getRawValue()`).
60026
60352
  */
60027
- validate(formGroup, options) {
60353
+ validate(formGroup, hooks) {
60028
60354
  const issues = [];
60029
60355
  this.traverse(formGroup, '', {
60030
60356
  onControl: (ctrl) => {
@@ -60037,25 +60363,27 @@ class FormValidator2 {
60037
60363
  } // FormGroup: no-op here
60038
60364
  },
60039
60365
  onErrors: (issue) => {
60040
- options?.onEachError?.(issue);
60366
+ hooks?.onEachError?.(issue);
60041
60367
  issues.push(issue);
60042
60368
  }
60043
60369
  });
60044
60370
  if (issues.length === 0) {
60045
- options?.onSuccess?.();
60371
+ hooks?.onSuccess?.(formGroup.getRawValue());
60046
60372
  }
60047
60373
  else {
60048
- options?.onErrors?.(issues);
60374
+ hooks?.onErrors?.(issues);
60049
60375
  }
60050
60376
  }
60051
60377
  /**
60052
60378
  * Marks each control as pristine and optionally reports validation issues.
60053
60379
  *
60054
60380
  * @public
60055
- * @param formGroup - The form group to mark as pristine.
60056
- * @param options - Optional reporting callbacks.
60381
+ * @template TGroup The specific type of the form group (for typed raw value).
60382
+ * @param formGroup The form group to mark as pristine.
60383
+ * @param hooks Optional validation reporting callbacks.
60384
+ * @returns The raw form value (as returned by `formGroup.getRawValue()`).
60057
60385
  */
60058
- pristine(formGroup, options) {
60386
+ pristine(formGroup, hooks) {
60059
60387
  const issues = [];
60060
60388
  this.traverse(formGroup, '', {
60061
60389
  onControl: (ctrl) => {
@@ -60067,24 +60395,22 @@ class FormValidator2 {
60067
60395
  } // FormGroup: no-op here
60068
60396
  },
60069
60397
  onErrors: (issue) => {
60070
- options?.onEachError?.(issue);
60398
+ hooks?.onEachError?.(issue);
60071
60399
  issues.push(issue);
60072
60400
  }
60073
60401
  });
60074
60402
  if (issues.length === 0) {
60075
- options?.onSuccess?.();
60403
+ hooks?.onSuccess?.(formGroup.getRawValue());
60076
60404
  }
60077
60405
  else {
60078
- options?.onErrors?.(issues);
60406
+ hooks?.onErrors?.(issues);
60079
60407
  }
60080
60408
  }
60081
- // #endregion
60082
- // #region Public API (pure helpers)
60083
60409
  /**
60084
60410
  * Collects all validation issues without mutating any control state.
60085
60411
  *
60086
60412
  * @public
60087
- * @param formGroup - The form group to inspect.
60413
+ * @param formGroup The form group to inspect.
60088
60414
  * @returns An array of validation issues.
60089
60415
  */
60090
60416
  collectErrors(formGroup) {
@@ -60099,6 +60425,8 @@ class FormValidator2 {
60099
60425
  * Indicates whether the form is currently valid (pure check).
60100
60426
  *
60101
60427
  * @public
60428
+ * @param formGroup The form group to inspect.
60429
+ * @returns `true` if no validation issues were found; `false` otherwise.
60102
60430
  */
60103
60431
  isValid(formGroup) {
60104
60432
  return this.collectErrors(formGroup).length === 0;
@@ -60107,6 +60435,8 @@ class FormValidator2 {
60107
60435
  * Builds a map from control path to its errors for quick lookup.
60108
60436
  *
60109
60437
  * @public
60438
+ * @param issues The array of validation issues to convert.
60439
+ * @returns A map from control path to its validation errors.
60110
60440
  */
60111
60441
  toPathMap(issues) {
60112
60442
  const map = Object.create(null);
@@ -60119,12 +60449,12 @@ class FormValidator2 {
60119
60449
  * Starts a fluent validation session.
60120
60450
  *
60121
60451
  * @public
60452
+ * @param formGroup The form group to validate.
60453
+ * @returns A new `ValidationSession` instance.
60122
60454
  */
60123
60455
  session(formGroup) {
60124
60456
  return new ValidationSession(this, formGroup);
60125
60457
  }
60126
- // #endregion
60127
- // #region Core traversal
60128
60458
  /**
60129
60459
  * Internal traversal utility: can mutate state (via `onControl`) and
60130
60460
  * collect/report issues (via `onErrors`) in a single pass.
@@ -60191,11 +60521,12 @@ class ValidationSession {
60191
60521
  this._pristine = false;
60192
60522
  }
60193
60523
  // #endregion
60194
- // #region Fluent steps
60524
+ // #region Methods
60195
60525
  /**
60196
60526
  * Mark all controls as touched.
60197
60527
  *
60198
60528
  * @public
60529
+ * @returns This validation session (for chaining).
60199
60530
  */
60200
60531
  touch() {
60201
60532
  this._touch = true;
@@ -60205,6 +60536,7 @@ class ValidationSession {
60205
60536
  * Mark all controls as pristine.
60206
60537
  *
60207
60538
  * @public
60539
+ * @returns This validation session (for chaining).
60208
60540
  */
60209
60541
  pristine() {
60210
60542
  this._pristine = true;
@@ -60214,6 +60546,8 @@ class ValidationSession {
60214
60546
  * Provide a per-issue callback invoked during traversal.
60215
60547
  *
60216
60548
  * @public
60549
+ * @param cb The callback to invoke for each issue found.
60550
+ * @returns This validation session (for chaining).
60217
60551
  */
60218
60552
  onEachError(cb) {
60219
60553
  this._onEachError = cb;
@@ -60223,6 +60557,8 @@ class ValidationSession {
60223
60557
  * Provide a single callback to receive all issues after traversal.
60224
60558
  *
60225
60559
  * @public
60560
+ * @param cb The callback to invoke with all issues found.
60561
+ * @returns This validation session (for chaining).
60226
60562
  */
60227
60563
  onErrors(cb) {
60228
60564
  this._onErrors = cb;
@@ -60232,6 +60568,8 @@ class ValidationSession {
60232
60568
  * Provide a callback that fires when no issues are found.
60233
60569
  *
60234
60570
  * @public
60571
+ * @param cb The callback to invoke on success.
60572
+ * @returns This validation session (for chaining).
60235
60573
  */
60236
60574
  onSuccess(cb) {
60237
60575
  this._onSuccess = cb;