@integry/sdk 4.7.30 → 4.7.32
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
|
@@ -163,10 +163,28 @@ const MultipurposeField = (props: MultipurposeFieldProps) => {
|
|
|
163
163
|
// For values like "steps.slack_post_message_1.output.ok", "storage.user_data.value",
|
|
164
164
|
// "setup_form.api_key.value", "parameters.timeout.value" return the second part
|
|
165
165
|
if (parts.length >= 2) {
|
|
166
|
-
|
|
166
|
+
if (parts.length === 0) {
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// Determine if first segment is a known root key from tagsTree
|
|
171
|
+
const rootKeys = tagsTree
|
|
172
|
+
? Object.keys(tagsTree).map((key) => {
|
|
173
|
+
const node = tagsTree[key];
|
|
174
|
+
return node?.machineName || key;
|
|
175
|
+
})
|
|
176
|
+
: [];
|
|
177
|
+
|
|
178
|
+
if (parts.length >= 2 && rootKeys.includes(parts[0])) {
|
|
179
|
+
return parts[1];
|
|
180
|
+
}
|
|
181
|
+
if (parts.length >= 2 && parts[0] === 'meta') {
|
|
182
|
+
return parts[0];
|
|
183
|
+
}
|
|
184
|
+
// If there's no second part, return null
|
|
185
|
+
return null;
|
|
167
186
|
}
|
|
168
|
-
|
|
169
|
-
return null;
|
|
187
|
+
return parts[0] || null;
|
|
170
188
|
};
|
|
171
189
|
|
|
172
190
|
// Build flattened appIcon map when tagsTree changes
|
|
@@ -12,6 +12,7 @@ interface TagNode {
|
|
|
12
12
|
appIcon?: string; // URL for the step's app icon
|
|
13
13
|
output?: Record<string, unknown> | unknown[]; // JSON data for step output
|
|
14
14
|
tags?: Record<string, TagNode>; // Nested tags or fields
|
|
15
|
+
ignoreParentKey?: boolean; // If true, omit parent key from final tag path
|
|
15
16
|
[key: string]: unknown; // Allow for additional properties
|
|
16
17
|
}
|
|
17
18
|
|
|
@@ -42,6 +43,7 @@ interface TagListProps {
|
|
|
42
43
|
onSelect?: (tag: Record<string, unknown>) => void;
|
|
43
44
|
activeTab?: string;
|
|
44
45
|
parentAppIcon?: string; // Add parent app icon to props
|
|
46
|
+
ignoreParentKey?: boolean; // whether parent key should be ignored in tag path
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
interface TagsMenuProps {
|
|
@@ -369,6 +371,7 @@ const TagList = ({
|
|
|
369
371
|
},
|
|
370
372
|
activeTab = '',
|
|
371
373
|
parentAppIcon = undefined, // Add parent app icon parameter
|
|
374
|
+
ignoreParentKey = false,
|
|
372
375
|
}: TagListProps) => {
|
|
373
376
|
// Track which nodes are expanded to show nested steps
|
|
374
377
|
const [expandedNodes, setExpandedNodes] = useState<Record<string, boolean>>(
|
|
@@ -618,8 +621,10 @@ const TagList = ({
|
|
|
618
621
|
value: unknown,
|
|
619
622
|
currentPath: string,
|
|
620
623
|
nodeAppIcon?: string,
|
|
624
|
+
ignoreKey = false,
|
|
621
625
|
) => {
|
|
622
|
-
const
|
|
626
|
+
const basePath = extractStepsFromOutputPath(currentPath);
|
|
627
|
+
const tagPath = ignoreKey ? basePath : `${activeTab}.${basePath}`;
|
|
623
628
|
|
|
624
629
|
// Determine which app icon to use - prioritize node's own icon, then parent icon
|
|
625
630
|
const appIconToUse = nodeAppIcon || parentAppIcon;
|
|
@@ -846,6 +851,8 @@ const TagList = ({
|
|
|
846
851
|
? value.appIcon
|
|
847
852
|
: undefined;
|
|
848
853
|
const appIconToPass = currentNodeAppIcon || parentAppIcon;
|
|
854
|
+
const childIgnoreParentKey =
|
|
855
|
+
ignoreParentKey || (isTagNode(value) && value.ignoreParentKey === true);
|
|
849
856
|
|
|
850
857
|
const handleMenuRowClcik = (e: Event) => {
|
|
851
858
|
if (isStep && hasOutput) {
|
|
@@ -860,7 +867,13 @@ const TagList = ({
|
|
|
860
867
|
toggleOutputExpand(key, e);
|
|
861
868
|
} else {
|
|
862
869
|
// For leaf nodes, select the value
|
|
863
|
-
handleSelectTag(
|
|
870
|
+
handleSelectTag(
|
|
871
|
+
key,
|
|
872
|
+
value,
|
|
873
|
+
currentPath,
|
|
874
|
+
currentNodeAppIcon,
|
|
875
|
+
childIgnoreParentKey,
|
|
876
|
+
);
|
|
864
877
|
}
|
|
865
878
|
};
|
|
866
879
|
|
|
@@ -893,6 +906,7 @@ const TagList = ({
|
|
|
893
906
|
value,
|
|
894
907
|
currentPath,
|
|
895
908
|
currentNodeAppIcon,
|
|
909
|
+
childIgnoreParentKey,
|
|
896
910
|
);
|
|
897
911
|
}
|
|
898
912
|
}}
|
|
@@ -982,6 +996,7 @@ const TagList = ({
|
|
|
982
996
|
value,
|
|
983
997
|
currentPath,
|
|
984
998
|
currentNodeAppIcon,
|
|
999
|
+
childIgnoreParentKey,
|
|
985
1000
|
);
|
|
986
1001
|
}}
|
|
987
1002
|
title="Add this tag"
|
|
@@ -1187,6 +1202,7 @@ const TagList = ({
|
|
|
1187
1202
|
onSelect=${onSelect}
|
|
1188
1203
|
activeTab=${activeTab}
|
|
1189
1204
|
parentAppIcon=${appIconToPass}
|
|
1205
|
+
ignoreParentKey=${childIgnoreParentKey}
|
|
1190
1206
|
/>
|
|
1191
1207
|
`;
|
|
1192
1208
|
}
|
|
@@ -1211,6 +1227,7 @@ const TagList = ({
|
|
|
1211
1227
|
onSelect=${onSelect}
|
|
1212
1228
|
activeTab=${activeTab}
|
|
1213
1229
|
parentAppIcon=${appIconToPass}
|
|
1230
|
+
ignoreParentKey=${value.ignoreParentKey || ignoreParentKey}
|
|
1214
1231
|
/>`
|
|
1215
1232
|
: ''}
|
|
1216
1233
|
<!-- Display expanded array content with additional debug info -->
|
|
@@ -1225,6 +1242,7 @@ const TagList = ({
|
|
|
1225
1242
|
onSelect=${onSelect}
|
|
1226
1243
|
activeTab=${activeTab}
|
|
1227
1244
|
parentAppIcon=${appIconToPass}
|
|
1245
|
+
ignoreParentKey=${childIgnoreParentKey}
|
|
1228
1246
|
/>
|
|
1229
1247
|
</div>`
|
|
1230
1248
|
: ''}
|
|
@@ -1246,6 +1264,7 @@ const TagList = ({
|
|
|
1246
1264
|
onSelect=${onSelect}
|
|
1247
1265
|
activeTab=${activeTab}
|
|
1248
1266
|
parentAppIcon=${appIconToPass}
|
|
1267
|
+
ignoreParentKey=${childIgnoreParentKey}
|
|
1249
1268
|
/>
|
|
1250
1269
|
</div>`
|
|
1251
1270
|
: ''}
|
|
@@ -1591,6 +1610,7 @@ const TabMenu = ({ data, onSelect, onOptionClick }: TagMenuProps) => {
|
|
|
1591
1610
|
parentAppIcon=${isTagNode(activeData)
|
|
1592
1611
|
? activeData.appIcon
|
|
1593
1612
|
: undefined}
|
|
1613
|
+
ignoreParentKey=${false}
|
|
1594
1614
|
/>
|
|
1595
1615
|
</div>`}
|
|
1596
1616
|
</div>
|
|
@@ -1073,12 +1073,14 @@ class ActionForm extends Component<ActionFormPropsType, ActionFormStateType> {
|
|
|
1073
1073
|
value,
|
|
1074
1074
|
isRequired,
|
|
1075
1075
|
machineName,
|
|
1076
|
+
computeValueUsingActivityOutput,
|
|
1076
1077
|
}: {
|
|
1077
1078
|
stepId: number;
|
|
1078
1079
|
fieldId: number;
|
|
1079
1080
|
value: string;
|
|
1080
1081
|
isRequired: boolean;
|
|
1081
1082
|
machineName?: string;
|
|
1083
|
+
computeValueUsingActivityOutput?: boolean;
|
|
1082
1084
|
}) => {
|
|
1083
1085
|
// we want to check if callback function is passed in props, if yes then call it
|
|
1084
1086
|
if (this.props.onFieldChangeCallback) {
|
|
@@ -1105,10 +1107,16 @@ class ActionForm extends Component<ActionFormPropsType, ActionFormStateType> {
|
|
|
1105
1107
|
|
|
1106
1108
|
this.props.onFieldChangeCallback(machineName || '', value);
|
|
1107
1109
|
} else {
|
|
1110
|
+
const valueToUse = !computeValueUsingActivityOutput
|
|
1111
|
+
? value
|
|
1112
|
+
: this.getFieldValFromActivityOutputRaw(
|
|
1113
|
+
this.props.activityOutputData,
|
|
1114
|
+
value,
|
|
1115
|
+
);
|
|
1108
1116
|
this.props.setStepFieldData({
|
|
1109
1117
|
stepId: `${stepId}`,
|
|
1110
1118
|
fieldId: `${fieldId}`,
|
|
1111
|
-
value,
|
|
1119
|
+
value: valueToUse,
|
|
1112
1120
|
isRequired,
|
|
1113
1121
|
});
|
|
1114
1122
|
this.setState({ changedParentMachineName: machineName });
|
|
@@ -1718,34 +1726,16 @@ class ActionForm extends Component<ActionFormPropsType, ActionFormStateType> {
|
|
|
1718
1726
|
}
|
|
1719
1727
|
isRequired=${el.is_required}
|
|
1720
1728
|
isHidden=${el.is_hidden}
|
|
1721
|
-
onChange=${(
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
: val,
|
|
1732
|
-
isRequired: el.is_required,
|
|
1733
|
-
machineName:
|
|
1734
|
-
el.activity_field?.machine_name,
|
|
1735
|
-
});
|
|
1736
|
-
} else {
|
|
1737
|
-
setStepFieldData({
|
|
1738
|
-
stepId: `${step.id}`,
|
|
1739
|
-
fieldId: `${el.id}`,
|
|
1740
|
-
value: this.getFieldValFromActivityOutputRaw(
|
|
1741
|
-
this.props.activityOutputData,
|
|
1742
|
-
val,
|
|
1743
|
-
),
|
|
1744
|
-
isRequired: el.is_required,
|
|
1745
|
-
passesRegexTest,
|
|
1746
|
-
});
|
|
1747
|
-
this.props.verifyStepValidity(step.id);
|
|
1748
|
-
}
|
|
1729
|
+
onChange=${(val: string) => {
|
|
1730
|
+
this.onFieldChange({
|
|
1731
|
+
stepId: step.id,
|
|
1732
|
+
fieldId: el.id,
|
|
1733
|
+
value: val,
|
|
1734
|
+
isRequired: el.is_required,
|
|
1735
|
+
machineName:
|
|
1736
|
+
el.activity_field?.machine_name,
|
|
1737
|
+
computeValueUsingActivityOutput: true,
|
|
1738
|
+
});
|
|
1749
1739
|
}}
|
|
1750
1740
|
isReadOnly=${isReadOnly}
|
|
1751
1741
|
isChanged=${
|