@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.
@@ -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
@@ -112,16 +112,18 @@ function SmartSelect(_a) {
112
112
  });
113
113
  }); };
114
114
  useEffect(function () {
115
- if (first) {
116
- setFirst(false);
117
- var invalids = calcInvalidDeps(step, dependencyStore).filter(function (idDep) { return others.originalValues[idDep]; });
118
- 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; })));
119
- calcOptions(value, invalids);
120
- }
121
- else {
122
- if (value)
123
- onChange(null);
124
- calcOptions(null);
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
- }, "data-testid": step.id }, { children: _jsx(RoundedSmartSelect, { value: value, onBlur: onBlur, disabled: options === null, loading: options === undefined || 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) {
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)));
@@ -42,7 +42,7 @@
42
42
  .EF-DraftContainer .rdw-editor-main {
43
43
  cursor: text;
44
44
  padding-top: 12px;
45
- padding-bottom: 12px;
45
+ padding-bottom: 40px;
46
46
  margin-right: 0px;
47
47
  }
48
48
 
@@ -117,6 +117,9 @@ var useTextfieldStyles = function (props) {
117
117
  '& .EF-MuiAutocomplete-clearIndicator': {
118
118
  display: 'none',
119
119
  },
120
+ '& .EF-MuiAutocomplete-endAdornment': {
121
+ top: 'calc(50% - 13px)',
122
+ },
120
123
  },
121
124
  }); });
122
125
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arquimedes.co/eureka-forms",
3
3
  "repository": "git://github.com/Arquimede5/Eureka-Forms.git",
4
- "version": "1.7.4",
4
+ "version":"1.7.6-test",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
7
7
  "build": "react-scripts build",