@crowdin/app-project-module 3.2.1 → 3.2.2
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.
|
@@ -35533,7 +35533,8 @@ Defaulting to \`null\`.`;
|
|
|
35533
35533
|
visited.add(item.id);
|
|
35534
35534
|
const children = (_a = model.childrenByParentId.get(item.id)) !== null && _a !== void 0 ? _a : [];
|
|
35535
35535
|
result.push({ item, level, hasChildren: children.length > 0 });
|
|
35536
|
-
|
|
35536
|
+
// search auto-expands folders, but language rows stay under user control
|
|
35537
|
+
if ((query && item.nodeType !== 'file') || openedIds.has(item.id)) {
|
|
35537
35538
|
children.forEach((child) => visit(child, level + 1));
|
|
35538
35539
|
}
|
|
35539
35540
|
};
|
|
@@ -35745,9 +35746,12 @@ Defaulting to \`null\`.`;
|
|
|
35745
35746
|
if (!queryActive) {
|
|
35746
35747
|
return [...openedFolderIds];
|
|
35747
35748
|
}
|
|
35749
|
+
const openedIds = new Set(openedFolderIds);
|
|
35748
35750
|
return visibleItems
|
|
35749
|
-
.filter(({ item, hasChildren }) =>
|
|
35750
|
-
|
|
35751
|
+
.filter(({ item, hasChildren }) => item.nodeType === 'file'
|
|
35752
|
+
? openedIds.has(item.id)
|
|
35753
|
+
: Boolean(hasChildren ||
|
|
35754
|
+
(assumeFoldersHaveChildren && (item.nodeType === 'branch' || item.nodeType === 'folder'))))
|
|
35751
35755
|
.map(({ item }) => item.id);
|
|
35752
35756
|
}, [assumeFoldersHaveChildren, openedFolderIds, queryActive, visibleItems]);
|
|
35753
35757
|
const expandedItemsRef = reactExports.useRef(expandedItems);
|