@reactables/forms 0.4.0-alpha.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.
Files changed (63) hide show
  1. package/README.md +15 -0
  2. package/dist/Helpers/FormBuilder.d.ts +10 -0
  3. package/dist/Helpers/addAsyncValidationEffects.d.ts +5 -0
  4. package/dist/Helpers/buildFormState.d.ts +5 -0
  5. package/dist/Helpers/buildHub2Source.d.ts +4 -0
  6. package/dist/Helpers/generateKey.d.ts +1 -0
  7. package/dist/Helpers/getAncestorControls.d.ts +3 -0
  8. package/dist/Helpers/getAncestorControls.test.d.ts +1 -0
  9. package/dist/Helpers/getArrayItems.d.ts +3 -0
  10. package/dist/Helpers/getArrayItems.test.d.ts +1 -0
  11. package/dist/Helpers/getControl.d.ts +3 -0
  12. package/dist/Helpers/getControlBranch.d.ts +3 -0
  13. package/dist/Helpers/getControlBranch.test.d.ts +1 -0
  14. package/dist/Helpers/getDescendantControls.d.ts +3 -0
  15. package/dist/Helpers/getDescendantControls.test.d.ts +1 -0
  16. package/dist/Helpers/getFormKey.d.ts +2 -0
  17. package/dist/Helpers/getValueFromControlConfig.d.ts +2 -0
  18. package/dist/Helpers/getValueFromControlConfig.test.d.ts +1 -0
  19. package/dist/Helpers/index.d.ts +1 -0
  20. package/dist/Helpers/isChildRef.d.ts +2 -0
  21. package/dist/Models/Configs.d.ts +22 -0
  22. package/dist/Models/ControlRef.d.ts +1 -0
  23. package/dist/Models/Controls.d.ts +44 -0
  24. package/dist/Models/FormErrors.d.ts +3 -0
  25. package/dist/Models/Payloads.d.ts +20 -0
  26. package/dist/Models/Validators.d.ts +5 -0
  27. package/dist/Models/index.d.ts +6 -0
  28. package/dist/Reducers/Hub1/addControl.d.ts +4 -0
  29. package/dist/Reducers/Hub1/index.d.ts +9 -0
  30. package/dist/Reducers/Hub1/markControlAsPristine.d.ts +4 -0
  31. package/dist/Reducers/Hub1/markControlAsTouched.d.ts +4 -0
  32. package/dist/Reducers/Hub1/markControlAsUntouched.d.ts +4 -0
  33. package/dist/Reducers/Hub1/removeControl.d.ts +4 -0
  34. package/dist/Reducers/Hub1/resetControl.d.ts +4 -0
  35. package/dist/Reducers/Hub1/syncValidate.d.ts +2 -0
  36. package/dist/Reducers/Hub1/syncValidate.test.d.ts +1 -0
  37. package/dist/Reducers/Hub1/updateAncestorPristineValues.d.ts +5 -0
  38. package/dist/Reducers/Hub1/updateAncestorValues.d.ts +5 -0
  39. package/dist/Reducers/Hub1/updateDirty.d.ts +2 -0
  40. package/dist/Reducers/Hub1/updateDirty.test.d.ts +1 -0
  41. package/dist/Reducers/Hub1/updateValues.d.ts +4 -0
  42. package/dist/Reducers/Hub2/asyncValidation.d.ts +4 -0
  43. package/dist/Reducers/Hub2/asyncValidationResponseSuccess.d.ts +4 -0
  44. package/dist/Reducers/Hub2/formChange.d.ts +4 -0
  45. package/dist/Reducers/Hub2/hub2Reducer.d.ts +3 -0
  46. package/dist/Reducers/Hub2/index.d.ts +3 -0
  47. package/dist/Reducers/Hub2/mergeErrors.d.ts +2 -0
  48. package/dist/Reducers/index.d.ts +2 -0
  49. package/dist/RxForm/RxForm.d.ts +23 -0
  50. package/dist/RxForm/RxForm.test.d.ts +1 -0
  51. package/dist/RxForm/index.d.ts +1 -0
  52. package/dist/Testing/AsyncValidators.d.ts +6 -0
  53. package/dist/Testing/Effects.d.ts +10 -0
  54. package/dist/Testing/Models/Contact.d.ts +11 -0
  55. package/dist/Testing/Models/DoctorInfo.d.ts +6 -0
  56. package/dist/Testing/Models/EmergencyContact.d.ts +6 -0
  57. package/dist/Testing/asyncConfig.d.ts +11 -0
  58. package/dist/Testing/config.d.ts +11 -0
  59. package/dist/Validators/Validators.d.ts +4 -0
  60. package/dist/Validators/index.d.ts +1 -0
  61. package/dist/index.d.ts +4 -0
  62. package/dist/index.js +763 -0
  63. package/package.json +25 -0
