@rxap/forms 12.7.4 → 13.0.0-next.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 (170) hide show
  1. package/esm2020/index.mjs +53 -0
  2. package/esm2020/lib/control-actions.mjs +77 -0
  3. package/esm2020/lib/control-value-accessor.mjs +14 -0
  4. package/esm2020/lib/decorators/control-async-validator.mjs +10 -0
  5. package/esm2020/lib/decorators/control-change.mjs +10 -0
  6. package/esm2020/lib/decorators/control-set-value.mjs +11 -0
  7. package/esm2020/lib/decorators/control-validator.mjs +10 -0
  8. package/esm2020/lib/decorators/form.mjs +7 -0
  9. package/esm2020/lib/decorators/metadata-keys.mjs +12 -0
  10. package/esm2020/lib/decorators/use-form-array.mjs +13 -0
  11. package/esm2020/lib/decorators/use-form-control.mjs +8 -0
  12. package/esm2020/lib/decorators/use-form-group.mjs +8 -0
  13. package/esm2020/lib/directives/form-control-error.directive.mjs +59 -0
  14. package/esm2020/lib/directives/form-control-mark-dirty.directive.mjs +31 -0
  15. package/esm2020/lib/directives/form-control-mark-pristine.directive.mjs +31 -0
  16. package/esm2020/lib/directives/form-control-mark-touched.directive.mjs +24 -0
  17. package/esm2020/lib/directives/form-control-mark-untouched.directive.mjs +31 -0
  18. package/esm2020/lib/directives/form-control-name.directive.mjs +64 -0
  19. package/esm2020/lib/directives/form-group-name.directive.mjs +61 -0
  20. package/esm2020/lib/directives/form-loaded.directive.mjs +41 -0
  21. package/esm2020/lib/directives/form-loading-error.directive.mjs +41 -0
  22. package/esm2020/lib/directives/form-loading.directive.mjs +41 -0
  23. package/esm2020/lib/directives/form-submit-failed.directive.mjs +41 -0
  24. package/esm2020/lib/directives/form-submit-invalid.directive.mjs +39 -0
  25. package/esm2020/lib/directives/form-submit-successful.directive.mjs +39 -0
  26. package/esm2020/lib/directives/form-submit.directive.mjs +78 -0
  27. package/esm2020/lib/directives/form-submitting.directive.mjs +41 -0
  28. package/esm2020/lib/directives/form.directive.mjs +541 -0
  29. package/esm2020/lib/directives/forms.module.mjs +100 -0
  30. package/esm2020/lib/directives/models.mjs +12 -0
  31. package/esm2020/lib/directives/parent-control-container.directive.mjs +25 -0
  32. package/esm2020/lib/directives/tokens.mjs +10 -0
  33. package/esm2020/lib/form-array.mjs +225 -0
  34. package/esm2020/lib/form-builder.mjs +374 -0
  35. package/esm2020/lib/form-control.mjs +169 -0
  36. package/esm2020/lib/form-group.mjs +181 -0
  37. package/esm2020/lib/model.mjs +2 -0
  38. package/esm2020/lib/tokens.mjs +4 -0
  39. package/esm2020/lib/types.mjs +2 -0
  40. package/esm2020/lib/validators/index.mjs +29 -0
  41. package/esm2020/lib/validators/is-array.mjs +18 -0
  42. package/esm2020/lib/validators/is-boolean.mjs +18 -0
  43. package/esm2020/lib/validators/is-complex.mjs +87 -0
  44. package/esm2020/lib/validators/is-date.mjs +18 -0
  45. package/esm2020/lib/validators/is-email.mjs +19 -0
  46. package/esm2020/lib/validators/is-enum.mjs +18 -0
  47. package/esm2020/lib/validators/is-int.mjs +19 -0
  48. package/esm2020/lib/validators/is-ip.mjs +19 -0
  49. package/esm2020/lib/validators/is-number.mjs +56 -0
  50. package/esm2020/lib/validators/is-object.mjs +18 -0
  51. package/esm2020/lib/validators/is-phone-number.mjs +19 -0
  52. package/esm2020/lib/validators/is-string.mjs +18 -0
  53. package/esm2020/lib/validators/is-url.mjs +19 -0
  54. package/esm2020/rxap-forms.mjs +5 -0
  55. package/fesm2015/rxap-forms.mjs +2725 -0
  56. package/fesm2015/rxap-forms.mjs.map +1 -0
  57. package/{fesm2015/rxap-forms.js → fesm2020/rxap-forms.mjs} +154 -144
  58. package/fesm2020/rxap-forms.mjs.map +1 -0
  59. package/package.json +35 -21
  60. package/bundles/rxap-forms.umd.js +0 -3527
  61. package/bundles/rxap-forms.umd.js.map +0 -1
  62. package/esm2015/index.js +0 -53
  63. package/esm2015/index.js.map +0 -1
  64. package/esm2015/lib/control-actions.js +0 -80
  65. package/esm2015/lib/control-actions.js.map +0 -1
  66. package/esm2015/lib/control-value-accessor.js +0 -14
  67. package/esm2015/lib/control-value-accessor.js.map +0 -1
  68. package/esm2015/lib/decorators/control-async-validator.js +0 -10
  69. package/esm2015/lib/decorators/control-async-validator.js.map +0 -1
  70. package/esm2015/lib/decorators/control-change.js +0 -10
  71. package/esm2015/lib/decorators/control-change.js.map +0 -1
  72. package/esm2015/lib/decorators/control-set-value.js +0 -8
  73. package/esm2015/lib/decorators/control-set-value.js.map +0 -1
  74. package/esm2015/lib/decorators/control-validator.js +0 -10
  75. package/esm2015/lib/decorators/control-validator.js.map +0 -1
  76. package/esm2015/lib/decorators/form.js +0 -7
  77. package/esm2015/lib/decorators/form.js.map +0 -1
  78. package/esm2015/lib/decorators/metadata-keys.js +0 -12
  79. package/esm2015/lib/decorators/metadata-keys.js.map +0 -1
  80. package/esm2015/lib/decorators/use-form-array.js +0 -13
  81. package/esm2015/lib/decorators/use-form-array.js.map +0 -1
  82. package/esm2015/lib/decorators/use-form-control.js +0 -8
  83. package/esm2015/lib/decorators/use-form-control.js.map +0 -1
  84. package/esm2015/lib/decorators/use-form-group.js +0 -8
  85. package/esm2015/lib/decorators/use-form-group.js.map +0 -1
  86. package/esm2015/lib/directives/form-control-error.directive.js +0 -61
  87. package/esm2015/lib/directives/form-control-error.directive.js.map +0 -1
  88. package/esm2015/lib/directives/form-control-mark-dirty.directive.js +0 -31
  89. package/esm2015/lib/directives/form-control-mark-dirty.directive.js.map +0 -1
  90. package/esm2015/lib/directives/form-control-mark-pristine.directive.js +0 -31
  91. package/esm2015/lib/directives/form-control-mark-pristine.directive.js.map +0 -1
  92. package/esm2015/lib/directives/form-control-mark-touched.directive.js +0 -25
  93. package/esm2015/lib/directives/form-control-mark-touched.directive.js.map +0 -1
  94. package/esm2015/lib/directives/form-control-mark-untouched.directive.js +0 -31
  95. package/esm2015/lib/directives/form-control-mark-untouched.directive.js.map +0 -1
  96. package/esm2015/lib/directives/form-control-name.directive.js +0 -64
  97. package/esm2015/lib/directives/form-control-name.directive.js.map +0 -1
  98. package/esm2015/lib/directives/form-group-name.directive.js +0 -61
  99. package/esm2015/lib/directives/form-group-name.directive.js.map +0 -1
  100. package/esm2015/lib/directives/form-loaded.directive.js +0 -42
  101. package/esm2015/lib/directives/form-loaded.directive.js.map +0 -1
  102. package/esm2015/lib/directives/form-loading-error.directive.js +0 -42
  103. package/esm2015/lib/directives/form-loading-error.directive.js.map +0 -1
  104. package/esm2015/lib/directives/form-loading.directive.js +0 -42
  105. package/esm2015/lib/directives/form-loading.directive.js.map +0 -1
  106. package/esm2015/lib/directives/form-submit-failed.directive.js +0 -42
  107. package/esm2015/lib/directives/form-submit-failed.directive.js.map +0 -1
  108. package/esm2015/lib/directives/form-submit-invalid.directive.js +0 -40
  109. package/esm2015/lib/directives/form-submit-invalid.directive.js.map +0 -1
  110. package/esm2015/lib/directives/form-submit-successful.directive.js +0 -40
  111. package/esm2015/lib/directives/form-submit-successful.directive.js.map +0 -1
  112. package/esm2015/lib/directives/form-submit.directive.js +0 -75
  113. package/esm2015/lib/directives/form-submit.directive.js.map +0 -1
  114. package/esm2015/lib/directives/form-submitting.directive.js +0 -42
  115. package/esm2015/lib/directives/form-submitting.directive.js.map +0 -1
  116. package/esm2015/lib/directives/form.directive.js +0 -544
  117. package/esm2015/lib/directives/form.directive.js.map +0 -1
  118. package/esm2015/lib/directives/forms.module.js +0 -100
  119. package/esm2015/lib/directives/forms.module.js.map +0 -1
  120. package/esm2015/lib/directives/models.js +0 -12
  121. package/esm2015/lib/directives/models.js.map +0 -1
  122. package/esm2015/lib/directives/parent-control-container.directive.js +0 -25
  123. package/esm2015/lib/directives/parent-control-container.directive.js.map +0 -1
  124. package/esm2015/lib/directives/tokens.js +0 -10
  125. package/esm2015/lib/directives/tokens.js.map +0 -1
  126. package/esm2015/lib/form-array.js +0 -226
  127. package/esm2015/lib/form-array.js.map +0 -1
  128. package/esm2015/lib/form-builder.js +0 -349
  129. package/esm2015/lib/form-builder.js.map +0 -1
  130. package/esm2015/lib/form-control.js +0 -170
  131. package/esm2015/lib/form-control.js.map +0 -1
  132. package/esm2015/lib/form-group.js +0 -183
  133. package/esm2015/lib/form-group.js.map +0 -1
  134. package/esm2015/lib/model.js +0 -2
  135. package/esm2015/lib/model.js.map +0 -1
  136. package/esm2015/lib/tokens.js +0 -4
  137. package/esm2015/lib/tokens.js.map +0 -1
  138. package/esm2015/lib/types.js +0 -2
  139. package/esm2015/lib/types.js.map +0 -1
  140. package/esm2015/lib/validators/index.js +0 -29
  141. package/esm2015/lib/validators/index.js.map +0 -1
  142. package/esm2015/lib/validators/is-array.js +0 -18
  143. package/esm2015/lib/validators/is-array.js.map +0 -1
  144. package/esm2015/lib/validators/is-boolean.js +0 -18
  145. package/esm2015/lib/validators/is-boolean.js.map +0 -1
  146. package/esm2015/lib/validators/is-complex.js +0 -87
  147. package/esm2015/lib/validators/is-complex.js.map +0 -1
  148. package/esm2015/lib/validators/is-date.js +0 -18
  149. package/esm2015/lib/validators/is-date.js.map +0 -1
  150. package/esm2015/lib/validators/is-email.js +0 -19
  151. package/esm2015/lib/validators/is-email.js.map +0 -1
  152. package/esm2015/lib/validators/is-enum.js +0 -18
  153. package/esm2015/lib/validators/is-enum.js.map +0 -1
  154. package/esm2015/lib/validators/is-int.js +0 -19
  155. package/esm2015/lib/validators/is-int.js.map +0 -1
  156. package/esm2015/lib/validators/is-ip.js +0 -19
  157. package/esm2015/lib/validators/is-ip.js.map +0 -1
  158. package/esm2015/lib/validators/is-number.js +0 -57
  159. package/esm2015/lib/validators/is-number.js.map +0 -1
  160. package/esm2015/lib/validators/is-object.js +0 -18
  161. package/esm2015/lib/validators/is-object.js.map +0 -1
  162. package/esm2015/lib/validators/is-phone-number.js +0 -19
  163. package/esm2015/lib/validators/is-phone-number.js.map +0 -1
  164. package/esm2015/lib/validators/is-string.js +0 -18
  165. package/esm2015/lib/validators/is-string.js.map +0 -1
  166. package/esm2015/lib/validators/is-url.js +0 -19
  167. package/esm2015/lib/validators/is-url.js.map +0 -1
  168. package/esm2015/rxap-forms.js +0 -5
  169. package/esm2015/rxap-forms.js.map +0 -1
  170. package/fesm2015/rxap-forms.js.map +0 -1
