@rxap/forms 16.0.0-dev.0 → 16.0.0-dev.2

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.
Files changed (41) hide show
  1. package/esm2022/index.mjs +1 -2
  2. package/esm2022/lib/directives/form-control-error.directive.mjs +4 -3
  3. package/esm2022/lib/directives/form-control-mark-dirty.directive.mjs +4 -3
  4. package/esm2022/lib/directives/form-control-mark-pristine.directive.mjs +4 -3
  5. package/esm2022/lib/directives/form-control-mark-touched.directive.mjs +4 -3
  6. package/esm2022/lib/directives/form-control-mark-untouched.directive.mjs +4 -3
  7. package/esm2022/lib/directives/form-control-name.directive.mjs +4 -3
  8. package/esm2022/lib/directives/form-group-name.directive.mjs +4 -3
  9. package/esm2022/lib/directives/form-loaded.directive.mjs +4 -3
  10. package/esm2022/lib/directives/form-loading-error.directive.mjs +4 -3
  11. package/esm2022/lib/directives/form-loading.directive.mjs +4 -3
  12. package/esm2022/lib/directives/form-submit-failed.directive.mjs +4 -3
  13. package/esm2022/lib/directives/form-submit-invalid.directive.mjs +4 -3
  14. package/esm2022/lib/directives/form-submit-successful.directive.mjs +4 -3
  15. package/esm2022/lib/directives/form-submit.directive.mjs +5 -4
  16. package/esm2022/lib/directives/form-submitting.directive.mjs +4 -3
  17. package/esm2022/lib/directives/form.directive.mjs +19 -18
  18. package/esm2022/lib/directives/parent-control-container.directive.mjs +4 -3
  19. package/fesm2022/rxap-forms.mjs +206 -270
  20. package/fesm2022/rxap-forms.mjs.map +1 -1
  21. package/index.d.ts +0 -1
  22. package/lib/directives/form-control-error.directive.d.ts +1 -1
  23. package/lib/directives/form-control-mark-dirty.directive.d.ts +1 -1
  24. package/lib/directives/form-control-mark-pristine.directive.d.ts +1 -1
  25. package/lib/directives/form-control-mark-touched.directive.d.ts +1 -1
  26. package/lib/directives/form-control-mark-untouched.directive.d.ts +1 -1
  27. package/lib/directives/form-control-name.directive.d.ts +1 -1
  28. package/lib/directives/form-group-name.directive.d.ts +1 -1
  29. package/lib/directives/form-loaded.directive.d.ts +1 -1
  30. package/lib/directives/form-loading-error.directive.d.ts +1 -1
  31. package/lib/directives/form-loading.directive.d.ts +1 -1
  32. package/lib/directives/form-submit-failed.directive.d.ts +1 -1
  33. package/lib/directives/form-submit-invalid.directive.d.ts +1 -1
  34. package/lib/directives/form-submit-successful.directive.d.ts +1 -1
  35. package/lib/directives/form-submit.directive.d.ts +1 -1
  36. package/lib/directives/form-submitting.directive.d.ts +1 -1
  37. package/lib/directives/form.directive.d.ts +1 -1
  38. package/lib/directives/parent-control-container.directive.d.ts +1 -1
  39. package/package.json +7 -7
  40. package/esm2022/lib/directives/forms.module.mjs +0 -101
  41. package/lib/directives/forms.module.d.ts +0 -23
@@ -1,10 +1,10 @@
1
1
  import * as i1 from '@angular/forms';
2
- import { UntypedFormArray, AbstractControl, UntypedFormGroup, UntypedFormControl, Validators, FormGroupDirective, ControlContainer, FormGroupName, NG_VALIDATORS, NG_ASYNC_VALIDATORS, FormControlName, NG_VALUE_ACCESSOR, NgControl } from '@angular/forms';
2
+ import { UntypedFormArray, AbstractControl, UntypedFormGroup, UntypedFormControl, Validators, FormGroupDirective, ControlContainer, FormControlName, NG_VALIDATORS, NG_ASYNC_VALIDATORS, NG_VALUE_ACCESSOR, NgControl, FormGroupName } from '@angular/forms';
3
3
  import { map, distinctUntilChanged, debounceTime, filter, tap, startWith, take } from 'rxjs/operators';
4
4
  import { merge, defer, of, EMPTY, Subject, isObservable, BehaviorSubject, Subscription } from 'rxjs';
5
5
  import { equals, coerceArray, HasRxapOnInitMethod, assertIsArray, assertIsObject, assertIsFunction, isPromise, isObject, clone, Required, hasIndexSignature, coerceBoolean } from '@rxap/utilities';
6
6
  import * as i0 from '@angular/core';
7
- import { isDevMode, Injector, InjectionToken, EventEmitter, ChangeDetectorRef, forwardRef, Directive, Inject, Optional, SkipSelf, Input, Output, HostBinding, TemplateRef, ViewContainerRef, Host, HostListener, Self, NgModule } from '@angular/core';
7
+ import { isDevMode, Injector, InjectionToken, EventEmitter, ChangeDetectorRef, forwardRef, Directive, Inject, Optional, SkipSelf, Input, Output, HostBinding, TemplateRef, ViewContainerRef, Host, HostListener, Self } from '@angular/core';
8
8
  import { GetDefinitionMetadata, DefinitionMetadata } from '@rxap/definition';
9
9
  import { getMetadata, setMetadataMapSet, setMetadataMap } from '@rxap/utilities/reflect-metadata';
10
10
  import { __decorate, __metadata } from 'tslib';
@@ -1508,7 +1508,7 @@ class FormDirective extends FormGroupDirective {
1508
1508
  }
1509
1509
  }
