@arquimedes.co/eureka-forms 2.0.30 → 2.0.32-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.
|
@@ -87,7 +87,9 @@ export var calcValue = function (idStep, steps, values, customSteps, deleteIds,
|
|
|
87
87
|
}
|
|
88
88
|
return mappedValues;
|
|
89
89
|
}
|
|
90
|
-
case StepTypes.TITLE:
|
|
90
|
+
case StepTypes.TITLE: {
|
|
91
|
+
return value !== null && value !== void 0 ? value : undefined;
|
|
92
|
+
}
|
|
91
93
|
case StepTypes.COLLAPSIBLE:
|
|
92
94
|
deleteIds.push(idStep);
|
|
93
95
|
return;
|
|
@@ -116,10 +116,7 @@ export var calcDefaultValue = function (step) {
|
|
|
116
116
|
case StepTypes.CHECKBOX:
|
|
117
117
|
return (_a = step.defaultValue) !== null && _a !== void 0 ? _a : false;
|
|
118
118
|
case StepTypes.TITLE:
|
|
119
|
-
return
|
|
120
|
-
title: step.title,
|
|
121
|
-
description: step.description,
|
|
122
|
-
};
|
|
119
|
+
return undefined;
|
|
123
120
|
case StepTypes.SELECTOR:
|
|
124
121
|
if (step.defaultValue)
|
|
125
122
|
return ((_b = step.options.find(function (option) { return option.value === step.defaultValue; })) !== null && _b !== void 0 ? _b : '');
|
|
@@ -10,22 +10,24 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import {
|
|
13
|
+
import { calcStepWidth } from '../../StepFunctions';
|
|
14
14
|
import styles from './MaterialTitleStep.module.css';
|
|
15
15
|
import { useAppSelector } from '../../../hooks';
|
|
16
16
|
import FormContext from '../../../Contexts/FormContext';
|
|
17
17
|
import { useContext } from 'react';
|
|
18
18
|
import { useFormStep } from '../../StepHooks';
|
|
19
19
|
function TitleStep(_a) {
|
|
20
|
-
var _b;
|
|
20
|
+
var _b, _c, _d;
|
|
21
21
|
var step = _a.step;
|
|
22
|
-
var
|
|
23
|
-
defaultValue:
|
|
24
|
-
}).value
|
|
22
|
+
var value = useFormStep(step, {
|
|
23
|
+
defaultValue: undefined,
|
|
24
|
+
}).value;
|
|
25
|
+
var title = (_b = value === null || value === void 0 ? void 0 : value.title) !== null && _b !== void 0 ? _b : step.title;
|
|
26
|
+
var description = (_c = value === null || value === void 0 ? void 0 : value.description) !== null && _c !== void 0 ? _c : step.description;
|
|
25
27
|
var formStyle = useAppSelector(function (state) { return state.global; }).formStyle;
|
|
26
28
|
var form = useContext(FormContext);
|
|
27
29
|
var widthStats = useAppSelector(function (state) { return state.widthStats; });
|
|
28
|
-
var size = (
|
|
30
|
+
var size = (_d = step.size) !== null && _d !== void 0 ? _d : form.size.blockNum;
|
|
29
31
|
return (_jsxs("div", __assign({ className: styles.container, style: {
|
|
30
32
|
color: formStyle.textColor,
|
|
31
33
|
width: widthStats.currentBreakPoint <= size
|
package/package.json
CHANGED