@integry/sdk 4.5.50 → 4.5.52
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/.vscode/launch.json +2 -2
- package/dist/esm/index.csm.js +1 -1
- package/dist/umd/index.umd.js +1 -1
- package/package.json +1 -1
- package/src/components/MultipurposeField/Dropdown/index.tsx +9 -1
- package/src/components/form/ObjectField/index.ts +8 -1
- package/src/features/common/ActionForm/index.ts +6 -4
package/package.json
CHANGED
|
@@ -67,6 +67,7 @@ interface ListBoxProps {
|
|
|
67
67
|
optionKeyPath?: string;
|
|
68
68
|
valueKeyPath?: string;
|
|
69
69
|
dataSourceBody?: any;
|
|
70
|
+
parentFieldChanged?: boolean;
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
const ListBox = (props: ListBoxProps) => {
|
|
@@ -108,6 +109,7 @@ const ListBox = (props: ListBoxProps) => {
|
|
|
108
109
|
disabled = false,
|
|
109
110
|
isMultiSelect = false,
|
|
110
111
|
dataSourceBody = {},
|
|
112
|
+
parentFieldChanged = false,
|
|
111
113
|
} = props;
|
|
112
114
|
|
|
113
115
|
const [query, setQuery] = useState<string>('');
|
|
@@ -350,7 +352,13 @@ const ListBox = (props: ListBoxProps) => {
|
|
|
350
352
|
setItems(responseMapper(checkboxItems));
|
|
351
353
|
setLoading(false);
|
|
352
354
|
}
|
|
353
|
-
}, [
|
|
355
|
+
}, [
|
|
356
|
+
endpointData,
|
|
357
|
+
skipOptionFetch,
|
|
358
|
+
endpointUrl,
|
|
359
|
+
selectedAuthId,
|
|
360
|
+
parentFieldChanged,
|
|
361
|
+
]);
|
|
354
362
|
|
|
355
363
|
const handleKeyDown = (event: KeyboardEvent) => {
|
|
356
364
|
if (event.key === 'Tab') {
|
|
@@ -246,6 +246,13 @@ const ObjectField = (props: ObjectFieldProps) => {
|
|
|
246
246
|
});
|
|
247
247
|
};
|
|
248
248
|
|
|
249
|
+
const formatValueForTextarea = (value: any): string => {
|
|
250
|
+
if (typeof value === 'object' && value !== null) {
|
|
251
|
+
return JSON.stringify(value, null, 2); // Pretty-print with 2-space indentation
|
|
252
|
+
}
|
|
253
|
+
return String(value); // Convert other values to string
|
|
254
|
+
};
|
|
255
|
+
|
|
249
256
|
// Render fields for each object in the array
|
|
250
257
|
const renderFields = (
|
|
251
258
|
properties: { [key: string]: FieldDetails },
|
|
@@ -326,7 +333,7 @@ const ObjectField = (props: ObjectFieldProps) => {
|
|
|
326
333
|
isMappable=${activityOutputDataRaw &&
|
|
327
334
|
Object.entries(activityOutputDataRaw).length > 0}
|
|
328
335
|
allowTagsInText=${activityOutputDataRaw}
|
|
329
|
-
value=${objectValue}
|
|
336
|
+
value=${formatValueForTextarea(objectValue)}
|
|
330
337
|
><//>
|
|
331
338
|
`}
|
|
332
339
|
${fieldType === 'CHECKBOX' &&
|
|
@@ -1347,6 +1347,7 @@ class ActionForm extends Component<ActionFormPropsType, ActionFormStateType> {
|
|
|
1347
1347
|
this.props.stepMapping[this.props.step.id]
|
|
1348
1348
|
?.selectedAuthId,
|
|
1349
1349
|
...this.fieldDynamicData(el),
|
|
1350
|
+
...this.state.dynamicFieldsData,
|
|
1350
1351
|
})}
|
|
1351
1352
|
isReadOnly=${isReadOnly}
|
|
1352
1353
|
isChanged=${
|
|
@@ -1387,6 +1388,9 @@ class ActionForm extends Component<ActionFormPropsType, ActionFormStateType> {
|
|
|
1387
1388
|
)}
|
|
1388
1389
|
optionKeyPath=${uiField?.value_key_path || ''}
|
|
1389
1390
|
valueKeyPath=${uiField?.option_key_path || ''}
|
|
1391
|
+
parentFieldChanged=${
|
|
1392
|
+
this.state.parentFieldChanged
|
|
1393
|
+
}
|
|
1390
1394
|
><//>
|
|
1391
1395
|
</${ConfigureFieldWrapper}>
|
|
1392
1396
|
</div>`;
|
|
@@ -1584,10 +1588,8 @@ class ActionForm extends Component<ActionFormPropsType, ActionFormStateType> {
|
|
|
1584
1588
|
objectValue=${
|
|
1585
1589
|
(selectedStepData &&
|
|
1586
1590
|
selectedStepData[el.id] &&
|
|
1587
|
-
selectedStepData[el.id].
|
|
1588
|
-
selectedStepData[el.id].
|
|
1589
|
-
'x-integry-skipped-field' &&
|
|
1590
|
-
selectedStepData[el.id].value) ||
|
|
1591
|
+
selectedStepData[el.id].objectValue &&
|
|
1592
|
+
selectedStepData[el.id].objectValue) ||
|
|
1591
1593
|
el.default_value ||
|
|
1592
1594
|
''
|
|
1593
1595
|
}
|