refactor: remove unused dead-code exports flagged by react-doctor
Low-risk subset only — each verified to have zero external references (tsc + eslint green); API clients, stores, icons and constants left untouched. - libs/util.ts: unexport `is` (still used internally by isNumber) - components/tree-select/libs/util.ts: drop unused recursive `findLabel` - app/person/workload/config.ts: drop unused `dimensionOpts` - components/login/libs/session-cache.ts: drop unused `getCachedSession` - components/setting/PageSurface.tsx: drop 3 unused layout components (SettingTableViewport, SettingSectionHeader, SettingFilterStack) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -75,24 +75,6 @@ export const buildTreeValueMap = (
|
||||
return acc
|
||||
}
|
||||
|
||||
export const findLabel = (
|
||||
nodes: TreeNodeData[],
|
||||
targetValue: string,
|
||||
pathArr: string[] = [] // 内部用,调用端无需传入
|
||||
): FindResult => {
|
||||
for (const node of nodes) {
|
||||
const curPath = [...pathArr, node.label as string] // 复制一份,避免污染上层
|
||||
if (node.value === targetValue) {
|
||||
return { path: curPath.join(TREE_PATH_SEPARATOR), node }
|
||||
}
|
||||
if (node.children) {
|
||||
const found = findLabel(node.children, targetValue, curPath)
|
||||
if (found.node) return found
|
||||
}
|
||||
}
|
||||
return { path: "", node: null }
|
||||
}
|
||||
|
||||
export const findNodesByValues = (
|
||||
valueMap: Record<string, TreeValueMeta>,
|
||||
targetValues: string[]
|
||||
|
||||
Reference in New Issue
Block a user