@arquimedes.co/eureka-forms 1.7.4 → 1.7.6-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/FormComponents/Form/Form.js +2 -2
- package/dist/FormComponents/Step/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js +17 -12
- package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/DraftEditor.css +1 -1
- package/dist/shared/RoundedSmartSelect/RoundedSmartSelect.js +3 -0
- package/package.json +1 -1
|
@@ -88,12 +88,12 @@ function FormComponent(_a) {
|
|
|
88
88
|
if ((postview || internal || !form.isStandAlone) &&
|
|
89
89
|
widthStats !== undefined) {
|
|
90
90
|
return (_jsx("div", __assign({ className: styles.widgetFormContainer, ref: containerRef, style: {
|
|
91
|
-
backgroundColor: internal
|
|
91
|
+
backgroundColor: internal || postview
|
|
92
92
|
? InternalFormStyle.backgroundColor
|
|
93
93
|
: form.style.backgroundColor,
|
|
94
94
|
} }, { children: _jsx(FormTypeComponent, __assign({}, others, { handleLoaded: function () {
|
|
95
95
|
setLoaded(true);
|
|
96
|
-
}, widthStats: widthStats, form: form, internal: internal, postview: postview, organization: organization, formStyle: internal ? InternalFormStyle : form.style }), void 0) }), void 0));
|
|
96
|
+
}, widthStats: widthStats, form: form, internal: internal, postview: postview, organization: organization, formStyle: internal || postview ? InternalFormStyle : form.style }), void 0) }), void 0));
|
|
97
97
|
}
|
|
98
98
|
else if (organization && widthStats !== undefined) {
|
|
99
99
|
//Standalone cant have widget
|
package/dist/FormComponents/Step/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js
CHANGED
|
@@ -112,16 +112,18 @@ function SmartSelect(_a) {
|
|
|
112
112
|
});
|
|
113
113
|
}); };
|
|
114
114
|
useEffect(function () {
|
|
115
|
-
if (
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
115
|
+
if (!postview) {
|
|
116
|
+
if (first) {
|
|
117
|
+
setFirst(false);
|
|
118
|
+
var invalids = calcInvalidDeps(step, dependencyStore).filter(function (idDep) { return others.originalValues[idDep]; });
|
|
119
|
+
setError(calcDepError === null || calcDepError === void 0 ? void 0 : calcDepError(invalids.map(function (idDep) { var _a; return (_a = form.steps[idDep]) === null || _a === void 0 ? void 0 : _a.type; })));
|
|
120
|
+
calcOptions(value, invalids);
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
if (value)
|
|
124
|
+
onChange(null);
|
|
125
|
+
calcOptions(null);
|
|
126
|
+
}
|
|
125
127
|
}
|
|
126
128
|
}, (_c = (_b = step.dependencies) === null || _b === void 0 ? void 0 : _b.map(function (dep) { return dependencyStore[dep]; })) !== null && _c !== void 0 ? _c : []);
|
|
127
129
|
var handleMissingDep = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
@@ -149,10 +151,13 @@ function SmartSelect(_a) {
|
|
|
149
151
|
: calcStepWidth(step.size, form.size),
|
|
150
152
|
minHeight: step.description || step.required ? '55px' : '43px',
|
|
151
153
|
}, onClick: function () {
|
|
152
|
-
if (options === null) {
|
|
154
|
+
if (options === null && !(!editable || postview)) {
|
|
153
155
|
handleMissingDep();
|
|
154
156
|
}
|
|
155
|
-
|
|
157
|
+
if (options === undefined && !(!editable || postview)) {
|
|
158
|
+
setLoading(true);
|
|
159
|
+
}
|
|
160
|
+
}, "data-testid": step.id }, { children: _jsx(RoundedSmartSelect, { value: value, onBlur: onBlur, disabled: options === null, loading: loading, options: options !== null && options !== void 0 ? options : [], inputRef: inputRef, cantEdit: !editable || postview, fullWidth: true, backgroundColor: "transparent", innerBackgroundColor: (_d = formStyle.stepBackgroundColor) !== null && _d !== void 0 ? _d : 'white', label: step.label, required: step.required, height: '31px', searchable: step.searchable, icon: step.showIcon ? icon : undefined, iconComponent: step.showIcon ? iconComponent : undefined, helperTextColor: formStyle.descriptionTextColor, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, errorColor: formStyle.errorColor, color: formStyle.textColor, containerMargin: "0px", handleUpdate: function (value) {
|
|
156
161
|
var _a;
|
|
157
162
|
if (dependencyStore[step.id] !== undefined) {
|
|
158
163
|
setDependencyStore(__assign(__assign({}, dependencyStore), (_a = {}, _a[step.id] = value, _a)));
|
package/package.json
CHANGED