package/README.md ADDED
@@ -0,0 +1,15 @@
1
+ # Reactable Forms (WIP)
2
+
3
+ ## Description
4
+
5
+ State management for building a comprehensive form library using [Reactables Core](https://github.com/reactables/reactables/tree/main/packages/core).
6
+
7
+ ## Architecture (WIP see https://github.com/reactables/reactables/issues/8)
8
+
9
+ The following diagram visualizes the architecture of [Reactables Forms](https://github.com/reactables/reactables/tree/main/packages/forms) - a state management model for building reactive forms.
10
+
11
+ There are two sets of hub and stores. The first set is responsible for handling user input and updating the form.
12
+
13
+ The second set is responsible for reacting to the form change in the first store and asynchronous validation.
14
+
15
+ ![Reactables architecture](https://raw.githubusercontent.com/reactables/reactables/main/documentation/Slide10ReactablesForms.jpg)
@@ -0,0 +1,10 @@
1
+ import { FormControlConfig, FormArrayConfig, FormGroupConfig, AbstractControlConfig } from '../Models/Configs';
2
+ import { ValidatorFn, ValidatorAsyncFn } from '../Models/Validators';
3
+ type FbControl<T> = [T, (ValidatorFn | ValidatorFn[])?, (ValidatorAsyncFn | ValidatorAsyncFn[])?];
4
+ export declare const FormBuilder: {
5
+ control: <T>(config: FormControlConfig<T> | FbControl<T>) => FormControlConfig<T>;
6
+ array: (config: FormArrayConfig) => FormArrayConfig;
7
+ group: (config: FormGroupConfig) => FormGroupConfig;
8
+ build: (config: AbstractControlConfig, hub?: any) => any;
9
+ };
10
+ export {};
@@ -0,0 +1,5 @@
1
+ import { Action, Effect } from '@reactables/core';
2
+ import { BaseControl } from '../Models/Controls';
3
+ import { ControlAsyncValidationResponse } from '../Models/Payloads';
4
+ export declare const getScopedEffectsForControl: <T>(formControl: BaseControl<T>) => Effect<BaseControl<T>, ControlAsyncValidationResponse>[];
5
+ export declare const getAsyncValidationActions: (formControls: BaseControl<unknown>[]) => Action<BaseControl<unknown>>[];
@@ -0,0 +1,5 @@
1
+ import { AbstractControlConfig } from '../Models/Configs';
2
+ import { BaseForm, BaseFormState } from '../Models/Controls';
3
+ import { ControlRef } from '../Models/ControlRef';
4
+ export declare const buildState: <T>(config: AbstractControlConfig, form?: BaseForm<T>, controlRef?: ControlRef) => BaseForm<T>;
5
+ export declare const buildFormState: <T>(config: AbstractControlConfig, form?: BaseForm<T>, controlRef?: ControlRef) => BaseFormState<T>;
@@ -0,0 +1,4 @@
1
+ import { Observable } from 'rxjs';
2
+ import { Action, Reactable } from '@reactables/core';
3
+ import { BaseFormState } from '../Models/Controls';
4
+ export declare const buildHub2Source: <T, S>(rx: Reactable<BaseFormState<T>, S>) => Observable<Action<T>>;
@@ -0,0 +1 @@
1
+ export declare const generateKey: (length: number) => string;
@@ -0,0 +1,3 @@
1
+ import { BaseControl, BaseForm, Form, FormControl } from '../Models/Controls';
2
+ import { ControlRef } from '../Models/ControlRef';
3
+ export declare const getAncestorControls: <T extends BaseForm<unknown> | Form<unknown>>(controlRef: ControlRef, form: T, excludeSelf?: boolean) => (T extends Form<unknown> ? FormControl<unknown> : BaseControl<unknown>)[];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { FormControl, Form, BaseForm, BaseControl } from '../Models/Controls';
2
+ import { ControlRef } from '../Models/ControlRef';
3
+ export declare const getArrayItems: <T extends BaseForm<unknown> | Form<unknown>>(controlRef: ControlRef, form: T) => T extends BaseForm<unknown> ? BaseControl<unknown>[] : FormControl<unknown>[];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { BaseForm, Form, BaseControl, FormControl } from '../Models/Controls';
2
+ import { ControlRef } from '../Models/ControlRef';
3
+ export declare const getControl: <T extends BaseForm<unknown> | Form<unknown>>(controlRef: ControlRef, form: T) => T extends BaseForm<unknown> ? BaseControl<unknown> : FormControl<unknown>;
@@ -0,0 +1,3 @@
1
+ import { ControlRef } from '../Models/ControlRef';
2
+ import { BaseControl, FormControl, BaseForm, Form } from '../Models/Controls';
3
+ export declare const getControlBranch: <T extends BaseForm<unknown> | Form<unknown>>(controlRef: ControlRef, form: T) => (T extends Form<unknown> ? FormControl<unknown> : BaseControl<unknown>)[];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { BaseControl, FormControl, BaseForm, Form } from '../Models/Controls';
2
+ import { ControlRef } from '../Models/ControlRef';
3
+ export declare const getDescendantControls: <T extends BaseForm<unknown> | Form<unknown>>(controlRef: ControlRef, form: T, excludeSelf?: boolean) => (T extends Form<unknown> ? FormControl<unknown> : BaseControl<unknown>)[];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import { ControlRef } from '../Models';
2
+ export declare const getFormKey: (controlRef: ControlRef) => string;
@@ -0,0 +1,2 @@
1
+ import { AbstractControlConfig } from '../Models/Configs';
2
+ export declare const getValueFromControlConfig: <T>(controlConfig: AbstractControlConfig) => T;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export { getArrayItems } from './getArrayItems';
@@ -0,0 +1,2 @@
1
+ import { ControlRef } from '../Models/ControlRef';
2
+ export declare const isChildRef: (controlRef: ControlRef, parentRef: ControlRef) => boolean;
@@ -0,0 +1,22 @@
1
+ import { ValidatorFn, ValidatorAsyncFn } from './Validators';
2
+ interface ValidatorConfigs {
3
+ validators?: ValidatorFn[];
4
+ asyncValidators?: ValidatorAsyncFn[];
5
+ }
6
+ export interface FormGroupConfig extends ValidatorConfigs {
7
+ controls: {
8
+ [key: string]: AbstractControlConfig;
9
+ };
10
+ }
11
+ export interface FormArrayConfig extends ValidatorConfigs {
12
+ controls: AbstractControlConfig[];
13
+ }
14
+ export interface FormControlConfig<T> extends ValidatorConfigs {
15
+ initialValue: T;
16
+ }
17
+ export type AbstractControlConfig = (FormControlConfig<unknown> | FormArrayConfig | FormGroupConfig) & {
18
+ controls?: AbstractControlConfig[] | {
19
+ [key: string]: AbstractControlConfig;
20
+ };
21
+ };
22
+ export {};
@@ -0,0 +1 @@
1
+ export type ControlRef = (string | number)[];
@@ -0,0 +1,44 @@
1
+ import { Action } from '@reactables/core';
2
+ import { AbstractControlConfig } from './Configs';
3
+ import { FormErrors } from './FormErrors';
4
+ import { ControlRef } from './ControlRef';
5
+ export interface BaseControl<T> {
6
+ pristineValue: T;
7
+ controlRef: ControlRef;
8
+ value: T;
9
+ dirty: boolean;
10
+ touched: boolean;
11
+ validatorErrors: FormErrors;
12
+ validatorsValid: boolean;
13
+ config: AbstractControlConfig;
14
+ key: string;
15
+ }
16
+ interface AsyncFields {
17
+ asyncValidatorsValid: boolean;
18
+ asyncValidatorErrors: FormErrors;
19
+ asyncValidateInProgress: {
20
+ [key: string | number]: boolean;
21
+ };
22
+ pending?: boolean;
23
+ }
24
+ interface ValidatedFields {
25
+ valid: boolean;
26
+ errors: FormErrors;
27
+ }
28
+ export interface Hub2Fields extends AsyncFields, ValidatedFields {
29
+ }
30
+ export interface FormControl<T> extends BaseControl<T>, Hub2Fields {
31
+ }
32
+ export interface BaseFormState<T> {
33
+ form: BaseForm<T>;
34
+ action: Action<unknown>;
35
+ }
36
+ export interface BaseForm<T> {
37
+ root?: BaseControl<T>;
38
+ [key: string]: BaseControl<unknown>;
39
+ }
40
+ export interface Form<T> {
41
+ root: FormControl<T>;
42
+ [key: string]: FormControl<unknown>;
43
+ }
44
+ export {};
@@ -0,0 +1,3 @@
1
+ export interface FormErrors {
2
+ [key: string]: boolean;
3
+ }
@@ -0,0 +1,20 @@
1
+ import { ControlRef } from './ControlRef';
2
+ import { AbstractControlConfig } from './Configs';
3
+ import { FormErrors } from './FormErrors';
4
+ export interface ControlChange<T> {
5
+ value: T;
6
+ controlRef: ControlRef;
7
+ }
8
+ export interface AddControl {
9
+ config: AbstractControlConfig;
10
+ controlRef: ControlRef;
11
+ }
12
+ export interface ControlAsyncValidationResponse {
13
+ key: string;
14
+ validatorIndex: number;
15
+ errors: FormErrors;
16
+ }
17
+ export interface MarkTouched {
18
+ controlRef: ControlRef;
19
+ markAll?: boolean;
20
+ }
@@ -0,0 +1,5 @@
1
+ import { Observable } from 'rxjs';
2
+ import { BaseAbstractControl } from './Controls';
3
+ import { FormErrors } from './FormErrors';
4
+ export type ValidatorFn = (value: unknown) => FormErrors;
5
+ export type ValidatorAsyncFn = <T>(control$: Observable<BaseAbstractControl<T>>) => Observable<FormErrors>;
@@ -0,0 +1,6 @@
1
+ export { AbstractControlConfig, FormArrayConfig, FormGroupConfig, FormControlConfig, } from './Configs';
2
+ export { ControlRef } from './ControlRef';
3
+ export * as ControlModels from './Controls';
4
+ export { FormErrors } from './FormErrors';
5
+ export { ControlChange, AddControl, ControlAsyncValidationResponse, MarkTouched } from './Payloads';
6
+ export { ValidatorAsyncFn, ValidatorFn } from './Validators';
@@ -0,0 +1,4 @@
1
+ import { Action } from '@reactables/core';
2
+ import { BaseFormState } from '../../Models/Controls';
3
+ import { AddControl } from '../../Models/Payloads';
4
+ export declare const addControl: <T>(state: BaseFormState<T>, action: Action<AddControl>) => BaseFormState<T>;
@@ -0,0 +1,9 @@
1
+ export { markControlAsPristine } from './markControlAsPristine';
2
+ export { markControlAsTouched } from './markControlAsTouched';
3
+ export { markControlAsUntouched } from './markControlAsUntouched';
4
+ export { removeControl } from './removeControl';
5
+ export { resetControl } from './resetControl';
6
+ export { syncValidate } from './syncValidate';
7
+ export { updateDirty } from './updateDirty';
8
+ export { updateValues } from './updateValues';
9
+ export { buildHub1Reducer } from './buildHub1Reducer';
@@ -0,0 +1,4 @@
1
+ import { Action } from '@reactables/core';
2
+ import { BaseFormState } from '../../Models/Controls';
3
+ import { ControlRef } from '../../Models/ControlRef';
4
+ export declare const markControlAsPristine: <T>({ form }: BaseFormState<T>, action: Action<ControlRef>) => BaseFormState<T>;
@@ -0,0 +1,4 @@
1
+ import { Action } from '@reactables/core';
2
+ import { BaseFormState } from '../../Models/Controls';
3
+ import { MarkTouched } from '../../Models/Payloads';
4
+ export declare const markControlAsTouched: <T>({ form }: BaseFormState<T>, action: Action<MarkTouched>) => BaseFormState<T>;
@@ -0,0 +1,4 @@
1
+ import { Action } from '@reactables/core';
2
+ import { BaseFormState } from '../../Models/Controls';
3
+ import { ControlRef } from '../../Models/ControlRef';
4
+ export declare const markControlAsUntouched: <T>({ form }: BaseFormState<T>, action: Action<ControlRef>) => BaseFormState<T>;
@@ -0,0 +1,4 @@
1
+ import { Action } from '@reactables/core';
2
+ import { BaseFormState } from '../../Models/Controls';
3
+ import { ControlRef } from '../../Models/ControlRef';
4
+ export declare const removeControl: <T>({ form }: BaseFormState<T>, action: Action<ControlRef>) => BaseFormState<T>;
@@ -0,0 +1,4 @@
1
+ import { Action } from '@reactables/core';
2
+ import { BaseFormState } from '../../Models/Controls';
3
+ import { ControlRef } from '../../Models/ControlRef';
4
+ export declare const resetControl: <T>({ form }: BaseFormState<T>, action: Action<ControlRef>) => BaseFormState<T>;
@@ -0,0 +1,2 @@
1
+ import { BaseForm } from '../../Models/Controls';
2
+ export declare const syncValidate: <T>(form: BaseForm<T>) => BaseForm<T>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import { Action } from '@reactables/core';
2
+ import { BaseForm } from '../../Models/Controls';
3
+ import { ControlRef } from '../../Models/ControlRef';
4
+ export declare const UPDATE_ANCESTOR_PRISTINE_VALUES = "UPDATE_ANCESTOR_PRISTINE_VALUES";
5
+ export declare const updateAncestorPristineValues: <T>(form: BaseForm<T>, { payload: controlRef }: Action<ControlRef>) => BaseForm<T>;
@@ -0,0 +1,5 @@
1
+ import { Action } from '@reactables/core';
2
+ import { BaseForm } from '../../Models/Controls';
3
+ import { ControlRef } from '../../Models/ControlRef';
4
+ export declare const UPDATE_ANCESTOR_VALUES = "UPDATE_ANCESTOR_VALUES";
5
+ export declare const updateAncestorValues: <T>(form: BaseForm<T>, { payload: controlRef }: Action<ControlRef>) => BaseForm<T>;
@@ -0,0 +1,2 @@
1
+ import { BaseForm } from '../../Models/Controls';
2
+ export declare const updateDirty: <T>(form: BaseForm<T>) => BaseForm<T>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { Action } from '@reactables/core';
2
+ import { BaseFormState } from '../../Models/Controls';
3
+ import { ControlChange } from '../../Models/Payloads';
4
+ export declare const updateValues: <T>({ form }: BaseFormState<T>, action: Action<ControlChange<unknown>>) => BaseFormState<T>;
@@ -0,0 +1,4 @@
1
+ import { Action } from '@reactables/core';
2
+ import { Form } from '../../Models/Controls';
3
+ import { BaseControl } from '../../Models/Controls';
4
+ export declare const asyncValidation: <T>(form: Form<T>, { payload: { controlRef } }: Action<BaseControl<unknown>>) => Form<T>;
@@ -0,0 +1,4 @@
1
+ import { Action } from '@reactables/core';
2
+ import { Form } from '../../Models/Controls';
3
+ import { ControlAsyncValidationResponse } from '../../Models/Payloads';
4
+ export declare const asyncValidationResponseSuccess: <T>(form: Form<T>, { payload: { key, validatorIndex, errors } }: Action<ControlAsyncValidationResponse>) => Form<T>;
@@ -0,0 +1,4 @@
1
+ import { Reducer } from '@reactables/core';
2
+ import { Form, Hub2Fields } from '../../Models/Controls';
3
+ export declare const DEFAULT_HUB2_FIELDS: Hub2Fields;
4
+ export declare const formChange: Reducer<Form<unknown>>;
@@ -0,0 +1,3 @@
1
+ import { Form } from '../../Models/Controls';
2
+ import { Reducer } from '@reactables/core';
3
+ export declare const hub2Reducer: Reducer<Form<unknown>>;
@@ -0,0 +1,3 @@
1
+ export { formChange } from './formChange';
2
+ export { asyncValidation } from './asyncValidation';
3
+ export { asyncValidationResponseSuccess } from './asyncValidationResponseSuccess';
@@ -0,0 +1,2 @@
1
+ import { Form } from '../../Models/Controls';
2
+ export declare const mergeErrors: <T>(form: Form<T>) => Form<T>;
@@ -0,0 +1,2 @@
1
+ export * from './Hub1';
2
+ export * from './Hub2';
@@ -0,0 +1,23 @@
1
+ import { Reactable } from '@reactables/core';
2
+ import { ControlChange, AddControl, MarkTouched } from '../Models/Payloads';
3
+ import { ControlRef } from '../Models';
4
+ import { FormControlConfig, FormArrayConfig, FormGroupConfig, AbstractControlConfig } from '../Models/Configs';
5
+ import { ValidatorFn, ValidatorAsyncFn } from '../Models/Validators';
6
+ import { Form } from '../Models/Controls';
7
+ type FbControl<T> = [T, (ValidatorFn | ValidatorFn[])?, (ValidatorAsyncFn | ValidatorAsyncFn[])?];
8
+ export type RxFormActions = {
9
+ updateValues: <T>(payload: ControlChange<T>) => void;
10
+ addControl: (payload: AddControl) => void;
11
+ removeControl: (payload: ControlRef) => void;
12
+ markControlAsPristine: (payload: ControlRef) => void;
13
+ markControlAsTouched: (payload: MarkTouched) => void;
14
+ markControlAsUntouched: (payload: ControlRef) => void;
15
+ resetControl: (payload: ControlRef) => void;
16
+ };
17
+ export declare const RxForm: {
18
+ group: (config: FormGroupConfig) => FormGroupConfig;
19
+ array: (config: FormArrayConfig) => FormArrayConfig;
20
+ control: <T>(config: FormControlConfig<T> | FbControl<T>) => FormControlConfig<T>;
21
+ build: (config: AbstractControlConfig) => Reactable<Form<unknown>, RxFormActions>;
22
+ };
23
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export { RxForm, RxFormActions } from './RxForm';
@@ -0,0 +1,6 @@
1
+ import { ValidatorAsyncFn } from '../Models/Validators';
2
+ export declare const uniqueEmail: ValidatorAsyncFn;
3
+ export declare const blacklistedEmail: ValidatorAsyncFn;
4
+ export declare const arrayLengthError: ValidatorAsyncFn;
5
+ export declare const uniqueFirstAndLastName: ValidatorAsyncFn;
6
+ export declare const blacklistedDoctorType: ValidatorAsyncFn;
@@ -0,0 +1,10 @@
1
+ import { Observable } from 'rxjs';
2
+ import { Action } from '@reactables/core';
3
+ export declare const switchMapEffect: (action$: Observable<Action<string>>) => Observable<{
4
+ type: any;
5
+ payload: string;
6
+ }>;
7
+ export declare const debounceEffect: (action$: Observable<Action<string>>) => Observable<{
8
+ type: any;
9
+ payload: string;
10
+ }>;
@@ -0,0 +1,11 @@
1
+ import { EmergencyContact } from './EmergencyContact';
2
+ import { DoctorInfo } from './DoctorInfo';
3
+ export interface Contact {
4
+ firstName: string;
5
+ lastName: string;
6
+ email: string;
7
+ phone: string;
8
+ occupation?: string;
9
+ emergencyContacts: EmergencyContact[];
10
+ doctorInfo: DoctorInfo;
11
+ }
@@ -0,0 +1,6 @@
1
+ export interface DoctorInfo {
2
+ firstName: string;
3
+ lastName: string;
4
+ email: string;
5
+ type?: string;
6
+ }
@@ -0,0 +1,6 @@
1
+ export interface EmergencyContact {
2
+ firstName: string;
3
+ lastName: string;
4
+ email: string;
5
+ relation: string;
6
+ }
@@ -0,0 +1,11 @@
1
+ import { FormGroupConfig } from '../Models/Configs';
2
+ interface FullName {
3
+ firstName: string;
4
+ lastName: string;
5
+ }
6
+ export declare const firstNameNotSameAsLast: (value: FullName) => {
7
+ firstNameNotSameAsLast: boolean;
8
+ };
9
+ export declare const asyncEmergencyContactConfigs: FormGroupConfig[];
10
+ export declare const asyncConfig: FormGroupConfig;
11
+ export {};
@@ -0,0 +1,11 @@
1
+ import { FormGroupConfig } from '../Models/Configs';
2
+ interface FullName {
3
+ firstName: string;
4
+ lastName: string;
5
+ }
6
+ export declare const firstNameNotSameAsLast: (value: FullName) => {
7
+ firstNameNotSameAsLast: boolean;
8
+ };
9
+ export declare const emergencyContactConfigs: FormGroupConfig[];
10
+ export declare const config: FormGroupConfig;
11
+ export {};
@@ -0,0 +1,4 @@
1
+ import { ValidatorFn } from '../Models/Validators';
2
+ export declare const required: ValidatorFn;
3
+ export declare const email: ValidatorFn;
4
+ export declare const phoneNumber: ValidatorFn;
@@ -0,0 +1 @@
1
+ export * from './Validators';
@@ -0,0 +1,4 @@
1
+ export * from './Models';
2
+ export * as Validators from './Validators';
3
+ export * from './RxForm';
4
+ export * from './Helpers';