@@ -26,16 +26,13 @@ function controlValueChanges$(control) {
26
26
  return merge(defer(() => of(getControlValue(control))), control.valueChanges.pipe(map(() => getControlValue(control))));
27
27
  }
28
28
  function controlDisabled$(control) {
29
- var _a;
30
- return merge(defer(() => of(control.disabled)), merge(control.statusChanges, (_a = control.stateChanges) !== null && _a !== void 0 ? _a : EMPTY).pipe(map(() => control.disabled), distinctUntilChanged()));
29
+ return merge(defer(() => of(control.disabled)), merge(control.statusChanges, control.stateChanges ?? EMPTY).pipe(map(() => control.disabled), distinctUntilChanged()));
31
30
  }
32
31
  function controlEnabled$(control) {
33
- var _a;
34
- return merge(defer(() => of(control.enabled)), merge(control.statusChanges, (_a = control.stateChanges) !== null && _a !== void 0 ? _a : EMPTY).pipe(map(() => control.enabled), distinctUntilChanged()));
32
+ return merge(defer(() => of(control.enabled)), merge(control.statusChanges, control.stateChanges ?? EMPTY).pipe(map(() => control.enabled), distinctUntilChanged()));
35
33
  }
36
34
  function controlReadonly$(control) {
37
- var _a;
38
- return merge(defer(() => { var _a; return of((_a = control.readonly) !== null && _a !== void 0 ? _a : false); }), merge(control.statusChanges, (_a = control.stateChanges) !== null && _a !== void 0 ? _a : EMPTY).pipe(map(() => { var _a; return (_a = control.readonly) !== null && _a !== void 0 ? _a : false; }), distinctUntilChanged()));
35
+ return merge(defer(() => of(control.readonly ?? false)), merge(control.statusChanges, control.stateChanges ?? EMPTY).pipe(map(() => control.readonly ?? false), distinctUntilChanged()));
39
36
  }
