@hievilmath/browser-formidavim 1.4.10 → 1.4.12

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.
@@ -4,7 +4,7 @@ export declare const PipelineProcessor: FC<PropsWithChildren<{
4
4
  dataFetcher?: (type?: 'pipeline' | 'flow') => Promise<any>;
5
5
  pipelineFetcher?: () => Promise<any>;
6
6
  configFetcher?: () => Promise<any>;
7
- onSubmit?: (formData: any, flow: Partial<Flow>, shouldRedirect: boolean) => Promise<any>;
7
+ onSubmit?: (formData: any, flow: Partial<Flow>) => Promise<(() => void) | void>;
8
8
  isPreview?: boolean;
9
9
  flowName: string;
10
10
  version?: string | undefined;
@@ -7,6 +7,7 @@ export declare const Renderer: FC<{
7
7
  onSubmit: (formData: any, flow: Partial<Flow>, shouldRedirect: boolean) => Promise<any>;
8
8
  onNextStep?: (flow: any, currentForm: any) => any;
9
9
  onPrevStep?: (flow: any, currentForm: any) => any;
10
+ onFlowInit?: (flow: Flow) => any;
10
11
  shouldRedirect?: boolean;
11
12
  formidavimHost?: string;
12
13
  }>;
@@ -1,5 +1,60 @@
1
1
  import { FC } from 'react';
2
2
  import { FormComponent } from '../../../../../../axios/formidavim/src/index.ts';
3
+ export declare const states: {
4
+ AL: string;
5
+ AK: string;
6
+ AZ: string;
7
+ AR: string;
8
+ CA: string;
9
+ CO: string;
10
+ CT: string;
11
+ DE: string;
12
+ FL: string;
13
+ GA: string;
14
+ HI: string;
15
+ ID: string;
16
+ IL: string;
17
+ IN: string;
18
+ IA: string;
19
+ KS: string;
20
+ KY: string;
21
+ LA: string;
22
+ ME: string;
23
+ MD: string;
24
+ MA: string;
25
+ MI: string;
26
+ MN: string;
27
+ MS: string;
28
+ MO: string;
29
+ MT: string;
30
+ NE: string;
31
+ NV: string;
32
+ NH: string;
33
+ NJ: string;
34
+ NM: string;
35
+ NY: string;
36
+ NC: string;
37
+ ND: string;
38
+ OH: string;
39
+ OK: string;
40
+ OR: string;
41
+ PA: string;
42
+ RI: string;
43
+ SC: string;
44
+ SD: string;
45
+ TN: string;
46
+ TX: string;
47
+ UT: string;
48
+ VT: string;
49
+ VA: string;
50
+ WA: string;
51
+ DC: string;
52
+ WV: string;
53
+ WI: string;
54
+ WY: string;
55
+ };
56
+ export declare const translateStateToAbbr: (stateString: string) => string;
57
+ export declare const translateStateToFull: (stateString: string) => string;
3
58
  export declare const Address: FC<{
4
59
  formComponent: Partial<FormComponent>;
5
60
  }>;
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { FormComponent } from '../../../../../../axios/formidavim/src/index.ts';
3
+ export declare const FileInput: FC<{
4
+ formComponent: Partial<FormComponent>;
5
+ }>;
@@ -5,6 +5,7 @@ export interface HipaaConsentProps {
5
5
  consentText: string;
6
6
  height?: string;
7
7
  checkboxLabel?: string;
8
+ secondaryCheckboxLabel?: string;
8
9
  propertyId: string;
9
10
  required?: boolean;
10
11
  color?: string;
@@ -0,0 +1,12 @@
1
+ import { FC } from 'react';
2
+ import { FormComponent } from '../../../../../../axios/formidavim/src/index.ts';
3
+ export interface LinkButtonProps {
4
+ label: string;
5
+ url: string;
6
+ target?: '_blank' | '_self' | '_parent' | '_top';
7
+ btnStyle?: 'black' | 'gray' | 'green' | 'alt';
8
+ margin?: string;
9
+ }
10
+ export declare const LinkButton: FC<{
11
+ formComponent: Partial<FormComponent>;
12
+ }>;
@@ -1,5 +1,11 @@
1
1
  import { FC } from 'react';
2
2
  import { FormComponent } from '../../../../../../axios/formidavim/src/index.ts';
3
+ export interface RuleProps {
4
+ margin?: string;
5
+ thiccMode?: boolean;
6
+ color?: string;
7
+ fullWidth?: boolean;
8
+ }
3
9
  export declare const Rule: FC<{
4
10
  formComponent: Partial<FormComponent>;
5
11
  }>;
@@ -12,6 +12,10 @@ export declare const useFlowStore: () => {
12
12
  setPatientValues: (profile: any) => void;
13
13
  getPatientValue: (field: string) => string | undefined;
14
14
  getFullPatient: () => PatientProfileDto | null;
15
+ setCurrentFlowValue: (flow: Partial<Flow>) => void;
16
+ getCurrentFlowValue: () => Partial<Flow>;
17
+ setCurrentFormValue: (form: any) => void;
18
+ getCurrentFormValue: () => Partial<import('../../../../../axios/formidavim/src/index.ts').Form>;
15
19
  setFlowAndPatientValue: (field: string, value: any) => void;
16
20
  generateFormDataFromFlow: (flow: Partial<Flow>) => Record<string, any>;
17
21
  };
@@ -1,8 +1,11 @@
1
1
  import { PayloadAction } from '@reduxjs/toolkit';
2
+ import { Flow, Form } from '../../../../../../axios/formidavim/src/index.ts';
2
3
  export interface FlowSliceState {
3
4
  inputValues: Record<string, any>;
4
5
  inputErrors: Record<string, any>;
5
6
  disableSubmit: boolean;
7
+ currentFlow: Partial<Flow>;
8
+ currentForm: Partial<Form>;
6
9
  }
7
10
  export declare const flowSlice: import('@reduxjs/toolkit').Slice<FlowSliceState, {
8
11
  setInputValue: (state: import('immer').WritableDraft<FlowSliceState>, action: PayloadAction<{
@@ -15,10 +18,14 @@ export declare const flowSlice: import('@reduxjs/toolkit').Slice<FlowSliceState,
15
18
  error: string | null;
16
19
  }>) => void;
17
20
  setDisableSubmit: (state: import('immer').WritableDraft<FlowSliceState>, action: PayloadAction<boolean>) => void;
21
+ setCurrentFlow: (state: import('immer').WritableDraft<FlowSliceState>, action: PayloadAction<Partial<Flow>>) => void;
22
+ setCurrentForm: (state: import('immer').WritableDraft<FlowSliceState>, action: PayloadAction<Partial<Form>>) => void;
18
23
  }, "flow", "flow", {
19
24
  selectInputValues: (state: FlowSliceState) => Record<string, any>;
20
25
  selectInputErrors: (state: FlowSliceState) => Record<string, any>;
21
26
  selectDisableSubmit: (state: FlowSliceState) => boolean;
27
+ selectCurrentFlow: (state: FlowSliceState) => Partial<Flow>;
28
+ selectCurrentForm: (state: FlowSliceState) => Partial<Form>;
22
29
  }>;
23
30
  export declare const setInputValue: import('@reduxjs/toolkit').ActionCreatorWithPayload<{
24
31
  field: string;
@@ -26,7 +33,7 @@ export declare const setInputValue: import('@reduxjs/toolkit').ActionCreatorWith
26
33
  }, "flow/setInputValue">, setInputValues: import('@reduxjs/toolkit').ActionCreatorWithPayload<Record<string, any>, "flow/setInputValues">, setInputError: import('@reduxjs/toolkit').ActionCreatorWithPayload<{
27
34
  field: string;
28
35
  error: string | null;
29
- }, "flow/setInputError">, setDisableSubmit: import('@reduxjs/toolkit').ActionCreatorWithPayload<boolean, "flow/setDisableSubmit">;
36
+ }, "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">;
30
37
  export declare const selectInputValues: import('reselect').Selector<{
31
38
  flow: FlowSliceState;
32
39
  }, Record<string, any>, []> & {
@@ -39,4 +46,12 @@ export declare const selectInputValues: import('reselect').Selector<{
39
46
  flow: FlowSliceState;
40
47
  }, boolean, []> & {
41
48
  unwrapped: (state: FlowSliceState) => boolean;
49
+ }, selectCurrentFlow: import('reselect').Selector<{
50
+ flow: FlowSliceState;
51
+ }, Partial<Flow>, []> & {
52
+ unwrapped: (state: FlowSliceState) => Partial<Flow>;
53
+ }, selectCurrentForm: import('reselect').Selector<{
54
+ flow: FlowSliceState;
55
+ }, Partial<Form>, []> & {
56
+ unwrapped: (state: FlowSliceState) => Partial<Form>;
42
57
  };
@@ -101,6 +101,7 @@ interface CRAccordionWrapperProps {
101
101
  interface FormSelectWrapperProps {
102
102
  $visible?: boolean;
103
103
  $hasError?: boolean;
104
+ $height?: string;
104
105
  }
105
106
  interface FormFileWrapperProps {
106
107
  $visible?: string;
@@ -130,7 +131,9 @@ export declare const CRProdImage: import('styled-components/dist/types').IStyled
130
131
  export declare const CRTab: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
131
132
  export declare const CRAccordionWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, CRAccordionWrapperProps>> & string;
132
133
  export declare const CRModalFooter: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
133
- export declare const FormSelectWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, FormSelectWrapperProps>> & string;
134
+ export declare const FormSelectWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, FormSelectWrapperProps & {
135
+ $marginBottom?: string;
136
+ }>> & string;
134
137
  export declare const FormFileWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, FormFileWrapperProps>> & string;
135
138
  export declare const FormDatePickerWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, FormDatePickerWrapperProps>> & string;
136
139
  export declare const FlowContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hievilmath/browser-formidavim",
3
- "version": "1.4.10",
3
+ "version": "1.4.12",
4
4
  "main": "./index.js",
5
5
  "module": "./index.mjs",
6
6
  "typings": "./index.d.ts",