@integry/sdk 4.7.36 → 4.7.38
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
|
@@ -2041,6 +2041,7 @@ class ActionForm extends Component<ActionFormPropsType, ActionFormStateType> {
|
|
|
2041
2041
|
}
|
|
2042
2042
|
case 'CUSTOM_FIELDS': {
|
|
2043
2043
|
let fieldVal = null;
|
|
2044
|
+
let fieldMappedVal = null;
|
|
2044
2045
|
let elParentFields = [];
|
|
2045
2046
|
if (
|
|
2046
2047
|
el.activity_field?.parent_fields &&
|
|
@@ -2067,6 +2068,20 @@ class ActionForm extends Component<ActionFormPropsType, ActionFormStateType> {
|
|
|
2067
2068
|
} else {
|
|
2068
2069
|
fieldVal = el.default_value;
|
|
2069
2070
|
}
|
|
2071
|
+
} else {
|
|
2072
|
+
fieldMappedVal = this.props.stepDataMapping[
|
|
2073
|
+
selectedStep.id
|
|
2074
|
+
]
|
|
2075
|
+
? this.props.stepDataMapping[
|
|
2076
|
+
selectedStep.id
|
|
2077
|
+
][el.id]
|
|
2078
|
+
: ({} as {
|
|
2079
|
+
objectValue: Record<
|
|
2080
|
+
string,
|
|
2081
|
+
string | number
|
|
2082
|
+
>;
|
|
2083
|
+
});
|
|
2084
|
+
fieldMappedVal = fieldMappedVal?.objectValue;
|
|
2070
2085
|
}
|
|
2071
2086
|
|
|
2072
2087
|
return html`
|
|
@@ -2080,6 +2095,7 @@ class ActionForm extends Component<ActionFormPropsType, ActionFormStateType> {
|
|
|
2080
2095
|
}`}
|
|
2081
2096
|
>
|
|
2082
2097
|
<${DynamicTypedField}
|
|
2098
|
+
stepId=${selectedStep.id}
|
|
2083
2099
|
dynamicField=${el}
|
|
2084
2100
|
endpointData=${JSON.stringify({
|
|
2085
2101
|
authorization_id:
|
|
@@ -2162,7 +2178,7 @@ class ActionForm extends Component<ActionFormPropsType, ActionFormStateType> {
|
|
|
2162
2178
|
JSONToActivityOutputData(
|
|
2163
2179
|
this.props.tagsTree || {},
|
|
2164
2180
|
)}
|
|
2165
|
-
value=${fieldVal}
|
|
2181
|
+
value=${fieldVal || fieldMappedVal}
|
|
2166
2182
|
allowWorkspaceConnectedAccounts=${!!this
|
|
2167
2183
|
.props.onFieldChangeCallback}
|
|
2168
2184
|
/>
|
|
@@ -62,6 +62,7 @@ interface ApiResponse {
|
|
|
62
62
|
|
|
63
63
|
const DynamicTypedFields = (props: DynamicFieldsProps) => {
|
|
64
64
|
const {
|
|
65
|
+
stepId,
|
|
65
66
|
dynamicField,
|
|
66
67
|
sourceFlowIntegrataionInvocationUrl = '',
|
|
67
68
|
selectedAuthId = '',
|
|
@@ -78,6 +79,8 @@ const DynamicTypedFields = (props: DynamicFieldsProps) => {
|
|
|
78
79
|
allowWorkspaceConnectedAccounts = false,
|
|
79
80
|
tagsTree = null,
|
|
80
81
|
showMenuOnLeft = false,
|
|
82
|
+
appName = '',
|
|
83
|
+
placeHolder = '',
|
|
81
84
|
} = props;
|
|
82
85
|
|
|
83
86
|
const [dynamicItems, setDynamicItems] = useState<DynamicDataItem[]>([]);
|
|
@@ -314,6 +317,13 @@ const DynamicTypedFields = (props: DynamicFieldsProps) => {
|
|
|
314
317
|
onChangeCallback(
|
|
315
318
|
JSON.stringify(isArray ? newFieldSets : newFieldSets[0]),
|
|
316
319
|
);
|
|
320
|
+
} else {
|
|
321
|
+
props.setStepMappingData({
|
|
322
|
+
stepId,
|
|
323
|
+
fieldId: dynamicField.id,
|
|
324
|
+
id: fieldId,
|
|
325
|
+
value: val,
|
|
326
|
+
});
|
|
317
327
|
}
|
|
318
328
|
|
|
319
329
|
return newFieldSets;
|
|
@@ -325,6 +335,16 @@ const DynamicTypedFields = (props: DynamicFieldsProps) => {
|
|
|
325
335
|
onFieldSetChange(0, id, val, type);
|
|
326
336
|
};
|
|
327
337
|
|
|
338
|
+
const getPlaceholder = () => {
|
|
339
|
+
let placeHolderValue = 'Enter text or map to fields...';
|
|
340
|
+
if (placeHolder) {
|
|
341
|
+
placeHolderValue = placeHolder;
|
|
342
|
+
} else if (appName) {
|
|
343
|
+
placeHolderValue = `Enter text or map to ${appName} fields...`;
|
|
344
|
+
}
|
|
345
|
+
return placeHolderValue;
|
|
346
|
+
};
|
|
347
|
+
|
|
328
348
|
return html`
|
|
329
349
|
<div>
|
|
330
350
|
${loading
|
|
@@ -367,7 +387,7 @@ const DynamicTypedFields = (props: DynamicFieldsProps) => {
|
|
|
367
387
|
<${MultipurposeField}
|
|
368
388
|
id="${`${setIndex}_${el.id}`}"
|
|
369
389
|
title="${el.title}"
|
|
370
|
-
placeholder
|
|
390
|
+
placeholder=${getPlaceholder()}
|
|
371
391
|
isRequired="${el.is_required !== undefined
|
|
372
392
|
? el.is_required
|
|
373
393
|
: dynamicField.is_required}"
|
|
@@ -424,7 +444,7 @@ const DynamicTypedFields = (props: DynamicFieldsProps) => {
|
|
|
424
444
|
<${MultipurposeField}
|
|
425
445
|
id="${el.id}"
|
|
426
446
|
title="${el.title}"
|
|
427
|
-
placeholder
|
|
447
|
+
placeholder=${getPlaceholder()}
|
|
428
448
|
isRequired="${el.is_required !== undefined
|
|
429
449
|
? el.is_required
|
|
430
450
|
: dynamicField.is_required}"
|