1510
1510
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormDirective, deps: [{ token: ChangeDetectorRef }, { token: RXAP_FORM_DEFINITION, optional: true }, { token: RXAP_FORM_SUBMIT_METHOD, optional: true, skipSelf: true }, { token: RXAP_FORM_LOAD_METHOD, optional: true, skipSelf: true }, { token: RXAP_FORM_LOAD_FAILED_METHOD, optional: true, skipSelf: true }, { token: RXAP_FORM_LOAD_SUCCESSFUL_METHOD, optional: true, skipSelf: true }, { token: RXAP_FORM_SUBMIT_FAILED_METHOD, optional: true, skipSelf: true }, { token: RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD, optional: true, skipSelf: true }, { token: RXAP_FORM_DEFINITION_BUILDER, optional: true, skipSelf: true }, { token: LoadingIndicatorService, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
1511
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormDirective, selector: "form[rxapForm]:not([formGroup]):not([ngForm]),rxap-form,form[rxapForm]", inputs: { initial: "initial", useFormDefinition: ["rxapForm", "useFormDefinition"], submitMethod: "submitMethod" }, outputs: { ngSubmit: "ngSubmit", rxapSubmit: "rxapSubmit", invalidSubmit: "invalidSubmit", submitSuccessful$: "submitSuccessful" }, host: { listeners: { "reset": "onReset()" }, properties: { "class.rxap-submitting": "this.submitting", "class.rxap-submit-error": "this.submitError", "class.rxap-loading": "this.loading", "class.rxap-loaded": "this.loaded", "class.rxap-loading-error": "this.loadingError" } }, providers: [
1511
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormDirective, isStandalone: true, selector: "form[rxapForm]:not([formGroup]):not([ngForm]),rxap-form,form[rxapForm]", inputs: { initial: "initial", useFormDefinition: ["rxapForm", "useFormDefinition"], submitMethod: "submitMethod" }, outputs: { ngSubmit: "ngSubmit", rxapSubmit: "rxapSubmit", invalidSubmit: "invalidSubmit", submitSuccessful$: "submitSuccessful" }, host: { listeners: { "reset": "onReset()" }, properties: { "class.rxap-submitting": "this.submitting", "class.rxap-submit-error": "this.submitError", "class.rxap-loading": "this.loading", "class.rxap-loaded": "this.loaded", "class.rxap-loading-error": "this.loadingError" } }, providers: [
1512
1512
  {
1513
1513
  provide: ControlContainer,
1514
1514
  // ignore coverage
@@ -1523,32 +1523,32 @@ class FormDirective extends FormGroupDirective {
1523
1523
  // submit
1524
1524
  {
1525
1525
  provide: RXAP_FORM_SUBMIT_METHOD,
1526
- useValue: null,
1526
+ useValue: null
1527
1527
  },
1528
1528
  {
1529
1529
  provide: RXAP_FORM_LOAD_METHOD,
1530
- useValue: null,
1530
+ useValue: null
1531
1531
  },
1532
1532
  {
1533
1533
  provide: RXAP_FORM_LOAD_FAILED_METHOD,
1534
- useValue: null,
1534
+ useValue: null
1535
1535
  },
1536
1536
  {
1537
1537
  provide: RXAP_FORM_LOAD_SUCCESSFUL_METHOD,
1538
- useValue: null,
1538
+ useValue: null
1539
1539
  },
1540
1540
  {
1541
1541
  provide: RXAP_FORM_SUBMIT_FAILED_METHOD,
1542
- useValue: null,
1542
+ useValue: null
1543
1543
  },
1544
1544
  {
1545
1545
  provide: RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD,
1546
- useValue: null,
1546
+ useValue: null
1547
1547
  },
1548
1548
  {
1549
1549
  provide: RXAP_FORM_DEFINITION_BUILDER,
1550
- useValue: null,
1551
- },
1550
+ useValue: null
1551
+ }
1552
1552
  // endregion
1553
1553
  ], exportAs: ["rxapForm"], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
1554
1554
  }
@@ -1575,37 +1575,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
1575
1575
  // submit
1576
1576
  {
1577
1577
  provide: RXAP_FORM_SUBMIT_METHOD,
1578
- useValue: null,
1578
+ useValue: null
1579
1579
  },
1580
1580
  {
1581
1581
  provide: RXAP_FORM_LOAD_METHOD,
1582
- useValue: null,
1582
+ useValue: null
1583
1583
  },
1584
1584
  {
1585
1585
  provide: RXAP_FORM_LOAD_FAILED_METHOD,
1586
- useValue: null,
1586
+ useValue: null
1587
1587
  },
1588
1588
  {
1589
1589
  provide: RXAP_FORM_LOAD_SUCCESSFUL_METHOD,
1590
- useValue: null,
1590
+ useValue: null
1591
1591
  },
1592
1592
  {
1593
1593
  provide: RXAP_FORM_SUBMIT_FAILED_METHOD,
1594
- useValue: null,
1594
+ useValue: null
1595
1595
  },
1596
1596
  {
1597
1597
  provide: RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD,
1598
- useValue: null,
1598
+ useValue: null
1599
1599
  },
1600
1600
  {
1601
1601
  provide: RXAP_FORM_DEFINITION_BUILDER,
1602
- useValue: null,
1603
- },
1602
+ useValue: null
1603
+ }
1604
1604
  // endregion
1605
1605
  ],
1606
1606
  host: { '(reset)': 'onReset()' },
1607
1607
  outputs: ['ngSubmit'],
1608
1608
  exportAs: 'rxapForm',
1609
+ standalone: true
1609
1610
  }]
1610
1611
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef, decorators: [{
1611
1612
  type: Inject,
@@ -1718,12 +1719,13 @@ class FormSubmitFailedDirective {
1718
1719
  this.subscription?.unsubscribe();
1719
1720
  }
1720
1721
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormSubmitFailedDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1721
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormSubmitFailedDirective, selector: "[rxapFormSubmitFailed]", ngImport: i0 }); }
1722
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormSubmitFailedDirective, isStandalone: true, selector: "[rxapFormSubmitFailed]", ngImport: i0 }); }
1722
1723
  }
1723
1724
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormSubmitFailedDirective, decorators: [{
1724
1725
  type: Directive,
1725
1726
  args: [{
1726
- selector: '[rxapFormSubmitFailed]'
1727
+ selector: '[rxapFormSubmitFailed]',
1728
+ standalone: true
1727
1729
  }]
1728
1730
  }], ctorParameters: function () { return [{ type: FormDirective, decorators: [{
1729
1731
  type: Inject,
@@ -1754,12 +1756,13 @@ class FormLoadingDirective {
1754
1756
  this.subscription?.unsubscribe();
1755
1757
  }
1756
1758
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormLoadingDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1757
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormLoadingDirective, selector: "[rxapFormLoading]", ngImport: i0 }); }
1759
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormLoadingDirective, isStandalone: true, selector: "[rxapFormLoading]", ngImport: i0 }); }
1758
1760
  }
