@arquimedes.co/eureka-forms 3.0.25-test → 3.0.27-test
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/dist/App/AppHooks.d.ts +1 -1
- package/dist/App/AppHooks.js +5 -11
- package/package.json +1 -1
package/dist/App/AppHooks.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Form, Organization } from '../@Types';
|
|
2
2
|
import { AppProps } from './App';
|
|
3
3
|
import { Branding } from '../@Types/Branding';
|
|
4
|
-
export declare const useSetupApp: (isEmbedded: boolean,
|
|
4
|
+
export declare const useSetupApp: (isEmbedded: boolean, props: Omit<AppProps, "isWidget">) => {
|
|
5
5
|
form: Form | undefined | null;
|
|
6
6
|
organization: Organization | undefined | null;
|
|
7
7
|
branding: Branding | undefined;
|
package/dist/App/AppHooks.js
CHANGED
|
@@ -10,7 +10,8 @@ import { calcDependencies } from '../Form/FormFunctions';
|
|
|
10
10
|
import { iterateNestedSteps } from '../FormSteps/StepFunctions';
|
|
11
11
|
import { createNextState } from '@reduxjs/toolkit';
|
|
12
12
|
import { BaseConfirmationMessage } from '../Contexts/FormContext';
|
|
13
|
-
export const useSetupApp = (isEmbedded,
|
|
13
|
+
export const useSetupApp = (isEmbedded, props) => {
|
|
14
|
+
const { preview, internal, postview, partial, editable, handleConfirmed, customSteps, valuesData, apiKey, formData, classifiers, idCurrentAgent, ...others } = props;
|
|
14
15
|
const [form, setForm] = useState(undefined);
|
|
15
16
|
const [organization, setOrganization] = useState(undefined);
|
|
16
17
|
const dispatch = useAppDispatch();
|
|
@@ -117,7 +118,7 @@ export const useSetupApp = (isEmbedded, { preview, internal, postview, partial,
|
|
|
117
118
|
dispatch({ type: 'CLEAR' });
|
|
118
119
|
};
|
|
119
120
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
120
|
-
}, []);
|
|
121
|
+
}, [props]);
|
|
121
122
|
const reload = useCallback(() => {
|
|
122
123
|
if (!form)
|
|
123
124
|
return;
|
|
@@ -134,20 +135,13 @@ export const useSetupApp = (isEmbedded, { preview, internal, postview, partial,
|
|
|
134
135
|
return {
|
|
135
136
|
form,
|
|
136
137
|
organization,
|
|
137
|
-
branding: organization?.customBrandings ?
|
|
138
|
+
branding: organization?.customBrandings ? form?.branding ?? organization.branding : organization?.branding,
|
|
138
139
|
reload,
|
|
139
140
|
};
|
|
140
141
|
};
|
|
141
142
|
export const useLogRocket = (organization, form, { apiKey, internal, postview, preview }) => {
|
|
142
143
|
const loadLogRocket = async () => {
|
|
143
|
-
if (form &&
|
|
144
|
-
organization &&
|
|
145
|
-
process.env.NODE_ENV === 'production' &&
|
|
146
|
-
//Tools
|
|
147
|
-
// apiKey !== 'rCgWiEfOSN1TlUmHO28Y0' &&
|
|
148
|
-
!internal &&
|
|
149
|
-
!postview &&
|
|
150
|
-
!preview) {
|
|
144
|
+
if (form && organization && process.env.NODE_ENV === 'production' && !internal && !postview && !preview) {
|
|
151
145
|
try {
|
|
152
146
|
const LogRocket = await import('logrocket');
|
|
153
147
|
LogRocket.default.init('63mg8a/forms-uv0gd');
|
package/package.json
CHANGED