@arquimedes.co/eureka-forms 2.0.56 → 2.0.57
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,11 +4,12 @@ import { SiteState, ValuesStore } from '../States/SiteSlice';
|
|
|
4
4
|
import { CustomStep } from '../FormSteps/CustomStep';
|
|
5
5
|
import { MapperElement } from '../@Types/MapperElement';
|
|
6
6
|
import { Condition } from '../@Types/Condition';
|
|
7
|
+
import { MapperValue } from '../FormSteps/MapperStep/MaterialMapperStep/MaterialMapperStep';
|
|
7
8
|
export declare const calcValuesStore: (idOrganization: string, form: Readonly<Form>, originalValues?: Record<string, any>, postview?: boolean, customSteps?: Record<string, CustomStep>) => Promise<ValuesStore>;
|
|
8
9
|
export declare const addMapperStep: <Type>(step: Mapper, customSteps: Record<string, CustomStep>, path?: string) => {
|
|
9
10
|
element: MapperElement<Type>;
|
|
10
11
|
/** Record of all the new mapper values created */
|
|
11
|
-
mappers: Record<string,
|
|
12
|
+
mappers: Record<string, MapperValue<Type>>;
|
|
12
13
|
/** Record of all the new steps created */
|
|
13
14
|
steps: Record<string, FormStep>;
|
|
14
15
|
};
|
package/dist/App/AppFunctions.js
CHANGED
|
@@ -119,7 +119,7 @@ export var calcValuesStore = function (idOrganization, form, originalValues, pos
|
|
|
119
119
|
if (!values.sections[step.idSection])
|
|
120
120
|
values.sections[step.idSection] = {};
|
|
121
121
|
_d = addMapperStep(step, customSteps), element = _d.element, mappers = _d.mappers;
|
|
122
|
-
values.sections[step.idSection] = __assign(__assign(__assign({}, values.sections[step.idSection]), mappers), (_e = {}, _e[step.id] = [element], _e));
|
|
122
|
+
values.sections[step.idSection] = __assign(__assign(__assign({}, values.sections[step.idSection]), mappers), (_e = {}, _e[step.id] = { elements: [element], page: 0 }, _e));
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
return [2 /*return*/, values];
|
|
@@ -154,7 +154,10 @@ export var addMapperStep = function (step, customSteps, path) {
|
|
|
154
154
|
var nested = addMapperStep(nestedStep, customSteps, base + step.id + '-' + idElement);
|
|
155
155
|
steps = __assign(__assign({}, steps), nested.steps);
|
|
156
156
|
mappers = __assign(__assign({}, mappers), nested.mappers);
|
|
157
|
-
mappers[element.ids[nestedStep.id]] =
|
|
157
|
+
mappers[element.ids[nestedStep.id]] = {
|
|
158
|
+
elements: [nested.element],
|
|
159
|
+
page: 0,
|
|
160
|
+
};
|
|
158
161
|
}
|
|
159
162
|
}
|
|
160
163
|
return { element: element, mappers: mappers, steps: steps };
|