1759
1761
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormLoadingDirective, decorators: [{
1760
1762
  type: Directive,
1761
1763
  args: [{
1762
- selector: '[rxapFormLoading]'
1764
+ selector: '[rxapFormLoading]',
1765
+ standalone: true
1763
1766
  }]
1764
1767
  }], ctorParameters: function () { return [{ type: FormDirective, decorators: [{
1765
1768
  type: Inject,
@@ -1790,12 +1793,13 @@ class FormSubmittingDirective {
1790
1793
  this.subscription?.unsubscribe();
1791
1794
  }
1792
1795
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormSubmittingDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1793
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormSubmittingDirective, selector: "[rxapFormSubmitting]", ngImport: i0 }); }
1796
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormSubmittingDirective, isStandalone: true, selector: "[rxapFormSubmitting]", ngImport: i0 }); }
1794
1797
  }
1795
1798
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormSubmittingDirective, decorators: [{
1796
1799
  type: Directive,
1797
1800
  args: [{
1798
- selector: '[rxapFormSubmitting]'
1801
+ selector: '[rxapFormSubmitting]',
1802
+ standalone: true
1799
1803
  }]
1800
1804
  }], ctorParameters: function () { return [{ type: FormDirective, decorators: [{
1801
1805
  type: Inject,
@@ -1826,12 +1830,13 @@ class FormLoadedDirective {
1826
1830
  this.subscription?.unsubscribe();
1827
1831
  }
1828
1832
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormLoadedDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1829
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormLoadedDirective, selector: "[rxapFormLoaded]", ngImport: i0 }); }
1833
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormLoadedDirective, isStandalone: true, selector: "[rxapFormLoaded]", ngImport: i0 }); }
1830
1834
  }
1831
1835
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormLoadedDirective, decorators: [{
1832
1836
  type: Directive,
1833
1837
  args: [{
1834
- selector: '[rxapFormLoaded]'
1838
+ selector: '[rxapFormLoaded]',
1839
+ standalone: true
1835
1840
  }]
1836
1841
  }], ctorParameters: function () { return [{ type: FormDirective, decorators: [{
1837
1842
  type: Inject,
@@ -1862,12 +1867,13 @@ class FormLoadingErrorDirective {
1862
1867
  this.subscription?.unsubscribe();
1863
1868
  }
1864
1869
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormLoadingErrorDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1865
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormLoadingErrorDirective, selector: "[rxapFormLoadingError]", ngImport: i0 }); }
1870
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormLoadingErrorDirective, isStandalone: true, selector: "[rxapFormLoadingError]", ngImport: i0 }); }
1866
1871
  }
1867
1872
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormLoadingErrorDirective, decorators: [{
1868
1873
  type: Directive,
1869
1874
  args: [{
1870
- selector: '[rxapFormLoadingError]'
1875
+ selector: '[rxapFormLoadingError]',
1876
+ standalone: true
1871
1877
  }]
1872
1878
  }], ctorParameters: function () { return [{ type: FormDirective, decorators: [{
1873
1879
  type: Inject,
@@ -1880,6 +1886,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
1880
1886
  args: [ViewContainerRef]
1881
1887
  }] }]; } });
1882
1888
 
1889
+ function ToFormMethod(call) {
1890
+ return { call };
1891
+ }
1892
+ /**
1893
+ * @deprecated use ToFormMethod instead
1894
+ *
1895
+ * @param call the call method implementation
1896
+ */
1897
+ function ToFormSubmitMethod(call) {
1898
+ return ToFormMethod(call);
1899
+ }
1900
+
1883
1901
  /**
1884
1902
  * @deprecated removed
1885
1903
  */
@@ -1905,7 +1923,7 @@ class FormControlErrorDirective {
1905
1923
  this.subscription?.unsubscribe();
1906
1924
  }
1907
1925
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormControlErrorDirective, deps: [{ token: i0.TemplateRef }, { token: i1.ControlContainer, host: true, skipSelf: true }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1908
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormControlErrorDirective, selector: "[rxapFormControlError]", inputs: { name: ["rxapFormControlErrorFrom", "name"], errorKey: ["rxapFormControlErrorIf", "errorKey"] }, ngImport: i0 }); }
1926
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormControlErrorDirective, isStandalone: true, selector: "[rxapFormControlError]", inputs: { name: ["rxapFormControlErrorFrom", "name"], errorKey: ["rxapFormControlErrorIf", "errorKey"] }, ngImport: i0 }); }
1909
1927
  }
