@rxap/forms 12.5.1-next.1 → 12.6.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"is-number.js","sourceRoot":"","sources":["../../../../../../libs/forms/src/lib/validators/is-number.ts"],"names":[],"mappings":"AAcA;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc,EAAE,UAA2B,EAAE;;IACpE,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC7B,OAAO,KAAK,CAAC;KACd;IAED,IAAI,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,CAAC,QAAQ,EAAE;QAC7C,OAAO,MAAA,OAAO,CAAC,aAAa,mCAAI,KAAK,CAAC;KACvC;IAED,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;QACvB,OAAO,MAAA,OAAO,CAAC,QAAQ,mCAAI,KAAK,CAAC;KAClC;IAED,IAAI,OAAO,CAAC,gBAAgB,KAAK,SAAS,EAAE;QAC1C,IAAI,aAAa,GAAG,CAAC,CAAC;QACtB,IAAI,KAAK,GAAG,CAAC,KAAK,CAAC,EAAE;YACnB,aAAa,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAE,CAAC,CAAE,CAAC,MAAM,CAAC;SACzD;QACD,IAAI,aAAa,GAAG,OAAO,CAAC,gBAAgB,EAAE;YAC5C,OAAO,KAAK,CAAC;SACd;KACF;IAED,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAChC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAC,OAAwB;IAC/C,IAAI,OAAO,CAAC,KAAK,KAAK,IAAI,EAAE;QAC1B,OAAO,IAAI,CAAC;KACb;IACD,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE;QAChC,OAAO,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,4CAA4C,EAAE,MAAM,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;KACxG;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,EAAE,OAAO,EAAE,OAAO,KAAsD,EAAE;IAClG,OAAO,CAAC,OAAwB,EAA2B,EAAE;QAC3D,IAAI,OAAO,CAAC,KAAK,KAAK,IAAI,EAAE;YAC1B,OAAO,IAAI,CAAC;SACb;QACD,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE;YACrC,OAAO;gBACL,QAAQ,EAAE;oBACR,QAAQ,EAAE,gBAAgB;oBAC1B,MAAM,EAAI,OAAO,CAAC,KAAK;oBACvB,OAAO;iBACR;aACF,CAAC;SACH;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import {\n AbstractControl,\n ValidationErrors\n} from '@angular/forms';\n\n/**\n * Options to be passed to IsNumber decorator.\n */\nexport interface IsNumberOptions {\n allowNaN?: boolean;\n allowInfinity?: boolean;\n maxDecimalPlaces?: number;\n}\n\n/**\n * Checks if a given value is a number.\n */\nexport function isNumber(value: unknown, options: IsNumberOptions = {}): value is number {\n if (typeof value !== 'number') {\n return false;\n }\n\n if (value === Infinity || value === -Infinity) {\n return options.allowInfinity ?? false;\n }\n\n if (Number.isNaN(value)) {\n return options.allowNaN ?? false;\n }\n\n if (options.maxDecimalPlaces !== undefined) {\n let decimalPlaces = 0;\n if (value % 1 !== 0) {\n decimalPlaces = value.toString().split('.')[ 1 ].length;\n }\n if (decimalPlaces > options.maxDecimalPlaces) {\n return false;\n }\n }\n\n return Number.isFinite(value);\n}\n\n/**\n * @deprecated use RxapValidators.isNumber() instead\n * @param control\n * @constructor\n */\nexport function IsNumber(control: AbstractControl): ValidationErrors | null {\n if (control.value === null) {\n return null;\n }\n if (isNaN(Number(control.value))) {\n return { isNumber: { expected: 'A number or a string representing a number', actual: control.value } };\n }\n return null;\n}\n\nexport function _IsNumber({ message, options }: { message?: string, options?: IsNumberOptions } = {}) {\n return (control: AbstractControl): ValidationErrors | null => {\n if (control.value === null) {\n return null;\n }\n if (!isNumber(control.value, options)) {\n return {\n isNumber: {\n expected: 'A number value',\n actual: control.value,\n message\n }\n };\n }\n return null;\n };\n}\n"]}
1
+ {"version":3,"file":"is-number.js","sourceRoot":"","sources":["../../../../../../libs/forms/src/lib/validators/is-number.ts"],"names":[],"mappings":"AAeA;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc,EAAE,UAA2B,EAAE;;IACpE,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC7B,OAAO,KAAK,CAAC;KACd;IAED,IAAI,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,CAAC,QAAQ,EAAE;QAC7C,OAAO,MAAA,OAAO,CAAC,aAAa,mCAAI,KAAK,CAAC;KACvC;IAED,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;QACvB,OAAO,MAAA,OAAO,CAAC,QAAQ,mCAAI,KAAK,CAAC;KAClC;IAED,IAAI,OAAO,CAAC,gBAAgB,KAAK,SAAS,EAAE;QAC1C,IAAI,aAAa,GAAG,CAAC,CAAC;QACtB,IAAI,KAAK,GAAG,CAAC,KAAK,CAAC,EAAE;YACnB,aAAa,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAE,CAAC,CAAE,CAAC,MAAM,CAAC;SACzD;QACD,IAAI,aAAa,GAAG,OAAO,CAAC,gBAAgB,EAAE;YAC5C,OAAO,KAAK,CAAC;SACd;KACF;IAED,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAChC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAC,OAAwB;IAC/C,IAAI,OAAO,CAAC,KAAK,KAAK,IAAI,EAAE;QAC1B,OAAO,IAAI,CAAC;KACb;IACD,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE;QAChC,OAAO,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,4CAA4C,EAAE,MAAM,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;KACxG;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,EAAE,OAAO,EAAE,OAAO,KAAsD,EAAE;IAClG,OAAO,CAAC,OAAwB,EAA2B,EAAE;QAC3D,IAAI,OAAO,CAAC,KAAK,KAAK,IAAI,EAAE;YAC1B,OAAO,IAAI,CAAC;SACb;QACD,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,CAAA,IAAI,OAAO,OAAO,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE;YACrH,OAAO;gBACL,QAAQ,EAAE;oBACR,QAAQ,EAAE,gBAAgB;oBAC1B,MAAM,EAAI,OAAO,CAAC,KAAK;oBACvB,OAAO;iBACR;aACF,CAAC;SACH;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import {\n AbstractControl,\n ValidationErrors\n} from '@angular/forms';\n\n/**\n * Options to be passed to IsNumber decorator.\n */\nexport interface IsNumberOptions {\n allowNaN?: boolean;\n allowInfinity?: boolean;\n maxDecimalPlaces?: number;\n strict?: boolean;\n}\n\n/**\n * Checks if a given value is a number.\n */\nexport function isNumber(value: unknown, options: IsNumberOptions = {}): value is number {\n if (typeof value !== 'number') {\n return false;\n }\n\n if (value === Infinity || value === -Infinity) {\n return options.allowInfinity ?? false;\n }\n\n if (Number.isNaN(value)) {\n return options.allowNaN ?? false;\n }\n\n if (options.maxDecimalPlaces !== undefined) {\n let decimalPlaces = 0;\n if (value % 1 !== 0) {\n decimalPlaces = value.toString().split('.')[ 1 ].length;\n }\n if (decimalPlaces > options.maxDecimalPlaces) {\n return false;\n }\n }\n\n return Number.isFinite(value);\n}\n\n/**\n * @deprecated use RxapValidators.isNumber() instead\n * @param control\n * @constructor\n */\nexport function IsNumber(control: AbstractControl): ValidationErrors | null {\n if (control.value === null) {\n return null;\n }\n if (isNaN(Number(control.value))) {\n return { isNumber: { expected: 'A number or a string representing a number', actual: control.value } };\n }\n return null;\n}\n\nexport function _IsNumber({ message, options }: { message?: string, options?: IsNumberOptions } = {}) {\n return (control: AbstractControl): ValidationErrors | null => {\n if (control.value === null) {\n return null;\n }\n if (!isNumber(!options?.strict && typeof control.value === 'string' ? Number(control.value) : control.value, options)) {\n return {\n isNumber: {\n expected: 'A number value',\n actual: control.value,\n message\n }\n };\n }\n return null;\n };\n}\n"]}
@@ -749,7 +749,7 @@ class RxapFormBuilder {
749
749
  }