40
37
  function controlStatusChanges$(control) {
41
38
  return merge(defer(() => of(control.status)), control.statusChanges.pipe(map(() => control.status), distinctUntilChanged()));
@@ -117,12 +114,11 @@ class RxapFormArray extends FormArray {
117
114
  this._controlRemovedFn = options.controlRemovedFn;
118
115
  }
119
116
  get readonly() {
120
- var _a, _b;
121
- return (_b = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.readonly) !== null && _b !== void 0 ? _b : this._readonly;
117
+ return this.parent?.readonly ?? this._readonly;
122
118
  }
123
119
  set readonly(value) {
124
120
  this._readonly = value;
125
- this.controls.forEach(control => { var _a; return (_a = control.stateChanges) === null || _a === void 0 ? void 0 : _a.next(); });
121
+ this.controls.forEach(control => control.stateChanges?.next());
126
122
  }
127
123
  /**
128
124
  * @internal
@@ -176,7 +172,7 @@ class RxapFormArray extends FormArray {
176
172
  * @param state (optional) the initial state of the new control
177
173
  */
178
174
  insertAt(index, state) {
179
- const insertIndex = index !== null && index !== void 0 ? index : this.controls.length;
175
+ const insertIndex = index ?? this.controls.length;
180
176
  const controlOrDefinition = this._builder(state, {
181
177
  controlId: insertIndex.toFixed(0),
182
178
  });
@@ -354,13 +350,11 @@ class RxapFormGroup extends FormGroup {
354
350
  return this.parent.rxapFormDefinition;
355
351
  }
356
352
  get readonly() {
357
- var _a, _b;
358
- return (_b = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.readonly) !== null && _b !== void 0 ? _b : this._readonly;
353
+ return this.parent?.readonly ?? this._readonly;
359
354
  }
360
355
  set readonly(value) {
361
- var _a;
362
356
  this._readonly = value;
363
- Object.values((_a = this.controls) !== null && _a !== void 0 ? _a : {}).forEach(control => { var _a; return (_a = control.stateChanges) === null || _a === void 0 ? void 0 : _a.next(); });
357
+ Object.values(this.controls ?? {}).forEach(control => control.stateChanges?.next());
364
358
  }
365
359
  get controlPath() {
366
360
  const parent = this.parent;
@@ -533,8 +527,7 @@ class RxapFormControl extends FormControl {
533
527
  return this.parent.rxapFormDefinition;
534
528
  }
535
529
  get readonly() {
536
- var _a, _b;
537
- return (_b = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.readonly) !== null && _b !== void 0 ? _b : this._readonly;
530
+ return this.parent?.readonly ?? this._readonly;
538
531
  }
539
532
  set readonly(value) {
540
533
  this._readonly = value;
@@ -616,7 +609,7 @@ class RxapFormControl extends FormControl {
616
609
  this.markAsDirty({ onlySelf: true });
617
610
  }
618
611
  reset(formState, options) {
619
- const newState = formState !== null && formState !== void 0 ? formState : this.initialState;
612
+ const newState = formState ?? this.initialState;
620
613
  if (typeof newState === 'function') {
621
614
  super.reset(newState(), options);
622
615
  }
@@ -694,7 +687,6 @@ class FormArrayControlManager {
694
687
  }
695
688
  class RxapFormBuilder {
696
689
  constructor(definition, injector = Injector.NULL, providers = []) {
697
- var _a;
698
690
  this.definition = definition;
699
691
  this.injector = injector;
700
692
  this.formArrayGroups = this.extractArrayGroups();
@@ -709,12 +701,11 @@ class RxapFormBuilder {
709
701
  // merge the providers from the from options with the providers from the
710
702
  // constructor. If the provider is defined in the form options and constructor
711
703
  // then the provider from the constructor will be used.
712
- this.providers = [...providers, ...((_a = formOptions.providers) !== null && _a !== void 0 ? _a : [])].filter((provider, index, self) => provider.hasOwnProperty('provide') &&
704
+ this.providers = [...providers, ...(formOptions.providers ?? [])].filter((provider, index, self) => provider.hasOwnProperty('provide') &&
713
705
  self.findIndex((selfProvider) => selfProvider.hasOwnProperty('provide') &&
714
706
  selfProvider.provide === provider.provide) === index);
715
707
  }
716
708
  build(state = {}, options = {}) {
717
- var _a, _b;
718
709
  const injector = Injector.create({
719
710
  name: `rxap/form-builder/${this.formOptions.id}`,
720
711
  parent: this.injector,
@@ -738,7 +729,11 @@ class RxapFormBuilder {
738
729
  this.buildGroups(state, form, controls);
739
730
  this.buildArrayGroups(state, form, controls);
740
731
  this.buildArrayControls(state, form, controls);
741
- const formOptions = Object.assign(Object.assign(Object.assign({}, this.formOptions), { controlId: (_a = options.controlId) !== null && _a !== void 0 ? _a : (options.id ? options.id : this.formOptions.id) }), options);
732
+ const formOptions = {
733
+ ...this.formOptions,
734
+ controlId: options.controlId ?? (options.id ? options.id : this.formOptions.id),
735
+ ...options,
736
+ };
742
737
  form.rxapFormGroup = new RxapFormGroup(controls, formOptions);
743
738
  Reflect.set(form.rxapFormGroup, '_rxapFormDefinition', form);
744
739
  form.rxapMetadata = this.formOptions;
@@ -747,7 +742,7 @@ class RxapFormBuilder {
747
742
  }
748
743
  for (const control of Object.values(form.rxapFormGroup.controls)) {
749
744
  if (control.controlId) {
750
- const controlSetValueOnInit = Array.from((_b = this.controlSetValue.get(control.controlId)) !== null && _b !== void 0 ? _b : []).filter((controlSetValueOptions) => controlSetValueOptions.initial);
745
+ const controlSetValueOnInit = Array.from(this.controlSetValue.get(control.controlId) ?? []).filter((controlSetValueOptions) => controlSetValueOptions.initial);
751
746
  for (const onSetValue of this.coerceToFnArray(form, controlSetValueOnInit)) {
752
747
  onSetValue(control.value, { initial: true });
753
748
  }
@@ -765,7 +760,15 @@ class RxapFormBuilder {
765
760
  controls[controlId] =
766
761
  new RxapFormArray(
767
762
  // TODO : add the formControlOptions property. To definition the form control options
768
- formControls, Object.assign(Object.assign({}, options), { controlId, validators: [], asyncValidators: [], controlInsertedFn: manager.inserted.bind(manager), controlRemovedFn: manager.removed.bind(manager), builder: (state, controlOptions) => new RxapFormControl(state, controlOptions) })));
763
+ formControls, {
764
+ ...options,
765
+ controlId,
766
+ validators: [],
767
+ asyncValidators: [],
768
+ controlInsertedFn: manager.inserted.bind(manager),
769
+ controlRemovedFn: manager.removed.bind(manager),
770
+ builder: (state, controlOptions) => new RxapFormControl(state, controlOptions),
771
+ }));
769
772
  // TODO : add support for injectable validators
770
773
  formArray.setValidators(this.coerceToValidatorArray(form, options.validators, this.validators.get(controlId)), false);
771
774
  formArray.setAsyncValidators(this.coerceToValidatorArray(form, options.asyncValidators, this.asyncValidators.get(controlId)), false);
@@ -782,7 +785,15 @@ class RxapFormBuilder {
782
785
  const manager = new FormArrayControlManager(form, controlId);
783
786
  const formArray = (formGroupDefinitions.rxapFormArray =
784
787
  controls[controlId] =
785
- new RxapFormArray(formGroupDefinitions.map((fgd) => fgd.rxapFormGroup), Object.assign(Object.assign({}, options), { builder: formGroupBuilder.build.bind(formGroupBuilder), controlId, validators: [], asyncValidators: [], controlInsertedFn: manager.inserted.bind(manager), controlRemovedFn: manager.removed.bind(manager) })));
788
+ new RxapFormArray(formGroupDefinitions.map((fgd) => fgd.rxapFormGroup), {
789
+ ...options,
790
+ builder: formGroupBuilder.build.bind(formGroupBuilder),
791
+ controlId,
792
+ validators: [],
793
+ asyncValidators: [],
794
+ controlInsertedFn: manager.inserted.bind(manager),
795
+ controlRemovedFn: manager.removed.bind(manager)
796
+ }));
786
797
  // TODO : add support for injectable validators
787
798
  formArray.setValidators(this.coerceToValidatorArray(form, options.validators, this.validators.get(controlId)), false);
788
799
  formArray.setAsyncValidators(this.coerceToValidatorArray(form, options.asyncValidators, this.asyncValidators.get(controlId)), false);
@@ -793,7 +804,11 @@ class RxapFormBuilder {
793
804
  for (const [controlId, options] of this.formGroups.entries()) {
794
805
  const formState = this.coerceToGroupFormState(controlId, {}, builderFormState, options.state);
795
806
  assertIsObject(formState);
796
- const formGroupDefinition = new RxapFormBuilder(options.definition, this.injector, this.providers).build(formState, Object.assign(Object.assign({}, options), { validators: [], asyncValidators: [] }));
807
+ const formGroupDefinition = new RxapFormBuilder(options.definition, this.injector, this.providers).build(formState, {
808
+ ...options,
809
+ validators: [],
810
+ asyncValidators: [],
811
+ });
797
812
  controls[controlId] = formGroupDefinition.rxapFormGroup;
798
813
  const formGroup = formGroupDefinition.rxapFormGroup;
799
814
  // TODO : add support for injectable validators
@@ -804,12 +819,17 @@ class RxapFormBuilder {
804
819
  }
805
820
  }
806
821
  buildControls(builderFormState, form, controls) {
807
- var _a, _b;
808
822
  for (const [controlId, options] of this.formControls.entries()) {
809
- const control = (controls[controlId] = new ((_a = options.controlType) !== null && _a !== void 0 ? _a : RxapFormControl)(this.coerceToControlFormState(controlId, null, builderFormState, options.state), Object.assign(Object.assign({}, options), { controlId, validators: [], asyncValidators: [] })));
823
+ const control = (controls[controlId] = new (options.controlType ??
824
+ RxapFormControl)(this.coerceToControlFormState(controlId, null, builderFormState, options.state), {
825
+ ...options,
826
+ controlId,
827
+ validators: [],
828
+ asyncValidators: [],
829
+ }));
810
830
  const injectValidators = [];
811
831
  const injectAsyncValidators = [];
812
- for (const injectValidator of (_b = options.injectValidators) !== null && _b !== void 0 ? _b : []) {
832
+ for (const injectValidator of options.injectValidators ?? []) {
813
833
  const injectableValidator = this.injector.get(injectValidator);
814
834
  if (injectableValidator.validate) {
815
835
  injectValidators.push(injectableValidator.validate.bind(injectableValidator));
@@ -895,7 +915,7 @@ class RxapFormBuilder {
895
915
  formState = builderFormState[controlId];
896
916
  }
897
917
  else if (optionsFormState !== undefined) {
898
- formState = optionsFormState !== null && optionsFormState !== void 0 ? optionsFormState : null;
918
+ formState = optionsFormState ?? null;
899
919
  }
900
920
  if (typeof formState === 'function') {
901
921
  formState = formState();
@@ -965,36 +985,34 @@ class RxapFormBuilder {
965
985
  return formState;
966
986
  }
967
987
  extractControlChanges() {
968
- var _a;
969
- return ((_a = getMetadata(MetadataKeys.CONTROL_CHANGES, this.definition.prototype)) !== null && _a !== void 0 ? _a : new Map());
988
+ return (getMetadata(MetadataKeys.CONTROL_CHANGES, this.definition.prototype) ??
989
+ new Map());
970
990
  }
971
991
  extractControlSetValue() {
972
- var _a;
973
- return ((_a = getMetadata(MetadataKeys.CONTROL_SET_VALUE, this.definition.prototype)) !== null && _a !== void 0 ? _a : new Map());
992
+ return (getMetadata(MetadataKeys.CONTROL_SET_VALUE, this.definition.prototype) ??
993
+ new Map());
974
994
  }
975
995
  extractValidators() {
976
- var _a;
977
- return ((_a = getMetadata(MetadataKeys.CONTROL_VALIDATORS, this.definition.prototype)) !== null && _a !== void 0 ? _a : new Map());
996
+ return (getMetadata(MetadataKeys.CONTROL_VALIDATORS, this.definition.prototype) ??
997
+ new Map());
978
998
  }
979
999
  extractAsyncValidators() {
980
- var _a;
981
- return ((_a = getMetadata(MetadataKeys.CONTROL_ASYNC_VALIDATORS, this.definition.prototype)) !== null && _a !== void 0 ? _a : new Map());
1000
+ return (getMetadata(MetadataKeys.CONTROL_ASYNC_VALIDATORS, this.definition.prototype) ?? new Map());
982
1001
  }
983
1002
  extractArrayGroups() {
984
- var _a;
985
- return ((_a = getMetadata(MetadataKeys.FORM_ARRAY_GROUPS, this.definition.prototype)) !== null && _a !== void 0 ? _a : new Map());
1003
+ return (getMetadata(MetadataKeys.FORM_ARRAY_GROUPS, this.definition.prototype) ??
1004
+ new Map());
986
1005
  }
987
1006
  extractArrayControls() {
988
- var _a;
989
- return ((_a = getMetadata(MetadataKeys.FORM_ARRAY_CONTROLS, this.definition.prototype)) !== null && _a !== void 0 ? _a : new Map());
1007
+ return (getMetadata(MetadataKeys.FORM_ARRAY_CONTROLS, this.definition.prototype) ?? new Map());
990
1008
  }
991
1009
  extractGroups() {
992
- var _a;
993
- return ((_a = getMetadata(MetadataKeys.FORM_GROUPS, this.definition.prototype)) !== null && _a !== void 0 ? _a : new Map());
1010
+ return (getMetadata(MetadataKeys.FORM_GROUPS, this.definition.prototype) ??
1011
+ new Map());
994
1012
  }
995
1013
  extractControls() {
996
- var _a;
997
- return ((_a = getMetadata(MetadataKeys.FORM_CONTROLS, this.definition.prototype)) !== null && _a !== void 0 ? _a : new Map());
1014
+ return (getMetadata(MetadataKeys.FORM_CONTROLS, this.definition.prototype) ??
1015
+ new Map());
998
1016
  }
999
1017
  extractFormOptions() {
1000
1018
  const options = GetDefinitionMetadata(this.definition);
@@ -1043,7 +1061,10 @@ function ControlChange(...controlIds) {
1043
1061
 
1044
1062
  function ControlSetValue(controlId, options = {}) {
1045
1063
  return function (target, propertyKey) {
1046
- setMetadataMapSet(controlId, Object.assign(Object.assign({}, options), { propertyKey }), MetadataKeys.CONTROL_SET_VALUE, target);
1064
+ setMetadataMapSet(controlId, {
1065
+ ...options,
1066
+ propertyKey
1067
+ }, MetadataKeys.CONTROL_SET_VALUE, target);
1047
1068
  };
1048
1069
  }
1049
1070
 
@@ -1057,7 +1078,7 @@ function ControlValidator(...controlIds) {
1057
1078
 
1058
1079
  function UseFormArrayGroup(definition, options = {}) {
1059
1080
  return function (target, propertyKey) {
1060
- setMetadataMap(propertyKey, Object.assign(Object.assign({}, options), { definition }), MetadataKeys.FORM_ARRAY_GROUPS, target);
1081
+ setMetadataMap(propertyKey, { ...options, definition }, MetadataKeys.FORM_ARRAY_GROUPS, target);
1061
1082
  };
1062
1083
  }
1063
1084
  function UseFormArrayControl(options = {}) {
@@ -1074,7 +1095,7 @@ function UseFormControl(options = {}) {
1074
1095
 
1075
1096
  function UseFormGroup(definition, options = {}) {
1076
1097
  return function (target, propertyKey) {
1077
- setMetadataMap(propertyKey, Object.assign(Object.assign({}, options), { definition }), MetadataKeys.FORM_GROUPS, target);
1098
+ setMetadataMap(propertyKey, { ...options, definition }, MetadataKeys.FORM_GROUPS, target);
1078
1099
  };
1079
1100
  }
1080
1101
 
@@ -1109,7 +1130,6 @@ class FormDirective extends FormGroupDirective {
1109
1130
  submitSuccessfulMethod = null,
1110
1131
  // skip self, bc the token is set to null
1111
1132
  formDefinitionBuilder = null, loadingIndicatorService = null) {
1112
- var _a, _b;
1113
1133
  super([], []);
1114
1134
  this.cdr = cdr;
1115
1135
  this.loadMethod = loadMethod;
@@ -1146,8 +1166,8 @@ class FormDirective extends FormGroupDirective {
1146
1166
  this._formDefinition = formDefinition;
1147
1167
  this.form = formDefinition.rxapFormGroup;
1148
1168
  }
1149
- (_a = this.loadingIndicatorService) === null || _a === void 0 ? void 0 : _a.attachLoading(this.loading$);
1150
- (_b = this.loadingIndicatorService) === null || _b === void 0 ? void 0 : _b.attachLoading(this.submitting$);
1169
+ this.loadingIndicatorService?.attachLoading(this.loading$);
1170
+ this.loadingIndicatorService?.attachLoading(this.submitting$);
1151
1171
  }
1152
1172
  get submitting() {
1153
1173
  return this.submitting$.value;
@@ -1334,11 +1354,10 @@ class FormDirective extends FormGroupDirective {
1334
1354
  }
1335
1355
  }
1336
1356
  loadFailed(error) {
1337
- var _a;
1338
1357
  console.debug('Load Error:', error);
1339
1358
  console.error('Load Error:', error.message);
1340
1359
  if (this.loadFailedMethod) {
1341
- (_a = this.loadFailedMethod) === null || _a === void 0 ? void 0 : _a.call(error);
1360
+ this.loadFailedMethod?.call(error);
1342
1361
  }
1343
1362
  else if (isDevMode()) {
1344
1363
  console.warn('The form loading failed for: ' + this.form.controlId);
@@ -1352,7 +1371,7 @@ class FormDirective extends FormGroupDirective {
1352
1371
  else if (typeof this._formDefinition['toJSON'] === 'function') {
1353
1372
  value = this._formDefinition.toJSON();
1354
1373
  }
1355
- value = value !== null && value !== void 0 ? value : this.form.value;
1374
+ value = value ?? this.form.value;
1356
1375
  return clone(value);
1357
1376
  }
1358
1377
  submit() {
@@ -1422,9 +1441,8 @@ class FormDirective extends FormGroupDirective {
1422
1441
  }
1423
1442
  }
1424
1443
  ngOnDestroy() {
1425
- var _a;
1426
1444
  super.ngOnDestroy();
1427
- (_a = this._autoSubmitSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
1445
+ this._autoSubmitSubscription?.unsubscribe();
1428
1446
  function HasNgOnDestroyMethod(obj) {
1429
1447
  return obj && typeof obj.ngOnDestroy === 'function';
1430
1448
  }
@@ -1433,8 +1451,8 @@ class FormDirective extends FormGroupDirective {
1433
1451
  }
1434
1452
  }
1435
1453
  }
1436
- FormDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", 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 });
1437
- FormDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", 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: [
1454
+ FormDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", 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 });
1455
+ FormDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", 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: [
1438
1456
  {
1439
1457
  provide: ControlContainer,
1440
1458
  // ignore coverage
@@ -1481,7 +1499,7 @@ __decorate([
1481
1499
  Required,
1482
1500
  __metadata("design:type", Object)
1483
1501
  ], FormDirective.prototype, "_formDefinition", void 0);
1484
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormDirective, decorators: [{
1502
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormDirective, decorators: [{
1485
1503
  type: Directive,
1486
1504
  args: [{
1487
1505
  selector: 'form[rxapForm]:not([formGroup]):not([ngForm]),rxap-form,form[rxapForm]',
@@ -1640,13 +1658,12 @@ class FormSubmitFailedDirective {
1640
1658
  })).subscribe();
1641
1659
  }
1642
1660
  ngOnDestroy() {
1643
- var _a;
1644
- (_a = this.subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
1661
+ this.subscription?.unsubscribe();
1645
1662
  }
1646
1663
  }
1647
- FormSubmitFailedDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormSubmitFailedDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
1648
- FormSubmitFailedDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FormSubmitFailedDirective, selector: "[rxapFormSubmitFailed]", ngImport: i0 });
1649
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormSubmitFailedDirective, decorators: [{
1664
+ FormSubmitFailedDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormSubmitFailedDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
1665
+ FormSubmitFailedDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: FormSubmitFailedDirective, selector: "[rxapFormSubmitFailed]", ngImport: i0 });
1666
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormSubmitFailedDirective, decorators: [{
1650
1667
  type: Directive,
1651
1668
  args: [{
1652
1669
  selector: '[rxapFormSubmitFailed]'
@@ -1677,13 +1694,12 @@ class FormLoadingDirective {
1677
1694
  })).subscribe();
1678
1695
  }
1679
1696
  ngOnDestroy() {
1680
- var _a;
1681
- (_a = this.subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
1697
+ this.subscription?.unsubscribe();
1682
1698
  }
1683
1699
  }
1684
- FormLoadingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormLoadingDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
1685
- FormLoadingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FormLoadingDirective, selector: "[rxapFormLoading]", ngImport: i0 });
1686
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormLoadingDirective, decorators: [{
1700
+ FormLoadingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormLoadingDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
1701
+ FormLoadingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: FormLoadingDirective, selector: "[rxapFormLoading]", ngImport: i0 });
1702
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormLoadingDirective, decorators: [{
1687
1703
  type: Directive,
1688
1704
  args: [{
1689
1705
  selector: '[rxapFormLoading]'
@@ -1714,13 +1730,12 @@ class FormSubmittingDirective {
1714
1730
  })).subscribe();
1715
1731
  }
1716
1732
  ngOnDestroy() {
1717
- var _a;
1718
- (_a = this.subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
1733
+ this.subscription?.unsubscribe();
1719
1734
  }
1720
1735
  }
1721
- FormSubmittingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormSubmittingDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
1722
- FormSubmittingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FormSubmittingDirective, selector: "[rxapFormSubmitting]", ngImport: i0 });
1723
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormSubmittingDirective, decorators: [{
1736
+ FormSubmittingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormSubmittingDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
1737
+ FormSubmittingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: FormSubmittingDirective, selector: "[rxapFormSubmitting]", ngImport: i0 });
1738
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormSubmittingDirective, decorators: [{
1724
1739
  type: Directive,
1725
1740
  args: [{
1726
1741
  selector: '[rxapFormSubmitting]'
@@ -1751,13 +1766,12 @@ class FormLoadedDirective {
1751
1766
  })).subscribe();
1752
1767
  }
1753
1768
  ngOnDestroy() {
1754
- var _a;
1755
- (_a = this.subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
1769
+ this.subscription?.unsubscribe();
1756
1770
  }
1757
1771
  }
1758
- FormLoadedDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormLoadedDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
1759
- FormLoadedDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FormLoadedDirective, selector: "[rxapFormLoaded]", ngImport: i0 });
1760
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormLoadedDirective, decorators: [{
1772
+ FormLoadedDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormLoadedDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
1773
+ FormLoadedDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: FormLoadedDirective, selector: "[rxapFormLoaded]", ngImport: i0 });
1774
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormLoadedDirective, decorators: [{
1761
1775
  type: Directive,
1762
1776
  args: [{
1763
1777
  selector: '[rxapFormLoaded]'
@@ -1788,13 +1802,12 @@ class FormLoadingErrorDirective {
1788
1802
  })).subscribe();
1789
1803
  }
1790
1804
  ngOnDestroy() {
1791
- var _a;
1792
- (_a = this.subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
1805
+ this.subscription?.unsubscribe();
1793
1806
  }
1794
1807
  }
1795
- FormLoadingErrorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormLoadingErrorDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
1796
- FormLoadingErrorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FormLoadingErrorDirective, selector: "[rxapFormLoadingError]", ngImport: i0 });
1797
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormLoadingErrorDirective, decorators: [{
1808
+ FormLoadingErrorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormLoadingErrorDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
1809
+ FormLoadingErrorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: FormLoadingErrorDirective, selector: "[rxapFormLoadingError]", ngImport: i0 });
1810
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormLoadingErrorDirective, decorators: [{
1798
1811
  type: Directive,
1799
1812
  args: [{
1800
1813
  selector: '[rxapFormLoadingError]'
@@ -1820,8 +1833,7 @@ class FormControlErrorDirective {
1820
1833
  this.viewContainerRef = viewContainerRef;
1821
1834
  }
1822
1835
  ngOnInit() {
1823
- var _a;
1824
- const control = (_a = this.parent.control) === null || _a === void 0 ? void 0 : _a.get(this.name);
1836
+ const control = this.parent.control?.get(this.name);
1825
1837
  if (!control) {
1826
1838
  throw new Error('Could not extract form control instance');
1827
1839
  }
@@ -1833,12 +1845,11 @@ class FormControlErrorDirective {
1833
1845
  })).subscribe();
1834
1846
  }
1835
1847
  ngOnDestroy() {
1836
- var _a;
1837
- (_a = this.subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
1848
+ this.subscription?.unsubscribe();
1838
1849
  }
1839
1850
  }
1840
- FormControlErrorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormControlErrorDirective, deps: [{ token: i0.TemplateRef }, { token: i1.ControlContainer, host: true, skipSelf: true }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
1841
- FormControlErrorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FormControlErrorDirective, selector: "[rxapFormControlError]", inputs: { name: ["rxapFormControlErrorFrom", "name"], errorKey: ["rxapFormControlErrorIf", "errorKey"] }, ngImport: i0 });
1851
+ FormControlErrorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormControlErrorDirective, deps: [{ token: i0.TemplateRef }, { token: i1.ControlContainer, host: true, skipSelf: true }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
1852
+ FormControlErrorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: FormControlErrorDirective, selector: "[rxapFormControlError]", inputs: { name: ["rxapFormControlErrorFrom", "name"], errorKey: ["rxapFormControlErrorIf", "errorKey"] }, ngImport: i0 });
1842
1853
  __decorate([
1843
1854
  Required,
1844
1855
  __metadata("design:type", String)
@@ -1847,7 +1858,7 @@ __decorate([
1847
1858
  Required,
1848
1859
  __metadata("design:type", String)
1849
1860
  ], FormControlErrorDirective.prototype, "errorKey", void 0);
1850
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormControlErrorDirective, decorators: [{
1861
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormControlErrorDirective, decorators: [{
1851
1862
  type: Directive,
1852
1863
  args: [{
1853
1864
  selector: '[rxapFormControlError]'
@@ -1874,13 +1885,13 @@ class FormControlMarkDirtyDirective {
1874
1885
  control.markAllAsDirty();
1875
1886
  }
1876
1887
  else {
1877
- control === null || control === void 0 ? void 0 : control.markAsDirty();
1888
+ control?.markAsDirty();
1878
1889
  }
1879
1890
  }
1880
1891
  }
1881
- FormControlMarkDirtyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormControlMarkDirtyDirective, deps: [{ token: i1.ControlContainer }], target: i0.ɵɵFactoryTarget.Directive });
1882
- FormControlMarkDirtyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FormControlMarkDirtyDirective, selector: "[rxapFormControlMarkDirty]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
1883
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormControlMarkDirtyDirective, decorators: [{
1892
+ FormControlMarkDirtyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormControlMarkDirtyDirective, deps: [{ token: i1.ControlContainer }], target: i0.ɵɵFactoryTarget.Directive });
1893
+ FormControlMarkDirtyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: FormControlMarkDirtyDirective, selector: "[rxapFormControlMarkDirty]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
1894
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormControlMarkDirtyDirective, decorators: [{
1884
1895
  type: Directive,
1885
1896
  args: [{
1886
1897
  selector: '[rxapFormControlMarkDirty]'
@@ -1895,13 +1906,12 @@ class FormControlMarkTouchedDirective {
1895
1906
  this.parent = parent;
1896
1907
  }
1897
1908
  onClick() {
1898
- var _a;
1899
- (_a = this.parent.control) === null || _a === void 0 ? void 0 : _a.markAllAsTouched();
1909
+ this.parent.control?.markAllAsTouched();
1900
1910
  }
1901
1911
  }
1902
- FormControlMarkTouchedDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormControlMarkTouchedDirective, deps: [{ token: i1.ControlContainer }], target: i0.ɵɵFactoryTarget.Directive });
1903
- FormControlMarkTouchedDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FormControlMarkTouchedDirective, selector: "[rxapFormControlMarkTouched]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
1904
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormControlMarkTouchedDirective, decorators: [{
1912
+ FormControlMarkTouchedDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormControlMarkTouchedDirective, deps: [{ token: i1.ControlContainer }], target: i0.ɵɵFactoryTarget.Directive });
1913
+ FormControlMarkTouchedDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: FormControlMarkTouchedDirective, selector: "[rxapFormControlMarkTouched]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
1914
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormControlMarkTouchedDirective, decorators: [{
1905
1915
  type: Directive,
1906
1916
  args: [{
1907
1917
  selector: '[rxapFormControlMarkTouched]'
@@ -1921,13 +1931,13 @@ class FormControlMarkUntouchedDirective {
1921
1931
  control.markAllAsUntouched();
1922
1932
  }
1923
1933
  else {
1924
- control === null || control === void 0 ? void 0 : control.markAsUntouched();
1934
+ control?.markAsUntouched();
1925
1935
  }
1926
1936
  }
1927
1937
  }
1928
- FormControlMarkUntouchedDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormControlMarkUntouchedDirective, deps: [{ token: i1.ControlContainer }], target: i0.ɵɵFactoryTarget.Directive });
1929
- FormControlMarkUntouchedDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FormControlMarkUntouchedDirective, selector: "[rxapFormControlMarkUntouched]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
1930
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormControlMarkUntouchedDirective, decorators: [{
1938
+ FormControlMarkUntouchedDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormControlMarkUntouchedDirective, deps: [{ token: i1.ControlContainer }], target: i0.ɵɵFactoryTarget.Directive });
1939
+ FormControlMarkUntouchedDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: FormControlMarkUntouchedDirective, selector: "[rxapFormControlMarkUntouched]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
1940
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormControlMarkUntouchedDirective, decorators: [{
1931
1941
  type: Directive,
1932
1942
  args: [{
1933
1943
  selector: '[rxapFormControlMarkUntouched]'
@@ -1947,13 +1957,13 @@ class FormControlMarkPristineDirective {
1947
1957
  control.markAllAsPristine();
1948
1958
  }
1949
1959
  else {
1950
- control === null || control === void 0 ? void 0 : control.markAsPristine();
1960
+ control?.markAsPristine();
1951
1961
  }
1952
1962
  }
1953
1963
  }
1954
- FormControlMarkPristineDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormControlMarkPristineDirective, deps: [{ token: i1.ControlContainer }], target: i0.ɵɵFactoryTarget.Directive });
1955
- FormControlMarkPristineDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FormControlMarkPristineDirective, selector: "[rxapFormControlMarkPristine]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
1956
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormControlMarkPristineDirective, decorators: [{
1964
+ FormControlMarkPristineDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormControlMarkPristineDirective, deps: [{ token: i1.ControlContainer }], target: i0.ɵɵFactoryTarget.Directive });
1965
+ FormControlMarkPristineDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: FormControlMarkPristineDirective, selector: "[rxapFormControlMarkPristine]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
1966
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormControlMarkPristineDirective, decorators: [{
1957
1967
  type: Directive,
1958
1968
  args: [{
1959
1969
  selector: '[rxapFormControlMarkPristine]'
@@ -1976,8 +1986,12 @@ class FormSubmitDirective extends ConfirmClick {
1976
1986
  this._resetAfterSubmit = coerceBoolean(value);
1977
1987
  }
1978
1988
  execute() {
1979
- this.subscription = this.formDirective.rxapSubmit.pipe(take(1), tap(event => {
1980
- this.afterSubmit.emit(event);
1989
+ this.formDirective.form.markAllAsDirty();
1990
+ this.formDirective.form.markAllAsTouched();
1991
+ this.formDirective.cdr.markForCheck();
1992
+ this.subscription = this.formDirective.rxapSubmit.pipe(take(1), tap(value => {
1993
+ const clonedValue = clone(value);
1994
+ this.afterSubmit.emit(clonedValue);
1981
1995
  if (this._resetAfterSubmit) {
1982
1996
  this.formDirective.reset();
1983
1997
  }
@@ -1992,13 +2006,12 @@ class FormSubmitDirective extends ConfirmClick {
1992
2006
  this.formDirective.onSubmit(new Event('submit'));
1993
2007
  }
1994
2008
  ngOnDestroy() {
1995
- var _a;
1996
- (_a = this.subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
2009
+ this.subscription?.unsubscribe();
1997
2010
  }
1998
2011
  }
1999
- FormSubmitDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormSubmitDirective, deps: [{ token: FormDirective }, { token: Router, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
2000
- FormSubmitDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", 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 });
2001
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormSubmitDirective, decorators: [{
2012
+ FormSubmitDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormSubmitDirective, deps: [{ token: FormDirective }, { token: Router, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
2013
+ FormSubmitDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", 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 });
2014
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormSubmitDirective, decorators: [{
2002
2015
  type: Directive,
2003
2016
  args: [{
2004
2017
  selector: '[rxapFormSubmit]',
@@ -2044,14 +2057,14 @@ class FormGroupNameDirective extends FormGroupName {
2044
2057
  return this.formDirective.getFormGroup(this);
2045
2058
  }
2046
2059
  }
2047
- FormGroupNameDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", 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 });
2048
- FormGroupNameDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FormGroupNameDirective, selector: "[rxapFormGroupName]", inputs: { name: ["rxapFormGroupName", "name"] }, providers: [
2060
+ FormGroupNameDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", 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 });
2061
+ FormGroupNameDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: FormGroupNameDirective, selector: "[rxapFormGroupName]", inputs: { name: ["rxapFormGroupName", "name"] }, providers: [
2049
2062
  {
2050
2063
  provide: ControlContainer,
2051
2064
  useExisting: forwardRef(() => FormGroupNameDirective)
2052
2065
  }
2053
2066
  ], exportAs: ["rxapFormGroup"], usesInheritance: true, ngImport: i0 });
2054
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormGroupNameDirective, decorators: [{
2067
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormGroupNameDirective, decorators: [{
2055
2068
  type: Directive,
2056
2069
  args: [{
2057
2070
  selector: '[rxapFormGroupName]',
@@ -2097,14 +2110,14 @@ class FormControlNameDirective extends FormControlName {
2097
2110
  super(parent, validators, asyncValidators, valueAccessors, null);
2098
2111
  }
2099
2112
  }
2100
- FormControlNameDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", 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 });
2101
- FormControlNameDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FormControlNameDirective, selector: "[rxapFormControlName]", inputs: { name: ["rxapFormControlName", "name"] }, providers: [
2113
+ FormControlNameDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", 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 });
2114
+ FormControlNameDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: FormControlNameDirective, selector: "[rxapFormControlName]", inputs: { name: ["rxapFormControlName", "name"] }, providers: [
2102
2115
  {
2103
2116
  provide: NgControl,
2104
2117
  useExisting: forwardRef(() => FormControlNameDirective)
2105
2118
  }
2106
2119
  ], exportAs: ["rxapFormControl"], usesInheritance: true, ngImport: i0 });
2107
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormControlNameDirective, decorators: [{
2120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormControlNameDirective, decorators: [{
2108
2121
  type: Directive,
2109
2122
  args: [{
2110
2123
  selector: '[rxapFormControlName]',
@@ -2148,14 +2161,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
2148
2161
 
2149
2162
  class ParentControlContainerDirective {
2150
2163
  }
2151
- ParentControlContainerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ParentControlContainerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2152
- ParentControlContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ParentControlContainerDirective, selector: "[formControlName][parentControlContainer],[formControlGroup][parentControlContainer]", providers: [
2164
+ ParentControlContainerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ParentControlContainerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2165
+ ParentControlContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: ParentControlContainerDirective, selector: "[formControlName][parentControlContainer],[formControlGroup][parentControlContainer]", providers: [
2153
2166
  {
2154
2167
  provide: ControlContainer,
2155
2168
  useExisting: ControlContainer
2156
2169
  }
2157
2170
  ], ngImport: i0 });
2158
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ParentControlContainerDirective, decorators: [{
2171
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ParentControlContainerDirective, decorators: [{
2159
2172
  type: Directive,
2160
2173
  args: [{
2161
2174
  selector: '[formControlName][parentControlContainer],[formControlGroup][parentControlContainer]',
@@ -2181,13 +2194,12 @@ class FormSubmitSuccessfulDirective {
2181
2194
  })).subscribe();
2182
2195
  }
2183
2196
  ngOnDestroy() {
2184
- var _a;
2185
- (_a = this.subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
2197
+ this.subscription?.unsubscribe();
2186
2198
  }
2187
2199
  }
2188
- FormSubmitSuccessfulDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormSubmitSuccessfulDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
2189
- FormSubmitSuccessfulDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FormSubmitSuccessfulDirective, selector: "[rxapFormSubmitSuccessful]", ngImport: i0 });
2190
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormSubmitSuccessfulDirective, decorators: [{
2200
+ FormSubmitSuccessfulDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormSubmitSuccessfulDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
2201
+ FormSubmitSuccessfulDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: FormSubmitSuccessfulDirective, selector: "[rxapFormSubmitSuccessful]", ngImport: i0 });
2202
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormSubmitSuccessfulDirective, decorators: [{
2191
2203
  type: Directive,
2192
2204
  args: [{
2193
2205
  selector: '[rxapFormSubmitSuccessful]'
@@ -2216,13 +2228,12 @@ class FormSubmitInvalidDirective {
2216
2228
  })).subscribe();
2217
2229
  }
2218
2230
  ngOnDestroy() {
2219
- var _a;
2220
- (_a = this.subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
2231
+ this.subscription?.unsubscribe();
2221
2232
  }
2222
2233
  }
2223
- FormSubmitInvalidDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormSubmitInvalidDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
2224
- FormSubmitInvalidDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FormSubmitInvalidDirective, selector: "[rxapFormSubmitInvalid]", ngImport: i0 });
2225
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormSubmitInvalidDirective, decorators: [{
2234
+ FormSubmitInvalidDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormSubmitInvalidDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
2235
+ FormSubmitInvalidDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: FormSubmitInvalidDirective, selector: "[rxapFormSubmitInvalid]", ngImport: i0 });
2236
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormSubmitInvalidDirective, decorators: [{
2226
2237
  type: Directive,
2227
2238
  args: [{
2228
2239
  selector: '[rxapFormSubmitInvalid]'
@@ -2240,8 +2251,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
2240
2251
 
2241
2252
  class RxapFormsModule {
2242
2253
  }
2243
- RxapFormsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RxapFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2244
- RxapFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RxapFormsModule, declarations: [FormDirective,
2254
+ RxapFormsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RxapFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2255
+ RxapFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RxapFormsModule, declarations: [FormDirective,
2245
2256
  FormSubmitFailedDirective,
2246
2257
  FormLoadingDirective,
2247
2258
  FormSubmittingDirective,
@@ -2274,8 +2285,8 @@ RxapFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version
2274
2285
  ParentControlContainerDirective,
2275
2286
  FormSubmitSuccessfulDirective,
2276
2287
  FormSubmitInvalidDirective] });
2277
- RxapFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RxapFormsModule });
2278
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RxapFormsModule, decorators: [{
2288
+ RxapFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RxapFormsModule });
2289
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RxapFormsModule, decorators: [{
2279
2290
  type: NgModule,
2280
2291
  args: [{
2281
2292
  declarations: [
@@ -2335,15 +2346,14 @@ function ToFormSubmitMethod(call) {
2335
2346
  * Checks if a given value is a number.
2336
2347
  */
2337
2348
  function isNumber(value, options = {}) {
2338
- var _a, _b;
2339
2349
  if (typeof value !== 'number') {
2340
2350
  return false;
2341
2351
  }
2342
2352
  if (value === Infinity || value === -Infinity) {
2343
- return (_a = options.allowInfinity) !== null && _a !== void 0 ? _a : false;
2353
+ return options.allowInfinity ?? false;
2344
2354
  }
2345
2355
  if (Number.isNaN(value)) {
2346
- return (_b = options.allowNaN) !== null && _b !== void 0 ? _b : false;
2356
+ return options.allowNaN ?? false;
2347
2357
  }
2348
2358
  if (options.maxDecimalPlaces !== undefined) {
2349
2359
  let decimalPlaces = 0;
@@ -2375,7 +2385,7 @@ function _IsNumber({ message, options } = {}) {
2375
2385
  if (control.value === null) {
2376
2386
  return null;
2377
2387
  }
2378
- if (!isNumber(!(options === null || options === void 0 ? void 0 : options.strict) && typeof control.value === 'string' ? Number(control.value) : control.value, options)) {
2388
+ if (!isNumber(!options?.strict && typeof control.value === 'string' ? Number(control.value) : control.value, options)) {
2379
2389
  return {
2380
2390
  isNumber: {
2381
2391
  expected: 'A number value',
@@ -2661,7 +2671,7 @@ function IsIP({ message, version } = {}) {
2661
2671
  if (!(typeof control.value === 'string' && isIP(control.value, version))) {
2662
2672
  return {
2663
2673
  isIp: {
2664
- expected: `A valid IPv${version !== null && version !== void 0 ? version : '4'} value`,
2674
+ expected: `A valid IPv${version ?? '4'} value`,
2665
2675
  actual: control.value,
2666
2676
  message
2667
2677
  }
@@ -2694,4 +2704,4 @@ const RxapValidators = {
2694
2704
  */
2695
2705
 
2696
2706
  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 };
2697
- //# sourceMappingURL=rxap-forms.js.map
2707
+ //# sourceMappingURL=rxap-forms.mjs.map