1910
1928
  __decorate([
1911
1929
  Required,
@@ -1918,7 +1936,8 @@ __decorate([
1918
1936
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormControlErrorDirective, decorators: [{
1919
1937
  type: Directive,
1920
1938
  args: [{
1921
- selector: '[rxapFormControlError]'
1939
+ selector: '[rxapFormControlError]',
1940
+ standalone: true
1922
1941
  }]
1923
1942
  }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i1.ControlContainer, decorators: [{
1924
1943
  type: Host
@@ -1932,6 +1951,76 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
1932
1951
  args: ['rxapFormControlErrorIf']
1933
1952
  }] } });
1934
1953
 
1954
+ class FormSubmitSuccessfulDirective {
1955
+ constructor(formDirective, template, viewContainerRef) {
1956
+ this.formDirective = formDirective;
1957
+ this.template = template;
1958
+ this.viewContainerRef = viewContainerRef;
1959
+ }
1960
+ ngAfterViewInit() {
1961
+ this.subscription = this.formDirective.submitSuccessful$.pipe(tap(result => {
1962
+ this.viewContainerRef.clear();
1963
+ this.viewContainerRef.createEmbeddedView(this.template, { $implicit: result });
1964
+ })).subscribe();
1965
+ }
1966
+ ngOnDestroy() {
1967
+ this.subscription?.unsubscribe();
1968
+ }
1969
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormSubmitSuccessfulDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1970
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormSubmitSuccessfulDirective, isStandalone: true, selector: "[rxapFormSubmitSuccessful]", ngImport: i0 }); }
1971
+ }
1972
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormSubmitSuccessfulDirective, decorators: [{
1973
+ type: Directive,
1974
+ args: [{
1975
+ selector: '[rxapFormSubmitSuccessful]',
1976
+ standalone: true
1977
+ }]
1978
+ }], ctorParameters: function () { return [{ type: FormDirective, decorators: [{
1979
+ type: Inject,
1980
+ args: [FormDirective]
1981
+ }] }, { type: i0.TemplateRef, decorators: [{
1982
+ type: Inject,
1983
+ args: [TemplateRef]
1984
+ }] }, { type: i0.ViewContainerRef, decorators: [{
1985
+ type: Inject,
1986
+ args: [ViewContainerRef]
1987
+ }] }]; } });
1988
+
1989
+ class FormSubmitInvalidDirective {
1990
+ constructor(formDirective, template, viewContainerRef) {
1991
+ this.formDirective = formDirective;
1992
+ this.template = template;
1993
+ this.viewContainerRef = viewContainerRef;
1994
+ }
1995
+ ngAfterViewInit() {
1996
+ this.subscription = this.formDirective.invalidSubmit.pipe(tap(result => {
1997
+ this.viewContainerRef.clear();
1998
+ this.viewContainerRef.createEmbeddedView(this.template, { $implicit: result });
1999
+ })).subscribe();
2000
+ }
2001
+ ngOnDestroy() {
2002
+ this.subscription?.unsubscribe();
2003
+ }
2004
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormSubmitInvalidDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
2005
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormSubmitInvalidDirective, isStandalone: true, selector: "[rxapFormSubmitInvalid]", ngImport: i0 }); }
2006
+ }
2007
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormSubmitInvalidDirective, decorators: [{
2008
+ type: Directive,
2009
+ args: [{
2010
+ selector: '[rxapFormSubmitInvalid]',
2011
+ standalone: true
2012
+ }]
2013
+ }], ctorParameters: function () { return [{ type: FormDirective, decorators: [{
2014
+ type: Inject,
2015
+ args: [FormDirective]
2016
+ }] }, { type: i0.TemplateRef, decorators: [{
2017
+ type: Inject,
2018
+ args: [TemplateRef]
2019
+ }] }, { type: i0.ViewContainerRef, decorators: [{
2020
+ type: Inject,
2021
+ args: [ViewContainerRef]
2022
+ }] }]; } });
2023
+
1935
2024
  class FormControlMarkDirtyDirective {
1936
2025
  constructor(parent) {
1937
2026
  this.parent = parent;
@@ -1946,84 +2035,88 @@ class FormControlMarkDirtyDirective {
1946
2035
  }
1947
2036
  }
1948
2037
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormControlMarkDirtyDirective, deps: [{ token: i1.ControlContainer }], target: i0.ɵɵFactoryTarget.Directive }); }
1949
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormControlMarkDirtyDirective, selector: "[rxapFormControlMarkDirty]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
2038
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormControlMarkDirtyDirective, isStandalone: true, selector: "[rxapFormControlMarkDirty]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
1950
2039
  }
1951
2040
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormControlMarkDirtyDirective, decorators: [{
1952
2041
  type: Directive,
1953
2042
  args: [{
1954
- selector: '[rxapFormControlMarkDirty]'
2043
+ selector: '[rxapFormControlMarkDirty]',
2044
+ standalone: true
1955
2045
  }]
1956
2046
  }], ctorParameters: function () { return [{ type: i1.ControlContainer }]; }, propDecorators: { onClick: [{
1957
2047
  type: HostListener,
1958
2048
  args: ['click']
1959
2049
  }] } });
1960
2050
 
1961
- class FormControlMarkTouchedDirective {
2051
+ class FormControlMarkPristineDirective {
1962
2052
  constructor(parent) {
1963
2053
  this.parent = parent;
1964
2054
  }
1965
2055
  onClick() {
1966
- this.parent.control?.markAllAsTouched();
2056
+ const control = this.parent.control;
2057
+ if (control && hasIndexSignature(control) && typeof control['markAllAsPristine'] === 'function') {
2058
+ control.markAllAsPristine();
2059
+ }
2060
+ else {
2061
+ control?.markAsPristine();
2062
+ }
1967
2063
  }
1968
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormControlMarkTouchedDirective, deps: [{ token: i1.ControlContainer }], target: i0.ɵɵFactoryTarget.Directive }); }
1969
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormControlMarkTouchedDirective, selector: "[rxapFormControlMarkTouched]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
2064
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormControlMarkPristineDirective, deps: [{ token: i1.ControlContainer }], target: i0.ɵɵFactoryTarget.Directive }); }
2065
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormControlMarkPristineDirective, isStandalone: true, selector: "[rxapFormControlMarkPristine]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
1970
2066
  }
1971
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormControlMarkTouchedDirective, decorators: [{
2067
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormControlMarkPristineDirective, decorators: [{
1972
2068
  type: Directive,
1973
2069
  args: [{
1974
- selector: '[rxapFormControlMarkTouched]'
2070
+ selector: '[rxapFormControlMarkPristine]',
2071
+ standalone: true
1975
2072
  }]
1976
2073
  }], ctorParameters: function () { return [{ type: i1.ControlContainer }]; }, propDecorators: { onClick: [{
1977
2074
  type: HostListener,
1978
2075
  args: ['click']
1979
2076
  }] } });
1980
2077
 
1981
- class FormControlMarkUntouchedDirective {
2078
+ class FormControlMarkTouchedDirective {
1982
2079
  constructor(parent) {
1983
2080
  this.parent = parent;
1984
2081
  }
1985
2082
  onClick() {
1986
- const control = this.parent.control;
1987
- if (control && hasIndexSignature(control) && typeof control['markAllAsUntouched'] === 'function') {
1988
- control.markAllAsUntouched();
1989
- }
1990
- else {
1991
- control?.markAsUntouched();
1992
- }
2083
+ this.parent.control?.markAllAsTouched();
1993
2084
  }
1994
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormControlMarkUntouchedDirective, deps: [{ token: i1.ControlContainer }], target: i0.ɵɵFactoryTarget.Directive }); }
1995
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormControlMarkUntouchedDirective, selector: "[rxapFormControlMarkUntouched]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
2085
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormControlMarkTouchedDirective, deps: [{ token: i1.ControlContainer }], target: i0.ɵɵFactoryTarget.Directive }); }
2086
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormControlMarkTouchedDirective, isStandalone: true, selector: "[rxapFormControlMarkTouched]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
1996
2087
  }
