@integry/sdk 4.5.37 → 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.37",
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
 
@@ -1856,7 +1856,11 @@ class ActionForm extends Component<ActionFormPropsType, ActionFormStateType> {
1856
1856
  isMappable=${el.is_mappable}
1857
1857
  isEditable=${el.is_editable}
1858
1858
  allowTagsInText=${el.allow_tags_in_text}
1859
- fieldId=${el.activity_field?.id || el.id}
1859
+ fieldId=${
1860
+ el.activity_field?.id ||
1861
+ el.id ||
1862
+ el?.activity_field?.machine_name
1863
+ }
1860
1864
  refreshRootStepData=${
1861
1865
  this.refreshRootStepData
1862
1866
  }
@@ -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;