@arquimedes.co/eureka-forms 1.8.4-test → 1.8.5-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.
|
@@ -17,7 +17,7 @@ import { Editor } from 'react-draft-wysiwyg'; //Load programatically only if ste
|
|
|
17
17
|
import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css';
|
|
18
18
|
import './DraftEditor.css';
|
|
19
19
|
import { convertFromRaw, EditorState } from 'draft-js';
|
|
20
|
-
import { useState } from 'react';
|
|
20
|
+
import React, { useState } from 'react';
|
|
21
21
|
import { ClickAwayListener } from '@material-ui/core';
|
|
22
22
|
function TextAreaStep(_a) {
|
|
23
23
|
var step = _a.step, errors = _a.errors, control = _a.control, editable = _a.editable, postview = _a.postview, formStyle = _a.formStyle, maxLength = _a.maxLength, originalValues = _a.originalValues, backgroundColor = _a.backgroundColor;
|
|
@@ -158,9 +158,12 @@ function TextAreaStep(_a) {
|
|
|
158
158
|
}, shouldUnregister: true, render: function (_a) {
|
|
159
159
|
var _b;
|
|
160
160
|
var field = _a.field;
|
|
161
|
-
return (_jsx(RoundedTextField, __assign({}, field, { "data-testid": step.id, maxLength: maxLength, label: step.label, inputRef: field.ref, required: step.required, cantEdit: !canEdit, fontWeight: 400, multiline: true, minRows: 4, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, textColor: formStyle.textColor, errorColor: formStyle.errorColor, backgroundColor: backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : formStyle.backgroundColor, innerBackgroundColor: formStyle.stepBackgroundColor, helperTextColor: formStyle.descriptionTextColor, helperText: errors[step.id]
|
|
162
|
-
|
|
163
|
-
|
|
161
|
+
return (_jsxs(React.Fragment, { children: [_jsx("div", __assign({ className: styles.erkTextArea }, { children: _jsx(RoundedTextField, __assign({}, field, { "data-testid": step.id, maxLength: maxLength, label: step.label, inputRef: field.ref, required: step.required, cantEdit: !canEdit, fontWeight: 400, multiline: true, minRows: 4, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, textColor: formStyle.textColor, errorColor: formStyle.errorColor, backgroundColor: backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : formStyle.backgroundColor, innerBackgroundColor: formStyle.stepBackgroundColor, helperTextColor: formStyle.descriptionTextColor, helperText: errors[step.id]
|
|
162
|
+
? errors[step.id].message
|
|
163
|
+
: (_b = step.description) !== null && _b !== void 0 ? _b : (step.required ? ' ' : null), error: !!errors[step.id] }), void 0) }), void 0), postview && (_jsxs("div", __assign({ className: styles.print }, { children: [_jsxs("div", { children: [step.label, ":"] }, void 0), _jsx("p", __assign({ className: styles.printContainer, style: {
|
|
164
|
+
backgroundColor: formStyle.stepBackgroundColor,
|
|
165
|
+
borderColor: formStyle.outlineColor,
|
|
166
|
+
} }, { children: field.value }), void 0)] }), void 0))] }, void 0));
|
|
164
167
|
} }, void 0) }), void 0));
|
|
165
168
|
}
|
|
166
169
|
}
|
package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.module.css
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
width: fit-content;
|
|
4
4
|
max-width: calc(100% - 20px);
|
|
5
5
|
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
6
7
|
padding: 10px;
|
|
7
8
|
padding-top: 5px;
|
|
8
9
|
width: calc(100% - 20px);
|
|
@@ -64,3 +65,29 @@
|
|
|
64
65
|
margin-bottom: 2px;
|
|
65
66
|
font-size: 1rem;
|
|
66
67
|
}
|
|
68
|
+
.print {
|
|
69
|
+
display: none;
|
|
70
|
+
}
|
|
71
|
+
.printContainer {
|
|
72
|
+
border-radius: 10px;
|
|
73
|
+
border: 1px solid black;
|
|
74
|
+
padding: 6px 12px;
|
|
75
|
+
width: calc(100% - 2);
|
|
76
|
+
font-size: 1rem;
|
|
77
|
+
min-height: 50px;
|
|
78
|
+
margin: 0px;
|
|
79
|
+
}
|
|
80
|
+
.erkTextArea {
|
|
81
|
+
position: relative;
|
|
82
|
+
width: 100%;
|
|
83
|
+
max-width: 100%;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@media print {
|
|
87
|
+
.print {
|
|
88
|
+
display: block;
|
|
89
|
+
}
|
|
90
|
+
.erkTextArea {
|
|
91
|
+
display: none !important;
|
|
92
|
+
}
|
|
93
|
+
}
|
package/package.json
CHANGED