1997
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormControlMarkUntouchedDirective, decorators: [{
2088
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormControlMarkTouchedDirective, decorators: [{
1998
2089
  type: Directive,
1999
2090
  args: [{
2000
- selector: '[rxapFormControlMarkUntouched]'
2091
+ selector: '[rxapFormControlMarkTouched]',
2092
+ standalone: true
2001
2093
  }]
2002
2094
  }], ctorParameters: function () { return [{ type: i1.ControlContainer }]; }, propDecorators: { onClick: [{
2003
2095
  type: HostListener,
2004
2096
  args: ['click']
2005
2097
  }] } });
2006
2098
 
2007
- class FormControlMarkPristineDirective {
2099
+ class FormControlMarkUntouchedDirective {
2008
2100
  constructor(parent) {
2009
2101
  this.parent = parent;
2010
2102
  }
2011
2103
  onClick() {
2012
2104
  const control = this.parent.control;
2013
- if (control && hasIndexSignature(control) && typeof control['markAllAsPristine'] === 'function') {
2014
- control.markAllAsPristine();
2105
+ if (control && hasIndexSignature(control) && typeof control['markAllAsUntouched'] === 'function') {
2106
+ control.markAllAsUntouched();
2015
2107
  }
2016
2108
  else {
2017
- control?.markAsPristine();
2109
+ control?.markAsUntouched();
2018
2110
  }
2019
2111
  }
2020
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormControlMarkPristineDirective, deps: [{ token: i1.ControlContainer }], target: i0.ɵɵFactoryTarget.Directive }); }
2021
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormControlMarkPristineDirective, selector: "[rxapFormControlMarkPristine]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
2112
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormControlMarkUntouchedDirective, deps: [{ token: i1.ControlContainer }], target: i0.ɵɵFactoryTarget.Directive }); }
2113
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormControlMarkUntouchedDirective, isStandalone: true, selector: "[rxapFormControlMarkUntouched]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
2022
2114
  }
2023
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormControlMarkPristineDirective, decorators: [{
2115
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormControlMarkUntouchedDirective, decorators: [{
2024
2116
  type: Directive,
2025
2117
  args: [{
2026
- selector: '[rxapFormControlMarkPristine]'
2118
+ selector: '[rxapFormControlMarkUntouched]',
2119
+ standalone: true
2027
2120
  }]
2028
2121
  }], ctorParameters: function () { return [{ type: i1.ControlContainer }]; }, propDecorators: { onClick: [{
2029
2122
  type: HostListener,
@@ -2066,7 +2159,7 @@ class FormSubmitDirective extends ConfirmClick {
2066
2159
  this.subscription?.unsubscribe();
2067
2160
  }
2068
2161
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormSubmitDirective, deps: [{ token: FormDirective }, { token: Router, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
2069
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormSubmitDirective, selector: "[rxapFormSubmit]", inputs: { type: "type", resetAfterSubmit: "resetAfterSubmit", navigateAfterSubmit: "navigateAfterSubmit" }, outputs: { afterSubmit: "afterSubmit" }, host: { listeners: { "click": "onClick()", "confirmed": "onConfirm()" }, properties: { "type": "this.type" } }, usesInheritance: true, ngImport: i0 }); }
2162
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormSubmitDirective, isStandalone: true, selector: "[rxapFormSubmit]", inputs: { type: "type", resetAfterSubmit: "resetAfterSubmit", navigateAfterSubmit: "navigateAfterSubmit" }, outputs: { afterSubmit: "afterSubmit" }, host: { listeners: { "click": "onClick()", "confirmed": "onConfirm()" }, properties: { "type": "this.type" } }, usesInheritance: true, ngImport: i0 }); }
2070
2163
  }
2071
2164
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormSubmitDirective, decorators: [{
2072
2165
  type: Directive,
@@ -2074,8 +2167,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
2074
2167
  selector: '[rxapFormSubmit]',
2075
2168
  host: {
2076
2169
  '(click)': 'onClick()',
2077
- '(confirmed)': 'onConfirm()',
2078
- }
2170
+ '(confirmed)': 'onConfirm()'
2171
+ },
2172
+ standalone: true
2079
2173
  }]
2080
2174
  }], ctorParameters: function () { return [{ type: FormDirective, decorators: [{
2081
2175
  type: Inject,
@@ -2100,125 +2194,127 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
2100
2194
  }] } });
2101
2195
 
2102
2196
  /**
2103
- * A full exertion of FormGroupName from @angular/forms. The only change is the
2197
+ * A full exertion of FormControlName from @angular/forms. The only change is the
2104
2198
  * ability to access the control container outside of the current component
2105
2199
  *
2106
2200
  * @deprecated use the ParentControlContainerDirective
2107
2201
  */
2108
- class FormGroupNameDirective extends FormGroupName {
2109
- get control() {
2110
- // TODO : add type check
2111
- return this.formDirective.getFormGroup(this);
2112
- }
2113
- constructor(parent, validators, asyncValidators) {
2114
- super(parent, validators, asyncValidators);
2202
+ class FormControlNameDirective extends FormControlName {
2203
+ constructor(parent, validators, asyncValidators, valueAccessors) {
2204
+ super(parent, validators, asyncValidators, valueAccessors, null);
2115
2205
  }
2116
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormGroupNameDirective, deps: [{ token: i1.ControlContainer, optional: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
2117
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormGroupNameDirective, selector: "[rxapFormGroupName]", inputs: { name: ["rxapFormGroupName", "name"] }, providers: [
2206
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormControlNameDirective, deps: [{ token: i1.ControlContainer, optional: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: NG_VALUE_ACCESSOR, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
2207
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormControlNameDirective, isStandalone: true, selector: "[rxapFormControlName]", inputs: { name: ["rxapFormControlName", "name"] }, providers: [
2118
2208
  {
2119
- provide: ControlContainer,
2120
- useExisting: forwardRef(() => FormGroupNameDirective)
2209
+ provide: NgControl,
2210
+ useExisting: forwardRef(() => FormControlNameDirective)
2121
2211
  }
2122
- ], exportAs: ["rxapFormGroup"], usesInheritance: true, ngImport: i0 }); }
2212
+ ], exportAs: ["rxapFormControl"], usesInheritance: true, ngImport: i0 }); }
2123
2213
  }
