feat: Data transformation nodes and actions in Nodes Panel (#7760)

- Split Items List node into separate nodes per action
- Review node descriptions
- New icons
- New sections in subcategories

---------

Co-authored-by: Giulio Andreini <andreini@netseven.it>
Co-authored-by: Deborah <deborah@starfallprojects.co.uk>
Co-authored-by: Michael Kret <michael.k@radency.com>
This commit is contained in:
Elias Meire
2023-12-08 11:40:05 +01:00
committed by GitHub
parent 90824b50ed
commit 675ec21d33
78 changed files with 4353 additions and 74 deletions

View File

@@ -59,7 +59,7 @@ export function subcategorizeItems(items: SimplifiedNodeType[]) {
export function sortNodeCreateElements(nodes: INodeCreateElement[]) {
return nodes.sort((a, b) => {
if (a.type !== 'node' || b.type !== 'node') return -1;
if (a.type !== 'node' || b.type !== 'node') return 0;
const displayNameA = a.properties?.displayName?.toLowerCase() || a.key;
const displayNameB = b.properties?.displayName?.toLowerCase() || b.key;
@@ -101,16 +101,16 @@ export function groupItemsInSections(
type: 'section',
key: section.key,
title: section.title,
children: itemsBySection[section.key],
children: sortNodeCreateElements(itemsBySection[section.key] ?? []),
}),
)
.concat({
type: 'section',
key: 'other',
title: i18n.baseText('nodeCreator.sectionNames.other'),
children: itemsBySection.other,
children: sortNodeCreateElements(itemsBySection.other ?? []),
})
.filter((section) => section.children);
.filter((section) => section.children.length > 0);
if (result.length <= 1) {
return items;