750
750
  buildArrayControls(builderFormState, form, controls) {
751
751
  for (const [controlId, options] of this.formArrayControls.entries()) {
752
- const formState = this.coerceToControlFormState(controlId, [], builderFormState, options.state);
752
+ const formState = this.coerceToArrayFormState(controlId, [], builderFormState, options.state);
753
753
  assertIsArray(formState);
754
754
  const formControls = formState.map((fs, index) => new RxapFormControl(fs, { controlId: index.toFixed(0) }));
755
755
  const manager = new FormArrayControlManager(form, controlId);
@@ -766,7 +766,7 @@ class RxapFormBuilder {
766
766
  }
767
767
  buildArrayGroups(builderFormState, form, controls) {
768
768
  for (const [controlId, options] of this.formArrayGroups.entries()) {
769
- const formState = this.coerceToControlFormState(controlId, [], builderFormState, options.state);
769
+ const formState = this.coerceToArrayFormState(controlId, [], builderFormState, options.state);
770
770
  assertIsArray(formState);
771
771
  const formGroupBuilder = new RxapFormBuilder(options.definition, this.injector, this.providers);
772
772
  // TODO : add the formGroupOptions property. To definition of the form group options
@@ -783,7 +783,7 @@ class RxapFormBuilder {
783
783
  }
784
784
  buildGroups(builderFormState, form, controls) {
785
785
  for (const [controlId, options] of this.formGroups.entries()) {
786
- const formState = this.coerceToControlFormState(controlId, {}, builderFormState, options.state);
786
+ const formState = this.coerceToGroupFormState(controlId, {}, builderFormState, options.state);
787
787
  assertIsObject(formState);
788
788
  const formGroupDefinition = new RxapFormBuilder(options.definition, this.injector, this.providers).build(formState, Object.assign(Object.assign({}, options), { validators: [], asyncValidators: [] }));
789
789
  controls[controlId] = formGroupDefinition.rxapFormGroup;
@@ -894,6 +894,68 @@ class RxapFormBuilder {
894
894
  }
895
895
  return formState;
896
896
  }
897
+ /**
898
+ * Coerce to the form state for the specified controlId. If none form state is
899
+ * found the default form state will be returned.
900
+ *
901
+ * The difference to the method coerceToControlFormState is that null will be
902
+ * handled as undefined and the defaultFormState is used
903
+ *
904
+ * @param controlId A control id
905
+ * @param defaultFormState The default form state
906
+ * @param builderFormState The form state provides as build state parameter
907
+ * @param optionsFormState The form state set by the decorator in the form definition
908
+ */
909
+ coerceToGroupFormState(controlId, defaultFormState, builderFormState, optionsFormState) {
910
+ let formState = defaultFormState;
911
+ if (builderFormState && builderFormState[controlId]) {
912
+ formState = builderFormState[controlId];
913
+ }
914
+ else if (optionsFormState) {
915
+ formState = optionsFormState;
916
+ }
917
+ if (typeof formState === 'function') {
918
+ formState = formState();
919
+ if (!formState) {
920
+ throw new Error(`The form state function for the form group '${controlId}' returns a empty value (null/undefined)`);
921
+ }
922
+ if (typeof formState !== 'object') {
923
+ throw new Error(`The form state function for the form group '${controlId}' returns a non object like value instead '${typeof formState}'`);
924
+ }
925
+ }
926
+ return formState;
927
+ }
928
+ /**
929
+ * Coerce to the form state for the specified controlId. If none form state is
930
+ * found the default form state will be returned.
931
+ *
932
+ * The difference to the method coerceToControlFormState is that null will be
933
+ * handled as undefined and the defaultFormState is used
934
+ *
935
+ * @param controlId A control id
936
+ * @param defaultFormState The default form state
937
+ * @param builderFormState The form state provides as build state parameter
938
+ * @param optionsFormState The form state set by the decorator in the form definition
939
+ */
940
+ coerceToArrayFormState(controlId, defaultFormState, builderFormState, optionsFormState) {
941
+ let formState = defaultFormState;
942
+ if (builderFormState && builderFormState[controlId] && Array.isArray(builderFormState[controlId])) {
943
+ formState = builderFormState[controlId];
944
+ }
945
+ else if (optionsFormState && Array.isArray(optionsFormState)) {
946
+ formState = optionsFormState;
947
+ }
948
+ if (typeof formState === 'function') {
949
+ formState = formState();
950
+ if (!formState) {
951
+ throw new Error(`The form state function for the form array '${controlId}' returns a empty value (null/undefined)`);
952
+ }
953
+ if (!Array.isArray(formState)) {
954
+ throw new Error(`The form state function for the form array '${controlId}' returns a non array like value instead '${typeof formState}'`);
955
+ }
956
+ }
957
+ return formState;
958
+ }
897
959
  extractControlChanges() {
898
960
  var _a;
899
961
  return ((_a = getMetadata(MetadataKeys.CONTROL_CHANGES, this.definition.prototype)) !== null && _a !== void 0 ? _a : new Map());
@@ -1058,6 +1120,7 @@ class FormDirective extends FormGroupDirective {
1058
1120
  */
1059
1121
  this.rxapSubmit = new EventEmitter();
1060
1122
  this.invalidSubmit = new EventEmitter();
1123
+ this.submitSuccessful$ = new EventEmitter();
1061
1124
  this.submitting$ = new ToggleSubject();
1062
1125
  this.submitError$ = new BehaviorSubject(null);
1063
1126
  this.loading$ = new ToggleSubject();
@@ -1315,6 +1378,7 @@ class FormDirective extends FormGroupDirective {
1315
1378
  }
1316
1379
  }
1317
1380
  submitSuccessful(value) {
1381
+ this.submitSuccessful$.next(value);
1318
1382
  if (this.submitSuccessfulMethod) {
1319
1383
  this.submitSuccessfulMethod.call(value);
1320
1384
  }
@@ -1336,7 +1400,7 @@ class FormDirective extends FormGroupDirective {
1336
1400
  }
1337
1401
  }
1338
1402
  FormDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", 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 });
1339
- FormDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", 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" }, 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: [
1403
+ FormDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", 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: [
1340
1404
  {
1341
1405
  provide: ControlContainer,
1342
1406
  // ignore coverage
@@ -1502,6 +1566,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
1502
1566
  type: Output
1503
1567
  }], invalidSubmit: [{
1504
1568
  type: Output
1569
+ }], submitSuccessful$: [{
1570
+ type: Output,
1571
+ args: ['submitSuccessful']
1505
1572
  }], submitting: [{
1506
1573
  type: HostBinding,
1507
1574
  args: ['class.rxap-submitting']
@@ -2067,6 +2134,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
2067
2134
  }]
2068
2135
  }] });
2069
2136
 
2137
+ class FormSubmitSuccessfulDirective {
2138
+ constructor(formDirective, template, viewContainerRef) {
2139
+ this.formDirective = formDirective;
2140
+ this.template = template;
2141
+ this.viewContainerRef = viewContainerRef;
2142
+ }
2143
+ ngAfterViewInit() {
2144
+ this.subscription = this.formDirective.submitSuccessful$.pipe(tap(result => {
2145
+ this.viewContainerRef.clear();
2146
+ this.viewContainerRef.createEmbeddedView(this.template, { $implicit: result });
2147
+ })).subscribe();
2148
+ }
2149
+ ngOnDestroy() {
2150
+ var _a;
2151
+ (_a = this.subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
2152
+ }
2153
+ }
2154
+ FormSubmitSuccessfulDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: FormSubmitSuccessfulDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
2155
+ FormSubmitSuccessfulDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: FormSubmitSuccessfulDirective, selector: "[rxapFormSubmitSuccessful]", ngImport: i0 });
2156
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: FormSubmitSuccessfulDirective, decorators: [{
2157
+ type: Directive,
2158
+ args: [{
2159
+ selector: '[rxapFormSubmitSuccessful]'
2160
+ }]
2161
+ }], ctorParameters: function () { return [{ type: FormDirective, decorators: [{
2162
+ type: Inject,
2163
+ args: [FormDirective]
2164
+ }] }, { type: i0.TemplateRef, decorators: [{
2165
+ type: Inject,
2166
+ args: [TemplateRef]
2167
+ }] }, { type: i0.ViewContainerRef, decorators: [{
2168
+ type: Inject,
2169
+ args: [ViewContainerRef]
2170
+ }] }]; } });
2171
+
2070
2172
  class RxapFormsModule {
2071
2173
  }
