Insert a new detailed-view metadata row in the same order as createModelItem (dir row, designer, source, parent, license, tags).
(metadataContainer, el, selectorList)
| 1419 | |
| 1420 | /** Drop expand state for parent groups that no longer have 2+ distinct files. */ |
| 1421 | function pruneParentModelExpandedGroups(models) { |
| 1422 | if (!parentModelExpandedGroups.size) return; |
| 1423 | const pathSets = new Map(); |
| 1424 | for (const model of models || []) { |
| 1425 | const label = getParentModelGroupLabel(model); |
| 1426 | if (!label) continue; |
| 1427 | const gk = `parent:${getParentModelGroupKey(label)}`; |
| 1428 | const pathKey = normalizePathForComparison(model.filePath || ''); |
| 1429 | if (!pathKey) continue; |
| 1430 | if (!pathSets.has(gk)) pathSets.set(gk, new Set()); |
| 1431 | pathSets.get(gk).add(pathKey); |
| 1432 | } |
| 1433 | for (const key of [...parentModelExpandedGroups]) { |
| 1434 | const set = pathSets.get(key); |
| 1435 | if (!set || set.size < 2) { |
| 1436 | parentModelExpandedGroups.delete(key); |
| 1437 | } |
| 1438 | } |
| 1439 | } |
| 1440 | |
| 1441 | function pruneZipArchiveExpandedGroups(models) { |
| 1442 | if (!zipArchiveExpandedGroups.size) return; |
| 1443 | const pathSets = new Map(); |
| 1444 | for (const model of models || []) { |
no outgoing calls
no test coverage detected