@arquimedes.co/eureka-forms 3.0.26-test → 3.0.28-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 +6 -10
- 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();
|
|
@@ -113,11 +114,13 @@ export const useSetupApp = (isEmbedded, { preview, internal, postview, partial,
|
|
|
113
114
|
};
|
|
114
115
|
useEffect(() => {
|
|
115
116
|
void loadData();
|
|
117
|
+
// eslint-disable-next-line no-console
|
|
118
|
+
console.log('Changed!');
|
|
116
119
|
return () => {
|
|
117
120
|
dispatch({ type: 'CLEAR' });
|
|
118
121
|
};
|
|
119
122
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
120
|
-
}, []);
|
|
123
|
+
}, [props.formData, props.valuesData]);
|
|
121
124
|
const reload = useCallback(() => {
|
|
122
125
|
if (!form)
|
|
123
126
|
return;
|
|
@@ -140,14 +143,7 @@ export const useSetupApp = (isEmbedded, { preview, internal, postview, partial,
|
|
|
140
143
|
};
|
|
141
144
|
export const useLogRocket = (organization, form, { apiKey, internal, postview, preview }) => {
|
|
142
145
|
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) {
|
|
146
|
+
if (form && organization && process.env.NODE_ENV === 'production' && !internal && !postview && !preview) {
|
|
151
147
|
try {
|
|
152
148
|
const LogRocket = await import('logrocket');
|
|
153
149
|
LogRocket.default.init('63mg8a/forms-uv0gd');
|
package/package.json
CHANGED