@integry/sdk 4.5.38 → 4.5.39

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integry/sdk",
3
- "version": "4.5.38",
3
+ "version": "4.5.39",
4
4
  "description": "Integry SDK",
5
5
  "main": "dist/umd/index.umd.js",
6
6
  "module": "dist/esm/index.csm.js",
@@ -100,12 +100,21 @@ const ObjectField = (props: ObjectFieldProps) => {
100
100
  activityOutputData,
101
101
  activityOutputDataRaw,
102
102
  } = props;
103
+ let templateFields = [];
104
+
105
+ if (Array.isArray(field.template_fields)) {
106
+ if (field.template_fields.length > 0) {
107
+ templateFields = field.template_fields;
108
+ } else if (field.type === 'TEXTAREA') {
109
+ templateFields = [field];
110
+ }
111
+ }
103
112
  const normalizedField = {
104
113
  ...field,
105
114
  properties:
106
115
  field.properties ||
107
116
  (field.template_fields
108
- ? transformTemplateFieldsToProperties(field.template_fields)
117
+ ? transformTemplateFieldsToProperties(templateFields)
109
118
  : {}),
110
119
  };
111
120
 
@@ -206,7 +206,13 @@ class FunctionForm extends Component<
206
206
  value = JSON.parse(value);
207
207
  // Ensure the parsed value is an object
208
208
  } catch (e) {
209
- value = {};
209
+ if (typeof value === 'string') {
210
+ value = {
211
+ [fieldDetails.meta.title]: value,
212
+ };
213
+ } else {
214
+ value = {};
215
+ }
210
216
  }
211
217
  }
212
218
  break;