@integry/sdk 4.7.31 → 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>
|