2124
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormGroupNameDirective, decorators: [{
2214
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormControlNameDirective, decorators: [{
2125
2215
  type: Directive,
2126
2216
  args: [{
2127
- selector: '[rxapFormGroupName]',
2217
+ selector: '[rxapFormControlName]',
2128
2218
  providers: [
2129
2219
  {
2130
- provide: ControlContainer,
2131
- useExisting: forwardRef(() => FormGroupNameDirective)
2220
+ provide: NgControl,
2221
+ useExisting: forwardRef(() => FormControlNameDirective)
2132
2222
  }
2133
2223
  ],
2134
- exportAs: 'rxapFormGroup'
2224
+ exportAs: 'rxapFormControl',
2225
+ standalone: true
2135
2226
  }]
2136
2227
  }], ctorParameters: function () { return [{ type: i1.ControlContainer, decorators: [{
2137
2228
  type: Optional
2138
2229
  }, {
2139
2230
  type: SkipSelf
2140
- }] }, { type: undefined, decorators: [{
2231
+ }] }, { type: Array, decorators: [{
2141
2232
  type: Optional
2142
2233
  }, {
2143
2234
  type: Self
2144
2235
  }, {
2145
2236
  type: Inject,
2146
2237
  args: [NG_VALIDATORS]
2147
- }] }, { type: undefined, decorators: [{
2238
+ }] }, { type: Array, decorators: [{
2148
2239
  type: Optional
2149
2240
  }, {
2150
2241
  type: Self
2151
2242
  }, {
2152
2243
  type: Inject,
2153
2244
  args: [NG_ASYNC_VALIDATORS]
2245
+ }] }, { type: undefined, decorators: [{
2246
+ type: Optional
2247
+ }, {
2248
+ type: Self
2249
+ }, {
2250
+ type: Inject,
2251
+ args: [NG_VALUE_ACCESSOR]
2154
2252
  }] }]; }, propDecorators: { name: [{
2155
2253
  type: Input,
2156
- args: ['rxapFormGroupName']
2254
+ args: ['rxapFormControlName']
2157
2255
  }] } });
2158
2256
 
2159
2257
  /**
2160
- * A full exertion of FormControlName from @angular/forms. The only change is the
2258
+ * A full exertion of FormGroupName from @angular/forms. The only change is the
2161
2259
  * ability to access the control container outside of the current component
2162
2260
  *
2163
2261
  * @deprecated use the ParentControlContainerDirective
2164
2262
  */
2165
- class FormControlNameDirective extends FormControlName {
2166
- constructor(parent, validators, asyncValidators, valueAccessors) {
2167
- super(parent, validators, asyncValidators, valueAccessors, null);
2263
+ class FormGroupNameDirective extends FormGroupName {
2264
+ get control() {
2265
+ // TODO : add type check
2266
+ return this.formDirective.getFormGroup(this);
2168
2267
  }
2169
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormControlNameDirective, deps: [{ token: i1.ControlContainer, optional: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: NG_VALUE_ACCESSOR, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
2170
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormControlNameDirective, selector: "[rxapFormControlName]", inputs: { name: ["rxapFormControlName", "name"] }, providers: [
2268
+ constructor(parent, validators, asyncValidators) {
2269
+ super(parent, validators, asyncValidators);
2270
+ }
2271
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormGroupNameDirective, deps: [{ token: i1.ControlContainer, optional: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
2272
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormGroupNameDirective, isStandalone: true, selector: "[rxapFormGroupName]", inputs: { name: ["rxapFormGroupName", "name"] }, providers: [
2171
2273
  {
2172
- provide: NgControl,
2173
- useExisting: forwardRef(() => FormControlNameDirective)
2274
+ provide: ControlContainer,
2275
+ useExisting: forwardRef(() => FormGroupNameDirective)
2174
2276
  }
2175
- ], exportAs: ["rxapFormControl"], usesInheritance: true, ngImport: i0 }); }
2277
+ ], exportAs: ["rxapFormGroup"], usesInheritance: true, ngImport: i0 }); }
2176
2278
  }
2177
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormControlNameDirective, decorators: [{
2279
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormGroupNameDirective, decorators: [{
2178
2280
  type: Directive,
2179
2281
  args: [{
2180
- selector: '[rxapFormControlName]',
2282
+ selector: '[rxapFormGroupName]',
2181
2283
  providers: [
2182
2284
  {
2183
- provide: NgControl,
2184
- useExisting: forwardRef(() => FormControlNameDirective)
2285
+ provide: ControlContainer,
2286
+ useExisting: forwardRef(() => FormGroupNameDirective)
2185
2287
  }
2186
2288
  ],
2187
- exportAs: 'rxapFormControl'
2289
+ exportAs: 'rxapFormGroup',
2290
+ standalone: true
2188
2291
  }]
2189
2292
  }], ctorParameters: function () { return [{ type: i1.ControlContainer, decorators: [{
2190
2293
  type: Optional
2191
2294
  }, {
2192
2295
  type: SkipSelf
2193
- }] }, { type: Array, decorators: [{
2296
+ }] }, { type: undefined, decorators: [{
2194
2297
  type: Optional
2195
2298
  }, {
2196
2299
  type: Self
2197
2300
  }, {
2198
2301
  type: Inject,
2199
2302
  args: [NG_VALIDATORS]
2200
- }] }, { type: Array, decorators: [{
2201
- type: Optional
2202
- }, {
2203
- type: Self
2204
- }, {
2205
- type: Inject,
2206
- args: [NG_ASYNC_VALIDATORS]
2207
2303
  }] }, { type: undefined, decorators: [{
2208
2304
  type: Optional
2209
2305
  }, {
2210
2306
  type: Self
2211
2307
  }, {
2212
2308
  type: Inject,
2213
- args: [NG_VALUE_ACCESSOR]
2309
+ args: [NG_ASYNC_VALIDATORS]
2214
2310
  }] }]; }, propDecorators: { name: [{
2215
2311
  type: Input,
2216
- args: ['rxapFormControlName']
2312
+ args: ['rxapFormGroupName']
2217
2313
  }] } });
