@arquimedes.co/eureka-forms 2.0.107 → 2.0.109
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/AppFunctions.js
CHANGED
|
@@ -182,9 +182,8 @@ export var mapOriginalValue = function (orgInfo, step, value, values, form, path
|
|
|
182
182
|
case FormStepTypes.CLASSIFIER_SELECTOR: return [3 /*break*/, 8];
|
|
183
183
|
case FormStepTypes.ENTITYVALUEPICKER: return [3 /*break*/, 9];
|
|
184
184
|
case FormStepTypes.TEXTINPUT: return [3 /*break*/, 12];
|
|
185
|
-
case FormStepTypes.TITLE: return [3 /*break*/, 13];
|
|
186
185
|
}
|
|
187
|
-
return [3 /*break*/,
|
|
186
|
+
return [3 /*break*/, 13];
|
|
188
187
|
case 1:
|
|
189
188
|
elements = value;
|
|
190
189
|
mappedElements = [];
|
|
@@ -298,7 +297,7 @@ export var mapOriginalValue = function (orgInfo, step, value, values, form, path
|
|
|
298
297
|
classifier = (_h = form.classifiers) === null || _h === void 0 ? void 0 : _h[value];
|
|
299
298
|
return [2 /*return*/, { value: value, label: classifier === null || classifier === void 0 ? void 0 : classifier.name }];
|
|
300
299
|
}
|
|
301
|
-
return [3 /*break*/,
|
|
300
|
+
return [3 /*break*/, 14];
|
|
302
301
|
}
|
|
303
302
|
_o.label = 9;
|
|
304
303
|
case 9:
|
|
@@ -336,30 +335,13 @@ export var mapOriginalValue = function (orgInfo, step, value, values, form, path
|
|
|
336
335
|
}
|
|
337
336
|
_o.label = 13;
|
|
338
337
|
case 13:
|
|
339
|
-
{
|
|
340
|
-
if (value.title) {
|
|
341
|
-
step.title =
|
|
342
|
-
typeof value.title === 'string'
|
|
343
|
-
? stringToDraft(value.title)
|
|
344
|
-
: value.title;
|
|
345
|
-
}
|
|
346
|
-
if (value.description) {
|
|
347
|
-
step.description =
|
|
348
|
-
typeof value.description === 'string'
|
|
349
|
-
? stringToDraft(value.description)
|
|
350
|
-
: value.description;
|
|
351
|
-
}
|
|
352
|
-
return [2 /*return*/, undefined];
|
|
353
|
-
}
|
|
354
|
-
_o.label = 14;
|
|
355
|
-
case 14:
|
|
356
338
|
if (step.type.startsWith('CBR_') &&
|
|
357
339
|
(value === null || value === void 0 ? void 0 : value.id) &&
|
|
358
340
|
typeof value.id === 'number') {
|
|
359
341
|
return [2 /*return*/, __assign(__assign({}, value), { id: value.id.toString() })];
|
|
360
342
|
}
|
|
361
343
|
return [2 /*return*/, value];
|
|
362
|
-
case
|
|
344
|
+
case 14: return [2 /*return*/];
|
|
363
345
|
}
|
|
364
346
|
});
|
|
365
347
|
});
|
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, { preview, internal, postview, partial, editable, handleConfirmed, customSteps, valuesData, apiKey, formData, classifiers, ...others }: Omit<AppProps, 'isWidget'>) => {
|
|
4
|
+
export declare const useSetupApp: (isEmbedded: boolean, { preview, internal, postview, partial, editable, handleConfirmed, customSteps, valuesData, apiKey, formData, classifiers, idCurrentAgent, ...others }: 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
|
@@ -70,7 +70,7 @@ import { createNextState } from '@reduxjs/toolkit';
|
|
|
70
70
|
import { BaseConfirmationMessage } from '../Contexts/FormContext';
|
|
71
71
|
export var useSetupApp = function (isEmbedded, _a) {
|
|
72
72
|
var _b;
|
|
73
|
-
var preview = _a.preview, internal = _a.internal, postview = _a.postview, partial = _a.partial, editable = _a.editable, handleConfirmed = _a.handleConfirmed, customSteps = _a.customSteps, valuesData = _a.valuesData, apiKey = _a.apiKey, formData = _a.formData, classifiers = _a.classifiers, others = __rest(_a, ["preview", "internal", "postview", "partial", "editable", "handleConfirmed", "customSteps", "valuesData", "apiKey", "formData", "classifiers"]);
|
|
73
|
+
var preview = _a.preview, internal = _a.internal, postview = _a.postview, partial = _a.partial, editable = _a.editable, handleConfirmed = _a.handleConfirmed, customSteps = _a.customSteps, valuesData = _a.valuesData, apiKey = _a.apiKey, formData = _a.formData, classifiers = _a.classifiers, idCurrentAgent = _a.idCurrentAgent, others = __rest(_a, ["preview", "internal", "postview", "partial", "editable", "handleConfirmed", "customSteps", "valuesData", "apiKey", "formData", "classifiers", "idCurrentAgent"]);
|
|
74
74
|
var _c = useState(undefined), form = _c[0], setForm = _c[1];
|
|
75
75
|
var _d = useState(undefined), organization = _d[0], setOrganization = _d[1];
|
|
76
76
|
var dispatch = useAppDispatch();
|
|
@@ -183,7 +183,7 @@ export var useSetupApp = function (isEmbedded, _a) {
|
|
|
183
183
|
: __assign(__assign({}, InternalFormStyle), ((_d = form === null || form === void 0 ? void 0 : form.style) !== null && _d !== void 0 ? _d : {})), confirmation: {
|
|
184
184
|
confirmationMessage: (_e = form.confirmationMessage) !== null && _e !== void 0 ? _e : BaseConfirmationMessage,
|
|
185
185
|
showLink: (_f = form.showLink) !== null && _f !== void 0 ? _f : false,
|
|
186
|
-
}, internal: !!internal, idOrganization: idOrganization, preview: !!preview, partial: !!partial, postview: !!postview, editable: !!(editable !== null && editable !== void 0 ? editable : true), values: values }, calcInitialSections(form)), { dependencies: calcDependencies(form.steps, customSteps, form.steps, dependencies, values), countryCode: countryCode })));
|
|
186
|
+
}, internal: !!internal, idOrganization: idOrganization, idCurrentAgent: idCurrentAgent, preview: !!preview, partial: !!partial, postview: !!postview, editable: !!(editable !== null && editable !== void 0 ? editable : true), values: values }, calcInitialSections(form)), { dependencies: calcDependencies(form.steps, customSteps, form.steps, dependencies, values), countryCode: countryCode })));
|
|
187
187
|
return [2 /*return*/];
|
|
188
188
|
}
|
|
189
189
|
});
|
|
@@ -29,8 +29,10 @@ function TitleStep(_a) {
|
|
|
29
29
|
var form = useContext(FormContext);
|
|
30
30
|
var widthStats = useAppSelector(function (state) { return state.widthStats; });
|
|
31
31
|
var size = (_b = step.size) !== null && _b !== void 0 ? _b : form.size.blockNum;
|
|
32
|
-
var title = useMemo(function () { return calcBaseDraft(
|
|
33
|
-
|
|
32
|
+
var title = useMemo(function () { var _a; return calcBaseDraft((_a = value === null || value === void 0 ? void 0 : value.title) !== null && _a !== void 0 ? _a : step.title); }, //Usa por defecto lo que venga en el value, pero no escucha cambios
|
|
33
|
+
[step.title]);
|
|
34
|
+
var description = useMemo(function () { var _a; return calcBaseDraft((_a = value === null || value === void 0 ? void 0 : value.description) !== null && _a !== void 0 ? _a : step.description); }, //Usa por defecto lo que venga en el value, pero no escucha cambios
|
|
35
|
+
[step.description]);
|
|
34
36
|
var dependencies = useAppSelector(function (state) {
|
|
35
37
|
return selectDependencies(state, step.dependencies);
|
|
36
38
|
});
|
package/package.json
CHANGED