@hievilmath/browser-formidavim 1.6.1 → 1.7.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.
- package/README.md +12 -0
- package/index.js +426 -388
- package/index.mjs +32669 -22795
- package/lib/components/FlowFormRenderer.d.ts +0 -1
- package/lib/components/FlowRenderer.d.ts +1 -2
- package/lib/components/FormComponentRenderer.d.ts +0 -1
- package/lib/components/FormRenderer.d.ts +1 -2
- package/lib/components/Renderer.d.ts +7 -1
- package/lib/components/complex/VouchedSend.d.ts +5 -0
- package/lib/components/inputs/Cookie.d.ts +0 -1
- package/lib/components/inputs/Email.d.ts +0 -1
- package/lib/components/inputs/GAClientId.d.ts +0 -1
- package/lib/components/inputs/Hidden.d.ts +0 -1
- package/lib/components/inputs/Number.d.ts +4 -2
- package/lib/components/inputs/Otp.d.ts +0 -1
- package/lib/components/inputs/Phone.d.ts +0 -1
- package/lib/hooks/useFlowStore.d.ts +5 -0
- package/lib/state/slices/flow.slice.d.ts +17 -2
- package/lib/types/data.d.ts +1 -1
- package/package.json +1 -1
|
@@ -15,7 +15,7 @@ export interface EvaluatedFlowForm extends FlowForm {
|
|
|
15
15
|
evaluatedFormComponents?: EvaluatedFormComponent[];
|
|
16
16
|
}
|
|
17
17
|
export declare const FlowRenderer: FC<{
|
|
18
|
-
flow: Partial<Flow
|
|
18
|
+
flow: Partial<Flow> | null;
|
|
19
19
|
isPreview: boolean;
|
|
20
20
|
$bgColor?: string;
|
|
21
21
|
onSubmit: (data: eventData, shouldRedirect: boolean) => Promise<any>;
|
|
@@ -23,5 +23,4 @@ export declare const FlowRenderer: FC<{
|
|
|
23
23
|
onPrevStep?: (data: eventData) => any;
|
|
24
24
|
onFormInit?: (data: eventData) => any;
|
|
25
25
|
shouldRedirect?: boolean;
|
|
26
|
-
formidavimHost?: string;
|
|
27
26
|
}>;
|
|
@@ -2,8 +2,7 @@ import { FC } from 'react';
|
|
|
2
2
|
import { Form } from '../../../../../axios/formidavim/src/index.ts';
|
|
3
3
|
import { EvaluatedFormComponent } from './FlowRenderer';
|
|
4
4
|
export declare const FormRenderer: FC<{
|
|
5
|
-
form
|
|
5
|
+
form?: Form;
|
|
6
6
|
isPreview: boolean;
|
|
7
7
|
evaluatedFormComponents: EvaluatedFormComponent[];
|
|
8
|
-
formidavimHost?: string;
|
|
9
8
|
}>;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { PatientProfileDto, Flow } from '../../../../../axios/formidavim/src/index.ts';
|
|
2
2
|
import { FC } from 'react';
|
|
3
3
|
import { eventData } from '../types/data';
|
|
4
|
+
interface PatientProfileResponse {
|
|
5
|
+
customerId: Number;
|
|
6
|
+
data: PatientProfileDto;
|
|
7
|
+
version: Date;
|
|
8
|
+
}
|
|
4
9
|
export declare const Renderer: FC<{
|
|
5
|
-
data:
|
|
10
|
+
data: PatientProfileResponse | null;
|
|
6
11
|
config: Partial<Flow>;
|
|
7
12
|
isPreview: boolean;
|
|
8
13
|
onSubmit: (data: eventData, shouldRedirect: boolean) => Promise<any>;
|
|
@@ -13,3 +18,4 @@ export declare const Renderer: FC<{
|
|
|
13
18
|
shouldRedirect?: boolean;
|
|
14
19
|
formidavimHost?: string;
|
|
15
20
|
}>;
|
|
21
|
+
export {};
|
|
@@ -4,9 +4,11 @@ export interface NumberInputProps {
|
|
|
4
4
|
label?: string;
|
|
5
5
|
required: boolean | string;
|
|
6
6
|
propertyId: string;
|
|
7
|
-
max
|
|
8
|
-
min
|
|
7
|
+
max?: number | null | "";
|
|
8
|
+
min?: number | null | "";
|
|
9
9
|
allowLeadingZero?: boolean;
|
|
10
|
+
maxDigits?: number | null | "";
|
|
11
|
+
minDigits?: number | null | "";
|
|
10
12
|
}
|
|
11
13
|
export declare const NumberInput: FC<{
|
|
12
14
|
formComponent: Partial<FormComponent>;
|
|
@@ -3,6 +3,7 @@ import { EvaluatedFormComponent } from '../components/FlowRenderer';
|
|
|
3
3
|
export declare const useFlowStore: () => {
|
|
4
4
|
setFlowValue: (field: string, value: any) => void;
|
|
5
5
|
setFlowValues: (values: Record<string, any>) => void;
|
|
6
|
+
resetFlowInputs: () => void;
|
|
6
7
|
resetAndSetFlowValues: (values: Record<string, any>) => void;
|
|
7
8
|
getFlowValue: (field: string) => any;
|
|
8
9
|
getAllFormData: (currentEvaluatedComponents: EvaluatedFormComponent[]) => Record<string, any>;
|
|
@@ -11,6 +12,8 @@ export declare const useFlowStore: () => {
|
|
|
11
12
|
getFlowError: (field: string) => any;
|
|
12
13
|
setDisableSubmitValue: (disabled: boolean) => void;
|
|
13
14
|
getDisableSubmitValue: () => boolean;
|
|
15
|
+
setManualDisableSubmitValue: (disabled: boolean) => void;
|
|
16
|
+
getManualDisableSubmitValue: () => boolean;
|
|
14
17
|
setPatientValue: (field: string, value: any) => void;
|
|
15
18
|
setPatientValues: (profile: any) => void;
|
|
16
19
|
getPatientValue: (field: string) => string | undefined;
|
|
@@ -19,6 +22,8 @@ export declare const useFlowStore: () => {
|
|
|
19
22
|
getCurrentFlowValue: () => Partial<Flow>;
|
|
20
23
|
setCurrentFormValue: (form: any) => void;
|
|
21
24
|
getCurrentFormValue: () => Partial<import('../../../../../axios/formidavim/src/index.ts').Form>;
|
|
25
|
+
getFormidavimHost: () => string | undefined;
|
|
26
|
+
setFormidavimHostValue: (host: string | undefined) => void;
|
|
22
27
|
setFlowAndPatientValue: (field: string, value: any) => void;
|
|
23
28
|
generateFormDataFromFlow: (flow: Partial<Flow>) => Record<string, any>;
|
|
24
29
|
};
|
|
@@ -4,8 +4,10 @@ export interface FlowSliceState {
|
|
|
4
4
|
inputValues: Record<string, any>;
|
|
5
5
|
inputErrors: Record<string, any>;
|
|
6
6
|
disableSubmit: boolean;
|
|
7
|
+
manualDisableSubmit: boolean;
|
|
7
8
|
currentFlow: Partial<Flow>;
|
|
8
9
|
currentForm: Partial<Form>;
|
|
10
|
+
formidavimHost?: string;
|
|
9
11
|
}
|
|
10
12
|
export declare const flowSlice: import('@reduxjs/toolkit').Slice<FlowSliceState, {
|
|
11
13
|
setInputValue: (state: import('immer').WritableDraft<FlowSliceState>, action: PayloadAction<{
|
|
@@ -13,28 +15,33 @@ export declare const flowSlice: import('@reduxjs/toolkit').Slice<FlowSliceState,
|
|
|
13
15
|
value: any;
|
|
14
16
|
}>) => void;
|
|
15
17
|
setInputValues: (state: import('immer').WritableDraft<FlowSliceState>, action: PayloadAction<Record<string, any>>) => void;
|
|
18
|
+
resetInputValues: (state: import('immer').WritableDraft<FlowSliceState>) => void;
|
|
16
19
|
resetAndSetInputValues: (state: import('immer').WritableDraft<FlowSliceState>, action: PayloadAction<Record<string, any>>) => void;
|
|
17
20
|
setInputError: (state: import('immer').WritableDraft<FlowSliceState>, action: PayloadAction<{
|
|
18
21
|
field: string;
|
|
19
22
|
error: string | null;
|
|
20
23
|
}>) => void;
|
|
21
24
|
setDisableSubmit: (state: import('immer').WritableDraft<FlowSliceState>, action: PayloadAction<boolean>) => void;
|
|
25
|
+
setManualDisableSubmit: (state: import('immer').WritableDraft<FlowSliceState>, action: PayloadAction<boolean>) => void;
|
|
22
26
|
setCurrentFlow: (state: import('immer').WritableDraft<FlowSliceState>, action: PayloadAction<Partial<Flow>>) => void;
|
|
23
27
|
setCurrentForm: (state: import('immer').WritableDraft<FlowSliceState>, action: PayloadAction<Partial<Form>>) => void;
|
|
28
|
+
setFormidavimHost: (state: import('immer').WritableDraft<FlowSliceState>, action: PayloadAction<string | undefined>) => void;
|
|
24
29
|
}, "flow", "flow", {
|
|
25
30
|
selectInputValues: (state: FlowSliceState) => Record<string, any>;
|
|
26
31
|
selectInputErrors: (state: FlowSliceState) => Record<string, any>;
|
|
27
32
|
selectDisableSubmit: (state: FlowSliceState) => boolean;
|
|
33
|
+
selectManualDisableSubmit: (state: FlowSliceState) => boolean;
|
|
28
34
|
selectCurrentFlow: (state: FlowSliceState) => Partial<Flow>;
|
|
29
35
|
selectCurrentForm: (state: FlowSliceState) => Partial<Form>;
|
|
36
|
+
selectFormidavimHost: (state: FlowSliceState) => string | undefined;
|
|
30
37
|
}>;
|
|
31
38
|
export declare const setInputValue: import('@reduxjs/toolkit').ActionCreatorWithPayload<{
|
|
32
39
|
field: string;
|
|
33
40
|
value: any;
|
|
34
|
-
}, "flow/setInputValue">, setInputValues: import('@reduxjs/toolkit').ActionCreatorWithPayload<Record<string, any>, "flow/setInputValues">, resetAndSetInputValues: import('@reduxjs/toolkit').ActionCreatorWithPayload<Record<string, any>, "flow/resetAndSetInputValues">, setInputError: import('@reduxjs/toolkit').ActionCreatorWithPayload<{
|
|
41
|
+
}, "flow/setInputValue">, setInputValues: import('@reduxjs/toolkit').ActionCreatorWithPayload<Record<string, any>, "flow/setInputValues">, resetInputValues: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"flow/resetInputValues">, resetAndSetInputValues: import('@reduxjs/toolkit').ActionCreatorWithPayload<Record<string, any>, "flow/resetAndSetInputValues">, setInputError: import('@reduxjs/toolkit').ActionCreatorWithPayload<{
|
|
35
42
|
field: string;
|
|
36
43
|
error: string | null;
|
|
37
|
-
}, "flow/setInputError">, setDisableSubmit: import('@reduxjs/toolkit').ActionCreatorWithPayload<boolean, "flow/setDisableSubmit">, setCurrentFlow: import('@reduxjs/toolkit').ActionCreatorWithPayload<Partial<Flow>, "flow/setCurrentFlow">, setCurrentForm: import('@reduxjs/toolkit').ActionCreatorWithPayload<Partial<Form>, "flow/setCurrentForm">;
|
|
44
|
+
}, "flow/setInputError">, setDisableSubmit: import('@reduxjs/toolkit').ActionCreatorWithPayload<boolean, "flow/setDisableSubmit">, setManualDisableSubmit: import('@reduxjs/toolkit').ActionCreatorWithPayload<boolean, "flow/setManualDisableSubmit">, setCurrentFlow: import('@reduxjs/toolkit').ActionCreatorWithPayload<Partial<Flow>, "flow/setCurrentFlow">, setCurrentForm: import('@reduxjs/toolkit').ActionCreatorWithPayload<Partial<Form>, "flow/setCurrentForm">, setFormidavimHost: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<string | undefined, "flow/setFormidavimHost">;
|
|
38
45
|
export declare const selectInputValues: import('reselect').Selector<{
|
|
39
46
|
flow: FlowSliceState;
|
|
40
47
|
}, Record<string, any>, []> & {
|
|
@@ -47,6 +54,10 @@ export declare const selectInputValues: import('reselect').Selector<{
|
|
|
47
54
|
flow: FlowSliceState;
|
|
48
55
|
}, boolean, []> & {
|
|
49
56
|
unwrapped: (state: FlowSliceState) => boolean;
|
|
57
|
+
}, selectManualDisableSubmit: import('reselect').Selector<{
|
|
58
|
+
flow: FlowSliceState;
|
|
59
|
+
}, boolean, []> & {
|
|
60
|
+
unwrapped: (state: FlowSliceState) => boolean;
|
|
50
61
|
}, selectCurrentFlow: import('reselect').Selector<{
|
|
51
62
|
flow: FlowSliceState;
|
|
52
63
|
}, Partial<Flow>, []> & {
|
|
@@ -55,4 +66,8 @@ export declare const selectInputValues: import('reselect').Selector<{
|
|
|
55
66
|
flow: FlowSliceState;
|
|
56
67
|
}, Partial<Form>, []> & {
|
|
57
68
|
unwrapped: (state: FlowSliceState) => Partial<Form>;
|
|
69
|
+
}, selectFormidavimHost: import('reselect').Selector<{
|
|
70
|
+
flow: FlowSliceState;
|
|
71
|
+
}, string | undefined, []> & {
|
|
72
|
+
unwrapped: (state: FlowSliceState) => string | undefined;
|
|
58
73
|
};
|
package/lib/types/data.d.ts
CHANGED