2218
2314
 
2219
2315
  class ParentControlContainerDirective {
2220
2316
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ParentControlContainerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2221
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: ParentControlContainerDirective, selector: "[formControlName][parentControlContainer],[formControlGroup][parentControlContainer]", providers: [
2317
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: ParentControlContainerDirective, isStandalone: true, selector: "[formControlName][parentControlContainer],[formControlGroup][parentControlContainer]", providers: [
2222
2318
  {
2223
2319
  provide: ControlContainer,
2224
2320
  useExisting: ControlContainer
@@ -2234,171 +2330,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
2234
2330
  provide: ControlContainer,
2235
2331
  useExisting: ControlContainer
2236
2332
  }
2237
- ]
2238
- }]
2239
- }] });
2240
-
2241
- class FormSubmitSuccessfulDirective {
2242
- constructor(formDirective, template, viewContainerRef) {
2243
- this.formDirective = formDirective;
2244
- this.template = template;
2245
- this.viewContainerRef = viewContainerRef;
2246
- }
2247
- ngAfterViewInit() {
2248
- this.subscription = this.formDirective.submitSuccessful$.pipe(tap(result => {
2249
- this.viewContainerRef.clear();
2250
- this.viewContainerRef.createEmbeddedView(this.template, { $implicit: result });
2251
- })).subscribe();
2252
- }
2253
- ngOnDestroy() {
2254
- this.subscription?.unsubscribe();
2255
- }
2256
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormSubmitSuccessfulDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
2257
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormSubmitSuccessfulDirective, selector: "[rxapFormSubmitSuccessful]", ngImport: i0 }); }
2258
- }
2259
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormSubmitSuccessfulDirective, decorators: [{
2260
- type: Directive,
2261
- args: [{
2262
- selector: '[rxapFormSubmitSuccessful]'
2263
- }]
2264
- }], ctorParameters: function () { return [{ type: FormDirective, decorators: [{
2265
- type: Inject,
2266
- args: [FormDirective]
2267
- }] }, { type: i0.TemplateRef, decorators: [{
2268
- type: Inject,
2269
- args: [TemplateRef]
2270
- }] }, { type: i0.ViewContainerRef, decorators: [{
2271
- type: Inject,
2272
- args: [ViewContainerRef]
2273
- }] }]; } });
2274
-
2275
- class FormSubmitInvalidDirective {
2276
- constructor(formDirective, template, viewContainerRef) {
2277
- this.formDirective = formDirective;
2278
- this.template = template;
2279
- this.viewContainerRef = viewContainerRef;
2280
- }
2281
- ngAfterViewInit() {
2282
- this.subscription = this.formDirective.invalidSubmit.pipe(tap(result => {
2283
- this.viewContainerRef.clear();
2284
- this.viewContainerRef.createEmbeddedView(this.template, { $implicit: result });
2285
- })).subscribe();
2286
- }
2287
- ngOnDestroy() {
2288
- this.subscription?.unsubscribe();
2289
- }
2290
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormSubmitInvalidDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
2291
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FormSubmitInvalidDirective, selector: "[rxapFormSubmitInvalid]", ngImport: i0 }); }
2292
- }
2293
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormSubmitInvalidDirective, decorators: [{
2294
- type: Directive,
2295
- args: [{
2296
- selector: '[rxapFormSubmitInvalid]'
2297
- }]
2298
- }], ctorParameters: function () { return [{ type: FormDirective, decorators: [{
2299
- type: Inject,
2300
- args: [FormDirective]
2301
- }] }, { type: i0.TemplateRef, decorators: [{
2302
- type: Inject,
2303
- args: [TemplateRef]
2304
- }] }, { type: i0.ViewContainerRef, decorators: [{
2305
- type: Inject,
2306
- args: [ViewContainerRef]
2307
- }] }]; } });
2308
-
2309
- class RxapFormsModule {
2310
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RxapFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2311
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: RxapFormsModule, declarations: [FormDirective,
2312
- FormSubmitFailedDirective,
2313
- FormLoadingDirective,
2314
- FormSubmittingDirective,
2315
- FormLoadingErrorDirective,
2316
- FormLoadedDirective,
2317
- FormControlErrorDirective,
2318
- FormControlMarkDirtyDirective,
2319
- FormControlMarkTouchedDirective,
2320
- FormControlMarkUntouchedDirective,
2321
- FormControlMarkPristineDirective,
2322
- FormSubmitDirective,
2323
- FormGroupNameDirective,
2324
- FormControlNameDirective,
2325
- ParentControlContainerDirective,
2326
- FormSubmitSuccessfulDirective,
2327
- FormSubmitInvalidDirective], exports: [FormDirective,
2328
- FormSubmitFailedDirective,
2329
- FormLoadingDirective,
2330
- FormSubmittingDirective,
2331
- FormLoadingErrorDirective,
2332
- FormLoadedDirective,
2333
- FormControlErrorDirective,
2334
- FormControlMarkDirtyDirective,
2335
- FormControlMarkTouchedDirective,
2336
- FormControlMarkUntouchedDirective,
2337
- FormControlMarkPristineDirective,
2338
- FormSubmitDirective,
2339
- FormGroupNameDirective,
2340
- FormControlNameDirective,
2341
- ParentControlContainerDirective,
2342
- FormSubmitSuccessfulDirective,
2343
- FormSubmitInvalidDirective] }); }
2344
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RxapFormsModule }); }
2345
- }
2346
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RxapFormsModule, decorators: [{
2347
- type: NgModule,
2348
- args: [{
2349
- declarations: [
2350
- FormDirective,
2351
- FormSubmitFailedDirective,
2352
- FormLoadingDirective,
2353
- FormSubmittingDirective,
2354
- FormLoadingErrorDirective,
2355
- FormLoadedDirective,
2356
- FormControlErrorDirective,
2357
- FormControlMarkDirtyDirective,
2358
- FormControlMarkTouchedDirective,
2359
- FormControlMarkUntouchedDirective,
2360
- FormControlMarkPristineDirective,
2361
- FormSubmitDirective,
2362
- FormGroupNameDirective,
2363
- FormControlNameDirective,
2364
- ParentControlContainerDirective,
2365
- FormSubmitSuccessfulDirective,
2366
- FormSubmitInvalidDirective,
2367
2333
  ],
2368
- exports: [
2369
- FormDirective,
2370
- FormSubmitFailedDirective,
2371
- FormLoadingDirective,
2372
- FormSubmittingDirective,
2373
- FormLoadingErrorDirective,
2374
- FormLoadedDirective,
2375
- FormControlErrorDirective,
2376
- FormControlMarkDirtyDirective,
2377
- FormControlMarkTouchedDirective,
2378
- FormControlMarkUntouchedDirective,
2379
- FormControlMarkPristineDirective,
2380
- FormSubmitDirective,
2381
- FormGroupNameDirective,
2382
- FormControlNameDirective,
2383
- ParentControlContainerDirective,
2384
- FormSubmitSuccessfulDirective,
2385
- FormSubmitInvalidDirective,
2386
- ]
2334
+ standalone: true
2387
2335
  }]
2388
2336
  }] });