2072
2174
  RxapFormsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RxapFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
@@ -2084,7 +2186,8 @@ RxapFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version
2084
2186
  FormSubmitDirective,
2085
2187
  FormGroupNameDirective,
2086
2188
  FormControlNameDirective,
2087
- ParentControlContainerDirective], exports: [FormDirective,
2189
+ ParentControlContainerDirective,
2190
+ FormSubmitSuccessfulDirective], exports: [FormDirective,
2088
2191
  FormSubmitFailedDirective,
2089
2192
  FormLoadingDirective,
2090
2193
  FormSubmittingDirective,
@@ -2098,7 +2201,8 @@ RxapFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version
2098
2201
  FormSubmitDirective,
2099
2202
  FormGroupNameDirective,
2100
2203
  FormControlNameDirective,
2101
- ParentControlContainerDirective] });
2204
+ ParentControlContainerDirective,
2205
+ FormSubmitSuccessfulDirective] });
2102
2206
  RxapFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RxapFormsModule });
2103
2207
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RxapFormsModule, decorators: [{
2104
2208
  type: NgModule,
@@ -2118,7 +2222,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
2118
2222
  FormSubmitDirective,
2119
2223
  FormGroupNameDirective,
2120
2224
  FormControlNameDirective,
2121
- ParentControlContainerDirective
2225
+ ParentControlContainerDirective,
2226
+ FormSubmitSuccessfulDirective,
2122
2227
  ],
2123
2228
  exports: [
2124
2229
  FormDirective,
@@ -2135,7 +2240,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
2135
2240
  FormSubmitDirective,
2136
2241
  FormGroupNameDirective,
2137
2242
  FormControlNameDirective,
2138
- ParentControlContainerDirective
2243
+ ParentControlContainerDirective,
2244
+ FormSubmitSuccessfulDirective,
2139
2245
  ]
2140
2246
  }]
