@arquimedes.co/eureka-forms 1.9.95-test → 1.9.97-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.js +1 -1
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.js +1 -1
- package/dist/FormComponents/Step/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.js +27 -27
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.js +3 -1
- package/package.json +1 -1
package/dist/App.js
CHANGED
|
@@ -387,7 +387,7 @@ var mapOriginalValues = function (originalValues, form) {
|
|
|
387
387
|
var addInitialMappers = function (newValues, steps) {
|
|
388
388
|
for (var _i = 0, _a = Object.values(steps); _i < _a.length; _i++) {
|
|
389
389
|
var step = _a[_i];
|
|
390
|
-
if (step.type !== StepTypes.MAPPER)
|
|
390
|
+
if (step.type !== StepTypes.MAPPER || newValues[step.id])
|
|
391
391
|
continue;
|
|
392
392
|
var idElement = nanoid();
|
|
393
393
|
var newElement = {
|
|
@@ -328,7 +328,7 @@ function calcDependencies(steps, originalValues, customSteps, allSteps, dependen
|
|
|
328
328
|
var idDep = _e[_d];
|
|
329
329
|
var depStep = allSteps[idDep];
|
|
330
330
|
if (depStep && dependencies[idDep] === undefined) {
|
|
331
|
-
dependencies[idDep] = calcStepDependencyValue(depStep,
|
|
331
|
+
dependencies[idDep] = calcStepDependencyValue(depStep, originalValues, customSteps);
|
|
332
332
|
}
|
|
333
333
|
else if (dependencies[idDep] === undefined) {
|
|
334
334
|
dependencies[idDep] = originalValues[idDep];
|
|
@@ -77,36 +77,14 @@ function EntityValuePicker(_a) {
|
|
|
77
77
|
var getEntityValueOptions = function (_a, _step, dependencyStore, domain) {
|
|
78
78
|
var idOrganization = _a.idOrganization;
|
|
79
79
|
return __awaiter(_this, void 0, void 0, function () {
|
|
80
|
-
var
|
|
80
|
+
var urlPath, _i, _b, path, idEntityValue, currentValue, params, _c, _d, filter, currentValue, url, response;
|
|
81
81
|
var _e, _f, _g;
|
|
82
82
|
return __generator(this, function (_h) {
|
|
83
83
|
switch (_h.label) {
|
|
84
84
|
case 0:
|
|
85
|
-
params = new URLSearchParams({});
|
|
86
|
-
for (_i = 0, _b = step.filters; _i < _b.length; _i++) {
|
|
87
|
-
filter = _b[_i];
|
|
88
|
-
switch (filter.type) {
|
|
89
|
-
case EntityValueDataTypes.STEP:
|
|
90
|
-
currentValue = dependencyStore[filter.idStep];
|
|
91
|
-
if (currentValue) {
|
|
92
|
-
if (typeof currentValue === 'string')
|
|
93
|
-
params.set(filter.idProperty, currentValue);
|
|
94
|
-
else
|
|
95
|
-
params.set(filter.idProperty, (_e = currentValue._id) !== null && _e !== void 0 ? _e : currentValue.id);
|
|
96
|
-
}
|
|
97
|
-
else if (filter.required) {
|
|
98
|
-
return [2 /*return*/, null];
|
|
99
|
-
}
|
|
100
|
-
break;
|
|
101
|
-
case EntityValueDataTypes.VALUE:
|
|
102
|
-
default:
|
|
103
|
-
params.set(filter.idProperty, filter.value);
|
|
104
|
-
break;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
85
|
urlPath = '';
|
|
108
|
-
for (
|
|
109
|
-
path =
|
|
86
|
+
for (_i = 0, _b = step.path; _i < _b.length; _i++) {
|
|
87
|
+
path = _b[_i];
|
|
110
88
|
idEntityValue = 'null';
|
|
111
89
|
switch (path.type) {
|
|
112
90
|
case EntityValueDataTypes.STEP:
|
|
@@ -116,11 +94,11 @@ function EntityValuePicker(_a) {
|
|
|
116
94
|
if (typeof currentValue === 'string')
|
|
117
95
|
idEntityValue = currentValue;
|
|
118
96
|
else
|
|
119
|
-
idEntityValue = (
|
|
97
|
+
idEntityValue = (_e = currentValue._id) !== null && _e !== void 0 ? _e : currentValue.id;
|
|
120
98
|
break;
|
|
121
99
|
case EntityValueDataTypes.VALUE:
|
|
122
100
|
default:
|
|
123
|
-
idEntityValue = (
|
|
101
|
+
idEntityValue = (_f = path.idEntityValue) !== null && _f !== void 0 ? _f : 'null';
|
|
124
102
|
break;
|
|
125
103
|
}
|
|
126
104
|
urlPath +=
|
|
@@ -128,6 +106,28 @@ function EntityValuePicker(_a) {
|
|
|
128
106
|
path.idEntity +
|
|
129
107
|
(idEntityValue ? '/' + idEntityValue : '');
|
|
130
108
|
}
|
|
109
|
+
params = new URLSearchParams({});
|
|
110
|
+
for (_c = 0, _d = step.filters; _c < _d.length; _c++) {
|
|
111
|
+
filter = _d[_c];
|
|
112
|
+
switch (filter.type) {
|
|
113
|
+
case EntityValueDataTypes.STEP:
|
|
114
|
+
currentValue = dependencyStore[filter.idStep];
|
|
115
|
+
if (currentValue) {
|
|
116
|
+
if (typeof currentValue === 'string')
|
|
117
|
+
params.set(filter.idProperty, currentValue);
|
|
118
|
+
else
|
|
119
|
+
params.set(filter.idProperty, (_g = currentValue._id) !== null && _g !== void 0 ? _g : currentValue.id);
|
|
120
|
+
}
|
|
121
|
+
else if (filter.required) {
|
|
122
|
+
return [2 /*return*/, null];
|
|
123
|
+
}
|
|
124
|
+
break;
|
|
125
|
+
case EntityValueDataTypes.VALUE:
|
|
126
|
+
default:
|
|
127
|
+
params.set(filter.idProperty, filter.value);
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
131
|
url = "".concat(domain !== null && domain !== void 0 ? domain : idOrganization, "/entities/").concat(step.idEntity).concat(urlPath, "?").concat(params.toString());
|
|
132
132
|
return [4 /*yield*/, (domain
|
|
133
133
|
? widgetInstance.get(url)
|
|
@@ -19,7 +19,9 @@ function ListMapperElement(_a) {
|
|
|
19
19
|
var calcName = (customElementModifiers !== null && customElementModifiers !== void 0 ? customElementModifiers : {}).calcName;
|
|
20
20
|
var name = calcName
|
|
21
21
|
? calcName(element)
|
|
22
|
-
: step.unitLabel
|
|
22
|
+
: step.unitLabel
|
|
23
|
+
? step.unitLabel + ' ' + (num + 1)
|
|
24
|
+
: '';
|
|
23
25
|
return (_jsxs("div", __assign({ className: widthStats.isMobile ? styles.mobileContainer : styles.container }, { children: [_jsx("div", __assign({ className: styles.bulletContainer, style: {
|
|
24
26
|
height: name ? 28 : 40,
|
|
25
27
|
} }, { children: _jsx("div", { className: styles.bullet, style: {
|
package/package.json
CHANGED