2389
2337
 
2390
- function ToFormMethod(call) {
2391
- return { call };
2392
- }
2393
- /**
2394
- * @deprecated use ToFormMethod instead
2395
- *
2396
- * @param call the call method implementation
2397
- */
2398
- function ToFormSubmitMethod(call) {
2399
- return ToFormMethod(call);
2400
- }
2401
-
2402
2338
  /**
2403
2339
  * Checks if a given value is a number.
2404
2340
  */
@@ -2798,5 +2734,5 @@ const RxapValidators = {
2798
2734
  * Generated bundle index. Do not edit.
2799
2735
  */
2800
2736
 
2801
- export { ControlAsyncValidator, ControlChange, ControlSetValue, ControlValidator, ControlValueAccessor, FormArrayControlManager, FormControlErrorDirective, FormControlMarkDirtyDirective, FormControlMarkPristineDirective, FormControlMarkTouchedDirective, FormControlMarkUntouchedDirective, FormControlNameDirective, FormDirective, FormGroupNameDirective, FormLoadedDirective, FormLoadingDirective, FormLoadingErrorDirective, FormSubmitDirective, FormSubmitFailedDirective, FormSubmitInvalidDirective, FormSubmitSuccessfulDirective, FormSubmittingDirective, IsArray, IsBoolean, IsDate, IsEnum, IsInt, IsNumber, IsObject, IsString, ParentControlContainerDirective, RXAP_FORM_CONTEXT, RXAP_FORM_DEFINITION, RXAP_FORM_DEFINITION_BUILDER, RXAP_FORM_INITIAL_STATE, RXAP_FORM_LOAD_FAILED_METHOD, RXAP_FORM_LOAD_METHOD, RXAP_FORM_LOAD_SUCCESSFUL_METHOD, RXAP_FORM_SUBMIT_FAILED_METHOD, RXAP_FORM_SUBMIT_METHOD, RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD, RxapForm, RxapFormArray, RxapFormBuilder, RxapFormControl, RxapFormGroup, RxapFormsModule, RxapValidators, ToFormMethod, ToFormSubmitMethod, UseFormArrayControl, UseFormArrayGroup, UseFormControl, UseFormGroup, _IsNumber, controlDisabled$, controlDisabledWhile, controlEnabled$, controlEnabledWhile, controlErrorChanges$, controlReadonly$, controlStatusChanges$, controlValueChanges$, disableControl, enableControl, hasErrorAndDirty, hasErrorAndTouched, isNumber, markAllDirty, markAllPristine, markAllUntouched, mergeControlValidators, selectControlValue$, validateControlOn };
2737
+ export { ControlAsyncValidator, ControlChange, ControlSetValue, ControlValidator, ControlValueAccessor, FormArrayControlManager, FormControlErrorDirective, FormControlMarkDirtyDirective, FormControlMarkPristineDirective, FormControlMarkTouchedDirective, FormControlMarkUntouchedDirective, FormControlNameDirective, FormDirective, FormGroupNameDirective, FormLoadedDirective, FormLoadingDirective, FormLoadingErrorDirective, FormSubmitDirective, FormSubmitFailedDirective, FormSubmitInvalidDirective, FormSubmitSuccessfulDirective, FormSubmittingDirective, IsArray, IsBoolean, IsDate, IsEnum, IsInt, IsNumber, IsObject, IsString, ParentControlContainerDirective, RXAP_FORM_CONTEXT, RXAP_FORM_DEFINITION, RXAP_FORM_DEFINITION_BUILDER, RXAP_FORM_INITIAL_STATE, RXAP_FORM_LOAD_FAILED_METHOD, RXAP_FORM_LOAD_METHOD, RXAP_FORM_LOAD_SUCCESSFUL_METHOD, RXAP_FORM_SUBMIT_FAILED_METHOD, RXAP_FORM_SUBMIT_METHOD, RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD, RxapForm, RxapFormArray, RxapFormBuilder, RxapFormControl, RxapFormGroup, RxapValidators, ToFormMethod, ToFormSubmitMethod, UseFormArrayControl, UseFormArrayGroup, UseFormControl, UseFormGroup, _IsNumber, controlDisabled$, controlDisabledWhile, controlEnabled$, controlEnabledWhile, controlErrorChanges$, controlReadonly$, controlStatusChanges$, controlValueChanges$, disableControl, enableControl, hasErrorAndDirty, hasErrorAndTouched, isNumber, markAllDirty, markAllPristine, markAllUntouched, mergeControlValidators, selectControlValue$, validateControlOn };
2802
2738
  //# sourceMappingURL=rxap-forms.mjs.map