2141
2247
  }] });
@@ -2196,7 +2302,7 @@ function _IsNumber({ message, options } = {}) {
2196
2302
  if (control.value === null) {
2197
2303
  return null;
2198
2304
  }
2199
- if (!isNumber(control.value, options)) {
2305
+ if (!isNumber(!(options === null || options === void 0 ? void 0 : options.strict) && typeof control.value === 'string' ? Number(control.value) : control.value, options)) {
2200
2306
  return {
2201
2307
  isNumber: {
2202
2308
  expected: 'A number value',
@@ -2514,5 +2620,5 @@ const RxapValidators = {
2514
2620
  * Generated bundle index. Do not edit.
2515
2621
  */
2516
2622
 
2517
- export { ControlAsyncValidator, ControlChange, ControlSetValue, ControlValidator, ControlValueAccessor, FormArrayControlManager, FormControlErrorDirective, FormControlMarkDirtyDirective, FormControlMarkPristineDirective, FormControlMarkTouchedDirective, FormControlMarkUntouchedDirective, FormControlNameDirective, FormDirective, FormGroupNameDirective, FormLoadedDirective, FormLoadingDirective, FormLoadingErrorDirective, FormSubmitDirective, FormSubmitFailedDirective, 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 };
2623
+ export { ControlAsyncValidator, ControlChange, ControlSetValue, ControlValidator, ControlValueAccessor, FormArrayControlManager, FormControlErrorDirective, FormControlMarkDirtyDirective, FormControlMarkPristineDirective, FormControlMarkTouchedDirective, FormControlMarkUntouchedDirective, FormControlNameDirective, FormDirective, FormGroupNameDirective, FormLoadedDirective, FormLoadingDirective, FormLoadingErrorDirective, FormSubmitDirective, FormSubmitFailedDirective, 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 };
2518
2624
  //# sourceMappingURL=rxap-forms.js.map